genus-ui 1.70.7 → 1.70.9

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/index.umd.js CHANGED
@@ -1,6 +1,6 @@
1
- (function(w,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("lit"),require("lit/decorators.js"),require("lit/directives/unsafe-html.js"),require("lit/directives/when.js")):typeof define=="function"&&define.amd?define(["exports","lit","lit/decorators.js","lit/directives/unsafe-html.js","lit/directives/when.js"],b):(w=typeof globalThis<"u"?globalThis:w||self,b(w.index={},w.lit,w.decorators_js,w.unsafeHtml_js,w.when_js))})(this,function(w,b,v,Mn,Pn){"use strict";var Lf=Object.defineProperty;var Of=(w,b,v)=>b in w?Lf(w,b,{enumerable:!0,configurable:!0,writable:!0,value:v}):w[b]=v;var P=(w,b,v)=>(Of(w,typeof b!="symbol"?b+"":b,v),v);const fa=b.css`
1
+ (function(w,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("lit"),require("lit/decorators.js"),require("lit/directives/unsafe-html.js"),require("lit/directives/when.js")):typeof define=="function"&&define.amd?define(["exports","lit","lit/decorators.js","lit/directives/unsafe-html.js","lit/directives/when.js"],b):(w=typeof globalThis<"u"?globalThis:w||self,b(w.index={},w.lit,w.decorators_js,w.unsafeHtml_js,w.when_js))})(this,function(w,b,v,Pn,Tn){"use strict";var Of=Object.defineProperty;var zf=(w,b,v)=>b in w?Of(w,b,{enumerable:!0,configurable:!0,writable:!0,value:v}):w[b]=v;var P=(w,b,v)=>(zf(w,typeof b!="symbol"?b+"":b,v),v);const pa=b.css`
2
2
  * { box-sizing: border-box; }
3
- `,pa=b.css`
3
+ `,ga=b.css`
4
4
  .form-field
5
5
  {
6
6
  display: grid;
@@ -11,14 +11,14 @@
11
11
  'il il il il il il'
12
12
  'ic ic ic ic ic ic';
13
13
  }
14
- `,ga=b.css`
14
+ `,ma=b.css`
15
15
  .input-label
16
16
  {
17
17
  color: var(--textarea-label-color, #203e70);
18
18
  justify-self: start;
19
19
  grid-area: il;
20
20
  }
21
- `,ma=b.css`
21
+ `,ba=b.css`
22
22
  textarea
23
23
  {
24
24
  border: var(--textarea-border, none);
@@ -36,7 +36,7 @@
36
36
  border-radius: var(--textarea-border-radius, 0.375rem);
37
37
  grid-area: ic;
38
38
  }
39
- `,ba=b.css`
39
+ `,xa=b.css`
40
40
  textarea
41
41
  {
42
42
  font-family: var(--textarea-font-family, 'Sofia Pro');
@@ -54,12 +54,12 @@
54
54
  font-family: var(--textarea-label-font-family, 'Sofia Pro');
55
55
  font-size: var(--textarea-label-font-size, 1rem);
56
56
  }
57
- `;var xa=Object.defineProperty,ya=Object.getOwnPropertyDescriptor,de=(i,t,e,n)=>{for(var s=n>1?void 0:n?ya(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&xa(t,e,s),s};w.GenusTextArea=class extends b.LitElement{constructor(){super(...arguments),this.labelText="",this.inputValue="",this.readOnly=!1,this.getInputValue=t=>{this.dispatchEvent(new CustomEvent("typed",{detail:t.target.value}))},this._targetInput=null}updated(){this.inputValue===""&&this._targetInput!=null&&(this._targetInput.value="")}render(){return b.html`
57
+ `;var ya=Object.defineProperty,va=Object.getOwnPropertyDescriptor,de=(i,t,e,n)=>{for(var s=n>1?void 0:n?va(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&ya(t,e,s),s};w.GenusTextArea=class extends b.LitElement{constructor(){super(...arguments),this.labelText="",this.inputValue="",this.readOnly=!1,this.getInputValue=t=>{this.dispatchEvent(new CustomEvent("typed",{detail:t.target.value}))},this._targetInput=null}updated(){this.inputValue===""&&this._targetInput!=null&&(this._targetInput.value="")}render(){return b.html`
58
58
  <div class='form-field form-field--without-icon'>
59
59
  <label class='input-label'>${this.labelText}</label>
60
60
  ${this.readOnly?b.html`<textarea class='input-control' rows='5' readonly>${this.inputValue}</textarea>`:b.html`<textarea class='input-control' rows='5' @input=${this.getInputValue}>${this.inputValue}</textarea>`}
61
61
  </div>
62
- `}},w.GenusTextArea.styles=[fa,pa,ga,ba,ma],de([v.property({attribute:"label-text"})],w.GenusTextArea.prototype,"labelText",2),de([v.property({attribute:"input-value"})],w.GenusTextArea.prototype,"inputValue",2),de([v.property({attribute:"read-only",type:Boolean})],w.GenusTextArea.prototype,"readOnly",2),de([v.state()],w.GenusTextArea.prototype,"_targetInput",2),w.GenusTextArea=de([v.customElement("genus-textarea")],w.GenusTextArea);const va=b.css`
62
+ `}},w.GenusTextArea.styles=[pa,ga,ma,xa,ba],de([v.property({attribute:"label-text"})],w.GenusTextArea.prototype,"labelText",2),de([v.property({attribute:"input-value"})],w.GenusTextArea.prototype,"inputValue",2),de([v.property({attribute:"read-only",type:Boolean})],w.GenusTextArea.prototype,"readOnly",2),de([v.state()],w.GenusTextArea.prototype,"_targetInput",2),w.GenusTextArea=de([v.customElement("genus-textarea")],w.GenusTextArea);const wa=b.css`
63
63
  input[type='text'], input[type='email'], input[type='password'], input[type='date']
64
64
  {
65
65
  border: var(--input-border, none);
@@ -92,13 +92,13 @@
92
92
  .input-control--without-icon { border-radius: var(--input-without-icon-border-radius, 0.375rem); }
93
93
 
94
94
  .date-control:hover { cursor: pointer; }
95
- `,wa=b.css`
95
+ `,ka=b.css`
96
96
  .input-label
97
97
  {
98
98
  justify-self: start;
99
99
  grid-area: il;
100
100
  }
101
- `,ka=b.css`
101
+ `,Aa=b.css`
102
102
  img
103
103
  {
104
104
  max-width: 100%;
@@ -117,7 +117,7 @@
117
117
  }
118
118
 
119
119
  .year-change-icon { pointer-events: none; }
120
- `,Aa=b.css`
120
+ `,Ma=b.css`
121
121
  input[type='text'], input[type='email'], input[type='password'], input[type='date']
122
122
  {
123
123
  font-family: var(--input-font-family, 'Sofia Pro');
@@ -171,7 +171,7 @@
171
171
  .current-date { font-family: var(--current-date-font-family, 'Sofia Pro Semi'); }
172
172
 
173
173
  .date--selected { font-family: var(--current-date-font-family, 'Sofia Pro Semi'); }
174
- `,Ma=b.css`
174
+ `,Pa=b.css`
175
175
  .form-field
176
176
  {
177
177
  display: grid;
@@ -228,7 +228,7 @@
228
228
  grid-template-columns: repeat(7, 2.5rem);
229
229
  grid-auto-rows: 2.5rem;
230
230
  }
231
- `,Pa=b.css`
231
+ `,Ta=b.css`
232
232
  .icon-container
233
233
  {
234
234
  display: flex;
@@ -256,7 +256,7 @@
256
256
  align-items: center;
257
257
  column-gap: 0.8rem;
258
258
  }
259
- `,Ta=b.css`
259
+ `,Sa=b.css`
260
260
  * { box-sizing: border-box; }
261
261
 
262
262
  .icon-container
@@ -358,7 +358,7 @@
358
358
  place-items: center;
359
359
  cursor: pointer;
360
360
  }
361
- `,Tn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cstyle%3e%20%23Profile%20{%20fill:%20%23203e70;%20}%20%3c/style%3e%3ctitle%3eIconly/Bold/Profile%3c/title%3e%3cg%20id='Iconly/Bold/Profile'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Profile'%20transform='translate(4.000000,%202.000000)'%20fill='%23000000'%20fill-rule='nonzero'%3e%3cpath%20d='M8,13.1739317%20C12.338627,13.1739317%2016,13.8789388%2016,16.598966%20C16,19.3199932%2012.314618,20%208,20%20C3.66237339,20%205.68434189e-14,19.2949929%205.68434189e-14,16.5749657%20C5.68434189e-14,13.8539385%203.68538202,13.1739317%208,13.1739317%20Z%20M8,-6.03961325e-14%20C10.9391022,-6.03961325e-14%2013.2939852,2.35402354%2013.2939852,5.29105291%20C13.2939852,8.22808228%2010.9391022,10.5831058%208,10.5831058%20C5.06189821,10.5831058%202.70601476,8.22808228%202.70601476,5.29105291%20C2.70601476,2.35402354%205.06189821,-6.03961325e-14%208,-6.03961325e-14%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Sn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cstyle%3e%20%23Password%20{%20fill:%20%23203e70;%20}%20%3c/style%3e%3ctitle%3eIconly/Bold/Password%3c/title%3e%3cg%20id='Iconly/Bold/Password'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Password'%20transform='translate(1.999700,%201.999200)'%20fill='%23000000'%20fill-rule='nonzero'%3e%3cpath%20d='M14.335,0%20C17.723,0%2020,2.378%2020,5.917%20L20,5.917%20L20,14.084%20C20,17.623%2017.723,20%2014.334,20%20L14.334,20%20L5.666,20%20C2.277,20%200,17.623%200,14.084%20L0,14.084%20L0,5.917%20C0,2.378%202.277,0%205.666,0%20L5.666,0%20Z%20M6.841,7.399%20C5.407,7.399%204.24,8.566%204.24,10%20C4.24,11.435%205.407,12.602%206.841,12.602%20C8.013,12.602%208.995,11.818%209.319,10.75%20L9.319,10.75%20L11.431,10.75%20L11.431,11.852%20C11.431,12.266%2011.767,12.602%2012.181,12.602%20C12.595,12.602%2012.931,12.266%2012.931,11.852%20L12.931,11.852%20L12.931,10.75%20L14.261,10.75%20L14.261,11.852%20C14.261,12.266%2014.597,12.602%2015.011,12.602%20C15.425,12.602%2015.761,12.266%2015.761,11.852%20L15.761,11.852%20L15.761,10%20C15.761,9.586%2015.425,9.25%2015.011,9.25%20L15.011,9.25%20L9.319,9.25%20C8.995,8.183%208.013,7.399%206.841,7.399%20Z%20M6.8411,8.8989%20C7.4481,8.8989%207.9431,9.3929%207.9431,10.0009%20C7.9431,10.6079%207.4481,11.1019%206.8411,11.1019%20C6.2341,11.1019%205.7391,10.6079%205.7391,10.0009%20C5.7391,9.3929%206.2341,8.8989%206.8411,8.8989%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Cn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cstyle%3e%20%23Message%20{%20fill:%20%23203e70;%20}%20%3c/style%3e%3ctitle%3eIconly/Bold/Message%3c/title%3e%3cg%20id='Iconly/Bold/Message'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Message'%20transform='translate(2.000400,%203.000000)'%20fill='%23000000'%20fill-rule='nonzero'%3e%3cpath%20d='M14.939,0%20C16.28,0%2017.57,0.53%2018.519,1.481%20C19.469,2.43%2020,3.71%2020,5.05%20L20,5.05%20L20,12.95%20C20,15.74%2017.73,18%2014.939,18%20L14.939,18%20L5.06,18%20C2.269,18%200,15.74%200,12.95%20L0,12.95%20L0,5.05%20C0,2.26%202.259,0%205.06,0%20L5.06,0%20Z%20M16.07,5.2%20C15.86,5.189%2015.66,5.26%2015.509,5.4%20L15.509,5.4%20L11,9%20C10.42,9.481%209.589,9.481%209,9%20L9,9%20L4.5,5.4%20C4.189,5.17%203.759,5.2%203.5,5.47%20C3.23,5.74%203.2,6.17%203.429,6.47%20L3.429,6.47%20L3.56,6.6%20L8.11,10.15%20C8.67,10.59%209.349,10.83%2010.06,10.83%20C10.769,10.83%2011.46,10.59%2012.019,10.15%20L12.019,10.15%20L16.53,6.54%20L16.61,6.46%20C16.849,6.17%2016.849,5.75%2016.599,5.46%20C16.46,5.311%2016.269,5.22%2016.07,5.2%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Ln="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cstyle%3e%20%23Calendar%20{%20fill:%20%23203e70;%20}%20%3c/style%3e%3ctitle%3eIconly/Bold/Calendar%3c/title%3e%3cg%20id='Iconly/Bold/Calendar'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Calendar'%20transform='translate(3.000000,%202.000000)'%20fill='%23000000'%20fill-rule='nonzero'%3e%3cpath%20d='M12.6496583,2.25524422e-06%20C13.0742093,-0.000994978687%2013.4099008,0.32883983%2013.4108881,0.768619575%20L13.4108881,0.768619575%20L13.4118754,1.51824414%20C16.1665203,1.73413601%2017.9861656,3.61119592%2017.9891276,6.48975425%20L17.9891276,6.48975425%20L17.9999941,14.9155344%20C18.0039375,18.0539625%2016.0322437,19.9849954%2012.8718071,19.9899929%20L12.8718071,19.9899929%20L5.15189025,20.0000023%20C2.0112002,20.0039859%200.0148231956,18.0269761%200.010873884,14.8795524%20L0.010873884,14.8795524%20L6.62739655e-06,6.55272272%20C-0.00393603445,3.6551739%201.75153297,1.78311149%204.5061778,1.53023813%20L4.5061778,1.53023813%20L4.50519047,0.780613568%20C4.50420314,0.340833823%204.83002135,0.00999951493%205.26444563,0.00999951493%20C5.6988699,0.00900001551%206.02468811,0.338834824%206.02567543,0.778614569%20L6.02567543,0.778614569%20L6.02666276,1.47826416%20L11.8913905,1.47026817%20L11.8904031,0.770618574%20C11.8894158,0.330838829%2012.215234,0.00100402015%2012.6496583,2.25524422e-06%20Z%20M13.0524881,14.1918968%20L13.0426148,14.1918968%20C12.588444,14.2028913%2012.22412,14.5837006%2012.2339933,15.0434703%20C12.2349806,15.50324%2012.6012792,15.8820503%2013.0554501,15.8920453%20C13.5185068,15.8910458%2013.8936914,15.5102365%2013.8927061,15.0404718%20C13.8927061,14.5707071%2013.5165322,14.1918968%2013.0524881,14.1918968%20L13.0524881,14.1918968%20Z%20M4.91690621,14.1928941%20C4.46273537,14.2128863%204.10729733,14.5936956%204.10828261,15.0534653%20C4.12901854,15.513235%204.50420314,15.8730548%204.95837398,15.8520653%20C5.40365886,15.8320753%205.75810957,15.4512661%205.73737569,14.9914963%20C5.72750241,14.5417216%205.36120376,14.1918968%204.91690621,14.1928941%20Z%20M8.98469714,14.1878967%20C8.53052631,14.2088883%208.1760756,14.5886981%208.1760756,15.0484678%20C8.19680948,15.5082375%208.57199408,15.8670578%209.02616491,15.8470678%20C9.47046247,15.8260783%209.82590051,15.4462686%209.80516663,14.9854993%20C9.79529335,14.5367241%209.4289947,14.1868993%208.98469714,14.1878967%20Z%20M4.91196957,10.5946962%20C4.45779873,10.6146884%204.10334802,10.9954976%204.10433329,11.4552674%20C4.1240819,11.9150371%204.50025383,12.2748569%204.95442467,12.2538674%20C5.39872222,12.2338774%205.75317294,11.8530681%205.73243905,11.3932984%20C5.72256577,10.9435237%205.35725445,10.5936989%204.91196957,10.5946962%20Z%20M8.98074783,10.5597138%20C8.526577,10.5797059%208.17113896,10.9605152%208.17212423,11.4202849%20C8.19187284,11.8800546%208.56804477,12.2388749%209.0222156,12.2188849%20C9.46651316,12.1978954%209.82096387,11.8180857%209.80121731,11.3583159%20C9.79035671,10.9085412%209.42504539,10.5587164%208.98074783,10.5597138%20Z%20M13.0485388,10.5647113%20C12.5943679,10.5747084%2012.2389299,10.9445232%2012.2399152,11.4042929%20L12.2399152,11.4042929%20L12.2399152,11.4152874%20C12.2497905,11.8750571%2012.6249751,12.2238824%2013.0801333,12.2138874%20C13.5244308,12.2028929%2013.8788815,11.8220837%2013.8690083,11.3623139%20C13.8482744,10.9225342%2013.491849,10.5637139%2013.0485388,10.5647113%20Z%20M11.8933651,3.00949727%20L6.02863742,3.01749327%20L6.02962475,3.8260883%20C6.02962475,4.25687255%205.70479387,4.59670235%205.27036959,4.59670235%20C4.83594532,4.59770185%204.50913978,4.25887155%204.50913978,3.8280873%20L4.50913978,3.8280873%20L4.50815246,3.05847275%20C2.58286306,3.25137613%201.51753626,4.38280948%201.52049208,6.55072372%20L1.52049208,6.55072372%20L1.52148557,6.86156804%20L16.4696299,6.84157805%20L16.4696299,6.49175325%20C16.4271748,4.3428295%2015.3490128,3.21539415%2013.4138501,3.04747825%20L13.4138501,3.04747825%20L13.4148374,3.81709281%20C13.4148374,4.24687756%2013.0801333,4.58770686%2012.6555823,4.58770686%20C12.221158,4.58870636%2011.8943525,4.24887655%2011.8943525,3.8190918%20L11.8943525,3.8190918%20L11.8933651,3.00949727%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",On="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cstyle%3e%20%23Search%20{%20stroke:%20%23203e70;%20}%20%3c/style%3e%3ctitle%3eIconly/Light/Search%3c/title%3e%3cg%20id='Iconly/Light/Search'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cg%20id='Search'%20transform='translate(2.000000,%202.000000)'%20stroke='%23000000'%20stroke-width='1.5'%3e%3ccircle%20id='Ellipse_739'%20cx='9.76659044'%20cy='9.76659044'%20r='8.9885584'%3e%3c/circle%3e%3cline%20x1='16.0183067'%20y1='16.4851259'%20x2='19.5423342'%20y2='20.0000001'%20id='Line_181'%3e%3c/line%3e%3c/g%3e%3c/g%3e%3c/svg%3e",zn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cstyle%3e%20%23Arrow---Left-2%20{%20stroke:%20%231e9dfc;%20}%20%3c/style%3e%3ctitle%3eIconly/Light/Arrow%20-%20Left%202%3c/title%3e%3cg%20id='Iconly/Light/Arrow---Left-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cg%20id='Arrow---Left-2'%20transform='translate(12.000000,%2012.000000)%20rotate(-270.000000)%20translate(-12.000000,%20-12.000000)%20translate(5.000000,%208.500000)'%20stroke='%23000000'%20stroke-width='1.5'%3e%3cpolyline%20id='Stroke-1'%20points='14%200%207%207%200%200'%3e%3c/polyline%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Vn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cstyle%3e%20%23Arrow---Right-2%20{%20stroke:%20%231e9dfc;%20}%20%3c/style%3e%3ctitle%3eIconly/Light/Arrow%20-%20Right%202%3c/title%3e%3cg%20id='Iconly/Light/Arrow---Right-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cg%20id='Arrow---Right-2'%20transform='translate(12.000000,%2012.000000)%20rotate(-90.000000)%20translate(-12.000000,%20-12.000000)%20translate(5.000000,%208.500000)'%20stroke='%23000000'%20stroke-width='1.5'%3e%3cpolyline%20id='Stroke-1'%20points='14%200%207%207%200%200'%3e%3c/polyline%3e%3c/g%3e%3c/g%3e%3c/svg%3e";var Sa=Object.defineProperty,Ca=Object.getOwnPropertyDescriptor,K=(i,t,e,n)=>{for(var s=n>1?void 0:n?Ca(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Sa(t,e,s),s};w.GenusTextBox=class extends b.LitElement{constructor(){super(),this.labelText="",this.inputValue="",this.inputType="text",this.inputName="",this.inputIconSrc="",this.placeholderText="",this.withoutIcon=!1,this.withoutLabel=!1,this.withoutLabelIcon=!1,this.readOnly=!1,this.displayPosition="bottom",this.getInputValue=t=>{this._targetInput===null&&(this._targetInput=t.target),this.inputValue=this._targetInput.value,this._internals.setFormValue(this._targetInput.value),this.dispatchEvent(new CustomEvent("typed",{detail:t.target.value}))},this._monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],this._currentMonth=new Date().getMonth(),this._currentYear=new Date().getFullYear(),this._currentDate=new Date,this._targetInput=null,this._isLeapYear=t=>t%4===0&&t%100!==0&&t%400!==0||t%100===0&&t%400===0,this._getFebDays=t=>this._isLeapYear(t)?29:28,this._showMonthsCssClass="",this._showCalenderCssClass="",this._toggleCalendar=()=>{this._showCalenderCssClass=this._showCalenderCssClass?"":`calendar-${this.displayPosition}--show`},this._selectDate=t=>{let e=new Date(this._currentYear,this._currentMonth,Number(t));this.inputValue=`${e.toLocaleString("default",{weekday:"long"})}, ${t} ${this._monthNames[e.getMonth()]} ${this._currentYear}`,this._internals.setFormValue(e.toString()),this.dispatchEvent(new CustomEvent("selected",{detail:{chosenDate:e,formattedDate:this.inputValue}})),this._showCalenderCssClass=""},this._generateDays=(t,e)=>{const n=[31,this._getFebDays(e),31,30,31,30,31,31,30,31,30,31];let s=new Date(e,t,1),o=document.createElement("div");o.classList.add("dates");for(let a=0;a<=n[t]+s.getDay()-1;a++){let r=document.createElement("div");a>=s.getDay()&&(r.classList.add("date"),r.innerHTML=(a-s.getDay()+1).toString(),a-s.getDay()+1===this._currentDate.getDate()&&e===this._currentDate.getFullYear()&&t===this._currentDate.getMonth()&&r.classList.add("current-date")),r.addEventListener("click",l=>{this._selectDate(l.target.innerHTML),l.target.classList.add("date--selected")}),o.appendChild(r)}return o},this._setMonth=t=>{this._currentMonth=t,this._showMonthsCssClass="",this._generateDays(this._currentMonth,this._currentYear)},this._previousYear=()=>{--this._currentYear,this._generateDays(this._currentMonth,this._currentYear)},this._nextYear=()=>{++this._currentYear,this._generateDays(this._currentMonth,this._currentYear)},this.renderInputControl=t=>({text:()=>{let n;return this.withoutIcon?n=b.html`
361
+ `,Sn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cstyle%3e%20%23Profile%20{%20fill:%20%23203e70;%20}%20%3c/style%3e%3ctitle%3eIconly/Bold/Profile%3c/title%3e%3cg%20id='Iconly/Bold/Profile'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Profile'%20transform='translate(4.000000,%202.000000)'%20fill='%23000000'%20fill-rule='nonzero'%3e%3cpath%20d='M8,13.1739317%20C12.338627,13.1739317%2016,13.8789388%2016,16.598966%20C16,19.3199932%2012.314618,20%208,20%20C3.66237339,20%205.68434189e-14,19.2949929%205.68434189e-14,16.5749657%20C5.68434189e-14,13.8539385%203.68538202,13.1739317%208,13.1739317%20Z%20M8,-6.03961325e-14%20C10.9391022,-6.03961325e-14%2013.2939852,2.35402354%2013.2939852,5.29105291%20C13.2939852,8.22808228%2010.9391022,10.5831058%208,10.5831058%20C5.06189821,10.5831058%202.70601476,8.22808228%202.70601476,5.29105291%20C2.70601476,2.35402354%205.06189821,-6.03961325e-14%208,-6.03961325e-14%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Cn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cstyle%3e%20%23Password%20{%20fill:%20%23203e70;%20}%20%3c/style%3e%3ctitle%3eIconly/Bold/Password%3c/title%3e%3cg%20id='Iconly/Bold/Password'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Password'%20transform='translate(1.999700,%201.999200)'%20fill='%23000000'%20fill-rule='nonzero'%3e%3cpath%20d='M14.335,0%20C17.723,0%2020,2.378%2020,5.917%20L20,5.917%20L20,14.084%20C20,17.623%2017.723,20%2014.334,20%20L14.334,20%20L5.666,20%20C2.277,20%200,17.623%200,14.084%20L0,14.084%20L0,5.917%20C0,2.378%202.277,0%205.666,0%20L5.666,0%20Z%20M6.841,7.399%20C5.407,7.399%204.24,8.566%204.24,10%20C4.24,11.435%205.407,12.602%206.841,12.602%20C8.013,12.602%208.995,11.818%209.319,10.75%20L9.319,10.75%20L11.431,10.75%20L11.431,11.852%20C11.431,12.266%2011.767,12.602%2012.181,12.602%20C12.595,12.602%2012.931,12.266%2012.931,11.852%20L12.931,11.852%20L12.931,10.75%20L14.261,10.75%20L14.261,11.852%20C14.261,12.266%2014.597,12.602%2015.011,12.602%20C15.425,12.602%2015.761,12.266%2015.761,11.852%20L15.761,11.852%20L15.761,10%20C15.761,9.586%2015.425,9.25%2015.011,9.25%20L15.011,9.25%20L9.319,9.25%20C8.995,8.183%208.013,7.399%206.841,7.399%20Z%20M6.8411,8.8989%20C7.4481,8.8989%207.9431,9.3929%207.9431,10.0009%20C7.9431,10.6079%207.4481,11.1019%206.8411,11.1019%20C6.2341,11.1019%205.7391,10.6079%205.7391,10.0009%20C5.7391,9.3929%206.2341,8.8989%206.8411,8.8989%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Ln="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cstyle%3e%20%23Message%20{%20fill:%20%23203e70;%20}%20%3c/style%3e%3ctitle%3eIconly/Bold/Message%3c/title%3e%3cg%20id='Iconly/Bold/Message'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Message'%20transform='translate(2.000400,%203.000000)'%20fill='%23000000'%20fill-rule='nonzero'%3e%3cpath%20d='M14.939,0%20C16.28,0%2017.57,0.53%2018.519,1.481%20C19.469,2.43%2020,3.71%2020,5.05%20L20,5.05%20L20,12.95%20C20,15.74%2017.73,18%2014.939,18%20L14.939,18%20L5.06,18%20C2.269,18%200,15.74%200,12.95%20L0,12.95%20L0,5.05%20C0,2.26%202.259,0%205.06,0%20L5.06,0%20Z%20M16.07,5.2%20C15.86,5.189%2015.66,5.26%2015.509,5.4%20L15.509,5.4%20L11,9%20C10.42,9.481%209.589,9.481%209,9%20L9,9%20L4.5,5.4%20C4.189,5.17%203.759,5.2%203.5,5.47%20C3.23,5.74%203.2,6.17%203.429,6.47%20L3.429,6.47%20L3.56,6.6%20L8.11,10.15%20C8.67,10.59%209.349,10.83%2010.06,10.83%20C10.769,10.83%2011.46,10.59%2012.019,10.15%20L12.019,10.15%20L16.53,6.54%20L16.61,6.46%20C16.849,6.17%2016.849,5.75%2016.599,5.46%20C16.46,5.311%2016.269,5.22%2016.07,5.2%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",On="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cstyle%3e%20%23Calendar%20{%20fill:%20%23203e70;%20}%20%3c/style%3e%3ctitle%3eIconly/Bold/Calendar%3c/title%3e%3cg%20id='Iconly/Bold/Calendar'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Calendar'%20transform='translate(3.000000,%202.000000)'%20fill='%23000000'%20fill-rule='nonzero'%3e%3cpath%20d='M12.6496583,2.25524422e-06%20C13.0742093,-0.000994978687%2013.4099008,0.32883983%2013.4108881,0.768619575%20L13.4108881,0.768619575%20L13.4118754,1.51824414%20C16.1665203,1.73413601%2017.9861656,3.61119592%2017.9891276,6.48975425%20L17.9891276,6.48975425%20L17.9999941,14.9155344%20C18.0039375,18.0539625%2016.0322437,19.9849954%2012.8718071,19.9899929%20L12.8718071,19.9899929%20L5.15189025,20.0000023%20C2.0112002,20.0039859%200.0148231956,18.0269761%200.010873884,14.8795524%20L0.010873884,14.8795524%20L6.62739655e-06,6.55272272%20C-0.00393603445,3.6551739%201.75153297,1.78311149%204.5061778,1.53023813%20L4.5061778,1.53023813%20L4.50519047,0.780613568%20C4.50420314,0.340833823%204.83002135,0.00999951493%205.26444563,0.00999951493%20C5.6988699,0.00900001551%206.02468811,0.338834824%206.02567543,0.778614569%20L6.02567543,0.778614569%20L6.02666276,1.47826416%20L11.8913905,1.47026817%20L11.8904031,0.770618574%20C11.8894158,0.330838829%2012.215234,0.00100402015%2012.6496583,2.25524422e-06%20Z%20M13.0524881,14.1918968%20L13.0426148,14.1918968%20C12.588444,14.2028913%2012.22412,14.5837006%2012.2339933,15.0434703%20C12.2349806,15.50324%2012.6012792,15.8820503%2013.0554501,15.8920453%20C13.5185068,15.8910458%2013.8936914,15.5102365%2013.8927061,15.0404718%20C13.8927061,14.5707071%2013.5165322,14.1918968%2013.0524881,14.1918968%20L13.0524881,14.1918968%20Z%20M4.91690621,14.1928941%20C4.46273537,14.2128863%204.10729733,14.5936956%204.10828261,15.0534653%20C4.12901854,15.513235%204.50420314,15.8730548%204.95837398,15.8520653%20C5.40365886,15.8320753%205.75810957,15.4512661%205.73737569,14.9914963%20C5.72750241,14.5417216%205.36120376,14.1918968%204.91690621,14.1928941%20Z%20M8.98469714,14.1878967%20C8.53052631,14.2088883%208.1760756,14.5886981%208.1760756,15.0484678%20C8.19680948,15.5082375%208.57199408,15.8670578%209.02616491,15.8470678%20C9.47046247,15.8260783%209.82590051,15.4462686%209.80516663,14.9854993%20C9.79529335,14.5367241%209.4289947,14.1868993%208.98469714,14.1878967%20Z%20M4.91196957,10.5946962%20C4.45779873,10.6146884%204.10334802,10.9954976%204.10433329,11.4552674%20C4.1240819,11.9150371%204.50025383,12.2748569%204.95442467,12.2538674%20C5.39872222,12.2338774%205.75317294,11.8530681%205.73243905,11.3932984%20C5.72256577,10.9435237%205.35725445,10.5936989%204.91196957,10.5946962%20Z%20M8.98074783,10.5597138%20C8.526577,10.5797059%208.17113896,10.9605152%208.17212423,11.4202849%20C8.19187284,11.8800546%208.56804477,12.2388749%209.0222156,12.2188849%20C9.46651316,12.1978954%209.82096387,11.8180857%209.80121731,11.3583159%20C9.79035671,10.9085412%209.42504539,10.5587164%208.98074783,10.5597138%20Z%20M13.0485388,10.5647113%20C12.5943679,10.5747084%2012.2389299,10.9445232%2012.2399152,11.4042929%20L12.2399152,11.4042929%20L12.2399152,11.4152874%20C12.2497905,11.8750571%2012.6249751,12.2238824%2013.0801333,12.2138874%20C13.5244308,12.2028929%2013.8788815,11.8220837%2013.8690083,11.3623139%20C13.8482744,10.9225342%2013.491849,10.5637139%2013.0485388,10.5647113%20Z%20M11.8933651,3.00949727%20L6.02863742,3.01749327%20L6.02962475,3.8260883%20C6.02962475,4.25687255%205.70479387,4.59670235%205.27036959,4.59670235%20C4.83594532,4.59770185%204.50913978,4.25887155%204.50913978,3.8280873%20L4.50913978,3.8280873%20L4.50815246,3.05847275%20C2.58286306,3.25137613%201.51753626,4.38280948%201.52049208,6.55072372%20L1.52049208,6.55072372%20L1.52148557,6.86156804%20L16.4696299,6.84157805%20L16.4696299,6.49175325%20C16.4271748,4.3428295%2015.3490128,3.21539415%2013.4138501,3.04747825%20L13.4138501,3.04747825%20L13.4148374,3.81709281%20C13.4148374,4.24687756%2013.0801333,4.58770686%2012.6555823,4.58770686%20C12.221158,4.58870636%2011.8943525,4.24887655%2011.8943525,3.8190918%20L11.8943525,3.8190918%20L11.8933651,3.00949727%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",zn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cstyle%3e%20%23Search%20{%20stroke:%20%23203e70;%20}%20%3c/style%3e%3ctitle%3eIconly/Light/Search%3c/title%3e%3cg%20id='Iconly/Light/Search'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cg%20id='Search'%20transform='translate(2.000000,%202.000000)'%20stroke='%23000000'%20stroke-width='1.5'%3e%3ccircle%20id='Ellipse_739'%20cx='9.76659044'%20cy='9.76659044'%20r='8.9885584'%3e%3c/circle%3e%3cline%20x1='16.0183067'%20y1='16.4851259'%20x2='19.5423342'%20y2='20.0000001'%20id='Line_181'%3e%3c/line%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Vn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cstyle%3e%20%23Arrow---Left-2%20{%20stroke:%20%231e9dfc;%20}%20%3c/style%3e%3ctitle%3eIconly/Light/Arrow%20-%20Left%202%3c/title%3e%3cg%20id='Iconly/Light/Arrow---Left-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cg%20id='Arrow---Left-2'%20transform='translate(12.000000,%2012.000000)%20rotate(-270.000000)%20translate(-12.000000,%20-12.000000)%20translate(5.000000,%208.500000)'%20stroke='%23000000'%20stroke-width='1.5'%3e%3cpolyline%20id='Stroke-1'%20points='14%200%207%207%200%200'%3e%3c/polyline%3e%3c/g%3e%3c/g%3e%3c/svg%3e",In="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cstyle%3e%20%23Arrow---Right-2%20{%20stroke:%20%231e9dfc;%20}%20%3c/style%3e%3ctitle%3eIconly/Light/Arrow%20-%20Right%202%3c/title%3e%3cg%20id='Iconly/Light/Arrow---Right-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cg%20id='Arrow---Right-2'%20transform='translate(12.000000,%2012.000000)%20rotate(-90.000000)%20translate(-12.000000,%20-12.000000)%20translate(5.000000,%208.500000)'%20stroke='%23000000'%20stroke-width='1.5'%3e%3cpolyline%20id='Stroke-1'%20points='14%200%207%207%200%200'%3e%3c/polyline%3e%3c/g%3e%3c/g%3e%3c/svg%3e";var Ca=Object.defineProperty,La=Object.getOwnPropertyDescriptor,K=(i,t,e,n)=>{for(var s=n>1?void 0:n?La(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Ca(t,e,s),s};w.GenusTextBox=class extends b.LitElement{constructor(){super(),this.labelText="",this.inputValue="",this.inputType="text",this.inputName="",this.inputIconSrc="",this.placeholderText="",this.withoutIcon=!1,this.withoutLabel=!1,this.withoutLabelIcon=!1,this.readOnly=!1,this.displayPosition="bottom",this.getInputValue=t=>{this._targetInput===null&&(this._targetInput=t.target),this.inputValue=this._targetInput.value,this._internals.setFormValue(this._targetInput.value),this.dispatchEvent(new CustomEvent("typed",{detail:t.target.value}))},this._monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],this._currentMonth=new Date().getMonth(),this._currentYear=new Date().getFullYear(),this._currentDate=new Date,this._targetInput=null,this._isLeapYear=t=>t%4===0&&t%100!==0&&t%400!==0||t%100===0&&t%400===0,this._getFebDays=t=>this._isLeapYear(t)?29:28,this._showMonthsCssClass="",this._showCalenderCssClass="",this._toggleCalendar=()=>{this._showCalenderCssClass=this._showCalenderCssClass?"":`calendar-${this.displayPosition}--show`},this._selectDate=t=>{let e=new Date(this._currentYear,this._currentMonth,Number(t));this.inputValue=`${e.toLocaleString("default",{weekday:"long"})}, ${t} ${this._monthNames[e.getMonth()]} ${this._currentYear}`,this._internals.setFormValue(e.toString()),this.dispatchEvent(new CustomEvent("selected",{detail:{chosenDate:e,formattedDate:this.inputValue}})),this._showCalenderCssClass=""},this._generateDays=(t,e)=>{const n=[31,this._getFebDays(e),31,30,31,30,31,31,30,31,30,31];let s=new Date(e,t,1),o=document.createElement("div");o.classList.add("dates");for(let a=0;a<=n[t]+s.getDay()-1;a++){let r=document.createElement("div");a>=s.getDay()&&(r.classList.add("date"),r.innerHTML=(a-s.getDay()+1).toString(),a-s.getDay()+1===this._currentDate.getDate()&&e===this._currentDate.getFullYear()&&t===this._currentDate.getMonth()&&r.classList.add("current-date")),r.addEventListener("click",l=>{this._selectDate(l.target.innerHTML),l.target.classList.add("date--selected")}),o.appendChild(r)}return o},this._setMonth=t=>{this._currentMonth=t,this._showMonthsCssClass="",this._generateDays(this._currentMonth,this._currentYear)},this._previousYear=()=>{--this._currentYear,this._generateDays(this._currentMonth,this._currentYear)},this._nextYear=()=>{++this._currentYear,this._generateDays(this._currentMonth,this._currentYear)},this.renderInputControl=t=>({text:()=>{let n;return this.withoutIcon?n=b.html`
362
362
  <div class='form-field form-field--without-icon'>
363
363
  <label class='input-label'>${this.labelText}</label>
364
364
  ${this.readOnly?b.html`<input class='input-control input-control--without-icon' type='${t}' value=${this.inputValue} readonly />`:b.html`<input class='input-control input-control--without-icon' type='${t}' @input=${this.getInputValue} name='${this.inputName}' placeholder=${this.placeholderText} value=${this.inputValue} />`}
@@ -367,7 +367,7 @@
367
367
  <div class='form-field form-field--without-label'>
368
368
  <input class='input-control' type='${t}' @input=${this.getInputValue} name='${this.inputName}' placeholder=${this.placeholderText} value=${this.inputValue} />
369
369
  <div class='icon-container'>
370
- <img class="component-icon" src='${this.inputIconSrc||Tn}' />
370
+ <img class="component-icon" src='${this.inputIconSrc||Sn}' />
371
371
  </div>
372
372
  </div>`:this.withoutLabelIcon?n=b.html`
373
373
  <div class='form-field form-field--without-label-icon'>
@@ -377,7 +377,7 @@
377
377
  <label class='input-label'>${this.labelText}</label>
378
378
  <input class='input-control' type='${t}' @input=${this.getInputValue} name='${this.inputName}' placeholder=${this.placeholderText} value=${this.inputValue} />
379
379
  <div class='icon-container'>
380
- <img class="component-icon" src='${this.inputIconSrc||Tn}' />
380
+ <img class="component-icon" src='${this.inputIconSrc||Sn}' />
381
381
  </div>
382
382
  </div>`,n},password:()=>{let n;return this.withoutIcon?n=b.html`
383
383
  <div class='form-field form-field--without-icon'>
@@ -388,7 +388,7 @@
388
388
  <div class='form-field form-field--without-label'>
389
389
  <input class='input-control' type='${t}' @input=${this.getInputValue} name='${this.inputName}' placeholder=${this.placeholderText} />
390
390
  <div class='icon-container'>
391
- <img class="component-icon" src='${this.inputIconSrc||Sn}' />
391
+ <img class="component-icon" src='${this.inputIconSrc||Cn}' />
392
392
  </div>
393
393
  </div>`:this.withoutLabelIcon?n=b.html`
394
394
  <div class='form-field form-field--without-label-icon'>
@@ -398,7 +398,7 @@
398
398
  <label class='input-label'>${this.labelText}</label>
399
399
  <input class='input-control' type='${t}' @input=${this.getInputValue} name='${this.inputName}' placeholder=${this.placeholderText} />
400
400
  <div class='icon-container'>
401
- <img class="component-icon" src='${this.inputIconSrc||Sn}' />
401
+ <img class="component-icon" src='${this.inputIconSrc||Cn}' />
402
402
  </div>
403
403
  </div>`,n},email:()=>{let n;return this.withoutIcon?n=b.html`
404
404
  <div class='form-field form-field--without-icon'>
@@ -409,7 +409,7 @@
409
409
  <div class='form-field form-field--without-label'>
410
410
  <input class='input-control' type='${t}' @input=${this.getInputValue} name='${this.inputName}' placeholder=${this.placeholderText} value=${this.inputValue} />
411
411
  <div class='icon-container'>
412
- <img class="component-icon" src='${this.inputIconSrc||Cn}' />
412
+ <img class="component-icon" src='${this.inputIconSrc||Ln}' />
413
413
  </div>
414
414
  </div>`:this.withoutLabelIcon?n=b.html`
415
415
  <div class='form-field form-field--without-label-icon'>
@@ -419,27 +419,27 @@
419
419
  <label class='input-label'>${this.labelText}</label>
420
420
  <input class='input-control' type='${t}' @input=${this.getInputValue} name='${this.inputName}' placeholder=${this.placeholderText} value=${this.inputValue} />
421
421
  <div class='icon-container'>
422
- <img class="component-icon" src='${this.inputIconSrc||Cn}' />
422
+ <img class="component-icon" src='${this.inputIconSrc||Ln}' />
423
423
  </div>
424
424
  </div>`,n},search:()=>{let n;return this.withoutLabel?n=b.html`
425
425
  <div class='form-field form-field--without-label'>
426
426
  <input class='input-control' type='text' @input=${this.getInputValue} name='${this.inputName}' value=${this.inputValue} placeholder=${this.placeholderText} />
427
427
  <div class='icon-container'>
428
- <img class="component-icon" src='${this.inputIconSrc||On}' />
428
+ <img class="component-icon" src='${this.inputIconSrc||zn}' />
429
429
  </div>
430
430
  </div>`:n=b.html`
431
431
  <div class='form-field'>
432
432
  <label class='input-label'>${this.labelText}</label>
433
433
  <input class='input-control' type='text' @input=${this.getInputValue} name='${this.inputName}' value=${this.inputValue} placeholder=${this.placeholderText} />
434
434
  <div class='icon-container'>
435
- <img class="component-icon" src='${this.inputIconSrc||On}' />
435
+ <img class="component-icon" src='${this.inputIconSrc||zn}' />
436
436
  </div>
437
437
  </div>`,n},date:()=>{let n;return this.withoutLabel?n=b.html`
438
438
  <div class='date-picker'>
439
439
  <div class='form-field form-field--without-label'>
440
440
  <input class='input-control date-control' type='text' @click=${this._toggleCalendar} value=${this.inputValue} placeholder=${this.placeholderText} readonly />
441
441
  <div class='icon-container'>
442
- <img class="component-icon" src='${this.inputIconSrc||Ln}' />
442
+ <img class="component-icon" src='${this.inputIconSrc||On}' />
443
443
  </div>
444
444
  </div>
445
445
  <div class='calendar calendar-${this.displayPosition} ${this._showCalenderCssClass}'>
@@ -447,11 +447,11 @@
447
447
  <span class="month-picker" @click=${()=>{this._showMonthsCssClass="month-list--show"}}>${this._monthNames[this._currentMonth]}</span>
448
448
  <div class="year-picker">
449
449
  <span class='year-navigation-button' @click=${this._previousYear}>
450
- <img class="component-icon year-change-icon prev-year-icon" src='${zn}' />
450
+ <img class="component-icon year-change-icon prev-year-icon" src='${Vn}' />
451
451
  </span>
452
452
  <span class="year">${this._currentYear}</span>
453
453
  <span class='year-navigation-button' @click=${this._nextYear}>
454
- <img class="component-icon year-change-icon next-year-icon" src='${Vn}' />
454
+ <img class="component-icon year-change-icon next-year-icon" src='${In}' />
455
455
  </span>
456
456
  </div>
457
457
  </div>
@@ -478,7 +478,7 @@
478
478
  <label class='input-label'>${this.labelText}</label>
479
479
  <input class='input-control date-control' type='text' @click=${this._toggleCalendar} value=${this.inputValue} placeholder=${this.placeholderText} readonly />
480
480
  <div class='icon-container'>
481
- <img class="component-icon" src='${this.inputIconSrc||Ln}' />
481
+ <img class="component-icon" src='${this.inputIconSrc||On}' />
482
482
  </div>
483
483
  </div>
484
484
  <div class='calendar calendar-${this.displayPosition} ${this._showCalenderCssClass}'>
@@ -486,11 +486,11 @@
486
486
  <span class="month-picker" @click=${()=>{this._showMonthsCssClass="month-list--show"}}>${this._monthNames[this._currentMonth]}</span>
487
487
  <div class="year-picker">
488
488
  <span class='year-navigation-button' @click=${this._previousYear}>
489
- <img class="component-icon year-change-icon prev-year-icon" src='${zn}' />
489
+ <img class="component-icon year-change-icon prev-year-icon" src='${Vn}' />
490
490
  </span>
491
491
  <span class="year">${this._currentYear}</span>
492
492
  <span class='year-navigation-button' @click=${this._nextYear}>
493
- <img class="component-icon year-change-icon next-year-icon" src='${Vn}' />
493
+ <img class="component-icon year-change-icon next-year-icon" src='${In}' />
494
494
  </span>
495
495
  </div>
496
496
  </div>
@@ -511,13 +511,13 @@
511
511
  </div>
512
512
  </div>
513
513
  </div>
514
- `,n}})[t](),this._internals=this.attachInternals()}updated(){this.inputValue===""&&this._targetInput!=null&&(this._targetInput.value=""),this.inputValue&&this._targetInput!=null&&(this._targetInput.value=this.inputValue)}render(){return this.renderInputControl(this.inputType)}},w.GenusTextBox.styles=[Ta,Ma,Pa,va,wa,ka,Aa],w.GenusTextBox.formAssociated=!0,K([v.property({attribute:"label-text"})],w.GenusTextBox.prototype,"labelText",2),K([v.property({attribute:"input-value"})],w.GenusTextBox.prototype,"inputValue",2),K([v.property({attribute:"input-type"})],w.GenusTextBox.prototype,"inputType",2),K([v.property({attribute:"name",reflect:!0})],w.GenusTextBox.prototype,"inputName",2),K([v.property({attribute:"svg-icon-src"})],w.GenusTextBox.prototype,"inputIconSrc",2),K([v.property({attribute:"placeholder-text"})],w.GenusTextBox.prototype,"placeholderText",2),K([v.property({attribute:"without-icon",type:Boolean})],w.GenusTextBox.prototype,"withoutIcon",2),K([v.property({attribute:"without-label",type:Boolean})],w.GenusTextBox.prototype,"withoutLabel",2),K([v.property({attribute:"without-label-icon",type:Boolean})],w.GenusTextBox.prototype,"withoutLabelIcon",2),K([v.property({attribute:"read-only",type:Boolean})],w.GenusTextBox.prototype,"readOnly",2),K([v.property({attribute:"display-position"})],w.GenusTextBox.prototype,"displayPosition",2),K([v.state()],w.GenusTextBox.prototype,"_currentMonth",2),K([v.state()],w.GenusTextBox.prototype,"_currentYear",2),K([v.state()],w.GenusTextBox.prototype,"_currentDate",2),K([v.state()],w.GenusTextBox.prototype,"_targetInput",2),K([v.state()],w.GenusTextBox.prototype,"_showMonthsCssClass",2),K([v.state()],w.GenusTextBox.prototype,"_showCalenderCssClass",2),K([v.state()],w.GenusTextBox.prototype,"_generateDays",2),w.GenusTextBox=K([v.customElement("genus-textbox")],w.GenusTextBox);const La=b.css`
514
+ `,n}})[t](),this._internals=this.attachInternals()}updated(){this.inputValue===""&&this._targetInput!=null&&(this._targetInput.value=""),this.inputValue&&this._targetInput!=null&&(this._targetInput.value=this.inputValue)}render(){return this.renderInputControl(this.inputType)}},w.GenusTextBox.styles=[Sa,Pa,Ta,wa,ka,Aa,Ma],w.GenusTextBox.formAssociated=!0,K([v.property({attribute:"label-text"})],w.GenusTextBox.prototype,"labelText",2),K([v.property({attribute:"input-value"})],w.GenusTextBox.prototype,"inputValue",2),K([v.property({attribute:"input-type"})],w.GenusTextBox.prototype,"inputType",2),K([v.property({attribute:"name",reflect:!0})],w.GenusTextBox.prototype,"inputName",2),K([v.property({attribute:"svg-icon-src"})],w.GenusTextBox.prototype,"inputIconSrc",2),K([v.property({attribute:"placeholder-text"})],w.GenusTextBox.prototype,"placeholderText",2),K([v.property({attribute:"without-icon",type:Boolean})],w.GenusTextBox.prototype,"withoutIcon",2),K([v.property({attribute:"without-label",type:Boolean})],w.GenusTextBox.prototype,"withoutLabel",2),K([v.property({attribute:"without-label-icon",type:Boolean})],w.GenusTextBox.prototype,"withoutLabelIcon",2),K([v.property({attribute:"read-only",type:Boolean})],w.GenusTextBox.prototype,"readOnly",2),K([v.property({attribute:"display-position"})],w.GenusTextBox.prototype,"displayPosition",2),K([v.state()],w.GenusTextBox.prototype,"_currentMonth",2),K([v.state()],w.GenusTextBox.prototype,"_currentYear",2),K([v.state()],w.GenusTextBox.prototype,"_currentDate",2),K([v.state()],w.GenusTextBox.prototype,"_targetInput",2),K([v.state()],w.GenusTextBox.prototype,"_showMonthsCssClass",2),K([v.state()],w.GenusTextBox.prototype,"_showCalenderCssClass",2),K([v.state()],w.GenusTextBox.prototype,"_generateDays",2),w.GenusTextBox=K([v.customElement("genus-textbox")],w.GenusTextBox);const Oa=b.css`
515
515
  input[type=radio]
516
516
  {
517
517
  display: none;
518
518
  -webkit-appearance: none;
519
519
  }
520
- `,Oa=b.css`
520
+ `,za=b.css`
521
521
  .tab-labels
522
522
  {
523
523
  padding: var(--tabs-container-padding);
@@ -544,7 +544,7 @@
544
544
  transform: translate3d(0, 0, 0);
545
545
  opacity: 1;
546
546
  }
547
- `,za=b.css`
547
+ `,Va=b.css`
548
548
  .tab
549
549
  {
550
550
  background: var(--tab-background-color, #f4f9f9);
@@ -572,7 +572,7 @@
572
572
  height: 0.1875rem;
573
573
  background: var(--active-tab-border-bottom-color, #213e70);
574
574
  }
575
- `,Va=b.css`
575
+ `,Ia=b.css`
576
576
  .tab
577
577
  {
578
578
  font-family: var(--tab-font-family, 'Sofia Pro');
@@ -582,7 +582,7 @@
582
582
  line-height: 3rem;
583
583
  text-transform: capitalize;
584
584
  }
585
- `,Ia=b.css`
585
+ `,Da=b.css`
586
586
  .tab-container
587
587
  {
588
588
  display: grid;
@@ -590,9 +590,9 @@
590
590
  grid-template-rows: 3rem minmax(10vh, 1fr);
591
591
  grid-row-gap: 1rem;
592
592
  }
593
- `,Da=b.css`
593
+ `,Fa=b.css`
594
594
  .tab-labels { display: flex; }
595
- `;var Fa=Object.defineProperty,Ea=Object.getOwnPropertyDescriptor,_t=(i,t,e,n)=>{for(var s=n>1?void 0:n?Ea(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Fa(t,e,s),s};let bt=class extends b.LitElement{constructor(){super(...arguments),this._numberOfTabs=0,this._tabsTemplate=[],this._tabNames=[],this.tabNames=[],this.withBorderBottom=!1,this._hideCurrentContent=()=>{this._tabContents.forEach(i=>{i.classList.contains("show-content")&&i.classList.remove("show-content")})},this._showContent=i=>{this._hideCurrentContent(),this._tabContents[i].classList.add("show-content")},this._generateTabs=()=>{this._tabNames=this.tabNames;for(let i=0;i<this._numberOfTabs;i++)i===0?this._tabsTemplate.push(b.html`
595
+ `;var Ea=Object.defineProperty,Ra=Object.getOwnPropertyDescriptor,_t=(i,t,e,n)=>{for(var s=n>1?void 0:n?Ra(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Ea(t,e,s),s};let bt=class extends b.LitElement{constructor(){super(...arguments),this._numberOfTabs=0,this._tabsTemplate=[],this._tabNames=[],this.tabNames=[],this.withBorderBottom=!1,this._hideCurrentContent=()=>{this._tabContents.forEach(i=>{i.classList.contains("show-content")&&i.classList.remove("show-content")})},this._showContent=i=>{this._hideCurrentContent(),this._tabContents[i].classList.add("show-content")},this._generateTabs=()=>{this._tabNames=this.tabNames;for(let i=0;i<this._numberOfTabs;i++)i===0?this._tabsTemplate.push(b.html`
596
596
  <input class="tab-radio" id=${this._tabNames[i]} type="radio" name="tabGroup" @change=${()=>{this._showContent(i)}} checked/>
597
597
  <label class="tab ${this._tabNames[i]}-tab" for=${this._tabNames[i]}>${this._tabNames[i]=this._tabNames[i].replace(/-/g," ")}</label>
598
598
  `):this._tabsTemplate.push(b.html`
@@ -605,7 +605,7 @@
605
605
  </div>
606
606
  <slot></slot>
607
607
  </div>
608
- `}};bt.styles=[La,za,Oa,Va,Ia,Da],_t([v.queryAssignedElements()],bt.prototype,"_tabContents",2),_t([v.state()],bt.prototype,"_numberOfTabs",2),_t([v.state()],bt.prototype,"_tabsTemplate",2),_t([v.property({attribute:"tab-names",type:Array})],bt.prototype,"tabNames",2),_t([v.property({attribute:"with-border-bottom",type:Boolean})],bt.prototype,"withBorderBottom",2),bt=_t([v.customElement("genus-tab-container")],bt);var Ra=Object.defineProperty,Ba=Object.getOwnPropertyDescriptor,Wa=(i,t,e,n)=>{for(var s=n>1?void 0:n?Ba(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Ra(t,e,s),s};let Oi=class extends b.LitElement{render(){return b.html`<slot></slot>`}};Oi=Wa([v.customElement("genus-tab-content")],Oi);const Ha=Object.freeze(Object.defineProperty({__proto__:null,get GenusTabContainer(){return bt},get GenusTabContent(){return Oi}},Symbol.toStringTag,{value:"Module"})),In=b.css`
608
+ `}};bt.styles=[Oa,Va,za,Ia,Da,Fa],_t([v.queryAssignedElements()],bt.prototype,"_tabContents",2),_t([v.state()],bt.prototype,"_numberOfTabs",2),_t([v.state()],bt.prototype,"_tabsTemplate",2),_t([v.property({attribute:"tab-names",type:Array})],bt.prototype,"tabNames",2),_t([v.property({attribute:"with-border-bottom",type:Boolean})],bt.prototype,"withBorderBottom",2),bt=_t([v.customElement("genus-tab-container")],bt);var Ba=Object.defineProperty,Wa=Object.getOwnPropertyDescriptor,Ha=(i,t,e,n)=>{for(var s=n>1?void 0:n?Wa(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Ba(t,e,s),s};let Oi=class extends b.LitElement{render(){return b.html`<slot></slot>`}};Oi=Ha([v.customElement("genus-tab-content")],Oi);const Na=Object.freeze(Object.defineProperty({__proto__:null,get GenusTabContainer(){return bt},get GenusTabContent(){return Oi}},Symbol.toStringTag,{value:"Module"})),Dn=b.css`
609
609
  ::slotted(.hide-content)
610
610
  {
611
611
  visibility: hidden;
@@ -641,7 +641,7 @@
641
641
  .step-info { grid-area: si }
642
642
 
643
643
  .step-content { grid-area: sc }
644
- `,Dn=b.css`
644
+ `,Fn=b.css`
645
645
  .step-container
646
646
  {
647
647
  display: grid;
@@ -659,13 +659,13 @@
659
659
  grid-template-columns: auto;
660
660
  grid-template-rows: 1fr;
661
661
  }
662
- `,Na=b.css`
662
+ `,Ga=b.css`
663
663
  .progress-bars
664
664
  {
665
665
  display: flex;
666
666
  column-gap: 0.9rem;
667
667
  }
668
- `,Fn=b.css`
668
+ `,En=b.css`
669
669
  .step-title, .step-description, .step-number
670
670
  {
671
671
  margin: 0;
@@ -694,13 +694,13 @@
694
694
  color: var(--step-number-color);
695
695
  margin-bottom: var(--step-number-margin-buttom, 1rem);
696
696
  }
697
- `;var Ga=Object.defineProperty,ja=Object.getOwnPropertyDescriptor,$t=(i,t,e,n)=>{for(var s=n>1?void 0:n?ja(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Ga(t,e,s),s};let xt=class extends b.LitElement{constructor(){super(...arguments),this.currentStep=0,this.direction="",this._progressBarsTemplate=[],this._steps=0,this._hideCurrentContent=()=>{this._stepContents.forEach(i=>{i.classList.contains("show-content")&&i.classList.remove("show-content")})},this._changeStep=()=>{this._hideCurrentContent(),this._stepContents[this.currentStep].classList.add("show-content")},this._generateProgressBars=()=>{for(let i=0;i<this._steps;i++)this._progressBarsTemplate.push(b.html`<div class='progress-bar'></div>`);this._progressBarsTemplate[this.currentStep]=b.html`<div class='progress-bar current'></div>`}}firstUpdated(){this._stepContents.forEach(i=>{i.classList.add("hide-content")}),this._stepContents[this.currentStep].classList.add("show-content"),this._steps=this._stepContents.length,this._generateProgressBars()}updated(){this._changeStep()}render(){return this.direction==="next"&&(this._progressBarsTemplate[this.currentStep]=b.html`<div class='progress-bar current'></div>`),this.direction==="prev"&&(this._progressBarsTemplate[this.currentStep+1]=b.html`<div class='progress-bar'></div>`),b.html`
697
+ `;var ja=Object.defineProperty,Ya=Object.getOwnPropertyDescriptor,$t=(i,t,e,n)=>{for(var s=n>1?void 0:n?Ya(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&ja(t,e,s),s};let xt=class extends b.LitElement{constructor(){super(...arguments),this.currentStep=0,this.direction="",this._progressBarsTemplate=[],this._steps=0,this._hideCurrentContent=()=>{this._stepContents.forEach(i=>{i.classList.contains("show-content")&&i.classList.remove("show-content")})},this._changeStep=()=>{this._hideCurrentContent(),this._stepContents[this.currentStep].classList.add("show-content")},this._generateProgressBars=()=>{for(let i=0;i<this._steps;i++)this._progressBarsTemplate.push(b.html`<div class='progress-bar'></div>`);this._progressBarsTemplate[this.currentStep]=b.html`<div class='progress-bar current'></div>`}}firstUpdated(){this._stepContents.forEach(i=>{i.classList.add("hide-content")}),this._stepContents[this.currentStep].classList.add("show-content"),this._steps=this._stepContents.length,this._generateProgressBars()}updated(){this._changeStep()}render(){return this.direction==="next"&&(this._progressBarsTemplate[this.currentStep]=b.html`<div class='progress-bar current'></div>`),this.direction==="prev"&&(this._progressBarsTemplate[this.currentStep+1]=b.html`<div class='progress-bar'></div>`),b.html`
698
698
  <h5 class='step-number'>Step ${this.currentStep+1}</h5>
699
699
  <div class='progress-bars'>${this._progressBarsTemplate}</div>
700
700
  <div class='step-contents'>
701
701
  <slot></slot>
702
702
  </div>
703
- `}};xt.styles=[In,Dn,Na,Fn],$t([v.queryAssignedElements()],xt.prototype,"_stepContents",2),$t([v.property({attribute:"current-step",type:Number})],xt.prototype,"currentStep",2),$t([v.property()],xt.prototype,"direction",2),$t([v.state()],xt.prototype,"_progressBarsTemplate",2),$t([v.state()],xt.prototype,"_steps",2),xt=$t([v.customElement("genus-step-wizard")],xt);var Ya=Object.defineProperty,Ua=Object.getOwnPropertyDescriptor,zi=(i,t,e,n)=>{for(var s=n>1?void 0:n?Ua(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Ya(t,e,s),s};let te=class extends b.LitElement{constructor(){super(...arguments),this.stepTitle="",this.stepDescription=""}render(){return b.html`
703
+ `}};xt.styles=[Dn,Fn,Ga,En],$t([v.queryAssignedElements()],xt.prototype,"_stepContents",2),$t([v.property({attribute:"current-step",type:Number})],xt.prototype,"currentStep",2),$t([v.property()],xt.prototype,"direction",2),$t([v.state()],xt.prototype,"_progressBarsTemplate",2),$t([v.state()],xt.prototype,"_steps",2),xt=$t([v.customElement("genus-step-wizard")],xt);var Ua=Object.defineProperty,Za=Object.getOwnPropertyDescriptor,zi=(i,t,e,n)=>{for(var s=n>1?void 0:n?Za(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Ua(t,e,s),s};let te=class extends b.LitElement{constructor(){super(...arguments),this.stepTitle="",this.stepDescription=""}render(){return b.html`
704
704
  <div class='step-container'>
705
705
  <div class='step-info'>
706
706
  <h4 class='step-title'>${this.stepTitle}</h4>
@@ -710,7 +710,7 @@
710
710
  <slot></slot>
711
711
  </div>
712
712
  </div>
713
- `}};te.styles=[Fn,In,Dn],zi([v.property({attribute:"step-title"})],te.prototype,"stepTitle",2),zi([v.property({attribute:"step-description"})],te.prototype,"stepDescription",2),te=zi([v.customElement("genus-step-content")],te);const Za=Object.freeze(Object.defineProperty({__proto__:null,get GenusStepContent(){return te},get GenusStepWizard(){return xt}},Symbol.toStringTag,{value:"Module"})),Ka=b.css`
713
+ `}};te.styles=[En,Dn,Fn],zi([v.property({attribute:"step-title"})],te.prototype,"stepTitle",2),zi([v.property({attribute:"step-description"})],te.prototype,"stepDescription",2),te=zi([v.customElement("genus-step-content")],te);const Ka=Object.freeze(Object.defineProperty({__proto__:null,get GenusStepContent(){return te},get GenusStepWizard(){return xt}},Symbol.toStringTag,{value:"Module"})),Xa=b.css`
714
714
  input[type=radio] { display: none; }
715
715
 
716
716
  .genus-radiobtn:checked + .genus-radiobtn-label { background: var(--checked-radio-button-background-color, #213e70); }
@@ -722,7 +722,7 @@
722
722
  .genus-radiobtn:checked + .genus-radiobtn-label .checked-icon { display: block; }
723
723
 
724
724
  .genus-radiobtn:checked + .genus-radiobtn-label .unchecked-icon { display: none; }
725
- `,Xa=b.css`
725
+ `,qa=b.css`
726
726
  .label-text
727
727
  {
728
728
  color: var(--radio-button-font-color, #213e70);
@@ -751,7 +751,7 @@
751
751
  justify-self: start;
752
752
  grid-area: il;
753
753
  }
754
- `,qa=b.css`
754
+ `,Ja=b.css`
755
755
  img
756
756
  {
757
757
  max-width: 100%;
@@ -773,7 +773,7 @@
773
773
  .radiobtn-icon { order: 1; }
774
774
 
775
775
  .unchecked-icon { display: block; }
776
- `,Ja=b.css`
776
+ `,Qa=b.css`
777
777
  .label-text
778
778
  {
779
779
  font-family: var(--label-text-font-family, 'Sofia Pro');
@@ -786,7 +786,7 @@
786
786
  font-size: var(--input-label-font-size, 1rem);
787
787
  color: var(--input-label-font-color, #213e70);
788
788
  }
789
- `,Qa=b.css`
789
+ `,_a=b.css`
790
790
  .form-field
791
791
  {
792
792
  display: grid;
@@ -797,7 +797,7 @@
797
797
  'il il il il . .'
798
798
  'rg rg rg rg rg rg';
799
799
  }
800
- `,_a=b.css`
800
+ `,$a=b.css`
801
801
  .radiobtn-group
802
802
  {
803
803
  display: flex;
@@ -821,7 +821,7 @@
821
821
  -moz-column-gap: unset;
822
822
  column-gap: unset;
823
823
  }
824
- `,En="data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='7.5'%20cy='7.5'%20r='7'%20fill='%23FDFDFD'%20stroke='%23B9BDBA'/%3e%3c/svg%3e",Rn="data:image/svg+xml,%3csvg%20width='15'%20height='15'%20class='radio-icon-svg%20checked-svg'%20viewBox='0%200%2015%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e%20.radio-icon-svg%20circle%20{%20fill:%20%23fdc54a;%20}%20.checked-svg%20path%20{%20stroke:%20%233c499e;%20}%20%3c/style%3e%3ccircle%20cx='7.5'%20cy='7.5'%20r='7.5'/%3e%3cpath%20d='M5%208.005L6.892%209.898L10.79%206'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";var $a=Object.defineProperty,tr=Object.getOwnPropertyDescriptor,Ct=(i,t,e,n)=>{for(var s=n>1?void 0:n?tr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&$a(t,e,s),s};w.GenusRadioBtnGroup=class extends b.LitElement{constructor(){super(),this.groupName="",this.labelText="",this.inputName="",this.selectedOption="",this.options=[],this.withoutLabel=!1,this.withoutIcon=!1,this._internals=this.attachInternals()}render(){let t=[],e=this.options;for(let n of e)n.inputValue===this.selectedOption?this.withoutIcon?t.push(b.html`
824
+ `,Rn="data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='7.5'%20cy='7.5'%20r='7'%20fill='%23FDFDFD'%20stroke='%23B9BDBA'/%3e%3c/svg%3e",Bn="data:image/svg+xml,%3csvg%20width='15'%20height='15'%20class='radio-icon-svg%20checked-svg'%20viewBox='0%200%2015%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e%20.radio-icon-svg%20circle%20{%20fill:%20%23fdc54a;%20}%20.checked-svg%20path%20{%20stroke:%20%233c499e;%20}%20%3c/style%3e%3ccircle%20cx='7.5'%20cy='7.5'%20r='7.5'/%3e%3cpath%20d='M5%208.005L6.892%209.898L10.79%206'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";var tr=Object.defineProperty,er=Object.getOwnPropertyDescriptor,Ct=(i,t,e,n)=>{for(var s=n>1?void 0:n?er(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&tr(t,e,s),s};w.GenusRadioBtnGroup=class extends b.LitElement{constructor(){super(),this.groupName="",this.labelText="",this.inputName="",this.selectedOption="",this.options=[],this.withoutLabel=!1,this.withoutIcon=!1,this._internals=this.attachInternals()}render(){let t=[],e=this.options;for(let n of e)n.inputValue===this.selectedOption?this.withoutIcon?t.push(b.html`
825
825
  <input type='radio' id=${n.inputValue} class='genus-radiobtn' @change=${()=>{this.dispatchEvent(new CustomEvent("checked",{detail:n.inputValue})),this._internals.setFormValue(n.inputValue)}} value=${n.inputValue} name=${this.groupName} checked />
826
826
  <label class='label genus-radiobtn-label genus-radiobtn-label--with-icon' for=${n.inputValue}>
827
827
  <span class="label-text">${n.labelText}</span>
@@ -830,8 +830,8 @@
830
830
  <input type='radio' id=${n.inputValue} class='genus-radiobtn' @change=${()=>{this.dispatchEvent(new CustomEvent("checked",{detail:n.inputValue})),this._internals.setFormValue(n.inputValue)}} value=${n.inputValue} name=${this.groupName} checked />
831
831
  <label class='label genus-radiobtn-label' for=${n.inputValue}>
832
832
  <span class="label-text">${n.labelText}</span>
833
- <img class="component-icon radiobtn-icon unchecked-icon" src='${En}' />
834
- <img class="component-icon radiobtn-icon checked-icon" src='${Rn}' />
833
+ <img class="component-icon radiobtn-icon unchecked-icon" src='${Rn}' />
834
+ <img class="component-icon radiobtn-icon checked-icon" src='${Bn}' />
835
835
  </label>
836
836
  `):this.withoutIcon?t.push(b.html`
837
837
  <input type='radio' id=${n.inputValue} class='genus-radiobtn' @change=${()=>{this.dispatchEvent(new CustomEvent("checked",{detail:n.inputValue})),this._internals.setFormValue(n.inputValue)}} value=${n.inputValue} name=${this.groupName} />
@@ -842,8 +842,8 @@
842
842
  <input type='radio' id=${n.inputValue} class='genus-radiobtn' @change=${()=>{this.dispatchEvent(new CustomEvent("checked",{detail:n.inputValue})),this._internals.setFormValue(n.inputValue)}} value=${n.inputValue} name=${this.groupName} />
843
843
  <label class='label genus-radiobtn-label' for=${n.inputValue}>
844
844
  <span class="label-text">${n.labelText}</span>
845
- <img class="component-icon radiobtn-icon unchecked-icon" src='${En}' />
846
- <img class="component-icon radiobtn-icon checked-icon" src='${Rn}' />
845
+ <img class="component-icon radiobtn-icon unchecked-icon" src='${Rn}' />
846
+ <img class="component-icon radiobtn-icon checked-icon" src='${Bn}' />
847
847
  </label>
848
848
  `);return this.withoutLabel?b.html`
849
849
  <div class="radiobtn-group">
@@ -856,7 +856,7 @@
856
856
  ${t}
857
857
  </div>
858
858
  </div>
859
- `}},w.GenusRadioBtnGroup.styles=[Ja,qa,Qa,Xa,_a,Ka],w.GenusRadioBtnGroup.formAssociated=!0,Ct([v.property({attribute:"group-name"})],w.GenusRadioBtnGroup.prototype,"groupName",2),Ct([v.property({attribute:"label-text"})],w.GenusRadioBtnGroup.prototype,"labelText",2),Ct([v.property({attribute:"name",reflect:!0})],w.GenusRadioBtnGroup.prototype,"inputName",2),Ct([v.property({attribute:"selected-option"})],w.GenusRadioBtnGroup.prototype,"selectedOption",2),Ct([v.property({attribute:"group-options",type:Array})],w.GenusRadioBtnGroup.prototype,"options",2),Ct([v.property({attribute:"without-label",type:Boolean})],w.GenusRadioBtnGroup.prototype,"withoutLabel",2),Ct([v.property({attribute:"without-icon",type:Boolean})],w.GenusRadioBtnGroup.prototype,"withoutIcon",2),w.GenusRadioBtnGroup=Ct([v.customElement("genus-radiobtn-group")],w.GenusRadioBtnGroup);const er=b.css`
859
+ `}},w.GenusRadioBtnGroup.styles=[Qa,Ja,_a,qa,$a,Xa],w.GenusRadioBtnGroup.formAssociated=!0,Ct([v.property({attribute:"group-name"})],w.GenusRadioBtnGroup.prototype,"groupName",2),Ct([v.property({attribute:"label-text"})],w.GenusRadioBtnGroup.prototype,"labelText",2),Ct([v.property({attribute:"name",reflect:!0})],w.GenusRadioBtnGroup.prototype,"inputName",2),Ct([v.property({attribute:"selected-option"})],w.GenusRadioBtnGroup.prototype,"selectedOption",2),Ct([v.property({attribute:"group-options",type:Array})],w.GenusRadioBtnGroup.prototype,"options",2),Ct([v.property({attribute:"without-label",type:Boolean})],w.GenusRadioBtnGroup.prototype,"withoutLabel",2),Ct([v.property({attribute:"without-icon",type:Boolean})],w.GenusRadioBtnGroup.prototype,"withoutIcon",2),w.GenusRadioBtnGroup=Ct([v.customElement("genus-radiobtn-group")],w.GenusRadioBtnGroup);const ir=b.css`
860
860
  *
861
861
  {
862
862
  margin: 0;
@@ -880,7 +880,7 @@
880
880
  border-radius: 0.625rem;
881
881
  grid-area: ic;
882
882
  }
883
- `,ir=b.css`
883
+ `,nr=b.css`
884
884
  .data-card { display: grid; }
885
885
 
886
886
  .data-card--row
@@ -925,14 +925,14 @@
925
925
  '.'
926
926
  'dctxt';
927
927
  }
928
- `,nr=b.css`
928
+ `,sr=b.css`
929
929
  .icon-container
930
930
  {
931
931
  display: flex;
932
932
  justify-content: center;
933
933
  align-items: center;
934
934
  }
935
- `,sr=b.css`
935
+ `,or=b.css`
936
936
  .data-card__title
937
937
  {
938
938
  font-family: var(--card-title-font-family, 'Sofia Pro Semi');
@@ -963,7 +963,7 @@
963
963
  font-size: var(--card-text-font-size, 1.25rem);
964
964
  color: var(--card-text-color, #213e70)
965
965
  }
966
- `,or=b.css`
966
+ `,ar=b.css`
967
967
  img
968
968
  {
969
969
  max-width: 100%;
@@ -980,7 +980,7 @@
980
980
  width: var(--icon-width, 1.5625rem);
981
981
  height: var(--icon-height, 1.5625rem);
982
982
  }
983
- `;var ar=Object.defineProperty,rr=Object.getOwnPropertyDescriptor,ee=(i,t,e,n)=>{for(var s=n>1?void 0:n?rr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&ar(t,e,s),s};w.GenusDataCard=class extends b.LitElement{constructor(){super(...arguments),this.dataCardTitle="",this.dataCardValue="",this.datCardIconSrc="",this.datCardLayoutDirection="row",this.withoutIcon=!1}render(){return this.withoutIcon?b.html`
983
+ `;var rr=Object.defineProperty,lr=Object.getOwnPropertyDescriptor,ee=(i,t,e,n)=>{for(var s=n>1?void 0:n?lr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&rr(t,e,s),s};w.GenusDataCard=class extends b.LitElement{constructor(){super(...arguments),this.dataCardTitle="",this.dataCardValue="",this.datCardIconSrc="",this.datCardLayoutDirection="row",this.withoutIcon=!1}render(){return this.withoutIcon?b.html`
984
984
  <div class='data-card data-card--${this.datCardLayoutDirection} data-card--no-icon'>
985
985
  <h4 class='data-card__title'>${this.dataCardTitle}</h4>
986
986
  <p class='data-card__text'>${this.dataCardValue}</p>
@@ -993,13 +993,13 @@
993
993
  <h4 class='data-card__title'>${this.dataCardTitle}</h4>
994
994
  <p class='data-card__text'>${this.dataCardValue}</p>
995
995
  </div>
996
- `}},w.GenusDataCard.styles=[er,sr,ir,nr,or],ee([v.property({attribute:"card-title"})],w.GenusDataCard.prototype,"dataCardTitle",2),ee([v.property({attribute:"card-value"})],w.GenusDataCard.prototype,"dataCardValue",2),ee([v.property({attribute:"svg-icon-src"})],w.GenusDataCard.prototype,"datCardIconSrc",2),ee([v.property({attribute:"layout-direction"})],w.GenusDataCard.prototype,"datCardLayoutDirection",2),ee([v.property({type:Boolean,attribute:"without-icon"})],w.GenusDataCard.prototype,"withoutIcon",2),w.GenusDataCard=ee([v.customElement("genus-data-card")],w.GenusDataCard);const Bn=b.css`
996
+ `}},w.GenusDataCard.styles=[ir,or,nr,sr,ar],ee([v.property({attribute:"card-title"})],w.GenusDataCard.prototype,"dataCardTitle",2),ee([v.property({attribute:"card-value"})],w.GenusDataCard.prototype,"dataCardValue",2),ee([v.property({attribute:"svg-icon-src"})],w.GenusDataCard.prototype,"datCardIconSrc",2),ee([v.property({attribute:"layout-direction"})],w.GenusDataCard.prototype,"datCardLayoutDirection",2),ee([v.property({type:Boolean,attribute:"without-icon"})],w.GenusDataCard.prototype,"withoutIcon",2),w.GenusDataCard=ee([v.customElement("genus-data-card")],w.GenusDataCard);const Wn=b.css`
997
997
  .label-text, .options-label
998
998
  {
999
999
  font-family: var(--font-family, 'Sofia Pro');
1000
1000
  font-size: var(--font-size, 1rem);
1001
1001
  }
1002
- `,lr=b.css`
1002
+ `,cr=b.css`
1003
1003
  input[type=checkbox] { display: none; }
1004
1004
 
1005
1005
  .genus-checkbox:checked + .genus-checkbox-label { background: var(--checked-checkbox-background-color, #213e70); }
@@ -1009,7 +1009,7 @@
1009
1009
  .genus-checkbox:checked + .genus-checkbox-label .checked-icon { display: block; }
1010
1010
 
1011
1011
  .genus-checkbox:checked + .genus-checkbox-label .unchecked-icon { display: none; }
1012
- `,Wn=b.css`
1012
+ `,Hn=b.css`
1013
1013
  .label-text
1014
1014
  {
1015
1015
  color: var(--label-font-color, #213e70);
@@ -1033,12 +1033,12 @@
1033
1033
  .genus-checkbox-label:hover { cursor: pointer; }
1034
1034
 
1035
1035
  .options-label { grid-area: ol; }
1036
- `;var cr=Object.defineProperty,hr=Object.getOwnPropertyDescriptor,Vi=(i,t,e,n)=>{for(var s=n>1?void 0:n?hr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&cr(t,e,s),s};let ie=class extends b.LitElement{constructor(){super(...arguments),this.optionValue="",this.optionID=""}render(){return b.html`
1036
+ `;var hr=Object.defineProperty,dr=Object.getOwnPropertyDescriptor,Vi=(i,t,e,n)=>{for(var s=n>1?void 0:n?dr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&hr(t,e,s),s};let ie=class extends b.LitElement{constructor(){super(...arguments),this.optionValue="",this.optionID=""}render(){return b.html`
1037
1037
  <input type='checkbox' id='genus-checkbox-${Number(this.optionID)}' class='genus-checkbox' @change=${()=>{this.dispatchEvent(new CustomEvent("checked",{detail:this.optionValue}))}} value=${this.optionValue} />
1038
1038
  <label class='label genus-checkbox-label' for='genus-checkbox-${Number(this.optionID)}'>
1039
1039
  <span class="label-text"><slot></slot></span>
1040
1040
  </label>
1041
- `}};ie.styles=[Bn,lr,Wn],Vi([v.property({attribute:"option-value"})],ie.prototype,"optionValue",2),Vi([v.property({attribute:"option-id"})],ie.prototype,"optionID",2),ie=Vi([v.customElement("genus-checkbox-option")],ie);const dr=b.css`
1041
+ `}};ie.styles=[Wn,cr,Hn],Vi([v.property({attribute:"option-value"})],ie.prototype,"optionValue",2),Vi([v.property({attribute:"option-id"})],ie.prototype,"optionID",2),ie=Vi([v.customElement("genus-checkbox-option")],ie);const ur=b.css`
1042
1042
  .options-container
1043
1043
  {
1044
1044
  padding: var(--options-container-padding, 1.25rem);
@@ -1046,7 +1046,7 @@
1046
1046
  border-radius: var(--options-container-border-radius, 0.375rem);
1047
1047
  grid-area: oc;
1048
1048
  }
1049
- `,ur=b.css`
1049
+ `,fr=b.css`
1050
1050
  .form-field
1051
1051
  {
1052
1052
  display: grid;
@@ -1057,21 +1057,21 @@
1057
1057
  'ol ol ol ol . .'
1058
1058
  'oc oc oc oc oc oc';
1059
1059
  }
1060
- `,fr=b.css`
1060
+ `,pr=b.css`
1061
1061
  .options-container
1062
1062
  {
1063
1063
  display: flex;
1064
1064
  flex-wrap: wrap;
1065
1065
  gap: 1rem;
1066
1066
  }
1067
- `;var pr=Object.defineProperty,gr=Object.getOwnPropertyDescriptor,Hn=(i,t,e,n)=>{for(var s=n>1?void 0:n?gr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&pr(t,e,s),s};let ue=class extends b.LitElement{constructor(){super(...arguments),this.labelText=""}render(){return b.html`
1067
+ `;var gr=Object.defineProperty,mr=Object.getOwnPropertyDescriptor,Nn=(i,t,e,n)=>{for(var s=n>1?void 0:n?mr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&gr(t,e,s),s};let ue=class extends b.LitElement{constructor(){super(...arguments),this.labelText=""}render(){return b.html`
1068
1068
  <div class='form-field'>
1069
1069
  <label class='label options-label group-label'>${this.labelText}</label>
1070
1070
  <div class="options-container">
1071
1071
  <slot></slot>
1072
1072
  </div>
1073
1073
  </div>
1074
- `}};ue.styles=[Wn,Bn,dr,ur,fr],Hn([v.property({attribute:"group-label-text"})],ue.prototype,"labelText",2),ue=Hn([v.customElement("genus-checkbox-group")],ue);const mr=Object.freeze(Object.defineProperty({__proto__:null,get GenusCheckBoxGroup(){return ue},get GenusCheckBoxOption(){return ie}},Symbol.toStringTag,{value:"Module"})),br=b.css`
1074
+ `}};ue.styles=[Hn,Wn,ur,fr,pr],Nn([v.property({attribute:"group-label-text"})],ue.prototype,"labelText",2),ue=Nn([v.customElement("genus-checkbox-group")],ue);const br=Object.freeze(Object.defineProperty({__proto__:null,get GenusCheckBoxGroup(){return ue},get GenusCheckBoxOption(){return ie}},Symbol.toStringTag,{value:"Module"})),xr=b.css`
1075
1075
  .label-text
1076
1076
  {
1077
1077
  color: var(--label-font-color, #213e70);
@@ -1091,7 +1091,7 @@
1091
1091
  }
1092
1092
 
1093
1093
  .genus-checkbox-label:hover { cursor: pointer; }
1094
- `,xr=b.css`
1094
+ `,yr=b.css`
1095
1095
  input[type=checkbox] { display: none; }
1096
1096
 
1097
1097
  .genus-checkbox:checked + .genus-checkbox-label { background: var(--checked-checkbox-background-color, #213e70); }
@@ -1101,7 +1101,7 @@
1101
1101
  .genus-checkbox:checked + .genus-checkbox-label .checked-icon { display: block; }
1102
1102
 
1103
1103
  .genus-checkbox:checked + .genus-checkbox-label .unchecked-icon { display: none; }
1104
- `,yr=b.css`
1104
+ `,vr=b.css`
1105
1105
  icon
1106
1106
  {
1107
1107
  width: 1.5625rem;
@@ -1113,13 +1113,13 @@
1113
1113
  .epr-icon { display: none; }
1114
1114
 
1115
1115
  .unchecked-icon { display: block; }
1116
- `,vr=b.css`
1116
+ `,wr=b.css`
1117
1117
  .label-text
1118
1118
  {
1119
1119
  font-family: var(--font-family, sans-serif);
1120
1120
  font-size: var(--font-size, 1rem);
1121
1121
  }
1122
- `,wr=b.css`
1122
+ `,kr=b.css`
1123
1123
  .epr-checkbox-label--with-icon
1124
1124
  {
1125
1125
  display: flex;
@@ -1127,7 +1127,7 @@
1127
1127
  -moz-column-gap: 0.6rem;
1128
1128
  column-gap: 0.6rem;
1129
1129
  }
1130
- `,kr="data:image/svg+xml,%3c!--%20%3c?xml-stylesheet%20type='text/css'%20href='../css/style.css'%20?%3e%20--%3e%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20class='checkbox-icon-svg%20unchecked-svg'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.5'%20y='0.5'%20width='15'%20height='15'%20rx='3.5'%20fill='white'%20stroke='%23B9BDBA'/%3e%3c/svg%3e",Ar="data:image/svg+xml,%3c!--%20%3c?xml-stylesheet%20type='text/css'%20href='../css/style.css'%20?%3e%20--%3e%3csvg%20width='24'%20height='24'%20class='checkbox-icon-svg%20checked-svg'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e%20.checkbox-icon-svg%20path%20{%20fill:%20%2329406a;%20}%20.checked-svg%20path%20{%20fill:%20%23fdc54a;%20}%20%3c/style%3e%3cpath%20d='M16.19%202H7.81C4.17%202%202%204.17%202%207.81V16.18C2%2019.83%204.17%2022%207.81%2022H16.18C19.82%2022%2021.99%2019.83%2021.99%2016.19V7.81C22%204.17%2019.83%202%2016.19%202ZM16.78%209.7L11.11%2015.37C10.97%2015.51%2010.78%2015.59%2010.58%2015.59C10.38%2015.59%2010.19%2015.51%2010.05%2015.37L7.22%2012.54C6.93%2012.25%206.93%2011.77%207.22%2011.48C7.51%2011.19%207.99%2011.19%208.28%2011.48L10.58%2013.78L15.72%208.64C16.01%208.35%2016.49%208.35%2016.78%208.64C17.07%208.93%2017.07%209.4%2016.78%209.7Z'%20fill='%23292D32'/%3e%3c/svg%3e";var Mr=Object.defineProperty,Pr=Object.getOwnPropertyDescriptor,Ue=(i,t,e,n)=>{for(var s=n>1?void 0:n?Pr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Mr(t,e,s),s};w.GenusCheckBox=class extends b.LitElement{constructor(){super(...arguments),this.labelText="",this.inputValue="",this.withoutIcon=!1,this.getInputValue=()=>{this.dispatchEvent(new CustomEvent("checked",{detail:this.inputValue}))}}render(){return this.withoutIcon?b.html`
1130
+ `,Ar="data:image/svg+xml,%3c!--%20%3c?xml-stylesheet%20type='text/css'%20href='../css/style.css'%20?%3e%20--%3e%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20class='checkbox-icon-svg%20unchecked-svg'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.5'%20y='0.5'%20width='15'%20height='15'%20rx='3.5'%20fill='white'%20stroke='%23B9BDBA'/%3e%3c/svg%3e",Mr="data:image/svg+xml,%3c!--%20%3c?xml-stylesheet%20type='text/css'%20href='../css/style.css'%20?%3e%20--%3e%3csvg%20width='24'%20height='24'%20class='checkbox-icon-svg%20checked-svg'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e%20.checkbox-icon-svg%20path%20{%20fill:%20%2329406a;%20}%20.checked-svg%20path%20{%20fill:%20%23fdc54a;%20}%20%3c/style%3e%3cpath%20d='M16.19%202H7.81C4.17%202%202%204.17%202%207.81V16.18C2%2019.83%204.17%2022%207.81%2022H16.18C19.82%2022%2021.99%2019.83%2021.99%2016.19V7.81C22%204.17%2019.83%202%2016.19%202ZM16.78%209.7L11.11%2015.37C10.97%2015.51%2010.78%2015.59%2010.58%2015.59C10.38%2015.59%2010.19%2015.51%2010.05%2015.37L7.22%2012.54C6.93%2012.25%206.93%2011.77%207.22%2011.48C7.51%2011.19%207.99%2011.19%208.28%2011.48L10.58%2013.78L15.72%208.64C16.01%208.35%2016.49%208.35%2016.78%208.64C17.07%208.93%2017.07%209.4%2016.78%209.7Z'%20fill='%23292D32'/%3e%3c/svg%3e";var Pr=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,Ue=(i,t,e,n)=>{for(var s=n>1?void 0:n?Tr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Pr(t,e,s),s};w.GenusCheckBox=class extends b.LitElement{constructor(){super(...arguments),this.labelText="",this.inputValue="",this.withoutIcon=!1,this.getInputValue=()=>{this.dispatchEvent(new CustomEvent("checked",{detail:this.inputValue}))}}render(){return this.withoutIcon?b.html`
1131
1131
  <input type='checkbox' id='genus-checkbox' class='genus-checkbox' @change=${this.getInputValue} value=${this.inputValue} />
1132
1132
  <label class='label genus-checkbox-label' for='genus-checkbox'>
1133
1133
  <span class="label-text">${this.labelText}</span>
@@ -1136,10 +1136,10 @@
1136
1136
  <input type='checkbox' id='genus-checkbox' class='genus-checkbox' @change=${this.getInputValue} value=${this.inputValue} />
1137
1137
  <label class='label genus-checkbox-label genus-checkbox-label--with-icon' for='genus-checkbox'>
1138
1138
  <span class="label-text">${this.labelText}</span>
1139
- <object class="genus-icon checkbox-icon unchecked-icon" data='${kr}' width='18' height='18'></object>
1140
- <object class="genus-icon checkbox-icon checked-icon" data='${Ar}' width='18' height='18'></object>
1139
+ <object class="genus-icon checkbox-icon unchecked-icon" data='${Ar}' width='18' height='18'></object>
1140
+ <object class="genus-icon checkbox-icon checked-icon" data='${Mr}' width='18' height='18'></object>
1141
1141
  </label>
1142
- `}},w.GenusCheckBox.styles=[wr,br,xr,yr,vr],Ue([v.property({attribute:"label-text"})],w.GenusCheckBox.prototype,"labelText",2),Ue([v.property({attribute:"input-value"})],w.GenusCheckBox.prototype,"inputValue",2),Ue([v.property({type:Boolean,attribute:"without-icon"})],w.GenusCheckBox.prototype,"withoutIcon",2),w.GenusCheckBox=Ue([v.customElement("genus-checkbox")],w.GenusCheckBox);const Tr=b.css`
1142
+ `}},w.GenusCheckBox.styles=[kr,xr,yr,vr,wr],Ue([v.property({attribute:"label-text"})],w.GenusCheckBox.prototype,"labelText",2),Ue([v.property({attribute:"input-value"})],w.GenusCheckBox.prototype,"inputValue",2),Ue([v.property({type:Boolean,attribute:"without-icon"})],w.GenusCheckBox.prototype,"withoutIcon",2),w.GenusCheckBox=Ue([v.customElement("genus-checkbox")],w.GenusCheckBox);const Sr=b.css`
1143
1143
  input[type='text']
1144
1144
  {
1145
1145
  border: var(--input-border, none);
@@ -1159,13 +1159,13 @@
1159
1159
  .input-control--without-icon { border-radius: 0.375rem; }
1160
1160
 
1161
1161
  .select-control:hover { cursor: pointer; }
1162
- `,Sr=b.css`
1162
+ `,Cr=b.css`
1163
1163
  .input-label
1164
1164
  {
1165
1165
  justify-self: start;
1166
1166
  grid-area: il;
1167
1167
  }
1168
- `,Cr=b.css`
1168
+ `,Lr=b.css`
1169
1169
  img
1170
1170
  {
1171
1171
  max-width: 100%;
@@ -1182,7 +1182,7 @@
1182
1182
  width: var(--icon-width, 1.25rem);
1183
1183
  height: var(--icon-height, 1.25rem);
1184
1184
  }
1185
- `,Nn=b.css`
1185
+ `,Gn=b.css`
1186
1186
  input[type='text']
1187
1187
  {
1188
1188
  font-family: var(--input-font-family, 'Sofia Pro');
@@ -1210,7 +1210,7 @@
1210
1210
  font-size: var(--option-item-font-size, 1rem);
1211
1211
  color: var(--option-item-color, #2d2d2d);
1212
1212
  }
1213
- `,Lr=b.css`
1213
+ `,Or=b.css`
1214
1214
  * { box-sizing: border-box; }
1215
1215
 
1216
1216
  .icon-container
@@ -1224,7 +1224,7 @@
1224
1224
  }
1225
1225
 
1226
1226
  .drop-down { position: relative; }
1227
- `,Gn=b.css`
1227
+ `,jn=b.css`
1228
1228
  .options
1229
1229
  {
1230
1230
  list-style: none;
@@ -1292,7 +1292,7 @@
1292
1292
  opacity: 1;
1293
1293
  z-index: 1;
1294
1294
  }
1295
- `,Or=b.css`
1295
+ `,zr=b.css`
1296
1296
  .form-field
1297
1297
  {
1298
1298
  display: grid;
@@ -1310,19 +1310,19 @@
1310
1310
  grid-row-gap: 0;
1311
1311
  grid-template-areas: 'ic ic ic ic ic icc';
1312
1312
  }
1313
- `,zr=b.css`
1313
+ `,Vr=b.css`
1314
1314
  .icon-container
1315
1315
  {
1316
1316
  display: flex;
1317
1317
  place-items: center;
1318
1318
  justify-content: center;
1319
1319
  }
1320
- `,jn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIconly/Light/Arrow%20-%20Down%202%3c/title%3e%3cg%20id='Iconly/Light/Arrow---Down-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cg%20id='Arrow---Down-2'%20transform='translate(5.000000,%208.500000)'%20stroke='%23203e70'%20stroke-width='1.25'%3e%3cpolyline%20id='Stroke-1'%20points='14%200%207%207%200%200'%3e%3c/polyline%3e%3c/g%3e%3c/g%3e%3c/svg%3e";var Vr=Object.defineProperty,Ir=Object.getOwnPropertyDescriptor,yt=(i,t,e,n)=>{for(var s=n>1?void 0:n?Ir(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Vr(t,e,s),s};let ot=class extends b.LitElement{constructor(){super(),this.labelText="",this.inputValue="",this.inputName="",this.placeholderText="",this.withoutLabel=!1,this.displayPosition="bottom",this.options="",this.selectOption=i=>{let t=i.target.getAttribute("option-value");this._showOptionsCSS="",this.inputValue=t,this._internals.setFormValue(t),this.dispatchEvent(new CustomEvent("selected",{detail:t}))},this.renderDropDownControl=()=>{let i;return this.withoutLabel?i=b.html`
1320
+ `,Yn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIconly/Light/Arrow%20-%20Down%202%3c/title%3e%3cg%20id='Iconly/Light/Arrow---Down-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cg%20id='Arrow---Down-2'%20transform='translate(5.000000,%208.500000)'%20stroke='%23203e70'%20stroke-width='1.25'%3e%3cpolyline%20id='Stroke-1'%20points='14%200%207%207%200%200'%3e%3c/polyline%3e%3c/g%3e%3c/g%3e%3c/svg%3e";var Ir=Object.defineProperty,Dr=Object.getOwnPropertyDescriptor,yt=(i,t,e,n)=>{for(var s=n>1?void 0:n?Dr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Ir(t,e,s),s};let ot=class extends b.LitElement{constructor(){super(),this.labelText="",this.inputValue="",this.inputName="",this.placeholderText="",this.withoutLabel=!1,this.displayPosition="bottom",this.options="",this.selectOption=i=>{let t=i.target.getAttribute("option-value");this._showOptionsCSS="",this.inputValue=t,this._internals.setFormValue(t),this.dispatchEvent(new CustomEvent("selected",{detail:t}))},this.renderDropDownControl=()=>{let i;return this.withoutLabel?i=b.html`
1321
1321
  <div class='drop-down'>
1322
1322
  <div class='form-field form-field--without-label'>
1323
1323
  <input class='input-control select-control' type='text' @click=${this._toggleOptions} placeholder=${this.placeholderText} value=${this.inputValue} readonly />
1324
1324
  <div class='icon-container'>
1325
- <img class="component-icon" src='${jn}' />
1325
+ <img class="component-icon" src='${Yn}' />
1326
1326
  </div>
1327
1327
  </div>
1328
1328
  <ul class='options options-${this.displayPosition} ${this._showOptionsCSS}' @click=${this.selectOption}>
@@ -1334,17 +1334,17 @@
1334
1334
  <label class='input-label'>${this.labelText}</label>
1335
1335
  <input class='input-control select-control' type='text' @click=${this._toggleOptions} placeholder=${this.placeholderText} value=${this.inputValue} readonly />
1336
1336
  <div class='icon-container'>
1337
- <img class="component-icon" src='${jn}' />
1337
+ <img class="component-icon" src='${Yn}' />
1338
1338
  </div>
1339
1339
  </div>
1340
1340
  <ul class='options options-${this.displayPosition} ${this._showOptionsCSS}' @click=${this.selectOption}>
1341
1341
  <slot></slot>
1342
1342
  </ul>
1343
- </div>`,i},this._showOptionsCSS="",this._toggleOptions=()=>{this._showOptionsCSS=this._showOptionsCSS?"":`options-${this.displayPosition}--show`},this._internals=this.attachInternals()}render(){return this.renderDropDownControl()}};ot.styles=[Tr,Sr,Cr,Nn,Lr,Gn,Or,zr],ot.formAssociated=!0,yt([v.property({attribute:"label-text"})],ot.prototype,"labelText",2),yt([v.property({attribute:"input-value"})],ot.prototype,"inputValue",2),yt([v.property({attribute:"name",reflect:!0})],ot.prototype,"inputName",2),yt([v.property({attribute:"placeholder-text"})],ot.prototype,"placeholderText",2),yt([v.property({attribute:"without-label",type:Boolean})],ot.prototype,"withoutLabel",2),yt([v.property({attribute:"display-position"})],ot.prototype,"displayPosition",2),yt([v.property()],ot.prototype,"options",2),yt([v.state()],ot.prototype,"_showOptionsCSS",2),ot=yt([v.customElement("genus-dropdown")],ot);var Dr=Object.defineProperty,Fr=Object.getOwnPropertyDescriptor,Yn=(i,t,e,n)=>{for(var s=n>1?void 0:n?Fr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Dr(t,e,s),s};let fe=class extends b.LitElement{constructor(){super(...arguments),this.optionValue=""}render(){return b.html`
1343
+ </div>`,i},this._showOptionsCSS="",this._toggleOptions=()=>{this._showOptionsCSS=this._showOptionsCSS?"":`options-${this.displayPosition}--show`},this._internals=this.attachInternals()}render(){return this.renderDropDownControl()}};ot.styles=[Sr,Cr,Lr,Gn,Or,jn,zr,Vr],ot.formAssociated=!0,yt([v.property({attribute:"label-text"})],ot.prototype,"labelText",2),yt([v.property({attribute:"input-value"})],ot.prototype,"inputValue",2),yt([v.property({attribute:"name",reflect:!0})],ot.prototype,"inputName",2),yt([v.property({attribute:"placeholder-text"})],ot.prototype,"placeholderText",2),yt([v.property({attribute:"without-label",type:Boolean})],ot.prototype,"withoutLabel",2),yt([v.property({attribute:"display-position"})],ot.prototype,"displayPosition",2),yt([v.property()],ot.prototype,"options",2),yt([v.state()],ot.prototype,"_showOptionsCSS",2),ot=yt([v.customElement("genus-dropdown")],ot);var Fr=Object.defineProperty,Er=Object.getOwnPropertyDescriptor,Un=(i,t,e,n)=>{for(var s=n>1?void 0:n?Er(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Fr(t,e,s),s};let fe=class extends b.LitElement{constructor(){super(...arguments),this.optionValue=""}render(){return b.html`
1344
1344
  <li class='options__list-item' option-value=${this.optionValue}>
1345
1345
  <slot></slot>
1346
1346
  </li>
1347
- `}};fe.styles=[Nn,Gn],Yn([v.property({attribute:"option-value"})],fe.prototype,"optionValue",2),fe=Yn([v.customElement("genus-dropdown-option")],fe);const Er=Object.freeze(Object.defineProperty({__proto__:null,get GenusDropDown(){return ot},get GenusDropDownOption(){return fe}},Symbol.toStringTag,{value:"Module"})),Rr=b.css`
1347
+ `}};fe.styles=[Gn,jn],Un([v.property({attribute:"option-value"})],fe.prototype,"optionValue",2),fe=Un([v.customElement("genus-dropdown-option")],fe);const Rr=Object.freeze(Object.defineProperty({__proto__:null,get GenusDropDown(){return ot},get GenusDropDownOption(){return fe}},Symbol.toStringTag,{value:"Module"})),Br=b.css`
1348
1348
  *
1349
1349
  {
1350
1350
  margin: 0;
@@ -1369,14 +1369,14 @@
1369
1369
  border-top: none;
1370
1370
  background: #fff;
1371
1371
  }
1372
- `,Br=b.css`
1372
+ `,Wr=b.css`
1373
1373
  .chart__title
1374
1374
  {
1375
1375
  font-family: var(--chart-title-font-family, 'Sofia Pro Semi');
1376
1376
  font-size: var(--chart-title-font-size, 1.25rem);
1377
1377
  color: var(--chart-title-color, #2d2d2d);
1378
1378
  }
1379
- `,Wr=b.css`
1379
+ `,Hr=b.css`
1380
1380
  .chart__head
1381
1381
  {
1382
1382
  display: flex;
@@ -1388,19 +1388,19 @@
1388
1388
  * https://github.com/kurkle/color#readme
1389
1389
  * (c) 2023 Jukka Kurkela
1390
1390
  * Released under the MIT License
1391
- */function pe(i){return i+.5|0}const Lt=(i,t,e)=>Math.max(Math.min(i,e),t);function ge(i){return Lt(pe(i*2.55),0,255)}function Ot(i){return Lt(pe(i*255),0,255)}function vt(i){return Lt(pe(i/2.55)/100,0,1)}function Un(i){return Lt(pe(i*100),0,100)}const ct={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},Ii=[..."0123456789ABCDEF"],Hr=i=>Ii[i&15],Nr=i=>Ii[(i&240)>>4]+Ii[i&15],Ze=i=>(i&240)>>4===(i&15),Gr=i=>Ze(i.r)&&Ze(i.g)&&Ze(i.b)&&Ze(i.a);function jr(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&ct[i[1]]*17,g:255&ct[i[2]]*17,b:255&ct[i[3]]*17,a:t===5?ct[i[4]]*17:255}:(t===7||t===9)&&(e={r:ct[i[1]]<<4|ct[i[2]],g:ct[i[3]]<<4|ct[i[4]],b:ct[i[5]]<<4|ct[i[6]],a:t===9?ct[i[7]]<<4|ct[i[8]]:255})),e}const Yr=(i,t)=>i<255?t(i):"";function Ur(i){var t=Gr(i)?Hr:Nr;return i?"#"+t(i.r)+t(i.g)+t(i.b)+Yr(i.a,t):void 0}const Zr=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Zn(i,t,e){const n=t*Math.min(e,1-e),s=(o,a=(o+i/30)%12)=>e-n*Math.max(Math.min(a-3,9-a,1),-1);return[s(0),s(8),s(4)]}function Kr(i,t,e){const n=(s,o=(s+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function Xr(i,t,e){const n=Zn(i,1,.5);let s;for(t+e>1&&(s=1/(t+e),t*=s,e*=s),s=0;s<3;s++)n[s]*=1-t-e,n[s]+=t;return n}function qr(i,t,e,n,s){return i===s?(t-e)/n+(t<e?6:0):t===s?(e-i)/n+2:(i-t)/n+4}function Di(i){const e=i.r/255,n=i.g/255,s=i.b/255,o=Math.max(e,n,s),a=Math.min(e,n,s),r=(o+a)/2;let l,c,h;return o!==a&&(h=o-a,c=r>.5?h/(2-o-a):h/(o+a),l=qr(e,n,s,h,o),l=l*60+.5),[l|0,c||0,r]}function Fi(i,t,e,n){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,n)).map(Ot)}function Ei(i,t,e){return Fi(Zn,i,t,e)}function Jr(i,t,e){return Fi(Xr,i,t,e)}function Qr(i,t,e){return Fi(Kr,i,t,e)}function Kn(i){return(i%360+360)%360}function _r(i){const t=Zr.exec(i);let e=255,n;if(!t)return;t[5]!==n&&(e=t[6]?ge(+t[5]):Ot(+t[5]));const s=Kn(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?n=Jr(s,o,a):t[1]==="hsv"?n=Qr(s,o,a):n=Ei(s,o,a),{r:n[0],g:n[1],b:n[2],a:e}}function $r(i,t){var e=Di(i);e[0]=Kn(e[0]+t),e=Ei(e),i.r=e[0],i.g=e[1],i.b=e[2]}function tl(i){if(!i)return;const t=Di(i),e=t[0],n=Un(t[1]),s=Un(t[2]);return i.a<255?`hsla(${e}, ${n}%, ${s}%, ${vt(i.a)})`:`hsl(${e}, ${n}%, ${s}%)`}const Xn={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"},qn={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 el(){const i={},t=Object.keys(qn),e=Object.keys(Xn);let n,s,o,a,r;for(n=0;n<t.length;n++){for(a=r=t[n],s=0;s<e.length;s++)o=e[s],r=r.replace(o,Xn[o]);o=parseInt(qn[a],16),i[r]=[o>>16&255,o>>8&255,o&255]}return i}let Ke;function il(i){Ke||(Ke=el(),Ke.transparent=[0,0,0,0]);const t=Ke[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const nl=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function sl(i){const t=nl.exec(i);let e=255,n,s,o;if(t){if(t[7]!==n){const a=+t[7];e=t[8]?ge(a):Lt(a*255,0,255)}return n=+t[1],s=+t[3],o=+t[5],n=255&(t[2]?ge(n):Lt(n,0,255)),s=255&(t[4]?ge(s):Lt(s,0,255)),o=255&(t[6]?ge(o):Lt(o,0,255)),{r:n,g:s,b:o,a:e}}}function ol(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${vt(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const Ri=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,ne=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function al(i,t,e){const n=ne(vt(i.r)),s=ne(vt(i.g)),o=ne(vt(i.b));return{r:Ot(Ri(n+e*(ne(vt(t.r))-n))),g:Ot(Ri(s+e*(ne(vt(t.g))-s))),b:Ot(Ri(o+e*(ne(vt(t.b))-o))),a:i.a+e*(t.a-i.a)}}function Xe(i,t,e){if(i){let n=Di(i);n[t]=Math.max(0,Math.min(n[t]+n[t]*e,t===0?360:1)),n=Ei(n),i.r=n[0],i.g=n[1],i.b=n[2]}}function Jn(i,t){return i&&Object.assign(t||{},i)}function Qn(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=Ot(i[3]))):(t=Jn(i,{r:0,g:0,b:0,a:1}),t.a=Ot(t.a)),t}function rl(i){return i.charAt(0)==="r"?sl(i):_r(i)}class me{constructor(t){if(t instanceof me)return t;const e=typeof t;let n;e==="object"?n=Qn(t):e==="string"&&(n=jr(t)||il(t)||rl(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Jn(this._rgb);return t&&(t.a=vt(t.a)),t}set rgb(t){this._rgb=Qn(t)}rgbString(){return this._valid?ol(this._rgb):void 0}hexString(){return this._valid?Ur(this._rgb):void 0}hslString(){return this._valid?tl(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,s=t.rgb;let o;const a=e===o?.5:e,r=2*a-1,l=n.a-s.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,n.r=255&c*n.r+o*s.r+.5,n.g=255&c*n.g+o*s.g+.5,n.b=255&c*n.b+o*s.b+.5,n.a=a*n.a+(1-a)*s.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=al(this._rgb,t._rgb,e)),this}clone(){return new me(this.rgb)}alpha(t){return this._rgb.a=Ot(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=pe(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Xe(this._rgb,2,t),this}darken(t){return Xe(this._rgb,2,-t),this}saturate(t){return Xe(this._rgb,1,t),this}desaturate(t){return Xe(this._rgb,1,-t),this}rotate(t){return $r(this._rgb,t),this}}/*!
1391
+ */function pe(i){return i+.5|0}const Lt=(i,t,e)=>Math.max(Math.min(i,e),t);function ge(i){return Lt(pe(i*2.55),0,255)}function Ot(i){return Lt(pe(i*255),0,255)}function vt(i){return Lt(pe(i/2.55)/100,0,1)}function Zn(i){return Lt(pe(i*100),0,100)}const ct={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},Ii=[..."0123456789ABCDEF"],Nr=i=>Ii[i&15],Gr=i=>Ii[(i&240)>>4]+Ii[i&15],Ze=i=>(i&240)>>4===(i&15),jr=i=>Ze(i.r)&&Ze(i.g)&&Ze(i.b)&&Ze(i.a);function Yr(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&ct[i[1]]*17,g:255&ct[i[2]]*17,b:255&ct[i[3]]*17,a:t===5?ct[i[4]]*17:255}:(t===7||t===9)&&(e={r:ct[i[1]]<<4|ct[i[2]],g:ct[i[3]]<<4|ct[i[4]],b:ct[i[5]]<<4|ct[i[6]],a:t===9?ct[i[7]]<<4|ct[i[8]]:255})),e}const Ur=(i,t)=>i<255?t(i):"";function Zr(i){var t=jr(i)?Nr:Gr;return i?"#"+t(i.r)+t(i.g)+t(i.b)+Ur(i.a,t):void 0}const Kr=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Kn(i,t,e){const n=t*Math.min(e,1-e),s=(o,a=(o+i/30)%12)=>e-n*Math.max(Math.min(a-3,9-a,1),-1);return[s(0),s(8),s(4)]}function Xr(i,t,e){const n=(s,o=(s+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function qr(i,t,e){const n=Kn(i,1,.5);let s;for(t+e>1&&(s=1/(t+e),t*=s,e*=s),s=0;s<3;s++)n[s]*=1-t-e,n[s]+=t;return n}function Jr(i,t,e,n,s){return i===s?(t-e)/n+(t<e?6:0):t===s?(e-i)/n+2:(i-t)/n+4}function Di(i){const e=i.r/255,n=i.g/255,s=i.b/255,o=Math.max(e,n,s),a=Math.min(e,n,s),r=(o+a)/2;let l,c,h;return o!==a&&(h=o-a,c=r>.5?h/(2-o-a):h/(o+a),l=Jr(e,n,s,h,o),l=l*60+.5),[l|0,c||0,r]}function Fi(i,t,e,n){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,n)).map(Ot)}function Ei(i,t,e){return Fi(Kn,i,t,e)}function Qr(i,t,e){return Fi(qr,i,t,e)}function _r(i,t,e){return Fi(Xr,i,t,e)}function Xn(i){return(i%360+360)%360}function $r(i){const t=Kr.exec(i);let e=255,n;if(!t)return;t[5]!==n&&(e=t[6]?ge(+t[5]):Ot(+t[5]));const s=Xn(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?n=Qr(s,o,a):t[1]==="hsv"?n=_r(s,o,a):n=Ei(s,o,a),{r:n[0],g:n[1],b:n[2],a:e}}function tl(i,t){var e=Di(i);e[0]=Xn(e[0]+t),e=Ei(e),i.r=e[0],i.g=e[1],i.b=e[2]}function el(i){if(!i)return;const t=Di(i),e=t[0],n=Zn(t[1]),s=Zn(t[2]);return i.a<255?`hsla(${e}, ${n}%, ${s}%, ${vt(i.a)})`:`hsl(${e}, ${n}%, ${s}%)`}const qn={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"},Jn={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 il(){const i={},t=Object.keys(Jn),e=Object.keys(qn);let n,s,o,a,r;for(n=0;n<t.length;n++){for(a=r=t[n],s=0;s<e.length;s++)o=e[s],r=r.replace(o,qn[o]);o=parseInt(Jn[a],16),i[r]=[o>>16&255,o>>8&255,o&255]}return i}let Ke;function nl(i){Ke||(Ke=il(),Ke.transparent=[0,0,0,0]);const t=Ke[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const sl=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function ol(i){const t=sl.exec(i);let e=255,n,s,o;if(t){if(t[7]!==n){const a=+t[7];e=t[8]?ge(a):Lt(a*255,0,255)}return n=+t[1],s=+t[3],o=+t[5],n=255&(t[2]?ge(n):Lt(n,0,255)),s=255&(t[4]?ge(s):Lt(s,0,255)),o=255&(t[6]?ge(o):Lt(o,0,255)),{r:n,g:s,b:o,a:e}}}function al(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${vt(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const Ri=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,ne=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function rl(i,t,e){const n=ne(vt(i.r)),s=ne(vt(i.g)),o=ne(vt(i.b));return{r:Ot(Ri(n+e*(ne(vt(t.r))-n))),g:Ot(Ri(s+e*(ne(vt(t.g))-s))),b:Ot(Ri(o+e*(ne(vt(t.b))-o))),a:i.a+e*(t.a-i.a)}}function Xe(i,t,e){if(i){let n=Di(i);n[t]=Math.max(0,Math.min(n[t]+n[t]*e,t===0?360:1)),n=Ei(n),i.r=n[0],i.g=n[1],i.b=n[2]}}function Qn(i,t){return i&&Object.assign(t||{},i)}function _n(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=Ot(i[3]))):(t=Qn(i,{r:0,g:0,b:0,a:1}),t.a=Ot(t.a)),t}function ll(i){return i.charAt(0)==="r"?ol(i):$r(i)}class me{constructor(t){if(t instanceof me)return t;const e=typeof t;let n;e==="object"?n=_n(t):e==="string"&&(n=Yr(t)||nl(t)||ll(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Qn(this._rgb);return t&&(t.a=vt(t.a)),t}set rgb(t){this._rgb=_n(t)}rgbString(){return this._valid?al(this._rgb):void 0}hexString(){return this._valid?Zr(this._rgb):void 0}hslString(){return this._valid?el(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,s=t.rgb;let o;const a=e===o?.5:e,r=2*a-1,l=n.a-s.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,n.r=255&c*n.r+o*s.r+.5,n.g=255&c*n.g+o*s.g+.5,n.b=255&c*n.b+o*s.b+.5,n.a=a*n.a+(1-a)*s.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=rl(this._rgb,t._rgb,e)),this}clone(){return new me(this.rgb)}alpha(t){return this._rgb.a=Ot(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=pe(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Xe(this._rgb,2,t),this}darken(t){return Xe(this._rgb,2,-t),this}saturate(t){return Xe(this._rgb,1,t),this}desaturate(t){return Xe(this._rgb,1,-t),this}rotate(t){return tl(this._rgb,t),this}}/*!
1392
1392
  * Chart.js v4.4.0
1393
1393
  * https://www.chartjs.org
1394
1394
  * (c) 2023 Chart.js Contributors
1395
1395
  * Released under the MIT License
1396
- */function wt(){}const ll=(()=>{let i=0;return()=>i++})();function F(i){return i===null||typeof i>"u"}function W(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function I(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function j(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function at(i,t){return j(i)?i:t}function O(i,t){return typeof i>"u"?t:i}const cl=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,_n=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function B(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function E(i,t,e,n){let s,o,a;if(W(i))if(o=i.length,n)for(s=o-1;s>=0;s--)t.call(e,i[s],s);else for(s=0;s<o;s++)t.call(e,i[s],s);else if(I(i))for(a=Object.keys(i),o=a.length,s=0;s<o;s++)t.call(e,i[a[s]],a[s])}function qe(i,t){let e,n,s,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,n=i.length;e<n;++e)if(s=i[e],o=t[e],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function Je(i){if(W(i))return i.map(Je);if(I(i)){const t=Object.create(null),e=Object.keys(i),n=e.length;let s=0;for(;s<n;++s)t[e[s]]=Je(i[e[s]]);return t}return i}function $n(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function hl(i,t,e,n){if(!$n(i))return;const s=t[i],o=e[i];I(s)&&I(o)?be(s,o,n):t[i]=Je(o)}function be(i,t,e){const n=W(t)?t:[t],s=n.length;if(!I(i))return i;e=e||{};const o=e.merger||hl;let a;for(let r=0;r<s;++r){if(a=n[r],!I(a))continue;const l=Object.keys(a);for(let c=0,h=l.length;c<h;++c)o(l[c],i,a,e)}return i}function xe(i,t){return be(i,t,{merger:dl})}function dl(i,t,e){if(!$n(i))return;const n=t[i],s=e[i];I(n)&&I(s)?xe(n,s):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=Je(s))}const ts={"":i=>i,x:i=>i.x,y:i=>i.y};function ul(i){const t=i.split("."),e=[];let n="";for(const s of t)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(e.push(n),n="");return e}function fl(i){const t=ul(i);return e=>{for(const n of t){if(n==="")break;e=e&&e[n]}return e}}function zt(i,t){return(ts[t]||(ts[t]=fl(t)))(i)}function Bi(i){return i.charAt(0).toUpperCase()+i.slice(1)}const ye=i=>typeof i<"u",Vt=i=>typeof i=="function",es=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function pl(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const H=Math.PI,N=2*H,gl=N+H,Qe=Number.POSITIVE_INFINITY,ml=H/180,U=H/2,Bt=H/4,is=H*2/3,It=Math.log10,pt=Math.sign;function ve(i,t,e){return Math.abs(i-t)<e}function ns(i){const t=Math.round(i);i=ve(i,t,i/1e3)?t:i;const e=Math.pow(10,Math.floor(It(i))),n=i/e;return(n<=1?1:n<=2?2:n<=5?5:10)*e}function bl(i){const t=[],e=Math.sqrt(i);let n;for(n=1;n<e;n++)i%n===0&&(t.push(n),t.push(i/n));return e===(e|0)&&t.push(e),t.sort((s,o)=>s-o).pop(),t}function se(i){return!isNaN(parseFloat(i))&&isFinite(i)}function xl(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function ss(i,t,e){let n,s,o;for(n=0,s=i.length;n<s;n++)o=i[n][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function ht(i){return i*(H/180)}function Wi(i){return i*(180/H)}function os(i){if(!j(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function as(i,t){const e=t.x-i.x,n=t.y-i.y,s=Math.sqrt(e*e+n*n);let o=Math.atan2(n,e);return o<-.5*H&&(o+=N),{angle:o,distance:s}}function Hi(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function yl(i,t){return(i-t+gl)%N-H}function rt(i){return(i%N+N)%N}function we(i,t,e,n){const s=rt(i),o=rt(t),a=rt(e),r=rt(o-s),l=rt(a-s),c=rt(s-o),h=rt(s-a);return s===o||s===a||n&&o===a||r>l&&c<h}function J(i,t,e){return Math.max(t,Math.min(e,i))}function vl(i){return J(i,-32768,32767)}function kt(i,t,e,n=1e-6){return i>=Math.min(t,e)-n&&i<=Math.max(t,e)+n}function Ni(i,t,e){e=e||(a=>i[a]<t);let n=i.length-1,s=0,o;for(;n-s>1;)o=s+n>>1,e(o)?s=o:n=o;return{lo:s,hi:n}}const At=(i,t,e,n)=>Ni(i,e,n?s=>{const o=i[s][t];return o<e||o===e&&i[s+1][t]===e}:s=>i[s][t]<e),wl=(i,t,e)=>Ni(i,e,n=>i[n][t]>=e);function kl(i,t,e){let n=0,s=i.length;for(;n<s&&i[n]<t;)n++;for(;s>n&&i[s-1]>e;)s--;return n>0||s<i.length?i.slice(n,s):i}const rs=["push","pop","shift","splice","unshift"];function Al(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),rs.forEach(e=>{const n="_onData"+Bi(e),s=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const a=s.apply(this,o);return i._chartjs.listeners.forEach(r=>{typeof r[n]=="function"&&r[n](...o)}),a}})})}function ls(i,t){const e=i._chartjs;if(!e)return;const n=e.listeners,s=n.indexOf(t);s!==-1&&n.splice(s,1),!(n.length>0)&&(rs.forEach(o=>{delete i[o]}),delete i._chartjs)}function cs(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const hs=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function ds(i,t){let e=[],n=!1;return function(...s){e=s,n||(n=!0,hs.call(window,()=>{n=!1,i.apply(t,e)}))}}function Ml(i,t){let e;return function(...n){return t?(clearTimeout(e),e=setTimeout(i,t,n)):i.apply(this,n),t}}const Gi=i=>i==="start"?"left":i==="end"?"right":"center",_=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Pl=(i,t,e,n)=>i===(n?"left":"right")?e:i==="center"?(t+e)/2:t;function us(i,t,e){const n=t.length;let s=0,o=n;if(i._sorted){const{iScale:a,_parsed:r}=i,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(s=J(Math.min(At(r,l,c).lo,e?n:At(t,l,a.getPixelForValue(c)).lo),0,n-1)),u?o=J(Math.max(At(r,a.axis,h,!0).hi+1,e?0:At(t,l,a.getPixelForValue(h),!0).hi+1),s,n)-s:o=n-s}return{start:s,count:o}}function fs(i){const{xScale:t,yScale:e,_scaleRanges:n}=i,s={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!n)return i._scaleRanges=s,!0;const o=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==e.min||n.ymax!==e.max;return Object.assign(n,s),o}const _e=i=>i===0||i===1,ps=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*N/e)),gs=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*N/e)+1,ke={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*U)+1,easeOutSine:i=>Math.sin(i*U),easeInOutSine:i=>-.5*(Math.cos(H*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>_e(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>_e(i)?i:ps(i,.075,.3),easeOutElastic:i=>_e(i)?i:gs(i,.075,.3),easeInOutElastic(i){return _e(i)?i:i<.5?.5*ps(i*2,.1125,.45):.5+.5*gs(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-ke.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?ke.easeInBounce(i*2)*.5:ke.easeOutBounce(i*2-1)*.5+.5};function ji(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function ms(i){return ji(i)?i:new me(i)}function Yi(i){return ji(i)?i:new me(i).saturate(.5).darken(.1).hexString()}const Tl=["x","y","borderWidth","radius","tension"],Sl=["color","borderColor","backgroundColor"];function Cl(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:Sl},numbers:{type:"number",properties:Tl}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Ll(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const bs=new Map;function Ol(i,t){t=t||{};const e=i+JSON.stringify(t);let n=bs.get(e);return n||(n=new Intl.NumberFormat(i,t),bs.set(e,n)),n}function Ae(i,t,e){return Ol(t,e).format(i)}const xs={values(i){return W(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const n=this.chart.options.locale;let s,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=zl(i,e)}const a=It(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Ae(i,n,l)},logarithmic(i,t,e){if(i===0)return"0";const n=e[t].significand||i/Math.pow(10,Math.floor(It(i)));return[1,2,3,5,10,15].includes(n)||t>.8*e.length?xs.numeric.call(this,i,t,e):""}};function zl(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var $e={formatters:xs};function Vl(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:$e.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Wt=Object.create(null),Ui=Object.create(null);function Me(i,t){if(!t)return i;const e=t.split(".");for(let n=0,s=e.length;n<s;++n){const o=e[n];i=i[o]||(i[o]=Object.create(null))}return i}function Zi(i,t,e){return typeof t=="string"?be(Me(i,t),e):be(Me(i,""),t)}class Il{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,s)=>Yi(s.backgroundColor),this.hoverBorderColor=(n,s)=>Yi(s.borderColor),this.hoverColor=(n,s)=>Yi(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Zi(this,t,e)}get(t){return Me(this,t)}describe(t,e){return Zi(Ui,t,e)}override(t,e){return Zi(Wt,t,e)}route(t,e,n,s){const o=Me(this,t),a=Me(this,n),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[r],c=a[s];return I(l)?Object.assign({},c,l):O(l,c)},set(l){this[r]=l}}})}apply(t){t.forEach(e=>e(this))}}var Y=new Il({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Cl,Ll,Vl]);function Dl(i){return!i||F(i.size)||F(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function ti(i,t,e,n,s){let o=t[s];return o||(o=t[s]=i.measureText(s).width,e.push(s)),o>n&&(n=o),n}function Fl(i,t,e,n){n=n||{};let s=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(s=n.data={},o=n.garbageCollect=[],n.font=t),i.save(),i.font=t;let a=0;const r=e.length;let l,c,h,d,u;for(l=0;l<r;l++)if(d=e[l],d!=null&&!W(d))a=ti(i,s,o,a,d);else if(W(d))for(c=0,h=d.length;c<h;c++)u=d[c],u!=null&&!W(u)&&(a=ti(i,s,o,a,u));i.restore();const f=o.length/2;if(f>e.length){for(l=0;l<f;l++)delete s[o[l]];o.splice(0,f)}return a}function Ht(i,t,e){const n=i.currentDevicePixelRatio,s=e!==0?Math.max(e/2,.5):0;return Math.round((t-s)*n)/n+s}function ys(i,t){t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore()}function Ki(i,t,e,n){vs(i,t,e,n,null)}function vs(i,t,e,n,s){let o,a,r,l,c,h,d,u;const f=t.pointStyle,p=t.rotation,g=t.radius;let m=(p||0)*ml;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,n),i.rotate(m),i.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),i.restore();return}if(!(isNaN(g)||g<=0)){switch(i.beginPath(),f){default:s?i.ellipse(e,n,s/2,g,0,0,N):i.arc(e,n,g,0,N),i.closePath();break;case"triangle":h=s?s/2:g,i.moveTo(e+Math.sin(m)*h,n-Math.cos(m)*g),m+=is,i.lineTo(e+Math.sin(m)*h,n-Math.cos(m)*g),m+=is,i.lineTo(e+Math.sin(m)*h,n-Math.cos(m)*g),i.closePath();break;case"rectRounded":c=g*.516,l=g-c,a=Math.cos(m+Bt)*l,d=Math.cos(m+Bt)*(s?s/2-c:l),r=Math.sin(m+Bt)*l,u=Math.sin(m+Bt)*(s?s/2-c:l),i.arc(e-d,n-r,c,m-H,m-U),i.arc(e+u,n-a,c,m-U,m),i.arc(e+d,n+r,c,m,m+U),i.arc(e-u,n+a,c,m+U,m+H),i.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,h=s?s/2:l,i.rect(e-h,n-l,2*h,2*l);break}m+=Bt;case"rectRot":d=Math.cos(m)*(s?s/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),i.moveTo(e-d,n-r),i.lineTo(e+u,n-a),i.lineTo(e+d,n+r),i.lineTo(e-u,n+a),i.closePath();break;case"crossRot":m+=Bt;case"cross":d=Math.cos(m)*(s?s/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),i.moveTo(e-d,n-r),i.lineTo(e+d,n+r),i.moveTo(e+u,n-a),i.lineTo(e-u,n+a);break;case"star":d=Math.cos(m)*(s?s/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),i.moveTo(e-d,n-r),i.lineTo(e+d,n+r),i.moveTo(e+u,n-a),i.lineTo(e-u,n+a),m+=Bt,d=Math.cos(m)*(s?s/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),i.moveTo(e-d,n-r),i.lineTo(e+d,n+r),i.moveTo(e+u,n-a),i.lineTo(e-u,n+a);break;case"line":a=s?s/2:Math.cos(m)*g,r=Math.sin(m)*g,i.moveTo(e-a,n-r),i.lineTo(e+a,n+r);break;case"dash":i.moveTo(e,n),i.lineTo(e+Math.cos(m)*(s?s/2:g),n+Math.sin(m)*g);break;case!1:i.closePath();break}i.fill(),t.borderWidth>0&&i.stroke()}}function Mt(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.x<t.right+e&&i.y>t.top-e&&i.y<t.bottom+e}function ei(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function ii(i){i.restore()}function El(i,t,e,n,s){if(!t)return i.lineTo(e.x,e.y);if(s==="middle"){const o=(t.x+e.x)/2;i.lineTo(o,t.y),i.lineTo(o,e.y)}else s==="after"!=!!n?i.lineTo(t.x,e.y):i.lineTo(e.x,t.y);i.lineTo(e.x,e.y)}function Rl(i,t,e,n){if(!t)return i.lineTo(e.x,e.y);i.bezierCurveTo(n?t.cp1x:t.cp2x,n?t.cp1y:t.cp2y,n?e.cp2x:e.cp1x,n?e.cp2y:e.cp1y,e.x,e.y)}function Bl(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),F(t.rotation)||i.rotate(t.rotation),t.color&&(i.fillStyle=t.color),t.textAlign&&(i.textAlign=t.textAlign),t.textBaseline&&(i.textBaseline=t.textBaseline)}function Wl(i,t,e,n,s){if(s.strikethrough||s.underline){const o=i.measureText(n),a=t-o.actualBoundingBoxLeft,r=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,c=e+o.actualBoundingBoxDescent,h=s.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=s.decorationWidth||2,i.moveTo(a,h),i.lineTo(r,h),i.stroke()}}function Hl(i,t){const e=i.fillStyle;i.fillStyle=t.color,i.fillRect(t.left,t.top,t.width,t.height),i.fillStyle=e}function Nt(i,t,e,n,s,o={}){const a=W(t)?t:[t],r=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=s.string,Bl(i,o),l=0;l<a.length;++l)c=a[l],o.backdrop&&Hl(i,o.backdrop),r&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),F(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,e,n,o.maxWidth)),i.fillText(c,e,n,o.maxWidth),Wl(i,e,n,c,o),n+=Number(s.lineHeight);i.restore()}function Pe(i,t){const{x:e,y:n,w:s,h:o,radius:a}=t;i.arc(e+a.topLeft,n+a.topLeft,a.topLeft,1.5*H,H,!0),i.lineTo(e,n+o-a.bottomLeft),i.arc(e+a.bottomLeft,n+o-a.bottomLeft,a.bottomLeft,H,U,!0),i.lineTo(e+s-a.bottomRight,n+o),i.arc(e+s-a.bottomRight,n+o-a.bottomRight,a.bottomRight,U,0,!0),i.lineTo(e+s,n+a.topRight),i.arc(e+s-a.topRight,n+a.topRight,a.topRight,0,-U,!0),i.lineTo(e+a.topLeft,n)}const Nl=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Gl=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function jl(i,t){const e=(""+i).match(Nl);if(!e||e[1]==="normal")return t*1.2;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100;break}return t*i}const Yl=i=>+i||0;function Xi(i,t){const e={},n=I(t),s=n?Object.keys(t):t,o=I(i)?n?a=>O(i[a],i[t[a]]):a=>i[a]:()=>i;for(const a of s)e[a]=Yl(o(a));return e}function ws(i){return Xi(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Gt(i){return Xi(i,["topLeft","topRight","bottomLeft","bottomRight"])}function $(i){const t=ws(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function X(i,t){i=i||{},t=t||Y.font;let e=O(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let n=O(i.style,t.style);n&&!(""+n).match(Gl)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:O(i.family,t.family),lineHeight:jl(O(i.lineHeight,t.lineHeight),e),size:e,style:n,weight:O(i.weight,t.weight),string:""};return s.string=Dl(s),s}function Te(i,t,e,n){let s=!0,o,a,r;for(o=0,a=i.length;o<a;++o)if(r=i[o],r!==void 0&&(t!==void 0&&typeof r=="function"&&(r=r(t),s=!1),e!==void 0&&W(r)&&(r=r[e%r.length],s=!1),r!==void 0))return n&&!s&&(n.cacheable=!1),r}function Ul(i,t,e){const{min:n,max:s}=i,o=_n(t,(s-n)/2),a=(r,l)=>e&&r===0?0:r+l;return{min:a(n,-Math.abs(o)),max:a(s,o)}}function Dt(i,t){return Object.assign(Object.create(i),t)}function qi(i,t=[""],e,n,s=()=>i[0]){const o=e||i;typeof n>"u"&&(n=Ts("_fallback",i));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:n,_getTarget:s,override:r=>qi([r,...i],t,o,n)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete i[0][l],!0},get(r,l){return As(r,l,()=>$l(l,t,i,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(r,l){return Ss(r).includes(l)},ownKeys(r){return Ss(r)},set(r,l,c){const h=r._storage||(r._storage=s());return r[l]=h[l]=c,delete r._keys,!0}})}function oe(i,t,e,n){const s={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:ks(i,n),setContext:o=>oe(i,o,e,n),override:o=>oe(i.override(o),t,e,n)};return new Proxy(s,{deleteProperty(o,a){return delete o[a],delete i[a],!0},get(o,a,r){return As(o,a,()=>Kl(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(i,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,a)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,a){return Reflect.has(i,a)},ownKeys(){return Reflect.ownKeys(i)},set(o,a,r){return i[a]=r,delete o[a],!0}})}function ks(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:n=t.indexable,_allKeys:s=t.allKeys}=i;return{allKeys:s,scriptable:e,indexable:n,isScriptable:Vt(e)?e:()=>e,isIndexable:Vt(n)?n:()=>n}}const Zl=(i,t)=>i?i+Bi(t):t,Ji=(i,t)=>I(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function As(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];const n=e();return i[t]=n,n}function Kl(i,t,e){const{_proxy:n,_context:s,_subProxy:o,_descriptors:a}=i;let r=n[t];return Vt(r)&&a.isScriptable(t)&&(r=Xl(t,r,i,e)),W(r)&&r.length&&(r=ql(t,r,i,a.isIndexable)),Ji(t,r)&&(r=oe(r,s,o&&o[t],a)),r}function Xl(i,t,e,n){const{_proxy:s,_context:o,_subProxy:a,_stack:r}=e;if(r.has(i))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+i);r.add(i);let l=t(o,a||n);return r.delete(i),Ji(i,l)&&(l=Qi(s._scopes,s,i,l)),l}function ql(i,t,e,n){const{_proxy:s,_context:o,_subProxy:a,_descriptors:r}=e;if(typeof o.index<"u"&&n(i))return t[o.index%t.length];if(I(t[0])){const l=t,c=s._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=Qi(c,s,i,h);t.push(oe(d,o,a&&a[i],r))}}return t}function Ms(i,t,e){return Vt(i)?i(t,e):i}const Jl=(i,t)=>i===!0?t:typeof i=="string"?zt(t,i):void 0;function Ql(i,t,e,n,s){for(const o of t){const a=Jl(e,o);if(a){i.add(a);const r=Ms(a._fallback,e,s);if(typeof r<"u"&&r!==e&&r!==n)return r}else if(a===!1&&typeof n<"u"&&e!==n)return null}return!1}function Qi(i,t,e,n){const s=t._rootScopes,o=Ms(t._fallback,e,n),a=[...i,...s],r=new Set;r.add(n);let l=Ps(r,a,e,o||e,n);return l===null||typeof o<"u"&&o!==e&&(l=Ps(r,a,o,l,n),l===null)?!1:qi(Array.from(r),[""],s,o,()=>_l(t,e,n))}function Ps(i,t,e,n,s){for(;e;)e=Ql(i,t,e,n,s);return e}function _l(i,t,e){const n=i._getTarget();t in n||(n[t]={});const s=n[t];return W(s)&&I(e)?e:s||{}}function $l(i,t,e,n){let s;for(const o of t)if(s=Ts(Zl(o,i),e),typeof s<"u")return Ji(i,s)?Qi(e,n,i,s):s}function Ts(i,t){for(const e of t){if(!e)continue;const n=e[i];if(typeof n<"u")return n}}function Ss(i){let t=i._keys;return t||(t=i._keys=tc(i._scopes)),t}function tc(i){const t=new Set;for(const e of i)for(const n of Object.keys(e).filter(s=>!s.startsWith("_")))t.add(n);return Array.from(t)}function Cs(i,t,e,n){const{iScale:s}=i,{key:o="r"}=this._parsing,a=new Array(n);let r,l,c,h;for(r=0,l=n;r<l;++r)c=r+e,h=t[c],a[r]={r:s.parse(zt(h,o),c)};return a}const ec=Number.EPSILON||1e-14,ae=(i,t)=>t<i.length&&!i[t].skip&&i[t],Ls=i=>i==="x"?"y":"x";function ic(i,t,e,n){const s=i.skip?t:i,o=t,a=e.skip?t:e,r=Hi(o,s),l=Hi(a,o);let c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:o.x-d*(a.x-s.x),y:o.y-d*(a.y-s.y)},next:{x:o.x+u*(a.x-s.x),y:o.y+u*(a.y-s.y)}}}function nc(i,t,e){const n=i.length;let s,o,a,r,l,c=ae(i,0);for(let h=0;h<n-1;++h)if(l=c,c=ae(i,h+1),!(!l||!c)){if(ve(t[h],0,ec)){e[h]=e[h+1]=0;continue}s=e[h]/t[h],o=e[h+1]/t[h],r=Math.pow(s,2)+Math.pow(o,2),!(r<=9)&&(a=3/Math.sqrt(r),e[h]=s*a*t[h],e[h+1]=o*a*t[h])}}function sc(i,t,e="x"){const n=Ls(e),s=i.length;let o,a,r,l=ae(i,0);for(let c=0;c<s;++c){if(a=r,r=l,l=ae(i,c+1),!r)continue;const h=r[e],d=r[n];a&&(o=(h-a[e])/3,r[`cp1${e}`]=h-o,r[`cp1${n}`]=d-o*t[c]),l&&(o=(l[e]-h)/3,r[`cp2${e}`]=h+o,r[`cp2${n}`]=d+o*t[c])}}function oc(i,t="x"){const e=Ls(t),n=i.length,s=Array(n).fill(0),o=Array(n);let a,r,l,c=ae(i,0);for(a=0;a<n;++a)if(r=l,l=c,c=ae(i,a+1),!!l){if(c){const h=c[t]-l[t];s[a]=h!==0?(c[e]-l[e])/h:0}o[a]=r?c?pt(s[a-1])!==pt(s[a])?0:(s[a-1]+s[a])/2:s[a-1]:s[a]}nc(i,s,o),sc(i,o,t)}function ni(i,t,e){return Math.max(Math.min(i,e),t)}function ac(i,t){let e,n,s,o,a,r=Mt(i[0],t);for(e=0,n=i.length;e<n;++e)a=o,o=r,r=e<n-1&&Mt(i[e+1],t),o&&(s=i[e],a&&(s.cp1x=ni(s.cp1x,t.left,t.right),s.cp1y=ni(s.cp1y,t.top,t.bottom)),r&&(s.cp2x=ni(s.cp2x,t.left,t.right),s.cp2y=ni(s.cp2y,t.top,t.bottom)))}function rc(i,t,e,n,s){let o,a,r,l;if(t.spanGaps&&(i=i.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")oc(i,s);else{let c=n?i[i.length-1]:i[0];for(o=0,a=i.length;o<a;++o)r=i[o],l=ic(c,r,i[Math.min(o+1,a-(n?0:1))%a],t.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,c=r}t.capBezierPoints&&ac(i,e)}function Os(){return typeof window<"u"&&typeof document<"u"}function _i(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function si(i,t,e){let n;return typeof i=="string"?(n=parseInt(i,10),i.indexOf("%")!==-1&&(n=n/100*t.parentNode[e])):n=i,n}const oi=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function lc(i,t){return oi(i).getPropertyValue(t)}const cc=["top","right","bottom","left"];function jt(i,t,e){const n={};e=e?"-"+e:"";for(let s=0;s<4;s++){const o=cc[s];n[o]=parseFloat(i[t+"-"+o+e])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const hc=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function dc(i,t){const e=i.touches,n=e&&e.length?e[0]:i,{offsetX:s,offsetY:o}=n;let a=!1,r,l;if(hc(s,o,i.target))r=s,l=o;else{const c=t.getBoundingClientRect();r=n.clientX-c.left,l=n.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function Yt(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:n}=t,s=oi(e),o=s.boxSizing==="border-box",a=jt(s,"padding"),r=jt(s,"border","width"),{x:l,y:c,box:h}=dc(i,e),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:p}=t;return o&&(f-=a.width+r.width,p-=a.height+r.height),{x:Math.round((l-d)/f*e.width/n),y:Math.round((c-u)/p*e.height/n)}}function uc(i,t,e){let n,s;if(t===void 0||e===void 0){const o=_i(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const a=o.getBoundingClientRect(),r=oi(o),l=jt(r,"border","width"),c=jt(r,"padding");t=a.width-c.width-l.width,e=a.height-c.height-l.height,n=si(r.maxWidth,o,"clientWidth"),s=si(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:n||Qe,maxHeight:s||Qe}}const ai=i=>Math.round(i*10)/10;function fc(i,t,e,n){const s=oi(i),o=jt(s,"margin"),a=si(s.maxWidth,i,"clientWidth")||Qe,r=si(s.maxHeight,i,"clientHeight")||Qe,l=uc(i,t,e);let{width:c,height:h}=l;if(s.boxSizing==="content-box"){const u=jt(s,"border","width"),f=jt(s,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?c/n:h-o.height),c=ai(Math.min(c,a,l.maxWidth)),h=ai(Math.min(h,r,l.maxHeight)),c&&!h&&(h=ai(c/2)),(t!==void 0||e!==void 0)&&n&&l.height&&h>l.height&&(h=l.height,c=ai(Math.floor(h*n))),{width:c,height:h}}function zs(i,t,e){const n=t||1,s=Math.floor(i.height*n),o=Math.floor(i.width*n);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const a=i.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${i.height}px`,a.style.width=`${i.width}px`),i.currentDevicePixelRatio!==n||a.height!==s||a.width!==o?(i.currentDevicePixelRatio=n,a.height=s,a.width=o,i.ctx.setTransform(n,0,0,n,0,0),!0):!1}const pc=function(){let i=!1;try{const t={get passive(){return i=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return i}();function Vs(i,t){const e=lc(i,t),n=e&&e.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Ut(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function gc(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:n==="middle"?e<.5?i.y:t.y:n==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function mc(i,t,e,n){const s={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},a=Ut(i,s,e),r=Ut(s,o,e),l=Ut(o,t,e),c=Ut(a,r,e),h=Ut(r,l,e);return Ut(c,h,e)}const bc=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,n){return e-n},leftForLtr(e,n){return e-n}}},xc=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function re(i,t,e){return i?bc(t,e):xc()}function Is(i,t){let e,n;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,n=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=n)}function Ds(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function Fs(i){return i==="angle"?{between:we,compare:yl,normalize:rt}:{between:kt,compare:(t,e)=>t-e,normalize:t=>t}}function Es({start:i,end:t,count:e,loop:n,style:s}){return{start:i%e,end:t%e,loop:n&&(t-i+1)%e===0,style:s}}function yc(i,t,e){const{property:n,start:s,end:o}=e,{between:a,normalize:r}=Fs(n),l=t.length;let{start:c,end:h,loop:d}=i,u,f;if(d){for(c+=l,h+=l,u=0,f=l;u<f&&a(r(t[c%l][n]),s,o);++u)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:i.style}}function Rs(i,t,e){if(!e)return[i];const{property:n,start:s,end:o}=e,a=t.length,{compare:r,between:l,normalize:c}=Fs(n),{start:h,end:d,loop:u,style:f}=yc(i,t,e),p=[];let g=!1,m=null,x,y,M;const A=()=>l(s,M,x)&&r(s,M)!==0,k=()=>r(o,x)===0||l(o,M,x),T=()=>g||A(),S=()=>!g||k();for(let C=h,L=h;C<=d;++C)y=t[C%a],!y.skip&&(x=c(y[n]),x!==M&&(g=l(x,s,o),m===null&&T()&&(m=r(x,s)===0?C:L),m!==null&&S()&&(p.push(Es({start:m,end:C,loop:u,count:a,style:f})),m=null),L=C,M=x));return m!==null&&p.push(Es({start:m,end:d,loop:u,count:a,style:f})),p}function Bs(i,t){const e=[],n=i.segments;for(let s=0;s<n.length;s++){const o=Rs(n[s],i.points,t);o.length&&e.push(...o)}return e}function vc(i,t,e,n){let s=0,o=t-1;if(e&&!n)for(;s<t&&!i[s].skip;)s++;for(;s<t&&i[s].skip;)s++;for(s%=t,e&&(o+=s);o>s&&i[o%t].skip;)o--;return o%=t,{start:s,end:o}}function wc(i,t,e,n){const s=i.length,o=[];let a=t,r=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%s];c.skip||c.stop?r.skip||(n=!1,o.push({start:t%s,end:(l-1)%s,loop:n}),t=a=c.stop?l:null):(a=l,r.skip&&(t=l)),r=c}return a!==null&&o.push({start:t%s,end:a%s,loop:n}),o}function kc(i,t){const e=i.points,n=i.options.spanGaps,s=e.length;if(!s)return[];const o=!!i._loop,{start:a,end:r}=vc(e,s,o,n);if(n===!0)return Ws(i,[{start:a,end:r,loop:o}],e,t);const l=r<a?r+s:r,c=!!i._fullLoop&&a===0&&r===s-1;return Ws(i,wc(e,a,l,c),e,t)}function Ws(i,t,e,n){return!n||!n.setContext||!e?t:Ac(i,t,e,n)}function Ac(i,t,e,n){const s=i._chart.getContext(),o=Hs(i.options),{_datasetIndex:a,options:{spanGaps:r}}=i,l=e.length,c=[];let h=o,d=t[0].start,u=d;function f(p,g,m,x){const y=r?-1:1;if(p!==g){for(p+=l;e[p%l].skip;)p-=y;for(;e[g%l].skip;)g+=y;p%l!==g%l&&(c.push({start:p%l,end:g%l,loop:m,style:x}),h=x,d=g%l)}}for(const p of t){d=r?d:p.start;let g=e[d%l],m;for(u=d+1;u<=p.end;u++){const x=e[u%l];m=Hs(n.setContext(Dt(s,{type:"segment",p0:g,p1:x,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:a}))),Mc(m,h)&&f(d,u-1,p.loop,h),g=x,h=m}d<u-1&&f(d,u-1,p.loop,h)}return c}function Hs(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Mc(i,t){if(!t)return!1;const e=[],n=function(s,o){return ji(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(i,n)!==JSON.stringify(t,n)}/*!
1396
+ */function wt(){}const cl=(()=>{let i=0;return()=>i++})();function F(i){return i===null||typeof i>"u"}function W(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function I(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function j(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function at(i,t){return j(i)?i:t}function O(i,t){return typeof i>"u"?t:i}const hl=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,$n=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function B(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function E(i,t,e,n){let s,o,a;if(W(i))if(o=i.length,n)for(s=o-1;s>=0;s--)t.call(e,i[s],s);else for(s=0;s<o;s++)t.call(e,i[s],s);else if(I(i))for(a=Object.keys(i),o=a.length,s=0;s<o;s++)t.call(e,i[a[s]],a[s])}function qe(i,t){let e,n,s,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,n=i.length;e<n;++e)if(s=i[e],o=t[e],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function Je(i){if(W(i))return i.map(Je);if(I(i)){const t=Object.create(null),e=Object.keys(i),n=e.length;let s=0;for(;s<n;++s)t[e[s]]=Je(i[e[s]]);return t}return i}function ts(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function dl(i,t,e,n){if(!ts(i))return;const s=t[i],o=e[i];I(s)&&I(o)?be(s,o,n):t[i]=Je(o)}function be(i,t,e){const n=W(t)?t:[t],s=n.length;if(!I(i))return i;e=e||{};const o=e.merger||dl;let a;for(let r=0;r<s;++r){if(a=n[r],!I(a))continue;const l=Object.keys(a);for(let c=0,h=l.length;c<h;++c)o(l[c],i,a,e)}return i}function xe(i,t){return be(i,t,{merger:ul})}function ul(i,t,e){if(!ts(i))return;const n=t[i],s=e[i];I(n)&&I(s)?xe(n,s):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=Je(s))}const es={"":i=>i,x:i=>i.x,y:i=>i.y};function fl(i){const t=i.split("."),e=[];let n="";for(const s of t)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(e.push(n),n="");return e}function pl(i){const t=fl(i);return e=>{for(const n of t){if(n==="")break;e=e&&e[n]}return e}}function zt(i,t){return(es[t]||(es[t]=pl(t)))(i)}function Bi(i){return i.charAt(0).toUpperCase()+i.slice(1)}const ye=i=>typeof i<"u",Vt=i=>typeof i=="function",is=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function gl(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const H=Math.PI,N=2*H,ml=N+H,Qe=Number.POSITIVE_INFINITY,bl=H/180,U=H/2,Bt=H/4,ns=H*2/3,It=Math.log10,pt=Math.sign;function ve(i,t,e){return Math.abs(i-t)<e}function ss(i){const t=Math.round(i);i=ve(i,t,i/1e3)?t:i;const e=Math.pow(10,Math.floor(It(i))),n=i/e;return(n<=1?1:n<=2?2:n<=5?5:10)*e}function xl(i){const t=[],e=Math.sqrt(i);let n;for(n=1;n<e;n++)i%n===0&&(t.push(n),t.push(i/n));return e===(e|0)&&t.push(e),t.sort((s,o)=>s-o).pop(),t}function se(i){return!isNaN(parseFloat(i))&&isFinite(i)}function yl(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function os(i,t,e){let n,s,o;for(n=0,s=i.length;n<s;n++)o=i[n][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function ht(i){return i*(H/180)}function Wi(i){return i*(180/H)}function as(i){if(!j(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function rs(i,t){const e=t.x-i.x,n=t.y-i.y,s=Math.sqrt(e*e+n*n);let o=Math.atan2(n,e);return o<-.5*H&&(o+=N),{angle:o,distance:s}}function Hi(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function vl(i,t){return(i-t+ml)%N-H}function rt(i){return(i%N+N)%N}function we(i,t,e,n){const s=rt(i),o=rt(t),a=rt(e),r=rt(o-s),l=rt(a-s),c=rt(s-o),h=rt(s-a);return s===o||s===a||n&&o===a||r>l&&c<h}function J(i,t,e){return Math.max(t,Math.min(e,i))}function wl(i){return J(i,-32768,32767)}function kt(i,t,e,n=1e-6){return i>=Math.min(t,e)-n&&i<=Math.max(t,e)+n}function Ni(i,t,e){e=e||(a=>i[a]<t);let n=i.length-1,s=0,o;for(;n-s>1;)o=s+n>>1,e(o)?s=o:n=o;return{lo:s,hi:n}}const At=(i,t,e,n)=>Ni(i,e,n?s=>{const o=i[s][t];return o<e||o===e&&i[s+1][t]===e}:s=>i[s][t]<e),kl=(i,t,e)=>Ni(i,e,n=>i[n][t]>=e);function Al(i,t,e){let n=0,s=i.length;for(;n<s&&i[n]<t;)n++;for(;s>n&&i[s-1]>e;)s--;return n>0||s<i.length?i.slice(n,s):i}const ls=["push","pop","shift","splice","unshift"];function Ml(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),ls.forEach(e=>{const n="_onData"+Bi(e),s=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const a=s.apply(this,o);return i._chartjs.listeners.forEach(r=>{typeof r[n]=="function"&&r[n](...o)}),a}})})}function cs(i,t){const e=i._chartjs;if(!e)return;const n=e.listeners,s=n.indexOf(t);s!==-1&&n.splice(s,1),!(n.length>0)&&(ls.forEach(o=>{delete i[o]}),delete i._chartjs)}function hs(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const ds=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function us(i,t){let e=[],n=!1;return function(...s){e=s,n||(n=!0,ds.call(window,()=>{n=!1,i.apply(t,e)}))}}function Pl(i,t){let e;return function(...n){return t?(clearTimeout(e),e=setTimeout(i,t,n)):i.apply(this,n),t}}const Gi=i=>i==="start"?"left":i==="end"?"right":"center",_=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Tl=(i,t,e,n)=>i===(n?"left":"right")?e:i==="center"?(t+e)/2:t;function fs(i,t,e){const n=t.length;let s=0,o=n;if(i._sorted){const{iScale:a,_parsed:r}=i,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(s=J(Math.min(At(r,l,c).lo,e?n:At(t,l,a.getPixelForValue(c)).lo),0,n-1)),u?o=J(Math.max(At(r,a.axis,h,!0).hi+1,e?0:At(t,l,a.getPixelForValue(h),!0).hi+1),s,n)-s:o=n-s}return{start:s,count:o}}function ps(i){const{xScale:t,yScale:e,_scaleRanges:n}=i,s={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!n)return i._scaleRanges=s,!0;const o=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==e.min||n.ymax!==e.max;return Object.assign(n,s),o}const _e=i=>i===0||i===1,gs=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*N/e)),ms=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*N/e)+1,ke={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*U)+1,easeOutSine:i=>Math.sin(i*U),easeInOutSine:i=>-.5*(Math.cos(H*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>_e(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>_e(i)?i:gs(i,.075,.3),easeOutElastic:i=>_e(i)?i:ms(i,.075,.3),easeInOutElastic(i){return _e(i)?i:i<.5?.5*gs(i*2,.1125,.45):.5+.5*ms(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-ke.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?ke.easeInBounce(i*2)*.5:ke.easeOutBounce(i*2-1)*.5+.5};function ji(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function bs(i){return ji(i)?i:new me(i)}function Yi(i){return ji(i)?i:new me(i).saturate(.5).darken(.1).hexString()}const Sl=["x","y","borderWidth","radius","tension"],Cl=["color","borderColor","backgroundColor"];function Ll(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:Cl},numbers:{type:"number",properties:Sl}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Ol(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const xs=new Map;function zl(i,t){t=t||{};const e=i+JSON.stringify(t);let n=xs.get(e);return n||(n=new Intl.NumberFormat(i,t),xs.set(e,n)),n}function Ae(i,t,e){return zl(t,e).format(i)}const ys={values(i){return W(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const n=this.chart.options.locale;let s,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=Vl(i,e)}const a=It(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Ae(i,n,l)},logarithmic(i,t,e){if(i===0)return"0";const n=e[t].significand||i/Math.pow(10,Math.floor(It(i)));return[1,2,3,5,10,15].includes(n)||t>.8*e.length?ys.numeric.call(this,i,t,e):""}};function Vl(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var $e={formatters:ys};function Il(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:$e.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Wt=Object.create(null),Ui=Object.create(null);function Me(i,t){if(!t)return i;const e=t.split(".");for(let n=0,s=e.length;n<s;++n){const o=e[n];i=i[o]||(i[o]=Object.create(null))}return i}function Zi(i,t,e){return typeof t=="string"?be(Me(i,t),e):be(Me(i,""),t)}class Dl{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,s)=>Yi(s.backgroundColor),this.hoverBorderColor=(n,s)=>Yi(s.borderColor),this.hoverColor=(n,s)=>Yi(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Zi(this,t,e)}get(t){return Me(this,t)}describe(t,e){return Zi(Ui,t,e)}override(t,e){return Zi(Wt,t,e)}route(t,e,n,s){const o=Me(this,t),a=Me(this,n),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[r],c=a[s];return I(l)?Object.assign({},c,l):O(l,c)},set(l){this[r]=l}}})}apply(t){t.forEach(e=>e(this))}}var Y=new Dl({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Ll,Ol,Il]);function Fl(i){return!i||F(i.size)||F(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function ti(i,t,e,n,s){let o=t[s];return o||(o=t[s]=i.measureText(s).width,e.push(s)),o>n&&(n=o),n}function El(i,t,e,n){n=n||{};let s=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(s=n.data={},o=n.garbageCollect=[],n.font=t),i.save(),i.font=t;let a=0;const r=e.length;let l,c,h,d,u;for(l=0;l<r;l++)if(d=e[l],d!=null&&!W(d))a=ti(i,s,o,a,d);else if(W(d))for(c=0,h=d.length;c<h;c++)u=d[c],u!=null&&!W(u)&&(a=ti(i,s,o,a,u));i.restore();const f=o.length/2;if(f>e.length){for(l=0;l<f;l++)delete s[o[l]];o.splice(0,f)}return a}function Ht(i,t,e){const n=i.currentDevicePixelRatio,s=e!==0?Math.max(e/2,.5):0;return Math.round((t-s)*n)/n+s}function vs(i,t){t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore()}function Ki(i,t,e,n){ws(i,t,e,n,null)}function ws(i,t,e,n,s){let o,a,r,l,c,h,d,u;const f=t.pointStyle,p=t.rotation,g=t.radius;let m=(p||0)*bl;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,n),i.rotate(m),i.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),i.restore();return}if(!(isNaN(g)||g<=0)){switch(i.beginPath(),f){default:s?i.ellipse(e,n,s/2,g,0,0,N):i.arc(e,n,g,0,N),i.closePath();break;case"triangle":h=s?s/2:g,i.moveTo(e+Math.sin(m)*h,n-Math.cos(m)*g),m+=ns,i.lineTo(e+Math.sin(m)*h,n-Math.cos(m)*g),m+=ns,i.lineTo(e+Math.sin(m)*h,n-Math.cos(m)*g),i.closePath();break;case"rectRounded":c=g*.516,l=g-c,a=Math.cos(m+Bt)*l,d=Math.cos(m+Bt)*(s?s/2-c:l),r=Math.sin(m+Bt)*l,u=Math.sin(m+Bt)*(s?s/2-c:l),i.arc(e-d,n-r,c,m-H,m-U),i.arc(e+u,n-a,c,m-U,m),i.arc(e+d,n+r,c,m,m+U),i.arc(e-u,n+a,c,m+U,m+H),i.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,h=s?s/2:l,i.rect(e-h,n-l,2*h,2*l);break}m+=Bt;case"rectRot":d=Math.cos(m)*(s?s/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),i.moveTo(e-d,n-r),i.lineTo(e+u,n-a),i.lineTo(e+d,n+r),i.lineTo(e-u,n+a),i.closePath();break;case"crossRot":m+=Bt;case"cross":d=Math.cos(m)*(s?s/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),i.moveTo(e-d,n-r),i.lineTo(e+d,n+r),i.moveTo(e+u,n-a),i.lineTo(e-u,n+a);break;case"star":d=Math.cos(m)*(s?s/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),i.moveTo(e-d,n-r),i.lineTo(e+d,n+r),i.moveTo(e+u,n-a),i.lineTo(e-u,n+a),m+=Bt,d=Math.cos(m)*(s?s/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),i.moveTo(e-d,n-r),i.lineTo(e+d,n+r),i.moveTo(e+u,n-a),i.lineTo(e-u,n+a);break;case"line":a=s?s/2:Math.cos(m)*g,r=Math.sin(m)*g,i.moveTo(e-a,n-r),i.lineTo(e+a,n+r);break;case"dash":i.moveTo(e,n),i.lineTo(e+Math.cos(m)*(s?s/2:g),n+Math.sin(m)*g);break;case!1:i.closePath();break}i.fill(),t.borderWidth>0&&i.stroke()}}function Mt(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.x<t.right+e&&i.y>t.top-e&&i.y<t.bottom+e}function ei(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function ii(i){i.restore()}function Rl(i,t,e,n,s){if(!t)return i.lineTo(e.x,e.y);if(s==="middle"){const o=(t.x+e.x)/2;i.lineTo(o,t.y),i.lineTo(o,e.y)}else s==="after"!=!!n?i.lineTo(t.x,e.y):i.lineTo(e.x,t.y);i.lineTo(e.x,e.y)}function Bl(i,t,e,n){if(!t)return i.lineTo(e.x,e.y);i.bezierCurveTo(n?t.cp1x:t.cp2x,n?t.cp1y:t.cp2y,n?e.cp2x:e.cp1x,n?e.cp2y:e.cp1y,e.x,e.y)}function Wl(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),F(t.rotation)||i.rotate(t.rotation),t.color&&(i.fillStyle=t.color),t.textAlign&&(i.textAlign=t.textAlign),t.textBaseline&&(i.textBaseline=t.textBaseline)}function Hl(i,t,e,n,s){if(s.strikethrough||s.underline){const o=i.measureText(n),a=t-o.actualBoundingBoxLeft,r=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,c=e+o.actualBoundingBoxDescent,h=s.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=s.decorationWidth||2,i.moveTo(a,h),i.lineTo(r,h),i.stroke()}}function Nl(i,t){const e=i.fillStyle;i.fillStyle=t.color,i.fillRect(t.left,t.top,t.width,t.height),i.fillStyle=e}function Nt(i,t,e,n,s,o={}){const a=W(t)?t:[t],r=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=s.string,Wl(i,o),l=0;l<a.length;++l)c=a[l],o.backdrop&&Nl(i,o.backdrop),r&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),F(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,e,n,o.maxWidth)),i.fillText(c,e,n,o.maxWidth),Hl(i,e,n,c,o),n+=Number(s.lineHeight);i.restore()}function Pe(i,t){const{x:e,y:n,w:s,h:o,radius:a}=t;i.arc(e+a.topLeft,n+a.topLeft,a.topLeft,1.5*H,H,!0),i.lineTo(e,n+o-a.bottomLeft),i.arc(e+a.bottomLeft,n+o-a.bottomLeft,a.bottomLeft,H,U,!0),i.lineTo(e+s-a.bottomRight,n+o),i.arc(e+s-a.bottomRight,n+o-a.bottomRight,a.bottomRight,U,0,!0),i.lineTo(e+s,n+a.topRight),i.arc(e+s-a.topRight,n+a.topRight,a.topRight,0,-U,!0),i.lineTo(e+a.topLeft,n)}const Gl=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,jl=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Yl(i,t){const e=(""+i).match(Gl);if(!e||e[1]==="normal")return t*1.2;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100;break}return t*i}const Ul=i=>+i||0;function Xi(i,t){const e={},n=I(t),s=n?Object.keys(t):t,o=I(i)?n?a=>O(i[a],i[t[a]]):a=>i[a]:()=>i;for(const a of s)e[a]=Ul(o(a));return e}function ks(i){return Xi(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Gt(i){return Xi(i,["topLeft","topRight","bottomLeft","bottomRight"])}function $(i){const t=ks(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function X(i,t){i=i||{},t=t||Y.font;let e=O(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let n=O(i.style,t.style);n&&!(""+n).match(jl)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:O(i.family,t.family),lineHeight:Yl(O(i.lineHeight,t.lineHeight),e),size:e,style:n,weight:O(i.weight,t.weight),string:""};return s.string=Fl(s),s}function Te(i,t,e,n){let s=!0,o,a,r;for(o=0,a=i.length;o<a;++o)if(r=i[o],r!==void 0&&(t!==void 0&&typeof r=="function"&&(r=r(t),s=!1),e!==void 0&&W(r)&&(r=r[e%r.length],s=!1),r!==void 0))return n&&!s&&(n.cacheable=!1),r}function Zl(i,t,e){const{min:n,max:s}=i,o=$n(t,(s-n)/2),a=(r,l)=>e&&r===0?0:r+l;return{min:a(n,-Math.abs(o)),max:a(s,o)}}function Dt(i,t){return Object.assign(Object.create(i),t)}function qi(i,t=[""],e,n,s=()=>i[0]){const o=e||i;typeof n>"u"&&(n=Ss("_fallback",i));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:n,_getTarget:s,override:r=>qi([r,...i],t,o,n)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete i[0][l],!0},get(r,l){return Ms(r,l,()=>tc(l,t,i,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(r,l){return Cs(r).includes(l)},ownKeys(r){return Cs(r)},set(r,l,c){const h=r._storage||(r._storage=s());return r[l]=h[l]=c,delete r._keys,!0}})}function oe(i,t,e,n){const s={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:As(i,n),setContext:o=>oe(i,o,e,n),override:o=>oe(i.override(o),t,e,n)};return new Proxy(s,{deleteProperty(o,a){return delete o[a],delete i[a],!0},get(o,a,r){return Ms(o,a,()=>Xl(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(i,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,a)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,a){return Reflect.has(i,a)},ownKeys(){return Reflect.ownKeys(i)},set(o,a,r){return i[a]=r,delete o[a],!0}})}function As(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:n=t.indexable,_allKeys:s=t.allKeys}=i;return{allKeys:s,scriptable:e,indexable:n,isScriptable:Vt(e)?e:()=>e,isIndexable:Vt(n)?n:()=>n}}const Kl=(i,t)=>i?i+Bi(t):t,Ji=(i,t)=>I(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Ms(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];const n=e();return i[t]=n,n}function Xl(i,t,e){const{_proxy:n,_context:s,_subProxy:o,_descriptors:a}=i;let r=n[t];return Vt(r)&&a.isScriptable(t)&&(r=ql(t,r,i,e)),W(r)&&r.length&&(r=Jl(t,r,i,a.isIndexable)),Ji(t,r)&&(r=oe(r,s,o&&o[t],a)),r}function ql(i,t,e,n){const{_proxy:s,_context:o,_subProxy:a,_stack:r}=e;if(r.has(i))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+i);r.add(i);let l=t(o,a||n);return r.delete(i),Ji(i,l)&&(l=Qi(s._scopes,s,i,l)),l}function Jl(i,t,e,n){const{_proxy:s,_context:o,_subProxy:a,_descriptors:r}=e;if(typeof o.index<"u"&&n(i))return t[o.index%t.length];if(I(t[0])){const l=t,c=s._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=Qi(c,s,i,h);t.push(oe(d,o,a&&a[i],r))}}return t}function Ps(i,t,e){return Vt(i)?i(t,e):i}const Ql=(i,t)=>i===!0?t:typeof i=="string"?zt(t,i):void 0;function _l(i,t,e,n,s){for(const o of t){const a=Ql(e,o);if(a){i.add(a);const r=Ps(a._fallback,e,s);if(typeof r<"u"&&r!==e&&r!==n)return r}else if(a===!1&&typeof n<"u"&&e!==n)return null}return!1}function Qi(i,t,e,n){const s=t._rootScopes,o=Ps(t._fallback,e,n),a=[...i,...s],r=new Set;r.add(n);let l=Ts(r,a,e,o||e,n);return l===null||typeof o<"u"&&o!==e&&(l=Ts(r,a,o,l,n),l===null)?!1:qi(Array.from(r),[""],s,o,()=>$l(t,e,n))}function Ts(i,t,e,n,s){for(;e;)e=_l(i,t,e,n,s);return e}function $l(i,t,e){const n=i._getTarget();t in n||(n[t]={});const s=n[t];return W(s)&&I(e)?e:s||{}}function tc(i,t,e,n){let s;for(const o of t)if(s=Ss(Kl(o,i),e),typeof s<"u")return Ji(i,s)?Qi(e,n,i,s):s}function Ss(i,t){for(const e of t){if(!e)continue;const n=e[i];if(typeof n<"u")return n}}function Cs(i){let t=i._keys;return t||(t=i._keys=ec(i._scopes)),t}function ec(i){const t=new Set;for(const e of i)for(const n of Object.keys(e).filter(s=>!s.startsWith("_")))t.add(n);return Array.from(t)}function Ls(i,t,e,n){const{iScale:s}=i,{key:o="r"}=this._parsing,a=new Array(n);let r,l,c,h;for(r=0,l=n;r<l;++r)c=r+e,h=t[c],a[r]={r:s.parse(zt(h,o),c)};return a}const ic=Number.EPSILON||1e-14,ae=(i,t)=>t<i.length&&!i[t].skip&&i[t],Os=i=>i==="x"?"y":"x";function nc(i,t,e,n){const s=i.skip?t:i,o=t,a=e.skip?t:e,r=Hi(o,s),l=Hi(a,o);let c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:o.x-d*(a.x-s.x),y:o.y-d*(a.y-s.y)},next:{x:o.x+u*(a.x-s.x),y:o.y+u*(a.y-s.y)}}}function sc(i,t,e){const n=i.length;let s,o,a,r,l,c=ae(i,0);for(let h=0;h<n-1;++h)if(l=c,c=ae(i,h+1),!(!l||!c)){if(ve(t[h],0,ic)){e[h]=e[h+1]=0;continue}s=e[h]/t[h],o=e[h+1]/t[h],r=Math.pow(s,2)+Math.pow(o,2),!(r<=9)&&(a=3/Math.sqrt(r),e[h]=s*a*t[h],e[h+1]=o*a*t[h])}}function oc(i,t,e="x"){const n=Os(e),s=i.length;let o,a,r,l=ae(i,0);for(let c=0;c<s;++c){if(a=r,r=l,l=ae(i,c+1),!r)continue;const h=r[e],d=r[n];a&&(o=(h-a[e])/3,r[`cp1${e}`]=h-o,r[`cp1${n}`]=d-o*t[c]),l&&(o=(l[e]-h)/3,r[`cp2${e}`]=h+o,r[`cp2${n}`]=d+o*t[c])}}function ac(i,t="x"){const e=Os(t),n=i.length,s=Array(n).fill(0),o=Array(n);let a,r,l,c=ae(i,0);for(a=0;a<n;++a)if(r=l,l=c,c=ae(i,a+1),!!l){if(c){const h=c[t]-l[t];s[a]=h!==0?(c[e]-l[e])/h:0}o[a]=r?c?pt(s[a-1])!==pt(s[a])?0:(s[a-1]+s[a])/2:s[a-1]:s[a]}sc(i,s,o),oc(i,o,t)}function ni(i,t,e){return Math.max(Math.min(i,e),t)}function rc(i,t){let e,n,s,o,a,r=Mt(i[0],t);for(e=0,n=i.length;e<n;++e)a=o,o=r,r=e<n-1&&Mt(i[e+1],t),o&&(s=i[e],a&&(s.cp1x=ni(s.cp1x,t.left,t.right),s.cp1y=ni(s.cp1y,t.top,t.bottom)),r&&(s.cp2x=ni(s.cp2x,t.left,t.right),s.cp2y=ni(s.cp2y,t.top,t.bottom)))}function lc(i,t,e,n,s){let o,a,r,l;if(t.spanGaps&&(i=i.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")ac(i,s);else{let c=n?i[i.length-1]:i[0];for(o=0,a=i.length;o<a;++o)r=i[o],l=nc(c,r,i[Math.min(o+1,a-(n?0:1))%a],t.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,c=r}t.capBezierPoints&&rc(i,e)}function zs(){return typeof window<"u"&&typeof document<"u"}function _i(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function si(i,t,e){let n;return typeof i=="string"?(n=parseInt(i,10),i.indexOf("%")!==-1&&(n=n/100*t.parentNode[e])):n=i,n}const oi=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function cc(i,t){return oi(i).getPropertyValue(t)}const hc=["top","right","bottom","left"];function jt(i,t,e){const n={};e=e?"-"+e:"";for(let s=0;s<4;s++){const o=hc[s];n[o]=parseFloat(i[t+"-"+o+e])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const dc=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function uc(i,t){const e=i.touches,n=e&&e.length?e[0]:i,{offsetX:s,offsetY:o}=n;let a=!1,r,l;if(dc(s,o,i.target))r=s,l=o;else{const c=t.getBoundingClientRect();r=n.clientX-c.left,l=n.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function Yt(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:n}=t,s=oi(e),o=s.boxSizing==="border-box",a=jt(s,"padding"),r=jt(s,"border","width"),{x:l,y:c,box:h}=uc(i,e),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:p}=t;return o&&(f-=a.width+r.width,p-=a.height+r.height),{x:Math.round((l-d)/f*e.width/n),y:Math.round((c-u)/p*e.height/n)}}function fc(i,t,e){let n,s;if(t===void 0||e===void 0){const o=_i(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const a=o.getBoundingClientRect(),r=oi(o),l=jt(r,"border","width"),c=jt(r,"padding");t=a.width-c.width-l.width,e=a.height-c.height-l.height,n=si(r.maxWidth,o,"clientWidth"),s=si(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:n||Qe,maxHeight:s||Qe}}const ai=i=>Math.round(i*10)/10;function pc(i,t,e,n){const s=oi(i),o=jt(s,"margin"),a=si(s.maxWidth,i,"clientWidth")||Qe,r=si(s.maxHeight,i,"clientHeight")||Qe,l=fc(i,t,e);let{width:c,height:h}=l;if(s.boxSizing==="content-box"){const u=jt(s,"border","width"),f=jt(s,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?c/n:h-o.height),c=ai(Math.min(c,a,l.maxWidth)),h=ai(Math.min(h,r,l.maxHeight)),c&&!h&&(h=ai(c/2)),(t!==void 0||e!==void 0)&&n&&l.height&&h>l.height&&(h=l.height,c=ai(Math.floor(h*n))),{width:c,height:h}}function Vs(i,t,e){const n=t||1,s=Math.floor(i.height*n),o=Math.floor(i.width*n);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const a=i.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${i.height}px`,a.style.width=`${i.width}px`),i.currentDevicePixelRatio!==n||a.height!==s||a.width!==o?(i.currentDevicePixelRatio=n,a.height=s,a.width=o,i.ctx.setTransform(n,0,0,n,0,0),!0):!1}const gc=function(){let i=!1;try{const t={get passive(){return i=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return i}();function Is(i,t){const e=cc(i,t),n=e&&e.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Ut(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function mc(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:n==="middle"?e<.5?i.y:t.y:n==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function bc(i,t,e,n){const s={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},a=Ut(i,s,e),r=Ut(s,o,e),l=Ut(o,t,e),c=Ut(a,r,e),h=Ut(r,l,e);return Ut(c,h,e)}const xc=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,n){return e-n},leftForLtr(e,n){return e-n}}},yc=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function re(i,t,e){return i?xc(t,e):yc()}function Ds(i,t){let e,n;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,n=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=n)}function Fs(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function Es(i){return i==="angle"?{between:we,compare:vl,normalize:rt}:{between:kt,compare:(t,e)=>t-e,normalize:t=>t}}function Rs({start:i,end:t,count:e,loop:n,style:s}){return{start:i%e,end:t%e,loop:n&&(t-i+1)%e===0,style:s}}function vc(i,t,e){const{property:n,start:s,end:o}=e,{between:a,normalize:r}=Es(n),l=t.length;let{start:c,end:h,loop:d}=i,u,f;if(d){for(c+=l,h+=l,u=0,f=l;u<f&&a(r(t[c%l][n]),s,o);++u)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:i.style}}function Bs(i,t,e){if(!e)return[i];const{property:n,start:s,end:o}=e,a=t.length,{compare:r,between:l,normalize:c}=Es(n),{start:h,end:d,loop:u,style:f}=vc(i,t,e),p=[];let g=!1,m=null,x,y,M;const A=()=>l(s,M,x)&&r(s,M)!==0,k=()=>r(o,x)===0||l(o,M,x),T=()=>g||A(),S=()=>!g||k();for(let C=h,L=h;C<=d;++C)y=t[C%a],!y.skip&&(x=c(y[n]),x!==M&&(g=l(x,s,o),m===null&&T()&&(m=r(x,s)===0?C:L),m!==null&&S()&&(p.push(Rs({start:m,end:C,loop:u,count:a,style:f})),m=null),L=C,M=x));return m!==null&&p.push(Rs({start:m,end:d,loop:u,count:a,style:f})),p}function Ws(i,t){const e=[],n=i.segments;for(let s=0;s<n.length;s++){const o=Bs(n[s],i.points,t);o.length&&e.push(...o)}return e}function wc(i,t,e,n){let s=0,o=t-1;if(e&&!n)for(;s<t&&!i[s].skip;)s++;for(;s<t&&i[s].skip;)s++;for(s%=t,e&&(o+=s);o>s&&i[o%t].skip;)o--;return o%=t,{start:s,end:o}}function kc(i,t,e,n){const s=i.length,o=[];let a=t,r=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%s];c.skip||c.stop?r.skip||(n=!1,o.push({start:t%s,end:(l-1)%s,loop:n}),t=a=c.stop?l:null):(a=l,r.skip&&(t=l)),r=c}return a!==null&&o.push({start:t%s,end:a%s,loop:n}),o}function Ac(i,t){const e=i.points,n=i.options.spanGaps,s=e.length;if(!s)return[];const o=!!i._loop,{start:a,end:r}=wc(e,s,o,n);if(n===!0)return Hs(i,[{start:a,end:r,loop:o}],e,t);const l=r<a?r+s:r,c=!!i._fullLoop&&a===0&&r===s-1;return Hs(i,kc(e,a,l,c),e,t)}function Hs(i,t,e,n){return!n||!n.setContext||!e?t:Mc(i,t,e,n)}function Mc(i,t,e,n){const s=i._chart.getContext(),o=Ns(i.options),{_datasetIndex:a,options:{spanGaps:r}}=i,l=e.length,c=[];let h=o,d=t[0].start,u=d;function f(p,g,m,x){const y=r?-1:1;if(p!==g){for(p+=l;e[p%l].skip;)p-=y;for(;e[g%l].skip;)g+=y;p%l!==g%l&&(c.push({start:p%l,end:g%l,loop:m,style:x}),h=x,d=g%l)}}for(const p of t){d=r?d:p.start;let g=e[d%l],m;for(u=d+1;u<=p.end;u++){const x=e[u%l];m=Ns(n.setContext(Dt(s,{type:"segment",p0:g,p1:x,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:a}))),Pc(m,h)&&f(d,u-1,p.loop,h),g=x,h=m}d<u-1&&f(d,u-1,p.loop,h)}return c}function Ns(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Pc(i,t){if(!t)return!1;const e=[],n=function(s,o){return ji(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(i,n)!==JSON.stringify(t,n)}/*!
1397
1397
  * Chart.js v4.4.0
1398
1398
  * https://www.chartjs.org
1399
1399
  * (c) 2023 Chart.js Contributors
1400
1400
  * Released under the MIT License
1401
- */class Pc{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,s){const o=e.listeners[s],a=e.duration;o.forEach(r=>r({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(n-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=hs.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;const o=n.items;let a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(s.draw(),this._notify(s,n,t,"progress")),o.length||(n.running=!1,this._notify(s,n,t,"complete"),n.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((n,s)=>Math.max(n,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let s=n.length-1;for(;s>=0;--s)n[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Pt=new Pc;const Ns="transparent",Tc={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const n=ms(i||Ns),s=n.valid&&ms(t||Ns);return s&&s.valid?s.mix(n,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class Sc{constructor(t,e,n,s){const o=e[n];s=Te([t.to,s,o,t.from]);const a=Te([t.from,o,s]);this._active=!0,this._fn=t.fn||Tc[t.type||typeof a],this._easing=ke[t.easing]||ke.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const s=this._target[this._prop],o=n-this._start,a=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Te([t.to,e,s,t.from]),this._from=Te([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,s=this._prop,o=this._from,a=this._loop,r=this._to;let l;if(this._active=o!==r&&(a||e<n),!this._active){this._target[s]=r,this._notify(!0);return}if(e<0){this._target[s]=o;return}l=e/n%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,r,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let s=0;s<n.length;s++)n[s][e]()}}class Gs{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!I(t))return;const e=Object.keys(Y.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const o=t[s];if(!I(o))return;const a={};for(const r of e)a[r]=o[r];(W(o.properties)&&o.properties||[s]).forEach(r=>{(r===s||!n.has(r))&&n.set(r,a)})})}_animateOptions(t,e){const n=e.options,s=Lc(t,n);if(!s)return[];const o=this._createAnimations(s,n);return n.$shared&&Cc(t.options.$animations,n).then(()=>{t.options=n},()=>{}),o}_createAnimations(t,e){const n=this._properties,s=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const u=n.get(c);if(d)if(u&&d.active()){d.update(u,h,r);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new Sc(u,t,c,h),s.push(d)}return s}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const n=this._createAnimations(t,e);if(n.length)return Pt.add(this._chart,n),!0}}function Cc(i,t){const e=[],n=Object.keys(t);for(let s=0;s<n.length;s++){const o=i[n[s]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function Lc(i,t){if(!t)return;let e=i.options;if(!e){i.options=t;return}return e.$shared&&(i.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function js(i,t){const e=i&&i.options||{},n=e.reverse,s=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:n?o:s,end:n?s:o}}function Oc(i,t,e){if(e===!1)return!1;const n=js(i,e),s=js(t,e);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}function zc(i){let t,e,n,s;return I(i)?(t=i.top,e=i.right,n=i.bottom,s=i.left):t=e=n=s=i,{top:t,right:e,bottom:n,left:s,disabled:i===!1}}function Ys(i,t){const e=[],n=i._getSortedDatasetMetas(t);let s,o;for(s=0,o=n.length;s<o;++s)e.push(n[s].index);return e}function Us(i,t,e,n={}){const s=i.keys,o=n.mode==="single";let a,r,l,c;if(t!==null){for(a=0,r=s.length;a<r;++a){if(l=+s[a],l===e){if(n.all)continue;break}c=i.values[l],j(c)&&(o||t===0||pt(t)===pt(c))&&(t+=c)}return t}}function Vc(i){const t=Object.keys(i),e=new Array(t.length);let n,s,o;for(n=0,s=t.length;n<s;++n)o=t[n],e[n]={x:o,y:i[o]};return e}function Zs(i,t){const e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function Ic(i,t,e){return`${i.id}.${t.id}.${e.stack||e.type}`}function Dc(i){const{min:t,max:e,minDefined:n,maxDefined:s}=i.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:s?e:Number.POSITIVE_INFINITY}}function Fc(i,t,e){const n=i[t]||(i[t]={});return n[e]||(n[e]={})}function Ks(i,t,e,n){for(const s of t.getMatchingVisibleMetas(n).reverse()){const o=i[s.index];if(e&&o>0||!e&&o<0)return s.index}return null}function Xs(i,t){const{chart:e,_cachedMeta:n}=i,s=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=n,l=o.axis,c=a.axis,h=Ic(o,a,n),d=t.length;let u;for(let f=0;f<d;++f){const p=t[f],{[l]:g,[c]:m}=p,x=p._stacks||(p._stacks={});u=x[c]=Fc(s,h,g),u[r]=m,u._top=Ks(u,a,!0,n.type),u._bottom=Ks(u,a,!1,n.type);const y=u._visualValues||(u._visualValues={});y[r]=m}}function $i(i,t){const e=i.scales;return Object.keys(e).filter(n=>e[n].axis===t).shift()}function Ec(i,t){return Dt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Rc(i,t,e){return Dt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Se(i,t){const e=i.controller.index,n=i.vScale&&i.vScale.axis;if(n){t=t||i._parsed;for(const s of t){const o=s._stacks;if(!o||o[n]===void 0||o[n][e]===void 0)return;delete o[n][e],o[n]._visualValues!==void 0&&o[n]._visualValues[e]!==void 0&&delete o[n]._visualValues[e]}}}const tn=i=>i==="reset"||i==="none",qs=(i,t)=>t?i:Object.assign({},i),Bc=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:Ys(e,!0),values:null};class dt{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Zs(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&&Se(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),s=(d,u,f,p)=>d==="x"?u:d==="r"?p:f,o=e.xAxisID=O(n.xAxisID,$i(t,"x")),a=e.yAxisID=O(n.yAxisID,$i(t,"y")),r=e.rAxisID=O(n.rAxisID,$i(t,"r")),l=e.indexAxis,c=e.iAxisID=s(l,o,a,r),h=e.vAxisID=s(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ls(this._data,this),t._stacked&&Se(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(I(e))this._data=Vc(e);else if(n!==e){if(n){ls(n,this);const s=this._cachedMeta;Se(s),s._parsed=[]}e&&Object.isExtensible(e)&&Al(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let s=!1;this._dataCheck();const o=e._stacked;e._stacked=Zs(e.vScale,e),e.stack!==n.stack&&(s=!0,Se(e),e.stack=n.stack),this._resyncElements(t),(s||o!==e._stacked)&&Xs(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:s}=this,{iScale:o,_stacked:a}=n,r=o.axis;let l=t===0&&e===s.length?!0:n._sorted,c=t>0&&n._parsed[t-1],h,d,u;if(this._parsing===!1)n._parsed=s,n._sorted=!0,u=s;else{W(s[t])?u=this.parseArrayData(n,s,t,e):I(s[t])?u=this.parseObjectData(n,s,t,e):u=this.parsePrimitiveData(n,s,t,e);const f=()=>d[r]===null||c&&d[r]<c[r];for(h=0;h<e;++h)n._parsed[h+t]=d=u[h],l&&(f()&&(l=!1),c=d);n._sorted=l}a&&Xs(this,u)}parsePrimitiveData(t,e,n,s){const{iScale:o,vScale:a}=t,r=o.axis,l=a.axis,c=o.getLabels(),h=o===a,d=new Array(s);let u,f,p;for(u=0,f=s;u<f;++u)p=u+n,d[u]={[r]:h||o.parse(c[p],p),[l]:a.parse(e[p],p)};return d}parseArrayData(t,e,n,s){const{xScale:o,yScale:a}=t,r=new Array(s);let l,c,h,d;for(l=0,c=s;l<c;++l)h=l+n,d=e[h],r[l]={x:o.parse(d[0],h),y:a.parse(d[1],h)};return r}parseObjectData(t,e,n,s){const{xScale:o,yScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,c=new Array(s);let h,d,u,f;for(h=0,d=s;h<d;++h)u=h+n,f=e[u],c[h]={x:o.parse(zt(f,r),u),y:a.parse(zt(f,l),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const s=this.chart,o=this._cachedMeta,a=e[t.axis],r={keys:Ys(s,!0),values:e._stacks[t.axis]._visualValues};return Us(r,a,o.index,{mode:n})}updateRangeFromParsed(t,e,n,s){const o=n[e.axis];let a=o===null?NaN:o;const r=s&&n._stacks[e.axis];s&&r&&(s.values=r,a=Us(s,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const n=this._cachedMeta,s=n._parsed,o=n._sorted&&t===n.iScale,a=s.length,r=this._getOtherScale(t),l=Bc(e,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=Dc(r);let u,f;function p(){f=s[u];const g=f[r.axis];return!j(f[t.axis])||h>g||d<g}for(u=0;u<a&&!(!p()&&(this.updateRangeFromParsed(c,t,f,l),o));++u);if(o){for(u=a-1;u>=0;--u)if(!p()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let s,o,a;for(s=0,o=e.length;s<o;++s)a=e[s][t.axis],j(a)&&n.push(a);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,s=e.vScale,o=this.getParsed(t);return{label:n?""+n.getLabelForValue(o[n.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=zc(O(this.options.clip,Oc(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,s=n.data||[],o=e.chartArea,a=[],r=this._drawStart||0,l=this._drawCount||s.length-r,c=this.options.drawActiveElementsOnTop;let h;for(n.dataset&&n.dataset.draw(t,o,r,l),h=r;h<r+l;++h){const d=s[h];d.hidden||(d.active&&c?a.push(d):d.draw(t,o))}for(h=0;h<a.length;++h)a[h].draw(t,o)}getStyle(t,e){const n=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const s=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=Rc(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=s.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=Ec(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=n,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const s=e==="active",o=this._cachedDataOpts,a=t+"-"+e,r=o[a],l=this.enableOptionSharing&&ye(n);if(r)return qs(r,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),d=s?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),h),f=Object.keys(Y.elements[t]),p=()=>this.getContext(n,s,e),g=c.resolveNamedOptions(u,f,p,d);return g.$shared&&(g.$shared=l,o[a]=Object.freeze(qs(g,l))),g}_resolveAnimations(t,e,n){const s=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(s.options.animation!==!1){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,n,e))}const c=new Gs(s,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||tn(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),s=this._sharedOptions,o=this.getSharedOptions(n),a=this.includeOptions(e,o)||o!==s;return this.updateSharedOptions(o,e,n),{sharedOptions:o,includeOptions:a}}updateElement(t,e,n,s){tn(s)?Object.assign(t,n):this._resolveAnimations(e,s).update(t,n)}updateSharedOptions(t,e,n){t&&!tn(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,s){t.active=s;const o=this.getStyle(e,s);this._resolveAnimations(e,n,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[r,l,c]of this._syncList)this[r](l,c);this._syncList=[];const s=n.length,o=e.length,a=Math.min(o,s);a&&this.parse(0,a),o>s?this._insertElements(s,o-s,t):o<s&&this._removeElements(o,s-o)}_insertElements(t,e,n=!0){const s=this._cachedMeta,o=s.data,a=t+e;let r;const l=c=>{for(c.length+=e,r=c.length-1;r>=a;r--)c[r]=c[r-e]};for(l(o),r=t;r<a;++r)o[r]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,e),n&&this.updateElements(o,t,e,"reset")}updateElements(t,e,n,s){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const s=n._parsed.splice(t,e);n._stacked&&Se(n,s)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,s]=t;this[e](n,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}P(dt,"defaults",{}),P(dt,"datasetElementType",null),P(dt,"dataElementType",null);function Wc(i,t){if(!i._cache.$bar){const e=i.getMatchingVisibleMetas(t);let n=[];for(let s=0,o=e.length;s<o;s++)n=n.concat(e[s].controller.getAllParsedValues(i));i._cache.$bar=cs(n.sort((s,o)=>s-o))}return i._cache.$bar}function Hc(i){const t=i.iScale,e=Wc(t,i.type);let n=t._length,s,o,a,r;const l=()=>{a===32767||a===-32768||(ye(r)&&(n=Math.min(n,Math.abs(a-r)||n)),r=a)};for(s=0,o=e.length;s<o;++s)a=t.getPixelForValue(e[s]),l();for(r=void 0,s=0,o=t.ticks.length;s<o;++s)a=t.getPixelForTick(s),l();return n}function Nc(i,t,e,n){const s=e.barThickness;let o,a;return F(s)?(o=t.min*e.categoryPercentage,a=e.barPercentage):(o=s*n,a=1),{chunk:o/n,ratio:a,start:t.pixels[i]-o/2}}function Gc(i,t,e,n){const s=t.pixels,o=s[i];let a=i>0?s[i-1]:null,r=i<s.length-1?s[i+1]:null;const l=e.categoryPercentage;a===null&&(a=o-(r===null?t.end-t.start:r-o)),r===null&&(r=o+o-a);const c=o-(o-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/n,ratio:e.barPercentage,start:c}}function jc(i,t,e,n){const s=e.parse(i[0],n),o=e.parse(i[1],n),a=Math.min(s,o),r=Math.max(s,o);let l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:s,end:o,min:a,max:r}}function Js(i,t,e,n){return W(i)?jc(i,t,e,n):t[e.axis]=e.parse(i,n),t}function Qs(i,t,e,n){const s=i.iScale,o=i.vScale,a=s.getLabels(),r=s===o,l=[];let c,h,d,u;for(c=e,h=e+n;c<h;++c)u=t[c],d={},d[s.axis]=r||s.parse(a[c],c),l.push(Js(u,d,o,c));return l}function en(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function Yc(i,t,e){return i!==0?pt(i):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Uc(i){let t,e,n,s,o;return i.horizontal?(t=i.base>i.x,e="left",n="right"):(t=i.base<i.y,e="bottom",n="top"),t?(s="end",o="start"):(s="start",o="end"),{start:e,end:n,reverse:t,top:s,bottom:o}}function Zc(i,t,e,n){let s=t.borderSkipped;const o={};if(!s){i.borderSkipped=o;return}if(s===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:r,reverse:l,top:c,bottom:h}=Uc(i);s==="middle"&&e&&(i.enableBorderRadius=!0,(e._top||0)===n?s=c:(e._bottom||0)===n?s=h:(o[_s(h,a,r,l)]=!0,s=c)),o[_s(s,a,r,l)]=!0,i.borderSkipped=o}function _s(i,t,e,n){return n?(i=Kc(i,t,e),i=$s(i,e,t)):i=$s(i,t,e),i}function Kc(i,t,e){return i===t?e:i===e?t:i}function $s(i,t,e){return i==="start"?t:i==="end"?e:i}function Xc(i,{inflateAmount:t},e){i.inflateAmount=t==="auto"?e===1?.33:0:t}class ri extends dt{parsePrimitiveData(t,e,n,s){return Qs(t,e,n,s)}parseArrayData(t,e,n,s){return Qs(t,e,n,s)}parseObjectData(t,e,n,s){const{iScale:o,vScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?r:l,h=a.axis==="x"?r:l,d=[];let u,f,p,g;for(u=n,f=n+s;u<f;++u)g=e[u],p={},p[o.axis]=o.parse(zt(g,c),u),d.push(Js(zt(g,h),p,a,u));return d}updateRangeFromParsed(t,e,n,s){super.updateRangeFromParsed(t,e,n,s);const o=n._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:n,vScale:s}=e,o=this.getParsed(t),a=o._custom,r=en(a)?"["+a.start+", "+a.end+"]":""+s.getLabelForValue(o[s.axis]);return{label:""+n.getLabelForValue(o[n.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,s){const o=s==="reset",{index:a,_cachedMeta:{vScale:r}}=this,l=r.getBasePixel(),c=r.isHorizontal(),h=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,s);for(let f=e;f<e+n;f++){const p=this.getParsed(f),g=o||F(p[r.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,h),x=(p._stacks||{})[r.axis],y={horizontal:c,base:g.base,enableBorderRadius:!x||en(p._custom)||a===x._top||a===x._bottom,x:c?g.head:m.center,y:c?m.center:g.head,height:c?m.size:Math.abs(g.size),width:c?Math.abs(g.size):m.size};u&&(y.options=d||this.resolveDataElementOptions(f,t[f].active?"active":s));const M=y.options||t[f].options;Zc(y,M,x,a),Xc(y,M,h.ratio),this.updateElement(t[f],f,y,s)}}_getStacks(t,e){const{iScale:n}=this._cachedMeta,s=n.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=n.options.stacked,a=[],r=l=>{const c=l.controller.getParsed(e),h=c&&c[l.vScale.axis];if(F(h)||isNaN(h))return!0};for(const l of s)if(!(e!==void 0&&r(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,n){const s=this._getStacks(t,n),o=e!==void 0?s.indexOf(e):-1;return o===-1?s.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,s=[];let o,a;for(o=0,a=e.data.length;o<a;++o)s.push(n.getPixelForValue(this.getParsed(o)[n.axis],o));const r=t.barThickness;return{min:r||Hc(e),pixels:s,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:n,index:s},options:{base:o,minBarLength:a}}=this,r=o||0,l=this.getParsed(t),c=l._custom,h=en(c);let d=l[e.axis],u=0,f=n?this.applyStack(e,l,n):d,p,g;f!==d&&(u=f-d,f=d),h&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&pt(d)!==pt(c.barEnd)&&(u=0),u+=d);const m=!F(o)&&!h?o:u;let x=e.getPixelForValue(m);if(this.chart.getDataVisibility(t)?p=e.getPixelForValue(u+f):p=x,g=p-x,Math.abs(g)<a){g=Yc(g,e,r)*a,d===r&&(x-=g/2);const y=e.getPixelForDecimal(0),M=e.getPixelForDecimal(1),A=Math.min(y,M),k=Math.max(y,M);x=Math.max(Math.min(x,k),A),p=x+g,n&&!h&&(l._stacks[e.axis]._visualValues[s]=e.getValueForPixel(p)-e.getValueForPixel(x))}if(x===e.getPixelForValue(r)){const y=pt(g)*e.getLineWidthForValue(r)/2;x+=y,g-=y}return{size:g,base:x,head:p,center:p+g/2}}_calculateBarIndexPixels(t,e){const n=e.scale,s=this.options,o=s.skipNull,a=O(s.maxBarThickness,1/0);let r,l;if(e.grouped){const c=o?this._getStackCount(t):e.stackCount,h=s.barThickness==="flex"?Gc(t,e,s,c):Nc(t,e,s,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);r=h.start+h.chunk*d+h.chunk/2,l=Math.min(a,h.chunk*h.ratio)}else r=n.getPixelForValue(this.getParsed(t)[n.axis],t),l=Math.min(a,e.min*e.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,n=t.data,s=n.length;let o=0;for(;o<s;++o)this.getParsed(o)[e.axis]!==null&&n[o].draw(this._ctx)}}P(ri,"id","bar"),P(ri,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),P(ri,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class li extends dt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,n,s){const o=super.parsePrimitiveData(t,e,n,s);for(let a=0;a<o.length;a++)o[a]._custom=this.resolveDataElementOptions(a+n).radius;return o}parseArrayData(t,e,n,s){const o=super.parseArrayData(t,e,n,s);for(let a=0;a<o.length;a++){const r=e[n+a];o[a]._custom=O(r[2],this.resolveDataElementOptions(a+n).radius)}return o}parseObjectData(t,e,n,s){const o=super.parseObjectData(t,e,n,s);for(let a=0;a<o.length;a++){const r=e[n+a];o[a]._custom=O(r&&r.r&&+r.r,this.resolveDataElementOptions(a+n).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:s,yScale:o}=e,a=this.getParsed(t),r=s.getLabelForValue(a.x),l=o.getLabelForValue(a.y),c=a._custom;return{label:n[t]||"",value:"("+r+", "+l+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,s){const o=s==="reset",{iScale:a,vScale:r}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,s),h=a.axis,d=r.axis;for(let u=e;u<e+n;u++){const f=t[u],p=!o&&this.getParsed(u),g={},m=g[h]=o?a.getPixelForDecimal(.5):a.getPixelForValue(p[h]),x=g[d]=o?r.getBasePixel():r.getPixelForValue(p[d]);g.skip=isNaN(m)||isNaN(x),c&&(g.options=l||this.resolveDataElementOptions(u,f.active?"active":s),o&&(g.options.radius=0)),this.updateElement(f,u,g,s)}}resolveDataElementOptions(t,e){const n=this.getParsed(t);let s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const o=s.radius;return e!=="active"&&(s.radius=0),s.radius+=O(n&&n._custom,o),s}}P(li,"id","bubble"),P(li,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),P(li,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function qc(i,t,e){let n=1,s=1,o=0,a=0;if(t<N){const r=i,l=r+t,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(M,A,k)=>we(M,r,l,!0)?1:Math.max(A,A*e,k,k*e),p=(M,A,k)=>we(M,r,l,!0)?-1:Math.min(A,A*e,k,k*e),g=f(0,c,d),m=f(U,h,u),x=p(H,c,d),y=p(H+U,h,u);n=(g-x)/2,s=(m-y)/2,o=-(g+x)/2,a=-(m+y)/2}return{ratioX:n,ratioY:s,offsetX:o,offsetY:a}}class Zt extends dt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=n;else{let o=l=>+n[l];if(I(n[t])){const{key:l="value"}=this._parsing;o=c=>+zt(n[c],l)}let a,r;for(a=t,r=t+e;a<r;++a)s._parsed[a]=o(a)}}_getRotation(){return ht(this.options.rotation-90)}_getCircumference(){return ht(this.options.circumference)}_getRotationExtents(){let t=N,e=-N;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const s=this.chart.getDatasetMeta(n).controller,o=s._getRotation(),a=s._getCircumference();t=Math.min(t,o),e=Math.max(e,o+a)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:n}=e,s=this._cachedMeta,o=s.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(n.width,n.height)-a)/2,0),l=Math.min(cl(this.options.cutout,r),1),c=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:p,offsetY:g}=qc(d,h,l),m=(n.width-a)/u,x=(n.height-a)/f,y=Math.max(Math.min(m,x)/2,0),M=_n(this.options.radius,y),A=Math.max(M*l,0),k=(M-A)/this._getVisibleDatasetWeightTotal();this.offsetX=p*M,this.offsetY=g*M,s.total=this.calculateTotal(),this.outerRadius=M-k*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-k*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const n=this.options,s=this._cachedMeta,o=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*o/N)}updateElements(t,e,n,s){const o=s==="reset",a=this.chart,r=a.chartArea,c=a.options.animation,h=(r.left+r.right)/2,d=(r.top+r.bottom)/2,u=o&&c.animateScale,f=u?0:this.innerRadius,p=u?0:this.outerRadius,{sharedOptions:g,includeOptions:m}=this._getSharedOptions(e,s);let x=this._getRotation(),y;for(y=0;y<e;++y)x+=this._circumference(y,o);for(y=e;y<e+n;++y){const M=this._circumference(y,o),A=t[y],k={x:h+this.offsetX,y:d+this.offsetY,startAngle:x,endAngle:x+M,circumference:M,outerRadius:p,innerRadius:f};m&&(k.options=g||this.resolveDataElementOptions(y,A.active?"active":s)),x+=M,this.updateElement(A,y,k,s)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let n=0,s;for(s=0;s<e.length;s++){const o=t._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!e[s].hidden&&(n+=Math.abs(o))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?N*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=Ae(e._parsed[t],n.options.locale);return{label:s[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const n=this.chart;let s,o,a,r,l;if(!t){for(s=0,o=n.data.datasets.length;s<o;++s)if(n.isDatasetVisible(s)){a=n.getDatasetMeta(s),t=a.data,r=a.controller;break}}if(!t)return 0;for(s=0,o=t.length;s<o;++s)l=r.resolveDataElementOptions(s),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,s=t.length;n<s;++n){const o=this.resolveDataElementOptions(n);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(O(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}P(Zt,"id","doughnut"),P(Zt,"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"}),P(Zt,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),P(Zt,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:s}}=t.legend.options;return e.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}});class ci extends dt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:s=[],_dataset:o}=e,a=this.chart._animationsDisabled;let{start:r,count:l}=us(e,s,a);this._drawStart=r,this._drawCount=l,fs(e)&&(r=0,l=s.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!a,options:c},t),this.updateElements(s,r,l,t)}updateElements(t,e,n,s){const o=s==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,s),u=a.axis,f=r.axis,{spanGaps:p,segment:g}=this.options,m=se(p)?p:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||o||s==="none",y=e+n,M=t.length;let A=e>0&&this.getParsed(e-1);for(let k=0;k<M;++k){const T=t[k],S=x?T:{};if(k<e||k>=y){S.skip=!0;continue}const C=this.getParsed(k),L=F(C[f]),z=S[u]=a.getPixelForValue(C[u],k),V=S[f]=o||L?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,C,l):C[f],k);S.skip=isNaN(z)||isNaN(V)||L,S.stop=k>0&&Math.abs(C[u]-A[u])>m,g&&(S.parsed=C,S.raw=c.data[k]),d&&(S.options=h||this.resolveDataElementOptions(k,T.active?"active":s)),x||this.updateElement(T,k,S,s),A=C}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return n;const o=s[0].size(this.resolveDataElementOptions(0)),a=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(n,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}P(ci,"id","line"),P(ci,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),P(ci,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ce extends dt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=Ae(e._parsed[t].r,n.options.locale);return{label:s[t]||"",value:o}}parseObjectData(t,e,n,s){return Cs.bind(this)(t,e,n,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((n,s)=>{const o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(s/2,0),a=Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0),r=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,n,s){const o=s==="reset",a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*H;let f=u,p;const g=360/this.countVisibleElements();for(p=0;p<e;++p)f+=this._computeAngle(p,s,g);for(p=e;p<e+n;p++){const m=t[p];let x=f,y=f+this._computeAngle(p,s,g),M=a.getDataVisibility(p)?c.getDistanceFromCenterForValue(this.getParsed(p).r):0;f=y,o&&(l.animateScale&&(M=0),l.animateRotate&&(x=y=u));const A={x:h,y:d,innerRadius:0,outerRadius:M,startAngle:x,endAngle:y,options:this.resolveDataElementOptions(p,m.active?"active":s)};this.updateElement(m,p,A,s)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((n,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?ht(this.resolveDataElementOptions(t,e).angle||n):0}}P(Ce,"id","polarArea"),P(Ce,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),P(Ce,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:s}}=t.legend.options;return e.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class nn extends Zt{}P(nn,"id","pie"),P(nn,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class hi extends dt{getLabelAndValue(t){const e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}parseObjectData(t,e,n,s){return Cs.bind(this)(t,e,n,s)}update(t){const e=this._cachedMeta,n=e.dataset,s=e.data||[],o=e.iScale.getLabels();if(n.points=s,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const r={_loop:!0,_fullLoop:o.length===s.length,options:a};this.updateElement(n,void 0,r,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,n,s){const o=this._cachedMeta.rScale,a=s==="reset";for(let r=e;r<e+n;r++){const l=t[r],c=this.resolveDataElementOptions(r,l.active?"active":s),h=o.getPointPositionForValue(r,this.getParsed(r).r),d=a?o.xCenter:h.x,u=a?o.yCenter:h.y,f={x:d,y:u,angle:h.angle,skip:isNaN(d)||isNaN(u),options:c};this.updateElement(l,r,f,s)}}}P(hi,"id","radar"),P(hi,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),P(hi,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class di extends dt{getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:s,yScale:o}=e,a=this.getParsed(t),r=s.getLabelForValue(a.x),l=o.getLabelForValue(a.y);return{label:n[t]||"",value:"("+r+", "+l+")"}}update(t){const e=this._cachedMeta,{data:n=[]}=e,s=this.chart._animationsDisabled;let{start:o,count:a}=us(e,n,s);if(this._drawStart=o,this._drawCount=a,fs(e)&&(o=0,a=n.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:r,_dataset:l}=e;r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!l._decimated,r.points=n;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:c},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(n,o,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,n,s){const o=s==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,h=this.resolveDataElementOptions(e,s),d=this.getSharedOptions(h),u=this.includeOptions(s,d),f=a.axis,p=r.axis,{spanGaps:g,segment:m}=this.options,x=se(g)?g:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||o||s==="none";let M=e>0&&this.getParsed(e-1);for(let A=e;A<e+n;++A){const k=t[A],T=this.getParsed(A),S=y?k:{},C=F(T[p]),L=S[f]=a.getPixelForValue(T[f],A),z=S[p]=o||C?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,T,l):T[p],A);S.skip=isNaN(L)||isNaN(z)||C,S.stop=A>0&&Math.abs(T[f]-M[f])>x,m&&(S.parsed=T,S.raw=c.data[A]),u&&(S.options=d||this.resolveDataElementOptions(A,k.active?"active":s)),y||this.updateElement(k,A,S,s),M=T}this.updateSharedOptions(d,s,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let r=0;for(let l=e.length-1;l>=0;--l)r=Math.max(r,e[l].size(this.resolveDataElementOptions(l))/2);return r>0&&r}const n=t.dataset,s=n.options&&n.options.borderWidth||0;if(!e.length)return s;const o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,o,a)/2}}P(di,"id","scatter"),P(di,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),P(di,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Jc=Object.freeze({__proto__:null,BarController:ri,BubbleController:li,DoughnutController:Zt,LineController:ci,PieController:nn,PolarAreaController:Ce,RadarController:hi,ScatterController:di});function Kt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sn{constructor(t){P(this,"options");this.options=t||{}}static override(t){Object.assign(sn.prototype,t)}init(){}formats(){return Kt()}parse(){return Kt()}format(){return Kt()}add(){return Kt()}diff(){return Kt()}startOf(){return Kt()}endOf(){return Kt()}}var Qc={_date:sn};function _c(i,t,e,n){const{controller:s,data:o,_sorted:a}=i,r=s._cachedMeta.iScale;if(r&&t===r.axis&&t!=="r"&&a&&o.length){const l=r._reversePixels?wl:At;if(n){if(s._sharedOptions){const c=o[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){const d=l(o,t,e-h),u=l(o,t,e+h);return{lo:d.lo,hi:u.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function Le(i,t,e,n,s){const o=i.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r<l;++r){const{index:c,data:h}=o[r],{lo:d,hi:u}=_c(o[r],t,a,s);for(let f=d;f<=u;++f){const p=h[f];p.skip||n(p,c,f)}}}function $c(i){const t=i.indexOf("x")!==-1,e=i.indexOf("y")!==-1;return function(n,s){const o=t?Math.abs(n.x-s.x):0,a=e?Math.abs(n.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function on(i,t,e,n,s){const o=[];return!s&&!i.isPointInArea(t)||Le(i,e,t,function(r,l,c){!s&&!Mt(r,i.chartArea,0)||r.inRange(t.x,t.y,n)&&o.push({element:r,datasetIndex:l,index:c})},!0),o}function th(i,t,e,n){let s=[];function o(a,r,l){const{startAngle:c,endAngle:h}=a.getProps(["startAngle","endAngle"],n),{angle:d}=as(a,{x:t.x,y:t.y});we(d,c,h)&&s.push({element:a,datasetIndex:r,index:l})}return Le(i,e,t,o),s}function eh(i,t,e,n,s,o){let a=[];const r=$c(e);let l=Number.POSITIVE_INFINITY;function c(h,d,u){const f=h.inRange(t.x,t.y,s);if(n&&!f)return;const p=h.getCenterPoint(s);if(!(!!o||i.isPointInArea(p))&&!f)return;const m=r(t,p);m<l?(a=[{element:h,datasetIndex:d,index:u}],l=m):m===l&&a.push({element:h,datasetIndex:d,index:u})}return Le(i,e,t,c),a}function an(i,t,e,n,s,o){return!o&&!i.isPointInArea(t)?[]:e==="r"&&!n?th(i,t,e,s):eh(i,t,e,n,s,o)}function to(i,t,e,n,s){const o=[],a=e==="x"?"inXRange":"inYRange";let r=!1;return Le(i,e,t,(l,c,h)=>{l[a](t[e],s)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(t.x,t.y,s))}),n&&!r?[]:o}var ih={evaluateInteractionItems:Le,modes:{index(i,t,e,n){const s=Yt(t,i),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?on(i,s,o,n,a):an(i,s,o,!1,n,a),l=[];return r.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=r[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,n){const s=Yt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;let r=e.intersect?on(i,s,o,n,a):an(i,s,o,!1,n,a);if(r.length>0){const l=r[0].datasetIndex,c=i.getDatasetMeta(l).data;r=[];for(let h=0;h<c.length;++h)r.push({element:c[h],datasetIndex:l,index:h})}return r},point(i,t,e,n){const s=Yt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;return on(i,s,o,n,a)},nearest(i,t,e,n){const s=Yt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;return an(i,s,o,e.intersect,n,a)},x(i,t,e,n){const s=Yt(t,i);return to(i,s,"x",e.intersect,n)},y(i,t,e,n){const s=Yt(t,i);return to(i,s,"y",e.intersect,n)}}};const eo=["left","top","right","bottom"];function Oe(i,t){return i.filter(e=>e.pos===t)}function io(i,t){return i.filter(e=>eo.indexOf(e.pos)===-1&&e.box.axis===t)}function ze(i,t){return i.sort((e,n)=>{const s=t?n:e,o=t?e:n;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function nh(i){const t=[];let e,n,s,o,a,r;for(e=0,n=(i||[]).length;e<n;++e)s=i[e],{position:o,options:{stack:a,stackWeight:r=1}}=s,t.push({index:e,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:a&&o+a,stackWeight:r});return t}function sh(i){const t={};for(const e of i){const{stack:n,pos:s,stackWeight:o}=e;if(!n||!eo.includes(s))continue;const a=t[n]||(t[n]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function oh(i,t){const e=sh(i),{vBoxMaxWidth:n,hBoxMaxHeight:s}=t;let o,a,r;for(o=0,a=i.length;o<a;++o){r=i[o];const{fullSize:l}=r.box,c=e[r.stack],h=c&&r.stackWeight/c.weight;r.horizontal?(r.width=h?h*n:l&&t.availableWidth,r.height=s):(r.width=n,r.height=h?h*s:l&&t.availableHeight)}return e}function ah(i){const t=nh(i),e=ze(t.filter(c=>c.box.fullSize),!0),n=ze(Oe(t,"left"),!0),s=ze(Oe(t,"right")),o=ze(Oe(t,"top"),!0),a=ze(Oe(t,"bottom")),r=io(t,"x"),l=io(t,"y");return{fullSize:e,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(a).concat(r),chartArea:Oe(t,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(a).concat(r)}}function no(i,t,e,n){return Math.max(i[e],t[e])+Math.max(i[n],t[n])}function so(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function rh(i,t,e,n){const{pos:s,box:o}=e,a=i.maxPadding;if(!I(s)){e.size&&(i[s]-=e.size);const d=n[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[s]+=e.size}o.getPadding&&so(a,o.getPadding());const r=Math.max(0,t.outerWidth-no(a,i,"left","right")),l=Math.max(0,t.outerHeight-no(a,i,"top","bottom")),c=r!==i.w,h=l!==i.h;return i.w=r,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function lh(i){const t=i.maxPadding;function e(n){const s=Math.max(t[n]-i[n],0);return i[n]+=s,s}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function ch(i,t){const e=t.maxPadding;function n(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return n(i?["left","right"]:["top","bottom"])}function Ve(i,t,e,n){const s=[];let o,a,r,l,c,h;for(o=0,a=i.length,c=0;o<a;++o){r=i[o],l=r.box,l.update(r.width||t.w,r.height||t.h,ch(r.horizontal,t));const{same:d,other:u}=rh(t,e,r,n);c|=d&&s.length,h=h||u,l.fullSize||s.push(r)}return c&&Ve(s,t,e,n)||h}function ui(i,t,e,n,s){i.top=e,i.left=t,i.right=t+n,i.bottom=e+s,i.width=n,i.height=s}function oo(i,t,e,n){const s=e.padding;let{x:o,y:a}=t;for(const r of i){const l=r.box,c=n[r.stack]||{count:1,placed:0,weight:1},h=r.stackWeight/c.weight||1;if(r.horizontal){const d=t.w*h,u=c.size||l.height;ye(c.start)&&(a=c.start),l.fullSize?ui(l,s.left,a,e.outerWidth-s.right-s.left,u):ui(l,t.left+c.placed,a,d,u),c.start=a,c.placed+=d,a=l.bottom}else{const d=t.h*h,u=c.size||l.width;ye(c.start)&&(o=c.start),l.fullSize?ui(l,o,s.top,u,e.outerHeight-s.bottom-s.top):ui(l,o,t.top+c.placed,u,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=a}var tt={addBox(i,t){i.boxes||(i.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},i.boxes.push(t)},removeBox(i,t){const e=i.boxes?i.boxes.indexOf(t):-1;e!==-1&&i.boxes.splice(e,1)},configure(i,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(i,t,e,n){if(!i)return;const s=$(i.options.layout.padding),o=Math.max(t-s.width,0),a=Math.max(e-s.height,0),r=ah(i.boxes),l=r.vertical,c=r.horizontal;E(i.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:s,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},s);so(u,$(n));const f=Object.assign({maxPadding:u,w:o,h:a,x:s.left,y:s.top},s),p=oh(l.concat(c),d);Ve(r.fullSize,f,d,p),Ve(l,f,d,p),Ve(c,f,d,p)&&Ve(l,f,d,p),lh(f),oo(r.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,oo(r.rightAndBottom,f,d,p),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},E(r.chartArea,g=>{const m=g.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class ao{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,s){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):n)}}isAttached(t){return!0}updateConfig(t){}}class hh extends ao{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const fi="$chartjs",dh={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ro=i=>i===null||i==="";function uh(i,t){const e=i.style,n=i.getAttribute("height"),s=i.getAttribute("width");if(i[fi]={initial:{height:n,width:s,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",ro(s)){const o=Vs(i,"width");o!==void 0&&(i.width=o)}if(ro(n))if(i.style.height==="")i.height=i.width/(t||2);else{const o=Vs(i,"height");o!==void 0&&(i.height=o)}return i}const lo=pc?{passive:!0}:!1;function fh(i,t,e){i.addEventListener(t,e,lo)}function ph(i,t,e){i.canvas.removeEventListener(t,e,lo)}function gh(i,t){const e=dh[i.type]||i.type,{x:n,y:s}=Yt(i,t);return{type:e,chart:t,native:i,x:n!==void 0?n:null,y:s!==void 0?s:null}}function pi(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function mh(i,t,e){const n=i.canvas,s=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||pi(r.addedNodes,n),a=a&&!pi(r.removedNodes,n);a&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function bh(i,t,e){const n=i.canvas,s=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||pi(r.removedNodes,n),a=a&&!pi(r.addedNodes,n);a&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}const Ie=new Map;let co=0;function ho(){const i=window.devicePixelRatio;i!==co&&(co=i,Ie.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function xh(i,t){Ie.size||window.addEventListener("resize",ho),Ie.set(i,t)}function yh(i){Ie.delete(i),Ie.size||window.removeEventListener("resize",ho)}function vh(i,t,e){const n=i.canvas,s=n&&_i(n);if(!s)return;const o=ds((r,l)=>{const c=s.clientWidth;e(r,l),c<s.clientWidth&&e()},window),a=new ResizeObserver(r=>{const l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(s),xh(i,o),a}function rn(i,t,e){e&&e.disconnect(),t==="resize"&&yh(i)}function wh(i,t,e){const n=i.canvas,s=ds(o=>{i.ctx!==null&&e(gh(o,i))},i);return fh(n,t,s),s}class kh extends ao{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(uh(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[fi])return!1;const n=e[fi].initial;["height","width"].forEach(o=>{const a=n[o];F(a)?e.removeAttribute(o):e.setAttribute(o,a)});const s=n.style||{};return Object.keys(s).forEach(o=>{e.style[o]=s[o]}),e.width=e.width,delete e[fi],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),a={attach:mh,detach:bh,resize:vh}[e]||wh;s[e]=a(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),s=n[e];if(!s)return;({attach:rn,detach:rn,resize:rn}[e]||ph)(t,e,s),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,s){return fc(t,e,n,s)}isAttached(t){const e=_i(t);return!!(e&&e.isConnected)}}function Ah(i){return!Os()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?hh:kh}class ut{constructor(){P(this,"x");P(this,"y");P(this,"active",!1);P(this,"options");P(this,"$animations")}tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return se(this.x)&&se(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const s={};return t.forEach(o=>{s[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),s}}P(ut,"defaults",{}),P(ut,"defaultRoutes");function Mh(i,t){const e=i.options.ticks,n=Ph(i),s=Math.min(e.maxTicksLimit||n,n),o=e.major.enabled?Sh(t):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>s)return Ch(t,c,o,a/s),c;const h=Th(o,t,s);if(a>0){let d,u;const f=a>1?Math.round((l-r)/(a-1)):null;for(gi(t,c,h,F(f)?0:r-f,r),d=0,u=a-1;d<u;d++)gi(t,c,h,o[d],o[d+1]);return gi(t,c,h,l,F(f)?t.length:l+f),c}return gi(t,c,h),c}function Ph(i){const t=i.options.offset,e=i._tickSize(),n=i._length/e+(t?0:1),s=i._maxLength/e;return Math.floor(Math.min(n,s))}function Th(i,t,e){const n=Lh(i),s=t.length/e;if(!n)return Math.max(s,1);const o=bl(n);for(let a=0,r=o.length-1;a<r;a++){const l=o[a];if(l>s)return l}return Math.max(s,1)}function Sh(i){const t=[];let e,n;for(e=0,n=i.length;e<n;e++)i[e].major&&t.push(e);return t}function Ch(i,t,e,n){let s=0,o=e[0],a;for(n=Math.ceil(n),a=0;a<i.length;a++)a===o&&(t.push(i[a]),s++,o=e[s*n])}function gi(i,t,e,n,s){const o=O(n,0),a=Math.min(O(s,i.length),i.length);let r=0,l,c,h;for(e=Math.ceil(e),s&&(l=s-n,e=l/Math.floor(l/e)),h=o;h<0;)r++,h=Math.round(o+r*e);for(c=Math.max(o,0);c<a;c++)c===h&&(t.push(i[c]),r++,h=Math.round(o+r*e))}function Lh(i){const t=i.length;let e,n;if(t<2)return!1;for(n=i[0],e=1;e<t;++e)if(i[e]-i[e-1]!==n)return!1;return n}const Oh=i=>i==="left"?"right":i==="right"?"left":i,uo=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,fo=(i,t)=>Math.min(t||i,i);function po(i,t){const e=[],n=i.length/t,s=i.length;let o=0;for(;o<s;o+=n)e.push(i[Math.floor(o)]);return e}function zh(i,t,e){const n=i.ticks.length,s=Math.min(t,n-1),o=i._startPixel,a=i._endPixel,r=1e-6;let l=i.getPixelForTick(s),c;if(!(e&&(n===1?c=Math.max(l-o,a-l):t===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(s-1))/2,l+=s<t?c:-c,l<o-r||l>a+r)))return l}function Vh(i,t){E(i,e=>{const n=e.gc,s=n.length/2;let o;if(s>t){for(o=0;o<s;++o)delete e.data[n[o]];n.splice(0,s)}})}function De(i){return i.drawTicks?i.tickLength:0}function go(i,t){if(!i.display)return 0;const e=X(i.font,t),n=$(i.padding);return(W(i.text)?i.text.length:1)*e.lineHeight+n.height}function Ih(i,t){return Dt(i,{scale:t,type:"scale"})}function Dh(i,t,e){return Dt(i,{tick:e,index:t,type:"tick"})}function Fh(i,t,e){let n=Gi(i);return(e&&t!=="right"||!e&&t==="right")&&(n=Oh(n)),n}function Eh(i,t,e,n){const{top:s,left:o,bottom:a,right:r,chart:l}=i,{chartArea:c,scales:h}=l;let d=0,u,f,p;const g=a-s,m=r-o;if(i.isHorizontal()){if(f=_(n,o,r),I(e)){const x=Object.keys(e)[0],y=e[x];p=h[x].getPixelForValue(y)+g-t}else e==="center"?p=(c.bottom+c.top)/2+g-t:p=uo(i,e,t);u=r-o}else{if(I(e)){const x=Object.keys(e)[0],y=e[x];f=h[x].getPixelForValue(y)-m+t}else e==="center"?f=(c.left+c.right)/2-m+t:f=uo(i,e,t);p=_(n,a,s),d=e==="left"?-U:U}return{titleX:f,titleY:p,maxWidth:u,rotation:d}}class Xt extends ut{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:s}=this;return t=at(t,Number.POSITIVE_INFINITY),e=at(e,Number.NEGATIVE_INFINITY),n=at(n,Number.POSITIVE_INFINITY),s=at(s,Number.NEGATIVE_INFINITY),{min:at(t,n),max:at(e,s),minDefined:j(t),maxDefined:j(e)}}getMinMax(t){let{min:e,max:n,minDefined:s,maxDefined:o}=this.getUserBounds(),a;if(s&&o)return{min:e,max:n};const r=this.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)a=r[l].controller.getMinMax(this,t),s||(e=Math.min(e,a.min)),o||(n=Math.max(n,a.max));return e=o&&e>n?n:e,n=s&&e>n?e:n,{min:at(e,at(n,e)),max:at(n,at(e,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){B(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:s,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Ul(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=r<this.ticks.length;this._convertTicksToLabels(l?po(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Mh(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,n;this.isHorizontal()?(e=this.left,n=this.right):(e=this.top,n=this.bottom,t=!t),this._startPixel=e,this._endPixel=n,this._reversePixels=t,this._length=n-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){B(this.options.afterUpdate,[this])}beforeSetDimensions(){B(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(){B(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),B(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){B(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let n,s,o;for(n=0,s=t.length;n<s;n++)o=t[n],o.label=B(e.callback,[o.value,n,t],this)}afterTickToLabelConversion(){B(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){B(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=fo(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,o=e.maxRotation;let a=s,r,l,c;if(!this._isVisible()||!e.display||s>=o||n<=1||!this.isHorizontal()){this.labelRotation=s;return}const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=J(this.chart.width-d,0,this.maxWidth);r=t.offset?this.maxWidth/n:f/(n-1),d+6>r&&(r=f/(n-(t.offset?.5:1)),l=this.maxHeight-De(t.grid)-e.padding-go(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=Wi(Math.min(Math.asin(J((h.highest.height+6)/r,-1,1)),Math.asin(J(l/c,-1,1))-Math.asin(J(u/c,-1,1)))),a=Math.max(s,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){B(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){B(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:s,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const l=go(s,e.options.font);if(r?(t.width=this.maxWidth,t.height=De(o)+l):(t.height=this.maxHeight,t.width=De(o)+l),n.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=n.padding*2,p=ht(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(r){const x=n.mirror?0:m*d.width+g*u.height;t.height=Math.min(this.maxHeight,t.height+x+f)}else{const x=n.mirror?0:g*d.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+x+f)}this._calculatePadding(c,h,m,g)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,s){const{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?c?(u=s*t.width,f=n*e.height):(u=n*t.height,f=s*e.width):o==="start"?f=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+a)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+a,this.paddingBottom=d+a}}_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(){B(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,n;for(e=0,n=t.length;e<n;e++)F(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=po(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){const{ctx:s,_longestTextCache:o}=this,a=[],r=[],l=Math.floor(e/fo(e,n));let c=0,h=0,d,u,f,p,g,m,x,y,M,A,k;for(d=0;d<e;d+=l){if(p=t[d].label,g=this._resolveTickFontOptions(d),s.font=m=g.string,x=o[m]=o[m]||{data:{},gc:[]},y=g.lineHeight,M=A=0,!F(p)&&!W(p))M=ti(s,x.data,x.gc,M,p),A=y;else if(W(p))for(u=0,f=p.length;u<f;++u)k=p[u],!F(k)&&!W(k)&&(M=ti(s,x.data,x.gc,M,k),A+=y);a.push(M),r.push(A),c=Math.max(M,c),h=Math.max(A,h)}Vh(o,e);const T=a.indexOf(c),S=r.indexOf(h),C=L=>({width:a[L]||0,height:r[L]||0});return{first:C(0),last:C(e-1),widest:C(T),highest:C(S),widths:a,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return vl(this._alignToPixels?Ht(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=Dh(this.getContext(),t,n))}return this.$context||(this.$context=Ih(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=ht(this.labelRotation),n=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,r=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*n>r*s?r/n:l/s:l*s<r*n?l/n:r/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,s=this.options,{grid:o,position:a,border:r}=s,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=De(o),f=[],p=r.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,x=function(G){return Ht(n,G,g)};let y,M,A,k,T,S,C,L,z,V,D,Q;if(a==="top")y=x(this.bottom),S=this.bottom-u,L=y-m,V=x(t.top)+m,Q=t.bottom;else if(a==="bottom")y=x(this.top),V=t.top,Q=x(t.bottom)-m,S=y+m,L=this.top+u;else if(a==="left")y=x(this.right),T=this.right-u,C=y-m,z=x(t.left)+m,D=t.right;else if(a==="right")y=x(this.left),z=t.left,D=x(t.right)-m,T=y+m,C=this.left+u;else if(e==="x"){if(a==="center")y=x((t.top+t.bottom)/2+.5);else if(I(a)){const G=Object.keys(a)[0],Z=a[G];y=x(this.chart.scales[G].getPixelForValue(Z))}V=t.top,Q=t.bottom,S=y+m,L=S+u}else if(e==="y"){if(a==="center")y=x((t.left+t.right)/2);else if(I(a)){const G=Object.keys(a)[0],Z=a[G];y=x(this.chart.scales[G].getPixelForValue(Z))}T=y-m,C=T-u,z=t.left,D=t.right}const lt=O(s.ticks.maxTicksLimit,d),R=Math.max(1,Math.ceil(d/lt));for(M=0;M<d;M+=R){const G=this.getContext(M),Z=o.setContext(G),ft=r.setContext(G),it=Z.lineWidth,ce=Z.color,Li=ft.dash||[],he=ft.dashOffset,Ne=Z.tickWidth,Ge=Z.tickColor,je=Z.tickBorderDash||[],Ye=Z.tickBorderDashOffset;A=zh(this,M,l),A!==void 0&&(k=Ht(n,A,it),c?T=C=z=D=k:S=L=V=Q=k,f.push({tx1:T,ty1:S,tx2:C,ty2:L,x1:z,y1:V,x2:D,y2:Q,width:it,color:ce,borderDash:Li,borderDashOffset:he,tickWidth:Ne,tickColor:Ge,tickBorderDash:je,tickBorderDashOffset:Ye}))}return this._ticksLength=d,this._borderValue=y,f}_computeLabelItems(t){const e=this.axis,n=this.options,{position:s,ticks:o}=n,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=De(n.grid),f=u+h,p=d?-h:f,g=-ht(this.labelRotation),m=[];let x,y,M,A,k,T,S,C,L,z,V,D,Q="middle";if(s==="top")T=this.bottom-p,S=this._getXAxisLabelAlignment();else if(s==="bottom")T=this.top+p,S=this._getXAxisLabelAlignment();else if(s==="left"){const R=this._getYAxisLabelAlignment(u);S=R.textAlign,k=R.x}else if(s==="right"){const R=this._getYAxisLabelAlignment(u);S=R.textAlign,k=R.x}else if(e==="x"){if(s==="center")T=(t.top+t.bottom)/2+f;else if(I(s)){const R=Object.keys(s)[0],G=s[R];T=this.chart.scales[R].getPixelForValue(G)+f}S=this._getXAxisLabelAlignment()}else if(e==="y"){if(s==="center")k=(t.left+t.right)/2-f;else if(I(s)){const R=Object.keys(s)[0],G=s[R];k=this.chart.scales[R].getPixelForValue(G)}S=this._getYAxisLabelAlignment(u).textAlign}e==="y"&&(l==="start"?Q="top":l==="end"&&(Q="bottom"));const lt=this._getLabelSizes();for(x=0,y=r.length;x<y;++x){M=r[x],A=M.label;const R=o.setContext(this.getContext(x));C=this.getPixelForTick(x)+o.labelOffset,L=this._resolveTickFontOptions(x),z=L.lineHeight,V=W(A)?A.length:1;const G=V/2,Z=R.color,ft=R.textStrokeColor,it=R.textStrokeWidth;let ce=S;a?(k=C,S==="inner"&&(x===y-1?ce=this.options.reverse?"left":"right":x===0?ce=this.options.reverse?"right":"left":ce="center"),s==="top"?c==="near"||g!==0?D=-V*z+z/2:c==="center"?D=-lt.highest.height/2-G*z+z:D=-lt.highest.height+z/2:c==="near"||g!==0?D=z/2:c==="center"?D=lt.highest.height/2-G*z:D=lt.highest.height-V*z,d&&(D*=-1),g!==0&&!R.showLabelBackdrop&&(k+=z/2*Math.sin(g))):(T=C,D=(1-V)*z/2);let Li;if(R.showLabelBackdrop){const he=$(R.backdropPadding),Ne=lt.heights[x],Ge=lt.widths[x];let je=D-he.top,Ye=0-he.left;switch(Q){case"middle":je-=Ne/2;break;case"bottom":je-=Ne;break}switch(S){case"center":Ye-=Ge/2;break;case"right":Ye-=Ge;break}Li={left:Ye,top:je,width:Ge+he.width,height:Ne+he.height,color:R.backdropColor}}m.push({label:A,font:L,textOffset:D,options:{rotation:g,color:Z,strokeColor:ft,strokeWidth:it,textAlign:ce,textBaseline:Q,translation:[k,T],backdrop:Li}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-ht(this.labelRotation))return t==="top"?"left":"right";let s="center";return e.align==="start"?s="left":e.align==="end"?s="right":e.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:s,padding:o}}=this.options,a=this._getLabelSizes(),r=t+o,l=a.widest.width;let c,h;return e==="left"?s?(h=this.right+o,n==="near"?c="left":n==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-r,n==="near"?c="right":n==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?s?(h=this.left+o,n==="near"?c="right":n==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+r,n==="near"?c="left":n==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:s,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,s,o,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const s=this.ticks.findIndex(o=>o.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const e=this.options.grid,n=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(l,c,h)=>{!h.width||!h.color||(n.save(),n.lineWidth=h.width,n.strokeStyle=h.color,n.setLineDash(h.borderDash||[]),n.lineDashOffset=h.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(e.display)for(o=0,a=s.length;o<a;++o){const l=s[o];e.drawOnChartArea&&r({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&r({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:n,grid:s}}=this,o=n.setContext(this.getContext()),a=n.display?o.width:0;if(!a)return;const r=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,h,d,u;this.isHorizontal()?(c=Ht(t,this.left,a)-a/2,h=Ht(t,this.right,r)+r/2,d=u=l):(d=Ht(t,this.top,a)-a/2,u=Ht(t,this.bottom,r)+r/2,c=h=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(c,d),e.lineTo(h,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const n=this.ctx,s=this._computeLabelArea();s&&ei(n,s);const o=this.getLabelItems(t);for(const a of o){const r=a.options,l=a.font,c=a.label,h=a.textOffset;Nt(n,c,0,h,l,r)}s&&ii(n)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:s}}=this;if(!n.display)return;const o=X(n.font),a=$(n.padding),r=n.align;let l=o.lineHeight/2;e==="bottom"||e==="center"||I(e)?(l+=a.bottom,W(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=a.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=Eh(this,l,e,r);Nt(t,n.text,0,0,o,{color:n.color,maxWidth:d,rotation:u,textAlign:Fh(r,e,s),textBaseline:"middle",translation:[c,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=O(t.grid&&t.grid.z,-1),s=O(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Xt.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",s=[];let o,a;for(o=0,a=e.length;o<a;++o){const r=e[o];r[n]===this.id&&(!t||r.type===t)&&s.push(r)}return s}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return X(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class mi{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;Wh(e)&&(n=this.register(e));const s=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in s||(s[o]=t,Rh(t,a,n),this.override&&Y.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,s=this.scope;n in e&&delete e[n],s&&n in Y[s]&&(delete Y[s][n],this.override&&delete Wt[n])}}function Rh(i,t,e){const n=be(Object.create(null),[e?Y.get(e):{},Y.get(t),i.defaults]);Y.set(t,n),i.defaultRoutes&&Bh(t,i.defaultRoutes),i.descriptors&&Y.describe(t,i.descriptors)}function Bh(i,t){Object.keys(t).forEach(e=>{const n=e.split("."),s=n.pop(),o=[i].concat(n).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");Y.route(o,s,l,r)})}function Wh(i){return"id"in i&&"defaults"in i}class Hh{constructor(){this.controllers=new mi(dt,"datasets",!0),this.elements=new mi(ut,"elements"),this.plugins=new mi(Object,"plugins"),this.scales=new mi(Xt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach(s=>{const o=n||this._getRegistryForType(s);n||o.isForType(s)||o===this.plugins&&s.id?this._exec(t,o,s):E(s,a=>{const r=n||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,n){const s=Bi(t);B(n["before"+s],[],n),e[t](n),B(n["after"+s],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const s=e.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+n+".");return s}}var gt=new Hh;class Nh{constructor(){this._init=[]}notify(t,e,n,s){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=s?this._descriptors(t).filter(s):this._descriptors(t),a=this._notify(o,t,e,n);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,n,s){s=s||{};for(const o of t){const a=o.plugin,r=a[n],l=[e,s,o.options];if(B(r,l,a)===!1&&s.cancelable)return!1}return!0}invalidate(){F(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,s=O(n.options&&n.options.plugins,{}),o=Gh(n);return s===!1&&!e?[]:Yh(t,o,s,e)}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,s=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(s(e,n),t,"stop"),this._notify(s(n,e),t,"start")}}function Gh(i){const t={},e=[],n=Object.keys(gt.plugins.items);for(let o=0;o<n.length;o++)e.push(gt.getPlugin(n[o]));const s=i.plugins||[];for(let o=0;o<s.length;o++){const a=s[o];e.indexOf(a)===-1&&(e.push(a),t[a.id]=!0)}return{plugins:e,localIds:t}}function jh(i,t){return!t&&i===!1?null:i===!0?{}:i}function Yh(i,{plugins:t,localIds:e},n,s){const o=[],a=i.getContext();for(const r of t){const l=r.id,c=jh(n[l],s);c!==null&&o.push({plugin:r,options:Uh(i.config,{plugin:r,local:e[l]},c,a)})}return o}function Uh(i,{plugin:t,local:e},n,s){const o=i.pluginScopeKeys(t),a=i.getOptionScopes(n,o);return e&&t.defaults&&a.push(t.defaults),i.createResolver(a,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ln(i,t){const e=Y.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function Zh(i,t){let e=i;return i==="_index_"?e=t:i==="_value_"&&(e=t==="x"?"y":"x"),e}function Kh(i,t){return i===t?"_index_":"_value_"}function mo(i){if(i==="x"||i==="y"||i==="r")return i}function Xh(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function cn(i,...t){if(mo(i))return i;for(const e of t){const n=e.axis||Xh(e.position)||i.length>1&&mo(i[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function bo(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function qh(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(n=>n.xAxisID===i||n.yAxisID===i);if(e.length)return bo(i,"x",e[0])||bo(i,"y",e[0])}return{}}function Jh(i,t){const e=Wt[i.type]||{scales:{}},n=t.scales||{},s=ln(i.type,t),o=Object.create(null);return Object.keys(n).forEach(a=>{const r=n[a];if(!I(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=cn(a,r,qh(a,i),Y.scales[r.type]),c=Kh(l,s),h=e.scales||{};o[a]=xe(Object.create(null),[{axis:l},r,h[l],h[c]])}),i.data.datasets.forEach(a=>{const r=a.type||i.type,l=a.indexAxis||ln(r,t),h=(Wt[r]||{}).scales||{};Object.keys(h).forEach(d=>{const u=Zh(d,l),f=a[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),xe(o[f],[{axis:u},n[f],h[d]])})}),Object.keys(o).forEach(a=>{const r=o[a];xe(r,[Y.scales[r.type],Y.scale])}),o}function xo(i){const t=i.options||(i.options={});t.plugins=O(t.plugins,{}),t.scales=Jh(i,t)}function yo(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Qh(i){return i=i||{},i.data=yo(i.data),xo(i),i}const vo=new Map,wo=new Set;function bi(i,t){let e=vo.get(i);return e||(e=t(),vo.set(i,e),wo.add(e)),e}const Fe=(i,t,e)=>{const n=zt(t,e);n!==void 0&&i.add(n)};class _h{constructor(t){this._config=Qh(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=yo(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(),xo(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return bi(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return bi(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return bi(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,n=this.type;return bi(`${n}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const n=this._scopeCache;let s=n.get(t);return(!s||e)&&(s=new Map,n.set(t,s)),s}getOptionScopes(t,e,n){const{options:s,type:o}=this,a=this._cachedScopes(t,n),r=a.get(e);if(r)return r;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>Fe(l,t,d))),h.forEach(d=>Fe(l,s,d)),h.forEach(d=>Fe(l,Wt[o]||{},d)),h.forEach(d=>Fe(l,Y,d)),h.forEach(d=>Fe(l,Ui,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),wo.has(e)&&a.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,Wt[e]||{},Y.datasets[e]||{},{type:e},Y,Ui]}resolveNamedOptions(t,e,n,s=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=ko(this._resolverCache,t,s);let l=a;if(td(a,e)){o.$shared=!1,n=Vt(n)?n():n;const c=this.createResolver(t,n,r);l=oe(a,n,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,n=[""],s){const{resolver:o}=ko(this._resolverCache,t,n);return I(e)?oe(o,e,void 0,s):o}}function ko(i,t,e){let n=i.get(t);n||(n=new Map,i.set(t,n));const s=e.join();let o=n.get(s);return o||(o={resolver:qi(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},n.set(s,o)),o}const $h=i=>I(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||Vt(i[e]),!1);function td(i,t){const{isScriptable:e,isIndexable:n}=ks(i);for(const s of t){const o=e(s),a=n(s),r=(a||o)&&i[s];if(o&&(Vt(r)||$h(r))||a&&W(r))return!0}return!1}var ed="4.4.0";const id=["top","bottom","left","right","chartArea"];function Ao(i,t){return i==="top"||i==="bottom"||id.indexOf(i)===-1&&t==="x"}function Mo(i,t){return function(e,n){return e[i]===n[i]?e[t]-n[t]:e[i]-n[i]}}function Po(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),B(e&&e.onComplete,[i],t)}function nd(i){const t=i.chart,e=t.options.animation;B(e&&e.onProgress,[i],t)}function To(i){return Os()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const xi={},So=i=>{const t=To(i);return Object.values(xi).filter(e=>e.canvas===t).pop()};function sd(i,t,e){const n=Object.keys(i);for(const s of n){const o=+s;if(o>=t){const a=i[s];delete i[s],(e>0||o>t)&&(i[o+e]=a)}}}function od(i,t,e,n){return!e||i.type==="mouseout"?null:n?t:i}function yi(i,t,e){return i.options.clip?i[e]:t[e]}function ad(i,t){const{xScale:e,yScale:n}=i;return e&&n?{left:yi(e,t,"left"),right:yi(e,t,"right"),top:yi(n,t,"top"),bottom:yi(n,t,"bottom")}:t}class Tt{static register(...t){gt.add(...t),Co()}static unregister(...t){gt.remove(...t),Co()}constructor(t,e){const n=this.config=new _h(e),s=To(t),o=So(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||Ah(s)),this.platform.updateConfig(n);const r=this.platform.acquireContext(s,a.aspectRatio),l=r&&r.canvas,c=l&&l.height,h=l&&l.width;if(this.id=ll(),this.ctx=r,this.canvas=l,this.width=h,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Nh,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ml(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],xi[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Pt.listen(this,"complete",Po),Pt.listen(this,"progress",nd),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:s,_aspectRatio:o}=this;return F(t)?e&&o?o:s?n/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return gt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():zs(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ys(this.canvas,this.ctx),this}stop(){return Pt.stop(this),this}resize(t,e){Pt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,s=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(s,t,e,o),r=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,zs(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),B(n.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};E(e,(n,s)=>{n.id=s})}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,s=Object.keys(n).reduce((a,r)=>(a[r]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const r=e[a],l=cn(a,r),c=l==="r",h=l==="x";return{options:r,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),E(o,a=>{const r=a.options,l=r.id,c=cn(l,r),h=O(r.type,a.dtype);(r.position===void 0||Ao(r.position,c)!==Ao(a.dposition))&&(r.position=a.dposition),s[l]=!0;let d=null;if(l in n&&n[l].type===h)d=n[l];else{const u=gt.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),n[d.id]=d}d.init(r,t)}),E(s,(a,r)=>{a||delete n[r]}),E(n,a=>{tt.configure(this,a,a.options),tt.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((s,o)=>s.index-o.index),n>e){for(let s=e;s<n;++s)this._destroyDatasetMeta(s);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(Mo("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((n,s)=>{e.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,s;for(this._removeUnreferencedMetasets(),n=0,s=e.length;n<s;n++){const o=e[n];let a=this.getDatasetMeta(n);const r=o.type||this.config.type;if(a.type&&a.type!==r&&(this._destroyDatasetMeta(n),a=this.getDatasetMeta(n)),a.type=r,a.indexAxis=o.indexAxis||ln(r,this.options),a.order=o.order||0,a.index=n,a.label=""+o.label,a.visible=this.isDatasetVisible(n),a.controller)a.controller.updateIndex(n),a.controller.linkScales();else{const l=gt.getController(r),{datasetElementType:c,dataElementType:h}=Y.datasets[r];Object.assign(l,{dataElementType:gt.getElement(h),datasetElementType:c&&gt.getElement(c)}),a.controller=new l(this,n),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){E(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,h=this.data.datasets.length;c<h;c++){const{controller:d}=this.getDatasetMeta(c),u=!s&&o.indexOf(d)===-1;d.buildOrUpdateElements(u),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=n.layout.autoPadding?a:0,this._updateLayout(a),s||E(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Mo("z","_idx"));const{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){E(this.scales,t=>{tt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!es(e,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:s,count:o}of e){const a=n==="_removeElements"?-o:o;sd(t,s,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),s=n(0);for(let o=1;o<e;o++)if(!es(s,n(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;tt.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],E(this.boxes,s=>{n&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,n=this.data.datasets.length;e<n;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,Vt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),s={meta:n,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(n.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Pt.has(this)?this.attached&&!Pt.running(this)&&Pt.start(this):(this.draw(),Po({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:n,height:s}=this._resizeBeforeDraw;this._resize(n,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let s,o;for(s=0,o=e.length;s<o;++s){const a=e[s];(!t||a.visible)&&n.push(a)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n=t._clip,s=!n.disabled,o=ad(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(s&&ei(e,{left:n.left===!1?0:o.left-n.left,right:n.right===!1?this.width:o.right+n.right,top:n.top===!1?0:o.top-n.top,bottom:n.bottom===!1?this.height:o.bottom+n.bottom}),t.controller.draw(),s&&ii(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return Mt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,s){const o=ih.modes[e];return typeof o=="function"?o(this,t,n,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let s=n.filter(o=>o&&o._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(s)),s}getContext(){return this.$context||(this.$context=Dt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!e.hidden}setDatasetVisibility(t,e){const n=this.getDatasetMeta(t);n.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const s=n?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,s);ye(e)?(o.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),a.update(o,{visible:n}),this.update(r=>r.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Pt.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ys(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete xi[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,n=(o,a)=>{e.addEventListener(this,o,a),t[o]=a},s=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};E(this.options.events,o=>n(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const r=()=>{s("attach",r),this.attached=!0,this.resize(),n("resize",o),n("detach",a)};a=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),n("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){E(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},E(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const s=n?"set":"remove";let o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),r=0,l=t.length;r<l;++r){a=t[r];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[s+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map(({datasetIndex:o,index:a})=>{const r=this.getDatasetMeta(o);if(!r)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:r.data[a],index:a}});!qe(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,n){const s=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),a=o(e,t),r=n?t:o(t,e);a.length&&this.updateHoverStyle(a,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,s)===!1)return;const o=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,s),(o||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:s=[],options:o}=this,a=e,r=this._getActiveElements(t,s,n,a),l=pl(t),c=od(t,this._lastEvent,n,l);n&&(this._lastEvent=null,B(o.onHover,[t,r,this],this),l&&B(o.onClick,[t,r,this],this));const h=!qe(r,s);return(h||e)&&(this._active=r,this._updateHoverStyles(r,s,e)),this._lastEvent=c,h}_getActiveElements(t,e,n,s){if(t.type==="mouseout")return[];if(!n)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}}P(Tt,"defaults",Y),P(Tt,"instances",xi),P(Tt,"overrides",Wt),P(Tt,"registry",gt),P(Tt,"version",ed),P(Tt,"getChart",So);function Co(){return E(Tt.instances,i=>i._plugins.invalidate())}function rd(i,t,e){const{startAngle:n,pixelMargin:s,x:o,y:a,outerRadius:r,innerRadius:l}=t;let c=s/r;i.beginPath(),i.arc(o,a,r,n-c,e+c),l>s?(c=s/l,i.arc(o,a,l,e+c,n-c,!0)):i.arc(o,a,s,e+U,n-U),i.closePath(),i.clip()}function ld(i){return Xi(i,["outerStart","outerEnd","innerStart","innerEnd"])}function cd(i,t,e,n){const s=ld(i.options.borderRadius),o=(e-t)/2,a=Math.min(o,n*t/2),r=l=>{const c=(e-Math.min(o,l))*n/2;return J(l,0,Math.min(o,c))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:J(s.innerStart,0,a),innerEnd:J(s.innerEnd,0,a)}}function le(i,t,e,n){return{x:e+i*Math.cos(t),y:n+i*Math.sin(t)}}function vi(i,t,e,n,s,o){const{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:h}=t,d=Math.max(t.outerRadius+n+e-c,0),u=h>0?h+n+e+c:0;let f=0;const p=s-l;if(n){const R=h>0?h-n:0,G=d>0?d-n:0,Z=(R+G)/2,ft=Z!==0?p*Z/(Z+n):p;f=(p-ft)/2}const g=Math.max(.001,p*d-e/H)/d,m=(p-g)/2,x=l+m+f,y=s-m-f,{outerStart:M,outerEnd:A,innerStart:k,innerEnd:T}=cd(t,u,d,y-x),S=d-M,C=d-A,L=x+M/S,z=y-A/C,V=u+k,D=u+T,Q=x+k/V,lt=y-T/D;if(i.beginPath(),o){const R=(L+z)/2;if(i.arc(a,r,d,L,R),i.arc(a,r,d,R,z),A>0){const it=le(C,z,a,r);i.arc(it.x,it.y,A,z,y+U)}const G=le(D,y,a,r);if(i.lineTo(G.x,G.y),T>0){const it=le(D,lt,a,r);i.arc(it.x,it.y,T,y+U,lt+Math.PI)}const Z=(y-T/u+(x+k/u))/2;if(i.arc(a,r,u,y-T/u,Z,!0),i.arc(a,r,u,Z,x+k/u,!0),k>0){const it=le(V,Q,a,r);i.arc(it.x,it.y,k,Q+Math.PI,x-U)}const ft=le(S,x,a,r);if(i.lineTo(ft.x,ft.y),M>0){const it=le(S,L,a,r);i.arc(it.x,it.y,M,x-U,L)}}else{i.moveTo(a,r);const R=Math.cos(L)*d+a,G=Math.sin(L)*d+r;i.lineTo(R,G);const Z=Math.cos(z)*d+a,ft=Math.sin(z)*d+r;i.lineTo(Z,ft)}i.closePath()}function hd(i,t,e,n,s){const{fullCircles:o,startAngle:a,circumference:r}=t;let l=t.endAngle;if(o){vi(i,t,e,n,l,s);for(let c=0;c<o;++c)i.fill();isNaN(r)||(l=a+(r%N||N))}return vi(i,t,e,n,l,s),i.fill(),l}function dd(i,t,e,n,s){const{fullCircles:o,startAngle:a,circumference:r,options:l}=t,{borderWidth:c,borderJoinStyle:h,borderDash:d,borderDashOffset:u}=l,f=l.borderAlign==="inner";if(!c)return;i.setLineDash(d||[]),i.lineDashOffset=u,f?(i.lineWidth=c*2,i.lineJoin=h||"round"):(i.lineWidth=c,i.lineJoin=h||"bevel");let p=t.endAngle;if(o){vi(i,t,e,n,p,s);for(let g=0;g<o;++g)i.stroke();isNaN(r)||(p=a+(r%N||N))}f&&rd(i,t,p),o||(vi(i,t,e,n,p,s),i.stroke())}class Ee extends ut{constructor(e){super();P(this,"circumference");P(this,"endAngle");P(this,"fullCircles");P(this,"innerRadius");P(this,"outerRadius");P(this,"pixelMargin");P(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,n,s){const o=this.getProps(["x","y"],s),{angle:a,distance:r}=as(o,{x:e,y:n}),{startAngle:l,endAngle:c,innerRadius:h,outerRadius:d,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),f=(this.options.spacing+this.options.borderWidth)/2,g=O(u,c-l)>=N||we(a,l,c),m=kt(r,h+f,d+f);return g&&m}getCenterPoint(e){const{x:n,y:s,startAngle:o,endAngle:a,innerRadius:r,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:h}=this.options,d=(o+a)/2,u=(r+l+h+c)/2;return{x:n+Math.cos(d)*u,y:s+Math.sin(d)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:s}=this,o=(n.offset||0)/4,a=(n.spacing||0)/2,r=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>N?Math.floor(s/N):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*o,Math.sin(l)*o);const c=1-Math.sin(Math.min(H,s||0)),h=o*c;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,hd(e,this,h,a,r),dd(e,this,h,a,r),e.restore()}}P(Ee,"id","arc"),P(Ee,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),P(Ee,"defaultRoutes",{backgroundColor:"backgroundColor"}),P(Ee,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function Lo(i,t,e=t){i.lineCap=O(e.borderCapStyle,t.borderCapStyle),i.setLineDash(O(e.borderDash,t.borderDash)),i.lineDashOffset=O(e.borderDashOffset,t.borderDashOffset),i.lineJoin=O(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=O(e.borderWidth,t.borderWidth),i.strokeStyle=O(e.borderColor,t.borderColor)}function ud(i,t,e){i.lineTo(e.x,e.y)}function fd(i){return i.stepped?El:i.tension||i.cubicInterpolationMode==="monotone"?Rl:ud}function Oo(i,t,e={}){const n=i.length,{start:s=0,end:o=n-1}=e,{start:a,end:r}=t,l=Math.max(s,a),c=Math.min(o,r),h=s<a&&o<a||s>r&&o>r;return{count:n,start:l,loop:t.loop,ilen:c<l&&!h?n+c-l:c-l}}function pd(i,t,e,n){const{points:s,options:o}=t,{count:a,start:r,loop:l,ilen:c}=Oo(s,e,n),h=fd(o);let{move:d=!0,reverse:u}=n||{},f,p,g;for(f=0;f<=c;++f)p=s[(r+(u?c-f:f))%a],!p.skip&&(d?(i.moveTo(p.x,p.y),d=!1):h(i,g,p,u,o.stepped),g=p);return l&&(p=s[(r+(u?c:0))%a],h(i,g,p,u,o.stepped)),!!l}function gd(i,t,e,n){const s=t.points,{count:o,start:a,ilen:r}=Oo(s,e,n),{move:l=!0,reverse:c}=n||{};let h=0,d=0,u,f,p,g,m,x;const y=A=>(a+(c?r-A:A))%o,M=()=>{g!==m&&(i.lineTo(h,m),i.lineTo(h,g),i.lineTo(h,x))};for(l&&(f=s[y(0)],i.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=s[y(u)],f.skip)continue;const A=f.x,k=f.y,T=A|0;T===p?(k<g?g=k:k>m&&(m=k),h=(d*h+A)/++d):(M(),i.lineTo(A,k),p=T,d=0,g=m=k),x=k}M()}function hn(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?gd:pd}function md(i){return i.stepped?gc:i.tension||i.cubicInterpolationMode==="monotone"?mc:Ut}function bd(i,t,e,n){let s=t._path;s||(s=t._path=new Path2D,t.path(s,e,n)&&s.closePath()),Lo(i,t.options),i.stroke(s)}function xd(i,t,e,n){const{segments:s,options:o}=t,a=hn(t);for(const r of s)Lo(i,o,r.style),i.beginPath(),a(i,t,r,{start:e,end:e+n-1})&&i.closePath(),i.stroke()}const yd=typeof Path2D=="function";function vd(i,t,e,n){yd&&!t.options.segment?bd(i,t,e,n):xd(i,t,e,n)}class Ft extends ut{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const s=n.spanGaps?this._loop:this._fullLoop;rc(this._points,n,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=kc(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,s=t[e],o=this.points,a=Bs(this,{property:e,start:s,end:s});if(!a.length)return;const r=[],l=md(n);let c,h;for(c=0,h=a.length;c<h;++c){const{start:d,end:u}=a[c],f=o[d],p=o[u];if(f===p){r.push(f);continue}const g=Math.abs((s-f[e])/(p[e]-f[e])),m=l(f,p,g,n.stepped);m[e]=t[e],r.push(m)}return r.length===1?r[0]:r}pathSegment(t,e,n){return hn(this)(t,this,e,n)}path(t,e,n){const s=this.segments,o=hn(this);let a=this._loop;e=e||0,n=n||this.points.length-e;for(const r of s)a&=o(t,this,r,{start:e,end:e+n-1});return!!a}draw(t,e,n,s){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),vd(t,this,n,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}P(Ft,"id","line"),P(Ft,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),P(Ft,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),P(Ft,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function zo(i,t,e,n){const s=i.options,{[e]:o}=i.getProps([e],n);return Math.abs(t-o)<s.radius+s.hitRadius}class wi extends ut{constructor(e){super();P(this,"parsed");P(this,"skip");P(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,s){const o=this.options,{x:a,y:r}=this.getProps(["x","y"],s);return Math.pow(e-a,2)+Math.pow(n-r,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,n){return zo(this,e,"x",n)}inYRange(e,n){return zo(this,e,"y",n)}getCenterPoint(e){const{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);const s=n&&e.borderWidth||0;return(n+s)*2}draw(e,n){const s=this.options;this.skip||s.radius<.1||!Mt(this,n,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,Ki(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}P(wi,"id","point"),P(wi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),P(wi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Vo(i,t){const{x:e,y:n,base:s,width:o,height:a}=i.getProps(["x","y","base","width","height"],t);let r,l,c,h,d;return i.horizontal?(d=a/2,r=Math.min(e,s),l=Math.max(e,s),c=n-d,h=n+d):(d=o/2,r=e-d,l=e+d,c=Math.min(n,s),h=Math.max(n,s)),{left:r,top:c,right:l,bottom:h}}function Et(i,t,e,n){return i?0:J(t,e,n)}function wd(i,t,e){const n=i.options.borderWidth,s=i.borderSkipped,o=ws(n);return{t:Et(s.top,o.top,0,e),r:Et(s.right,o.right,0,t),b:Et(s.bottom,o.bottom,0,e),l:Et(s.left,o.left,0,t)}}function kd(i,t,e){const{enableBorderRadius:n}=i.getProps(["enableBorderRadius"]),s=i.options.borderRadius,o=Gt(s),a=Math.min(t,e),r=i.borderSkipped,l=n||I(s);return{topLeft:Et(!l||r.top||r.left,o.topLeft,0,a),topRight:Et(!l||r.top||r.right,o.topRight,0,a),bottomLeft:Et(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:Et(!l||r.bottom||r.right,o.bottomRight,0,a)}}function Ad(i){const t=Vo(i),e=t.right-t.left,n=t.bottom-t.top,s=wd(i,e/2,n/2),o=kd(i,e/2,n/2);return{outer:{x:t.left,y:t.top,w:e,h:n,radius:o},inner:{x:t.left+s.l,y:t.top+s.t,w:e-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function dn(i,t,e,n){const s=t===null,o=e===null,r=i&&!(s&&o)&&Vo(i,n);return r&&(s||kt(t,r.left,r.right))&&(o||kt(e,r.top,r.bottom))}function Md(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function Pd(i,t){i.rect(t.x,t.y,t.w,t.h)}function un(i,t,e={}){const n=i.x!==e.x?-t:0,s=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-n,a=(i.y+i.h!==e.y+e.h?t:0)-s;return{x:i.x+n,y:i.y+s,w:i.w+o,h:i.h+a,radius:i.radius}}class ki extends ut{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:n,backgroundColor:s}}=this,{inner:o,outer:a}=Ad(this),r=Md(a.radius)?Pe:Pd;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),r(t,un(a,e,o)),t.clip(),r(t,un(o,-e,a)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),r(t,un(o,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,n){return dn(this,t,e,n)}inXRange(t,e){return dn(this,t,null,e)}inYRange(t,e){return dn(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+s)/2:e,y:o?n:(n+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}P(ki,"id","bar"),P(ki,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),P(ki,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Td=Object.freeze({__proto__:null,ArcElement:Ee,BarElement:ki,LineElement:Ft,PointElement:wi});const fn=["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)"],Io=fn.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));function Do(i){return fn[i%fn.length]}function Fo(i){return Io[i%Io.length]}function Sd(i,t){return i.borderColor=Do(t),i.backgroundColor=Fo(t),++t}function Cd(i,t){return i.backgroundColor=i.data.map(()=>Do(t++)),t}function Ld(i,t){return i.backgroundColor=i.data.map(()=>Fo(t++)),t}function Od(i){let t=0;return(e,n)=>{const s=i.getDatasetMeta(n).controller;s instanceof Zt?t=Cd(e,t):s instanceof Ce?t=Ld(e,t):s&&(t=Sd(e,t))}}function Eo(i){let t;for(t in i)if(i[t].borderColor||i[t].backgroundColor)return!0;return!1}function zd(i){return i&&(i.borderColor||i.backgroundColor)}var Vd={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,t,e){if(!e.enabled)return;const{data:{datasets:n},options:s}=i.config,{elements:o}=s;if(!e.forceOverride&&(Eo(n)||zd(s)||o&&Eo(o)))return;const a=Od(i);n.forEach(a)}};function Id(i,t,e,n,s){const o=s.samples||n;if(o>=e)return i.slice(t,t+e);const a=[],r=(e-2)/(o-2);let l=0;const c=t+e-1;let h=t,d,u,f,p,g;for(a[l++]=i[h],d=0;d<o-2;d++){let m=0,x=0,y;const M=Math.floor((d+1)*r)+1+t,A=Math.min(Math.floor((d+2)*r)+1,e)+t,k=A-M;for(y=M;y<A;y++)m+=i[y].x,x+=i[y].y;m/=k,x/=k;const T=Math.floor(d*r)+1+t,S=Math.min(Math.floor((d+1)*r)+1,e)+t,{x:C,y:L}=i[h];for(f=p=-1,y=T;y<S;y++)p=.5*Math.abs((C-m)*(i[y].y-L)-(C-i[y].x)*(x-L)),p>f&&(f=p,u=i[y],g=y);a[l++]=u,h=g}return a[l++]=i[c],a}function Dd(i,t,e,n){let s=0,o=0,a,r,l,c,h,d,u,f,p,g;const m=[],x=t+e-1,y=i[t].x,A=i[x].x-y;for(a=t;a<t+e;++a){r=i[a],l=(r.x-y)/A*n,c=r.y;const k=l|0;if(k===h)c<p?(p=c,d=a):c>g&&(g=c,u=a),s=(o*s+r.x)/++o;else{const T=a-1;if(!F(d)&&!F(u)){const S=Math.min(d,u),C=Math.max(d,u);S!==f&&S!==T&&m.push({...i[S],x:s}),C!==f&&C!==T&&m.push({...i[C],x:s})}a>0&&T!==f&&m.push(i[T]),m.push(r),h=k,o=0,p=g=c,d=u=f=a}}return m}function Ro(i){if(i._decimated){const t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Bo(i){i.data.datasets.forEach(t=>{Ro(t)})}function Fd(i,t){const e=t.length;let n=0,s;const{iScale:o}=i,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(n=J(At(t,o.axis,a).lo,0,e-1)),c?s=J(At(t,o.axis,r).hi+1,n,e)-n:s=e-n,{start:n,count:s}}var Ed={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){Bo(i);return}const n=i.width;i.data.datasets.forEach((s,o)=>{const{_data:a,indexAxis:r}=s,l=i.getDatasetMeta(o),c=a||s.data;if(Te([r,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const h=i.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||i.options.parsing)return;let{start:d,count:u}=Fd(l,c);const f=e.threshold||4*n;if(u<=f){Ro(s);return}F(a)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let p;switch(e.algorithm){case"lttb":p=Id(c,d,u,n,e);break;case"min-max":p=Dd(c,d,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}s._decimated=p})},destroy(i){Bo(i)}};function Rd(i,t,e){const n=i.segments,s=i.points,o=t.points,a=[];for(const r of n){let{start:l,end:c}=r;c=gn(l,c,s);const h=pn(e,s[l],s[c],r.loop);if(!t.segments){a.push({source:r,target:h,start:s[l],end:s[c]});continue}const d=Bs(t,h);for(const u of d){const f=pn(e,o[u.start],o[u.end],u.loop),p=Rs(r,s,f);for(const g of p)a.push({source:g,target:u,start:{[e]:Wo(h,f,"start",Math.max)},end:{[e]:Wo(h,f,"end",Math.min)}})}}return a}function pn(i,t,e,n){if(n)return;let s=t[i],o=e[i];return i==="angle"&&(s=rt(s),o=rt(o)),{property:i,start:s,end:o}}function Bd(i,t){const{x:e=null,y:n=null}=i||{},s=t.points,o=[];return t.segments.forEach(({start:a,end:r})=>{r=gn(a,r,s);const l=s[a],c=s[r];n!==null?(o.push({x:l.x,y:n}),o.push({x:c.x,y:n})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function gn(i,t,e){for(;t>i;t--){const n=e[t];if(!isNaN(n.x)&&!isNaN(n.y))break}return t}function Wo(i,t,e,n){return i&&t?n(i[e],t[e]):i?i[e]:t?t[e]:0}function Ho(i,t){let e=[],n=!1;return W(i)?(n=!0,e=i):e=Bd(i,t),e.length?new Ft({points:e,options:{tension:0},_loop:n,_fullLoop:n}):null}function No(i){return i&&i.fill!==!1}function Wd(i,t,e){let s=i[t].fill;const o=[t];let a;if(!e)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!j(s))return s;if(a=i[s],!a)return!1;if(a.visible)return s;o.push(s),s=a.fill}return!1}function Hd(i,t,e){const n=Yd(i);if(I(n))return isNaN(n.value)?!1:n;let s=parseFloat(n);return j(s)&&Math.floor(s)===s?Nd(n[0],t,s,e):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Nd(i,t,e,n){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=n?!1:e}function Gd(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:I(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function jd(i,t,e){let n;return i==="start"?n=e:i==="end"?n=t.options.reverse?t.min:t.max:I(i)?n=i.value:n=t.getBaseValue(),n}function Yd(i){const t=i.options,e=t.fill;let n=O(e&&e.target,e);return n===void 0&&(n=!!t.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function Ud(i){const{scale:t,index:e,line:n}=i,s=[],o=n.segments,a=n.points,r=Zd(t,e);r.push(Ho({x:null,y:t.bottom},n));for(let l=0;l<o.length;l++){const c=o[l];for(let h=c.start;h<=c.end;h++)Kd(s,a[h],r)}return new Ft({points:s,options:{}})}function Zd(i,t){const e=[],n=i.getMatchingVisibleMetas("line");for(let s=0;s<n.length;s++){const o=n[s];if(o.index===t)break;o.hidden||e.unshift(o.dataset)}return e}function Kd(i,t,e){const n=[];for(let s=0;s<e.length;s++){const o=e[s],{first:a,last:r,point:l}=Xd(o,t,"x");if(!(!l||a&&r)){if(a)n.unshift(l);else if(i.push(l),!r)break}}i.push(...n)}function Xd(i,t,e){const n=i.interpolate(t,e);if(!n)return{};const s=n[e],o=i.segments,a=i.points;let r=!1,l=!1;for(let c=0;c<o.length;c++){const h=o[c],d=a[h.start][e],u=a[h.end][e];if(kt(s,d,u)){r=s===d,l=s===u;break}}return{first:r,last:l,point:n}}class Go{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,n){const{x:s,y:o,radius:a}=this;return e=e||{start:0,end:N},t.arc(s,o,a,e.end,e.start,!0),!n.bounds}interpolate(t){const{x:e,y:n,radius:s}=this,o=t.angle;return{x:e+Math.cos(o)*s,y:n+Math.sin(o)*s,angle:o}}}function qd(i){const{chart:t,fill:e,line:n}=i;if(j(e))return Jd(t,e);if(e==="stack")return Ud(i);if(e==="shape")return!0;const s=Qd(i);return s instanceof Go?s:Ho(s,n)}function Jd(i,t){const e=i.getDatasetMeta(t);return e&&i.isDatasetVisible(t)?e.dataset:null}function Qd(i){return(i.scale||{}).getPointPositionForValue?$d(i):_d(i)}function _d(i){const{scale:t={},fill:e}=i,n=Gd(e,t);if(j(n)){const s=t.isHorizontal();return{x:s?n:null,y:s?null:n}}return null}function $d(i){const{scale:t,fill:e}=i,n=t.options,s=t.getLabels().length,o=n.reverse?t.max:t.min,a=jd(e,t,o),r=[];if(n.grid.circular){const l=t.getPointPositionForValue(0,o);return new Go({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(a)})}for(let l=0;l<s;++l)r.push(t.getPointPositionForValue(l,a));return r}function mn(i,t,e){const n=qd(t),{line:s,scale:o,axis:a}=t,r=s.options,l=r.fill,c=r.backgroundColor,{above:h=c,below:d=c}=l||{};n&&s.points.length&&(ei(i,e),tu(i,{line:s,target:n,above:h,below:d,area:e,scale:o,axis:a}),ii(i))}function tu(i,t){const{line:e,target:n,above:s,below:o,area:a,scale:r}=t,l=e._loop?"angle":t.axis;i.save(),l==="x"&&o!==s&&(jo(i,n,a.top),Yo(i,{line:e,target:n,color:s,scale:r,property:l}),i.restore(),i.save(),jo(i,n,a.bottom)),Yo(i,{line:e,target:n,color:o,scale:r,property:l}),i.restore()}function jo(i,t,e){const{segments:n,points:s}=t;let o=!0,a=!1;i.beginPath();for(const r of n){const{start:l,end:c}=r,h=s[l],d=s[gn(l,c,s)];o?(i.moveTo(h.x,h.y),o=!1):(i.lineTo(h.x,e),i.lineTo(h.x,h.y)),a=!!t.pathSegment(i,r,{move:a}),a?i.closePath():i.lineTo(d.x,e)}i.lineTo(t.first().x,e),i.closePath(),i.clip()}function Yo(i,t){const{line:e,target:n,property:s,color:o,scale:a}=t,r=Rd(e,n,s);for(const{source:l,target:c,start:h,end:d}of r){const{style:{backgroundColor:u=o}={}}=l,f=n!==!0;i.save(),i.fillStyle=u,eu(i,a,f&&pn(s,h,d)),i.beginPath();const p=!!e.pathSegment(i,l);let g;if(f){p?i.closePath():Uo(i,n,d,s);const m=!!n.pathSegment(i,c,{move:p,reverse:!0});g=p&&m,g||Uo(i,n,h,s)}i.closePath(),i.fill(g?"evenodd":"nonzero"),i.restore()}}function eu(i,t,e){const{top:n,bottom:s}=t.chart.chartArea,{property:o,start:a,end:r}=e||{};o==="x"&&(i.beginPath(),i.rect(a,n,r-a,s-n),i.clip())}function Uo(i,t,e,n){const s=t.interpolate(e,n);s&&i.lineTo(s.x,s.y)}var iu={id:"filler",afterDatasetsUpdate(i,t,e){const n=(i.data.datasets||[]).length,s=[];let o,a,r,l;for(a=0;a<n;++a)o=i.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof Ft&&(l={visible:i.isDatasetVisible(a),index:a,fill:Hd(r,a,n),chart:i,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,s.push(l);for(a=0;a<n;++a)l=s[a],!(!l||l.fill===!1)&&(l.fill=Wd(s,a,e.propagate))},beforeDraw(i,t,e){const n=e.drawTime==="beforeDraw",s=i.getSortedVisibleDatasetMetas(),o=i.chartArea;for(let a=s.length-1;a>=0;--a){const r=s[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),n&&r.fill&&mn(i.ctx,r,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const n=i.getSortedVisibleDatasetMetas();for(let s=n.length-1;s>=0;--s){const o=n[s].$filler;No(o)&&mn(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){const n=t.meta.$filler;!No(n)||e.drawTime!=="beforeDatasetDraw"||mn(i.ctx,n,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Zo=(i,t)=>{let{boxHeight:e=t,boxWidth:n=t}=i;return i.usePointStyle&&(e=Math.min(e,t),n=i.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:e,itemHeight:Math.max(t,e)}},nu=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class Ko extends ut{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=B(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(n=>t.filter(n,this.chart.data))),t.sort&&(e=e.sort((n,s)=>t.sort(n,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const n=t.labels,s=X(n.font),o=s.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=Zo(n,o);let c,h;e.font=s.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,s,r,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,s){const{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=s+r;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((p,g)=>{const m=n+e/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*r>a)&&(d+=h,c[c.length-(g>0?0:1)]=0,f+=h,u++),l[g]={left:0,top:f,row:u,width:m,height:s},c[c.length-1]+=m+r}),d}_fitCols(t,e,n,s){const{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=a-t;let d=r,u=0,f=0,p=0,g=0;return this.legendItems.forEach((m,x)=>{const{itemWidth:y,itemHeight:M}=su(n,e,o,m,s);x>0&&f+M+2*r>h&&(d+=u+r,c.push({width:u,height:f}),p+=u+r,g++,u=f=0),l[x]={left:p,top:f,col:g,width:y,height:M},u=Math.max(u,y),f+=M+r}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:s},rtl:o}}=this,a=re(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=_(n,this.left+s,this.right-this.lineWidths[r]);for(const c of e)r!==c.row&&(r=c.row,l=_(n,this.left+s,this.right-this.lineWidths[r])),c.top+=this.top+t+s,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+s}else{let r=0,l=_(n,this.top+t+s,this.bottom-this.columnSizes[r].height);for(const c of e)c.col!==r&&(r=c.col,l=_(n,this.top+t+s,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+s,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;ei(t,this),this._draw(),ii(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:s}=this,{align:o,labels:a}=t,r=Y.color,l=re(t.rtl,this.left,this.width),c=X(a.font),{padding:h}=a,d=c.size,u=d/2;let f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=Zo(a,d),x=function(T,S,C){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;s.save();const L=O(C.lineWidth,1);if(s.fillStyle=O(C.fillStyle,r),s.lineCap=O(C.lineCap,"butt"),s.lineDashOffset=O(C.lineDashOffset,0),s.lineJoin=O(C.lineJoin,"miter"),s.lineWidth=L,s.strokeStyle=O(C.strokeStyle,r),s.setLineDash(O(C.lineDash,[])),a.usePointStyle){const z={radius:g*Math.SQRT2/2,pointStyle:C.pointStyle,rotation:C.rotation,borderWidth:L},V=l.xPlus(T,p/2),D=S+u;vs(s,z,V,D,a.pointStyleWidth&&p)}else{const z=S+Math.max((d-g)/2,0),V=l.leftForLtr(T,p),D=Gt(C.borderRadius);s.beginPath(),Object.values(D).some(Q=>Q!==0)?Pe(s,{x:V,y:z,w:p,h:g,radius:D}):s.rect(V,z,p,g),s.fill(),L!==0&&s.stroke()}s.restore()},y=function(T,S,C){Nt(s,C.text,T,S+m/2,c,{strikethrough:C.hidden,textAlign:l.textAlign(C.textAlign)})},M=this.isHorizontal(),A=this._computeTitleHeight();M?f={x:_(o,this.left+h,this.right-n[0]),y:this.top+h+A,line:0}:f={x:this.left+h,y:_(o,this.top+A+h,this.bottom-e[0].height),line:0},Is(this.ctx,t.textDirection);const k=m+h;this.legendItems.forEach((T,S)=>{s.strokeStyle=T.fontColor,s.fillStyle=T.fontColor;const C=s.measureText(T.text).width,L=l.textAlign(T.textAlign||(T.textAlign=a.textAlign)),z=p+u+C;let V=f.x,D=f.y;l.setWidth(this.width),M?S>0&&V+z+h>this.right&&(D=f.y+=k,f.line++,V=f.x=_(o,this.left+h,this.right-n[f.line])):S>0&&D+k>this.bottom&&(V=f.x=V+e[f.line].width+h,f.line++,D=f.y=_(o,this.top+A+h,this.bottom-e[f.line].height));const Q=l.x(V);if(x(Q,D,T),V=Pl(L,V+p+u,M?V+z:this.right,t.rtl),y(l.x(V),D,T),M)f.x+=z+h;else if(typeof T.text!="string"){const lt=c.lineHeight;f.y+=Xo(T,lt)+h}else f.y+=k}),Ds(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=X(e.font),s=$(e.padding);if(!e.display)return;const o=re(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=n.size/2,c=s.top+l;let h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=_(t.align,d,this.right-u);else{const p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);h=c+_(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const f=_(r,d,d+u);a.textAlign=o.textAlign(Gi(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=n.string,Nt(a,e.text,f,h,n)}_computeTitleHeight(){const t=this.options.title,e=X(t.font),n=$(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,s,o;if(kt(t,this.left,this.right)&&kt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(s=o[n],kt(t,s.left,s.left+s.width)&&kt(e,s.top,s.top+s.height))return this.legendItems[n]}return null}handleEvent(t){const e=this.options;if(!ru(t.type,e))return;const n=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,o=nu(s,n);s&&!o&&B(e.onLeave,[t,s,this],this),this._hoveredItem=n,n&&!o&&B(e.onHover,[t,n,this],this)}else n&&B(e.onClick,[t,n,this],this)}}function su(i,t,e,n,s){const o=ou(n,i,t,e),a=au(s,n,t.lineHeight);return{itemWidth:o,itemHeight:a}}function ou(i,t,e,n){let s=i.text;return s&&typeof s!="string"&&(s=s.reduce((o,a)=>o.length>a.length?o:a)),t+e.size/2+n.measureText(s).width}function au(i,t,e){let n=i;return typeof t.text!="string"&&(n=Xo(t,e)),n}function Xo(i,t){const e=i.text?i.text.length:0;return t*e}function ru(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var lu={id:"legend",_element:Ko,start(i,t,e){const n=i.legend=new Ko({ctx:i.ctx,options:e,chart:i});tt.configure(i,n,e),tt.addBox(i,n)},stop(i){tt.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const n=i.legend;tt.configure(i,n,e),n.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const n=t.datasetIndex,s=e.chart;s.isDatasetVisible(n)?(s.hide(n),t.hidden=!0):(s.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:n,textAlign:s,color:o,useBorderRadius:a,borderRadius:r}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=$(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:a&&(r||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class bn extends ut{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const s=W(n.text)?n.text.length:1;this._padding=$(n.padding);const o=s*X(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:n,bottom:s,right:o,options:a}=this,r=a.align;let l=0,c,h,d;return this.isHorizontal()?(h=_(r,n,o),d=e+t,c=o-n):(a.position==="left"?(h=n+t,d=_(r,s,e),l=H*-.5):(h=o-t,d=_(r,e,s),l=H*.5),c=s-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=X(e.font),o=n.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);Nt(t,e.text,0,0,n,{color:e.color,maxWidth:l,rotation:c,textAlign:Gi(e.align),textBaseline:"middle",translation:[a,r]})}}function cu(i,t){const e=new bn({ctx:i.ctx,options:t,chart:i});tt.configure(i,e,t),tt.addBox(i,e),i.titleBlock=e}var hu={id:"title",_element:bn,start(i,t,e){cu(i,e)},stop(i){const t=i.titleBlock;tt.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const n=i.titleBlock;tt.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ai=new WeakMap;var du={id:"subtitle",start(i,t,e){const n=new bn({ctx:i.ctx,options:e,chart:i});tt.configure(i,n,e),tt.addBox(i,n),Ai.set(i,n)},stop(i){tt.removeBox(i,Ai.get(i)),Ai.delete(i)},beforeUpdate(i,t,e){const n=Ai.get(i);tt.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Re={average(i){if(!i.length)return!1;let t,e,n=0,s=0,o=0;for(t=0,e=i.length;t<e;++t){const a=i[t].element;if(a&&a.hasValue()){const r=a.tooltipPosition();n+=r.x,s+=r.y,++o}}return{x:n/o,y:s/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,n=t.y,s=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=i.length;o<a;++o){const l=i[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),h=Hi(t,c);h<s&&(s=h,r=l)}}if(r){const l=r.tooltipPosition();e=l.x,n=l.y}return{x:e,y:n}}};function mt(i,t){return t&&(W(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function St(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
1401
+ */class Tc{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,s){const o=e.listeners[s],a=e.duration;o.forEach(r=>r({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(n-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=ds.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;const o=n.items;let a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(s.draw(),this._notify(s,n,t,"progress")),o.length||(n.running=!1,this._notify(s,n,t,"complete"),n.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((n,s)=>Math.max(n,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let s=n.length-1;for(;s>=0;--s)n[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Pt=new Tc;const Gs="transparent",Sc={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const n=bs(i||Gs),s=n.valid&&bs(t||Gs);return s&&s.valid?s.mix(n,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class Cc{constructor(t,e,n,s){const o=e[n];s=Te([t.to,s,o,t.from]);const a=Te([t.from,o,s]);this._active=!0,this._fn=t.fn||Sc[t.type||typeof a],this._easing=ke[t.easing]||ke.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const s=this._target[this._prop],o=n-this._start,a=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Te([t.to,e,s,t.from]),this._from=Te([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,s=this._prop,o=this._from,a=this._loop,r=this._to;let l;if(this._active=o!==r&&(a||e<n),!this._active){this._target[s]=r,this._notify(!0);return}if(e<0){this._target[s]=o;return}l=e/n%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,r,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let s=0;s<n.length;s++)n[s][e]()}}class js{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!I(t))return;const e=Object.keys(Y.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const o=t[s];if(!I(o))return;const a={};for(const r of e)a[r]=o[r];(W(o.properties)&&o.properties||[s]).forEach(r=>{(r===s||!n.has(r))&&n.set(r,a)})})}_animateOptions(t,e){const n=e.options,s=Oc(t,n);if(!s)return[];const o=this._createAnimations(s,n);return n.$shared&&Lc(t.options.$animations,n).then(()=>{t.options=n},()=>{}),o}_createAnimations(t,e){const n=this._properties,s=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const u=n.get(c);if(d)if(u&&d.active()){d.update(u,h,r);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new Cc(u,t,c,h),s.push(d)}return s}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const n=this._createAnimations(t,e);if(n.length)return Pt.add(this._chart,n),!0}}function Lc(i,t){const e=[],n=Object.keys(t);for(let s=0;s<n.length;s++){const o=i[n[s]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function Oc(i,t){if(!t)return;let e=i.options;if(!e){i.options=t;return}return e.$shared&&(i.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Ys(i,t){const e=i&&i.options||{},n=e.reverse,s=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:n?o:s,end:n?s:o}}function zc(i,t,e){if(e===!1)return!1;const n=Ys(i,e),s=Ys(t,e);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}function Vc(i){let t,e,n,s;return I(i)?(t=i.top,e=i.right,n=i.bottom,s=i.left):t=e=n=s=i,{top:t,right:e,bottom:n,left:s,disabled:i===!1}}function Us(i,t){const e=[],n=i._getSortedDatasetMetas(t);let s,o;for(s=0,o=n.length;s<o;++s)e.push(n[s].index);return e}function Zs(i,t,e,n={}){const s=i.keys,o=n.mode==="single";let a,r,l,c;if(t!==null){for(a=0,r=s.length;a<r;++a){if(l=+s[a],l===e){if(n.all)continue;break}c=i.values[l],j(c)&&(o||t===0||pt(t)===pt(c))&&(t+=c)}return t}}function Ic(i){const t=Object.keys(i),e=new Array(t.length);let n,s,o;for(n=0,s=t.length;n<s;++n)o=t[n],e[n]={x:o,y:i[o]};return e}function Ks(i,t){const e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function Dc(i,t,e){return`${i.id}.${t.id}.${e.stack||e.type}`}function Fc(i){const{min:t,max:e,minDefined:n,maxDefined:s}=i.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:s?e:Number.POSITIVE_INFINITY}}function Ec(i,t,e){const n=i[t]||(i[t]={});return n[e]||(n[e]={})}function Xs(i,t,e,n){for(const s of t.getMatchingVisibleMetas(n).reverse()){const o=i[s.index];if(e&&o>0||!e&&o<0)return s.index}return null}function qs(i,t){const{chart:e,_cachedMeta:n}=i,s=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=n,l=o.axis,c=a.axis,h=Dc(o,a,n),d=t.length;let u;for(let f=0;f<d;++f){const p=t[f],{[l]:g,[c]:m}=p,x=p._stacks||(p._stacks={});u=x[c]=Ec(s,h,g),u[r]=m,u._top=Xs(u,a,!0,n.type),u._bottom=Xs(u,a,!1,n.type);const y=u._visualValues||(u._visualValues={});y[r]=m}}function $i(i,t){const e=i.scales;return Object.keys(e).filter(n=>e[n].axis===t).shift()}function Rc(i,t){return Dt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Bc(i,t,e){return Dt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Se(i,t){const e=i.controller.index,n=i.vScale&&i.vScale.axis;if(n){t=t||i._parsed;for(const s of t){const o=s._stacks;if(!o||o[n]===void 0||o[n][e]===void 0)return;delete o[n][e],o[n]._visualValues!==void 0&&o[n]._visualValues[e]!==void 0&&delete o[n]._visualValues[e]}}}const tn=i=>i==="reset"||i==="none",Js=(i,t)=>t?i:Object.assign({},i),Wc=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:Us(e,!0),values:null};class dt{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ks(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&&Se(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),s=(d,u,f,p)=>d==="x"?u:d==="r"?p:f,o=e.xAxisID=O(n.xAxisID,$i(t,"x")),a=e.yAxisID=O(n.yAxisID,$i(t,"y")),r=e.rAxisID=O(n.rAxisID,$i(t,"r")),l=e.indexAxis,c=e.iAxisID=s(l,o,a,r),h=e.vAxisID=s(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&cs(this._data,this),t._stacked&&Se(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(I(e))this._data=Ic(e);else if(n!==e){if(n){cs(n,this);const s=this._cachedMeta;Se(s),s._parsed=[]}e&&Object.isExtensible(e)&&Ml(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let s=!1;this._dataCheck();const o=e._stacked;e._stacked=Ks(e.vScale,e),e.stack!==n.stack&&(s=!0,Se(e),e.stack=n.stack),this._resyncElements(t),(s||o!==e._stacked)&&qs(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:s}=this,{iScale:o,_stacked:a}=n,r=o.axis;let l=t===0&&e===s.length?!0:n._sorted,c=t>0&&n._parsed[t-1],h,d,u;if(this._parsing===!1)n._parsed=s,n._sorted=!0,u=s;else{W(s[t])?u=this.parseArrayData(n,s,t,e):I(s[t])?u=this.parseObjectData(n,s,t,e):u=this.parsePrimitiveData(n,s,t,e);const f=()=>d[r]===null||c&&d[r]<c[r];for(h=0;h<e;++h)n._parsed[h+t]=d=u[h],l&&(f()&&(l=!1),c=d);n._sorted=l}a&&qs(this,u)}parsePrimitiveData(t,e,n,s){const{iScale:o,vScale:a}=t,r=o.axis,l=a.axis,c=o.getLabels(),h=o===a,d=new Array(s);let u,f,p;for(u=0,f=s;u<f;++u)p=u+n,d[u]={[r]:h||o.parse(c[p],p),[l]:a.parse(e[p],p)};return d}parseArrayData(t,e,n,s){const{xScale:o,yScale:a}=t,r=new Array(s);let l,c,h,d;for(l=0,c=s;l<c;++l)h=l+n,d=e[h],r[l]={x:o.parse(d[0],h),y:a.parse(d[1],h)};return r}parseObjectData(t,e,n,s){const{xScale:o,yScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,c=new Array(s);let h,d,u,f;for(h=0,d=s;h<d;++h)u=h+n,f=e[u],c[h]={x:o.parse(zt(f,r),u),y:a.parse(zt(f,l),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const s=this.chart,o=this._cachedMeta,a=e[t.axis],r={keys:Us(s,!0),values:e._stacks[t.axis]._visualValues};return Zs(r,a,o.index,{mode:n})}updateRangeFromParsed(t,e,n,s){const o=n[e.axis];let a=o===null?NaN:o;const r=s&&n._stacks[e.axis];s&&r&&(s.values=r,a=Zs(s,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const n=this._cachedMeta,s=n._parsed,o=n._sorted&&t===n.iScale,a=s.length,r=this._getOtherScale(t),l=Wc(e,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=Fc(r);let u,f;function p(){f=s[u];const g=f[r.axis];return!j(f[t.axis])||h>g||d<g}for(u=0;u<a&&!(!p()&&(this.updateRangeFromParsed(c,t,f,l),o));++u);if(o){for(u=a-1;u>=0;--u)if(!p()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let s,o,a;for(s=0,o=e.length;s<o;++s)a=e[s][t.axis],j(a)&&n.push(a);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,s=e.vScale,o=this.getParsed(t);return{label:n?""+n.getLabelForValue(o[n.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=Vc(O(this.options.clip,zc(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,s=n.data||[],o=e.chartArea,a=[],r=this._drawStart||0,l=this._drawCount||s.length-r,c=this.options.drawActiveElementsOnTop;let h;for(n.dataset&&n.dataset.draw(t,o,r,l),h=r;h<r+l;++h){const d=s[h];d.hidden||(d.active&&c?a.push(d):d.draw(t,o))}for(h=0;h<a.length;++h)a[h].draw(t,o)}getStyle(t,e){const n=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const s=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=Bc(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=s.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=Rc(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=n,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const s=e==="active",o=this._cachedDataOpts,a=t+"-"+e,r=o[a],l=this.enableOptionSharing&&ye(n);if(r)return Js(r,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),d=s?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),h),f=Object.keys(Y.elements[t]),p=()=>this.getContext(n,s,e),g=c.resolveNamedOptions(u,f,p,d);return g.$shared&&(g.$shared=l,o[a]=Object.freeze(Js(g,l))),g}_resolveAnimations(t,e,n){const s=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(s.options.animation!==!1){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,n,e))}const c=new js(s,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||tn(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),s=this._sharedOptions,o=this.getSharedOptions(n),a=this.includeOptions(e,o)||o!==s;return this.updateSharedOptions(o,e,n),{sharedOptions:o,includeOptions:a}}updateElement(t,e,n,s){tn(s)?Object.assign(t,n):this._resolveAnimations(e,s).update(t,n)}updateSharedOptions(t,e,n){t&&!tn(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,s){t.active=s;const o=this.getStyle(e,s);this._resolveAnimations(e,n,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[r,l,c]of this._syncList)this[r](l,c);this._syncList=[];const s=n.length,o=e.length,a=Math.min(o,s);a&&this.parse(0,a),o>s?this._insertElements(s,o-s,t):o<s&&this._removeElements(o,s-o)}_insertElements(t,e,n=!0){const s=this._cachedMeta,o=s.data,a=t+e;let r;const l=c=>{for(c.length+=e,r=c.length-1;r>=a;r--)c[r]=c[r-e]};for(l(o),r=t;r<a;++r)o[r]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,e),n&&this.updateElements(o,t,e,"reset")}updateElements(t,e,n,s){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const s=n._parsed.splice(t,e);n._stacked&&Se(n,s)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,s]=t;this[e](n,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}P(dt,"defaults",{}),P(dt,"datasetElementType",null),P(dt,"dataElementType",null);function Hc(i,t){if(!i._cache.$bar){const e=i.getMatchingVisibleMetas(t);let n=[];for(let s=0,o=e.length;s<o;s++)n=n.concat(e[s].controller.getAllParsedValues(i));i._cache.$bar=hs(n.sort((s,o)=>s-o))}return i._cache.$bar}function Nc(i){const t=i.iScale,e=Hc(t,i.type);let n=t._length,s,o,a,r;const l=()=>{a===32767||a===-32768||(ye(r)&&(n=Math.min(n,Math.abs(a-r)||n)),r=a)};for(s=0,o=e.length;s<o;++s)a=t.getPixelForValue(e[s]),l();for(r=void 0,s=0,o=t.ticks.length;s<o;++s)a=t.getPixelForTick(s),l();return n}function Gc(i,t,e,n){const s=e.barThickness;let o,a;return F(s)?(o=t.min*e.categoryPercentage,a=e.barPercentage):(o=s*n,a=1),{chunk:o/n,ratio:a,start:t.pixels[i]-o/2}}function jc(i,t,e,n){const s=t.pixels,o=s[i];let a=i>0?s[i-1]:null,r=i<s.length-1?s[i+1]:null;const l=e.categoryPercentage;a===null&&(a=o-(r===null?t.end-t.start:r-o)),r===null&&(r=o+o-a);const c=o-(o-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/n,ratio:e.barPercentage,start:c}}function Yc(i,t,e,n){const s=e.parse(i[0],n),o=e.parse(i[1],n),a=Math.min(s,o),r=Math.max(s,o);let l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:s,end:o,min:a,max:r}}function Qs(i,t,e,n){return W(i)?Yc(i,t,e,n):t[e.axis]=e.parse(i,n),t}function _s(i,t,e,n){const s=i.iScale,o=i.vScale,a=s.getLabels(),r=s===o,l=[];let c,h,d,u;for(c=e,h=e+n;c<h;++c)u=t[c],d={},d[s.axis]=r||s.parse(a[c],c),l.push(Qs(u,d,o,c));return l}function en(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function Uc(i,t,e){return i!==0?pt(i):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Zc(i){let t,e,n,s,o;return i.horizontal?(t=i.base>i.x,e="left",n="right"):(t=i.base<i.y,e="bottom",n="top"),t?(s="end",o="start"):(s="start",o="end"),{start:e,end:n,reverse:t,top:s,bottom:o}}function Kc(i,t,e,n){let s=t.borderSkipped;const o={};if(!s){i.borderSkipped=o;return}if(s===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:r,reverse:l,top:c,bottom:h}=Zc(i);s==="middle"&&e&&(i.enableBorderRadius=!0,(e._top||0)===n?s=c:(e._bottom||0)===n?s=h:(o[$s(h,a,r,l)]=!0,s=c)),o[$s(s,a,r,l)]=!0,i.borderSkipped=o}function $s(i,t,e,n){return n?(i=Xc(i,t,e),i=to(i,e,t)):i=to(i,t,e),i}function Xc(i,t,e){return i===t?e:i===e?t:i}function to(i,t,e){return i==="start"?t:i==="end"?e:i}function qc(i,{inflateAmount:t},e){i.inflateAmount=t==="auto"?e===1?.33:0:t}class ri extends dt{parsePrimitiveData(t,e,n,s){return _s(t,e,n,s)}parseArrayData(t,e,n,s){return _s(t,e,n,s)}parseObjectData(t,e,n,s){const{iScale:o,vScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?r:l,h=a.axis==="x"?r:l,d=[];let u,f,p,g;for(u=n,f=n+s;u<f;++u)g=e[u],p={},p[o.axis]=o.parse(zt(g,c),u),d.push(Qs(zt(g,h),p,a,u));return d}updateRangeFromParsed(t,e,n,s){super.updateRangeFromParsed(t,e,n,s);const o=n._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:n,vScale:s}=e,o=this.getParsed(t),a=o._custom,r=en(a)?"["+a.start+", "+a.end+"]":""+s.getLabelForValue(o[s.axis]);return{label:""+n.getLabelForValue(o[n.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,s){const o=s==="reset",{index:a,_cachedMeta:{vScale:r}}=this,l=r.getBasePixel(),c=r.isHorizontal(),h=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,s);for(let f=e;f<e+n;f++){const p=this.getParsed(f),g=o||F(p[r.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,h),x=(p._stacks||{})[r.axis],y={horizontal:c,base:g.base,enableBorderRadius:!x||en(p._custom)||a===x._top||a===x._bottom,x:c?g.head:m.center,y:c?m.center:g.head,height:c?m.size:Math.abs(g.size),width:c?Math.abs(g.size):m.size};u&&(y.options=d||this.resolveDataElementOptions(f,t[f].active?"active":s));const M=y.options||t[f].options;Kc(y,M,x,a),qc(y,M,h.ratio),this.updateElement(t[f],f,y,s)}}_getStacks(t,e){const{iScale:n}=this._cachedMeta,s=n.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=n.options.stacked,a=[],r=l=>{const c=l.controller.getParsed(e),h=c&&c[l.vScale.axis];if(F(h)||isNaN(h))return!0};for(const l of s)if(!(e!==void 0&&r(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,n){const s=this._getStacks(t,n),o=e!==void 0?s.indexOf(e):-1;return o===-1?s.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,s=[];let o,a;for(o=0,a=e.data.length;o<a;++o)s.push(n.getPixelForValue(this.getParsed(o)[n.axis],o));const r=t.barThickness;return{min:r||Nc(e),pixels:s,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:n,index:s},options:{base:o,minBarLength:a}}=this,r=o||0,l=this.getParsed(t),c=l._custom,h=en(c);let d=l[e.axis],u=0,f=n?this.applyStack(e,l,n):d,p,g;f!==d&&(u=f-d,f=d),h&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&pt(d)!==pt(c.barEnd)&&(u=0),u+=d);const m=!F(o)&&!h?o:u;let x=e.getPixelForValue(m);if(this.chart.getDataVisibility(t)?p=e.getPixelForValue(u+f):p=x,g=p-x,Math.abs(g)<a){g=Uc(g,e,r)*a,d===r&&(x-=g/2);const y=e.getPixelForDecimal(0),M=e.getPixelForDecimal(1),A=Math.min(y,M),k=Math.max(y,M);x=Math.max(Math.min(x,k),A),p=x+g,n&&!h&&(l._stacks[e.axis]._visualValues[s]=e.getValueForPixel(p)-e.getValueForPixel(x))}if(x===e.getPixelForValue(r)){const y=pt(g)*e.getLineWidthForValue(r)/2;x+=y,g-=y}return{size:g,base:x,head:p,center:p+g/2}}_calculateBarIndexPixels(t,e){const n=e.scale,s=this.options,o=s.skipNull,a=O(s.maxBarThickness,1/0);let r,l;if(e.grouped){const c=o?this._getStackCount(t):e.stackCount,h=s.barThickness==="flex"?jc(t,e,s,c):Gc(t,e,s,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);r=h.start+h.chunk*d+h.chunk/2,l=Math.min(a,h.chunk*h.ratio)}else r=n.getPixelForValue(this.getParsed(t)[n.axis],t),l=Math.min(a,e.min*e.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,n=t.data,s=n.length;let o=0;for(;o<s;++o)this.getParsed(o)[e.axis]!==null&&n[o].draw(this._ctx)}}P(ri,"id","bar"),P(ri,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),P(ri,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class li extends dt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,n,s){const o=super.parsePrimitiveData(t,e,n,s);for(let a=0;a<o.length;a++)o[a]._custom=this.resolveDataElementOptions(a+n).radius;return o}parseArrayData(t,e,n,s){const o=super.parseArrayData(t,e,n,s);for(let a=0;a<o.length;a++){const r=e[n+a];o[a]._custom=O(r[2],this.resolveDataElementOptions(a+n).radius)}return o}parseObjectData(t,e,n,s){const o=super.parseObjectData(t,e,n,s);for(let a=0;a<o.length;a++){const r=e[n+a];o[a]._custom=O(r&&r.r&&+r.r,this.resolveDataElementOptions(a+n).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:s,yScale:o}=e,a=this.getParsed(t),r=s.getLabelForValue(a.x),l=o.getLabelForValue(a.y),c=a._custom;return{label:n[t]||"",value:"("+r+", "+l+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,s){const o=s==="reset",{iScale:a,vScale:r}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,s),h=a.axis,d=r.axis;for(let u=e;u<e+n;u++){const f=t[u],p=!o&&this.getParsed(u),g={},m=g[h]=o?a.getPixelForDecimal(.5):a.getPixelForValue(p[h]),x=g[d]=o?r.getBasePixel():r.getPixelForValue(p[d]);g.skip=isNaN(m)||isNaN(x),c&&(g.options=l||this.resolveDataElementOptions(u,f.active?"active":s),o&&(g.options.radius=0)),this.updateElement(f,u,g,s)}}resolveDataElementOptions(t,e){const n=this.getParsed(t);let s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const o=s.radius;return e!=="active"&&(s.radius=0),s.radius+=O(n&&n._custom,o),s}}P(li,"id","bubble"),P(li,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),P(li,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Jc(i,t,e){let n=1,s=1,o=0,a=0;if(t<N){const r=i,l=r+t,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(M,A,k)=>we(M,r,l,!0)?1:Math.max(A,A*e,k,k*e),p=(M,A,k)=>we(M,r,l,!0)?-1:Math.min(A,A*e,k,k*e),g=f(0,c,d),m=f(U,h,u),x=p(H,c,d),y=p(H+U,h,u);n=(g-x)/2,s=(m-y)/2,o=-(g+x)/2,a=-(m+y)/2}return{ratioX:n,ratioY:s,offsetX:o,offsetY:a}}class Zt extends dt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=n;else{let o=l=>+n[l];if(I(n[t])){const{key:l="value"}=this._parsing;o=c=>+zt(n[c],l)}let a,r;for(a=t,r=t+e;a<r;++a)s._parsed[a]=o(a)}}_getRotation(){return ht(this.options.rotation-90)}_getCircumference(){return ht(this.options.circumference)}_getRotationExtents(){let t=N,e=-N;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const s=this.chart.getDatasetMeta(n).controller,o=s._getRotation(),a=s._getCircumference();t=Math.min(t,o),e=Math.max(e,o+a)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:n}=e,s=this._cachedMeta,o=s.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(n.width,n.height)-a)/2,0),l=Math.min(hl(this.options.cutout,r),1),c=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:p,offsetY:g}=Jc(d,h,l),m=(n.width-a)/u,x=(n.height-a)/f,y=Math.max(Math.min(m,x)/2,0),M=$n(this.options.radius,y),A=Math.max(M*l,0),k=(M-A)/this._getVisibleDatasetWeightTotal();this.offsetX=p*M,this.offsetY=g*M,s.total=this.calculateTotal(),this.outerRadius=M-k*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-k*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const n=this.options,s=this._cachedMeta,o=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*o/N)}updateElements(t,e,n,s){const o=s==="reset",a=this.chart,r=a.chartArea,c=a.options.animation,h=(r.left+r.right)/2,d=(r.top+r.bottom)/2,u=o&&c.animateScale,f=u?0:this.innerRadius,p=u?0:this.outerRadius,{sharedOptions:g,includeOptions:m}=this._getSharedOptions(e,s);let x=this._getRotation(),y;for(y=0;y<e;++y)x+=this._circumference(y,o);for(y=e;y<e+n;++y){const M=this._circumference(y,o),A=t[y],k={x:h+this.offsetX,y:d+this.offsetY,startAngle:x,endAngle:x+M,circumference:M,outerRadius:p,innerRadius:f};m&&(k.options=g||this.resolveDataElementOptions(y,A.active?"active":s)),x+=M,this.updateElement(A,y,k,s)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let n=0,s;for(s=0;s<e.length;s++){const o=t._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!e[s].hidden&&(n+=Math.abs(o))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?N*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=Ae(e._parsed[t],n.options.locale);return{label:s[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const n=this.chart;let s,o,a,r,l;if(!t){for(s=0,o=n.data.datasets.length;s<o;++s)if(n.isDatasetVisible(s)){a=n.getDatasetMeta(s),t=a.data,r=a.controller;break}}if(!t)return 0;for(s=0,o=t.length;s<o;++s)l=r.resolveDataElementOptions(s),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,s=t.length;n<s;++n){const o=this.resolveDataElementOptions(n);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(O(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}P(Zt,"id","doughnut"),P(Zt,"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"}),P(Zt,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),P(Zt,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:s}}=t.legend.options;return e.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}});class ci extends dt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:s=[],_dataset:o}=e,a=this.chart._animationsDisabled;let{start:r,count:l}=fs(e,s,a);this._drawStart=r,this._drawCount=l,ps(e)&&(r=0,l=s.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!a,options:c},t),this.updateElements(s,r,l,t)}updateElements(t,e,n,s){const o=s==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,s),u=a.axis,f=r.axis,{spanGaps:p,segment:g}=this.options,m=se(p)?p:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||o||s==="none",y=e+n,M=t.length;let A=e>0&&this.getParsed(e-1);for(let k=0;k<M;++k){const T=t[k],S=x?T:{};if(k<e||k>=y){S.skip=!0;continue}const C=this.getParsed(k),L=F(C[f]),z=S[u]=a.getPixelForValue(C[u],k),V=S[f]=o||L?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,C,l):C[f],k);S.skip=isNaN(z)||isNaN(V)||L,S.stop=k>0&&Math.abs(C[u]-A[u])>m,g&&(S.parsed=C,S.raw=c.data[k]),d&&(S.options=h||this.resolveDataElementOptions(k,T.active?"active":s)),x||this.updateElement(T,k,S,s),A=C}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return n;const o=s[0].size(this.resolveDataElementOptions(0)),a=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(n,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}P(ci,"id","line"),P(ci,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),P(ci,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ce extends dt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=Ae(e._parsed[t].r,n.options.locale);return{label:s[t]||"",value:o}}parseObjectData(t,e,n,s){return Ls.bind(this)(t,e,n,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((n,s)=>{const o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(s/2,0),a=Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0),r=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,n,s){const o=s==="reset",a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*H;let f=u,p;const g=360/this.countVisibleElements();for(p=0;p<e;++p)f+=this._computeAngle(p,s,g);for(p=e;p<e+n;p++){const m=t[p];let x=f,y=f+this._computeAngle(p,s,g),M=a.getDataVisibility(p)?c.getDistanceFromCenterForValue(this.getParsed(p).r):0;f=y,o&&(l.animateScale&&(M=0),l.animateRotate&&(x=y=u));const A={x:h,y:d,innerRadius:0,outerRadius:M,startAngle:x,endAngle:y,options:this.resolveDataElementOptions(p,m.active?"active":s)};this.updateElement(m,p,A,s)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((n,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?ht(this.resolveDataElementOptions(t,e).angle||n):0}}P(Ce,"id","polarArea"),P(Ce,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),P(Ce,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:s}}=t.legend.options;return e.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class nn extends Zt{}P(nn,"id","pie"),P(nn,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class hi extends dt{getLabelAndValue(t){const e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}parseObjectData(t,e,n,s){return Ls.bind(this)(t,e,n,s)}update(t){const e=this._cachedMeta,n=e.dataset,s=e.data||[],o=e.iScale.getLabels();if(n.points=s,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const r={_loop:!0,_fullLoop:o.length===s.length,options:a};this.updateElement(n,void 0,r,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,n,s){const o=this._cachedMeta.rScale,a=s==="reset";for(let r=e;r<e+n;r++){const l=t[r],c=this.resolveDataElementOptions(r,l.active?"active":s),h=o.getPointPositionForValue(r,this.getParsed(r).r),d=a?o.xCenter:h.x,u=a?o.yCenter:h.y,f={x:d,y:u,angle:h.angle,skip:isNaN(d)||isNaN(u),options:c};this.updateElement(l,r,f,s)}}}P(hi,"id","radar"),P(hi,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),P(hi,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class di extends dt{getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:s,yScale:o}=e,a=this.getParsed(t),r=s.getLabelForValue(a.x),l=o.getLabelForValue(a.y);return{label:n[t]||"",value:"("+r+", "+l+")"}}update(t){const e=this._cachedMeta,{data:n=[]}=e,s=this.chart._animationsDisabled;let{start:o,count:a}=fs(e,n,s);if(this._drawStart=o,this._drawCount=a,ps(e)&&(o=0,a=n.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:r,_dataset:l}=e;r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!l._decimated,r.points=n;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:c},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(n,o,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,n,s){const o=s==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,h=this.resolveDataElementOptions(e,s),d=this.getSharedOptions(h),u=this.includeOptions(s,d),f=a.axis,p=r.axis,{spanGaps:g,segment:m}=this.options,x=se(g)?g:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||o||s==="none";let M=e>0&&this.getParsed(e-1);for(let A=e;A<e+n;++A){const k=t[A],T=this.getParsed(A),S=y?k:{},C=F(T[p]),L=S[f]=a.getPixelForValue(T[f],A),z=S[p]=o||C?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,T,l):T[p],A);S.skip=isNaN(L)||isNaN(z)||C,S.stop=A>0&&Math.abs(T[f]-M[f])>x,m&&(S.parsed=T,S.raw=c.data[A]),u&&(S.options=d||this.resolveDataElementOptions(A,k.active?"active":s)),y||this.updateElement(k,A,S,s),M=T}this.updateSharedOptions(d,s,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let r=0;for(let l=e.length-1;l>=0;--l)r=Math.max(r,e[l].size(this.resolveDataElementOptions(l))/2);return r>0&&r}const n=t.dataset,s=n.options&&n.options.borderWidth||0;if(!e.length)return s;const o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,o,a)/2}}P(di,"id","scatter"),P(di,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),P(di,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Qc=Object.freeze({__proto__:null,BarController:ri,BubbleController:li,DoughnutController:Zt,LineController:ci,PieController:nn,PolarAreaController:Ce,RadarController:hi,ScatterController:di});function Kt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sn{constructor(t){P(this,"options");this.options=t||{}}static override(t){Object.assign(sn.prototype,t)}init(){}formats(){return Kt()}parse(){return Kt()}format(){return Kt()}add(){return Kt()}diff(){return Kt()}startOf(){return Kt()}endOf(){return Kt()}}var _c={_date:sn};function $c(i,t,e,n){const{controller:s,data:o,_sorted:a}=i,r=s._cachedMeta.iScale;if(r&&t===r.axis&&t!=="r"&&a&&o.length){const l=r._reversePixels?kl:At;if(n){if(s._sharedOptions){const c=o[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){const d=l(o,t,e-h),u=l(o,t,e+h);return{lo:d.lo,hi:u.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function Le(i,t,e,n,s){const o=i.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r<l;++r){const{index:c,data:h}=o[r],{lo:d,hi:u}=$c(o[r],t,a,s);for(let f=d;f<=u;++f){const p=h[f];p.skip||n(p,c,f)}}}function th(i){const t=i.indexOf("x")!==-1,e=i.indexOf("y")!==-1;return function(n,s){const o=t?Math.abs(n.x-s.x):0,a=e?Math.abs(n.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function on(i,t,e,n,s){const o=[];return!s&&!i.isPointInArea(t)||Le(i,e,t,function(r,l,c){!s&&!Mt(r,i.chartArea,0)||r.inRange(t.x,t.y,n)&&o.push({element:r,datasetIndex:l,index:c})},!0),o}function eh(i,t,e,n){let s=[];function o(a,r,l){const{startAngle:c,endAngle:h}=a.getProps(["startAngle","endAngle"],n),{angle:d}=rs(a,{x:t.x,y:t.y});we(d,c,h)&&s.push({element:a,datasetIndex:r,index:l})}return Le(i,e,t,o),s}function ih(i,t,e,n,s,o){let a=[];const r=th(e);let l=Number.POSITIVE_INFINITY;function c(h,d,u){const f=h.inRange(t.x,t.y,s);if(n&&!f)return;const p=h.getCenterPoint(s);if(!(!!o||i.isPointInArea(p))&&!f)return;const m=r(t,p);m<l?(a=[{element:h,datasetIndex:d,index:u}],l=m):m===l&&a.push({element:h,datasetIndex:d,index:u})}return Le(i,e,t,c),a}function an(i,t,e,n,s,o){return!o&&!i.isPointInArea(t)?[]:e==="r"&&!n?eh(i,t,e,s):ih(i,t,e,n,s,o)}function eo(i,t,e,n,s){const o=[],a=e==="x"?"inXRange":"inYRange";let r=!1;return Le(i,e,t,(l,c,h)=>{l[a](t[e],s)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(t.x,t.y,s))}),n&&!r?[]:o}var nh={evaluateInteractionItems:Le,modes:{index(i,t,e,n){const s=Yt(t,i),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?on(i,s,o,n,a):an(i,s,o,!1,n,a),l=[];return r.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=r[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,n){const s=Yt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;let r=e.intersect?on(i,s,o,n,a):an(i,s,o,!1,n,a);if(r.length>0){const l=r[0].datasetIndex,c=i.getDatasetMeta(l).data;r=[];for(let h=0;h<c.length;++h)r.push({element:c[h],datasetIndex:l,index:h})}return r},point(i,t,e,n){const s=Yt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;return on(i,s,o,n,a)},nearest(i,t,e,n){const s=Yt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;return an(i,s,o,e.intersect,n,a)},x(i,t,e,n){const s=Yt(t,i);return eo(i,s,"x",e.intersect,n)},y(i,t,e,n){const s=Yt(t,i);return eo(i,s,"y",e.intersect,n)}}};const io=["left","top","right","bottom"];function Oe(i,t){return i.filter(e=>e.pos===t)}function no(i,t){return i.filter(e=>io.indexOf(e.pos)===-1&&e.box.axis===t)}function ze(i,t){return i.sort((e,n)=>{const s=t?n:e,o=t?e:n;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function sh(i){const t=[];let e,n,s,o,a,r;for(e=0,n=(i||[]).length;e<n;++e)s=i[e],{position:o,options:{stack:a,stackWeight:r=1}}=s,t.push({index:e,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:a&&o+a,stackWeight:r});return t}function oh(i){const t={};for(const e of i){const{stack:n,pos:s,stackWeight:o}=e;if(!n||!io.includes(s))continue;const a=t[n]||(t[n]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function ah(i,t){const e=oh(i),{vBoxMaxWidth:n,hBoxMaxHeight:s}=t;let o,a,r;for(o=0,a=i.length;o<a;++o){r=i[o];const{fullSize:l}=r.box,c=e[r.stack],h=c&&r.stackWeight/c.weight;r.horizontal?(r.width=h?h*n:l&&t.availableWidth,r.height=s):(r.width=n,r.height=h?h*s:l&&t.availableHeight)}return e}function rh(i){const t=sh(i),e=ze(t.filter(c=>c.box.fullSize),!0),n=ze(Oe(t,"left"),!0),s=ze(Oe(t,"right")),o=ze(Oe(t,"top"),!0),a=ze(Oe(t,"bottom")),r=no(t,"x"),l=no(t,"y");return{fullSize:e,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(a).concat(r),chartArea:Oe(t,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(a).concat(r)}}function so(i,t,e,n){return Math.max(i[e],t[e])+Math.max(i[n],t[n])}function oo(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function lh(i,t,e,n){const{pos:s,box:o}=e,a=i.maxPadding;if(!I(s)){e.size&&(i[s]-=e.size);const d=n[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[s]+=e.size}o.getPadding&&oo(a,o.getPadding());const r=Math.max(0,t.outerWidth-so(a,i,"left","right")),l=Math.max(0,t.outerHeight-so(a,i,"top","bottom")),c=r!==i.w,h=l!==i.h;return i.w=r,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function ch(i){const t=i.maxPadding;function e(n){const s=Math.max(t[n]-i[n],0);return i[n]+=s,s}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function hh(i,t){const e=t.maxPadding;function n(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return n(i?["left","right"]:["top","bottom"])}function Ve(i,t,e,n){const s=[];let o,a,r,l,c,h;for(o=0,a=i.length,c=0;o<a;++o){r=i[o],l=r.box,l.update(r.width||t.w,r.height||t.h,hh(r.horizontal,t));const{same:d,other:u}=lh(t,e,r,n);c|=d&&s.length,h=h||u,l.fullSize||s.push(r)}return c&&Ve(s,t,e,n)||h}function ui(i,t,e,n,s){i.top=e,i.left=t,i.right=t+n,i.bottom=e+s,i.width=n,i.height=s}function ao(i,t,e,n){const s=e.padding;let{x:o,y:a}=t;for(const r of i){const l=r.box,c=n[r.stack]||{count:1,placed:0,weight:1},h=r.stackWeight/c.weight||1;if(r.horizontal){const d=t.w*h,u=c.size||l.height;ye(c.start)&&(a=c.start),l.fullSize?ui(l,s.left,a,e.outerWidth-s.right-s.left,u):ui(l,t.left+c.placed,a,d,u),c.start=a,c.placed+=d,a=l.bottom}else{const d=t.h*h,u=c.size||l.width;ye(c.start)&&(o=c.start),l.fullSize?ui(l,o,s.top,u,e.outerHeight-s.bottom-s.top):ui(l,o,t.top+c.placed,u,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=a}var tt={addBox(i,t){i.boxes||(i.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},i.boxes.push(t)},removeBox(i,t){const e=i.boxes?i.boxes.indexOf(t):-1;e!==-1&&i.boxes.splice(e,1)},configure(i,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(i,t,e,n){if(!i)return;const s=$(i.options.layout.padding),o=Math.max(t-s.width,0),a=Math.max(e-s.height,0),r=rh(i.boxes),l=r.vertical,c=r.horizontal;E(i.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:s,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},s);oo(u,$(n));const f=Object.assign({maxPadding:u,w:o,h:a,x:s.left,y:s.top},s),p=ah(l.concat(c),d);Ve(r.fullSize,f,d,p),Ve(l,f,d,p),Ve(c,f,d,p)&&Ve(l,f,d,p),ch(f),ao(r.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,ao(r.rightAndBottom,f,d,p),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},E(r.chartArea,g=>{const m=g.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class ro{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,s){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):n)}}isAttached(t){return!0}updateConfig(t){}}class dh extends ro{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const fi="$chartjs",uh={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},lo=i=>i===null||i==="";function fh(i,t){const e=i.style,n=i.getAttribute("height"),s=i.getAttribute("width");if(i[fi]={initial:{height:n,width:s,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",lo(s)){const o=Is(i,"width");o!==void 0&&(i.width=o)}if(lo(n))if(i.style.height==="")i.height=i.width/(t||2);else{const o=Is(i,"height");o!==void 0&&(i.height=o)}return i}const co=gc?{passive:!0}:!1;function ph(i,t,e){i.addEventListener(t,e,co)}function gh(i,t,e){i.canvas.removeEventListener(t,e,co)}function mh(i,t){const e=uh[i.type]||i.type,{x:n,y:s}=Yt(i,t);return{type:e,chart:t,native:i,x:n!==void 0?n:null,y:s!==void 0?s:null}}function pi(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function bh(i,t,e){const n=i.canvas,s=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||pi(r.addedNodes,n),a=a&&!pi(r.removedNodes,n);a&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function xh(i,t,e){const n=i.canvas,s=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||pi(r.removedNodes,n),a=a&&!pi(r.addedNodes,n);a&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}const Ie=new Map;let ho=0;function uo(){const i=window.devicePixelRatio;i!==ho&&(ho=i,Ie.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function yh(i,t){Ie.size||window.addEventListener("resize",uo),Ie.set(i,t)}function vh(i){Ie.delete(i),Ie.size||window.removeEventListener("resize",uo)}function wh(i,t,e){const n=i.canvas,s=n&&_i(n);if(!s)return;const o=us((r,l)=>{const c=s.clientWidth;e(r,l),c<s.clientWidth&&e()},window),a=new ResizeObserver(r=>{const l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(s),yh(i,o),a}function rn(i,t,e){e&&e.disconnect(),t==="resize"&&vh(i)}function kh(i,t,e){const n=i.canvas,s=us(o=>{i.ctx!==null&&e(mh(o,i))},i);return ph(n,t,s),s}class Ah extends ro{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(fh(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[fi])return!1;const n=e[fi].initial;["height","width"].forEach(o=>{const a=n[o];F(a)?e.removeAttribute(o):e.setAttribute(o,a)});const s=n.style||{};return Object.keys(s).forEach(o=>{e.style[o]=s[o]}),e.width=e.width,delete e[fi],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),a={attach:bh,detach:xh,resize:wh}[e]||kh;s[e]=a(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),s=n[e];if(!s)return;({attach:rn,detach:rn,resize:rn}[e]||gh)(t,e,s),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,s){return pc(t,e,n,s)}isAttached(t){const e=_i(t);return!!(e&&e.isConnected)}}function Mh(i){return!zs()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?dh:Ah}class ut{constructor(){P(this,"x");P(this,"y");P(this,"active",!1);P(this,"options");P(this,"$animations")}tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return se(this.x)&&se(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const s={};return t.forEach(o=>{s[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),s}}P(ut,"defaults",{}),P(ut,"defaultRoutes");function Ph(i,t){const e=i.options.ticks,n=Th(i),s=Math.min(e.maxTicksLimit||n,n),o=e.major.enabled?Ch(t):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>s)return Lh(t,c,o,a/s),c;const h=Sh(o,t,s);if(a>0){let d,u;const f=a>1?Math.round((l-r)/(a-1)):null;for(gi(t,c,h,F(f)?0:r-f,r),d=0,u=a-1;d<u;d++)gi(t,c,h,o[d],o[d+1]);return gi(t,c,h,l,F(f)?t.length:l+f),c}return gi(t,c,h),c}function Th(i){const t=i.options.offset,e=i._tickSize(),n=i._length/e+(t?0:1),s=i._maxLength/e;return Math.floor(Math.min(n,s))}function Sh(i,t,e){const n=Oh(i),s=t.length/e;if(!n)return Math.max(s,1);const o=xl(n);for(let a=0,r=o.length-1;a<r;a++){const l=o[a];if(l>s)return l}return Math.max(s,1)}function Ch(i){const t=[];let e,n;for(e=0,n=i.length;e<n;e++)i[e].major&&t.push(e);return t}function Lh(i,t,e,n){let s=0,o=e[0],a;for(n=Math.ceil(n),a=0;a<i.length;a++)a===o&&(t.push(i[a]),s++,o=e[s*n])}function gi(i,t,e,n,s){const o=O(n,0),a=Math.min(O(s,i.length),i.length);let r=0,l,c,h;for(e=Math.ceil(e),s&&(l=s-n,e=l/Math.floor(l/e)),h=o;h<0;)r++,h=Math.round(o+r*e);for(c=Math.max(o,0);c<a;c++)c===h&&(t.push(i[c]),r++,h=Math.round(o+r*e))}function Oh(i){const t=i.length;let e,n;if(t<2)return!1;for(n=i[0],e=1;e<t;++e)if(i[e]-i[e-1]!==n)return!1;return n}const zh=i=>i==="left"?"right":i==="right"?"left":i,fo=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,po=(i,t)=>Math.min(t||i,i);function go(i,t){const e=[],n=i.length/t,s=i.length;let o=0;for(;o<s;o+=n)e.push(i[Math.floor(o)]);return e}function Vh(i,t,e){const n=i.ticks.length,s=Math.min(t,n-1),o=i._startPixel,a=i._endPixel,r=1e-6;let l=i.getPixelForTick(s),c;if(!(e&&(n===1?c=Math.max(l-o,a-l):t===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(s-1))/2,l+=s<t?c:-c,l<o-r||l>a+r)))return l}function Ih(i,t){E(i,e=>{const n=e.gc,s=n.length/2;let o;if(s>t){for(o=0;o<s;++o)delete e.data[n[o]];n.splice(0,s)}})}function De(i){return i.drawTicks?i.tickLength:0}function mo(i,t){if(!i.display)return 0;const e=X(i.font,t),n=$(i.padding);return(W(i.text)?i.text.length:1)*e.lineHeight+n.height}function Dh(i,t){return Dt(i,{scale:t,type:"scale"})}function Fh(i,t,e){return Dt(i,{tick:e,index:t,type:"tick"})}function Eh(i,t,e){let n=Gi(i);return(e&&t!=="right"||!e&&t==="right")&&(n=zh(n)),n}function Rh(i,t,e,n){const{top:s,left:o,bottom:a,right:r,chart:l}=i,{chartArea:c,scales:h}=l;let d=0,u,f,p;const g=a-s,m=r-o;if(i.isHorizontal()){if(f=_(n,o,r),I(e)){const x=Object.keys(e)[0],y=e[x];p=h[x].getPixelForValue(y)+g-t}else e==="center"?p=(c.bottom+c.top)/2+g-t:p=fo(i,e,t);u=r-o}else{if(I(e)){const x=Object.keys(e)[0],y=e[x];f=h[x].getPixelForValue(y)-m+t}else e==="center"?f=(c.left+c.right)/2-m+t:f=fo(i,e,t);p=_(n,a,s),d=e==="left"?-U:U}return{titleX:f,titleY:p,maxWidth:u,rotation:d}}class Xt extends ut{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:s}=this;return t=at(t,Number.POSITIVE_INFINITY),e=at(e,Number.NEGATIVE_INFINITY),n=at(n,Number.POSITIVE_INFINITY),s=at(s,Number.NEGATIVE_INFINITY),{min:at(t,n),max:at(e,s),minDefined:j(t),maxDefined:j(e)}}getMinMax(t){let{min:e,max:n,minDefined:s,maxDefined:o}=this.getUserBounds(),a;if(s&&o)return{min:e,max:n};const r=this.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)a=r[l].controller.getMinMax(this,t),s||(e=Math.min(e,a.min)),o||(n=Math.max(n,a.max));return e=o&&e>n?n:e,n=s&&e>n?e:n,{min:at(e,at(n,e)),max:at(n,at(e,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){B(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:s,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Zl(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=r<this.ticks.length;this._convertTicksToLabels(l?go(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Ph(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,n;this.isHorizontal()?(e=this.left,n=this.right):(e=this.top,n=this.bottom,t=!t),this._startPixel=e,this._endPixel=n,this._reversePixels=t,this._length=n-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){B(this.options.afterUpdate,[this])}beforeSetDimensions(){B(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(){B(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),B(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){B(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let n,s,o;for(n=0,s=t.length;n<s;n++)o=t[n],o.label=B(e.callback,[o.value,n,t],this)}afterTickToLabelConversion(){B(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){B(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=po(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,o=e.maxRotation;let a=s,r,l,c;if(!this._isVisible()||!e.display||s>=o||n<=1||!this.isHorizontal()){this.labelRotation=s;return}const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=J(this.chart.width-d,0,this.maxWidth);r=t.offset?this.maxWidth/n:f/(n-1),d+6>r&&(r=f/(n-(t.offset?.5:1)),l=this.maxHeight-De(t.grid)-e.padding-mo(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=Wi(Math.min(Math.asin(J((h.highest.height+6)/r,-1,1)),Math.asin(J(l/c,-1,1))-Math.asin(J(u/c,-1,1)))),a=Math.max(s,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){B(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){B(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:s,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const l=mo(s,e.options.font);if(r?(t.width=this.maxWidth,t.height=De(o)+l):(t.height=this.maxHeight,t.width=De(o)+l),n.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=n.padding*2,p=ht(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(r){const x=n.mirror?0:m*d.width+g*u.height;t.height=Math.min(this.maxHeight,t.height+x+f)}else{const x=n.mirror?0:g*d.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+x+f)}this._calculatePadding(c,h,m,g)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,s){const{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?c?(u=s*t.width,f=n*e.height):(u=n*t.height,f=s*e.width):o==="start"?f=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+a)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+a,this.paddingBottom=d+a}}_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(){B(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,n;for(e=0,n=t.length;e<n;e++)F(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=go(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){const{ctx:s,_longestTextCache:o}=this,a=[],r=[],l=Math.floor(e/po(e,n));let c=0,h=0,d,u,f,p,g,m,x,y,M,A,k;for(d=0;d<e;d+=l){if(p=t[d].label,g=this._resolveTickFontOptions(d),s.font=m=g.string,x=o[m]=o[m]||{data:{},gc:[]},y=g.lineHeight,M=A=0,!F(p)&&!W(p))M=ti(s,x.data,x.gc,M,p),A=y;else if(W(p))for(u=0,f=p.length;u<f;++u)k=p[u],!F(k)&&!W(k)&&(M=ti(s,x.data,x.gc,M,k),A+=y);a.push(M),r.push(A),c=Math.max(M,c),h=Math.max(A,h)}Ih(o,e);const T=a.indexOf(c),S=r.indexOf(h),C=L=>({width:a[L]||0,height:r[L]||0});return{first:C(0),last:C(e-1),widest:C(T),highest:C(S),widths:a,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return wl(this._alignToPixels?Ht(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=Fh(this.getContext(),t,n))}return this.$context||(this.$context=Dh(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=ht(this.labelRotation),n=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,r=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*n>r*s?r/n:l/s:l*s<r*n?l/n:r/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,s=this.options,{grid:o,position:a,border:r}=s,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=De(o),f=[],p=r.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,x=function(G){return Ht(n,G,g)};let y,M,A,k,T,S,C,L,z,V,D,Q;if(a==="top")y=x(this.bottom),S=this.bottom-u,L=y-m,V=x(t.top)+m,Q=t.bottom;else if(a==="bottom")y=x(this.top),V=t.top,Q=x(t.bottom)-m,S=y+m,L=this.top+u;else if(a==="left")y=x(this.right),T=this.right-u,C=y-m,z=x(t.left)+m,D=t.right;else if(a==="right")y=x(this.left),z=t.left,D=x(t.right)-m,T=y+m,C=this.left+u;else if(e==="x"){if(a==="center")y=x((t.top+t.bottom)/2+.5);else if(I(a)){const G=Object.keys(a)[0],Z=a[G];y=x(this.chart.scales[G].getPixelForValue(Z))}V=t.top,Q=t.bottom,S=y+m,L=S+u}else if(e==="y"){if(a==="center")y=x((t.left+t.right)/2);else if(I(a)){const G=Object.keys(a)[0],Z=a[G];y=x(this.chart.scales[G].getPixelForValue(Z))}T=y-m,C=T-u,z=t.left,D=t.right}const lt=O(s.ticks.maxTicksLimit,d),R=Math.max(1,Math.ceil(d/lt));for(M=0;M<d;M+=R){const G=this.getContext(M),Z=o.setContext(G),ft=r.setContext(G),it=Z.lineWidth,ce=Z.color,Li=ft.dash||[],he=ft.dashOffset,Ne=Z.tickWidth,Ge=Z.tickColor,je=Z.tickBorderDash||[],Ye=Z.tickBorderDashOffset;A=Vh(this,M,l),A!==void 0&&(k=Ht(n,A,it),c?T=C=z=D=k:S=L=V=Q=k,f.push({tx1:T,ty1:S,tx2:C,ty2:L,x1:z,y1:V,x2:D,y2:Q,width:it,color:ce,borderDash:Li,borderDashOffset:he,tickWidth:Ne,tickColor:Ge,tickBorderDash:je,tickBorderDashOffset:Ye}))}return this._ticksLength=d,this._borderValue=y,f}_computeLabelItems(t){const e=this.axis,n=this.options,{position:s,ticks:o}=n,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=De(n.grid),f=u+h,p=d?-h:f,g=-ht(this.labelRotation),m=[];let x,y,M,A,k,T,S,C,L,z,V,D,Q="middle";if(s==="top")T=this.bottom-p,S=this._getXAxisLabelAlignment();else if(s==="bottom")T=this.top+p,S=this._getXAxisLabelAlignment();else if(s==="left"){const R=this._getYAxisLabelAlignment(u);S=R.textAlign,k=R.x}else if(s==="right"){const R=this._getYAxisLabelAlignment(u);S=R.textAlign,k=R.x}else if(e==="x"){if(s==="center")T=(t.top+t.bottom)/2+f;else if(I(s)){const R=Object.keys(s)[0],G=s[R];T=this.chart.scales[R].getPixelForValue(G)+f}S=this._getXAxisLabelAlignment()}else if(e==="y"){if(s==="center")k=(t.left+t.right)/2-f;else if(I(s)){const R=Object.keys(s)[0],G=s[R];k=this.chart.scales[R].getPixelForValue(G)}S=this._getYAxisLabelAlignment(u).textAlign}e==="y"&&(l==="start"?Q="top":l==="end"&&(Q="bottom"));const lt=this._getLabelSizes();for(x=0,y=r.length;x<y;++x){M=r[x],A=M.label;const R=o.setContext(this.getContext(x));C=this.getPixelForTick(x)+o.labelOffset,L=this._resolveTickFontOptions(x),z=L.lineHeight,V=W(A)?A.length:1;const G=V/2,Z=R.color,ft=R.textStrokeColor,it=R.textStrokeWidth;let ce=S;a?(k=C,S==="inner"&&(x===y-1?ce=this.options.reverse?"left":"right":x===0?ce=this.options.reverse?"right":"left":ce="center"),s==="top"?c==="near"||g!==0?D=-V*z+z/2:c==="center"?D=-lt.highest.height/2-G*z+z:D=-lt.highest.height+z/2:c==="near"||g!==0?D=z/2:c==="center"?D=lt.highest.height/2-G*z:D=lt.highest.height-V*z,d&&(D*=-1),g!==0&&!R.showLabelBackdrop&&(k+=z/2*Math.sin(g))):(T=C,D=(1-V)*z/2);let Li;if(R.showLabelBackdrop){const he=$(R.backdropPadding),Ne=lt.heights[x],Ge=lt.widths[x];let je=D-he.top,Ye=0-he.left;switch(Q){case"middle":je-=Ne/2;break;case"bottom":je-=Ne;break}switch(S){case"center":Ye-=Ge/2;break;case"right":Ye-=Ge;break}Li={left:Ye,top:je,width:Ge+he.width,height:Ne+he.height,color:R.backdropColor}}m.push({label:A,font:L,textOffset:D,options:{rotation:g,color:Z,strokeColor:ft,strokeWidth:it,textAlign:ce,textBaseline:Q,translation:[k,T],backdrop:Li}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-ht(this.labelRotation))return t==="top"?"left":"right";let s="center";return e.align==="start"?s="left":e.align==="end"?s="right":e.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:s,padding:o}}=this.options,a=this._getLabelSizes(),r=t+o,l=a.widest.width;let c,h;return e==="left"?s?(h=this.right+o,n==="near"?c="left":n==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-r,n==="near"?c="right":n==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?s?(h=this.left+o,n==="near"?c="right":n==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+r,n==="near"?c="left":n==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:s,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,s,o,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const s=this.ticks.findIndex(o=>o.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const e=this.options.grid,n=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(l,c,h)=>{!h.width||!h.color||(n.save(),n.lineWidth=h.width,n.strokeStyle=h.color,n.setLineDash(h.borderDash||[]),n.lineDashOffset=h.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(e.display)for(o=0,a=s.length;o<a;++o){const l=s[o];e.drawOnChartArea&&r({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&r({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:n,grid:s}}=this,o=n.setContext(this.getContext()),a=n.display?o.width:0;if(!a)return;const r=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,h,d,u;this.isHorizontal()?(c=Ht(t,this.left,a)-a/2,h=Ht(t,this.right,r)+r/2,d=u=l):(d=Ht(t,this.top,a)-a/2,u=Ht(t,this.bottom,r)+r/2,c=h=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(c,d),e.lineTo(h,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const n=this.ctx,s=this._computeLabelArea();s&&ei(n,s);const o=this.getLabelItems(t);for(const a of o){const r=a.options,l=a.font,c=a.label,h=a.textOffset;Nt(n,c,0,h,l,r)}s&&ii(n)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:s}}=this;if(!n.display)return;const o=X(n.font),a=$(n.padding),r=n.align;let l=o.lineHeight/2;e==="bottom"||e==="center"||I(e)?(l+=a.bottom,W(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=a.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=Rh(this,l,e,r);Nt(t,n.text,0,0,o,{color:n.color,maxWidth:d,rotation:u,textAlign:Eh(r,e,s),textBaseline:"middle",translation:[c,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=O(t.grid&&t.grid.z,-1),s=O(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Xt.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",s=[];let o,a;for(o=0,a=e.length;o<a;++o){const r=e[o];r[n]===this.id&&(!t||r.type===t)&&s.push(r)}return s}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return X(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class mi{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;Hh(e)&&(n=this.register(e));const s=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in s||(s[o]=t,Bh(t,a,n),this.override&&Y.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,s=this.scope;n in e&&delete e[n],s&&n in Y[s]&&(delete Y[s][n],this.override&&delete Wt[n])}}function Bh(i,t,e){const n=be(Object.create(null),[e?Y.get(e):{},Y.get(t),i.defaults]);Y.set(t,n),i.defaultRoutes&&Wh(t,i.defaultRoutes),i.descriptors&&Y.describe(t,i.descriptors)}function Wh(i,t){Object.keys(t).forEach(e=>{const n=e.split("."),s=n.pop(),o=[i].concat(n).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");Y.route(o,s,l,r)})}function Hh(i){return"id"in i&&"defaults"in i}class Nh{constructor(){this.controllers=new mi(dt,"datasets",!0),this.elements=new mi(ut,"elements"),this.plugins=new mi(Object,"plugins"),this.scales=new mi(Xt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach(s=>{const o=n||this._getRegistryForType(s);n||o.isForType(s)||o===this.plugins&&s.id?this._exec(t,o,s):E(s,a=>{const r=n||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,n){const s=Bi(t);B(n["before"+s],[],n),e[t](n),B(n["after"+s],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const s=e.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+n+".");return s}}var gt=new Nh;class Gh{constructor(){this._init=[]}notify(t,e,n,s){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=s?this._descriptors(t).filter(s):this._descriptors(t),a=this._notify(o,t,e,n);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,n,s){s=s||{};for(const o of t){const a=o.plugin,r=a[n],l=[e,s,o.options];if(B(r,l,a)===!1&&s.cancelable)return!1}return!0}invalidate(){F(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,s=O(n.options&&n.options.plugins,{}),o=jh(n);return s===!1&&!e?[]:Uh(t,o,s,e)}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,s=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(s(e,n),t,"stop"),this._notify(s(n,e),t,"start")}}function jh(i){const t={},e=[],n=Object.keys(gt.plugins.items);for(let o=0;o<n.length;o++)e.push(gt.getPlugin(n[o]));const s=i.plugins||[];for(let o=0;o<s.length;o++){const a=s[o];e.indexOf(a)===-1&&(e.push(a),t[a.id]=!0)}return{plugins:e,localIds:t}}function Yh(i,t){return!t&&i===!1?null:i===!0?{}:i}function Uh(i,{plugins:t,localIds:e},n,s){const o=[],a=i.getContext();for(const r of t){const l=r.id,c=Yh(n[l],s);c!==null&&o.push({plugin:r,options:Zh(i.config,{plugin:r,local:e[l]},c,a)})}return o}function Zh(i,{plugin:t,local:e},n,s){const o=i.pluginScopeKeys(t),a=i.getOptionScopes(n,o);return e&&t.defaults&&a.push(t.defaults),i.createResolver(a,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ln(i,t){const e=Y.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function Kh(i,t){let e=i;return i==="_index_"?e=t:i==="_value_"&&(e=t==="x"?"y":"x"),e}function Xh(i,t){return i===t?"_index_":"_value_"}function bo(i){if(i==="x"||i==="y"||i==="r")return i}function qh(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function cn(i,...t){if(bo(i))return i;for(const e of t){const n=e.axis||qh(e.position)||i.length>1&&bo(i[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function xo(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function Jh(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(n=>n.xAxisID===i||n.yAxisID===i);if(e.length)return xo(i,"x",e[0])||xo(i,"y",e[0])}return{}}function Qh(i,t){const e=Wt[i.type]||{scales:{}},n=t.scales||{},s=ln(i.type,t),o=Object.create(null);return Object.keys(n).forEach(a=>{const r=n[a];if(!I(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=cn(a,r,Jh(a,i),Y.scales[r.type]),c=Xh(l,s),h=e.scales||{};o[a]=xe(Object.create(null),[{axis:l},r,h[l],h[c]])}),i.data.datasets.forEach(a=>{const r=a.type||i.type,l=a.indexAxis||ln(r,t),h=(Wt[r]||{}).scales||{};Object.keys(h).forEach(d=>{const u=Kh(d,l),f=a[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),xe(o[f],[{axis:u},n[f],h[d]])})}),Object.keys(o).forEach(a=>{const r=o[a];xe(r,[Y.scales[r.type],Y.scale])}),o}function yo(i){const t=i.options||(i.options={});t.plugins=O(t.plugins,{}),t.scales=Qh(i,t)}function vo(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function _h(i){return i=i||{},i.data=vo(i.data),yo(i),i}const wo=new Map,ko=new Set;function bi(i,t){let e=wo.get(i);return e||(e=t(),wo.set(i,e),ko.add(e)),e}const Fe=(i,t,e)=>{const n=zt(t,e);n!==void 0&&i.add(n)};class $h{constructor(t){this._config=_h(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=vo(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(),yo(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return bi(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return bi(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return bi(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,n=this.type;return bi(`${n}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const n=this._scopeCache;let s=n.get(t);return(!s||e)&&(s=new Map,n.set(t,s)),s}getOptionScopes(t,e,n){const{options:s,type:o}=this,a=this._cachedScopes(t,n),r=a.get(e);if(r)return r;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>Fe(l,t,d))),h.forEach(d=>Fe(l,s,d)),h.forEach(d=>Fe(l,Wt[o]||{},d)),h.forEach(d=>Fe(l,Y,d)),h.forEach(d=>Fe(l,Ui,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),ko.has(e)&&a.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,Wt[e]||{},Y.datasets[e]||{},{type:e},Y,Ui]}resolveNamedOptions(t,e,n,s=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=Ao(this._resolverCache,t,s);let l=a;if(ed(a,e)){o.$shared=!1,n=Vt(n)?n():n;const c=this.createResolver(t,n,r);l=oe(a,n,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,n=[""],s){const{resolver:o}=Ao(this._resolverCache,t,n);return I(e)?oe(o,e,void 0,s):o}}function Ao(i,t,e){let n=i.get(t);n||(n=new Map,i.set(t,n));const s=e.join();let o=n.get(s);return o||(o={resolver:qi(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},n.set(s,o)),o}const td=i=>I(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||Vt(i[e]),!1);function ed(i,t){const{isScriptable:e,isIndexable:n}=As(i);for(const s of t){const o=e(s),a=n(s),r=(a||o)&&i[s];if(o&&(Vt(r)||td(r))||a&&W(r))return!0}return!1}var id="4.4.0";const nd=["top","bottom","left","right","chartArea"];function Mo(i,t){return i==="top"||i==="bottom"||nd.indexOf(i)===-1&&t==="x"}function Po(i,t){return function(e,n){return e[i]===n[i]?e[t]-n[t]:e[i]-n[i]}}function To(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),B(e&&e.onComplete,[i],t)}function sd(i){const t=i.chart,e=t.options.animation;B(e&&e.onProgress,[i],t)}function So(i){return zs()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const xi={},Co=i=>{const t=So(i);return Object.values(xi).filter(e=>e.canvas===t).pop()};function od(i,t,e){const n=Object.keys(i);for(const s of n){const o=+s;if(o>=t){const a=i[s];delete i[s],(e>0||o>t)&&(i[o+e]=a)}}}function ad(i,t,e,n){return!e||i.type==="mouseout"?null:n?t:i}function yi(i,t,e){return i.options.clip?i[e]:t[e]}function rd(i,t){const{xScale:e,yScale:n}=i;return e&&n?{left:yi(e,t,"left"),right:yi(e,t,"right"),top:yi(n,t,"top"),bottom:yi(n,t,"bottom")}:t}class Tt{static register(...t){gt.add(...t),Lo()}static unregister(...t){gt.remove(...t),Lo()}constructor(t,e){const n=this.config=new $h(e),s=So(t),o=Co(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||Mh(s)),this.platform.updateConfig(n);const r=this.platform.acquireContext(s,a.aspectRatio),l=r&&r.canvas,c=l&&l.height,h=l&&l.width;if(this.id=cl(),this.ctx=r,this.canvas=l,this.width=h,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Gh,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Pl(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],xi[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Pt.listen(this,"complete",To),Pt.listen(this,"progress",sd),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:s,_aspectRatio:o}=this;return F(t)?e&&o?o:s?n/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return gt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Vs(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return vs(this.canvas,this.ctx),this}stop(){return Pt.stop(this),this}resize(t,e){Pt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,s=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(s,t,e,o),r=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Vs(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),B(n.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};E(e,(n,s)=>{n.id=s})}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,s=Object.keys(n).reduce((a,r)=>(a[r]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const r=e[a],l=cn(a,r),c=l==="r",h=l==="x";return{options:r,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),E(o,a=>{const r=a.options,l=r.id,c=cn(l,r),h=O(r.type,a.dtype);(r.position===void 0||Mo(r.position,c)!==Mo(a.dposition))&&(r.position=a.dposition),s[l]=!0;let d=null;if(l in n&&n[l].type===h)d=n[l];else{const u=gt.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),n[d.id]=d}d.init(r,t)}),E(s,(a,r)=>{a||delete n[r]}),E(n,a=>{tt.configure(this,a,a.options),tt.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((s,o)=>s.index-o.index),n>e){for(let s=e;s<n;++s)this._destroyDatasetMeta(s);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(Po("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((n,s)=>{e.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,s;for(this._removeUnreferencedMetasets(),n=0,s=e.length;n<s;n++){const o=e[n];let a=this.getDatasetMeta(n);const r=o.type||this.config.type;if(a.type&&a.type!==r&&(this._destroyDatasetMeta(n),a=this.getDatasetMeta(n)),a.type=r,a.indexAxis=o.indexAxis||ln(r,this.options),a.order=o.order||0,a.index=n,a.label=""+o.label,a.visible=this.isDatasetVisible(n),a.controller)a.controller.updateIndex(n),a.controller.linkScales();else{const l=gt.getController(r),{datasetElementType:c,dataElementType:h}=Y.datasets[r];Object.assign(l,{dataElementType:gt.getElement(h),datasetElementType:c&&gt.getElement(c)}),a.controller=new l(this,n),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){E(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,h=this.data.datasets.length;c<h;c++){const{controller:d}=this.getDatasetMeta(c),u=!s&&o.indexOf(d)===-1;d.buildOrUpdateElements(u),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=n.layout.autoPadding?a:0,this._updateLayout(a),s||E(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Po("z","_idx"));const{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){E(this.scales,t=>{tt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!is(e,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:s,count:o}of e){const a=n==="_removeElements"?-o:o;od(t,s,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),s=n(0);for(let o=1;o<e;o++)if(!is(s,n(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;tt.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],E(this.boxes,s=>{n&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,n=this.data.datasets.length;e<n;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,Vt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),s={meta:n,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(n.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Pt.has(this)?this.attached&&!Pt.running(this)&&Pt.start(this):(this.draw(),To({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:n,height:s}=this._resizeBeforeDraw;this._resize(n,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let s,o;for(s=0,o=e.length;s<o;++s){const a=e[s];(!t||a.visible)&&n.push(a)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n=t._clip,s=!n.disabled,o=rd(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(s&&ei(e,{left:n.left===!1?0:o.left-n.left,right:n.right===!1?this.width:o.right+n.right,top:n.top===!1?0:o.top-n.top,bottom:n.bottom===!1?this.height:o.bottom+n.bottom}),t.controller.draw(),s&&ii(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return Mt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,s){const o=nh.modes[e];return typeof o=="function"?o(this,t,n,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let s=n.filter(o=>o&&o._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(s)),s}getContext(){return this.$context||(this.$context=Dt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!e.hidden}setDatasetVisibility(t,e){const n=this.getDatasetMeta(t);n.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const s=n?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,s);ye(e)?(o.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),a.update(o,{visible:n}),this.update(r=>r.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Pt.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),vs(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete xi[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,n=(o,a)=>{e.addEventListener(this,o,a),t[o]=a},s=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};E(this.options.events,o=>n(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const r=()=>{s("attach",r),this.attached=!0,this.resize(),n("resize",o),n("detach",a)};a=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),n("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){E(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},E(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const s=n?"set":"remove";let o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),r=0,l=t.length;r<l;++r){a=t[r];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[s+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map(({datasetIndex:o,index:a})=>{const r=this.getDatasetMeta(o);if(!r)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:r.data[a],index:a}});!qe(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,n){const s=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),a=o(e,t),r=n?t:o(t,e);a.length&&this.updateHoverStyle(a,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,s)===!1)return;const o=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,s),(o||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:s=[],options:o}=this,a=e,r=this._getActiveElements(t,s,n,a),l=gl(t),c=ad(t,this._lastEvent,n,l);n&&(this._lastEvent=null,B(o.onHover,[t,r,this],this),l&&B(o.onClick,[t,r,this],this));const h=!qe(r,s);return(h||e)&&(this._active=r,this._updateHoverStyles(r,s,e)),this._lastEvent=c,h}_getActiveElements(t,e,n,s){if(t.type==="mouseout")return[];if(!n)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}}P(Tt,"defaults",Y),P(Tt,"instances",xi),P(Tt,"overrides",Wt),P(Tt,"registry",gt),P(Tt,"version",id),P(Tt,"getChart",Co);function Lo(){return E(Tt.instances,i=>i._plugins.invalidate())}function ld(i,t,e){const{startAngle:n,pixelMargin:s,x:o,y:a,outerRadius:r,innerRadius:l}=t;let c=s/r;i.beginPath(),i.arc(o,a,r,n-c,e+c),l>s?(c=s/l,i.arc(o,a,l,e+c,n-c,!0)):i.arc(o,a,s,e+U,n-U),i.closePath(),i.clip()}function cd(i){return Xi(i,["outerStart","outerEnd","innerStart","innerEnd"])}function hd(i,t,e,n){const s=cd(i.options.borderRadius),o=(e-t)/2,a=Math.min(o,n*t/2),r=l=>{const c=(e-Math.min(o,l))*n/2;return J(l,0,Math.min(o,c))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:J(s.innerStart,0,a),innerEnd:J(s.innerEnd,0,a)}}function le(i,t,e,n){return{x:e+i*Math.cos(t),y:n+i*Math.sin(t)}}function vi(i,t,e,n,s,o){const{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:h}=t,d=Math.max(t.outerRadius+n+e-c,0),u=h>0?h+n+e+c:0;let f=0;const p=s-l;if(n){const R=h>0?h-n:0,G=d>0?d-n:0,Z=(R+G)/2,ft=Z!==0?p*Z/(Z+n):p;f=(p-ft)/2}const g=Math.max(.001,p*d-e/H)/d,m=(p-g)/2,x=l+m+f,y=s-m-f,{outerStart:M,outerEnd:A,innerStart:k,innerEnd:T}=hd(t,u,d,y-x),S=d-M,C=d-A,L=x+M/S,z=y-A/C,V=u+k,D=u+T,Q=x+k/V,lt=y-T/D;if(i.beginPath(),o){const R=(L+z)/2;if(i.arc(a,r,d,L,R),i.arc(a,r,d,R,z),A>0){const it=le(C,z,a,r);i.arc(it.x,it.y,A,z,y+U)}const G=le(D,y,a,r);if(i.lineTo(G.x,G.y),T>0){const it=le(D,lt,a,r);i.arc(it.x,it.y,T,y+U,lt+Math.PI)}const Z=(y-T/u+(x+k/u))/2;if(i.arc(a,r,u,y-T/u,Z,!0),i.arc(a,r,u,Z,x+k/u,!0),k>0){const it=le(V,Q,a,r);i.arc(it.x,it.y,k,Q+Math.PI,x-U)}const ft=le(S,x,a,r);if(i.lineTo(ft.x,ft.y),M>0){const it=le(S,L,a,r);i.arc(it.x,it.y,M,x-U,L)}}else{i.moveTo(a,r);const R=Math.cos(L)*d+a,G=Math.sin(L)*d+r;i.lineTo(R,G);const Z=Math.cos(z)*d+a,ft=Math.sin(z)*d+r;i.lineTo(Z,ft)}i.closePath()}function dd(i,t,e,n,s){const{fullCircles:o,startAngle:a,circumference:r}=t;let l=t.endAngle;if(o){vi(i,t,e,n,l,s);for(let c=0;c<o;++c)i.fill();isNaN(r)||(l=a+(r%N||N))}return vi(i,t,e,n,l,s),i.fill(),l}function ud(i,t,e,n,s){const{fullCircles:o,startAngle:a,circumference:r,options:l}=t,{borderWidth:c,borderJoinStyle:h,borderDash:d,borderDashOffset:u}=l,f=l.borderAlign==="inner";if(!c)return;i.setLineDash(d||[]),i.lineDashOffset=u,f?(i.lineWidth=c*2,i.lineJoin=h||"round"):(i.lineWidth=c,i.lineJoin=h||"bevel");let p=t.endAngle;if(o){vi(i,t,e,n,p,s);for(let g=0;g<o;++g)i.stroke();isNaN(r)||(p=a+(r%N||N))}f&&ld(i,t,p),o||(vi(i,t,e,n,p,s),i.stroke())}class Ee extends ut{constructor(e){super();P(this,"circumference");P(this,"endAngle");P(this,"fullCircles");P(this,"innerRadius");P(this,"outerRadius");P(this,"pixelMargin");P(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,n,s){const o=this.getProps(["x","y"],s),{angle:a,distance:r}=rs(o,{x:e,y:n}),{startAngle:l,endAngle:c,innerRadius:h,outerRadius:d,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),f=(this.options.spacing+this.options.borderWidth)/2,g=O(u,c-l)>=N||we(a,l,c),m=kt(r,h+f,d+f);return g&&m}getCenterPoint(e){const{x:n,y:s,startAngle:o,endAngle:a,innerRadius:r,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:h}=this.options,d=(o+a)/2,u=(r+l+h+c)/2;return{x:n+Math.cos(d)*u,y:s+Math.sin(d)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:s}=this,o=(n.offset||0)/4,a=(n.spacing||0)/2,r=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>N?Math.floor(s/N):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*o,Math.sin(l)*o);const c=1-Math.sin(Math.min(H,s||0)),h=o*c;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,dd(e,this,h,a,r),ud(e,this,h,a,r),e.restore()}}P(Ee,"id","arc"),P(Ee,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),P(Ee,"defaultRoutes",{backgroundColor:"backgroundColor"}),P(Ee,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function Oo(i,t,e=t){i.lineCap=O(e.borderCapStyle,t.borderCapStyle),i.setLineDash(O(e.borderDash,t.borderDash)),i.lineDashOffset=O(e.borderDashOffset,t.borderDashOffset),i.lineJoin=O(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=O(e.borderWidth,t.borderWidth),i.strokeStyle=O(e.borderColor,t.borderColor)}function fd(i,t,e){i.lineTo(e.x,e.y)}function pd(i){return i.stepped?Rl:i.tension||i.cubicInterpolationMode==="monotone"?Bl:fd}function zo(i,t,e={}){const n=i.length,{start:s=0,end:o=n-1}=e,{start:a,end:r}=t,l=Math.max(s,a),c=Math.min(o,r),h=s<a&&o<a||s>r&&o>r;return{count:n,start:l,loop:t.loop,ilen:c<l&&!h?n+c-l:c-l}}function gd(i,t,e,n){const{points:s,options:o}=t,{count:a,start:r,loop:l,ilen:c}=zo(s,e,n),h=pd(o);let{move:d=!0,reverse:u}=n||{},f,p,g;for(f=0;f<=c;++f)p=s[(r+(u?c-f:f))%a],!p.skip&&(d?(i.moveTo(p.x,p.y),d=!1):h(i,g,p,u,o.stepped),g=p);return l&&(p=s[(r+(u?c:0))%a],h(i,g,p,u,o.stepped)),!!l}function md(i,t,e,n){const s=t.points,{count:o,start:a,ilen:r}=zo(s,e,n),{move:l=!0,reverse:c}=n||{};let h=0,d=0,u,f,p,g,m,x;const y=A=>(a+(c?r-A:A))%o,M=()=>{g!==m&&(i.lineTo(h,m),i.lineTo(h,g),i.lineTo(h,x))};for(l&&(f=s[y(0)],i.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=s[y(u)],f.skip)continue;const A=f.x,k=f.y,T=A|0;T===p?(k<g?g=k:k>m&&(m=k),h=(d*h+A)/++d):(M(),i.lineTo(A,k),p=T,d=0,g=m=k),x=k}M()}function hn(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?md:gd}function bd(i){return i.stepped?mc:i.tension||i.cubicInterpolationMode==="monotone"?bc:Ut}function xd(i,t,e,n){let s=t._path;s||(s=t._path=new Path2D,t.path(s,e,n)&&s.closePath()),Oo(i,t.options),i.stroke(s)}function yd(i,t,e,n){const{segments:s,options:o}=t,a=hn(t);for(const r of s)Oo(i,o,r.style),i.beginPath(),a(i,t,r,{start:e,end:e+n-1})&&i.closePath(),i.stroke()}const vd=typeof Path2D=="function";function wd(i,t,e,n){vd&&!t.options.segment?xd(i,t,e,n):yd(i,t,e,n)}class Ft extends ut{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const s=n.spanGaps?this._loop:this._fullLoop;lc(this._points,n,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Ac(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,s=t[e],o=this.points,a=Ws(this,{property:e,start:s,end:s});if(!a.length)return;const r=[],l=bd(n);let c,h;for(c=0,h=a.length;c<h;++c){const{start:d,end:u}=a[c],f=o[d],p=o[u];if(f===p){r.push(f);continue}const g=Math.abs((s-f[e])/(p[e]-f[e])),m=l(f,p,g,n.stepped);m[e]=t[e],r.push(m)}return r.length===1?r[0]:r}pathSegment(t,e,n){return hn(this)(t,this,e,n)}path(t,e,n){const s=this.segments,o=hn(this);let a=this._loop;e=e||0,n=n||this.points.length-e;for(const r of s)a&=o(t,this,r,{start:e,end:e+n-1});return!!a}draw(t,e,n,s){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),wd(t,this,n,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}P(Ft,"id","line"),P(Ft,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),P(Ft,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),P(Ft,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Vo(i,t,e,n){const s=i.options,{[e]:o}=i.getProps([e],n);return Math.abs(t-o)<s.radius+s.hitRadius}class wi extends ut{constructor(e){super();P(this,"parsed");P(this,"skip");P(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,s){const o=this.options,{x:a,y:r}=this.getProps(["x","y"],s);return Math.pow(e-a,2)+Math.pow(n-r,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,n){return Vo(this,e,"x",n)}inYRange(e,n){return Vo(this,e,"y",n)}getCenterPoint(e){const{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);const s=n&&e.borderWidth||0;return(n+s)*2}draw(e,n){const s=this.options;this.skip||s.radius<.1||!Mt(this,n,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,Ki(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}P(wi,"id","point"),P(wi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),P(wi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Io(i,t){const{x:e,y:n,base:s,width:o,height:a}=i.getProps(["x","y","base","width","height"],t);let r,l,c,h,d;return i.horizontal?(d=a/2,r=Math.min(e,s),l=Math.max(e,s),c=n-d,h=n+d):(d=o/2,r=e-d,l=e+d,c=Math.min(n,s),h=Math.max(n,s)),{left:r,top:c,right:l,bottom:h}}function Et(i,t,e,n){return i?0:J(t,e,n)}function kd(i,t,e){const n=i.options.borderWidth,s=i.borderSkipped,o=ks(n);return{t:Et(s.top,o.top,0,e),r:Et(s.right,o.right,0,t),b:Et(s.bottom,o.bottom,0,e),l:Et(s.left,o.left,0,t)}}function Ad(i,t,e){const{enableBorderRadius:n}=i.getProps(["enableBorderRadius"]),s=i.options.borderRadius,o=Gt(s),a=Math.min(t,e),r=i.borderSkipped,l=n||I(s);return{topLeft:Et(!l||r.top||r.left,o.topLeft,0,a),topRight:Et(!l||r.top||r.right,o.topRight,0,a),bottomLeft:Et(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:Et(!l||r.bottom||r.right,o.bottomRight,0,a)}}function Md(i){const t=Io(i),e=t.right-t.left,n=t.bottom-t.top,s=kd(i,e/2,n/2),o=Ad(i,e/2,n/2);return{outer:{x:t.left,y:t.top,w:e,h:n,radius:o},inner:{x:t.left+s.l,y:t.top+s.t,w:e-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function dn(i,t,e,n){const s=t===null,o=e===null,r=i&&!(s&&o)&&Io(i,n);return r&&(s||kt(t,r.left,r.right))&&(o||kt(e,r.top,r.bottom))}function Pd(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function Td(i,t){i.rect(t.x,t.y,t.w,t.h)}function un(i,t,e={}){const n=i.x!==e.x?-t:0,s=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-n,a=(i.y+i.h!==e.y+e.h?t:0)-s;return{x:i.x+n,y:i.y+s,w:i.w+o,h:i.h+a,radius:i.radius}}class ki extends ut{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:n,backgroundColor:s}}=this,{inner:o,outer:a}=Md(this),r=Pd(a.radius)?Pe:Td;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),r(t,un(a,e,o)),t.clip(),r(t,un(o,-e,a)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),r(t,un(o,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,n){return dn(this,t,e,n)}inXRange(t,e){return dn(this,t,null,e)}inYRange(t,e){return dn(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+s)/2:e,y:o?n:(n+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}P(ki,"id","bar"),P(ki,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),P(ki,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Sd=Object.freeze({__proto__:null,ArcElement:Ee,BarElement:ki,LineElement:Ft,PointElement:wi});const fn=["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)"],Do=fn.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));function Fo(i){return fn[i%fn.length]}function Eo(i){return Do[i%Do.length]}function Cd(i,t){return i.borderColor=Fo(t),i.backgroundColor=Eo(t),++t}function Ld(i,t){return i.backgroundColor=i.data.map(()=>Fo(t++)),t}function Od(i,t){return i.backgroundColor=i.data.map(()=>Eo(t++)),t}function zd(i){let t=0;return(e,n)=>{const s=i.getDatasetMeta(n).controller;s instanceof Zt?t=Ld(e,t):s instanceof Ce?t=Od(e,t):s&&(t=Cd(e,t))}}function Ro(i){let t;for(t in i)if(i[t].borderColor||i[t].backgroundColor)return!0;return!1}function Vd(i){return i&&(i.borderColor||i.backgroundColor)}var Id={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,t,e){if(!e.enabled)return;const{data:{datasets:n},options:s}=i.config,{elements:o}=s;if(!e.forceOverride&&(Ro(n)||Vd(s)||o&&Ro(o)))return;const a=zd(i);n.forEach(a)}};function Dd(i,t,e,n,s){const o=s.samples||n;if(o>=e)return i.slice(t,t+e);const a=[],r=(e-2)/(o-2);let l=0;const c=t+e-1;let h=t,d,u,f,p,g;for(a[l++]=i[h],d=0;d<o-2;d++){let m=0,x=0,y;const M=Math.floor((d+1)*r)+1+t,A=Math.min(Math.floor((d+2)*r)+1,e)+t,k=A-M;for(y=M;y<A;y++)m+=i[y].x,x+=i[y].y;m/=k,x/=k;const T=Math.floor(d*r)+1+t,S=Math.min(Math.floor((d+1)*r)+1,e)+t,{x:C,y:L}=i[h];for(f=p=-1,y=T;y<S;y++)p=.5*Math.abs((C-m)*(i[y].y-L)-(C-i[y].x)*(x-L)),p>f&&(f=p,u=i[y],g=y);a[l++]=u,h=g}return a[l++]=i[c],a}function Fd(i,t,e,n){let s=0,o=0,a,r,l,c,h,d,u,f,p,g;const m=[],x=t+e-1,y=i[t].x,A=i[x].x-y;for(a=t;a<t+e;++a){r=i[a],l=(r.x-y)/A*n,c=r.y;const k=l|0;if(k===h)c<p?(p=c,d=a):c>g&&(g=c,u=a),s=(o*s+r.x)/++o;else{const T=a-1;if(!F(d)&&!F(u)){const S=Math.min(d,u),C=Math.max(d,u);S!==f&&S!==T&&m.push({...i[S],x:s}),C!==f&&C!==T&&m.push({...i[C],x:s})}a>0&&T!==f&&m.push(i[T]),m.push(r),h=k,o=0,p=g=c,d=u=f=a}}return m}function Bo(i){if(i._decimated){const t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Wo(i){i.data.datasets.forEach(t=>{Bo(t)})}function Ed(i,t){const e=t.length;let n=0,s;const{iScale:o}=i,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(n=J(At(t,o.axis,a).lo,0,e-1)),c?s=J(At(t,o.axis,r).hi+1,n,e)-n:s=e-n,{start:n,count:s}}var Rd={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){Wo(i);return}const n=i.width;i.data.datasets.forEach((s,o)=>{const{_data:a,indexAxis:r}=s,l=i.getDatasetMeta(o),c=a||s.data;if(Te([r,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const h=i.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||i.options.parsing)return;let{start:d,count:u}=Ed(l,c);const f=e.threshold||4*n;if(u<=f){Bo(s);return}F(a)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let p;switch(e.algorithm){case"lttb":p=Dd(c,d,u,n,e);break;case"min-max":p=Fd(c,d,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}s._decimated=p})},destroy(i){Wo(i)}};function Bd(i,t,e){const n=i.segments,s=i.points,o=t.points,a=[];for(const r of n){let{start:l,end:c}=r;c=gn(l,c,s);const h=pn(e,s[l],s[c],r.loop);if(!t.segments){a.push({source:r,target:h,start:s[l],end:s[c]});continue}const d=Ws(t,h);for(const u of d){const f=pn(e,o[u.start],o[u.end],u.loop),p=Bs(r,s,f);for(const g of p)a.push({source:g,target:u,start:{[e]:Ho(h,f,"start",Math.max)},end:{[e]:Ho(h,f,"end",Math.min)}})}}return a}function pn(i,t,e,n){if(n)return;let s=t[i],o=e[i];return i==="angle"&&(s=rt(s),o=rt(o)),{property:i,start:s,end:o}}function Wd(i,t){const{x:e=null,y:n=null}=i||{},s=t.points,o=[];return t.segments.forEach(({start:a,end:r})=>{r=gn(a,r,s);const l=s[a],c=s[r];n!==null?(o.push({x:l.x,y:n}),o.push({x:c.x,y:n})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function gn(i,t,e){for(;t>i;t--){const n=e[t];if(!isNaN(n.x)&&!isNaN(n.y))break}return t}function Ho(i,t,e,n){return i&&t?n(i[e],t[e]):i?i[e]:t?t[e]:0}function No(i,t){let e=[],n=!1;return W(i)?(n=!0,e=i):e=Wd(i,t),e.length?new Ft({points:e,options:{tension:0},_loop:n,_fullLoop:n}):null}function Go(i){return i&&i.fill!==!1}function Hd(i,t,e){let s=i[t].fill;const o=[t];let a;if(!e)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!j(s))return s;if(a=i[s],!a)return!1;if(a.visible)return s;o.push(s),s=a.fill}return!1}function Nd(i,t,e){const n=Ud(i);if(I(n))return isNaN(n.value)?!1:n;let s=parseFloat(n);return j(s)&&Math.floor(s)===s?Gd(n[0],t,s,e):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Gd(i,t,e,n){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=n?!1:e}function jd(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:I(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Yd(i,t,e){let n;return i==="start"?n=e:i==="end"?n=t.options.reverse?t.min:t.max:I(i)?n=i.value:n=t.getBaseValue(),n}function Ud(i){const t=i.options,e=t.fill;let n=O(e&&e.target,e);return n===void 0&&(n=!!t.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function Zd(i){const{scale:t,index:e,line:n}=i,s=[],o=n.segments,a=n.points,r=Kd(t,e);r.push(No({x:null,y:t.bottom},n));for(let l=0;l<o.length;l++){const c=o[l];for(let h=c.start;h<=c.end;h++)Xd(s,a[h],r)}return new Ft({points:s,options:{}})}function Kd(i,t){const e=[],n=i.getMatchingVisibleMetas("line");for(let s=0;s<n.length;s++){const o=n[s];if(o.index===t)break;o.hidden||e.unshift(o.dataset)}return e}function Xd(i,t,e){const n=[];for(let s=0;s<e.length;s++){const o=e[s],{first:a,last:r,point:l}=qd(o,t,"x");if(!(!l||a&&r)){if(a)n.unshift(l);else if(i.push(l),!r)break}}i.push(...n)}function qd(i,t,e){const n=i.interpolate(t,e);if(!n)return{};const s=n[e],o=i.segments,a=i.points;let r=!1,l=!1;for(let c=0;c<o.length;c++){const h=o[c],d=a[h.start][e],u=a[h.end][e];if(kt(s,d,u)){r=s===d,l=s===u;break}}return{first:r,last:l,point:n}}class jo{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,n){const{x:s,y:o,radius:a}=this;return e=e||{start:0,end:N},t.arc(s,o,a,e.end,e.start,!0),!n.bounds}interpolate(t){const{x:e,y:n,radius:s}=this,o=t.angle;return{x:e+Math.cos(o)*s,y:n+Math.sin(o)*s,angle:o}}}function Jd(i){const{chart:t,fill:e,line:n}=i;if(j(e))return Qd(t,e);if(e==="stack")return Zd(i);if(e==="shape")return!0;const s=_d(i);return s instanceof jo?s:No(s,n)}function Qd(i,t){const e=i.getDatasetMeta(t);return e&&i.isDatasetVisible(t)?e.dataset:null}function _d(i){return(i.scale||{}).getPointPositionForValue?tu(i):$d(i)}function $d(i){const{scale:t={},fill:e}=i,n=jd(e,t);if(j(n)){const s=t.isHorizontal();return{x:s?n:null,y:s?null:n}}return null}function tu(i){const{scale:t,fill:e}=i,n=t.options,s=t.getLabels().length,o=n.reverse?t.max:t.min,a=Yd(e,t,o),r=[];if(n.grid.circular){const l=t.getPointPositionForValue(0,o);return new jo({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(a)})}for(let l=0;l<s;++l)r.push(t.getPointPositionForValue(l,a));return r}function mn(i,t,e){const n=Jd(t),{line:s,scale:o,axis:a}=t,r=s.options,l=r.fill,c=r.backgroundColor,{above:h=c,below:d=c}=l||{};n&&s.points.length&&(ei(i,e),eu(i,{line:s,target:n,above:h,below:d,area:e,scale:o,axis:a}),ii(i))}function eu(i,t){const{line:e,target:n,above:s,below:o,area:a,scale:r}=t,l=e._loop?"angle":t.axis;i.save(),l==="x"&&o!==s&&(Yo(i,n,a.top),Uo(i,{line:e,target:n,color:s,scale:r,property:l}),i.restore(),i.save(),Yo(i,n,a.bottom)),Uo(i,{line:e,target:n,color:o,scale:r,property:l}),i.restore()}function Yo(i,t,e){const{segments:n,points:s}=t;let o=!0,a=!1;i.beginPath();for(const r of n){const{start:l,end:c}=r,h=s[l],d=s[gn(l,c,s)];o?(i.moveTo(h.x,h.y),o=!1):(i.lineTo(h.x,e),i.lineTo(h.x,h.y)),a=!!t.pathSegment(i,r,{move:a}),a?i.closePath():i.lineTo(d.x,e)}i.lineTo(t.first().x,e),i.closePath(),i.clip()}function Uo(i,t){const{line:e,target:n,property:s,color:o,scale:a}=t,r=Bd(e,n,s);for(const{source:l,target:c,start:h,end:d}of r){const{style:{backgroundColor:u=o}={}}=l,f=n!==!0;i.save(),i.fillStyle=u,iu(i,a,f&&pn(s,h,d)),i.beginPath();const p=!!e.pathSegment(i,l);let g;if(f){p?i.closePath():Zo(i,n,d,s);const m=!!n.pathSegment(i,c,{move:p,reverse:!0});g=p&&m,g||Zo(i,n,h,s)}i.closePath(),i.fill(g?"evenodd":"nonzero"),i.restore()}}function iu(i,t,e){const{top:n,bottom:s}=t.chart.chartArea,{property:o,start:a,end:r}=e||{};o==="x"&&(i.beginPath(),i.rect(a,n,r-a,s-n),i.clip())}function Zo(i,t,e,n){const s=t.interpolate(e,n);s&&i.lineTo(s.x,s.y)}var nu={id:"filler",afterDatasetsUpdate(i,t,e){const n=(i.data.datasets||[]).length,s=[];let o,a,r,l;for(a=0;a<n;++a)o=i.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof Ft&&(l={visible:i.isDatasetVisible(a),index:a,fill:Nd(r,a,n),chart:i,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,s.push(l);for(a=0;a<n;++a)l=s[a],!(!l||l.fill===!1)&&(l.fill=Hd(s,a,e.propagate))},beforeDraw(i,t,e){const n=e.drawTime==="beforeDraw",s=i.getSortedVisibleDatasetMetas(),o=i.chartArea;for(let a=s.length-1;a>=0;--a){const r=s[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),n&&r.fill&&mn(i.ctx,r,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const n=i.getSortedVisibleDatasetMetas();for(let s=n.length-1;s>=0;--s){const o=n[s].$filler;Go(o)&&mn(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){const n=t.meta.$filler;!Go(n)||e.drawTime!=="beforeDatasetDraw"||mn(i.ctx,n,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Ko=(i,t)=>{let{boxHeight:e=t,boxWidth:n=t}=i;return i.usePointStyle&&(e=Math.min(e,t),n=i.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:e,itemHeight:Math.max(t,e)}},su=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class Xo extends ut{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=B(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(n=>t.filter(n,this.chart.data))),t.sort&&(e=e.sort((n,s)=>t.sort(n,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const n=t.labels,s=X(n.font),o=s.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=Ko(n,o);let c,h;e.font=s.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,s,r,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,s){const{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=s+r;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((p,g)=>{const m=n+e/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*r>a)&&(d+=h,c[c.length-(g>0?0:1)]=0,f+=h,u++),l[g]={left:0,top:f,row:u,width:m,height:s},c[c.length-1]+=m+r}),d}_fitCols(t,e,n,s){const{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=a-t;let d=r,u=0,f=0,p=0,g=0;return this.legendItems.forEach((m,x)=>{const{itemWidth:y,itemHeight:M}=ou(n,e,o,m,s);x>0&&f+M+2*r>h&&(d+=u+r,c.push({width:u,height:f}),p+=u+r,g++,u=f=0),l[x]={left:p,top:f,col:g,width:y,height:M},u=Math.max(u,y),f+=M+r}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:s},rtl:o}}=this,a=re(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=_(n,this.left+s,this.right-this.lineWidths[r]);for(const c of e)r!==c.row&&(r=c.row,l=_(n,this.left+s,this.right-this.lineWidths[r])),c.top+=this.top+t+s,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+s}else{let r=0,l=_(n,this.top+t+s,this.bottom-this.columnSizes[r].height);for(const c of e)c.col!==r&&(r=c.col,l=_(n,this.top+t+s,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+s,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;ei(t,this),this._draw(),ii(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:s}=this,{align:o,labels:a}=t,r=Y.color,l=re(t.rtl,this.left,this.width),c=X(a.font),{padding:h}=a,d=c.size,u=d/2;let f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=Ko(a,d),x=function(T,S,C){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;s.save();const L=O(C.lineWidth,1);if(s.fillStyle=O(C.fillStyle,r),s.lineCap=O(C.lineCap,"butt"),s.lineDashOffset=O(C.lineDashOffset,0),s.lineJoin=O(C.lineJoin,"miter"),s.lineWidth=L,s.strokeStyle=O(C.strokeStyle,r),s.setLineDash(O(C.lineDash,[])),a.usePointStyle){const z={radius:g*Math.SQRT2/2,pointStyle:C.pointStyle,rotation:C.rotation,borderWidth:L},V=l.xPlus(T,p/2),D=S+u;ws(s,z,V,D,a.pointStyleWidth&&p)}else{const z=S+Math.max((d-g)/2,0),V=l.leftForLtr(T,p),D=Gt(C.borderRadius);s.beginPath(),Object.values(D).some(Q=>Q!==0)?Pe(s,{x:V,y:z,w:p,h:g,radius:D}):s.rect(V,z,p,g),s.fill(),L!==0&&s.stroke()}s.restore()},y=function(T,S,C){Nt(s,C.text,T,S+m/2,c,{strikethrough:C.hidden,textAlign:l.textAlign(C.textAlign)})},M=this.isHorizontal(),A=this._computeTitleHeight();M?f={x:_(o,this.left+h,this.right-n[0]),y:this.top+h+A,line:0}:f={x:this.left+h,y:_(o,this.top+A+h,this.bottom-e[0].height),line:0},Ds(this.ctx,t.textDirection);const k=m+h;this.legendItems.forEach((T,S)=>{s.strokeStyle=T.fontColor,s.fillStyle=T.fontColor;const C=s.measureText(T.text).width,L=l.textAlign(T.textAlign||(T.textAlign=a.textAlign)),z=p+u+C;let V=f.x,D=f.y;l.setWidth(this.width),M?S>0&&V+z+h>this.right&&(D=f.y+=k,f.line++,V=f.x=_(o,this.left+h,this.right-n[f.line])):S>0&&D+k>this.bottom&&(V=f.x=V+e[f.line].width+h,f.line++,D=f.y=_(o,this.top+A+h,this.bottom-e[f.line].height));const Q=l.x(V);if(x(Q,D,T),V=Tl(L,V+p+u,M?V+z:this.right,t.rtl),y(l.x(V),D,T),M)f.x+=z+h;else if(typeof T.text!="string"){const lt=c.lineHeight;f.y+=qo(T,lt)+h}else f.y+=k}),Fs(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=X(e.font),s=$(e.padding);if(!e.display)return;const o=re(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=n.size/2,c=s.top+l;let h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=_(t.align,d,this.right-u);else{const p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);h=c+_(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const f=_(r,d,d+u);a.textAlign=o.textAlign(Gi(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=n.string,Nt(a,e.text,f,h,n)}_computeTitleHeight(){const t=this.options.title,e=X(t.font),n=$(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,s,o;if(kt(t,this.left,this.right)&&kt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(s=o[n],kt(t,s.left,s.left+s.width)&&kt(e,s.top,s.top+s.height))return this.legendItems[n]}return null}handleEvent(t){const e=this.options;if(!lu(t.type,e))return;const n=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,o=su(s,n);s&&!o&&B(e.onLeave,[t,s,this],this),this._hoveredItem=n,n&&!o&&B(e.onHover,[t,n,this],this)}else n&&B(e.onClick,[t,n,this],this)}}function ou(i,t,e,n,s){const o=au(n,i,t,e),a=ru(s,n,t.lineHeight);return{itemWidth:o,itemHeight:a}}function au(i,t,e,n){let s=i.text;return s&&typeof s!="string"&&(s=s.reduce((o,a)=>o.length>a.length?o:a)),t+e.size/2+n.measureText(s).width}function ru(i,t,e){let n=i;return typeof t.text!="string"&&(n=qo(t,e)),n}function qo(i,t){const e=i.text?i.text.length:0;return t*e}function lu(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var cu={id:"legend",_element:Xo,start(i,t,e){const n=i.legend=new Xo({ctx:i.ctx,options:e,chart:i});tt.configure(i,n,e),tt.addBox(i,n)},stop(i){tt.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const n=i.legend;tt.configure(i,n,e),n.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const n=t.datasetIndex,s=e.chart;s.isDatasetVisible(n)?(s.hide(n),t.hidden=!0):(s.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:n,textAlign:s,color:o,useBorderRadius:a,borderRadius:r}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=$(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:a&&(r||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class bn extends ut{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const s=W(n.text)?n.text.length:1;this._padding=$(n.padding);const o=s*X(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:n,bottom:s,right:o,options:a}=this,r=a.align;let l=0,c,h,d;return this.isHorizontal()?(h=_(r,n,o),d=e+t,c=o-n):(a.position==="left"?(h=n+t,d=_(r,s,e),l=H*-.5):(h=o-t,d=_(r,e,s),l=H*.5),c=s-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=X(e.font),o=n.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);Nt(t,e.text,0,0,n,{color:e.color,maxWidth:l,rotation:c,textAlign:Gi(e.align),textBaseline:"middle",translation:[a,r]})}}function hu(i,t){const e=new bn({ctx:i.ctx,options:t,chart:i});tt.configure(i,e,t),tt.addBox(i,e),i.titleBlock=e}var du={id:"title",_element:bn,start(i,t,e){hu(i,e)},stop(i){const t=i.titleBlock;tt.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const n=i.titleBlock;tt.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ai=new WeakMap;var uu={id:"subtitle",start(i,t,e){const n=new bn({ctx:i.ctx,options:e,chart:i});tt.configure(i,n,e),tt.addBox(i,n),Ai.set(i,n)},stop(i){tt.removeBox(i,Ai.get(i)),Ai.delete(i)},beforeUpdate(i,t,e){const n=Ai.get(i);tt.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Re={average(i){if(!i.length)return!1;let t,e,n=0,s=0,o=0;for(t=0,e=i.length;t<e;++t){const a=i[t].element;if(a&&a.hasValue()){const r=a.tooltipPosition();n+=r.x,s+=r.y,++o}}return{x:n/o,y:s/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,n=t.y,s=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=i.length;o<a;++o){const l=i[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),h=Hi(t,c);h<s&&(s=h,r=l)}}if(r){const l=r.tooltipPosition();e=l.x,n=l.y}return{x:e,y:n}}};function mt(i,t){return t&&(W(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function St(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
1402
1402
  `)>-1?i.split(`
1403
- `):i}function uu(i,t){const{element:e,datasetIndex:n,index:s}=t,o=i.getDatasetMeta(n).controller,{label:a,value:r}=o.getLabelAndValue(s);return{chart:i,label:a,parsed:o.getParsed(s),raw:i.data.datasets[n].data[s],formattedValue:r,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:e}}function qo(i,t){const e=i.chart.ctx,{body:n,footer:s,title:o}=i,{boxWidth:a,boxHeight:r}=t,l=X(t.bodyFont),c=X(t.titleFont),h=X(t.footerFont),d=o.length,u=s.length,f=n.length,p=$(t.padding);let g=p.height,m=0,x=n.reduce((A,k)=>A+k.before.length+k.lines.length+k.after.length,0);if(x+=i.beforeBody.length+i.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),x){const A=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;g+=f*A+(x-f)*l.lineHeight+(x-1)*t.bodySpacing}u&&(g+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let y=0;const M=function(A){m=Math.max(m,e.measureText(A).width+y)};return e.save(),e.font=c.string,E(i.title,M),e.font=l.string,E(i.beforeBody.concat(i.afterBody),M),y=t.displayColors?a+2+t.boxPadding:0,E(n,A=>{E(A.before,M),E(A.lines,M),E(A.after,M)}),y=0,e.font=h.string,E(i.footer,M),e.restore(),m+=p.width,{width:m,height:g}}function fu(i,t){const{y:e,height:n}=t;return e<n/2?"top":e>i.height-n/2?"bottom":"center"}function pu(i,t,e,n){const{x:s,width:o}=n,a=e.caretSize+e.caretPadding;if(i==="left"&&s+o+a>t.width||i==="right"&&s-o-a<0)return!0}function gu(i,t,e,n){const{x:s,width:o}=e,{width:a,chartArea:{left:r,right:l}}=i;let c="center";return n==="center"?c=s<=(r+l)/2?"left":"right":s<=o/2?c="left":s>=a-o/2&&(c="right"),pu(c,i,t,e)&&(c="center"),c}function Jo(i,t,e){const n=e.yAlign||t.yAlign||fu(i,e);return{xAlign:e.xAlign||t.xAlign||gu(i,t,e,n),yAlign:n}}function mu(i,t){let{x:e,width:n}=i;return t==="right"?e-=n:t==="center"&&(e-=n/2),e}function bu(i,t,e){let{y:n,height:s}=i;return t==="top"?n+=e:t==="bottom"?n-=s+e:n-=s/2,n}function Qo(i,t,e,n){const{caretSize:s,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:l}=e,c=s+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Gt(a);let p=mu(t,r);const g=bu(t,l,c);return l==="center"?r==="left"?p+=c:r==="right"&&(p-=c):r==="left"?p-=Math.max(h,u)+s:r==="right"&&(p+=Math.max(d,f)+s),{x:J(p,0,n.width-t.width),y:J(g,0,n.height-t.height)}}function Mi(i,t,e){const n=$(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-n.right:i.x+n.left}function _o(i){return mt([],St(i))}function xu(i,t,e){return Dt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function $o(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const ta={beforeTitle:wt,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,n=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return e[t.dataIndex]}return""},afterTitle:wt,beforeBody:wt,beforeLabel:wt,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let t=i.dataset.label||"";t&&(t+=": ");const e=i.formattedValue;return F(e)||(t+=e),t},labelColor(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:wt,afterBody:wt,beforeFooter:wt,footer:wt,afterFooter:wt};function nt(i,t,e,n){const s=i[t].call(e,n);return typeof s>"u"?ta[t].call(e,n):s}class xn extends ut{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),s=n.enabled&&e.options.animation&&n.animations,o=new Gs(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=xu(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:n}=e,s=nt(n,"beforeTitle",this,t),o=nt(n,"title",this,t),a=nt(n,"afterTitle",this,t);let r=[];return r=mt(r,St(s)),r=mt(r,St(o)),r=mt(r,St(a)),r}getBeforeBody(t,e){return _o(nt(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:n}=e,s=[];return E(t,o=>{const a={before:[],lines:[],after:[]},r=$o(n,o);mt(a.before,St(nt(r,"beforeLabel",this,o))),mt(a.lines,nt(r,"label",this,o)),mt(a.after,St(nt(r,"afterLabel",this,o))),s.push(a)}),s}getAfterBody(t,e){return _o(nt(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,s=nt(n,"beforeFooter",this,t),o=nt(n,"footer",this,t),a=nt(n,"afterFooter",this,t);let r=[];return r=mt(r,St(s)),r=mt(r,St(o)),r=mt(r,St(a)),r}_createItems(t){const e=this._active,n=this.chart.data,s=[],o=[],a=[];let r=[],l,c;for(l=0,c=e.length;l<c;++l)r.push(uu(this.chart,e[l]));return t.filter&&(r=r.filter((h,d,u)=>t.filter(h,d,u,n))),t.itemSort&&(r=r.sort((h,d)=>t.itemSort(h,d,n))),E(r,h=>{const d=$o(t.callbacks,h);s.push(nt(d,"labelColor",this,h)),o.push(nt(d,"labelPointStyle",this,h)),a.push(nt(d,"labelTextColor",this,h))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){const n=this.options.setContext(this.getContext()),s=this._active;let o,a=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const r=Re[n.position].call(this,s,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);const l=this._size=qo(this,n),c=Object.assign({},r,l),h=Jo(this.chart,n,c),d=Qo(n,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,s){const o=this.getCaretPosition(t,n,s);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,n){const{xAlign:s,yAlign:o}=this,{caretSize:a,cornerRadius:r}=n,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=Gt(r),{x:u,y:f}=t,{width:p,height:g}=e;let m,x,y,M,A,k;return o==="center"?(A=f+g/2,s==="left"?(m=u,x=m-a,M=A+a,k=A-a):(m=u+p,x=m+a,M=A-a,k=A+a),y=m):(s==="left"?x=u+Math.max(l,h)+a:s==="right"?x=u+p-Math.max(c,d)-a:x=this.caretX,o==="top"?(M=f,A=M-a,m=x-a,y=x+a):(M=f+g,A=M+a,m=x+a,y=x-a),k=M),{x1:m,x2:x,x3:y,y1:M,y2:A,y3:k}}drawTitle(t,e,n){const s=this.title,o=s.length;let a,r,l;if(o){const c=re(n.rtl,this.x,this.width);for(t.x=Mi(this,n.titleAlign,n),e.textAlign=c.textAlign(n.titleAlign),e.textBaseline="middle",a=X(n.titleFont),r=n.titleSpacing,e.fillStyle=n.titleColor,e.font=a.string,l=0;l<o;++l)e.fillText(s[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===o&&(t.y+=n.titleMarginBottom-r)}}_drawColorBox(t,e,n,s,o){const a=this.labelColors[n],r=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=o,h=X(o.bodyFont),d=Mi(this,"left",o),u=s.x(d),f=l<h.lineHeight?(h.lineHeight-l)/2:0,p=e.y+f;if(o.usePointStyle){const g={radius:Math.min(c,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},m=s.leftForLtr(u,c)+c/2,x=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Ki(t,g,m,x),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Ki(t,g,m,x)}else{t.lineWidth=I(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const g=s.leftForLtr(u,c),m=s.leftForLtr(s.xPlus(u,1),c-2),x=Gt(a.borderRadius);Object.values(x).some(y=>y!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Pe(t,{x:g,y:p,w:c,h:l,radius:x}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Pe(t,{x:m,y:p+1,w:c-2,h:l-2,radius:x}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,c,l),t.strokeRect(g,p,c,l),t.fillStyle=a.backgroundColor,t.fillRect(m,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:s}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:h}=n,d=X(n.bodyFont);let u=d.lineHeight,f=0;const p=re(n.rtl,this.x,this.width),g=function(C){e.fillText(C,p.x(t.x+f),t.y+u/2),t.y+=u+o},m=p.textAlign(a);let x,y,M,A,k,T,S;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=Mi(this,m,n),e.fillStyle=n.bodyColor,E(this.beforeBody,g),f=r&&m!=="right"?a==="center"?c/2+h:c+2+h:0,A=0,T=s.length;A<T;++A){for(x=s[A],y=this.labelTextColors[A],e.fillStyle=y,E(x.before,g),M=x.lines,r&&M.length&&(this._drawColorBox(e,t,A,p,n),u=Math.max(d.lineHeight,l)),k=0,S=M.length;k<S;++k)g(M[k]),u=d.lineHeight;E(x.after,g)}f=0,u=d.lineHeight,E(this.afterBody,g),t.y-=o}drawFooter(t,e,n){const s=this.footer,o=s.length;let a,r;if(o){const l=re(n.rtl,this.x,this.width);for(t.x=Mi(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=l.textAlign(n.footerAlign),e.textBaseline="middle",a=X(n.footerFont),e.fillStyle=n.footerColor,e.font=a.string,r=0;r<o;++r)e.fillText(s[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+n.footerSpacing}}drawBackground(t,e,n,s){const{xAlign:o,yAlign:a}=this,{x:r,y:l}=t,{width:c,height:h}=n,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:p}=Gt(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(r+d,l),a==="top"&&this.drawCaret(t,e,n,s),e.lineTo(r+c-u,l),e.quadraticCurveTo(r+c,l,r+c,l+u),a==="center"&&o==="right"&&this.drawCaret(t,e,n,s),e.lineTo(r+c,l+h-p),e.quadraticCurveTo(r+c,l+h,r+c-p,l+h),a==="bottom"&&this.drawCaret(t,e,n,s),e.lineTo(r+f,l+h),e.quadraticCurveTo(r,l+h,r,l+h-f),a==="center"&&o==="left"&&this.drawCaret(t,e,n,s),e.lineTo(r,l+d),e.quadraticCurveTo(r,l,r+d,l),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,s=n&&n.x,o=n&&n.y;if(s||o){const a=Re[t.position].call(this,this._active,this._eventPosition);if(!a)return;const r=this._size=qo(this,t),l=Object.assign({},a,this._size),c=Jo(e,t,l),h=Qo(t,l,c,e);(s._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const a=$(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,s,e),Is(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Ds(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,s=t.map(({datasetIndex:r,index:l})=>{const c=this.chart.getDatasetMeta(r);if(!c)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:c.data[l],index:l}}),o=!qe(n,s),a=this._positionChanged(s,e);(o||a)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,n),r=this._positionChanged(a,t),l=e||!qe(a,o)||r;return l&&(this._active=a,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,n,s){const o=this.options;if(t.type==="mouseout")return[];if(!s)return e;const a=this.chart.getElementsAtEventForMode(t,o.mode,o,n);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:n,caretY:s,options:o}=this,a=Re[o.position].call(this,t,e);return a!==!1&&(n!==a.x||s!==a.y)}}P(xn,"positioners",Re);var yu={id:"tooltip",_element:xn,positioners:Re,afterInit(i,t,e){e&&(i.tooltip=new xn({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:ta},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},vu=Object.freeze({__proto__:null,Colors:Vd,Decimation:Ed,Filler:iu,Legend:lu,SubTitle:du,Title:hu,Tooltip:yu});const wu=(i,t,e,n)=>(typeof t=="string"?(e=i.push(t)-1,n.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function ku(i,t,e,n){const s=i.indexOf(t);if(s===-1)return wu(i,t,e,n);const o=i.lastIndexOf(t);return s!==o?e:s}const Au=(i,t)=>i===null?null:J(Math.round(i),0,t);function ea(i){const t=this.getLabels();return i>=0&&i<t.length?t[i]:i}class yn extends Xt{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const n=this.getLabels();for(const{index:s,label:o}of e)n[s]===o&&n.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(F(t))return null;const n=this.getLabels();return e=isFinite(e)&&n[e]===t?e:ku(n,t,O(e,t),this._addedLabels),Au(e,n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(n=0),e||(s=this.getLabels().length-1)),this.min=n,this.max=s}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,s=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let a=t;a<=e;a++)s.push({value:a});return s}getLabelForValue(t){return ea.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}P(yn,"id","category"),P(yn,"defaults",{ticks:{callback:ea}});function Mu(i,t){const e=[],{bounds:s,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,p=h-1,{min:g,max:m}=t,x=!F(a),y=!F(r),M=!F(c),A=(m-g)/(d+1);let k=ns((m-g)/p/f)*f,T,S,C,L;if(k<1e-14&&!x&&!y)return[{value:g},{value:m}];L=Math.ceil(m/k)-Math.floor(g/k),L>p&&(k=ns(L*k/p/f)*f),F(l)||(T=Math.pow(10,l),k=Math.ceil(k*T)/T),s==="ticks"?(S=Math.floor(g/k)*k,C=Math.ceil(m/k)*k):(S=g,C=m),x&&y&&o&&xl((r-a)/o,k/1e3)?(L=Math.round(Math.min((r-a)/k,h)),k=(r-a)/L,S=a,C=r):M?(S=x?a:S,C=y?r:C,L=c-1,k=(C-S)/L):(L=(C-S)/k,ve(L,Math.round(L),k/1e3)?L=Math.round(L):L=Math.ceil(L));const z=Math.max(os(k),os(S));T=Math.pow(10,F(l)?z:l),S=Math.round(S*T)/T,C=Math.round(C*T)/T;let V=0;for(x&&(u&&S!==a?(e.push({value:a}),S<a&&V++,ve(Math.round((S+V*k)*T)/T,a,ia(a,A,i))&&V++):S<a&&V++);V<L;++V){const D=Math.round((S+V*k)*T)/T;if(y&&D>r)break;e.push({value:D})}return y&&u&&C!==r?e.length&&ve(e[e.length-1].value,r,ia(r,A,i))?e[e.length-1].value=r:e.push({value:r}):(!y||C===r)&&e.push({value:C}),e}function ia(i,t,{horizontal:e,minRotation:n}){const s=ht(n),o=(e?Math.sin(s):Math.cos(s))||.001,a=.75*t*(""+i).length;return Math.min(t/o,a)}class Pi extends Xt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return F(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:s,max:o}=this;const a=l=>s=e?s:l,r=l=>o=n?o:l;if(t){const l=pt(s),c=pt(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);r(o+l),t||a(s-l)}this.min=s,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:n}=t,s;return n?(s=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const s={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,a=Mu(s,o);return t.bounds==="ticks"&&ss(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const s=(n-e)/Math.max(t.length-1,1)/2;e-=s,n+=s}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return Ae(t,this.chart.options.locale,this.options.ticks.format)}}class vn extends Pi{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=j(t)?t:0,this.max=j(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=ht(this.options.ticks.minRotation),s=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}P(vn,"id","linear"),P(vn,"defaults",{ticks:{callback:$e.formatters.numeric}});const Be=i=>Math.floor(It(i)),qt=(i,t)=>Math.pow(10,Be(i)+t);function na(i){return i/Math.pow(10,Be(i))===1}function sa(i,t,e){const n=Math.pow(10,e),s=Math.floor(i/n);return Math.ceil(t/n)-s}function Pu(i,t){const e=t-i;let n=Be(e);for(;sa(i,t,n)>10;)n++;for(;sa(i,t,n)<10;)n--;return Math.min(n,Be(i))}function Tu(i,{min:t,max:e}){t=at(i.min,t);const n=[],s=Be(t);let o=Pu(t,e),a=o<0?Math.pow(10,Math.abs(o)):1;const r=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((t-l)*a)/a,h=Math.floor((t-l)/r/10)*r*10;let d=Math.floor((c-h)/Math.pow(10,o)),u=at(i.min,Math.round((l+h+d*Math.pow(10,o))*a)/a);for(;u<e;)n.push({value:u,major:na(u),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,a=o>=0?1:a),u=Math.round((l+h+d*Math.pow(10,o))*a)/a;const f=at(i.max,u);return n.push({value:f,major:na(f),significand:d}),n}class wn extends Xt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=Pi.prototype.parse.apply(this,[t,e]);if(n===0){this._zero=!0;return}return j(n)&&n>0?n:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=j(t)?Math.max(0,t):null,this.max=j(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!j(this._userMin)&&(this.min=t===qt(this.min,0)?qt(this.min,-1):qt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,s=this.max;const o=r=>n=t?n:r,a=r=>s=e?s:r;n===s&&(n<=0?(o(1),a(10)):(o(qt(n,-1)),a(qt(s,1)))),n<=0&&o(qt(s,-1)),s<=0&&a(qt(n,1)),this.min=n,this.max=s}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},n=Tu(e,this);return t.bounds==="ticks"&&ss(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(t){return t===void 0?"0":Ae(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=It(t),this._valueRange=It(this.max)-It(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(It(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}P(wn,"id","logarithmic"),P(wn,"defaults",{ticks:{callback:$e.formatters.logarithmic,major:{enabled:!0}}});function kn(i){const t=i.ticks;if(t.display&&i.display){const e=$(t.backdropPadding);return O(t.font&&t.font.size,Y.font.size)+e.height}return 0}function Su(i,t,e){return e=W(e)?e:[e],{w:Fl(i,t.string,e),h:e.length*t.lineHeight}}function oa(i,t,e,n,s){return i===n||i===s?{start:t-e/2,end:t+e/2}:i<n||i>s?{start:t-e,end:t}:{start:t,end:t+e}}function Cu(i){const t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),n=[],s=[],o=i._pointLabels.length,a=i.options.pointLabels,r=a.centerPointLabels?H/o:0;for(let l=0;l<o;l++){const c=a.setContext(i.getPointLabelContext(l));s[l]=c.padding;const h=i.getPointPosition(l,i.drawingArea+s[l],r),d=X(c.font),u=Su(i.ctx,d,i._pointLabels[l]);n[l]=u;const f=rt(i.getIndexAngle(l)+r),p=Math.round(Wi(f)),g=oa(p,h.x,u.w,0,180),m=oa(p,h.y,u.h,90,270);Lu(e,t,f,g,m)}i.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),i._pointLabelItems=Vu(i,n,s)}function Lu(i,t,e,n,s){const o=Math.abs(Math.sin(e)),a=Math.abs(Math.cos(e));let r=0,l=0;n.start<t.l?(r=(t.l-n.start)/o,i.l=Math.min(i.l,t.l-r)):n.end>t.r&&(r=(n.end-t.r)/o,i.r=Math.max(i.r,t.r+r)),s.start<t.t?(l=(t.t-s.start)/a,i.t=Math.min(i.t,t.t-l)):s.end>t.b&&(l=(s.end-t.b)/a,i.b=Math.max(i.b,t.b+l))}function Ou(i,t,e){const n=i.drawingArea,{extra:s,additionalAngle:o,padding:a,size:r}=e,l=i.getPointPosition(t,n+s+a,o),c=Math.round(Wi(rt(l.angle+U))),h=Fu(l.y,r.h,c),d=Iu(c),u=Du(l.x,r.w,d);return{visible:!0,x:l.x,y:h,textAlign:d,left:u,top:h,right:u+r.w,bottom:h+r.h}}function zu(i,t){if(!t)return!0;const{left:e,top:n,right:s,bottom:o}=i;return!(Mt({x:e,y:n},t)||Mt({x:e,y:o},t)||Mt({x:s,y:n},t)||Mt({x:s,y:o},t))}function Vu(i,t,e){const n=[],s=i._pointLabels.length,o=i.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:kn(o)/2,additionalAngle:a?H/s:0};let c;for(let h=0;h<s;h++){l.padding=e[h],l.size=t[h];const d=Ou(i,h,l);n.push(d),r==="auto"&&(d.visible=zu(d,c),d.visible&&(c=d))}return n}function Iu(i){return i===0||i===180?"center":i<180?"left":"right"}function Du(i,t,e){return e==="right"?i-=t:e==="center"&&(i-=t/2),i}function Fu(i,t,e){return e===90||e===270?i-=t/2:(e>270||e<90)&&(i-=t),i}function Eu(i,t,e){const{left:n,top:s,right:o,bottom:a}=e,{backdropColor:r}=t;if(!F(r)){const l=Gt(t.borderRadius),c=$(t.backdropPadding);i.fillStyle=r;const h=n-c.left,d=s-c.top,u=o-n+c.width,f=a-s+c.height;Object.values(l).some(p=>p!==0)?(i.beginPath(),Pe(i,{x:h,y:d,w:u,h:f,radius:l}),i.fill()):i.fillRect(h,d,u,f)}}function Ru(i,t){const{ctx:e,options:{pointLabels:n}}=i;for(let s=t-1;s>=0;s--){const o=i._pointLabelItems[s];if(!o.visible)continue;const a=n.setContext(i.getPointLabelContext(s));Eu(e,a,o);const r=X(a.font),{x:l,y:c,textAlign:h}=o;Nt(e,i._pointLabels[s],l,c+r.lineHeight/2,r,{color:a.color,textAlign:h,textBaseline:"middle"})}}function aa(i,t,e,n){const{ctx:s}=i;if(e)s.arc(i.xCenter,i.yCenter,t,0,N);else{let o=i.getPointPosition(0,t);s.moveTo(o.x,o.y);for(let a=1;a<n;a++)o=i.getPointPosition(a,t),s.lineTo(o.x,o.y)}}function Bu(i,t,e,n,s){const o=i.ctx,a=t.circular,{color:r,lineWidth:l}=t;!a&&!n||!r||!l||e<0||(o.save(),o.strokeStyle=r,o.lineWidth=l,o.setLineDash(s.dash),o.lineDashOffset=s.dashOffset,o.beginPath(),aa(i,e,a,n),o.closePath(),o.stroke(),o.restore())}function Wu(i,t,e){return Dt(i,{label:e,index:t,type:"pointLabel"})}class We extends Pi{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=$(kn(this.options)/2),e=this.width=this.maxWidth-t.width,n=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+n/2+t.top),this.drawingArea=Math.floor(Math.min(e,n)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=j(t)&&!isNaN(t)?t:0,this.max=j(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/kn(this.options))}generateTickLabels(t){Pi.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,n)=>{const s=B(this.options.pointLabels.callback,[e,n],this);return s||s===0?s:""}).filter((e,n)=>this.chart.getDataVisibility(n))}fit(){const t=this.options;t.display&&t.pointLabels.display?Cu(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,s))}getIndexAngle(t){const e=N/(this._pointLabels.length||1),n=this.options.startAngle||0;return rt(t*e+ht(n))}getDistanceFromCenterForValue(t){if(F(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(F(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const n=e[t];return Wu(this.getContext(),t,n)}}getPointPosition(t,e,n=0){const s=this.getIndexAngle(t)-U+n;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:n,right:s,bottom:o}=this._pointLabelItems[t];return{left:e,top:n,right:s,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const n=this.ctx;n.save(),n.beginPath(),aa(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:n,grid:s,border:o}=e,a=this._pointLabels.length;let r,l,c;if(e.pointLabels.display&&Ru(this,a),s.display&&this.ticks.forEach((h,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(h.value);const u=this.getContext(d),f=s.setContext(u),p=o.setContext(u);Bu(this,f,l,a,p)}}),n.display){for(t.save(),r=a-1;r>=0;r--){const h=n.setContext(this.getPointLabelContext(r)),{color:d,lineWidth:u}=h;!u||!d||(t.lineWidth=u,t.strokeStyle=d,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(r,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;const s=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&!e.reverse)return;const c=n.setContext(this.getContext(l)),h=X(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,a=t.measureText(r.label).width,t.fillStyle=c.backdropColor;const d=$(c.backdropPadding);t.fillRect(-a/2-d.left,-o-h.size/2-d.top,a+d.width,h.size+d.height)}Nt(t,r.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}P(We,"id","radialLinear"),P(We,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:$e.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),P(We,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),P(We,"descriptors",{angleLines:{_fallback:"grid"}});const Ti={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}},st=Object.keys(Ti);function ra(i,t){return i-t}function la(i,t){if(F(t))return null;const e=i._adapter,{parser:n,round:s,isoWeekday:o}=i._parseOpts;let a=t;return typeof n=="function"&&(a=n(a)),j(a)||(a=typeof n=="string"?e.parse(a,n):e.parse(a)),a===null?null:(s&&(a=s==="week"&&(se(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,s)),+a)}function ca(i,t,e,n){const s=st.length;for(let o=st.indexOf(i);o<s-1;++o){const a=Ti[st[o]],r=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((e-t)/(r*a.size))<=n)return st[o]}return st[s-1]}function Hu(i,t,e,n,s){for(let o=st.length-1;o>=st.indexOf(e);o--){const a=st[o];if(Ti[a].common&&i._adapter.diff(s,n,a)>=t-1)return a}return st[e?st.indexOf(e):0]}function Nu(i){for(let t=st.indexOf(i)+1,e=st.length;t<e;++t)if(Ti[st[t]].common)return st[t]}function ha(i,t,e){if(!e)i[t]=!0;else if(e.length){const{lo:n,hi:s}=Ni(e,t),o=e[n]>=t?e[n]:e[s];i[o]=!0}}function Gu(i,t,e,n){const s=i._adapter,o=+s.startOf(t[0].value,n),a=t[t.length-1].value;let r,l;for(r=o;r<=a;r=+s.add(r,1,n))l=e[r],l>=0&&(t[l].major=!0);return t}function da(i,t,e){const n=[],s={},o=t.length;let a,r;for(a=0;a<o;++a)r=t[a],s[r]=a,n.push({value:r,major:!1});return o===0||!e?n:Gu(i,n,s,e)}class He extends Xt{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const n=t.time||(t.time={}),s=this._adapter=new Qc._date(t.adapters.date);s.init(e),xe(n.displayFormats,s.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:la(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,n=t.time.unit||"day";let{min:s,max:o,minDefined:a,maxDefined:r}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!r&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!a||!r)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=j(s)&&!isNaN(s)?s:+e.startOf(Date.now(),n),o=j(o)&&!isNaN(o)?o:+e.endOf(Date.now(),n)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){const t=this.options,e=t.time,n=t.ticks,s=n.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,a=this.max,r=kl(s,o,a);return this._unit=e.unit||(n.autoSkip?ca(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):Hu(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:Nu(this._unit),this.initOffsets(s),t.reverse&&r.reverse(),da(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,n=0,s,o;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?e=1-s:e=(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?n=o:n=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=J(e,0,a),n=J(n,0,a),this._offsets={start:e,end:n,factor:1/(e+1+n)}}_generate(){const t=this._adapter,e=this.min,n=this.max,s=this.options,o=s.time,a=o.unit||ca(o.minUnit,e,n,this._getLabelCapacity(e)),r=O(s.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=se(l)||l===!0,h={};let d=e,u,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(n,e,a)>1e5*r)throw new Error(e+" and "+n+" are too far apart with stepSize of "+r+" "+a);const p=s.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;u<n;u=+t.add(u,r,a),f++)ha(h,u,p);return(u===n||s.bounds==="ticks"||f===1)&&ha(h,u,p),Object.keys(h).sort(ra).map(g=>+g)}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){const s=this.options.time.displayFormats,o=this._unit,a=e||s[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,n,s){const o=this.options,a=o.ticks.callback;if(a)return B(a,[t,e,n],this);const r=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&r[l],d=c&&r[c],u=n[e],f=c&&d&&u&&u.major;return this._adapter.format(t,s||(f?d:h))}generateTickLabels(t){let e,n,s;for(e=0,n=t.length;e<n;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,n=this.ctx.measureText(t).width,s=ht(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(s),a=Math.sin(s),r=this._resolveTickFontOptions(0).size;return{w:n*o+r*a,h:n*a+r*o}}_getLabelCapacity(t){const e=this.options.time,n=e.displayFormats,s=n[e.unit]||n.millisecond,o=this._tickFormatFunction(t,0,da(this,[t],this._majorUnit),s),a=this._getLabelSize(o),r=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return r>0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,n;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,n=s.length;e<n;++e)t=t.concat(s[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,n;if(t.length)return t;const s=this.getLabels();for(e=0,n=s.length;e<n;++e)t.push(la(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return cs(t.sort(ra))}}P(He,"id","time"),P(He,"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 Si(i,t,e){let n=0,s=i.length-1,o,a,r,l;e?(t>=i[n].pos&&t<=i[s].pos&&({lo:n,hi:s}=At(i,"pos",t)),{pos:o,time:r}=i[n],{pos:a,time:l}=i[s]):(t>=i[n].time&&t<=i[s].time&&({lo:n,hi:s}=At(i,"time",t)),{time:o,pos:r}=i[n],{time:a,pos:l}=i[s]);const c=a-o;return c?r+(l-r)*(t-o)/c:r}class An extends He{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Si(e,this.min),this._tableRange=Si(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,s=[],o=[];let a,r,l,c,h;for(a=0,r=t.length;a<r;++a)c=t[a],c>=e&&c<=n&&s.push(c);if(s.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(a=0,r=s.length;a<r;++a)h=s[a+1],l=s[a-1],c=s[a],Math.round((h+l)/2)!==c&&o.push({time:c,pos:a/(r-1)});return o}_generate(){const t=this.min,e=this.max;let n=super.getDataTimestamps();return(!n.includes(t)||!n.length)&&n.splice(0,0,t),(!n.includes(e)||n.length===1)&&n.push(e),n.sort((s,o)=>s-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),n=this.getLabelTimestamps();return e.length&&n.length?t=this.normalize(e.concat(n)):t=e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(Si(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return Si(this._table,n*this._tableRange+this._minPos,!0)}}P(An,"id","timeseries"),P(An,"defaults",He.defaults);var ju=Object.freeze({__proto__:null,CategoryScale:yn,LinearScale:vn,LogarithmicScale:wn,RadialLinearScale:We,TimeScale:He,TimeSeriesScale:An});const Yu=[Jc,Td,vu,ju];Tt.register(...Yu);var Uu=Object.defineProperty,Zu=Object.getOwnPropertyDescriptor,Rt=(i,t,e,n)=>{for(var s=n>1?void 0:n?Zu(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Uu(t,e,s),s};w.GenusChart=class extends b.LitElement{constructor(){super(...arguments),this.chartTitle="",this.chartType="",this.chartLabels=[],this.chartDataSets=[],this.chartOptions={},this._createChart=()=>{this._chart=new Tt(this._chartCanvas,{type:this.chartType,data:{labels:[...this.chartLabels],datasets:[...this.chartDataSets]},options:{...this.chartOptions}})}}firstUpdated(){this._createChart()}updated(){this._chart.data.labels=[...this.chartLabels],this._chart.data.datasets=[...this.chartDataSets],this._chart.update()}render(){return b.html`
1403
+ `):i}function fu(i,t){const{element:e,datasetIndex:n,index:s}=t,o=i.getDatasetMeta(n).controller,{label:a,value:r}=o.getLabelAndValue(s);return{chart:i,label:a,parsed:o.getParsed(s),raw:i.data.datasets[n].data[s],formattedValue:r,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:e}}function Jo(i,t){const e=i.chart.ctx,{body:n,footer:s,title:o}=i,{boxWidth:a,boxHeight:r}=t,l=X(t.bodyFont),c=X(t.titleFont),h=X(t.footerFont),d=o.length,u=s.length,f=n.length,p=$(t.padding);let g=p.height,m=0,x=n.reduce((A,k)=>A+k.before.length+k.lines.length+k.after.length,0);if(x+=i.beforeBody.length+i.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),x){const A=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;g+=f*A+(x-f)*l.lineHeight+(x-1)*t.bodySpacing}u&&(g+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let y=0;const M=function(A){m=Math.max(m,e.measureText(A).width+y)};return e.save(),e.font=c.string,E(i.title,M),e.font=l.string,E(i.beforeBody.concat(i.afterBody),M),y=t.displayColors?a+2+t.boxPadding:0,E(n,A=>{E(A.before,M),E(A.lines,M),E(A.after,M)}),y=0,e.font=h.string,E(i.footer,M),e.restore(),m+=p.width,{width:m,height:g}}function pu(i,t){const{y:e,height:n}=t;return e<n/2?"top":e>i.height-n/2?"bottom":"center"}function gu(i,t,e,n){const{x:s,width:o}=n,a=e.caretSize+e.caretPadding;if(i==="left"&&s+o+a>t.width||i==="right"&&s-o-a<0)return!0}function mu(i,t,e,n){const{x:s,width:o}=e,{width:a,chartArea:{left:r,right:l}}=i;let c="center";return n==="center"?c=s<=(r+l)/2?"left":"right":s<=o/2?c="left":s>=a-o/2&&(c="right"),gu(c,i,t,e)&&(c="center"),c}function Qo(i,t,e){const n=e.yAlign||t.yAlign||pu(i,e);return{xAlign:e.xAlign||t.xAlign||mu(i,t,e,n),yAlign:n}}function bu(i,t){let{x:e,width:n}=i;return t==="right"?e-=n:t==="center"&&(e-=n/2),e}function xu(i,t,e){let{y:n,height:s}=i;return t==="top"?n+=e:t==="bottom"?n-=s+e:n-=s/2,n}function _o(i,t,e,n){const{caretSize:s,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:l}=e,c=s+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Gt(a);let p=bu(t,r);const g=xu(t,l,c);return l==="center"?r==="left"?p+=c:r==="right"&&(p-=c):r==="left"?p-=Math.max(h,u)+s:r==="right"&&(p+=Math.max(d,f)+s),{x:J(p,0,n.width-t.width),y:J(g,0,n.height-t.height)}}function Mi(i,t,e){const n=$(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-n.right:i.x+n.left}function $o(i){return mt([],St(i))}function yu(i,t,e){return Dt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function ta(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const ea={beforeTitle:wt,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,n=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return e[t.dataIndex]}return""},afterTitle:wt,beforeBody:wt,beforeLabel:wt,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let t=i.dataset.label||"";t&&(t+=": ");const e=i.formattedValue;return F(e)||(t+=e),t},labelColor(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:wt,afterBody:wt,beforeFooter:wt,footer:wt,afterFooter:wt};function nt(i,t,e,n){const s=i[t].call(e,n);return typeof s>"u"?ea[t].call(e,n):s}class xn extends ut{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),s=n.enabled&&e.options.animation&&n.animations,o=new js(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=yu(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:n}=e,s=nt(n,"beforeTitle",this,t),o=nt(n,"title",this,t),a=nt(n,"afterTitle",this,t);let r=[];return r=mt(r,St(s)),r=mt(r,St(o)),r=mt(r,St(a)),r}getBeforeBody(t,e){return $o(nt(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:n}=e,s=[];return E(t,o=>{const a={before:[],lines:[],after:[]},r=ta(n,o);mt(a.before,St(nt(r,"beforeLabel",this,o))),mt(a.lines,nt(r,"label",this,o)),mt(a.after,St(nt(r,"afterLabel",this,o))),s.push(a)}),s}getAfterBody(t,e){return $o(nt(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,s=nt(n,"beforeFooter",this,t),o=nt(n,"footer",this,t),a=nt(n,"afterFooter",this,t);let r=[];return r=mt(r,St(s)),r=mt(r,St(o)),r=mt(r,St(a)),r}_createItems(t){const e=this._active,n=this.chart.data,s=[],o=[],a=[];let r=[],l,c;for(l=0,c=e.length;l<c;++l)r.push(fu(this.chart,e[l]));return t.filter&&(r=r.filter((h,d,u)=>t.filter(h,d,u,n))),t.itemSort&&(r=r.sort((h,d)=>t.itemSort(h,d,n))),E(r,h=>{const d=ta(t.callbacks,h);s.push(nt(d,"labelColor",this,h)),o.push(nt(d,"labelPointStyle",this,h)),a.push(nt(d,"labelTextColor",this,h))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){const n=this.options.setContext(this.getContext()),s=this._active;let o,a=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const r=Re[n.position].call(this,s,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);const l=this._size=Jo(this,n),c=Object.assign({},r,l),h=Qo(this.chart,n,c),d=_o(n,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,s){const o=this.getCaretPosition(t,n,s);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,n){const{xAlign:s,yAlign:o}=this,{caretSize:a,cornerRadius:r}=n,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=Gt(r),{x:u,y:f}=t,{width:p,height:g}=e;let m,x,y,M,A,k;return o==="center"?(A=f+g/2,s==="left"?(m=u,x=m-a,M=A+a,k=A-a):(m=u+p,x=m+a,M=A-a,k=A+a),y=m):(s==="left"?x=u+Math.max(l,h)+a:s==="right"?x=u+p-Math.max(c,d)-a:x=this.caretX,o==="top"?(M=f,A=M-a,m=x-a,y=x+a):(M=f+g,A=M+a,m=x+a,y=x-a),k=M),{x1:m,x2:x,x3:y,y1:M,y2:A,y3:k}}drawTitle(t,e,n){const s=this.title,o=s.length;let a,r,l;if(o){const c=re(n.rtl,this.x,this.width);for(t.x=Mi(this,n.titleAlign,n),e.textAlign=c.textAlign(n.titleAlign),e.textBaseline="middle",a=X(n.titleFont),r=n.titleSpacing,e.fillStyle=n.titleColor,e.font=a.string,l=0;l<o;++l)e.fillText(s[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===o&&(t.y+=n.titleMarginBottom-r)}}_drawColorBox(t,e,n,s,o){const a=this.labelColors[n],r=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=o,h=X(o.bodyFont),d=Mi(this,"left",o),u=s.x(d),f=l<h.lineHeight?(h.lineHeight-l)/2:0,p=e.y+f;if(o.usePointStyle){const g={radius:Math.min(c,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},m=s.leftForLtr(u,c)+c/2,x=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Ki(t,g,m,x),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Ki(t,g,m,x)}else{t.lineWidth=I(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const g=s.leftForLtr(u,c),m=s.leftForLtr(s.xPlus(u,1),c-2),x=Gt(a.borderRadius);Object.values(x).some(y=>y!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Pe(t,{x:g,y:p,w:c,h:l,radius:x}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Pe(t,{x:m,y:p+1,w:c-2,h:l-2,radius:x}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,c,l),t.strokeRect(g,p,c,l),t.fillStyle=a.backgroundColor,t.fillRect(m,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:s}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:h}=n,d=X(n.bodyFont);let u=d.lineHeight,f=0;const p=re(n.rtl,this.x,this.width),g=function(C){e.fillText(C,p.x(t.x+f),t.y+u/2),t.y+=u+o},m=p.textAlign(a);let x,y,M,A,k,T,S;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=Mi(this,m,n),e.fillStyle=n.bodyColor,E(this.beforeBody,g),f=r&&m!=="right"?a==="center"?c/2+h:c+2+h:0,A=0,T=s.length;A<T;++A){for(x=s[A],y=this.labelTextColors[A],e.fillStyle=y,E(x.before,g),M=x.lines,r&&M.length&&(this._drawColorBox(e,t,A,p,n),u=Math.max(d.lineHeight,l)),k=0,S=M.length;k<S;++k)g(M[k]),u=d.lineHeight;E(x.after,g)}f=0,u=d.lineHeight,E(this.afterBody,g),t.y-=o}drawFooter(t,e,n){const s=this.footer,o=s.length;let a,r;if(o){const l=re(n.rtl,this.x,this.width);for(t.x=Mi(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=l.textAlign(n.footerAlign),e.textBaseline="middle",a=X(n.footerFont),e.fillStyle=n.footerColor,e.font=a.string,r=0;r<o;++r)e.fillText(s[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+n.footerSpacing}}drawBackground(t,e,n,s){const{xAlign:o,yAlign:a}=this,{x:r,y:l}=t,{width:c,height:h}=n,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:p}=Gt(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(r+d,l),a==="top"&&this.drawCaret(t,e,n,s),e.lineTo(r+c-u,l),e.quadraticCurveTo(r+c,l,r+c,l+u),a==="center"&&o==="right"&&this.drawCaret(t,e,n,s),e.lineTo(r+c,l+h-p),e.quadraticCurveTo(r+c,l+h,r+c-p,l+h),a==="bottom"&&this.drawCaret(t,e,n,s),e.lineTo(r+f,l+h),e.quadraticCurveTo(r,l+h,r,l+h-f),a==="center"&&o==="left"&&this.drawCaret(t,e,n,s),e.lineTo(r,l+d),e.quadraticCurveTo(r,l,r+d,l),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,s=n&&n.x,o=n&&n.y;if(s||o){const a=Re[t.position].call(this,this._active,this._eventPosition);if(!a)return;const r=this._size=Jo(this,t),l=Object.assign({},a,this._size),c=Qo(e,t,l),h=_o(t,l,c,e);(s._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const a=$(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,s,e),Ds(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Fs(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,s=t.map(({datasetIndex:r,index:l})=>{const c=this.chart.getDatasetMeta(r);if(!c)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:c.data[l],index:l}}),o=!qe(n,s),a=this._positionChanged(s,e);(o||a)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,n),r=this._positionChanged(a,t),l=e||!qe(a,o)||r;return l&&(this._active=a,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,n,s){const o=this.options;if(t.type==="mouseout")return[];if(!s)return e;const a=this.chart.getElementsAtEventForMode(t,o.mode,o,n);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:n,caretY:s,options:o}=this,a=Re[o.position].call(this,t,e);return a!==!1&&(n!==a.x||s!==a.y)}}P(xn,"positioners",Re);var vu={id:"tooltip",_element:xn,positioners:Re,afterInit(i,t,e){e&&(i.tooltip=new xn({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:ea},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},wu=Object.freeze({__proto__:null,Colors:Id,Decimation:Rd,Filler:nu,Legend:cu,SubTitle:uu,Title:du,Tooltip:vu});const ku=(i,t,e,n)=>(typeof t=="string"?(e=i.push(t)-1,n.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Au(i,t,e,n){const s=i.indexOf(t);if(s===-1)return ku(i,t,e,n);const o=i.lastIndexOf(t);return s!==o?e:s}const Mu=(i,t)=>i===null?null:J(Math.round(i),0,t);function ia(i){const t=this.getLabels();return i>=0&&i<t.length?t[i]:i}class yn extends Xt{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const n=this.getLabels();for(const{index:s,label:o}of e)n[s]===o&&n.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(F(t))return null;const n=this.getLabels();return e=isFinite(e)&&n[e]===t?e:Au(n,t,O(e,t),this._addedLabels),Mu(e,n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(n=0),e||(s=this.getLabels().length-1)),this.min=n,this.max=s}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,s=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let a=t;a<=e;a++)s.push({value:a});return s}getLabelForValue(t){return ia.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}P(yn,"id","category"),P(yn,"defaults",{ticks:{callback:ia}});function Pu(i,t){const e=[],{bounds:s,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,p=h-1,{min:g,max:m}=t,x=!F(a),y=!F(r),M=!F(c),A=(m-g)/(d+1);let k=ss((m-g)/p/f)*f,T,S,C,L;if(k<1e-14&&!x&&!y)return[{value:g},{value:m}];L=Math.ceil(m/k)-Math.floor(g/k),L>p&&(k=ss(L*k/p/f)*f),F(l)||(T=Math.pow(10,l),k=Math.ceil(k*T)/T),s==="ticks"?(S=Math.floor(g/k)*k,C=Math.ceil(m/k)*k):(S=g,C=m),x&&y&&o&&yl((r-a)/o,k/1e3)?(L=Math.round(Math.min((r-a)/k,h)),k=(r-a)/L,S=a,C=r):M?(S=x?a:S,C=y?r:C,L=c-1,k=(C-S)/L):(L=(C-S)/k,ve(L,Math.round(L),k/1e3)?L=Math.round(L):L=Math.ceil(L));const z=Math.max(as(k),as(S));T=Math.pow(10,F(l)?z:l),S=Math.round(S*T)/T,C=Math.round(C*T)/T;let V=0;for(x&&(u&&S!==a?(e.push({value:a}),S<a&&V++,ve(Math.round((S+V*k)*T)/T,a,na(a,A,i))&&V++):S<a&&V++);V<L;++V){const D=Math.round((S+V*k)*T)/T;if(y&&D>r)break;e.push({value:D})}return y&&u&&C!==r?e.length&&ve(e[e.length-1].value,r,na(r,A,i))?e[e.length-1].value=r:e.push({value:r}):(!y||C===r)&&e.push({value:C}),e}function na(i,t,{horizontal:e,minRotation:n}){const s=ht(n),o=(e?Math.sin(s):Math.cos(s))||.001,a=.75*t*(""+i).length;return Math.min(t/o,a)}class Pi extends Xt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return F(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:s,max:o}=this;const a=l=>s=e?s:l,r=l=>o=n?o:l;if(t){const l=pt(s),c=pt(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);r(o+l),t||a(s-l)}this.min=s,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:n}=t,s;return n?(s=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const s={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,a=Pu(s,o);return t.bounds==="ticks"&&os(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const s=(n-e)/Math.max(t.length-1,1)/2;e-=s,n+=s}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return Ae(t,this.chart.options.locale,this.options.ticks.format)}}class vn extends Pi{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=j(t)?t:0,this.max=j(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=ht(this.options.ticks.minRotation),s=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}P(vn,"id","linear"),P(vn,"defaults",{ticks:{callback:$e.formatters.numeric}});const Be=i=>Math.floor(It(i)),qt=(i,t)=>Math.pow(10,Be(i)+t);function sa(i){return i/Math.pow(10,Be(i))===1}function oa(i,t,e){const n=Math.pow(10,e),s=Math.floor(i/n);return Math.ceil(t/n)-s}function Tu(i,t){const e=t-i;let n=Be(e);for(;oa(i,t,n)>10;)n++;for(;oa(i,t,n)<10;)n--;return Math.min(n,Be(i))}function Su(i,{min:t,max:e}){t=at(i.min,t);const n=[],s=Be(t);let o=Tu(t,e),a=o<0?Math.pow(10,Math.abs(o)):1;const r=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((t-l)*a)/a,h=Math.floor((t-l)/r/10)*r*10;let d=Math.floor((c-h)/Math.pow(10,o)),u=at(i.min,Math.round((l+h+d*Math.pow(10,o))*a)/a);for(;u<e;)n.push({value:u,major:sa(u),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,a=o>=0?1:a),u=Math.round((l+h+d*Math.pow(10,o))*a)/a;const f=at(i.max,u);return n.push({value:f,major:sa(f),significand:d}),n}class wn extends Xt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=Pi.prototype.parse.apply(this,[t,e]);if(n===0){this._zero=!0;return}return j(n)&&n>0?n:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=j(t)?Math.max(0,t):null,this.max=j(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!j(this._userMin)&&(this.min=t===qt(this.min,0)?qt(this.min,-1):qt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,s=this.max;const o=r=>n=t?n:r,a=r=>s=e?s:r;n===s&&(n<=0?(o(1),a(10)):(o(qt(n,-1)),a(qt(s,1)))),n<=0&&o(qt(s,-1)),s<=0&&a(qt(n,1)),this.min=n,this.max=s}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},n=Su(e,this);return t.bounds==="ticks"&&os(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(t){return t===void 0?"0":Ae(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=It(t),this._valueRange=It(this.max)-It(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(It(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}P(wn,"id","logarithmic"),P(wn,"defaults",{ticks:{callback:$e.formatters.logarithmic,major:{enabled:!0}}});function kn(i){const t=i.ticks;if(t.display&&i.display){const e=$(t.backdropPadding);return O(t.font&&t.font.size,Y.font.size)+e.height}return 0}function Cu(i,t,e){return e=W(e)?e:[e],{w:El(i,t.string,e),h:e.length*t.lineHeight}}function aa(i,t,e,n,s){return i===n||i===s?{start:t-e/2,end:t+e/2}:i<n||i>s?{start:t-e,end:t}:{start:t,end:t+e}}function Lu(i){const t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),n=[],s=[],o=i._pointLabels.length,a=i.options.pointLabels,r=a.centerPointLabels?H/o:0;for(let l=0;l<o;l++){const c=a.setContext(i.getPointLabelContext(l));s[l]=c.padding;const h=i.getPointPosition(l,i.drawingArea+s[l],r),d=X(c.font),u=Cu(i.ctx,d,i._pointLabels[l]);n[l]=u;const f=rt(i.getIndexAngle(l)+r),p=Math.round(Wi(f)),g=aa(p,h.x,u.w,0,180),m=aa(p,h.y,u.h,90,270);Ou(e,t,f,g,m)}i.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),i._pointLabelItems=Iu(i,n,s)}function Ou(i,t,e,n,s){const o=Math.abs(Math.sin(e)),a=Math.abs(Math.cos(e));let r=0,l=0;n.start<t.l?(r=(t.l-n.start)/o,i.l=Math.min(i.l,t.l-r)):n.end>t.r&&(r=(n.end-t.r)/o,i.r=Math.max(i.r,t.r+r)),s.start<t.t?(l=(t.t-s.start)/a,i.t=Math.min(i.t,t.t-l)):s.end>t.b&&(l=(s.end-t.b)/a,i.b=Math.max(i.b,t.b+l))}function zu(i,t,e){const n=i.drawingArea,{extra:s,additionalAngle:o,padding:a,size:r}=e,l=i.getPointPosition(t,n+s+a,o),c=Math.round(Wi(rt(l.angle+U))),h=Eu(l.y,r.h,c),d=Du(c),u=Fu(l.x,r.w,d);return{visible:!0,x:l.x,y:h,textAlign:d,left:u,top:h,right:u+r.w,bottom:h+r.h}}function Vu(i,t){if(!t)return!0;const{left:e,top:n,right:s,bottom:o}=i;return!(Mt({x:e,y:n},t)||Mt({x:e,y:o},t)||Mt({x:s,y:n},t)||Mt({x:s,y:o},t))}function Iu(i,t,e){const n=[],s=i._pointLabels.length,o=i.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:kn(o)/2,additionalAngle:a?H/s:0};let c;for(let h=0;h<s;h++){l.padding=e[h],l.size=t[h];const d=zu(i,h,l);n.push(d),r==="auto"&&(d.visible=Vu(d,c),d.visible&&(c=d))}return n}function Du(i){return i===0||i===180?"center":i<180?"left":"right"}function Fu(i,t,e){return e==="right"?i-=t:e==="center"&&(i-=t/2),i}function Eu(i,t,e){return e===90||e===270?i-=t/2:(e>270||e<90)&&(i-=t),i}function Ru(i,t,e){const{left:n,top:s,right:o,bottom:a}=e,{backdropColor:r}=t;if(!F(r)){const l=Gt(t.borderRadius),c=$(t.backdropPadding);i.fillStyle=r;const h=n-c.left,d=s-c.top,u=o-n+c.width,f=a-s+c.height;Object.values(l).some(p=>p!==0)?(i.beginPath(),Pe(i,{x:h,y:d,w:u,h:f,radius:l}),i.fill()):i.fillRect(h,d,u,f)}}function Bu(i,t){const{ctx:e,options:{pointLabels:n}}=i;for(let s=t-1;s>=0;s--){const o=i._pointLabelItems[s];if(!o.visible)continue;const a=n.setContext(i.getPointLabelContext(s));Ru(e,a,o);const r=X(a.font),{x:l,y:c,textAlign:h}=o;Nt(e,i._pointLabels[s],l,c+r.lineHeight/2,r,{color:a.color,textAlign:h,textBaseline:"middle"})}}function ra(i,t,e,n){const{ctx:s}=i;if(e)s.arc(i.xCenter,i.yCenter,t,0,N);else{let o=i.getPointPosition(0,t);s.moveTo(o.x,o.y);for(let a=1;a<n;a++)o=i.getPointPosition(a,t),s.lineTo(o.x,o.y)}}function Wu(i,t,e,n,s){const o=i.ctx,a=t.circular,{color:r,lineWidth:l}=t;!a&&!n||!r||!l||e<0||(o.save(),o.strokeStyle=r,o.lineWidth=l,o.setLineDash(s.dash),o.lineDashOffset=s.dashOffset,o.beginPath(),ra(i,e,a,n),o.closePath(),o.stroke(),o.restore())}function Hu(i,t,e){return Dt(i,{label:e,index:t,type:"pointLabel"})}class We extends Pi{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=$(kn(this.options)/2),e=this.width=this.maxWidth-t.width,n=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+n/2+t.top),this.drawingArea=Math.floor(Math.min(e,n)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=j(t)&&!isNaN(t)?t:0,this.max=j(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/kn(this.options))}generateTickLabels(t){Pi.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,n)=>{const s=B(this.options.pointLabels.callback,[e,n],this);return s||s===0?s:""}).filter((e,n)=>this.chart.getDataVisibility(n))}fit(){const t=this.options;t.display&&t.pointLabels.display?Lu(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,s))}getIndexAngle(t){const e=N/(this._pointLabels.length||1),n=this.options.startAngle||0;return rt(t*e+ht(n))}getDistanceFromCenterForValue(t){if(F(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(F(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const n=e[t];return Hu(this.getContext(),t,n)}}getPointPosition(t,e,n=0){const s=this.getIndexAngle(t)-U+n;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:n,right:s,bottom:o}=this._pointLabelItems[t];return{left:e,top:n,right:s,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const n=this.ctx;n.save(),n.beginPath(),ra(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:n,grid:s,border:o}=e,a=this._pointLabels.length;let r,l,c;if(e.pointLabels.display&&Bu(this,a),s.display&&this.ticks.forEach((h,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(h.value);const u=this.getContext(d),f=s.setContext(u),p=o.setContext(u);Wu(this,f,l,a,p)}}),n.display){for(t.save(),r=a-1;r>=0;r--){const h=n.setContext(this.getPointLabelContext(r)),{color:d,lineWidth:u}=h;!u||!d||(t.lineWidth=u,t.strokeStyle=d,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(r,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;const s=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&!e.reverse)return;const c=n.setContext(this.getContext(l)),h=X(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,a=t.measureText(r.label).width,t.fillStyle=c.backdropColor;const d=$(c.backdropPadding);t.fillRect(-a/2-d.left,-o-h.size/2-d.top,a+d.width,h.size+d.height)}Nt(t,r.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}P(We,"id","radialLinear"),P(We,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:$e.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),P(We,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),P(We,"descriptors",{angleLines:{_fallback:"grid"}});const Ti={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}},st=Object.keys(Ti);function la(i,t){return i-t}function ca(i,t){if(F(t))return null;const e=i._adapter,{parser:n,round:s,isoWeekday:o}=i._parseOpts;let a=t;return typeof n=="function"&&(a=n(a)),j(a)||(a=typeof n=="string"?e.parse(a,n):e.parse(a)),a===null?null:(s&&(a=s==="week"&&(se(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,s)),+a)}function ha(i,t,e,n){const s=st.length;for(let o=st.indexOf(i);o<s-1;++o){const a=Ti[st[o]],r=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((e-t)/(r*a.size))<=n)return st[o]}return st[s-1]}function Nu(i,t,e,n,s){for(let o=st.length-1;o>=st.indexOf(e);o--){const a=st[o];if(Ti[a].common&&i._adapter.diff(s,n,a)>=t-1)return a}return st[e?st.indexOf(e):0]}function Gu(i){for(let t=st.indexOf(i)+1,e=st.length;t<e;++t)if(Ti[st[t]].common)return st[t]}function da(i,t,e){if(!e)i[t]=!0;else if(e.length){const{lo:n,hi:s}=Ni(e,t),o=e[n]>=t?e[n]:e[s];i[o]=!0}}function ju(i,t,e,n){const s=i._adapter,o=+s.startOf(t[0].value,n),a=t[t.length-1].value;let r,l;for(r=o;r<=a;r=+s.add(r,1,n))l=e[r],l>=0&&(t[l].major=!0);return t}function ua(i,t,e){const n=[],s={},o=t.length;let a,r;for(a=0;a<o;++a)r=t[a],s[r]=a,n.push({value:r,major:!1});return o===0||!e?n:ju(i,n,s,e)}class He extends Xt{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const n=t.time||(t.time={}),s=this._adapter=new _c._date(t.adapters.date);s.init(e),xe(n.displayFormats,s.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:ca(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,n=t.time.unit||"day";let{min:s,max:o,minDefined:a,maxDefined:r}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!r&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!a||!r)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=j(s)&&!isNaN(s)?s:+e.startOf(Date.now(),n),o=j(o)&&!isNaN(o)?o:+e.endOf(Date.now(),n)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){const t=this.options,e=t.time,n=t.ticks,s=n.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,a=this.max,r=Al(s,o,a);return this._unit=e.unit||(n.autoSkip?ha(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):Nu(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:Gu(this._unit),this.initOffsets(s),t.reverse&&r.reverse(),ua(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,n=0,s,o;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?e=1-s:e=(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?n=o:n=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=J(e,0,a),n=J(n,0,a),this._offsets={start:e,end:n,factor:1/(e+1+n)}}_generate(){const t=this._adapter,e=this.min,n=this.max,s=this.options,o=s.time,a=o.unit||ha(o.minUnit,e,n,this._getLabelCapacity(e)),r=O(s.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=se(l)||l===!0,h={};let d=e,u,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(n,e,a)>1e5*r)throw new Error(e+" and "+n+" are too far apart with stepSize of "+r+" "+a);const p=s.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;u<n;u=+t.add(u,r,a),f++)da(h,u,p);return(u===n||s.bounds==="ticks"||f===1)&&da(h,u,p),Object.keys(h).sort(la).map(g=>+g)}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){const s=this.options.time.displayFormats,o=this._unit,a=e||s[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,n,s){const o=this.options,a=o.ticks.callback;if(a)return B(a,[t,e,n],this);const r=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&r[l],d=c&&r[c],u=n[e],f=c&&d&&u&&u.major;return this._adapter.format(t,s||(f?d:h))}generateTickLabels(t){let e,n,s;for(e=0,n=t.length;e<n;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,n=this.ctx.measureText(t).width,s=ht(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(s),a=Math.sin(s),r=this._resolveTickFontOptions(0).size;return{w:n*o+r*a,h:n*a+r*o}}_getLabelCapacity(t){const e=this.options.time,n=e.displayFormats,s=n[e.unit]||n.millisecond,o=this._tickFormatFunction(t,0,ua(this,[t],this._majorUnit),s),a=this._getLabelSize(o),r=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return r>0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,n;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,n=s.length;e<n;++e)t=t.concat(s[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,n;if(t.length)return t;const s=this.getLabels();for(e=0,n=s.length;e<n;++e)t.push(ca(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return hs(t.sort(la))}}P(He,"id","time"),P(He,"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 Si(i,t,e){let n=0,s=i.length-1,o,a,r,l;e?(t>=i[n].pos&&t<=i[s].pos&&({lo:n,hi:s}=At(i,"pos",t)),{pos:o,time:r}=i[n],{pos:a,time:l}=i[s]):(t>=i[n].time&&t<=i[s].time&&({lo:n,hi:s}=At(i,"time",t)),{time:o,pos:r}=i[n],{time:a,pos:l}=i[s]);const c=a-o;return c?r+(l-r)*(t-o)/c:r}class An extends He{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Si(e,this.min),this._tableRange=Si(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,s=[],o=[];let a,r,l,c,h;for(a=0,r=t.length;a<r;++a)c=t[a],c>=e&&c<=n&&s.push(c);if(s.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(a=0,r=s.length;a<r;++a)h=s[a+1],l=s[a-1],c=s[a],Math.round((h+l)/2)!==c&&o.push({time:c,pos:a/(r-1)});return o}_generate(){const t=this.min,e=this.max;let n=super.getDataTimestamps();return(!n.includes(t)||!n.length)&&n.splice(0,0,t),(!n.includes(e)||n.length===1)&&n.push(e),n.sort((s,o)=>s-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),n=this.getLabelTimestamps();return e.length&&n.length?t=this.normalize(e.concat(n)):t=e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(Si(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return Si(this._table,n*this._tableRange+this._minPos,!0)}}P(An,"id","timeseries"),P(An,"defaults",He.defaults);var Yu=Object.freeze({__proto__:null,CategoryScale:yn,LinearScale:vn,LogarithmicScale:wn,RadialLinearScale:We,TimeScale:He,TimeSeriesScale:An});const Uu=[Qc,Sd,wu,Yu];Tt.register(...Uu);var Zu=Object.defineProperty,Ku=Object.getOwnPropertyDescriptor,Rt=(i,t,e,n)=>{for(var s=n>1?void 0:n?Ku(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Zu(t,e,s),s};w.GenusChart=class extends b.LitElement{constructor(){super(...arguments),this.chartTitle="",this.chartType="",this.chartLabels=[],this.chartDataSets=[],this.chartOptions={},this._createChart=()=>{this._chart=new Tt(this._chartCanvas,{type:this.chartType,data:{labels:[...this.chartLabels],datasets:[...this.chartDataSets]},options:{...this.chartOptions}})}}firstUpdated(){this._createChart()}updated(){this._chart.data.labels=[...this.chartLabels],this._chart.data.datasets=[...this.chartDataSets],this._chart.update()}render(){return b.html`
1404
1404
  <div class='chart'>
1405
1405
  <div class='chart__head'>
1406
1406
  <h4 class='chart__title'>${this.chartTitle}</h4>
@@ -1410,7 +1410,7 @@
1410
1410
  <canvas id='chart-canvas'></canvas>
1411
1411
  </div>
1412
1412
  </div>
1413
- `}},w.GenusChart.styles=[Rr,Br,Wr],Rt([v.property({attribute:"chart-title"})],w.GenusChart.prototype,"chartTitle",2),Rt([v.property({attribute:"chart-type"})],w.GenusChart.prototype,"chartType",2),Rt([v.property({attribute:"chart-labels",type:Array})],w.GenusChart.prototype,"chartLabels",2),Rt([v.property({attribute:"chart-datasets",type:Array})],w.GenusChart.prototype,"chartDataSets",2),Rt([v.property({attribute:"chart-options",type:Object})],w.GenusChart.prototype,"chartOptions",2),Rt([v.query("#chart-canvas")],w.GenusChart.prototype,"_chartCanvas",2),Rt([v.state()],w.GenusChart.prototype,"_chart",2),w.GenusChart=Rt([v.customElement("genus-chart")],w.GenusChart);const Ku=b.css`
1413
+ `}},w.GenusChart.styles=[Br,Wr,Hr],Rt([v.property({attribute:"chart-title"})],w.GenusChart.prototype,"chartTitle",2),Rt([v.property({attribute:"chart-type"})],w.GenusChart.prototype,"chartType",2),Rt([v.property({attribute:"chart-labels",type:Array})],w.GenusChart.prototype,"chartLabels",2),Rt([v.property({attribute:"chart-datasets",type:Array})],w.GenusChart.prototype,"chartDataSets",2),Rt([v.property({attribute:"chart-options",type:Object})],w.GenusChart.prototype,"chartOptions",2),Rt([v.query("#chart-canvas")],w.GenusChart.prototype,"_chartCanvas",2),Rt([v.state()],w.GenusChart.prototype,"_chart",2),w.GenusChart=Rt([v.customElement("genus-chart")],w.GenusChart);const Xu=b.css`
1414
1414
  .table
1415
1415
  {
1416
1416
  display: table;
@@ -1442,7 +1442,7 @@
1442
1442
  /*.table .tbody .tr { display: contents; }*/
1443
1443
 
1444
1444
  /*::slotted(genus-table-row) { display: contents; }*/
1445
- `,Xu=b.css`
1445
+ `,qu=b.css`
1446
1446
  *
1447
1447
  {
1448
1448
  margin: 0;
@@ -1477,7 +1477,7 @@
1477
1477
  }
1478
1478
 
1479
1479
  .pagination-control { width: 100%; }
1480
- `,qu=b.css`
1480
+ `,Ju=b.css`
1481
1481
  .card__head, .pagination-control
1482
1482
  {
1483
1483
  display: flex;
@@ -1505,7 +1505,7 @@
1505
1505
  justify-content: center;
1506
1506
  align-items: center;
1507
1507
  }
1508
- `,Ju=b.css`
1508
+ `,Qu=b.css`
1509
1509
  .table__title
1510
1510
  {
1511
1511
  font-family: var(--table-title-font-family, 'Sofia Pro Semi');
@@ -1536,7 +1536,7 @@
1536
1536
  .navigation-control span { color: var(--navigation-control-color, #203e70); }
1537
1537
 
1538
1538
  .current-page-input { color: var(--input-font-color, #203e70); }
1539
- `,Qu=b.css`
1539
+ `,_u=b.css`
1540
1540
  .button
1541
1541
  {
1542
1542
  border: none;
@@ -1554,7 +1554,7 @@
1554
1554
  }
1555
1555
 
1556
1556
  .navigation-button:hover { cursor: pointer; }
1557
- `,_u=b.css`
1557
+ `,$u=b.css`
1558
1558
  input[type='text']
1559
1559
  {
1560
1560
  border: var(--input-border, none);
@@ -1570,7 +1570,7 @@
1570
1570
  border-radius: 0.375rem;
1571
1571
  text-align: center;
1572
1572
  }
1573
- `,$u="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIconly/Light/Arrow%20-%20Right%202%3c/title%3e%3cg%20id='Iconly/Light/Arrow---Right-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cg%20id='Arrow---Right-2'%20transform='translate(12.000000,%2012.000000)%20rotate(-90.000000)%20translate(-12.000000,%20-12.000000)%20translate(5.000000,%208.500000)'%20stroke='%233a5a9b'%20stroke-width='1.5'%3e%3cpolyline%20id='Stroke-1'%20points='14%200%207%207%200%200'%3e%3c/polyline%3e%3c/g%3e%3c/g%3e%3c/svg%3e",tf="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIconly/Light/Arrow%20-%20Left%202%3c/title%3e%3cg%20id='Iconly/Light/Arrow---Left-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cg%20id='Arrow---Left-2'%20transform='translate(12.000000,%2012.000000)%20rotate(-270.000000)%20translate(-12.000000,%20-12.000000)%20translate(5.000000,%208.500000)'%20stroke='%233a5a9b'%20stroke-width='1.5'%3e%3cpolyline%20id='Stroke-1'%20points='14%200%207%207%200%200'%3e%3c/polyline%3e%3c/g%3e%3c/g%3e%3c/svg%3e";var ef=Object.defineProperty,nf=Object.getOwnPropertyDescriptor,et=(i,t,e,n)=>{for(var s=n>1?void 0:n?nf(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&ef(t,e,s),s};const sf=document.querySelector("template#action-content");let q=class extends b.LitElement{constructor(){super(...arguments),this.tableHeaders=[],this.tableTitle="",this.dataSource=[],this.objectProperties=[],this.readonly=!1,this.withPagination=!1,this.resultsPerPage=10,this.previousSvgSrc="",this.nextSvgSrc="",this.key="",this.anchorAttrValue="",this.containsHTML=i=>/<[a-z][\s\S]*>/i.test(i),this.currentPage=1,this.totalPages=0,this.paginatedArray=[],this.actionTemplateContent=sf.content,this.generateTableHeadColumns=()=>{let i=[];for(let t of this.tableHeaders)i.push(b.html`<div class='th'>${t}</div>`);return!this.readonly&&i.push(b.html`<div class='th'></div>`),i},this.generateDataColumns=i=>{let t=[];if(this.objectProperties.length!==0)for(let e of this.objectProperties)this.containsHTML(i[e])?t.push(b.html`<div class='td'>${Mn.unsafeHTML(i[e])}</td>`):t.push(b.html`<div class='td'>${i[e]}</div>`);else for(let e of Object.values(i))this.containsHTML(e)?t.push(b.html`<div class='td'>${Mn.unsafeHTML(e)}</td>`):t.push(b.html`<div class='td'>${e}</div>`);return t},this.getInputValue=i=>{let t=this.targetInput.value;this.targetInput.value&&(Number(t)>this.totalPages?(this.targetInput.value=this.totalPages.toString(),this.currentPage=this.totalPages):Number(t)===0?this.targetInput.value=this.currentPage.toString():this.currentPage=Number(i.target.value),this.paginatedArray=this.paginateArray(this.dataSource,this.currentPage))},this.allowOnlyNumbers=i=>{isNaN(Number(i.key))&&i.key!=="Backspace"&&i.preventDefault()},this.paginateArray=(i,t,e=this.resultsPerPage)=>{let n=(t-1)*e,s=t*e;return i.slice(n,s)},this.nextPage=()=>{this.currentPage!==this.totalPages&&(this.currentPage++,this.targetInput.value&&(this.targetInput.value=this.currentPage.toString()),this.paginatedArray=this.paginateArray(this.dataSource,this.currentPage))},this.previousPage=()=>{this.currentPage!==1&&(this.currentPage--,this.targetInput.value&&(this.targetInput.value=this.currentPage.toString()),this.paginatedArray=this.paginateArray(this.dataSource,this.currentPage))}}firstUpdated(){this.withPagination&&(this.paginatedArray=this.paginateArray(this.dataSource,this.currentPage,this.resultsPerPage)),this.totalPages=Math.ceil(this.dataSource.length/this.resultsPerPage)}render(){return b.html`
1573
+ `,tf="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIconly/Light/Arrow%20-%20Right%202%3c/title%3e%3cg%20id='Iconly/Light/Arrow---Right-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cg%20id='Arrow---Right-2'%20transform='translate(12.000000,%2012.000000)%20rotate(-90.000000)%20translate(-12.000000,%20-12.000000)%20translate(5.000000,%208.500000)'%20stroke='%233a5a9b'%20stroke-width='1.5'%3e%3cpolyline%20id='Stroke-1'%20points='14%200%207%207%200%200'%3e%3c/polyline%3e%3c/g%3e%3c/g%3e%3c/svg%3e",ef="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIconly/Light/Arrow%20-%20Left%202%3c/title%3e%3cg%20id='Iconly/Light/Arrow---Left-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cg%20id='Arrow---Left-2'%20transform='translate(12.000000,%2012.000000)%20rotate(-270.000000)%20translate(-12.000000,%20-12.000000)%20translate(5.000000,%208.500000)'%20stroke='%233a5a9b'%20stroke-width='1.5'%3e%3cpolyline%20id='Stroke-1'%20points='14%200%207%207%200%200'%3e%3c/polyline%3e%3c/g%3e%3c/g%3e%3c/svg%3e";var nf=Object.defineProperty,sf=Object.getOwnPropertyDescriptor,et=(i,t,e,n)=>{for(var s=n>1?void 0:n?sf(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&nf(t,e,s),s};let of=Object.getPrototypeOf(Object.getPrototypeOf(globalThis))!==Object.prototype,Mn;of&&(Mn=document.querySelector("template#action-content"));let q=class extends b.LitElement{constructor(){super(...arguments),this.tableHeaders=[],this.tableTitle="",this.dataSource=[],this.objectProperties=[],this.readonly=!1,this.withPagination=!1,this.resultsPerPage=10,this.previousSvgSrc="",this.nextSvgSrc="",this.key="",this.anchorAttrValue="",this.containsHTML=i=>/<[a-z][\s\S]*>/i.test(i),this.currentPage=1,this.totalPages=0,this.paginatedArray=[],this.actionTemplateContent=Mn!==null?Mn.content:null,this.generateTableHeadColumns=()=>{let i=[];for(let t of this.tableHeaders)i.push(b.html`<div class='th'>${t}</div>`);return this.actionTemplateContent!==null&&i.push(b.html`<div class='th'></div>`),i},this.generateDataColumns=i=>{let t=[];if(this.objectProperties.length!==0)for(let e of this.objectProperties)this.containsHTML(i[e])?t.push(b.html`<div class='td'>${Pn.unsafeHTML(i[e])}</td>`):t.push(b.html`<div class='td'>${i[e]}</div>`);else for(let e of Object.values(i))this.containsHTML(e)?t.push(b.html`<div class='td'>${Pn.unsafeHTML(e)}</td>`):t.push(b.html`<div class='td'>${e}</div>`);return this.actionTemplateContent!==null&&t.push(b.html`<div class="td">${this.actionTemplateContent.cloneNode(!0)}</div>`),t},this.getInputValue=i=>{let t=this.targetInput.value;this.targetInput.value&&(Number(t)>this.totalPages?(this.targetInput.value=this.totalPages.toString(),this.currentPage=this.totalPages):Number(t)===0?this.targetInput.value=this.currentPage.toString():this.currentPage=Number(i.target.value),this.paginatedArray=this.paginateArray(this.dataSource,this.currentPage))},this.allowOnlyNumbers=i=>{isNaN(Number(i.key))&&i.key!=="Backspace"&&i.preventDefault()},this.paginateArray=(i,t,e=this.resultsPerPage)=>{let n=(t-1)*e,s=t*e;return i.slice(n,s)},this.nextPage=()=>{this.currentPage!==this.totalPages&&(this.currentPage++,this.targetInput.value&&(this.targetInput.value=this.currentPage.toString()),this.paginatedArray=this.paginateArray(this.dataSource,this.currentPage))},this.previousPage=()=>{this.currentPage!==1&&(this.currentPage--,this.targetInput.value&&(this.targetInput.value=this.currentPage.toString()),this.paginatedArray=this.paginateArray(this.dataSource,this.currentPage))}}firstUpdated(){this.withPagination&&(this.paginatedArray=this.paginateArray(this.dataSource,this.currentPage,this.resultsPerPage)),this.totalPages=Math.ceil(this.dataSource.length/this.resultsPerPage)}render(){return b.html`
1574
1574
  <div class='card'>
1575
1575
  <div class='card__head'>
1576
1576
  <h4 class='table__title'>${this.tableTitle}</h4>
@@ -1582,27 +1582,25 @@
1582
1582
  <div class='tr'>${this.generateTableHeadColumns()}</div>
1583
1583
  </div>
1584
1584
  <div class='tbody'>
1585
- ${Pn.when(this.withPagination,()=>this.paginatedArray.map(i=>(this.buttonElement=this.actionTemplateContent.querySelector("button"),this.buttonElement!==null&&this.buttonElement.setAttribute("data-key",i[this.key]),this.anchorElement=this.actionTemplateContent.querySelector("a"),this.anchorElement!==null&&this.anchorElement.setAttribute("href",`${this.anchorAttrValue}${i[this.key]}`),this.spanElement=this.actionTemplateContent.querySelector("span"),this.spanElement!==null&&this.spanElement.setAttribute("data-key",i[this.key]),b.html`
1585
+ ${Tn.when(this.withPagination,()=>this.paginatedArray.map(i=>(this.actionTemplateContent!==null&&(this.buttonElement=this.actionTemplateContent.querySelector("button"),this.buttonElement!==null&&this.buttonElement.setAttribute("data-key",i[this.key]),this.anchorElement=this.actionTemplateContent.querySelector("a"),this.anchorElement!==null&&this.anchorElement.setAttribute("href",`${this.anchorAttrValue}${i[this.key]}`),this.spanElement=this.actionTemplateContent.querySelector("span"),this.spanElement!==null&&this.spanElement.setAttribute("data-key",i[this.key])),b.html`
1586
1586
  <div class='tr'>
1587
1587
  ${this.generateDataColumns(i)}
1588
- ${this.readonly?b.html``:b.html`<div class="td">${this.actionTemplateContent.cloneNode(!0)}</div>`}
1589
1588
  </div>
1590
- `)),()=>this.dataSource.map(i=>(this.buttonElement=this.actionTemplateContent.querySelector("button"),this.buttonElement!==null&&this.buttonElement.setAttribute("data-key",i[this.key]),this.anchorElement=this.actionTemplateContent.querySelector("a"),this.anchorElement!==null&&this.anchorElement.setAttribute("href",`${this.anchorAttrValue}${i[this.key]}`),this.spanElement=this.actionTemplateContent.querySelector("span"),this.spanElement!==null&&this.spanElement.setAttribute("data-key",i[this.key]),b.html`
1589
+ `)),()=>this.dataSource.map(i=>(this.actionTemplateContent!==null&&(this.buttonElement=this.actionTemplateContent.querySelector("button"),this.buttonElement!==null&&this.buttonElement.setAttribute("data-key",i[this.key]),this.anchorElement=this.actionTemplateContent.querySelector("a"),this.anchorElement!==null&&this.anchorElement.setAttribute("href",`${this.anchorAttrValue}${i[this.key]}`),this.spanElement=this.actionTemplateContent.querySelector("span"),this.spanElement!==null&&this.spanElement.setAttribute("data-key",i[this.key])),b.html`
1591
1590
  <div class='tr'>
1592
1591
  ${this.generateDataColumns(i)}
1593
- ${this.readonly?b.html``:b.html`<div class="td">${this.actionTemplateContent.cloneNode(!0)}</div>`}
1594
1592
  </div>
1595
1593
  `)))}
1596
1594
  </div>
1597
1595
  </div>
1598
1596
  </div>
1599
1597
  <div class='card__footer'>
1600
- ${Pn.when(this.withPagination,()=>b.html`
1598
+ ${Tn.when(this.withPagination,()=>b.html`
1601
1599
  <div class='pagination-control'>
1602
1600
  <p class='items-per-page'>Results per page <span>${this.resultsPerPage}</span></p>
1603
1601
  <div class='navigation-control'>
1604
1602
  <button class='button navigation-button' @click=${this.previousPage}>
1605
- <img src=${this.previousSvgSrc||tf} class='navigation-icon component-icon' alt='navigation icon' />
1603
+ <img src=${this.previousSvgSrc||ef} class='navigation-icon component-icon' alt='navigation icon' />
1606
1604
  </button>
1607
1605
 
1608
1606
  <p>
@@ -1610,17 +1608,15 @@
1610
1608
  <span> of ${this.totalPages}</span>
1611
1609
  </p>
1612
1610
 
1613
- <!--<span>${this.currentPage} of ${this.totalPages}</span>-->
1614
-
1615
1611
  <button class='button navigation-button' @click=${this.nextPage}>
1616
- <img src=${this.nextSvgSrc||$u} class='navigation-icon component-icon' alt='navigation icon' />
1612
+ <img src=${this.nextSvgSrc||tf} class='navigation-icon component-icon' alt='navigation icon' />
1617
1613
  </button>
1618
1614
  </div>
1619
1615
  </div>
1620
1616
  `,()=>b.html``)}
1621
1617
  </div>
1622
1618
  </div>
1623
- `}};q.styles=[Xu,Ku,qu,Ju,Qu,_u],et([v.property({attribute:"table-headers",type:Array})],q.prototype,"tableHeaders",2),et([v.property({attribute:"table-title"})],q.prototype,"tableTitle",2),et([v.property({attribute:"data-source",type:Array})],q.prototype,"dataSource",2),et([v.property({attribute:"specific-columns",type:Array})],q.prototype,"objectProperties",2),et([v.property({attribute:"readonly",type:Boolean})],q.prototype,"readonly",2),et([v.property({attribute:"with-pagination",type:Boolean})],q.prototype,"withPagination",2),et([v.property({attribute:"results-per-page",type:Number})],q.prototype,"resultsPerPage",2),et([v.property({attribute:"previous-icon-src"})],q.prototype,"previousSvgSrc",2),et([v.property({attribute:"next-icon-src"})],q.prototype,"nextSvgSrc",2),et([v.property({attribute:"key"})],q.prototype,"key",2),et([v.property({attribute:"anchor-attribute-value"})],q.prototype,"anchorAttrValue",2),et([v.state()],q.prototype,"currentPage",2),et([v.state()],q.prototype,"totalPages",2),et([v.state()],q.prototype,"paginatedArray",2),et([v.query(".current-page-input")],q.prototype,"targetInput",2),q=et([v.customElement("genus-table")],q);const of=Object.freeze(Object.defineProperty({__proto__:null,get GenusTable(){return q}},Symbol.toStringTag,{value:"Module"})),af=b.css`
1619
+ `}};q.styles=[qu,Xu,Ju,Qu,_u,$u],et([v.property({attribute:"table-headers",type:Array})],q.prototype,"tableHeaders",2),et([v.property({attribute:"table-title"})],q.prototype,"tableTitle",2),et([v.property({attribute:"data-source",type:Array})],q.prototype,"dataSource",2),et([v.property({attribute:"specific-columns",type:Array})],q.prototype,"objectProperties",2),et([v.property({attribute:"readonly",type:Boolean})],q.prototype,"readonly",2),et([v.property({attribute:"with-pagination",type:Boolean})],q.prototype,"withPagination",2),et([v.property({attribute:"results-per-page",type:Number})],q.prototype,"resultsPerPage",2),et([v.property({attribute:"previous-icon-src"})],q.prototype,"previousSvgSrc",2),et([v.property({attribute:"next-icon-src"})],q.prototype,"nextSvgSrc",2),et([v.property({attribute:"key"})],q.prototype,"key",2),et([v.property({attribute:"anchor-attribute-value"})],q.prototype,"anchorAttrValue",2),et([v.state()],q.prototype,"currentPage",2),et([v.state()],q.prototype,"totalPages",2),et([v.state()],q.prototype,"paginatedArray",2),et([v.query(".current-page-input")],q.prototype,"targetInput",2),q=et([v.customElement("genus-table")],q);const af=Object.freeze(Object.defineProperty({__proto__:null,get GenusTable(){return q}},Symbol.toStringTag,{value:"Module"})),rf=b.css`
1624
1620
  .toast
1625
1621
  {
1626
1622
  position: absolute;
@@ -1665,7 +1661,7 @@
1665
1661
  opacity: 1;
1666
1662
  }
1667
1663
  }
1668
- `,rf=b.css`
1664
+ `,lf=b.css`
1669
1665
  .toast__message
1670
1666
  {
1671
1667
  margin: 0;
@@ -1677,9 +1673,9 @@
1677
1673
  .toast--error .toast__message { color: #981f10; }
1678
1674
 
1679
1675
  .toast--success .toast__message { color: #0f753e; }
1680
- `,lf=b.css`
1681
- .genus-icon { pointer-events: none; }
1682
1676
  `,cf=b.css`
1677
+ .genus-icon { pointer-events: none; }
1678
+ `,hf=b.css`
1683
1679
  .toast
1684
1680
  {
1685
1681
  display: grid;
@@ -1687,19 +1683,19 @@
1687
1683
  grid-column-gap: 1rem;
1688
1684
  align-items: center;
1689
1685
  }
1690
- `,hf=b.css`
1686
+ `,df=b.css`
1691
1687
  .close-btn
1692
1688
  {
1693
1689
  display: block;
1694
1690
  width: 1.25rem;
1695
1691
  height: 1.25rem;
1696
1692
  }
1697
- `,df="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIconly/Bold/Close%20Square%3c/title%3e%3cg%20id='Iconly/Bold/Close-Square'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Close-Square'%20transform='translate(1.999800,%201.999200)'%20fill='%23fe331a'%20fill-rule='nonzero'%3e%3cpath%20d='M14.34,2.84217094e-14%20C17.73,2.84217094e-14%2020,2.38%2020,5.92%20L20,5.92%20L20,14.091%20C20,17.621%2017.73,20%2014.34,20%20L14.34,20%20L5.67,20%20C2.28,20%200,17.621%200,14.091%20L0,14.091%20L0,5.92%20C0,2.38%202.28,2.84217094e-14%205.67,2.84217094e-14%20L5.67,2.84217094e-14%20Z%20M13.01,6.971%20C12.67,6.63%2012.12,6.63%2011.77,6.971%20L11.77,6.971%20L10,8.75%20L8.22,6.971%20C7.87,6.63%207.32,6.63%206.98,6.971%20C6.64,7.311%206.64,7.871%206.98,8.21%20L6.98,8.21%20L8.76,9.991%20L6.98,11.761%20C6.64,12.111%206.64,12.661%206.98,13%20C7.15,13.17%207.38,13.261%207.6,13.261%20C7.83,13.261%208.05,13.17%208.22,13%20L8.22,13%20L10,11.231%20L11.78,13%20C11.95,13.181%2012.17,13.261%2012.39,13.261%20C12.62,13.261%2012.84,13.17%2013.01,13%20C13.35,12.661%2013.35,12.111%2013.01,11.771%20L13.01,11.771%20L11.23,9.991%20L13.01,8.21%20C13.35,7.871%2013.35,7.311%2013.01,6.971%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",uf="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIconly/Bold/Close%20Square%3c/title%3e%3cg%20id='Iconly/Bold/Close-Square'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Close-Square'%20transform='translate(1.999800,%201.999200)'%20fill='%2319c368'%20fill-rule='nonzero'%3e%3cpath%20d='M14.34,2.84217094e-14%20C17.73,2.84217094e-14%2020,2.38%2020,5.92%20L20,5.92%20L20,14.091%20C20,17.621%2017.73,20%2014.34,20%20L14.34,20%20L5.67,20%20C2.28,20%200,17.621%200,14.091%20L0,14.091%20L0,5.92%20C0,2.38%202.28,2.84217094e-14%205.67,2.84217094e-14%20L5.67,2.84217094e-14%20Z%20M13.01,6.971%20C12.67,6.63%2012.12,6.63%2011.77,6.971%20L11.77,6.971%20L10,8.75%20L8.22,6.971%20C7.87,6.63%207.32,6.63%206.98,6.971%20C6.64,7.311%206.64,7.871%206.98,8.21%20L6.98,8.21%20L8.76,9.991%20L6.98,11.761%20C6.64,12.111%206.64,12.661%206.98,13%20C7.15,13.17%207.38,13.261%207.6,13.261%20C7.83,13.261%208.05,13.17%208.22,13%20L8.22,13%20L10,11.231%20L11.78,13%20C11.95,13.181%2012.17,13.261%2012.39,13.261%20C12.62,13.261%2012.84,13.17%2013.01,13%20C13.35,12.661%2013.35,12.111%2013.01,11.771%20L13.01,11.771%20L11.23,9.991%20L13.01,8.21%20C13.35,7.871%2013.35,7.311%2013.01,6.971%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e";var ff=Object.defineProperty,pf=Object.getOwnPropertyDescriptor,Ci=(i,t,e,n)=>{for(var s=n>1?void 0:n?pf(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&ff(t,e,s),s};w.GenusToastMessage=class extends b.LitElement{constructor(){super(...arguments),this.toastMessage="",this.toastType="error",this.showToast=!1,this.setToastVisibility=()=>{this.showToast&&(this.showToast=!this.showToast),this.dispatchEvent(new CustomEvent("clicked",{detail:this.showToast}))}}render(){return b.html`
1693
+ `,uf="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIconly/Bold/Close%20Square%3c/title%3e%3cg%20id='Iconly/Bold/Close-Square'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Close-Square'%20transform='translate(1.999800,%201.999200)'%20fill='%23fe331a'%20fill-rule='nonzero'%3e%3cpath%20d='M14.34,2.84217094e-14%20C17.73,2.84217094e-14%2020,2.38%2020,5.92%20L20,5.92%20L20,14.091%20C20,17.621%2017.73,20%2014.34,20%20L14.34,20%20L5.67,20%20C2.28,20%200,17.621%200,14.091%20L0,14.091%20L0,5.92%20C0,2.38%202.28,2.84217094e-14%205.67,2.84217094e-14%20L5.67,2.84217094e-14%20Z%20M13.01,6.971%20C12.67,6.63%2012.12,6.63%2011.77,6.971%20L11.77,6.971%20L10,8.75%20L8.22,6.971%20C7.87,6.63%207.32,6.63%206.98,6.971%20C6.64,7.311%206.64,7.871%206.98,8.21%20L6.98,8.21%20L8.76,9.991%20L6.98,11.761%20C6.64,12.111%206.64,12.661%206.98,13%20C7.15,13.17%207.38,13.261%207.6,13.261%20C7.83,13.261%208.05,13.17%208.22,13%20L8.22,13%20L10,11.231%20L11.78,13%20C11.95,13.181%2012.17,13.261%2012.39,13.261%20C12.62,13.261%2012.84,13.17%2013.01,13%20C13.35,12.661%2013.35,12.111%2013.01,11.771%20L13.01,11.771%20L11.23,9.991%20L13.01,8.21%20C13.35,7.871%2013.35,7.311%2013.01,6.971%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",ff="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIconly/Bold/Close%20Square%3c/title%3e%3cg%20id='Iconly/Bold/Close-Square'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Close-Square'%20transform='translate(1.999800,%201.999200)'%20fill='%2319c368'%20fill-rule='nonzero'%3e%3cpath%20d='M14.34,2.84217094e-14%20C17.73,2.84217094e-14%2020,2.38%2020,5.92%20L20,5.92%20L20,14.091%20C20,17.621%2017.73,20%2014.34,20%20L14.34,20%20L5.67,20%20C2.28,20%200,17.621%200,14.091%20L0,14.091%20L0,5.92%20C0,2.38%202.28,2.84217094e-14%205.67,2.84217094e-14%20L5.67,2.84217094e-14%20Z%20M13.01,6.971%20C12.67,6.63%2012.12,6.63%2011.77,6.971%20L11.77,6.971%20L10,8.75%20L8.22,6.971%20C7.87,6.63%207.32,6.63%206.98,6.971%20C6.64,7.311%206.64,7.871%206.98,8.21%20L6.98,8.21%20L8.76,9.991%20L6.98,11.761%20C6.64,12.111%206.64,12.661%206.98,13%20C7.15,13.17%207.38,13.261%207.6,13.261%20C7.83,13.261%208.05,13.17%208.22,13%20L8.22,13%20L10,11.231%20L11.78,13%20C11.95,13.181%2012.17,13.261%2012.39,13.261%20C12.62,13.261%2012.84,13.17%2013.01,13%20C13.35,12.661%2013.35,12.111%2013.01,11.771%20L13.01,11.771%20L11.23,9.991%20L13.01,8.21%20C13.35,7.871%2013.35,7.311%2013.01,6.971%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e";var pf=Object.defineProperty,gf=Object.getOwnPropertyDescriptor,Ci=(i,t,e,n)=>{for(var s=n>1?void 0:n?gf(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&pf(t,e,s),s};w.GenusToastMessage=class extends b.LitElement{constructor(){super(...arguments),this.toastMessage="",this.toastType="error",this.showToast=!1,this.setToastVisibility=()=>{this.showToast&&(this.showToast=!this.showToast),this.dispatchEvent(new CustomEvent("clicked",{detail:this.showToast}))}}render(){return b.html`
1698
1694
  <div class='toast toast--${this.toastType} ${this.showToast?"toast--show-toast":""}'>
1699
1695
  <p class='toast__message'>${this.toastMessage}</p>
1700
- ${this.toastType==="success"?b.html`<span class='close-btn' @click=${this.setToastVisibility}><object class="genus-icon" data='${uf}' width='20' height='20'></object></span>`:b.html`<span class='close-btn' @click=${this.setToastVisibility}><object class="genus-icon" data='${df}' width='20' height='20'></object></span>`}
1696
+ ${this.toastType==="success"?b.html`<span class='close-btn' @click=${this.setToastVisibility}><object class="genus-icon" data='${ff}' width='20' height='20'></object></span>`:b.html`<span class='close-btn' @click=${this.setToastVisibility}><object class="genus-icon" data='${uf}' width='20' height='20'></object></span>`}
1701
1697
  </div>
1702
- `}},w.GenusToastMessage.styles=[af,rf,cf,lf,hf],Ci([v.property({attribute:"toast-message"})],w.GenusToastMessage.prototype,"toastMessage",2),Ci([v.property({attribute:"toast-type"})],w.GenusToastMessage.prototype,"toastType",2),Ci([v.property({type:Boolean,attribute:"show-toast"})],w.GenusToastMessage.prototype,"showToast",2),w.GenusToastMessage=Ci([v.customElement("genus-toast-message")],w.GenusToastMessage);const gf=b.css`
1698
+ `}},w.GenusToastMessage.styles=[rf,lf,hf,cf,df],Ci([v.property({attribute:"toast-message"})],w.GenusToastMessage.prototype,"toastMessage",2),Ci([v.property({attribute:"toast-type"})],w.GenusToastMessage.prototype,"toastType",2),Ci([v.property({type:Boolean,attribute:"show-toast"})],w.GenusToastMessage.prototype,"showToast",2),w.GenusToastMessage=Ci([v.customElement("genus-toast-message")],w.GenusToastMessage);const mf=b.css`
1703
1699
  *
1704
1700
  {
1705
1701
  margin: 0;
@@ -1730,7 +1726,7 @@
1730
1726
  align-self: center;
1731
1727
  grid-area: a;
1732
1728
  }
1733
- `,mf=b.css`
1729
+ `,bf=b.css`
1734
1730
  .data-header
1735
1731
  {
1736
1732
  font-family: var(--data-header-font-family, 'Sofia Pro Semi');
@@ -1749,7 +1745,7 @@
1749
1745
  color: var(--data-text-color, #ccc);
1750
1746
  grid-area: dtxt;
1751
1747
  }
1752
- `,bf=b.css`
1748
+ `,xf=b.css`
1753
1749
  .data-list-item
1754
1750
  {
1755
1751
  display: grid;
@@ -1786,14 +1782,14 @@
1786
1782
  "dh"
1787
1783
  "dtxt";
1788
1784
  }
1789
- `,xf=b.css`
1785
+ `,yf=b.css`
1790
1786
  .icon-container
1791
1787
  {
1792
1788
  display: flex;
1793
1789
  justify-content: center;
1794
1790
  align-items: center;
1795
1791
  }
1796
- `,yf=b.css`
1792
+ `,vf=b.css`
1797
1793
  img
1798
1794
  {
1799
1795
  max-width: 100%;
@@ -1810,7 +1806,7 @@
1810
1806
  width: var(--icon-width, 1.5625rem);
1811
1807
  height: var(--icon-height, 1.5625rem);
1812
1808
  }
1813
- `;var vf=Object.defineProperty,wf=Object.getOwnPropertyDescriptor,Jt=(i,t,e,n)=>{for(var s=n>1?void 0:n?wf(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&vf(t,e,s),s};w.GenusDataListItem=class extends b.LitElement{constructor(){super(...arguments),this.dataHeader="",this.dataText="",this.dataItemIconSrc="",this.withoutIcon=!1,this.withoutAction=!1,this.withoutIconandAction=!1,this.renderDataItem=()=>{let t;return this.withoutIcon?t=b.html`
1809
+ `;var wf=Object.defineProperty,kf=Object.getOwnPropertyDescriptor,Jt=(i,t,e,n)=>{for(var s=n>1?void 0:n?kf(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&wf(t,e,s),s};w.GenusDataListItem=class extends b.LitElement{constructor(){super(...arguments),this.dataHeader="",this.dataText="",this.dataItemIconSrc="",this.withoutIcon=!1,this.withoutAction=!1,this.withoutIconandAction=!1,this.renderDataItem=()=>{let t;return this.withoutIcon?t=b.html`
1814
1810
  <div class='data-list-item data-list-item--no-icon'>
1815
1811
  <h6 class='data-header'>${this.dataHeader}</h4>
1816
1812
  <p class='data-text'>${this.dataText}</p>
@@ -1836,7 +1832,7 @@
1836
1832
  <p class='data-text'>${this.dataText}</p>
1837
1833
 
1838
1834
  <slot></slot>
1839
- </div>`,t}}render(){return this.renderDataItem()}},w.GenusDataListItem.styles=[gf,mf,bf,xf,yf],Jt([v.property({attribute:"data-header"})],w.GenusDataListItem.prototype,"dataHeader",2),Jt([v.property({attribute:"data-text"})],w.GenusDataListItem.prototype,"dataText",2),Jt([v.property({attribute:"svg-icon-src"})],w.GenusDataListItem.prototype,"dataItemIconSrc",2),Jt([v.property({type:Boolean,attribute:"without-icon"})],w.GenusDataListItem.prototype,"withoutIcon",2),Jt([v.property({type:Boolean,attribute:"without-action"})],w.GenusDataListItem.prototype,"withoutAction",2),Jt([v.property({type:Boolean,attribute:"without-icon-action"})],w.GenusDataListItem.prototype,"withoutIconandAction",2),w.GenusDataListItem=Jt([v.customElement("genus-data-list-item")],w.GenusDataListItem);const kf=b.css`
1835
+ </div>`,t}}render(){return this.renderDataItem()}},w.GenusDataListItem.styles=[mf,bf,xf,yf,vf],Jt([v.property({attribute:"data-header"})],w.GenusDataListItem.prototype,"dataHeader",2),Jt([v.property({attribute:"data-text"})],w.GenusDataListItem.prototype,"dataText",2),Jt([v.property({attribute:"svg-icon-src"})],w.GenusDataListItem.prototype,"dataItemIconSrc",2),Jt([v.property({type:Boolean,attribute:"without-icon"})],w.GenusDataListItem.prototype,"withoutIcon",2),Jt([v.property({type:Boolean,attribute:"without-action"})],w.GenusDataListItem.prototype,"withoutAction",2),Jt([v.property({type:Boolean,attribute:"without-icon-action"})],w.GenusDataListItem.prototype,"withoutIconandAction",2),w.GenusDataListItem=Jt([v.customElement("genus-data-list-item")],w.GenusDataListItem);const Af=b.css`
1840
1836
  .upload-label
1841
1837
  {
1842
1838
  display: flex;
@@ -1846,14 +1842,14 @@
1846
1842
  }
1847
1843
 
1848
1844
  .upload-label--without-button-text, .upload-label--without-icon { column-gap: unset; }
1849
- `,Af=b.css`
1845
+ `,Mf=b.css`
1850
1846
  .button-text
1851
1847
  {
1852
1848
  font-family: var(--button-text-font-family, 'Sofia Pro Regular');
1853
1849
  font-size: var(--button-text-font-size, 1rem);
1854
1850
  color: var(--button-text-color, #203e70);
1855
1851
  }
1856
- `,Mf=b.css`
1852
+ `,Pf=b.css`
1857
1853
  img
1858
1854
  {
1859
1855
  max-width: 100%;
@@ -1870,7 +1866,7 @@
1870
1866
  width: var(--icon-width, 1.25rem);
1871
1867
  height: var(--icon-height, 1.25rem);
1872
1868
  }
1873
- `,Pf=b.css`
1869
+ `,Tf=b.css`
1874
1870
  .upload-label
1875
1871
  {
1876
1872
  padding: var(--upload-button-padding, 1rem);
@@ -1879,9 +1875,9 @@
1879
1875
  }
1880
1876
 
1881
1877
  .upload-label:hover { cursor: pointer; }
1882
- `,Tf=b.css`
1878
+ `,Sf=b.css`
1883
1879
  input[type='file'] { display: none; }
1884
- `,ua="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIconly/Bold/Upload%3c/title%3e%3cg%20id='Iconly/Bold/Upload'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Upload'%20transform='translate(2.000000,%202.000000)'%20fill='%23213e70'%20fill-rule='nonzero'%3e%3cpath%20d='M1.77635684e-15,11.2874674%20C1.77635684e-15,8.87583953%201.8779102,6.89627143%204.23116222,6.78512193%20L4.44,6.7802%20L9.23,6.7802%20L9.23,12.8848512%20C9.23,13.3223512%209.57,13.6682814%2010,13.6682814%20C10.385,13.6682814%2010.7111806,13.3776039%2010.7628704,12.9921713%20L10.77,12.8848512%20L10.77,6.7802%20L15.55,6.7802%20C17.93,6.7802%2019.8853469,8.69086445%2019.9951382,11.0944886%20L20,11.3078163%20L20,16.2627581%20C20,18.6842698%2018.1220898,20.6641203%2015.7688378,20.7752778%20L15.56,20.7802%20L4.45,20.7802%20C2.06028571,20.7802%200.114097959,18.8599342%200.00483801749,16.4650885%20L1.77635684e-15,16.2525837%20L1.77635684e-15,11.2874674%20Z%20M6.5502,4.24%20C6.26838182,3.96727273%206.24276198,3.53752066%206.46582735,3.23624343%20L6.5402,3.15%20L9.4502,0.23%20C9.6002,0.08%209.7902,-1.42108547e-14%2010.0002,-1.42108547e-14%20C10.1602,-1.42108547e-14%2010.3202,0.0512%2010.44948,0.14848%20L10.5402,0.23%20L13.4502,3.15%20C13.6002,3.3%2013.6802,3.5%2013.6802,3.69%20C13.6802,3.89%2013.6002,4.09%2013.4502,4.24%20C13.1774727,4.51272727%2012.7477207,4.53752066%2012.4464434,4.31438017%20L12.3602,4.24%20L10.7702,2.64%20L10.7702,6.78%20L9.2302,6.78%20L9.2302,2.64%20L7.6402,4.24%20C7.3402,4.54%206.8502,4.54%206.5502,4.24%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e";var Sf=Object.defineProperty,Cf=Object.getOwnPropertyDescriptor,Qt=(i,t,e,n)=>{for(var s=n>1?void 0:n?Cf(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Sf(t,e,s),s};w.GenusFileUpload=class extends b.LitElement{constructor(){super(...arguments),this.buttonText="",this.svgIconSrc="",this.specificFileTypes="",this.withoutIcon=!1,this.withoutButtonText=!1,this.getInputValue=()=>{let t=[];if(this._fileInput.files){let e=Array.from(this._fileInput.files);for(let n of e)t.push({fileName:n==null?void 0:n.name,fileSize:(n==null?void 0:n.size)/1024>=1024?`${((n==null?void 0:n.size)/1024/1024).toFixed(1)} MB`:`${((n==null?void 0:n.size)/1024).toFixed(1)} KB`,fileData:n})}this.dispatchEvent(new CustomEvent("selected",{detail:t}))},this.renderInputControl=()=>{let t;return this.withoutIcon?t=b.html`
1880
+ `,fa="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIconly/Bold/Upload%3c/title%3e%3cg%20id='Iconly/Bold/Upload'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='Upload'%20transform='translate(2.000000,%202.000000)'%20fill='%23213e70'%20fill-rule='nonzero'%3e%3cpath%20d='M1.77635684e-15,11.2874674%20C1.77635684e-15,8.87583953%201.8779102,6.89627143%204.23116222,6.78512193%20L4.44,6.7802%20L9.23,6.7802%20L9.23,12.8848512%20C9.23,13.3223512%209.57,13.6682814%2010,13.6682814%20C10.385,13.6682814%2010.7111806,13.3776039%2010.7628704,12.9921713%20L10.77,12.8848512%20L10.77,6.7802%20L15.55,6.7802%20C17.93,6.7802%2019.8853469,8.69086445%2019.9951382,11.0944886%20L20,11.3078163%20L20,16.2627581%20C20,18.6842698%2018.1220898,20.6641203%2015.7688378,20.7752778%20L15.56,20.7802%20L4.45,20.7802%20C2.06028571,20.7802%200.114097959,18.8599342%200.00483801749,16.4650885%20L1.77635684e-15,16.2525837%20L1.77635684e-15,11.2874674%20Z%20M6.5502,4.24%20C6.26838182,3.96727273%206.24276198,3.53752066%206.46582735,3.23624343%20L6.5402,3.15%20L9.4502,0.23%20C9.6002,0.08%209.7902,-1.42108547e-14%2010.0002,-1.42108547e-14%20C10.1602,-1.42108547e-14%2010.3202,0.0512%2010.44948,0.14848%20L10.5402,0.23%20L13.4502,3.15%20C13.6002,3.3%2013.6802,3.5%2013.6802,3.69%20C13.6802,3.89%2013.6002,4.09%2013.4502,4.24%20C13.1774727,4.51272727%2012.7477207,4.53752066%2012.4464434,4.31438017%20L12.3602,4.24%20L10.7702,2.64%20L10.7702,6.78%20L9.2302,6.78%20L9.2302,2.64%20L7.6402,4.24%20C7.3402,4.54%206.8502,4.54%206.5502,4.24%20Z'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e";var Cf=Object.defineProperty,Lf=Object.getOwnPropertyDescriptor,Qt=(i,t,e,n)=>{for(var s=n>1?void 0:n?Lf(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(s=(n?a(t,e,s):a(s))||s);return n&&s&&Cf(t,e,s),s};w.GenusFileUpload=class extends b.LitElement{constructor(){super(...arguments),this.buttonText="",this.svgIconSrc="",this.specificFileTypes="",this.withoutIcon=!1,this.withoutButtonText=!1,this.getInputValue=()=>{let t=[];if(this._fileInput.files){let e=Array.from(this._fileInput.files);for(let n of e)t.push({fileName:n==null?void 0:n.name,fileSize:(n==null?void 0:n.size)/1024>=1024?`${((n==null?void 0:n.size)/1024/1024).toFixed(1)} MB`:`${((n==null?void 0:n.size)/1024).toFixed(1)} KB`,fileData:n})}this.dispatchEvent(new CustomEvent("selected",{detail:t}))},this.renderInputControl=()=>{let t;return this.withoutIcon?t=b.html`
1885
1881
  <input type='file' id='file-input' accept='${this.specificFileTypes}' @change='${this.getInputValue}' multiple />
1886
1882
  <label class='upload-label upload-label--without-icon' for='file-input'>
1887
1883
  <span class='button-text'>${this.buttonText}</span>
@@ -1889,15 +1885,15 @@
1889
1885
  `:this.withoutButtonText?t=b.html`
1890
1886
  <input type='file' id='file-input' accept='${this.specificFileTypes}' @change='${this.getInputValue}' multiple />
1891
1887
  <label class='upload-label upload-label--without-button-text' for='file-input'>
1892
- <img class='component-icon' src='${this.svgIconSrc||ua}' />
1888
+ <img class='component-icon' src='${this.svgIconSrc||fa}' />
1893
1889
  </label>
1894
1890
  `:t=b.html`
1895
1891
  <input type='file' id='file-input' accept='${this.specificFileTypes}' @change='${this.getInputValue}' multiple />
1896
1892
  <label class='upload-label' for='file-input'>
1897
- <img class='component-icon' src='${this.svgIconSrc||ua}' />
1893
+ <img class='component-icon' src='${this.svgIconSrc||fa}' />
1898
1894
  <span class='button-text'>${this.buttonText}</span>
1899
1895
  </label>
1900
- `,t}}render(){return this.renderInputControl()}},w.GenusFileUpload.styles=[Pf,Mf,Af,Tf,kf],Qt([v.property({attribute:"button-text"})],w.GenusFileUpload.prototype,"buttonText",2),Qt([v.property({attribute:"svg-icon-src"})],w.GenusFileUpload.prototype,"svgIconSrc",2),Qt([v.property({attribute:"file-types"})],w.GenusFileUpload.prototype,"specificFileTypes",2),Qt([v.property({type:Boolean,attribute:"without-icon"})],w.GenusFileUpload.prototype,"withoutIcon",2),Qt([v.property({type:Boolean,attribute:"without-button-text"})],w.GenusFileUpload.prototype,"withoutButtonText",2),Qt([v.query("#file-input")],w.GenusFileUpload.prototype,"_fileInput",2),w.GenusFileUpload=Qt([v.customElement("genus-file-upload")],w.GenusFileUpload),(()=>{let i=`
1896
+ `,t}}render(){return this.renderInputControl()}},w.GenusFileUpload.styles=[Tf,Pf,Mf,Sf,Af],Qt([v.property({attribute:"button-text"})],w.GenusFileUpload.prototype,"buttonText",2),Qt([v.property({attribute:"svg-icon-src"})],w.GenusFileUpload.prototype,"svgIconSrc",2),Qt([v.property({attribute:"file-types"})],w.GenusFileUpload.prototype,"specificFileTypes",2),Qt([v.property({type:Boolean,attribute:"without-icon"})],w.GenusFileUpload.prototype,"withoutIcon",2),Qt([v.property({type:Boolean,attribute:"without-button-text"})],w.GenusFileUpload.prototype,"withoutButtonText",2),Qt([v.query("#file-input")],w.GenusFileUpload.prototype,"_fileInput",2),w.GenusFileUpload=Qt([v.customElement("genus-file-upload")],w.GenusFileUpload),(()=>{let i=`
1901
1897
  @font-face
1902
1898
  {
1903
1899
  font-family: 'Sofia Pro';
@@ -1939,4 +1935,4 @@
1939
1935
  font-style: normal;
1940
1936
  font-display: swap;
1941
1937
  }
1942
- `;if(Object.getPrototypeOf(Object.getPrototypeOf(globalThis))!==Object.prototype&&!document.getElementById("injectedStyle")){let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.id="injectedStyle",n.type="text/css",n.innerText=i,e.appendChild(n)}})(),w.GenusCheckBoxGroup=mr,w.GenusDataTable=of,w.GenusDropDownSelect=Er,w.GenusTabs=Ha,w.GenusWizard=Za,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
1938
+ `;if(Object.getPrototypeOf(Object.getPrototypeOf(globalThis))!==Object.prototype&&!document.getElementById("injectedStyle")){let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.id="injectedStyle",n.type="text/css",n.innerText=i,e.appendChild(n)}})(),w.GenusCheckBoxGroup=br,w.GenusDataTable=af,w.GenusDropDownSelect=Rr,w.GenusTabs=Na,w.GenusWizard=Ka,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});