@kong-ui-public/analytics-chart 0.1.3 → 0.1.5
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/style.css +1 -1
- package/dist/types/components/AnalyticsChart.vue.d.ts.map +1 -1
- package/dist/types/components/chart-types/TimeSeriesChart.vue.d.ts +16 -5
- package/dist/types/components/chart-types/TimeSeriesChart.vue.d.ts.map +1 -1
- package/dist/types/composables/useLineChartOptions.d.ts.map +1 -1
- package/dist/types/types/chartjs-options.d.ts +2 -1
- package/dist/types/types/chartjs-options.d.ts.map +1 -1
- package/dist/vitals-chart.es.js +1089 -1075
- package/dist/vitals-chart.umd.js +10 -10
- package/package.json +3 -3
package/dist/vitals-chart.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(vt,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],g):(vt=typeof globalThis<"u"?globalThis:vt||self,g(vt["kong-ui-publicvitals-chart"]={},vt.Vue))})(this,function(vt,g){var Ze,hh;"use strict";var aM=Object.defineProperty;var sM=(vt,g,Te)=>g in vt?aM(vt,g,{enumerable:!0,configurable:!0,writable:!0,value:Te}):vt[g]=Te;var C=(vt,g,Te)=>(sM(vt,typeof g!="symbol"?g+"":g,Te),Te);var Te=function(e,t){return Te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},Te(e,t)};function le(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Te(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var I=function(){return I=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},I.apply(this,arguments)};function gh(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}function Me(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,a;i<r;i++)(a||!(i in t))&&(a||(a=Array.prototype.slice.call(t,0,i)),a[i]=t[i]);return e.concat(a||Array.prototype.slice.call(t))}var G;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(G||(G={}));var ft;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(ft||(ft={}));var vn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(vn||(vn={}));function po(e){return e.type===ft.literal}function ph(e){return e.type===ft.argument}function mo(e){return e.type===ft.number}function bo(e){return e.type===ft.date}function yo(e){return e.type===ft.time}function vo(e){return e.type===ft.select}function xo(e){return e.type===ft.plural}function mh(e){return e.type===ft.pound}function _o(e){return e.type===ft.tag}function wo(e){return!!(e&&typeof e=="object"&&e.type===vn.number)}function Nr(e){return!!(e&&typeof e=="object"&&e.type===vn.dateTime)}var To=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,bh=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function yh(e){var t={};return e.replace(bh,function(n){var i=n.length;switch(n[0]){case"G":t.era=i===4?"long":i===5?"narrow":"short";break;case"y":t.year=i===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][i-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][i-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=i===4?"short":i===5?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][i-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][i-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][i-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][i-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][i-1];break;case"s":t.second=["numeric","2-digit"][i-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=i<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var vh=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function xh(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(vh).filter(function(h){return h.length>0}),n=[],i=0,r=t;i<r.length;i++){var a=r[i],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],l=s.slice(1),c=0,u=l;c<u.length;c++){var d=u[c];if(d.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:l})}return n}function _h(e){return e.replace(/^(.*?)-/,"")}var Mo=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,So=/^(@+)?(\+|#+)?[rs]?$/g,wh=/(\*)(0+)|(#+)(0+)|(0+)/g,Do=/^(0+)$/;function Co(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(So,function(n,i,r){return typeof r!="string"?(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length):r==="+"?t.minimumSignificantDigits=i.length:i[0]==="#"?t.maximumSignificantDigits=i.length:(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length+(typeof r=="string"?r.length:0)),""}),t}function Po(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Th(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Do.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Eo(e){var t={},n=Po(e);return n||t}function Mh(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=_h(r.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=I(I(I({},t),{notation:"scientific"}),r.options.reduce(function(l,c){return I(I({},l),Eo(c))},{}));continue;case"engineering":t=I(I(I({},t),{notation:"engineering"}),r.options.reduce(function(l,c){return I(I({},l),Eo(c))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(r.options[0]);continue;case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(wh,function(l,c,u,d,h,f){if(c)t.minimumIntegerDigits=u.length;else{if(d&&h)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Do.test(r.stem)){t.minimumIntegerDigits=r.stem.length;continue}if(Mo.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(Mo,function(l,c,u,d,h,f){return u==="*"?t.minimumFractionDigits=c.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:h&&f?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+f.length):(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length),""});var a=r.options[0];a==="w"?t=I(I({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=I(I({},t),Co(a)));continue}if(So.test(r.stem)){t=I(I({},t),Co(r.stem));continue}var s=Po(r.stem);s&&(t=I(I({},t),s));var o=Th(r.stem);o&&(t=I(I({},t),o))}return t}var Ai={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","h","K"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TL:["H","hB","hb","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Sh(e,t){for(var n="",i=0;i<e.length;i++){var r=e.charAt(i);if(r==="j"){for(var a=0;i+1<e.length&&e.charAt(i+1)===r;)a++,i++;var s=1+(a&1),o=a<2?1:3+(a>>1),l="a",c=Dh(t);for((c=="H"||c=="k")&&(o=0);o-- >0;)n+=l;for(;s-- >0;)n=c+n}else r==="J"?n+="H":n+=r}return n}function Dh(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,i;n!=="root"&&(i=e.maximize().region);var r=Ai[i||""]||Ai[n||""]||Ai["".concat(n,"-001")]||Ai["001"];return r[0]}var Br,Ch=new RegExp("^".concat(To.source,"*")),Ph=new RegExp("".concat(To.source,"*$"));function Q(e,t){return{start:e,end:t}}var Eh=!!String.prototype.startsWith,kh=!!String.fromCodePoint,Oh=!!Object.fromEntries,Ah=!!String.prototype.codePointAt,Rh=!!String.prototype.trimStart,Lh=!!String.prototype.trimEnd,Ih=!!Number.isSafeInteger,Nh=Ih?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Hr=!0;try{var Bh=Ro("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Hr=((Br=Bh.exec("a"))===null||Br===void 0?void 0:Br[0])==="a"}catch{Hr=!1}var ko=Eh?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},Fr=kh?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n="",i=e.length,r=0,a;i>r;){if(a=e[r++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},Oo=Oh?Object.fromEntries:function(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n],a=r[0],s=r[1];t[a]=s}return t},Ao=Ah?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var i=e.charCodeAt(t),r;return i<55296||i>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?i:(i-55296<<10)+(r-56320)+65536}},Hh=Rh?function(e){return e.trimStart()}:function(e){return e.replace(Ch,"")},Fh=Lh?function(e){return e.trimEnd()}:function(e){return e.replace(Ph,"")};function Ro(e,t){return new RegExp(e,t)}var Ur;if(Hr){var Lo=Ro("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ur=function(e,t){var n;Lo.lastIndex=t;var i=Lo.exec(e);return(n=i[1])!==null&&n!==void 0?n:""}}else Ur=function(e,t){for(var n=[];;){var i=Ao(e,t);if(i===void 0||Io(i)||zh(i))break;n.push(i),t+=i>=65536?2:1}return Fr.apply(void 0,n)};var Uh=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,i){for(var r=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,i);if(s.err)return s;r.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),r.push({type:ft.pound,location:Q(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(G.UNMATCHED_CLOSING_TAG,Q(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&Wr(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;r.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;r.push(s.val)}}}return{val:r,err:null}},e.prototype.parseTag=function(t,n){var i=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:ft.literal,value:"<".concat(r,"/>"),location:Q(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Wr(this.char()))return this.error(G.INVALID_TAG,Q(o,this.clonePosition()));var l=this.clonePosition(),c=this.parseTagName();return r!==c?this.error(G.UNMATCHED_CLOSING_TAG,Q(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:ft.tag,value:r,children:s,location:Q(i,this.clonePosition())},err:null}:this.error(G.INVALID_TAG,Q(o,this.clonePosition())))}else return this.error(G.UNCLOSED_TAG,Q(i,this.clonePosition()))}else return this.error(G.INVALID_TAG,Q(i,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Yh(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var i=this.clonePosition(),r="";;){var a=this.tryParseQuote(n);if(a){r+=a;continue}var s=this.tryParseUnquoted(t,n);if(s){r+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){r+=o;continue}break}var l=Q(i,this.clonePosition());return{val:{type:ft.literal,value:r,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Wh(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var i=this.char();if(i===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(i);this.bump()}return Fr.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(n==="plural"||n==="selectordinal")||i===125&&t>0?null:(this.bump(),Fr(i))},e.prototype.parseArgument=function(t,n){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(G.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(G.EMPTY_ARGUMENT,Q(i,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(G.MALFORMED_ARGUMENT,Q(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(G.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:ft.argument,value:r,location:Q(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(G.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition())):this.parseArgumentOptions(t,n,r,i);default:return this.error(G.MALFORMED_ARGUMENT,Q(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),i=Ur(this.message,n),r=n+i.length;this.bumpTo(r);var a=this.clonePosition(),s=Q(t,a);return{value:i,location:s}},e.prototype.parseArgumentOptions=function(t,n,i,r){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(o){case"":return this.error(G.EXPECT_ARGUMENT_TYPE,Q(s,l));case"number":case"date":case"time":{this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var h=Fh(d.val);if(h.length===0)return this.error(G.EXPECT_ARGUMENT_STYLE,Q(this.clonePosition(),this.clonePosition()));var f=Q(u,this.clonePosition());c={style:h,styleLocation:f}}var p=this.tryParseArgumentClose(r);if(p.err)return p;var y=Q(r,this.clonePosition());if(c&&ko(c==null?void 0:c.style,"::",0)){var b=Hh(c.style.slice(2));if(o==="number"){var d=this.parseNumberSkeletonFromString(b,c.styleLocation);return d.err?d:{val:{type:ft.number,value:i,location:y,style:d.val},err:null}}else{if(b.length===0)return this.error(G.EXPECT_DATE_TIME_SKELETON,y);var m=b;this.locale&&(m=Sh(b,this.locale));var h={type:vn.dateTime,pattern:m,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?yh(m):{}},v=o==="date"?ft.date:ft.time;return{val:{type:v,value:i,location:y,style:h},err:null}}}return{val:{type:o==="number"?ft.number:o==="date"?ft.date:ft.time,value:i,location:y,style:(a=c==null?void 0:c.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var x=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(G.EXPECT_SELECT_ARGUMENT_OPTIONS,Q(x,I({},x)));this.bumpSpace();var w=this.parseIdentifierIfPossible(),_=0;if(o!=="select"&&w.value==="offset"){if(!this.bumpIf(":"))return this.error(G.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Q(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(G.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,G.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),w=this.parseIdentifierIfPossible(),_=d.val}var T=this.tryParsePluralOrSelectOptions(t,o,n,w);if(T.err)return T;var p=this.tryParseArgumentClose(r);if(p.err)return p;var M=Q(r,this.clonePosition());return o==="select"?{val:{type:ft.select,value:i,options:Oo(T.val),location:M},err:null}:{val:{type:ft.plural,value:i,options:Oo(T.val),offset:_,pluralType:o==="plural"?"cardinal":"ordinal",location:M},err:null}}default:return this.error(G.INVALID_ARGUMENT_TYPE,Q(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(G.EXPECT_ARGUMENT_CLOSING_BRACE,Q(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(G.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Q(r,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var i=[];try{i=xh(t)}catch{return this.error(G.INVALID_NUMBER_SKELETON,n)}return{val:{type:vn.number,tokens:i,location:n,parsedOptions:this.shouldParseSkeletons?Mh(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,i,r){for(var a,s=!1,o=[],l=new Set,c=r.value,u=r.location;;){if(c.length===0){var d=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(G.EXPECT_PLURAL_ARGUMENT_SELECTOR,G.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;u=Q(d,this.clonePosition()),c=this.message.slice(d.offset,this.offset())}else break}if(l.has(c))return this.error(n==="select"?G.DUPLICATE_SELECT_ARGUMENT_SELECTOR:G.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);c==="other"&&(s=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?G.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:G.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Q(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,n,i);if(p.err)return p;var y=this.tryParseArgumentClose(f);if(y.err)return y;o.push([c,{value:p.val,location:Q(f,this.clonePosition())}]),l.add(c),this.bumpSpace(),a=this.parseIdentifierIfPossible(),c=a.value,u=a.location}return o.length===0?this.error(n==="select"?G.EXPECT_SELECT_ARGUMENT_SELECTOR:G.EXPECT_PLURAL_ARGUMENT_SELECTOR,Q(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(G.MISSING_OTHER_CLAUSE,Q(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var i=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var l=Q(r,this.clonePosition());return a?(s*=i,Nh(s)?{val:s,err:null}:this.error(n,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=Ao(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(ko(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),i=this.message.indexOf(t,n);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Io(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),i=this.message.charCodeAt(n+(t>=65536?2:1));return i??null},e}();function Wr(e){return e>=97&&e<=122||e>=65&&e<=90}function Wh(e){return Wr(e)||e===47}function Yh(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Io(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function zh(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Yr(e){e.forEach(function(t){if(delete t.location,vo(t)||xo(t))for(var n in t.options)delete t.options[n].location,Yr(t.options[n].value);else mo(t)&&wo(t.style)||(bo(t)||yo(t))&&Nr(t.style)?delete t.style.location:_o(t)&&Yr(t.children)})}function Vh(e,t){t===void 0&&(t={}),t=I({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Uh(e,t).parse();if(n.err){var i=SyntaxError(G[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return t!=null&&t.captureLocation||Yr(n.val),n.val}function he(e,t){var n=t&&t.cache?t.cache:Kh,i=t&&t.serializer?t.serializer:Xh,r=t&&t.strategy?t.strategy:$h;return r(e,{cache:n,serializer:i})}function jh(e){return e==null||typeof e=="number"||typeof e=="boolean"}function No(e,t,n,i){var r=jh(i)?i:n(i),a=t.get(r);return typeof a>"u"&&(a=e.call(this,i),t.set(r,a)),a}function Bo(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),a=t.get(r);return typeof a>"u"&&(a=e.apply(this,i),t.set(r,a)),a}function zr(e,t,n,i,r){return n.bind(t,e,i,r)}function $h(e,t){var n=e.length===1?No:Bo;return zr(e,this,n,t.cache.create(),t.serializer)}function qh(e,t){return zr(e,this,Bo,t.cache.create(),t.serializer)}function Gh(e,t){return zr(e,this,No,t.cache.create(),t.serializer)}var Xh=function(){return JSON.stringify(arguments)};function Vr(){this.cache=Object.create(null)}Vr.prototype.get=function(e){return this.cache[e]},Vr.prototype.set=function(e,t){this.cache[e]=t};var Kh={create:function(){return new Vr}},fe={variadic:qh,monadic:Gh},ge;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(ge||(ge={}));var Le=function(e){le(t,e);function t(n,i,r){var a=e.call(this,n)||this;return a.code=i,a.originalMessage=r,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Ho=function(e){le(t,e);function t(n,i,r,a){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(i,'". Options are "').concat(Object.keys(r).join('", "'),'"'),ge.INVALID_VALUE,a)||this}return t}(Le),Zh=function(e){le(t,e);function t(n,i,r){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(i),ge.INVALID_VALUE,r)||this}return t}(Le),Qh=function(e){le(t,e);function t(n,i){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(i,'"'),ge.MISSING_VALUE,i)||this}return t}(Le),zt;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(zt||(zt={}));function Jh(e){return e.length<2?e:e.reduce(function(t,n){var i=t[t.length-1];return!i||i.type!==zt.literal||n.type!==zt.literal?t.push(n):i.value+=n.value,t},[])}function tf(e){return typeof e=="function"}function Ri(e,t,n,i,r,a,s){if(e.length===1&&po(e[0]))return[{type:zt.literal,value:e[0].value}];for(var o=[],l=0,c=e;l<c.length;l++){var u=c[l];if(po(u)){o.push({type:zt.literal,value:u.value});continue}if(mh(u)){typeof a=="number"&&o.push({type:zt.literal,value:n.getNumberFormat(t).format(a)});continue}var d=u.value;if(!(r&&d in r))throw new Qh(d,s);var h=r[d];if(ph(u)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),o.push({type:typeof h=="string"?zt.literal:zt.object,value:h});continue}if(bo(u)){var f=typeof u.style=="string"?i.date[u.style]:Nr(u.style)?u.style.parsedOptions:void 0;o.push({type:zt.literal,value:n.getDateTimeFormat(t,f).format(h)});continue}if(yo(u)){var f=typeof u.style=="string"?i.time[u.style]:Nr(u.style)?u.style.parsedOptions:i.time.medium;o.push({type:zt.literal,value:n.getDateTimeFormat(t,f).format(h)});continue}if(mo(u)){var f=typeof u.style=="string"?i.number[u.style]:wo(u.style)?u.style.parsedOptions:void 0;f&&f.scale&&(h=h*(f.scale||1)),o.push({type:zt.literal,value:n.getNumberFormat(t,f).format(h)});continue}if(_o(u)){var p=u.children,y=u.value,b=r[y];if(!tf(b))throw new Zh(y,"function",s);var m=Ri(p,t,n,i,r,a),v=b(m.map(function(_){return _.value}));Array.isArray(v)||(v=[v]),o.push.apply(o,v.map(function(_){return{type:typeof _=="string"?zt.literal:zt.object,value:_}}))}if(vo(u)){var x=u.options[h]||u.options.other;if(!x)throw new Ho(u.value,h,Object.keys(u.options),s);o.push.apply(o,Ri(x.value,t,n,i,r));continue}if(xo(u)){var x=u.options["=".concat(h)];if(!x){if(!Intl.PluralRules)throw new Le(`Intl.PluralRules is not available in this environment.
|
|
1
|
+
(function(vt,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],g):(vt=typeof globalThis<"u"?globalThis:vt||self,g(vt["kong-ui-publicvitals-chart"]={},vt.Vue))})(this,function(vt,g){var Ze,hh;"use strict";var sM=Object.defineProperty;var oM=(vt,g,Te)=>g in vt?sM(vt,g,{enumerable:!0,configurable:!0,writable:!0,value:Te}):vt[g]=Te;var C=(vt,g,Te)=>(oM(vt,typeof g!="symbol"?g+"":g,Te),Te);var Te=function(e,t){return Te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},Te(e,t)};function le(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Te(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var I=function(){return I=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},I.apply(this,arguments)};function gh(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}function Me(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,a;i<r;i++)(a||!(i in t))&&(a||(a=Array.prototype.slice.call(t,0,i)),a[i]=t[i]);return e.concat(a||Array.prototype.slice.call(t))}var G;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(G||(G={}));var ft;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(ft||(ft={}));var vn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(vn||(vn={}));function po(e){return e.type===ft.literal}function ph(e){return e.type===ft.argument}function mo(e){return e.type===ft.number}function bo(e){return e.type===ft.date}function yo(e){return e.type===ft.time}function vo(e){return e.type===ft.select}function xo(e){return e.type===ft.plural}function mh(e){return e.type===ft.pound}function _o(e){return e.type===ft.tag}function wo(e){return!!(e&&typeof e=="object"&&e.type===vn.number)}function Nr(e){return!!(e&&typeof e=="object"&&e.type===vn.dateTime)}var To=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,bh=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function yh(e){var t={};return e.replace(bh,function(n){var i=n.length;switch(n[0]){case"G":t.era=i===4?"long":i===5?"narrow":"short";break;case"y":t.year=i===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][i-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][i-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=i===4?"short":i===5?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][i-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][i-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][i-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][i-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][i-1];break;case"s":t.second=["numeric","2-digit"][i-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=i<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var vh=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function xh(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(vh).filter(function(h){return h.length>0}),n=[],i=0,r=t;i<r.length;i++){var a=r[i],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],l=s.slice(1),c=0,u=l;c<u.length;c++){var d=u[c];if(d.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:l})}return n}function _h(e){return e.replace(/^(.*?)-/,"")}var Mo=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,So=/^(@+)?(\+|#+)?[rs]?$/g,wh=/(\*)(0+)|(#+)(0+)|(0+)/g,Do=/^(0+)$/;function Co(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(So,function(n,i,r){return typeof r!="string"?(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length):r==="+"?t.minimumSignificantDigits=i.length:i[0]==="#"?t.maximumSignificantDigits=i.length:(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length+(typeof r=="string"?r.length:0)),""}),t}function Po(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Th(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Do.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Eo(e){var t={},n=Po(e);return n||t}function Mh(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=_h(r.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=I(I(I({},t),{notation:"scientific"}),r.options.reduce(function(l,c){return I(I({},l),Eo(c))},{}));continue;case"engineering":t=I(I(I({},t),{notation:"engineering"}),r.options.reduce(function(l,c){return I(I({},l),Eo(c))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(r.options[0]);continue;case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(wh,function(l,c,u,d,h,f){if(c)t.minimumIntegerDigits=u.length;else{if(d&&h)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Do.test(r.stem)){t.minimumIntegerDigits=r.stem.length;continue}if(Mo.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(Mo,function(l,c,u,d,h,f){return u==="*"?t.minimumFractionDigits=c.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:h&&f?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+f.length):(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length),""});var a=r.options[0];a==="w"?t=I(I({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=I(I({},t),Co(a)));continue}if(So.test(r.stem)){t=I(I({},t),Co(r.stem));continue}var s=Po(r.stem);s&&(t=I(I({},t),s));var o=Th(r.stem);o&&(t=I(I({},t),o))}return t}var Ri={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","h","K"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TL:["H","hB","hb","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Sh(e,t){for(var n="",i=0;i<e.length;i++){var r=e.charAt(i);if(r==="j"){for(var a=0;i+1<e.length&&e.charAt(i+1)===r;)a++,i++;var s=1+(a&1),o=a<2?1:3+(a>>1),l="a",c=Dh(t);for((c=="H"||c=="k")&&(o=0);o-- >0;)n+=l;for(;s-- >0;)n=c+n}else r==="J"?n+="H":n+=r}return n}function Dh(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,i;n!=="root"&&(i=e.maximize().region);var r=Ri[i||""]||Ri[n||""]||Ri["".concat(n,"-001")]||Ri["001"];return r[0]}var Br,Ch=new RegExp("^".concat(To.source,"*")),Ph=new RegExp("".concat(To.source,"*$"));function Q(e,t){return{start:e,end:t}}var Eh=!!String.prototype.startsWith,kh=!!String.fromCodePoint,Oh=!!Object.fromEntries,Ah=!!String.prototype.codePointAt,Rh=!!String.prototype.trimStart,Lh=!!String.prototype.trimEnd,Ih=!!Number.isSafeInteger,Nh=Ih?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Hr=!0;try{var Bh=Ro("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Hr=((Br=Bh.exec("a"))===null||Br===void 0?void 0:Br[0])==="a"}catch{Hr=!1}var ko=Eh?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},Fr=kh?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n="",i=e.length,r=0,a;i>r;){if(a=e[r++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},Oo=Oh?Object.fromEntries:function(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n],a=r[0],s=r[1];t[a]=s}return t},Ao=Ah?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var i=e.charCodeAt(t),r;return i<55296||i>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?i:(i-55296<<10)+(r-56320)+65536}},Hh=Rh?function(e){return e.trimStart()}:function(e){return e.replace(Ch,"")},Fh=Lh?function(e){return e.trimEnd()}:function(e){return e.replace(Ph,"")};function Ro(e,t){return new RegExp(e,t)}var Ur;if(Hr){var Lo=Ro("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ur=function(e,t){var n;Lo.lastIndex=t;var i=Lo.exec(e);return(n=i[1])!==null&&n!==void 0?n:""}}else Ur=function(e,t){for(var n=[];;){var i=Ao(e,t);if(i===void 0||Io(i)||zh(i))break;n.push(i),t+=i>=65536?2:1}return Fr.apply(void 0,n)};var Uh=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,i){for(var r=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,i);if(s.err)return s;r.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),r.push({type:ft.pound,location:Q(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(G.UNMATCHED_CLOSING_TAG,Q(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&Wr(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;r.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;r.push(s.val)}}}return{val:r,err:null}},e.prototype.parseTag=function(t,n){var i=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:ft.literal,value:"<".concat(r,"/>"),location:Q(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Wr(this.char()))return this.error(G.INVALID_TAG,Q(o,this.clonePosition()));var l=this.clonePosition(),c=this.parseTagName();return r!==c?this.error(G.UNMATCHED_CLOSING_TAG,Q(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:ft.tag,value:r,children:s,location:Q(i,this.clonePosition())},err:null}:this.error(G.INVALID_TAG,Q(o,this.clonePosition())))}else return this.error(G.UNCLOSED_TAG,Q(i,this.clonePosition()))}else return this.error(G.INVALID_TAG,Q(i,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Yh(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var i=this.clonePosition(),r="";;){var a=this.tryParseQuote(n);if(a){r+=a;continue}var s=this.tryParseUnquoted(t,n);if(s){r+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){r+=o;continue}break}var l=Q(i,this.clonePosition());return{val:{type:ft.literal,value:r,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Wh(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var i=this.char();if(i===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(i);this.bump()}return Fr.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(n==="plural"||n==="selectordinal")||i===125&&t>0?null:(this.bump(),Fr(i))},e.prototype.parseArgument=function(t,n){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(G.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(G.EMPTY_ARGUMENT,Q(i,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(G.MALFORMED_ARGUMENT,Q(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(G.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:ft.argument,value:r,location:Q(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(G.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition())):this.parseArgumentOptions(t,n,r,i);default:return this.error(G.MALFORMED_ARGUMENT,Q(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),i=Ur(this.message,n),r=n+i.length;this.bumpTo(r);var a=this.clonePosition(),s=Q(t,a);return{value:i,location:s}},e.prototype.parseArgumentOptions=function(t,n,i,r){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(o){case"":return this.error(G.EXPECT_ARGUMENT_TYPE,Q(s,l));case"number":case"date":case"time":{this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var h=Fh(d.val);if(h.length===0)return this.error(G.EXPECT_ARGUMENT_STYLE,Q(this.clonePosition(),this.clonePosition()));var f=Q(u,this.clonePosition());c={style:h,styleLocation:f}}var p=this.tryParseArgumentClose(r);if(p.err)return p;var y=Q(r,this.clonePosition());if(c&&ko(c==null?void 0:c.style,"::",0)){var b=Hh(c.style.slice(2));if(o==="number"){var d=this.parseNumberSkeletonFromString(b,c.styleLocation);return d.err?d:{val:{type:ft.number,value:i,location:y,style:d.val},err:null}}else{if(b.length===0)return this.error(G.EXPECT_DATE_TIME_SKELETON,y);var m=b;this.locale&&(m=Sh(b,this.locale));var h={type:vn.dateTime,pattern:m,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?yh(m):{}},v=o==="date"?ft.date:ft.time;return{val:{type:v,value:i,location:y,style:h},err:null}}}return{val:{type:o==="number"?ft.number:o==="date"?ft.date:ft.time,value:i,location:y,style:(a=c==null?void 0:c.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var x=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(G.EXPECT_SELECT_ARGUMENT_OPTIONS,Q(x,I({},x)));this.bumpSpace();var w=this.parseIdentifierIfPossible(),_=0;if(o!=="select"&&w.value==="offset"){if(!this.bumpIf(":"))return this.error(G.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Q(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(G.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,G.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),w=this.parseIdentifierIfPossible(),_=d.val}var T=this.tryParsePluralOrSelectOptions(t,o,n,w);if(T.err)return T;var p=this.tryParseArgumentClose(r);if(p.err)return p;var M=Q(r,this.clonePosition());return o==="select"?{val:{type:ft.select,value:i,options:Oo(T.val),location:M},err:null}:{val:{type:ft.plural,value:i,options:Oo(T.val),offset:_,pluralType:o==="plural"?"cardinal":"ordinal",location:M},err:null}}default:return this.error(G.INVALID_ARGUMENT_TYPE,Q(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(G.EXPECT_ARGUMENT_CLOSING_BRACE,Q(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(G.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Q(r,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var i=[];try{i=xh(t)}catch{return this.error(G.INVALID_NUMBER_SKELETON,n)}return{val:{type:vn.number,tokens:i,location:n,parsedOptions:this.shouldParseSkeletons?Mh(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,i,r){for(var a,s=!1,o=[],l=new Set,c=r.value,u=r.location;;){if(c.length===0){var d=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(G.EXPECT_PLURAL_ARGUMENT_SELECTOR,G.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;u=Q(d,this.clonePosition()),c=this.message.slice(d.offset,this.offset())}else break}if(l.has(c))return this.error(n==="select"?G.DUPLICATE_SELECT_ARGUMENT_SELECTOR:G.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);c==="other"&&(s=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?G.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:G.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Q(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,n,i);if(p.err)return p;var y=this.tryParseArgumentClose(f);if(y.err)return y;o.push([c,{value:p.val,location:Q(f,this.clonePosition())}]),l.add(c),this.bumpSpace(),a=this.parseIdentifierIfPossible(),c=a.value,u=a.location}return o.length===0?this.error(n==="select"?G.EXPECT_SELECT_ARGUMENT_SELECTOR:G.EXPECT_PLURAL_ARGUMENT_SELECTOR,Q(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(G.MISSING_OTHER_CLAUSE,Q(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var i=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var l=Q(r,this.clonePosition());return a?(s*=i,Nh(s)?{val:s,err:null}:this.error(n,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=Ao(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(ko(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),i=this.message.indexOf(t,n);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Io(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),i=this.message.charCodeAt(n+(t>=65536?2:1));return i??null},e}();function Wr(e){return e>=97&&e<=122||e>=65&&e<=90}function Wh(e){return Wr(e)||e===47}function Yh(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Io(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function zh(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Yr(e){e.forEach(function(t){if(delete t.location,vo(t)||xo(t))for(var n in t.options)delete t.options[n].location,Yr(t.options[n].value);else mo(t)&&wo(t.style)||(bo(t)||yo(t))&&Nr(t.style)?delete t.style.location:_o(t)&&Yr(t.children)})}function Vh(e,t){t===void 0&&(t={}),t=I({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Uh(e,t).parse();if(n.err){var i=SyntaxError(G[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return t!=null&&t.captureLocation||Yr(n.val),n.val}function he(e,t){var n=t&&t.cache?t.cache:Kh,i=t&&t.serializer?t.serializer:Xh,r=t&&t.strategy?t.strategy:$h;return r(e,{cache:n,serializer:i})}function jh(e){return e==null||typeof e=="number"||typeof e=="boolean"}function No(e,t,n,i){var r=jh(i)?i:n(i),a=t.get(r);return typeof a>"u"&&(a=e.call(this,i),t.set(r,a)),a}function Bo(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),a=t.get(r);return typeof a>"u"&&(a=e.apply(this,i),t.set(r,a)),a}function zr(e,t,n,i,r){return n.bind(t,e,i,r)}function $h(e,t){var n=e.length===1?No:Bo;return zr(e,this,n,t.cache.create(),t.serializer)}function qh(e,t){return zr(e,this,Bo,t.cache.create(),t.serializer)}function Gh(e,t){return zr(e,this,No,t.cache.create(),t.serializer)}var Xh=function(){return JSON.stringify(arguments)};function Vr(){this.cache=Object.create(null)}Vr.prototype.get=function(e){return this.cache[e]},Vr.prototype.set=function(e,t){this.cache[e]=t};var Kh={create:function(){return new Vr}},fe={variadic:qh,monadic:Gh},ge;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(ge||(ge={}));var Le=function(e){le(t,e);function t(n,i,r){var a=e.call(this,n)||this;return a.code=i,a.originalMessage=r,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Ho=function(e){le(t,e);function t(n,i,r,a){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(i,'". Options are "').concat(Object.keys(r).join('", "'),'"'),ge.INVALID_VALUE,a)||this}return t}(Le),Zh=function(e){le(t,e);function t(n,i,r){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(i),ge.INVALID_VALUE,r)||this}return t}(Le),Qh=function(e){le(t,e);function t(n,i){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(i,'"'),ge.MISSING_VALUE,i)||this}return t}(Le),zt;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(zt||(zt={}));function Jh(e){return e.length<2?e:e.reduce(function(t,n){var i=t[t.length-1];return!i||i.type!==zt.literal||n.type!==zt.literal?t.push(n):i.value+=n.value,t},[])}function tf(e){return typeof e=="function"}function Li(e,t,n,i,r,a,s){if(e.length===1&&po(e[0]))return[{type:zt.literal,value:e[0].value}];for(var o=[],l=0,c=e;l<c.length;l++){var u=c[l];if(po(u)){o.push({type:zt.literal,value:u.value});continue}if(mh(u)){typeof a=="number"&&o.push({type:zt.literal,value:n.getNumberFormat(t).format(a)});continue}var d=u.value;if(!(r&&d in r))throw new Qh(d,s);var h=r[d];if(ph(u)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),o.push({type:typeof h=="string"?zt.literal:zt.object,value:h});continue}if(bo(u)){var f=typeof u.style=="string"?i.date[u.style]:Nr(u.style)?u.style.parsedOptions:void 0;o.push({type:zt.literal,value:n.getDateTimeFormat(t,f).format(h)});continue}if(yo(u)){var f=typeof u.style=="string"?i.time[u.style]:Nr(u.style)?u.style.parsedOptions:i.time.medium;o.push({type:zt.literal,value:n.getDateTimeFormat(t,f).format(h)});continue}if(mo(u)){var f=typeof u.style=="string"?i.number[u.style]:wo(u.style)?u.style.parsedOptions:void 0;f&&f.scale&&(h=h*(f.scale||1)),o.push({type:zt.literal,value:n.getNumberFormat(t,f).format(h)});continue}if(_o(u)){var p=u.children,y=u.value,b=r[y];if(!tf(b))throw new Zh(y,"function",s);var m=Li(p,t,n,i,r,a),v=b(m.map(function(_){return _.value}));Array.isArray(v)||(v=[v]),o.push.apply(o,v.map(function(_){return{type:typeof _=="string"?zt.literal:zt.object,value:_}}))}if(vo(u)){var x=u.options[h]||u.options.other;if(!x)throw new Ho(u.value,h,Object.keys(u.options),s);o.push.apply(o,Li(x.value,t,n,i,r));continue}if(xo(u)){var x=u.options["=".concat(h)];if(!x){if(!Intl.PluralRules)throw new Le(`Intl.PluralRules is not available in this environment.
|
|
2
2
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
|
-
`,ge.MISSING_INTL_API,s);var w=n.getPluralRules(t,{type:u.pluralType}).select(h-(u.offset||0));x=u.options[w]||u.options.other}if(!x)throw new Ho(u.value,h,Object.keys(u.options),s);o.push.apply(o,
|
|
3
|
+
`,ge.MISSING_INTL_API,s);var w=n.getPluralRules(t,{type:u.pluralType}).select(h-(u.offset||0));x=u.options[w]||u.options.other}if(!x)throw new Ho(u.value,h,Object.keys(u.options),s);o.push.apply(o,Li(x.value,t,n,i,r,h-(u.offset||0)));continue}}return Jh(o)}function ef(e,t){return t?I(I(I({},e||{}),t||{}),Object.keys(e).reduce(function(n,i){return n[i]=I(I({},e[i]),t[i]||{}),n},{})):e}function nf(e,t){return t?Object.keys(e).reduce(function(n,i){return n[i]=ef(e[i],t[i]),n},I({},e)):e}function jr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function rf(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:he(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.NumberFormat).bind.apply(t,Me([void 0],n,!1)))},{cache:jr(e.number),strategy:fe.variadic}),getDateTimeFormat:he(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.DateTimeFormat).bind.apply(t,Me([void 0],n,!1)))},{cache:jr(e.dateTime),strategy:fe.variadic}),getPluralRules:he(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.PluralRules).bind.apply(t,Me([void 0],n,!1)))},{cache:jr(e.pluralRules),strategy:fe.variadic})}}var Fo=function(){function e(t,n,i,r){n===void 0&&(n=e.defaultLocale);var a=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(l){var c=a.formatToParts(l);if(c.length===1)return c[0].value;var u=c.reduce(function(d,h){return!d.length||h.type!==zt.literal||typeof d[d.length-1]!="string"?d.push(h.value):d[d.length-1]+=h.value,d},[]);return u.length<=1?u[0]||"":u},this.formatToParts=function(l){return Li(a.ast,a.locales,a.formatters,a.formats,l,void 0,a.message)},this.resolvedOptions=function(){var l;return{locale:((l=a.resolvedLocale)===null||l===void 0?void 0:l.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=r||{};s.formatters;var o=gh(s,["formatters"]);this.ast=e.__parse(t,I(I({},o),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=nf(e.formats,i),this.formatters=r&&r.formatters||rf(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Vh,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),Qe;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(Qe||(Qe={}));var Hn=function(e){le(t,e);function t(n,i,r){var a=this,s=r?r instanceof Error?r:new Error(String(r)):void 0;return a=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(i,`
|
|
4
4
|
`).concat(s?`
|
|
5
5
|
`.concat(s.message,`
|
|
6
6
|
`).concat(s.stack):""))||this,a.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a,t),a}return t}(Error),af=function(e){le(t,e);function t(n,i){return e.call(this,Qe.UNSUPPORTED_FORMATTER,n,i)||this}return t}(Hn),sf=function(e){le(t,e);function t(n,i){return e.call(this,Qe.INVALID_CONFIG,n,i)||this}return t}(Hn),Uo=function(e){le(t,e);function t(n,i){return e.call(this,Qe.MISSING_DATA,n,i)||this}return t}(Hn),re=function(e){le(t,e);function t(n,i,r){var a=e.call(this,Qe.FORMAT_ERROR,"".concat(n,`
|
|
@@ -9,7 +9,7 @@ Locale: `).concat(i,`
|
|
|
9
9
|
MessageID: `).concat(r==null?void 0:r.id,`
|
|
10
10
|
Default Message: `).concat(r==null?void 0:r.defaultMessage,`
|
|
11
11
|
Description: `).concat(r==null?void 0:r.description,`
|
|
12
|
-
`),i,a)||this;return s.descriptor=r,s.locale=i,s}return t}(re),of=function(e){le(t,e);function t(n,i){var r=e.call(this,Qe.MISSING_TRANSLATION,'Missing message: "'.concat(n.id,'" for locale "').concat(i,'", using ').concat(n.defaultMessage?"default message (".concat(typeof n.defaultMessage=="string"?n.defaultMessage:n.defaultMessage.map(function(a){var s;return(s=a.value)!==null&&s!==void 0?s:JSON.stringify(a)}).join(),")"):"id"," as fallback."))||this;return r.descriptor=n,r}return t}(Hn);function Je(e,t,n){return n===void 0&&(n={}),t.reduce(function(i,r){return r in e?i[r]=e[r]:r in n&&(i[r]=n[r]),i},{})}var lf=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},cf=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},uf={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:lf,onWarn:cf};function Wo(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function tn(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function df(e){e===void 0&&(e=Wo());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,i=Intl.DisplayNames,r=he(function(){for(var o,l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return new((o=Intl.DateTimeFormat).bind.apply(o,Me([void 0],l,!1)))},{cache:tn(e.dateTime),strategy:fe.variadic}),a=he(function(){for(var o,l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return new((o=Intl.NumberFormat).bind.apply(o,Me([void 0],l,!1)))},{cache:tn(e.number),strategy:fe.variadic}),s=he(function(){for(var o,l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return new((o=Intl.PluralRules).bind.apply(o,Me([void 0],l,!1)))},{cache:tn(e.pluralRules),strategy:fe.variadic});return{getDateTimeFormat:r,getNumberFormat:a,getMessageFormat:he(function(o,l,c,u){return new Fo(o,l,c,I({formatters:{getNumberFormat:a,getDateTimeFormat:r,getPluralRules:s}},u||{}))},{cache:tn(e.message),strategy:fe.variadic}),getRelativeTimeFormat:he(function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return new(t.bind.apply(t,Me([void 0],o,!1)))},{cache:tn(e.relativeTime),strategy:fe.variadic}),getPluralRules:s,getListFormat:he(function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return new(n.bind.apply(n,Me([void 0],o,!1)))},{cache:tn(e.list),strategy:fe.variadic}),getDisplayNames:he(function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return new(i.bind.apply(i,Me([void 0],o,!1)))},{cache:tn(e.displayNames),strategy:fe.variadic})}}function qr(e,t,n,i){var r=e&&e[t],a;if(r&&(a=r[n]),a)return a;i(new af("No ".concat(t," format named: ").concat(n)))}function hf(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}function
|
|
12
|
+
`),i,a)||this;return s.descriptor=r,s.locale=i,s}return t}(re),of=function(e){le(t,e);function t(n,i){var r=e.call(this,Qe.MISSING_TRANSLATION,'Missing message: "'.concat(n.id,'" for locale "').concat(i,'", using ').concat(n.defaultMessage?"default message (".concat(typeof n.defaultMessage=="string"?n.defaultMessage:n.defaultMessage.map(function(a){var s;return(s=a.value)!==null&&s!==void 0?s:JSON.stringify(a)}).join(),")"):"id"," as fallback."))||this;return r.descriptor=n,r}return t}(Hn);function Je(e,t,n){return n===void 0&&(n={}),t.reduce(function(i,r){return r in e?i[r]=e[r]:r in n&&(i[r]=n[r]),i},{})}var lf=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},cf=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},uf={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:lf,onWarn:cf};function Wo(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function tn(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function df(e){e===void 0&&(e=Wo());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,i=Intl.DisplayNames,r=he(function(){for(var o,l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return new((o=Intl.DateTimeFormat).bind.apply(o,Me([void 0],l,!1)))},{cache:tn(e.dateTime),strategy:fe.variadic}),a=he(function(){for(var o,l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return new((o=Intl.NumberFormat).bind.apply(o,Me([void 0],l,!1)))},{cache:tn(e.number),strategy:fe.variadic}),s=he(function(){for(var o,l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return new((o=Intl.PluralRules).bind.apply(o,Me([void 0],l,!1)))},{cache:tn(e.pluralRules),strategy:fe.variadic});return{getDateTimeFormat:r,getNumberFormat:a,getMessageFormat:he(function(o,l,c,u){return new Fo(o,l,c,I({formatters:{getNumberFormat:a,getDateTimeFormat:r,getPluralRules:s}},u||{}))},{cache:tn(e.message),strategy:fe.variadic}),getRelativeTimeFormat:he(function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return new(t.bind.apply(t,Me([void 0],o,!1)))},{cache:tn(e.relativeTime),strategy:fe.variadic}),getPluralRules:s,getListFormat:he(function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return new(n.bind.apply(n,Me([void 0],o,!1)))},{cache:tn(e.list),strategy:fe.variadic}),getDisplayNames:he(function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return new(i.bind.apply(i,Me([void 0],o,!1)))},{cache:tn(e.displayNames),strategy:fe.variadic})}}function qr(e,t,n,i){var r=e&&e[t],a;if(r&&(a=r[n]),a)return a;i(new af("No ".concat(t," format named: ").concat(n)))}function hf(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}function Ii(e,t){return Object.keys(e).reduce(function(n,i){return n[i]=I({timeZone:t},e[i]),n},{})}function Yo(e,t){var n=Object.keys(I(I({},e),t));return n.reduce(function(i,r){return i[r]=I(I({},e[r]||{}),t[r]||{}),i},{})}function zo(e,t){if(!t)return e;var n=Fo.formats;return I(I(I({},n),e),{date:Yo(Ii(n.date,t),Ii(e.date||{},t)),time:Yo(Ii(n.time,t),Ii(e.time||{},t))})}var Vo=function(e,t,n,i,r){var a=e.locale,s=e.formats,o=e.messages,l=e.defaultLocale,c=e.defaultFormats,u=e.fallbackOnEmptyString,d=e.onError,h=e.timeZone,f=e.defaultRichTextElements;n===void 0&&(n={id:""});var p=n.id,y=n.defaultMessage;hf(!!p,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var b=String(p),m=o&&Object.prototype.hasOwnProperty.call(o,b)&&o[b];if(Array.isArray(m)&&m.length===1&&m[0].type===ft.literal)return m[0].value;if(!i&&m&&typeof m=="string"&&!f)return m.replace(/'\{(.*?)\}'/gi,"{$1}");if(i=I(I({},f),i||{}),s=zo(s,h),c=zo(c,h),!m){if(u===!1&&m==="")return m;if((!y||a&&a.toLowerCase()!==l.toLowerCase())&&d(new of(n,a)),y)try{var v=t.getMessageFormat(y,l,c,r);return v.format(i)}catch(x){return d(new $r('Error formatting default message for: "'.concat(b,'", rendering default message verbatim'),a,n,x)),typeof y=="string"?y:b}return b}try{var v=t.getMessageFormat(m,a,s,I({formatters:t},r||{}));return v.format(i)}catch(x){d(new $r('Error formatting message: "'.concat(b,'", using ').concat(y?"default message":"id"," as fallback."),a,n,x))}if(y)try{var v=t.getMessageFormat(y,l,c,r);return v.format(i)}catch(x){d(new $r('Error formatting the default message for: "'.concat(b,'", rendering message verbatim'),a,n,x))}return typeof m=="string"?m:typeof y=="string"?y:b},jo=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function Ni(e,t,n,i){var r=e.locale,a=e.formats,s=e.onError,o=e.timeZone;i===void 0&&(i={});var l=i.format,c=I(I({},o&&{timeZone:o}),l&&qr(a,t,l,s)),u=Je(i,jo,c);return t==="time"&&!u.hour&&!u.minute&&!u.second&&!u.timeStyle&&!u.dateStyle&&(u=I(I({},u),{hour:"numeric",minute:"numeric"})),n(r,u)}function ff(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],s=a===void 0?{}:a,o=typeof r=="string"?new Date(r||0):r;try{return Ni(e,"date",t,s).format(o)}catch(l){e.onError(new re("Error formatting date.",e.locale,l))}return String(o)}function gf(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],s=a===void 0?{}:a,o=typeof r=="string"?new Date(r||0):r;try{return Ni(e,"time",t,s).format(o)}catch(l){e.onError(new re("Error formatting time.",e.locale,l))}return String(o)}function pf(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],s=n[2],o=s===void 0?{}:s,l=e.timeZone,c=e.locale,u=e.onError,d=Je(o,jo,l?{timeZone:l}:{});try{return t(c,d).formatRange(r,a)}catch(h){u(new re("Error formatting date time range.",e.locale,h))}return String(r)}function mf(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],s=a===void 0?{}:a,o=typeof r=="string"?new Date(r||0):r;try{return Ni(e,"date",t,s).formatToParts(o)}catch(l){e.onError(new re("Error formatting date.",e.locale,l))}return[]}function bf(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],s=a===void 0?{}:a,o=typeof r=="string"?new Date(r||0):r;try{return Ni(e,"time",t,s).formatToParts(o)}catch(l){e.onError(new re("Error formatting time.",e.locale,l))}return[]}var yf=["style","type","fallback","languageDisplay"];function vf(e,t,n,i){var r=e.locale,a=e.onError,s=Intl.DisplayNames;s||a(new Le(`Intl.DisplayNames is not available in this environment.
|
|
13
13
|
Try polyfilling it using "@formatjs/intl-displaynames"
|
|
14
14
|
`,ge.MISSING_INTL_API));var o=Je(i,yf);try{return t(r,o).of(n)}catch(l){a(new re("Error formatting display name.",r,l))}}var xf=["type","style"],$o=Date.now();function _f(e){return"".concat($o,"_").concat(e,"_").concat($o)}function wf(e,t,n,i){i===void 0&&(i={});var r=qo(e,t,n,i).reduce(function(a,s){var o=s.value;return typeof o!="string"?a.push(o):typeof a[a.length-1]=="string"?a[a.length-1]+=o:a.push(o),a},[]);return r.length===1?r[0]:r.length===0?"":r}function qo(e,t,n,i){var r=e.locale,a=e.onError;i===void 0&&(i={});var s=Intl.ListFormat;s||a(new Le(`Intl.ListFormat is not available in this environment.
|
|
15
15
|
Try polyfilling it using "@formatjs/intl-listformat"
|
|
@@ -24,27 +24,27 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
|
|
|
24
24
|
* https://github.com/kurkle/color#readme
|
|
25
25
|
* (c) 2023 Jukka Kurkela
|
|
26
26
|
* Released under the MIT License
|
|
27
|
-
*/function Un(e){return e+.5|0}const Ie=(e,t,n)=>Math.max(Math.min(e,n),t);function Wn(e){return Ie(Un(e*2.55),0,255)}function Ne(e){return Ie(Un(e*255),0,255)}function Se(e){return Ie(Un(e/2.55)/100,0,1)}function Qo(e){return Ie(Un(e*100),0,100)}const ae={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},Gr=[..."0123456789ABCDEF"],Uf=e=>Gr[e&15],Wf=e=>Gr[(e&240)>>4]+Gr[e&15],
|
|
27
|
+
*/function Un(e){return e+.5|0}const Ie=(e,t,n)=>Math.max(Math.min(e,n),t);function Wn(e){return Ie(Un(e*2.55),0,255)}function Ne(e){return Ie(Un(e*255),0,255)}function Se(e){return Ie(Un(e/2.55)/100,0,1)}function Qo(e){return Ie(Un(e*100),0,100)}const ae={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},Gr=[..."0123456789ABCDEF"],Uf=e=>Gr[e&15],Wf=e=>Gr[(e&240)>>4]+Gr[e&15],Bi=e=>(e&240)>>4===(e&15),Yf=e=>Bi(e.r)&&Bi(e.g)&&Bi(e.b)&&Bi(e.a);function zf(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&ae[e[1]]*17,g:255&ae[e[2]]*17,b:255&ae[e[3]]*17,a:t===5?ae[e[4]]*17:255}:(t===7||t===9)&&(n={r:ae[e[1]]<<4|ae[e[2]],g:ae[e[3]]<<4|ae[e[4]],b:ae[e[5]]<<4|ae[e[6]],a:t===9?ae[e[7]]<<4|ae[e[8]]:255})),n}const Vf=(e,t)=>e<255?t(e):"";function jf(e){var t=Yf(e)?Uf:Wf;return e?"#"+t(e.r)+t(e.g)+t(e.b)+Vf(e.a,t):void 0}const $f=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Jo(e,t,n){const i=t*Math.min(n,1-n),r=(a,s=(a+e/30)%12)=>n-i*Math.max(Math.min(s-3,9-s,1),-1);return[r(0),r(8),r(4)]}function qf(e,t,n){const i=(r,a=(r+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[i(5),i(3),i(1)]}function Gf(e,t,n){const i=Jo(e,1,.5);let r;for(t+n>1&&(r=1/(t+n),t*=r,n*=r),r=0;r<3;r++)i[r]*=1-t-n,i[r]+=t;return i}function Xf(e,t,n,i,r){return e===r?(t-n)/i+(t<n?6:0):t===r?(n-e)/i+2:(e-t)/i+4}function Xr(e){const n=e.r/255,i=e.g/255,r=e.b/255,a=Math.max(n,i,r),s=Math.min(n,i,r),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=Xf(n,i,r,u,a),l=l*60+.5),[l|0,c||0,o]}function Kr(e,t,n,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,i)).map(Ne)}function Zr(e,t,n){return Kr(Jo,e,t,n)}function Kf(e,t,n){return Kr(Gf,e,t,n)}function Zf(e,t,n){return Kr(qf,e,t,n)}function tl(e){return(e%360+360)%360}function Qf(e){const t=$f.exec(e);let n=255,i;if(!t)return;t[5]!==i&&(n=t[6]?Wn(+t[5]):Ne(+t[5]));const r=tl(+t[2]),a=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?i=Kf(r,a,s):t[1]==="hsv"?i=Zf(r,a,s):i=Zr(r,a,s),{r:i[0],g:i[1],b:i[2],a:n}}function Jf(e,t){var n=Xr(e);n[0]=tl(n[0]+t),n=Zr(n),e.r=n[0],e.g=n[1],e.b=n[2]}function tg(e){if(!e)return;const t=Xr(e),n=t[0],i=Qo(t[1]),r=Qo(t[2]);return e.a<255?`hsla(${n}, ${i}%, ${r}%, ${Se(e.a)})`:`hsl(${n}, ${i}%, ${r}%)`}const el={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"},nl={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 eg(){const e={},t=Object.keys(nl),n=Object.keys(el);let i,r,a,s,o;for(i=0;i<t.length;i++){for(s=o=t[i],r=0;r<n.length;r++)a=n[r],o=o.replace(a,el[a]);a=parseInt(nl[s],16),e[o]=[a>>16&255,a>>8&255,a&255]}return e}let Hi;function ng(e){Hi||(Hi=eg(),Hi.transparent=[0,0,0,0]);const t=Hi[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const ig=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function rg(e){const t=ig.exec(e);let n=255,i,r,a;if(t){if(t[7]!==i){const s=+t[7];n=t[8]?Wn(s):Ie(s*255,0,255)}return i=+t[1],r=+t[3],a=+t[5],i=255&(t[2]?Wn(i):Ie(i,0,255)),r=255&(t[4]?Wn(r):Ie(r,0,255)),a=255&(t[6]?Wn(a):Ie(a,0,255)),{r:i,g:r,b:a,a:n}}}function ag(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Se(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Qr=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,xn=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function sg(e,t,n){const i=xn(Se(e.r)),r=xn(Se(e.g)),a=xn(Se(e.b));return{r:Ne(Qr(i+n*(xn(Se(t.r))-i))),g:Ne(Qr(r+n*(xn(Se(t.g))-r))),b:Ne(Qr(a+n*(xn(Se(t.b))-a))),a:e.a+n*(t.a-e.a)}}function Fi(e,t,n){if(e){let i=Xr(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*n,t===0?360:1)),i=Zr(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function il(e,t){return e&&Object.assign(t||{},e)}function rl(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Ne(e[3]))):(t=il(e,{r:0,g:0,b:0,a:1}),t.a=Ne(t.a)),t}function og(e){return e.charAt(0)==="r"?rg(e):Qf(e)}class Yn{constructor(t){if(t instanceof Yn)return t;const n=typeof t;let i;n==="object"?i=rl(t):n==="string"&&(i=zf(t)||ng(t)||og(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=il(this._rgb);return t&&(t.a=Se(t.a)),t}set rgb(t){this._rgb=rl(t)}rgbString(){return this._valid?ag(this._rgb):void 0}hexString(){return this._valid?jf(this._rgb):void 0}hslString(){return this._valid?tg(this._rgb):void 0}mix(t,n){if(t){const i=this.rgb,r=t.rgb;let a;const s=n===a?.5:n,o=2*s-1,l=i.a-r.a,c=((o*l===-1?o:(o+l)/(1+o*l))+1)/2;a=1-c,i.r=255&c*i.r+a*r.r+.5,i.g=255&c*i.g+a*r.g+.5,i.b=255&c*i.b+a*r.b+.5,i.a=s*i.a+(1-s)*r.a,this.rgb=i}return this}interpolate(t,n){return t&&(this._rgb=sg(this._rgb,t._rgb,n)),this}clone(){return new Yn(this.rgb)}alpha(t){return this._rgb.a=Ne(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Un(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.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 Fi(this._rgb,2,t),this}darken(t){return Fi(this._rgb,2,-t),this}saturate(t){return Fi(this._rgb,1,t),this}desaturate(t){return Fi(this._rgb,1,-t),this}rotate(t){return Jf(this._rgb,t),this}}/*!
|
|
28
28
|
* Chart.js v4.3.0
|
|
29
29
|
* https://www.chartjs.org
|
|
30
30
|
* (c) 2023 Chart.js Contributors
|
|
31
31
|
* Released under the MIT License
|
|
32
|
-
*/function De(){}const lg=(()=>{let e=0;return()=>e++})();function U(e){return e===null||typeof e>"u"}function nt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function V(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function yt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ee(e,t){return yt(e)?e:t}function H(e,t){return typeof e>"u"?t:e}const cg=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,al=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function st(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function ot(e,t,n,i){let r,a,s;if(nt(e))if(a=e.length,i)for(r=a-1;r>=0;r--)t.call(n,e[r],r);else for(r=0;r<a;r++)t.call(n,e[r],r);else if(V(e))for(s=Object.keys(e),a=s.length,r=0;r<a;r++)t.call(n,e[s[r]],s[r])}function Fi(e,t){let n,i,r,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(r=e[n],a=t[n],r.datasetIndex!==a.datasetIndex||r.index!==a.index)return!1;return!0}function Ui(e){if(nt(e))return e.map(Ui);if(V(e)){const t=Object.create(null),n=Object.keys(e),i=n.length;let r=0;for(;r<i;++r)t[n[r]]=Ui(e[n[r]]);return t}return e}function sl(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function ug(e,t,n,i){if(!sl(e))return;const r=t[e],a=n[e];V(r)&&V(a)?zn(r,a,i):t[e]=Ui(a)}function zn(e,t,n){const i=nt(t)?t:[t],r=i.length;if(!V(e))return e;n=n||{};const a=n.merger||ug;let s;for(let o=0;o<r;++o){if(s=i[o],!V(s))continue;const l=Object.keys(s);for(let c=0,u=l.length;c<u;++c)a(l[c],e,s,n)}return e}function Vn(e,t){return zn(e,t,{merger:dg})}function dg(e,t,n){if(!sl(e))return;const i=t[e],r=n[e];V(i)&&V(r)?Vn(i,r):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Ui(r))}const ol={"":e=>e,x:e=>e.x,y:e=>e.y};function hg(e){const t=e.split("."),n=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function fg(e){const t=hg(e);return n=>{for(const i of t){if(i==="")break;n=n&&n[i]}return n}}function Be(e,t){return(ol[t]||(ol[t]=fg(t)))(e)}function Jr(e){return e.charAt(0).toUpperCase()+e.slice(1)}const $t=e=>typeof e<"u",qt=e=>typeof e=="function",ll=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function gg(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const X=Math.PI,ut=2*X,pg=ut+X,Wi=Number.POSITIVE_INFINITY,ta=X/180,dt=X/2,se=X/4,Yi=X*2/3,He=Math.log10,pe=Math.sign;function jn(e,t,n){return Math.abs(e-t)<n}function cl(e){const t=Math.round(e);e=jn(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(He(e))),i=e/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function mg(e){const t=[],n=Math.sqrt(e);let i;for(i=1;i<n;i++)e%i===0&&(t.push(i),t.push(e/i));return n===(n|0)&&t.push(n),t.sort((r,a)=>r-a).pop(),t}function Fe(e){return!isNaN(parseFloat(e))&&isFinite(e)}function bg(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function ul(e,t,n){let i,r,a;for(i=0,r=e.length;i<r;i++)a=e[i][n],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function Ct(e){return e*(X/180)}function zi(e){return e*(180/X)}function dl(e){if(!yt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function hl(e,t){const n=t.x-e.x,i=t.y-e.y,r=Math.sqrt(n*n+i*i);let a=Math.atan2(i,n);return a<-.5*X&&(a+=ut),{angle:a,distance:r}}function _n(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function yg(e,t){return(e-t+pg)%ut-X}function ne(e){return(e%ut+ut)%ut}function $n(e,t,n,i){const r=ne(e),a=ne(t),s=ne(n),o=ne(a-r),l=ne(s-r),c=ne(r-a),u=ne(r-s);return r===a||r===s||i&&a===s||o>l&&c<u}function Rt(e,t,n){return Math.max(t,Math.min(n,e))}function vg(e){return Rt(e,-32768,32767)}function Ce(e,t,n,i=1e-6){return e>=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function ea(e,t,n){n=n||(s=>e[s]<t);let i=e.length-1,r=0,a;for(;i-r>1;)a=r+i>>1,n(a)?r=a:i=a;return{lo:r,hi:i}}const Pe=(e,t,n,i)=>ea(e,n,i?r=>{const a=e[r][t];return a<n||a===n&&e[r+1][t]===n}:r=>e[r][t]<n),xg=(e,t,n)=>ea(e,n,i=>e[i][t]>=n);function _g(e,t,n){let i=0,r=e.length;for(;i<r&&e[i]<t;)i++;for(;r>i&&e[r-1]>n;)r--;return i>0||r<e.length?e.slice(i,r):e}const fl=["push","pop","shift","splice","unshift"];function wg(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),fl.forEach(n=>{const i="_onData"+Jr(n),r=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...a){const s=r.apply(this,a);return e._chartjs.listeners.forEach(o=>{typeof o[i]=="function"&&o[i](...a)}),s}})})}function gl(e,t){const n=e._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(fl.forEach(a=>{delete e[a]}),delete e._chartjs)}function pl(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const ml=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function bl(e,t){let n=[],i=!1;return function(...r){n=r,i||(i=!0,ml.call(window,()=>{i=!1,e.apply(t,n)}))}}function Tg(e,t){let n;return function(...i){return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}const na=e=>e==="start"?"left":e==="end"?"right":"center",Ft=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,Mg=(e,t,n,i)=>e===(i?"left":"right")?n:e==="center"?(t+n)/2:t;function yl(e,t,n){const i=t.length;let r=0,a=i;if(e._sorted){const{iScale:s,_parsed:o}=e,l=s.axis,{min:c,max:u,minDefined:d,maxDefined:h}=s.getUserBounds();d&&(r=Rt(Math.min(Pe(o,s.axis,c).lo,n?i:Pe(t,l,s.getPixelForValue(c)).lo),0,i-1)),h?a=Rt(Math.max(Pe(o,s.axis,u,!0).hi+1,n?0:Pe(t,l,s.getPixelForValue(u),!0).hi+1),r,i)-r:a=i-r}return{start:r,count:a}}function vl(e){const{xScale:t,yScale:n,_scaleRanges:i}=e,r={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!i)return e._scaleRanges=r,!0;const a=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,r),a}const Vi=e=>e===0||e===1,xl=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*ut/n)),_l=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*ut/n)+1,qn={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*dt)+1,easeOutSine:e=>Math.sin(e*dt),easeInOutSine:e=>-.5*(Math.cos(X*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Vi(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Vi(e)?e:xl(e,.075,.3),easeOutElastic:e=>Vi(e)?e:_l(e,.075,.3),easeInOutElastic(e){return Vi(e)?e:e<.5?.5*xl(e*2,.1125,.45):.5+.5*_l(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-qn.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?qn.easeInBounce(e*2)*.5:qn.easeOutBounce(e*2-1)*.5+.5};function ia(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function wl(e){return ia(e)?e:new Yn(e)}function ra(e){return ia(e)?e:new Yn(e).saturate(.5).darken(.1).hexString()}const Sg=["x","y","borderWidth","radius","tension"],Dg=["color","borderColor","backgroundColor"];function Cg(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:Dg},numbers:{type:"number",properties:Sg}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Pg(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Tl=new Map;function Eg(e,t){t=t||{};const n=e+JSON.stringify(t);let i=Tl.get(n);return i||(i=new Intl.NumberFormat(e,t),Tl.set(n,i)),i}function Gn(e,t,n){return Eg(t,n).format(e)}const Ml={values(e){return nt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const i=this.chart.options.locale;let r,a=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(r="scientific"),a=kg(e,n)}const s=He(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),Gn(e,i,l)},logarithmic(e,t,n){if(e===0)return"0";const i=n[t].significand||e/Math.pow(10,Math.floor(He(e)));return[1,2,3,5,10,15].includes(i)||t>.8*n.length?Ml.numeric.call(this,e,t,n):""}};function kg(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var ji={formatters:Ml};function Og(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.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:ji.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const en=Object.create(null),aa=Object.create(null);function Xn(e,t){if(!t)return e;const n=t.split(".");for(let i=0,r=n.length;i<r;++i){const a=n[i];e=e[a]||(e[a]=Object.create(null))}return e}function sa(e,t,n){return typeof t=="string"?zn(Xn(e,t),n):zn(Xn(e,""),t)}class Ag{constructor(t,n){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)=>ra(r.backgroundColor),this.hoverBorderColor=(i,r)=>ra(r.borderColor),this.hoverColor=(i,r)=>ra(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(n)}set(t,n){return sa(this,t,n)}get(t){return Xn(this,t)}describe(t,n){return sa(aa,t,n)}override(t,n){return sa(en,t,n)}route(t,n,i,r){const a=Xn(this,t),s=Xn(this,i),o="_"+n;Object.defineProperties(a,{[o]:{value:a[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[o],c=s[r];return V(l)?Object.assign({},c,l):H(l,c)},set(l){this[o]=l}}})}apply(t){t.forEach(n=>n(this))}}var xt=new Ag({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Cg,Pg,Og]);function Rg(e){return!e||U(e.size)||U(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function $i(e,t,n,i,r){let a=t[r];return a||(a=t[r]=e.measureText(r).width,n.push(r)),a>i&&(i=a),i}function Lg(e,t,n,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),e.save(),e.font=t;let s=0;const o=n.length;let l,c,u,d,h;for(l=0;l<o;l++)if(d=n[l],d!=null&&!nt(d))s=$i(e,r,a,s,d);else if(nt(d))for(c=0,u=d.length;c<u;c++)h=d[c],h!=null&&!nt(h)&&(s=$i(e,r,a,s,h));e.restore();const f=a.length/2;if(f>n.length){for(l=0;l<f;l++)delete r[a[l]];a.splice(0,f)}return s}function nn(e,t,n){const i=e.currentDevicePixelRatio,r=n!==0?Math.max(n/2,.5):0;return Math.round((t-r)*i)/i+r}function Sl(e,t){t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function oa(e,t,n,i){Dl(e,t,n,i,null)}function Dl(e,t,n,i,r){let a,s,o,l,c,u,d,h;const f=t.pointStyle,p=t.rotation,y=t.radius;let b=(p||0)*ta;if(f&&typeof f=="object"&&(a=f.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){e.save(),e.translate(n,i),e.rotate(b),e.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),e.restore();return}if(!(isNaN(y)||y<=0)){switch(e.beginPath(),f){default:r?e.ellipse(n,i,r/2,y,0,0,ut):e.arc(n,i,y,0,ut),e.closePath();break;case"triangle":u=r?r/2:y,e.moveTo(n+Math.sin(b)*u,i-Math.cos(b)*y),b+=Yi,e.lineTo(n+Math.sin(b)*u,i-Math.cos(b)*y),b+=Yi,e.lineTo(n+Math.sin(b)*u,i-Math.cos(b)*y),e.closePath();break;case"rectRounded":c=y*.516,l=y-c,s=Math.cos(b+se)*l,d=Math.cos(b+se)*(r?r/2-c:l),o=Math.sin(b+se)*l,h=Math.sin(b+se)*(r?r/2-c:l),e.arc(n-d,i-o,c,b-X,b-dt),e.arc(n+h,i-s,c,b-dt,b),e.arc(n+d,i+o,c,b,b+dt),e.arc(n-h,i+s,c,b+dt,b+X),e.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*y,u=r?r/2:l,e.rect(n-u,i-l,2*u,2*l);break}b+=se;case"rectRot":d=Math.cos(b)*(r?r/2:y),s=Math.cos(b)*y,o=Math.sin(b)*y,h=Math.sin(b)*(r?r/2:y),e.moveTo(n-d,i-o),e.lineTo(n+h,i-s),e.lineTo(n+d,i+o),e.lineTo(n-h,i+s),e.closePath();break;case"crossRot":b+=se;case"cross":d=Math.cos(b)*(r?r/2:y),s=Math.cos(b)*y,o=Math.sin(b)*y,h=Math.sin(b)*(r?r/2:y),e.moveTo(n-d,i-o),e.lineTo(n+d,i+o),e.moveTo(n+h,i-s),e.lineTo(n-h,i+s);break;case"star":d=Math.cos(b)*(r?r/2:y),s=Math.cos(b)*y,o=Math.sin(b)*y,h=Math.sin(b)*(r?r/2:y),e.moveTo(n-d,i-o),e.lineTo(n+d,i+o),e.moveTo(n+h,i-s),e.lineTo(n-h,i+s),b+=se,d=Math.cos(b)*(r?r/2:y),s=Math.cos(b)*y,o=Math.sin(b)*y,h=Math.sin(b)*(r?r/2:y),e.moveTo(n-d,i-o),e.lineTo(n+d,i+o),e.moveTo(n+h,i-s),e.lineTo(n-h,i+s);break;case"line":s=r?r/2:Math.cos(b)*y,o=Math.sin(b)*y,e.moveTo(n-s,i-o),e.lineTo(n+s,i+o);break;case"dash":e.moveTo(n,i),e.lineTo(n+Math.cos(b)*(r?r/2:y),i+Math.sin(b)*y);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Ee(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Kn(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Zn(e){e.restore()}function Ig(e,t,n,i,r){if(!t)return e.lineTo(n.x,n.y);if(r==="middle"){const a=(t.x+n.x)/2;e.lineTo(a,t.y),e.lineTo(a,n.y)}else r==="after"!=!!i?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function Ng(e,t,n,i){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function Bg(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),U(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function Hg(e,t,n,i,r){if(r.strikethrough||r.underline){const a=e.measureText(i),s=t-a.actualBoundingBoxLeft,o=t+a.actualBoundingBoxRight,l=n-a.actualBoundingBoxAscent,c=n+a.actualBoundingBoxDescent,u=r.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=r.decorationWidth||2,e.moveTo(s,u),e.lineTo(o,u),e.stroke()}}function Fg(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function rn(e,t,n,i,r,a={}){const s=nt(t)?t:[t],o=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(e.save(),e.font=r.string,Bg(e,a),l=0;l<s.length;++l)c=s[l],a.backdrop&&Fg(e,a.backdrop),o&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),U(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(c,n,i,a.maxWidth)),e.fillText(c,n,i,a.maxWidth),Hg(e,n,i,c,a),i+=Number(r.lineHeight);e.restore()}function wn(e,t){const{x:n,y:i,w:r,h:a,radius:s}=t;e.arc(n+s.topLeft,i+s.topLeft,s.topLeft,-dt,X,!0),e.lineTo(n,i+a-s.bottomLeft),e.arc(n+s.bottomLeft,i+a-s.bottomLeft,s.bottomLeft,X,dt,!0),e.lineTo(n+r-s.bottomRight,i+a),e.arc(n+r-s.bottomRight,i+a-s.bottomRight,s.bottomRight,dt,0,!0),e.lineTo(n+r,i+s.topRight),e.arc(n+r-s.topRight,i+s.topRight,s.topRight,0,-dt,!0),e.lineTo(n+s.topLeft,i)}const Ug=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Wg=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Yg(e,t){const n=(""+e).match(Ug);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const zg=e=>+e||0;function la(e,t){const n={},i=V(t),r=i?Object.keys(t):t,a=V(e)?i?s=>H(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of r)n[s]=zg(a(s));return n}function Cl(e){return la(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Ue(e){return la(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Pt(e){const t=Cl(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function gt(e,t){e=e||{},t=t||xt.font;let n=H(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let i=H(e.style,t.style);i&&!(""+i).match(Wg)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:H(e.family,t.family),lineHeight:Yg(H(e.lineHeight,t.lineHeight),n),size:n,style:i,weight:H(e.weight,t.weight),string:""};return r.string=Rg(r),r}function Qn(e,t,n,i){let r=!0,a,s,o;for(a=0,s=e.length;a<s;++a)if(o=e[a],o!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t),r=!1),n!==void 0&&nt(o)&&(o=o[n%o.length],r=!1),o!==void 0))return i&&!r&&(i.cacheable=!1),o}function Vg(e,t,n){const{min:i,max:r}=e,a=al(t,(r-i)/2),s=(o,l)=>n&&o===0?0:o+l;return{min:s(i,-Math.abs(a)),max:s(r,a)}}function We(e,t){return Object.assign(Object.create(e),t)}function ca(e,t=[""],n,i,r=()=>e[0]){const a=n||e;typeof i>"u"&&(i=Al("_fallback",e));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:i,_getTarget:r,override:o=>ca([o,...e],t,a,i)};return new Proxy(s,{deleteProperty(o,l){return delete o[l],delete o._keys,delete e[0][l],!0},get(o,l){return El(o,l,()=>Qg(l,t,e,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(o,l){return Rl(o).includes(l)},ownKeys(o){return Rl(o)},set(o,l,c){const u=o._storage||(o._storage=r());return o[l]=u[l]=c,delete o._keys,!0}})}function Tn(e,t,n,i){const r={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Pl(e,i),setContext:a=>Tn(e,a,n,i),override:a=>Tn(e.override(a),t,n,i)};return new Proxy(r,{deleteProperty(a,s){return delete a[s],delete e[s],!0},get(a,s,o){return El(a,s,()=>$g(a,s,o))},getOwnPropertyDescriptor(a,s){return a._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(a,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(a,s,o){return e[s]=o,delete a[s],!0}})}function Pl(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=e;return{allKeys:r,scriptable:n,indexable:i,isScriptable:qt(n)?n:()=>n,isIndexable:qt(i)?i:()=>i}}const jg=(e,t)=>e?e+Jr(t):t,ua=(e,t)=>V(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function El(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const i=n();return e[t]=i,i}function $g(e,t,n){const{_proxy:i,_context:r,_subProxy:a,_descriptors:s}=e;let o=i[t];return qt(o)&&s.isScriptable(t)&&(o=qg(t,o,e,n)),nt(o)&&o.length&&(o=Gg(t,o,e,s.isIndexable)),ua(t,o)&&(o=Tn(o,r,a&&a[t],s)),o}function qg(e,t,n,i){const{_proxy:r,_context:a,_subProxy:s,_stack:o}=n;if(o.has(e))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+e);o.add(e);let l=t(a,s||i);return o.delete(e),ua(e,l)&&(l=da(r._scopes,r,e,l)),l}function Gg(e,t,n,i){const{_proxy:r,_context:a,_subProxy:s,_descriptors:o}=n;if(typeof a.index<"u"&&i(e))return t[a.index%t.length];if(V(t[0])){const l=t,c=r._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=da(c,r,e,u);t.push(Tn(d,a,s&&s[e],o))}}return t}function kl(e,t,n){return qt(e)?e(t,n):e}const Xg=(e,t)=>e===!0?t:typeof e=="string"?Be(t,e):void 0;function Kg(e,t,n,i,r){for(const a of t){const s=Xg(n,a);if(s){e.add(s);const o=kl(s._fallback,n,r);if(typeof o<"u"&&o!==n&&o!==i)return o}else if(s===!1&&typeof i<"u"&&n!==i)return null}return!1}function da(e,t,n,i){const r=t._rootScopes,a=kl(t._fallback,n,i),s=[...e,...r],o=new Set;o.add(i);let l=Ol(o,s,n,a||n,i);return l===null||typeof a<"u"&&a!==n&&(l=Ol(o,s,a,l,i),l===null)?!1:ca(Array.from(o),[""],r,a,()=>Zg(t,n,i))}function Ol(e,t,n,i,r){for(;n;)n=Kg(e,t,n,i,r);return n}function Zg(e,t,n){const i=e._getTarget();t in i||(i[t]={});const r=i[t];return nt(r)&&V(n)?n:r||{}}function Qg(e,t,n,i){let r;for(const a of t)if(r=Al(jg(a,e),n),typeof r<"u")return ua(e,r)?da(n,i,e,r):r}function Al(e,t){for(const n of t){if(!n)continue;const i=n[e];if(typeof i<"u")return i}}function Rl(e){let t=e._keys;return t||(t=e._keys=Jg(e._scopes)),t}function Jg(e){const t=new Set;for(const n of e)for(const i of Object.keys(n).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}function Ll(e,t,n,i){const{iScale:r}=e,{key:a="r"}=this._parsing,s=new Array(i);let o,l,c,u;for(o=0,l=i;o<l;++o)c=o+n,u=t[c],s[o]={r:r.parse(Be(u,a),c)};return s}const tp=Number.EPSILON||1e-14,Mn=(e,t)=>t<e.length&&!e[t].skip&&e[t],Il=e=>e==="x"?"y":"x";function ep(e,t,n,i){const r=e.skip?t:e,a=t,s=n.skip?t:n,o=_n(a,r),l=_n(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,h=i*u;return{previous:{x:a.x-d*(s.x-r.x),y:a.y-d*(s.y-r.y)},next:{x:a.x+h*(s.x-r.x),y:a.y+h*(s.y-r.y)}}}function np(e,t,n){const i=e.length;let r,a,s,o,l,c=Mn(e,0);for(let u=0;u<i-1;++u)if(l=c,c=Mn(e,u+1),!(!l||!c)){if(jn(t[u],0,tp)){n[u]=n[u+1]=0;continue}r=n[u]/t[u],a=n[u+1]/t[u],o=Math.pow(r,2)+Math.pow(a,2),!(o<=9)&&(s=3/Math.sqrt(o),n[u]=r*s*t[u],n[u+1]=a*s*t[u])}}function ip(e,t,n="x"){const i=Il(n),r=e.length;let a,s,o,l=Mn(e,0);for(let c=0;c<r;++c){if(s=o,o=l,l=Mn(e,c+1),!o)continue;const u=o[n],d=o[i];s&&(a=(u-s[n])/3,o[`cp1${n}`]=u-a,o[`cp1${i}`]=d-a*t[c]),l&&(a=(l[n]-u)/3,o[`cp2${n}`]=u+a,o[`cp2${i}`]=d+a*t[c])}}function rp(e,t="x"){const n=Il(t),i=e.length,r=Array(i).fill(0),a=Array(i);let s,o,l,c=Mn(e,0);for(s=0;s<i;++s)if(o=l,l=c,c=Mn(e,s+1),!!l){if(c){const u=c[t]-l[t];r[s]=u!==0?(c[n]-l[n])/u:0}a[s]=o?c?pe(r[s-1])!==pe(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}np(e,r,a),ip(e,a,t)}function qi(e,t,n){return Math.max(Math.min(e,n),t)}function ap(e,t){let n,i,r,a,s,o=Ee(e[0],t);for(n=0,i=e.length;n<i;++n)s=a,a=o,o=n<i-1&&Ee(e[n+1],t),a&&(r=e[n],s&&(r.cp1x=qi(r.cp1x,t.left,t.right),r.cp1y=qi(r.cp1y,t.top,t.bottom)),o&&(r.cp2x=qi(r.cp2x,t.left,t.right),r.cp2y=qi(r.cp2y,t.top,t.bottom)))}function sp(e,t,n,i,r){let a,s,o,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")rp(e,r);else{let c=i?e[e.length-1]:e[0];for(a=0,s=e.length;a<s;++a)o=e[a],l=ep(c,o,e[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&&ap(e,n)}function Nl(){return typeof window<"u"&&typeof document<"u"}function ha(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Gi(e,t,n){let i;return typeof e=="string"?(i=parseInt(e,10),e.indexOf("%")!==-1&&(i=i/100*t.parentNode[n])):i=e,i}const Xi=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function op(e,t){return Xi(e).getPropertyValue(t)}const lp=["top","right","bottom","left"];function an(e,t,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const a=lp[r];i[a]=parseFloat(e[t+"-"+a+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const cp=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function up(e,t){const n=e.touches,i=n&&n.length?n[0]:e,{offsetX:r,offsetY:a}=i;let s=!1,o,l;if(cp(r,a,e.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 sn(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:i}=t,r=Xi(n),a=r.boxSizing==="border-box",s=an(r,"padding"),o=an(r,"border","width"),{x:l,y:c,box:u}=up(e,n),d=s.left+(u&&o.left),h=s.top+(u&&o.top);let{width:f,height:p}=t;return a&&(f-=s.width+o.width,p-=s.height+o.height),{x:Math.round((l-d)/f*n.width/i),y:Math.round((c-h)/p*n.height/i)}}function dp(e,t,n){let i,r;if(t===void 0||n===void 0){const a=ha(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{const s=a.getBoundingClientRect(),o=Xi(a),l=an(o,"border","width"),c=an(o,"padding");t=s.width-c.width-l.width,n=s.height-c.height-l.height,i=Gi(o.maxWidth,a,"clientWidth"),r=Gi(o.maxHeight,a,"clientHeight")}}return{width:t,height:n,maxWidth:i||Wi,maxHeight:r||Wi}}const Ki=e=>Math.round(e*10)/10;function hp(e,t,n,i){const r=Xi(e),a=an(r,"margin"),s=Gi(r.maxWidth,e,"clientWidth")||Wi,o=Gi(r.maxHeight,e,"clientHeight")||Wi,l=dp(e,t,n);let{width:c,height:u}=l;if(r.boxSizing==="content-box"){const h=an(r,"border","width"),f=an(r,"padding");c-=f.width+h.width,u-=f.height+h.height}return c=Math.max(0,c-a.width),u=Math.max(0,i?c/i:u-a.height),c=Ki(Math.min(c,s,l.maxWidth)),u=Ki(Math.min(u,o,l.maxHeight)),c&&!u&&(u=Ki(c/2)),(t!==void 0||n!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=Ki(Math.floor(u*i))),{width:c,height:u}}function Bl(e,t,n){const i=t||1,r=Math.floor(e.height*i),a=Math.floor(e.width*i);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==i||s.height!==r||s.width!==a?(e.currentDevicePixelRatio=i,s.height=r,s.width=a,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}const fp=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e}();function Hl(e,t){const n=op(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function on(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function gp(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:i==="middle"?n<.5?e.y:t.y:i==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function pp(e,t,n,i){const r={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},s=on(e,r,n),o=on(r,a,n),l=on(a,t,n),c=on(s,o,n),u=on(o,l,n);return on(c,u,n)}const mp=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},bp=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Sn(e,t,n){return e?mp(t,n):bp()}function Fl(e,t){let n,i;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)}function Ul(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Wl(e){return e==="angle"?{between:$n,compare:yg,normalize:ne}:{between:Ce,compare:(t,n)=>t-n,normalize:t=>t}}function Yl({start:e,end:t,count:n,loop:i,style:r}){return{start:e%n,end:t%n,loop:i&&(t-e+1)%n===0,style:r}}function yp(e,t,n){const{property:i,start:r,end:a}=n,{between:s,normalize:o}=Wl(i),l=t.length;let{start:c,end:u,loop:d}=e,h,f;if(d){for(c+=l,u+=l,h=0,f=l;h<f&&s(o(t[c%l][i]),r,a);++h)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function zl(e,t,n){if(!n)return[e];const{property:i,start:r,end:a}=n,s=t.length,{compare:o,between:l,normalize:c}=Wl(i),{start:u,end:d,loop:h,style:f}=yp(e,t,n),p=[];let y=!1,b=null,m,v,x;const w=()=>l(r,x,m)&&o(r,x)!==0,_=()=>o(a,m)===0||l(a,x,m),T=()=>y||w(),M=()=>!y||_();for(let S=u,D=u;S<=d;++S)v=t[S%s],!v.skip&&(m=c(v[i]),m!==x&&(y=l(m,r,a),b===null&&T()&&(b=o(m,r)===0?S:D),b!==null&&M()&&(p.push(Yl({start:b,end:S,loop:h,count:s,style:f})),b=null),D=S,x=m));return b!==null&&p.push(Yl({start:b,end:d,loop:h,count:s,style:f})),p}function Vl(e,t){const n=[],i=e.segments;for(let r=0;r<i.length;r++){const a=zl(i[r],e.points,t);a.length&&n.push(...a)}return n}function vp(e,t,n,i){let r=0,a=t-1;if(n&&!i)for(;r<t&&!e[r].skip;)r++;for(;r<t&&e[r].skip;)r++;for(r%=t,n&&(a+=r);a>r&&e[a%t].skip;)a--;return a%=t,{start:r,end:a}}function xp(e,t,n,i){const r=e.length,a=[];let s=t,o=e[t],l;for(l=t+1;l<=n;++l){const c=e[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 _p(e,t){const n=e.points,i=e.options.spanGaps,r=n.length;if(!r)return[];const a=!!e._loop,{start:s,end:o}=vp(n,r,a,i);if(i===!0)return jl(e,[{start:s,end:o,loop:a}],n,t);const l=o<s?o+r:o,c=!!e._fullLoop&&s===0&&o===r-1;return jl(e,xp(n,s,l,c),n,t)}function jl(e,t,n,i){return!i||!i.setContext||!n?t:wp(e,t,n,i)}function wp(e,t,n,i){const r=e._chart.getContext(),a=$l(e.options),{_datasetIndex:s,options:{spanGaps:o}}=e,l=n.length,c=[];let u=a,d=t[0].start,h=d;function f(p,y,b,m){const v=o?-1:1;if(p!==y){for(p+=l;n[p%l].skip;)p-=v;for(;n[y%l].skip;)y+=v;p%l!==y%l&&(c.push({start:p%l,end:y%l,loop:b,style:m}),u=m,d=y%l)}}for(const p of t){d=o?d:p.start;let y=n[d%l],b;for(h=d+1;h<=p.end;h++){const m=n[h%l];b=$l(i.setContext(We(r,{type:"segment",p0:y,p1:m,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:s}))),Tp(b,u)&&f(d,h-1,p.loop,u),y=m,u=b}d<h-1&&f(d,h-1,p.loop,u)}return c}function $l(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Tp(e,t){if(!t)return!1;const n=[],i=function(r,a){return ia(a)?(n.includes(a)||n.push(a),n.indexOf(a)):a};return JSON.stringify(e,i)!==JSON.stringify(t,i)}/*!
|
|
32
|
+
*/function De(){}const lg=(()=>{let e=0;return()=>e++})();function U(e){return e===null||typeof e>"u"}function nt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function j(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function yt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ee(e,t){return yt(e)?e:t}function H(e,t){return typeof e>"u"?t:e}const cg=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,al=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function st(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function ot(e,t,n,i){let r,a,s;if(nt(e))if(a=e.length,i)for(r=a-1;r>=0;r--)t.call(n,e[r],r);else for(r=0;r<a;r++)t.call(n,e[r],r);else if(j(e))for(s=Object.keys(e),a=s.length,r=0;r<a;r++)t.call(n,e[s[r]],s[r])}function Ui(e,t){let n,i,r,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(r=e[n],a=t[n],r.datasetIndex!==a.datasetIndex||r.index!==a.index)return!1;return!0}function Wi(e){if(nt(e))return e.map(Wi);if(j(e)){const t=Object.create(null),n=Object.keys(e),i=n.length;let r=0;for(;r<i;++r)t[n[r]]=Wi(e[n[r]]);return t}return e}function sl(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function ug(e,t,n,i){if(!sl(e))return;const r=t[e],a=n[e];j(r)&&j(a)?zn(r,a,i):t[e]=Wi(a)}function zn(e,t,n){const i=nt(t)?t:[t],r=i.length;if(!j(e))return e;n=n||{};const a=n.merger||ug;let s;for(let o=0;o<r;++o){if(s=i[o],!j(s))continue;const l=Object.keys(s);for(let c=0,u=l.length;c<u;++c)a(l[c],e,s,n)}return e}function Vn(e,t){return zn(e,t,{merger:dg})}function dg(e,t,n){if(!sl(e))return;const i=t[e],r=n[e];j(i)&&j(r)?Vn(i,r):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Wi(r))}const ol={"":e=>e,x:e=>e.x,y:e=>e.y};function hg(e){const t=e.split("."),n=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function fg(e){const t=hg(e);return n=>{for(const i of t){if(i==="")break;n=n&&n[i]}return n}}function Be(e,t){return(ol[t]||(ol[t]=fg(t)))(e)}function Jr(e){return e.charAt(0).toUpperCase()+e.slice(1)}const $t=e=>typeof e<"u",qt=e=>typeof e=="function",ll=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function gg(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const X=Math.PI,ut=2*X,pg=ut+X,Yi=Number.POSITIVE_INFINITY,ta=X/180,dt=X/2,se=X/4,zi=X*2/3,He=Math.log10,pe=Math.sign;function jn(e,t,n){return Math.abs(e-t)<n}function cl(e){const t=Math.round(e);e=jn(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(He(e))),i=e/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function mg(e){const t=[],n=Math.sqrt(e);let i;for(i=1;i<n;i++)e%i===0&&(t.push(i),t.push(e/i));return n===(n|0)&&t.push(n),t.sort((r,a)=>r-a).pop(),t}function Fe(e){return!isNaN(parseFloat(e))&&isFinite(e)}function bg(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function ul(e,t,n){let i,r,a;for(i=0,r=e.length;i<r;i++)a=e[i][n],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function Ct(e){return e*(X/180)}function Vi(e){return e*(180/X)}function dl(e){if(!yt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function hl(e,t){const n=t.x-e.x,i=t.y-e.y,r=Math.sqrt(n*n+i*i);let a=Math.atan2(i,n);return a<-.5*X&&(a+=ut),{angle:a,distance:r}}function _n(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function yg(e,t){return(e-t+pg)%ut-X}function ne(e){return(e%ut+ut)%ut}function $n(e,t,n,i){const r=ne(e),a=ne(t),s=ne(n),o=ne(a-r),l=ne(s-r),c=ne(r-a),u=ne(r-s);return r===a||r===s||i&&a===s||o>l&&c<u}function Rt(e,t,n){return Math.max(t,Math.min(n,e))}function vg(e){return Rt(e,-32768,32767)}function Ce(e,t,n,i=1e-6){return e>=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function ea(e,t,n){n=n||(s=>e[s]<t);let i=e.length-1,r=0,a;for(;i-r>1;)a=r+i>>1,n(a)?r=a:i=a;return{lo:r,hi:i}}const Pe=(e,t,n,i)=>ea(e,n,i?r=>{const a=e[r][t];return a<n||a===n&&e[r+1][t]===n}:r=>e[r][t]<n),xg=(e,t,n)=>ea(e,n,i=>e[i][t]>=n);function _g(e,t,n){let i=0,r=e.length;for(;i<r&&e[i]<t;)i++;for(;r>i&&e[r-1]>n;)r--;return i>0||r<e.length?e.slice(i,r):e}const fl=["push","pop","shift","splice","unshift"];function wg(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),fl.forEach(n=>{const i="_onData"+Jr(n),r=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...a){const s=r.apply(this,a);return e._chartjs.listeners.forEach(o=>{typeof o[i]=="function"&&o[i](...a)}),s}})})}function gl(e,t){const n=e._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(fl.forEach(a=>{delete e[a]}),delete e._chartjs)}function pl(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const ml=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function bl(e,t){let n=[],i=!1;return function(...r){n=r,i||(i=!0,ml.call(window,()=>{i=!1,e.apply(t,n)}))}}function Tg(e,t){let n;return function(...i){return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}const na=e=>e==="start"?"left":e==="end"?"right":"center",Ft=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,Mg=(e,t,n,i)=>e===(i?"left":"right")?n:e==="center"?(t+n)/2:t;function yl(e,t,n){const i=t.length;let r=0,a=i;if(e._sorted){const{iScale:s,_parsed:o}=e,l=s.axis,{min:c,max:u,minDefined:d,maxDefined:h}=s.getUserBounds();d&&(r=Rt(Math.min(Pe(o,s.axis,c).lo,n?i:Pe(t,l,s.getPixelForValue(c)).lo),0,i-1)),h?a=Rt(Math.max(Pe(o,s.axis,u,!0).hi+1,n?0:Pe(t,l,s.getPixelForValue(u),!0).hi+1),r,i)-r:a=i-r}return{start:r,count:a}}function vl(e){const{xScale:t,yScale:n,_scaleRanges:i}=e,r={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!i)return e._scaleRanges=r,!0;const a=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,r),a}const ji=e=>e===0||e===1,xl=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*ut/n)),_l=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*ut/n)+1,qn={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*dt)+1,easeOutSine:e=>Math.sin(e*dt),easeInOutSine:e=>-.5*(Math.cos(X*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>ji(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>ji(e)?e:xl(e,.075,.3),easeOutElastic:e=>ji(e)?e:_l(e,.075,.3),easeInOutElastic(e){return ji(e)?e:e<.5?.5*xl(e*2,.1125,.45):.5+.5*_l(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-qn.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?qn.easeInBounce(e*2)*.5:qn.easeOutBounce(e*2-1)*.5+.5};function ia(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function wl(e){return ia(e)?e:new Yn(e)}function ra(e){return ia(e)?e:new Yn(e).saturate(.5).darken(.1).hexString()}const Sg=["x","y","borderWidth","radius","tension"],Dg=["color","borderColor","backgroundColor"];function Cg(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:Dg},numbers:{type:"number",properties:Sg}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Pg(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Tl=new Map;function Eg(e,t){t=t||{};const n=e+JSON.stringify(t);let i=Tl.get(n);return i||(i=new Intl.NumberFormat(e,t),Tl.set(n,i)),i}function Gn(e,t,n){return Eg(t,n).format(e)}const Ml={values(e){return nt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const i=this.chart.options.locale;let r,a=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(r="scientific"),a=kg(e,n)}const s=He(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),Gn(e,i,l)},logarithmic(e,t,n){if(e===0)return"0";const i=n[t].significand||e/Math.pow(10,Math.floor(He(e)));return[1,2,3,5,10,15].includes(i)||t>.8*n.length?Ml.numeric.call(this,e,t,n):""}};function kg(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var $i={formatters:Ml};function Og(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.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:$i.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const en=Object.create(null),aa=Object.create(null);function Xn(e,t){if(!t)return e;const n=t.split(".");for(let i=0,r=n.length;i<r;++i){const a=n[i];e=e[a]||(e[a]=Object.create(null))}return e}function sa(e,t,n){return typeof t=="string"?zn(Xn(e,t),n):zn(Xn(e,""),t)}class Ag{constructor(t,n){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)=>ra(r.backgroundColor),this.hoverBorderColor=(i,r)=>ra(r.borderColor),this.hoverColor=(i,r)=>ra(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(n)}set(t,n){return sa(this,t,n)}get(t){return Xn(this,t)}describe(t,n){return sa(aa,t,n)}override(t,n){return sa(en,t,n)}route(t,n,i,r){const a=Xn(this,t),s=Xn(this,i),o="_"+n;Object.defineProperties(a,{[o]:{value:a[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[o],c=s[r];return j(l)?Object.assign({},c,l):H(l,c)},set(l){this[o]=l}}})}apply(t){t.forEach(n=>n(this))}}var xt=new Ag({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Cg,Pg,Og]);function Rg(e){return!e||U(e.size)||U(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function qi(e,t,n,i,r){let a=t[r];return a||(a=t[r]=e.measureText(r).width,n.push(r)),a>i&&(i=a),i}function Lg(e,t,n,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),e.save(),e.font=t;let s=0;const o=n.length;let l,c,u,d,h;for(l=0;l<o;l++)if(d=n[l],d!=null&&!nt(d))s=qi(e,r,a,s,d);else if(nt(d))for(c=0,u=d.length;c<u;c++)h=d[c],h!=null&&!nt(h)&&(s=qi(e,r,a,s,h));e.restore();const f=a.length/2;if(f>n.length){for(l=0;l<f;l++)delete r[a[l]];a.splice(0,f)}return s}function nn(e,t,n){const i=e.currentDevicePixelRatio,r=n!==0?Math.max(n/2,.5):0;return Math.round((t-r)*i)/i+r}function Sl(e,t){t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function oa(e,t,n,i){Dl(e,t,n,i,null)}function Dl(e,t,n,i,r){let a,s,o,l,c,u,d,h;const f=t.pointStyle,p=t.rotation,y=t.radius;let b=(p||0)*ta;if(f&&typeof f=="object"&&(a=f.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){e.save(),e.translate(n,i),e.rotate(b),e.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),e.restore();return}if(!(isNaN(y)||y<=0)){switch(e.beginPath(),f){default:r?e.ellipse(n,i,r/2,y,0,0,ut):e.arc(n,i,y,0,ut),e.closePath();break;case"triangle":u=r?r/2:y,e.moveTo(n+Math.sin(b)*u,i-Math.cos(b)*y),b+=zi,e.lineTo(n+Math.sin(b)*u,i-Math.cos(b)*y),b+=zi,e.lineTo(n+Math.sin(b)*u,i-Math.cos(b)*y),e.closePath();break;case"rectRounded":c=y*.516,l=y-c,s=Math.cos(b+se)*l,d=Math.cos(b+se)*(r?r/2-c:l),o=Math.sin(b+se)*l,h=Math.sin(b+se)*(r?r/2-c:l),e.arc(n-d,i-o,c,b-X,b-dt),e.arc(n+h,i-s,c,b-dt,b),e.arc(n+d,i+o,c,b,b+dt),e.arc(n-h,i+s,c,b+dt,b+X),e.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*y,u=r?r/2:l,e.rect(n-u,i-l,2*u,2*l);break}b+=se;case"rectRot":d=Math.cos(b)*(r?r/2:y),s=Math.cos(b)*y,o=Math.sin(b)*y,h=Math.sin(b)*(r?r/2:y),e.moveTo(n-d,i-o),e.lineTo(n+h,i-s),e.lineTo(n+d,i+o),e.lineTo(n-h,i+s),e.closePath();break;case"crossRot":b+=se;case"cross":d=Math.cos(b)*(r?r/2:y),s=Math.cos(b)*y,o=Math.sin(b)*y,h=Math.sin(b)*(r?r/2:y),e.moveTo(n-d,i-o),e.lineTo(n+d,i+o),e.moveTo(n+h,i-s),e.lineTo(n-h,i+s);break;case"star":d=Math.cos(b)*(r?r/2:y),s=Math.cos(b)*y,o=Math.sin(b)*y,h=Math.sin(b)*(r?r/2:y),e.moveTo(n-d,i-o),e.lineTo(n+d,i+o),e.moveTo(n+h,i-s),e.lineTo(n-h,i+s),b+=se,d=Math.cos(b)*(r?r/2:y),s=Math.cos(b)*y,o=Math.sin(b)*y,h=Math.sin(b)*(r?r/2:y),e.moveTo(n-d,i-o),e.lineTo(n+d,i+o),e.moveTo(n+h,i-s),e.lineTo(n-h,i+s);break;case"line":s=r?r/2:Math.cos(b)*y,o=Math.sin(b)*y,e.moveTo(n-s,i-o),e.lineTo(n+s,i+o);break;case"dash":e.moveTo(n,i),e.lineTo(n+Math.cos(b)*(r?r/2:y),i+Math.sin(b)*y);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Ee(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Kn(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Zn(e){e.restore()}function Ig(e,t,n,i,r){if(!t)return e.lineTo(n.x,n.y);if(r==="middle"){const a=(t.x+n.x)/2;e.lineTo(a,t.y),e.lineTo(a,n.y)}else r==="after"!=!!i?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function Ng(e,t,n,i){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function Bg(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),U(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function Hg(e,t,n,i,r){if(r.strikethrough||r.underline){const a=e.measureText(i),s=t-a.actualBoundingBoxLeft,o=t+a.actualBoundingBoxRight,l=n-a.actualBoundingBoxAscent,c=n+a.actualBoundingBoxDescent,u=r.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=r.decorationWidth||2,e.moveTo(s,u),e.lineTo(o,u),e.stroke()}}function Fg(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function rn(e,t,n,i,r,a={}){const s=nt(t)?t:[t],o=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(e.save(),e.font=r.string,Bg(e,a),l=0;l<s.length;++l)c=s[l],a.backdrop&&Fg(e,a.backdrop),o&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),U(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(c,n,i,a.maxWidth)),e.fillText(c,n,i,a.maxWidth),Hg(e,n,i,c,a),i+=Number(r.lineHeight);e.restore()}function wn(e,t){const{x:n,y:i,w:r,h:a,radius:s}=t;e.arc(n+s.topLeft,i+s.topLeft,s.topLeft,-dt,X,!0),e.lineTo(n,i+a-s.bottomLeft),e.arc(n+s.bottomLeft,i+a-s.bottomLeft,s.bottomLeft,X,dt,!0),e.lineTo(n+r-s.bottomRight,i+a),e.arc(n+r-s.bottomRight,i+a-s.bottomRight,s.bottomRight,dt,0,!0),e.lineTo(n+r,i+s.topRight),e.arc(n+r-s.topRight,i+s.topRight,s.topRight,0,-dt,!0),e.lineTo(n+s.topLeft,i)}const Ug=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Wg=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Yg(e,t){const n=(""+e).match(Ug);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const zg=e=>+e||0;function la(e,t){const n={},i=j(t),r=i?Object.keys(t):t,a=j(e)?i?s=>H(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of r)n[s]=zg(a(s));return n}function Cl(e){return la(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Ue(e){return la(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Pt(e){const t=Cl(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function gt(e,t){e=e||{},t=t||xt.font;let n=H(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let i=H(e.style,t.style);i&&!(""+i).match(Wg)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:H(e.family,t.family),lineHeight:Yg(H(e.lineHeight,t.lineHeight),n),size:n,style:i,weight:H(e.weight,t.weight),string:""};return r.string=Rg(r),r}function Qn(e,t,n,i){let r=!0,a,s,o;for(a=0,s=e.length;a<s;++a)if(o=e[a],o!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t),r=!1),n!==void 0&&nt(o)&&(o=o[n%o.length],r=!1),o!==void 0))return i&&!r&&(i.cacheable=!1),o}function Vg(e,t,n){const{min:i,max:r}=e,a=al(t,(r-i)/2),s=(o,l)=>n&&o===0?0:o+l;return{min:s(i,-Math.abs(a)),max:s(r,a)}}function We(e,t){return Object.assign(Object.create(e),t)}function ca(e,t=[""],n,i,r=()=>e[0]){const a=n||e;typeof i>"u"&&(i=Al("_fallback",e));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:i,_getTarget:r,override:o=>ca([o,...e],t,a,i)};return new Proxy(s,{deleteProperty(o,l){return delete o[l],delete o._keys,delete e[0][l],!0},get(o,l){return El(o,l,()=>Qg(l,t,e,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(o,l){return Rl(o).includes(l)},ownKeys(o){return Rl(o)},set(o,l,c){const u=o._storage||(o._storage=r());return o[l]=u[l]=c,delete o._keys,!0}})}function Tn(e,t,n,i){const r={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Pl(e,i),setContext:a=>Tn(e,a,n,i),override:a=>Tn(e.override(a),t,n,i)};return new Proxy(r,{deleteProperty(a,s){return delete a[s],delete e[s],!0},get(a,s,o){return El(a,s,()=>$g(a,s,o))},getOwnPropertyDescriptor(a,s){return a._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(a,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(a,s,o){return e[s]=o,delete a[s],!0}})}function Pl(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=e;return{allKeys:r,scriptable:n,indexable:i,isScriptable:qt(n)?n:()=>n,isIndexable:qt(i)?i:()=>i}}const jg=(e,t)=>e?e+Jr(t):t,ua=(e,t)=>j(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function El(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const i=n();return e[t]=i,i}function $g(e,t,n){const{_proxy:i,_context:r,_subProxy:a,_descriptors:s}=e;let o=i[t];return qt(o)&&s.isScriptable(t)&&(o=qg(t,o,e,n)),nt(o)&&o.length&&(o=Gg(t,o,e,s.isIndexable)),ua(t,o)&&(o=Tn(o,r,a&&a[t],s)),o}function qg(e,t,n,i){const{_proxy:r,_context:a,_subProxy:s,_stack:o}=n;if(o.has(e))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+e);o.add(e);let l=t(a,s||i);return o.delete(e),ua(e,l)&&(l=da(r._scopes,r,e,l)),l}function Gg(e,t,n,i){const{_proxy:r,_context:a,_subProxy:s,_descriptors:o}=n;if(typeof a.index<"u"&&i(e))return t[a.index%t.length];if(j(t[0])){const l=t,c=r._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=da(c,r,e,u);t.push(Tn(d,a,s&&s[e],o))}}return t}function kl(e,t,n){return qt(e)?e(t,n):e}const Xg=(e,t)=>e===!0?t:typeof e=="string"?Be(t,e):void 0;function Kg(e,t,n,i,r){for(const a of t){const s=Xg(n,a);if(s){e.add(s);const o=kl(s._fallback,n,r);if(typeof o<"u"&&o!==n&&o!==i)return o}else if(s===!1&&typeof i<"u"&&n!==i)return null}return!1}function da(e,t,n,i){const r=t._rootScopes,a=kl(t._fallback,n,i),s=[...e,...r],o=new Set;o.add(i);let l=Ol(o,s,n,a||n,i);return l===null||typeof a<"u"&&a!==n&&(l=Ol(o,s,a,l,i),l===null)?!1:ca(Array.from(o),[""],r,a,()=>Zg(t,n,i))}function Ol(e,t,n,i,r){for(;n;)n=Kg(e,t,n,i,r);return n}function Zg(e,t,n){const i=e._getTarget();t in i||(i[t]={});const r=i[t];return nt(r)&&j(n)?n:r||{}}function Qg(e,t,n,i){let r;for(const a of t)if(r=Al(jg(a,e),n),typeof r<"u")return ua(e,r)?da(n,i,e,r):r}function Al(e,t){for(const n of t){if(!n)continue;const i=n[e];if(typeof i<"u")return i}}function Rl(e){let t=e._keys;return t||(t=e._keys=Jg(e._scopes)),t}function Jg(e){const t=new Set;for(const n of e)for(const i of Object.keys(n).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}function Ll(e,t,n,i){const{iScale:r}=e,{key:a="r"}=this._parsing,s=new Array(i);let o,l,c,u;for(o=0,l=i;o<l;++o)c=o+n,u=t[c],s[o]={r:r.parse(Be(u,a),c)};return s}const tp=Number.EPSILON||1e-14,Mn=(e,t)=>t<e.length&&!e[t].skip&&e[t],Il=e=>e==="x"?"y":"x";function ep(e,t,n,i){const r=e.skip?t:e,a=t,s=n.skip?t:n,o=_n(a,r),l=_n(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,h=i*u;return{previous:{x:a.x-d*(s.x-r.x),y:a.y-d*(s.y-r.y)},next:{x:a.x+h*(s.x-r.x),y:a.y+h*(s.y-r.y)}}}function np(e,t,n){const i=e.length;let r,a,s,o,l,c=Mn(e,0);for(let u=0;u<i-1;++u)if(l=c,c=Mn(e,u+1),!(!l||!c)){if(jn(t[u],0,tp)){n[u]=n[u+1]=0;continue}r=n[u]/t[u],a=n[u+1]/t[u],o=Math.pow(r,2)+Math.pow(a,2),!(o<=9)&&(s=3/Math.sqrt(o),n[u]=r*s*t[u],n[u+1]=a*s*t[u])}}function ip(e,t,n="x"){const i=Il(n),r=e.length;let a,s,o,l=Mn(e,0);for(let c=0;c<r;++c){if(s=o,o=l,l=Mn(e,c+1),!o)continue;const u=o[n],d=o[i];s&&(a=(u-s[n])/3,o[`cp1${n}`]=u-a,o[`cp1${i}`]=d-a*t[c]),l&&(a=(l[n]-u)/3,o[`cp2${n}`]=u+a,o[`cp2${i}`]=d+a*t[c])}}function rp(e,t="x"){const n=Il(t),i=e.length,r=Array(i).fill(0),a=Array(i);let s,o,l,c=Mn(e,0);for(s=0;s<i;++s)if(o=l,l=c,c=Mn(e,s+1),!!l){if(c){const u=c[t]-l[t];r[s]=u!==0?(c[n]-l[n])/u:0}a[s]=o?c?pe(r[s-1])!==pe(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}np(e,r,a),ip(e,a,t)}function Gi(e,t,n){return Math.max(Math.min(e,n),t)}function ap(e,t){let n,i,r,a,s,o=Ee(e[0],t);for(n=0,i=e.length;n<i;++n)s=a,a=o,o=n<i-1&&Ee(e[n+1],t),a&&(r=e[n],s&&(r.cp1x=Gi(r.cp1x,t.left,t.right),r.cp1y=Gi(r.cp1y,t.top,t.bottom)),o&&(r.cp2x=Gi(r.cp2x,t.left,t.right),r.cp2y=Gi(r.cp2y,t.top,t.bottom)))}function sp(e,t,n,i,r){let a,s,o,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")rp(e,r);else{let c=i?e[e.length-1]:e[0];for(a=0,s=e.length;a<s;++a)o=e[a],l=ep(c,o,e[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&&ap(e,n)}function Nl(){return typeof window<"u"&&typeof document<"u"}function ha(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Xi(e,t,n){let i;return typeof e=="string"?(i=parseInt(e,10),e.indexOf("%")!==-1&&(i=i/100*t.parentNode[n])):i=e,i}const Ki=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function op(e,t){return Ki(e).getPropertyValue(t)}const lp=["top","right","bottom","left"];function an(e,t,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const a=lp[r];i[a]=parseFloat(e[t+"-"+a+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const cp=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function up(e,t){const n=e.touches,i=n&&n.length?n[0]:e,{offsetX:r,offsetY:a}=i;let s=!1,o,l;if(cp(r,a,e.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 sn(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:i}=t,r=Ki(n),a=r.boxSizing==="border-box",s=an(r,"padding"),o=an(r,"border","width"),{x:l,y:c,box:u}=up(e,n),d=s.left+(u&&o.left),h=s.top+(u&&o.top);let{width:f,height:p}=t;return a&&(f-=s.width+o.width,p-=s.height+o.height),{x:Math.round((l-d)/f*n.width/i),y:Math.round((c-h)/p*n.height/i)}}function dp(e,t,n){let i,r;if(t===void 0||n===void 0){const a=ha(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{const s=a.getBoundingClientRect(),o=Ki(a),l=an(o,"border","width"),c=an(o,"padding");t=s.width-c.width-l.width,n=s.height-c.height-l.height,i=Xi(o.maxWidth,a,"clientWidth"),r=Xi(o.maxHeight,a,"clientHeight")}}return{width:t,height:n,maxWidth:i||Yi,maxHeight:r||Yi}}const Zi=e=>Math.round(e*10)/10;function hp(e,t,n,i){const r=Ki(e),a=an(r,"margin"),s=Xi(r.maxWidth,e,"clientWidth")||Yi,o=Xi(r.maxHeight,e,"clientHeight")||Yi,l=dp(e,t,n);let{width:c,height:u}=l;if(r.boxSizing==="content-box"){const h=an(r,"border","width"),f=an(r,"padding");c-=f.width+h.width,u-=f.height+h.height}return c=Math.max(0,c-a.width),u=Math.max(0,i?c/i:u-a.height),c=Zi(Math.min(c,s,l.maxWidth)),u=Zi(Math.min(u,o,l.maxHeight)),c&&!u&&(u=Zi(c/2)),(t!==void 0||n!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=Zi(Math.floor(u*i))),{width:c,height:u}}function Bl(e,t,n){const i=t||1,r=Math.floor(e.height*i),a=Math.floor(e.width*i);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==i||s.height!==r||s.width!==a?(e.currentDevicePixelRatio=i,s.height=r,s.width=a,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}const fp=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e}();function Hl(e,t){const n=op(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function on(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function gp(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:i==="middle"?n<.5?e.y:t.y:i==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function pp(e,t,n,i){const r={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},s=on(e,r,n),o=on(r,a,n),l=on(a,t,n),c=on(s,o,n),u=on(o,l,n);return on(c,u,n)}const mp=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},bp=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Sn(e,t,n){return e?mp(t,n):bp()}function Fl(e,t){let n,i;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)}function Ul(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Wl(e){return e==="angle"?{between:$n,compare:yg,normalize:ne}:{between:Ce,compare:(t,n)=>t-n,normalize:t=>t}}function Yl({start:e,end:t,count:n,loop:i,style:r}){return{start:e%n,end:t%n,loop:i&&(t-e+1)%n===0,style:r}}function yp(e,t,n){const{property:i,start:r,end:a}=n,{between:s,normalize:o}=Wl(i),l=t.length;let{start:c,end:u,loop:d}=e,h,f;if(d){for(c+=l,u+=l,h=0,f=l;h<f&&s(o(t[c%l][i]),r,a);++h)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function zl(e,t,n){if(!n)return[e];const{property:i,start:r,end:a}=n,s=t.length,{compare:o,between:l,normalize:c}=Wl(i),{start:u,end:d,loop:h,style:f}=yp(e,t,n),p=[];let y=!1,b=null,m,v,x;const w=()=>l(r,x,m)&&o(r,x)!==0,_=()=>o(a,m)===0||l(a,x,m),T=()=>y||w(),M=()=>!y||_();for(let D=u,S=u;D<=d;++D)v=t[D%s],!v.skip&&(m=c(v[i]),m!==x&&(y=l(m,r,a),b===null&&T()&&(b=o(m,r)===0?D:S),b!==null&&M()&&(p.push(Yl({start:b,end:D,loop:h,count:s,style:f})),b=null),S=D,x=m));return b!==null&&p.push(Yl({start:b,end:d,loop:h,count:s,style:f})),p}function Vl(e,t){const n=[],i=e.segments;for(let r=0;r<i.length;r++){const a=zl(i[r],e.points,t);a.length&&n.push(...a)}return n}function vp(e,t,n,i){let r=0,a=t-1;if(n&&!i)for(;r<t&&!e[r].skip;)r++;for(;r<t&&e[r].skip;)r++;for(r%=t,n&&(a+=r);a>r&&e[a%t].skip;)a--;return a%=t,{start:r,end:a}}function xp(e,t,n,i){const r=e.length,a=[];let s=t,o=e[t],l;for(l=t+1;l<=n;++l){const c=e[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 _p(e,t){const n=e.points,i=e.options.spanGaps,r=n.length;if(!r)return[];const a=!!e._loop,{start:s,end:o}=vp(n,r,a,i);if(i===!0)return jl(e,[{start:s,end:o,loop:a}],n,t);const l=o<s?o+r:o,c=!!e._fullLoop&&s===0&&o===r-1;return jl(e,xp(n,s,l,c),n,t)}function jl(e,t,n,i){return!i||!i.setContext||!n?t:wp(e,t,n,i)}function wp(e,t,n,i){const r=e._chart.getContext(),a=$l(e.options),{_datasetIndex:s,options:{spanGaps:o}}=e,l=n.length,c=[];let u=a,d=t[0].start,h=d;function f(p,y,b,m){const v=o?-1:1;if(p!==y){for(p+=l;n[p%l].skip;)p-=v;for(;n[y%l].skip;)y+=v;p%l!==y%l&&(c.push({start:p%l,end:y%l,loop:b,style:m}),u=m,d=y%l)}}for(const p of t){d=o?d:p.start;let y=n[d%l],b;for(h=d+1;h<=p.end;h++){const m=n[h%l];b=$l(i.setContext(We(r,{type:"segment",p0:y,p1:m,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:s}))),Tp(b,u)&&f(d,h-1,p.loop,u),y=m,u=b}d<h-1&&f(d,h-1,p.loop,u)}return c}function $l(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Tp(e,t){if(!t)return!1;const n=[],i=function(r,a){return ia(a)?(n.includes(a)||n.push(a),n.indexOf(a)):a};return JSON.stringify(e,i)!==JSON.stringify(t,i)}/*!
|
|
33
33
|
* Chart.js v4.3.0
|
|
34
34
|
* https://www.chartjs.org
|
|
35
35
|
* (c) 2023 Chart.js Contributors
|
|
36
36
|
* Released under the MIT License
|
|
37
|
-
*/class Mp{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,i,r){const a=n.listeners[r],s=n.duration;a.forEach(o=>o({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(i-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=ml.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=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),n+=a.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const i=n.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ke=new Mp;const ql="transparent",Sp={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const i=wl(e||ql),r=i.valid&&wl(t||ql);return r&&r.valid?r.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Dp{constructor(t,n,i,r){const a=n[i];r=Qn([t.to,r,a,t.from]);const s=Qn([t.from,a,r]);this._active=!0,this._fn=t.fn||Sp[t.type||typeof s],this._easing=qn[t.easing]||qn.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=i,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(t,n,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=Qn([t.to,n,r,t.from]),this._from=Qn([t.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=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||n<i),!this._active){this._target[r]=o,this._notify(!0);return}if(n<0){this._target[r]=a;return}l=n/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((n,i)=>{t.push({res:n,rej:i})})}_notify(t){const n=t?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][n]()}}class fa{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!V(t))return;const n=Object.keys(xt.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const a=t[r];if(!V(a))return;const s={};for(const o of n)s[o]=a[o];(nt(a.properties)&&a.properties||[r]).forEach(o=>{(o===r||!i.has(o))&&i.set(o,s)})})}_animateOptions(t,n){const i=n.options,r=Pp(t,i);if(!r)return[];const a=this._createAnimations(r,i);return i.$shared&&Cp(t.options.$animations,i).then(()=>{t.options=i},()=>{}),a}_createAnimations(t,n){const i=this._properties,r=[],a=t.$animations||(t.$animations={}),s=Object.keys(n),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,n));continue}const u=n[c];let d=a[c];const h=i.get(c);if(d)if(h&&d.active()){d.update(h,u,o);continue}else d.cancel();if(!h||!h.duration){t[c]=u;continue}a[c]=d=new Dp(h,t,c,u),r.push(d)}return r}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const i=this._createAnimations(t,n);if(i.length)return ke.add(this._chart,i),!0}}function Cp(e,t){const n=[],i=Object.keys(t);for(let r=0;r<i.length;r++){const a=e[i[r]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function Pp(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Gl(e,t){const n=e&&e.options||{},i=n.reverse,r=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:i?a:r,end:i?r:a}}function Ep(e,t,n){if(n===!1)return!1;const i=Gl(e,n),r=Gl(t,n);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function kp(e){let t,n,i,r;return V(e)?(t=e.top,n=e.right,i=e.bottom,r=e.left):t=n=i=r=e,{top:t,right:n,bottom:i,left:r,disabled:e===!1}}function Xl(e,t){const n=[],i=e._getSortedDatasetMetas(t);let r,a;for(r=0,a=i.length;r<a;++r)n.push(i[r].index);return n}function Kl(e,t,n,i={}){const r=e.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===n){if(i.all)continue;break}c=e.values[l],yt(c)&&(a||t===0||pe(t)===pe(c))&&(t+=c)}return t}}function Op(e){const t=Object.keys(e),n=new Array(t.length);let i,r,a;for(i=0,r=t.length;i<r;++i)a=t[i],n[i]={x:a,y:e[a]};return n}function Zl(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Ap(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Rp(e){const{min:t,max:n,minDefined:i,maxDefined:r}=e.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}function Lp(e,t,n){const i=e[t]||(e[t]={});return i[n]||(i[n]={})}function Ql(e,t,n,i){for(const r of t.getMatchingVisibleMetas(i).reverse()){const a=e[r.index];if(n&&a>0||!n&&a<0)return r.index}return null}function Jl(e,t){const{chart:n,_cachedMeta:i}=e,r=n._stacks||(n._stacks={}),{iScale:a,vScale:s,index:o}=i,l=a.axis,c=s.axis,u=Ap(a,s,i),d=t.length;let h;for(let f=0;f<d;++f){const p=t[f],{[l]:y,[c]:b}=p,m=p._stacks||(p._stacks={});h=m[c]=Lp(r,u,y),h[o]=b,h._top=Ql(h,s,!0,i.type),h._bottom=Ql(h,s,!1,i.type);const v=h._visualValues||(h._visualValues={});v[o]=b}}function ga(e,t){const n=e.scales;return Object.keys(n).filter(i=>n[i].axis===t).shift()}function Ip(e,t){return We(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Np(e,t,n){return We(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Jn(e,t){const n=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(const r of t){const a=r._stacks;if(!a||a[i]===void 0||a[i][n]===void 0)return;delete a[i][n],a[i]._visualValues!==void 0&&a[i]._visualValues[n]!==void 0&&delete a[i]._visualValues[n]}}}const pa=e=>e==="reset"||e==="none",tc=(e,t)=>t?e:Object.assign({},e),Bp=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Xl(n,!0),values:null};class ce{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Zl(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&&Jn(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,i=this.getDataset(),r=(d,h,f,p)=>d==="x"?h:d==="r"?p:f,a=n.xAxisID=H(i.xAxisID,ga(t,"x")),s=n.yAxisID=H(i.yAxisID,ga(t,"y")),o=n.rAxisID=H(i.rAxisID,ga(t,"r")),l=n.indexAxis,c=n.iAxisID=r(l,a,s,o),u=n.vAxisID=r(l,s,a,o);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(o),n.iScale=this.getScaleForId(c),n.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 n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&gl(this._data,this),t._stacked&&Jn(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(V(n))this._data=Op(n);else if(i!==n){if(i){gl(i,this);const r=this._cachedMeta;Jn(r),r._parsed=[]}n&&Object.isExtensible(n)&&wg(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const a=n._stacked;n._stacked=Zl(n.vScale,n),n.stack!==i.stack&&(r=!0,Jn(n),n.stack=i.stack),this._resyncElements(t),(r||a!==n._stacked)&&Jl(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:i,_data:r}=this,{iScale:a,_stacked:s}=i,o=a.axis;let l=t===0&&n===r.length?!0:i._sorted,c=t>0&&i._parsed[t-1],u,d,h;if(this._parsing===!1)i._parsed=r,i._sorted=!0,h=r;else{nt(r[t])?h=this.parseArrayData(i,r,t,n):V(r[t])?h=this.parseObjectData(i,r,t,n):h=this.parsePrimitiveData(i,r,t,n);const f=()=>d[o]===null||c&&d[o]<c[o];for(u=0;u<n;++u)i._parsed[u+t]=d=h[u],l&&(f()&&(l=!1),c=d);i._sorted=l}s&&Jl(this,h)}parsePrimitiveData(t,n,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 h,f,p;for(h=0,f=r;h<f;++h)p=h+i,d[h]={[o]:u||a.parse(c[p],p),[l]:s.parse(n[p],p)};return d}parseArrayData(t,n,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=n[u],o[l]={x:a.parse(d[0],u),y:s.parse(d[1],u)};return o}parseObjectData(t,n,i,r){const{xScale:a,yScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=new Array(r);let u,d,h,f;for(u=0,d=r;u<d;++u)h=u+i,f=n[h],c[u]={x:a.parse(Be(f,o),h),y:s.parse(Be(f,l),h)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,i){const r=this.chart,a=this._cachedMeta,s=n[t.axis],o={keys:Xl(r,!0),values:n._stacks[t.axis]._visualValues};return Kl(o,s,a.index,{mode:i})}updateRangeFromParsed(t,n,i,r){const a=i[n.axis];let s=a===null?NaN:a;const o=r&&i._stacks[n.axis];r&&o&&(r.values=o,s=Kl(r,a,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,n){const i=this._cachedMeta,r=i._parsed,a=i._sorted&&t===i.iScale,s=r.length,o=this._getOtherScale(t),l=Bp(n,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=Rp(o);let h,f;function p(){f=r[h];const y=f[o.axis];return!yt(f[t.axis])||u>y||d<y}for(h=0;h<s&&!(!p()&&(this.updateRangeFromParsed(c,t,f,l),a));++h);if(a){for(h=s-1;h>=0;--h)if(!p()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,i=[];let r,a,s;for(r=0,a=n.length;r<a;++r)s=n[r][t.axis],yt(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,i=n.iScale,r=n.vScale,a=this.getParsed(t);return{label:i?""+i.getLabelForValue(a[i.axis]):"",value:r?""+r.getLabelForValue(a[r.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=kp(H(this.options.clip,Ep(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,i=this._cachedMeta,r=i.data||[],a=n.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,n){const i=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,n,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=Np(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=Ip(this.chart.getContext(),this.index)),a.dataset=r,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=i,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",i){const r=n==="active",a=this._cachedDataOpts,s=t+"-"+n,o=a[s],l=this.enableOptionSharing&&$t(i);if(o)return tc(o,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=r?[`${t}Hover`,"hover",t,""]:[t,""],h=c.getOptionScopes(this.getDataset(),u),f=Object.keys(xt.elements[t]),p=()=>this.getContext(i,r,n),y=c.resolveNamedOptions(h,f,p,d);return y.$shared&&(y.$shared=l,a[s]=Object.freeze(tc(y,l))),y}_resolveAnimations(t,n,i){const r=this.chart,a=this._cachedDataOpts,s=`animation-${n}`,o=a[s];if(o)return o;let l;if(r.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(t,i,n))}const c=new fa(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,n){return!n||pa(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const i=this.resolveDataElementOptions(t,n),r=this._sharedOptions,a=this.getSharedOptions(i),s=this.includeOptions(n,a)||a!==r;return this.updateSharedOptions(a,n,i),{sharedOptions:a,includeOptions:s}}updateElement(t,n,i,r){pa(r)?Object.assign(t,i):this._resolveAnimations(n,r).update(t,i)}updateSharedOptions(t,n,i){t&&!pa(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,r){t.active=r;const a=this.getStyle(n,r);this._resolveAnimations(n,i,r).update(t,{options:!r&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,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 n=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=n.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,n,i=!0){const r=this._cachedMeta,a=r.data,s=t+n;let o;const l=c=>{for(c.length+=n,o=c.length-1;o>=s;o--)c[o]=c[o-n]};for(l(a),o=t;o<s;++o)a[o]=new this.dataElementType;this._parsing&&l(r._parsed),this.parse(t,n),i&&this.updateElements(a,t,n,"reset")}updateElements(t,n,i,r){}_removeElements(t,n){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(t,n);i._stacked&&Jn(i,r)}i.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,i,r]=t;this[n](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,n){n&&this._sync(["_removeElements",t,n]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}C(ce,"defaults",{}),C(ce,"datasetElementType",null),C(ce,"dataElementType",null);function Hp(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let i=[];for(let r=0,a=n.length;r<a;r++)i=i.concat(n[r].controller.getAllParsedValues(e));e._cache.$bar=pl(i.sort((r,a)=>r-a))}return e._cache.$bar}function Fp(e){const t=e.iScale,n=Hp(t,e.type);let i=t._length,r,a,s,o;const l=()=>{s===32767||s===-32768||($t(o)&&(i=Math.min(i,Math.abs(s-o)||i)),o=s)};for(r=0,a=n.length;r<a;++r)s=t.getPixelForValue(n[r]),l();for(o=void 0,r=0,a=t.ticks.length;r<a;++r)s=t.getPixelForTick(r),l();return i}function Up(e,t,n,i){const r=n.barThickness;let a,s;return U(r)?(a=t.min*n.categoryPercentage,s=n.barPercentage):(a=r*i,s=1),{chunk:a/i,ratio:s,start:t.pixels[e]-a/2}}function Wp(e,t,n,i){const r=t.pixels,a=r[e];let s=e>0?r[e-1]:null,o=e<r.length-1?r[e+1]:null;const l=n.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:n.barPercentage,start:c}}function Yp(e,t,n,i){const r=n.parse(e[0],i),a=n.parse(e[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[n.axis]=c,t._custom={barStart:l,barEnd:c,start:r,end:a,min:s,max:o}}function ec(e,t,n,i){return nt(e)?Yp(e,t,n,i):t[n.axis]=n.parse(e,i),t}function nc(e,t,n,i){const r=e.iScale,a=e.vScale,s=r.getLabels(),o=r===a,l=[];let c,u,d,h;for(c=n,u=n+i;c<u;++c)h=t[c],d={},d[r.axis]=o||r.parse(s[c],c),l.push(ec(h,d,a,c));return l}function ma(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function zp(e,t,n){return e!==0?pe(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function Vp(e){let t,n,i,r,a;return e.horizontal?(t=e.base>e.x,n="left",i="right"):(t=e.base<e.y,n="bottom",i="top"),t?(r="end",a="start"):(r="start",a="end"),{start:n,end:i,reverse:t,top:r,bottom:a}}function jp(e,t,n,i){let r=t.borderSkipped;const a={};if(!r){e.borderSkipped=a;return}if(r===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:o,reverse:l,top:c,bottom:u}=Vp(e);r==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===i?r=c:(n._bottom||0)===i?r=u:(a[ic(u,s,o,l)]=!0,r=c)),a[ic(r,s,o,l)]=!0,e.borderSkipped=a}function ic(e,t,n,i){return i?(e=$p(e,t,n),e=rc(e,n,t)):e=rc(e,t,n),e}function $p(e,t,n){return e===t?n:e===n?t:e}function rc(e,t,n){return e==="start"?t:e==="end"?n:e}function qp(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class ti extends ce{parsePrimitiveData(t,n,i,r){return nc(t,n,i,r)}parseArrayData(t,n,i,r){return nc(t,n,i,r)}parseObjectData(t,n,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 h,f,p,y;for(h=i,f=i+r;h<f;++h)y=n[h],p={},p[a.axis]=a.parse(Be(y,c),h),d.push(ec(Be(y,u),p,s,h));return d}updateRangeFromParsed(t,n,i,r){super.updateRangeFromParsed(t,n,i,r);const a=i._custom;a&&n===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 n=this._cachedMeta,{iScale:i,vScale:r}=n,a=this.getParsed(t),s=a._custom,o=ma(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 n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,i,r){const a=r==="reset",{index:s,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),c=o.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(n,r);for(let f=n;f<n+i;f++){const p=this.getParsed(f),y=a||U(p[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),b=this._calculateBarIndexPixels(f,u),m=(p._stacks||{})[o.axis],v={horizontal:c,base:y.base,enableBorderRadius:!m||ma(p._custom)||s===m._top||s===m._bottom,x:c?y.head:b.center,y:c?b.center:y.head,height:c?b.size:Math.abs(y.size),width:c?Math.abs(y.size):b.size};h&&(v.options=d||this.resolveDataElementOptions(f,t[f].active?"active":r));const x=v.options||t[f].options;jp(v,x,m,s),qp(v,x,u.ratio),this.updateElement(t[f],f,v,r)}}_getStacks(t,n){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(n),u=c&&c[l.vScale.axis];if(U(u)||isNaN(u))return!0};for(const l of r)if(!(n!==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,n,i){const r=this._getStacks(t,i),a=n!==void 0?r.indexOf(n):-1;return a===-1?r.length-1:a}_getRuler(){const t=this.options,n=this._cachedMeta,i=n.iScale,r=[];let a,s;for(a=0,s=n.data.length;a<s;++a)r.push(i.getPixelForValue(this.getParsed(a)[i.axis],a));const o=t.barThickness;return{min:o||Fp(n),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:n,_stacked:i,index:r},options:{base:a,minBarLength:s}}=this,o=a||0,l=this.getParsed(t),c=l._custom,u=ma(c);let d=l[n.axis],h=0,f=i?this.applyStack(n,l,i):d,p,y;f!==d&&(h=f-d,f=d),u&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&pe(d)!==pe(c.barEnd)&&(h=0),h+=d);const b=!U(a)&&!u?a:h;let m=n.getPixelForValue(b);if(this.chart.getDataVisibility(t)?p=n.getPixelForValue(h+f):p=m,y=p-m,Math.abs(y)<s){y=zp(y,n,o)*s,d===o&&(m-=y/2);const v=n.getPixelForDecimal(0),x=n.getPixelForDecimal(1),w=Math.min(v,x),_=Math.max(v,x);m=Math.max(Math.min(m,_),w),p=m+y,i&&!u&&(l._stacks[n.axis]._visualValues[r]=n.getValueForPixel(p)-n.getValueForPixel(m))}if(m===n.getPixelForValue(o)){const v=pe(y)*n.getLineWidthForValue(o)/2;m+=v,y-=v}return{size:y,base:m,head:p,center:p+y/2}}_calculateBarIndexPixels(t,n){const i=n.scale,r=this.options,a=r.skipNull,s=H(r.maxBarThickness,1/0);let o,l;if(n.grouped){const c=a?this._getStackCount(t):n.stackCount,u=r.barThickness==="flex"?Wp(t,n,r,c):Up(t,n,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,n.min*n.ratio);return{base:o-l/2,head:o+l/2,center:o,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,i=t.data,r=i.length;let a=0;for(;a<r;++a)this.getParsed(a)[n.axis]!==null&&i[a].draw(this._ctx)}}C(ti,"id","bar"),C(ti,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),C(ti,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Zi extends ce{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,i,r){const a=super.parsePrimitiveData(t,n,i,r);for(let s=0;s<a.length;s++)a[s]._custom=this.resolveDataElementOptions(s+i).radius;return a}parseArrayData(t,n,i,r){const a=super.parseArrayData(t,n,i,r);for(let s=0;s<a.length;s++){const o=n[i+s];a[s]._custom=H(o[2],this.resolveDataElementOptions(s+i).radius)}return a}parseObjectData(t,n,i,r){const a=super.parseObjectData(t,n,i,r);for(let s=0;s<a.length;s++){const o=n[i+s];a[s]._custom=H(o&&o.r&&+o.r,this.resolveDataElementOptions(s+i).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let i=t.length-1;i>=0;--i)n=Math.max(n,t[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:a}=n,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 n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,i,r){const a=r==="reset",{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,r),u=s.axis,d=o.axis;for(let h=n;h<n+i;h++){const f=t[h],p=!a&&this.getParsed(h),y={},b=y[u]=a?s.getPixelForDecimal(.5):s.getPixelForValue(p[u]),m=y[d]=a?o.getBasePixel():o.getPixelForValue(p[d]);y.skip=isNaN(b)||isNaN(m),c&&(y.options=l||this.resolveDataElementOptions(h,f.active?"active":r),a&&(y.options.radius=0)),this.updateElement(f,h,y,r)}}resolveDataElementOptions(t,n){const i=this.getParsed(t);let r=super.resolveDataElementOptions(t,n);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const a=r.radius;return n!=="active"&&(r.radius=0),r.radius+=H(i&&i._custom,a),r}}C(Zi,"id","bubble"),C(Zi,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),C(Zi,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Gp(e,t,n){let i=1,r=1,a=0,s=0;if(t<ut){const o=e,l=o+t,c=Math.cos(o),u=Math.sin(o),d=Math.cos(l),h=Math.sin(l),f=(x,w,_)=>$n(x,o,l,!0)?1:Math.max(w,w*n,_,_*n),p=(x,w,_)=>$n(x,o,l,!0)?-1:Math.min(w,w*n,_,_*n),y=f(0,c,d),b=f(dt,u,h),m=p(X,c,d),v=p(X+dt,u,h);i=(y-m)/2,r=(b-v)/2,a=-(y+m)/2,s=-(b+v)/2}return{ratioX:i,ratioY:r,offsetX:a,offsetY:s}}class Ye extends ce{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const i=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=i;else{let a=l=>+i[l];if(V(i[t])){const{key:l="value"}=this._parsing;a=c=>+Be(i[c],l)}let s,o;for(s=t,o=t+n;s<o;++s)r._parsed[s]=a(s)}}_getRotation(){return Ct(this.options.rotation-90)}_getCircumference(){return Ct(this.options.circumference)}_getRotationExtents(){let t=ut,n=-ut;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),n=Math.max(n,a+s)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:i}=n,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(cg(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:h,ratioY:f,offsetX:p,offsetY:y}=Gp(d,u,l),b=(i.width-s)/h,m=(i.height-s)/f,v=Math.max(Math.min(b,m)/2,0),x=al(this.options.radius,v),w=Math.max(x*l,0),_=(x-w)/this._getVisibleDatasetWeightTotal();this.offsetX=p*x,this.offsetY=y*x,r.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*c,0),this.updateElements(a,0,a.length,t)}_circumference(t,n){const i=this.options,r=this._cachedMeta,a=this._getCircumference();return n&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||r._parsed[t]===null||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*a/ut)}updateElements(t,n,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,h=a&&c.animateScale,f=h?0:this.innerRadius,p=h?0:this.outerRadius,{sharedOptions:y,includeOptions:b}=this._getSharedOptions(n,r);let m=this._getRotation(),v;for(v=0;v<n;++v)m+=this._circumference(v,a);for(v=n;v<n+i;++v){const x=this._circumference(v,a),w=t[v],_={x:u+this.offsetX,y:d+this.offsetY,startAngle:m,endAngle:m+x,circumference:x,outerRadius:p,innerRadius:f};b&&(_.options=y||this.resolveDataElementOptions(v,w.active?"active":r)),m+=x,this.updateElement(w,v,_,r)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let i=0,r;for(r=0;r<n.length;r++){const a=t._parsed[r];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(r)&&!n[r].hidden&&(i+=Math.abs(a))}return i}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?ut*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=Gn(n._parsed[t],i.options.locale);return{label:r[t]||"",value:a}}getMaxBorderWidth(t){let n=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"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let i=0,r=t.length;i<r;++i){const a=this.resolveDataElementOptions(i);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(n+=this._getRingWeight(i));return n}_getRingWeight(t){return Math.max(H(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}C(Ye,"id","doughnut"),C(Ye,"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"}),C(Ye,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),C(Ye,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return n.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,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}});class ei extends ce{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:i,data:r=[],_dataset:a}=n,s=this.chart._animationsDisabled;let{start:o,count:l}=yl(n,r,s);this._drawStart=o,this._drawCount=l,vl(n)&&(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,n,i,r){const a=r==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,r),h=s.axis,f=o.axis,{spanGaps:p,segment:y}=this.options,b=Fe(p)?p:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||a||r==="none",v=n+i,x=t.length;let w=n>0&&this.getParsed(n-1);for(let _=0;_<x;++_){const T=t[_],M=m?T:{};if(_<n||_>=v){M.skip=!0;continue}const S=this.getParsed(_),D=U(S[f]),E=M[h]=s.getPixelForValue(S[h],_),k=M[f]=a||D?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,S,l):S[f],_);M.skip=isNaN(E)||isNaN(k)||D,M.stop=_>0&&Math.abs(S[h]-w[h])>b,y&&(M.parsed=S,M.raw=c.data[_]),d&&(M.options=u||this.resolveDataElementOptions(_,T.active?"active":r)),m||this.updateElement(T,_,M,r),w=S}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,i=n.options&&n.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()}}C(ei,"id","line"),C(ei,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),C(ei,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ni extends ce{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=Gn(n._parsed[t].r,i.options.locale);return{label:r[t]||"",value:a}}parseObjectData(t,n,i,r){return Ll.bind(this)(t,n,i,r)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={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<n.min&&(n.min=a),a>n.max&&(n.max=a))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,i=t.options,r=Math.min(n.right-n.left,n.bottom-n.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,n,i,r){const a=r==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,h=c.getIndexAngle(0)-.5*X;let f=h,p;const y=360/this.countVisibleElements();for(p=0;p<n;++p)f+=this._computeAngle(p,r,y);for(p=n;p<n+i;p++){const b=t[p];let m=f,v=f+this._computeAngle(p,r,y),x=s.getDataVisibility(p)?c.getDistanceFromCenterForValue(this.getParsed(p).r):0;f=v,a&&(l.animateScale&&(x=0),l.animateRotate&&(m=v=h));const w={x:u,y:d,innerRadius:0,outerRadius:x,startAngle:m,endAngle:v,options:this.resolveDataElementOptions(p,b.active?"active":r)};this.updateElement(b,p,w,r)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((i,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&n++}),n}_computeAngle(t,n,i){return this.chart.getDataVisibility(t)?Ct(this.resolveDataElementOptions(t,n).angle||i):0}}C(ni,"id","polarArea"),C(ni,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),C(ni,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return n.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,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class ba extends Ye{}C(ba,"id","pie"),C(ba,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Qi extends ce{getLabelAndValue(t){const n=this._cachedMeta.vScale,i=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(t,n,i,r){return Ll.bind(this)(t,n,i,r)}update(t){const n=this._cachedMeta,i=n.dataset,r=n.data||[],a=n.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,n,i,r){const a=this._cachedMeta.rScale,s=r==="reset";for(let o=n;o<n+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,h=s?a.yCenter:u.y,f={x:d,y:h,angle:u.angle,skip:isNaN(d)||isNaN(h),options:c};this.updateElement(l,o,f,r)}}}C(Qi,"id","radar"),C(Qi,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),C(Qi,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Ji extends ce{getLabelAndValue(t){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:a}=n,s=this.getParsed(t),o=r.getLabelForValue(s.x),l=a.getLabelForValue(s.y);return{label:i[t]||"",value:"("+o+", "+l+")"}}update(t){const n=this._cachedMeta,{data:i=[]}=n,r=this.chart._animationsDisabled;let{start:a,count:s}=yl(n,i,r);if(this._drawStart=a,this._drawCount=s,vl(n)&&(a=0,s=i.length),this.options.showLine){const{dataset:o,_dataset:l}=n;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)}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,n,i,r){const a=r==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,r),d=this.getSharedOptions(u),h=this.includeOptions(r,d),f=s.axis,p=o.axis,{spanGaps:y,segment:b}=this.options,m=Fe(y)?y:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||a||r==="none";let x=n>0&&this.getParsed(n-1);for(let w=n;w<n+i;++w){const _=t[w],T=this.getParsed(w),M=v?_:{},S=U(T[p]),D=M[f]=s.getPixelForValue(T[f],w),E=M[p]=a||S?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,T,l):T[p],w);M.skip=isNaN(D)||isNaN(E)||S,M.stop=w>0&&Math.abs(T[f]-x[f])>m,b&&(M.parsed=T,M.raw=c.data[w]),h&&(M.options=d||this.resolveDataElementOptions(w,_.active?"active":r)),v||this.updateElement(_,w,M,r),x=T}this.updateSharedOptions(d,r,u)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let o=0;for(let l=n.length-1;l>=0;--l)o=Math.max(o,n[l].size(this.resolveDataElementOptions(l))/2);return o>0&&o}const i=t.dataset,r=i.options&&i.options.borderWidth||0;if(!n.length)return r;const a=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(r,a,s)/2}}C(Ji,"id","scatter"),C(Ji,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),C(Ji,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Xp=Object.freeze({__proto__:null,BarController:ti,BubbleController:Zi,DoughnutController:Ye,LineController:ei,PieController:ba,PolarAreaController:ni,RadarController:Qi,ScatterController:Ji});function ln(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ya{constructor(t){C(this,"options");this.options=t||{}}static override(t){Object.assign(ya.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 ac={_date:ya};function Kp(e,t,n,i){const{controller:r,data:a,_sorted:s}=e,o=r._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&s&&a.length){const l=o._reversePixels?xg:Pe;if(i){if(r._sharedOptions){const c=a[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(a,t,n-u),h=l(a,t,n+u);return{lo:d.lo,hi:h.hi}}}}else return l(a,t,n)}return{lo:0,hi:a.length-1}}function ii(e,t,n,i,r){const a=e.getSortedVisibleDatasetMetas(),s=n[t];for(let o=0,l=a.length;o<l;++o){const{index:c,data:u}=a[o],{lo:d,hi:h}=Kp(a[o],t,s,r);for(let f=d;f<=h;++f){const p=u[f];p.skip||i(p,c,f)}}}function Zp(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(i,r){const a=t?Math.abs(i.x-r.x):0,s=n?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))}}function va(e,t,n,i,r){const a=[];return!r&&!e.isPointInArea(t)||ii(e,n,t,function(o,l,c){!r&&!Ee(o,e.chartArea,0)||o.inRange(t.x,t.y,i)&&a.push({element:o,datasetIndex:l,index:c})},!0),a}function Qp(e,t,n,i){let r=[];function a(s,o,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],i),{angle:d}=hl(s,{x:t.x,y:t.y});$n(d,c,u)&&r.push({element:s,datasetIndex:o,index:l})}return ii(e,n,t,a),r}function Jp(e,t,n,i,r,a){let s=[];const o=Zp(n);let l=Number.POSITIVE_INFINITY;function c(u,d,h){const f=u.inRange(t.x,t.y,r);if(i&&!f)return;const p=u.getCenterPoint(r);if(!(!!a||e.isPointInArea(p))&&!f)return;const b=o(t,p);b<l?(s=[{element:u,datasetIndex:d,index:h}],l=b):b===l&&s.push({element:u,datasetIndex:d,index:h})}return ii(e,n,t,c),s}function xa(e,t,n,i,r,a){return!a&&!e.isPointInArea(t)?[]:n==="r"&&!i?Qp(e,t,n,r):Jp(e,t,n,i,r,a)}function sc(e,t,n,i,r){const a=[],s=n==="x"?"inXRange":"inYRange";let o=!1;return ii(e,n,t,(l,c,u)=>{l[s](t[n],r)&&(a.push({element:l,datasetIndex:c,index:u}),o=o||l.inRange(t.x,t.y,r))}),i&&!o?[]:a}var tm={evaluateInteractionItems:ii,modes:{index(e,t,n,i){const r=sn(t,e),a=n.axis||"x",s=n.includeInvisible||!1,o=n.intersect?va(e,r,a,i,s):xa(e,r,a,!1,i,s),l=[];return o.length?(e.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(e,t,n,i){const r=sn(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;let o=n.intersect?va(e,r,a,i,s):xa(e,r,a,!1,i,s);if(o.length>0){const l=o[0].datasetIndex,c=e.getDatasetMeta(l).data;o=[];for(let u=0;u<c.length;++u)o.push({element:c[u],datasetIndex:l,index:u})}return o},point(e,t,n,i){const r=sn(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;return va(e,r,a,i,s)},nearest(e,t,n,i){const r=sn(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;return xa(e,r,a,n.intersect,i,s)},x(e,t,n,i){const r=sn(t,e);return sc(e,r,"x",n.intersect,i)},y(e,t,n,i){const r=sn(t,e);return sc(e,r,"y",n.intersect,i)}}};const oc=["left","top","right","bottom"];function ri(e,t){return e.filter(n=>n.pos===t)}function lc(e,t){return e.filter(n=>oc.indexOf(n.pos)===-1&&n.box.axis===t)}function ai(e,t){return e.sort((n,i)=>{const r=t?i:n,a=t?n:i;return r.weight===a.weight?r.index-a.index:r.weight-a.weight})}function em(e){const t=[];let n,i,r,a,s,o;for(n=0,i=(e||[]).length;n<i;++n)r=e[n],{position:a,options:{stack:s,stackWeight:o=1}}=r,t.push({index:n,box:r,pos:a,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&a+s,stackWeight:o});return t}function nm(e){const t={};for(const n of e){const{stack:i,pos:r,stackWeight:a}=n;if(!i||!oc.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 im(e,t){const n=nm(e),{vBoxMaxWidth:i,hBoxMaxHeight:r}=t;let a,s,o;for(a=0,s=e.length;a<s;++a){o=e[a];const{fullSize:l}=o.box,c=n[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 n}function rm(e){const t=em(e),n=ai(t.filter(c=>c.box.fullSize),!0),i=ai(ri(t,"left"),!0),r=ai(ri(t,"right")),a=ai(ri(t,"top"),!0),s=ai(ri(t,"bottom")),o=lc(t,"x"),l=lc(t,"y");return{fullSize:n,leftAndTop:i.concat(a),rightAndBottom:r.concat(l).concat(s).concat(o),chartArea:ri(t,"chartArea"),vertical:i.concat(r).concat(l),horizontal:a.concat(s).concat(o)}}function cc(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function uc(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function am(e,t,n,i){const{pos:r,box:a}=n,s=e.maxPadding;if(!V(r)){n.size&&(e[r]-=n.size);const d=i[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?a.height:a.width),n.size=d.size/d.count,e[r]+=n.size}a.getPadding&&uc(s,a.getPadding());const o=Math.max(0,t.outerWidth-cc(s,e,"left","right")),l=Math.max(0,t.outerHeight-cc(s,e,"top","bottom")),c=o!==e.w,u=l!==e.h;return e.w=o,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function sm(e){const t=e.maxPadding;function n(i){const r=Math.max(t[i]-e[i],0);return e[i]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function om(e,t){const n=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],n[s])}),a}return i(e?["left","right"]:["top","bottom"])}function si(e,t,n,i){const r=[];let a,s,o,l,c,u;for(a=0,s=e.length,c=0;a<s;++a){o=e[a],l=o.box,l.update(o.width||t.w,o.height||t.h,om(o.horizontal,t));const{same:d,other:h}=am(t,n,o,i);c|=d&&r.length,u=u||h,l.fullSize||r.push(o)}return c&&si(r,t,n,i)||u}function tr(e,t,n,i,r){e.top=n,e.left=t,e.right=t+i,e.bottom=n+r,e.width=i,e.height=r}function dc(e,t,n,i){const r=n.padding;let{x:a,y:s}=t;for(const o of e){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,h=c.size||l.height;$t(c.start)&&(s=c.start),l.fullSize?tr(l,r.left,s,n.outerWidth-r.right-r.left,h):tr(l,t.left+c.placed,s,d,h),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,h=c.size||l.width;$t(c.start)&&(a=c.start),l.fullSize?tr(l,a,r.top,h,n.outerHeight-r.bottom-r.top):tr(l,a,t.top+c.placed,h,d),c.start=a,c.placed+=d,a=l.right}}t.x=a,t.y=s}var Ut={addBox(e,t){e.boxes||(e.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(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,i){if(!e)return;const r=Pt(e.options.layout.padding),a=Math.max(t-r.width,0),s=Math.max(n-r.height,0),o=rm(e.boxes),l=o.vertical,c=o.horizontal;ot(e.boxes,y=>{typeof y.beforeLayout=="function"&&y.beforeLayout()});const u=l.reduce((y,b)=>b.box.options&&b.box.options.display===!1?y:y+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:r,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/u,hBoxMaxHeight:s/2}),h=Object.assign({},r);uc(h,Pt(i));const f=Object.assign({maxPadding:h,w:a,h:s,x:r.left,y:r.top},r),p=im(l.concat(c),d);si(o.fullSize,f,d,p),si(l,f,d,p),si(c,f,d,p)&&si(l,f,d,p),sm(f),dc(o.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,dc(o.rightAndBottom,f,d,p),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},ot(o.chartArea,y=>{const b=y.box;Object.assign(b,e.chartArea),b.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class hc{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,r){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,r?Math.floor(n/r):i)}}isAttached(t){return!0}updateConfig(t){}}class lm extends hc{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const er="$chartjs",cm={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},fc=e=>e===null||e==="";function um(e,t){const n=e.style,i=e.getAttribute("height"),r=e.getAttribute("width");if(e[er]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",fc(r)){const a=Hl(e,"width");a!==void 0&&(e.width=a)}if(fc(i))if(e.style.height==="")e.height=e.width/(t||2);else{const a=Hl(e,"height");a!==void 0&&(e.height=a)}return e}const gc=fp?{passive:!0}:!1;function dm(e,t,n){e.addEventListener(t,n,gc)}function hm(e,t,n){e.canvas.removeEventListener(t,n,gc)}function fm(e,t){const n=cm[e.type]||e.type,{x:i,y:r}=sn(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:r!==void 0?r:null}}function nr(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function gm(e,t,n){const i=e.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||nr(o.addedNodes,i),s=s&&!nr(o.removedNodes,i);s&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function pm(e,t,n){const i=e.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||nr(o.removedNodes,i),s=s&&!nr(o.addedNodes,i);s&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const oi=new Map;let pc=0;function mc(){const e=window.devicePixelRatio;e!==pc&&(pc=e,oi.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function mm(e,t){oi.size||window.addEventListener("resize",mc),oi.set(e,t)}function bm(e){oi.delete(e),oi.size||window.removeEventListener("resize",mc)}function ym(e,t,n){const i=e.canvas,r=i&&ha(i);if(!r)return;const a=bl((o,l)=>{const c=r.clientWidth;n(o,l),c<r.clientWidth&&n()},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),mm(e,a),s}function _a(e,t,n){n&&n.disconnect(),t==="resize"&&bm(e)}function vm(e,t,n){const i=e.canvas,r=bl(a=>{e.ctx!==null&&n(fm(a,e))},e);return dm(i,t,r),r}class xm extends hc{acquireContext(t,n){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(um(t,n),i):null}releaseContext(t){const n=t.canvas;if(!n[er])return!1;const i=n[er].initial;["height","width"].forEach(a=>{const s=i[a];U(s)?n.removeAttribute(a):n.setAttribute(a,s)});const r=i.style||{};return Object.keys(r).forEach(a=>{n.style[a]=r[a]}),n.width=n.width,delete n[er],!0}addEventListener(t,n,i){this.removeEventListener(t,n);const r=t.$proxies||(t.$proxies={}),s={attach:gm,detach:pm,resize:ym}[n]||vm;r[n]=s(t,n,i)}removeEventListener(t,n){const i=t.$proxies||(t.$proxies={}),r=i[n];if(!r)return;({attach:_a,detach:_a,resize:_a}[n]||hm)(t,n,r),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,r){return hp(t,n,i,r)}isAttached(t){const n=ha(t);return!!(n&&n.isConnected)}}function _m(e){return!Nl()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?lm:xm}class Nt{constructor(){C(this,"x");C(this,"y");C(this,"active",!1);C(this,"options");C(this,"$animations")}tooltipPosition(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return Fe(this.x)&&Fe(this.y)}getProps(t,n){const i=this.$animations;if(!n||!i)return this;const r={};return t.forEach(a=>{r[a]=i[a]&&i[a].active()?i[a]._to:this[a]}),r}}C(Nt,"defaults",{}),C(Nt,"defaultRoutes");function wm(e,t){const n=e.options.ticks,i=Tm(e),r=Math.min(n.maxTicksLimit||i,i),a=n.major.enabled?Sm(t):[],s=a.length,o=a[0],l=a[s-1],c=[];if(s>r)return Dm(t,c,a,s/r),c;const u=Mm(a,t,r);if(s>0){let d,h;const f=s>1?Math.round((l-o)/(s-1)):null;for(ir(t,c,u,U(f)?0:o-f,o),d=0,h=s-1;d<h;d++)ir(t,c,u,a[d],a[d+1]);return ir(t,c,u,l,U(f)?t.length:l+f),c}return ir(t,c,u),c}function Tm(e){const t=e.options.offset,n=e._tickSize(),i=e._length/n+(t?0:1),r=e._maxLength/n;return Math.floor(Math.min(i,r))}function Mm(e,t,n){const i=Cm(e),r=t.length/n;if(!i)return Math.max(r,1);const a=mg(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 Sm(e){const t=[];let n,i;for(n=0,i=e.length;n<i;n++)e[n].major&&t.push(n);return t}function Dm(e,t,n,i){let r=0,a=n[0],s;for(i=Math.ceil(i),s=0;s<e.length;s++)s===a&&(t.push(e[s]),r++,a=n[r*i])}function ir(e,t,n,i,r){const a=H(i,0),s=Math.min(H(r,e.length),e.length);let o=0,l,c,u;for(n=Math.ceil(n),r&&(l=r-i,n=l/Math.floor(l/n)),u=a;u<0;)o++,u=Math.round(a+o*n);for(c=Math.max(a,0);c<s;c++)c===u&&(t.push(e[c]),o++,u=Math.round(a+o*n))}function Cm(e){const t=e.length;let n,i;if(t<2)return!1;for(i=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==i)return!1;return i}const Pm=e=>e==="left"?"right":e==="right"?"left":e,bc=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,yc=(e,t)=>Math.min(t||e,e);function vc(e,t){const n=[],i=e.length/t,r=e.length;let a=0;for(;a<r;a+=i)n.push(e[Math.floor(a)]);return n}function Em(e,t,n){const i=e.ticks.length,r=Math.min(t,i-1),a=e._startPixel,s=e._endPixel,o=1e-6;let l=e.getPixelForTick(r),c;if(!(n&&(i===1?c=Math.max(l-a,s-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(r-1))/2,l+=r<t?c:-c,l<a-o||l>s+o)))return l}function km(e,t){ot(e,n=>{const i=n.gc,r=i.length/2;let a;if(r>t){for(a=0;a<r;++a)delete n.data[i[a]];i.splice(0,r)}})}function li(e){return e.drawTicks?e.tickLength:0}function xc(e,t){if(!e.display)return 0;const n=gt(e.font,t),i=Pt(e.padding);return(nt(e.text)?e.text.length:1)*n.lineHeight+i.height}function Om(e,t){return We(e,{scale:t,type:"scale"})}function Am(e,t,n){return We(e,{tick:n,index:t,type:"tick"})}function Rm(e,t,n){let i=na(e);return(n&&t!=="right"||!n&&t==="right")&&(i=Pm(i)),i}function Lm(e,t,n,i){const{top:r,left:a,bottom:s,right:o,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,h,f,p;const y=s-r,b=o-a;if(e.isHorizontal()){if(f=Ft(i,a,o),V(n)){const m=Object.keys(n)[0],v=n[m];p=u[m].getPixelForValue(v)+y-t}else n==="center"?p=(c.bottom+c.top)/2+y-t:p=bc(e,n,t);h=o-a}else{if(V(n)){const m=Object.keys(n)[0],v=n[m];f=u[m].getPixelForValue(v)-b+t}else n==="center"?f=(c.left+c.right)/2-b+t:f=bc(e,n,t);p=Ft(i,s,r),d=n==="left"?-dt:dt}return{titleX:f,titleY:p,maxWidth:h,rotation:d}}class cn extends Nt{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,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:i,_suggestedMax:r}=this;return t=ee(t,Number.POSITIVE_INFINITY),n=ee(n,Number.NEGATIVE_INFINITY),i=ee(i,Number.POSITIVE_INFINITY),r=ee(r,Number.NEGATIVE_INFINITY),{min:ee(t,i),max:ee(n,r),minDefined:yt(t),maxDefined:yt(n)}}getMinMax(t){let{min:n,max:i,minDefined:r,maxDefined:a}=this.getUserBounds(),s;if(r&&a)return{min:n,max:i};const o=this.getMatchingVisibleMetas();for(let l=0,c=o.length;l<c;++l)s=o[l].controller.getMinMax(this,t),r||(n=Math.min(n,s.min)),a||(i=Math.max(i,s.max));return n=a&&n>i?i:n,i=r&&n>i?n:i,{min:ee(n,ee(i,n)),max:ee(i,ee(n,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(){st(this.options.beforeUpdate,[this])}update(t,n,i){const{beginAtZero:r,grace:a,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,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=Vg(this,a,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?vc(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=wm(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,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,t=!t),this._startPixel=n,this._endPixel=i,this._reversePixels=t,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){st(this.options.afterUpdate,[this])}beforeSetDimensions(){st(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(){st(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),st(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){st(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let i,r,a;for(i=0,r=t.length;i<r;i++)a=t[i],a.label=st(n.callback,[a.value,i,t],this)}afterTickToLabelConversion(){st(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){st(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,i=yc(this.ticks.length,t.ticks.maxTicksLimit),r=n.minRotation||0,a=n.maxRotation;let s=r,o,l,c;if(!this._isVisible()||!n.display||r>=a||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,f=Rt(this.chart.width-d,0,this.maxWidth);o=t.offset?this.maxWidth/i:f/(i-1),d+6>o&&(o=f/(i-(t.offset?.5:1)),l=this.maxHeight-li(t.grid)-n.padding-xc(t.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),s=zi(Math.min(Math.asin(Rt((u.highest.height+6)/o,-1,1)),Math.asin(Rt(l/c,-1,1))-Math.asin(Rt(h/c,-1,1)))),s=Math.max(r,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){st(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){st(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:i,title:r,grid:a}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const l=xc(r,n.options.font);if(o?(t.width=this.maxWidth,t.height=li(a)+l):(t.height=this.maxHeight,t.width=li(a)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),f=i.padding*2,p=Ct(this.labelRotation),y=Math.cos(p),b=Math.sin(p);if(o){const m=i.mirror?0:b*d.width+y*h.height;t.height=Math.min(this.maxHeight,t.height+m+f)}else{const m=i.mirror?0:y*d.width+b*h.height;t.width=Math.min(this.maxWidth,t.width+m+f)}this._calculatePadding(c,u,b,y)}}this._handleMargins(),o?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,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 h=0,f=0;l?c?(h=r*t.width,f=i*n.height):(h=i*t.height,f=r*n.width):a==="start"?f=n.width:a==="end"?h=t.width:a!=="inner"&&(h=t.width/2,f=n.width/2),this.paddingLeft=Math.max((h-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-d+s)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;a==="start"?(u=0,d=t.height):a==="end"&&(u=n.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(){st(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,i;for(n=0,i=t.length;n<i;n++)U(t[n].label)&&(t.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=vc(i,n)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,i){const{ctx:r,_longestTextCache:a}=this,s=[],o=[],l=Math.floor(n/yc(n,i));let c=0,u=0,d,h,f,p,y,b,m,v,x,w,_;for(d=0;d<n;d+=l){if(p=t[d].label,y=this._resolveTickFontOptions(d),r.font=b=y.string,m=a[b]=a[b]||{data:{},gc:[]},v=y.lineHeight,x=w=0,!U(p)&&!nt(p))x=$i(r,m.data,m.gc,x,p),w=v;else if(nt(p))for(h=0,f=p.length;h<f;++h)_=p[h],!U(_)&&!nt(_)&&(x=$i(r,m.data,m.gc,x,_),w+=v);s.push(x),o.push(w),c=Math.max(x,c),u=Math.max(w,u)}km(a,n);const T=s.indexOf(c),M=o.indexOf(u),S=D=>({width:s[D]||0,height:o[D]||0});return{first:S(0),last:S(n-1),widest:S(T),highest:S(M),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return vg(this._alignToPixels?nn(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const i=n[t];return i.$context||(i.$context=Am(this.getContext(),t,i))}return this.$context||(this.$context=Om(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Ct(this.labelRotation),i=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),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 n=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),h=li(a),f=[],p=o.setContext(this.getContext()),y=p.display?p.width:0,b=y/2,m=function(W){return nn(i,W,y)};let v,x,w,_,T,M,S,D,E,k,L,q;if(s==="top")v=m(this.bottom),M=this.bottom-h,D=v-b,k=m(t.top)+b,q=t.bottom;else if(s==="bottom")v=m(this.top),k=t.top,q=m(t.bottom)-b,M=v+b,D=this.top+h;else if(s==="left")v=m(this.right),T=this.right-h,S=v-b,E=m(t.left)+b,L=t.right;else if(s==="right")v=m(this.left),E=t.left,L=m(t.right)-b,T=v+b,S=this.left+h;else if(n==="x"){if(s==="center")v=m((t.top+t.bottom)/2+.5);else if(V(s)){const W=Object.keys(s)[0],J=s[W];v=m(this.chart.scales[W].getPixelForValue(J))}k=t.top,q=t.bottom,M=v+b,D=M+h}else if(n==="y"){if(s==="center")v=m((t.left+t.right)/2);else if(V(s)){const W=Object.keys(s)[0],J=s[W];v=m(this.chart.scales[W].getPixelForValue(J))}T=v-b,S=T-h,E=t.left,L=t.right}const ct=H(r.ticks.maxTicksLimit,d),N=Math.max(1,Math.ceil(d/ct));for(x=0;x<d;x+=N){const W=this.getContext(x),J=a.setContext(W),Lt=o.setContext(W),mt=J.lineWidth,Zt=J.color,Qt=Lt.dash||[],At=Lt.dashOffset,Jt=J.tickWidth,Wt=J.tickColor,bt=J.tickBorderDash||[],oe=J.tickBorderDashOffset;w=Em(this,x,l),w!==void 0&&(_=nn(i,w,mt),c?T=S=E=L=_:M=D=k=q=_,f.push({tx1:T,ty1:M,tx2:S,ty2:D,x1:E,y1:k,x2:L,y2:q,width:mt,color:Zt,borderDash:Qt,borderDashOffset:At,tickWidth:Jt,tickColor:Wt,tickBorderDash:bt,tickBorderDashOffset:oe}))}return this._ticksLength=d,this._borderValue=v,f}_computeLabelItems(t){const n=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,h=li(i.grid),f=h+u,p=d?-u:f,y=-Ct(this.labelRotation),b=[];let m,v,x,w,_,T,M,S,D,E,k,L,q="middle";if(r==="top")T=this.bottom-p,M=this._getXAxisLabelAlignment();else if(r==="bottom")T=this.top+p,M=this._getXAxisLabelAlignment();else if(r==="left"){const N=this._getYAxisLabelAlignment(h);M=N.textAlign,_=N.x}else if(r==="right"){const N=this._getYAxisLabelAlignment(h);M=N.textAlign,_=N.x}else if(n==="x"){if(r==="center")T=(t.top+t.bottom)/2+f;else if(V(r)){const N=Object.keys(r)[0],W=r[N];T=this.chart.scales[N].getPixelForValue(W)+f}M=this._getXAxisLabelAlignment()}else if(n==="y"){if(r==="center")_=(t.left+t.right)/2-f;else if(V(r)){const N=Object.keys(r)[0],W=r[N];_=this.chart.scales[N].getPixelForValue(W)}M=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(l==="start"?q="top":l==="end"&&(q="bottom"));const ct=this._getLabelSizes();for(m=0,v=o.length;m<v;++m){x=o[m],w=x.label;const N=a.setContext(this.getContext(m));S=this.getPixelForTick(m)+a.labelOffset,D=this._resolveTickFontOptions(m),E=D.lineHeight,k=nt(w)?w.length:1;const W=k/2,J=N.color,Lt=N.textStrokeColor,mt=N.textStrokeWidth;let Zt=M;s?(_=S,M==="inner"&&(m===v-1?Zt=this.options.reverse?"left":"right":m===0?Zt=this.options.reverse?"right":"left":Zt="center"),r==="top"?c==="near"||y!==0?L=-k*E+E/2:c==="center"?L=-ct.highest.height/2-W*E+E:L=-ct.highest.height+E/2:c==="near"||y!==0?L=E/2:c==="center"?L=ct.highest.height/2-W*E:L=ct.highest.height-k*E,d&&(L*=-1),y!==0&&!N.showLabelBackdrop&&(_+=E/2*Math.sin(y))):(T=S,L=(1-k)*E/2);let Qt;if(N.showLabelBackdrop){const At=Pt(N.backdropPadding),Jt=ct.heights[m],Wt=ct.widths[m];let bt=L-At.top,oe=0-At.left;switch(q){case"middle":bt-=Jt/2;break;case"bottom":bt-=Jt;break}switch(M){case"center":oe-=Wt/2;break;case"right":oe-=Wt;break}Qt={left:oe,top:bt,width:Wt+At.width,height:Jt+At.height,color:N.backdropColor}}b.push({label:w,font:D,textOffset:L,options:{rotation:y,color:J,strokeColor:Lt,strokeWidth:mt,textAlign:Zt,textBaseline:q,translation:[_,T],backdrop:Qt}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Ct(this.labelRotation))return t==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:i,mirror:r,padding:a}}=this.options,s=this._getLabelSizes(),o=t+a,l=s.widest.width;let c,u;return n==="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)):n==="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,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:i,top:r,width:a,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,r,a,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const r=this.ticks.findIndex(a=>a.value===t);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const n=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(n.display)for(a=0,s=r.length;a<s;++a){const l=r[a];n.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.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:n,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,h;this.isHorizontal()?(c=nn(t,this.left,s)-s/2,u=nn(t,this.right,o)+o/2,d=h=l):(d=nn(t,this.top,s)-s/2,h=nn(t,this.bottom,o)+o/2,c=u=l),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,h),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&Kn(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;rn(i,c,0,u,l,o)}r&&Zn(i)}drawTitle(){const{ctx:t,options:{position:n,title:i,reverse:r}}=this;if(!i.display)return;const a=gt(i.font),s=Pt(i.padding),o=i.align;let l=a.lineHeight/2;n==="bottom"||n==="center"||V(n)?(l+=s.bottom,nt(i.text)&&(l+=a.lineHeight*(i.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:h}=Lm(this,l,n,o);rn(t,i.text,0,0,a,{color:i.color,maxWidth:d,rotation:h,textAlign:Rm(o,n,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,n=t.ticks&&t.ticks.z||0,i=H(t.grid&&t.grid.z,-1),r=H(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==cn.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:i,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let a,s;for(a=0,s=n.length;a<s;++a){const o=n[a];o[i]===this.id&&(!t||o.type===t)&&r.push(o)}return r}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return gt(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class rr{constructor(t,n,i){this.type=t,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let i;Bm(n)&&(i=this.register(n));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,Im(t,s,i),this.override&&xt.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const n=this.items,i=t.id,r=this.scope;i in n&&delete n[i],r&&i in xt[r]&&(delete xt[r][i],this.override&&delete en[i])}}function Im(e,t,n){const i=zn(Object.create(null),[n?xt.get(n):{},xt.get(t),e.defaults]);xt.set(t,i),e.defaultRoutes&&Nm(t,e.defaultRoutes),e.descriptors&&xt.describe(t,e.descriptors)}function Nm(e,t){Object.keys(t).forEach(n=>{const i=n.split("."),r=i.pop(),a=[e].concat(i).join("."),s=t[n].split("."),o=s.pop(),l=s.join(".");xt.route(a,r,l,o)})}function Bm(e){return"id"in e&&"defaults"in e}class Hm{constructor(){this.controllers=new rr(ce,"datasets",!0),this.elements=new rr(Nt,"elements"),this.plugins=new rr(Object,"plugins"),this.scales=new rr(cn,"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,n,i){[...n].forEach(r=>{const a=i||this._getRegistryForType(r);i||a.isForType(r)||a===this.plugins&&r.id?this._exec(t,a,r):ot(r,s=>{const o=i||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,n,i){const r=Jr(t);st(i["before"+r],[],i),n[t](i),st(i["after"+r],[],i)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(t))return i}return this.plugins}_get(t,n,i){const r=n.get(t);if(r===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return r}}var me=new Hm;class Fm{constructor(){this._init=[]}notify(t,n,i,r){n==="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,n,i);return n==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,n,i,r){r=r||{};for(const a of t){const s=a.plugin,o=s[i],l=[n,r,a.options];if(st(o,l,s)===!1&&r.cancelable)return!1}return!0}invalidate(){U(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const i=t&&t.config,r=H(i.options&&i.options.plugins,{}),a=Um(i);return r===!1&&!n?[]:Ym(t,a,r,n)}_notifyStateChanges(t){const n=this._oldCache||[],i=this._cache,r=(a,s)=>a.filter(o=>!s.some(l=>o.plugin.id===l.plugin.id));this._notify(r(n,i),t,"stop"),this._notify(r(i,n),t,"start")}}function Um(e){const t={},n=[],i=Object.keys(me.plugins.items);for(let a=0;a<i.length;a++)n.push(me.getPlugin(i[a]));const r=e.plugins||[];for(let a=0;a<r.length;a++){const s=r[a];n.indexOf(s)===-1&&(n.push(s),t[s.id]=!0)}return{plugins:n,localIds:t}}function Wm(e,t){return!t&&e===!1?null:e===!0?{}:e}function Ym(e,{plugins:t,localIds:n},i,r){const a=[],s=e.getContext();for(const o of t){const l=o.id,c=Wm(i[l],r);c!==null&&a.push({plugin:o,options:zm(e.config,{plugin:o,local:n[l]},c,s)})}return a}function zm(e,{plugin:t,local:n},i,r){const a=e.pluginScopeKeys(t),s=e.getOptionScopes(i,a);return n&&t.defaults&&s.push(t.defaults),e.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function wa(e,t){const n=xt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Vm(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function jm(e,t){return e===t?"_index_":"_value_"}function _c(e){if(e==="x"||e==="y"||e==="r")return e}function $m(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Ta(e,...t){if(_c(e))return e;for(const n of t){const i=n.axis||$m(n.position)||e.length>1&&_c(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function wc(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function qm(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return wc(e,"x",n[0])||wc(e,"y",n[0])}return{}}function Gm(e,t){const n=en[e.type]||{scales:{}},i=t.scales||{},r=wa(e.type,t),a=Object.create(null);return Object.keys(i).forEach(s=>{const o=i[s];if(!V(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=Ta(s,o,qm(s,e),xt.scales[o.type]),c=jm(l,r),u=n.scales||{};a[s]=Vn(Object.create(null),[{axis:l},o,u[l],u[c]])}),e.data.datasets.forEach(s=>{const o=s.type||e.type,l=s.indexAxis||wa(o,t),u=(en[o]||{}).scales||{};Object.keys(u).forEach(d=>{const h=Vm(d,l),f=s[h+"AxisID"]||h;a[f]=a[f]||Object.create(null),Vn(a[f],[{axis:h},i[f],u[d]])})}),Object.keys(a).forEach(s=>{const o=a[s];Vn(o,[xt.scales[o.type],xt.scale])}),a}function Tc(e){const t=e.options||(e.options={});t.plugins=H(t.plugins,{}),t.scales=Gm(e,t)}function Mc(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Xm(e){return e=e||{},e.data=Mc(e.data),Tc(e),e}const Sc=new Map,Dc=new Set;function ar(e,t){let n=Sc.get(e);return n||(n=t(),Sc.set(e,n),Dc.add(n)),n}const ci=(e,t,n)=>{const i=Be(t,n);i!==void 0&&e.add(i)};class Km{constructor(t){this._config=Xm(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=Mc(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(),Tc(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ar(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return ar(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return ar(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,i=this.type;return ar(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const i=this._scopeCache;let r=i.get(t);return(!r||n)&&(r=new Map,i.set(t,r)),r}getOptionScopes(t,n,i){const{options:r,type:a}=this,s=this._cachedScopes(t,i),o=s.get(n);if(o)return o;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>ci(l,t,d))),u.forEach(d=>ci(l,r,d)),u.forEach(d=>ci(l,en[a]||{},d)),u.forEach(d=>ci(l,xt,d)),u.forEach(d=>ci(l,aa,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Dc.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,en[n]||{},xt.datasets[n]||{},{type:n},xt,aa]}resolveNamedOptions(t,n,i,r=[""]){const a={$shared:!0},{resolver:s,subPrefixes:o}=Cc(this._resolverCache,t,r);let l=s;if(Qm(s,n)){a.$shared=!1,i=qt(i)?i():i;const c=this.createResolver(t,i,o);l=Tn(s,i,c)}for(const c of n)a[c]=l[c];return a}createResolver(t,n,i=[""],r){const{resolver:a}=Cc(this._resolverCache,t,i);return V(n)?Tn(a,n,void 0,r):a}}function Cc(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));const r=n.join();let a=i.get(r);return a||(a={resolver:ca(t,n),subPrefixes:n.filter(o=>!o.toLowerCase().includes("hover"))},i.set(r,a)),a}const Zm=e=>V(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||qt(e[n]),!1);function Qm(e,t){const{isScriptable:n,isIndexable:i}=Pl(e);for(const r of t){const a=n(r),s=i(r),o=(s||a)&&e[r];if(a&&(qt(o)||Zm(o))||s&&nt(o))return!0}return!1}var Jm="4.3.0";const t0=["top","bottom","left","right","chartArea"];function Pc(e,t){return e==="top"||e==="bottom"||t0.indexOf(e)===-1&&t==="x"}function Ec(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function kc(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),st(n&&n.onComplete,[e],t)}function e0(e){const t=e.chart,n=t.options.animation;st(n&&n.onProgress,[e],t)}function Oc(e){return Nl()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const sr={},Ac=e=>{const t=Oc(e);return Object.values(sr).filter(n=>n.canvas===t).pop()};function n0(e,t,n){const i=Object.keys(e);for(const r of i){const a=+r;if(a>=t){const s=e[r];delete e[r],(n>0||a>t)&&(e[a+n]=s)}}}function i0(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}function r0(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}let Gt=(Ze=class{static register(...t){me.add(...t),Rc()}static unregister(...t){me.remove(...t),Rc()}constructor(t,n){const i=this.config=new Km(n),r=Oc(t),a=Ac(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||_m(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=lg(),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 Fm,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Tg(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],sr[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}ke.listen(this,"complete",kc),ke.listen(this,"progress",e0),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:r,_aspectRatio:a}=this;return U(t)?n&&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 me}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Bl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Sl(this.canvas,this.ctx),this}stop(){return ke.stop(this),this}resize(t,n){ke.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const i=this.options,r=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(r,t,n,a),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Bl(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),st(i.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ot(n,(i,r)=>{i.id=r})}buildOrUpdateScales(){const t=this.options,n=t.scales,i=this.scales,r=Object.keys(i).reduce((s,o)=>(s[o]=!1,s),{});let a=[];n&&(a=a.concat(Object.keys(n).map(s=>{const o=n[s],l=Ta(s,o),c=l==="r",u=l==="x";return{options:o,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),ot(a,s=>{const o=s.options,l=o.id,c=Ta(l,o),u=H(o.type,s.dtype);(o.position===void 0||Pc(o.position,c)!==Pc(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 h=me.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(o,t)}),ot(r,(s,o)=>{s||delete i[o]}),ot(i,s=>{Ut.configure(this,s,s.options),Ut.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((r,a)=>r.index-a.index),i>n){for(let r=n;r<i;++r)this._destroyDatasetMeta(r);t.splice(n,i-n)}this._sortedMetasets=t.slice(0).sort(Ec("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((i,r)=>{n.filter(a=>a===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=n.length;i<r;i++){const a=n[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||wa(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=me.getController(o),{datasetElementType:c,dataElementType:u}=xt.datasets[o];Object.assign(l,{dataElementType:me.getElement(u),datasetElementType:c&&me.getElement(c)}),s.controller=new l(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){ot(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const i=this._options=n.createResolver(n.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),h=!r&&a.indexOf(d)===-1;d.buildOrUpdateElements(h),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),r||ot(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ec("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){ot(this.scales,t=>{Ut.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!ll(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:a}of n){const s=i==="_removeElements"?-a:a;n0(t,r,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=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<n;a++)if(!ll(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;Ut.update(this,this.width,this.height,t);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],ot(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 n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,qt(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const i=this.getDatasetMeta(t),r={meta:i,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(n),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ke.has(this)?this.attached&&!ke.running(this)&&ke.start(this):(this.draw(),kc({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 n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,i=[];let r,a;for(r=0,a=n.length;r<a;++r){const s=n[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 n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,i=t._clip,r=!i.disabled,a=r0(t)||this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(r&&Kn(n,{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&&Zn(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Ee(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,r){const a=tm.modes[n];return typeof a=="function"?a(this,t,i,r):[]}getDatasetMeta(t){const n=this.data.datasets[t],i=this._metasets;let r=i.filter(a=>a&&a._dataset===n).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=We(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){const i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){const r=i?"show":"hide",a=this.getDatasetMeta(t),s=a.controller._resolveAnimations(void 0,r);$t(n)?(a.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(a,{visible:i}),this.update(o=>o.datasetIndex===t?r:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),ke.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Sl(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete sr[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,n=this.platform,i=(a,s)=>{n.addEventListener(this,a,s),t[a]=s},r=(a,s,o)=>{a.offsetX=s,a.offsetY=o,this._eventHandler(a)};ot(this.options.events,a=>i(a,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,i=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},r=(l,c)=>{t[l]&&(n.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)},n.isAttached(this.canvas)?o():s()}unbindEvents(){ot(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},ot(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){const r=i?"set":"remove";let a,s,o,l;for(n==="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 n=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}});!Fi(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,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(n,t),o=i?t:a(t,n);s.length&&this.updateHoverStyle(s,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}_eventHandler(t,n){const i={event:t,replay:n,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,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(a||i.changed)&&this.render(),this}_handleEvent(t,n,i){const{_active:r=[],options:a}=this,s=n,o=this._getActiveElements(t,r,i,s),l=gg(t),c=i0(t,this._lastEvent,i,l);i&&(this._lastEvent=null,st(a.onHover,[t,o,this],this),l&&st(a.onClick,[t,o,this],this));const u=!Fi(o,r);return(u||n)&&(this._active=o,this._updateHoverStyles(o,r,n)),this._lastEvent=c,u}_getActiveElements(t,n,i,r){if(t.type==="mouseout")return[];if(!i)return n;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,r)}},C(Ze,"defaults",xt),C(Ze,"instances",sr),C(Ze,"overrides",en),C(Ze,"registry",me),C(Ze,"version",Jm),C(Ze,"getChart",Ac),Ze);function Rc(){return ot(Gt.instances,e=>e._plugins.invalidate())}function a0(e,t,n){const{startAngle:i,pixelMargin:r,x:a,y:s,outerRadius:o,innerRadius:l}=t;let c=r/o;e.beginPath(),e.arc(a,s,o,i-c,n+c),l>r?(c=r/l,e.arc(a,s,l,n+c,i-c,!0)):e.arc(a,s,r,n+dt,i-dt),e.closePath(),e.clip()}function s0(e){return la(e,["outerStart","outerEnd","innerStart","innerEnd"])}function o0(e,t,n,i){const r=s0(e.options.borderRadius),a=(n-t)/2,s=Math.min(a,i*t/2),o=l=>{const c=(n-Math.min(a,l))*i/2;return Rt(l,0,Math.min(a,c))};return{outerStart:o(r.outerStart),outerEnd:o(r.outerEnd),innerStart:Rt(r.innerStart,0,s),innerEnd:Rt(r.innerEnd,0,s)}}function Dn(e,t,n,i){return{x:n+e*Math.cos(t),y:i+e*Math.sin(t)}}function or(e,t,n,i,r,a){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+i+n-c,0),h=u>0?u+i+n+c:0;let f=0;const p=r-l;if(i){const N=u>0?u-i:0,W=d>0?d-i:0,J=(N+W)/2,Lt=J!==0?p*J/(J+i):p;f=(p-Lt)/2}const y=Math.max(.001,p*d-n/X)/d,b=(p-y)/2,m=l+b+f,v=r-b-f,{outerStart:x,outerEnd:w,innerStart:_,innerEnd:T}=o0(t,h,d,v-m),M=d-x,S=d-w,D=m+x/M,E=v-w/S,k=h+_,L=h+T,q=m+_/k,ct=v-T/L;if(e.beginPath(),a){const N=(D+E)/2;if(e.arc(s,o,d,D,N),e.arc(s,o,d,N,E),w>0){const mt=Dn(S,E,s,o);e.arc(mt.x,mt.y,w,E,v+dt)}const W=Dn(L,v,s,o);if(e.lineTo(W.x,W.y),T>0){const mt=Dn(L,ct,s,o);e.arc(mt.x,mt.y,T,v+dt,ct+Math.PI)}const J=(v-T/h+(m+_/h))/2;if(e.arc(s,o,h,v-T/h,J,!0),e.arc(s,o,h,J,m+_/h,!0),_>0){const mt=Dn(k,q,s,o);e.arc(mt.x,mt.y,_,q+Math.PI,m-dt)}const Lt=Dn(M,m,s,o);if(e.lineTo(Lt.x,Lt.y),x>0){const mt=Dn(M,D,s,o);e.arc(mt.x,mt.y,x,m-dt,D)}}else{e.moveTo(s,o);const N=Math.cos(D)*d+s,W=Math.sin(D)*d+o;e.lineTo(N,W);const J=Math.cos(E)*d+s,Lt=Math.sin(E)*d+o;e.lineTo(J,Lt)}e.closePath()}function l0(e,t,n,i,r){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){or(e,t,n,i,l,r);for(let c=0;c<a;++c)e.fill();isNaN(o)||(l=s+(o%ut||ut))}return or(e,t,n,i,l,r),e.fill(),l}function c0(e,t,n,i,r){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:h}=l,f=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=h,f?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let p=t.endAngle;if(a){or(e,t,n,i,p,r);for(let y=0;y<a;++y)e.stroke();isNaN(o)||(p=s+(o%ut||ut))}f&&a0(e,t,p),a||(or(e,t,n,i,p,r),e.stroke())}class ui extends Nt{constructor(n){super();C(this,"circumference");C(this,"endAngle");C(this,"fullCircles");C(this,"innerRadius");C(this,"outerRadius");C(this,"pixelMargin");C(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,n&&Object.assign(this,n)}inRange(n,i,r){const a=this.getProps(["x","y"],r),{angle:s,distance:o}=hl(a,{x:n,y:i}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),f=(this.options.spacing+this.options.borderWidth)/2,y=H(h,c-l)>=ut||$n(s,l,c),b=Ce(o,u+f,d+f);return y&&b}getCenterPoint(n){const{x:i,y:r,startAngle:a,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,d=(a+s)/2,h=(o+l+u+c)/2;return{x:i+Math.cos(d)*h,y:r+Math.sin(d)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){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>ut?Math.floor(r/ut):0,r===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*a,Math.sin(l)*a);const c=1-Math.sin(Math.min(X,r||0)),u=a*c;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,l0(n,this,u,s,o),c0(n,this,u,s,o),n.restore()}}C(ui,"id","arc"),C(ui,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),C(ui,"defaultRoutes",{backgroundColor:"backgroundColor"}),C(ui,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function Lc(e,t,n=t){e.lineCap=H(n.borderCapStyle,t.borderCapStyle),e.setLineDash(H(n.borderDash,t.borderDash)),e.lineDashOffset=H(n.borderDashOffset,t.borderDashOffset),e.lineJoin=H(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=H(n.borderWidth,t.borderWidth),e.strokeStyle=H(n.borderColor,t.borderColor)}function u0(e,t,n){e.lineTo(n.x,n.y)}function d0(e){return e.stepped?Ig:e.tension||e.cubicInterpolationMode==="monotone"?Ng:u0}function Ic(e,t,n={}){const i=e.length,{start:r=0,end:a=i-1}=n,{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 h0(e,t,n,i){const{points:r,options:a}=t,{count:s,start:o,loop:l,ilen:c}=Ic(r,n,i),u=d0(a);let{move:d=!0,reverse:h}=i||{},f,p,y;for(f=0;f<=c;++f)p=r[(o+(h?c-f:f))%s],!p.skip&&(d?(e.moveTo(p.x,p.y),d=!1):u(e,y,p,h,a.stepped),y=p);return l&&(p=r[(o+(h?c:0))%s],u(e,y,p,h,a.stepped)),!!l}function f0(e,t,n,i){const r=t.points,{count:a,start:s,ilen:o}=Ic(r,n,i),{move:l=!0,reverse:c}=i||{};let u=0,d=0,h,f,p,y,b,m;const v=w=>(s+(c?o-w:w))%a,x=()=>{y!==b&&(e.lineTo(u,b),e.lineTo(u,y),e.lineTo(u,m))};for(l&&(f=r[v(0)],e.moveTo(f.x,f.y)),h=0;h<=o;++h){if(f=r[v(h)],f.skip)continue;const w=f.x,_=f.y,T=w|0;T===p?(_<y?y=_:_>b&&(b=_),u=(d*u+w)/++d):(x(),e.lineTo(w,_),p=T,d=0,y=b=_),m=_}x()}function Ma(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?f0:h0}function g0(e){return e.stepped?gp:e.tension||e.cubicInterpolationMode==="monotone"?pp:on}function p0(e,t,n,i){let r=t._path;r||(r=t._path=new Path2D,t.path(r,n,i)&&r.closePath()),Lc(e,t.options),e.stroke(r)}function m0(e,t,n,i){const{segments:r,options:a}=t,s=Ma(t);for(const o of r)Lc(e,a,o.style),e.beginPath(),s(e,t,o,{start:n,end:n+i-1})&&e.closePath(),e.stroke()}const b0=typeof Path2D=="function";function y0(e,t,n,i){b0&&!t.options.segment?p0(e,t,n,i):m0(e,t,n,i)}class ze extends Nt{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const r=i.spanGaps?this._loop:this._fullLoop;sp(this._points,i,t,r,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=_p(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,i=t.length;return i&&n[t[i-1].end]}interpolate(t,n){const i=this.options,r=t[n],a=this.points,s=Vl(this,{property:n,start:r,end:r});if(!s.length)return;const o=[],l=g0(i);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:h}=s[c],f=a[d],p=a[h];if(f===p){o.push(f);continue}const y=Math.abs((r-f[n])/(p[n]-f[n])),b=l(f,p,y,i.stepped);b[n]=t[n],o.push(b)}return o.length===1?o[0]:o}pathSegment(t,n,i){return Ma(this)(t,this,n,i)}path(t,n,i){const r=this.segments,a=Ma(this);let s=this._loop;n=n||0,i=i||this.points.length-n;for(const o of r)s&=a(t,this,o,{start:n,end:n+i-1});return!!s}draw(t,n,i,r){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),y0(t,this,i,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}C(ze,"id","line"),C(ze,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),C(ze,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),C(ze,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Nc(e,t,n,i){const r=e.options,{[n]:a}=e.getProps([n],i);return Math.abs(t-a)<r.radius+r.hitRadius}class lr extends Nt{constructor(n){super();C(this,"parsed");C(this,"skip");C(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,i,r){const a=this.options,{x:s,y:o}=this.getProps(["x","y"],r);return Math.pow(n-s,2)+Math.pow(i-o,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(n,i){return Nc(this,n,"x",i)}inYRange(n,i){return Nc(this,n,"y",i)}getCenterPoint(n){const{x:i,y:r}=this.getProps(["x","y"],n);return{x:i,y:r}}size(n){n=n||this.options||{};let i=n.radius||0;i=Math.max(i,i&&n.hoverRadius||0);const r=i&&n.borderWidth||0;return(i+r)*2}draw(n,i){const r=this.options;this.skip||r.radius<.1||!Ee(this,i,this.size(r)/2)||(n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.fillStyle=r.backgroundColor,oa(n,r,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}C(lr,"id","point"),C(lr,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),C(lr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Bc(e,t){const{x:n,y:i,base:r,width:a,height:s}=e.getProps(["x","y","base","width","height"],t);let o,l,c,u,d;return e.horizontal?(d=s/2,o=Math.min(n,r),l=Math.max(n,r),c=i-d,u=i+d):(d=a/2,o=n-d,l=n+d,c=Math.min(i,r),u=Math.max(i,r)),{left:o,top:c,right:l,bottom:u}}function Ve(e,t,n,i){return e?0:Rt(t,n,i)}function v0(e,t,n){const i=e.options.borderWidth,r=e.borderSkipped,a=Cl(i);return{t:Ve(r.top,a.top,0,n),r:Ve(r.right,a.right,0,t),b:Ve(r.bottom,a.bottom,0,n),l:Ve(r.left,a.left,0,t)}}function x0(e,t,n){const{enableBorderRadius:i}=e.getProps(["enableBorderRadius"]),r=e.options.borderRadius,a=Ue(r),s=Math.min(t,n),o=e.borderSkipped,l=i||V(r);return{topLeft:Ve(!l||o.top||o.left,a.topLeft,0,s),topRight:Ve(!l||o.top||o.right,a.topRight,0,s),bottomLeft:Ve(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:Ve(!l||o.bottom||o.right,a.bottomRight,0,s)}}function _0(e){const t=Bc(e),n=t.right-t.left,i=t.bottom-t.top,r=v0(e,n/2,i/2),a=x0(e,n/2,i/2);return{outer:{x:t.left,y:t.top,w:n,h:i,radius:a},inner:{x:t.left+r.l,y:t.top+r.t,w:n-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 Sa(e,t,n,i){const r=t===null,a=n===null,o=e&&!(r&&a)&&Bc(e,i);return o&&(r||Ce(t,o.left,o.right))&&(a||Ce(n,o.top,o.bottom))}function w0(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function T0(e,t){e.rect(t.x,t.y,t.w,t.h)}function Da(e,t,n={}){const i=e.x!==n.x?-t:0,r=e.y!==n.y?-t:0,a=(e.x+e.w!==n.x+n.w?t:0)-i,s=(e.y+e.h!==n.y+n.h?t:0)-r;return{x:e.x+i,y:e.y+r,w:e.w+a,h:e.h+s,radius:e.radius}}class cr extends Nt{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:n,options:{borderColor:i,backgroundColor:r}}=this,{inner:a,outer:s}=_0(this),o=w0(s.radius)?wn:T0;t.save(),(s.w!==a.w||s.h!==a.h)&&(t.beginPath(),o(t,Da(s,n,a)),t.clip(),o(t,Da(a,-n,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,Da(a,n)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,n,i){return Sa(this,t,n,i)}inXRange(t,n){return Sa(this,t,null,n)}inYRange(t,n){return Sa(this,null,t,n)}getCenterPoint(t){const{x:n,y:i,base:r,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(n+r)/2:n,y:a?i:(i+r)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}C(cr,"id","bar"),C(cr,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),C(cr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var M0=Object.freeze({__proto__:null,ArcElement:ui,BarElement:cr,LineElement:ze,PointElement:lr});const Ca=["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)"],Hc=Ca.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function Fc(e){return Ca[e%Ca.length]}function Uc(e){return Hc[e%Hc.length]}function S0(e,t){return e.borderColor=Fc(t),e.backgroundColor=Uc(t),++t}function D0(e,t){return e.backgroundColor=e.data.map(()=>Fc(t++)),t}function C0(e,t){return e.backgroundColor=e.data.map(()=>Uc(t++)),t}function P0(e){let t=0;return(n,i)=>{const r=e.getDatasetMeta(i).controller;r instanceof Ye?t=D0(n,t):r instanceof ni?t=C0(n,t):r&&(t=S0(n,t))}}function Wc(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function E0(e){return e&&(e.borderColor||e.backgroundColor)}var k0={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:i},options:r}=e.config,{elements:a}=r;if(!n.forceOverride&&(Wc(i)||E0(r)||a&&Wc(a)))return;const s=P0(e);i.forEach(s)}};function O0(e,t,n,i,r){const a=r.samples||i;if(a>=n)return e.slice(t,t+n);const s=[],o=(n-2)/(a-2);let l=0;const c=t+n-1;let u=t,d,h,f,p,y;for(s[l++]=e[u],d=0;d<a-2;d++){let b=0,m=0,v;const x=Math.floor((d+1)*o)+1+t,w=Math.min(Math.floor((d+2)*o)+1,n)+t,_=w-x;for(v=x;v<w;v++)b+=e[v].x,m+=e[v].y;b/=_,m/=_;const T=Math.floor(d*o)+1+t,M=Math.min(Math.floor((d+1)*o)+1,n)+t,{x:S,y:D}=e[u];for(f=p=-1,v=T;v<M;v++)p=.5*Math.abs((S-b)*(e[v].y-D)-(S-e[v].x)*(m-D)),p>f&&(f=p,h=e[v],y=v);s[l++]=h,u=y}return s[l++]=e[c],s}function A0(e,t,n,i){let r=0,a=0,s,o,l,c,u,d,h,f,p,y;const b=[],m=t+n-1,v=e[t].x,w=e[m].x-v;for(s=t;s<t+n;++s){o=e[s],l=(o.x-v)/w*i,c=o.y;const _=l|0;if(_===u)c<p?(p=c,d=s):c>y&&(y=c,h=s),r=(a*r+o.x)/++a;else{const T=s-1;if(!U(d)&&!U(h)){const M=Math.min(d,h),S=Math.max(d,h);M!==f&&M!==T&&b.push({...e[M],x:r}),S!==f&&S!==T&&b.push({...e[S],x:r})}s>0&&T!==f&&b.push(e[T]),b.push(o),u=_,a=0,p=y=c,d=h=f=s}}return b}function Yc(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function zc(e){e.data.datasets.forEach(t=>{Yc(t)})}function R0(e,t){const n=t.length;let i=0,r;const{iScale:a}=e,{min:s,max:o,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(i=Rt(Pe(t,a.axis,s).lo,0,n-1)),c?r=Rt(Pe(t,a.axis,o).hi+1,i,n)-i:r=n-i,{start:i,count:r}}var L0={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){zc(e);return}const i=e.width;e.data.datasets.forEach((r,a)=>{const{_data:s,indexAxis:o}=r,l=e.getDatasetMeta(a),c=s||r.data;if(Qn([o,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:d,count:h}=R0(l,c);const f=n.threshold||4*i;if(h<=f){Yc(r);return}U(s)&&(r._data=c,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(y){this._data=y}}));let p;switch(n.algorithm){case"lttb":p=O0(c,d,h,i,n);break;case"min-max":p=A0(c,d,h,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}r._decimated=p})},destroy(e){zc(e)}};function I0(e,t,n){const i=e.segments,r=e.points,a=t.points,s=[];for(const o of i){let{start:l,end:c}=o;c=Ea(l,c,r);const u=Pa(n,r[l],r[c],o.loop);if(!t.segments){s.push({source:o,target:u,start:r[l],end:r[c]});continue}const d=Vl(t,u);for(const h of d){const f=Pa(n,a[h.start],a[h.end],h.loop),p=zl(o,r,f);for(const y of p)s.push({source:y,target:h,start:{[n]:Vc(u,f,"start",Math.max)},end:{[n]:Vc(u,f,"end",Math.min)}})}}return s}function Pa(e,t,n,i){if(i)return;let r=t[e],a=n[e];return e==="angle"&&(r=ne(r),a=ne(a)),{property:e,start:r,end:a}}function N0(e,t){const{x:n=null,y:i=null}=e||{},r=t.points,a=[];return t.segments.forEach(({start:s,end:o})=>{o=Ea(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})):n!==null&&(a.push({x:n,y:l.y}),a.push({x:n,y:c.y}))}),a}function Ea(e,t,n){for(;t>e;t--){const i=n[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Vc(e,t,n,i){return e&&t?i(e[n],t[n]):e?e[n]:t?t[n]:0}function jc(e,t){let n=[],i=!1;return nt(e)?(i=!0,n=e):n=N0(e,t),n.length?new ze({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function $c(e){return e&&e.fill!==!1}function B0(e,t,n){let r=e[t].fill;const a=[t];let s;if(!n)return r;for(;r!==!1&&a.indexOf(r)===-1;){if(!yt(r))return r;if(s=e[r],!s)return!1;if(s.visible)return r;a.push(r),r=s.fill}return!1}function H0(e,t,n){const i=Y0(e);if(V(i))return isNaN(i.value)?!1:i;let r=parseFloat(i);return yt(r)&&Math.floor(r)===r?F0(i[0],t,r,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function F0(e,t,n,i){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=i?!1:n}function U0(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:V(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function W0(e,t,n){let i;return e==="start"?i=n:e==="end"?i=t.options.reverse?t.min:t.max:V(e)?i=e.value:i=t.getBaseValue(),i}function Y0(e){const t=e.options,n=t.fill;let i=H(n&&n.target,n);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function z0(e){const{scale:t,index:n,line:i}=e,r=[],a=i.segments,s=i.points,o=V0(t,n);o.push(jc({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++)j0(r,s[u],o)}return new ze({points:r,options:{}})}function V0(e,t){const n=[],i=e.getMatchingVisibleMetas("line");for(let r=0;r<i.length;r++){const a=i[r];if(a.index===t)break;a.hidden||n.unshift(a.dataset)}return n}function j0(e,t,n){const i=[];for(let r=0;r<n.length;r++){const a=n[r],{first:s,last:o,point:l}=$0(a,t,"x");if(!(!l||s&&o)){if(s)i.unshift(l);else if(e.push(l),!o)break}}e.push(...i)}function $0(e,t,n){const i=e.interpolate(t,n);if(!i)return{};const r=i[n],a=e.segments,s=e.points;let o=!1,l=!1;for(let c=0;c<a.length;c++){const u=a[c],d=s[u.start][n],h=s[u.end][n];if(Ce(r,d,h)){o=r===d,l=r===h;break}}return{first:o,last:l,point:i}}class qc{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,i){const{x:r,y:a,radius:s}=this;return n=n||{start:0,end:ut},t.arc(r,a,s,n.end,n.start,!0),!i.bounds}interpolate(t){const{x:n,y:i,radius:r}=this,a=t.angle;return{x:n+Math.cos(a)*r,y:i+Math.sin(a)*r,angle:a}}}function q0(e){const{chart:t,fill:n,line:i}=e;if(yt(n))return G0(t,n);if(n==="stack")return z0(e);if(n==="shape")return!0;const r=X0(e);return r instanceof qc?r:jc(r,i)}function G0(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function X0(e){return(e.scale||{}).getPointPositionForValue?Z0(e):K0(e)}function K0(e){const{scale:t={},fill:n}=e,i=U0(n,t);if(yt(i)){const r=t.isHorizontal();return{x:r?i:null,y:r?null:i}}return null}function Z0(e){const{scale:t,fill:n}=e,i=t.options,r=t.getLabels().length,a=i.reverse?t.max:t.min,s=W0(n,t,a),o=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,a);return new qc({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 ka(e,t,n){const i=q0(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&&(Kn(e,n),Q0(e,{line:r,target:i,above:u,below:d,area:n,scale:a,axis:s}),Zn(e))}function Q0(e,t){const{line:n,target:i,above:r,below:a,area:s,scale:o}=t,l=n._loop?"angle":t.axis;e.save(),l==="x"&&a!==r&&(Gc(e,i,s.top),Xc(e,{line:n,target:i,color:r,scale:o,property:l}),e.restore(),e.save(),Gc(e,i,s.bottom)),Xc(e,{line:n,target:i,color:a,scale:o,property:l}),e.restore()}function Gc(e,t,n){const{segments:i,points:r}=t;let a=!0,s=!1;e.beginPath();for(const o of i){const{start:l,end:c}=o,u=r[l],d=r[Ea(l,c,r)];a?(e.moveTo(u.x,u.y),a=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),s=!!t.pathSegment(e,o,{move:s}),s?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function Xc(e,t){const{line:n,target:i,property:r,color:a,scale:s}=t,o=I0(n,i,r);for(const{source:l,target:c,start:u,end:d}of o){const{style:{backgroundColor:h=a}={}}=l,f=i!==!0;e.save(),e.fillStyle=h,J0(e,s,f&&Pa(r,u,d)),e.beginPath();const p=!!n.pathSegment(e,l);let y;if(f){p?e.closePath():Kc(e,i,d,r);const b=!!i.pathSegment(e,c,{move:p,reverse:!0});y=p&&b,y||Kc(e,i,u,r)}e.closePath(),e.fill(y?"evenodd":"nonzero"),e.restore()}}function J0(e,t,n){const{top:i,bottom:r}=t.chart.chartArea,{property:a,start:s,end:o}=n||{};a==="x"&&(e.beginPath(),e.rect(s,i,o-s,r-i),e.clip())}function Kc(e,t,n,i){const r=t.interpolate(n,i);r&&e.lineTo(r.x,r.y)}var tb={id:"filler",afterDatasetsUpdate(e,t,n){const i=(e.data.datasets||[]).length,r=[];let a,s,o,l;for(s=0;s<i;++s)a=e.getDatasetMeta(s),o=a.dataset,l=null,o&&o.options&&o instanceof ze&&(l={visible:e.isDatasetVisible(s),index:s,fill:H0(o,s,i),chart:e,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=B0(r,s,n.propagate))},beforeDraw(e,t,n){const i=n.drawTime==="beforeDraw",r=e.getSortedVisibleDatasetMetas(),a=e.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&&ka(e.ctx,o,a))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const i=e.getSortedVisibleDatasetMetas();for(let r=i.length-1;r>=0;--r){const a=i[r].$filler;$c(a)&&ka(e.ctx,a,e.chartArea)}},beforeDatasetDraw(e,t,n){const i=t.meta.$filler;!$c(i)||n.drawTime!=="beforeDatasetDraw"||ka(e.ctx,i,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Zc=(e,t)=>{let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},eb=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Qc extends Nt{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,n,i){this.maxWidth=t,this.maxHeight=n,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 n=st(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,r)=>t.sort(i,r,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,r=gt(i.font),a=r.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=Zc(i,a);let c,u;n.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,n,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 h=-1,f=-u;return this.legendItems.forEach((p,y)=>{const b=i+n/2+a.measureText(p.text).width;(y===0||c[c.length-1]+b+2*o>s)&&(d+=u,c[c.length-(y>0?0:1)]=0,f+=u,h++),l[y]={left:0,top:f,row:h,width:b,height:r},c[c.length-1]+=b+o}),d}_fitCols(t,n,i,r){const{ctx:a,maxHeight:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=s-t;let d=o,h=0,f=0,p=0,y=0;return this.legendItems.forEach((b,m)=>{const{itemWidth:v,itemHeight:x}=nb(i,n,a,b,r);m>0&&f+x+2*o>u&&(d+=h+o,c.push({width:h,height:f}),p+=h+o,y++,h=f=0),l[m]={left:p,top:f,col:y,width:v,height:x},h=Math.max(h,v),f+=x+o}),d+=h,c.push({width:h,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:r},rtl:a}}=this,s=Sn(a,this.left,this.width);if(this.isHorizontal()){let o=0,l=Ft(i,this.left+r,this.right-this.lineWidths[o]);for(const c of n)o!==c.row&&(o=c.row,l=Ft(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=Ft(i,this.top+t+r,this.bottom-this.columnSizes[o].height);for(const c of n)c.col!==o&&(o=c.col,l=Ft(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;Kn(t,this),this._draw(),Zn(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:i,ctx:r}=this,{align:a,labels:s}=t,o=xt.color,l=Sn(t.rtl,this.left,this.width),c=gt(s.font),{padding:u}=s,d=c.size,h=d/2;let f;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;const{boxWidth:p,boxHeight:y,itemHeight:b}=Zc(s,d),m=function(T,M,S){if(isNaN(p)||p<=0||isNaN(y)||y<0)return;r.save();const D=H(S.lineWidth,1);if(r.fillStyle=H(S.fillStyle,o),r.lineCap=H(S.lineCap,"butt"),r.lineDashOffset=H(S.lineDashOffset,0),r.lineJoin=H(S.lineJoin,"miter"),r.lineWidth=D,r.strokeStyle=H(S.strokeStyle,o),r.setLineDash(H(S.lineDash,[])),s.usePointStyle){const E={radius:y*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:D},k=l.xPlus(T,p/2),L=M+h;Dl(r,E,k,L,s.pointStyleWidth&&p)}else{const E=M+Math.max((d-y)/2,0),k=l.leftForLtr(T,p),L=Ue(S.borderRadius);r.beginPath(),Object.values(L).some(q=>q!==0)?wn(r,{x:k,y:E,w:p,h:y,radius:L}):r.rect(k,E,p,y),r.fill(),D!==0&&r.stroke()}r.restore()},v=function(T,M,S){rn(r,S.text,T,M+b/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},x=this.isHorizontal(),w=this._computeTitleHeight();x?f={x:Ft(a,this.left+u,this.right-i[0]),y:this.top+u+w,line:0}:f={x:this.left+u,y:Ft(a,this.top+w+u,this.bottom-n[0].height),line:0},Fl(this.ctx,t.textDirection);const _=b+u;this.legendItems.forEach((T,M)=>{r.strokeStyle=T.fontColor,r.fillStyle=T.fontColor;const S=r.measureText(T.text).width,D=l.textAlign(T.textAlign||(T.textAlign=s.textAlign)),E=p+h+S;let k=f.x,L=f.y;l.setWidth(this.width),x?M>0&&k+E+u>this.right&&(L=f.y+=_,f.line++,k=f.x=Ft(a,this.left+u,this.right-i[f.line])):M>0&&L+_>this.bottom&&(k=f.x=k+n[f.line].width+u,f.line++,L=f.y=Ft(a,this.top+w+u,this.bottom-n[f.line].height));const q=l.x(k);if(m(q,L,T),k=Mg(D,k+p+h,x?k+E:this.right,t.rtl),v(l.x(k),L,T),x)f.x+=E+u;else if(typeof T.text!="string"){const ct=c.lineHeight;f.y+=Jc(T,ct)}else f.y+=_}),Ul(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,i=gt(n.font),r=Pt(n.padding);if(!n.display)return;const a=Sn(t.rtl,this.left,this.width),s=this.ctx,o=n.position,l=i.size/2,c=r.top+l;let u,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,d=Ft(t.align,d,this.right-h);else{const p=this.columnSizes.reduce((y,b)=>Math.max(y,b.height),0);u=c+Ft(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const f=Ft(o,d,d+h);s.textAlign=a.textAlign(na(o)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=i.string,rn(s,n.text,f,u,i)}_computeTitleHeight(){const t=this.options.title,n=gt(t.font),i=Pt(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,r,a;if(Ce(t,this.left,this.right)&&Ce(n,this.top,this.bottom)){for(a=this.legendHitBoxes,i=0;i<a.length;++i)if(r=a[i],Ce(t,r.left,r.left+r.width)&&Ce(n,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){const n=this.options;if(!ab(t.type,n))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,a=eb(r,i);r&&!a&&st(n.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!a&&st(n.onHover,[t,i,this],this)}else i&&st(n.onClick,[t,i,this],this)}}function nb(e,t,n,i,r){const a=ib(i,e,t,n),s=rb(r,i,t.lineHeight);return{itemWidth:a,itemHeight:s}}function ib(e,t,n,i){let r=e.text;return r&&typeof r!="string"&&(r=r.reduce((a,s)=>a.length>s.length?a:s)),t+n.size/2+i.measureText(r).width}function rb(e,t,n){let i=e;return typeof t.text!="string"&&(i=Jc(t,n)),i}function Jc(e,t){const n=e.text?e.text.length+.5:0;return t*n}function ab(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var sb={id:"legend",_element:Qc,start(e,t,n){const i=e.legend=new Qc({ctx:e.ctx,options:n,chart:e});Ut.configure(e,i,n),Ut.addBox(e,i)},stop(e){Ut.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const i=e.legend;Ut.configure(e,i,n),i.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const i=t.datasetIndex,r=n.chart;r.isDatasetVisible(i)?(r.hide(i),t.hidden=!0):(r.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:r,color:a,useBorderRadius:s,borderRadius:o}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Pt(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:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Oa extends Nt{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,n){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=n;const r=nt(i.text)?i.text.length:1;this._padding=Pt(i.padding);const a=r*gt(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:n,left:i,bottom:r,right:a,options:s}=this,o=s.align;let l=0,c,u,d;return this.isHorizontal()?(u=Ft(o,i,a),d=n+t,c=a-i):(s.position==="left"?(u=i+t,d=Ft(o,r,n),l=X*-.5):(u=a-t,d=Ft(o,n,r),l=X*.5),c=r-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const i=gt(n.font),a=i.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:c}=this._drawArgs(a);rn(t,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:c,textAlign:na(n.align),textBaseline:"middle",translation:[s,o]})}}function ob(e,t){const n=new Oa({ctx:e.ctx,options:t,chart:e});Ut.configure(e,n,t),Ut.addBox(e,n),e.titleBlock=n}var lb={id:"title",_element:Oa,start(e,t,n){ob(e,n)},stop(e){const t=e.titleBlock;Ut.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const i=e.titleBlock;Ut.configure(e,i,n),i.options=n},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 ur=new WeakMap;var cb={id:"subtitle",start(e,t,n){const i=new Oa({ctx:e.ctx,options:n,chart:e});Ut.configure(e,i,n),Ut.addBox(e,i),ur.set(e,i)},stop(e){Ut.removeBox(e,ur.get(e)),ur.delete(e)},beforeUpdate(e,t,n){const i=ur.get(e);Ut.configure(e,i,n),i.options=n},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 di={average(e){if(!e.length)return!1;let t,n,i=0,r=0,a=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const o=s.tooltipPosition();i+=o.x,r+=o.y,++a}}return{x:i/a,y:r/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,r=Number.POSITIVE_INFINITY,a,s,o;for(a=0,s=e.length;a<s;++a){const l=e[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=_n(t,c);u<r&&(r=u,o=l)}}if(o){const l=o.tooltipPosition();n=l.x,i=l.y}return{x:n,y:i}}};function be(e,t){return t&&(nt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Oe(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
37
|
+
*/class Mp{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,i,r){const a=n.listeners[r],s=n.duration;a.forEach(o=>o({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(i-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=ml.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=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),n+=a.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const i=n.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ke=new Mp;const ql="transparent",Sp={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const i=wl(e||ql),r=i.valid&&wl(t||ql);return r&&r.valid?r.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Dp{constructor(t,n,i,r){const a=n[i];r=Qn([t.to,r,a,t.from]);const s=Qn([t.from,a,r]);this._active=!0,this._fn=t.fn||Sp[t.type||typeof s],this._easing=qn[t.easing]||qn.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=i,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(t,n,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=Qn([t.to,n,r,t.from]),this._from=Qn([t.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=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||n<i),!this._active){this._target[r]=o,this._notify(!0);return}if(n<0){this._target[r]=a;return}l=n/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((n,i)=>{t.push({res:n,rej:i})})}_notify(t){const n=t?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][n]()}}class fa{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!j(t))return;const n=Object.keys(xt.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const a=t[r];if(!j(a))return;const s={};for(const o of n)s[o]=a[o];(nt(a.properties)&&a.properties||[r]).forEach(o=>{(o===r||!i.has(o))&&i.set(o,s)})})}_animateOptions(t,n){const i=n.options,r=Pp(t,i);if(!r)return[];const a=this._createAnimations(r,i);return i.$shared&&Cp(t.options.$animations,i).then(()=>{t.options=i},()=>{}),a}_createAnimations(t,n){const i=this._properties,r=[],a=t.$animations||(t.$animations={}),s=Object.keys(n),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,n));continue}const u=n[c];let d=a[c];const h=i.get(c);if(d)if(h&&d.active()){d.update(h,u,o);continue}else d.cancel();if(!h||!h.duration){t[c]=u;continue}a[c]=d=new Dp(h,t,c,u),r.push(d)}return r}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const i=this._createAnimations(t,n);if(i.length)return ke.add(this._chart,i),!0}}function Cp(e,t){const n=[],i=Object.keys(t);for(let r=0;r<i.length;r++){const a=e[i[r]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function Pp(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Gl(e,t){const n=e&&e.options||{},i=n.reverse,r=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:i?a:r,end:i?r:a}}function Ep(e,t,n){if(n===!1)return!1;const i=Gl(e,n),r=Gl(t,n);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function kp(e){let t,n,i,r;return j(e)?(t=e.top,n=e.right,i=e.bottom,r=e.left):t=n=i=r=e,{top:t,right:n,bottom:i,left:r,disabled:e===!1}}function Xl(e,t){const n=[],i=e._getSortedDatasetMetas(t);let r,a;for(r=0,a=i.length;r<a;++r)n.push(i[r].index);return n}function Kl(e,t,n,i={}){const r=e.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===n){if(i.all)continue;break}c=e.values[l],yt(c)&&(a||t===0||pe(t)===pe(c))&&(t+=c)}return t}}function Op(e){const t=Object.keys(e),n=new Array(t.length);let i,r,a;for(i=0,r=t.length;i<r;++i)a=t[i],n[i]={x:a,y:e[a]};return n}function Zl(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Ap(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Rp(e){const{min:t,max:n,minDefined:i,maxDefined:r}=e.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}function Lp(e,t,n){const i=e[t]||(e[t]={});return i[n]||(i[n]={})}function Ql(e,t,n,i){for(const r of t.getMatchingVisibleMetas(i).reverse()){const a=e[r.index];if(n&&a>0||!n&&a<0)return r.index}return null}function Jl(e,t){const{chart:n,_cachedMeta:i}=e,r=n._stacks||(n._stacks={}),{iScale:a,vScale:s,index:o}=i,l=a.axis,c=s.axis,u=Ap(a,s,i),d=t.length;let h;for(let f=0;f<d;++f){const p=t[f],{[l]:y,[c]:b}=p,m=p._stacks||(p._stacks={});h=m[c]=Lp(r,u,y),h[o]=b,h._top=Ql(h,s,!0,i.type),h._bottom=Ql(h,s,!1,i.type);const v=h._visualValues||(h._visualValues={});v[o]=b}}function ga(e,t){const n=e.scales;return Object.keys(n).filter(i=>n[i].axis===t).shift()}function Ip(e,t){return We(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Np(e,t,n){return We(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Jn(e,t){const n=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(const r of t){const a=r._stacks;if(!a||a[i]===void 0||a[i][n]===void 0)return;delete a[i][n],a[i]._visualValues!==void 0&&a[i]._visualValues[n]!==void 0&&delete a[i]._visualValues[n]}}}const pa=e=>e==="reset"||e==="none",tc=(e,t)=>t?e:Object.assign({},e),Bp=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Xl(n,!0),values:null};class ce{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Zl(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&&Jn(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,i=this.getDataset(),r=(d,h,f,p)=>d==="x"?h:d==="r"?p:f,a=n.xAxisID=H(i.xAxisID,ga(t,"x")),s=n.yAxisID=H(i.yAxisID,ga(t,"y")),o=n.rAxisID=H(i.rAxisID,ga(t,"r")),l=n.indexAxis,c=n.iAxisID=r(l,a,s,o),u=n.vAxisID=r(l,s,a,o);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(o),n.iScale=this.getScaleForId(c),n.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 n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&gl(this._data,this),t._stacked&&Jn(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(j(n))this._data=Op(n);else if(i!==n){if(i){gl(i,this);const r=this._cachedMeta;Jn(r),r._parsed=[]}n&&Object.isExtensible(n)&&wg(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const a=n._stacked;n._stacked=Zl(n.vScale,n),n.stack!==i.stack&&(r=!0,Jn(n),n.stack=i.stack),this._resyncElements(t),(r||a!==n._stacked)&&Jl(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:i,_data:r}=this,{iScale:a,_stacked:s}=i,o=a.axis;let l=t===0&&n===r.length?!0:i._sorted,c=t>0&&i._parsed[t-1],u,d,h;if(this._parsing===!1)i._parsed=r,i._sorted=!0,h=r;else{nt(r[t])?h=this.parseArrayData(i,r,t,n):j(r[t])?h=this.parseObjectData(i,r,t,n):h=this.parsePrimitiveData(i,r,t,n);const f=()=>d[o]===null||c&&d[o]<c[o];for(u=0;u<n;++u)i._parsed[u+t]=d=h[u],l&&(f()&&(l=!1),c=d);i._sorted=l}s&&Jl(this,h)}parsePrimitiveData(t,n,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 h,f,p;for(h=0,f=r;h<f;++h)p=h+i,d[h]={[o]:u||a.parse(c[p],p),[l]:s.parse(n[p],p)};return d}parseArrayData(t,n,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=n[u],o[l]={x:a.parse(d[0],u),y:s.parse(d[1],u)};return o}parseObjectData(t,n,i,r){const{xScale:a,yScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=new Array(r);let u,d,h,f;for(u=0,d=r;u<d;++u)h=u+i,f=n[h],c[u]={x:a.parse(Be(f,o),h),y:s.parse(Be(f,l),h)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,i){const r=this.chart,a=this._cachedMeta,s=n[t.axis],o={keys:Xl(r,!0),values:n._stacks[t.axis]._visualValues};return Kl(o,s,a.index,{mode:i})}updateRangeFromParsed(t,n,i,r){const a=i[n.axis];let s=a===null?NaN:a;const o=r&&i._stacks[n.axis];r&&o&&(r.values=o,s=Kl(r,a,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,n){const i=this._cachedMeta,r=i._parsed,a=i._sorted&&t===i.iScale,s=r.length,o=this._getOtherScale(t),l=Bp(n,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=Rp(o);let h,f;function p(){f=r[h];const y=f[o.axis];return!yt(f[t.axis])||u>y||d<y}for(h=0;h<s&&!(!p()&&(this.updateRangeFromParsed(c,t,f,l),a));++h);if(a){for(h=s-1;h>=0;--h)if(!p()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,i=[];let r,a,s;for(r=0,a=n.length;r<a;++r)s=n[r][t.axis],yt(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,i=n.iScale,r=n.vScale,a=this.getParsed(t);return{label:i?""+i.getLabelForValue(a[i.axis]):"",value:r?""+r.getLabelForValue(a[r.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=kp(H(this.options.clip,Ep(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,i=this._cachedMeta,r=i.data||[],a=n.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,n){const i=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,n,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=Np(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=Ip(this.chart.getContext(),this.index)),a.dataset=r,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=i,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",i){const r=n==="active",a=this._cachedDataOpts,s=t+"-"+n,o=a[s],l=this.enableOptionSharing&&$t(i);if(o)return tc(o,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=r?[`${t}Hover`,"hover",t,""]:[t,""],h=c.getOptionScopes(this.getDataset(),u),f=Object.keys(xt.elements[t]),p=()=>this.getContext(i,r,n),y=c.resolveNamedOptions(h,f,p,d);return y.$shared&&(y.$shared=l,a[s]=Object.freeze(tc(y,l))),y}_resolveAnimations(t,n,i){const r=this.chart,a=this._cachedDataOpts,s=`animation-${n}`,o=a[s];if(o)return o;let l;if(r.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(t,i,n))}const c=new fa(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,n){return!n||pa(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const i=this.resolveDataElementOptions(t,n),r=this._sharedOptions,a=this.getSharedOptions(i),s=this.includeOptions(n,a)||a!==r;return this.updateSharedOptions(a,n,i),{sharedOptions:a,includeOptions:s}}updateElement(t,n,i,r){pa(r)?Object.assign(t,i):this._resolveAnimations(n,r).update(t,i)}updateSharedOptions(t,n,i){t&&!pa(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,r){t.active=r;const a=this.getStyle(n,r);this._resolveAnimations(n,i,r).update(t,{options:!r&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,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 n=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=n.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,n,i=!0){const r=this._cachedMeta,a=r.data,s=t+n;let o;const l=c=>{for(c.length+=n,o=c.length-1;o>=s;o--)c[o]=c[o-n]};for(l(a),o=t;o<s;++o)a[o]=new this.dataElementType;this._parsing&&l(r._parsed),this.parse(t,n),i&&this.updateElements(a,t,n,"reset")}updateElements(t,n,i,r){}_removeElements(t,n){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(t,n);i._stacked&&Jn(i,r)}i.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,i,r]=t;this[n](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,n){n&&this._sync(["_removeElements",t,n]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}C(ce,"defaults",{}),C(ce,"datasetElementType",null),C(ce,"dataElementType",null);function Hp(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let i=[];for(let r=0,a=n.length;r<a;r++)i=i.concat(n[r].controller.getAllParsedValues(e));e._cache.$bar=pl(i.sort((r,a)=>r-a))}return e._cache.$bar}function Fp(e){const t=e.iScale,n=Hp(t,e.type);let i=t._length,r,a,s,o;const l=()=>{s===32767||s===-32768||($t(o)&&(i=Math.min(i,Math.abs(s-o)||i)),o=s)};for(r=0,a=n.length;r<a;++r)s=t.getPixelForValue(n[r]),l();for(o=void 0,r=0,a=t.ticks.length;r<a;++r)s=t.getPixelForTick(r),l();return i}function Up(e,t,n,i){const r=n.barThickness;let a,s;return U(r)?(a=t.min*n.categoryPercentage,s=n.barPercentage):(a=r*i,s=1),{chunk:a/i,ratio:s,start:t.pixels[e]-a/2}}function Wp(e,t,n,i){const r=t.pixels,a=r[e];let s=e>0?r[e-1]:null,o=e<r.length-1?r[e+1]:null;const l=n.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:n.barPercentage,start:c}}function Yp(e,t,n,i){const r=n.parse(e[0],i),a=n.parse(e[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[n.axis]=c,t._custom={barStart:l,barEnd:c,start:r,end:a,min:s,max:o}}function ec(e,t,n,i){return nt(e)?Yp(e,t,n,i):t[n.axis]=n.parse(e,i),t}function nc(e,t,n,i){const r=e.iScale,a=e.vScale,s=r.getLabels(),o=r===a,l=[];let c,u,d,h;for(c=n,u=n+i;c<u;++c)h=t[c],d={},d[r.axis]=o||r.parse(s[c],c),l.push(ec(h,d,a,c));return l}function ma(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function zp(e,t,n){return e!==0?pe(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function Vp(e){let t,n,i,r,a;return e.horizontal?(t=e.base>e.x,n="left",i="right"):(t=e.base<e.y,n="bottom",i="top"),t?(r="end",a="start"):(r="start",a="end"),{start:n,end:i,reverse:t,top:r,bottom:a}}function jp(e,t,n,i){let r=t.borderSkipped;const a={};if(!r){e.borderSkipped=a;return}if(r===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:o,reverse:l,top:c,bottom:u}=Vp(e);r==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===i?r=c:(n._bottom||0)===i?r=u:(a[ic(u,s,o,l)]=!0,r=c)),a[ic(r,s,o,l)]=!0,e.borderSkipped=a}function ic(e,t,n,i){return i?(e=$p(e,t,n),e=rc(e,n,t)):e=rc(e,t,n),e}function $p(e,t,n){return e===t?n:e===n?t:e}function rc(e,t,n){return e==="start"?t:e==="end"?n:e}function qp(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class ti extends ce{parsePrimitiveData(t,n,i,r){return nc(t,n,i,r)}parseArrayData(t,n,i,r){return nc(t,n,i,r)}parseObjectData(t,n,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 h,f,p,y;for(h=i,f=i+r;h<f;++h)y=n[h],p={},p[a.axis]=a.parse(Be(y,c),h),d.push(ec(Be(y,u),p,s,h));return d}updateRangeFromParsed(t,n,i,r){super.updateRangeFromParsed(t,n,i,r);const a=i._custom;a&&n===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 n=this._cachedMeta,{iScale:i,vScale:r}=n,a=this.getParsed(t),s=a._custom,o=ma(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 n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,i,r){const a=r==="reset",{index:s,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),c=o.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(n,r);for(let f=n;f<n+i;f++){const p=this.getParsed(f),y=a||U(p[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),b=this._calculateBarIndexPixels(f,u),m=(p._stacks||{})[o.axis],v={horizontal:c,base:y.base,enableBorderRadius:!m||ma(p._custom)||s===m._top||s===m._bottom,x:c?y.head:b.center,y:c?b.center:y.head,height:c?b.size:Math.abs(y.size),width:c?Math.abs(y.size):b.size};h&&(v.options=d||this.resolveDataElementOptions(f,t[f].active?"active":r));const x=v.options||t[f].options;jp(v,x,m,s),qp(v,x,u.ratio),this.updateElement(t[f],f,v,r)}}_getStacks(t,n){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(n),u=c&&c[l.vScale.axis];if(U(u)||isNaN(u))return!0};for(const l of r)if(!(n!==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,n,i){const r=this._getStacks(t,i),a=n!==void 0?r.indexOf(n):-1;return a===-1?r.length-1:a}_getRuler(){const t=this.options,n=this._cachedMeta,i=n.iScale,r=[];let a,s;for(a=0,s=n.data.length;a<s;++a)r.push(i.getPixelForValue(this.getParsed(a)[i.axis],a));const o=t.barThickness;return{min:o||Fp(n),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:n,_stacked:i,index:r},options:{base:a,minBarLength:s}}=this,o=a||0,l=this.getParsed(t),c=l._custom,u=ma(c);let d=l[n.axis],h=0,f=i?this.applyStack(n,l,i):d,p,y;f!==d&&(h=f-d,f=d),u&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&pe(d)!==pe(c.barEnd)&&(h=0),h+=d);const b=!U(a)&&!u?a:h;let m=n.getPixelForValue(b);if(this.chart.getDataVisibility(t)?p=n.getPixelForValue(h+f):p=m,y=p-m,Math.abs(y)<s){y=zp(y,n,o)*s,d===o&&(m-=y/2);const v=n.getPixelForDecimal(0),x=n.getPixelForDecimal(1),w=Math.min(v,x),_=Math.max(v,x);m=Math.max(Math.min(m,_),w),p=m+y,i&&!u&&(l._stacks[n.axis]._visualValues[r]=n.getValueForPixel(p)-n.getValueForPixel(m))}if(m===n.getPixelForValue(o)){const v=pe(y)*n.getLineWidthForValue(o)/2;m+=v,y-=v}return{size:y,base:m,head:p,center:p+y/2}}_calculateBarIndexPixels(t,n){const i=n.scale,r=this.options,a=r.skipNull,s=H(r.maxBarThickness,1/0);let o,l;if(n.grouped){const c=a?this._getStackCount(t):n.stackCount,u=r.barThickness==="flex"?Wp(t,n,r,c):Up(t,n,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,n.min*n.ratio);return{base:o-l/2,head:o+l/2,center:o,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,i=t.data,r=i.length;let a=0;for(;a<r;++a)this.getParsed(a)[n.axis]!==null&&i[a].draw(this._ctx)}}C(ti,"id","bar"),C(ti,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),C(ti,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Qi extends ce{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,i,r){const a=super.parsePrimitiveData(t,n,i,r);for(let s=0;s<a.length;s++)a[s]._custom=this.resolveDataElementOptions(s+i).radius;return a}parseArrayData(t,n,i,r){const a=super.parseArrayData(t,n,i,r);for(let s=0;s<a.length;s++){const o=n[i+s];a[s]._custom=H(o[2],this.resolveDataElementOptions(s+i).radius)}return a}parseObjectData(t,n,i,r){const a=super.parseObjectData(t,n,i,r);for(let s=0;s<a.length;s++){const o=n[i+s];a[s]._custom=H(o&&o.r&&+o.r,this.resolveDataElementOptions(s+i).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let i=t.length-1;i>=0;--i)n=Math.max(n,t[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:a}=n,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 n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,i,r){const a=r==="reset",{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,r),u=s.axis,d=o.axis;for(let h=n;h<n+i;h++){const f=t[h],p=!a&&this.getParsed(h),y={},b=y[u]=a?s.getPixelForDecimal(.5):s.getPixelForValue(p[u]),m=y[d]=a?o.getBasePixel():o.getPixelForValue(p[d]);y.skip=isNaN(b)||isNaN(m),c&&(y.options=l||this.resolveDataElementOptions(h,f.active?"active":r),a&&(y.options.radius=0)),this.updateElement(f,h,y,r)}}resolveDataElementOptions(t,n){const i=this.getParsed(t);let r=super.resolveDataElementOptions(t,n);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const a=r.radius;return n!=="active"&&(r.radius=0),r.radius+=H(i&&i._custom,a),r}}C(Qi,"id","bubble"),C(Qi,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),C(Qi,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Gp(e,t,n){let i=1,r=1,a=0,s=0;if(t<ut){const o=e,l=o+t,c=Math.cos(o),u=Math.sin(o),d=Math.cos(l),h=Math.sin(l),f=(x,w,_)=>$n(x,o,l,!0)?1:Math.max(w,w*n,_,_*n),p=(x,w,_)=>$n(x,o,l,!0)?-1:Math.min(w,w*n,_,_*n),y=f(0,c,d),b=f(dt,u,h),m=p(X,c,d),v=p(X+dt,u,h);i=(y-m)/2,r=(b-v)/2,a=-(y+m)/2,s=-(b+v)/2}return{ratioX:i,ratioY:r,offsetX:a,offsetY:s}}class Ye extends ce{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const i=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=i;else{let a=l=>+i[l];if(j(i[t])){const{key:l="value"}=this._parsing;a=c=>+Be(i[c],l)}let s,o;for(s=t,o=t+n;s<o;++s)r._parsed[s]=a(s)}}_getRotation(){return Ct(this.options.rotation-90)}_getCircumference(){return Ct(this.options.circumference)}_getRotationExtents(){let t=ut,n=-ut;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),n=Math.max(n,a+s)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:i}=n,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(cg(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:h,ratioY:f,offsetX:p,offsetY:y}=Gp(d,u,l),b=(i.width-s)/h,m=(i.height-s)/f,v=Math.max(Math.min(b,m)/2,0),x=al(this.options.radius,v),w=Math.max(x*l,0),_=(x-w)/this._getVisibleDatasetWeightTotal();this.offsetX=p*x,this.offsetY=y*x,r.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*c,0),this.updateElements(a,0,a.length,t)}_circumference(t,n){const i=this.options,r=this._cachedMeta,a=this._getCircumference();return n&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||r._parsed[t]===null||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*a/ut)}updateElements(t,n,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,h=a&&c.animateScale,f=h?0:this.innerRadius,p=h?0:this.outerRadius,{sharedOptions:y,includeOptions:b}=this._getSharedOptions(n,r);let m=this._getRotation(),v;for(v=0;v<n;++v)m+=this._circumference(v,a);for(v=n;v<n+i;++v){const x=this._circumference(v,a),w=t[v],_={x:u+this.offsetX,y:d+this.offsetY,startAngle:m,endAngle:m+x,circumference:x,outerRadius:p,innerRadius:f};b&&(_.options=y||this.resolveDataElementOptions(v,w.active?"active":r)),m+=x,this.updateElement(w,v,_,r)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let i=0,r;for(r=0;r<n.length;r++){const a=t._parsed[r];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(r)&&!n[r].hidden&&(i+=Math.abs(a))}return i}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?ut*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=Gn(n._parsed[t],i.options.locale);return{label:r[t]||"",value:a}}getMaxBorderWidth(t){let n=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"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let i=0,r=t.length;i<r;++i){const a=this.resolveDataElementOptions(i);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(n+=this._getRingWeight(i));return n}_getRingWeight(t){return Math.max(H(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}C(Ye,"id","doughnut"),C(Ye,"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"}),C(Ye,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),C(Ye,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return n.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,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}});class ei extends ce{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:i,data:r=[],_dataset:a}=n,s=this.chart._animationsDisabled;let{start:o,count:l}=yl(n,r,s);this._drawStart=o,this._drawCount=l,vl(n)&&(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,n,i,r){const a=r==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,r),h=s.axis,f=o.axis,{spanGaps:p,segment:y}=this.options,b=Fe(p)?p:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||a||r==="none",v=n+i,x=t.length;let w=n>0&&this.getParsed(n-1);for(let _=0;_<x;++_){const T=t[_],M=m?T:{};if(_<n||_>=v){M.skip=!0;continue}const D=this.getParsed(_),S=U(D[f]),P=M[h]=s.getPixelForValue(D[h],_),k=M[f]=a||S?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,D,l):D[f],_);M.skip=isNaN(P)||isNaN(k)||S,M.stop=_>0&&Math.abs(D[h]-w[h])>b,y&&(M.parsed=D,M.raw=c.data[_]),d&&(M.options=u||this.resolveDataElementOptions(_,T.active?"active":r)),m||this.updateElement(T,_,M,r),w=D}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,i=n.options&&n.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()}}C(ei,"id","line"),C(ei,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),C(ei,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ni extends ce{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=Gn(n._parsed[t].r,i.options.locale);return{label:r[t]||"",value:a}}parseObjectData(t,n,i,r){return Ll.bind(this)(t,n,i,r)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={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<n.min&&(n.min=a),a>n.max&&(n.max=a))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,i=t.options,r=Math.min(n.right-n.left,n.bottom-n.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,n,i,r){const a=r==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,h=c.getIndexAngle(0)-.5*X;let f=h,p;const y=360/this.countVisibleElements();for(p=0;p<n;++p)f+=this._computeAngle(p,r,y);for(p=n;p<n+i;p++){const b=t[p];let m=f,v=f+this._computeAngle(p,r,y),x=s.getDataVisibility(p)?c.getDistanceFromCenterForValue(this.getParsed(p).r):0;f=v,a&&(l.animateScale&&(x=0),l.animateRotate&&(m=v=h));const w={x:u,y:d,innerRadius:0,outerRadius:x,startAngle:m,endAngle:v,options:this.resolveDataElementOptions(p,b.active?"active":r)};this.updateElement(b,p,w,r)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((i,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&n++}),n}_computeAngle(t,n,i){return this.chart.getDataVisibility(t)?Ct(this.resolveDataElementOptions(t,n).angle||i):0}}C(ni,"id","polarArea"),C(ni,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),C(ni,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return n.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,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class ba extends Ye{}C(ba,"id","pie"),C(ba,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Ji extends ce{getLabelAndValue(t){const n=this._cachedMeta.vScale,i=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(t,n,i,r){return Ll.bind(this)(t,n,i,r)}update(t){const n=this._cachedMeta,i=n.dataset,r=n.data||[],a=n.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,n,i,r){const a=this._cachedMeta.rScale,s=r==="reset";for(let o=n;o<n+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,h=s?a.yCenter:u.y,f={x:d,y:h,angle:u.angle,skip:isNaN(d)||isNaN(h),options:c};this.updateElement(l,o,f,r)}}}C(Ji,"id","radar"),C(Ji,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),C(Ji,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class tr extends ce{getLabelAndValue(t){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:a}=n,s=this.getParsed(t),o=r.getLabelForValue(s.x),l=a.getLabelForValue(s.y);return{label:i[t]||"",value:"("+o+", "+l+")"}}update(t){const n=this._cachedMeta,{data:i=[]}=n,r=this.chart._animationsDisabled;let{start:a,count:s}=yl(n,i,r);if(this._drawStart=a,this._drawCount=s,vl(n)&&(a=0,s=i.length),this.options.showLine){const{dataset:o,_dataset:l}=n;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)}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,n,i,r){const a=r==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,r),d=this.getSharedOptions(u),h=this.includeOptions(r,d),f=s.axis,p=o.axis,{spanGaps:y,segment:b}=this.options,m=Fe(y)?y:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||a||r==="none";let x=n>0&&this.getParsed(n-1);for(let w=n;w<n+i;++w){const _=t[w],T=this.getParsed(w),M=v?_:{},D=U(T[p]),S=M[f]=s.getPixelForValue(T[f],w),P=M[p]=a||D?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,T,l):T[p],w);M.skip=isNaN(S)||isNaN(P)||D,M.stop=w>0&&Math.abs(T[f]-x[f])>m,b&&(M.parsed=T,M.raw=c.data[w]),h&&(M.options=d||this.resolveDataElementOptions(w,_.active?"active":r)),v||this.updateElement(_,w,M,r),x=T}this.updateSharedOptions(d,r,u)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let o=0;for(let l=n.length-1;l>=0;--l)o=Math.max(o,n[l].size(this.resolveDataElementOptions(l))/2);return o>0&&o}const i=t.dataset,r=i.options&&i.options.borderWidth||0;if(!n.length)return r;const a=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(r,a,s)/2}}C(tr,"id","scatter"),C(tr,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),C(tr,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Xp=Object.freeze({__proto__:null,BarController:ti,BubbleController:Qi,DoughnutController:Ye,LineController:ei,PieController:ba,PolarAreaController:ni,RadarController:Ji,ScatterController:tr});function ln(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ya{constructor(t){C(this,"options");this.options=t||{}}static override(t){Object.assign(ya.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 ac={_date:ya};function Kp(e,t,n,i){const{controller:r,data:a,_sorted:s}=e,o=r._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&s&&a.length){const l=o._reversePixels?xg:Pe;if(i){if(r._sharedOptions){const c=a[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(a,t,n-u),h=l(a,t,n+u);return{lo:d.lo,hi:h.hi}}}}else return l(a,t,n)}return{lo:0,hi:a.length-1}}function ii(e,t,n,i,r){const a=e.getSortedVisibleDatasetMetas(),s=n[t];for(let o=0,l=a.length;o<l;++o){const{index:c,data:u}=a[o],{lo:d,hi:h}=Kp(a[o],t,s,r);for(let f=d;f<=h;++f){const p=u[f];p.skip||i(p,c,f)}}}function Zp(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(i,r){const a=t?Math.abs(i.x-r.x):0,s=n?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))}}function va(e,t,n,i,r){const a=[];return!r&&!e.isPointInArea(t)||ii(e,n,t,function(o,l,c){!r&&!Ee(o,e.chartArea,0)||o.inRange(t.x,t.y,i)&&a.push({element:o,datasetIndex:l,index:c})},!0),a}function Qp(e,t,n,i){let r=[];function a(s,o,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],i),{angle:d}=hl(s,{x:t.x,y:t.y});$n(d,c,u)&&r.push({element:s,datasetIndex:o,index:l})}return ii(e,n,t,a),r}function Jp(e,t,n,i,r,a){let s=[];const o=Zp(n);let l=Number.POSITIVE_INFINITY;function c(u,d,h){const f=u.inRange(t.x,t.y,r);if(i&&!f)return;const p=u.getCenterPoint(r);if(!(!!a||e.isPointInArea(p))&&!f)return;const b=o(t,p);b<l?(s=[{element:u,datasetIndex:d,index:h}],l=b):b===l&&s.push({element:u,datasetIndex:d,index:h})}return ii(e,n,t,c),s}function xa(e,t,n,i,r,a){return!a&&!e.isPointInArea(t)?[]:n==="r"&&!i?Qp(e,t,n,r):Jp(e,t,n,i,r,a)}function sc(e,t,n,i,r){const a=[],s=n==="x"?"inXRange":"inYRange";let o=!1;return ii(e,n,t,(l,c,u)=>{l[s](t[n],r)&&(a.push({element:l,datasetIndex:c,index:u}),o=o||l.inRange(t.x,t.y,r))}),i&&!o?[]:a}var tm={evaluateInteractionItems:ii,modes:{index(e,t,n,i){const r=sn(t,e),a=n.axis||"x",s=n.includeInvisible||!1,o=n.intersect?va(e,r,a,i,s):xa(e,r,a,!1,i,s),l=[];return o.length?(e.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(e,t,n,i){const r=sn(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;let o=n.intersect?va(e,r,a,i,s):xa(e,r,a,!1,i,s);if(o.length>0){const l=o[0].datasetIndex,c=e.getDatasetMeta(l).data;o=[];for(let u=0;u<c.length;++u)o.push({element:c[u],datasetIndex:l,index:u})}return o},point(e,t,n,i){const r=sn(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;return va(e,r,a,i,s)},nearest(e,t,n,i){const r=sn(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;return xa(e,r,a,n.intersect,i,s)},x(e,t,n,i){const r=sn(t,e);return sc(e,r,"x",n.intersect,i)},y(e,t,n,i){const r=sn(t,e);return sc(e,r,"y",n.intersect,i)}}};const oc=["left","top","right","bottom"];function ri(e,t){return e.filter(n=>n.pos===t)}function lc(e,t){return e.filter(n=>oc.indexOf(n.pos)===-1&&n.box.axis===t)}function ai(e,t){return e.sort((n,i)=>{const r=t?i:n,a=t?n:i;return r.weight===a.weight?r.index-a.index:r.weight-a.weight})}function em(e){const t=[];let n,i,r,a,s,o;for(n=0,i=(e||[]).length;n<i;++n)r=e[n],{position:a,options:{stack:s,stackWeight:o=1}}=r,t.push({index:n,box:r,pos:a,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&a+s,stackWeight:o});return t}function nm(e){const t={};for(const n of e){const{stack:i,pos:r,stackWeight:a}=n;if(!i||!oc.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 im(e,t){const n=nm(e),{vBoxMaxWidth:i,hBoxMaxHeight:r}=t;let a,s,o;for(a=0,s=e.length;a<s;++a){o=e[a];const{fullSize:l}=o.box,c=n[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 n}function rm(e){const t=em(e),n=ai(t.filter(c=>c.box.fullSize),!0),i=ai(ri(t,"left"),!0),r=ai(ri(t,"right")),a=ai(ri(t,"top"),!0),s=ai(ri(t,"bottom")),o=lc(t,"x"),l=lc(t,"y");return{fullSize:n,leftAndTop:i.concat(a),rightAndBottom:r.concat(l).concat(s).concat(o),chartArea:ri(t,"chartArea"),vertical:i.concat(r).concat(l),horizontal:a.concat(s).concat(o)}}function cc(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function uc(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function am(e,t,n,i){const{pos:r,box:a}=n,s=e.maxPadding;if(!j(r)){n.size&&(e[r]-=n.size);const d=i[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?a.height:a.width),n.size=d.size/d.count,e[r]+=n.size}a.getPadding&&uc(s,a.getPadding());const o=Math.max(0,t.outerWidth-cc(s,e,"left","right")),l=Math.max(0,t.outerHeight-cc(s,e,"top","bottom")),c=o!==e.w,u=l!==e.h;return e.w=o,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function sm(e){const t=e.maxPadding;function n(i){const r=Math.max(t[i]-e[i],0);return e[i]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function om(e,t){const n=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],n[s])}),a}return i(e?["left","right"]:["top","bottom"])}function si(e,t,n,i){const r=[];let a,s,o,l,c,u;for(a=0,s=e.length,c=0;a<s;++a){o=e[a],l=o.box,l.update(o.width||t.w,o.height||t.h,om(o.horizontal,t));const{same:d,other:h}=am(t,n,o,i);c|=d&&r.length,u=u||h,l.fullSize||r.push(o)}return c&&si(r,t,n,i)||u}function er(e,t,n,i,r){e.top=n,e.left=t,e.right=t+i,e.bottom=n+r,e.width=i,e.height=r}function dc(e,t,n,i){const r=n.padding;let{x:a,y:s}=t;for(const o of e){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,h=c.size||l.height;$t(c.start)&&(s=c.start),l.fullSize?er(l,r.left,s,n.outerWidth-r.right-r.left,h):er(l,t.left+c.placed,s,d,h),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,h=c.size||l.width;$t(c.start)&&(a=c.start),l.fullSize?er(l,a,r.top,h,n.outerHeight-r.bottom-r.top):er(l,a,t.top+c.placed,h,d),c.start=a,c.placed+=d,a=l.right}}t.x=a,t.y=s}var Ut={addBox(e,t){e.boxes||(e.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(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,i){if(!e)return;const r=Pt(e.options.layout.padding),a=Math.max(t-r.width,0),s=Math.max(n-r.height,0),o=rm(e.boxes),l=o.vertical,c=o.horizontal;ot(e.boxes,y=>{typeof y.beforeLayout=="function"&&y.beforeLayout()});const u=l.reduce((y,b)=>b.box.options&&b.box.options.display===!1?y:y+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:r,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/u,hBoxMaxHeight:s/2}),h=Object.assign({},r);uc(h,Pt(i));const f=Object.assign({maxPadding:h,w:a,h:s,x:r.left,y:r.top},r),p=im(l.concat(c),d);si(o.fullSize,f,d,p),si(l,f,d,p),si(c,f,d,p)&&si(l,f,d,p),sm(f),dc(o.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,dc(o.rightAndBottom,f,d,p),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},ot(o.chartArea,y=>{const b=y.box;Object.assign(b,e.chartArea),b.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class hc{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,r){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,r?Math.floor(n/r):i)}}isAttached(t){return!0}updateConfig(t){}}class lm extends hc{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const nr="$chartjs",cm={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},fc=e=>e===null||e==="";function um(e,t){const n=e.style,i=e.getAttribute("height"),r=e.getAttribute("width");if(e[nr]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",fc(r)){const a=Hl(e,"width");a!==void 0&&(e.width=a)}if(fc(i))if(e.style.height==="")e.height=e.width/(t||2);else{const a=Hl(e,"height");a!==void 0&&(e.height=a)}return e}const gc=fp?{passive:!0}:!1;function dm(e,t,n){e.addEventListener(t,n,gc)}function hm(e,t,n){e.canvas.removeEventListener(t,n,gc)}function fm(e,t){const n=cm[e.type]||e.type,{x:i,y:r}=sn(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:r!==void 0?r:null}}function ir(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function gm(e,t,n){const i=e.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||ir(o.addedNodes,i),s=s&&!ir(o.removedNodes,i);s&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function pm(e,t,n){const i=e.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||ir(o.removedNodes,i),s=s&&!ir(o.addedNodes,i);s&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const oi=new Map;let pc=0;function mc(){const e=window.devicePixelRatio;e!==pc&&(pc=e,oi.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function mm(e,t){oi.size||window.addEventListener("resize",mc),oi.set(e,t)}function bm(e){oi.delete(e),oi.size||window.removeEventListener("resize",mc)}function ym(e,t,n){const i=e.canvas,r=i&&ha(i);if(!r)return;const a=bl((o,l)=>{const c=r.clientWidth;n(o,l),c<r.clientWidth&&n()},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),mm(e,a),s}function _a(e,t,n){n&&n.disconnect(),t==="resize"&&bm(e)}function vm(e,t,n){const i=e.canvas,r=bl(a=>{e.ctx!==null&&n(fm(a,e))},e);return dm(i,t,r),r}class xm extends hc{acquireContext(t,n){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(um(t,n),i):null}releaseContext(t){const n=t.canvas;if(!n[nr])return!1;const i=n[nr].initial;["height","width"].forEach(a=>{const s=i[a];U(s)?n.removeAttribute(a):n.setAttribute(a,s)});const r=i.style||{};return Object.keys(r).forEach(a=>{n.style[a]=r[a]}),n.width=n.width,delete n[nr],!0}addEventListener(t,n,i){this.removeEventListener(t,n);const r=t.$proxies||(t.$proxies={}),s={attach:gm,detach:pm,resize:ym}[n]||vm;r[n]=s(t,n,i)}removeEventListener(t,n){const i=t.$proxies||(t.$proxies={}),r=i[n];if(!r)return;({attach:_a,detach:_a,resize:_a}[n]||hm)(t,n,r),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,r){return hp(t,n,i,r)}isAttached(t){const n=ha(t);return!!(n&&n.isConnected)}}function _m(e){return!Nl()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?lm:xm}class Nt{constructor(){C(this,"x");C(this,"y");C(this,"active",!1);C(this,"options");C(this,"$animations")}tooltipPosition(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return Fe(this.x)&&Fe(this.y)}getProps(t,n){const i=this.$animations;if(!n||!i)return this;const r={};return t.forEach(a=>{r[a]=i[a]&&i[a].active()?i[a]._to:this[a]}),r}}C(Nt,"defaults",{}),C(Nt,"defaultRoutes");function wm(e,t){const n=e.options.ticks,i=Tm(e),r=Math.min(n.maxTicksLimit||i,i),a=n.major.enabled?Sm(t):[],s=a.length,o=a[0],l=a[s-1],c=[];if(s>r)return Dm(t,c,a,s/r),c;const u=Mm(a,t,r);if(s>0){let d,h;const f=s>1?Math.round((l-o)/(s-1)):null;for(rr(t,c,u,U(f)?0:o-f,o),d=0,h=s-1;d<h;d++)rr(t,c,u,a[d],a[d+1]);return rr(t,c,u,l,U(f)?t.length:l+f),c}return rr(t,c,u),c}function Tm(e){const t=e.options.offset,n=e._tickSize(),i=e._length/n+(t?0:1),r=e._maxLength/n;return Math.floor(Math.min(i,r))}function Mm(e,t,n){const i=Cm(e),r=t.length/n;if(!i)return Math.max(r,1);const a=mg(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 Sm(e){const t=[];let n,i;for(n=0,i=e.length;n<i;n++)e[n].major&&t.push(n);return t}function Dm(e,t,n,i){let r=0,a=n[0],s;for(i=Math.ceil(i),s=0;s<e.length;s++)s===a&&(t.push(e[s]),r++,a=n[r*i])}function rr(e,t,n,i,r){const a=H(i,0),s=Math.min(H(r,e.length),e.length);let o=0,l,c,u;for(n=Math.ceil(n),r&&(l=r-i,n=l/Math.floor(l/n)),u=a;u<0;)o++,u=Math.round(a+o*n);for(c=Math.max(a,0);c<s;c++)c===u&&(t.push(e[c]),o++,u=Math.round(a+o*n))}function Cm(e){const t=e.length;let n,i;if(t<2)return!1;for(i=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==i)return!1;return i}const Pm=e=>e==="left"?"right":e==="right"?"left":e,bc=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,yc=(e,t)=>Math.min(t||e,e);function vc(e,t){const n=[],i=e.length/t,r=e.length;let a=0;for(;a<r;a+=i)n.push(e[Math.floor(a)]);return n}function Em(e,t,n){const i=e.ticks.length,r=Math.min(t,i-1),a=e._startPixel,s=e._endPixel,o=1e-6;let l=e.getPixelForTick(r),c;if(!(n&&(i===1?c=Math.max(l-a,s-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(r-1))/2,l+=r<t?c:-c,l<a-o||l>s+o)))return l}function km(e,t){ot(e,n=>{const i=n.gc,r=i.length/2;let a;if(r>t){for(a=0;a<r;++a)delete n.data[i[a]];i.splice(0,r)}})}function li(e){return e.drawTicks?e.tickLength:0}function xc(e,t){if(!e.display)return 0;const n=gt(e.font,t),i=Pt(e.padding);return(nt(e.text)?e.text.length:1)*n.lineHeight+i.height}function Om(e,t){return We(e,{scale:t,type:"scale"})}function Am(e,t,n){return We(e,{tick:n,index:t,type:"tick"})}function Rm(e,t,n){let i=na(e);return(n&&t!=="right"||!n&&t==="right")&&(i=Pm(i)),i}function Lm(e,t,n,i){const{top:r,left:a,bottom:s,right:o,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,h,f,p;const y=s-r,b=o-a;if(e.isHorizontal()){if(f=Ft(i,a,o),j(n)){const m=Object.keys(n)[0],v=n[m];p=u[m].getPixelForValue(v)+y-t}else n==="center"?p=(c.bottom+c.top)/2+y-t:p=bc(e,n,t);h=o-a}else{if(j(n)){const m=Object.keys(n)[0],v=n[m];f=u[m].getPixelForValue(v)-b+t}else n==="center"?f=(c.left+c.right)/2-b+t:f=bc(e,n,t);p=Ft(i,s,r),d=n==="left"?-dt:dt}return{titleX:f,titleY:p,maxWidth:h,rotation:d}}class cn extends Nt{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,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:i,_suggestedMax:r}=this;return t=ee(t,Number.POSITIVE_INFINITY),n=ee(n,Number.NEGATIVE_INFINITY),i=ee(i,Number.POSITIVE_INFINITY),r=ee(r,Number.NEGATIVE_INFINITY),{min:ee(t,i),max:ee(n,r),minDefined:yt(t),maxDefined:yt(n)}}getMinMax(t){let{min:n,max:i,minDefined:r,maxDefined:a}=this.getUserBounds(),s;if(r&&a)return{min:n,max:i};const o=this.getMatchingVisibleMetas();for(let l=0,c=o.length;l<c;++l)s=o[l].controller.getMinMax(this,t),r||(n=Math.min(n,s.min)),a||(i=Math.max(i,s.max));return n=a&&n>i?i:n,i=r&&n>i?n:i,{min:ee(n,ee(i,n)),max:ee(i,ee(n,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(){st(this.options.beforeUpdate,[this])}update(t,n,i){const{beginAtZero:r,grace:a,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,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=Vg(this,a,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?vc(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=wm(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,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,t=!t),this._startPixel=n,this._endPixel=i,this._reversePixels=t,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){st(this.options.afterUpdate,[this])}beforeSetDimensions(){st(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(){st(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),st(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){st(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let i,r,a;for(i=0,r=t.length;i<r;i++)a=t[i],a.label=st(n.callback,[a.value,i,t],this)}afterTickToLabelConversion(){st(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){st(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,i=yc(this.ticks.length,t.ticks.maxTicksLimit),r=n.minRotation||0,a=n.maxRotation;let s=r,o,l,c;if(!this._isVisible()||!n.display||r>=a||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,f=Rt(this.chart.width-d,0,this.maxWidth);o=t.offset?this.maxWidth/i:f/(i-1),d+6>o&&(o=f/(i-(t.offset?.5:1)),l=this.maxHeight-li(t.grid)-n.padding-xc(t.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),s=Vi(Math.min(Math.asin(Rt((u.highest.height+6)/o,-1,1)),Math.asin(Rt(l/c,-1,1))-Math.asin(Rt(h/c,-1,1)))),s=Math.max(r,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){st(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){st(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:i,title:r,grid:a}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const l=xc(r,n.options.font);if(o?(t.width=this.maxWidth,t.height=li(a)+l):(t.height=this.maxHeight,t.width=li(a)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),f=i.padding*2,p=Ct(this.labelRotation),y=Math.cos(p),b=Math.sin(p);if(o){const m=i.mirror?0:b*d.width+y*h.height;t.height=Math.min(this.maxHeight,t.height+m+f)}else{const m=i.mirror?0:y*d.width+b*h.height;t.width=Math.min(this.maxWidth,t.width+m+f)}this._calculatePadding(c,u,b,y)}}this._handleMargins(),o?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,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 h=0,f=0;l?c?(h=r*t.width,f=i*n.height):(h=i*t.height,f=r*n.width):a==="start"?f=n.width:a==="end"?h=t.width:a!=="inner"&&(h=t.width/2,f=n.width/2),this.paddingLeft=Math.max((h-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-d+s)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;a==="start"?(u=0,d=t.height):a==="end"&&(u=n.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(){st(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,i;for(n=0,i=t.length;n<i;n++)U(t[n].label)&&(t.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=vc(i,n)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,i){const{ctx:r,_longestTextCache:a}=this,s=[],o=[],l=Math.floor(n/yc(n,i));let c=0,u=0,d,h,f,p,y,b,m,v,x,w,_;for(d=0;d<n;d+=l){if(p=t[d].label,y=this._resolveTickFontOptions(d),r.font=b=y.string,m=a[b]=a[b]||{data:{},gc:[]},v=y.lineHeight,x=w=0,!U(p)&&!nt(p))x=qi(r,m.data,m.gc,x,p),w=v;else if(nt(p))for(h=0,f=p.length;h<f;++h)_=p[h],!U(_)&&!nt(_)&&(x=qi(r,m.data,m.gc,x,_),w+=v);s.push(x),o.push(w),c=Math.max(x,c),u=Math.max(w,u)}km(a,n);const T=s.indexOf(c),M=o.indexOf(u),D=S=>({width:s[S]||0,height:o[S]||0});return{first:D(0),last:D(n-1),widest:D(T),highest:D(M),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return vg(this._alignToPixels?nn(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const i=n[t];return i.$context||(i.$context=Am(this.getContext(),t,i))}return this.$context||(this.$context=Om(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Ct(this.labelRotation),i=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),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 n=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),h=li(a),f=[],p=o.setContext(this.getContext()),y=p.display?p.width:0,b=y/2,m=function(Y){return nn(i,Y,y)};let v,x,w,_,T,M,D,S,P,k,L,W;if(s==="top")v=m(this.bottom),M=this.bottom-h,S=v-b,k=m(t.top)+b,W=t.bottom;else if(s==="bottom")v=m(this.top),k=t.top,W=m(t.bottom)-b,M=v+b,S=this.top+h;else if(s==="left")v=m(this.right),T=this.right-h,D=v-b,P=m(t.left)+b,L=t.right;else if(s==="right")v=m(this.left),P=t.left,L=m(t.right)-b,T=v+b,D=this.left+h;else if(n==="x"){if(s==="center")v=m((t.top+t.bottom)/2+.5);else if(j(s)){const Y=Object.keys(s)[0],J=s[Y];v=m(this.chart.scales[Y].getPixelForValue(J))}k=t.top,W=t.bottom,M=v+b,S=M+h}else if(n==="y"){if(s==="center")v=m((t.left+t.right)/2);else if(j(s)){const Y=Object.keys(s)[0],J=s[Y];v=m(this.chart.scales[Y].getPixelForValue(J))}T=v-b,D=T-h,P=t.left,L=t.right}const ct=H(r.ticks.maxTicksLimit,d),N=Math.max(1,Math.ceil(d/ct));for(x=0;x<d;x+=N){const Y=this.getContext(x),J=a.setContext(Y),Lt=o.setContext(Y),mt=J.lineWidth,Zt=J.color,Qt=Lt.dash||[],At=Lt.dashOffset,Jt=J.tickWidth,Wt=J.tickColor,bt=J.tickBorderDash||[],oe=J.tickBorderDashOffset;w=Em(this,x,l),w!==void 0&&(_=nn(i,w,mt),c?T=D=P=L=_:M=S=k=W=_,f.push({tx1:T,ty1:M,tx2:D,ty2:S,x1:P,y1:k,x2:L,y2:W,width:mt,color:Zt,borderDash:Qt,borderDashOffset:At,tickWidth:Jt,tickColor:Wt,tickBorderDash:bt,tickBorderDashOffset:oe}))}return this._ticksLength=d,this._borderValue=v,f}_computeLabelItems(t){const n=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,h=li(i.grid),f=h+u,p=d?-u:f,y=-Ct(this.labelRotation),b=[];let m,v,x,w,_,T,M,D,S,P,k,L,W="middle";if(r==="top")T=this.bottom-p,M=this._getXAxisLabelAlignment();else if(r==="bottom")T=this.top+p,M=this._getXAxisLabelAlignment();else if(r==="left"){const N=this._getYAxisLabelAlignment(h);M=N.textAlign,_=N.x}else if(r==="right"){const N=this._getYAxisLabelAlignment(h);M=N.textAlign,_=N.x}else if(n==="x"){if(r==="center")T=(t.top+t.bottom)/2+f;else if(j(r)){const N=Object.keys(r)[0],Y=r[N];T=this.chart.scales[N].getPixelForValue(Y)+f}M=this._getXAxisLabelAlignment()}else if(n==="y"){if(r==="center")_=(t.left+t.right)/2-f;else if(j(r)){const N=Object.keys(r)[0],Y=r[N];_=this.chart.scales[N].getPixelForValue(Y)}M=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(l==="start"?W="top":l==="end"&&(W="bottom"));const ct=this._getLabelSizes();for(m=0,v=o.length;m<v;++m){x=o[m],w=x.label;const N=a.setContext(this.getContext(m));D=this.getPixelForTick(m)+a.labelOffset,S=this._resolveTickFontOptions(m),P=S.lineHeight,k=nt(w)?w.length:1;const Y=k/2,J=N.color,Lt=N.textStrokeColor,mt=N.textStrokeWidth;let Zt=M;s?(_=D,M==="inner"&&(m===v-1?Zt=this.options.reverse?"left":"right":m===0?Zt=this.options.reverse?"right":"left":Zt="center"),r==="top"?c==="near"||y!==0?L=-k*P+P/2:c==="center"?L=-ct.highest.height/2-Y*P+P:L=-ct.highest.height+P/2:c==="near"||y!==0?L=P/2:c==="center"?L=ct.highest.height/2-Y*P:L=ct.highest.height-k*P,d&&(L*=-1),y!==0&&!N.showLabelBackdrop&&(_+=P/2*Math.sin(y))):(T=D,L=(1-k)*P/2);let Qt;if(N.showLabelBackdrop){const At=Pt(N.backdropPadding),Jt=ct.heights[m],Wt=ct.widths[m];let bt=L-At.top,oe=0-At.left;switch(W){case"middle":bt-=Jt/2;break;case"bottom":bt-=Jt;break}switch(M){case"center":oe-=Wt/2;break;case"right":oe-=Wt;break}Qt={left:oe,top:bt,width:Wt+At.width,height:Jt+At.height,color:N.backdropColor}}b.push({label:w,font:S,textOffset:L,options:{rotation:y,color:J,strokeColor:Lt,strokeWidth:mt,textAlign:Zt,textBaseline:W,translation:[_,T],backdrop:Qt}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Ct(this.labelRotation))return t==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:i,mirror:r,padding:a}}=this.options,s=this._getLabelSizes(),o=t+a,l=s.widest.width;let c,u;return n==="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)):n==="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,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:i,top:r,width:a,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,r,a,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const r=this.ticks.findIndex(a=>a.value===t);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const n=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(n.display)for(a=0,s=r.length;a<s;++a){const l=r[a];n.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.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:n,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,h;this.isHorizontal()?(c=nn(t,this.left,s)-s/2,u=nn(t,this.right,o)+o/2,d=h=l):(d=nn(t,this.top,s)-s/2,h=nn(t,this.bottom,o)+o/2,c=u=l),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,h),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&Kn(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;rn(i,c,0,u,l,o)}r&&Zn(i)}drawTitle(){const{ctx:t,options:{position:n,title:i,reverse:r}}=this;if(!i.display)return;const a=gt(i.font),s=Pt(i.padding),o=i.align;let l=a.lineHeight/2;n==="bottom"||n==="center"||j(n)?(l+=s.bottom,nt(i.text)&&(l+=a.lineHeight*(i.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:h}=Lm(this,l,n,o);rn(t,i.text,0,0,a,{color:i.color,maxWidth:d,rotation:h,textAlign:Rm(o,n,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,n=t.ticks&&t.ticks.z||0,i=H(t.grid&&t.grid.z,-1),r=H(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==cn.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:i,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let a,s;for(a=0,s=n.length;a<s;++a){const o=n[a];o[i]===this.id&&(!t||o.type===t)&&r.push(o)}return r}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return gt(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ar{constructor(t,n,i){this.type=t,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let i;Bm(n)&&(i=this.register(n));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,Im(t,s,i),this.override&&xt.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const n=this.items,i=t.id,r=this.scope;i in n&&delete n[i],r&&i in xt[r]&&(delete xt[r][i],this.override&&delete en[i])}}function Im(e,t,n){const i=zn(Object.create(null),[n?xt.get(n):{},xt.get(t),e.defaults]);xt.set(t,i),e.defaultRoutes&&Nm(t,e.defaultRoutes),e.descriptors&&xt.describe(t,e.descriptors)}function Nm(e,t){Object.keys(t).forEach(n=>{const i=n.split("."),r=i.pop(),a=[e].concat(i).join("."),s=t[n].split("."),o=s.pop(),l=s.join(".");xt.route(a,r,l,o)})}function Bm(e){return"id"in e&&"defaults"in e}class Hm{constructor(){this.controllers=new ar(ce,"datasets",!0),this.elements=new ar(Nt,"elements"),this.plugins=new ar(Object,"plugins"),this.scales=new ar(cn,"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,n,i){[...n].forEach(r=>{const a=i||this._getRegistryForType(r);i||a.isForType(r)||a===this.plugins&&r.id?this._exec(t,a,r):ot(r,s=>{const o=i||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,n,i){const r=Jr(t);st(i["before"+r],[],i),n[t](i),st(i["after"+r],[],i)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(t))return i}return this.plugins}_get(t,n,i){const r=n.get(t);if(r===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return r}}var me=new Hm;class Fm{constructor(){this._init=[]}notify(t,n,i,r){n==="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,n,i);return n==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,n,i,r){r=r||{};for(const a of t){const s=a.plugin,o=s[i],l=[n,r,a.options];if(st(o,l,s)===!1&&r.cancelable)return!1}return!0}invalidate(){U(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const i=t&&t.config,r=H(i.options&&i.options.plugins,{}),a=Um(i);return r===!1&&!n?[]:Ym(t,a,r,n)}_notifyStateChanges(t){const n=this._oldCache||[],i=this._cache,r=(a,s)=>a.filter(o=>!s.some(l=>o.plugin.id===l.plugin.id));this._notify(r(n,i),t,"stop"),this._notify(r(i,n),t,"start")}}function Um(e){const t={},n=[],i=Object.keys(me.plugins.items);for(let a=0;a<i.length;a++)n.push(me.getPlugin(i[a]));const r=e.plugins||[];for(let a=0;a<r.length;a++){const s=r[a];n.indexOf(s)===-1&&(n.push(s),t[s.id]=!0)}return{plugins:n,localIds:t}}function Wm(e,t){return!t&&e===!1?null:e===!0?{}:e}function Ym(e,{plugins:t,localIds:n},i,r){const a=[],s=e.getContext();for(const o of t){const l=o.id,c=Wm(i[l],r);c!==null&&a.push({plugin:o,options:zm(e.config,{plugin:o,local:n[l]},c,s)})}return a}function zm(e,{plugin:t,local:n},i,r){const a=e.pluginScopeKeys(t),s=e.getOptionScopes(i,a);return n&&t.defaults&&s.push(t.defaults),e.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function wa(e,t){const n=xt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Vm(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function jm(e,t){return e===t?"_index_":"_value_"}function _c(e){if(e==="x"||e==="y"||e==="r")return e}function $m(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Ta(e,...t){if(_c(e))return e;for(const n of t){const i=n.axis||$m(n.position)||e.length>1&&_c(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function wc(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function qm(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return wc(e,"x",n[0])||wc(e,"y",n[0])}return{}}function Gm(e,t){const n=en[e.type]||{scales:{}},i=t.scales||{},r=wa(e.type,t),a=Object.create(null);return Object.keys(i).forEach(s=>{const o=i[s];if(!j(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=Ta(s,o,qm(s,e),xt.scales[o.type]),c=jm(l,r),u=n.scales||{};a[s]=Vn(Object.create(null),[{axis:l},o,u[l],u[c]])}),e.data.datasets.forEach(s=>{const o=s.type||e.type,l=s.indexAxis||wa(o,t),u=(en[o]||{}).scales||{};Object.keys(u).forEach(d=>{const h=Vm(d,l),f=s[h+"AxisID"]||h;a[f]=a[f]||Object.create(null),Vn(a[f],[{axis:h},i[f],u[d]])})}),Object.keys(a).forEach(s=>{const o=a[s];Vn(o,[xt.scales[o.type],xt.scale])}),a}function Tc(e){const t=e.options||(e.options={});t.plugins=H(t.plugins,{}),t.scales=Gm(e,t)}function Mc(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Xm(e){return e=e||{},e.data=Mc(e.data),Tc(e),e}const Sc=new Map,Dc=new Set;function sr(e,t){let n=Sc.get(e);return n||(n=t(),Sc.set(e,n),Dc.add(n)),n}const ci=(e,t,n)=>{const i=Be(t,n);i!==void 0&&e.add(i)};class Km{constructor(t){this._config=Xm(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=Mc(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(),Tc(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return sr(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return sr(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return sr(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,i=this.type;return sr(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const i=this._scopeCache;let r=i.get(t);return(!r||n)&&(r=new Map,i.set(t,r)),r}getOptionScopes(t,n,i){const{options:r,type:a}=this,s=this._cachedScopes(t,i),o=s.get(n);if(o)return o;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>ci(l,t,d))),u.forEach(d=>ci(l,r,d)),u.forEach(d=>ci(l,en[a]||{},d)),u.forEach(d=>ci(l,xt,d)),u.forEach(d=>ci(l,aa,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Dc.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,en[n]||{},xt.datasets[n]||{},{type:n},xt,aa]}resolveNamedOptions(t,n,i,r=[""]){const a={$shared:!0},{resolver:s,subPrefixes:o}=Cc(this._resolverCache,t,r);let l=s;if(Qm(s,n)){a.$shared=!1,i=qt(i)?i():i;const c=this.createResolver(t,i,o);l=Tn(s,i,c)}for(const c of n)a[c]=l[c];return a}createResolver(t,n,i=[""],r){const{resolver:a}=Cc(this._resolverCache,t,i);return j(n)?Tn(a,n,void 0,r):a}}function Cc(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));const r=n.join();let a=i.get(r);return a||(a={resolver:ca(t,n),subPrefixes:n.filter(o=>!o.toLowerCase().includes("hover"))},i.set(r,a)),a}const Zm=e=>j(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||qt(e[n]),!1);function Qm(e,t){const{isScriptable:n,isIndexable:i}=Pl(e);for(const r of t){const a=n(r),s=i(r),o=(s||a)&&e[r];if(a&&(qt(o)||Zm(o))||s&&nt(o))return!0}return!1}var Jm="4.3.0";const t0=["top","bottom","left","right","chartArea"];function Pc(e,t){return e==="top"||e==="bottom"||t0.indexOf(e)===-1&&t==="x"}function Ec(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function kc(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),st(n&&n.onComplete,[e],t)}function e0(e){const t=e.chart,n=t.options.animation;st(n&&n.onProgress,[e],t)}function Oc(e){return Nl()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const or={},Ac=e=>{const t=Oc(e);return Object.values(or).filter(n=>n.canvas===t).pop()};function n0(e,t,n){const i=Object.keys(e);for(const r of i){const a=+r;if(a>=t){const s=e[r];delete e[r],(n>0||a>t)&&(e[a+n]=s)}}}function i0(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}function r0(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}let Gt=(Ze=class{static register(...t){me.add(...t),Rc()}static unregister(...t){me.remove(...t),Rc()}constructor(t,n){const i=this.config=new Km(n),r=Oc(t),a=Ac(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||_m(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=lg(),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 Fm,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Tg(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],or[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}ke.listen(this,"complete",kc),ke.listen(this,"progress",e0),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:r,_aspectRatio:a}=this;return U(t)?n&&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 me}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Bl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Sl(this.canvas,this.ctx),this}stop(){return ke.stop(this),this}resize(t,n){ke.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const i=this.options,r=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(r,t,n,a),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Bl(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),st(i.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ot(n,(i,r)=>{i.id=r})}buildOrUpdateScales(){const t=this.options,n=t.scales,i=this.scales,r=Object.keys(i).reduce((s,o)=>(s[o]=!1,s),{});let a=[];n&&(a=a.concat(Object.keys(n).map(s=>{const o=n[s],l=Ta(s,o),c=l==="r",u=l==="x";return{options:o,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),ot(a,s=>{const o=s.options,l=o.id,c=Ta(l,o),u=H(o.type,s.dtype);(o.position===void 0||Pc(o.position,c)!==Pc(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 h=me.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(o,t)}),ot(r,(s,o)=>{s||delete i[o]}),ot(i,s=>{Ut.configure(this,s,s.options),Ut.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((r,a)=>r.index-a.index),i>n){for(let r=n;r<i;++r)this._destroyDatasetMeta(r);t.splice(n,i-n)}this._sortedMetasets=t.slice(0).sort(Ec("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((i,r)=>{n.filter(a=>a===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=n.length;i<r;i++){const a=n[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||wa(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=me.getController(o),{datasetElementType:c,dataElementType:u}=xt.datasets[o];Object.assign(l,{dataElementType:me.getElement(u),datasetElementType:c&&me.getElement(c)}),s.controller=new l(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){ot(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const i=this._options=n.createResolver(n.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),h=!r&&a.indexOf(d)===-1;d.buildOrUpdateElements(h),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),r||ot(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ec("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){ot(this.scales,t=>{Ut.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!ll(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:a}of n){const s=i==="_removeElements"?-a:a;n0(t,r,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=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<n;a++)if(!ll(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;Ut.update(this,this.width,this.height,t);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],ot(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 n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,qt(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const i=this.getDatasetMeta(t),r={meta:i,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(n),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ke.has(this)?this.attached&&!ke.running(this)&&ke.start(this):(this.draw(),kc({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 n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,i=[];let r,a;for(r=0,a=n.length;r<a;++r){const s=n[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 n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,i=t._clip,r=!i.disabled,a=r0(t)||this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(r&&Kn(n,{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&&Zn(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Ee(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,r){const a=tm.modes[n];return typeof a=="function"?a(this,t,i,r):[]}getDatasetMeta(t){const n=this.data.datasets[t],i=this._metasets;let r=i.filter(a=>a&&a._dataset===n).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=We(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){const i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){const r=i?"show":"hide",a=this.getDatasetMeta(t),s=a.controller._resolveAnimations(void 0,r);$t(n)?(a.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(a,{visible:i}),this.update(o=>o.datasetIndex===t?r:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),ke.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Sl(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete or[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,n=this.platform,i=(a,s)=>{n.addEventListener(this,a,s),t[a]=s},r=(a,s,o)=>{a.offsetX=s,a.offsetY=o,this._eventHandler(a)};ot(this.options.events,a=>i(a,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,i=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},r=(l,c)=>{t[l]&&(n.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)},n.isAttached(this.canvas)?o():s()}unbindEvents(){ot(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},ot(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){const r=i?"set":"remove";let a,s,o,l;for(n==="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 n=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}});!Ui(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,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(n,t),o=i?t:a(t,n);s.length&&this.updateHoverStyle(s,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}_eventHandler(t,n){const i={event:t,replay:n,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,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(a||i.changed)&&this.render(),this}_handleEvent(t,n,i){const{_active:r=[],options:a}=this,s=n,o=this._getActiveElements(t,r,i,s),l=gg(t),c=i0(t,this._lastEvent,i,l);i&&(this._lastEvent=null,st(a.onHover,[t,o,this],this),l&&st(a.onClick,[t,o,this],this));const u=!Ui(o,r);return(u||n)&&(this._active=o,this._updateHoverStyles(o,r,n)),this._lastEvent=c,u}_getActiveElements(t,n,i,r){if(t.type==="mouseout")return[];if(!i)return n;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,r)}},C(Ze,"defaults",xt),C(Ze,"instances",or),C(Ze,"overrides",en),C(Ze,"registry",me),C(Ze,"version",Jm),C(Ze,"getChart",Ac),Ze);function Rc(){return ot(Gt.instances,e=>e._plugins.invalidate())}function a0(e,t,n){const{startAngle:i,pixelMargin:r,x:a,y:s,outerRadius:o,innerRadius:l}=t;let c=r/o;e.beginPath(),e.arc(a,s,o,i-c,n+c),l>r?(c=r/l,e.arc(a,s,l,n+c,i-c,!0)):e.arc(a,s,r,n+dt,i-dt),e.closePath(),e.clip()}function s0(e){return la(e,["outerStart","outerEnd","innerStart","innerEnd"])}function o0(e,t,n,i){const r=s0(e.options.borderRadius),a=(n-t)/2,s=Math.min(a,i*t/2),o=l=>{const c=(n-Math.min(a,l))*i/2;return Rt(l,0,Math.min(a,c))};return{outerStart:o(r.outerStart),outerEnd:o(r.outerEnd),innerStart:Rt(r.innerStart,0,s),innerEnd:Rt(r.innerEnd,0,s)}}function Dn(e,t,n,i){return{x:n+e*Math.cos(t),y:i+e*Math.sin(t)}}function lr(e,t,n,i,r,a){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+i+n-c,0),h=u>0?u+i+n+c:0;let f=0;const p=r-l;if(i){const N=u>0?u-i:0,Y=d>0?d-i:0,J=(N+Y)/2,Lt=J!==0?p*J/(J+i):p;f=(p-Lt)/2}const y=Math.max(.001,p*d-n/X)/d,b=(p-y)/2,m=l+b+f,v=r-b-f,{outerStart:x,outerEnd:w,innerStart:_,innerEnd:T}=o0(t,h,d,v-m),M=d-x,D=d-w,S=m+x/M,P=v-w/D,k=h+_,L=h+T,W=m+_/k,ct=v-T/L;if(e.beginPath(),a){const N=(S+P)/2;if(e.arc(s,o,d,S,N),e.arc(s,o,d,N,P),w>0){const mt=Dn(D,P,s,o);e.arc(mt.x,mt.y,w,P,v+dt)}const Y=Dn(L,v,s,o);if(e.lineTo(Y.x,Y.y),T>0){const mt=Dn(L,ct,s,o);e.arc(mt.x,mt.y,T,v+dt,ct+Math.PI)}const J=(v-T/h+(m+_/h))/2;if(e.arc(s,o,h,v-T/h,J,!0),e.arc(s,o,h,J,m+_/h,!0),_>0){const mt=Dn(k,W,s,o);e.arc(mt.x,mt.y,_,W+Math.PI,m-dt)}const Lt=Dn(M,m,s,o);if(e.lineTo(Lt.x,Lt.y),x>0){const mt=Dn(M,S,s,o);e.arc(mt.x,mt.y,x,m-dt,S)}}else{e.moveTo(s,o);const N=Math.cos(S)*d+s,Y=Math.sin(S)*d+o;e.lineTo(N,Y);const J=Math.cos(P)*d+s,Lt=Math.sin(P)*d+o;e.lineTo(J,Lt)}e.closePath()}function l0(e,t,n,i,r){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){lr(e,t,n,i,l,r);for(let c=0;c<a;++c)e.fill();isNaN(o)||(l=s+(o%ut||ut))}return lr(e,t,n,i,l,r),e.fill(),l}function c0(e,t,n,i,r){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:h}=l,f=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=h,f?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let p=t.endAngle;if(a){lr(e,t,n,i,p,r);for(let y=0;y<a;++y)e.stroke();isNaN(o)||(p=s+(o%ut||ut))}f&&a0(e,t,p),a||(lr(e,t,n,i,p,r),e.stroke())}class ui extends Nt{constructor(n){super();C(this,"circumference");C(this,"endAngle");C(this,"fullCircles");C(this,"innerRadius");C(this,"outerRadius");C(this,"pixelMargin");C(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,n&&Object.assign(this,n)}inRange(n,i,r){const a=this.getProps(["x","y"],r),{angle:s,distance:o}=hl(a,{x:n,y:i}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),f=(this.options.spacing+this.options.borderWidth)/2,y=H(h,c-l)>=ut||$n(s,l,c),b=Ce(o,u+f,d+f);return y&&b}getCenterPoint(n){const{x:i,y:r,startAngle:a,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,d=(a+s)/2,h=(o+l+u+c)/2;return{x:i+Math.cos(d)*h,y:r+Math.sin(d)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){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>ut?Math.floor(r/ut):0,r===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*a,Math.sin(l)*a);const c=1-Math.sin(Math.min(X,r||0)),u=a*c;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,l0(n,this,u,s,o),c0(n,this,u,s,o),n.restore()}}C(ui,"id","arc"),C(ui,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),C(ui,"defaultRoutes",{backgroundColor:"backgroundColor"}),C(ui,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function Lc(e,t,n=t){e.lineCap=H(n.borderCapStyle,t.borderCapStyle),e.setLineDash(H(n.borderDash,t.borderDash)),e.lineDashOffset=H(n.borderDashOffset,t.borderDashOffset),e.lineJoin=H(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=H(n.borderWidth,t.borderWidth),e.strokeStyle=H(n.borderColor,t.borderColor)}function u0(e,t,n){e.lineTo(n.x,n.y)}function d0(e){return e.stepped?Ig:e.tension||e.cubicInterpolationMode==="monotone"?Ng:u0}function Ic(e,t,n={}){const i=e.length,{start:r=0,end:a=i-1}=n,{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 h0(e,t,n,i){const{points:r,options:a}=t,{count:s,start:o,loop:l,ilen:c}=Ic(r,n,i),u=d0(a);let{move:d=!0,reverse:h}=i||{},f,p,y;for(f=0;f<=c;++f)p=r[(o+(h?c-f:f))%s],!p.skip&&(d?(e.moveTo(p.x,p.y),d=!1):u(e,y,p,h,a.stepped),y=p);return l&&(p=r[(o+(h?c:0))%s],u(e,y,p,h,a.stepped)),!!l}function f0(e,t,n,i){const r=t.points,{count:a,start:s,ilen:o}=Ic(r,n,i),{move:l=!0,reverse:c}=i||{};let u=0,d=0,h,f,p,y,b,m;const v=w=>(s+(c?o-w:w))%a,x=()=>{y!==b&&(e.lineTo(u,b),e.lineTo(u,y),e.lineTo(u,m))};for(l&&(f=r[v(0)],e.moveTo(f.x,f.y)),h=0;h<=o;++h){if(f=r[v(h)],f.skip)continue;const w=f.x,_=f.y,T=w|0;T===p?(_<y?y=_:_>b&&(b=_),u=(d*u+w)/++d):(x(),e.lineTo(w,_),p=T,d=0,y=b=_),m=_}x()}function Ma(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?f0:h0}function g0(e){return e.stepped?gp:e.tension||e.cubicInterpolationMode==="monotone"?pp:on}function p0(e,t,n,i){let r=t._path;r||(r=t._path=new Path2D,t.path(r,n,i)&&r.closePath()),Lc(e,t.options),e.stroke(r)}function m0(e,t,n,i){const{segments:r,options:a}=t,s=Ma(t);for(const o of r)Lc(e,a,o.style),e.beginPath(),s(e,t,o,{start:n,end:n+i-1})&&e.closePath(),e.stroke()}const b0=typeof Path2D=="function";function y0(e,t,n,i){b0&&!t.options.segment?p0(e,t,n,i):m0(e,t,n,i)}class ze extends Nt{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const r=i.spanGaps?this._loop:this._fullLoop;sp(this._points,i,t,r,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=_p(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,i=t.length;return i&&n[t[i-1].end]}interpolate(t,n){const i=this.options,r=t[n],a=this.points,s=Vl(this,{property:n,start:r,end:r});if(!s.length)return;const o=[],l=g0(i);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:h}=s[c],f=a[d],p=a[h];if(f===p){o.push(f);continue}const y=Math.abs((r-f[n])/(p[n]-f[n])),b=l(f,p,y,i.stepped);b[n]=t[n],o.push(b)}return o.length===1?o[0]:o}pathSegment(t,n,i){return Ma(this)(t,this,n,i)}path(t,n,i){const r=this.segments,a=Ma(this);let s=this._loop;n=n||0,i=i||this.points.length-n;for(const o of r)s&=a(t,this,o,{start:n,end:n+i-1});return!!s}draw(t,n,i,r){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),y0(t,this,i,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}C(ze,"id","line"),C(ze,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),C(ze,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),C(ze,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Nc(e,t,n,i){const r=e.options,{[n]:a}=e.getProps([n],i);return Math.abs(t-a)<r.radius+r.hitRadius}class cr extends Nt{constructor(n){super();C(this,"parsed");C(this,"skip");C(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,i,r){const a=this.options,{x:s,y:o}=this.getProps(["x","y"],r);return Math.pow(n-s,2)+Math.pow(i-o,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(n,i){return Nc(this,n,"x",i)}inYRange(n,i){return Nc(this,n,"y",i)}getCenterPoint(n){const{x:i,y:r}=this.getProps(["x","y"],n);return{x:i,y:r}}size(n){n=n||this.options||{};let i=n.radius||0;i=Math.max(i,i&&n.hoverRadius||0);const r=i&&n.borderWidth||0;return(i+r)*2}draw(n,i){const r=this.options;this.skip||r.radius<.1||!Ee(this,i,this.size(r)/2)||(n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.fillStyle=r.backgroundColor,oa(n,r,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}C(cr,"id","point"),C(cr,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),C(cr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Bc(e,t){const{x:n,y:i,base:r,width:a,height:s}=e.getProps(["x","y","base","width","height"],t);let o,l,c,u,d;return e.horizontal?(d=s/2,o=Math.min(n,r),l=Math.max(n,r),c=i-d,u=i+d):(d=a/2,o=n-d,l=n+d,c=Math.min(i,r),u=Math.max(i,r)),{left:o,top:c,right:l,bottom:u}}function Ve(e,t,n,i){return e?0:Rt(t,n,i)}function v0(e,t,n){const i=e.options.borderWidth,r=e.borderSkipped,a=Cl(i);return{t:Ve(r.top,a.top,0,n),r:Ve(r.right,a.right,0,t),b:Ve(r.bottom,a.bottom,0,n),l:Ve(r.left,a.left,0,t)}}function x0(e,t,n){const{enableBorderRadius:i}=e.getProps(["enableBorderRadius"]),r=e.options.borderRadius,a=Ue(r),s=Math.min(t,n),o=e.borderSkipped,l=i||j(r);return{topLeft:Ve(!l||o.top||o.left,a.topLeft,0,s),topRight:Ve(!l||o.top||o.right,a.topRight,0,s),bottomLeft:Ve(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:Ve(!l||o.bottom||o.right,a.bottomRight,0,s)}}function _0(e){const t=Bc(e),n=t.right-t.left,i=t.bottom-t.top,r=v0(e,n/2,i/2),a=x0(e,n/2,i/2);return{outer:{x:t.left,y:t.top,w:n,h:i,radius:a},inner:{x:t.left+r.l,y:t.top+r.t,w:n-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 Sa(e,t,n,i){const r=t===null,a=n===null,o=e&&!(r&&a)&&Bc(e,i);return o&&(r||Ce(t,o.left,o.right))&&(a||Ce(n,o.top,o.bottom))}function w0(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function T0(e,t){e.rect(t.x,t.y,t.w,t.h)}function Da(e,t,n={}){const i=e.x!==n.x?-t:0,r=e.y!==n.y?-t:0,a=(e.x+e.w!==n.x+n.w?t:0)-i,s=(e.y+e.h!==n.y+n.h?t:0)-r;return{x:e.x+i,y:e.y+r,w:e.w+a,h:e.h+s,radius:e.radius}}class ur extends Nt{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:n,options:{borderColor:i,backgroundColor:r}}=this,{inner:a,outer:s}=_0(this),o=w0(s.radius)?wn:T0;t.save(),(s.w!==a.w||s.h!==a.h)&&(t.beginPath(),o(t,Da(s,n,a)),t.clip(),o(t,Da(a,-n,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,Da(a,n)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,n,i){return Sa(this,t,n,i)}inXRange(t,n){return Sa(this,t,null,n)}inYRange(t,n){return Sa(this,null,t,n)}getCenterPoint(t){const{x:n,y:i,base:r,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(n+r)/2:n,y:a?i:(i+r)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}C(ur,"id","bar"),C(ur,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),C(ur,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var M0=Object.freeze({__proto__:null,ArcElement:ui,BarElement:ur,LineElement:ze,PointElement:cr});const Ca=["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)"],Hc=Ca.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function Fc(e){return Ca[e%Ca.length]}function Uc(e){return Hc[e%Hc.length]}function S0(e,t){return e.borderColor=Fc(t),e.backgroundColor=Uc(t),++t}function D0(e,t){return e.backgroundColor=e.data.map(()=>Fc(t++)),t}function C0(e,t){return e.backgroundColor=e.data.map(()=>Uc(t++)),t}function P0(e){let t=0;return(n,i)=>{const r=e.getDatasetMeta(i).controller;r instanceof Ye?t=D0(n,t):r instanceof ni?t=C0(n,t):r&&(t=S0(n,t))}}function Wc(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function E0(e){return e&&(e.borderColor||e.backgroundColor)}var k0={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:i},options:r}=e.config,{elements:a}=r;if(!n.forceOverride&&(Wc(i)||E0(r)||a&&Wc(a)))return;const s=P0(e);i.forEach(s)}};function O0(e,t,n,i,r){const a=r.samples||i;if(a>=n)return e.slice(t,t+n);const s=[],o=(n-2)/(a-2);let l=0;const c=t+n-1;let u=t,d,h,f,p,y;for(s[l++]=e[u],d=0;d<a-2;d++){let b=0,m=0,v;const x=Math.floor((d+1)*o)+1+t,w=Math.min(Math.floor((d+2)*o)+1,n)+t,_=w-x;for(v=x;v<w;v++)b+=e[v].x,m+=e[v].y;b/=_,m/=_;const T=Math.floor(d*o)+1+t,M=Math.min(Math.floor((d+1)*o)+1,n)+t,{x:D,y:S}=e[u];for(f=p=-1,v=T;v<M;v++)p=.5*Math.abs((D-b)*(e[v].y-S)-(D-e[v].x)*(m-S)),p>f&&(f=p,h=e[v],y=v);s[l++]=h,u=y}return s[l++]=e[c],s}function A0(e,t,n,i){let r=0,a=0,s,o,l,c,u,d,h,f,p,y;const b=[],m=t+n-1,v=e[t].x,w=e[m].x-v;for(s=t;s<t+n;++s){o=e[s],l=(o.x-v)/w*i,c=o.y;const _=l|0;if(_===u)c<p?(p=c,d=s):c>y&&(y=c,h=s),r=(a*r+o.x)/++a;else{const T=s-1;if(!U(d)&&!U(h)){const M=Math.min(d,h),D=Math.max(d,h);M!==f&&M!==T&&b.push({...e[M],x:r}),D!==f&&D!==T&&b.push({...e[D],x:r})}s>0&&T!==f&&b.push(e[T]),b.push(o),u=_,a=0,p=y=c,d=h=f=s}}return b}function Yc(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function zc(e){e.data.datasets.forEach(t=>{Yc(t)})}function R0(e,t){const n=t.length;let i=0,r;const{iScale:a}=e,{min:s,max:o,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(i=Rt(Pe(t,a.axis,s).lo,0,n-1)),c?r=Rt(Pe(t,a.axis,o).hi+1,i,n)-i:r=n-i,{start:i,count:r}}var L0={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){zc(e);return}const i=e.width;e.data.datasets.forEach((r,a)=>{const{_data:s,indexAxis:o}=r,l=e.getDatasetMeta(a),c=s||r.data;if(Qn([o,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:d,count:h}=R0(l,c);const f=n.threshold||4*i;if(h<=f){Yc(r);return}U(s)&&(r._data=c,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(y){this._data=y}}));let p;switch(n.algorithm){case"lttb":p=O0(c,d,h,i,n);break;case"min-max":p=A0(c,d,h,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}r._decimated=p})},destroy(e){zc(e)}};function I0(e,t,n){const i=e.segments,r=e.points,a=t.points,s=[];for(const o of i){let{start:l,end:c}=o;c=Ea(l,c,r);const u=Pa(n,r[l],r[c],o.loop);if(!t.segments){s.push({source:o,target:u,start:r[l],end:r[c]});continue}const d=Vl(t,u);for(const h of d){const f=Pa(n,a[h.start],a[h.end],h.loop),p=zl(o,r,f);for(const y of p)s.push({source:y,target:h,start:{[n]:Vc(u,f,"start",Math.max)},end:{[n]:Vc(u,f,"end",Math.min)}})}}return s}function Pa(e,t,n,i){if(i)return;let r=t[e],a=n[e];return e==="angle"&&(r=ne(r),a=ne(a)),{property:e,start:r,end:a}}function N0(e,t){const{x:n=null,y:i=null}=e||{},r=t.points,a=[];return t.segments.forEach(({start:s,end:o})=>{o=Ea(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})):n!==null&&(a.push({x:n,y:l.y}),a.push({x:n,y:c.y}))}),a}function Ea(e,t,n){for(;t>e;t--){const i=n[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Vc(e,t,n,i){return e&&t?i(e[n],t[n]):e?e[n]:t?t[n]:0}function jc(e,t){let n=[],i=!1;return nt(e)?(i=!0,n=e):n=N0(e,t),n.length?new ze({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function $c(e){return e&&e.fill!==!1}function B0(e,t,n){let r=e[t].fill;const a=[t];let s;if(!n)return r;for(;r!==!1&&a.indexOf(r)===-1;){if(!yt(r))return r;if(s=e[r],!s)return!1;if(s.visible)return r;a.push(r),r=s.fill}return!1}function H0(e,t,n){const i=Y0(e);if(j(i))return isNaN(i.value)?!1:i;let r=parseFloat(i);return yt(r)&&Math.floor(r)===r?F0(i[0],t,r,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function F0(e,t,n,i){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=i?!1:n}function U0(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:j(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function W0(e,t,n){let i;return e==="start"?i=n:e==="end"?i=t.options.reverse?t.min:t.max:j(e)?i=e.value:i=t.getBaseValue(),i}function Y0(e){const t=e.options,n=t.fill;let i=H(n&&n.target,n);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function z0(e){const{scale:t,index:n,line:i}=e,r=[],a=i.segments,s=i.points,o=V0(t,n);o.push(jc({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++)j0(r,s[u],o)}return new ze({points:r,options:{}})}function V0(e,t){const n=[],i=e.getMatchingVisibleMetas("line");for(let r=0;r<i.length;r++){const a=i[r];if(a.index===t)break;a.hidden||n.unshift(a.dataset)}return n}function j0(e,t,n){const i=[];for(let r=0;r<n.length;r++){const a=n[r],{first:s,last:o,point:l}=$0(a,t,"x");if(!(!l||s&&o)){if(s)i.unshift(l);else if(e.push(l),!o)break}}e.push(...i)}function $0(e,t,n){const i=e.interpolate(t,n);if(!i)return{};const r=i[n],a=e.segments,s=e.points;let o=!1,l=!1;for(let c=0;c<a.length;c++){const u=a[c],d=s[u.start][n],h=s[u.end][n];if(Ce(r,d,h)){o=r===d,l=r===h;break}}return{first:o,last:l,point:i}}class qc{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,i){const{x:r,y:a,radius:s}=this;return n=n||{start:0,end:ut},t.arc(r,a,s,n.end,n.start,!0),!i.bounds}interpolate(t){const{x:n,y:i,radius:r}=this,a=t.angle;return{x:n+Math.cos(a)*r,y:i+Math.sin(a)*r,angle:a}}}function q0(e){const{chart:t,fill:n,line:i}=e;if(yt(n))return G0(t,n);if(n==="stack")return z0(e);if(n==="shape")return!0;const r=X0(e);return r instanceof qc?r:jc(r,i)}function G0(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function X0(e){return(e.scale||{}).getPointPositionForValue?Z0(e):K0(e)}function K0(e){const{scale:t={},fill:n}=e,i=U0(n,t);if(yt(i)){const r=t.isHorizontal();return{x:r?i:null,y:r?null:i}}return null}function Z0(e){const{scale:t,fill:n}=e,i=t.options,r=t.getLabels().length,a=i.reverse?t.max:t.min,s=W0(n,t,a),o=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,a);return new qc({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 ka(e,t,n){const i=q0(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&&(Kn(e,n),Q0(e,{line:r,target:i,above:u,below:d,area:n,scale:a,axis:s}),Zn(e))}function Q0(e,t){const{line:n,target:i,above:r,below:a,area:s,scale:o}=t,l=n._loop?"angle":t.axis;e.save(),l==="x"&&a!==r&&(Gc(e,i,s.top),Xc(e,{line:n,target:i,color:r,scale:o,property:l}),e.restore(),e.save(),Gc(e,i,s.bottom)),Xc(e,{line:n,target:i,color:a,scale:o,property:l}),e.restore()}function Gc(e,t,n){const{segments:i,points:r}=t;let a=!0,s=!1;e.beginPath();for(const o of i){const{start:l,end:c}=o,u=r[l],d=r[Ea(l,c,r)];a?(e.moveTo(u.x,u.y),a=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),s=!!t.pathSegment(e,o,{move:s}),s?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function Xc(e,t){const{line:n,target:i,property:r,color:a,scale:s}=t,o=I0(n,i,r);for(const{source:l,target:c,start:u,end:d}of o){const{style:{backgroundColor:h=a}={}}=l,f=i!==!0;e.save(),e.fillStyle=h,J0(e,s,f&&Pa(r,u,d)),e.beginPath();const p=!!n.pathSegment(e,l);let y;if(f){p?e.closePath():Kc(e,i,d,r);const b=!!i.pathSegment(e,c,{move:p,reverse:!0});y=p&&b,y||Kc(e,i,u,r)}e.closePath(),e.fill(y?"evenodd":"nonzero"),e.restore()}}function J0(e,t,n){const{top:i,bottom:r}=t.chart.chartArea,{property:a,start:s,end:o}=n||{};a==="x"&&(e.beginPath(),e.rect(s,i,o-s,r-i),e.clip())}function Kc(e,t,n,i){const r=t.interpolate(n,i);r&&e.lineTo(r.x,r.y)}var tb={id:"filler",afterDatasetsUpdate(e,t,n){const i=(e.data.datasets||[]).length,r=[];let a,s,o,l;for(s=0;s<i;++s)a=e.getDatasetMeta(s),o=a.dataset,l=null,o&&o.options&&o instanceof ze&&(l={visible:e.isDatasetVisible(s),index:s,fill:H0(o,s,i),chart:e,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=B0(r,s,n.propagate))},beforeDraw(e,t,n){const i=n.drawTime==="beforeDraw",r=e.getSortedVisibleDatasetMetas(),a=e.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&&ka(e.ctx,o,a))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const i=e.getSortedVisibleDatasetMetas();for(let r=i.length-1;r>=0;--r){const a=i[r].$filler;$c(a)&&ka(e.ctx,a,e.chartArea)}},beforeDatasetDraw(e,t,n){const i=t.meta.$filler;!$c(i)||n.drawTime!=="beforeDatasetDraw"||ka(e.ctx,i,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Zc=(e,t)=>{let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},eb=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Qc extends Nt{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,n,i){this.maxWidth=t,this.maxHeight=n,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 n=st(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,r)=>t.sort(i,r,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,r=gt(i.font),a=r.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=Zc(i,a);let c,u;n.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,n,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 h=-1,f=-u;return this.legendItems.forEach((p,y)=>{const b=i+n/2+a.measureText(p.text).width;(y===0||c[c.length-1]+b+2*o>s)&&(d+=u,c[c.length-(y>0?0:1)]=0,f+=u,h++),l[y]={left:0,top:f,row:h,width:b,height:r},c[c.length-1]+=b+o}),d}_fitCols(t,n,i,r){const{ctx:a,maxHeight:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=s-t;let d=o,h=0,f=0,p=0,y=0;return this.legendItems.forEach((b,m)=>{const{itemWidth:v,itemHeight:x}=nb(i,n,a,b,r);m>0&&f+x+2*o>u&&(d+=h+o,c.push({width:h,height:f}),p+=h+o,y++,h=f=0),l[m]={left:p,top:f,col:y,width:v,height:x},h=Math.max(h,v),f+=x+o}),d+=h,c.push({width:h,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:r},rtl:a}}=this,s=Sn(a,this.left,this.width);if(this.isHorizontal()){let o=0,l=Ft(i,this.left+r,this.right-this.lineWidths[o]);for(const c of n)o!==c.row&&(o=c.row,l=Ft(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=Ft(i,this.top+t+r,this.bottom-this.columnSizes[o].height);for(const c of n)c.col!==o&&(o=c.col,l=Ft(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;Kn(t,this),this._draw(),Zn(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:i,ctx:r}=this,{align:a,labels:s}=t,o=xt.color,l=Sn(t.rtl,this.left,this.width),c=gt(s.font),{padding:u}=s,d=c.size,h=d/2;let f;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;const{boxWidth:p,boxHeight:y,itemHeight:b}=Zc(s,d),m=function(T,M,D){if(isNaN(p)||p<=0||isNaN(y)||y<0)return;r.save();const S=H(D.lineWidth,1);if(r.fillStyle=H(D.fillStyle,o),r.lineCap=H(D.lineCap,"butt"),r.lineDashOffset=H(D.lineDashOffset,0),r.lineJoin=H(D.lineJoin,"miter"),r.lineWidth=S,r.strokeStyle=H(D.strokeStyle,o),r.setLineDash(H(D.lineDash,[])),s.usePointStyle){const P={radius:y*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:S},k=l.xPlus(T,p/2),L=M+h;Dl(r,P,k,L,s.pointStyleWidth&&p)}else{const P=M+Math.max((d-y)/2,0),k=l.leftForLtr(T,p),L=Ue(D.borderRadius);r.beginPath(),Object.values(L).some(W=>W!==0)?wn(r,{x:k,y:P,w:p,h:y,radius:L}):r.rect(k,P,p,y),r.fill(),S!==0&&r.stroke()}r.restore()},v=function(T,M,D){rn(r,D.text,T,M+b/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},x=this.isHorizontal(),w=this._computeTitleHeight();x?f={x:Ft(a,this.left+u,this.right-i[0]),y:this.top+u+w,line:0}:f={x:this.left+u,y:Ft(a,this.top+w+u,this.bottom-n[0].height),line:0},Fl(this.ctx,t.textDirection);const _=b+u;this.legendItems.forEach((T,M)=>{r.strokeStyle=T.fontColor,r.fillStyle=T.fontColor;const D=r.measureText(T.text).width,S=l.textAlign(T.textAlign||(T.textAlign=s.textAlign)),P=p+h+D;let k=f.x,L=f.y;l.setWidth(this.width),x?M>0&&k+P+u>this.right&&(L=f.y+=_,f.line++,k=f.x=Ft(a,this.left+u,this.right-i[f.line])):M>0&&L+_>this.bottom&&(k=f.x=k+n[f.line].width+u,f.line++,L=f.y=Ft(a,this.top+w+u,this.bottom-n[f.line].height));const W=l.x(k);if(m(W,L,T),k=Mg(S,k+p+h,x?k+P:this.right,t.rtl),v(l.x(k),L,T),x)f.x+=P+u;else if(typeof T.text!="string"){const ct=c.lineHeight;f.y+=Jc(T,ct)}else f.y+=_}),Ul(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,i=gt(n.font),r=Pt(n.padding);if(!n.display)return;const a=Sn(t.rtl,this.left,this.width),s=this.ctx,o=n.position,l=i.size/2,c=r.top+l;let u,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,d=Ft(t.align,d,this.right-h);else{const p=this.columnSizes.reduce((y,b)=>Math.max(y,b.height),0);u=c+Ft(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const f=Ft(o,d,d+h);s.textAlign=a.textAlign(na(o)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=i.string,rn(s,n.text,f,u,i)}_computeTitleHeight(){const t=this.options.title,n=gt(t.font),i=Pt(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,r,a;if(Ce(t,this.left,this.right)&&Ce(n,this.top,this.bottom)){for(a=this.legendHitBoxes,i=0;i<a.length;++i)if(r=a[i],Ce(t,r.left,r.left+r.width)&&Ce(n,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){const n=this.options;if(!ab(t.type,n))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,a=eb(r,i);r&&!a&&st(n.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!a&&st(n.onHover,[t,i,this],this)}else i&&st(n.onClick,[t,i,this],this)}}function nb(e,t,n,i,r){const a=ib(i,e,t,n),s=rb(r,i,t.lineHeight);return{itemWidth:a,itemHeight:s}}function ib(e,t,n,i){let r=e.text;return r&&typeof r!="string"&&(r=r.reduce((a,s)=>a.length>s.length?a:s)),t+n.size/2+i.measureText(r).width}function rb(e,t,n){let i=e;return typeof t.text!="string"&&(i=Jc(t,n)),i}function Jc(e,t){const n=e.text?e.text.length+.5:0;return t*n}function ab(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var sb={id:"legend",_element:Qc,start(e,t,n){const i=e.legend=new Qc({ctx:e.ctx,options:n,chart:e});Ut.configure(e,i,n),Ut.addBox(e,i)},stop(e){Ut.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const i=e.legend;Ut.configure(e,i,n),i.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const i=t.datasetIndex,r=n.chart;r.isDatasetVisible(i)?(r.hide(i),t.hidden=!0):(r.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:r,color:a,useBorderRadius:s,borderRadius:o}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Pt(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:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Oa extends Nt{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,n){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=n;const r=nt(i.text)?i.text.length:1;this._padding=Pt(i.padding);const a=r*gt(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:n,left:i,bottom:r,right:a,options:s}=this,o=s.align;let l=0,c,u,d;return this.isHorizontal()?(u=Ft(o,i,a),d=n+t,c=a-i):(s.position==="left"?(u=i+t,d=Ft(o,r,n),l=X*-.5):(u=a-t,d=Ft(o,n,r),l=X*.5),c=r-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const i=gt(n.font),a=i.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:c}=this._drawArgs(a);rn(t,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:c,textAlign:na(n.align),textBaseline:"middle",translation:[s,o]})}}function ob(e,t){const n=new Oa({ctx:e.ctx,options:t,chart:e});Ut.configure(e,n,t),Ut.addBox(e,n),e.titleBlock=n}var lb={id:"title",_element:Oa,start(e,t,n){ob(e,n)},stop(e){const t=e.titleBlock;Ut.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const i=e.titleBlock;Ut.configure(e,i,n),i.options=n},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 dr=new WeakMap;var cb={id:"subtitle",start(e,t,n){const i=new Oa({ctx:e.ctx,options:n,chart:e});Ut.configure(e,i,n),Ut.addBox(e,i),dr.set(e,i)},stop(e){Ut.removeBox(e,dr.get(e)),dr.delete(e)},beforeUpdate(e,t,n){const i=dr.get(e);Ut.configure(e,i,n),i.options=n},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 di={average(e){if(!e.length)return!1;let t,n,i=0,r=0,a=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const o=s.tooltipPosition();i+=o.x,r+=o.y,++a}}return{x:i/a,y:r/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,r=Number.POSITIVE_INFINITY,a,s,o;for(a=0,s=e.length;a<s;++a){const l=e[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=_n(t,c);u<r&&(r=u,o=l)}}if(o){const l=o.tooltipPosition();n=l.x,i=l.y}return{x:n,y:i}}};function be(e,t){return t&&(nt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Oe(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
38
38
|
`)>-1?e.split(`
|
|
39
|
-
`):e}function ub(e,t){const{element:n,datasetIndex:i,index:r}=t,a=e.getDatasetMeta(i).controller,{label:s,value:o}=a.getLabelAndValue(r);return{chart:e,label:s,parsed:a.getParsed(r),raw:e.data.datasets[i].data[r],formattedValue:o,dataset:a.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function tu(e,t){const n=e.chart.ctx,{body:i,footer:r,title:a}=e,{boxWidth:s,boxHeight:o}=t,l=gt(t.bodyFont),c=gt(t.titleFont),u=gt(t.footerFont),d=a.length,h=r.length,f=i.length,p=Pt(t.padding);let y=p.height,b=0,m=i.reduce((w,_)=>w+_.before.length+_.lines.length+_.after.length,0);if(m+=e.beforeBody.length+e.afterBody.length,d&&(y+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),m){const w=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;y+=f*w+(m-f)*l.lineHeight+(m-1)*t.bodySpacing}h&&(y+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let v=0;const x=function(w){b=Math.max(b,n.measureText(w).width+v)};return n.save(),n.font=c.string,ot(e.title,x),n.font=l.string,ot(e.beforeBody.concat(e.afterBody),x),v=t.displayColors?s+2+t.boxPadding:0,ot(i,w=>{ot(w.before,x),ot(w.lines,x),ot(w.after,x)}),v=0,n.font=u.string,ot(e.footer,x),n.restore(),b+=p.width,{width:b,height:y}}function db(e,t){const{y:n,height:i}=t;return n<i/2?"top":n>e.height-i/2?"bottom":"center"}function hb(e,t,n,i){const{x:r,width:a}=i,s=n.caretSize+n.caretPadding;if(e==="left"&&r+a+s>t.width||e==="right"&&r-a-s<0)return!0}function fb(e,t,n,i){const{x:r,width:a}=n,{width:s,chartArea:{left:o,right:l}}=e;let c="center";return i==="center"?c=r<=(o+l)/2?"left":"right":r<=a/2?c="left":r>=s-a/2&&(c="right"),hb(c,e,t,n)&&(c="center"),c}function eu(e,t,n){const i=n.yAlign||t.yAlign||db(e,n);return{xAlign:n.xAlign||t.xAlign||fb(e,t,n,i),yAlign:i}}function gb(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function pb(e,t,n){let{y:i,height:r}=e;return t==="top"?i+=n:t==="bottom"?i-=r+n:i-=r/2,i}function nu(e,t,n,i){const{caretSize:r,caretPadding:a,cornerRadius:s}=e,{xAlign:o,yAlign:l}=n,c=r+a,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=Ue(s);let p=gb(t,o);const y=pb(t,l,c);return l==="center"?o==="left"?p+=c:o==="right"&&(p-=c):o==="left"?p-=Math.max(u,h)+r:o==="right"&&(p+=Math.max(d,f)+r),{x:Rt(p,0,i.width-t.width),y:Rt(y,0,i.height-t.height)}}function dr(e,t,n){const i=Pt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function iu(e){return be([],Oe(e))}function mb(e,t,n){return We(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function ru(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const au={beforeTitle:De,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,i=n?n.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 n[t.dataIndex]}return""},afterTitle:De,beforeBody:De,beforeLabel:De,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return U(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:De,afterBody:De,beforeFooter:De,footer:De,afterFooter:De};function Xt(e,t,n,i){const r=e[t].call(n,i);return typeof r>"u"?au[t].call(n,i):r}class Aa extends Nt{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 n=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&n.options.animation&&i.animations,a=new fa(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=mb(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:i}=n,r=Xt(i,"beforeTitle",this,t),a=Xt(i,"title",this,t),s=Xt(i,"afterTitle",this,t);let o=[];return o=be(o,Oe(r)),o=be(o,Oe(a)),o=be(o,Oe(s)),o}getBeforeBody(t,n){return iu(Xt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:i}=n,r=[];return ot(t,a=>{const s={before:[],lines:[],after:[]},o=ru(i,a);be(s.before,Oe(Xt(o,"beforeLabel",this,a))),be(s.lines,Xt(o,"label",this,a)),be(s.after,Oe(Xt(o,"afterLabel",this,a))),r.push(s)}),r}getAfterBody(t,n){return iu(Xt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:i}=n,r=Xt(i,"beforeFooter",this,t),a=Xt(i,"footer",this,t),s=Xt(i,"afterFooter",this,t);let o=[];return o=be(o,Oe(r)),o=be(o,Oe(a)),o=be(o,Oe(s)),o}_createItems(t){const n=this._active,i=this.chart.data,r=[],a=[],s=[];let o=[],l,c;for(l=0,c=n.length;l<c;++l)o.push(ub(this.chart,n[l]));return t.filter&&(o=o.filter((u,d,h)=>t.filter(u,d,h,i))),t.itemSort&&(o=o.sort((u,d)=>t.itemSort(u,d,i))),ot(o,u=>{const d=ru(t.callbacks,u);r.push(Xt(d,"labelColor",this,u)),a.push(Xt(d,"labelPointStyle",this,u)),s.push(Xt(d,"labelTextColor",this,u))}),this.labelColors=r,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=o,o}update(t,n){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=di[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=tu(this,i),c=Object.assign({},o,l),u=eu(this.chart,i,c),d=nu(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:n})}drawCaret(t,n,i,r){const a=this.getCaretPosition(t,i,r);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,i){const{xAlign:r,yAlign:a}=this,{caretSize:s,cornerRadius:o}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Ue(o),{x:h,y:f}=t,{width:p,height:y}=n;let b,m,v,x,w,_;return a==="center"?(w=f+y/2,r==="left"?(b=h,m=b-s,x=w+s,_=w-s):(b=h+p,m=b+s,x=w-s,_=w+s),v=b):(r==="left"?m=h+Math.max(l,u)+s:r==="right"?m=h+p-Math.max(c,d)-s:m=this.caretX,a==="top"?(x=f,w=x-s,b=m-s,v=m+s):(x=f+y,w=x+s,b=m+s,v=m-s),_=x),{x1:b,x2:m,x3:v,y1:x,y2:w,y3:_}}drawTitle(t,n,i){const r=this.title,a=r.length;let s,o,l;if(a){const c=Sn(i.rtl,this.x,this.width);for(t.x=dr(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",s=gt(i.titleFont),o=i.titleSpacing,n.fillStyle=i.titleColor,n.font=s.string,l=0;l<a;++l)n.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,n,i,r,a){const s=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:l,boxWidth:c}=a,u=gt(a.bodyFont),d=dr(this,"left",a),h=r.x(d),f=l<u.lineHeight?(u.lineHeight-l)/2:0,p=n.y+f;if(a.usePointStyle){const y={radius:Math.min(c,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},b=r.leftForLtr(h,c)+c/2,m=p+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,oa(t,y,b,m),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,oa(t,y,b,m)}else{t.lineWidth=V(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 y=r.leftForLtr(h,c),b=r.leftForLtr(r.xPlus(h,1),c-2),m=Ue(s.borderRadius);Object.values(m).some(v=>v!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,wn(t,{x:y,y:p,w:c,h:l,radius:m}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),wn(t,{x:b,y:p+1,w:c-2,h:l-2,radius:m}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(y,p,c,l),t.strokeRect(y,p,c,l),t.fillStyle=s.backgroundColor,t.fillRect(b,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){const{body:r}=this,{bodySpacing:a,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:c,boxPadding:u}=i,d=gt(i.bodyFont);let h=d.lineHeight,f=0;const p=Sn(i.rtl,this.x,this.width),y=function(S){n.fillText(S,p.x(t.x+f),t.y+h/2),t.y+=h+a},b=p.textAlign(s);let m,v,x,w,_,T,M;for(n.textAlign=s,n.textBaseline="middle",n.font=d.string,t.x=dr(this,b,i),n.fillStyle=i.bodyColor,ot(this.beforeBody,y),f=o&&b!=="right"?s==="center"?c/2+u:c+2+u:0,w=0,T=r.length;w<T;++w){for(m=r[w],v=this.labelTextColors[w],n.fillStyle=v,ot(m.before,y),x=m.lines,o&&x.length&&(this._drawColorBox(n,t,w,p,i),h=Math.max(d.lineHeight,l)),_=0,M=x.length;_<M;++_)y(x[_]),h=d.lineHeight;ot(m.after,y)}f=0,h=d.lineHeight,ot(this.afterBody,y),t.y-=a}drawFooter(t,n,i){const r=this.footer,a=r.length;let s,o;if(a){const l=Sn(i.rtl,this.x,this.width);for(t.x=dr(this,i.footerAlign,i),t.y+=i.footerMarginTop,n.textAlign=l.textAlign(i.footerAlign),n.textBaseline="middle",s=gt(i.footerFont),n.fillStyle=i.footerColor,n.font=s.string,o=0;o<a;++o)n.fillText(r[o],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,n,i,r){const{xAlign:a,yAlign:s}=this,{x:o,y:l}=t,{width:c,height:u}=i,{topLeft:d,topRight:h,bottomLeft:f,bottomRight:p}=Ue(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(o+d,l),s==="top"&&this.drawCaret(t,n,i,r),n.lineTo(o+c-h,l),n.quadraticCurveTo(o+c,l,o+c,l+h),s==="center"&&a==="right"&&this.drawCaret(t,n,i,r),n.lineTo(o+c,l+u-p),n.quadraticCurveTo(o+c,l+u,o+c-p,l+u),s==="bottom"&&this.drawCaret(t,n,i,r),n.lineTo(o+f,l+u),n.quadraticCurveTo(o,l+u,o,l+u-f),s==="center"&&a==="left"&&this.drawCaret(t,n,i,r),n.lineTo(o,l+d),n.quadraticCurveTo(o,l,o+d,l),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,i=this.$animations,r=i&&i.x,a=i&&i.y;if(r||a){const s=di[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=tu(this,t),l=Object.assign({},s,this._size),c=eu(n,t,l),u=nu(t,l,c,n);(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 n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=Pt(n.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,r,n),Fl(t,n.textDirection),a.y+=s.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),Ul(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){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=!Fi(i,r),s=this._positionChanged(r,n);(a||s)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,a=this._active||[],s=this._getActiveElements(t,a,n,i),o=this._positionChanged(s,t),l=n||!Fi(s,a)||o;return l&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,i,r){const a=this.options;if(t.type==="mouseout")return[];if(!r)return n;const s=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:i,caretY:r,options:a}=this,s=di[a.position].call(this,t,n);return s!==!1&&(i!==s.x||r!==s.y)}}C(Aa,"positioners",di);var hr={id:"tooltip",_element:Aa,positioners:di,afterInit(e,t,n){n&&(e.tooltip=new Aa({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,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:(e,t)=>t.bodyFont.size,boxWidth:(e,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:au},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},bb=Object.freeze({__proto__:null,Colors:k0,Decimation:L0,Filler:tb,Legend:sb,SubTitle:cb,Title:lb,Tooltip:hr});const yb=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function vb(e,t,n,i){const r=e.indexOf(t);if(r===-1)return yb(e,t,n,i);const a=e.lastIndexOf(t);return r!==a?n:r}const xb=(e,t)=>e===null?null:Rt(Math.round(e),0,t);function su(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Ra extends cn{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:r,label:a}of n)i[r]===a&&i.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(U(t))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===t?n:vb(i,t,H(n,t),this._addedLabels),xb(n,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),n||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const t=this.min,n=this.max,i=this.options.offset,r=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let s=t;s<=n;s++)r.push({value:s});return r}getLabelForValue(t){return su.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 n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}C(Ra,"id","category"),C(Ra,"defaults",{ticks:{callback:su}});function _b(e,t){const n=[],{bounds:r,step:a,min:s,max:o,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=e,f=a||1,p=u-1,{min:y,max:b}=t,m=!U(s),v=!U(o),x=!U(c),w=(b-y)/(d+1);let _=cl((b-y)/p/f)*f,T,M,S,D;if(_<1e-14&&!m&&!v)return[{value:y},{value:b}];D=Math.ceil(b/_)-Math.floor(y/_),D>p&&(_=cl(D*_/p/f)*f),U(l)||(T=Math.pow(10,l),_=Math.ceil(_*T)/T),r==="ticks"?(M=Math.floor(y/_)*_,S=Math.ceil(b/_)*_):(M=y,S=b),m&&v&&a&&bg((o-s)/a,_/1e3)?(D=Math.round(Math.min((o-s)/_,u)),_=(o-s)/D,M=s,S=o):x?(M=m?s:M,S=v?o:S,D=c-1,_=(S-M)/D):(D=(S-M)/_,jn(D,Math.round(D),_/1e3)?D=Math.round(D):D=Math.ceil(D));const E=Math.max(dl(_),dl(M));T=Math.pow(10,U(l)?E:l),M=Math.round(M*T)/T,S=Math.round(S*T)/T;let k=0;for(m&&(h&&M!==s?(n.push({value:s}),M<s&&k++,jn(Math.round((M+k*_)*T)/T,s,ou(s,w,e))&&k++):M<s&&k++);k<D;++k){const L=Math.round((M+k*_)*T)/T;if(v&&L>o)break;n.push({value:L})}return v&&h&&S!==o?n.length&&jn(n[n.length-1].value,o,ou(o,w,e))?n[n.length-1].value=o:n.push({value:o}):(!v||S===o)&&n.push({value:S}),n}function ou(e,t,{horizontal:n,minRotation:i}){const r=Ct(i),a=(n?Math.sin(r):Math.cos(r))||.001,s=.75*t*(""+e).length;return Math.min(t/a,s)}class fr extends cn{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,n){return U(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:r,max:a}=this;const s=l=>r=n?r:l,o=l=>a=i?a:l;if(t){const l=pe(r),c=pe(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:n,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(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=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:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,s=_b(r,a);return t.bounds==="ticks"&&ul(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 n=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const r=(i-n)/Math.max(t.length-1,1)/2;n-=r,i+=r}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return Gn(t,this.chart.options.locale,this.options.ticks.format)}}class La extends fr{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=yt(t)?t:0,this.max=yt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,i=Ct(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/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}}C(La,"id","linear"),C(La,"defaults",{ticks:{callback:ji.formatters.numeric}});const hi=e=>Math.floor(He(e)),un=(e,t)=>Math.pow(10,hi(e)+t);function lu(e){return e/Math.pow(10,hi(e))===1}function cu(e,t,n){const i=Math.pow(10,n),r=Math.floor(e/i);return Math.ceil(t/i)-r}function wb(e,t){const n=t-e;let i=hi(n);for(;cu(e,t,i)>10;)i++;for(;cu(e,t,i)<10;)i--;return Math.min(i,hi(e))}function Tb(e,{min:t,max:n}){t=ee(e.min,t);const i=[],r=hi(t);let a=wb(t,n),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)),h=ee(e.min,Math.round((l+u+d*Math.pow(10,a))*s)/s);for(;h<n;)i.push({value:h,major:lu(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,s=a>=0?1:s),h=Math.round((l+u+d*Math.pow(10,a))*s)/s;const f=ee(e.max,h);return i.push({value:f,major:lu(f),significand:d}),i}class Ia extends cn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const i=fr.prototype.parse.apply(this,[t,n]);if(i===0){this._zero=!0;return}return yt(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=yt(t)?Math.max(0,t):null,this.max=yt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!yt(this._userMin)&&(this.min=t===un(this.min,0)?un(this.min,-1):un(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let i=this.min,r=this.max;const a=o=>i=t?i:o,s=o=>r=n?r:o;i===r&&(i<=0?(a(1),s(10)):(a(un(i,-1)),s(un(r,1)))),i<=0&&a(un(r,-1)),r<=0&&s(un(i,1)),this.min=i,this.max=r}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},i=Tb(n,this);return t.bounds==="ticks"&&ul(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":Gn(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=He(t),this._valueRange=He(this.max)-He(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(He(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}C(Ia,"id","logarithmic"),C(Ia,"defaults",{ticks:{callback:ji.formatters.logarithmic,major:{enabled:!0}}});function Na(e){const t=e.ticks;if(t.display&&e.display){const n=Pt(t.backdropPadding);return H(t.font&&t.font.size,xt.font.size)+n.height}return 0}function Mb(e,t,n){return n=nt(n)?n:[n],{w:Lg(e,t.string,n),h:n.length*t.lineHeight}}function uu(e,t,n,i,r){return e===i||e===r?{start:t-n/2,end:t+n/2}:e<i||e>r?{start:t-n,end:t}:{start:t,end:t+n}}function Sb(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),i=[],r=[],a=e._pointLabels.length,s=e.options.pointLabels,o=s.centerPointLabels?X/a:0;for(let l=0;l<a;l++){const c=s.setContext(e.getPointLabelContext(l));r[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+r[l],o),d=gt(c.font),h=Mb(e.ctx,d,e._pointLabels[l]);i[l]=h;const f=ne(e.getIndexAngle(l)+o),p=Math.round(zi(f)),y=uu(p,u.x,h.w,0,180),b=uu(p,u.y,h.h,90,270);Db(n,t,f,y,b)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=Eb(e,i,r)}function Db(e,t,n,i,r){const a=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let o=0,l=0;i.start<t.l?(o=(t.l-i.start)/a,e.l=Math.min(e.l,t.l-o)):i.end>t.r&&(o=(i.end-t.r)/a,e.r=Math.max(e.r,t.r+o)),r.start<t.t?(l=(t.t-r.start)/s,e.t=Math.min(e.t,t.t-l)):r.end>t.b&&(l=(r.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function Cb(e,t,n){const i=e.drawingArea,{extra:r,additionalAngle:a,padding:s,size:o}=n,l=e.getPointPosition(t,i+r+s,a),c=Math.round(zi(ne(l.angle+dt))),u=Ab(l.y,o.h,c),d=kb(c),h=Ob(l.x,o.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+o.w,bottom:u+o.h}}function Pb(e,t){if(!t)return!0;const{left:n,top:i,right:r,bottom:a}=e;return!(Ee({x:n,y:i},t)||Ee({x:n,y:a},t)||Ee({x:r,y:i},t)||Ee({x:r,y:a},t))}function Eb(e,t,n){const i=[],r=e._pointLabels.length,a=e.options,{centerPointLabels:s,display:o}=a.pointLabels,l={extra:Na(a)/2,additionalAngle:s?X/r:0};let c;for(let u=0;u<r;u++){l.padding=n[u],l.size=t[u];const d=Cb(e,u,l);i.push(d),o==="auto"&&(d.visible=Pb(d,c),d.visible&&(c=d))}return i}function kb(e){return e===0||e===180?"center":e<180?"left":"right"}function Ob(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function Ab(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function Rb(e,t,n){const{left:i,top:r,right:a,bottom:s}=n,{backdropColor:o}=t;if(!U(o)){const l=Ue(t.borderRadius),c=Pt(t.backdropPadding);e.fillStyle=o;const u=i-c.left,d=r-c.top,h=a-i+c.width,f=s-r+c.height;Object.values(l).some(p=>p!==0)?(e.beginPath(),wn(e,{x:u,y:d,w:h,h:f,radius:l}),e.fill()):e.fillRect(u,d,h,f)}}function Lb(e,t){const{ctx:n,options:{pointLabels:i}}=e;for(let r=t-1;r>=0;r--){const a=e._pointLabelItems[r];if(!a.visible)continue;const s=i.setContext(e.getPointLabelContext(r));Rb(n,s,a);const o=gt(s.font),{x:l,y:c,textAlign:u}=a;rn(n,e._pointLabels[r],l,c+o.lineHeight/2,o,{color:s.color,textAlign:u,textBaseline:"middle"})}}function du(e,t,n,i){const{ctx:r}=e;if(n)r.arc(e.xCenter,e.yCenter,t,0,ut);else{let a=e.getPointPosition(0,t);r.moveTo(a.x,a.y);for(let s=1;s<i;s++)a=e.getPointPosition(s,t),r.lineTo(a.x,a.y)}}function Ib(e,t,n,i,r){const a=e.ctx,s=t.circular,{color:o,lineWidth:l}=t;!s&&!i||!o||!l||n<0||(a.save(),a.strokeStyle=o,a.lineWidth=l,a.setLineDash(r.dash),a.lineDashOffset=r.dashOffset,a.beginPath(),du(e,n,s,i),a.closePath(),a.stroke(),a.restore())}function Nb(e,t,n){return We(e,{label:n,index:t,type:"pointLabel"})}class fi extends fr{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=Pt(Na(this.options)/2),n=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=yt(t)&&!isNaN(t)?t:0,this.max=yt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Na(this.options))}generateTickLabels(t){fr.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,i)=>{const r=st(this.options.pointLabels.callback,[n,i],this);return r||r===0?r:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?Sb(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,i,r){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,i,r))}getIndexAngle(t){const n=ut/(this._pointLabels.length||1),i=this.options.startAngle||0;return ne(t*n+Ct(i))}getDistanceFromCenterForValue(t){if(U(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(U(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const i=n[t];return Nb(this.getContext(),t,i)}}getPointPosition(t,n,i=0){const r=this.getIndexAngle(t)-dt+i;return{x:Math.cos(r)*n+this.xCenter,y:Math.sin(r)*n+this.yCenter,angle:r}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:i,right:r,bottom:a}=this._pointLabelItems[t];return{left:n,top:i,right:r,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),du(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:i,grid:r,border:a}=n,s=this._pointLabels.length;let o,l,c;if(n.pointLabels.display&&Lb(this,s),r.display&&this.ticks.forEach((u,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),f=r.setContext(h),p=a.setContext(h);Ib(this,f,l,s,p)}}),i.display){for(t.save(),o=s-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:h}=u;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.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,n=this.options,i=n.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&&!n.reverse)return;const c=i.setContext(this.getContext(l)),u=gt(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=Pt(c.backdropPadding);t.fillRect(-s/2-d.left,-a-u.size/2-d.top,s+d.width,u.size+d.height)}rn(t,o.label,0,-a,u,{color:c.color})}),t.restore()}drawTitle(){}}C(fi,"id","radialLinear"),C(fi,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ji.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),C(fi,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),C(fi,"descriptors",{angleLines:{_fallback:"grid"}});const gr={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}},Kt=Object.keys(gr);function Bb(e,t){return e-t}function hu(e,t){if(U(t))return null;const n=e._adapter,{parser:i,round:r,isoWeekday:a}=e._parseOpts;let s=t;return typeof i=="function"&&(s=i(s)),yt(s)||(s=typeof i=="string"?n.parse(s,i):n.parse(s)),s===null?null:(r&&(s=r==="week"&&(Fe(a)||a===!0)?n.startOf(s,"isoWeek",a):n.startOf(s,r)),+s)}function fu(e,t,n,i){const r=Kt.length;for(let a=Kt.indexOf(e);a<r-1;++a){const s=gr[Kt[a]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(o*s.size))<=i)return Kt[a]}return Kt[r-1]}function Hb(e,t,n,i,r){for(let a=Kt.length-1;a>=Kt.indexOf(n);a--){const s=Kt[a];if(gr[s].common&&e._adapter.diff(r,i,s)>=t-1)return s}return Kt[n?Kt.indexOf(n):0]}function Fb(e){for(let t=Kt.indexOf(e)+1,n=Kt.length;t<n;++t)if(gr[Kt[t]].common)return Kt[t]}function gu(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:i,hi:r}=ea(n,t),a=n[i]>=t?n[i]:n[r];e[a]=!0}}function Ub(e,t,n,i){const r=e._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=n[o],l>=0&&(t[l].major=!0);return t}function pu(e,t,n){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||!n?i:Ub(e,i,r,n)}class gi extends cn{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const i=t.time||(t.time={}),r=this._adapter=new ac._date(t.adapters.date);r.init(n),Vn(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:hu(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=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=yt(r)&&!isNaN(r)?r:+n.startOf(Date.now(),i),a=yt(a)&&!isNaN(a)?a:+n.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 n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],i=t[t.length-1]),{min:n,max:i}}buildTicks(){const t=this.options,n=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=_g(r,a,s);return this._unit=n.unit||(i.autoSkip?fu(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):Hb(this,o.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:Fb(this._unit),this.initOffsets(r),t.reverse&&o.reverse(),pu(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,i=0,r,a;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?n=1-r:n=(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;n=Rt(n,0,s),i=Rt(i,0,s),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const t=this._adapter,n=this.min,i=this.max,r=this.options,a=r.time,s=a.unit||fu(a.minUnit,n,i,this._getLabelCapacity(n)),o=H(r.ticks.stepSize,1),l=s==="week"?a.isoWeekday:!1,c=Fe(l)||l===!0,u={};let d=n,h,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(i,n,s)>1e5*o)throw new Error(n+" and "+i+" are too far apart with stepSize of "+o+" "+s);const p=r.ticks.source==="data"&&this.getDataTimestamps();for(h=d,f=0;h<i;h=+t.add(h,o,s),f++)gu(u,h,p);return(h===i||r.bounds==="ticks"||f===1)&&gu(u,h,p),Object.keys(u).sort((y,b)=>y-b).map(y=>+y)}getLabelForValue(t){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){const r=this.options.time.displayFormats,a=this._unit,s=n||r[a];return this._adapter.format(t,s)}_tickFormatFunction(t,n,i,r){const a=this.options,s=a.ticks.callback;if(s)return st(s,[t,n,i],this);const o=a.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&o[l],d=c&&o[c],h=i[n],f=c&&d&&h&&h.major;return this._adapter.format(t,r||(f?d:u))}generateTickLabels(t){let n,i,r;for(n=0,i=t.length;n<i;++n)r=t[n],r.label=this._tickFormatFunction(r.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,i=this.ctx.measureText(t).width,r=Ct(this.isHorizontal()?n.maxRotation:n.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 n=this.options.time,i=n.displayFormats,r=i[n.unit]||i.millisecond,a=this._tickFormatFunction(t,0,pu(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||[],n,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(n=0,i=r.length;n<i;++n)t=t.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,i;if(t.length)return t;const r=this.getLabels();for(n=0,i=r.length;n<i;++n)t.push(hu(this,r[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return pl(t.sort(Bb))}}C(gi,"id","time"),C(gi,"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 pr(e,t,n){let i=0,r=e.length-1,a,s,o,l;n?(t>=e[i].pos&&t<=e[r].pos&&({lo:i,hi:r}=Pe(e,"pos",t)),{pos:a,time:o}=e[i],{pos:s,time:l}=e[r]):(t>=e[i].time&&t<=e[r].time&&({lo:i,hi:r}=Pe(e,"time",t)),{time:a,pos:o}=e[i],{time:s,pos:l}=e[r]);const c=s-a;return c?o+(l-o)*(t-a)/c:o}class Ba extends gi{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=pr(n,this.min),this._tableRange=pr(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:i}=this,r=[],a=[];let s,o,l,c,u;for(s=0,o=t.length;s<o;++s)c=t[s],c>=n&&c<=i&&r.push(c);if(r.length<2)return[{time:n,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}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(pr(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return pr(this._table,i*this._tableRange+this._minPos,!0)}}C(Ba,"id","timeseries"),C(Ba,"defaults",gi.defaults);var Wb=Object.freeze({__proto__:null,CategoryScale:Ra,LinearScale:La,LogarithmicScale:Ia,RadialLinearScale:fi,TimeScale:gi,TimeSeriesScale:Ba});const Yb=[Xp,M0,bb,Wb],zb=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Vb=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],jb=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],$b=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],mu=(e,t,n)=>{let i=e;return typeof t=="string"||Array.isArray(t)?i=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(i=e.toLocaleString(void 0,n)),i};function Ha(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?$b:jb:t.binary?Vb:zb,i=t.space?" ":"";if(t.signed&&e===0)return` 0${i}${n[0]}`;const r=e<0,a=r?"-":t.signed?"+":"";r&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const u=mu(e,t.locale,s);return a+u+i+n[0]}const o=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**o,s||(e=e.toPrecision(3));const l=mu(Number(e),t.locale,s),c=n[o];return a+l+i+c}function Ae(e){"@babel/helpers - typeof";return Ae=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},Ae(e)}function pt(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function R(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function B(e){R(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Ae(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="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 bu(e,t){R(2,arguments);var n=B(e),i=pt(t);return isNaN(i)?new Date(NaN):(i&&n.setDate(n.getDate()+i),n)}function Fa(e,t){R(2,arguments);var n=B(e),i=pt(t);if(isNaN(i))return new Date(NaN);if(!i)return n;var r=n.getDate(),a=new Date(n.getTime());a.setMonth(n.getMonth()+i+1,0);var s=a.getDate();return r>=s?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}function pi(e,t){R(2,arguments);var n=B(e).getTime(),i=pt(t);return new Date(n+i)}var qb=36e5;function Gb(e,t){R(2,arguments);var n=pt(t);return pi(e,n*qb)}var Xb={};function je(){return Xb}function yu(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=je(),d=pt((n=(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&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=B(e),f=h.getDay(),p=(f<d?7:0)+f-d;return h.setDate(h.getDate()-p),h.setHours(0,0,0,0),h}function mr(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Ua(e){R(1,arguments);var t=B(e);return t.setHours(0,0,0,0),t}var Kb=864e5;function Zb(e,t){R(2,arguments);var n=Ua(e),i=Ua(t),r=n.getTime()-mr(n),a=i.getTime()-mr(i);return Math.round((r-a)/Kb)}var Qb=6e4;function Jb(e,t){R(2,arguments);var n=pt(t);return pi(e,n*Qb)}function ty(e,t){R(2,arguments);var n=pt(t),i=n*3;return Fa(e,i)}function ey(e,t){R(2,arguments);var n=pt(t);return pi(e,n*1e3)}function ny(e,t){R(2,arguments);var n=pt(t),i=n*7;return bu(e,i)}function iy(e,t){R(2,arguments);var n=pt(t);return Fa(e,n*12)}function mi(e,t){R(2,arguments);var n=B(e),i=B(t),r=n.getTime()-i.getTime();return r<0?-1:r>0?1:r}var br=6e4,yr=36e5,ry=1e3,ay=3600;function sy(e){return R(1,arguments),e instanceof Date||Ae(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Wa(e){if(R(1,arguments),!sy(e)&&typeof e!="number")return!1;var t=B(e);return!isNaN(Number(t))}function oy(e,t){R(2,arguments);var n=B(e),i=B(t),r=n.getFullYear()-i.getFullYear(),a=n.getMonth()-i.getMonth();return r*12+a}function ly(e,t){R(2,arguments);var n=B(e),i=B(t);return n.getFullYear()-i.getFullYear()}function vu(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function xu(e,t){R(2,arguments);var n=B(e),i=B(t),r=vu(n,i),a=Math.abs(Zb(n,i));n.setDate(n.getDate()-r*a);var s=+(vu(n,i)===-r),o=r*(a-s);return o===0?0:o}function vr(e,t){return R(2,arguments),B(e).getTime()-B(t).getTime()}var _u={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},cy="trunc";function bi(e){return e?_u[e]:_u[cy]}function uy(e,t,n){R(2,arguments);var i=vr(e,t)/yr;return bi(n==null?void 0:n.roundingMethod)(i)}function dy(e,t,n){R(2,arguments);var i=vr(e,t)/br;return bi(n==null?void 0:n.roundingMethod)(i)}function wu(e){R(1,arguments);var t=B(e);return t.setHours(23,59,59,999),t}function Tu(e){R(1,arguments);var t=B(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function hy(e){R(1,arguments);var t=B(e);return wu(t).getTime()===Tu(t).getTime()}function Mu(e,t){R(2,arguments);var n=B(e),i=B(t),r=mi(n,i),a=Math.abs(oy(n,i)),s;if(a<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-r*a);var o=mi(n,i)===-r;hy(B(e))&&a===1&&mi(e,i)===1&&(o=!1),s=r*(a-Number(o))}return s===0?0:s}function fy(e,t,n){R(2,arguments);var i=Mu(e,t)/3;return bi(n==null?void 0:n.roundingMethod)(i)}function gy(e,t,n){R(2,arguments);var i=vr(e,t)/1e3;return bi(n==null?void 0:n.roundingMethod)(i)}function py(e,t,n){R(2,arguments);var i=xu(e,t)/7;return bi(n==null?void 0:n.roundingMethod)(i)}function my(e,t){R(2,arguments);var n=B(e),i=B(t),r=mi(n,i),a=Math.abs(ly(n,i));n.setFullYear(1584),i.setFullYear(1584);var s=mi(n,i)===-r,o=r*(a-Number(s));return o===0?0:o}function by(e){R(1,arguments);var t=B(e);return t.setSeconds(0,0),t}function yy(e){R(1,arguments);var t=B(e),n=t.getMonth(),i=n-n%3;return t.setMonth(i,1),t.setHours(0,0,0,0),t}function vy(e){R(1,arguments);var t=B(e);return t.setDate(1),t.setHours(0,0,0,0),t}function xy(e){R(1,arguments);var t=B(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function _y(e){R(1,arguments);var t=B(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function wy(e){R(1,arguments);var t=B(e);return t.setMinutes(59,59,999),t}function Ty(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=je(),d=pt((n=(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&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=B(e),f=h.getDay(),p=(f<d?-7:0)+6-(f-d);return h.setDate(h.getDate()+p),h.setHours(23,59,59,999),h}function My(e){R(1,arguments);var t=B(e);return t.setSeconds(59,999),t}function Sy(e){R(1,arguments);var t=B(e),n=t.getMonth(),i=n-n%3+3;return t.setMonth(i,0),t.setHours(23,59,59,999),t}function Dy(e){R(1,arguments);var t=B(e);return t.setMilliseconds(999),t}function Su(e,t){R(2,arguments);var n=pt(t);return pi(e,-n)}var Cy=864e5;function Py(e){R(1,arguments);var t=B(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),r=n-i;return Math.floor(r/Cy)+1}function Cn(e){R(1,arguments);var t=1,n=B(e),i=n.getUTCDay(),r=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-r),n.setUTCHours(0,0,0,0),n}function Du(e){R(1,arguments);var t=B(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var r=Cn(i),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var s=Cn(a);return t.getTime()>=r.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Ey(e){R(1,arguments);var t=Du(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=Cn(n);return i}var ky=6048e5;function Cu(e){R(1,arguments);var t=B(e),n=Cn(t).getTime()-Ey(t).getTime();return Math.round(n/ky)+1}function dn(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=je(),d=pt((n=(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&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=B(e),f=h.getUTCDay(),p=(f<d?7:0)+f-d;return h.setUTCDate(h.getUTCDate()-p),h.setUTCHours(0,0,0,0),h}function Ya(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=B(e),d=u.getUTCFullYear(),h=je(),f=pt((n=(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:h.firstWeekContainsDate)!==null&&i!==void 0?i:(l=h.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var y=dn(p,t),b=new Date(0);b.setUTCFullYear(d,0,f),b.setUTCHours(0,0,0,0);var m=dn(b,t);return u.getTime()>=y.getTime()?d+1:u.getTime()>=m.getTime()?d:d-1}function Oy(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=je(),d=pt((n=(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&&n!==void 0?n:1),h=Ya(e,t),f=new Date(0);f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0);var p=dn(f,t);return p}var Ay=6048e5;function Pu(e,t){R(1,arguments);var n=B(e),i=dn(n,t).getTime()-Oy(n,t).getTime();return Math.round(i/Ay)+1}function lt(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var Ry={y:function(t,n){var i=t.getUTCFullYear(),r=i>0?i:1-i;return lt(n==="yy"?r%100:r,n.length)},M:function(t,n){var i=t.getUTCMonth();return n==="M"?String(i+1):lt(i+1,2)},d:function(t,n){return lt(t.getUTCDate(),n.length)},a:function(t,n){var i=t.getUTCHours()/12>=1?"pm":"am";switch(n){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,n){return lt(t.getUTCHours()%12||12,n.length)},H:function(t,n){return lt(t.getUTCHours(),n.length)},m:function(t,n){return lt(t.getUTCMinutes(),n.length)},s:function(t,n){return lt(t.getUTCSeconds(),n.length)},S:function(t,n){var i=n.length,r=t.getUTCMilliseconds(),a=Math.floor(r*Math.pow(10,i-3));return lt(a,n.length)}};const $e=Ry;var Pn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ly={G:function(t,n,i){var r=t.getUTCFullYear()>0?1:0;switch(n){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,n,i){if(n==="yo"){var r=t.getUTCFullYear(),a=r>0?r:1-r;return i.ordinalNumber(a,{unit:"year"})}return $e.y(t,n)},Y:function(t,n,i,r){var a=Ya(t,r),s=a>0?a:1-a;if(n==="YY"){var o=s%100;return lt(o,2)}return n==="Yo"?i.ordinalNumber(s,{unit:"year"}):lt(s,n.length)},R:function(t,n){var i=Du(t);return lt(i,n.length)},u:function(t,n){var i=t.getUTCFullYear();return lt(i,n.length)},Q:function(t,n,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return lt(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,n,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return lt(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,n,i){var r=t.getUTCMonth();switch(n){case"M":case"MM":return $e.M(t,n);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,n,i){var r=t.getUTCMonth();switch(n){case"L":return String(r+1);case"LL":return lt(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,n,i,r){var a=Pu(t,r);return n==="wo"?i.ordinalNumber(a,{unit:"week"}):lt(a,n.length)},I:function(t,n,i){var r=Cu(t);return n==="Io"?i.ordinalNumber(r,{unit:"week"}):lt(r,n.length)},d:function(t,n,i){return n==="do"?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):$e.d(t,n)},D:function(t,n,i){var r=Py(t);return n==="Do"?i.ordinalNumber(r,{unit:"dayOfYear"}):lt(r,n.length)},E:function(t,n,i){var r=t.getUTCDay();switch(n){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,n,i,r){var a=t.getUTCDay(),s=(a-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return lt(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,n,i,r){var a=t.getUTCDay(),s=(a-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return lt(s,n.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,n,i){var r=t.getUTCDay(),a=r===0?7:r;switch(n){case"i":return String(a);case"ii":return lt(a,n.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,n,i){var r=t.getUTCHours(),a=r/12>=1?"pm":"am";switch(n){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,n,i){var r=t.getUTCHours(),a;switch(r===12?a=Pn.noon:r===0?a=Pn.midnight:a=r/12>=1?"pm":"am",n){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,n,i){var r=t.getUTCHours(),a;switch(r>=17?a=Pn.evening:r>=12?a=Pn.afternoon:r>=4?a=Pn.morning:a=Pn.night,n){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,n,i){if(n==="ho"){var r=t.getUTCHours()%12;return r===0&&(r=12),i.ordinalNumber(r,{unit:"hour"})}return $e.h(t,n)},H:function(t,n,i){return n==="Ho"?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):$e.H(t,n)},K:function(t,n,i){var r=t.getUTCHours()%12;return n==="Ko"?i.ordinalNumber(r,{unit:"hour"}):lt(r,n.length)},k:function(t,n,i){var r=t.getUTCHours();return r===0&&(r=24),n==="ko"?i.ordinalNumber(r,{unit:"hour"}):lt(r,n.length)},m:function(t,n,i){return n==="mo"?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):$e.m(t,n)},s:function(t,n,i){return n==="so"?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):$e.s(t,n)},S:function(t,n){return $e.S(t,n)},X:function(t,n,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return ku(s);case"XXXX":case"XX":return hn(s);case"XXXXX":case"XXX":default:return hn(s,":")}},x:function(t,n,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(n){case"x":return ku(s);case"xxxx":case"xx":return hn(s);case"xxxxx":case"xxx":default:return hn(s,":")}},O:function(t,n,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Eu(s,":");case"OOOO":default:return"GMT"+hn(s,":")}},z:function(t,n,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Eu(s,":");case"zzzz":default:return"GMT"+hn(s,":")}},t:function(t,n,i,r){var a=r._originalDate||t,s=Math.floor(a.getTime()/1e3);return lt(s,n.length)},T:function(t,n,i,r){var a=r._originalDate||t,s=a.getTime();return lt(s,n.length)}};function Eu(e,t){var n=e>0?"-":"+",i=Math.abs(e),r=Math.floor(i/60),a=i%60;if(a===0)return n+String(r);var s=t||"";return n+String(r)+s+lt(a,2)}function ku(e,t){if(e%60===0){var n=e>0?"-":"+";return n+lt(Math.abs(e)/60,2)}return hn(e,t)}function hn(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e),a=lt(Math.floor(r/60),2),s=lt(r%60,2);return i+a+n+s}const Iy=Ly;var Ou=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Au=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Ny=function(t,n){var i=t.match(/(P+)(p+)?/)||[],r=i[1],a=i[2];if(!a)return Ou(t,n);var s;switch(r){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",Ou(r,n)).replace("{{time}}",Au(a,n))},By={p:Au,P:Ny};const za=By;var Hy=["D","DD"],Fy=["YY","YYYY"];function Ru(e){return Hy.indexOf(e)!==-1}function Lu(e){return Fy.indexOf(e)!==-1}function xr(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Uy={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"}},Wy=function(t,n,i){var r,a=Uy[t];return typeof a=="string"?r=a:n===1?r=a.one:r=a.other.replace("{{count}}",n.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+r:r+" ago":r};const Yy=Wy;function Va(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}}var zy={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Vy={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jy={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},$y={date:Va({formats:zy,defaultWidth:"full"}),time:Va({formats:Vy,defaultWidth:"full"}),dateTime:Va({formats:jy,defaultWidth:"full"})};const qy=$y;var Gy={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Xy=function(t,n,i,r){return Gy[t]};const Ky=Xy;function yi(e){return function(t,n){var i=n!=null&&n.context?String(n.context):"standalone",r;if(i==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;r=e.formattingValues[s]||e.formattingValues[a]}else{var o=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;r=e.values[l]||e.values[o]}var c=e.argumentCallback?e.argumentCallback(t):t;return r[c]}}var Zy={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Qy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Jy={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"]},tv={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"]},ev={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"}},nv={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"}},iv=function(t,n){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"},rv={ordinalNumber:iv,era:yi({values:Zy,defaultWidth:"wide"}),quarter:yi({values:Qy,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:yi({values:Jy,defaultWidth:"wide"}),day:yi({values:tv,defaultWidth:"wide"}),dayPeriod:yi({values:ev,defaultWidth:"wide",formattingValues:nv,defaultFormattingWidth:"wide"})};const av=rv;function vi(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],a=t.match(r);if(!a)return null;var s=a[0],o=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?ov(o,function(d){return d.test(s)}):sv(o,function(d){return d.test(s)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var u=t.slice(s.length);return{value:c,rest:u}}}function sv(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function ov(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function lv(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var r=i[0],a=t.match(e.parsePattern);if(!a)return null;var s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;var o=t.slice(r.length);return{value:s,rest:o}}}var cv=/^(\d+)(th|st|nd|rd)?/i,uv=/\d+/i,dv={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},hv={any:[/^b/i,/^(a|c)/i]},fv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},gv={any:[/1/i,/2/i,/3/i,/4/i]},pv={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},mv={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]},bv={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},yv={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]},vv={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},xv={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}},_v={ordinalNumber:lv({matchPattern:cv,parsePattern:uv,valueCallback:function(t){return parseInt(t,10)}}),era:vi({matchPatterns:dv,defaultMatchWidth:"wide",parsePatterns:hv,defaultParseWidth:"any"}),quarter:vi({matchPatterns:fv,defaultMatchWidth:"wide",parsePatterns:gv,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:vi({matchPatterns:pv,defaultMatchWidth:"wide",parsePatterns:mv,defaultParseWidth:"any"}),day:vi({matchPatterns:bv,defaultMatchWidth:"wide",parsePatterns:yv,defaultParseWidth:"any"}),dayPeriod:vi({matchPatterns:vv,defaultMatchWidth:"any",parsePatterns:xv,defaultParseWidth:"any"})},wv={code:"en-US",formatDistance:Yy,formatLong:qy,formatRelative:Ky,localize:av,match:_v,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Iu=wv;var Tv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Mv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Sv=/^'([^]*?)'?$/,Dv=/''/g,Cv=/[a-zA-Z]/;function Pv(e,t,n){var i,r,a,s,o,l,c,u,d,h,f,p,y,b,m,v,x,w;R(2,arguments);var _=String(t),T=je(),M=(i=(r=n==null?void 0:n.locale)!==null&&r!==void 0?r:T.locale)!==null&&i!==void 0?i:Iu,S=pt((a=(s=(o=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&o!==void 0?o:T.firstWeekContainsDate)!==null&&s!==void 0?s:(d=T.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=pt((f=(p=(y=(b=n==null?void 0:n.weekStartsOn)!==null&&b!==void 0?b:n==null||(m=n.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&y!==void 0?y:T.weekStartsOn)!==null&&p!==void 0?p:(x=T.locale)===null||x===void 0||(w=x.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&f!==void 0?f:0);if(!(D>=0&&D<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!M.localize)throw new RangeError("locale must contain localize property");if(!M.formatLong)throw new RangeError("locale must contain formatLong property");var E=B(e);if(!Wa(E))throw new RangeError("Invalid time value");var k=mr(E),L=Su(E,k),q={firstWeekContainsDate:S,weekStartsOn:D,locale:M,_originalDate:E},ct=_.match(Mv).map(function(N){var W=N[0];if(W==="p"||W==="P"){var J=za[W];return J(N,M.formatLong)}return N}).join("").match(Tv).map(function(N){if(N==="''")return"'";var W=N[0];if(W==="'")return Ev(N);var J=Iy[W];if(J)return!(n!=null&&n.useAdditionalWeekYearTokens)&&Lu(N)&&xr(N,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&Ru(N)&&xr(N,t,String(e)),J(L,N,M.localize,q);if(W.match(Cv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+W+"`");return N}).join("");return ct}function Ev(e){var t=e.match(Sv);return t?t[1].replace(Dv,"'"):e}function kv(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function Nu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Ov(e,t){if(e){if(typeof e=="string")return Nu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nu(e,t)}}function Bu(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ov(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(c){throw c},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
40
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,o;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(s)throw o}}}}function O(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ja(e,t){return ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},ja(e,t)}function tt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ja(e,t)}function _r(e){return _r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_r(e)}function Av(){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 Rv(e,t){if(t&&(Ae(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}function et(e){var t=Av();return function(){var i=_r(e),r;if(t){var a=_r(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return Rv(this,r)}}function K(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lv(e,t){if(Ae(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if(Ae(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hu(e){var t=Lv(e,"string");return Ae(t)==="symbol"?t:String(t)}function Fu(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Hu(i.key),i)}}function Z(e,t,n){return t&&Fu(e.prototype,t),n&&Fu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function P(e,t,n){return t=Hu(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Iv=10,Uu=function(){function e(){K(this,e),P(this,"priority",void 0),P(this,"subPriority",0)}return Z(e,[{key:"validate",value:function(n,i){return!0}}]),e}(),Nv=function(e){tt(n,e);var t=et(n);function n(i,r,a,s,o){var l;return K(this,n),l=t.call(this),l.value=i,l.validateValue=r,l.setValue=a,l.priority=s,o&&(l.subPriority=o),l}return Z(n,[{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)}}]),n}(Uu),Bv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",Iv),P(O(i),"subPriority",-1),i}return Z(n,[{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}}]),n}(Uu),it=function(){function e(){K(this,e),P(this,"incompatibleTokens",void 0),P(this,"priority",void 0),P(this,"subPriority",void 0)}return Z(e,[{key:"run",value:function(n,i,r,a){var s=this.parse(n,i,r,a);return s?{setter:new Nv(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(n,i,r){return!0}}]),e}(),Hv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",140),P(O(i),"incompatibleTokens",["R","u","t","T"]),i}return Z(n,[{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}}]),n}(it),St={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}/},ye={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 Dt(e,t){return e&&{value:t(e.value),rest:e.rest}}function _t(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function ve(e,t){var n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};var i=n[1]==="+"?1:-1,r=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:i*(r*yr+a*br+s*ry),rest:t.slice(n[0].length)}}function Wu(e){return _t(St.anyDigitsSigned,e)}function Mt(e,t){switch(e){case 1:return _t(St.singleDigit,t);case 2:return _t(St.twoDigits,t);case 3:return _t(St.threeDigits,t);case 4:return _t(St.fourDigits,t);default:return _t(new RegExp("^\\d{1,"+e+"}"),t)}}function wr(e,t){switch(e){case 1:return _t(St.singleDigitSigned,t);case 2:return _t(St.twoDigitsSigned,t);case 3:return _t(St.threeDigitsSigned,t);case 4:return _t(St.fourDigitsSigned,t);default:return _t(new RegExp("^-?\\d{1,"+e+"}"),t)}}function $a(e){switch(e){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 Yu(e,t){var n=t>0,i=n?t:1-t,r;if(i<=50)r=e||100;else{var a=i+50,s=Math.floor(a/100)*100,o=e>=a%100;r=e+s-(o?100:0)}return n?r:1-r}function zu(e){return e%400===0||e%4===0&&e%100!==0}var Fv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",130),P(O(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="yy"}};switch(a){case"y":return Dt(Mt(4,r),o);case"yo":return Dt(s.ordinalNumber(r,{unit:"year"}),o);default:return Dt(Mt(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=Yu(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}}]),n}(it),Uv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",130),P(O(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return Dt(Mt(4,r),o);case"Yo":return Dt(s.ordinalNumber(r,{unit:"year"}),o);default:return Dt(Mt(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=Ya(r,o);if(s.isTwoDigitYear){var c=Yu(s.year,l);return r.setUTCFullYear(c,0,o.firstWeekContainsDate),r.setUTCHours(0,0,0,0),dn(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),dn(r,o)}}]),n}(it),Wv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",130),P(O(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a){return wr(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),Cn(o)}}]),n}(it),Yv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",130),P(O(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a){return wr(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}}]),n}(it),zv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",120),P(O(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"Q":case"QQ":return Mt(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}}]),n}(it),Vv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",120),P(O(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"q":case"qq":return Mt(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}}]),n}(it),jv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),P(O(i),"priority",110),i}return Z(n,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"M":return Dt(_t(St.month,r),o);case"MM":return Dt(Mt(2,r),o);case"Mo":return Dt(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}}]),n}(it),$v=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",110),P(O(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"L":return Dt(_t(St.month,r),o);case"LL":return Dt(Mt(2,r),o);case"Lo":return Dt(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}}]),n}(it);function qv(e,t,n){R(2,arguments);var i=B(e),r=pt(t),a=Pu(i,n)-r;return i.setUTCDate(i.getUTCDate()-a*7),i}var Gv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",100),P(O(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"w":return _t(St.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s,o){return dn(qv(r,s,o),o)}}]),n}(it);function Xv(e,t){R(2,arguments);var n=B(e),i=pt(t),r=Cu(n)-i;return n.setUTCDate(n.getUTCDate()-r*7),n}var Kv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",100),P(O(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"I":return _t(St.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s){return Cn(Xv(r,s))}}]),n}(it),Zv=[31,28,31,30,31,30,31,31,30,31,30,31],Qv=[31,29,31,30,31,30,31,31,30,31,30,31],Jv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",90),P(O(i),"subPriority",1),P(O(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"d":return _t(St.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=zu(s),l=r.getUTCMonth();return o?a>=1&&a<=Qv[l]:a>=1&&a<=Zv[l]}},{key:"set",value:function(r,a,s){return r.setUTCDate(s),r.setUTCHours(0,0,0,0),r}}]),n}(it),tx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",90),P(O(i),"subpriority",1),P(O(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"D":case"DD":return _t(St.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=zu(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}}]),n}(it);function qa(e,t,n){var i,r,a,s,o,l,c,u;R(2,arguments);var d=je(),h=pt((i=(r=(a=(s=n==null?void 0:n.weekStartsOn)!==null&&s!==void 0?s:n==null||(o=n.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(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=B(e),p=pt(t),y=f.getUTCDay(),b=p%7,m=(b+7)%7,v=(m<h?7:0)+p-y;return f.setUTCDate(f.getUTCDate()+v),f}var ex=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",90),P(O(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return Z(n,[{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=qa(r,s,o),r.setUTCHours(0,0,0,0),r}}]),n}(it),nx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",90),P(O(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return Z(n,[{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 Dt(Mt(a.length,r),l);case"eo":return Dt(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=qa(r,s,o),r.setUTCHours(0,0,0,0),r}}]),n}(it),ix=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",90),P(O(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return Z(n,[{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 Dt(Mt(a.length,r),l);case"co":return Dt(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=qa(r,s,o),r.setUTCHours(0,0,0,0),r}}]),n}(it);function rx(e,t){R(2,arguments);var n=pt(t);n%7===0&&(n=n-7);var i=1,r=B(e),a=r.getUTCDay(),s=n%7,o=(s+7)%7,l=(o<i?7:0)+n-a;return r.setUTCDate(r.getUTCDate()+l),r}var ax=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",90),P(O(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){var o=function(c){return c===0?7:c};switch(a){case"i":case"ii":return Mt(a.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return Dt(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 Dt(s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Dt(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiii":default:return Dt(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=rx(r,s),r.setUTCHours(0,0,0,0),r}}]),n}(it),sx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",80),P(O(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return Z(n,[{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($a(s),0,0,0),r}}]),n}(it),ox=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",80),P(O(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return Z(n,[{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($a(s),0,0,0),r}}]),n}(it),lx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",80),P(O(i),"incompatibleTokens",["a","b","t","T"]),i}return Z(n,[{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($a(s),0,0,0),r}}]),n}(it),cx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",70),P(O(i),"incompatibleTokens",["H","K","k","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"h":return _t(St.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return Mt(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}}]),n}(it),ux=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",70),P(O(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"H":return _t(St.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return Mt(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}}]),n}(it),dx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",70),P(O(i),"incompatibleTokens",["h","H","k","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"K":return _t(St.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return Mt(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}}]),n}(it),hx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",70),P(O(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"k":return _t(St.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return Mt(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}}]),n}(it),fx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",60),P(O(i),"incompatibleTokens",["t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"m":return _t(St.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return Mt(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}}]),n}(it),gx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",50),P(O(i),"incompatibleTokens",["t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"s":return _t(St.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return Mt(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}}]),n}(it),px=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",30),P(O(i),"incompatibleTokens",["t","T"]),i}return Z(n,[{key:"parse",value:function(r,a){var s=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return Dt(Mt(a.length,r),s)}},{key:"set",value:function(r,a,s){return r.setUTCMilliseconds(s),r}}]),n}(it),mx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",10),P(O(i),"incompatibleTokens",["t","T","x"]),i}return Z(n,[{key:"parse",value:function(r,a){switch(a){case"X":return ve(ye.basicOptionalMinutes,r);case"XX":return ve(ye.basic,r);case"XXXX":return ve(ye.basicOptionalSeconds,r);case"XXXXX":return ve(ye.extendedOptionalSeconds,r);case"XXX":default:return ve(ye.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),n}(it),bx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",10),P(O(i),"incompatibleTokens",["t","T","X"]),i}return Z(n,[{key:"parse",value:function(r,a){switch(a){case"x":return ve(ye.basicOptionalMinutes,r);case"xx":return ve(ye.basic,r);case"xxxx":return ve(ye.basicOptionalSeconds,r);case"xxxxx":return ve(ye.extendedOptionalSeconds,r);case"xxx":default:return ve(ye.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),n}(it),yx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",40),P(O(i),"incompatibleTokens","*"),i}return Z(n,[{key:"parse",value:function(r){return Wu(r)}},{key:"set",value:function(r,a,s){return[new Date(s*1e3),{timestampIsSet:!0}]}}]),n}(it),vx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),P(O(i),"priority",20),P(O(i),"incompatibleTokens","*"),i}return Z(n,[{key:"parse",value:function(r){return Wu(r)}},{key:"set",value:function(r,a,s){return[new Date(s),{timestampIsSet:!0}]}}]),n}(it),xx={G:new Hv,y:new Fv,Y:new Uv,R:new Wv,u:new Yv,Q:new zv,q:new Vv,M:new jv,L:new $v,w:new Gv,I:new Kv,d:new Jv,D:new tx,E:new ex,e:new nx,c:new ix,i:new ax,a:new sx,b:new ox,B:new lx,h:new cx,H:new ux,K:new dx,k:new hx,m:new fx,s:new gx,S:new px,X:new mx,x:new bx,t:new yx,T:new vx},_x=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Tx=/^'([^]*?)'?$/,Mx=/''/g,Sx=/\S/,Dx=/[a-zA-Z]/;function Cx(e,t,n,i){var r,a,s,o,l,c,u,d,h,f,p,y,b,m,v,x,w,_;R(3,arguments);var T=String(e),M=String(t),S=je(),D=(r=(a=i==null?void 0:i.locale)!==null&&a!==void 0?a:S.locale)!==null&&r!==void 0?r:Iu;if(!D.match)throw new RangeError("locale must contain match property");var E=pt((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:(h=S.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=pt((p=(y=(b=(m=i==null?void 0:i.weekStartsOn)!==null&&m!==void 0?m:i==null||(v=i.locale)===null||v===void 0||(x=v.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&b!==void 0?b:S.weekStartsOn)!==null&&y!==void 0?y:(w=S.locale)===null||w===void 0||(_=w.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&p!==void 0?p:0);if(!(k>=0&&k<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(M==="")return T===""?B(n):new Date(NaN);var L={firstWeekContainsDate:E,weekStartsOn:k,locale:D},q=[new Bv],ct=M.match(wx).map(function(ht){var $=ht[0];if($ in za){var It=za[$];return It(ht,D.formatLong)}return ht}).join("").match(_x),N=[],W=Bu(ct),J;try{var Lt=function(){var $=J.value;!(i!=null&&i.useAdditionalWeekYearTokens)&&Lu($)&&xr($,M,e),!(i!=null&&i.useAdditionalDayOfYearTokens)&&Ru($)&&xr($,M,e);var It=$[0],de=xx[It];if(de){var A=de.incompatibleTokens;if(Array.isArray(A)){var F=N.find(function(rt){return A.includes(rt.token)||rt.token===It});if(F)throw new RangeError("The format string mustn't contain `".concat(F.fullToken,"` and `").concat($,"` at the same time"))}else if(de.incompatibleTokens==="*"&&N.length>0)throw new RangeError("The format string mustn't contain `".concat($,"` and any other token at the same time"));N.push({token:It,fullToken:$});var Y=de.run(T,$,D.match,L);if(!Y)return{v:new Date(NaN)};q.push(Y.setter),T=Y.rest}else{if(It.match(Dx))throw new RangeError("Format string contains an unescaped latin alphabet character `"+It+"`");if($==="''"?$="'":It==="'"&&($=Px($)),T.indexOf($)===0)T=T.slice($.length);else return{v:new Date(NaN)}}};for(W.s();!(J=W.n()).done;){var mt=Lt();if(Ae(mt)==="object")return mt.v}}catch(ht){W.e(ht)}finally{W.f()}if(T.length>0&&Sx.test(T))return new Date(NaN);var Zt=q.map(function(ht){return ht.priority}).sort(function(ht,$){return $-ht}).filter(function(ht,$,It){return It.indexOf(ht)===$}).map(function(ht){return q.filter(function($){return $.priority===ht}).sort(function($,It){return It.subPriority-$.subPriority})}).map(function(ht){return ht[0]}),Qt=B(n);if(isNaN(Qt.getTime()))return new Date(NaN);var At=Su(Qt,mr(Qt)),Jt={},Wt=Bu(Zt),bt;try{for(Wt.s();!(bt=Wt.n()).done;){var oe=bt.value;if(!oe.validate(At,L))return new Date(NaN);var ie=oe.set(At,Jt,L);Array.isArray(ie)?(At=ie[0],kv(Jt,ie[1])):At=ie}}catch(ht){Wt.e(ht)}finally{Wt.f()}return At}function Px(e){return e.match(Tx)[1].replace(Mx,"'")}function Ex(e){R(1,arguments);var t=B(e);return t.setMinutes(0,0,0),t}function kx(e){R(1,arguments);var t=B(e);return t.setMilliseconds(0),t}function Vu(e,t){var n;R(1,arguments);var i=pt((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(i!==2&&i!==1&&i!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var r=Lx(e),a;if(r.date){var s=Ix(r.date,i);a=Nx(s.restDateString,s.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var o=a.getTime(),l=0,c;if(r.time&&(l=Bx(r.time),isNaN(l)))return new Date(NaN);if(r.timezone){if(c=Hx(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 Tr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Ox=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Ax=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Rx=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Lx(e){var t={},n=e.split(Tr.dateTimeDelimiter),i;if(n.length>2)return t;if(/:/.test(n[0])?i=n[0]:(t.date=n[0],i=n[1],Tr.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Tr.timeZoneDelimiter)[0],i=e.substr(t.date.length,e.length))),i){var r=Tr.timezone.exec(i);r?(t.time=i.replace(r[1],""),t.timezone=r[1]):t.time=i}return t}function Ix(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=e.match(n);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:e.slice((i[1]||i[2]).length)}}function Nx(e,t){if(t===null)return new Date(NaN);var n=e.match(Ox);if(!n)return new Date(NaN);var i=!!n[4],r=xi(n[1]),a=xi(n[2])-1,s=xi(n[3]),o=xi(n[4]),l=xi(n[5])-1;if(i)return zx(t,o,l)?Fx(t,o,l):new Date(NaN);var c=new Date(0);return!Wx(t,a,s)||!Yx(t,r)?new Date(NaN):(c.setUTCFullYear(t,a,Math.max(r,s)),c)}function xi(e){return e?parseInt(e):1}function Bx(e){var t=e.match(Ax);if(!t)return NaN;var n=Ga(t[1]),i=Ga(t[2]),r=Ga(t[3]);return Vx(n,i,r)?n*yr+i*br+r*1e3:NaN}function Ga(e){return e&&parseFloat(e.replace(",","."))||0}function Hx(e){if(e==="Z")return 0;var t=e.match(Rx);if(!t)return 0;var n=t[1]==="+"?-1:1,i=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return jx(i,r)?n*(i*yr+r*br):NaN}function Fx(e,t,n){var i=new Date(0);i.setUTCFullYear(e,0,4);var r=i.getUTCDay()||7,a=(t-1)*7+n+1-r;return i.setUTCDate(i.getUTCDate()+a),i}var Ux=[31,null,31,30,31,30,31,31,30,31,30,31];function ju(e){return e%400===0||e%4===0&&e%100!==0}function Wx(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Ux[t]||(ju(e)?29:28))}function Yx(e,t){return t>=1&&t<=(ju(e)?366:365)}function zx(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Vx(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function jx(e,t){return t>=0&&t<=59}function $x(e){R(1,arguments);var t=e/ay;return Math.floor(t)}var qx=Object.defineProperty,Gx=(e,t,n)=>t in e?qx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xe=(e,t,n)=>(Gx(e,typeof t!="symbol"?t+"":t,n),n),z=(e=>(e.MINUTELY="Minutely",e.HOURLY="Hourly",e.DAILY="Daily",e.WEEKLY="Weekly",e))(z||{}),wt=(e=>(e.FIFTEEN_MIN="15m",e.ONE_HOUR="1h",e.SIX_HOUR="6h",e.TWELVE_HOUR="12h",e.ONE_DAY="24h",e.SEVEN_DAY="7d",e.THIRTY_DAY="30d",e.CURRENT_WEEK="current_week",e.CURRENT_MONTH="current_month",e.CURRENT_QUARTER="current_quarter",e.PREVIOUS_WEEK="previous_week",e.PREVIOUS_MONTH="previous_month",e.PREVIOUS_QUARTER="previous_quarter",e))(wt||{}),Ot=(e=>(e.DOUGHNUT="Doughnut",e.HORIZONTAL_BAR="HorizontalBar",e.VERTICAL_BAR="VerticalBar",e.TIMESERIES_LINE="Line",e.TIMESERIES_BAR="TimeSeriesBar",e))(Ot||{});const Xx={[z.MINUTELY]:60*1e3,[z.HOURLY]:60*60*1e3,[z.DAILY]:60*60*24*1e3,[z.WEEKLY]:60*60*24*7*1e3};function _i(e){return e&&Object.values(z).find(t=>e<=Xx[t])||null}function Xa(e){"@babel/helpers - typeof";return Xa=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},Xa(e)}function Mr(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function _e(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function En(e){_e(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Xa(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="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 $u(e,t){_e(2,arguments);var n=En(e),i=Mr(t);return isNaN(i)?new Date(NaN):(i&&n.setDate(n.getDate()+i),n)}function Kx(e,t){_e(2,arguments);var n=En(e),i=Mr(t);if(isNaN(i))return new Date(NaN);if(!i)return n;var r=n.getDate(),a=new Date(n.getTime());a.setMonth(n.getMonth()+i+1,0);var s=a.getDate();return r>=s?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}var Zx={};function Qx(){return Zx}function Sr(e,t){var n,i,r,a,s,o,l,c;_e(1,arguments);var u=Qx(),d=Mr((n=(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&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=En(e),f=h.getDay(),p=(f<d?7:0)+f-d;return h.setDate(h.getDate()-p),h.setHours(0,0,0,0),h}function qu(e){_e(1,arguments);var t=En(e);return t.setHours(0,0,0,0),t}var Jx=60,t_=3600;function kn(e){_e(1,arguments);var t=En(e);return t.setDate(1),t.setHours(0,0,0,0),t}function e_(e){_e(1,arguments);var t=En(e),n=t.getFullYear(),i=t.getMonth(),r=new Date(0);return r.setFullYear(n,i+1,0),r.setHours(0,0,0,0),r.getDate()}function n_(e){return _e(1,arguments),Math.floor(e*t_)}function i_(e){_e(1,arguments);var t=e/Jx;return Math.floor(t)}function r_(e,t){_e(2,arguments);var n=Mr(t);return Kx(e,-n)}class ue{constructor(t){xe(this,"timeframeText"),xe(this,"key"),xe(this,"display"),xe(this,"timeframeLength"),xe(this,"allowedTiers"),xe(this,"defaultResponseGranularity"),xe(this,"dataGranularity"),xe(this,"isRelative"),xe(this,"_startCustom"),xe(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(){return this._endCustom||new Date}rawStart(){return this._startCustom||new Date(this.rawEnd().getTime()-this.timeframeLengthMs())}timeframeLengthMs(){return this.timeframeLength()*1e3}maximumTimeframeLength(){return this.timeframeLength()}allowedGranularities(){const t=new Set,n=this.maximumTimeframeLength()/3600;return n<=6&&t.add(z.MINUTELY),n>=2&&n<=7*24&&t.add(z.HOURLY),n>=2*24&&t.add(z.DAILY),n>=2*24*14&&t.add(z.WEEKLY),t}}class a_ extends ue{rawStart(){return Sr(new Date,{weekStartsOn:1})}maximumTimeframeLength(){return 60*60*24*7}}class s_ extends ue{rawStart(){return kn(new Date)}maximumTimeframeLength(){return 60*60*24*31}}class o_ extends ue{rawEnd(){return Sr(new Date,{weekStartsOn:1})}rawStart(){return Sr(new Date().setDate(new Date().getDate()-7),{weekStartsOn:1})}}class l_ extends ue{rawEnd(){return kn(new Date)}rawStart(){return kn(new Date().setMonth(new Date().getMonth()-1))}}wt.FIFTEEN_MIN,new ue({key:wt.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>60*15,defaultResponseGranularity:z.MINUTELY,dataGranularity:z.MINUTELY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),wt.ONE_HOUR,new ue({key:wt.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>60*60*1,defaultResponseGranularity:z.MINUTELY,dataGranularity:z.MINUTELY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),wt.SIX_HOUR,new ue({key:wt.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>60*60*6,defaultResponseGranularity:z.HOURLY,dataGranularity:z.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),wt.TWELVE_HOUR,new ue({key:wt.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>60*60*12,defaultResponseGranularity:z.HOURLY,dataGranularity:z.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),wt.ONE_DAY,new ue({key:wt.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>60*60*24,defaultResponseGranularity:z.HOURLY,dataGranularity:z.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),wt.SEVEN_DAY,new ue({key:wt.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),wt.THIRTY_DAY,new ue({key:wt.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>60*60*24*30,defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),wt.CURRENT_WEEK,new a_({key:wt.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const e=Sr(new Date,{weekStartsOn:1});return(qu($u(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),wt.CURRENT_MONTH,new s_({key:wt.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const e=kn(new Date);return(qu($u(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),wt.PREVIOUS_WEEK,new o_({key:wt.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),wt.PREVIOUS_MONTH,new l_({key:wt.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let e=0;const t=kn(new Date),n=kn(r_(new Date,1));return t.getTimezoneOffset()!==n.getTimezoneOffset()&&(e=c_(t,n)),60*60*24*e_(new Date().setMonth(new Date().getMonth()-1))+n_(e)},defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]});function c_(e,t){return i_(e.getTimezoneOffset()-t.getTimezoneOffset())}var Et=(e=>(e.Hidden="hidden",e.Right="right",e.Bottom="bottom",e))(Et||{});const Ka=(e,t)=>{var i,r;const{tooltip:n}=t;if(n.opacity===0){e.showTooltip=!1;return}if(n.body){const a=n.labelColors,s=((r=(i=t.chart.config)==null?void 0:i.options)==null?void 0:r.indexAxis)==="y"?"x":"y",o=[Ot.HORIZONTAL_BAR,Ot.VERTICAL_BAR].includes(e.chartType),l=e.chartType===Ot.DOUGHNUT;e.tooltipContext=n.dataPoints[0].parsed.x,e.tooltipSeries=n.dataPoints.map((c,u)=>{const d=l?c.parsed:c.parsed[s];let h;e.units==="bytes"?h=isNaN(d)?d:Ha(d):h=`${d%1===0?Ys.format(d):Ys.format(Number(d.toFixed(Mw)))} ${e.units}`;const f=o&&c.dataset.label!==c.label?`${c.dataset.label} - ${c.label}`:l?c.dataset.labels[c.dataIndex]:c.dataset.label;return{backgroundColor:a[u].backgroundColor,borderColor:a[u].borderColor,label:f,value:h,rawValue:d}}).sort((c,u)=>u.rawValue-c.rawValue),e.left=`${n.x}px`,e.top=`${n.y}px`,e.showTooltip=!0}},u_=e=>e&&e.datasets&&e.datasets.length,d_=e=>u_(e)&&e.datasets.some(t=>t.data.length),Gu=e=>d_(e)&&e.datasets.some(t=>t.data.length>1),Xu=e=>Gu(e)&&e.datasets.some(t=>t.data[0]&&Wa(t.data[0].x)),Ku=e=>Xu(e)&&e.datasets.some(t=>t.data[0]&&t.data[0].x.toString().length>=13),Za=(e,t,n)=>{const r=Math.min(t/1150,1),a=.15,s=1.15;return e.x<n?e.x+t*a*(1-r):e.x-t*s*(1-r)},h_=(e,t,n)=>e.y<n?e.y+t*.15:e.y-t*.5;function wi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qa={exports:{}},Zu={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Zu);var Tt=Zu.exports,Ja={exports:{}},ts={exports:{}},Qu={exports:{}};(function(e){function t(n){"@babel/helpers - typeof";return e.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},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Qu);var Ju=Qu.exports,es={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i,r){if(r.length<i)throw new TypeError(i+" argument"+(i>1?"s":"")+" required, but only "+r.length+" present")}e.exports=t.default})(es,es.exports);var Vt=es.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(Ju),r=n(Vt);function a(s){return(0,r.default)(1,arguments),s instanceof Date||(0,i.default)(s)==="object"&&Object.prototype.toString.call(s)==="[object Date]"}e.exports=t.default})(ts,ts.exports);var f_=ts.exports,ns={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(Ju),r=n(Vt);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))}e.exports=t.default})(ns,ns.exports);var we=ns.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(f_),r=n(we),a=n(Vt);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))}e.exports=t.default})(Ja,Ja.exports);var g_=Ja.exports,is={exports:{}},rs={exports:{}},as={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(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)}e.exports=t.default})(as,as.exports);var fn=as.exports;const p_=wi(fn);(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(fn),r=n(we),a=n(Vt);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)}e.exports=t.default})(rs,rs.exports);var m_=rs.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(m_),r=n(Vt),a=n(fn);function s(o,l){(0,r.default)(2,arguments);var c=(0,a.default)(l);return(0,i.default)(o,-c)}e.exports=t.default})(is,is.exports);var b_=is.exports,ss={exports:{}},os={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(we),r=n(Vt),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}e.exports=t.default})(os,os.exports);var y_=os.exports,ls={exports:{}},cs={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(we),r=n(Vt);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}e.exports=t.default})(cs,cs.exports);var us=cs.exports,ds={exports:{}},hs={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(we),r=n(Vt),a=n(us);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),h=new Date(0);h.setUTCFullYear(c,0,4),h.setUTCHours(0,0,0,0);var f=(0,a.default)(h);return l.getTime()>=d.getTime()?c+1:l.getTime()>=f.getTime()?c:c-1}e.exports=t.default})(hs,hs.exports);var td=hs.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(td),r=n(us),a=n(Vt);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}e.exports=t.default})(ds,ds.exports);var v_=ds.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(we),r=n(us),a=n(v_),s=n(Vt),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}e.exports=t.default})(ls,ls.exports);var x_=ls.exports,fs={exports:{}},gs={exports:{}},gn={};Object.defineProperty(gn,"__esModule",{value:!0}),gn.getDefaultOptions=__,gn.setDefaultOptions=w_;var ed={};function __(){return ed}function w_(e){ed=e}(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(we),r=n(Vt),a=n(fn),s=gn;function o(l,c){var u,d,h,f,p,y,b,m;(0,r.default)(1,arguments);var v=(0,s.getDefaultOptions)(),x=(0,a.default)((u=(d=(h=(f=c==null?void 0:c.weekStartsOn)!==null&&f!==void 0?f:c==null||(p=c.locale)===null||p===void 0||(y=p.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&h!==void 0?h:v.weekStartsOn)!==null&&d!==void 0?d:(b=v.locale)===null||b===void 0||(m=b.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&u!==void 0?u:0);if(!(x>=0&&x<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var w=(0,i.default)(l),_=w.getUTCDay(),T=(_<x?7:0)+_-x;return w.setUTCDate(w.getUTCDate()-T),w.setUTCHours(0,0,0,0),w}e.exports=t.default})(gs,gs.exports);var ps=gs.exports,ms={exports:{}},bs={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(we),r=n(Vt),a=n(ps),s=n(fn),o=gn;function l(c,u){var d,h,f,p,y,b,m,v;(0,r.default)(1,arguments);var x=(0,i.default)(c),w=x.getUTCFullYear(),_=(0,o.getDefaultOptions)(),T=(0,s.default)((d=(h=(f=(p=u==null?void 0:u.firstWeekContainsDate)!==null&&p!==void 0?p:u==null||(y=u.locale)===null||y===void 0||(b=y.options)===null||b===void 0?void 0:b.firstWeekContainsDate)!==null&&f!==void 0?f:_.firstWeekContainsDate)!==null&&h!==void 0?h:(m=_.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=new Date(0);M.setUTCFullYear(w+1,0,T),M.setUTCHours(0,0,0,0);var S=(0,a.default)(M,u),D=new Date(0);D.setUTCFullYear(w,0,T),D.setUTCHours(0,0,0,0);var E=(0,a.default)(D,u);return x.getTime()>=S.getTime()?w+1:x.getTime()>=E.getTime()?w:w-1}e.exports=t.default})(bs,bs.exports);var nd=bs.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(nd),r=n(Vt),a=n(ps),s=n(fn),o=gn;function l(c,u){var d,h,f,p,y,b,m,v;(0,r.default)(1,arguments);var x=(0,o.getDefaultOptions)(),w=(0,s.default)((d=(h=(f=(p=u==null?void 0:u.firstWeekContainsDate)!==null&&p!==void 0?p:u==null||(y=u.locale)===null||y===void 0||(b=y.options)===null||b===void 0?void 0:b.firstWeekContainsDate)!==null&&f!==void 0?f:x.firstWeekContainsDate)!==null&&h!==void 0?h:(m=x.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1),_=(0,i.default)(c,u),T=new Date(0);T.setUTCFullYear(_,0,w),T.setUTCHours(0,0,0,0);var M=(0,a.default)(T,u);return M}e.exports=t.default})(ms,ms.exports);var T_=ms.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(we),r=n(ps),a=n(T_),s=n(Vt),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,i.default)(c),h=(0,r.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(h/o)+1}e.exports=t.default})(fs,fs.exports);var M_=fs.exports,ys={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i,r){for(var a=i<0?"-":"",s=Math.abs(i).toString();s.length<r;)s="0"+s;return a+s}e.exports=t.default})(ys,ys.exports);var id=ys.exports,vs={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(id),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,e.exports=t.default})(vs,vs.exports);var S_=vs.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(y_),r=n(x_),a=n(td),s=n(M_),o=n(nd),l=n(id),c=n(S_),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(m,v,x){var w=m.getUTCFullYear()>0?1:0;switch(v){case"G":case"GG":case"GGG":return x.era(w,{width:"abbreviated"});case"GGGGG":return x.era(w,{width:"narrow"});case"GGGG":default:return x.era(w,{width:"wide"})}},y:function(m,v,x){if(v==="yo"){var w=m.getUTCFullYear(),_=w>0?w:1-w;return x.ordinalNumber(_,{unit:"year"})}return c.default.y(m,v)},Y:function(m,v,x,w){var _=(0,o.default)(m,w),T=_>0?_:1-_;if(v==="YY"){var M=T%100;return(0,l.default)(M,2)}return v==="Yo"?x.ordinalNumber(T,{unit:"year"}):(0,l.default)(T,v.length)},R:function(m,v){var x=(0,a.default)(m);return(0,l.default)(x,v.length)},u:function(m,v){var x=m.getUTCFullYear();return(0,l.default)(x,v.length)},Q:function(m,v,x){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 x.ordinalNumber(w,{unit:"quarter"});case"QQQ":return x.quarter(w,{width:"abbreviated",context:"formatting"});case"QQQQQ":return x.quarter(w,{width:"narrow",context:"formatting"});case"QQQQ":default:return x.quarter(w,{width:"wide",context:"formatting"})}},q:function(m,v,x){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 x.ordinalNumber(w,{unit:"quarter"});case"qqq":return x.quarter(w,{width:"abbreviated",context:"standalone"});case"qqqqq":return x.quarter(w,{width:"narrow",context:"standalone"});case"qqqq":default:return x.quarter(w,{width:"wide",context:"standalone"})}},M:function(m,v,x){var w=m.getUTCMonth();switch(v){case"M":case"MM":return c.default.M(m,v);case"Mo":return x.ordinalNumber(w+1,{unit:"month"});case"MMM":return x.month(w,{width:"abbreviated",context:"formatting"});case"MMMMM":return x.month(w,{width:"narrow",context:"formatting"});case"MMMM":default:return x.month(w,{width:"wide",context:"formatting"})}},L:function(m,v,x){var w=m.getUTCMonth();switch(v){case"L":return String(w+1);case"LL":return(0,l.default)(w+1,2);case"Lo":return x.ordinalNumber(w+1,{unit:"month"});case"LLL":return x.month(w,{width:"abbreviated",context:"standalone"});case"LLLLL":return x.month(w,{width:"narrow",context:"standalone"});case"LLLL":default:return x.month(w,{width:"wide",context:"standalone"})}},w:function(m,v,x,w){var _=(0,s.default)(m,w);return v==="wo"?x.ordinalNumber(_,{unit:"week"}):(0,l.default)(_,v.length)},I:function(m,v,x){var w=(0,r.default)(m);return v==="Io"?x.ordinalNumber(w,{unit:"week"}):(0,l.default)(w,v.length)},d:function(m,v,x){return v==="do"?x.ordinalNumber(m.getUTCDate(),{unit:"date"}):c.default.d(m,v)},D:function(m,v,x){var w=(0,i.default)(m);return v==="Do"?x.ordinalNumber(w,{unit:"dayOfYear"}):(0,l.default)(w,v.length)},E:function(m,v,x){var w=m.getUTCDay();switch(v){case"E":case"EE":case"EEE":return x.day(w,{width:"abbreviated",context:"formatting"});case"EEEEE":return x.day(w,{width:"narrow",context:"formatting"});case"EEEEEE":return x.day(w,{width:"short",context:"formatting"});case"EEEE":default:return x.day(w,{width:"wide",context:"formatting"})}},e:function(m,v,x,w){var _=m.getUTCDay(),T=(_-w.weekStartsOn+8)%7||7;switch(v){case"e":return String(T);case"ee":return(0,l.default)(T,2);case"eo":return x.ordinalNumber(T,{unit:"day"});case"eee":return x.day(_,{width:"abbreviated",context:"formatting"});case"eeeee":return x.day(_,{width:"narrow",context:"formatting"});case"eeeeee":return x.day(_,{width:"short",context:"formatting"});case"eeee":default:return x.day(_,{width:"wide",context:"formatting"})}},c:function(m,v,x,w){var _=m.getUTCDay(),T=(_-w.weekStartsOn+8)%7||7;switch(v){case"c":return String(T);case"cc":return(0,l.default)(T,v.length);case"co":return x.ordinalNumber(T,{unit:"day"});case"ccc":return x.day(_,{width:"abbreviated",context:"standalone"});case"ccccc":return x.day(_,{width:"narrow",context:"standalone"});case"cccccc":return x.day(_,{width:"short",context:"standalone"});case"cccc":default:return x.day(_,{width:"wide",context:"standalone"})}},i:function(m,v,x){var w=m.getUTCDay(),_=w===0?7:w;switch(v){case"i":return String(_);case"ii":return(0,l.default)(_,v.length);case"io":return x.ordinalNumber(_,{unit:"day"});case"iii":return x.day(w,{width:"abbreviated",context:"formatting"});case"iiiii":return x.day(w,{width:"narrow",context:"formatting"});case"iiiiii":return x.day(w,{width:"short",context:"formatting"});case"iiii":default:return x.day(w,{width:"wide",context:"formatting"})}},a:function(m,v,x){var w=m.getUTCHours(),_=w/12>=1?"pm":"am";switch(v){case"a":case"aa":return x.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"aaa":return x.dayPeriod(_,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return x.dayPeriod(_,{width:"narrow",context:"formatting"});case"aaaa":default:return x.dayPeriod(_,{width:"wide",context:"formatting"})}},b:function(m,v,x){var w=m.getUTCHours(),_;switch(w===12?_=u.noon:w===0?_=u.midnight:_=w/12>=1?"pm":"am",v){case"b":case"bb":return x.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"bbb":return x.dayPeriod(_,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return x.dayPeriod(_,{width:"narrow",context:"formatting"});case"bbbb":default:return x.dayPeriod(_,{width:"wide",context:"formatting"})}},B:function(m,v,x){var w=m.getUTCHours(),_;switch(w>=17?_=u.evening:w>=12?_=u.afternoon:w>=4?_=u.morning:_=u.night,v){case"B":case"BB":case"BBB":return x.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"BBBBB":return x.dayPeriod(_,{width:"narrow",context:"formatting"});case"BBBB":default:return x.dayPeriod(_,{width:"wide",context:"formatting"})}},h:function(m,v,x){if(v==="ho"){var w=m.getUTCHours()%12;return w===0&&(w=12),x.ordinalNumber(w,{unit:"hour"})}return c.default.h(m,v)},H:function(m,v,x){return v==="Ho"?x.ordinalNumber(m.getUTCHours(),{unit:"hour"}):c.default.H(m,v)},K:function(m,v,x){var w=m.getUTCHours()%12;return v==="Ko"?x.ordinalNumber(w,{unit:"hour"}):(0,l.default)(w,v.length)},k:function(m,v,x){var w=m.getUTCHours();return w===0&&(w=24),v==="ko"?x.ordinalNumber(w,{unit:"hour"}):(0,l.default)(w,v.length)},m:function(m,v,x){return v==="mo"?x.ordinalNumber(m.getUTCMinutes(),{unit:"minute"}):c.default.m(m,v)},s:function(m,v,x){return v==="so"?x.ordinalNumber(m.getUTCSeconds(),{unit:"second"}):c.default.s(m,v)},S:function(m,v){return c.default.S(m,v)},X:function(m,v,x,w){var _=w._originalDate||m,T=_.getTimezoneOffset();if(T===0)return"Z";switch(v){case"X":return f(T);case"XXXX":case"XX":return p(T);case"XXXXX":case"XXX":default:return p(T,":")}},x:function(m,v,x,w){var _=w._originalDate||m,T=_.getTimezoneOffset();switch(v){case"x":return f(T);case"xxxx":case"xx":return p(T);case"xxxxx":case"xxx":default:return p(T,":")}},O:function(m,v,x,w){var _=w._originalDate||m,T=_.getTimezoneOffset();switch(v){case"O":case"OO":case"OOO":return"GMT"+h(T,":");case"OOOO":default:return"GMT"+p(T,":")}},z:function(m,v,x,w){var _=w._originalDate||m,T=_.getTimezoneOffset();switch(v){case"z":case"zz":case"zzz":return"GMT"+h(T,":");case"zzzz":default:return"GMT"+p(T,":")}},t:function(m,v,x,w){var _=w._originalDate||m,T=Math.floor(_.getTime()/1e3);return(0,l.default)(T,v.length)},T:function(m,v,x,w){var _=w._originalDate||m,T=_.getTime();return(0,l.default)(T,v.length)}};function h(b,m){var v=b>0?"-":"+",x=Math.abs(b),w=Math.floor(x/60),_=x%60;if(_===0)return v+String(w);var T=m||"";return v+String(w)+T+(0,l.default)(_,2)}function f(b,m){if(b%60===0){var v=b>0?"-":"+";return v+(0,l.default)(Math.abs(b)/60,2)}return p(b,m)}function p(b,m){var v=m||"",x=b>0?"-":"+",w=Math.abs(b),_=(0,l.default)(Math.floor(w/60),2),T=(0,l.default)(w%60,2);return x+_+v+T}var y=d;t.default=y,e.exports=t.default})(ss,ss.exports);var D_=ss.exports,xs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=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],h=u[2];if(!h)return n(l,c);var f;switch(d){case"P":f=c.dateTime({width:"short"});break;case"PP":f=c.dateTime({width:"medium"});break;case"PPP":f=c.dateTime({width:"long"});break;case"PPPP":default:f=c.dateTime({width:"full"});break}return f.replace("{{date}}",n(d,c)).replace("{{time}}",i(h,c))},a={p:i,P:r},s=a;t.default=s,e.exports=t.default})(xs,xs.exports);var C_=xs.exports,_s={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(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()}e.exports=t.default})(_s,_s.exports);var rd=_s.exports;const ad=wi(rd);var Ti={};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.isProtectedDayOfYearToken=k_,Ti.isProtectedWeekYearToken=O_,Ti.throwProtectedError=A_;var P_=["D","DD"],E_=["YY","YYYY"];function k_(e){return P_.indexOf(e)!==-1}function O_(e){return E_.indexOf(e)!==-1}function A_(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ws={exports:{}},Ts={exports:{}},Ms={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={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=n[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,e.exports=t.default})(Ms,Ms.exports);var R_=Ms.exports,Ss={exports:{}},Ds={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(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}}e.exports=t.default})(Ds,Ds.exports);var L_=Ds.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(L_),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,e.exports=t.default})(Ss,Ss.exports);var I_=Ss.exports,Cs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={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 n[s]},r=i;t.default=r,e.exports=t.default})(Cs,Cs.exports);var N_=Cs.exports,Ps={exports:{}},Es={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(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 h=i.argumentCallback?i.argumentCallback(r):r;return o[h]}}e.exports=t.default})(Es,Es.exports);var B_=Es.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(B_),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 b=Number(p),m=b%100;if(m>20||m<10)switch(m%10){case 1:return b+"st";case 2:return b+"nd";case 3:return b+"rd"}return b+"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"})},h=d;t.default=h,e.exports=t.default})(Ps,Ps.exports);var H_=Ps.exports,ks={exports:{}},Os={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(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],h=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],f=Array.isArray(h)?r(h,function(b){return b.test(d)}):i(h,function(b){return b.test(d)}),p;p=a.valueCallback?a.valueCallback(f):f,p=o.valueCallback?o.valueCallback(p):p;var y=s.slice(d.length);return{value:p,rest:y}}}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}e.exports=t.default})(Os,Os.exports);var F_=Os.exports,As={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(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}}}e.exports=t.default})(As,As.exports);var U_=As.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(F_),r=n(U_),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},h={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]},f={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},p={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]},y={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},b={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:h,defaultParseWidth:"any"}),day:(0,i.default)({matchPatterns:f,defaultMatchWidth:"wide",parsePatterns:p,defaultParseWidth:"any"}),dayPeriod:(0,i.default)({matchPatterns:y,defaultMatchWidth:"any",parsePatterns:b,defaultParseWidth:"any"})},v=m;t.default=v,e.exports=t.default})(ks,ks.exports);var W_=ks.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(R_),r=n(I_),a=n(N_),s=n(H_),o=n(W_),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,e.exports=t.default})(Ts,Ts.exports);var Y_=Ts.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(Y_),r=i.default;t.default=r,e.exports=t.default})(ws,ws.exports);var z_=ws.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=x;var i=n(g_),r=n(b_),a=n(we),s=n(D_),o=n(C_),l=n(rd),c=Ti,u=n(fn),d=n(Vt),h=gn,f=n(z_),p=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,y=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,b=/^'([^]*?)'?$/,m=/''/g,v=/[a-zA-Z]/;function x(_,T,M){var S,D,E,k,L,q,ct,N,W,J,Lt,mt,Zt,Qt,At,Jt,Wt,bt;(0,d.default)(2,arguments);var oe=String(T),ie=(0,h.getDefaultOptions)(),ht=(S=(D=M==null?void 0:M.locale)!==null&&D!==void 0?D:ie.locale)!==null&&S!==void 0?S:f.default,$=(0,u.default)((E=(k=(L=(q=M==null?void 0:M.firstWeekContainsDate)!==null&&q!==void 0?q:M==null||(ct=M.locale)===null||ct===void 0||(N=ct.options)===null||N===void 0?void 0:N.firstWeekContainsDate)!==null&&L!==void 0?L:ie.firstWeekContainsDate)!==null&&k!==void 0?k:(W=ie.locale)===null||W===void 0||(J=W.options)===null||J===void 0?void 0:J.firstWeekContainsDate)!==null&&E!==void 0?E:1);if(!($>=1&&$<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var It=(0,u.default)((Lt=(mt=(Zt=(Qt=M==null?void 0:M.weekStartsOn)!==null&&Qt!==void 0?Qt:M==null||(At=M.locale)===null||At===void 0||(Jt=At.options)===null||Jt===void 0?void 0:Jt.weekStartsOn)!==null&&Zt!==void 0?Zt:ie.weekStartsOn)!==null&&mt!==void 0?mt:(Wt=ie.locale)===null||Wt===void 0||(bt=Wt.options)===null||bt===void 0?void 0:bt.weekStartsOn)!==null&&Lt!==void 0?Lt:0);if(!(It>=0&&It<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!ht.localize)throw new RangeError("locale must contain localize property");if(!ht.formatLong)throw new RangeError("locale must contain formatLong property");var de=(0,a.default)(_);if(!(0,i.default)(de))throw new RangeError("Invalid time value");var A=(0,l.default)(de),F=(0,r.default)(de,A),Y={firstWeekContainsDate:$,weekStartsOn:It,locale:ht,_originalDate:de},rt=oe.match(y).map(function(j){var at=j[0];if(at==="p"||at==="P"){var Yt=o.default[at];return Yt(j,ht.formatLong)}return j}).join("").match(p).map(function(j){if(j==="''")return"'";var at=j[0];if(at==="'")return w(j);var Yt=s.default[at];if(Yt)return!(M!=null&&M.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(j)&&(0,c.throwProtectedError)(j,T,String(_)),!(M!=null&&M.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(j)&&(0,c.throwProtectedError)(j,T,String(_)),Yt(F,j,ht.localize,Y);if(at.match(v))throw new RangeError("Format string contains an unescaped latin alphabet character `"+at+"`");return j}).join("");return rt}function w(_){var T=_.match(b);return T?T[1].replace(m,"'"):_}e.exports=t.default})(Qa,Qa.exports);var V_=Qa.exports;const j_=wi(V_);function sd(e,t,n){var i=G_(e,n.timeZone,n.locale);return i.formatToParts?$_(i,t):q_(i,t)}function $_(e,t){for(var n=e.formatToParts(t),i=n.length-1;i>=0;--i)if(n[i].type==="timeZoneName")return n[i].value}function q_(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/ [\w-+ ]+$/.exec(n);return i?i[0].substr(1):""}function G_(e,t,n){if(n&&!n.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(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}function X_(e,t){var n=J_(t);return n.formatToParts?Z_(n,e):Q_(n,e)}var K_={year:0,month:1,day:2,hour:3,minute:4,second:5};function Z_(e,t){try{for(var n=e.formatToParts(t),i=[],r=0;r<n.length;r++){var a=K_[n[r].type];a>=0&&(i[a]=parseInt(n[r].value,10))}return i}catch(s){if(s instanceof RangeError)return[NaN];throw s}}function Q_(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[i[3],i[1],i[2],i[4],i[5],i[6]]}var Rs={};function J_(e){if(!Rs[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";Rs[e]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return Rs[e]}function od(e,t,n,i,r,a,s){var o=new Date(0);return o.setUTCFullYear(e,t,n),o.setUTCHours(i,r,a,s),o}var ld=36e5,tw=6e4,Ls={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function Is(e,t,n){var i,r;if(!e||(i=Ls.timezoneZ.exec(e),i))return 0;var a;if(i=Ls.timezoneHH.exec(e),i)return a=parseInt(i[1],10),cd(a)?-(a*ld):NaN;if(i=Ls.timezoneHHMM.exec(e),i){a=parseInt(i[1],10);var s=parseInt(i[2],10);return cd(a,s)?(r=Math.abs(a)*ld+s*tw,a>0?-r:r):NaN}if(iw(e)){t=new Date(t||Date.now());var o=n?t:ew(t),l=Ns(o,e),c=n?l:nw(t,l,e);return-c}return NaN}function ew(e){return od(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Ns(e,t){var n=X_(e,t),i=od(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),r=e.getTime(),a=r%1e3;return r-=a>=0?a:1e3+a,i-r}function nw(e,t,n){var i=e.getTime(),r=i-t,a=Ns(new Date(r),n);if(t===a)return t;r-=a-t;var s=Ns(new Date(r),n);return a===s?a:Math.max(a,s)}function cd(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var ud={};function iw(e){if(ud[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),ud[e]=!0,!0}catch{return!1}}var rw=60*1e3,aw={X:function(e,t,n,i){var r=Bs(i.timeZone,i._originalDate||e);if(r===0)return"Z";switch(t){case"X":return dd(r);case"XXXX":case"XX":return On(r);case"XXXXX":case"XXX":default:return On(r,":")}},x:function(e,t,n,i){var r=Bs(i.timeZone,i._originalDate||e);switch(t){case"x":return dd(r);case"xxxx":case"xx":return On(r);case"xxxxx":case"xxx":default:return On(r,":")}},O:function(e,t,n,i){var r=Bs(i.timeZone,i._originalDate||e);switch(t){case"O":case"OO":case"OOO":return"GMT"+sw(r,":");case"OOOO":default:return"GMT"+On(r,":")}},z:function(e,t,n,i){var r=i._originalDate||e;switch(t){case"z":case"zz":case"zzz":return sd("short",r,i);case"zzzz":default:return sd("long",r,i)}}};function Bs(e,t){var n=e?Is(e,t,!0)/rw:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function Dr(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}function On(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e),a=Dr(Math.floor(r/60),2),s=Dr(Math.floor(r%60),2);return i+a+n+s}function dd(e,t){if(e%60===0){var n=e>0?"-":"+";return n+Dr(Math.abs(e)/60,2)}return On(e,t)}function sw(e,t){var n=e>0?"-":"+",i=Math.abs(e),r=Math.floor(i/60),a=i%60;if(a===0)return n+String(r);var s=t||"";return n+String(r)+s+Dr(a,2)}const ow=aw;var lw=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Hs=36e5,hd=6e4,cw=2,jt={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:lw};function fd(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);var n=t||{},i=n.additionalDigits==null?cw:p_(n.additionalDigits);if(i!==2&&i!==1&&i!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var r=uw(e),a=dw(r.date,i),s=a.year,o=a.restDateString,l=hw(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(r.time&&(u=fw(r.time),isNaN(u)))return new Date(NaN);if(r.timeZone||n.timeZone){if(d=Is(r.timeZone||n.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=ad(new Date(c+u)),d=ad(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function uw(e){var t={},n=jt.dateTimePattern.exec(e),i;if(n?(t.date=n[1],i=n[3]):(n=jt.datePattern.exec(e),n?(t.date=n[1],i=n[2]):(t.date=null,i=e)),i){var r=jt.timeZone.exec(i);r?(t.time=i.replace(r[1],""),t.timeZone=r[1].trim()):t.time=i}return t}function dw(e,t){var n=jt.YYY[t],i=jt.YYYYY[t],r;if(r=jt.YYYY.exec(e)||i.exec(e),r){var a=r[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(r=jt.YY.exec(e)||n.exec(e),r){var s=r[1];return{year:parseInt(s,10)*100,restDateString:e.slice(s.length)}}return{year:null}}function hw(e,t){if(t===null)return null;var n,i,r,a;if(e.length===0)return i=new Date(0),i.setUTCFullYear(t),i;if(n=jt.MM.exec(e),n)return i=new Date(0),r=parseInt(n[1],10)-1,md(t,r)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(n=jt.DDD.exec(e),n){i=new Date(0);var s=parseInt(n[1],10);return mw(t,s)?(i.setUTCFullYear(t,0,s),i):new Date(NaN)}if(n=jt.MMDD.exec(e),n){i=new Date(0),r=parseInt(n[1],10)-1;var o=parseInt(n[2],10);return md(t,r,o)?(i.setUTCFullYear(t,r,o),i):new Date(NaN)}if(n=jt.Www.exec(e),n)return a=parseInt(n[1],10)-1,bd(t,a)?gd(t,a):new Date(NaN);if(n=jt.WwwD.exec(e),n){a=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return bd(t,a,l)?gd(t,a,l):new Date(NaN)}return null}function fw(e){var t,n,i;if(t=jt.HH.exec(e),t)return n=parseFloat(t[1].replace(",",".")),Fs(n)?n%24*Hs:NaN;if(t=jt.HHMM.exec(e),t)return n=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")),Fs(n,i)?n%24*Hs+i*hd:NaN;if(t=jt.HHMMSS.exec(e),t){n=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return Fs(n,i,r)?n%24*Hs+i*hd+r*1e3:NaN}return null}function gd(e,t,n){t=t||0,n=n||0;var i=new Date(0);i.setUTCFullYear(e,0,4);var r=i.getUTCDay()||7,a=t*7+n+1-r;return i.setUTCDate(i.getUTCDate()+a),i}var gw=[31,28,31,30,31,30,31,31,30,31,30,31],pw=[31,29,31,30,31,30,31,31,30,31,30,31];function pd(e){return e%400===0||e%4===0&&e%100!==0}function md(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;var i=pd(e);if(i&&n>pw[t]||!i&&n>gw[t])return!1}return!0}function mw(e,t){if(t<1)return!1;var n=pd(e);return!(n&&t>366||!n&&t>365)}function bd(e,t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function Fs(e,t,n){return!(e!=null&&(e<0||e>=25)||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}var bw=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function yw(e,t,n){var i=String(t),r=n||{},a=i.match(bw);if(a){var s=fd(e,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,"'"+ow[l[0]](s,l,null,r)+"'");return u?d.substring(0,c-1)+d.substring(c+1):d},i)}return j_(e,i,r)}var Us={exports:{}},Ws={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(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}e.exports=t.default})(Ws,Ws.exports);var vw=Ws.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(vw);function r(a){return(0,i.default)({},a)}e.exports=t.default})(Us,Us.exports);var xw=Us.exports;const _w=wi(xw);function ww(e,t,n){var i=fd(e,n),r=Is(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 Tw(e,t,n,i){var r=_w(i);return r.timeZone=t,yw(ww(e,t),n,r)}const Mw=2,Ys=new Intl.NumberFormat(((hh=document==null?void 0:document.documentElement)==null?void 0:hh.lang)||"en-US");function Sw(e,t={}){if(!e)return e;const n=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(e);return Tw(r,n,i)}catch{return console.error("Invalid value passed to formatTime",e),"(invalid date)"}}const zs=10,Re=["#a86cd5","#6a86d2","#00bbf9","#00c4b0","#ffdf15"],Mi=(e,t)=>(t||Re)[e%Re.length],Si=(e,t)=>{e[0]==="#"&&(e=e.slice(1));let n=parseInt(e.substring(0,2),16),i=parseInt(e.substring(2,4),16),r=parseInt(e.substring(4,6),16);n=n-t,i=i-t,r=r-t,n>255?n=255:n<0&&(n=0),i>255?i=255:i<0&&(i=0),r>255?r=255:r<0&&(r=0);const a=n.toString(16).length===1?"0"+n.toString(16):n.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}`},yd="#6f7787",Dw={lineTension:.4,borderWidth:2,pointBorderWidth:1.2,borderJoinStyle:"round",fill:!0},Vs=new Map,js=(e,t)=>t==="bytes"?Ha(e):t==="count/minute"?e.toFixed(2):Ys.format(e),vd=e=>{const n=document.createElement("canvas").getContext("2d"),i=gt({});return n.font=i.string,n.measureText(e).width},Cw=()=>{const e="label_height";if(!Vs.has(e)){const t=gt({});Vs.set(e,t.lineHeight)}return Vs.get(e)},Pw=e=>e.datasets.reduce((t,n)=>t+n.data.reduce((i,r)=>isNaN(r)?i:i+r,0),0),xd=(e,t)=>t.datasets.reduce((n,i,r)=>e.isDatasetVisible(r)?n+i.data.reduce((a,s)=>isNaN(s)?a:a+s,0):n,0),_d=(e,t)=>t===0?" (0.0%)":` (${(e/t*100).toFixed(1)}%)`;function Ew(e){const t={enabled:!1,position:"barChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};return hr.positioners.barChartTooltipPosition=function(i,r){if(!i.length)return!1;const a=this.chart.canvas.getBoundingClientRect(),s=e.tooltipState.width||this.width,o=a.width/2,l=Za(r,s,o),c=r.y,u=r.x<o?"left":"center";return{x:l-e.tooltipState.offset,y:c,xAlign:u}},g.computed(()=>{var i,r,a,s,o,l,c,u;return{indexAxis:e.indexAxis,scales:{x:{border:{display:!1},stacked:e.stacked,grid:{display:!1,drawBorder:!1},ticks:{maxRotation:90,autoSkip:!1,callback:function(d,h){const f=this;if(f.chart.options.indexAxis===f.axis){d=f.getLabelForValue(h);const p=10;return d&&d.length>p?d.slice(0,p)+"...":d}return f.getLabelForValue(Number(d))}},title:{display:e.indexAxis==="y"?!U((i=e.metricAxesTitle)==null?void 0:i.value):!U((r=e.dimensionAxesTitle)==null?void 0:r.value),text:e.indexAxis==="y"?(a=e.metricAxesTitle)==null?void 0:a.value:(s=e.dimensionAxesTitle)==null?void 0:s.value,padding:{top:20},font:{weight:"bold"}}},y:{border:{display:!1},stacked:e.stacked.value,beginAtZero:!0,grid:{display:!1,drawBorder:!1},ticks:{callback:function(d,h){const f=this;return f.chart.options.indexAxis===f.axis?(d=f.getLabelForValue(h),d&&d.length>zs?d.slice(0,zs)+"...":d):f.getLabelForValue(Number(d))}},title:{display:e.indexAxis==="x"?!U((o=e.metricAxesTitle)==null?void 0:o.value):!U((l=e.dimensionAxesTitle)==null?void 0:l.value),text:e.indexAxis==="x"?(c=e.metricAxesTitle)==null?void 0:c.value:(u=e.dimensionAxesTitle)==null?void 0:u.value,padding:{bottom:20},font:{weight:"bold"}}}},plugins:{htmlLegend:{containerID:e.legendID},legend:{display:!1},tooltip:{...t,external:d=>{Ka(e.tooltipState,d)}}},onHover:{mode:"nearest",intersect:!0},maxBarThickness:60,maintainAspectRatio:!1}})}Gt.register(...Yb);const kw=(e,t)=>{const n=t.datasets.map(r=>r.label),i=e.datasets.map(r=>r.label);return e.datasets.length===t.datasets.length&&n.every((r,a)=>r===i[a])};function Ow(e,t,n,i,r){const a=g.shallowRef(null),s=(o,l)=>{if(t.value)return new Gt(t.value,{type:e,data:o,plugins:i,options:l})};return g.onMounted(()=>{a.value=s(n.value,r.value)}),g.onUnmounted(()=>{U(a.value)||a.value.destroy()}),g.watch(n,(o,l)=>{if(kw(l,o)&&!U(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 U(a.value)||a.value.destroy(),a.value=s(o,r.value)}),g.watch(t,()=>{U(a.value)||a.value.destroy(),a.value=s(n.value,r.value)}),g.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))&&(U(a.value)||a.value.destroy(),a.value=s(n.value,o))}),a}var wd={exports:{}};(function(e){(function(){function t(c,u){if(u.separator===!1||c<1e3)return c.toString();var d=typeof u.separator=="string"?u.separator:",",h=[],f=Math.round(c).toString().split("");return f.reverse().forEach(function(p,y){y&&y%3===0&&h.push(d),h.push(p)}),h.reverse().join("")}function n(c,u,d){var h=c/u,f=d.round?"round":"floor";return d.decimal===!1?(c=Math[f](h),c.toString()):(d.precision?c=h:c=h<10?Math[f](h*10)/10:Math[f](h),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 h=c<0;h&&(c=Math.abs(c)),u.precision&&(c=parseFloat(c.toPrecision(u.precision)));var f=u.min10k?r:i;return c<f||u.precision&&u.precision>Math.log10(c)?d=t(n(c,1,u),u):c<a?d=n(c,i,u)+"k":c<s?d=n(c,a,u)+"m":c<o?d=t(n(c,s,u),u)+"b":d=t(n(c,o,u),u)+"t",h&&(d="-"+d),u.capital&&(d=d.toUpperCase()),u.prefix&&(d=u.prefix+d),u.suffix&&(d=d+u.suffix),d}l.addCommas=t,e.exports=l})()})(wd);var Aw=wd.exports;const $s=wi(Aw);function Rw(e,t,n){const{i18n:i}=Bt.useI18n();return{legendValues:g.computed(()=>e.value.datasets.reduce((a,s)=>{const o=s.total?s.total:[Ot.TIMESERIES_BAR,Ot.TIMESERIES_LINE].some(c=>c===t)?s.data.reduce((c,{y:u})=>c+(Number(u)||0),0):s.data.reduce((c,u)=>c+Number(u),0);let l;if(n.value==="bytes")l=isNaN(o)?"0":Ha(o);else{l=`${$s(o,{capital:!0})} ${n.value}`;const c=n.value&&i&&i.te(`chartUnits.${n.value}`)&&i.t(`chartUnits.${n.value}`)||n.value;l=i&&i.t("legend.datapointValueDisplay",{value:$s(o,{capital:!0}),unit:c})||`${$s(o,{capital:!0})} ${n.value}`}return{...a,[s.label]:{raw:o,formatted:l}}},{}))}}function Lw(e){const t={enabled:!1,position:"doughnutChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};return hr.positioners.doughnutChartTooltipPosition=function(i,r){if(!i.length)return!1;const a=this.chart.canvas.getBoundingClientRect(),s=e.tooltipState.width||this.width,o=a.width/2,l=Za(r,s,o),c=r.y,u=r.x<o?"left":"center";return{x:l-e.tooltipState.offset,y:c,xAlign:u}},{options:g.computed(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:e.legendID},legend:{display:!1},tooltip:{...t,external:i=>{Ka(e.tooltipState,i)}}}}))}}function Iw(e){const t=g.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:!U((l=e.dimensionAxesTitle)==null?void 0:l.value),text:(c=e.dimensionAxesTitle)==null?void 0:c.value,padding:{top:20},font:{weight:"bold"}}}}),n=g.computed(()=>{var l,c;return{title:{display:!U((l=e.metricAxesTitle)==null?void 0:l.value),text:(c=e.metricAxesTitle)==null?void 0:c.value,padding:{bottom:20},font:{weight:"bold"}},ticks:{maxTicksLimit:5},grid:{drawBorder:!1},id:"main-y-axis",beginAtZero:!0}}),i={enabled:!1,mode:"index",intersect:!1,position:"lineChartTooltipPosition"};hr.positioners.lineChartTooltipPosition=function(l,c){if(!l.length)return!1;const u=this.chart.canvas.getBoundingClientRect(),d=e.tooltipState.width||this.width,h=e.tooltipState.height||this.height,f=u.width/2,p=u.height/2,y=Za(c,d,f);let b=h_(c,h,p);const m=c.y<p?"top":"bottom",v=c.x<f?"left":"center";return h>u.height&&(b=0),{x:y,y:b,xAlign:v,yAlign:m}};const r=g.computed(()=>{switch(e.granularity.value){case z.MINUTELY:return"minute";case z.HOURLY:return"hour";case z.DAILY:return"day";default:return"day"}}),a=g.computed(()=>$x(e.timeRange.value)>=24?"yyyy-MM-dd h:mm":"h:mm"),s=g.computed(()=>[z.DAILY,z.WEEKLY].includes(e.granularity.value)?"yyyy-MM-dd":"yyyy-MM-dd h:mm");return{options:g.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:e.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},...n.value,stacked:e.stacked.value}},responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:e.legendID},legend:{display:!1},streaming:!1,tooltip:{...i,external:l=>{Ka(e.tooltipState,l)}}}}))}}function Nw(e,t){const{i18n:n}=Bt.useI18n();return g.computed(()=>{try{if(t.value&&"meta"in t.value&&"records"in t.value){const r=t.value.records,{dimensions:a,metricNames:s}=t.value.meta,o=a&&Object.keys(a),l=a&&o&&(o.length===1?o[0]!=="Organization":o.length>0);if(!r.length||!s)return{datasets:[],labels:[]};const c=l&&o||s,u=c[0],d=c.length>1?c[1]:c[0],h=s[0],f=Object.fromEntries(r.map(m=>{const v=l?`${m.event[u]},${m.event[d]}`:`${u},${d}`,x=m.event[h];return[v,x]})),p=l&&a[u]||s,y=l&&a[d]||s;return!p||!y?{labels:[],datasets:[]}:{labels:l?a[u].map(m=>n&&n.te(`chartLabels.${m}`)&&n.t(`chartLabels.${m}`)||m):s.map(m=>n&&n.te(`chartLabels.${m}`)&&n.t(`chartLabels.${m}`)||m),datasets:y&&Array.from(y).flatMap((m,v)=>{if(!m)return[];let{colorPalette:x}=e;U(x)&&(x=Re);const w={},_=Array.isArray(x)?Mi(v,x):x[m]||Mi(v);return w[m]=_,{label:n&&n.te(`chartLabels.${m}`)&&n.t(`chartLabels.${m}`)||m,backgroundColor:_,data:p.map(T=>f[`${T},${m}`]||0)}})}}}catch(r){return console.error(r),{datasets:[],labels:[]}}return{labels:[],datasets:[]}})}const Bw=(e,t,n=1)=>Array(Math.ceil((t-e)/n)).fill(e).map((i,r)=>i+r*n),Hw=e=>{if(typeof e=="string"){const t=+e;if(t)return t;try{return Vu(e).getTime()}catch(n){if(n instanceof RangeError)return 0;throw n}}return e},Fw=(e,t,n,i,r)=>{const s=Math.max(t-6e4,Math.max(...(r||[]).map(c=>new Date(c.timestamp).valueOf()))),o=Math.floor((e-i)/n)*n+i,l=Math.floor((s-i)/n)*n+i+n;return Bw(o,l,n)};function Uw(e,t){const{i18n:n}=Bt.useI18n();return g.computed(()=>{try{if(t.value&&"meta"in t.value&&"records"in t.value){const r=t.value.records,{dimensions:a,metricNames:s}=t.value.meta,o="startMs"in t.value.meta?t.value.meta.startMs:t.value.meta.start*1e3,l="endMs"in t.value.meta?t.value.meta.endMs:t.value.meta.end*1e3;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=s&&s[0],d=c&&c[0]||u,h=a&&a[d]||s,f=t.value.meta.granularity;if(typeof f!="number"||isNaN(f)||!isFinite(f)||f===0)return console.error("Invalid step value:",f),{datasets:[]};if(!r.length)return{datasets:[]};const p=Hw(o),y=Fw(o,l,f,p,r),b=new Set,m=r!=null&&r.length?r.reduce((_,T)=>{const M=new Date(T.timestamp).valueOf(),S=T.event;return b.add(u),M in _||(_[M]={}),u in _[M]||(_[M][u]={}),h.forEach(D=>{S[d]===D||d===D?_[M][u][D]=Math.round(Number(S[u])*1e3)/1e3:c.length||(_[M][u][D]=Math.round(Number(S[D])*1e3)/1e3)}),_},{}):{},v=[...b].reduce((_,T)=>(h.forEach(M=>_.push([T,M])),_),[]),x={},w=[...v].map(([_,T],M)=>{const S=y.map(q=>q in m&&_ in m[q]?{x:q,y:m[q][_][T]||0}:{x:q,y:0});let{colorPalette:D,fill:E}=e;U(D)&&(D=Re);const k=Array.isArray(D)?Mi(M,D):D[T]||Mi(M),L=Si(k,50);return x[T]=k,{rawDimension:T,rawMetric:_,label:n&&n.te(`chartLabels.${T}`)&&n.t(`chartLabels.${T}`)||T,borderColor:L,backgroundColor:k,data:S,total:S.reduce((q,{y:ct})=>q+Number(ct),0),...Dw,fill:E}});return w.sort((_,T)=>Number(_.total)<Number(T.total)?-1:1),{datasets:w,colorMap:x}}}catch(r){return console.error(r),{labels:[],datasets:[]}}return{labels:[],datasets:[]}})}const Bt={useBarChartOptions:Ew,useChartJSCommon:Ow,useChartLegendValues:Rw,useExploreResultToDatasets:Nw,useExploreResultToTimeDataset:Uw,useDoughnutChartOptions:Lw,useLinechartOptions:Iw,useI18n:Ff,useReportChartDataForSynthetics:(e,t)=>{g.watch([e,t],(n,i,r)=>{const[a,s]=n;!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})}};/*!
|
|
39
|
+
`):e}function ub(e,t){const{element:n,datasetIndex:i,index:r}=t,a=e.getDatasetMeta(i).controller,{label:s,value:o}=a.getLabelAndValue(r);return{chart:e,label:s,parsed:a.getParsed(r),raw:e.data.datasets[i].data[r],formattedValue:o,dataset:a.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function tu(e,t){const n=e.chart.ctx,{body:i,footer:r,title:a}=e,{boxWidth:s,boxHeight:o}=t,l=gt(t.bodyFont),c=gt(t.titleFont),u=gt(t.footerFont),d=a.length,h=r.length,f=i.length,p=Pt(t.padding);let y=p.height,b=0,m=i.reduce((w,_)=>w+_.before.length+_.lines.length+_.after.length,0);if(m+=e.beforeBody.length+e.afterBody.length,d&&(y+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),m){const w=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;y+=f*w+(m-f)*l.lineHeight+(m-1)*t.bodySpacing}h&&(y+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let v=0;const x=function(w){b=Math.max(b,n.measureText(w).width+v)};return n.save(),n.font=c.string,ot(e.title,x),n.font=l.string,ot(e.beforeBody.concat(e.afterBody),x),v=t.displayColors?s+2+t.boxPadding:0,ot(i,w=>{ot(w.before,x),ot(w.lines,x),ot(w.after,x)}),v=0,n.font=u.string,ot(e.footer,x),n.restore(),b+=p.width,{width:b,height:y}}function db(e,t){const{y:n,height:i}=t;return n<i/2?"top":n>e.height-i/2?"bottom":"center"}function hb(e,t,n,i){const{x:r,width:a}=i,s=n.caretSize+n.caretPadding;if(e==="left"&&r+a+s>t.width||e==="right"&&r-a-s<0)return!0}function fb(e,t,n,i){const{x:r,width:a}=n,{width:s,chartArea:{left:o,right:l}}=e;let c="center";return i==="center"?c=r<=(o+l)/2?"left":"right":r<=a/2?c="left":r>=s-a/2&&(c="right"),hb(c,e,t,n)&&(c="center"),c}function eu(e,t,n){const i=n.yAlign||t.yAlign||db(e,n);return{xAlign:n.xAlign||t.xAlign||fb(e,t,n,i),yAlign:i}}function gb(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function pb(e,t,n){let{y:i,height:r}=e;return t==="top"?i+=n:t==="bottom"?i-=r+n:i-=r/2,i}function nu(e,t,n,i){const{caretSize:r,caretPadding:a,cornerRadius:s}=e,{xAlign:o,yAlign:l}=n,c=r+a,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=Ue(s);let p=gb(t,o);const y=pb(t,l,c);return l==="center"?o==="left"?p+=c:o==="right"&&(p-=c):o==="left"?p-=Math.max(u,h)+r:o==="right"&&(p+=Math.max(d,f)+r),{x:Rt(p,0,i.width-t.width),y:Rt(y,0,i.height-t.height)}}function hr(e,t,n){const i=Pt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function iu(e){return be([],Oe(e))}function mb(e,t,n){return We(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function ru(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const au={beforeTitle:De,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,i=n?n.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 n[t.dataIndex]}return""},afterTitle:De,beforeBody:De,beforeLabel:De,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return U(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:De,afterBody:De,beforeFooter:De,footer:De,afterFooter:De};function Xt(e,t,n,i){const r=e[t].call(n,i);return typeof r>"u"?au[t].call(n,i):r}class Aa extends Nt{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 n=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&n.options.animation&&i.animations,a=new fa(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=mb(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:i}=n,r=Xt(i,"beforeTitle",this,t),a=Xt(i,"title",this,t),s=Xt(i,"afterTitle",this,t);let o=[];return o=be(o,Oe(r)),o=be(o,Oe(a)),o=be(o,Oe(s)),o}getBeforeBody(t,n){return iu(Xt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:i}=n,r=[];return ot(t,a=>{const s={before:[],lines:[],after:[]},o=ru(i,a);be(s.before,Oe(Xt(o,"beforeLabel",this,a))),be(s.lines,Xt(o,"label",this,a)),be(s.after,Oe(Xt(o,"afterLabel",this,a))),r.push(s)}),r}getAfterBody(t,n){return iu(Xt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:i}=n,r=Xt(i,"beforeFooter",this,t),a=Xt(i,"footer",this,t),s=Xt(i,"afterFooter",this,t);let o=[];return o=be(o,Oe(r)),o=be(o,Oe(a)),o=be(o,Oe(s)),o}_createItems(t){const n=this._active,i=this.chart.data,r=[],a=[],s=[];let o=[],l,c;for(l=0,c=n.length;l<c;++l)o.push(ub(this.chart,n[l]));return t.filter&&(o=o.filter((u,d,h)=>t.filter(u,d,h,i))),t.itemSort&&(o=o.sort((u,d)=>t.itemSort(u,d,i))),ot(o,u=>{const d=ru(t.callbacks,u);r.push(Xt(d,"labelColor",this,u)),a.push(Xt(d,"labelPointStyle",this,u)),s.push(Xt(d,"labelTextColor",this,u))}),this.labelColors=r,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=o,o}update(t,n){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=di[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=tu(this,i),c=Object.assign({},o,l),u=eu(this.chart,i,c),d=nu(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:n})}drawCaret(t,n,i,r){const a=this.getCaretPosition(t,i,r);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,i){const{xAlign:r,yAlign:a}=this,{caretSize:s,cornerRadius:o}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Ue(o),{x:h,y:f}=t,{width:p,height:y}=n;let b,m,v,x,w,_;return a==="center"?(w=f+y/2,r==="left"?(b=h,m=b-s,x=w+s,_=w-s):(b=h+p,m=b+s,x=w-s,_=w+s),v=b):(r==="left"?m=h+Math.max(l,u)+s:r==="right"?m=h+p-Math.max(c,d)-s:m=this.caretX,a==="top"?(x=f,w=x-s,b=m-s,v=m+s):(x=f+y,w=x+s,b=m+s,v=m-s),_=x),{x1:b,x2:m,x3:v,y1:x,y2:w,y3:_}}drawTitle(t,n,i){const r=this.title,a=r.length;let s,o,l;if(a){const c=Sn(i.rtl,this.x,this.width);for(t.x=hr(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",s=gt(i.titleFont),o=i.titleSpacing,n.fillStyle=i.titleColor,n.font=s.string,l=0;l<a;++l)n.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,n,i,r,a){const s=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:l,boxWidth:c}=a,u=gt(a.bodyFont),d=hr(this,"left",a),h=r.x(d),f=l<u.lineHeight?(u.lineHeight-l)/2:0,p=n.y+f;if(a.usePointStyle){const y={radius:Math.min(c,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},b=r.leftForLtr(h,c)+c/2,m=p+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,oa(t,y,b,m),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,oa(t,y,b,m)}else{t.lineWidth=j(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 y=r.leftForLtr(h,c),b=r.leftForLtr(r.xPlus(h,1),c-2),m=Ue(s.borderRadius);Object.values(m).some(v=>v!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,wn(t,{x:y,y:p,w:c,h:l,radius:m}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),wn(t,{x:b,y:p+1,w:c-2,h:l-2,radius:m}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(y,p,c,l),t.strokeRect(y,p,c,l),t.fillStyle=s.backgroundColor,t.fillRect(b,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){const{body:r}=this,{bodySpacing:a,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:c,boxPadding:u}=i,d=gt(i.bodyFont);let h=d.lineHeight,f=0;const p=Sn(i.rtl,this.x,this.width),y=function(D){n.fillText(D,p.x(t.x+f),t.y+h/2),t.y+=h+a},b=p.textAlign(s);let m,v,x,w,_,T,M;for(n.textAlign=s,n.textBaseline="middle",n.font=d.string,t.x=hr(this,b,i),n.fillStyle=i.bodyColor,ot(this.beforeBody,y),f=o&&b!=="right"?s==="center"?c/2+u:c+2+u:0,w=0,T=r.length;w<T;++w){for(m=r[w],v=this.labelTextColors[w],n.fillStyle=v,ot(m.before,y),x=m.lines,o&&x.length&&(this._drawColorBox(n,t,w,p,i),h=Math.max(d.lineHeight,l)),_=0,M=x.length;_<M;++_)y(x[_]),h=d.lineHeight;ot(m.after,y)}f=0,h=d.lineHeight,ot(this.afterBody,y),t.y-=a}drawFooter(t,n,i){const r=this.footer,a=r.length;let s,o;if(a){const l=Sn(i.rtl,this.x,this.width);for(t.x=hr(this,i.footerAlign,i),t.y+=i.footerMarginTop,n.textAlign=l.textAlign(i.footerAlign),n.textBaseline="middle",s=gt(i.footerFont),n.fillStyle=i.footerColor,n.font=s.string,o=0;o<a;++o)n.fillText(r[o],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,n,i,r){const{xAlign:a,yAlign:s}=this,{x:o,y:l}=t,{width:c,height:u}=i,{topLeft:d,topRight:h,bottomLeft:f,bottomRight:p}=Ue(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(o+d,l),s==="top"&&this.drawCaret(t,n,i,r),n.lineTo(o+c-h,l),n.quadraticCurveTo(o+c,l,o+c,l+h),s==="center"&&a==="right"&&this.drawCaret(t,n,i,r),n.lineTo(o+c,l+u-p),n.quadraticCurveTo(o+c,l+u,o+c-p,l+u),s==="bottom"&&this.drawCaret(t,n,i,r),n.lineTo(o+f,l+u),n.quadraticCurveTo(o,l+u,o,l+u-f),s==="center"&&a==="left"&&this.drawCaret(t,n,i,r),n.lineTo(o,l+d),n.quadraticCurveTo(o,l,o+d,l),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,i=this.$animations,r=i&&i.x,a=i&&i.y;if(r||a){const s=di[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=tu(this,t),l=Object.assign({},s,this._size),c=eu(n,t,l),u=nu(t,l,c,n);(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 n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=Pt(n.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,r,n),Fl(t,n.textDirection),a.y+=s.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),Ul(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){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=!Ui(i,r),s=this._positionChanged(r,n);(a||s)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,a=this._active||[],s=this._getActiveElements(t,a,n,i),o=this._positionChanged(s,t),l=n||!Ui(s,a)||o;return l&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,i,r){const a=this.options;if(t.type==="mouseout")return[];if(!r)return n;const s=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:i,caretY:r,options:a}=this,s=di[a.position].call(this,t,n);return s!==!1&&(i!==s.x||r!==s.y)}}C(Aa,"positioners",di);var fr={id:"tooltip",_element:Aa,positioners:di,afterInit(e,t,n){n&&(e.tooltip=new Aa({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,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:(e,t)=>t.bodyFont.size,boxWidth:(e,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:au},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},bb=Object.freeze({__proto__:null,Colors:k0,Decimation:L0,Filler:tb,Legend:sb,SubTitle:cb,Title:lb,Tooltip:fr});const yb=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function vb(e,t,n,i){const r=e.indexOf(t);if(r===-1)return yb(e,t,n,i);const a=e.lastIndexOf(t);return r!==a?n:r}const xb=(e,t)=>e===null?null:Rt(Math.round(e),0,t);function su(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Ra extends cn{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:r,label:a}of n)i[r]===a&&i.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(U(t))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===t?n:vb(i,t,H(n,t),this._addedLabels),xb(n,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),n||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const t=this.min,n=this.max,i=this.options.offset,r=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let s=t;s<=n;s++)r.push({value:s});return r}getLabelForValue(t){return su.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 n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}C(Ra,"id","category"),C(Ra,"defaults",{ticks:{callback:su}});function _b(e,t){const n=[],{bounds:r,step:a,min:s,max:o,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=e,f=a||1,p=u-1,{min:y,max:b}=t,m=!U(s),v=!U(o),x=!U(c),w=(b-y)/(d+1);let _=cl((b-y)/p/f)*f,T,M,D,S;if(_<1e-14&&!m&&!v)return[{value:y},{value:b}];S=Math.ceil(b/_)-Math.floor(y/_),S>p&&(_=cl(S*_/p/f)*f),U(l)||(T=Math.pow(10,l),_=Math.ceil(_*T)/T),r==="ticks"?(M=Math.floor(y/_)*_,D=Math.ceil(b/_)*_):(M=y,D=b),m&&v&&a&&bg((o-s)/a,_/1e3)?(S=Math.round(Math.min((o-s)/_,u)),_=(o-s)/S,M=s,D=o):x?(M=m?s:M,D=v?o:D,S=c-1,_=(D-M)/S):(S=(D-M)/_,jn(S,Math.round(S),_/1e3)?S=Math.round(S):S=Math.ceil(S));const P=Math.max(dl(_),dl(M));T=Math.pow(10,U(l)?P:l),M=Math.round(M*T)/T,D=Math.round(D*T)/T;let k=0;for(m&&(h&&M!==s?(n.push({value:s}),M<s&&k++,jn(Math.round((M+k*_)*T)/T,s,ou(s,w,e))&&k++):M<s&&k++);k<S;++k){const L=Math.round((M+k*_)*T)/T;if(v&&L>o)break;n.push({value:L})}return v&&h&&D!==o?n.length&&jn(n[n.length-1].value,o,ou(o,w,e))?n[n.length-1].value=o:n.push({value:o}):(!v||D===o)&&n.push({value:D}),n}function ou(e,t,{horizontal:n,minRotation:i}){const r=Ct(i),a=(n?Math.sin(r):Math.cos(r))||.001,s=.75*t*(""+e).length;return Math.min(t/a,s)}class gr extends cn{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,n){return U(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:r,max:a}=this;const s=l=>r=n?r:l,o=l=>a=i?a:l;if(t){const l=pe(r),c=pe(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:n,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(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=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:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,s=_b(r,a);return t.bounds==="ticks"&&ul(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 n=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const r=(i-n)/Math.max(t.length-1,1)/2;n-=r,i+=r}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return Gn(t,this.chart.options.locale,this.options.ticks.format)}}class La extends gr{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=yt(t)?t:0,this.max=yt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,i=Ct(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/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}}C(La,"id","linear"),C(La,"defaults",{ticks:{callback:$i.formatters.numeric}});const hi=e=>Math.floor(He(e)),un=(e,t)=>Math.pow(10,hi(e)+t);function lu(e){return e/Math.pow(10,hi(e))===1}function cu(e,t,n){const i=Math.pow(10,n),r=Math.floor(e/i);return Math.ceil(t/i)-r}function wb(e,t){const n=t-e;let i=hi(n);for(;cu(e,t,i)>10;)i++;for(;cu(e,t,i)<10;)i--;return Math.min(i,hi(e))}function Tb(e,{min:t,max:n}){t=ee(e.min,t);const i=[],r=hi(t);let a=wb(t,n),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)),h=ee(e.min,Math.round((l+u+d*Math.pow(10,a))*s)/s);for(;h<n;)i.push({value:h,major:lu(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,s=a>=0?1:s),h=Math.round((l+u+d*Math.pow(10,a))*s)/s;const f=ee(e.max,h);return i.push({value:f,major:lu(f),significand:d}),i}class Ia extends cn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const i=gr.prototype.parse.apply(this,[t,n]);if(i===0){this._zero=!0;return}return yt(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=yt(t)?Math.max(0,t):null,this.max=yt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!yt(this._userMin)&&(this.min=t===un(this.min,0)?un(this.min,-1):un(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let i=this.min,r=this.max;const a=o=>i=t?i:o,s=o=>r=n?r:o;i===r&&(i<=0?(a(1),s(10)):(a(un(i,-1)),s(un(r,1)))),i<=0&&a(un(r,-1)),r<=0&&s(un(i,1)),this.min=i,this.max=r}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},i=Tb(n,this);return t.bounds==="ticks"&&ul(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":Gn(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=He(t),this._valueRange=He(this.max)-He(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(He(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}C(Ia,"id","logarithmic"),C(Ia,"defaults",{ticks:{callback:$i.formatters.logarithmic,major:{enabled:!0}}});function Na(e){const t=e.ticks;if(t.display&&e.display){const n=Pt(t.backdropPadding);return H(t.font&&t.font.size,xt.font.size)+n.height}return 0}function Mb(e,t,n){return n=nt(n)?n:[n],{w:Lg(e,t.string,n),h:n.length*t.lineHeight}}function uu(e,t,n,i,r){return e===i||e===r?{start:t-n/2,end:t+n/2}:e<i||e>r?{start:t-n,end:t}:{start:t,end:t+n}}function Sb(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),i=[],r=[],a=e._pointLabels.length,s=e.options.pointLabels,o=s.centerPointLabels?X/a:0;for(let l=0;l<a;l++){const c=s.setContext(e.getPointLabelContext(l));r[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+r[l],o),d=gt(c.font),h=Mb(e.ctx,d,e._pointLabels[l]);i[l]=h;const f=ne(e.getIndexAngle(l)+o),p=Math.round(Vi(f)),y=uu(p,u.x,h.w,0,180),b=uu(p,u.y,h.h,90,270);Db(n,t,f,y,b)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=Eb(e,i,r)}function Db(e,t,n,i,r){const a=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let o=0,l=0;i.start<t.l?(o=(t.l-i.start)/a,e.l=Math.min(e.l,t.l-o)):i.end>t.r&&(o=(i.end-t.r)/a,e.r=Math.max(e.r,t.r+o)),r.start<t.t?(l=(t.t-r.start)/s,e.t=Math.min(e.t,t.t-l)):r.end>t.b&&(l=(r.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function Cb(e,t,n){const i=e.drawingArea,{extra:r,additionalAngle:a,padding:s,size:o}=n,l=e.getPointPosition(t,i+r+s,a),c=Math.round(Vi(ne(l.angle+dt))),u=Ab(l.y,o.h,c),d=kb(c),h=Ob(l.x,o.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+o.w,bottom:u+o.h}}function Pb(e,t){if(!t)return!0;const{left:n,top:i,right:r,bottom:a}=e;return!(Ee({x:n,y:i},t)||Ee({x:n,y:a},t)||Ee({x:r,y:i},t)||Ee({x:r,y:a},t))}function Eb(e,t,n){const i=[],r=e._pointLabels.length,a=e.options,{centerPointLabels:s,display:o}=a.pointLabels,l={extra:Na(a)/2,additionalAngle:s?X/r:0};let c;for(let u=0;u<r;u++){l.padding=n[u],l.size=t[u];const d=Cb(e,u,l);i.push(d),o==="auto"&&(d.visible=Pb(d,c),d.visible&&(c=d))}return i}function kb(e){return e===0||e===180?"center":e<180?"left":"right"}function Ob(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function Ab(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function Rb(e,t,n){const{left:i,top:r,right:a,bottom:s}=n,{backdropColor:o}=t;if(!U(o)){const l=Ue(t.borderRadius),c=Pt(t.backdropPadding);e.fillStyle=o;const u=i-c.left,d=r-c.top,h=a-i+c.width,f=s-r+c.height;Object.values(l).some(p=>p!==0)?(e.beginPath(),wn(e,{x:u,y:d,w:h,h:f,radius:l}),e.fill()):e.fillRect(u,d,h,f)}}function Lb(e,t){const{ctx:n,options:{pointLabels:i}}=e;for(let r=t-1;r>=0;r--){const a=e._pointLabelItems[r];if(!a.visible)continue;const s=i.setContext(e.getPointLabelContext(r));Rb(n,s,a);const o=gt(s.font),{x:l,y:c,textAlign:u}=a;rn(n,e._pointLabels[r],l,c+o.lineHeight/2,o,{color:s.color,textAlign:u,textBaseline:"middle"})}}function du(e,t,n,i){const{ctx:r}=e;if(n)r.arc(e.xCenter,e.yCenter,t,0,ut);else{let a=e.getPointPosition(0,t);r.moveTo(a.x,a.y);for(let s=1;s<i;s++)a=e.getPointPosition(s,t),r.lineTo(a.x,a.y)}}function Ib(e,t,n,i,r){const a=e.ctx,s=t.circular,{color:o,lineWidth:l}=t;!s&&!i||!o||!l||n<0||(a.save(),a.strokeStyle=o,a.lineWidth=l,a.setLineDash(r.dash),a.lineDashOffset=r.dashOffset,a.beginPath(),du(e,n,s,i),a.closePath(),a.stroke(),a.restore())}function Nb(e,t,n){return We(e,{label:n,index:t,type:"pointLabel"})}class fi extends gr{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=Pt(Na(this.options)/2),n=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=yt(t)&&!isNaN(t)?t:0,this.max=yt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Na(this.options))}generateTickLabels(t){gr.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,i)=>{const r=st(this.options.pointLabels.callback,[n,i],this);return r||r===0?r:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?Sb(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,i,r){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,i,r))}getIndexAngle(t){const n=ut/(this._pointLabels.length||1),i=this.options.startAngle||0;return ne(t*n+Ct(i))}getDistanceFromCenterForValue(t){if(U(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(U(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const i=n[t];return Nb(this.getContext(),t,i)}}getPointPosition(t,n,i=0){const r=this.getIndexAngle(t)-dt+i;return{x:Math.cos(r)*n+this.xCenter,y:Math.sin(r)*n+this.yCenter,angle:r}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:i,right:r,bottom:a}=this._pointLabelItems[t];return{left:n,top:i,right:r,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),du(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:i,grid:r,border:a}=n,s=this._pointLabels.length;let o,l,c;if(n.pointLabels.display&&Lb(this,s),r.display&&this.ticks.forEach((u,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),f=r.setContext(h),p=a.setContext(h);Ib(this,f,l,s,p)}}),i.display){for(t.save(),o=s-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:h}=u;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.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,n=this.options,i=n.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&&!n.reverse)return;const c=i.setContext(this.getContext(l)),u=gt(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=Pt(c.backdropPadding);t.fillRect(-s/2-d.left,-a-u.size/2-d.top,s+d.width,u.size+d.height)}rn(t,o.label,0,-a,u,{color:c.color})}),t.restore()}drawTitle(){}}C(fi,"id","radialLinear"),C(fi,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:$i.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),C(fi,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),C(fi,"descriptors",{angleLines:{_fallback:"grid"}});const pr={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}},Kt=Object.keys(pr);function Bb(e,t){return e-t}function hu(e,t){if(U(t))return null;const n=e._adapter,{parser:i,round:r,isoWeekday:a}=e._parseOpts;let s=t;return typeof i=="function"&&(s=i(s)),yt(s)||(s=typeof i=="string"?n.parse(s,i):n.parse(s)),s===null?null:(r&&(s=r==="week"&&(Fe(a)||a===!0)?n.startOf(s,"isoWeek",a):n.startOf(s,r)),+s)}function fu(e,t,n,i){const r=Kt.length;for(let a=Kt.indexOf(e);a<r-1;++a){const s=pr[Kt[a]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(o*s.size))<=i)return Kt[a]}return Kt[r-1]}function Hb(e,t,n,i,r){for(let a=Kt.length-1;a>=Kt.indexOf(n);a--){const s=Kt[a];if(pr[s].common&&e._adapter.diff(r,i,s)>=t-1)return s}return Kt[n?Kt.indexOf(n):0]}function Fb(e){for(let t=Kt.indexOf(e)+1,n=Kt.length;t<n;++t)if(pr[Kt[t]].common)return Kt[t]}function gu(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:i,hi:r}=ea(n,t),a=n[i]>=t?n[i]:n[r];e[a]=!0}}function Ub(e,t,n,i){const r=e._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=n[o],l>=0&&(t[l].major=!0);return t}function pu(e,t,n){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||!n?i:Ub(e,i,r,n)}class gi extends cn{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const i=t.time||(t.time={}),r=this._adapter=new ac._date(t.adapters.date);r.init(n),Vn(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:hu(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=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=yt(r)&&!isNaN(r)?r:+n.startOf(Date.now(),i),a=yt(a)&&!isNaN(a)?a:+n.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 n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],i=t[t.length-1]),{min:n,max:i}}buildTicks(){const t=this.options,n=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=_g(r,a,s);return this._unit=n.unit||(i.autoSkip?fu(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):Hb(this,o.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:Fb(this._unit),this.initOffsets(r),t.reverse&&o.reverse(),pu(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,i=0,r,a;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?n=1-r:n=(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;n=Rt(n,0,s),i=Rt(i,0,s),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const t=this._adapter,n=this.min,i=this.max,r=this.options,a=r.time,s=a.unit||fu(a.minUnit,n,i,this._getLabelCapacity(n)),o=H(r.ticks.stepSize,1),l=s==="week"?a.isoWeekday:!1,c=Fe(l)||l===!0,u={};let d=n,h,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(i,n,s)>1e5*o)throw new Error(n+" and "+i+" are too far apart with stepSize of "+o+" "+s);const p=r.ticks.source==="data"&&this.getDataTimestamps();for(h=d,f=0;h<i;h=+t.add(h,o,s),f++)gu(u,h,p);return(h===i||r.bounds==="ticks"||f===1)&&gu(u,h,p),Object.keys(u).sort((y,b)=>y-b).map(y=>+y)}getLabelForValue(t){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){const r=this.options.time.displayFormats,a=this._unit,s=n||r[a];return this._adapter.format(t,s)}_tickFormatFunction(t,n,i,r){const a=this.options,s=a.ticks.callback;if(s)return st(s,[t,n,i],this);const o=a.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&o[l],d=c&&o[c],h=i[n],f=c&&d&&h&&h.major;return this._adapter.format(t,r||(f?d:u))}generateTickLabels(t){let n,i,r;for(n=0,i=t.length;n<i;++n)r=t[n],r.label=this._tickFormatFunction(r.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,i=this.ctx.measureText(t).width,r=Ct(this.isHorizontal()?n.maxRotation:n.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 n=this.options.time,i=n.displayFormats,r=i[n.unit]||i.millisecond,a=this._tickFormatFunction(t,0,pu(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||[],n,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(n=0,i=r.length;n<i;++n)t=t.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,i;if(t.length)return t;const r=this.getLabels();for(n=0,i=r.length;n<i;++n)t.push(hu(this,r[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return pl(t.sort(Bb))}}C(gi,"id","time"),C(gi,"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 mr(e,t,n){let i=0,r=e.length-1,a,s,o,l;n?(t>=e[i].pos&&t<=e[r].pos&&({lo:i,hi:r}=Pe(e,"pos",t)),{pos:a,time:o}=e[i],{pos:s,time:l}=e[r]):(t>=e[i].time&&t<=e[r].time&&({lo:i,hi:r}=Pe(e,"time",t)),{time:a,pos:o}=e[i],{time:s,pos:l}=e[r]);const c=s-a;return c?o+(l-o)*(t-a)/c:o}class Ba extends gi{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=mr(n,this.min),this._tableRange=mr(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:i}=this,r=[],a=[];let s,o,l,c,u;for(s=0,o=t.length;s<o;++s)c=t[s],c>=n&&c<=i&&r.push(c);if(r.length<2)return[{time:n,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}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(mr(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return mr(this._table,i*this._tableRange+this._minPos,!0)}}C(Ba,"id","timeseries"),C(Ba,"defaults",gi.defaults);var Wb=Object.freeze({__proto__:null,CategoryScale:Ra,LinearScale:La,LogarithmicScale:Ia,RadialLinearScale:fi,TimeScale:gi,TimeSeriesScale:Ba});const Yb=[Xp,M0,bb,Wb],zb=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Vb=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],jb=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],$b=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],mu=(e,t,n)=>{let i=e;return typeof t=="string"||Array.isArray(t)?i=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(i=e.toLocaleString(void 0,n)),i};function Ha(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?$b:jb:t.binary?Vb:zb,i=t.space?" ":"";if(t.signed&&e===0)return` 0${i}${n[0]}`;const r=e<0,a=r?"-":t.signed?"+":"";r&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const u=mu(e,t.locale,s);return a+u+i+n[0]}const o=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**o,s||(e=e.toPrecision(3));const l=mu(Number(e),t.locale,s),c=n[o];return a+l+i+c}function Ae(e){"@babel/helpers - typeof";return Ae=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},Ae(e)}function pt(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function R(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function B(e){R(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Ae(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="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 bu(e,t){R(2,arguments);var n=B(e),i=pt(t);return isNaN(i)?new Date(NaN):(i&&n.setDate(n.getDate()+i),n)}function Fa(e,t){R(2,arguments);var n=B(e),i=pt(t);if(isNaN(i))return new Date(NaN);if(!i)return n;var r=n.getDate(),a=new Date(n.getTime());a.setMonth(n.getMonth()+i+1,0);var s=a.getDate();return r>=s?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}function pi(e,t){R(2,arguments);var n=B(e).getTime(),i=pt(t);return new Date(n+i)}var qb=36e5;function Gb(e,t){R(2,arguments);var n=pt(t);return pi(e,n*qb)}var Xb={};function je(){return Xb}function yu(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=je(),d=pt((n=(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&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=B(e),f=h.getDay(),p=(f<d?7:0)+f-d;return h.setDate(h.getDate()-p),h.setHours(0,0,0,0),h}function br(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Ua(e){R(1,arguments);var t=B(e);return t.setHours(0,0,0,0),t}var Kb=864e5;function Zb(e,t){R(2,arguments);var n=Ua(e),i=Ua(t),r=n.getTime()-br(n),a=i.getTime()-br(i);return Math.round((r-a)/Kb)}var Qb=6e4;function Jb(e,t){R(2,arguments);var n=pt(t);return pi(e,n*Qb)}function ty(e,t){R(2,arguments);var n=pt(t),i=n*3;return Fa(e,i)}function ey(e,t){R(2,arguments);var n=pt(t);return pi(e,n*1e3)}function ny(e,t){R(2,arguments);var n=pt(t),i=n*7;return bu(e,i)}function iy(e,t){R(2,arguments);var n=pt(t);return Fa(e,n*12)}function mi(e,t){R(2,arguments);var n=B(e),i=B(t),r=n.getTime()-i.getTime();return r<0?-1:r>0?1:r}var yr=6e4,bi=36e5,ry=1e3,ay=3600;function sy(e){return R(1,arguments),e instanceof Date||Ae(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Wa(e){if(R(1,arguments),!sy(e)&&typeof e!="number")return!1;var t=B(e);return!isNaN(Number(t))}function oy(e,t){R(2,arguments);var n=B(e),i=B(t),r=n.getFullYear()-i.getFullYear(),a=n.getMonth()-i.getMonth();return r*12+a}function ly(e,t){R(2,arguments);var n=B(e),i=B(t);return n.getFullYear()-i.getFullYear()}function vu(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function xu(e,t){R(2,arguments);var n=B(e),i=B(t),r=vu(n,i),a=Math.abs(Zb(n,i));n.setDate(n.getDate()-r*a);var s=+(vu(n,i)===-r),o=r*(a-s);return o===0?0:o}function vr(e,t){return R(2,arguments),B(e).getTime()-B(t).getTime()}var _u={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},cy="trunc";function yi(e){return e?_u[e]:_u[cy]}function uy(e,t,n){R(2,arguments);var i=vr(e,t)/bi;return yi(n==null?void 0:n.roundingMethod)(i)}function dy(e,t,n){R(2,arguments);var i=vr(e,t)/yr;return yi(n==null?void 0:n.roundingMethod)(i)}function wu(e){R(1,arguments);var t=B(e);return t.setHours(23,59,59,999),t}function Tu(e){R(1,arguments);var t=B(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function hy(e){R(1,arguments);var t=B(e);return wu(t).getTime()===Tu(t).getTime()}function Mu(e,t){R(2,arguments);var n=B(e),i=B(t),r=mi(n,i),a=Math.abs(oy(n,i)),s;if(a<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-r*a);var o=mi(n,i)===-r;hy(B(e))&&a===1&&mi(e,i)===1&&(o=!1),s=r*(a-Number(o))}return s===0?0:s}function fy(e,t,n){R(2,arguments);var i=Mu(e,t)/3;return yi(n==null?void 0:n.roundingMethod)(i)}function gy(e,t,n){R(2,arguments);var i=vr(e,t)/1e3;return yi(n==null?void 0:n.roundingMethod)(i)}function py(e,t,n){R(2,arguments);var i=xu(e,t)/7;return yi(n==null?void 0:n.roundingMethod)(i)}function my(e,t){R(2,arguments);var n=B(e),i=B(t),r=mi(n,i),a=Math.abs(ly(n,i));n.setFullYear(1584),i.setFullYear(1584);var s=mi(n,i)===-r,o=r*(a-Number(s));return o===0?0:o}function by(e){R(1,arguments);var t=B(e);return t.setSeconds(0,0),t}function yy(e){R(1,arguments);var t=B(e),n=t.getMonth(),i=n-n%3;return t.setMonth(i,1),t.setHours(0,0,0,0),t}function vy(e){R(1,arguments);var t=B(e);return t.setDate(1),t.setHours(0,0,0,0),t}function xy(e){R(1,arguments);var t=B(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function _y(e){R(1,arguments);var t=B(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function wy(e){R(1,arguments);var t=B(e);return t.setMinutes(59,59,999),t}function Ty(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=je(),d=pt((n=(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&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=B(e),f=h.getDay(),p=(f<d?-7:0)+6-(f-d);return h.setDate(h.getDate()+p),h.setHours(23,59,59,999),h}function My(e){R(1,arguments);var t=B(e);return t.setSeconds(59,999),t}function Sy(e){R(1,arguments);var t=B(e),n=t.getMonth(),i=n-n%3+3;return t.setMonth(i,0),t.setHours(23,59,59,999),t}function Dy(e){R(1,arguments);var t=B(e);return t.setMilliseconds(999),t}function Su(e,t){R(2,arguments);var n=pt(t);return pi(e,-n)}var Cy=864e5;function Py(e){R(1,arguments);var t=B(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),r=n-i;return Math.floor(r/Cy)+1}function Cn(e){R(1,arguments);var t=1,n=B(e),i=n.getUTCDay(),r=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-r),n.setUTCHours(0,0,0,0),n}function Du(e){R(1,arguments);var t=B(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var r=Cn(i),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var s=Cn(a);return t.getTime()>=r.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Ey(e){R(1,arguments);var t=Du(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=Cn(n);return i}var ky=6048e5;function Cu(e){R(1,arguments);var t=B(e),n=Cn(t).getTime()-Ey(t).getTime();return Math.round(n/ky)+1}function dn(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=je(),d=pt((n=(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&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=B(e),f=h.getUTCDay(),p=(f<d?7:0)+f-d;return h.setUTCDate(h.getUTCDate()-p),h.setUTCHours(0,0,0,0),h}function Ya(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=B(e),d=u.getUTCFullYear(),h=je(),f=pt((n=(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:h.firstWeekContainsDate)!==null&&i!==void 0?i:(l=h.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var y=dn(p,t),b=new Date(0);b.setUTCFullYear(d,0,f),b.setUTCHours(0,0,0,0);var m=dn(b,t);return u.getTime()>=y.getTime()?d+1:u.getTime()>=m.getTime()?d:d-1}function Oy(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=je(),d=pt((n=(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&&n!==void 0?n:1),h=Ya(e,t),f=new Date(0);f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0);var p=dn(f,t);return p}var Ay=6048e5;function Pu(e,t){R(1,arguments);var n=B(e),i=dn(n,t).getTime()-Oy(n,t).getTime();return Math.round(i/Ay)+1}function lt(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var Ry={y:function(t,n){var i=t.getUTCFullYear(),r=i>0?i:1-i;return lt(n==="yy"?r%100:r,n.length)},M:function(t,n){var i=t.getUTCMonth();return n==="M"?String(i+1):lt(i+1,2)},d:function(t,n){return lt(t.getUTCDate(),n.length)},a:function(t,n){var i=t.getUTCHours()/12>=1?"pm":"am";switch(n){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,n){return lt(t.getUTCHours()%12||12,n.length)},H:function(t,n){return lt(t.getUTCHours(),n.length)},m:function(t,n){return lt(t.getUTCMinutes(),n.length)},s:function(t,n){return lt(t.getUTCSeconds(),n.length)},S:function(t,n){var i=n.length,r=t.getUTCMilliseconds(),a=Math.floor(r*Math.pow(10,i-3));return lt(a,n.length)}};const $e=Ry;var Pn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ly={G:function(t,n,i){var r=t.getUTCFullYear()>0?1:0;switch(n){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,n,i){if(n==="yo"){var r=t.getUTCFullYear(),a=r>0?r:1-r;return i.ordinalNumber(a,{unit:"year"})}return $e.y(t,n)},Y:function(t,n,i,r){var a=Ya(t,r),s=a>0?a:1-a;if(n==="YY"){var o=s%100;return lt(o,2)}return n==="Yo"?i.ordinalNumber(s,{unit:"year"}):lt(s,n.length)},R:function(t,n){var i=Du(t);return lt(i,n.length)},u:function(t,n){var i=t.getUTCFullYear();return lt(i,n.length)},Q:function(t,n,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return lt(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,n,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return lt(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,n,i){var r=t.getUTCMonth();switch(n){case"M":case"MM":return $e.M(t,n);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,n,i){var r=t.getUTCMonth();switch(n){case"L":return String(r+1);case"LL":return lt(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,n,i,r){var a=Pu(t,r);return n==="wo"?i.ordinalNumber(a,{unit:"week"}):lt(a,n.length)},I:function(t,n,i){var r=Cu(t);return n==="Io"?i.ordinalNumber(r,{unit:"week"}):lt(r,n.length)},d:function(t,n,i){return n==="do"?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):$e.d(t,n)},D:function(t,n,i){var r=Py(t);return n==="Do"?i.ordinalNumber(r,{unit:"dayOfYear"}):lt(r,n.length)},E:function(t,n,i){var r=t.getUTCDay();switch(n){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,n,i,r){var a=t.getUTCDay(),s=(a-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return lt(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,n,i,r){var a=t.getUTCDay(),s=(a-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return lt(s,n.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,n,i){var r=t.getUTCDay(),a=r===0?7:r;switch(n){case"i":return String(a);case"ii":return lt(a,n.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,n,i){var r=t.getUTCHours(),a=r/12>=1?"pm":"am";switch(n){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,n,i){var r=t.getUTCHours(),a;switch(r===12?a=Pn.noon:r===0?a=Pn.midnight:a=r/12>=1?"pm":"am",n){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,n,i){var r=t.getUTCHours(),a;switch(r>=17?a=Pn.evening:r>=12?a=Pn.afternoon:r>=4?a=Pn.morning:a=Pn.night,n){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,n,i){if(n==="ho"){var r=t.getUTCHours()%12;return r===0&&(r=12),i.ordinalNumber(r,{unit:"hour"})}return $e.h(t,n)},H:function(t,n,i){return n==="Ho"?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):$e.H(t,n)},K:function(t,n,i){var r=t.getUTCHours()%12;return n==="Ko"?i.ordinalNumber(r,{unit:"hour"}):lt(r,n.length)},k:function(t,n,i){var r=t.getUTCHours();return r===0&&(r=24),n==="ko"?i.ordinalNumber(r,{unit:"hour"}):lt(r,n.length)},m:function(t,n,i){return n==="mo"?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):$e.m(t,n)},s:function(t,n,i){return n==="so"?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):$e.s(t,n)},S:function(t,n){return $e.S(t,n)},X:function(t,n,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return ku(s);case"XXXX":case"XX":return hn(s);case"XXXXX":case"XXX":default:return hn(s,":")}},x:function(t,n,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(n){case"x":return ku(s);case"xxxx":case"xx":return hn(s);case"xxxxx":case"xxx":default:return hn(s,":")}},O:function(t,n,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Eu(s,":");case"OOOO":default:return"GMT"+hn(s,":")}},z:function(t,n,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Eu(s,":");case"zzzz":default:return"GMT"+hn(s,":")}},t:function(t,n,i,r){var a=r._originalDate||t,s=Math.floor(a.getTime()/1e3);return lt(s,n.length)},T:function(t,n,i,r){var a=r._originalDate||t,s=a.getTime();return lt(s,n.length)}};function Eu(e,t){var n=e>0?"-":"+",i=Math.abs(e),r=Math.floor(i/60),a=i%60;if(a===0)return n+String(r);var s=t||"";return n+String(r)+s+lt(a,2)}function ku(e,t){if(e%60===0){var n=e>0?"-":"+";return n+lt(Math.abs(e)/60,2)}return hn(e,t)}function hn(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e),a=lt(Math.floor(r/60),2),s=lt(r%60,2);return i+a+n+s}const Iy=Ly;var Ou=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Au=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Ny=function(t,n){var i=t.match(/(P+)(p+)?/)||[],r=i[1],a=i[2];if(!a)return Ou(t,n);var s;switch(r){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",Ou(r,n)).replace("{{time}}",Au(a,n))},By={p:Au,P:Ny};const za=By;var Hy=["D","DD"],Fy=["YY","YYYY"];function Ru(e){return Hy.indexOf(e)!==-1}function Lu(e){return Fy.indexOf(e)!==-1}function xr(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Uy={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"}},Wy=function(t,n,i){var r,a=Uy[t];return typeof a=="string"?r=a:n===1?r=a.one:r=a.other.replace("{{count}}",n.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+r:r+" ago":r};const Yy=Wy;function Va(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}}var zy={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Vy={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jy={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},$y={date:Va({formats:zy,defaultWidth:"full"}),time:Va({formats:Vy,defaultWidth:"full"}),dateTime:Va({formats:jy,defaultWidth:"full"})};const qy=$y;var Gy={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Xy=function(t,n,i,r){return Gy[t]};const Ky=Xy;function vi(e){return function(t,n){var i=n!=null&&n.context?String(n.context):"standalone",r;if(i==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;r=e.formattingValues[s]||e.formattingValues[a]}else{var o=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;r=e.values[l]||e.values[o]}var c=e.argumentCallback?e.argumentCallback(t):t;return r[c]}}var Zy={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Qy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Jy={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"]},tv={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"]},ev={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"}},nv={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"}},iv=function(t,n){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"},rv={ordinalNumber:iv,era:vi({values:Zy,defaultWidth:"wide"}),quarter:vi({values:Qy,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:vi({values:Jy,defaultWidth:"wide"}),day:vi({values:tv,defaultWidth:"wide"}),dayPeriod:vi({values:ev,defaultWidth:"wide",formattingValues:nv,defaultFormattingWidth:"wide"})};const av=rv;function xi(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],a=t.match(r);if(!a)return null;var s=a[0],o=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?ov(o,function(d){return d.test(s)}):sv(o,function(d){return d.test(s)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var u=t.slice(s.length);return{value:c,rest:u}}}function sv(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function ov(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function lv(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var r=i[0],a=t.match(e.parsePattern);if(!a)return null;var s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;var o=t.slice(r.length);return{value:s,rest:o}}}var cv=/^(\d+)(th|st|nd|rd)?/i,uv=/\d+/i,dv={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},hv={any:[/^b/i,/^(a|c)/i]},fv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},gv={any:[/1/i,/2/i,/3/i,/4/i]},pv={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},mv={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]},bv={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},yv={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]},vv={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},xv={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}},_v={ordinalNumber:lv({matchPattern:cv,parsePattern:uv,valueCallback:function(t){return parseInt(t,10)}}),era:xi({matchPatterns:dv,defaultMatchWidth:"wide",parsePatterns:hv,defaultParseWidth:"any"}),quarter:xi({matchPatterns:fv,defaultMatchWidth:"wide",parsePatterns:gv,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:xi({matchPatterns:pv,defaultMatchWidth:"wide",parsePatterns:mv,defaultParseWidth:"any"}),day:xi({matchPatterns:bv,defaultMatchWidth:"wide",parsePatterns:yv,defaultParseWidth:"any"}),dayPeriod:xi({matchPatterns:vv,defaultMatchWidth:"any",parsePatterns:xv,defaultParseWidth:"any"})},wv={code:"en-US",formatDistance:Yy,formatLong:qy,formatRelative:Ky,localize:av,match:_v,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Iu=wv;var Tv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Mv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Sv=/^'([^]*?)'?$/,Dv=/''/g,Cv=/[a-zA-Z]/;function Pv(e,t,n){var i,r,a,s,o,l,c,u,d,h,f,p,y,b,m,v,x,w;R(2,arguments);var _=String(t),T=je(),M=(i=(r=n==null?void 0:n.locale)!==null&&r!==void 0?r:T.locale)!==null&&i!==void 0?i:Iu,D=pt((a=(s=(o=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&o!==void 0?o:T.firstWeekContainsDate)!==null&&s!==void 0?s:(d=T.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=pt((f=(p=(y=(b=n==null?void 0:n.weekStartsOn)!==null&&b!==void 0?b:n==null||(m=n.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&y!==void 0?y:T.weekStartsOn)!==null&&p!==void 0?p:(x=T.locale)===null||x===void 0||(w=x.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&f!==void 0?f:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!M.localize)throw new RangeError("locale must contain localize property");if(!M.formatLong)throw new RangeError("locale must contain formatLong property");var P=B(e);if(!Wa(P))throw new RangeError("Invalid time value");var k=br(P),L=Su(P,k),W={firstWeekContainsDate:D,weekStartsOn:S,locale:M,_originalDate:P},ct=_.match(Mv).map(function(N){var Y=N[0];if(Y==="p"||Y==="P"){var J=za[Y];return J(N,M.formatLong)}return N}).join("").match(Tv).map(function(N){if(N==="''")return"'";var Y=N[0];if(Y==="'")return Ev(N);var J=Iy[Y];if(J)return!(n!=null&&n.useAdditionalWeekYearTokens)&&Lu(N)&&xr(N,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&Ru(N)&&xr(N,t,String(e)),J(L,N,M.localize,W);if(Y.match(Cv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return N}).join("");return ct}function Ev(e){var t=e.match(Sv);return t?t[1].replace(Dv,"'"):e}function kv(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function Nu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Ov(e,t){if(e){if(typeof e=="string")return Nu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nu(e,t)}}function Bu(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ov(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(c){throw c},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
40
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,o;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(s)throw o}}}}function O(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ja(e,t){return ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},ja(e,t)}function tt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ja(e,t)}function _r(e){return _r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_r(e)}function Av(){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 Rv(e,t){if(t&&(Ae(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}function et(e){var t=Av();return function(){var i=_r(e),r;if(t){var a=_r(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return Rv(this,r)}}function K(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lv(e,t){if(Ae(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if(Ae(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hu(e){var t=Lv(e,"string");return Ae(t)==="symbol"?t:String(t)}function Fu(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Hu(i.key),i)}}function Z(e,t,n){return t&&Fu(e.prototype,t),n&&Fu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function E(e,t,n){return t=Hu(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Iv=10,Uu=function(){function e(){K(this,e),E(this,"priority",void 0),E(this,"subPriority",0)}return Z(e,[{key:"validate",value:function(n,i){return!0}}]),e}(),Nv=function(e){tt(n,e);var t=et(n);function n(i,r,a,s,o){var l;return K(this,n),l=t.call(this),l.value=i,l.validateValue=r,l.setValue=a,l.priority=s,o&&(l.subPriority=o),l}return Z(n,[{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)}}]),n}(Uu),Bv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",Iv),E(O(i),"subPriority",-1),i}return Z(n,[{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}}]),n}(Uu),it=function(){function e(){K(this,e),E(this,"incompatibleTokens",void 0),E(this,"priority",void 0),E(this,"subPriority",void 0)}return Z(e,[{key:"run",value:function(n,i,r,a){var s=this.parse(n,i,r,a);return s?{setter:new Nv(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(n,i,r){return!0}}]),e}(),Hv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",140),E(O(i),"incompatibleTokens",["R","u","t","T"]),i}return Z(n,[{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}}]),n}(it),St={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}/},ye={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 Dt(e,t){return e&&{value:t(e.value),rest:e.rest}}function _t(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function ve(e,t){var n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};var i=n[1]==="+"?1:-1,r=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:i*(r*bi+a*yr+s*ry),rest:t.slice(n[0].length)}}function Wu(e){return _t(St.anyDigitsSigned,e)}function Mt(e,t){switch(e){case 1:return _t(St.singleDigit,t);case 2:return _t(St.twoDigits,t);case 3:return _t(St.threeDigits,t);case 4:return _t(St.fourDigits,t);default:return _t(new RegExp("^\\d{1,"+e+"}"),t)}}function wr(e,t){switch(e){case 1:return _t(St.singleDigitSigned,t);case 2:return _t(St.twoDigitsSigned,t);case 3:return _t(St.threeDigitsSigned,t);case 4:return _t(St.fourDigitsSigned,t);default:return _t(new RegExp("^-?\\d{1,"+e+"}"),t)}}function $a(e){switch(e){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 Yu(e,t){var n=t>0,i=n?t:1-t,r;if(i<=50)r=e||100;else{var a=i+50,s=Math.floor(a/100)*100,o=e>=a%100;r=e+s-(o?100:0)}return n?r:1-r}function zu(e){return e%400===0||e%4===0&&e%100!==0}var Fv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",130),E(O(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="yy"}};switch(a){case"y":return Dt(Mt(4,r),o);case"yo":return Dt(s.ordinalNumber(r,{unit:"year"}),o);default:return Dt(Mt(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=Yu(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}}]),n}(it),Uv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",130),E(O(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return Dt(Mt(4,r),o);case"Yo":return Dt(s.ordinalNumber(r,{unit:"year"}),o);default:return Dt(Mt(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=Ya(r,o);if(s.isTwoDigitYear){var c=Yu(s.year,l);return r.setUTCFullYear(c,0,o.firstWeekContainsDate),r.setUTCHours(0,0,0,0),dn(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),dn(r,o)}}]),n}(it),Wv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",130),E(O(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a){return wr(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),Cn(o)}}]),n}(it),Yv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",130),E(O(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a){return wr(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}}]),n}(it),zv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",120),E(O(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"Q":case"QQ":return Mt(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}}]),n}(it),Vv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",120),E(O(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"q":case"qq":return Mt(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}}]),n}(it),jv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),E(O(i),"priority",110),i}return Z(n,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"M":return Dt(_t(St.month,r),o);case"MM":return Dt(Mt(2,r),o);case"Mo":return Dt(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}}]),n}(it),$v=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",110),E(O(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"L":return Dt(_t(St.month,r),o);case"LL":return Dt(Mt(2,r),o);case"Lo":return Dt(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}}]),n}(it);function qv(e,t,n){R(2,arguments);var i=B(e),r=pt(t),a=Pu(i,n)-r;return i.setUTCDate(i.getUTCDate()-a*7),i}var Gv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",100),E(O(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"w":return _t(St.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s,o){return dn(qv(r,s,o),o)}}]),n}(it);function Xv(e,t){R(2,arguments);var n=B(e),i=pt(t),r=Cu(n)-i;return n.setUTCDate(n.getUTCDate()-r*7),n}var Kv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",100),E(O(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"I":return _t(St.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s){return Cn(Xv(r,s))}}]),n}(it),Zv=[31,28,31,30,31,30,31,31,30,31,30,31],Qv=[31,29,31,30,31,30,31,31,30,31,30,31],Jv=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",90),E(O(i),"subPriority",1),E(O(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"d":return _t(St.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=zu(s),l=r.getUTCMonth();return o?a>=1&&a<=Qv[l]:a>=1&&a<=Zv[l]}},{key:"set",value:function(r,a,s){return r.setUTCDate(s),r.setUTCHours(0,0,0,0),r}}]),n}(it),tx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",90),E(O(i),"subpriority",1),E(O(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"D":case"DD":return _t(St.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=zu(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}}]),n}(it);function qa(e,t,n){var i,r,a,s,o,l,c,u;R(2,arguments);var d=je(),h=pt((i=(r=(a=(s=n==null?void 0:n.weekStartsOn)!==null&&s!==void 0?s:n==null||(o=n.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(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=B(e),p=pt(t),y=f.getUTCDay(),b=p%7,m=(b+7)%7,v=(m<h?7:0)+p-y;return f.setUTCDate(f.getUTCDate()+v),f}var ex=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",90),E(O(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return Z(n,[{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=qa(r,s,o),r.setUTCHours(0,0,0,0),r}}]),n}(it),nx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",90),E(O(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return Z(n,[{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 Dt(Mt(a.length,r),l);case"eo":return Dt(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=qa(r,s,o),r.setUTCHours(0,0,0,0),r}}]),n}(it),ix=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",90),E(O(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return Z(n,[{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 Dt(Mt(a.length,r),l);case"co":return Dt(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=qa(r,s,o),r.setUTCHours(0,0,0,0),r}}]),n}(it);function rx(e,t){R(2,arguments);var n=pt(t);n%7===0&&(n=n-7);var i=1,r=B(e),a=r.getUTCDay(),s=n%7,o=(s+7)%7,l=(o<i?7:0)+n-a;return r.setUTCDate(r.getUTCDate()+l),r}var ax=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",90),E(O(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){var o=function(c){return c===0?7:c};switch(a){case"i":case"ii":return Mt(a.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return Dt(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 Dt(s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Dt(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiii":default:return Dt(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=rx(r,s),r.setUTCHours(0,0,0,0),r}}]),n}(it),sx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",80),E(O(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return Z(n,[{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($a(s),0,0,0),r}}]),n}(it),ox=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",80),E(O(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return Z(n,[{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($a(s),0,0,0),r}}]),n}(it),lx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",80),E(O(i),"incompatibleTokens",["a","b","t","T"]),i}return Z(n,[{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($a(s),0,0,0),r}}]),n}(it),cx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",70),E(O(i),"incompatibleTokens",["H","K","k","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"h":return _t(St.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return Mt(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}}]),n}(it),ux=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",70),E(O(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"H":return _t(St.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return Mt(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}}]),n}(it),dx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",70),E(O(i),"incompatibleTokens",["h","H","k","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"K":return _t(St.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return Mt(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}}]),n}(it),hx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",70),E(O(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"k":return _t(St.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return Mt(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}}]),n}(it),fx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",60),E(O(i),"incompatibleTokens",["t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"m":return _t(St.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return Mt(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}}]),n}(it),gx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",50),E(O(i),"incompatibleTokens",["t","T"]),i}return Z(n,[{key:"parse",value:function(r,a,s){switch(a){case"s":return _t(St.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return Mt(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}}]),n}(it),px=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",30),E(O(i),"incompatibleTokens",["t","T"]),i}return Z(n,[{key:"parse",value:function(r,a){var s=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return Dt(Mt(a.length,r),s)}},{key:"set",value:function(r,a,s){return r.setUTCMilliseconds(s),r}}]),n}(it),mx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",10),E(O(i),"incompatibleTokens",["t","T","x"]),i}return Z(n,[{key:"parse",value:function(r,a){switch(a){case"X":return ve(ye.basicOptionalMinutes,r);case"XX":return ve(ye.basic,r);case"XXXX":return ve(ye.basicOptionalSeconds,r);case"XXXXX":return ve(ye.extendedOptionalSeconds,r);case"XXX":default:return ve(ye.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),n}(it),bx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",10),E(O(i),"incompatibleTokens",["t","T","X"]),i}return Z(n,[{key:"parse",value:function(r,a){switch(a){case"x":return ve(ye.basicOptionalMinutes,r);case"xx":return ve(ye.basic,r);case"xxxx":return ve(ye.basicOptionalSeconds,r);case"xxxxx":return ve(ye.extendedOptionalSeconds,r);case"xxx":default:return ve(ye.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),n}(it),yx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",40),E(O(i),"incompatibleTokens","*"),i}return Z(n,[{key:"parse",value:function(r){return Wu(r)}},{key:"set",value:function(r,a,s){return[new Date(s*1e3),{timestampIsSet:!0}]}}]),n}(it),vx=function(e){tt(n,e);var t=et(n);function n(){var i;K(this,n);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)),E(O(i),"priority",20),E(O(i),"incompatibleTokens","*"),i}return Z(n,[{key:"parse",value:function(r){return Wu(r)}},{key:"set",value:function(r,a,s){return[new Date(s),{timestampIsSet:!0}]}}]),n}(it),xx={G:new Hv,y:new Fv,Y:new Uv,R:new Wv,u:new Yv,Q:new zv,q:new Vv,M:new jv,L:new $v,w:new Gv,I:new Kv,d:new Jv,D:new tx,E:new ex,e:new nx,c:new ix,i:new ax,a:new sx,b:new ox,B:new lx,h:new cx,H:new ux,K:new dx,k:new hx,m:new fx,s:new gx,S:new px,X:new mx,x:new bx,t:new yx,T:new vx},_x=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Tx=/^'([^]*?)'?$/,Mx=/''/g,Sx=/\S/,Dx=/[a-zA-Z]/;function Cx(e,t,n,i){var r,a,s,o,l,c,u,d,h,f,p,y,b,m,v,x,w,_;R(3,arguments);var T=String(e),M=String(t),D=je(),S=(r=(a=i==null?void 0:i.locale)!==null&&a!==void 0?a:D.locale)!==null&&r!==void 0?r:Iu;if(!S.match)throw new RangeError("locale must contain match property");var P=pt((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:D.firstWeekContainsDate)!==null&&o!==void 0?o:(h=D.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(P>=1&&P<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=pt((p=(y=(b=(m=i==null?void 0:i.weekStartsOn)!==null&&m!==void 0?m:i==null||(v=i.locale)===null||v===void 0||(x=v.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&b!==void 0?b:D.weekStartsOn)!==null&&y!==void 0?y:(w=D.locale)===null||w===void 0||(_=w.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&p!==void 0?p:0);if(!(k>=0&&k<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(M==="")return T===""?B(n):new Date(NaN);var L={firstWeekContainsDate:P,weekStartsOn:k,locale:S},W=[new Bv],ct=M.match(wx).map(function(ht){var q=ht[0];if(q in za){var It=za[q];return It(ht,S.formatLong)}return ht}).join("").match(_x),N=[],Y=Bu(ct),J;try{var Lt=function(){var q=J.value;!(i!=null&&i.useAdditionalWeekYearTokens)&&Lu(q)&&xr(q,M,e),!(i!=null&&i.useAdditionalDayOfYearTokens)&&Ru(q)&&xr(q,M,e);var It=q[0],de=xx[It];if(de){var A=de.incompatibleTokens;if(Array.isArray(A)){var F=N.find(function(rt){return A.includes(rt.token)||rt.token===It});if(F)throw new RangeError("The format string mustn't contain `".concat(F.fullToken,"` and `").concat(q,"` at the same time"))}else if(de.incompatibleTokens==="*"&&N.length>0)throw new RangeError("The format string mustn't contain `".concat(q,"` and any other token at the same time"));N.push({token:It,fullToken:q});var z=de.run(T,q,S.match,L);if(!z)return{v:new Date(NaN)};W.push(z.setter),T=z.rest}else{if(It.match(Dx))throw new RangeError("Format string contains an unescaped latin alphabet character `"+It+"`");if(q==="''"?q="'":It==="'"&&(q=Px(q)),T.indexOf(q)===0)T=T.slice(q.length);else return{v:new Date(NaN)}}};for(Y.s();!(J=Y.n()).done;){var mt=Lt();if(Ae(mt)==="object")return mt.v}}catch(ht){Y.e(ht)}finally{Y.f()}if(T.length>0&&Sx.test(T))return new Date(NaN);var Zt=W.map(function(ht){return ht.priority}).sort(function(ht,q){return q-ht}).filter(function(ht,q,It){return It.indexOf(ht)===q}).map(function(ht){return W.filter(function(q){return q.priority===ht}).sort(function(q,It){return It.subPriority-q.subPriority})}).map(function(ht){return ht[0]}),Qt=B(n);if(isNaN(Qt.getTime()))return new Date(NaN);var At=Su(Qt,br(Qt)),Jt={},Wt=Bu(Zt),bt;try{for(Wt.s();!(bt=Wt.n()).done;){var oe=bt.value;if(!oe.validate(At,L))return new Date(NaN);var ie=oe.set(At,Jt,L);Array.isArray(ie)?(At=ie[0],kv(Jt,ie[1])):At=ie}}catch(ht){Wt.e(ht)}finally{Wt.f()}return At}function Px(e){return e.match(Tx)[1].replace(Mx,"'")}function Ex(e){R(1,arguments);var t=B(e);return t.setMinutes(0,0,0),t}function kx(e){R(1,arguments);var t=B(e);return t.setMilliseconds(0),t}function Ox(e){R(1,arguments);var t=e/bi;return Math.floor(t)}function Vu(e,t){var n;R(1,arguments);var i=pt((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(i!==2&&i!==1&&i!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var r=Ix(e),a;if(r.date){var s=Nx(r.date,i);a=Bx(s.restDateString,s.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var o=a.getTime(),l=0,c;if(r.time&&(l=Hx(r.time),isNaN(l)))return new Date(NaN);if(r.timezone){if(c=Fx(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 Tr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Ax=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Rx=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Lx=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Ix(e){var t={},n=e.split(Tr.dateTimeDelimiter),i;if(n.length>2)return t;if(/:/.test(n[0])?i=n[0]:(t.date=n[0],i=n[1],Tr.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Tr.timeZoneDelimiter)[0],i=e.substr(t.date.length,e.length))),i){var r=Tr.timezone.exec(i);r?(t.time=i.replace(r[1],""),t.timezone=r[1]):t.time=i}return t}function Nx(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=e.match(n);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:e.slice((i[1]||i[2]).length)}}function Bx(e,t){if(t===null)return new Date(NaN);var n=e.match(Ax);if(!n)return new Date(NaN);var i=!!n[4],r=_i(n[1]),a=_i(n[2])-1,s=_i(n[3]),o=_i(n[4]),l=_i(n[5])-1;if(i)return Vx(t,o,l)?Ux(t,o,l):new Date(NaN);var c=new Date(0);return!Yx(t,a,s)||!zx(t,r)?new Date(NaN):(c.setUTCFullYear(t,a,Math.max(r,s)),c)}function _i(e){return e?parseInt(e):1}function Hx(e){var t=e.match(Rx);if(!t)return NaN;var n=Ga(t[1]),i=Ga(t[2]),r=Ga(t[3]);return jx(n,i,r)?n*bi+i*yr+r*1e3:NaN}function Ga(e){return e&&parseFloat(e.replace(",","."))||0}function Fx(e){if(e==="Z")return 0;var t=e.match(Lx);if(!t)return 0;var n=t[1]==="+"?-1:1,i=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return $x(i,r)?n*(i*bi+r*yr):NaN}function Ux(e,t,n){var i=new Date(0);i.setUTCFullYear(e,0,4);var r=i.getUTCDay()||7,a=(t-1)*7+n+1-r;return i.setUTCDate(i.getUTCDate()+a),i}var Wx=[31,null,31,30,31,30,31,31,30,31,30,31];function ju(e){return e%400===0||e%4===0&&e%100!==0}function Yx(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Wx[t]||(ju(e)?29:28))}function zx(e,t){return t>=1&&t<=(ju(e)?366:365)}function Vx(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function jx(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function $x(e,t){return t>=0&&t<=59}function qx(e){R(1,arguments);var t=e/ay;return Math.floor(t)}var Gx=Object.defineProperty,Xx=(e,t,n)=>t in e?Gx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xe=(e,t,n)=>(Xx(e,typeof t!="symbol"?t+"":t,n),n),V=(e=>(e.MINUTELY="Minutely",e.HOURLY="Hourly",e.DAILY="Daily",e.WEEKLY="Weekly",e))(V||{}),wt=(e=>(e.FIFTEEN_MIN="15m",e.ONE_HOUR="1h",e.SIX_HOUR="6h",e.TWELVE_HOUR="12h",e.ONE_DAY="24h",e.SEVEN_DAY="7d",e.THIRTY_DAY="30d",e.CURRENT_WEEK="current_week",e.CURRENT_MONTH="current_month",e.CURRENT_QUARTER="current_quarter",e.PREVIOUS_WEEK="previous_week",e.PREVIOUS_MONTH="previous_month",e.PREVIOUS_QUARTER="previous_quarter",e))(wt||{}),Ot=(e=>(e.DOUGHNUT="Doughnut",e.HORIZONTAL_BAR="HorizontalBar",e.VERTICAL_BAR="VerticalBar",e.TIMESERIES_LINE="Line",e.TIMESERIES_BAR="TimeSeriesBar",e))(Ot||{});const Kx={[V.MINUTELY]:60*1e3,[V.HOURLY]:60*60*1e3,[V.DAILY]:60*60*24*1e3,[V.WEEKLY]:60*60*24*7*1e3};function wi(e){return e&&Object.values(V).find(t=>e<=Kx[t])||null}function Xa(e){"@babel/helpers - typeof";return Xa=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},Xa(e)}function Mr(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function _e(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function En(e){_e(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Xa(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="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 $u(e,t){_e(2,arguments);var n=En(e),i=Mr(t);return isNaN(i)?new Date(NaN):(i&&n.setDate(n.getDate()+i),n)}function Zx(e,t){_e(2,arguments);var n=En(e),i=Mr(t);if(isNaN(i))return new Date(NaN);if(!i)return n;var r=n.getDate(),a=new Date(n.getTime());a.setMonth(n.getMonth()+i+1,0);var s=a.getDate();return r>=s?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}var Qx={};function Jx(){return Qx}function Sr(e,t){var n,i,r,a,s,o,l,c;_e(1,arguments);var u=Jx(),d=Mr((n=(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&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=En(e),f=h.getDay(),p=(f<d?7:0)+f-d;return h.setDate(h.getDate()-p),h.setHours(0,0,0,0),h}function qu(e){_e(1,arguments);var t=En(e);return t.setHours(0,0,0,0),t}var t_=60,e_=3600;function kn(e){_e(1,arguments);var t=En(e);return t.setDate(1),t.setHours(0,0,0,0),t}function n_(e){_e(1,arguments);var t=En(e),n=t.getFullYear(),i=t.getMonth(),r=new Date(0);return r.setFullYear(n,i+1,0),r.setHours(0,0,0,0),r.getDate()}function i_(e){return _e(1,arguments),Math.floor(e*e_)}function r_(e){_e(1,arguments);var t=e/t_;return Math.floor(t)}function a_(e,t){_e(2,arguments);var n=Mr(t);return Zx(e,-n)}class ue{constructor(t){xe(this,"timeframeText"),xe(this,"key"),xe(this,"display"),xe(this,"timeframeLength"),xe(this,"allowedTiers"),xe(this,"defaultResponseGranularity"),xe(this,"dataGranularity"),xe(this,"isRelative"),xe(this,"_startCustom"),xe(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(){return this._endCustom||new Date}rawStart(){return this._startCustom||new Date(this.rawEnd().getTime()-this.timeframeLengthMs())}timeframeLengthMs(){return this.timeframeLength()*1e3}maximumTimeframeLength(){return this.timeframeLength()}allowedGranularities(){const t=new Set,n=this.maximumTimeframeLength()/3600;return n<=6&&t.add(V.MINUTELY),n>=2&&n<=7*24&&t.add(V.HOURLY),n>=2*24&&t.add(V.DAILY),n>=2*24*14&&t.add(V.WEEKLY),t}}class s_ extends ue{rawStart(){return Sr(new Date,{weekStartsOn:1})}maximumTimeframeLength(){return 60*60*24*7}}class o_ extends ue{rawStart(){return kn(new Date)}maximumTimeframeLength(){return 60*60*24*31}}class l_ extends ue{rawEnd(){return Sr(new Date,{weekStartsOn:1})}rawStart(){return Sr(new Date().setDate(new Date().getDate()-7),{weekStartsOn:1})}}class c_ extends ue{rawEnd(){return kn(new Date)}rawStart(){return kn(new Date().setMonth(new Date().getMonth()-1))}}wt.FIFTEEN_MIN,new ue({key:wt.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>60*15,defaultResponseGranularity:V.MINUTELY,dataGranularity:V.MINUTELY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),wt.ONE_HOUR,new ue({key:wt.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>60*60*1,defaultResponseGranularity:V.MINUTELY,dataGranularity:V.MINUTELY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),wt.SIX_HOUR,new ue({key:wt.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>60*60*6,defaultResponseGranularity:V.HOURLY,dataGranularity:V.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),wt.TWELVE_HOUR,new ue({key:wt.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>60*60*12,defaultResponseGranularity:V.HOURLY,dataGranularity:V.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),wt.ONE_DAY,new ue({key:wt.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>60*60*24,defaultResponseGranularity:V.HOURLY,dataGranularity:V.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),wt.SEVEN_DAY,new ue({key:wt.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:V.DAILY,dataGranularity:V.DAILY,isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),wt.THIRTY_DAY,new ue({key:wt.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>60*60*24*30,defaultResponseGranularity:V.DAILY,dataGranularity:V.DAILY,isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),wt.CURRENT_WEEK,new s_({key:wt.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const e=Sr(new Date,{weekStartsOn:1});return(qu($u(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:V.DAILY,dataGranularity:V.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),wt.CURRENT_MONTH,new o_({key:wt.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const e=kn(new Date);return(qu($u(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:V.DAILY,dataGranularity:V.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),wt.PREVIOUS_WEEK,new l_({key:wt.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:V.DAILY,dataGranularity:V.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),wt.PREVIOUS_MONTH,new c_({key:wt.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let e=0;const t=kn(new Date),n=kn(a_(new Date,1));return t.getTimezoneOffset()!==n.getTimezoneOffset()&&(e=u_(t,n)),60*60*24*n_(new Date().setMonth(new Date().getMonth()-1))+i_(e)},defaultResponseGranularity:V.DAILY,dataGranularity:V.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]});function u_(e,t){return r_(e.getTimezoneOffset()-t.getTimezoneOffset())}var Et=(e=>(e.Hidden="hidden",e.Right="right",e.Bottom="bottom",e))(Et||{});const Ka=(e,t)=>{var i,r;const{tooltip:n}=t;if(n.opacity===0){e.showTooltip=!1;return}if(n.body){const a=n.labelColors,s=((r=(i=t.chart.config)==null?void 0:i.options)==null?void 0:r.indexAxis)==="y"?"x":"y",o=[Ot.HORIZONTAL_BAR,Ot.VERTICAL_BAR].includes(e.chartType),l=e.chartType===Ot.DOUGHNUT;e.tooltipContext=n.dataPoints[0].parsed.x,e.tooltipSeries=n.dataPoints.map((c,u)=>{const d=l?c.parsed:c.parsed[s];let h;e.units==="bytes"?h=isNaN(d)?d:Ha(d):h=`${d%1===0?Ys.format(d):Ys.format(Number(d.toFixed(Sw)))} ${e.units}`;const f=o&&c.dataset.label!==c.label?`${c.dataset.label} - ${c.label}`:l?c.dataset.labels[c.dataIndex]:c.dataset.label;return{backgroundColor:a[u].backgroundColor,borderColor:a[u].borderColor,label:f,value:h,rawValue:d}}).sort((c,u)=>u.rawValue-c.rawValue),e.left=`${n.x}px`,e.top=`${n.y}px`,e.showTooltip=!0}},d_=e=>e&&e.datasets&&e.datasets.length,h_=e=>d_(e)&&e.datasets.some(t=>t.data.length),Gu=e=>h_(e)&&e.datasets.some(t=>t.data.length>1),Xu=e=>Gu(e)&&e.datasets.some(t=>t.data[0]&&Wa(t.data[0].x)),Ku=e=>Xu(e)&&e.datasets.some(t=>t.data[0]&&t.data[0].x.toString().length>=13),Za=(e,t,n)=>{const r=Math.min(t/1150,1),a=.15,s=1.15;return e.x<n?e.x+t*a*(1-r):e.x-t*s*(1-r)},f_=(e,t,n)=>e.y<n?e.y+t*.15:e.y-t*.5;function Ti(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qa={exports:{}},Zu={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Zu);var Tt=Zu.exports,Ja={exports:{}},ts={exports:{}},Qu={exports:{}};(function(e){function t(n){"@babel/helpers - typeof";return e.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},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Qu);var Ju=Qu.exports,es={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i,r){if(r.length<i)throw new TypeError(i+" argument"+(i>1?"s":"")+" required, but only "+r.length+" present")}e.exports=t.default})(es,es.exports);var Vt=es.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(Ju),r=n(Vt);function a(s){return(0,r.default)(1,arguments),s instanceof Date||(0,i.default)(s)==="object"&&Object.prototype.toString.call(s)==="[object Date]"}e.exports=t.default})(ts,ts.exports);var g_=ts.exports,ns={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(Ju),r=n(Vt);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))}e.exports=t.default})(ns,ns.exports);var we=ns.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(g_),r=n(we),a=n(Vt);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))}e.exports=t.default})(Ja,Ja.exports);var p_=Ja.exports,is={exports:{}},rs={exports:{}},as={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(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)}e.exports=t.default})(as,as.exports);var fn=as.exports;const m_=Ti(fn);(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(fn),r=n(we),a=n(Vt);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)}e.exports=t.default})(rs,rs.exports);var b_=rs.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(b_),r=n(Vt),a=n(fn);function s(o,l){(0,r.default)(2,arguments);var c=(0,a.default)(l);return(0,i.default)(o,-c)}e.exports=t.default})(is,is.exports);var y_=is.exports,ss={exports:{}},os={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(we),r=n(Vt),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}e.exports=t.default})(os,os.exports);var v_=os.exports,ls={exports:{}},cs={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(we),r=n(Vt);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}e.exports=t.default})(cs,cs.exports);var us=cs.exports,ds={exports:{}},hs={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(we),r=n(Vt),a=n(us);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),h=new Date(0);h.setUTCFullYear(c,0,4),h.setUTCHours(0,0,0,0);var f=(0,a.default)(h);return l.getTime()>=d.getTime()?c+1:l.getTime()>=f.getTime()?c:c-1}e.exports=t.default})(hs,hs.exports);var td=hs.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(td),r=n(us),a=n(Vt);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}e.exports=t.default})(ds,ds.exports);var x_=ds.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(we),r=n(us),a=n(x_),s=n(Vt),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}e.exports=t.default})(ls,ls.exports);var __=ls.exports,fs={exports:{}},gs={exports:{}},gn={};Object.defineProperty(gn,"__esModule",{value:!0}),gn.getDefaultOptions=w_,gn.setDefaultOptions=T_;var ed={};function w_(){return ed}function T_(e){ed=e}(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(we),r=n(Vt),a=n(fn),s=gn;function o(l,c){var u,d,h,f,p,y,b,m;(0,r.default)(1,arguments);var v=(0,s.getDefaultOptions)(),x=(0,a.default)((u=(d=(h=(f=c==null?void 0:c.weekStartsOn)!==null&&f!==void 0?f:c==null||(p=c.locale)===null||p===void 0||(y=p.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&h!==void 0?h:v.weekStartsOn)!==null&&d!==void 0?d:(b=v.locale)===null||b===void 0||(m=b.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&u!==void 0?u:0);if(!(x>=0&&x<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var w=(0,i.default)(l),_=w.getUTCDay(),T=(_<x?7:0)+_-x;return w.setUTCDate(w.getUTCDate()-T),w.setUTCHours(0,0,0,0),w}e.exports=t.default})(gs,gs.exports);var ps=gs.exports,ms={exports:{}},bs={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(we),r=n(Vt),a=n(ps),s=n(fn),o=gn;function l(c,u){var d,h,f,p,y,b,m,v;(0,r.default)(1,arguments);var x=(0,i.default)(c),w=x.getUTCFullYear(),_=(0,o.getDefaultOptions)(),T=(0,s.default)((d=(h=(f=(p=u==null?void 0:u.firstWeekContainsDate)!==null&&p!==void 0?p:u==null||(y=u.locale)===null||y===void 0||(b=y.options)===null||b===void 0?void 0:b.firstWeekContainsDate)!==null&&f!==void 0?f:_.firstWeekContainsDate)!==null&&h!==void 0?h:(m=_.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=new Date(0);M.setUTCFullYear(w+1,0,T),M.setUTCHours(0,0,0,0);var D=(0,a.default)(M,u),S=new Date(0);S.setUTCFullYear(w,0,T),S.setUTCHours(0,0,0,0);var P=(0,a.default)(S,u);return x.getTime()>=D.getTime()?w+1:x.getTime()>=P.getTime()?w:w-1}e.exports=t.default})(bs,bs.exports);var nd=bs.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(nd),r=n(Vt),a=n(ps),s=n(fn),o=gn;function l(c,u){var d,h,f,p,y,b,m,v;(0,r.default)(1,arguments);var x=(0,o.getDefaultOptions)(),w=(0,s.default)((d=(h=(f=(p=u==null?void 0:u.firstWeekContainsDate)!==null&&p!==void 0?p:u==null||(y=u.locale)===null||y===void 0||(b=y.options)===null||b===void 0?void 0:b.firstWeekContainsDate)!==null&&f!==void 0?f:x.firstWeekContainsDate)!==null&&h!==void 0?h:(m=x.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1),_=(0,i.default)(c,u),T=new Date(0);T.setUTCFullYear(_,0,w),T.setUTCHours(0,0,0,0);var M=(0,a.default)(T,u);return M}e.exports=t.default})(ms,ms.exports);var M_=ms.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(we),r=n(ps),a=n(M_),s=n(Vt),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,i.default)(c),h=(0,r.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(h/o)+1}e.exports=t.default})(fs,fs.exports);var S_=fs.exports,ys={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i,r){for(var a=i<0?"-":"",s=Math.abs(i).toString();s.length<r;)s="0"+s;return a+s}e.exports=t.default})(ys,ys.exports);var id=ys.exports,vs={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(id),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,e.exports=t.default})(vs,vs.exports);var D_=vs.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(v_),r=n(__),a=n(td),s=n(S_),o=n(nd),l=n(id),c=n(D_),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(m,v,x){var w=m.getUTCFullYear()>0?1:0;switch(v){case"G":case"GG":case"GGG":return x.era(w,{width:"abbreviated"});case"GGGGG":return x.era(w,{width:"narrow"});case"GGGG":default:return x.era(w,{width:"wide"})}},y:function(m,v,x){if(v==="yo"){var w=m.getUTCFullYear(),_=w>0?w:1-w;return x.ordinalNumber(_,{unit:"year"})}return c.default.y(m,v)},Y:function(m,v,x,w){var _=(0,o.default)(m,w),T=_>0?_:1-_;if(v==="YY"){var M=T%100;return(0,l.default)(M,2)}return v==="Yo"?x.ordinalNumber(T,{unit:"year"}):(0,l.default)(T,v.length)},R:function(m,v){var x=(0,a.default)(m);return(0,l.default)(x,v.length)},u:function(m,v){var x=m.getUTCFullYear();return(0,l.default)(x,v.length)},Q:function(m,v,x){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 x.ordinalNumber(w,{unit:"quarter"});case"QQQ":return x.quarter(w,{width:"abbreviated",context:"formatting"});case"QQQQQ":return x.quarter(w,{width:"narrow",context:"formatting"});case"QQQQ":default:return x.quarter(w,{width:"wide",context:"formatting"})}},q:function(m,v,x){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 x.ordinalNumber(w,{unit:"quarter"});case"qqq":return x.quarter(w,{width:"abbreviated",context:"standalone"});case"qqqqq":return x.quarter(w,{width:"narrow",context:"standalone"});case"qqqq":default:return x.quarter(w,{width:"wide",context:"standalone"})}},M:function(m,v,x){var w=m.getUTCMonth();switch(v){case"M":case"MM":return c.default.M(m,v);case"Mo":return x.ordinalNumber(w+1,{unit:"month"});case"MMM":return x.month(w,{width:"abbreviated",context:"formatting"});case"MMMMM":return x.month(w,{width:"narrow",context:"formatting"});case"MMMM":default:return x.month(w,{width:"wide",context:"formatting"})}},L:function(m,v,x){var w=m.getUTCMonth();switch(v){case"L":return String(w+1);case"LL":return(0,l.default)(w+1,2);case"Lo":return x.ordinalNumber(w+1,{unit:"month"});case"LLL":return x.month(w,{width:"abbreviated",context:"standalone"});case"LLLLL":return x.month(w,{width:"narrow",context:"standalone"});case"LLLL":default:return x.month(w,{width:"wide",context:"standalone"})}},w:function(m,v,x,w){var _=(0,s.default)(m,w);return v==="wo"?x.ordinalNumber(_,{unit:"week"}):(0,l.default)(_,v.length)},I:function(m,v,x){var w=(0,r.default)(m);return v==="Io"?x.ordinalNumber(w,{unit:"week"}):(0,l.default)(w,v.length)},d:function(m,v,x){return v==="do"?x.ordinalNumber(m.getUTCDate(),{unit:"date"}):c.default.d(m,v)},D:function(m,v,x){var w=(0,i.default)(m);return v==="Do"?x.ordinalNumber(w,{unit:"dayOfYear"}):(0,l.default)(w,v.length)},E:function(m,v,x){var w=m.getUTCDay();switch(v){case"E":case"EE":case"EEE":return x.day(w,{width:"abbreviated",context:"formatting"});case"EEEEE":return x.day(w,{width:"narrow",context:"formatting"});case"EEEEEE":return x.day(w,{width:"short",context:"formatting"});case"EEEE":default:return x.day(w,{width:"wide",context:"formatting"})}},e:function(m,v,x,w){var _=m.getUTCDay(),T=(_-w.weekStartsOn+8)%7||7;switch(v){case"e":return String(T);case"ee":return(0,l.default)(T,2);case"eo":return x.ordinalNumber(T,{unit:"day"});case"eee":return x.day(_,{width:"abbreviated",context:"formatting"});case"eeeee":return x.day(_,{width:"narrow",context:"formatting"});case"eeeeee":return x.day(_,{width:"short",context:"formatting"});case"eeee":default:return x.day(_,{width:"wide",context:"formatting"})}},c:function(m,v,x,w){var _=m.getUTCDay(),T=(_-w.weekStartsOn+8)%7||7;switch(v){case"c":return String(T);case"cc":return(0,l.default)(T,v.length);case"co":return x.ordinalNumber(T,{unit:"day"});case"ccc":return x.day(_,{width:"abbreviated",context:"standalone"});case"ccccc":return x.day(_,{width:"narrow",context:"standalone"});case"cccccc":return x.day(_,{width:"short",context:"standalone"});case"cccc":default:return x.day(_,{width:"wide",context:"standalone"})}},i:function(m,v,x){var w=m.getUTCDay(),_=w===0?7:w;switch(v){case"i":return String(_);case"ii":return(0,l.default)(_,v.length);case"io":return x.ordinalNumber(_,{unit:"day"});case"iii":return x.day(w,{width:"abbreviated",context:"formatting"});case"iiiii":return x.day(w,{width:"narrow",context:"formatting"});case"iiiiii":return x.day(w,{width:"short",context:"formatting"});case"iiii":default:return x.day(w,{width:"wide",context:"formatting"})}},a:function(m,v,x){var w=m.getUTCHours(),_=w/12>=1?"pm":"am";switch(v){case"a":case"aa":return x.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"aaa":return x.dayPeriod(_,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return x.dayPeriod(_,{width:"narrow",context:"formatting"});case"aaaa":default:return x.dayPeriod(_,{width:"wide",context:"formatting"})}},b:function(m,v,x){var w=m.getUTCHours(),_;switch(w===12?_=u.noon:w===0?_=u.midnight:_=w/12>=1?"pm":"am",v){case"b":case"bb":return x.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"bbb":return x.dayPeriod(_,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return x.dayPeriod(_,{width:"narrow",context:"formatting"});case"bbbb":default:return x.dayPeriod(_,{width:"wide",context:"formatting"})}},B:function(m,v,x){var w=m.getUTCHours(),_;switch(w>=17?_=u.evening:w>=12?_=u.afternoon:w>=4?_=u.morning:_=u.night,v){case"B":case"BB":case"BBB":return x.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"BBBBB":return x.dayPeriod(_,{width:"narrow",context:"formatting"});case"BBBB":default:return x.dayPeriod(_,{width:"wide",context:"formatting"})}},h:function(m,v,x){if(v==="ho"){var w=m.getUTCHours()%12;return w===0&&(w=12),x.ordinalNumber(w,{unit:"hour"})}return c.default.h(m,v)},H:function(m,v,x){return v==="Ho"?x.ordinalNumber(m.getUTCHours(),{unit:"hour"}):c.default.H(m,v)},K:function(m,v,x){var w=m.getUTCHours()%12;return v==="Ko"?x.ordinalNumber(w,{unit:"hour"}):(0,l.default)(w,v.length)},k:function(m,v,x){var w=m.getUTCHours();return w===0&&(w=24),v==="ko"?x.ordinalNumber(w,{unit:"hour"}):(0,l.default)(w,v.length)},m:function(m,v,x){return v==="mo"?x.ordinalNumber(m.getUTCMinutes(),{unit:"minute"}):c.default.m(m,v)},s:function(m,v,x){return v==="so"?x.ordinalNumber(m.getUTCSeconds(),{unit:"second"}):c.default.s(m,v)},S:function(m,v){return c.default.S(m,v)},X:function(m,v,x,w){var _=w._originalDate||m,T=_.getTimezoneOffset();if(T===0)return"Z";switch(v){case"X":return f(T);case"XXXX":case"XX":return p(T);case"XXXXX":case"XXX":default:return p(T,":")}},x:function(m,v,x,w){var _=w._originalDate||m,T=_.getTimezoneOffset();switch(v){case"x":return f(T);case"xxxx":case"xx":return p(T);case"xxxxx":case"xxx":default:return p(T,":")}},O:function(m,v,x,w){var _=w._originalDate||m,T=_.getTimezoneOffset();switch(v){case"O":case"OO":case"OOO":return"GMT"+h(T,":");case"OOOO":default:return"GMT"+p(T,":")}},z:function(m,v,x,w){var _=w._originalDate||m,T=_.getTimezoneOffset();switch(v){case"z":case"zz":case"zzz":return"GMT"+h(T,":");case"zzzz":default:return"GMT"+p(T,":")}},t:function(m,v,x,w){var _=w._originalDate||m,T=Math.floor(_.getTime()/1e3);return(0,l.default)(T,v.length)},T:function(m,v,x,w){var _=w._originalDate||m,T=_.getTime();return(0,l.default)(T,v.length)}};function h(b,m){var v=b>0?"-":"+",x=Math.abs(b),w=Math.floor(x/60),_=x%60;if(_===0)return v+String(w);var T=m||"";return v+String(w)+T+(0,l.default)(_,2)}function f(b,m){if(b%60===0){var v=b>0?"-":"+";return v+(0,l.default)(Math.abs(b)/60,2)}return p(b,m)}function p(b,m){var v=m||"",x=b>0?"-":"+",w=Math.abs(b),_=(0,l.default)(Math.floor(w/60),2),T=(0,l.default)(w%60,2);return x+_+v+T}var y=d;t.default=y,e.exports=t.default})(ss,ss.exports);var C_=ss.exports,xs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=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],h=u[2];if(!h)return n(l,c);var f;switch(d){case"P":f=c.dateTime({width:"short"});break;case"PP":f=c.dateTime({width:"medium"});break;case"PPP":f=c.dateTime({width:"long"});break;case"PPPP":default:f=c.dateTime({width:"full"});break}return f.replace("{{date}}",n(d,c)).replace("{{time}}",i(h,c))},a={p:i,P:r},s=a;t.default=s,e.exports=t.default})(xs,xs.exports);var P_=xs.exports,_s={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(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()}e.exports=t.default})(_s,_s.exports);var rd=_s.exports;const ad=Ti(rd);var Mi={};Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.isProtectedDayOfYearToken=O_,Mi.isProtectedWeekYearToken=A_,Mi.throwProtectedError=R_;var E_=["D","DD"],k_=["YY","YYYY"];function O_(e){return E_.indexOf(e)!==-1}function A_(e){return k_.indexOf(e)!==-1}function R_(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ws={exports:{}},Ts={exports:{}},Ms={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={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=n[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,e.exports=t.default})(Ms,Ms.exports);var L_=Ms.exports,Ss={exports:{}},Ds={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(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}}e.exports=t.default})(Ds,Ds.exports);var I_=Ds.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(I_),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,e.exports=t.default})(Ss,Ss.exports);var N_=Ss.exports,Cs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={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 n[s]},r=i;t.default=r,e.exports=t.default})(Cs,Cs.exports);var B_=Cs.exports,Ps={exports:{}},Es={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(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 h=i.argumentCallback?i.argumentCallback(r):r;return o[h]}}e.exports=t.default})(Es,Es.exports);var H_=Es.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(H_),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 b=Number(p),m=b%100;if(m>20||m<10)switch(m%10){case 1:return b+"st";case 2:return b+"nd";case 3:return b+"rd"}return b+"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"})},h=d;t.default=h,e.exports=t.default})(Ps,Ps.exports);var F_=Ps.exports,ks={exports:{}},Os={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(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],h=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],f=Array.isArray(h)?r(h,function(b){return b.test(d)}):i(h,function(b){return b.test(d)}),p;p=a.valueCallback?a.valueCallback(f):f,p=o.valueCallback?o.valueCallback(p):p;var y=s.slice(d.length);return{value:p,rest:y}}}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}e.exports=t.default})(Os,Os.exports);var U_=Os.exports,As={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(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}}}e.exports=t.default})(As,As.exports);var W_=As.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(U_),r=n(W_),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},h={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]},f={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},p={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]},y={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},b={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:h,defaultParseWidth:"any"}),day:(0,i.default)({matchPatterns:f,defaultMatchWidth:"wide",parsePatterns:p,defaultParseWidth:"any"}),dayPeriod:(0,i.default)({matchPatterns:y,defaultMatchWidth:"any",parsePatterns:b,defaultParseWidth:"any"})},v=m;t.default=v,e.exports=t.default})(ks,ks.exports);var Y_=ks.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(L_),r=n(N_),a=n(B_),s=n(F_),o=n(Y_),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,e.exports=t.default})(Ts,Ts.exports);var z_=Ts.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(z_),r=i.default;t.default=r,e.exports=t.default})(ws,ws.exports);var V_=ws.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=x;var i=n(p_),r=n(y_),a=n(we),s=n(C_),o=n(P_),l=n(rd),c=Mi,u=n(fn),d=n(Vt),h=gn,f=n(V_),p=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,y=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,b=/^'([^]*?)'?$/,m=/''/g,v=/[a-zA-Z]/;function x(_,T,M){var D,S,P,k,L,W,ct,N,Y,J,Lt,mt,Zt,Qt,At,Jt,Wt,bt;(0,d.default)(2,arguments);var oe=String(T),ie=(0,h.getDefaultOptions)(),ht=(D=(S=M==null?void 0:M.locale)!==null&&S!==void 0?S:ie.locale)!==null&&D!==void 0?D:f.default,q=(0,u.default)((P=(k=(L=(W=M==null?void 0:M.firstWeekContainsDate)!==null&&W!==void 0?W:M==null||(ct=M.locale)===null||ct===void 0||(N=ct.options)===null||N===void 0?void 0:N.firstWeekContainsDate)!==null&&L!==void 0?L:ie.firstWeekContainsDate)!==null&&k!==void 0?k:(Y=ie.locale)===null||Y===void 0||(J=Y.options)===null||J===void 0?void 0:J.firstWeekContainsDate)!==null&&P!==void 0?P:1);if(!(q>=1&&q<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var It=(0,u.default)((Lt=(mt=(Zt=(Qt=M==null?void 0:M.weekStartsOn)!==null&&Qt!==void 0?Qt:M==null||(At=M.locale)===null||At===void 0||(Jt=At.options)===null||Jt===void 0?void 0:Jt.weekStartsOn)!==null&&Zt!==void 0?Zt:ie.weekStartsOn)!==null&&mt!==void 0?mt:(Wt=ie.locale)===null||Wt===void 0||(bt=Wt.options)===null||bt===void 0?void 0:bt.weekStartsOn)!==null&&Lt!==void 0?Lt:0);if(!(It>=0&&It<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!ht.localize)throw new RangeError("locale must contain localize property");if(!ht.formatLong)throw new RangeError("locale must contain formatLong property");var de=(0,a.default)(_);if(!(0,i.default)(de))throw new RangeError("Invalid time value");var A=(0,l.default)(de),F=(0,r.default)(de,A),z={firstWeekContainsDate:q,weekStartsOn:It,locale:ht,_originalDate:de},rt=oe.match(y).map(function($){var at=$[0];if(at==="p"||at==="P"){var Yt=o.default[at];return Yt($,ht.formatLong)}return $}).join("").match(p).map(function($){if($==="''")return"'";var at=$[0];if(at==="'")return w($);var Yt=s.default[at];if(Yt)return!(M!=null&&M.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)($)&&(0,c.throwProtectedError)($,T,String(_)),!(M!=null&&M.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)($)&&(0,c.throwProtectedError)($,T,String(_)),Yt(F,$,ht.localize,z);if(at.match(v))throw new RangeError("Format string contains an unescaped latin alphabet character `"+at+"`");return $}).join("");return rt}function w(_){var T=_.match(b);return T?T[1].replace(m,"'"):_}e.exports=t.default})(Qa,Qa.exports);var j_=Qa.exports;const $_=Ti(j_);function sd(e,t,n){var i=X_(e,n.timeZone,n.locale);return i.formatToParts?q_(i,t):G_(i,t)}function q_(e,t){for(var n=e.formatToParts(t),i=n.length-1;i>=0;--i)if(n[i].type==="timeZoneName")return n[i].value}function G_(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/ [\w-+ ]+$/.exec(n);return i?i[0].substr(1):""}function X_(e,t,n){if(n&&!n.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(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}function K_(e,t){var n=tw(t);return n.formatToParts?Q_(n,e):J_(n,e)}var Z_={year:0,month:1,day:2,hour:3,minute:4,second:5};function Q_(e,t){try{for(var n=e.formatToParts(t),i=[],r=0;r<n.length;r++){var a=Z_[n[r].type];a>=0&&(i[a]=parseInt(n[r].value,10))}return i}catch(s){if(s instanceof RangeError)return[NaN];throw s}}function J_(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[i[3],i[1],i[2],i[4],i[5],i[6]]}var Rs={};function tw(e){if(!Rs[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";Rs[e]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return Rs[e]}function od(e,t,n,i,r,a,s){var o=new Date(0);return o.setUTCFullYear(e,t,n),o.setUTCHours(i,r,a,s),o}var ld=36e5,ew=6e4,Ls={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function Is(e,t,n){var i,r;if(!e||(i=Ls.timezoneZ.exec(e),i))return 0;var a;if(i=Ls.timezoneHH.exec(e),i)return a=parseInt(i[1],10),cd(a)?-(a*ld):NaN;if(i=Ls.timezoneHHMM.exec(e),i){a=parseInt(i[1],10);var s=parseInt(i[2],10);return cd(a,s)?(r=Math.abs(a)*ld+s*ew,a>0?-r:r):NaN}if(rw(e)){t=new Date(t||Date.now());var o=n?t:nw(t),l=Ns(o,e),c=n?l:iw(t,l,e);return-c}return NaN}function nw(e){return od(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Ns(e,t){var n=K_(e,t),i=od(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),r=e.getTime(),a=r%1e3;return r-=a>=0?a:1e3+a,i-r}function iw(e,t,n){var i=e.getTime(),r=i-t,a=Ns(new Date(r),n);if(t===a)return t;r-=a-t;var s=Ns(new Date(r),n);return a===s?a:Math.max(a,s)}function cd(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var ud={};function rw(e){if(ud[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),ud[e]=!0,!0}catch{return!1}}var aw=60*1e3,sw={X:function(e,t,n,i){var r=Bs(i.timeZone,i._originalDate||e);if(r===0)return"Z";switch(t){case"X":return dd(r);case"XXXX":case"XX":return On(r);case"XXXXX":case"XXX":default:return On(r,":")}},x:function(e,t,n,i){var r=Bs(i.timeZone,i._originalDate||e);switch(t){case"x":return dd(r);case"xxxx":case"xx":return On(r);case"xxxxx":case"xxx":default:return On(r,":")}},O:function(e,t,n,i){var r=Bs(i.timeZone,i._originalDate||e);switch(t){case"O":case"OO":case"OOO":return"GMT"+ow(r,":");case"OOOO":default:return"GMT"+On(r,":")}},z:function(e,t,n,i){var r=i._originalDate||e;switch(t){case"z":case"zz":case"zzz":return sd("short",r,i);case"zzzz":default:return sd("long",r,i)}}};function Bs(e,t){var n=e?Is(e,t,!0)/aw:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function Dr(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}function On(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e),a=Dr(Math.floor(r/60),2),s=Dr(Math.floor(r%60),2);return i+a+n+s}function dd(e,t){if(e%60===0){var n=e>0?"-":"+";return n+Dr(Math.abs(e)/60,2)}return On(e,t)}function ow(e,t){var n=e>0?"-":"+",i=Math.abs(e),r=Math.floor(i/60),a=i%60;if(a===0)return n+String(r);var s=t||"";return n+String(r)+s+Dr(a,2)}const lw=sw;var cw=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Hs=36e5,hd=6e4,uw=2,jt={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 fd(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);var n=t||{},i=n.additionalDigits==null?uw:m_(n.additionalDigits);if(i!==2&&i!==1&&i!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var r=dw(e),a=hw(r.date,i),s=a.year,o=a.restDateString,l=fw(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(r.time&&(u=gw(r.time),isNaN(u)))return new Date(NaN);if(r.timeZone||n.timeZone){if(d=Is(r.timeZone||n.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=ad(new Date(c+u)),d=ad(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function dw(e){var t={},n=jt.dateTimePattern.exec(e),i;if(n?(t.date=n[1],i=n[3]):(n=jt.datePattern.exec(e),n?(t.date=n[1],i=n[2]):(t.date=null,i=e)),i){var r=jt.timeZone.exec(i);r?(t.time=i.replace(r[1],""),t.timeZone=r[1].trim()):t.time=i}return t}function hw(e,t){var n=jt.YYY[t],i=jt.YYYYY[t],r;if(r=jt.YYYY.exec(e)||i.exec(e),r){var a=r[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(r=jt.YY.exec(e)||n.exec(e),r){var s=r[1];return{year:parseInt(s,10)*100,restDateString:e.slice(s.length)}}return{year:null}}function fw(e,t){if(t===null)return null;var n,i,r,a;if(e.length===0)return i=new Date(0),i.setUTCFullYear(t),i;if(n=jt.MM.exec(e),n)return i=new Date(0),r=parseInt(n[1],10)-1,md(t,r)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(n=jt.DDD.exec(e),n){i=new Date(0);var s=parseInt(n[1],10);return bw(t,s)?(i.setUTCFullYear(t,0,s),i):new Date(NaN)}if(n=jt.MMDD.exec(e),n){i=new Date(0),r=parseInt(n[1],10)-1;var o=parseInt(n[2],10);return md(t,r,o)?(i.setUTCFullYear(t,r,o),i):new Date(NaN)}if(n=jt.Www.exec(e),n)return a=parseInt(n[1],10)-1,bd(t,a)?gd(t,a):new Date(NaN);if(n=jt.WwwD.exec(e),n){a=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return bd(t,a,l)?gd(t,a,l):new Date(NaN)}return null}function gw(e){var t,n,i;if(t=jt.HH.exec(e),t)return n=parseFloat(t[1].replace(",",".")),Fs(n)?n%24*Hs:NaN;if(t=jt.HHMM.exec(e),t)return n=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")),Fs(n,i)?n%24*Hs+i*hd:NaN;if(t=jt.HHMMSS.exec(e),t){n=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return Fs(n,i,r)?n%24*Hs+i*hd+r*1e3:NaN}return null}function gd(e,t,n){t=t||0,n=n||0;var i=new Date(0);i.setUTCFullYear(e,0,4);var r=i.getUTCDay()||7,a=t*7+n+1-r;return i.setUTCDate(i.getUTCDate()+a),i}var pw=[31,28,31,30,31,30,31,31,30,31,30,31],mw=[31,29,31,30,31,30,31,31,30,31,30,31];function pd(e){return e%400===0||e%4===0&&e%100!==0}function md(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;var i=pd(e);if(i&&n>mw[t]||!i&&n>pw[t])return!1}return!0}function bw(e,t){if(t<1)return!1;var n=pd(e);return!(n&&t>366||!n&&t>365)}function bd(e,t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function Fs(e,t,n){return!(e!=null&&(e<0||e>=25)||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}var yw=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function vw(e,t,n){var i=String(t),r=n||{},a=i.match(yw);if(a){var s=fd(e,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,"'"+lw[l[0]](s,l,null,r)+"'");return u?d.substring(0,c-1)+d.substring(c+1):d},i)}return $_(e,i,r)}var Us={exports:{}},Ws={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(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}e.exports=t.default})(Ws,Ws.exports);var xw=Ws.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(xw);function r(a){return(0,i.default)({},a)}e.exports=t.default})(Us,Us.exports);var _w=Us.exports;const ww=Ti(_w);function Tw(e,t,n){var i=fd(e,n),r=Is(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 Mw(e,t,n,i){var r=ww(i);return r.timeZone=t,vw(Tw(e,t),n,r)}const Sw=2,Ys=new Intl.NumberFormat(((hh=document==null?void 0:document.documentElement)==null?void 0:hh.lang)||"en-US");function Dw(e,t={}){if(!e)return e;const n=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(e);return Mw(r,n,i)}catch{return console.error("Invalid value passed to formatTime",e),"(invalid date)"}}const zs=10,Re=["#a86cd5","#6a86d2","#00bbf9","#00c4b0","#ffdf15"],Si=(e,t)=>(t||Re)[e%Re.length],Di=(e,t)=>{e[0]==="#"&&(e=e.slice(1));let n=parseInt(e.substring(0,2),16),i=parseInt(e.substring(2,4),16),r=parseInt(e.substring(4,6),16);n=n-t,i=i-t,r=r-t,n>255?n=255:n<0&&(n=0),i>255?i=255:i<0&&(i=0),r>255?r=255:r<0&&(r=0);const a=n.toString(16).length===1?"0"+n.toString(16):n.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}`},yd="#6f7787",Cw={lineTension:.4,borderWidth:2,pointBorderWidth:1.2,borderJoinStyle:"round",fill:!0},Vs=new Map,js=(e,t)=>t==="bytes"?Ha(e):t==="count/minute"?e.toFixed(2):Ys.format(e),vd=e=>{const n=document.createElement("canvas").getContext("2d"),i=gt({});return n.font=i.string,n.measureText(e).width},Pw=()=>{const e="label_height";if(!Vs.has(e)){const t=gt({});Vs.set(e,t.lineHeight)}return Vs.get(e)},Ew=e=>e.datasets.reduce((t,n)=>t+n.data.reduce((i,r)=>isNaN(r)?i:i+r,0),0),xd=(e,t)=>t.datasets.reduce((n,i,r)=>e.isDatasetVisible(r)?n+i.data.reduce((a,s)=>isNaN(s)?a:a+s,0):n,0),_d=(e,t)=>t===0?" (0.0%)":` (${(e/t*100).toFixed(1)}%)`;function kw(e){const t={enabled:!1,position:"barChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};return fr.positioners.barChartTooltipPosition=function(i,r){if(!i.length)return!1;const a=this.chart.canvas.getBoundingClientRect(),s=e.tooltipState.width||this.width,o=a.width/2,l=Za(r,s,o),c=r.y,u=r.x<o?"left":"center";return{x:l-e.tooltipState.offset,y:c,xAlign:u}},g.computed(()=>{var i,r,a,s,o,l,c,u;return{indexAxis:e.indexAxis,scales:{x:{border:{display:!1},stacked:e.stacked,grid:{display:!1,drawBorder:!1},ticks:{maxRotation:90,autoSkip:!1,callback:function(d,h){const f=this;if(f.chart.options.indexAxis===f.axis){d=f.getLabelForValue(h);const p=10;return d&&d.length>p?d.slice(0,p)+"...":d}return f.getLabelForValue(Number(d))}},title:{display:e.indexAxis==="y"?!U((i=e.metricAxesTitle)==null?void 0:i.value):!U((r=e.dimensionAxesTitle)==null?void 0:r.value),text:e.indexAxis==="y"?(a=e.metricAxesTitle)==null?void 0:a.value:(s=e.dimensionAxesTitle)==null?void 0:s.value,padding:{top:20},font:{weight:"bold"}}},y:{border:{display:!1},stacked:e.stacked.value,beginAtZero:!0,grid:{display:!1,drawBorder:!1},ticks:{callback:function(d,h){const f=this;return f.chart.options.indexAxis===f.axis?(d=f.getLabelForValue(h),d&&d.length>zs?d.slice(0,zs)+"...":d):f.getLabelForValue(Number(d))}},title:{display:e.indexAxis==="x"?!U((o=e.metricAxesTitle)==null?void 0:o.value):!U((l=e.dimensionAxesTitle)==null?void 0:l.value),text:e.indexAxis==="x"?(c=e.metricAxesTitle)==null?void 0:c.value:(u=e.dimensionAxesTitle)==null?void 0:u.value,padding:{bottom:20},font:{weight:"bold"}}}},plugins:{htmlLegend:{containerID:e.legendID},legend:{display:!1},tooltip:{...t,external:d=>{Ka(e.tooltipState,d)}}},onHover:{mode:"nearest",intersect:!0},maxBarThickness:60,maintainAspectRatio:!1}})}Gt.register(...Yb);const Ow=(e,t)=>{const n=t.datasets.map(r=>r.label),i=e.datasets.map(r=>r.label);return e.datasets.length===t.datasets.length&&n.every((r,a)=>r===i[a])};function Aw(e,t,n,i,r){const a=g.shallowRef(null),s=(o,l)=>{if(t.value)return new Gt(t.value,{type:e,data:o,plugins:i,options:l})};return g.onMounted(()=>{a.value=s(n.value,r.value)}),g.onUnmounted(()=>{U(a.value)||a.value.destroy()}),g.watch(n,(o,l)=>{if(Ow(l,o)&&!U(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 U(a.value)||a.value.destroy(),a.value=s(o,r.value)}),g.watch(t,()=>{U(a.value)||a.value.destroy(),a.value=s(n.value,r.value)}),g.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))&&(U(a.value)||a.value.destroy(),a.value=s(n.value,o))}),a}var wd={exports:{}};(function(e){(function(){function t(c,u){if(u.separator===!1||c<1e3)return c.toString();var d=typeof u.separator=="string"?u.separator:",",h=[],f=Math.round(c).toString().split("");return f.reverse().forEach(function(p,y){y&&y%3===0&&h.push(d),h.push(p)}),h.reverse().join("")}function n(c,u,d){var h=c/u,f=d.round?"round":"floor";return d.decimal===!1?(c=Math[f](h),c.toString()):(d.precision?c=h:c=h<10?Math[f](h*10)/10:Math[f](h),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 h=c<0;h&&(c=Math.abs(c)),u.precision&&(c=parseFloat(c.toPrecision(u.precision)));var f=u.min10k?r:i;return c<f||u.precision&&u.precision>Math.log10(c)?d=t(n(c,1,u),u):c<a?d=n(c,i,u)+"k":c<s?d=n(c,a,u)+"m":c<o?d=t(n(c,s,u),u)+"b":d=t(n(c,o,u),u)+"t",h&&(d="-"+d),u.capital&&(d=d.toUpperCase()),u.prefix&&(d=u.prefix+d),u.suffix&&(d=d+u.suffix),d}l.addCommas=t,e.exports=l})()})(wd);var Rw=wd.exports;const $s=Ti(Rw);function Lw(e,t,n){const{i18n:i}=Bt.useI18n();return{legendValues:g.computed(()=>e.value.datasets.reduce((a,s)=>{const o=s.total?s.total:[Ot.TIMESERIES_BAR,Ot.TIMESERIES_LINE].some(c=>c===t)?s.data.reduce((c,{y:u})=>c+(Number(u)||0),0):s.data.reduce((c,u)=>c+Number(u),0);let l;if(n.value==="bytes")l=isNaN(o)?"0":Ha(o);else{l=`${$s(o,{capital:!0})} ${n.value}`;const c=n.value&&i&&i.te(`chartUnits.${n.value}`)&&i.t(`chartUnits.${n.value}`)||n.value;l=i&&i.t("legend.datapointValueDisplay",{value:$s(o,{capital:!0}),unit:c})||`${$s(o,{capital:!0})} ${n.value}`}return{...a,[s.label]:{raw:o,formatted:l}}},{}))}}function Iw(e){const t={enabled:!1,position:"doughnutChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};return fr.positioners.doughnutChartTooltipPosition=function(i,r){if(!i.length)return!1;const a=this.chart.canvas.getBoundingClientRect(),s=e.tooltipState.width||this.width,o=a.width/2,l=Za(r,s,o),c=r.y,u=r.x<o?"left":"center";return{x:l-e.tooltipState.offset,y:c,xAlign:u}},{options:g.computed(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:e.legendID},legend:{display:!1},tooltip:{...t,external:i=>{Ka(e.tooltipState,i)}}}}))}}function Nw(e){const t=g.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:!U((l=e.dimensionAxesTitle)==null?void 0:l.value),text:(c=e.dimensionAxesTitle)==null?void 0:c.value,padding:{top:20},font:{weight:"bold"}}}}),n=g.computed(()=>{var l,c;return{title:{display:!U((l=e.metricAxesTitle)==null?void 0:l.value),text:(c=e.metricAxesTitle)==null?void 0:c.value,padding:{bottom:20},font:{weight:"bold"}},ticks:{maxTicksLimit:5},grid:{drawBorder:!1},id:"main-y-axis",beginAtZero:!0}}),i={enabled:!1,mode:"index",intersect:!1,position:"lineChartTooltipPosition"};fr.positioners.lineChartTooltipPosition=function(l,c){if(!l.length)return!1;const u=this.chart.canvas.getBoundingClientRect(),d=e.tooltipState.width||this.width,h=e.tooltipState.height||this.height,f=u.width/2,p=u.height/2,y=Za(c,d,f);let b=f_(c,h,p);const m=c.y<p?"top":"bottom",v=c.x<f?"left":"center";return h>u.height&&(b=0),{x:y,y:b,xAlign:v,yAlign:m}};const r=g.computed(()=>{switch(e.granularity.value){case V.MINUTELY:return"minute";case V.HOURLY:return"hour";case V.DAILY:return"day";default:return"day"}}),a=g.computed(()=>e.timeRangeMs?Ox(Number(e.timeRangeMs.value))>=24?"yyyy-MM-dd h:mm":"h:mm":qx(Number(e.timeRangeSec.value))>=24?"yyyy-MM-dd h:mm":"h:mm"),s=g.computed(()=>[V.DAILY,V.WEEKLY].includes(e.granularity.value)?"yyyy-MM-dd":"yyyy-MM-dd h:mm");return{options:g.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:e.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},...n.value,stacked:e.stacked.value}},responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:e.legendID},legend:{display:!1},streaming:!1,tooltip:{...i,external:l=>{Ka(e.tooltipState,l)}}}}))}}function Bw(e,t){const{i18n:n}=Bt.useI18n();return g.computed(()=>{try{if(t.value&&"meta"in t.value&&"records"in t.value){const r=t.value.records,{dimensions:a,metricNames:s}=t.value.meta,o=a&&Object.keys(a),l=a&&o&&(o.length===1?o[0]!=="Organization":o.length>0);if(!r.length||!s)return{datasets:[],labels:[]};const c=l&&o||s,u=c[0],d=c.length>1?c[1]:c[0],h=s[0],f=Object.fromEntries(r.map(m=>{const v=l?`${m.event[u]},${m.event[d]}`:`${u},${d}`,x=m.event[h];return[v,x]})),p=l&&a[u]||s,y=l&&a[d]||s;return!p||!y?{labels:[],datasets:[]}:{labels:l?a[u].map(m=>n&&n.te(`chartLabels.${m}`)&&n.t(`chartLabels.${m}`)||m):s.map(m=>n&&n.te(`chartLabels.${m}`)&&n.t(`chartLabels.${m}`)||m),datasets:y&&Array.from(y).flatMap((m,v)=>{if(!m)return[];let{colorPalette:x}=e;U(x)&&(x=Re);const w={},_=Array.isArray(x)?Si(v,x):x[m]||Si(v);return w[m]=_,{label:n&&n.te(`chartLabels.${m}`)&&n.t(`chartLabels.${m}`)||m,backgroundColor:_,data:p.map(T=>f[`${T},${m}`]||0)}})}}}catch(r){return console.error(r),{datasets:[],labels:[]}}return{labels:[],datasets:[]}})}const Hw=(e,t,n=1)=>Array(Math.ceil((t-e)/n)).fill(e).map((i,r)=>i+r*n),Fw=e=>{if(typeof e=="string"){const t=+e;if(t)return t;try{return Vu(e).getTime()}catch(n){if(n instanceof RangeError)return 0;throw n}}return e},Uw=(e,t,n,i,r)=>{const s=Math.max(t-6e4,Math.max(...(r||[]).map(c=>new Date(c.timestamp).valueOf()))),o=Math.floor((e-i)/n)*n+i,l=Math.floor((s-i)/n)*n+i+n;return Hw(o,l,n)};function Ww(e,t){const{i18n:n}=Bt.useI18n();return g.computed(()=>{try{if(t.value&&"meta"in t.value&&"records"in t.value){const r=t.value.records,{dimensions:a,metricNames:s}=t.value.meta,o="startMs"in t.value.meta?t.value.meta.startMs:t.value.meta.start*1e3,l="endMs"in t.value.meta?t.value.meta.endMs:t.value.meta.end*1e3;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=s&&s[0],d=c&&c[0]||u,h=a&&a[d]||s,f=t.value.meta.granularity;if(typeof f!="number"||isNaN(f)||!isFinite(f)||f===0)return console.error("Invalid step value:",f),{datasets:[]};if(!r.length)return{datasets:[]};const p=Fw(o),y=Uw(o,l,f,p,r),b=new Set,m=r!=null&&r.length?r.reduce((_,T)=>{const M=new Date(T.timestamp).valueOf(),D=T.event;return b.add(u),M in _||(_[M]={}),u in _[M]||(_[M][u]={}),h.forEach(S=>{D[d]===S||d===S?_[M][u][S]=Math.round(Number(D[u])*1e3)/1e3:c.length||(_[M][u][S]=Math.round(Number(D[S])*1e3)/1e3)}),_},{}):{},v=[...b].reduce((_,T)=>(h.forEach(M=>_.push([T,M])),_),[]),x={},w=[...v].map(([_,T],M)=>{const D=y.map(W=>W in m&&_ in m[W]?{x:W,y:m[W][_][T]||0}:{x:W,y:0});let{colorPalette:S,fill:P}=e;U(S)&&(S=Re);const k=Array.isArray(S)?Si(M,S):S[T]||Si(M),L=Di(k,50);return x[T]=k,{rawDimension:T,rawMetric:_,label:n&&n.te(`chartLabels.${T}`)&&n.t(`chartLabels.${T}`)||T,borderColor:L,backgroundColor:k,data:D,total:D.reduce((W,{y:ct})=>W+Number(ct),0),...Cw,fill:P}});return w.sort((_,T)=>Number(_.total)<Number(T.total)?-1:1),{datasets:w,colorMap:x}}}catch(r){return console.error(r),{labels:[],datasets:[]}}return{labels:[],datasets:[]}})}const Bt={useBarChartOptions:kw,useChartJSCommon:Aw,useChartLegendValues:Lw,useExploreResultToDatasets:Bw,useExploreResultToTimeDataset:Ww,useDoughnutChartOptions:Iw,useLinechartOptions:Nw,useI18n:Ff,useReportChartDataForSynthetics:(e,t)=>{g.watch([e,t],(n,i,r)=>{const[a,s]=n;!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})}};/*!
|
|
41
41
|
* chartjs-plugin-annotation v2.2.1
|
|
42
42
|
* https://www.chartjs.org/chartjs-plugin-annotation/index
|
|
43
43
|
* (c) 2023 chartjs-plugin-annotation Contributors
|
|
44
44
|
* Released under the MIT License
|
|
45
|
-
*/const Td={modes:{point(e,t){return Cr(e,t,{intersect:!0})},nearest(e,t,n){return zw(e,t,n)},x(e,t,n){return Cr(e,t,{intersect:n.intersect,axis:"x"})},y(e,t,n){return Cr(e,t,{intersect:n.intersect,axis:"y"})}}};function qs(e,t,n){return(Td.modes[n.mode]||Td.modes.nearest)(e,t,n)}function Ww(e,t,n){return n!=="x"&&n!=="y"?e.inRange(t.x,t.y,"x",!0)||e.inRange(t.x,t.y,"y",!0):e.inRange(t.x,t.y,n,!0)}function Yw(e,t,n){return n==="x"?{x:e.x,y:t.y}:n==="y"?{x:t.x,y:e.y}:t}function Cr(e,t,n){return e.visibleElements.filter(i=>n.intersect?i.inRange(t.x,t.y):Ww(i,t,n.axis))}function zw(e,t,n){let i=Number.POSITIVE_INFINITY;return Cr(e,t,n).reduce((r,a)=>{const s=a.getCenterPoint(),o=Yw(t,s,n.axis),l=_n(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 Vw=(e,t)=>t>e||e.length>t.length&&e.slice(0,t.length)===t,pn=.001,Pr=(e,t,n)=>Math.min(n,Math.max(t,e));function jw(e,t,n){for(const i of Object.keys(e))e[i]=Pr(e[i],t,n);return e}function $w(e,t,n,i){if(!e||!t||n<=0)return!1;const r=i/2;return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<=Math.pow(n+r,2)}function Md(e,{x:t,y:n,x2:i,y2:r},a,s){const o=s/2,l=e.x>=t-o-pn&&e.x<=i+o+pn,c=e.y>=n-o-pn&&e.y<=r+o+pn;return a==="x"?l:(a==="y"||l)&&c}function An(e,t){const{centerX:n,centerY:i}=e.getProps(["centerX","centerY"],t);return{x:n,y:i}}function qw(e,t,n,i=!0){const r=n.split(".");let a=0;for(const s of t.split(".")){const o=r[a++];if(parseInt(s,10)<parseInt(o,10))break;if(Vw(o,s)){if(i)throw new Error(`${e} v${n} is not supported. v${t} or newer is required.`);return!1}}return!0}const Sd=e=>typeof e=="string"&&e.endsWith("%"),Dd=e=>parseFloat(e)/100,Cd=e=>Pr(Dd(e),0,1);function Gs(e,t){return t==="start"?0:t==="end"?e:Sd(t)?Cd(t)*e:e/2}function qe(e,t,n=!0){return typeof t=="number"?t:Sd(t)?(n?Cd(t):Dd(t))*e:e}function Gw(e,t){const{x:n,width:i}=e,r=t.textAlign;return r==="center"?n+i/2:r==="end"||r==="right"?n+i:n}function Xs(e,t="center"){return V(e)?{x:H(e.x,t),y:H(e.y,t)}:(e=H(e,t),{x:e,y:e})}function Pd(e){return e&&($t(e.xValue)||$t(e.yValue))}function Di(e,t,n,i=!1){const r=n.init;if(r){if(r===!0)return kd(t,i)}else return;return Xw(t,i,st(r,[{chart:e,properties:t,options:n}]))}function Ed(e,t,n){let i=!1;return t.forEach(r=>{qt(e[r])?(i=!0,n[r]=e[r]):$t(n[r])&&delete n[r]}),i}function kd({centerX:e,centerY:t},n){return n?{centerX:e,centerY:t,radius:0,width:0,height:0}:{x:e,y:t,x2:e,y2:t,width:0,height:0}}function Xw(e,t,n){if(n===!0)return kd(e,t);if(V(n))return n}const Ks=new Map,Kw=e=>isNaN(e)||e<=0,Zw=e=>e.reduce(function(t,n){return t+=n.string,t},"");function Er(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function Zs(e,{x:t,y:n},i){i&&(e.translate(t,n),e.rotate(Ct(i)),e.translate(-t,-n))}function Ge(e,t){if(t&&t.borderWidth)return e.lineCap=t.borderCapStyle,e.setLineDash(t.borderDash),e.lineDashOffset=t.borderDashOffset,e.lineJoin=t.borderJoinStyle,e.lineWidth=t.borderWidth,e.strokeStyle=t.borderColor,!0}function Rn(e,t){e.shadowColor=t.backgroundShadowColor,e.shadowBlur=t.shadowBlur,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY}function Qs(e,t){const n=t.content;if(Er(n))return{width:qe(n.width,t.width),height:qe(n.height,t.height)};const i=t.font,r=nt(i)?i.map(l=>gt(l)):[gt(i)],a=t.textStrokeWidth,s=nt(n)?n:[n],o=s.join()+Zw(r)+a+(e._measureText?"-spriting":"");return Ks.has(o)||Ks.set(o,n1(e,s,r,a)),Ks.get(o)}function Od(e,t,n){const{x:i,y:r,width:a,height:s}=t;e.save(),Rn(e,n);const o=Ge(e,n);e.fillStyle=n.backgroundColor,e.beginPath(),wn(e,{x:i,y:r,w:a,h:s,radius:jw(Ue(n.borderRadius),0,Math.min(a,s)/2)}),e.closePath(),e.fill(),o&&(e.shadowColor=n.borderShadowColor,e.stroke()),e.restore()}function Qw(e,t,n){const i=n.content;if(Er(i)){e.save(),e.globalAlpha=a1(n.opacity,i.style.opacity),e.drawImage(i,t.x,t.y,t.width,t.height),e.restore();return}const r=nt(i)?i:[i],a=n.font,s=nt(a)?a.map(d=>gt(d)):[gt(a)],o=n.color,l=nt(o)?o:[o],c=Gw(t,n),u=t.y+n.textStrokeWidth/2;e.save(),e.textBaseline="middle",e.textAlign=n.textAlign,Jw(e,n)&&i1(e,{x:c,y:u},r,s),r1(e,{x:c,y:u},r,{fonts:s,colors:l}),e.restore()}function Jw(e,t){if(t.textStrokeWidth>0)return e.lineJoin="round",e.miterLimit=2,e.lineWidth=t.textStrokeWidth,e.strokeStyle=t.textStrokeColor,!0}function t1(e,t,n,i){const{radius:r,options:a}=t,s=a.pointStyle,o=a.rotation;let l=(o||0)*ta;if(Er(s)){e.save(),e.translate(n,i),e.rotate(l),e.drawImage(s,-s.width/2,-s.height/2,s.width,s.height),e.restore();return}Kw(r)||e1(e,{x:n,y:i,radius:r,rotation:o,style:s,rad:l})}function e1(e,{x:t,y:n,radius:i,rotation:r,style:a,rad:s}){let o,l,c,u;switch(e.beginPath(),a){default:e.arc(t,n,i,0,ut),e.closePath();break;case"triangle":e.moveTo(t+Math.sin(s)*i,n-Math.cos(s)*i),s+=Yi,e.lineTo(t+Math.sin(s)*i,n-Math.cos(s)*i),s+=Yi,e.lineTo(t+Math.sin(s)*i,n-Math.cos(s)*i),e.closePath();break;case"rectRounded":u=i*.516,c=i-u,o=Math.cos(s+se)*c,l=Math.sin(s+se)*c,e.arc(t-o,n-l,u,s-X,s-dt),e.arc(t+l,n-o,u,s-dt,s),e.arc(t+o,n+l,u,s,s+dt),e.arc(t-l,n+o,u,s+dt,s+X),e.closePath();break;case"rect":if(!r){c=Math.SQRT1_2*i,e.rect(t-c,n-c,2*c,2*c);break}s+=se;case"rectRot":o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+l,n-o),e.lineTo(t+o,n+l),e.lineTo(t-l,n+o),e.closePath();break;case"crossRot":s+=se;case"cross":o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+o,n+l),e.moveTo(t+l,n-o),e.lineTo(t-l,n+o);break;case"star":o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+o,n+l),e.moveTo(t+l,n-o),e.lineTo(t-l,n+o),s+=se,o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+o,n+l),e.moveTo(t+l,n-o),e.lineTo(t-l,n+o);break;case"line":o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+o,n+l);break;case"dash":e.moveTo(t,n),e.lineTo(t+Math.cos(s)*i,n+Math.sin(s)*i);break}e.fill()}function n1(e,t,n,i){e.save();const r=t.length;let a=0,s=i;for(let o=0;o<r;o++){const l=n[Math.min(o,n.length-1)];e.font=l.string;const c=t[o];a=Math.max(a,e.measureText(c).width+i),s+=l.lineHeight}return e.restore(),{width:a,height:s}}function i1(e,{x:t,y:n},i,r){e.beginPath();let a=0;i.forEach(function(s,o){const l=r[Math.min(o,r.length-1)],c=l.lineHeight;e.font=l.string,e.strokeText(s,t,n+c/2+a),a+=c}),e.stroke()}function r1(e,{x:t,y:n},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;e.beginPath(),e.font=u.string,e.fillStyle=c,e.fillText(o,t,n+d/2+s),s+=d,e.fill()})}function a1(e,t){const n=Fe(e)?e:t;return Fe(n)?Pr(n,0,1):1}const Ad={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 Ln(e,t,n){return t=typeof t=="number"?t:e.parse(t),yt(t)?e.getPixelForValue(t):n}function mn(e,t,n){const i=t[n];if(i||n==="scaleID")return i;const r=n.charAt(0),a=Object.values(e).filter(s=>s.axis&&s.axis===r);return a.length?a[0].id:r}function Rd(e,t){if(e){const n=e.options.reverse,i=Ln(e,t.min,n?t.end:t.start),r=Ln(e,t.max,n?t.start:t.end);return{start:i,end:r}}}function Ld(e,t){const{chartArea:n,scales:i}=e,r=i[mn(i,t,"xScaleID")],a=i[mn(i,t,"yScaleID")];let s=n.width/2,o=n.height/2;return r&&(s=Ln(r,t.xValue,r.left+r.width/2)),a&&(o=Ln(a,t.yValue,a.top+a.height/2)),{x:s,y:o}}function Js(e,t){const n=e.scales,i=n[mn(n,t,"xScaleID")],r=n[mn(n,t,"yScaleID")];if(!i&&!r)return{};let{left:a,right:s}=i||e.chartArea,{top:o,bottom:l}=r||e.chartArea;const c=Bd(i,{min:t.xMin,max:t.xMax,start:a,end:s});a=c.start,s=c.end;const u=Bd(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 Id(e,t){if(!Pd(t)){const n=Js(e,t);let i=t.radius;(!i||isNaN(i))&&(i=Math.min(n.width,n.height)/2,t.radius=i);const r=i*2,a=n.centerX+t.xAdjust,s=n.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 o1(e,t)}function s1(e,t){const{scales:n,chartArea:i}=e,r=n[t.scaleID],a={x:i.left,y:i.top,x2:i.right,y2:i.bottom};return r?l1(r,a,t):c1(n,a,t),a}function Nd(e,t,n){const i=Js(e,t);return i.initProperties=Di(e,i,t,n),i.elements=[{type:"label",optionScope:"label",properties:h1(e,i,t),initProperties:i.initProperties}],i}function o1(e,t){const n=Ld(e,t),i=t.radius*2;return{x:n.x-t.radius+t.xAdjust,y:n.y-t.radius+t.yAdjust,x2:n.x+t.radius+t.xAdjust,y2:n.y+t.radius+t.yAdjust,centerX:n.x+t.xAdjust,centerY:n.y+t.yAdjust,radius:t.radius,width:i,height:i}}function Bd(e,t){const n=Rd(e,t)||t;return{start:Math.min(n.start,n.end),end:Math.max(n.start,n.end)}}function l1(e,t,n){const i=Ln(e,n.value,NaN),r=Ln(e,n.endValue,i);e.isHorizontal()?(t.x=i,t.x2=r):(t.y=i,t.y2=r)}function c1(e,t,n){for(const i of Object.keys(Ad)){const r=e[mn(e,n,i)];if(r){const{min:a,max:s,start:o,end:l,startProp:c,endProp:u}=Ad[i],d=Rd(r,{min:n[a],max:n[s],start:r[o],end:r[l]});t[c]=d.start,t[u]=d.end}}}function u1({properties:e,options:t},n,i,r){const{x:a,x2:s,width:o}=e;return Hd({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.x,padding:{start:r.left,end:r.right},adjust:t.label.xAdjust,size:n.width})}function d1({properties:e,options:t},n,i,r){const{y:a,y2:s,height:o}=e;return Hd({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.y,padding:{start:r.top,end:r.bottom},adjust:t.label.yAdjust,size:n.height})}function Hd(e,t){const{start:n,end:i,borderWidth:r}=e,{position:a,padding:{start:s,end:o},adjust:l}=t,c=i-r-n-s-o-t.size;return n+r/2+l+Gs(c,a)}function h1(e,t,n){const i=n.label;i.backgroundColor="transparent",i.callout.display=!1;const r=Xs(i.position),a=Pt(i.padding),s=Qs(e.ctx,i),o=u1({properties:t,options:n},s,r,a),l=d1({properties:t,options:n},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 bn(e,t,n){const i=Math.cos(n),r=Math.sin(n),a=t.x,s=t.y;return{x:a+i*(e.x-a)-r*(e.y-s),y:s+r*(e.x-a)+i*(e.y-s)}}const to=["enter","leave"],eo=to.concat("click");function f1(e,t,n){t.listened=Ed(n,eo,t.listeners),t.moveListened=!1,t._getElements=qs,to.forEach(i=>{qt(n[i])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(i=>{!t.listened&&qt(i.click)&&(t.listened=!0),t.moveListened||to.forEach(r=>{qt(i[r])&&(t.listened=!0,t.moveListened=!0)})})}function g1(e,t,n){if(e.listened)switch(t.type){case"mousemove":case"mouseout":return p1(e,t,n);case"click":return m1(e,t,n)}}function p1(e,t,n){if(!e.moveListened)return;let i;t.type==="mousemove"?i=qs(e,t,n.interaction):i=[];const r=e.hovered;e.hovered=i;const a={state:e,event:t};let s=Fd(a,"leave",r,i);return Fd(a,"enter",i,r)||s}function Fd({state:e,event:t},n,i,r){let a;for(const s of i)r.indexOf(s)<0&&(a=Ud(s.options[n]||e.listeners[n],s,t)||a);return a}function m1(e,t,n){const i=e.listeners,r=qs(e,t,n.interaction);let a;for(const s of r)a=Ud(s.options.click||i.click,s,t)||a;return a}function Ud(e,t,n){return st(e,[t.$context,n])===!0}const kr=["afterDraw","beforeDraw"];function b1(e,t,n){const i=t.visibleElements;t.hooked=Ed(n,kr,t.hooks),t.hooked||i.forEach(r=>{t.hooked||kr.forEach(a=>{qt(r.options[a])&&(t.hooked=!0)})})}function Wd(e,t,n){if(e.hooked){const i=t.options[n]||e.hooks[n];return st(i,[t.$context])}}function y1(e,t,n){const i=T1(e.scales,t,n);let r=Yd(t,i,"min","suggestedMin");r=Yd(t,i,"max","suggestedMax")||r,r&&qt(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function v1(e,t){for(const n of e)_1(n,t)}function Yd(e,t,n,i){if(yt(t[n])&&!x1(e.options,n,i)){const r=e[n]!==t[n];return e[n]=t[n],r}}function x1(e,t,n){return $t(e[t])||$t(e[n])}function _1(e,t){for(const n of["scaleID","xScaleID","yScaleID"]){const i=mn(t,e,n);i&&!t[i]&&w1(e,n)&&console.warn(`No scale found with id '${i}' for annotation '${e.id}'`)}}function w1(e,t){if(t==="scaleID")return!0;const n=t.charAt(0);for(const i of["Min","Max","Value"])if($t(e[n+i]))return!0;return!1}function T1(e,t,n){const i=t.axis,r=t.id,a=i+"ScaleID",s={min:H(t.min,Number.NEGATIVE_INFINITY),max:H(t.max,Number.POSITIVE_INFINITY)};for(const o of n)o.scaleID===r?zd(o,t,["value","endValue"],s):mn(e,o,a)===r&&zd(o,t,[i+"Min",i+"Max",i+"Value"],s);return s}function zd(e,t,n,i){for(const r of n){const a=e[r];if($t(a)){const s=t.parse(a);i.min=Math.min(i.min,s),i.max=Math.max(i.max,s)}}}class In extends Nt{inRange(t,n,i,r){const{x:a,y:s}=bn({x:t,y:n},this.getCenterPoint(r),Ct(-this.options.rotation));return Md({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return An(this,t)}draw(t){t.save(),Zs(t,this.getCenterPoint(),this.options.rotation),Od(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,n){return Nd(t,n)}}In.id="boxAnnotation",In.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},In.defaultRoutes={borderColor:"color",backgroundColor:"color"},In.descriptors={label:{_fallback:!0}};const Vd=["left","bottom","top","right"];class Ci extends Nt{inRange(t,n,i,r){const{x:a,y:s}=bn({x:t,y:n},this.getCenterPoint(r),Ct(-this.rotation));return Md({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return An(this,t)}draw(t){const n=this.options,i=!$t(this._visible)||this._visible;!n.display||!n.content||!i||(t.save(),Zs(t,this.getCenterPoint(),this.rotation),S1(t,this),Od(t,this,n),Qw(t,A1(this),n),t.restore())}resolveElementProperties(t,n){let i;if(Pd(n))i=Ld(t,n);else{const{centerX:o,centerY:l}=Js(t,n);i={x:o,y:l}}const r=Pt(n.padding),a=Qs(t.ctx,n),s=M1(i,a,n,r);return{initProperties:Di(t,s,n),pointX:i.x,pointY:i.y,...s,rotation:n.rotation}}}Ci.id="labelAnnotation",Ci.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},Ci.defaultRoutes={borderColor:"color"};function M1(e,t,n,i){const r=t.width+i.width+n.borderWidth,a=t.height+i.height+n.borderWidth,s=Xs(n.position,"center"),o=jd(e.x,r,n.xAdjust,s.x),l=jd(e.y,a,n.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 jd(e,t,n=0,i){return e-Gs(t,i)+n}function S1(e,t){const{pointX:n,pointY:i,options:r}=t,a=r.callout,s=a&&a.display&&k1(t,a);if(!s||R1(t,a,s))return;if(e.save(),e.beginPath(),!Ge(e,a))return e.restore();const{separatorStart:l,separatorEnd:c}=D1(t,s),{sideStart:u,sideEnd:d}=P1(t,s,l);(a.margin>0||r.borderWidth===0)&&(e.moveTo(l.x,l.y),e.lineTo(c.x,c.y)),e.moveTo(u.x,u.y),e.lineTo(d.x,d.y);const h=bn({x:n,y:i},t.getCenterPoint(),Ct(-t.rotation));e.lineTo(h.x,h.y),e.stroke(),e.restore()}function D1(e,t){const{x:n,y:i,x2:r,y2:a}=e,s=C1(e,t);let o,l;return t==="left"||t==="right"?(o={x:n+s,y:i},l={x:o.x,y:a}):(o={x:n,y:i+s},l={x:r,y:o.y}),{separatorStart:o,separatorEnd:l}}function C1(e,t){const{width:n,height:i,options:r}=e,a=r.callout.margin+r.borderWidth/2;return t==="right"?n+a:t==="bottom"?i+a:-a}function P1(e,t,n){const{y:i,width:r,height:a,options:s}=e,o=s.callout.start,l=E1(t,s.callout);let c,u;return t==="left"||t==="right"?(c={x:n.x,y:i+qe(a,o)},u={x:c.x+l,y:c.y}):(c={x:n.x+qe(r,o),y:n.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function E1(e,t){const n=t.side;return e==="left"||e==="top"?-n:n}function k1(e,t){const n=t.position;return Vd.includes(n)?n:O1(e,t)}function O1(e,t){const{x:n,y:i,x2:r,y2:a,width:s,height:o,pointX:l,pointY:c,centerX:u,centerY:d,rotation:h}=e,f={x:u,y:d},p=t.start,y=qe(s,p),b=qe(o,p),m=[n,n+y,n+y,r],v=[i+b,a,i,a],x=[];for(let w=0;w<4;w++){const _=bn({x:m[w],y:v[w]},f,Ct(h));x.push({position:Vd[w],distance:_n(_,{x:l,y:c})})}return x.sort((w,_)=>w.distance-_.distance)[0].position}function A1({x:e,y:t,width:n,height:i,options:r}){const a=r.borderWidth/2,s=Pt(r.padding);return{x:e+s.left+a,y:t+s.top+a,width:n-s.left-s.right-r.borderWidth,height:i-s.top-s.bottom-r.borderWidth}}function R1(e,t,n){const{pointX:i,pointY:r}=e,a=t.margin;let s=i,o=r;return n==="left"?s+=a:n==="right"?s-=a:n==="top"?o+=a:n==="bottom"&&(o-=a),e.inRange(s,o)}const no=(e,t,n)=>({x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}),io=(e,t,n)=>no(t,n,Math.abs((e-t.y)/(n.y-t.y))).x,$d=(e,t,n)=>no(t,n,Math.abs((e-t.x)/(n.x-t.x))).y,Pi=e=>e*e,L1=(e,t,{x:n,y:i,x2:r,y2:a},s)=>s==="y"?{start:Math.min(i,a),end:Math.max(i,a),value:t}:{start:Math.min(n,r),end:Math.max(n,r),value:e},qd=(e,t,n,i)=>(1-i)*(1-i)*e+2*(1-i)*i*t+i*i*n,ro=(e,t,n,i)=>({x:qd(e.x,t.x,n.x,i),y:qd(e.y,t.y,n.y,i)}),Gd=(e,t,n,i)=>2*(1-i)*(t-e)+2*i*(n-t),Xd=(e,t,n,i)=>-Math.atan2(Gd(e.x,t.x,n.x,i),Gd(e.y,t.y,n.y,i))+.5*X;class Ei extends Nt{inRange(t,n,i,r){const a=this.options.borderWidth/2;if(i!=="x"&&i!=="y"){const s={mouseX:t,mouseY:n},{path:o,ctx:l}=this;if(o){Ge(l,this.options);const{chart:u}=this.$context,d=t*u.currentDevicePixelRatio,h=n*u.currentDevicePixelRatio,f=l.isPointInStroke(o,d,h)||ao(this,s,r);return l.restore(),f}const c=Pi(a);return H1(this,s,c,r)||ao(this,s,r)}return I1(this,{mouseX:t,mouseY:n},i,{hBorderWidth:a,useFinalPosition:r})}getCenterPoint(t){return An(this,t)}draw(t){const{x:n,y:i,x2:r,y2:a,cp:s,options:o}=this;if(t.save(),!Ge(t,o))return t.restore();Rn(t,o);const l=Math.sqrt(Math.pow(r-n,2)+Math.pow(a-i,2));if(o.curve&&s)return $1(t,this,s,l),t.restore();const{startOpts:c,endOpts:u,startAdjust:d,endAdjust:h}=th(this),f=Math.atan2(a-i,r-n);t.translate(n,i),t.rotate(f),t.beginPath(),t.moveTo(0+d,0),t.lineTo(l-h,0),t.shadowColor=o.borderShadowColor,t.stroke(),so(t,0,d,c),so(t,l,-h,u),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,n){const i=s1(t,n),{x:r,y:a,x2:s,y2:o}=i,l=N1(i,t.chartArea),c=l?B1({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=Di(t,c,n),n.curve){const d={x:c.x,y:c.y},h={x:c.x2,y:c.y2};c.cp=j1(c,n,_n(d,h))}const u=F1(t,c,n.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}Ei.id="lineAnnotation";const Kd={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};Ei.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Kd),fill:!1,length:12,start:Object.assign({},Kd),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({},Ci.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},Ei.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},Ei.defaultRoutes={borderColor:"color"};function I1(e,{mouseX:t,mouseY:n},i,{hBorderWidth:r,useFinalPosition:a}){const s=L1(t,n,e.getProps(["x","y","x2","y2"],a),i);return s.value>=s.start-r&&s.value<=s.end+r||ao(e,{mouseX:t,mouseY:n},a,i)}function N1({x:e,y:t,x2:n,y2:i},{top:r,right:a,bottom:s,left:o}){return!(e<o&&n<o||e>a&&n>a||t<r&&i<r||t>s&&i>s)}function Zd({x:e,y:t},n,{top:i,right:r,bottom:a,left:s}){return e<s&&(t=$d(s,{x:e,y:t},n),e=s),e>r&&(t=$d(r,{x:e,y:t},n),e=r),t<i&&(e=io(i,{x:e,y:t},n),t=i),t>a&&(e=io(a,{x:e,y:t},n),t=a),{x:e,y:t}}function B1(e,t,n){const{x:i,y:r}=Zd(e,t,n),{x:a,y:s}=Zd(t,e,n);return{x:i,y:r,x2:a,y2:s,width:Math.abs(a-i),height:Math.abs(s-r)}}function H1(e,{mouseX:t,mouseY:n},i=pn,r){const{x:a,y:s,x2:o,y2:l}=e.getProps(["x","y","x2","y2"],r),c=o-a,u=l-s,d=Pi(c)+Pi(u),h=d===0?-1:((t-a)*c+(n-s)*u)/d;let f,p;return h<0?(f=a,p=s):h>1?(f=o,p=l):(f=a+h*c,p=s+h*u),Pi(t-f)+Pi(n-p)<=i}function ao(e,{mouseX:t,mouseY:n},i,r){const a=e.label;return a.options.display&&a.inRange(t,n,r,i)}function F1(e,t,n){const i=n.borderWidth,r=Pt(n.padding),a=Qs(e.ctx,n),s=a.width+r.width+i,o=a.height+r.height+i;return W1(t,n,{width:s,height:o,padding:r},e.chartArea)}function U1(e){const{x:t,y:n,x2:i,y2:r}=e,a=Math.atan2(r-n,i-t);return a>X/2?a-X:a<X/-2?a+X:a}function W1(e,t,n,i){const{width:r,height:a,padding:s}=n,{xAdjust:o,yAdjust:l}=t,c={x:e.x,y:e.y},u={x:e.x2,y:e.y2},d=t.rotation==="auto"?U1(e):Ct(t.rotation),h=Y1(r,a,d),f=z1(e,t,{labelSize:h,padding:s},i),p=e.cp?ro(c,e.cp,u,f):no(c,u,f),y={size:h.w,min:i.left,max:i.right,padding:s.left},b={size:h.h,min:i.top,max:i.bottom,padding:s.top},m=Jd(p.x,y)+o,v=Jd(p.y,b)+l;return{x:m-r/2,y:v-a/2,x2:m+r/2,y2:v+a/2,centerX:m,centerY:v,pointX:p.x,pointY:p.y,width:r,height:a,rotation:zi(d)}}function Y1(e,t,n){const i=Math.cos(n),r=Math.sin(n);return{w:Math.abs(e*i)+Math.abs(t*r),h:Math.abs(e*r)+Math.abs(t*i)}}function z1(e,t,n,i){let r;const a=V1(e,i);return t.position==="start"?r=Qd({w:e.x2-e.x,h:e.y2-e.y},n,t,a):t.position==="end"?r=1-Qd({w:e.x-e.x2,h:e.y-e.y2},n,t,a):r=Gs(1,t.position),r}function Qd(e,t,n,i){const{labelSize:r,padding:a}=t,s=e.w*i.dx,o=e.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 Pr(Math.max(l,c),0,.25)}function V1(e,t){const{x:n,x2:i,y:r,y2:a}=e,s=Math.min(r,a)-t.top,o=Math.min(n,i)-t.left,l=t.bottom-Math.max(r,a),c=t.right-Math.max(n,i);return{x:Math.min(o,c),y:Math.min(s,l),dx:o<=c?1:-1,dy:s<=l?1:-1}}function Jd(e,t){const{size:n,min:i,max:r,padding:a}=t,s=n/2;return n>r-i?(r+i)/2:(i>=e-a-s&&(e=i+a+s),r<=e+a+s&&(e=r-a-s),e)}function th(e){const t=e.options,n=t.arrowHeads&&t.arrowHeads.start,i=t.arrowHeads&&t.arrowHeads.end;return{startOpts:n,endOpts:i,startAdjust:eh(e,n),endAdjust:eh(e,i)}}function eh(e,t){if(!t||!t.display)return 0;const{length:n,width:i}=t,r=e.options.borderWidth/2,a={x:n,y:i+r};return Math.abs(io(0,a,{x:0,y:r}))}function so(e,t,n,i){if(!i||!i.display)return;const{length:r,width:a,fill:s,backgroundColor:o,borderColor:l}=i,c=Math.abs(t-r)+n;e.beginPath(),Rn(e,i),Ge(e,i),e.moveTo(c,-a),e.lineTo(t+n,0),e.lineTo(c,a),s===!0?(e.fillStyle=o||l,e.closePath(),e.fill(),e.shadowColor="transparent"):e.shadowColor=i.borderShadowColor,e.stroke()}function j1(e,t,n){const{x:i,y:r,x2:a,y2:s,centerX:o,centerY:l}=e,c=Math.atan2(s-r,a-i),u=Xs(t.controlPoint,0),d={x:o+qe(n,u.x,!1),y:l+qe(n,u.y,!1)};return bn(d,{x:o,y:l},c)}function nh(e,{x:t,y:n},{angle:i,adjust:r},a){!a||!a.display||(e.save(),e.translate(t,n),e.rotate(i),so(e,0,-r,a),e.restore())}function $1(e,t,n,i){const{x:r,y:a,x2:s,y2:o,options:l}=t,{startOpts:c,endOpts:u,startAdjust:d,endAdjust:h}=th(t),f={x:r,y:a},p={x:s,y:o},y=Xd(f,n,p,0),b=Xd(f,n,p,1)-X,m=ro(f,n,p,d/i),v=ro(f,n,p,1-h/i),x=new Path2D;e.beginPath(),x.moveTo(m.x,m.y),x.quadraticCurveTo(n.x,n.y,v.x,v.y),e.shadowColor=l.borderShadowColor,e.stroke(x),t.path=x,t.ctx=e,nh(e,m,{angle:y,adjust:d},c),nh(e,v,{angle:b,adjust:h},u)}class ki extends Nt{inRange(t,n,i,r){const a=this.options.rotation,s=this.options.borderWidth;if(i!=="x"&&i!=="y")return q1({x:t,y:n},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,h=i==="y"?{start:l,end:u}:{start:o,end:c},f=bn({x:t,y:n},this.getCenterPoint(r),Ct(-a));return f[i]>=h.start-d-pn&&f[i]<=h.end+d+pn}getCenterPoint(t){return An(this,t)}draw(t){const{width:n,height:i,centerX:r,centerY:a,options:s}=this;t.save(),Zs(t,this.getCenterPoint(),s.rotation),Rn(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const o=Ge(t,s);t.ellipse(r,a,i/2,n/2,X/2,0,2*X),t.fill(),o&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,n){return Nd(t,n,!0)}}ki.id="ellipseAnnotation",ki.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:Object.assign({},In.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},ki.defaultRoutes={borderColor:"color",backgroundColor:"color"},ki.descriptors={label:{_fallback:!0}};function q1(e,t,n,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=Ct(n||0),d=i/2||0,h=Math.cos(u),f=Math.sin(u),p=Math.pow(h*(e.x-s)+f*(e.y-o),2),y=Math.pow(f*(e.x-s)-h*(e.y-o),2);return p/Math.pow(l+d,2)+y/Math.pow(c+d,2)<=1.0001}class Or extends Nt{inRange(t,n,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 $w({x:t,y:n},this.getCenterPoint(r),c/2,u);const d=u/2,h=i==="y"?{start:s,end:l,value:n}:{start:a,end:o,value:t};return h.value>=h.start-d&&h.value<=h.end+d}getCenterPoint(t){return An(this,t)}draw(t){const n=this.options,i=n.borderWidth;if(n.radius<.1)return;t.save(),t.fillStyle=n.backgroundColor,Rn(t,n);const r=Ge(t,n);t1(t,this,this.centerX,this.centerY),r&&!Er(n.pointStyle)&&(t.shadowColor=n.borderShadowColor,t.stroke()),t.restore(),n.borderWidth=i}resolveElementProperties(t,n){const i=Id(t,n);return i.initProperties=Di(t,i,n,!0),i}}Or.id="pointAnnotation",Or.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},Or.defaultRoutes={borderColor:"color",backgroundColor:"color"};class Ar extends Nt{inRange(t,n,i,r){if(i!=="x"&&i!=="y")return this.options.radius>=.1&&this.elements.length>1&&X1(this.elements,t,n,r);const a=bn({x:t,y:n},this.getCenterPoint(r),Ct(-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 An(this,t)}draw(t){const{elements:n,options:i}=this;t.save(),t.beginPath(),t.fillStyle=i.backgroundColor,Rn(t,i);const r=Ge(t,i);let a=!0;for(const s of n)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,n){const i=Id(t,n),{sides:r,rotation:a}=n,s=[],o=2*X/r;let l=a*ta;for(let c=0;c<r;c++,l+=o){const u=G1(i,n,l);u.initProperties=Di(t,i,n),s.push(u)}return i.elements=s,i}}Ar.id="polygonAnnotation",Ar.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},Ar.defaultRoutes={borderColor:"color",backgroundColor:"color"};function G1({centerX:e,centerY:t},{radius:n,borderWidth:i},r){const a=i/2,s=Math.sin(r),o=Math.cos(r),l={x:e+s*n,y:t-o*n};return{type:"point",optionScope:"point",properties:{x:l.x,y:l.y,centerX:l.x,centerY:l.y,bX:e+s*(n+a),bY:t-o*(n+a)}}}function X1(e,t,n,i){let r=!1,a=e[e.length-1].getProps(["bX","bY"],i);for(const s of e){const o=s.getProps(["bX","bY"],i);o.bY>n!=a.bY>n&&t<(a.bX-o.bX)*(n-o.bY)/(a.bY-o.bY)+o.bX&&(r=!r),a=o}return r}const Xe={box:In,ellipse:ki,label:Ci,line:Ei,point:Or,polygon:Ar};Object.keys(Xe).forEach(e=>{xt.describe(`elements.${Xe[e].id}`,{_fallback:"plugins.annotation.common"})});const K1={update:Object.assign},Z1=eo.concat(kr),ih=(e,t)=>V(t)?co(e,t):e,oo=e=>e==="color"||e==="font";function lo(e="line"){return Xe[e]?e:(console.warn(`Unknown annotation type: '${e}', defaulting to 'line'`),"line")}function Q1(e,t,n,i){const r=tT(e,n.animations,i),a=t.annotations,s=iT(t.elements,a);for(let o=0;o<a.length;o++){const l=a[o],c=rh(s,o,l.type),u=l.setContext(nT(e,c,l)),d=c.resolveElementProperties(e,u);d.skip=J1(d),"elements"in d&&(eT(c,d.elements,u,r),delete d.elements),$t(c.x)||Object.assign(c,d),Object.assign(c,d.initProperties),d.options=ah(u),r.update(c,d)}}function J1(e){return isNaN(e.x)||isNaN(e.y)}function tT(e,t,n){return n==="reset"||n==="none"||n==="resize"?K1:new fa(e,t)}function eT(e,t,n,i){const r=e.elements||(e.elements=[]);r.length=t.length;for(let a=0;a<t.length;a++){const s=t[a],o=s.properties,l=rh(r,a,s.type,s.initProperties),c=n[s.optionScope].override(s);o.options=ah(c),i.update(l,o)}}function rh(e,t,n,i){const r=Xe[lo(n)];let a=e[t];return(!a||!(a instanceof r))&&(a=e[t]=new r,Object.assign(a,i)),a}function ah(e){const t=Xe[lo(e.type)],n={};n.id=e.id,n.type=e.type,n.drawTime=e.drawTime,Object.assign(n,co(e,t.defaults),co(e,t.defaultRoutes));for(const i of Z1)n[i]=e[i];return n}function co(e,t){const n={};for(const i of Object.keys(t)){const r=t[i],a=e[i];oo(i)&&nt(a)?n[i]=a.map(s=>ih(s,r)):n[i]=ih(a,r)}return n}function nT(e,t,n){return t.$context||(t.$context=Object.assign(Object.create(e.getContext()),{element:t,id:n.id,type:"annotation"}))}function iT(e,t){const n=t.length,i=e.length;if(i<n){const r=n-i;e.splice(i,0,...new Array(r))}else i>n&&e.splice(n,i-n);return e}var rT="2.2.1";const Ke=new Map,aT=eo.concat(kr);var Rr={id:"annotation",version:rT,beforeRegister(){qw("chart.js","3.7",Gt.version)},afterRegister(){Gt.register(Xe)},afterUnregister(){Gt.unregister(Xe)},beforeInit(e){Ke.set(e,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(e,t,n){const i=Ke.get(e),r=i.annotations=[];let a=n.annotations;V(a)?Object.keys(a).forEach(s=>{const o=a[s];V(o)&&(o.id=s,r.push(o))}):nt(a)&&r.push(...a),v1(r,e.scales)},afterDataLimits(e,t){const n=Ke.get(e);y1(e,t.scale,n.annotations.filter(i=>i.display&&i.adjustScaleRange))},afterUpdate(e,t,n){const i=Ke.get(e);f1(e,i,n),Q1(e,i,n,t.mode),i.visibleElements=i.elements.filter(r=>!r.skip&&r.options.display),b1(e,i,n)},beforeDatasetsDraw(e,t,n){Lr(e,"beforeDatasetsDraw",n.clip)},afterDatasetsDraw(e,t,n){Lr(e,"afterDatasetsDraw",n.clip)},beforeDraw(e,t,n){Lr(e,"beforeDraw",n.clip)},afterDraw(e,t,n){Lr(e,"afterDraw",n.clip)},beforeEvent(e,t,n){const i=Ke.get(e);g1(i,t.event,n)&&(t.changed=!0)},afterDestroy(e){Ke.delete(e)},_getState(e){return Ke.get(e)},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:e=>!aT.includes(e)&&e!=="init",annotations:{_allKeys:!1,_fallback:(e,t)=>`elements.${Xe[lo(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:oo,_fallback:!0},_indexable:oo}},additionalOptionScopes:[""]};function Lr(e,t,n){const{ctx:i,chartArea:r}=e,a=Ke.get(e);n&&Kn(i,r);const s=sT(a.visibleElements,t).sort((o,l)=>o.element.options.z-l.element.options.z);for(const o of s)oT(i,r,a,o);n&&Zn(i)}function sT(e,t){const n=[];for(const i of e)if(i.options.drawTime===t&&n.push({element:i,main:!0}),i.elements&&i.elements.length)for(const r of i.elements)r.options.display&&r.options.drawTime===t&&n.push({element:r});return n}function oT(e,t,n,i){const r=i.element;i.main?(Wd(n,r,"beforeDraw"),r.draw(e,t),Wd(n,r,"afterDraw")):r.draw(e,t)}const lT={class:"tooltip"},cT={class:"tooltip-title"},uT={class:"title font-bold"},dT={key:0,class:"subtitle"},hT={key:0},fT={class:"display-label"},gT={class:"display-value"},pT=g.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:()=>[]}},emits:["dimensions"],setup(e,{emit:t}){const n=g.ref(null);return g.watch(n,i=>{if(i){const{width:r,height:a}=i.getBoundingClientRect();t("dimensions",{width:r,height:a})}}),(i,r)=>e.showTooltip?(g.openBlock(),g.createElementBlock("div",{key:0,ref_key:"tooltipEl",ref:n,class:"tooltip-container",style:g.normalizeStyle({left:e.left,top:e.top})},[g.createElementVNode("ul",lT,[g.createElementVNode("li",cT,[g.createElementVNode("span",uT,g.toDisplayString(e.tooltipTitle),1),e.context?(g.openBlock(),g.createElementBlock("span",dT,g.toDisplayString(e.context),1)):g.createCommentVNode("",!0)]),(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.series,({backgroundColor:a,borderColor:s,label:o,value:l})=>(g.openBlock(),g.createElementBlock(g.Fragment,{key:o},[e.series.length?(g.openBlock(),g.createElementBlock("li",hT,[g.createElementVNode("div",{class:"tooltip-legend",style:g.normalizeStyle({background:a,"border-color":s})},null,4),g.createElementVNode("span",fT,g.toDisplayString(o),1),g.createElementVNode("span",gT,g.toDisplayString(l),1)])):g.createCommentVNode("",!0)],64))),128))])],4)):g.createCommentVNode("",!0)}}),bM="",Nn=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n},uo=Nn(pT,[["__scopeId","data-v-c3528d01"]]),mT=["onClick"],bT={class:"label"},yT={key:0,class:"sub-label"},vT=g.defineComponent({__name:"ChartLegend",props:{id:{type:String,required:!0},items:{type:Array,required:!0},chartInstance:{type:Object,required:!1,default:()=>null}},setup(e){const t=e,n=g.toRef(t,"items"),i=(l=0,c)=>{if(t.chartInstance===null)return;const u=t.chartInstance instanceof Gt?t.chartInstance:t.chartInstance.chart;r(l,c)?u.hide(l,c):u.show(l,c),u.update()},r=(l=0,c)=>{if(t.chartInstance===null||t.chartInstance.chart===null)return!0;const u=t.chartInstance instanceof Gt?t.chartInstance:t.chartInstance.chart,d=u.getDatasetMeta(l);return d.dataset||c===void 0?u.isDatasetVisible(l):!(d.data.length&&d.data[c].hidden)},a=l=>({[Et.Right]:"vertical",[Et.Bottom]:"horizontal",[Et.Hidden]:"hidden"})[l],s=g.inject("showLegendValues",!0),o=g.inject("legendPosition",g.ref(Et.Right));return(l,c)=>g.unref(o)!==g.unref(Et).Hidden?(g.openBlock(),g.createElementBlock("ul",{key:0,class:g.normalizeClass(["legend-container",a(g.unref(o))]),"data-testid":"legend"},[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(g.unref(n),({fillStyle:u,strokeStyle:d,text:h,datasetIndex:f,index:p,value:y})=>(g.openBlock(),g.createElementBlock("li",{key:h,onClick:b=>i(f,p)},[g.createElementVNode("div",{class:"legend",style:g.normalizeStyle({background:u,"border-color":d})},null,4),g.createElementVNode("div",{class:g.normalizeClass({"strike-through":!r(f,p)})},[g.createElementVNode("div",bT,g.toDisplayString(h),1),y&&g.unref(s)?(g.openBlock(),g.createElementBlock("div",yT,g.toDisplayString(y.formatted),1)):g.createCommentVNode("",!0)],2)],8,mT))),128))],2)):g.createCommentVNode("",!0)}}),yM="",ho=Nn(vT,[["__scopeId","data-v-77ec0661"]]);let Ir;const xT=new Uint8Array(16);function _T(){if(!Ir&&(Ir=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ir))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ir(xT)}const Ht=[];for(let e=0;e<256;++e)Ht.push((e+256).toString(16).slice(1));function wT(e,t=0){return(Ht[e[t+0]]+Ht[e[t+1]]+Ht[e[t+2]]+Ht[e[t+3]]+"-"+Ht[e[t+4]]+Ht[e[t+5]]+"-"+Ht[e[t+6]]+Ht[e[t+7]]+"-"+Ht[e[t+8]]+Ht[e[t+9]]+"-"+Ht[e[t+10]]+Ht[e[t+11]]+Ht[e[t+12]]+Ht[e[t+13]]+Ht[e[t+14]]+Ht[e[t+15]]).toLowerCase()}const sh={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function yn(e,t,n){if(sh.randomUUID&&!t&&!e)return sh.randomUUID();e=e||{};const i=e.random||(e.rng||_T)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){n=n||0;for(let r=0;r<16;++r)t[n+r]=i[r];return t}return wT(i)}const TT={class:"chart-header"},MT={key:0,class:"font-bold chart-title"},ST={key:0},DT=g.defineComponent({__name:"StackedBarChart",props:{chartData:{type:Object,required:!1,default:()=>({labels:[],datasets:[]})},chartTitle:{type:String,required:!1,default:""},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:e=>["horizontal","vertical"].includes(e)},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:""}},setup(e){const t=e,{i18n:n}=Bt.useI18n(),i=6,r=20,a=400,s="100%",o=30,l=40,c=0,u=10,d=10,h=1,f=({chart:A},F)=>{var j;const Y=A.data,rt=(j=Y.labels)==null?void 0:j.indexOf(F);return Y.datasets.reduce((at,Yt,te)=>{if(A.isDatasetVisible(te)){const kt=Yt.data[rt];return isNaN(kt)?at:at+kt}else return at},0)},p=(A,F,Y,rt)=>{const j=rt==="horizontal";F===null&&(F=n.t("entityNoName"));const at={type:"label",yValue:kt=>j?F:f(kt,F),xValue:kt=>j?f(kt,F):F},Yt={...at,position:j?{x:"start",y:"center"}:{x:"center",y:"end"},yAdjust:()=>j?0:-Math.abs(Cw()),content:kt=>js(f(kt,F),Y)},te={...at,content:kt=>_d(f(kt,F),xd(kt.chart,A)),position:j?{x:"start",y:"center"}:{x:"center",y:"end"},xAdjust:kt=>j?vd(js(f(kt,F),Y)):0,color:yd};return{[`${F}-value`]:Yt,[`${F}-percent`]:te}},y=g.ref(),b=g.ref(),m=g.ref(yn()),v=yn(),x=yn(),w=g.ref([]),_=g.toRef(t,"chartData"),T=g.ref(g.inject("legendPosition",Et.Right)),M=g.ref({show:!1,top:"0px",left:"0px",text:"",offset:0}),S=g.toRef(t,"metricUnit"),D=g.computed(()=>S.value&&n.t(`chartUnits.${S.value}`)),E=g.computed(()=>g.toRef(t,"orientation").value==="horizontal"),k=g.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:D,offset:0,width:0,height:0,chartType:E.value?Ot.HORIZONTAL_BAR:Ot.VERTICAL_BAR}),L=g.ref(0),q=g.computed(()=>{var A;return((A=_.value.datasets)==null?void 0:A.length)>0}),ct=()=>{var A;return t.annotations&&((A=_.value.labels)==null?void 0:A.reduce((F,Y)=>Object.assign(F,p(_.value,Y,S.value,t.orientation)),{}))},N={id:m.value,afterUpdate(A){L.value+=1,w.value=A.options.plugins.legend.labels.generateLabels(A).map(F=>({...F,value:t.legendValues&&t.legendValues[F.text]}))}},W={id:v,afterUpdate(A){A.options.plugins.annotation.annotations=At.value?ct():{}}},mt=[N,{id:"axisHover",afterEvent(A,F){if(M.value.show=!1,F.event.type==="mousemove"){const Y=F.event,rt=A.options.indexAxis,j=A.scales,at=A.scales[rt].getLabelForValue(Number(A.scales[rt].getValueForPixel(Y[rt])));if((te=>te==="x"?Y.y>j.x.top:Y.x<j.y.right)(rt))if(k.showTooltip=!1,at.length>zs){const kt=A.canvas.getContext("2d").measureText(at).width,fh=Math.abs(Math.round(Y.x-kt*.5)),rM=Math.round(Y.x+kt*.5);M.value.left=rt==="x"?`${(fh>0?fh:rM)-M.value.offset}px`:`${Y.x-kt*.5-M.value.offset}px`,M.value.top=`${Y.y-50}px`,M.value.show=!0,M.value.text=at}else M.value.show=!1;else M.value.show=!1}}},{id:x,afterUpdate(A){A.options.layout.padding.right=E.value?oe.value:0}},...t.annotations?[W]:[]],Zt=g.computed(()=>_.value.labels&&_.value.labels.length||0),Qt=g.computed(()=>{var F,Y;let A=s;if(y.value&&(A=y.value.width,y.value&&((F=_.value)!=null&&F.labels)&&((Y=_.value)==null?void 0:Y.labels.length)>o&&!E.value)){const rt=_.value.labels.length;A=`${y.value.offsetWidth+(rt-o)*l}px`}return A}),At=g.toRef(t,"annotations"),Jt=g.computed(()=>{var F;let A=a;if((F=_.value)!=null&&F.labels&&E.value){const rt=_.value.labels.length*r;A=Math.max(rt,A)}return`${A}px`});Bt.useReportChartDataForSynthetics(g.toRef(t,"chartData"),g.toRef(t,"syntheticsDataKey")),g.onMounted(()=>{t.annotations&&Gt.register(Rr)});const Wt=g.computed(()=>{const A=Bt.useBarChartOptions({tooltipState:k,legendID:m.value,stacked:g.toRef(t,"stacked"),metricAxesTitle:g.toRef(t,"metricAxesTitle"),dimensionAxesTitle:g.toRef(t,"dimensionAxesTitle"),indexAxis:E.value?"y":"x"});return{...A.value,plugins:{...A.value.plugins,annotation:{annotations:ct(),clip:!1}},layout:{autoPadding:!1,padding:{right:0,top:6*i}}}}),bt=Bt.useChartJSCommon("bar",y,g.toRef(t,"chartData"),mt,Wt),oe=g.computed(()=>{L.value;const A=_.value.labels,F=_.value.datasets,Y=A.map((at,Yt)=>F.reduce((te,kt)=>isNaN(Number(kt.data[Yt]))?te:te+Number(kt.data[Yt]),0)),rt=bt.value?xd(bt.value,_.value):Pw(_.value);return Y.map(at=>vd(js(at,S.value)+_d(at,rt))).reduce((at,Yt)=>Math.max(at,Yt),0)+i});g.onUnmounted(()=>{Gt.unregister(Rr)});const ie=g.computed(()=>({title:"No data to display",description:""})),ht={[Et.Right]:"legend-row",[Et.Bottom]:"column"},$=g.computed(()=>{if(b.value&&bt.value){const A=window.devicePixelRatio,F=bt.value,Y=F.scales.y.width*A+h,rt=(F.scales.y.height+F.scales.y.top+F.scales.x.height)*A,j=b.value.getContext("2d");return j.scale(A,A),j.canvas.width=Y,j.canvas.height=rt,j.canvas.style.width=`${Y/A}px`,j.canvas.style.height=`${rt/A}px`,{scale:A,width:Y*A,height:rt*A,targetCtx:j}}return null}),It=A=>{if($.value&&bt.value){const F=$.value.scale,Y=$.value.targetCtx,rt=$.value.width,j=$.value.height,at=bt.value,Yt=at.canvas,te=A.target;Y.fillStyle="white",te.scrollLeft>=c&&te.scrollLeft<=u?(Y.globalCompositeOperation="source-over",Y.clearRect(0,0,rt,j),Y.drawImage(Yt,0,0,rt,j,0,0,rt,j),Y.globalCompositeOperation="destination-over",Y.fillRect(0,0,rt,j)):(Y.globalCompositeOperation="source-over",Y.fillRect(0,(at.scales.y.height+at.scales.y.top+d)*F,rt,at.scales.x.height*F)),k.offset=te.scrollLeft,M.value.offset=te.scrollLeft}},de=({width:A,height:F})=>{k.width=A,k.height=F};return g.watch(()=>t.orientation,()=>{var A;if(b.value&&$.value){const F=$.value.width,Y=$.value.height;((A=b.value)==null?void 0:A.getContext("2d")).clearRect(0,0,F,Y)}}),g.watch(At,A=>{bt.value&&(A?(bt.value.options.plugins.annotation.annotations=ct(_.value),Gt.register(Rr),bt.value.update()):(bt.value.options.plugins.annotation.annotations={},Gt.unregister(Rr),bt.value.update()))}),(A,F)=>{const Y=g.resolveComponent("KEmptyState");return g.openBlock(),g.createElementBlock("div",null,[g.createElementVNode("div",TT,[e.chartTitle?(g.openBlock(),g.createElementBlock("div",MT,g.toDisplayString(e.chartTitle),1)):g.createCommentVNode("",!0),g.renderSlot(A.$slots,"header-message",{},void 0,!0)]),g.unref(q)?(g.openBlock(),g.createElementBlock("div",ST,[g.createElementVNode("div",{class:g.normalizeClass(["chart-parent",ht[T.value]])},[g.createElementVNode("canvas",{ref_key:"axis",ref:b,class:"axis"},null,512),g.createElementVNode("div",{class:"chart-container",style:g.normalizeStyle({"overflow-x":g.unref(Zt)>o?"auto":"hidden"}),"on:scroll":It},[g.createElementVNode("div",{class:"chart-body",style:g.normalizeStyle({width:g.unref(Qt),height:g.unref(Jt)})},[g.createElementVNode("canvas",{ref_key:"canvas",ref:y},null,512)],4)],36),M.value.show?(g.openBlock(),g.createElementBlock("div",{key:0,class:"axis-tooltip",style:g.normalizeStyle({top:M.value.top,left:M.value.left})},g.toDisplayString(M.value.text),5)):g.createCommentVNode("",!0),g.createVNode(uo,{left:k.left,series:k.tooltipSeries,"show-tooltip":k.showTooltip,"tooltip-title":e.tooltipTitle,top:k.top,onDimensions:de},null,8,["left","series","show-tooltip","tooltip-title","top"]),g.createVNode(ho,{id:m.value,"chart-instance":g.unref(bt),items:w.value},null,8,["id","chart-instance","items"])],2)])):(g.openBlock(),g.createBlock(Y,{key:1,"cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"170"},{title:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(g.unref(ie).title),1)]),message:g.withCtx(()=>[g.createElementVNode("span",null,g.toDisplayString(g.unref(ie).description),1)]),_:1}))])}}}),xM="",CT=Nn(DT,[["__scopeId","data-v-127f97db"]]);/*!
|
|
45
|
+
*/const Td={modes:{point(e,t){return Cr(e,t,{intersect:!0})},nearest(e,t,n){return Vw(e,t,n)},x(e,t,n){return Cr(e,t,{intersect:n.intersect,axis:"x"})},y(e,t,n){return Cr(e,t,{intersect:n.intersect,axis:"y"})}}};function qs(e,t,n){return(Td.modes[n.mode]||Td.modes.nearest)(e,t,n)}function Yw(e,t,n){return n!=="x"&&n!=="y"?e.inRange(t.x,t.y,"x",!0)||e.inRange(t.x,t.y,"y",!0):e.inRange(t.x,t.y,n,!0)}function zw(e,t,n){return n==="x"?{x:e.x,y:t.y}:n==="y"?{x:t.x,y:e.y}:t}function Cr(e,t,n){return e.visibleElements.filter(i=>n.intersect?i.inRange(t.x,t.y):Yw(i,t,n.axis))}function Vw(e,t,n){let i=Number.POSITIVE_INFINITY;return Cr(e,t,n).reduce((r,a)=>{const s=a.getCenterPoint(),o=zw(t,s,n.axis),l=_n(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 jw=(e,t)=>t>e||e.length>t.length&&e.slice(0,t.length)===t,pn=.001,Pr=(e,t,n)=>Math.min(n,Math.max(t,e));function $w(e,t,n){for(const i of Object.keys(e))e[i]=Pr(e[i],t,n);return e}function qw(e,t,n,i){if(!e||!t||n<=0)return!1;const r=i/2;return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<=Math.pow(n+r,2)}function Md(e,{x:t,y:n,x2:i,y2:r},a,s){const o=s/2,l=e.x>=t-o-pn&&e.x<=i+o+pn,c=e.y>=n-o-pn&&e.y<=r+o+pn;return a==="x"?l:(a==="y"||l)&&c}function An(e,t){const{centerX:n,centerY:i}=e.getProps(["centerX","centerY"],t);return{x:n,y:i}}function Gw(e,t,n,i=!0){const r=n.split(".");let a=0;for(const s of t.split(".")){const o=r[a++];if(parseInt(s,10)<parseInt(o,10))break;if(jw(o,s)){if(i)throw new Error(`${e} v${n} is not supported. v${t} or newer is required.`);return!1}}return!0}const Sd=e=>typeof e=="string"&&e.endsWith("%"),Dd=e=>parseFloat(e)/100,Cd=e=>Pr(Dd(e),0,1);function Gs(e,t){return t==="start"?0:t==="end"?e:Sd(t)?Cd(t)*e:e/2}function qe(e,t,n=!0){return typeof t=="number"?t:Sd(t)?(n?Cd(t):Dd(t))*e:e}function Xw(e,t){const{x:n,width:i}=e,r=t.textAlign;return r==="center"?n+i/2:r==="end"||r==="right"?n+i:n}function Xs(e,t="center"){return j(e)?{x:H(e.x,t),y:H(e.y,t)}:(e=H(e,t),{x:e,y:e})}function Pd(e){return e&&($t(e.xValue)||$t(e.yValue))}function Ci(e,t,n,i=!1){const r=n.init;if(r){if(r===!0)return kd(t,i)}else return;return Kw(t,i,st(r,[{chart:e,properties:t,options:n}]))}function Ed(e,t,n){let i=!1;return t.forEach(r=>{qt(e[r])?(i=!0,n[r]=e[r]):$t(n[r])&&delete n[r]}),i}function kd({centerX:e,centerY:t},n){return n?{centerX:e,centerY:t,radius:0,width:0,height:0}:{x:e,y:t,x2:e,y2:t,width:0,height:0}}function Kw(e,t,n){if(n===!0)return kd(e,t);if(j(n))return n}const Ks=new Map,Zw=e=>isNaN(e)||e<=0,Qw=e=>e.reduce(function(t,n){return t+=n.string,t},"");function Er(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function Zs(e,{x:t,y:n},i){i&&(e.translate(t,n),e.rotate(Ct(i)),e.translate(-t,-n))}function Ge(e,t){if(t&&t.borderWidth)return e.lineCap=t.borderCapStyle,e.setLineDash(t.borderDash),e.lineDashOffset=t.borderDashOffset,e.lineJoin=t.borderJoinStyle,e.lineWidth=t.borderWidth,e.strokeStyle=t.borderColor,!0}function Rn(e,t){e.shadowColor=t.backgroundShadowColor,e.shadowBlur=t.shadowBlur,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY}function Qs(e,t){const n=t.content;if(Er(n))return{width:qe(n.width,t.width),height:qe(n.height,t.height)};const i=t.font,r=nt(i)?i.map(l=>gt(l)):[gt(i)],a=t.textStrokeWidth,s=nt(n)?n:[n],o=s.join()+Qw(r)+a+(e._measureText?"-spriting":"");return Ks.has(o)||Ks.set(o,i1(e,s,r,a)),Ks.get(o)}function Od(e,t,n){const{x:i,y:r,width:a,height:s}=t;e.save(),Rn(e,n);const o=Ge(e,n);e.fillStyle=n.backgroundColor,e.beginPath(),wn(e,{x:i,y:r,w:a,h:s,radius:$w(Ue(n.borderRadius),0,Math.min(a,s)/2)}),e.closePath(),e.fill(),o&&(e.shadowColor=n.borderShadowColor,e.stroke()),e.restore()}function Jw(e,t,n){const i=n.content;if(Er(i)){e.save(),e.globalAlpha=s1(n.opacity,i.style.opacity),e.drawImage(i,t.x,t.y,t.width,t.height),e.restore();return}const r=nt(i)?i:[i],a=n.font,s=nt(a)?a.map(d=>gt(d)):[gt(a)],o=n.color,l=nt(o)?o:[o],c=Xw(t,n),u=t.y+n.textStrokeWidth/2;e.save(),e.textBaseline="middle",e.textAlign=n.textAlign,t1(e,n)&&r1(e,{x:c,y:u},r,s),a1(e,{x:c,y:u},r,{fonts:s,colors:l}),e.restore()}function t1(e,t){if(t.textStrokeWidth>0)return e.lineJoin="round",e.miterLimit=2,e.lineWidth=t.textStrokeWidth,e.strokeStyle=t.textStrokeColor,!0}function e1(e,t,n,i){const{radius:r,options:a}=t,s=a.pointStyle,o=a.rotation;let l=(o||0)*ta;if(Er(s)){e.save(),e.translate(n,i),e.rotate(l),e.drawImage(s,-s.width/2,-s.height/2,s.width,s.height),e.restore();return}Zw(r)||n1(e,{x:n,y:i,radius:r,rotation:o,style:s,rad:l})}function n1(e,{x:t,y:n,radius:i,rotation:r,style:a,rad:s}){let o,l,c,u;switch(e.beginPath(),a){default:e.arc(t,n,i,0,ut),e.closePath();break;case"triangle":e.moveTo(t+Math.sin(s)*i,n-Math.cos(s)*i),s+=zi,e.lineTo(t+Math.sin(s)*i,n-Math.cos(s)*i),s+=zi,e.lineTo(t+Math.sin(s)*i,n-Math.cos(s)*i),e.closePath();break;case"rectRounded":u=i*.516,c=i-u,o=Math.cos(s+se)*c,l=Math.sin(s+se)*c,e.arc(t-o,n-l,u,s-X,s-dt),e.arc(t+l,n-o,u,s-dt,s),e.arc(t+o,n+l,u,s,s+dt),e.arc(t-l,n+o,u,s+dt,s+X),e.closePath();break;case"rect":if(!r){c=Math.SQRT1_2*i,e.rect(t-c,n-c,2*c,2*c);break}s+=se;case"rectRot":o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+l,n-o),e.lineTo(t+o,n+l),e.lineTo(t-l,n+o),e.closePath();break;case"crossRot":s+=se;case"cross":o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+o,n+l),e.moveTo(t+l,n-o),e.lineTo(t-l,n+o);break;case"star":o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+o,n+l),e.moveTo(t+l,n-o),e.lineTo(t-l,n+o),s+=se,o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+o,n+l),e.moveTo(t+l,n-o),e.lineTo(t-l,n+o);break;case"line":o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+o,n+l);break;case"dash":e.moveTo(t,n),e.lineTo(t+Math.cos(s)*i,n+Math.sin(s)*i);break}e.fill()}function i1(e,t,n,i){e.save();const r=t.length;let a=0,s=i;for(let o=0;o<r;o++){const l=n[Math.min(o,n.length-1)];e.font=l.string;const c=t[o];a=Math.max(a,e.measureText(c).width+i),s+=l.lineHeight}return e.restore(),{width:a,height:s}}function r1(e,{x:t,y:n},i,r){e.beginPath();let a=0;i.forEach(function(s,o){const l=r[Math.min(o,r.length-1)],c=l.lineHeight;e.font=l.string,e.strokeText(s,t,n+c/2+a),a+=c}),e.stroke()}function a1(e,{x:t,y:n},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;e.beginPath(),e.font=u.string,e.fillStyle=c,e.fillText(o,t,n+d/2+s),s+=d,e.fill()})}function s1(e,t){const n=Fe(e)?e:t;return Fe(n)?Pr(n,0,1):1}const Ad={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 Ln(e,t,n){return t=typeof t=="number"?t:e.parse(t),yt(t)?e.getPixelForValue(t):n}function mn(e,t,n){const i=t[n];if(i||n==="scaleID")return i;const r=n.charAt(0),a=Object.values(e).filter(s=>s.axis&&s.axis===r);return a.length?a[0].id:r}function Rd(e,t){if(e){const n=e.options.reverse,i=Ln(e,t.min,n?t.end:t.start),r=Ln(e,t.max,n?t.start:t.end);return{start:i,end:r}}}function Ld(e,t){const{chartArea:n,scales:i}=e,r=i[mn(i,t,"xScaleID")],a=i[mn(i,t,"yScaleID")];let s=n.width/2,o=n.height/2;return r&&(s=Ln(r,t.xValue,r.left+r.width/2)),a&&(o=Ln(a,t.yValue,a.top+a.height/2)),{x:s,y:o}}function Js(e,t){const n=e.scales,i=n[mn(n,t,"xScaleID")],r=n[mn(n,t,"yScaleID")];if(!i&&!r)return{};let{left:a,right:s}=i||e.chartArea,{top:o,bottom:l}=r||e.chartArea;const c=Bd(i,{min:t.xMin,max:t.xMax,start:a,end:s});a=c.start,s=c.end;const u=Bd(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 Id(e,t){if(!Pd(t)){const n=Js(e,t);let i=t.radius;(!i||isNaN(i))&&(i=Math.min(n.width,n.height)/2,t.radius=i);const r=i*2,a=n.centerX+t.xAdjust,s=n.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 l1(e,t)}function o1(e,t){const{scales:n,chartArea:i}=e,r=n[t.scaleID],a={x:i.left,y:i.top,x2:i.right,y2:i.bottom};return r?c1(r,a,t):u1(n,a,t),a}function Nd(e,t,n){const i=Js(e,t);return i.initProperties=Ci(e,i,t,n),i.elements=[{type:"label",optionScope:"label",properties:f1(e,i,t),initProperties:i.initProperties}],i}function l1(e,t){const n=Ld(e,t),i=t.radius*2;return{x:n.x-t.radius+t.xAdjust,y:n.y-t.radius+t.yAdjust,x2:n.x+t.radius+t.xAdjust,y2:n.y+t.radius+t.yAdjust,centerX:n.x+t.xAdjust,centerY:n.y+t.yAdjust,radius:t.radius,width:i,height:i}}function Bd(e,t){const n=Rd(e,t)||t;return{start:Math.min(n.start,n.end),end:Math.max(n.start,n.end)}}function c1(e,t,n){const i=Ln(e,n.value,NaN),r=Ln(e,n.endValue,i);e.isHorizontal()?(t.x=i,t.x2=r):(t.y=i,t.y2=r)}function u1(e,t,n){for(const i of Object.keys(Ad)){const r=e[mn(e,n,i)];if(r){const{min:a,max:s,start:o,end:l,startProp:c,endProp:u}=Ad[i],d=Rd(r,{min:n[a],max:n[s],start:r[o],end:r[l]});t[c]=d.start,t[u]=d.end}}}function d1({properties:e,options:t},n,i,r){const{x:a,x2:s,width:o}=e;return Hd({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.x,padding:{start:r.left,end:r.right},adjust:t.label.xAdjust,size:n.width})}function h1({properties:e,options:t},n,i,r){const{y:a,y2:s,height:o}=e;return Hd({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.y,padding:{start:r.top,end:r.bottom},adjust:t.label.yAdjust,size:n.height})}function Hd(e,t){const{start:n,end:i,borderWidth:r}=e,{position:a,padding:{start:s,end:o},adjust:l}=t,c=i-r-n-s-o-t.size;return n+r/2+l+Gs(c,a)}function f1(e,t,n){const i=n.label;i.backgroundColor="transparent",i.callout.display=!1;const r=Xs(i.position),a=Pt(i.padding),s=Qs(e.ctx,i),o=d1({properties:t,options:n},s,r,a),l=h1({properties:t,options:n},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 bn(e,t,n){const i=Math.cos(n),r=Math.sin(n),a=t.x,s=t.y;return{x:a+i*(e.x-a)-r*(e.y-s),y:s+r*(e.x-a)+i*(e.y-s)}}const to=["enter","leave"],eo=to.concat("click");function g1(e,t,n){t.listened=Ed(n,eo,t.listeners),t.moveListened=!1,t._getElements=qs,to.forEach(i=>{qt(n[i])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(i=>{!t.listened&&qt(i.click)&&(t.listened=!0),t.moveListened||to.forEach(r=>{qt(i[r])&&(t.listened=!0,t.moveListened=!0)})})}function p1(e,t,n){if(e.listened)switch(t.type){case"mousemove":case"mouseout":return m1(e,t,n);case"click":return b1(e,t,n)}}function m1(e,t,n){if(!e.moveListened)return;let i;t.type==="mousemove"?i=qs(e,t,n.interaction):i=[];const r=e.hovered;e.hovered=i;const a={state:e,event:t};let s=Fd(a,"leave",r,i);return Fd(a,"enter",i,r)||s}function Fd({state:e,event:t},n,i,r){let a;for(const s of i)r.indexOf(s)<0&&(a=Ud(s.options[n]||e.listeners[n],s,t)||a);return a}function b1(e,t,n){const i=e.listeners,r=qs(e,t,n.interaction);let a;for(const s of r)a=Ud(s.options.click||i.click,s,t)||a;return a}function Ud(e,t,n){return st(e,[t.$context,n])===!0}const kr=["afterDraw","beforeDraw"];function y1(e,t,n){const i=t.visibleElements;t.hooked=Ed(n,kr,t.hooks),t.hooked||i.forEach(r=>{t.hooked||kr.forEach(a=>{qt(r.options[a])&&(t.hooked=!0)})})}function Wd(e,t,n){if(e.hooked){const i=t.options[n]||e.hooks[n];return st(i,[t.$context])}}function v1(e,t,n){const i=M1(e.scales,t,n);let r=Yd(t,i,"min","suggestedMin");r=Yd(t,i,"max","suggestedMax")||r,r&&qt(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function x1(e,t){for(const n of e)w1(n,t)}function Yd(e,t,n,i){if(yt(t[n])&&!_1(e.options,n,i)){const r=e[n]!==t[n];return e[n]=t[n],r}}function _1(e,t,n){return $t(e[t])||$t(e[n])}function w1(e,t){for(const n of["scaleID","xScaleID","yScaleID"]){const i=mn(t,e,n);i&&!t[i]&&T1(e,n)&&console.warn(`No scale found with id '${i}' for annotation '${e.id}'`)}}function T1(e,t){if(t==="scaleID")return!0;const n=t.charAt(0);for(const i of["Min","Max","Value"])if($t(e[n+i]))return!0;return!1}function M1(e,t,n){const i=t.axis,r=t.id,a=i+"ScaleID",s={min:H(t.min,Number.NEGATIVE_INFINITY),max:H(t.max,Number.POSITIVE_INFINITY)};for(const o of n)o.scaleID===r?zd(o,t,["value","endValue"],s):mn(e,o,a)===r&&zd(o,t,[i+"Min",i+"Max",i+"Value"],s);return s}function zd(e,t,n,i){for(const r of n){const a=e[r];if($t(a)){const s=t.parse(a);i.min=Math.min(i.min,s),i.max=Math.max(i.max,s)}}}class In extends Nt{inRange(t,n,i,r){const{x:a,y:s}=bn({x:t,y:n},this.getCenterPoint(r),Ct(-this.options.rotation));return Md({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return An(this,t)}draw(t){t.save(),Zs(t,this.getCenterPoint(),this.options.rotation),Od(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,n){return Nd(t,n)}}In.id="boxAnnotation",In.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},In.defaultRoutes={borderColor:"color",backgroundColor:"color"},In.descriptors={label:{_fallback:!0}};const Vd=["left","bottom","top","right"];class Pi extends Nt{inRange(t,n,i,r){const{x:a,y:s}=bn({x:t,y:n},this.getCenterPoint(r),Ct(-this.rotation));return Md({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return An(this,t)}draw(t){const n=this.options,i=!$t(this._visible)||this._visible;!n.display||!n.content||!i||(t.save(),Zs(t,this.getCenterPoint(),this.rotation),D1(t,this),Od(t,this,n),Jw(t,R1(this),n),t.restore())}resolveElementProperties(t,n){let i;if(Pd(n))i=Ld(t,n);else{const{centerX:o,centerY:l}=Js(t,n);i={x:o,y:l}}const r=Pt(n.padding),a=Qs(t.ctx,n),s=S1(i,a,n,r);return{initProperties:Ci(t,s,n),pointX:i.x,pointY:i.y,...s,rotation:n.rotation}}}Pi.id="labelAnnotation",Pi.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},Pi.defaultRoutes={borderColor:"color"};function S1(e,t,n,i){const r=t.width+i.width+n.borderWidth,a=t.height+i.height+n.borderWidth,s=Xs(n.position,"center"),o=jd(e.x,r,n.xAdjust,s.x),l=jd(e.y,a,n.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 jd(e,t,n=0,i){return e-Gs(t,i)+n}function D1(e,t){const{pointX:n,pointY:i,options:r}=t,a=r.callout,s=a&&a.display&&O1(t,a);if(!s||L1(t,a,s))return;if(e.save(),e.beginPath(),!Ge(e,a))return e.restore();const{separatorStart:l,separatorEnd:c}=C1(t,s),{sideStart:u,sideEnd:d}=E1(t,s,l);(a.margin>0||r.borderWidth===0)&&(e.moveTo(l.x,l.y),e.lineTo(c.x,c.y)),e.moveTo(u.x,u.y),e.lineTo(d.x,d.y);const h=bn({x:n,y:i},t.getCenterPoint(),Ct(-t.rotation));e.lineTo(h.x,h.y),e.stroke(),e.restore()}function C1(e,t){const{x:n,y:i,x2:r,y2:a}=e,s=P1(e,t);let o,l;return t==="left"||t==="right"?(o={x:n+s,y:i},l={x:o.x,y:a}):(o={x:n,y:i+s},l={x:r,y:o.y}),{separatorStart:o,separatorEnd:l}}function P1(e,t){const{width:n,height:i,options:r}=e,a=r.callout.margin+r.borderWidth/2;return t==="right"?n+a:t==="bottom"?i+a:-a}function E1(e,t,n){const{y:i,width:r,height:a,options:s}=e,o=s.callout.start,l=k1(t,s.callout);let c,u;return t==="left"||t==="right"?(c={x:n.x,y:i+qe(a,o)},u={x:c.x+l,y:c.y}):(c={x:n.x+qe(r,o),y:n.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function k1(e,t){const n=t.side;return e==="left"||e==="top"?-n:n}function O1(e,t){const n=t.position;return Vd.includes(n)?n:A1(e,t)}function A1(e,t){const{x:n,y:i,x2:r,y2:a,width:s,height:o,pointX:l,pointY:c,centerX:u,centerY:d,rotation:h}=e,f={x:u,y:d},p=t.start,y=qe(s,p),b=qe(o,p),m=[n,n+y,n+y,r],v=[i+b,a,i,a],x=[];for(let w=0;w<4;w++){const _=bn({x:m[w],y:v[w]},f,Ct(h));x.push({position:Vd[w],distance:_n(_,{x:l,y:c})})}return x.sort((w,_)=>w.distance-_.distance)[0].position}function R1({x:e,y:t,width:n,height:i,options:r}){const a=r.borderWidth/2,s=Pt(r.padding);return{x:e+s.left+a,y:t+s.top+a,width:n-s.left-s.right-r.borderWidth,height:i-s.top-s.bottom-r.borderWidth}}function L1(e,t,n){const{pointX:i,pointY:r}=e,a=t.margin;let s=i,o=r;return n==="left"?s+=a:n==="right"?s-=a:n==="top"?o+=a:n==="bottom"&&(o-=a),e.inRange(s,o)}const no=(e,t,n)=>({x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}),io=(e,t,n)=>no(t,n,Math.abs((e-t.y)/(n.y-t.y))).x,$d=(e,t,n)=>no(t,n,Math.abs((e-t.x)/(n.x-t.x))).y,Ei=e=>e*e,I1=(e,t,{x:n,y:i,x2:r,y2:a},s)=>s==="y"?{start:Math.min(i,a),end:Math.max(i,a),value:t}:{start:Math.min(n,r),end:Math.max(n,r),value:e},qd=(e,t,n,i)=>(1-i)*(1-i)*e+2*(1-i)*i*t+i*i*n,ro=(e,t,n,i)=>({x:qd(e.x,t.x,n.x,i),y:qd(e.y,t.y,n.y,i)}),Gd=(e,t,n,i)=>2*(1-i)*(t-e)+2*i*(n-t),Xd=(e,t,n,i)=>-Math.atan2(Gd(e.x,t.x,n.x,i),Gd(e.y,t.y,n.y,i))+.5*X;class ki extends Nt{inRange(t,n,i,r){const a=this.options.borderWidth/2;if(i!=="x"&&i!=="y"){const s={mouseX:t,mouseY:n},{path:o,ctx:l}=this;if(o){Ge(l,this.options);const{chart:u}=this.$context,d=t*u.currentDevicePixelRatio,h=n*u.currentDevicePixelRatio,f=l.isPointInStroke(o,d,h)||ao(this,s,r);return l.restore(),f}const c=Ei(a);return F1(this,s,c,r)||ao(this,s,r)}return N1(this,{mouseX:t,mouseY:n},i,{hBorderWidth:a,useFinalPosition:r})}getCenterPoint(t){return An(this,t)}draw(t){const{x:n,y:i,x2:r,y2:a,cp:s,options:o}=this;if(t.save(),!Ge(t,o))return t.restore();Rn(t,o);const l=Math.sqrt(Math.pow(r-n,2)+Math.pow(a-i,2));if(o.curve&&s)return q1(t,this,s,l),t.restore();const{startOpts:c,endOpts:u,startAdjust:d,endAdjust:h}=th(this),f=Math.atan2(a-i,r-n);t.translate(n,i),t.rotate(f),t.beginPath(),t.moveTo(0+d,0),t.lineTo(l-h,0),t.shadowColor=o.borderShadowColor,t.stroke(),so(t,0,d,c),so(t,l,-h,u),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,n){const i=o1(t,n),{x:r,y:a,x2:s,y2:o}=i,l=B1(i,t.chartArea),c=l?H1({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=Ci(t,c,n),n.curve){const d={x:c.x,y:c.y},h={x:c.x2,y:c.y2};c.cp=$1(c,n,_n(d,h))}const u=U1(t,c,n.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}ki.id="lineAnnotation";const Kd={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};ki.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Kd),fill:!1,length:12,start:Object.assign({},Kd),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({},Pi.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},ki.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},ki.defaultRoutes={borderColor:"color"};function N1(e,{mouseX:t,mouseY:n},i,{hBorderWidth:r,useFinalPosition:a}){const s=I1(t,n,e.getProps(["x","y","x2","y2"],a),i);return s.value>=s.start-r&&s.value<=s.end+r||ao(e,{mouseX:t,mouseY:n},a,i)}function B1({x:e,y:t,x2:n,y2:i},{top:r,right:a,bottom:s,left:o}){return!(e<o&&n<o||e>a&&n>a||t<r&&i<r||t>s&&i>s)}function Zd({x:e,y:t},n,{top:i,right:r,bottom:a,left:s}){return e<s&&(t=$d(s,{x:e,y:t},n),e=s),e>r&&(t=$d(r,{x:e,y:t},n),e=r),t<i&&(e=io(i,{x:e,y:t},n),t=i),t>a&&(e=io(a,{x:e,y:t},n),t=a),{x:e,y:t}}function H1(e,t,n){const{x:i,y:r}=Zd(e,t,n),{x:a,y:s}=Zd(t,e,n);return{x:i,y:r,x2:a,y2:s,width:Math.abs(a-i),height:Math.abs(s-r)}}function F1(e,{mouseX:t,mouseY:n},i=pn,r){const{x:a,y:s,x2:o,y2:l}=e.getProps(["x","y","x2","y2"],r),c=o-a,u=l-s,d=Ei(c)+Ei(u),h=d===0?-1:((t-a)*c+(n-s)*u)/d;let f,p;return h<0?(f=a,p=s):h>1?(f=o,p=l):(f=a+h*c,p=s+h*u),Ei(t-f)+Ei(n-p)<=i}function ao(e,{mouseX:t,mouseY:n},i,r){const a=e.label;return a.options.display&&a.inRange(t,n,r,i)}function U1(e,t,n){const i=n.borderWidth,r=Pt(n.padding),a=Qs(e.ctx,n),s=a.width+r.width+i,o=a.height+r.height+i;return Y1(t,n,{width:s,height:o,padding:r},e.chartArea)}function W1(e){const{x:t,y:n,x2:i,y2:r}=e,a=Math.atan2(r-n,i-t);return a>X/2?a-X:a<X/-2?a+X:a}function Y1(e,t,n,i){const{width:r,height:a,padding:s}=n,{xAdjust:o,yAdjust:l}=t,c={x:e.x,y:e.y},u={x:e.x2,y:e.y2},d=t.rotation==="auto"?W1(e):Ct(t.rotation),h=z1(r,a,d),f=V1(e,t,{labelSize:h,padding:s},i),p=e.cp?ro(c,e.cp,u,f):no(c,u,f),y={size:h.w,min:i.left,max:i.right,padding:s.left},b={size:h.h,min:i.top,max:i.bottom,padding:s.top},m=Jd(p.x,y)+o,v=Jd(p.y,b)+l;return{x:m-r/2,y:v-a/2,x2:m+r/2,y2:v+a/2,centerX:m,centerY:v,pointX:p.x,pointY:p.y,width:r,height:a,rotation:Vi(d)}}function z1(e,t,n){const i=Math.cos(n),r=Math.sin(n);return{w:Math.abs(e*i)+Math.abs(t*r),h:Math.abs(e*r)+Math.abs(t*i)}}function V1(e,t,n,i){let r;const a=j1(e,i);return t.position==="start"?r=Qd({w:e.x2-e.x,h:e.y2-e.y},n,t,a):t.position==="end"?r=1-Qd({w:e.x-e.x2,h:e.y-e.y2},n,t,a):r=Gs(1,t.position),r}function Qd(e,t,n,i){const{labelSize:r,padding:a}=t,s=e.w*i.dx,o=e.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 Pr(Math.max(l,c),0,.25)}function j1(e,t){const{x:n,x2:i,y:r,y2:a}=e,s=Math.min(r,a)-t.top,o=Math.min(n,i)-t.left,l=t.bottom-Math.max(r,a),c=t.right-Math.max(n,i);return{x:Math.min(o,c),y:Math.min(s,l),dx:o<=c?1:-1,dy:s<=l?1:-1}}function Jd(e,t){const{size:n,min:i,max:r,padding:a}=t,s=n/2;return n>r-i?(r+i)/2:(i>=e-a-s&&(e=i+a+s),r<=e+a+s&&(e=r-a-s),e)}function th(e){const t=e.options,n=t.arrowHeads&&t.arrowHeads.start,i=t.arrowHeads&&t.arrowHeads.end;return{startOpts:n,endOpts:i,startAdjust:eh(e,n),endAdjust:eh(e,i)}}function eh(e,t){if(!t||!t.display)return 0;const{length:n,width:i}=t,r=e.options.borderWidth/2,a={x:n,y:i+r};return Math.abs(io(0,a,{x:0,y:r}))}function so(e,t,n,i){if(!i||!i.display)return;const{length:r,width:a,fill:s,backgroundColor:o,borderColor:l}=i,c=Math.abs(t-r)+n;e.beginPath(),Rn(e,i),Ge(e,i),e.moveTo(c,-a),e.lineTo(t+n,0),e.lineTo(c,a),s===!0?(e.fillStyle=o||l,e.closePath(),e.fill(),e.shadowColor="transparent"):e.shadowColor=i.borderShadowColor,e.stroke()}function $1(e,t,n){const{x:i,y:r,x2:a,y2:s,centerX:o,centerY:l}=e,c=Math.atan2(s-r,a-i),u=Xs(t.controlPoint,0),d={x:o+qe(n,u.x,!1),y:l+qe(n,u.y,!1)};return bn(d,{x:o,y:l},c)}function nh(e,{x:t,y:n},{angle:i,adjust:r},a){!a||!a.display||(e.save(),e.translate(t,n),e.rotate(i),so(e,0,-r,a),e.restore())}function q1(e,t,n,i){const{x:r,y:a,x2:s,y2:o,options:l}=t,{startOpts:c,endOpts:u,startAdjust:d,endAdjust:h}=th(t),f={x:r,y:a},p={x:s,y:o},y=Xd(f,n,p,0),b=Xd(f,n,p,1)-X,m=ro(f,n,p,d/i),v=ro(f,n,p,1-h/i),x=new Path2D;e.beginPath(),x.moveTo(m.x,m.y),x.quadraticCurveTo(n.x,n.y,v.x,v.y),e.shadowColor=l.borderShadowColor,e.stroke(x),t.path=x,t.ctx=e,nh(e,m,{angle:y,adjust:d},c),nh(e,v,{angle:b,adjust:h},u)}class Oi extends Nt{inRange(t,n,i,r){const a=this.options.rotation,s=this.options.borderWidth;if(i!=="x"&&i!=="y")return G1({x:t,y:n},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,h=i==="y"?{start:l,end:u}:{start:o,end:c},f=bn({x:t,y:n},this.getCenterPoint(r),Ct(-a));return f[i]>=h.start-d-pn&&f[i]<=h.end+d+pn}getCenterPoint(t){return An(this,t)}draw(t){const{width:n,height:i,centerX:r,centerY:a,options:s}=this;t.save(),Zs(t,this.getCenterPoint(),s.rotation),Rn(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const o=Ge(t,s);t.ellipse(r,a,i/2,n/2,X/2,0,2*X),t.fill(),o&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,n){return Nd(t,n,!0)}}Oi.id="ellipseAnnotation",Oi.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:Object.assign({},In.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},Oi.defaultRoutes={borderColor:"color",backgroundColor:"color"},Oi.descriptors={label:{_fallback:!0}};function G1(e,t,n,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=Ct(n||0),d=i/2||0,h=Math.cos(u),f=Math.sin(u),p=Math.pow(h*(e.x-s)+f*(e.y-o),2),y=Math.pow(f*(e.x-s)-h*(e.y-o),2);return p/Math.pow(l+d,2)+y/Math.pow(c+d,2)<=1.0001}class Or extends Nt{inRange(t,n,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 qw({x:t,y:n},this.getCenterPoint(r),c/2,u);const d=u/2,h=i==="y"?{start:s,end:l,value:n}:{start:a,end:o,value:t};return h.value>=h.start-d&&h.value<=h.end+d}getCenterPoint(t){return An(this,t)}draw(t){const n=this.options,i=n.borderWidth;if(n.radius<.1)return;t.save(),t.fillStyle=n.backgroundColor,Rn(t,n);const r=Ge(t,n);e1(t,this,this.centerX,this.centerY),r&&!Er(n.pointStyle)&&(t.shadowColor=n.borderShadowColor,t.stroke()),t.restore(),n.borderWidth=i}resolveElementProperties(t,n){const i=Id(t,n);return i.initProperties=Ci(t,i,n,!0),i}}Or.id="pointAnnotation",Or.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},Or.defaultRoutes={borderColor:"color",backgroundColor:"color"};class Ar extends Nt{inRange(t,n,i,r){if(i!=="x"&&i!=="y")return this.options.radius>=.1&&this.elements.length>1&&K1(this.elements,t,n,r);const a=bn({x:t,y:n},this.getCenterPoint(r),Ct(-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 An(this,t)}draw(t){const{elements:n,options:i}=this;t.save(),t.beginPath(),t.fillStyle=i.backgroundColor,Rn(t,i);const r=Ge(t,i);let a=!0;for(const s of n)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,n){const i=Id(t,n),{sides:r,rotation:a}=n,s=[],o=2*X/r;let l=a*ta;for(let c=0;c<r;c++,l+=o){const u=X1(i,n,l);u.initProperties=Ci(t,i,n),s.push(u)}return i.elements=s,i}}Ar.id="polygonAnnotation",Ar.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},Ar.defaultRoutes={borderColor:"color",backgroundColor:"color"};function X1({centerX:e,centerY:t},{radius:n,borderWidth:i},r){const a=i/2,s=Math.sin(r),o=Math.cos(r),l={x:e+s*n,y:t-o*n};return{type:"point",optionScope:"point",properties:{x:l.x,y:l.y,centerX:l.x,centerY:l.y,bX:e+s*(n+a),bY:t-o*(n+a)}}}function K1(e,t,n,i){let r=!1,a=e[e.length-1].getProps(["bX","bY"],i);for(const s of e){const o=s.getProps(["bX","bY"],i);o.bY>n!=a.bY>n&&t<(a.bX-o.bX)*(n-o.bY)/(a.bY-o.bY)+o.bX&&(r=!r),a=o}return r}const Xe={box:In,ellipse:Oi,label:Pi,line:ki,point:Or,polygon:Ar};Object.keys(Xe).forEach(e=>{xt.describe(`elements.${Xe[e].id}`,{_fallback:"plugins.annotation.common"})});const Z1={update:Object.assign},Q1=eo.concat(kr),ih=(e,t)=>j(t)?co(e,t):e,oo=e=>e==="color"||e==="font";function lo(e="line"){return Xe[e]?e:(console.warn(`Unknown annotation type: '${e}', defaulting to 'line'`),"line")}function J1(e,t,n,i){const r=eT(e,n.animations,i),a=t.annotations,s=rT(t.elements,a);for(let o=0;o<a.length;o++){const l=a[o],c=rh(s,o,l.type),u=l.setContext(iT(e,c,l)),d=c.resolveElementProperties(e,u);d.skip=tT(d),"elements"in d&&(nT(c,d.elements,u,r),delete d.elements),$t(c.x)||Object.assign(c,d),Object.assign(c,d.initProperties),d.options=ah(u),r.update(c,d)}}function tT(e){return isNaN(e.x)||isNaN(e.y)}function eT(e,t,n){return n==="reset"||n==="none"||n==="resize"?Z1:new fa(e,t)}function nT(e,t,n,i){const r=e.elements||(e.elements=[]);r.length=t.length;for(let a=0;a<t.length;a++){const s=t[a],o=s.properties,l=rh(r,a,s.type,s.initProperties),c=n[s.optionScope].override(s);o.options=ah(c),i.update(l,o)}}function rh(e,t,n,i){const r=Xe[lo(n)];let a=e[t];return(!a||!(a instanceof r))&&(a=e[t]=new r,Object.assign(a,i)),a}function ah(e){const t=Xe[lo(e.type)],n={};n.id=e.id,n.type=e.type,n.drawTime=e.drawTime,Object.assign(n,co(e,t.defaults),co(e,t.defaultRoutes));for(const i of Q1)n[i]=e[i];return n}function co(e,t){const n={};for(const i of Object.keys(t)){const r=t[i],a=e[i];oo(i)&&nt(a)?n[i]=a.map(s=>ih(s,r)):n[i]=ih(a,r)}return n}function iT(e,t,n){return t.$context||(t.$context=Object.assign(Object.create(e.getContext()),{element:t,id:n.id,type:"annotation"}))}function rT(e,t){const n=t.length,i=e.length;if(i<n){const r=n-i;e.splice(i,0,...new Array(r))}else i>n&&e.splice(n,i-n);return e}var aT="2.2.1";const Ke=new Map,sT=eo.concat(kr);var Rr={id:"annotation",version:aT,beforeRegister(){Gw("chart.js","3.7",Gt.version)},afterRegister(){Gt.register(Xe)},afterUnregister(){Gt.unregister(Xe)},beforeInit(e){Ke.set(e,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(e,t,n){const i=Ke.get(e),r=i.annotations=[];let a=n.annotations;j(a)?Object.keys(a).forEach(s=>{const o=a[s];j(o)&&(o.id=s,r.push(o))}):nt(a)&&r.push(...a),x1(r,e.scales)},afterDataLimits(e,t){const n=Ke.get(e);v1(e,t.scale,n.annotations.filter(i=>i.display&&i.adjustScaleRange))},afterUpdate(e,t,n){const i=Ke.get(e);g1(e,i,n),J1(e,i,n,t.mode),i.visibleElements=i.elements.filter(r=>!r.skip&&r.options.display),y1(e,i,n)},beforeDatasetsDraw(e,t,n){Lr(e,"beforeDatasetsDraw",n.clip)},afterDatasetsDraw(e,t,n){Lr(e,"afterDatasetsDraw",n.clip)},beforeDraw(e,t,n){Lr(e,"beforeDraw",n.clip)},afterDraw(e,t,n){Lr(e,"afterDraw",n.clip)},beforeEvent(e,t,n){const i=Ke.get(e);p1(i,t.event,n)&&(t.changed=!0)},afterDestroy(e){Ke.delete(e)},_getState(e){return Ke.get(e)},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:e=>!sT.includes(e)&&e!=="init",annotations:{_allKeys:!1,_fallback:(e,t)=>`elements.${Xe[lo(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:oo,_fallback:!0},_indexable:oo}},additionalOptionScopes:[""]};function Lr(e,t,n){const{ctx:i,chartArea:r}=e,a=Ke.get(e);n&&Kn(i,r);const s=oT(a.visibleElements,t).sort((o,l)=>o.element.options.z-l.element.options.z);for(const o of s)lT(i,r,a,o);n&&Zn(i)}function oT(e,t){const n=[];for(const i of e)if(i.options.drawTime===t&&n.push({element:i,main:!0}),i.elements&&i.elements.length)for(const r of i.elements)r.options.display&&r.options.drawTime===t&&n.push({element:r});return n}function lT(e,t,n,i){const r=i.element;i.main?(Wd(n,r,"beforeDraw"),r.draw(e,t),Wd(n,r,"afterDraw")):r.draw(e,t)}const cT={class:"tooltip"},uT={class:"tooltip-title"},dT={class:"title font-bold"},hT={key:0,class:"subtitle"},fT={key:0},gT={class:"display-label"},pT={class:"display-value"},mT=g.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:()=>[]}},emits:["dimensions"],setup(e,{emit:t}){const n=g.ref(null);return g.watch(n,i=>{if(i){const{width:r,height:a}=i.getBoundingClientRect();t("dimensions",{width:r,height:a})}}),(i,r)=>e.showTooltip?(g.openBlock(),g.createElementBlock("div",{key:0,ref_key:"tooltipEl",ref:n,class:"tooltip-container",style:g.normalizeStyle({left:e.left,top:e.top})},[g.createElementVNode("ul",cT,[g.createElementVNode("li",uT,[g.createElementVNode("span",dT,g.toDisplayString(e.tooltipTitle),1),e.context?(g.openBlock(),g.createElementBlock("span",hT,g.toDisplayString(e.context),1)):g.createCommentVNode("",!0)]),(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.series,({backgroundColor:a,borderColor:s,label:o,value:l})=>(g.openBlock(),g.createElementBlock(g.Fragment,{key:o},[e.series.length?(g.openBlock(),g.createElementBlock("li",fT,[g.createElementVNode("div",{class:"tooltip-legend",style:g.normalizeStyle({background:a,"border-color":s})},null,4),g.createElementVNode("span",gT,g.toDisplayString(o),1),g.createElementVNode("span",pT,g.toDisplayString(l),1)])):g.createCommentVNode("",!0)],64))),128))])],4)):g.createCommentVNode("",!0)}}),yM="",Nn=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n},uo=Nn(mT,[["__scopeId","data-v-c3528d01"]]),bT=["onClick"],yT={class:"label"},vT={key:0,class:"sub-label"},xT=g.defineComponent({__name:"ChartLegend",props:{id:{type:String,required:!0},items:{type:Array,required:!0},chartInstance:{type:Object,required:!1,default:()=>null}},setup(e){const t=e,n=g.toRef(t,"items"),i=(l=0,c)=>{if(t.chartInstance===null)return;const u=t.chartInstance instanceof Gt?t.chartInstance:t.chartInstance.chart;r(l,c)?u.hide(l,c):u.show(l,c),u.update()},r=(l=0,c)=>{if(t.chartInstance===null||t.chartInstance.chart===null)return!0;const u=t.chartInstance instanceof Gt?t.chartInstance:t.chartInstance.chart,d=u.getDatasetMeta(l);return d.dataset||c===void 0?u.isDatasetVisible(l):!(d.data.length&&d.data[c].hidden)},a=l=>({[Et.Right]:"vertical",[Et.Bottom]:"horizontal",[Et.Hidden]:"hidden"})[l],s=g.inject("showLegendValues",!0),o=g.inject("legendPosition",g.ref(Et.Right));return(l,c)=>g.unref(o)!==g.unref(Et).Hidden?(g.openBlock(),g.createElementBlock("ul",{key:0,class:g.normalizeClass(["legend-container",a(g.unref(o))]),"data-testid":"legend"},[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(g.unref(n),({fillStyle:u,strokeStyle:d,text:h,datasetIndex:f,index:p,value:y})=>(g.openBlock(),g.createElementBlock("li",{key:h,onClick:b=>i(f,p)},[g.createElementVNode("div",{class:"legend",style:g.normalizeStyle({background:u,"border-color":d})},null,4),g.createElementVNode("div",{class:g.normalizeClass({"strike-through":!r(f,p)})},[g.createElementVNode("div",yT,g.toDisplayString(h),1),y&&g.unref(s)?(g.openBlock(),g.createElementBlock("div",vT,g.toDisplayString(y.formatted),1)):g.createCommentVNode("",!0)],2)],8,bT))),128))],2)):g.createCommentVNode("",!0)}}),vM="",ho=Nn(xT,[["__scopeId","data-v-77ec0661"]]);let Ir;const _T=new Uint8Array(16);function wT(){if(!Ir&&(Ir=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ir))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ir(_T)}const Ht=[];for(let e=0;e<256;++e)Ht.push((e+256).toString(16).slice(1));function TT(e,t=0){return(Ht[e[t+0]]+Ht[e[t+1]]+Ht[e[t+2]]+Ht[e[t+3]]+"-"+Ht[e[t+4]]+Ht[e[t+5]]+"-"+Ht[e[t+6]]+Ht[e[t+7]]+"-"+Ht[e[t+8]]+Ht[e[t+9]]+"-"+Ht[e[t+10]]+Ht[e[t+11]]+Ht[e[t+12]]+Ht[e[t+13]]+Ht[e[t+14]]+Ht[e[t+15]]).toLowerCase()}const sh={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function yn(e,t,n){if(sh.randomUUID&&!t&&!e)return sh.randomUUID();e=e||{};const i=e.random||(e.rng||wT)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){n=n||0;for(let r=0;r<16;++r)t[n+r]=i[r];return t}return TT(i)}const MT={class:"chart-header"},ST={key:0,class:"font-bold chart-title"},DT={key:0},CT=g.defineComponent({__name:"StackedBarChart",props:{chartData:{type:Object,required:!1,default:()=>({labels:[],datasets:[]})},chartTitle:{type:String,required:!1,default:""},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:e=>["horizontal","vertical"].includes(e)},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:""}},setup(e){const t=e,{i18n:n}=Bt.useI18n(),i=6,r=20,a=400,s="100%",o=30,l=40,c=0,u=10,d=10,h=1,f=({chart:A},F)=>{var $;const z=A.data,rt=($=z.labels)==null?void 0:$.indexOf(F);return z.datasets.reduce((at,Yt,te)=>{if(A.isDatasetVisible(te)){const kt=Yt.data[rt];return isNaN(kt)?at:at+kt}else return at},0)},p=(A,F,z,rt)=>{const $=rt==="horizontal";F===null&&(F=n.t("entityNoName"));const at={type:"label",yValue:kt=>$?F:f(kt,F),xValue:kt=>$?f(kt,F):F},Yt={...at,position:$?{x:"start",y:"center"}:{x:"center",y:"end"},yAdjust:()=>$?0:-Math.abs(Pw()),content:kt=>js(f(kt,F),z)},te={...at,content:kt=>_d(f(kt,F),xd(kt.chart,A)),position:$?{x:"start",y:"center"}:{x:"center",y:"end"},xAdjust:kt=>$?vd(js(f(kt,F),z)):0,color:yd};return{[`${F}-value`]:Yt,[`${F}-percent`]:te}},y=g.ref(),b=g.ref(),m=g.ref(yn()),v=yn(),x=yn(),w=g.ref([]),_=g.toRef(t,"chartData"),T=g.ref(g.inject("legendPosition",Et.Right)),M=g.ref({show:!1,top:"0px",left:"0px",text:"",offset:0}),D=g.toRef(t,"metricUnit"),S=g.computed(()=>D.value&&n.t(`chartUnits.${D.value}`)),P=g.computed(()=>g.toRef(t,"orientation").value==="horizontal"),k=g.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:S,offset:0,width:0,height:0,chartType:P.value?Ot.HORIZONTAL_BAR:Ot.VERTICAL_BAR}),L=g.ref(0),W=g.computed(()=>{var A;return((A=_.value.datasets)==null?void 0:A.length)>0}),ct=()=>{var A;return t.annotations&&((A=_.value.labels)==null?void 0:A.reduce((F,z)=>Object.assign(F,p(_.value,z,D.value,t.orientation)),{}))},N={id:m.value,afterUpdate(A){L.value+=1,w.value=A.options.plugins.legend.labels.generateLabels(A).map(F=>({...F,value:t.legendValues&&t.legendValues[F.text]}))}},Y={id:v,afterUpdate(A){A.options.plugins.annotation.annotations=At.value?ct():{}}},mt=[N,{id:"axisHover",afterEvent(A,F){if(M.value.show=!1,F.event.type==="mousemove"){const z=F.event,rt=A.options.indexAxis,$=A.scales,at=A.scales[rt].getLabelForValue(Number(A.scales[rt].getValueForPixel(z[rt])));if((te=>te==="x"?z.y>$.x.top:z.x<$.y.right)(rt))if(k.showTooltip=!1,at.length>zs){const kt=A.canvas.getContext("2d").measureText(at).width,fh=Math.abs(Math.round(z.x-kt*.5)),aM=Math.round(z.x+kt*.5);M.value.left=rt==="x"?`${(fh>0?fh:aM)-M.value.offset}px`:`${z.x-kt*.5-M.value.offset}px`,M.value.top=`${z.y-50}px`,M.value.show=!0,M.value.text=at}else M.value.show=!1;else M.value.show=!1}}},{id:x,afterUpdate(A){A.options.layout.padding.right=P.value?oe.value:0}},...t.annotations?[Y]:[]],Zt=g.computed(()=>_.value.labels&&_.value.labels.length||0),Qt=g.computed(()=>{var F,z;let A=s;if(y.value&&(A=y.value.width,y.value&&((F=_.value)!=null&&F.labels)&&((z=_.value)==null?void 0:z.labels.length)>o&&!P.value)){const rt=_.value.labels.length;A=`${y.value.offsetWidth+(rt-o)*l}px`}return A}),At=g.toRef(t,"annotations"),Jt=g.computed(()=>{var F;let A=a;if((F=_.value)!=null&&F.labels&&P.value){const rt=_.value.labels.length*r;A=Math.max(rt,A)}return`${A}px`});Bt.useReportChartDataForSynthetics(g.toRef(t,"chartData"),g.toRef(t,"syntheticsDataKey")),g.onMounted(()=>{t.annotations&&Gt.register(Rr)});const Wt=g.computed(()=>{const A=Bt.useBarChartOptions({tooltipState:k,legendID:m.value,stacked:g.toRef(t,"stacked"),metricAxesTitle:g.toRef(t,"metricAxesTitle"),dimensionAxesTitle:g.toRef(t,"dimensionAxesTitle"),indexAxis:P.value?"y":"x"});return{...A.value,plugins:{...A.value.plugins,annotation:{annotations:ct(),clip:!1}},layout:{autoPadding:!1,padding:{right:0,top:6*i}}}}),bt=Bt.useChartJSCommon("bar",y,g.toRef(t,"chartData"),mt,Wt),oe=g.computed(()=>{L.value;const A=_.value.labels,F=_.value.datasets,z=A.map((at,Yt)=>F.reduce((te,kt)=>isNaN(Number(kt.data[Yt]))?te:te+Number(kt.data[Yt]),0)),rt=bt.value?xd(bt.value,_.value):Ew(_.value);return z.map(at=>vd(js(at,D.value)+_d(at,rt))).reduce((at,Yt)=>Math.max(at,Yt),0)+i});g.onUnmounted(()=>{Gt.unregister(Rr)});const ie=g.computed(()=>({title:"No data to display",description:""})),ht={[Et.Right]:"legend-row",[Et.Bottom]:"column"},q=g.computed(()=>{if(b.value&&bt.value){const A=window.devicePixelRatio,F=bt.value,z=F.scales.y.width*A+h,rt=(F.scales.y.height+F.scales.y.top+F.scales.x.height)*A,$=b.value.getContext("2d");return $.scale(A,A),$.canvas.width=z,$.canvas.height=rt,$.canvas.style.width=`${z/A}px`,$.canvas.style.height=`${rt/A}px`,{scale:A,width:z*A,height:rt*A,targetCtx:$}}return null}),It=A=>{if(q.value&&bt.value){const F=q.value.scale,z=q.value.targetCtx,rt=q.value.width,$=q.value.height,at=bt.value,Yt=at.canvas,te=A.target;z.fillStyle="white",te.scrollLeft>=c&&te.scrollLeft<=u?(z.globalCompositeOperation="source-over",z.clearRect(0,0,rt,$),z.drawImage(Yt,0,0,rt,$,0,0,rt,$),z.globalCompositeOperation="destination-over",z.fillRect(0,0,rt,$)):(z.globalCompositeOperation="source-over",z.fillRect(0,(at.scales.y.height+at.scales.y.top+d)*F,rt,at.scales.x.height*F)),k.offset=te.scrollLeft,M.value.offset=te.scrollLeft}},de=({width:A,height:F})=>{k.width=A,k.height=F};return g.watch(()=>t.orientation,()=>{var A;if(b.value&&q.value){const F=q.value.width,z=q.value.height;((A=b.value)==null?void 0:A.getContext("2d")).clearRect(0,0,F,z)}}),g.watch(At,A=>{bt.value&&(A?(bt.value.options.plugins.annotation.annotations=ct(_.value),Gt.register(Rr),bt.value.update()):(bt.value.options.plugins.annotation.annotations={},Gt.unregister(Rr),bt.value.update()))}),(A,F)=>{const z=g.resolveComponent("KEmptyState");return g.openBlock(),g.createElementBlock("div",null,[g.createElementVNode("div",MT,[e.chartTitle?(g.openBlock(),g.createElementBlock("div",ST,g.toDisplayString(e.chartTitle),1)):g.createCommentVNode("",!0),g.renderSlot(A.$slots,"header-message",{},void 0,!0)]),g.unref(W)?(g.openBlock(),g.createElementBlock("div",DT,[g.createElementVNode("div",{class:g.normalizeClass(["chart-parent",ht[T.value]])},[g.createElementVNode("canvas",{ref_key:"axis",ref:b,class:"axis"},null,512),g.createElementVNode("div",{class:"chart-container",style:g.normalizeStyle({"overflow-x":g.unref(Zt)>o?"auto":"hidden"}),"on:scroll":It},[g.createElementVNode("div",{class:"chart-body",style:g.normalizeStyle({width:g.unref(Qt),height:g.unref(Jt)})},[g.createElementVNode("canvas",{ref_key:"canvas",ref:y},null,512)],4)],36),M.value.show?(g.openBlock(),g.createElementBlock("div",{key:0,class:"axis-tooltip",style:g.normalizeStyle({top:M.value.top,left:M.value.left})},g.toDisplayString(M.value.text),5)):g.createCommentVNode("",!0),g.createVNode(uo,{left:k.left,series:k.tooltipSeries,"show-tooltip":k.showTooltip,"tooltip-title":e.tooltipTitle,top:k.top,onDimensions:de},null,8,["left","series","show-tooltip","tooltip-title","top"]),g.createVNode(ho,{id:m.value,"chart-instance":g.unref(bt),items:w.value},null,8,["id","chart-instance","items"])],2)])):(g.openBlock(),g.createBlock(z,{key:1,"cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"170"},{title:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(g.unref(ie).title),1)]),message:g.withCtx(()=>[g.createElementVNode("span",null,g.toDisplayString(g.unref(ie).description),1)]),_:1}))])}}}),_M="",PT=Nn(CT,[["__scopeId","data-v-127f97db"]]);/*!
|
|
46
46
|
* chartjs-adapter-date-fns v3.0.0
|
|
47
47
|
* https://www.chartjs.org
|
|
48
48
|
* (c) 2022 chartjs-adapter-date-fns Contributors
|
|
49
49
|
* Released under the MIT license
|
|
50
|
-
*/const PT={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"};ac._date.override({_id:"date-fns",formats:function(){return PT},parse:function(e,t){if(e===null||typeof e>"u")return null;const n=typeof e;return n==="number"||e instanceof Date?e=B(e):n==="string"&&(typeof t=="string"?e=Cx(e,t,new Date,this.options):e=Vu(e,this.options)),Wa(e)?e.getTime():null},format:function(e,t){return Pv(e,t,this.options)},add:function(e,t,n){switch(n){case"millisecond":return pi(e,t);case"second":return ey(e,t);case"minute":return Jb(e,t);case"hour":return Gb(e,t);case"day":return bu(e,t);case"week":return ny(e,t);case"month":return Fa(e,t);case"quarter":return ty(e,t);case"year":return iy(e,t);default:return e}},diff:function(e,t,n){switch(n){case"millisecond":return vr(e,t);case"second":return gy(e,t);case"minute":return dy(e,t);case"hour":return uy(e,t);case"day":return xu(e,t);case"week":return py(e,t);case"month":return Mu(e,t);case"quarter":return fy(e,t);case"year":return my(e,t);default:return 0}},startOf:function(e,t,n){switch(t){case"second":return kx(e);case"minute":return by(e);case"hour":return Ex(e);case"day":return Ua(e);case"week":return yu(e);case"isoWeek":return yu(e,{weekStartsOn:+n});case"month":return vy(e);case"quarter":return yy(e);case"year":return _y(e);default:return e}},endOf:function(e,t){switch(t){case"second":return Dy(e);case"minute":return My(e);case"hour":return wy(e);case"day":return wu(e);case"week":return Ty(e);case"month":return Tu(e);case"quarter":return Sy(e);case"year":return xy(e);default:return e}}});const oh={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},ET={type:{type:String,required:!0},...oh},kT=g.version[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function Bn(e){return g.isProxy(e)?g.toRaw(e):e}function OT(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return g.isProxy(t)?new Proxy(e,{}):e}function AT(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function lh(e,t){e.labels=t}function ch(e,t,n){const i=[];e.datasets=t.map(r=>{const a=e.datasets.find(s=>s[n]===r[n]);return!a||!r.data||i.includes(a)?{...r}:(i.push(a),Object.assign(a,r),a)})}function RT(e,t){const n={labels:[],datasets:[]};return lh(n,e.labels),ch(n,e.datasets,t),n}const LT=g.defineComponent({props:ET,setup(e,t){let{expose:n}=t;const i=g.ref(null),r=g.shallowRef(null);n({chart:r});const a=()=>{if(!i.value)return;const{type:l,data:c,options:u,plugins:d,datasetIdKey:h}=e,f=RT(c,h),p=OT(f,c);r.value=new Gt(i.value,{type:l,data:p,options:{...u},plugins:d})},s=()=>{const l=g.toRaw(r.value);l&&(l.destroy(),r.value=null)},o=l=>{l.update(e.updateMode)};return g.onMounted(a),g.onBeforeUnmount(s),g.watch([()=>e.options,()=>e.data],(l,c)=>{let[u,d]=l,[h,f]=c;const p=g.toRaw(r.value);if(!p)return;let y=!1;if(u){const b=Bn(u),m=Bn(h);b&&b!==m&&(AT(p,b),y=!0)}if(d){const b=Bn(d.labels),m=Bn(f.labels),v=Bn(d.datasets),x=Bn(f.datasets);b!==m&&(lh(p.config.data,b),y=!0),v&&v!==x&&(ch(p.config.data,v,e.datasetIdKey),y=!0)}y&&o(p)},{deep:!0}),()=>g.h("canvas",{ref:i})}});function fo(e,t){return Gt.register(t),g.defineComponent({props:oh,setup(n,i){let{expose:r}=i;const a=g.shallowRef(null),s=o=>{a.value=o==null?void 0:o.chart};return r({chart:a}),()=>g.h(LT,kT({ref:s},{type:e,...n}))}})}const IT=fo("bar",ti),NT=fo("doughnut",Ye),BT=fo("line",ei),HT={class:"chart-header"},FT={key:0,class:"font-bold chart-title"},UT={key:1},WT=g.defineComponent({__name:"DoughnutChart",props:{chartData:{type:Object,required:!1,default:null},chartTitle:{type:String,required:!1,default:""},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},timeRange:{type:Number,required:!1,default:0},legendPosition:{type:String,required:!1,default:Et.Right},legendValues:{type:Object,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Re},height:{type:String,required:!1,default:"400px",validator:e=>/(\d *)(px|%)/.test(e)},width:{type:String,required:!1,default:"100%",validator:e=>/(\d *)(px|%)/.test(e)}},setup(e){const t=e,{i18n:n}=Bt.useI18n(),i=g.ref(yn()),r=g.ref(yn()),a=g.ref([]),s=g.toRef(t,"chartData"),o=g.toRef(t,"metricUnit"),l=g.computed(()=>o.value&&n.t(`chartUnits.${o.value}`)),c=g.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:l,offset:0,width:0,height:0,chartType:Ot.DOUGHNUT}),u={id:i.value,afterUpdate(x){a.value=x.options.plugins.legend.labels.generateLabels(x).map(w=>({...w,value:t.legendValues&&t.legendValues[w.text],hidden:!1}))}},d=g.computed(()=>[t.chartData.datasets.reduce((w,_)=>(w.labels.push(_.label),w.backgroundColor.push(_.backgroundColor),w.borderColor.push(Si(_.backgroundColor,50)),w.data.push(_.data.reduce((T,M)=>T+M,0)),w),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),h=g.computed(()=>({...t.chartData,datasets:d.value})),f=g.computed(()=>{var x;return((x=s.value.datasets)==null?void 0:x.length)>0}),p=g.computed(()=>({title:n.t("noDataAvailable"),description:""}));Bt.useReportChartDataForSynthetics(g.toRef(t,"chartData"),g.toRef(t,"syntheticsDataKey"));const{options:y}=Bt.useDoughnutChartOptions({tooltipState:c,timeRange:g.toRef(t,"timeRange"),legendID:i.value}),b=g.ref(),m=x=>({[Et.Right]:"legend-row",[Et.Bottom]:"column",[Et.Hidden]:"hidden"})[x],v=({width:x,height:w})=>{c.width=x,c.height=w};return(x,w)=>{const _=g.resolveComponent("KEmptyState");return g.openBlock(),g.createElementBlock("div",null,[g.createElementVNode("div",HT,[e.chartTitle?(g.openBlock(),g.createElementBlock("div",FT,g.toDisplayString(e.chartTitle),1)):g.createCommentVNode("",!0),g.renderSlot(x.$slots,"header-message",{},void 0,!0)]),g.unref(f)?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(["chart-parent",m(e.legendPosition)]),"data-testid":"doughnut-chart-parent"},[g.createElementVNode("div",{class:"chart-container",style:g.normalizeStyle({height:e.height,width:e.width})},[g.createVNode(g.unref(NT),{ref_key:"chartInstance",ref:b,"chart-id":r.value,data:g.unref(h),options:g.unref(y),plugins:[u]},null,8,["chart-id","data","options","plugins"]),g.createVNode(uo,{left:c.left,series:c.tooltipSeries,"show-tooltip":c.showTooltip,"tooltip-title":e.tooltipTitle,top:c.top,unit:e.metricUnit,onDimensions:v},null,8,["left","series","show-tooltip","tooltip-title","top","unit"])],4),g.createVNode(ho,{id:i.value,"chart-instance":b.value,items:a.value,position:e.legendPosition},null,8,["id","chart-instance","items","position"])],2)):(g.openBlock(),g.createElementBlock("div",UT,[g.createVNode(_,{"cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"170"},{title:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(g.unref(p).title),1)]),message:g.withCtx(()=>[g.createElementVNode("span",null,g.toDisplayString(g.unref(p).description),1)]),_:1})]))])}}}),_M="",YT=Nn(WT,[["__scopeId","data-v-f4058d54"]]),zT={id:"linePlugin",afterDatasetsDraw:function(e){if(e.tooltip&&e.tooltip.getActiveElements()&&e.tooltip.getActiveElements().length){const{x:t}=e.tooltip.dataPoints[0].element,n=e.ctx;n.save(),n.beginPath(),n.moveTo(t,e.scales.y.top),n.lineTo(t,e.scales.y.bottom),n.lineWidth=1,n.strokeStyle="#0275d8",n.stroke(),n.restore()}}},VT={class:"chart-header"},jT={key:0,class:"font-bold chart-title"},$T={key:1},qT=g.defineComponent({__name:"TimeSeriesChart",props:{chartData:{type:Object,required:!1,default:null},chartTitle:{type:String,required:!1,default:""},type:{type:String,required:!1,default:Ot.TIMESERIES_LINE},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},timeRange:{type:Number,required:!1,default: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:""},datasetColors:{type:Object,required:!1,default:Re},height:{type:String,required:!1,default:"400px",validator:e=>/(\d *)(px|%)/.test(e)},width:{type:String,required:!1,default:"100%",validator:e=>/(\d *)(px|%)/.test(e)}},setup(e){const t=e,{i18n:n}=Bt.useI18n(),i=g.ref(),r=g.ref(yn()),a=g.ref(yn()),s=g.ref([]),o=g.toRef(t,"metricUnit"),l=g.ref(),c=g.ref(g.inject("legendPosition",Et.Right)),u=g.computed(()=>o.value&&n.t(`chartUnits.${o.value}`)),d=g.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:u,offset:0,width:0,height:0,chartType:t.type}),h={id:r.value,afterUpdate(_){s.value=_.options.plugins.legend.labels.generateLabels(_).map(T=>({...T,value:t.legendValues&&t.legendValues[T.text]})).sort((T,M)=>T.value&&M.value&&M.value.raw-T.value.raw)}},f=g.computed(()=>[h,...t.type===Ot.TIMESERIES_LINE?[zT]:[]]),{options:p}=Bt.useLinechartOptions({tooltipState:d,timeRange:g.toRef(t,"timeRange"),granularity:g.toRef(t,"granularity"),legendID:r.value,stacked:g.toRef(t,"stacked"),metricAxesTitle:g.toRef(t,"metricAxesTitle"),dimensionAxesTitle:g.toRef(t,"dimensionAxesTitle")}),y=g.computed(()=>({...t.chartData,datasets:t.chartData.datasets.map((_,T)=>(Array.isArray(t.datasetColors)?(_.backgroundColor=t.datasetColors[T%t.datasetColors.length],_.borderColor=Si(_.backgroundColor,50)):_.rawDimension in t.datasetColors&&(_.backgroundColor=t.datasetColors[_.rawDimension],_.borderColor=Si(_.backgroundColor,50)),_.fill=g.toRef(t,"fill").value,_))})),b=g.computed(()=>Ku(t.chartData)),m=g.computed(()=>Gu(t.chartData)?Xu(t.chartData)?Ku(t.chartData)?{title:"Something went wrong"}:{title:"Something went wrong",description:"Incompatible chart data"}:{title:"Something went wrong",description:"Incompatible chart data"}:{title:"No data to display",description:"Once your service sees traffic it will display here"});Bt.useReportChartDataForSynthetics(g.toRef(t,"chartData"),g.toRef(t,"syntheticsDataKey"));const v=_=>Sw(_,{short:[z.DAILY,z.WEEKLY].includes(t.granularity)}),x=_=>({[Et.Right]:"legend-row",[Et.Bottom]:"column",[Et.Hidden]:"hidden"})[_],w=({width:_,height:T})=>{d.width=_,d.height=T};return(_,T)=>{const M=g.resolveComponent("KEmptyState");return g.openBlock(),g.createElementBlock("div",null,[g.createElementVNode("div",VT,[e.chartTitle?(g.openBlock(),g.createElementBlock("div",jT,g.toDisplayString(e.chartTitle),1)):g.createCommentVNode("",!0),g.renderSlot(_.$slots,"header-message",{},void 0,!0)]),g.unref(b)?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(["chart-parent",x(c.value)]),"data-testid":"line-chart-parent"},[g.createElementVNode("div",{class:"chart-container",style:g.normalizeStyle({height:e.height,width:e.width})},[e.type===g.unref(Ot).TIMESERIES_LINE?(g.openBlock(),g.createBlock(g.unref(BT),{key:0,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:g.unref(y),"data-testid":"time-series-line-chart",options:g.unref(p),plugins:g.unref(f)},null,8,["chart-id","data","options","plugins"])):e.type===g.unref(Ot).TIMESERIES_BAR?(g.openBlock(),g.createBlock(g.unref(IT),{key:1,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:g.unref(y),"data-testid":"time-series-bar-chart",options:g.unref(p),plugins:g.unref(f)},null,8,["chart-id","data","options","plugins"])):g.createCommentVNode("",!0)],4),g.createVNode(uo,{ref_key:"tooltipElement",ref:l,context:v(d.tooltipContext),"data-testid":"tooltip",left:d.left,series:d.tooltipSeries,"show-tooltip":d.showTooltip,"tooltip-title":e.tooltipTitle,top:d.top,unit:e.metricUnit,onDimensions:w},null,8,["context","left","series","show-tooltip","tooltip-title","top","unit"]),g.createVNode(ho,{id:r.value,"chart-instance":i.value,"data-testid":"legend",items:s.value},null,8,["id","chart-instance","items"])],2)):(g.openBlock(),g.createElementBlock("div",$T,[g.createVNode(M,{"cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"170"},{title:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(g.unref(m).title),1)]),message:g.withCtx(()=>[g.createElementVNode("span",null,g.toDisplayString(g.unref(m).description),1)]),_:1})]))])}}}),wM="",GT=Nn(qT,[["__scopeId","data-v-be79d968"]]),XT={key:0},KT={key:1,class:"analytics-chart-parent chart-border"},ZT={class:"limit-icon-wrapper"},QT={class:"limit-icon-wrapper"},JT={class:"limit-icon-wrapper"},tM=g.defineComponent({__name:"AnalyticsChart",props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},tooltipTitle:{type:String,required:!0},chartTitle:{type:String,required:!0},legendPosition:{type:String,required:!1,default:Et.Right},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"400px",validator:e=>/(\d *)(px|%)/.test(e)},width:{type:String,required:!1,default:"100%",validator:e=>/(\d *)(px|%)/.test(e)},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0}},setup(e){const t=e,{i18n:n}=Bt.useI18n(),i=g.toRef(t,"chartData"),r=g.toRef(t,"chartOptions"),a=g.toRef(t,"legendPosition"),s=g.computed(()=>y.value?Bt.useExploreResultToTimeDataset({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Re},i).value:Bt.useExploreResultToDatasets({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Re},i).value),o=g.computed(()=>{var S;return(S=i==null?void 0:i.value)!=null&&S.meta?"startMs"in i.value.meta?i.value.meta.endMs-i.value.meta.startMs:i.value.meta.end-i.value.meta.start:0}),l=g.computed(()=>{var S;return(S=i.value.meta)!=null&&S.metricUnits?Object.values(i.value.meta.metricUnits)[0]:""}),c=g.computed(()=>t.showLegendValues&&t.legendPosition!==Et.Bottom),{legendValues:u}=Bt.useChartLegendValues(s,t.chartOptions.type,l),d=g.computed(()=>{var S,D,E;return((E=(D=(S=i.value)==null?void 0:S.meta)==null?void 0:D.limit)==null?void 0:E.toString())||null}),h=g.computed(()=>{var S,D;return((D=(S=i.value)==null?void 0:S.meta)==null?void 0:D.truncated)||!1}),f=n.t("limitedResultsShown",{maxReturned:d.value}),p=g.computed(()=>[Ot.VERTICAL_BAR.toString(),Ot.HORIZONTAL_BAR.toString()].includes(r.value.type)),y=g.computed(()=>[Ot.TIMESERIES_BAR,Ot.TIMESERIES_LINE].some(S=>S===r.value.type)),b=g.computed(()=>r.value.type===Ot.DOUGHNUT),m=g.computed(()=>r.value.type.includes("Vertical")?"vertical":"horizontal"),v=g.computed(()=>{var E,k,L;if(!((E=i.value)!=null&&E.meta.metricNames)||!((k=i.value)!=null&&k.meta.metricUnits))return;const S=i.value.meta.metricNames[0],D=i.value.meta.metricUnits[S];return((L=r.value)==null?void 0:L.metricAxesTitle)||n.te(`metricAxisTitles.${S}`)&&n.te(`chartUnits.${D}`)&&n.t(`metricAxisTitles.${S}`,{unit:n.t(`chartUnits.${D}`)})||void 0}),x=g.computed(()=>{const S=y.value?"Time":Object.keys(i.value.meta.dimensions||i.value.meta.metricNames)[0];return r.value.dimensionAxesTitle||n.te(`chartLabels.${S}`)&&n.t(`chartLabels.${S}`)||void 0}),w=g.computed(()=>{if(i.value.meta.granularity&&typeof i.value.meta.granularity!="number"&&"duration"in i.value.meta.granularity){const S=_i(i.value.meta.granularity.duration);return n.t(`granularityAxisTitles.${S}`)}else if(i.value.meta.granularity&&!isNaN(Number(i.value.meta.granularity))){const S=_i(Number(i.value.meta.granularity));return n.t(`granularityAxisTitles.${S}`)}return n.t("chartlabels.Time")}),_=g.computed(()=>({title:n.t("noDataAvailable"),description:""})),T=g.computed(()=>i.value&&i.value.meta&&i.value.records),M=g.computed(()=>i.value.meta.granularity?typeof i.value.meta.granularity=="number"?_i(i.value.meta.granularity)||z.HOURLY:_i(i.value.meta.granularity.duration)||z.HOURLY:_i(new Date(i.value.records[1].timestamp).getTime()-new Date(i.value.records[0].timestamp).getTime())||z.HOURLY);return g.provide("showLegendValues",c),g.provide("legendPosition",a),(S,D)=>{const E=g.resolveComponent("KEmptyState"),k=g.resolveComponent("KIcon"),L=g.resolveComponent("KTooltip");return g.unref(T)?(g.openBlock(),g.createElementBlock("div",KT,[g.unref(y)?(g.openBlock(),g.createBlock(GT,{key:0,"chart-data":g.unref(s),"chart-title":e.chartTitle,"dataset-colors":e.chartOptions.chartDatasetColors,"dimension-axes-title":g.unref(w),fill:e.chartOptions.fill,granularity:g.unref(M),height:e.height,"legend-values":g.unref(u),"metric-axes-title":g.unref(v),"metric-unit":g.unref(l),stacked:e.chartOptions.stacked,"synthetics-data-key":e.syntheticsDataKey,"time-range":g.unref(o),"tooltip-title":e.tooltipTitle,type:e.chartOptions.type,width:e.width},{"header-message":g.withCtx(()=>[g.unref(h)&&g.unref(d)?(g.openBlock(),g.createBlock(L,{key:0,class:"tooltip","max-width":"500",placement:"bottom"},{content:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(g.unref(f)),1)]),default:g.withCtx(()=>[g.createElementVNode("div",ZT,[g.createVNode(k,{class:"warning-icon",color:"var(--white, #ffffff)","hide-title":"",icon:"warning","secondary-color":"var(--yellow-400, #fabe5f)",size:"18"})])]),_:1})):g.createCommentVNode("",!0)]),_:1},8,["chart-data","chart-title","dataset-colors","dimension-axes-title","fill","granularity","height","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","time-range","tooltip-title","type","width"])):g.unref(p)?(g.openBlock(),g.createBlock(CT,{key:1,annotations:e.showAnnotations,"chart-data":g.unref(s),"chart-title":e.chartTitle,"data-testid":"bar-chart-container","dimension-axes-title":g.unref(x),"legend-values":g.unref(u),"metric-axes-title":g.unref(v),"metric-unit":g.unref(l),orientation:g.unref(m),"synthetics-data-key":e.syntheticsDataKey,"tooltip-title":e.tooltipTitle},{"header-message":g.withCtx(()=>[g.unref(h)&&g.unref(d)?(g.openBlock(),g.createBlock(L,{key:0,class:"tooltip","max-width":"500",placement:"bottom"},{content:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(g.unref(f)),1)]),default:g.withCtx(()=>[g.createElementVNode("div",QT,[g.createVNode(k,{class:"warning-icon",color:"var(--white, #ffffff)","hide-title":"",icon:"warning","secondary-color":"var(--yellow-400, #fabe5f)",size:"18"})])]),_:1})):g.createCommentVNode("",!0)]),_:1},8,["annotations","chart-data","chart-title","dimension-axes-title","legend-values","metric-axes-title","metric-unit","orientation","synthetics-data-key","tooltip-title"])):g.unref(b)?(g.openBlock(),g.createBlock(YT,{key:2,"chart-data":g.unref(s),"chart-title":e.chartTitle,"dataset-colors":e.chartOptions.chartDatasetColors,fill:e.chartOptions.fill,"legend-position":e.legendPosition,"legend-values":g.unref(u),"metric-unit":g.unref(l),"synthetics-data-key":e.syntheticsDataKey,"time-range":g.unref(o),"tooltip-title":e.tooltipTitle,width:e.width},{"header-message":g.withCtx(()=>[g.unref(h)&&g.unref(d)?(g.openBlock(),g.createBlock(L,{key:0,class:"tooltip","max-width":"500",placement:"bottom"},{content:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(g.unref(f)),1)]),default:g.withCtx(()=>[g.createElementVNode("div",JT,[g.createVNode(k,{class:"warning-icon",color:"var(--white, #fff)","hide-title":"",icon:"warning","secondary-color":"var(--yellow-400, #fabe5f)",size:"18"})])]),_:1})):g.createCommentVNode("",!0)]),_:1},8,["chart-data","chart-title","dataset-colors","fill","legend-position","legend-values","metric-unit","synthetics-data-key","time-range","tooltip-title","width"])):g.createCommentVNode("",!0)])):(g.openBlock(),g.createElementBlock("div",XT,[g.createVNode(E,{"cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"170"},{title:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(g.unref(_).title),1)]),message:g.withCtx(()=>[g.createElementVNode("span",null,g.toDisplayString(g.unref(_).description),1)]),_:1})]))}}}),TM="",eM=Nn(tM,[["__scopeId","data-v-8adb5e24"]]),go="#e7e7ec",nM={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"]},Oi=(e,t)=>{let n=1;const i=nM[e],r=new Map;for(const a of t)r.set(a,i[n]),n=n%(i.length-1)+1;return r.set(-1,i[0]),r},uh=new Map([[100,Oi("100",[100,101,102,103])],[200,Oi("200",[200,201,202,203,204,205,206,207,208,226])],[300,Oi("300",[300,301,302,303,304,305,307,308])],[400,Oi("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,Oi("500",[500,501,502,503,504,505,506,507,508,510,511])]]),dh=e=>{const t=parseInt(e,10),n=Math.floor(t/100)*100,i=uh.get(n);return i===void 0?go:i.get(t)??i.get(-1)??go},iM=e=>{const t=dh(e);return{solid:t,light:t}};vt.AnalyticsChart=eM,vt.ChartLegendPosition=Et,vt.ChartTypes=Ot,vt.accessibleGrey=yd,vt.codesInSpec=uh,vt.darkenColor=Si,vt.datavisPalette=Re,vt.lightGrey=go,vt.lookupDatavisColor=Mi,vt.lookupStatusCodeCategoryColor=iM,vt.lookupStatusCodeColor=dh,Object.defineProperty(vt,Symbol.toStringTag,{value:"Module"})});
|
|
50
|
+
*/const ET={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"};ac._date.override({_id:"date-fns",formats:function(){return ET},parse:function(e,t){if(e===null||typeof e>"u")return null;const n=typeof e;return n==="number"||e instanceof Date?e=B(e):n==="string"&&(typeof t=="string"?e=Cx(e,t,new Date,this.options):e=Vu(e,this.options)),Wa(e)?e.getTime():null},format:function(e,t){return Pv(e,t,this.options)},add:function(e,t,n){switch(n){case"millisecond":return pi(e,t);case"second":return ey(e,t);case"minute":return Jb(e,t);case"hour":return Gb(e,t);case"day":return bu(e,t);case"week":return ny(e,t);case"month":return Fa(e,t);case"quarter":return ty(e,t);case"year":return iy(e,t);default:return e}},diff:function(e,t,n){switch(n){case"millisecond":return vr(e,t);case"second":return gy(e,t);case"minute":return dy(e,t);case"hour":return uy(e,t);case"day":return xu(e,t);case"week":return py(e,t);case"month":return Mu(e,t);case"quarter":return fy(e,t);case"year":return my(e,t);default:return 0}},startOf:function(e,t,n){switch(t){case"second":return kx(e);case"minute":return by(e);case"hour":return Ex(e);case"day":return Ua(e);case"week":return yu(e);case"isoWeek":return yu(e,{weekStartsOn:+n});case"month":return vy(e);case"quarter":return yy(e);case"year":return _y(e);default:return e}},endOf:function(e,t){switch(t){case"second":return Dy(e);case"minute":return My(e);case"hour":return wy(e);case"day":return wu(e);case"week":return Ty(e);case"month":return Tu(e);case"quarter":return Sy(e);case"year":return xy(e);default:return e}}});const oh={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},kT={type:{type:String,required:!0},...oh},OT=g.version[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function Bn(e){return g.isProxy(e)?g.toRaw(e):e}function AT(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return g.isProxy(t)?new Proxy(e,{}):e}function RT(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function lh(e,t){e.labels=t}function ch(e,t,n){const i=[];e.datasets=t.map(r=>{const a=e.datasets.find(s=>s[n]===r[n]);return!a||!r.data||i.includes(a)?{...r}:(i.push(a),Object.assign(a,r),a)})}function LT(e,t){const n={labels:[],datasets:[]};return lh(n,e.labels),ch(n,e.datasets,t),n}const IT=g.defineComponent({props:kT,setup(e,t){let{expose:n}=t;const i=g.ref(null),r=g.shallowRef(null);n({chart:r});const a=()=>{if(!i.value)return;const{type:l,data:c,options:u,plugins:d,datasetIdKey:h}=e,f=LT(c,h),p=AT(f,c);r.value=new Gt(i.value,{type:l,data:p,options:{...u},plugins:d})},s=()=>{const l=g.toRaw(r.value);l&&(l.destroy(),r.value=null)},o=l=>{l.update(e.updateMode)};return g.onMounted(a),g.onBeforeUnmount(s),g.watch([()=>e.options,()=>e.data],(l,c)=>{let[u,d]=l,[h,f]=c;const p=g.toRaw(r.value);if(!p)return;let y=!1;if(u){const b=Bn(u),m=Bn(h);b&&b!==m&&(RT(p,b),y=!0)}if(d){const b=Bn(d.labels),m=Bn(f.labels),v=Bn(d.datasets),x=Bn(f.datasets);b!==m&&(lh(p.config.data,b),y=!0),v&&v!==x&&(ch(p.config.data,v,e.datasetIdKey),y=!0)}y&&o(p)},{deep:!0}),()=>g.h("canvas",{ref:i})}});function fo(e,t){return Gt.register(t),g.defineComponent({props:oh,setup(n,i){let{expose:r}=i;const a=g.shallowRef(null),s=o=>{a.value=o==null?void 0:o.chart};return r({chart:a}),()=>g.h(IT,OT({ref:s},{type:e,...n}))}})}const NT=fo("bar",ti),BT=fo("doughnut",Ye),HT=fo("line",ei),FT={class:"chart-header"},UT={key:0,class:"font-bold chart-title"},WT={key:1},YT=g.defineComponent({__name:"DoughnutChart",props:{chartData:{type:Object,required:!1,default:null},chartTitle:{type:String,required:!1,default:""},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},timeRange:{type:Number,required:!1,default:0},legendPosition:{type:String,required:!1,default:Et.Right},legendValues:{type:Object,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Re},height:{type:String,required:!1,default:"400px",validator:e=>/(\d *)(px|%)/.test(e)},width:{type:String,required:!1,default:"100%",validator:e=>/(\d *)(px|%)/.test(e)}},setup(e){const t=e,{i18n:n}=Bt.useI18n(),i=g.ref(yn()),r=g.ref(yn()),a=g.ref([]),s=g.toRef(t,"chartData"),o=g.toRef(t,"metricUnit"),l=g.computed(()=>o.value&&n.t(`chartUnits.${o.value}`)),c=g.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:l,offset:0,width:0,height:0,chartType:Ot.DOUGHNUT}),u={id:i.value,afterUpdate(x){a.value=x.options.plugins.legend.labels.generateLabels(x).map(w=>({...w,value:t.legendValues&&t.legendValues[w.text],hidden:!1}))}},d=g.computed(()=>[t.chartData.datasets.reduce((w,_)=>(w.labels.push(_.label),w.backgroundColor.push(_.backgroundColor),w.borderColor.push(Di(_.backgroundColor,50)),w.data.push(_.data.reduce((T,M)=>T+M,0)),w),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),h=g.computed(()=>({...t.chartData,datasets:d.value})),f=g.computed(()=>{var x;return((x=s.value.datasets)==null?void 0:x.length)>0}),p=g.computed(()=>({title:n.t("noDataAvailable"),description:""}));Bt.useReportChartDataForSynthetics(g.toRef(t,"chartData"),g.toRef(t,"syntheticsDataKey"));const{options:y}=Bt.useDoughnutChartOptions({tooltipState:c,timeRange:g.toRef(t,"timeRange"),legendID:i.value}),b=g.ref(),m=x=>({[Et.Right]:"legend-row",[Et.Bottom]:"column",[Et.Hidden]:"hidden"})[x],v=({width:x,height:w})=>{c.width=x,c.height=w};return(x,w)=>{const _=g.resolveComponent("KEmptyState");return g.openBlock(),g.createElementBlock("div",null,[g.createElementVNode("div",FT,[e.chartTitle?(g.openBlock(),g.createElementBlock("div",UT,g.toDisplayString(e.chartTitle),1)):g.createCommentVNode("",!0),g.renderSlot(x.$slots,"header-message",{},void 0,!0)]),g.unref(f)?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(["chart-parent",m(e.legendPosition)]),"data-testid":"doughnut-chart-parent"},[g.createElementVNode("div",{class:"chart-container",style:g.normalizeStyle({height:e.height,width:e.width})},[g.createVNode(g.unref(BT),{ref_key:"chartInstance",ref:b,"chart-id":r.value,data:g.unref(h),options:g.unref(y),plugins:[u]},null,8,["chart-id","data","options","plugins"]),g.createVNode(uo,{left:c.left,series:c.tooltipSeries,"show-tooltip":c.showTooltip,"tooltip-title":e.tooltipTitle,top:c.top,unit:e.metricUnit,onDimensions:v},null,8,["left","series","show-tooltip","tooltip-title","top","unit"])],4),g.createVNode(ho,{id:i.value,"chart-instance":b.value,items:a.value,position:e.legendPosition},null,8,["id","chart-instance","items","position"])],2)):(g.openBlock(),g.createElementBlock("div",WT,[g.createVNode(_,{"cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"170"},{title:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(g.unref(p).title),1)]),message:g.withCtx(()=>[g.createElementVNode("span",null,g.toDisplayString(g.unref(p).description),1)]),_:1})]))])}}}),wM="",zT=Nn(YT,[["__scopeId","data-v-f4058d54"]]),VT={id:"linePlugin",afterDatasetsDraw:function(e){if(e.tooltip&&e.tooltip.getActiveElements()&&e.tooltip.getActiveElements().length){const{x:t}=e.tooltip.dataPoints[0].element,n=e.ctx;n.save(),n.beginPath(),n.moveTo(t,e.scales.y.top),n.lineTo(t,e.scales.y.bottom),n.lineWidth=1,n.strokeStyle="#0275d8",n.stroke(),n.restore()}}},jT={class:"chart-header"},$T={key:0,class:"font-bold chart-title"},qT={key:1},GT=g.defineComponent({__name:"TimeSeriesChart",props:{chartData:{type:Object,required:!1,default:null},chartTitle:{type:String,required:!1,default:""},type:{type:String,required:!1,default:Ot.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},timeRangeSec:{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:""},datasetColors:{type:Object,required:!1,default:Re},height:{type:String,required:!1,default:"400px",validator:e=>/(\d *)(px|%)/.test(e)},width:{type:String,required:!1,default:"100%",validator:e=>/(\d *)(px|%)/.test(e)}},setup(e){const t=e,{i18n:n}=Bt.useI18n(),i=g.ref(),r=g.ref(yn()),a=g.ref(yn()),s=g.ref([]),o=g.toRef(t,"metricUnit"),l=g.ref(),c=g.ref(g.inject("legendPosition",Et.Right)),u=g.computed(()=>o.value&&n.t(`chartUnits.${o.value}`)),d=g.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:u,offset:0,width:0,height:0,chartType:t.type}),h={id:r.value,afterUpdate(_){s.value=_.options.plugins.legend.labels.generateLabels(_).map(T=>({...T,value:t.legendValues&&t.legendValues[T.text]})).sort((T,M)=>T.value&&M.value&&M.value.raw-T.value.raw)}},f=g.computed(()=>[h,...t.type===Ot.TIMESERIES_LINE?[VT]:[]]),{options:p}=Bt.useLinechartOptions({tooltipState:d,timeRangeMs:g.toRef(t,"timeRangeMs"),timeRangeSec:g.toRef(t,"timeRangeSec"),granularity:g.toRef(t,"granularity"),legendID:r.value,stacked:g.toRef(t,"stacked"),metricAxesTitle:g.toRef(t,"metricAxesTitle"),dimensionAxesTitle:g.toRef(t,"dimensionAxesTitle")}),y=g.computed(()=>({...t.chartData,datasets:t.chartData.datasets.map((_,T)=>(Array.isArray(t.datasetColors)?(_.backgroundColor=t.datasetColors[T%t.datasetColors.length],_.borderColor=Di(_.backgroundColor,50)):_.rawDimension in t.datasetColors&&(_.backgroundColor=t.datasetColors[_.rawDimension],_.borderColor=Di(_.backgroundColor,50)),_.fill=g.toRef(t,"fill").value,_))})),b=g.computed(()=>Ku(t.chartData)),m=g.computed(()=>Gu(t.chartData)?Xu(t.chartData)?Ku(t.chartData)?{title:"Something went wrong"}:{title:"Something went wrong",description:"Incompatible chart data"}:{title:"Something went wrong",description:"Incompatible chart data"}:{title:"No data to display",description:"Once your service sees traffic it will display here"});Bt.useReportChartDataForSynthetics(g.toRef(t,"chartData"),g.toRef(t,"syntheticsDataKey"));const v=_=>Dw(_,{short:[V.DAILY,V.WEEKLY].includes(t.granularity)}),x=_=>({[Et.Right]:"legend-row",[Et.Bottom]:"column",[Et.Hidden]:"hidden"})[_],w=({width:_,height:T})=>{d.width=_,d.height=T};return(_,T)=>{const M=g.resolveComponent("KEmptyState");return g.openBlock(),g.createElementBlock("div",null,[g.createElementVNode("div",jT,[e.chartTitle?(g.openBlock(),g.createElementBlock("div",$T,g.toDisplayString(e.chartTitle),1)):g.createCommentVNode("",!0),g.renderSlot(_.$slots,"header-message",{},void 0,!0)]),g.unref(b)?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(["chart-parent",x(c.value)]),"data-testid":"line-chart-parent"},[g.createElementVNode("div",{class:"chart-container",style:g.normalizeStyle({height:e.height,width:e.width})},[e.type===g.unref(Ot).TIMESERIES_LINE?(g.openBlock(),g.createBlock(g.unref(HT),{key:0,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:g.unref(y),"data-testid":"time-series-line-chart",options:g.unref(p),plugins:g.unref(f)},null,8,["chart-id","data","options","plugins"])):e.type===g.unref(Ot).TIMESERIES_BAR?(g.openBlock(),g.createBlock(g.unref(NT),{key:1,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:g.unref(y),"data-testid":"time-series-bar-chart",options:g.unref(p),plugins:g.unref(f)},null,8,["chart-id","data","options","plugins"])):g.createCommentVNode("",!0)],4),g.createVNode(uo,{ref_key:"tooltipElement",ref:l,context:v(d.tooltipContext),"data-testid":"tooltip",left:d.left,series:d.tooltipSeries,"show-tooltip":d.showTooltip,"tooltip-title":e.tooltipTitle,top:d.top,unit:e.metricUnit,onDimensions:w},null,8,["context","left","series","show-tooltip","tooltip-title","top","unit"]),g.createVNode(ho,{id:r.value,"chart-instance":i.value,"data-testid":"legend",items:s.value},null,8,["id","chart-instance","items"])],2)):(g.openBlock(),g.createElementBlock("div",qT,[g.createVNode(M,{"cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"170"},{title:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(g.unref(m).title),1)]),message:g.withCtx(()=>[g.createElementVNode("span",null,g.toDisplayString(g.unref(m).description),1)]),_:1})]))])}}}),TM="",XT=Nn(GT,[["__scopeId","data-v-53e73e02"]]),KT={key:0},ZT={key:1,class:"analytics-chart-parent chart-border"},QT={class:"limit-icon-wrapper"},JT={class:"limit-icon-wrapper"},tM={class:"limit-icon-wrapper"},eM=g.defineComponent({__name:"AnalyticsChart",props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},tooltipTitle:{type:String,required:!0},chartTitle:{type:String,required:!0},legendPosition:{type:String,required:!1,default:Et.Right},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"400px",validator:e=>/(\d *)(px|%)/.test(e)},width:{type:String,required:!1,default:"100%",validator:e=>/(\d *)(px|%)/.test(e)},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0}},setup(e){const t=e,{i18n:n}=Bt.useI18n(),i=g.toRef(t,"chartData"),r=g.toRef(t,"chartOptions"),a=g.toRef(t,"legendPosition"),s=g.computed(()=>b.value?Bt.useExploreResultToTimeDataset({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Re},i).value:Bt.useExploreResultToDatasets({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Re},i).value),o=g.computed(()=>{var S;return(S=i==null?void 0:i.value)!=null&&S.meta?"start"in i.value.meta?i.value.meta.end-i.value.meta.start:void 0:0}),l=g.computed(()=>{var S;return(S=i==null?void 0:i.value)!=null&&S.meta?"startMs"in i.value.meta?i.value.meta.endMs-i.value.meta.startMs:void 0:0}),c=g.computed(()=>{var S;return(S=i.value.meta)!=null&&S.metricUnits?Object.values(i.value.meta.metricUnits)[0]:""}),u=g.computed(()=>t.showLegendValues&&t.legendPosition!==Et.Bottom),{legendValues:d}=Bt.useChartLegendValues(s,t.chartOptions.type,c),h=g.computed(()=>{var S,P,k;return((k=(P=(S=i.value)==null?void 0:S.meta)==null?void 0:P.limit)==null?void 0:k.toString())||null}),f=g.computed(()=>{var S,P;return((P=(S=i.value)==null?void 0:S.meta)==null?void 0:P.truncated)||!1}),p=n.t("limitedResultsShown",{maxReturned:h.value}),y=g.computed(()=>[Ot.VERTICAL_BAR.toString(),Ot.HORIZONTAL_BAR.toString()].includes(r.value.type)),b=g.computed(()=>[Ot.TIMESERIES_BAR,Ot.TIMESERIES_LINE].some(S=>S===r.value.type)),m=g.computed(()=>r.value.type===Ot.DOUGHNUT),v=g.computed(()=>r.value.type.includes("Vertical")?"vertical":"horizontal"),x=g.computed(()=>{var k,L,W;if(!((k=i.value)!=null&&k.meta.metricNames)||!((L=i.value)!=null&&L.meta.metricUnits))return;const S=i.value.meta.metricNames[0],P=i.value.meta.metricUnits[S];return((W=r.value)==null?void 0:W.metricAxesTitle)||n.te(`metricAxisTitles.${S}`)&&n.te(`chartUnits.${P}`)&&n.t(`metricAxisTitles.${S}`,{unit:n.t(`chartUnits.${P}`)})||void 0}),w=g.computed(()=>{const S=b.value?"Time":Object.keys(i.value.meta.dimensions||i.value.meta.metricNames)[0];return r.value.dimensionAxesTitle||n.te(`chartLabels.${S}`)&&n.t(`chartLabels.${S}`)||void 0}),_=g.computed(()=>{if(i.value.meta.granularity&&typeof i.value.meta.granularity!="number"&&"duration"in i.value.meta.granularity){const S=wi(i.value.meta.granularity.duration);return n.t(`granularityAxisTitles.${S}`)}else if(i.value.meta.granularity&&!isNaN(Number(i.value.meta.granularity))){const S=wi(Number(i.value.meta.granularity));return n.t(`granularityAxisTitles.${S}`)}return n.t("chartlabels.Time")}),T=g.computed(()=>({title:n.t("noDataAvailable"),description:""})),M=g.computed(()=>i.value&&i.value.meta&&i.value.records),D=g.computed(()=>i.value.meta.granularity?typeof i.value.meta.granularity=="number"?wi(i.value.meta.granularity)||V.HOURLY:wi(i.value.meta.granularity.duration)||V.HOURLY:wi(new Date(i.value.records[1].timestamp).getTime()-new Date(i.value.records[0].timestamp).getTime())||V.HOURLY);return g.provide("showLegendValues",u),g.provide("legendPosition",a),(S,P)=>{const k=g.resolveComponent("KEmptyState"),L=g.resolveComponent("KIcon"),W=g.resolveComponent("KTooltip");return g.unref(M)?(g.openBlock(),g.createElementBlock("div",ZT,[g.unref(b)?(g.openBlock(),g.createBlock(XT,{key:0,"chart-data":g.unref(s),"chart-title":e.chartTitle,"dataset-colors":e.chartOptions.chartDatasetColors,"dimension-axes-title":g.unref(_),fill:e.chartOptions.fill,granularity:g.unref(D),height:e.height,"legend-values":g.unref(d),"metric-axes-title":g.unref(x),"metric-unit":g.unref(c),stacked:e.chartOptions.stacked,"synthetics-data-key":e.syntheticsDataKey,"time-range-ms":g.unref(l),"time-range-sec":g.unref(o),"tooltip-title":e.tooltipTitle,type:e.chartOptions.type,width:e.width},{"header-message":g.withCtx(()=>[g.unref(f)&&g.unref(h)?(g.openBlock(),g.createBlock(W,{key:0,class:"tooltip","max-width":"500",placement:"bottom"},{content:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(g.unref(p)),1)]),default:g.withCtx(()=>[g.createElementVNode("div",QT,[g.createVNode(L,{class:"warning-icon",color:"var(--white, #ffffff)","hide-title":"",icon:"warning","secondary-color":"var(--yellow-400, #fabe5f)",size:"18"})])]),_:1})):g.createCommentVNode("",!0)]),_:1},8,["chart-data","chart-title","dataset-colors","dimension-axes-title","fill","granularity","height","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","time-range-ms","time-range-sec","tooltip-title","type","width"])):g.unref(y)?(g.openBlock(),g.createBlock(PT,{key:1,annotations:e.showAnnotations,"chart-data":g.unref(s),"chart-title":e.chartTitle,"data-testid":"bar-chart-container","dimension-axes-title":g.unref(w),"legend-values":g.unref(d),"metric-axes-title":g.unref(x),"metric-unit":g.unref(c),orientation:g.unref(v),"synthetics-data-key":e.syntheticsDataKey,"tooltip-title":e.tooltipTitle},{"header-message":g.withCtx(()=>[g.unref(f)&&g.unref(h)?(g.openBlock(),g.createBlock(W,{key:0,class:"tooltip","max-width":"500",placement:"bottom"},{content:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(g.unref(p)),1)]),default:g.withCtx(()=>[g.createElementVNode("div",JT,[g.createVNode(L,{class:"warning-icon",color:"var(--white, #ffffff)","hide-title":"",icon:"warning","secondary-color":"var(--yellow-400, #fabe5f)",size:"18"})])]),_:1})):g.createCommentVNode("",!0)]),_:1},8,["annotations","chart-data","chart-title","dimension-axes-title","legend-values","metric-axes-title","metric-unit","orientation","synthetics-data-key","tooltip-title"])):g.unref(m)?(g.openBlock(),g.createBlock(zT,{key:2,"chart-data":g.unref(s),"chart-title":e.chartTitle,"dataset-colors":e.chartOptions.chartDatasetColors,fill:e.chartOptions.fill,"legend-position":e.legendPosition,"legend-values":g.unref(d),"metric-unit":g.unref(c),"synthetics-data-key":e.syntheticsDataKey,"tooltip-title":e.tooltipTitle,width:e.width},{"header-message":g.withCtx(()=>[g.unref(f)&&g.unref(h)?(g.openBlock(),g.createBlock(W,{key:0,class:"tooltip","max-width":"500",placement:"bottom"},{content:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(g.unref(p)),1)]),default:g.withCtx(()=>[g.createElementVNode("div",tM,[g.createVNode(L,{class:"warning-icon",color:"var(--white, #fff)","hide-title":"",icon:"warning","secondary-color":"var(--yellow-400, #fabe5f)",size:"18"})])]),_:1})):g.createCommentVNode("",!0)]),_:1},8,["chart-data","chart-title","dataset-colors","fill","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title","width"])):g.createCommentVNode("",!0)])):(g.openBlock(),g.createElementBlock("div",KT,[g.createVNode(k,{"cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"170"},{title:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(g.unref(T).title),1)]),message:g.withCtx(()=>[g.createElementVNode("span",null,g.toDisplayString(g.unref(T).description),1)]),_:1})]))}}}),MM="",nM=Nn(eM,[["__scopeId","data-v-b76ba596"]]),go="#e7e7ec",iM={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"]},Ai=(e,t)=>{let n=1;const i=iM[e],r=new Map;for(const a of t)r.set(a,i[n]),n=n%(i.length-1)+1;return r.set(-1,i[0]),r},uh=new Map([[100,Ai("100",[100,101,102,103])],[200,Ai("200",[200,201,202,203,204,205,206,207,208,226])],[300,Ai("300",[300,301,302,303,304,305,307,308])],[400,Ai("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,Ai("500",[500,501,502,503,504,505,506,507,508,510,511])]]),dh=e=>{const t=parseInt(e,10),n=Math.floor(t/100)*100,i=uh.get(n);return i===void 0?go:i.get(t)??i.get(-1)??go},rM=e=>{const t=dh(e);return{solid:t,light:t}};vt.AnalyticsChart=nM,vt.ChartLegendPosition=Et,vt.ChartTypes=Ot,vt.accessibleGrey=yd,vt.codesInSpec=uh,vt.darkenColor=Di,vt.datavisPalette=Re,vt.lightGrey=go,vt.lookupDatavisColor=Si,vt.lookupStatusCodeCategoryColor=rM,vt.lookupStatusCodeColor=dh,Object.defineProperty(vt,Symbol.toStringTag,{value:"Module"})});
|