genus-ui 1.42.3 → 1.45.3

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(v,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("lit"),require("lit/decorators.js")):typeof define=="function"&&define.amd?define(["exports","lit","lit/decorators.js"],b):(v=typeof globalThis<"u"?globalThis:v||self,b(v.index={},v.lit,v.decorators_js))})(this,function(v,b,w){"use strict";var mf=Object.defineProperty;var bf=(v,b,w)=>b in v?mf(v,b,{enumerable:!0,configurable:!0,writable:!0,value:w}):v[b]=w;var T=(v,b,w)=>(bf(v,typeof b!="symbol"?b+"":b,w),w);const ra=b.css`
1
+ (function(M,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("lit"),require("lit/decorators.js")):typeof define=="function"&&define.amd?define(["exports","lit","lit/decorators.js"],b):(M=typeof globalThis<"u"?globalThis:M||self,b(M.index={},M.lit,M.decorators_js))})(this,function(M,b,v){"use strict";var If=Object.defineProperty;var Af=(M,b,v)=>b in M?If(M,b,{enumerable:!0,configurable:!0,writable:!0,value:v}):M[b]=v;var T=(M,b,v)=>(Af(M,typeof b!="symbol"?b+"":b,v),v);const la=b.css`
2
2
  * { box-sizing: border-box; }
3
- `,la=b.css`
3
+ `,ca=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
- `,ca=b.css`
14
+ `,ha=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
- `,ha=b.css`
21
+ `,da=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
- `,da=b.css`
39
+ `,ua=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 ua=Object.defineProperty,fa=Object.getOwnPropertyDescriptor,le=(i,t,e,s)=>{for(var n=s>1?void 0:s?fa(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&ua(t,e,n),n};v.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 fa=Object.defineProperty,ga=Object.getOwnPropertyDescriptor,ce=(i,t,e,s)=>{for(var n=s>1?void 0:s?ga(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&fa(t,e,n),n};M.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
- `}},v.GenusTextArea.styles=[ra,la,ca,da,ha],le([w.property({attribute:"label-text"})],v.GenusTextArea.prototype,"labelText",2),le([w.property({attribute:"input-value"})],v.GenusTextArea.prototype,"inputValue",2),le([w.property({attribute:"read-only",type:Boolean})],v.GenusTextArea.prototype,"readOnly",2),le([w.state()],v.GenusTextArea.prototype,"_targetInput",2),v.GenusTextArea=le([w.customElement("genus-textarea")],v.GenusTextArea);const ga=b.css`
62
+ `}},M.GenusTextArea.styles=[la,ca,ha,ua,da],ce([v.property({attribute:"label-text"})],M.GenusTextArea.prototype,"labelText",2),ce([v.property({attribute:"input-value"})],M.GenusTextArea.prototype,"inputValue",2),ce([v.property({attribute:"read-only",type:Boolean})],M.GenusTextArea.prototype,"readOnly",2),ce([v.state()],M.GenusTextArea.prototype,"_targetInput",2),M.GenusTextArea=ce([v.customElement("genus-textarea")],M.GenusTextArea);const pa=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);
@@ -93,14 +93,14 @@
93
93
  .input-control--without-icon { border-radius: var(--input-without-icon-border-radius, 0.375rem); }
94
94
 
95
95
  .date-control:hover { cursor: pointer; }
96
- `,pa=b.css`
96
+ `,ma=b.css`
97
97
  .input-label
98
98
  {
99
99
  color: var(--input-label-color, #213e70);
100
100
  justify-self: start;
101
101
  grid-area: il;
102
102
  }
103
- `,ma=b.css`
103
+ `,ba=b.css`
104
104
  .icon
105
105
  {
106
106
  width: 1.5625rem;
@@ -110,7 +110,7 @@
110
110
  .input-icon {}
111
111
 
112
112
  .year-change-icon { pointer-events: none; }
113
- `,ba=b.css`
113
+ `,xa=b.css`
114
114
  input[type='text'], input[type='email'], input[type='password'], input[type='date']
115
115
  {
116
116
  font-family: var(--textbox-font-family, 'Sofia Pro');
@@ -158,7 +158,7 @@
158
158
  .current-date { font-family: var(--current-date-font-family, 'Sofia Pro Semi'); }
159
159
 
160
160
  .date--selected { font-family: var(--current-date-font-family, 'Sofia Pro Semi'); }
161
- `,xa=b.css`
161
+ `,ya=b.css`
162
162
  .form-field
163
163
  {
164
164
  display: grid;
@@ -215,7 +215,7 @@
215
215
  grid-template-columns: repeat(7, 2.5rem);
216
216
  grid-auto-rows: 2.5rem;
217
217
  }
218
- `,ya=b.css`
218
+ `,Ma=b.css`
219
219
  .icon-container
220
220
  {
221
221
  display: flex;
@@ -243,7 +243,7 @@
243
243
  align-items: center;
244
244
  column-gap: 0.8rem;
245
245
  }
246
- `,Ma=b.css`
246
+ `,wa=b.css`
247
247
  * { box-sizing: border-box; }
248
248
 
249
249
  .icon-container
@@ -343,7 +343,7 @@
343
343
  place-items: center;
344
344
  cursor: pointer;
345
345
  }
346
- `,As="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxzdHlsZT4NCiAgICAgICAgI1Byb2ZpbGUgeyBmaWxsOiAjMjAzZTcwOyB9DQogICAgPC9zdHlsZT4NCg0KICAgIDx0aXRsZT5JY29ubHkvQm9sZC9Qcm9maWxlPC90aXRsZT4NCiAgICA8ZyBpZD0iSWNvbmx5L0JvbGQvUHJvZmlsZSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+DQogICAgICAgIDxnIGlkPSJQcm9maWxlIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0LjAwMDAwMCwgMi4wMDAwMDApIiBmaWxsPSIjMDAwMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iPg0KICAgICAgICAgICAgPHBhdGggZD0iTTgsMTMuMTczOTMxNyBDMTIuMzM4NjI3LDEzLjE3MzkzMTcgMTYsMTMuODc4OTM4OCAxNiwxNi41OTg5NjYgQzE2LDE5LjMxOTk5MzIgMTIuMzE0NjE4LDIwIDgsMjAgQzMuNjYyMzczMzksMjAgNS42ODQzNDE4OWUtMTQsMTkuMjk0OTkyOSA1LjY4NDM0MTg5ZS0xNCwxNi41NzQ5NjU3IEM1LjY4NDM0MTg5ZS0xNCwxMy44NTM5Mzg1IDMuNjg1MzgyMDIsMTMuMTczOTMxNyA4LDEzLjE3MzkzMTcgWiBNOCwtNi4wMzk2MTMyNWUtMTQgQzEwLjkzOTEwMjIsLTYuMDM5NjEzMjVlLTE0IDEzLjI5Mzk4NTIsMi4zNTQwMjM1NCAxMy4yOTM5ODUyLDUuMjkxMDUyOTEgQzEzLjI5Mzk4NTIsOC4yMjgwODIyOCAxMC45MzkxMDIyLDEwLjU4MzEwNTggOCwxMC41ODMxMDU4IEM1LjA2MTg5ODIxLDEwLjU4MzEwNTggMi43MDYwMTQ3Niw4LjIyODA4MjI4IDIuNzA2MDE0NzYsNS4yOTEwNTI5MSBDMi43MDYwMTQ3NiwyLjM1NDAyMzU0IDUuMDYxODk4MjEsLTYuMDM5NjEzMjVlLTE0IDgsLTYuMDM5NjEzMjVlLTE0IFoiPjwvcGF0aD4NCiAgICAgICAgPC9nPg0KICAgIDwvZz4NCjwvc3ZnPg==",wa="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxzdHlsZT4NCiAgICAgICAgI1Bhc3N3b3JkIHsgZmlsbDogIzIwM2U3MDsgfQ0KICAgIDwvc3R5bGU+DQogICAgDQogICAgPHRpdGxlPkljb25seS9Cb2xkL1Bhc3N3b3JkPC90aXRsZT4NCiAgICA8ZyBpZD0iSWNvbmx5L0JvbGQvUGFzc3dvcmQiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPg0KICAgICAgICA8ZyBpZD0iUGFzc3dvcmQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEuOTk5NzAwLCAxLjk5OTIwMCkiIGZpbGw9IiMwMDAwMDAiIGZpbGwtcnVsZT0ibm9uemVybyI+DQogICAgICAgICAgICA8cGF0aCBkPSJNMTQuMzM1LDAgQzE3LjcyMywwIDIwLDIuMzc4IDIwLDUuOTE3IEwyMCw1LjkxNyBMMjAsMTQuMDg0IEMyMCwxNy42MjMgMTcuNzIzLDIwIDE0LjMzNCwyMCBMMTQuMzM0LDIwIEw1LjY2NiwyMCBDMi4yNzcsMjAgMCwxNy42MjMgMCwxNC4wODQgTDAsMTQuMDg0IEwwLDUuOTE3IEMwLDIuMzc4IDIuMjc3LDAgNS42NjYsMCBMNS42NjYsMCBaIE02Ljg0MSw3LjM5OSBDNS40MDcsNy4zOTkgNC4yNCw4LjU2NiA0LjI0LDEwIEM0LjI0LDExLjQzNSA1LjQwNywxMi42MDIgNi44NDEsMTIuNjAyIEM4LjAxMywxMi42MDIgOC45OTUsMTEuODE4IDkuMzE5LDEwLjc1IEw5LjMxOSwxMC43NSBMMTEuNDMxLDEwLjc1IEwxMS40MzEsMTEuODUyIEMxMS40MzEsMTIuMjY2IDExLjc2NywxMi42MDIgMTIuMTgxLDEyLjYwMiBDMTIuNTk1LDEyLjYwMiAxMi45MzEsMTIuMjY2IDEyLjkzMSwxMS44NTIgTDEyLjkzMSwxMS44NTIgTDEyLjkzMSwxMC43NSBMMTQuMjYxLDEwLjc1IEwxNC4yNjEsMTEuODUyIEMxNC4yNjEsMTIuMjY2IDE0LjU5NywxMi42MDIgMTUuMDExLDEyLjYwMiBDMTUuNDI1LDEyLjYwMiAxNS43NjEsMTIuMjY2IDE1Ljc2MSwxMS44NTIgTDE1Ljc2MSwxMS44NTIgTDE1Ljc2MSwxMCBDMTUuNzYxLDkuNTg2IDE1LjQyNSw5LjI1IDE1LjAxMSw5LjI1IEwxNS4wMTEsOS4yNSBMOS4zMTksOS4yNSBDOC45OTUsOC4xODMgOC4wMTMsNy4zOTkgNi44NDEsNy4zOTkgWiBNNi44NDExLDguODk4OSBDNy40NDgxLDguODk4OSA3Ljk0MzEsOS4zOTI5IDcuOTQzMSwxMC4wMDA5IEM3Ljk0MzEsMTAuNjA3OSA3LjQ0ODEsMTEuMTAxOSA2Ljg0MTEsMTEuMTAxOSBDNi4yMzQxLDExLjEwMTkgNS43MzkxLDEwLjYwNzkgNS43MzkxLDEwLjAwMDkgQzUuNzM5MSw5LjM5MjkgNi4yMzQxLDguODk4OSA2Ljg0MTEsOC44OTg5IFoiPjwvcGF0aD4NCiAgICAgICAgPC9nPg0KICAgIDwvZz4NCjwvc3ZnPg==",va="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxzdHlsZT4NCiAgICAgICAgI01lc3NhZ2UgeyBmaWxsOiAjMjAzZTcwOyB9DQogICAgPC9zdHlsZT4NCiAgICANCiAgICA8dGl0bGU+SWNvbmx5L0JvbGQvTWVzc2FnZTwvdGl0bGU+DQogICAgPGcgaWQ9Ikljb25seS9Cb2xkL01lc3NhZ2UiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPg0KICAgICAgICA8ZyBpZD0iTWVzc2FnZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMi4wMDA0MDAsIDMuMDAwMDAwKSIgZmlsbD0iIzAwMDAwMCIgZmlsbC1ydWxlPSJub256ZXJvIj4NCiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNC45MzksMCBDMTYuMjgsMCAxNy41NywwLjUzIDE4LjUxOSwxLjQ4MSBDMTkuNDY5LDIuNDMgMjAsMy43MSAyMCw1LjA1IEwyMCw1LjA1IEwyMCwxMi45NSBDMjAsMTUuNzQgMTcuNzMsMTggMTQuOTM5LDE4IEwxNC45MzksMTggTDUuMDYsMTggQzIuMjY5LDE4IDAsMTUuNzQgMCwxMi45NSBMMCwxMi45NSBMMCw1LjA1IEMwLDIuMjYgMi4yNTksMCA1LjA2LDAgTDUuMDYsMCBaIE0xNi4wNyw1LjIgQzE1Ljg2LDUuMTg5IDE1LjY2LDUuMjYgMTUuNTA5LDUuNCBMMTUuNTA5LDUuNCBMMTEsOSBDMTAuNDIsOS40ODEgOS41ODksOS40ODEgOSw5IEw5LDkgTDQuNSw1LjQgQzQuMTg5LDUuMTcgMy43NTksNS4yIDMuNSw1LjQ3IEMzLjIzLDUuNzQgMy4yLDYuMTcgMy40MjksNi40NyBMMy40MjksNi40NyBMMy41Niw2LjYgTDguMTEsMTAuMTUgQzguNjcsMTAuNTkgOS4zNDksMTAuODMgMTAuMDYsMTAuODMgQzEwLjc2OSwxMC44MyAxMS40NiwxMC41OSAxMi4wMTksMTAuMTUgTDEyLjAxOSwxMC4xNSBMMTYuNTMsNi41NCBMMTYuNjEsNi40NiBDMTYuODQ5LDYuMTcgMTYuODQ5LDUuNzUgMTYuNTk5LDUuNDYgQzE2LjQ2LDUuMzExIDE2LjI2OSw1LjIyIDE2LjA3LDUuMiBaIj48L3BhdGg+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=",Ia="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxzdHlsZT4NCiAgICAgICAgI0NhbGVuZGFyIHsgZmlsbDogIzIwM2U3MDsgfQ0KICAgIDwvc3R5bGU+DQogICAgDQogICAgPHRpdGxlPkljb25seS9Cb2xkL0NhbGVuZGFyPC90aXRsZT4NCiAgICA8ZyBpZD0iSWNvbmx5L0JvbGQvQ2FsZW5kYXIiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPg0KICAgICAgICA8ZyBpZD0iQ2FsZW5kYXIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDMuMDAwMDAwLCAyLjAwMDAwMCkiIGZpbGw9IiMwMDAwMDAiIGZpbGwtcnVsZT0ibm9uemVybyI+DQogICAgICAgICAgICA8cGF0aCBkPSJNMTIuNjQ5NjU4MywyLjI1NTI0NDIyZS0wNiBDMTMuMDc0MjA5MywtMC4wMDA5OTQ5Nzg2ODcgMTMuNDA5OTAwOCwwLjMyODgzOTgzIDEzLjQxMDg4ODEsMC43Njg2MTk1NzUgTDEzLjQxMDg4ODEsMC43Njg2MTk1NzUgTDEzLjQxMTg3NTQsMS41MTgyNDQxNCBDMTYuMTY2NTIwMywxLjczNDEzNjAxIDE3Ljk4NjE2NTYsMy42MTExOTU5MiAxNy45ODkxMjc2LDYuNDg5NzU0MjUgTDE3Ljk4OTEyNzYsNi40ODk3NTQyNSBMMTcuOTk5OTk0MSwxNC45MTU1MzQ0IEMxOC4wMDM5Mzc1LDE4LjA1Mzk2MjUgMTYuMDMyMjQzNywxOS45ODQ5OTU0IDEyLjg3MTgwNzEsMTkuOTg5OTkyOSBMMTIuODcxODA3MSwxOS45ODk5OTI5IEw1LjE1MTg5MDI1LDIwLjAwMDAwMjMgQzIuMDExMjAwMiwyMC4wMDM5ODU5IDAuMDE0ODIzMTk1NiwxOC4wMjY5NzYxIDAuMDEwODczODg0LDE0Ljg3OTU1MjQgTDAuMDEwODczODg0LDE0Ljg3OTU1MjQgTDYuNjI3Mzk2NTVlLTA2LDYuNTUyNzIyNzIgQy0wLjAwMzkzNjAzNDQ1LDMuNjU1MTczOSAxLjc1MTUzMjk3LDEuNzgzMTExNDkgNC41MDYxNzc4LDEuNTMwMjM4MTMgTDQuNTA2MTc3OCwxLjUzMDIzODEzIEw0LjUwNTE5MDQ3LDAuNzgwNjEzNTY4IEM0LjUwNDIwMzE0LDAuMzQwODMzODIzIDQuODMwMDIxMzUsMC4wMDk5OTk1MTQ5MyA1LjI2NDQ0NTYzLDAuMDA5OTk5NTE0OTMgQzUuNjk4ODY5OSwwLjAwOTAwMDAxNTUxIDYuMDI0Njg4MTEsMC4zMzg4MzQ4MjQgNi4wMjU2NzU0MywwLjc3ODYxNDU2OSBMNi4wMjU2NzU0MywwLjc3ODYxNDU2OSBMNi4wMjY2NjI3NiwxLjQ3ODI2NDE2IEwxMS44OTEzOTA1LDEuNDcwMjY4MTcgTDExLjg5MDQwMzEsMC43NzA2MTg1NzQgQzExLjg4OTQxNTgsMC4zMzA4Mzg4MjkgMTIuMjE1MjM0LDAuMDAxMDA0MDIwMTUgMTIuNjQ5NjU4MywyLjI1NTI0NDIyZS0wNiBaIE0xMy4wNTI0ODgxLDE0LjE5MTg5NjggTDEzLjA0MjYxNDgsMTQuMTkxODk2OCBDMTIuNTg4NDQ0LDE0LjIwMjg5MTMgMTIuMjI0MTIsMTQuNTgzNzAwNiAxMi4yMzM5OTMzLDE1LjA0MzQ3MDMgQzEyLjIzNDk4MDYsMTUuNTAzMjQgMTIuNjAxMjc5MiwxNS44ODIwNTAzIDEzLjA1NTQ1MDEsMTUuODkyMDQ1MyBDMTMuNTE4NTA2OCwxNS44OTEwNDU4IDEzLjg5MzY5MTQsMTUuNTEwMjM2NSAxMy44OTI3MDYxLDE1LjA0MDQ3MTggQzEzLjg5MjcwNjEsMTQuNTcwNzA3MSAxMy41MTY1MzIyLDE0LjE5MTg5NjggMTMuMDUyNDg4MSwxNC4xOTE4OTY4IEwxMy4wNTI0ODgxLDE0LjE5MTg5NjggWiBNNC45MTY5MDYyMSwxNC4xOTI4OTQxIEM0LjQ2MjczNTM3LDE0LjIxMjg4NjMgNC4xMDcyOTczMywxNC41OTM2OTU2IDQuMTA4MjgyNjEsMTUuMDUzNDY1MyBDNC4xMjkwMTg1NCwxNS41MTMyMzUgNC41MDQyMDMxNCwxNS44NzMwNTQ4IDQuOTU4MzczOTgsMTUuODUyMDY1MyBDNS40MDM2NTg4NiwxNS44MzIwNzUzIDUuNzU4MTA5NTcsMTUuNDUxMjY2MSA1LjczNzM3NTY5LDE0Ljk5MTQ5NjMgQzUuNzI3NTAyNDEsMTQuNTQxNzIxNiA1LjM2MTIwMzc2LDE0LjE5MTg5NjggNC45MTY5MDYyMSwxNC4xOTI4OTQxIFogTTguOTg0Njk3MTQsMTQuMTg3ODk2NyBDOC41MzA1MjYzMSwxNC4yMDg4ODgzIDguMTc2MDc1NiwxNC41ODg2OTgxIDguMTc2MDc1NiwxNS4wNDg0Njc4IEM4LjE5NjgwOTQ4LDE1LjUwODIzNzUgOC41NzE5OTQwOCwxNS44NjcwNTc4IDkuMDI2MTY0OTEsMTUuODQ3MDY3OCBDOS40NzA0NjI0NywxNS44MjYwNzgzIDkuODI1OTAwNTEsMTUuNDQ2MjY4NiA5LjgwNTE2NjYzLDE0Ljk4NTQ5OTMgQzkuNzk1MjkzMzUsMTQuNTM2NzI0MSA5LjQyODk5NDcsMTQuMTg2ODk5MyA4Ljk4NDY5NzE0LDE0LjE4Nzg5NjcgWiBNNC45MTE5Njk1NywxMC41OTQ2OTYyIEM0LjQ1Nzc5ODczLDEwLjYxNDY4ODQgNC4xMDMzNDgwMiwxMC45OTU0OTc2IDQuMTA0MzMzMjksMTEuNDU1MjY3NCBDNC4xMjQwODE5LDExLjkxNTAzNzEgNC41MDAyNTM4MywxMi4yNzQ4NTY5IDQuOTU0NDI0NjcsMTIuMjUzODY3NCBDNS4zOTg3MjIyMiwxMi4yMzM4Nzc0IDUuNzUzMTcyOTQsMTEuODUzMDY4MSA1LjczMjQzOTA1LDExLjM5MzI5ODQgQzUuNzIyNTY1NzcsMTAuOTQzNTIzNyA1LjM1NzI1NDQ1LDEwLjU5MzY5ODkgNC45MTE5Njk1NywxMC41OTQ2OTYyIFogTTguOTgwNzQ3ODMsMTAuNTU5NzEzOCBDOC41MjY1NzcsMTAuNTc5NzA1OSA4LjE3MTEzODk2LDEwLjk2MDUxNTIgOC4xNzIxMjQyMywxMS40MjAyODQ5IEM4LjE5MTg3Mjg0LDExLjg4MDA1NDYgOC41NjgwNDQ3NywxMi4yMzg4NzQ5IDkuMDIyMjE1NiwxMi4yMTg4ODQ5IEM5LjQ2NjUxMzE2LDEyLjE5Nzg5NTQgOS44MjA5NjM4NywxMS44MTgwODU3IDkuODAxMjE3MzEsMTEuMzU4MzE1OSBDOS43OTAzNTY3MSwxMC45MDg1NDEyIDkuNDI1MDQ1MzksMTAuNTU4NzE2NCA4Ljk4MDc0NzgzLDEwLjU1OTcxMzggWiBNMTMuMDQ4NTM4OCwxMC41NjQ3MTEzIEMxMi41OTQzNjc5LDEwLjU3NDcwODQgMTIuMjM4OTI5OSwxMC45NDQ1MjMyIDEyLjIzOTkxNTIsMTEuNDA0MjkyOSBMMTIuMjM5OTE1MiwxMS40MDQyOTI5IEwxMi4yMzk5MTUyLDExLjQxNTI4NzQgQzEyLjI0OTc5MDUsMTEuODc1MDU3MSAxMi42MjQ5NzUxLDEyLjIyMzg4MjQgMTMuMDgwMTMzMywxMi4yMTM4ODc0IEMxMy41MjQ0MzA4LDEyLjIwMjg5MjkgMTMuODc4ODgxNSwxMS44MjIwODM3IDEzLjg2OTAwODMsMTEuMzYyMzEzOSBDMTMuODQ4Mjc0NCwxMC45MjI1MzQyIDEzLjQ5MTg0OSwxMC41NjM3MTM5IDEzLjA0ODUzODgsMTAuNTY0NzExMyBaIE0xMS44OTMzNjUxLDMuMDA5NDk3MjcgTDYuMDI4NjM3NDIsMy4wMTc0OTMyNyBMNi4wMjk2MjQ3NSwzLjgyNjA4ODMgQzYuMDI5NjI0NzUsNC4yNTY4NzI1NSA1LjcwNDc5Mzg3LDQuNTk2NzAyMzUgNS4yNzAzNjk1OSw0LjU5NjcwMjM1IEM0LjgzNTk0NTMyLDQuNTk3NzAxODUgNC41MDkxMzk3OCw0LjI1ODg3MTU1IDQuNTA5MTM5NzgsMy44MjgwODczIEw0LjUwOTEzOTc4LDMuODI4MDg3MyBMNC41MDgxNTI0NiwzLjA1ODQ3Mjc1IEMyLjU4Mjg2MzA2LDMuMjUxMzc2MTMgMS41MTc1MzYyNiw0LjM4MjgwOTQ4IDEuNTIwNDkyMDgsNi41NTA3MjM3MiBMMS41MjA0OTIwOCw2LjU1MDcyMzcyIEwxLjUyMTQ4NTU3LDYuODYxNTY4MDQgTDE2LjQ2OTYyOTksNi44NDE1NzgwNSBMMTYuNDY5NjI5OSw2LjQ5MTc1MzI1IEMxNi40MjcxNzQ4LDQuMzQyODI5NSAxNS4zNDkwMTI4LDMuMjE1Mzk0MTUgMTMuNDEzODUwMSwzLjA0NzQ3ODI1IEwxMy40MTM4NTAxLDMuMDQ3NDc4MjUgTDEzLjQxNDgzNzQsMy44MTcwOTI4MSBDMTMuNDE0ODM3NCw0LjI0Njg3NzU2IDEzLjA4MDEzMzMsNC41ODc3MDY4NiAxMi42NTU1ODIzLDQuNTg3NzA2ODYgQzEyLjIyMTE1OCw0LjU4ODcwNjM2IDExLjg5NDM1MjUsNC4yNDg4NzY1NSAxMS44OTQzNTI1LDMuODE5MDkxOCBMMTEuODk0MzUyNSwzLjgxOTA5MTggTDExLjg5MzM2NTEsMy4wMDk0OTcyNyBaIj48L3BhdGg+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=",Aa="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxzdHlsZT4NCiAgICAgICAgI1NlYXJjaCB7IHN0cm9rZTogI2ZkYzU0YTsgfQ0KICAgIDwvc3R5bGU+DQogICAgDQogICAgPHRpdGxlPkljb25seS9MaWdodC9TZWFyY2g8L3RpdGxlPg0KICAgIDxnIGlkPSJJY29ubHkvTGlnaHQvU2VhcmNoIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPg0KICAgICAgICA8ZyBpZD0iU2VhcmNoIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyLjAwMDAwMCwgMi4wMDAwMDApIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS13aWR0aD0iMS41Ij4NCiAgICAgICAgICAgIDxjaXJjbGUgaWQ9IkVsbGlwc2VfNzM5IiBjeD0iOS43NjY1OTA0NCIgY3k9IjkuNzY2NTkwNDQiIHI9IjguOTg4NTU4NCI+PC9jaXJjbGU+DQogICAgICAgICAgICA8bGluZSB4MT0iMTYuMDE4MzA2NyIgeTE9IjE2LjQ4NTEyNTkiIHgyPSIxOS41NDIzMzQyIiB5Mj0iMjAuMDAwMDAwMSIgaWQ9IkxpbmVfMTgxIj48L2xpbmU+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=",Ta="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxzdHlsZT4NCiAgICAgICAgI0Fycm93LS0tTGVmdC0yIHsgc3Ryb2tlOiAjMWU5ZGZjOyB9DQogICAgPC9zdHlsZT4NCiAgICANCiAgICA8dGl0bGU+SWNvbmx5L0xpZ2h0L0Fycm93IC0gTGVmdCAyPC90aXRsZT4NCiAgICA8ZyBpZD0iSWNvbmx5L0xpZ2h0L0Fycm93LS0tTGVmdC0yIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPg0KICAgICAgICA8ZyBpZD0iQXJyb3ctLS1MZWZ0LTIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyLjAwMDAwMCwgMTIuMDAwMDAwKSByb3RhdGUoLTI3MC4wMDAwMDApIHRyYW5zbGF0ZSgtMTIuMDAwMDAwLCAtMTIuMDAwMDAwKSB0cmFuc2xhdGUoNS4wMDAwMDAsIDguNTAwMDAwKSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2Utd2lkdGg9IjEuNSI+DQogICAgICAgICAgICA8cG9seWxpbmUgaWQ9IlN0cm9rZS0xIiBwb2ludHM9IjE0IDAgNyA3IDAgMCI+PC9wb2x5bGluZT4NCiAgICAgICAgPC9nPg0KICAgIDwvZz4NCjwvc3ZnPg==",Da="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxzdHlsZT4NCiAgICAgICAgI0Fycm93LS0tUmlnaHQtMiB7IHN0cm9rZTogIzFlOWRmYzsgfQ0KICAgIDwvc3R5bGU+DQogICAgDQogICAgPHRpdGxlPkljb25seS9MaWdodC9BcnJvdyAtIFJpZ2h0IDI8L3RpdGxlPg0KICAgIDxnIGlkPSJJY29ubHkvTGlnaHQvQXJyb3ctLS1SaWdodC0yIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPg0KICAgICAgICA8ZyBpZD0iQXJyb3ctLS1SaWdodC0yIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMi4wMDAwMDAsIDEyLjAwMDAwMCkgcm90YXRlKC05MC4wMDAwMDApIHRyYW5zbGF0ZSgtMTIuMDAwMDAwLCAtMTIuMDAwMDAwKSB0cmFuc2xhdGUoNS4wMDAwMDAsIDguNTAwMDAwKSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2Utd2lkdGg9IjEuNSI+DQogICAgICAgICAgICA8cG9seWxpbmUgaWQ9IlN0cm9rZS0xIiBwb2ludHM9IjE0IDAgNyA3IDAgMCI+PC9wb2x5bGluZT4NCiAgICAgICAgPC9nPg0KICAgIDwvZz4NCjwvc3ZnPg==";var za=Object.defineProperty,ka=Object.getOwnPropertyDescriptor,Q=(i,t,e,s)=>{for(var n=s>1?void 0:s?ka(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&za(t,e,n),n};v.GenusTextBox=class extends b.LitElement{constructor(){super(),this.labelText="",this.inputValue="",this.inputType="text",this.inputName="",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.dispatchEvent(new CustomEvent("selected",{detail:{chosenDate:e,formattedDate:this.inputValue}})),this._showCalenderCssClass=""},this._generateDays=(t,e)=>{const s=[31,this._getFebDays(e),31,30,31,30,31,31,30,31,30,31];let n=new Date(e,t,1),o=document.createElement("div");o.classList.add("dates");for(let a=0;a<=s[t]+n.getDay()-1;a++){let r=document.createElement("div");a>=n.getDay()&&(r.classList.add("date"),r.innerHTML=(a-n.getDay()+1).toString(),a-n.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 s;return this.withoutIcon?s=b.html`
346
+ `,Ts="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxzdHlsZT4NCiAgICAgICAgI1Byb2ZpbGUgeyBmaWxsOiAjMjAzZTcwOyB9DQogICAgPC9zdHlsZT4NCg0KICAgIDx0aXRsZT5JY29ubHkvQm9sZC9Qcm9maWxlPC90aXRsZT4NCiAgICA8ZyBpZD0iSWNvbmx5L0JvbGQvUHJvZmlsZSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+DQogICAgICAgIDxnIGlkPSJQcm9maWxlIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0LjAwMDAwMCwgMi4wMDAwMDApIiBmaWxsPSIjMDAwMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iPg0KICAgICAgICAgICAgPHBhdGggZD0iTTgsMTMuMTczOTMxNyBDMTIuMzM4NjI3LDEzLjE3MzkzMTcgMTYsMTMuODc4OTM4OCAxNiwxNi41OTg5NjYgQzE2LDE5LjMxOTk5MzIgMTIuMzE0NjE4LDIwIDgsMjAgQzMuNjYyMzczMzksMjAgNS42ODQzNDE4OWUtMTQsMTkuMjk0OTkyOSA1LjY4NDM0MTg5ZS0xNCwxNi41NzQ5NjU3IEM1LjY4NDM0MTg5ZS0xNCwxMy44NTM5Mzg1IDMuNjg1MzgyMDIsMTMuMTczOTMxNyA4LDEzLjE3MzkzMTcgWiBNOCwtNi4wMzk2MTMyNWUtMTQgQzEwLjkzOTEwMjIsLTYuMDM5NjEzMjVlLTE0IDEzLjI5Mzk4NTIsMi4zNTQwMjM1NCAxMy4yOTM5ODUyLDUuMjkxMDUyOTEgQzEzLjI5Mzk4NTIsOC4yMjgwODIyOCAxMC45MzkxMDIyLDEwLjU4MzEwNTggOCwxMC41ODMxMDU4IEM1LjA2MTg5ODIxLDEwLjU4MzEwNTggMi43MDYwMTQ3Niw4LjIyODA4MjI4IDIuNzA2MDE0NzYsNS4yOTEwNTI5MSBDMi43MDYwMTQ3NiwyLjM1NDAyMzU0IDUuMDYxODk4MjEsLTYuMDM5NjEzMjVlLTE0IDgsLTYuMDM5NjEzMjVlLTE0IFoiPjwvcGF0aD4NCiAgICAgICAgPC9nPg0KICAgIDwvZz4NCjwvc3ZnPg==",va="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxzdHlsZT4NCiAgICAgICAgI1Bhc3N3b3JkIHsgZmlsbDogIzIwM2U3MDsgfQ0KICAgIDwvc3R5bGU+DQogICAgDQogICAgPHRpdGxlPkljb25seS9Cb2xkL1Bhc3N3b3JkPC90aXRsZT4NCiAgICA8ZyBpZD0iSWNvbmx5L0JvbGQvUGFzc3dvcmQiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPg0KICAgICAgICA8ZyBpZD0iUGFzc3dvcmQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEuOTk5NzAwLCAxLjk5OTIwMCkiIGZpbGw9IiMwMDAwMDAiIGZpbGwtcnVsZT0ibm9uemVybyI+DQogICAgICAgICAgICA8cGF0aCBkPSJNMTQuMzM1LDAgQzE3LjcyMywwIDIwLDIuMzc4IDIwLDUuOTE3IEwyMCw1LjkxNyBMMjAsMTQuMDg0IEMyMCwxNy42MjMgMTcuNzIzLDIwIDE0LjMzNCwyMCBMMTQuMzM0LDIwIEw1LjY2NiwyMCBDMi4yNzcsMjAgMCwxNy42MjMgMCwxNC4wODQgTDAsMTQuMDg0IEwwLDUuOTE3IEMwLDIuMzc4IDIuMjc3LDAgNS42NjYsMCBMNS42NjYsMCBaIE02Ljg0MSw3LjM5OSBDNS40MDcsNy4zOTkgNC4yNCw4LjU2NiA0LjI0LDEwIEM0LjI0LDExLjQzNSA1LjQwNywxMi42MDIgNi44NDEsMTIuNjAyIEM4LjAxMywxMi42MDIgOC45OTUsMTEuODE4IDkuMzE5LDEwLjc1IEw5LjMxOSwxMC43NSBMMTEuNDMxLDEwLjc1IEwxMS40MzEsMTEuODUyIEMxMS40MzEsMTIuMjY2IDExLjc2NywxMi42MDIgMTIuMTgxLDEyLjYwMiBDMTIuNTk1LDEyLjYwMiAxMi45MzEsMTIuMjY2IDEyLjkzMSwxMS44NTIgTDEyLjkzMSwxMS44NTIgTDEyLjkzMSwxMC43NSBMMTQuMjYxLDEwLjc1IEwxNC4yNjEsMTEuODUyIEMxNC4yNjEsMTIuMjY2IDE0LjU5NywxMi42MDIgMTUuMDExLDEyLjYwMiBDMTUuNDI1LDEyLjYwMiAxNS43NjEsMTIuMjY2IDE1Ljc2MSwxMS44NTIgTDE1Ljc2MSwxMS44NTIgTDE1Ljc2MSwxMCBDMTUuNzYxLDkuNTg2IDE1LjQyNSw5LjI1IDE1LjAxMSw5LjI1IEwxNS4wMTEsOS4yNSBMOS4zMTksOS4yNSBDOC45OTUsOC4xODMgOC4wMTMsNy4zOTkgNi44NDEsNy4zOTkgWiBNNi44NDExLDguODk4OSBDNy40NDgxLDguODk4OSA3Ljk0MzEsOS4zOTI5IDcuOTQzMSwxMC4wMDA5IEM3Ljk0MzEsMTAuNjA3OSA3LjQ0ODEsMTEuMTAxOSA2Ljg0MTEsMTEuMTAxOSBDNi4yMzQxLDExLjEwMTkgNS43MzkxLDEwLjYwNzkgNS43MzkxLDEwLjAwMDkgQzUuNzM5MSw5LjM5MjkgNi4yMzQxLDguODk4OSA2Ljg0MTEsOC44OTg5IFoiPjwvcGF0aD4NCiAgICAgICAgPC9nPg0KICAgIDwvZz4NCjwvc3ZnPg==",Ia="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxzdHlsZT4NCiAgICAgICAgI01lc3NhZ2UgeyBmaWxsOiAjMjAzZTcwOyB9DQogICAgPC9zdHlsZT4NCiAgICANCiAgICA8dGl0bGU+SWNvbmx5L0JvbGQvTWVzc2FnZTwvdGl0bGU+DQogICAgPGcgaWQ9Ikljb25seS9Cb2xkL01lc3NhZ2UiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPg0KICAgICAgICA8ZyBpZD0iTWVzc2FnZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMi4wMDA0MDAsIDMuMDAwMDAwKSIgZmlsbD0iIzAwMDAwMCIgZmlsbC1ydWxlPSJub256ZXJvIj4NCiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNC45MzksMCBDMTYuMjgsMCAxNy41NywwLjUzIDE4LjUxOSwxLjQ4MSBDMTkuNDY5LDIuNDMgMjAsMy43MSAyMCw1LjA1IEwyMCw1LjA1IEwyMCwxMi45NSBDMjAsMTUuNzQgMTcuNzMsMTggMTQuOTM5LDE4IEwxNC45MzksMTggTDUuMDYsMTggQzIuMjY5LDE4IDAsMTUuNzQgMCwxMi45NSBMMCwxMi45NSBMMCw1LjA1IEMwLDIuMjYgMi4yNTksMCA1LjA2LDAgTDUuMDYsMCBaIE0xNi4wNyw1LjIgQzE1Ljg2LDUuMTg5IDE1LjY2LDUuMjYgMTUuNTA5LDUuNCBMMTUuNTA5LDUuNCBMMTEsOSBDMTAuNDIsOS40ODEgOS41ODksOS40ODEgOSw5IEw5LDkgTDQuNSw1LjQgQzQuMTg5LDUuMTcgMy43NTksNS4yIDMuNSw1LjQ3IEMzLjIzLDUuNzQgMy4yLDYuMTcgMy40MjksNi40NyBMMy40MjksNi40NyBMMy41Niw2LjYgTDguMTEsMTAuMTUgQzguNjcsMTAuNTkgOS4zNDksMTAuODMgMTAuMDYsMTAuODMgQzEwLjc2OSwxMC44MyAxMS40NiwxMC41OSAxMi4wMTksMTAuMTUgTDEyLjAxOSwxMC4xNSBMMTYuNTMsNi41NCBMMTYuNjEsNi40NiBDMTYuODQ5LDYuMTcgMTYuODQ5LDUuNzUgMTYuNTk5LDUuNDYgQzE2LjQ2LDUuMzExIDE2LjI2OSw1LjIyIDE2LjA3LDUuMiBaIj48L3BhdGg+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=",Aa="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxzdHlsZT4NCiAgICAgICAgI0NhbGVuZGFyIHsgZmlsbDogIzIwM2U3MDsgfQ0KICAgIDwvc3R5bGU+DQogICAgDQogICAgPHRpdGxlPkljb25seS9Cb2xkL0NhbGVuZGFyPC90aXRsZT4NCiAgICA8ZyBpZD0iSWNvbmx5L0JvbGQvQ2FsZW5kYXIiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPg0KICAgICAgICA8ZyBpZD0iQ2FsZW5kYXIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDMuMDAwMDAwLCAyLjAwMDAwMCkiIGZpbGw9IiMwMDAwMDAiIGZpbGwtcnVsZT0ibm9uemVybyI+DQogICAgICAgICAgICA8cGF0aCBkPSJNMTIuNjQ5NjU4MywyLjI1NTI0NDIyZS0wNiBDMTMuMDc0MjA5MywtMC4wMDA5OTQ5Nzg2ODcgMTMuNDA5OTAwOCwwLjMyODgzOTgzIDEzLjQxMDg4ODEsMC43Njg2MTk1NzUgTDEzLjQxMDg4ODEsMC43Njg2MTk1NzUgTDEzLjQxMTg3NTQsMS41MTgyNDQxNCBDMTYuMTY2NTIwMywxLjczNDEzNjAxIDE3Ljk4NjE2NTYsMy42MTExOTU5MiAxNy45ODkxMjc2LDYuNDg5NzU0MjUgTDE3Ljk4OTEyNzYsNi40ODk3NTQyNSBMMTcuOTk5OTk0MSwxNC45MTU1MzQ0IEMxOC4wMDM5Mzc1LDE4LjA1Mzk2MjUgMTYuMDMyMjQzNywxOS45ODQ5OTU0IDEyLjg3MTgwNzEsMTkuOTg5OTkyOSBMMTIuODcxODA3MSwxOS45ODk5OTI5IEw1LjE1MTg5MDI1LDIwLjAwMDAwMjMgQzIuMDExMjAwMiwyMC4wMDM5ODU5IDAuMDE0ODIzMTk1NiwxOC4wMjY5NzYxIDAuMDEwODczODg0LDE0Ljg3OTU1MjQgTDAuMDEwODczODg0LDE0Ljg3OTU1MjQgTDYuNjI3Mzk2NTVlLTA2LDYuNTUyNzIyNzIgQy0wLjAwMzkzNjAzNDQ1LDMuNjU1MTczOSAxLjc1MTUzMjk3LDEuNzgzMTExNDkgNC41MDYxNzc4LDEuNTMwMjM4MTMgTDQuNTA2MTc3OCwxLjUzMDIzODEzIEw0LjUwNTE5MDQ3LDAuNzgwNjEzNTY4IEM0LjUwNDIwMzE0LDAuMzQwODMzODIzIDQuODMwMDIxMzUsMC4wMDk5OTk1MTQ5MyA1LjI2NDQ0NTYzLDAuMDA5OTk5NTE0OTMgQzUuNjk4ODY5OSwwLjAwOTAwMDAxNTUxIDYuMDI0Njg4MTEsMC4zMzg4MzQ4MjQgNi4wMjU2NzU0MywwLjc3ODYxNDU2OSBMNi4wMjU2NzU0MywwLjc3ODYxNDU2OSBMNi4wMjY2NjI3NiwxLjQ3ODI2NDE2IEwxMS44OTEzOTA1LDEuNDcwMjY4MTcgTDExLjg5MDQwMzEsMC43NzA2MTg1NzQgQzExLjg4OTQxNTgsMC4zMzA4Mzg4MjkgMTIuMjE1MjM0LDAuMDAxMDA0MDIwMTUgMTIuNjQ5NjU4MywyLjI1NTI0NDIyZS0wNiBaIE0xMy4wNTI0ODgxLDE0LjE5MTg5NjggTDEzLjA0MjYxNDgsMTQuMTkxODk2OCBDMTIuNTg4NDQ0LDE0LjIwMjg5MTMgMTIuMjI0MTIsMTQuNTgzNzAwNiAxMi4yMzM5OTMzLDE1LjA0MzQ3MDMgQzEyLjIzNDk4MDYsMTUuNTAzMjQgMTIuNjAxMjc5MiwxNS44ODIwNTAzIDEzLjA1NTQ1MDEsMTUuODkyMDQ1MyBDMTMuNTE4NTA2OCwxNS44OTEwNDU4IDEzLjg5MzY5MTQsMTUuNTEwMjM2NSAxMy44OTI3MDYxLDE1LjA0MDQ3MTggQzEzLjg5MjcwNjEsMTQuNTcwNzA3MSAxMy41MTY1MzIyLDE0LjE5MTg5NjggMTMuMDUyNDg4MSwxNC4xOTE4OTY4IEwxMy4wNTI0ODgxLDE0LjE5MTg5NjggWiBNNC45MTY5MDYyMSwxNC4xOTI4OTQxIEM0LjQ2MjczNTM3LDE0LjIxMjg4NjMgNC4xMDcyOTczMywxNC41OTM2OTU2IDQuMTA4MjgyNjEsMTUuMDUzNDY1MyBDNC4xMjkwMTg1NCwxNS41MTMyMzUgNC41MDQyMDMxNCwxNS44NzMwNTQ4IDQuOTU4MzczOTgsMTUuODUyMDY1MyBDNS40MDM2NTg4NiwxNS44MzIwNzUzIDUuNzU4MTA5NTcsMTUuNDUxMjY2MSA1LjczNzM3NTY5LDE0Ljk5MTQ5NjMgQzUuNzI3NTAyNDEsMTQuNTQxNzIxNiA1LjM2MTIwMzc2LDE0LjE5MTg5NjggNC45MTY5MDYyMSwxNC4xOTI4OTQxIFogTTguOTg0Njk3MTQsMTQuMTg3ODk2NyBDOC41MzA1MjYzMSwxNC4yMDg4ODgzIDguMTc2MDc1NiwxNC41ODg2OTgxIDguMTc2MDc1NiwxNS4wNDg0Njc4IEM4LjE5NjgwOTQ4LDE1LjUwODIzNzUgOC41NzE5OTQwOCwxNS44NjcwNTc4IDkuMDI2MTY0OTEsMTUuODQ3MDY3OCBDOS40NzA0NjI0NywxNS44MjYwNzgzIDkuODI1OTAwNTEsMTUuNDQ2MjY4NiA5LjgwNTE2NjYzLDE0Ljk4NTQ5OTMgQzkuNzk1MjkzMzUsMTQuNTM2NzI0MSA5LjQyODk5NDcsMTQuMTg2ODk5MyA4Ljk4NDY5NzE0LDE0LjE4Nzg5NjcgWiBNNC45MTE5Njk1NywxMC41OTQ2OTYyIEM0LjQ1Nzc5ODczLDEwLjYxNDY4ODQgNC4xMDMzNDgwMiwxMC45OTU0OTc2IDQuMTA0MzMzMjksMTEuNDU1MjY3NCBDNC4xMjQwODE5LDExLjkxNTAzNzEgNC41MDAyNTM4MywxMi4yNzQ4NTY5IDQuOTU0NDI0NjcsMTIuMjUzODY3NCBDNS4zOTg3MjIyMiwxMi4yMzM4Nzc0IDUuNzUzMTcyOTQsMTEuODUzMDY4MSA1LjczMjQzOTA1LDExLjM5MzI5ODQgQzUuNzIyNTY1NzcsMTAuOTQzNTIzNyA1LjM1NzI1NDQ1LDEwLjU5MzY5ODkgNC45MTE5Njk1NywxMC41OTQ2OTYyIFogTTguOTgwNzQ3ODMsMTAuNTU5NzEzOCBDOC41MjY1NzcsMTAuNTc5NzA1OSA4LjE3MTEzODk2LDEwLjk2MDUxNTIgOC4xNzIxMjQyMywxMS40MjAyODQ5IEM4LjE5MTg3Mjg0LDExLjg4MDA1NDYgOC41NjgwNDQ3NywxMi4yMzg4NzQ5IDkuMDIyMjE1NiwxMi4yMTg4ODQ5IEM5LjQ2NjUxMzE2LDEyLjE5Nzg5NTQgOS44MjA5NjM4NywxMS44MTgwODU3IDkuODAxMjE3MzEsMTEuMzU4MzE1OSBDOS43OTAzNTY3MSwxMC45MDg1NDEyIDkuNDI1MDQ1MzksMTAuNTU4NzE2NCA4Ljk4MDc0NzgzLDEwLjU1OTcxMzggWiBNMTMuMDQ4NTM4OCwxMC41NjQ3MTEzIEMxMi41OTQzNjc5LDEwLjU3NDcwODQgMTIuMjM4OTI5OSwxMC45NDQ1MjMyIDEyLjIzOTkxNTIsMTEuNDA0MjkyOSBMMTIuMjM5OTE1MiwxMS40MDQyOTI5IEwxMi4yMzk5MTUyLDExLjQxNTI4NzQgQzEyLjI0OTc5MDUsMTEuODc1MDU3MSAxMi42MjQ5NzUxLDEyLjIyMzg4MjQgMTMuMDgwMTMzMywxMi4yMTM4ODc0IEMxMy41MjQ0MzA4LDEyLjIwMjg5MjkgMTMuODc4ODgxNSwxMS44MjIwODM3IDEzLjg2OTAwODMsMTEuMzYyMzEzOSBDMTMuODQ4Mjc0NCwxMC45MjI1MzQyIDEzLjQ5MTg0OSwxMC41NjM3MTM5IDEzLjA0ODUzODgsMTAuNTY0NzExMyBaIE0xMS44OTMzNjUxLDMuMDA5NDk3MjcgTDYuMDI4NjM3NDIsMy4wMTc0OTMyNyBMNi4wMjk2MjQ3NSwzLjgyNjA4ODMgQzYuMDI5NjI0NzUsNC4yNTY4NzI1NSA1LjcwNDc5Mzg3LDQuNTk2NzAyMzUgNS4yNzAzNjk1OSw0LjU5NjcwMjM1IEM0LjgzNTk0NTMyLDQuNTk3NzAxODUgNC41MDkxMzk3OCw0LjI1ODg3MTU1IDQuNTA5MTM5NzgsMy44MjgwODczIEw0LjUwOTEzOTc4LDMuODI4MDg3MyBMNC41MDgxNTI0NiwzLjA1ODQ3Mjc1IEMyLjU4Mjg2MzA2LDMuMjUxMzc2MTMgMS41MTc1MzYyNiw0LjM4MjgwOTQ4IDEuNTIwNDkyMDgsNi41NTA3MjM3MiBMMS41MjA0OTIwOCw2LjU1MDcyMzcyIEwxLjUyMTQ4NTU3LDYuODYxNTY4MDQgTDE2LjQ2OTYyOTksNi44NDE1NzgwNSBMMTYuNDY5NjI5OSw2LjQ5MTc1MzI1IEMxNi40MjcxNzQ4LDQuMzQyODI5NSAxNS4zNDkwMTI4LDMuMjE1Mzk0MTUgMTMuNDEzODUwMSwzLjA0NzQ3ODI1IEwxMy40MTM4NTAxLDMuMDQ3NDc4MjUgTDEzLjQxNDgzNzQsMy44MTcwOTI4MSBDMTMuNDE0ODM3NCw0LjI0Njg3NzU2IDEzLjA4MDEzMzMsNC41ODc3MDY4NiAxMi42NTU1ODIzLDQuNTg3NzA2ODYgQzEyLjIyMTE1OCw0LjU4ODcwNjM2IDExLjg5NDM1MjUsNC4yNDg4NzY1NSAxMS44OTQzNTI1LDMuODE5MDkxOCBMMTEuODk0MzUyNSwzLjgxOTA5MTggTDExLjg5MzM2NTEsMy4wMDk0OTcyNyBaIj48L3BhdGg+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=",Ta="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxzdHlsZT4NCiAgICAgICAgI1NlYXJjaCB7IHN0cm9rZTogI2ZkYzU0YTsgfQ0KICAgIDwvc3R5bGU+DQogICAgDQogICAgPHRpdGxlPkljb25seS9MaWdodC9TZWFyY2g8L3RpdGxlPg0KICAgIDxnIGlkPSJJY29ubHkvTGlnaHQvU2VhcmNoIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPg0KICAgICAgICA8ZyBpZD0iU2VhcmNoIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyLjAwMDAwMCwgMi4wMDAwMDApIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS13aWR0aD0iMS41Ij4NCiAgICAgICAgICAgIDxjaXJjbGUgaWQ9IkVsbGlwc2VfNzM5IiBjeD0iOS43NjY1OTA0NCIgY3k9IjkuNzY2NTkwNDQiIHI9IjguOTg4NTU4NCI+PC9jaXJjbGU+DQogICAgICAgICAgICA8bGluZSB4MT0iMTYuMDE4MzA2NyIgeTE9IjE2LjQ4NTEyNTkiIHgyPSIxOS41NDIzMzQyIiB5Mj0iMjAuMDAwMDAwMSIgaWQ9IkxpbmVfMTgxIj48L2xpbmU+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=",Da="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxzdHlsZT4NCiAgICAgICAgI0Fycm93LS0tTGVmdC0yIHsgc3Ryb2tlOiAjMWU5ZGZjOyB9DQogICAgPC9zdHlsZT4NCiAgICANCiAgICA8dGl0bGU+SWNvbmx5L0xpZ2h0L0Fycm93IC0gTGVmdCAyPC90aXRsZT4NCiAgICA8ZyBpZD0iSWNvbmx5L0xpZ2h0L0Fycm93LS0tTGVmdC0yIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPg0KICAgICAgICA8ZyBpZD0iQXJyb3ctLS1MZWZ0LTIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyLjAwMDAwMCwgMTIuMDAwMDAwKSByb3RhdGUoLTI3MC4wMDAwMDApIHRyYW5zbGF0ZSgtMTIuMDAwMDAwLCAtMTIuMDAwMDAwKSB0cmFuc2xhdGUoNS4wMDAwMDAsIDguNTAwMDAwKSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2Utd2lkdGg9IjEuNSI+DQogICAgICAgICAgICA8cG9seWxpbmUgaWQ9IlN0cm9rZS0xIiBwb2ludHM9IjE0IDAgNyA3IDAgMCI+PC9wb2x5bGluZT4NCiAgICAgICAgPC9nPg0KICAgIDwvZz4NCjwvc3ZnPg==",za="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDxzdHlsZT4NCiAgICAgICAgI0Fycm93LS0tUmlnaHQtMiB7IHN0cm9rZTogIzFlOWRmYzsgfQ0KICAgIDwvc3R5bGU+DQogICAgDQogICAgPHRpdGxlPkljb25seS9MaWdodC9BcnJvdyAtIFJpZ2h0IDI8L3RpdGxlPg0KICAgIDxnIGlkPSJJY29ubHkvTGlnaHQvQXJyb3ctLS1SaWdodC0yIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPg0KICAgICAgICA8ZyBpZD0iQXJyb3ctLS1SaWdodC0yIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMi4wMDAwMDAsIDEyLjAwMDAwMCkgcm90YXRlKC05MC4wMDAwMDApIHRyYW5zbGF0ZSgtMTIuMDAwMDAwLCAtMTIuMDAwMDAwKSB0cmFuc2xhdGUoNS4wMDAwMDAsIDguNTAwMDAwKSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2Utd2lkdGg9IjEuNSI+DQogICAgICAgICAgICA8cG9seWxpbmUgaWQ9IlN0cm9rZS0xIiBwb2ludHM9IjE0IDAgNyA3IDAgMCI+PC9wb2x5bGluZT4NCiAgICAgICAgPC9nPg0KICAgIDwvZz4NCjwvc3ZnPg==";var ka=Object.defineProperty,La=Object.getOwnPropertyDescriptor,Q=(i,t,e,s)=>{for(var n=s>1?void 0:s?La(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&ka(t,e,n),n};M.GenusTextBox=class extends b.LitElement{constructor(){super(),this.labelText="",this.inputValue="",this.inputType="text",this.inputName="",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.dispatchEvent(new CustomEvent("selected",{detail:{chosenDate:e,formattedDate:this.inputValue}})),this._showCalenderCssClass=""},this._generateDays=(t,e)=>{const s=[31,this._getFebDays(e),31,30,31,30,31,31,30,31,30,31];let n=new Date(e,t,1),o=document.createElement("div");o.classList.add("dates");for(let a=0;a<=s[t]+n.getDay()-1;a++){let r=document.createElement("div");a>=n.getDay()&&(r.classList.add("date"),r.innerHTML=(a-n.getDay()+1).toString(),a-n.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 s;return this.withoutIcon?s=b.html`
347
347
  <div class='form-field form-field--without-icon'>
348
348
  <label class='input-label'>${this.labelText}</label>
349
349
  ${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}' value=${this.inputValue} />`}
@@ -352,7 +352,7 @@
352
352
  <div class='form-field form-field--without-label'>
353
353
  <input class='input-control' type='${t}' @input=${this.getInputValue} name='${this.inputName}' value=${this.inputValue} />
354
354
  <div class='icon-container'>
355
- <object class="genus-icon input-icon" data='${As}' width='20' height='20'></object>
355
+ <object class="genus-icon input-icon" data='${Ts}' width='20' height='20'></object>
356
356
  </div>
357
357
  </div>`:this.withoutLabelIcon?s=b.html`
358
358
  <div class='form-field form-field--without-label-icon'>
@@ -362,28 +362,28 @@
362
362
  <label class='input-label'>${this.labelText}</label>
363
363
  <input class='input-control' type='${t}' @input=${this.getInputValue} name='${this.inputName}' value=${this.inputValue} />
364
364
  <div class='icon-container'>
365
- <object class="genus-icon input-icon" data='${As}' width='20' height='20'></object>
365
+ <object class="genus-icon input-icon" data='${Ts}' width='20' height='20'></object>
366
366
  </div>
367
367
  </div>`,s},password:()=>b.html`
368
368
  <div class='form-field'>
369
369
  <label class='input-label'>${this.labelText}</label>
370
370
  <input class='input-control' type='${t}' @input=${this.getInputValue} name='${this.inputName}' />
371
371
  <div class='icon-container'>
372
- <object class="genus-icon input-icon" data='${wa}' width='20' height='20'></object>
372
+ <object class="genus-icon input-icon" data='${va}' width='20' height='20'></object>
373
373
  </div>
374
374
  </div>`,email:()=>b.html`
375
375
  <div class='form-field'>
376
376
  <label class='input-label'>${this.labelText}</label>
377
377
  <input class='input-control' type='${t}' @input=${this.getInputValue} name='${this.inputName}' value=${this.inputValue} />
378
378
  <div class='icon-container'>
379
- <object class="genus-icon input-icon" data='${va}' width='20' height='20'></object>
379
+ <object class="genus-icon input-icon" data='${Ia}' width='20' height='20'></object>
380
380
  </div>
381
381
  </div>`,search:()=>b.html`
382
382
  <div class='form-field'>
383
383
  <label class='input-label'>${this.labelText}</label>
384
384
  <input class='input-control' type='text' @input=${this.getInputValue} />
385
385
  <div class='icon-container'>
386
- <object class="genus-icon input-icon" data='${Aa}' width='20' height='20'></object>
386
+ <object class="genus-icon input-icon" data='${Ta}' width='20' height='20'></object>
387
387
  </div>
388
388
  </div>`,date:()=>b.html`
389
389
  <div class='date-picker'>
@@ -391,7 +391,7 @@
391
391
  <label class='input-label'>${this.labelText}</label>
392
392
  <input class='input-control date-control' type='text' @click=${this._toggleCalendar} value=${this.inputValue} readonly />
393
393
  <div class='icon-container'>
394
- <object class="genus-icon input-icon" data='${Ia}' width='20' height='20'></object>
394
+ <object class="genus-icon input-icon" data='${Aa}' width='20' height='20'></object>
395
395
  </div>
396
396
  </div>
397
397
  <div class='calendar calendar-${this.displayPosition} ${this._showCalenderCssClass}'>
@@ -399,11 +399,11 @@
399
399
  <span class="month-picker" @click=${()=>{this._showMonthsCssClass="month-list--show"}}>${this._monthNames[this._currentMonth]}</span>
400
400
  <div class="year-picker">
401
401
  <span class='year-navigation-button' @click=${this._previousYear}>
402
- <object class="genus-icon year-change-icon prev-year-icon" data='${Ta}' width='20' height='20'></object>
402
+ <object class="genus-icon year-change-icon prev-year-icon" data='${Da}' width='20' height='20'></object>
403
403
  </span>
404
404
  <span class="year">${this._currentYear}</span>
405
405
  <span class='year-navigation-button' @click=${this._nextYear}>
406
- <object class="genus-icon year-change-icon next-year-icon" data='${Da}' @click=${this._nextYear} width='20' height='20'></object>
406
+ <object class="genus-icon year-change-icon next-year-icon" data='${za}' @click=${this._nextYear} width='20' height='20'></object>
407
407
  </span>
408
408
  </div>
409
409
  </div>
@@ -424,13 +424,13 @@
424
424
  </div>
425
425
  </div>
426
426
  </div>
427
- `})[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)}},v.GenusTextBox.styles=[Ma,xa,ya,ga,pa,ma,ba],v.GenusTextBox.formAssociated=!0,Q([w.property({attribute:"label-text"})],v.GenusTextBox.prototype,"labelText",2),Q([w.property({attribute:"input-value"})],v.GenusTextBox.prototype,"inputValue",2),Q([w.property({attribute:"input-type"})],v.GenusTextBox.prototype,"inputType",2),Q([w.property({attribute:"name",reflect:!0})],v.GenusTextBox.prototype,"inputName",2),Q([w.property({attribute:"without-icon",type:Boolean})],v.GenusTextBox.prototype,"withoutIcon",2),Q([w.property({attribute:"without-label",type:Boolean})],v.GenusTextBox.prototype,"withoutLabel",2),Q([w.property({attribute:"without-label-icon",type:Boolean})],v.GenusTextBox.prototype,"withoutLabelIcon",2),Q([w.property({attribute:"read-only",type:Boolean})],v.GenusTextBox.prototype,"readOnly",2),Q([w.property({attribute:"display-position"})],v.GenusTextBox.prototype,"displayPosition",2),Q([w.state()],v.GenusTextBox.prototype,"_currentMonth",2),Q([w.state()],v.GenusTextBox.prototype,"_currentYear",2),Q([w.state()],v.GenusTextBox.prototype,"_currentDate",2),Q([w.state()],v.GenusTextBox.prototype,"_targetInput",2),Q([w.state()],v.GenusTextBox.prototype,"_showMonthsCssClass",2),Q([w.state()],v.GenusTextBox.prototype,"_showCalenderCssClass",2),Q([w.state()],v.GenusTextBox.prototype,"_generateDays",2),v.GenusTextBox=Q([w.customElement("genus-textbox")],v.GenusTextBox);const La=b.css`
427
+ `})[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)}},M.GenusTextBox.styles=[wa,ya,Ma,pa,ma,ba,xa],M.GenusTextBox.formAssociated=!0,Q([v.property({attribute:"label-text"})],M.GenusTextBox.prototype,"labelText",2),Q([v.property({attribute:"input-value"})],M.GenusTextBox.prototype,"inputValue",2),Q([v.property({attribute:"input-type"})],M.GenusTextBox.prototype,"inputType",2),Q([v.property({attribute:"name",reflect:!0})],M.GenusTextBox.prototype,"inputName",2),Q([v.property({attribute:"without-icon",type:Boolean})],M.GenusTextBox.prototype,"withoutIcon",2),Q([v.property({attribute:"without-label",type:Boolean})],M.GenusTextBox.prototype,"withoutLabel",2),Q([v.property({attribute:"without-label-icon",type:Boolean})],M.GenusTextBox.prototype,"withoutLabelIcon",2),Q([v.property({attribute:"read-only",type:Boolean})],M.GenusTextBox.prototype,"readOnly",2),Q([v.property({attribute:"display-position"})],M.GenusTextBox.prototype,"displayPosition",2),Q([v.state()],M.GenusTextBox.prototype,"_currentMonth",2),Q([v.state()],M.GenusTextBox.prototype,"_currentYear",2),Q([v.state()],M.GenusTextBox.prototype,"_currentDate",2),Q([v.state()],M.GenusTextBox.prototype,"_targetInput",2),Q([v.state()],M.GenusTextBox.prototype,"_showMonthsCssClass",2),Q([v.state()],M.GenusTextBox.prototype,"_showCalenderCssClass",2),Q([v.state()],M.GenusTextBox.prototype,"_generateDays",2),M.GenusTextBox=Q([v.customElement("genus-textbox")],M.GenusTextBox);const Na=b.css`
428
428
  input[type=radio]
429
429
  {
430
430
  display: none;
431
431
  -webkit-appearance: none;
432
432
  }
433
- `,Na=b.css`
433
+ `,Ca=b.css`
434
434
  .tab-labels { grid-area: 1 / 1 / 2 / -1; }
435
435
 
436
436
  ::slotted(genus-tab-content) { grid-area: 2 / 1 / -1 / -1; }
@@ -449,7 +449,7 @@
449
449
  transform: translate3d(0, 0, 0);
450
450
  opacity: 1;
451
451
  }
452
- `,Ca=b.css`
452
+ `,Sa=b.css`
453
453
  .tab
454
454
  {
455
455
  padding: var(--tab-padding);
@@ -469,13 +469,13 @@
469
469
  background: var(--checked-tab-background-color, #213e70);
470
470
  color: var(--checked-tab-font-color, #f4f9f9);
471
471
  }
472
- `,Sa=b.css`
472
+ `,Oa=b.css`
473
473
  .tab
474
474
  {
475
475
  font-family: var(--tab-font-family, 'Sofia Pro');
476
476
  font-size: var(--tab-font-size, 1rem);
477
477
  }
478
- `,Oa=b.css`
478
+ `,Pa=b.css`
479
479
  .tab-container
480
480
  {
481
481
  display: grid;
@@ -483,9 +483,9 @@
483
483
  grid-template-rows: 3rem minmax(10vh, 1fr);
484
484
  grid-row-gap: 1rem;
485
485
  }
486
- `,Pa=b.css`
486
+ `,ja=b.css`
487
487
  .tab-labels { display: flex; }
488
- `;var ja=Object.defineProperty,Ea=Object.getOwnPropertyDescriptor,ce=(i,t,e,s)=>{for(var n=s>1?void 0:s?Ea(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&ja(t,e,n),n};let At=class extends b.LitElement{constructor(){super(...arguments),this._numberOfTabs=0,this._tabsTemplate=[],this._tabNames=[],this.tabNames=[],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`
488
+ `;var Ea=Object.defineProperty,Va=Object.getOwnPropertyDescriptor,he=(i,t,e,s)=>{for(var n=s>1?void 0:s?Va(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Ea(t,e,n),n};let At=class extends b.LitElement{constructor(){super(...arguments),this._numberOfTabs=0,this._tabsTemplate=[],this._tabNames=[],this.tabNames=[],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`
489
489
  <input class="tab-radio" id=${this._tabNames[i]} type="radio" name="tabGroup" @change=${()=>{this._showContent(i)}} checked/>
490
490
  <label class="tab ${this._tabNames[i]}-tab" for=${this._tabNames[i]}>${this._tabNames[i]=this._tabNames[i].replace(/-/g," ")}</label>
491
491
  `):this._tabsTemplate.push(b.html`
@@ -498,7 +498,7 @@
498
498
  </div>
499
499
  <slot></slot>
500
500
  </div>
501
- `}};At.styles=[La,Ca,Na,Sa,Oa,Pa],ce([w.queryAssignedElements()],At.prototype,"_tabContents",2),ce([w.state()],At.prototype,"_numberOfTabs",2),ce([w.state()],At.prototype,"_tabsTemplate",2),ce([w.property({attribute:"tab-names",type:Array})],At.prototype,"tabNames",2),At=ce([w.customElement("genus-tab-container")],At);var Va=Object.defineProperty,Ba=Object.getOwnPropertyDescriptor,Ra=(i,t,e,s)=>{for(var n=s>1?void 0:s?Ba(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Va(t,e,n),n};let Ci=class extends b.LitElement{render(){return b.html`<slot></slot>`}};Ci=Ra([w.customElement("genus-tab-content")],Ci);const Wa=Object.freeze(Object.defineProperty({__proto__:null,get GenusTabContainer(){return At},get GenusTabContent(){return Ci}},Symbol.toStringTag,{value:"Module"})),Ts=b.css`
501
+ `}};At.styles=[Na,Sa,Ca,Oa,Pa,ja],he([v.queryAssignedElements()],At.prototype,"_tabContents",2),he([v.state()],At.prototype,"_numberOfTabs",2),he([v.state()],At.prototype,"_tabsTemplate",2),he([v.property({attribute:"tab-names",type:Array})],At.prototype,"tabNames",2),At=he([v.customElement("genus-tab-container")],At);var Ba=Object.defineProperty,Ra=Object.getOwnPropertyDescriptor,Wa=(i,t,e,s)=>{for(var n=s>1?void 0:s?Ra(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Ba(t,e,n),n};let Si=class extends b.LitElement{render(){return b.html`<slot></slot>`}};Si=Wa([v.customElement("genus-tab-content")],Si);const Ga=Object.freeze(Object.defineProperty({__proto__:null,get GenusTabContainer(){return At},get GenusTabContent(){return Si}},Symbol.toStringTag,{value:"Module"})),Ds=b.css`
502
502
  ::slotted(.hide-content)
503
503
  {
504
504
  visibility: hidden;
@@ -534,7 +534,7 @@
534
534
  .step-info { grid-area: si }
535
535
 
536
536
  .step-content { grid-area: sc }
537
- `,Ds=b.css`
537
+ `,zs=b.css`
538
538
  .step-container
539
539
  {
540
540
  display: grid;
@@ -558,7 +558,7 @@
558
558
  display: flex;
559
559
  column-gap: 0.9rem;
560
560
  }
561
- `,zs=b.css`
561
+ `,ks=b.css`
562
562
  .step-title, .step-description, .step-number
563
563
  {
564
564
  margin: 0;
@@ -587,13 +587,13 @@
587
587
  color: var(--step-number-color);
588
588
  margin-bottom: var(--step-number-margin-buttom, 1rem);
589
589
  }
590
- `;var Za=Object.defineProperty,Ga=Object.getOwnPropertyDescriptor,qt=(i,t,e,s)=>{for(var n=s>1?void 0:s?Ga(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Za(t,e,n),n};let pt=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`
590
+ `;var Za=Object.defineProperty,Fa=Object.getOwnPropertyDescriptor,_t=(i,t,e,s)=>{for(var n=s>1?void 0:s?Fa(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Za(t,e,n),n};let pt=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`
591
591
  <h5 class='step-number'>Step ${this.currentStep+1}</h5>
592
592
  <div class='progress-bars'>${this._progressBarsTemplate}</div>
593
593
  <div class='step-contents'>
594
594
  <slot></slot>
595
595
  </div>
596
- `}};pt.styles=[Ts,Ds,Ha,zs],qt([w.queryAssignedElements()],pt.prototype,"_stepContents",2),qt([w.property({attribute:"current-step",type:Number})],pt.prototype,"currentStep",2),qt([w.property()],pt.prototype,"direction",2),qt([w.state()],pt.prototype,"_progressBarsTemplate",2),qt([w.state()],pt.prototype,"_steps",2),pt=qt([w.customElement("genus-step-wizard")],pt);var Fa=Object.defineProperty,Ua=Object.getOwnPropertyDescriptor,Si=(i,t,e,s)=>{for(var n=s>1?void 0:s?Ua(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Fa(t,e,n),n};let _t=class extends b.LitElement{constructor(){super(...arguments),this.stepTitle="",this.stepDescription=""}render(){return b.html`
596
+ `}};pt.styles=[Ds,zs,Ha,ks],_t([v.queryAssignedElements()],pt.prototype,"_stepContents",2),_t([v.property({attribute:"current-step",type:Number})],pt.prototype,"currentStep",2),_t([v.property()],pt.prototype,"direction",2),_t([v.state()],pt.prototype,"_progressBarsTemplate",2),_t([v.state()],pt.prototype,"_steps",2),pt=_t([v.customElement("genus-step-wizard")],pt);var Ua=Object.defineProperty,Ya=Object.getOwnPropertyDescriptor,Oi=(i,t,e,s)=>{for(var n=s>1?void 0:s?Ya(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Ua(t,e,n),n};let $t=class extends b.LitElement{constructor(){super(...arguments),this.stepTitle="",this.stepDescription=""}render(){return b.html`
597
597
  <div class='step-container'>
598
598
  <div class='step-info'>
599
599
  <h4 class='step-title'>${this.stepTitle}</h4>
@@ -603,7 +603,7 @@
603
603
  <slot></slot>
604
604
  </div>
605
605
  </div>
606
- `}};_t.styles=[zs,Ts,Ds],Si([w.property({attribute:"step-title"})],_t.prototype,"stepTitle",2),Si([w.property({attribute:"step-description"})],_t.prototype,"stepDescription",2),_t=Si([w.customElement("genus-step-content")],_t);const Ya=Object.freeze(Object.defineProperty({__proto__:null,get GenusStepContent(){return _t},get GenusStepWizard(){return pt}},Symbol.toStringTag,{value:"Module"})),Xa=b.css`
606
+ `}};$t.styles=[ks,Ds,zs],Oi([v.property({attribute:"step-title"})],$t.prototype,"stepTitle",2),Oi([v.property({attribute:"step-description"})],$t.prototype,"stepDescription",2),$t=Oi([v.customElement("genus-step-content")],$t);const Ka=Object.freeze(Object.defineProperty({__proto__:null,get GenusStepContent(){return $t},get GenusStepWizard(){return pt}},Symbol.toStringTag,{value:"Module"})),Xa=b.css`
607
607
  input[type=radio] { display: none; }
608
608
 
609
609
  .genus-radiobtn:checked + .genus-radiobtn-label { background: var(--checked-radio-button-background-color, #213e70); }
@@ -613,7 +613,7 @@
613
613
  .genus-radiobtn:checked + .genus-radiobtn-label .checked-icon { display: block; }
614
614
 
615
615
  .genus-radiobtn:checked + .genus-radiobtn-label .unchecked-icon { display: none; }
616
- `,Ka=b.css`
616
+ `,Qa=b.css`
617
617
  .label-text
618
618
  {
619
619
  color: var(--radio-button-font-color, #213e70);
@@ -641,7 +641,7 @@
641
641
  justify-self: start;
642
642
  grid-area: il;
643
643
  }
644
- `,Qa=b.css`
644
+ `,Ja=b.css`
645
645
  icon
646
646
  {
647
647
  width: 1.5625rem;
@@ -653,7 +653,7 @@
653
653
  .genus-icon { display: none; }
654
654
 
655
655
  .unchecked-icon { display: block; }
656
- `,Ja=b.css`
656
+ `,qa=b.css`
657
657
  .label-text
658
658
  {
659
659
  font-family: var(--label-text-font-family, 'Sofia Pro');
@@ -665,7 +665,7 @@
665
665
  font-family: var(--input-label-font-family, 'Sofia Pro');
666
666
  font-size: var(--input-label-font-size, 1rem);
667
667
  }
668
- `,qa=b.css`
668
+ `,_a=b.css`
669
669
  .form-field
670
670
  {
671
671
  display: grid;
@@ -676,7 +676,7 @@
676
676
  'il il il il . .'
677
677
  'rg rg rg rg rg rg';
678
678
  }
679
- `,_a=b.css`
679
+ `,$a=b.css`
680
680
  .radiobtn-group
681
681
  {
682
682
  display: flex;
@@ -693,7 +693,7 @@
693
693
  -moz-column-gap: 0.6rem;
694
694
  column-gap: 0.6rem;
695
695
  }
696
- `,ks="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNSAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxjaXJjbGUgY3g9IjcuNSIgY3k9IjcuNSIgcj0iNyIgZmlsbD0iI0ZERkRGRCIgc3Ryb2tlPSIjQjlCREJBIi8+DQo8L3N2Zz4NCg==",Ls="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIGNsYXNzPSJyYWRpby1pY29uLXN2ZyBjaGVja2VkLXN2ZyIgdmlld0JveD0iMCAwIDE1IDE1IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KICAgIDxzdHlsZT4NCiAgICAgICAgLnJhZGlvLWljb24tc3ZnIGNpcmNsZSB7IGZpbGw6ICNmZGM1NGE7IH0NCiAgICAgICAgLmNoZWNrZWQtc3ZnIHBhdGggeyBzdHJva2U6ICMzYzQ5OWU7IH0NCiAgICA8L3N0eWxlPg0KDQogICAgPGNpcmNsZSBjeD0iNy41IiBjeT0iNy41IiByPSI3LjUiLz4NCiAgICA8cGF0aCBkPSJNNSA4LjAwNUw2Ljg5MiA5Ljg5OEwxMC43OSA2IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4NCjwvc3ZnPg0K";var $a=Object.defineProperty,tr=Object.getOwnPropertyDescriptor,jt=(i,t,e,s)=>{for(var n=s>1?void 0:s?tr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&$a(t,e,n),n};v.GenusRadioBtnGroup=class extends b.LitElement{constructor(){super(...arguments),this.groupName="",this.labelText="",this.selectedOption="",this.options=[],this.withoutLabel=!1,this.withoutIcon=!1}render(){let t=[],e=this.options;for(let s of e)s.inputValue===this.selectedOption?this.withoutIcon?t.push(b.html`
696
+ `,Ls="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNSAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxjaXJjbGUgY3g9IjcuNSIgY3k9IjcuNSIgcj0iNyIgZmlsbD0iI0ZERkRGRCIgc3Ryb2tlPSIjQjlCREJBIi8+DQo8L3N2Zz4NCg==",Ns="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIGNsYXNzPSJyYWRpby1pY29uLXN2ZyBjaGVja2VkLXN2ZyIgdmlld0JveD0iMCAwIDE1IDE1IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KICAgIDxzdHlsZT4NCiAgICAgICAgLnJhZGlvLWljb24tc3ZnIGNpcmNsZSB7IGZpbGw6ICNmZGM1NGE7IH0NCiAgICAgICAgLmNoZWNrZWQtc3ZnIHBhdGggeyBzdHJva2U6ICMzYzQ5OWU7IH0NCiAgICA8L3N0eWxlPg0KDQogICAgPGNpcmNsZSBjeD0iNy41IiBjeT0iNy41IiByPSI3LjUiLz4NCiAgICA8cGF0aCBkPSJNNSA4LjAwNUw2Ljg5MiA5Ljg5OEwxMC43OSA2IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4NCjwvc3ZnPg0K";var tr=Object.defineProperty,er=Object.getOwnPropertyDescriptor,jt=(i,t,e,s)=>{for(var n=s>1?void 0:s?er(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&tr(t,e,n),n};M.GenusRadioBtnGroup=class extends b.LitElement{constructor(){super(...arguments),this.groupName="",this.labelText="",this.selectedOption="",this.options=[],this.withoutLabel=!1,this.withoutIcon=!1}render(){let t=[],e=this.options;for(let s of e)s.inputValue===this.selectedOption?this.withoutIcon?t.push(b.html`
697
697
  <input type='radio' id=${s.inputValue} class='genus-radiobtn' @change=${()=>{this.dispatchEvent(new CustomEvent("checked",{detail:s.inputValue}))}} value=${s.inputValue} name=${this.groupName} checked />
698
698
  <label class='label genus-radiobtn-label' for=${s.inputValue}>
699
699
  <span class="label-text">${s.labelText}</span>
@@ -702,8 +702,8 @@
702
702
  <input type='radio' id=${s.inputValue} class='genus-radiobtn' @change=${()=>{this.dispatchEvent(new CustomEvent("checked",{detail:s.inputValue}))}} value=${s.inputValue} name=${this.groupName} checked />
703
703
  <label class='label genus-radiobtn-label genus-radiobtn-label--with-icon' for=${s.inputValue}>
704
704
  <span class="label-text">${s.labelText}</span>
705
- <object class="genus-icon radiobtn-icon unchecked-icon" data='${ks}' width='18' height='18'></object>
706
- <object class="genus-icon radiobtn-icon checked-icon" data='${Ls}' width='18' height='18'></object>
705
+ <object class="genus-icon radiobtn-icon unchecked-icon" data='${Ls}' width='18' height='18'></object>
706
+ <object class="genus-icon radiobtn-icon checked-icon" data='${Ns}' width='18' height='18'></object>
707
707
  </label>
708
708
  `):this.withoutIcon?t.push(b.html`
709
709
  <input type='radio' id=${s.inputValue} class='genus-radiobtn' @change=${()=>{this.dispatchEvent(new CustomEvent("checked",{detail:s.inputValue}))}} value=${s.inputValue} name=${this.groupName} />
@@ -714,8 +714,8 @@
714
714
  <input type='radio' id=${s.inputValue} class='genus-radiobtn' @change=${()=>{this.dispatchEvent(new CustomEvent("checked",{detail:s.inputValue}))}} value=${s.inputValue} name=${this.groupName} />
715
715
  <label class='label genus-radiobtn-label genus-radiobtn-label--with-icon' for=${s.inputValue}>
716
716
  <span class="label-text">${s.labelText}</span>
717
- <object class="genus-icon radiobtn-icon unchecked-icon" data='${ks}' width='18' height='18'></object>
718
- <object class="genus-icon radiobtn-icon checked-icon" data='${Ls}' width='18' height='18'></object>
717
+ <object class="genus-icon radiobtn-icon unchecked-icon" data='${Ls}' width='18' height='18'></object>
718
+ <object class="genus-icon radiobtn-icon checked-icon" data='${Ns}' width='18' height='18'></object>
719
719
  </label>
720
720
  `);return this.withoutLabel?b.html`
721
721
  <div class="radiobtn-group">
@@ -728,7 +728,7 @@
728
728
  ${t}
729
729
  </div>
730
730
  </div>
731
- `}},v.GenusRadioBtnGroup.styles=[Ja,Qa,qa,Ka,_a,Xa],jt([w.property({attribute:"group-name"})],v.GenusRadioBtnGroup.prototype,"groupName",2),jt([w.property({attribute:"label-text"})],v.GenusRadioBtnGroup.prototype,"labelText",2),jt([w.property({attribute:"selected-option"})],v.GenusRadioBtnGroup.prototype,"selectedOption",2),jt([w.property({attribute:"group-options",type:Array})],v.GenusRadioBtnGroup.prototype,"options",2),jt([w.property({attribute:"without-label",type:Boolean})],v.GenusRadioBtnGroup.prototype,"withoutLabel",2),jt([w.property({attribute:"without-icon",type:Boolean})],v.GenusRadioBtnGroup.prototype,"withoutIcon",2),v.GenusRadioBtnGroup=jt([w.customElement("genus-radiobtn-group")],v.GenusRadioBtnGroup);const er=b.css`
731
+ `}},M.GenusRadioBtnGroup.styles=[qa,Ja,_a,Qa,$a,Xa],jt([v.property({attribute:"group-name"})],M.GenusRadioBtnGroup.prototype,"groupName",2),jt([v.property({attribute:"label-text"})],M.GenusRadioBtnGroup.prototype,"labelText",2),jt([v.property({attribute:"selected-option"})],M.GenusRadioBtnGroup.prototype,"selectedOption",2),jt([v.property({attribute:"group-options",type:Array})],M.GenusRadioBtnGroup.prototype,"options",2),jt([v.property({attribute:"without-label",type:Boolean})],M.GenusRadioBtnGroup.prototype,"withoutLabel",2),jt([v.property({attribute:"without-icon",type:Boolean})],M.GenusRadioBtnGroup.prototype,"withoutIcon",2),M.GenusRadioBtnGroup=jt([v.customElement("genus-radiobtn-group")],M.GenusRadioBtnGroup);const ir=b.css`
732
732
  *
733
733
  {
734
734
  margin: 0;
@@ -758,7 +758,7 @@
758
758
  {
759
759
  .icon-container { justify-self: unset; }
760
760
  }
761
- `,ir=b.css`
761
+ `,sr=b.css`
762
762
  .data-card
763
763
  {
764
764
  display: grid;
@@ -805,14 +805,14 @@
805
805
  'dctxt';
806
806
  }
807
807
  }
808
- `,sr=b.css`
808
+ `,nr=b.css`
809
809
  .icon-container
810
810
  {
811
811
  display: flex;
812
812
  justify-content: center;
813
813
  align-items: center;
814
814
  }
815
- `,nr=b.css`
815
+ `,or=b.css`
816
816
  .data-card__title
817
817
  {
818
818
  font-family: var(--card-title-font-family, 'Sofia Pro Semi');
@@ -850,7 +850,7 @@
850
850
  {
851
851
  .data-card__title, .data-card__text { text-align: left; }
852
852
  }
853
- `;var or=Object.defineProperty,ar=Object.getOwnPropertyDescriptor,he=(i,t,e,s)=>{for(var n=s>1?void 0:s?ar(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&or(t,e,n),n};v.GenusDataCard=class extends b.LitElement{constructor(){super(...arguments),this.dataCardTitle="",this.dataCardValue="",this.datCardIconSrc="",this.withoutIcon=!1}render(){return this.withoutIcon?b.html`
853
+ `;var ar=Object.defineProperty,rr=Object.getOwnPropertyDescriptor,de=(i,t,e,s)=>{for(var n=s>1?void 0:s?rr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&ar(t,e,n),n};M.GenusDataCard=class extends b.LitElement{constructor(){super(...arguments),this.dataCardTitle="",this.dataCardValue="",this.datCardIconSrc="",this.withoutIcon=!1}render(){return this.withoutIcon?b.html`
854
854
  <div class='data-card data-card--no-icon'>
855
855
  <h4 class='data-card__title'>${this.dataCardTitle}</h4>
856
856
  <p class='data-card__text'>${this.dataCardValue}</p>
@@ -863,13 +863,13 @@
863
863
  <h4 class='data-card__title'>${this.dataCardTitle}</h4>
864
864
  <p class='data-card__text'>${this.dataCardValue}</p>
865
865
  </div>
866
- `}},v.GenusDataCard.styles=[er,nr,ir,sr],he([w.property({attribute:"card-title"})],v.GenusDataCard.prototype,"dataCardTitle",2),he([w.property({attribute:"card-value"})],v.GenusDataCard.prototype,"dataCardValue",2),he([w.property({attribute:"svg-icon-src"})],v.GenusDataCard.prototype,"datCardIconSrc",2),he([w.property({type:Boolean,attribute:"without-icon"})],v.GenusDataCard.prototype,"withoutIcon",2),v.GenusDataCard=he([w.customElement("genus-data-card")],v.GenusDataCard);const Ns=b.css`
866
+ `}},M.GenusDataCard.styles=[ir,or,sr,nr],de([v.property({attribute:"card-title"})],M.GenusDataCard.prototype,"dataCardTitle",2),de([v.property({attribute:"card-value"})],M.GenusDataCard.prototype,"dataCardValue",2),de([v.property({attribute:"svg-icon-src"})],M.GenusDataCard.prototype,"datCardIconSrc",2),de([v.property({type:Boolean,attribute:"without-icon"})],M.GenusDataCard.prototype,"withoutIcon",2),M.GenusDataCard=de([v.customElement("genus-data-card")],M.GenusDataCard);const Cs=b.css`
867
867
  .label-text, .options-label
868
868
  {
869
869
  font-family: var(--font-family, 'Sofia Pro');
870
870
  font-size: var(--font-size, 1rem);
871
871
  }
872
- `,rr=b.css`
872
+ `,lr=b.css`
873
873
  input[type=checkbox] { display: none; }
874
874
 
875
875
  .genus-checkbox:checked + .genus-checkbox-label { background: var(--checked-checkbox-background-color, #213e70); }
@@ -879,7 +879,7 @@
879
879
  .genus-checkbox:checked + .genus-checkbox-label .checked-icon { display: block; }
880
880
 
881
881
  .genus-checkbox:checked + .genus-checkbox-label .unchecked-icon { display: none; }
882
- `,Cs=b.css`
882
+ `,Ss=b.css`
883
883
  .label-text
884
884
  {
885
885
  color: var(--label-font-color, #213e70);
@@ -903,12 +903,12 @@
903
903
  .genus-checkbox-label:hover { cursor: pointer; }
904
904
 
905
905
  .options-label { grid-area: ol; }
906
- `;var lr=Object.defineProperty,cr=Object.getOwnPropertyDescriptor,Oi=(i,t,e,s)=>{for(var n=s>1?void 0:s?cr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&lr(t,e,n),n};let $t=class extends b.LitElement{constructor(){super(...arguments),this.optionValue="",this.optionID=""}render(){return b.html`
906
+ `;var cr=Object.defineProperty,hr=Object.getOwnPropertyDescriptor,Pi=(i,t,e,s)=>{for(var n=s>1?void 0:s?hr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&cr(t,e,n),n};let te=class extends b.LitElement{constructor(){super(...arguments),this.optionValue="",this.optionID=""}render(){return b.html`
907
907
  <input type='checkbox' id='genus-checkbox-${Number(this.optionID)}' class='genus-checkbox' @change=${()=>{this.dispatchEvent(new CustomEvent("checked",{detail:this.optionValue}))}} value=${this.optionValue} />
908
908
  <label class='label genus-checkbox-label' for='genus-checkbox-${Number(this.optionID)}'>
909
909
  <span class="label-text"><slot></slot></span>
910
910
  </label>
911
- `}};$t.styles=[Ns,rr,Cs],Oi([w.property({attribute:"option-value"})],$t.prototype,"optionValue",2),Oi([w.property({attribute:"option-id"})],$t.prototype,"optionID",2),$t=Oi([w.customElement("genus-checkbox-option")],$t);const hr=b.css`
911
+ `}};te.styles=[Cs,lr,Ss],Pi([v.property({attribute:"option-value"})],te.prototype,"optionValue",2),Pi([v.property({attribute:"option-id"})],te.prototype,"optionID",2),te=Pi([v.customElement("genus-checkbox-option")],te);const dr=b.css`
912
912
  .options-container
913
913
  {
914
914
  padding: var(--options-container-padding, 1.25rem);
@@ -916,7 +916,7 @@
916
916
  border-radius: var(--options-container-border-radius, 0.375rem);
917
917
  grid-area: oc;
918
918
  }
919
- `,dr=b.css`
919
+ `,ur=b.css`
920
920
  .form-field
921
921
  {
922
922
  display: grid;
@@ -927,21 +927,21 @@
927
927
  'ol ol ol ol . .'
928
928
  'oc oc oc oc oc oc';
929
929
  }
930
- `,ur=b.css`
930
+ `,fr=b.css`
931
931
  .options-container
932
932
  {
933
933
  display: flex;
934
934
  flex-wrap: wrap;
935
935
  gap: 1rem;
936
936
  }
937
- `;var fr=Object.defineProperty,gr=Object.getOwnPropertyDescriptor,Ss=(i,t,e,s)=>{for(var n=s>1?void 0:s?gr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&fr(t,e,n),n};let de=class extends b.LitElement{constructor(){super(...arguments),this.labelText=""}render(){return b.html`
937
+ `;var gr=Object.defineProperty,pr=Object.getOwnPropertyDescriptor,Os=(i,t,e,s)=>{for(var n=s>1?void 0:s?pr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&gr(t,e,n),n};let ue=class extends b.LitElement{constructor(){super(...arguments),this.labelText=""}render(){return b.html`
938
938
  <div class='form-field'>
939
939
  <label class='label options-label group-label'>${this.labelText}</label>
940
940
  <div class="options-container">
941
941
  <slot></slot>
942
942
  </div>
943
943
  </div>
944
- `}};de.styles=[Cs,Ns,hr,dr,ur],Ss([w.property({attribute:"group-label-text"})],de.prototype,"labelText",2),de=Ss([w.customElement("genus-checkbox-group")],de);const pr=Object.freeze(Object.defineProperty({__proto__:null,get GenusCheckBoxGroup(){return de},get GenusCheckBoxOption(){return $t}},Symbol.toStringTag,{value:"Module"})),mr=b.css`
944
+ `}};ue.styles=[Ss,Cs,dr,ur,fr],Os([v.property({attribute:"group-label-text"})],ue.prototype,"labelText",2),ue=Os([v.customElement("genus-checkbox-group")],ue);const mr=Object.freeze(Object.defineProperty({__proto__:null,get GenusCheckBoxGroup(){return ue},get GenusCheckBoxOption(){return te}},Symbol.toStringTag,{value:"Module"})),br=b.css`
945
945
  .label-text
946
946
  {
947
947
  color: var(--label-font-color, #213e70);
@@ -961,7 +961,7 @@
961
961
  }
962
962
 
963
963
  .genus-checkbox-label:hover { cursor: pointer; }
964
- `,br=b.css`
964
+ `,xr=b.css`
965
965
  input[type=checkbox] { display: none; }
966
966
 
967
967
  .genus-checkbox:checked + .genus-checkbox-label { background: var(--checked-checkbox-background-color, #213e70); }
@@ -971,7 +971,7 @@
971
971
  .genus-checkbox:checked + .genus-checkbox-label .checked-icon { display: block; }
972
972
 
973
973
  .genus-checkbox:checked + .genus-checkbox-label .unchecked-icon { display: none; }
974
- `,xr=b.css`
974
+ `,yr=b.css`
975
975
  icon
976
976
  {
977
977
  width: 1.5625rem;
@@ -983,13 +983,13 @@
983
983
  .epr-icon { display: none; }
984
984
 
985
985
  .unchecked-icon { display: block; }
986
- `,yr=b.css`
986
+ `,Mr=b.css`
987
987
  .label-text
988
988
  {
989
989
  font-family: var(--font-family, sans-serif);
990
990
  font-size: var(--font-size, 1rem);
991
991
  }
992
- `,Mr=b.css`
992
+ `,wr=b.css`
993
993
  .epr-checkbox-label--with-icon
994
994
  {
995
995
  display: flex;
@@ -997,7 +997,7 @@
997
997
  -moz-column-gap: 0.6rem;
998
998
  column-gap: 0.6rem;
999
999
  }
1000
- `,wr="data:image/svg+xml;base64,PCEtLSA8P3htbC1zdHlsZXNoZWV0IHR5cGU9InRleHQvY3NzIiBocmVmPSIuLi9jc3Mvc3R5bGUuY3NzIiA/PiAtLT4NCjxzdmcgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIGNsYXNzPSdjaGVja2JveC1pY29uLXN2ZyB1bmNoZWNrZWQtc3ZnJyBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KICAgIDxyZWN0IHg9IjAuNSIgeT0iMC41IiB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHJ4PSIzLjUiIGZpbGw9IndoaXRlIiBzdHJva2U9IiNCOUJEQkEiLz4NCjwvc3ZnPg0K",vr="data:image/svg+xml;base64,PCEtLSA8P3htbC1zdHlsZXNoZWV0IHR5cGU9InRleHQvY3NzIiBocmVmPSIuLi9jc3Mvc3R5bGUuY3NzIiA/PiAtLT4NCjxzdmcgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBjbGFzcz0nY2hlY2tib3gtaWNvbi1zdmcgY2hlY2tlZC1zdmcnIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgICA8c3R5bGU+DQogICAgICAgIC5jaGVja2JveC1pY29uLXN2ZyBwYXRoIHsgZmlsbDogIzI5NDA2YTsgfQ0KICAgICAgICAuY2hlY2tlZC1zdmcgcGF0aCB7IGZpbGw6ICNmZGM1NGE7IH0NCiAgICA8L3N0eWxlPg0KICAgIA0KICAgIDxwYXRoIGQ9Ik0xNi4xOSAySDcuODFDNC4xNyAyIDIgNC4xNyAyIDcuODFWMTYuMThDMiAxOS44MyA0LjE3IDIyIDcuODEgMjJIMTYuMThDMTkuODIgMjIgMjEuOTkgMTkuODMgMjEuOTkgMTYuMTlWNy44MUMyMiA0LjE3IDE5LjgzIDIgMTYuMTkgMlpNMTYuNzggOS43TDExLjExIDE1LjM3QzEwLjk3IDE1LjUxIDEwLjc4IDE1LjU5IDEwLjU4IDE1LjU5QzEwLjM4IDE1LjU5IDEwLjE5IDE1LjUxIDEwLjA1IDE1LjM3TDcuMjIgMTIuNTRDNi45MyAxMi4yNSA2LjkzIDExLjc3IDcuMjIgMTEuNDhDNy41MSAxMS4xOSA3Ljk5IDExLjE5IDguMjggMTEuNDhMMTAuNTggMTMuNzhMMTUuNzIgOC42NEMxNi4wMSA4LjM1IDE2LjQ5IDguMzUgMTYuNzggOC42NEMxNy4wNyA4LjkzIDE3LjA3IDkuNCAxNi43OCA5LjdaIiBmaWxsPSIjMjkyRDMyIi8+DQo8L3N2Zz4NCg==";var Ir=Object.defineProperty,Ar=Object.getOwnPropertyDescriptor,Fe=(i,t,e,s)=>{for(var n=s>1?void 0:s?Ar(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Ir(t,e,n),n};v.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`
1000
+ `,vr="data:image/svg+xml;base64,PCEtLSA8P3htbC1zdHlsZXNoZWV0IHR5cGU9InRleHQvY3NzIiBocmVmPSIuLi9jc3Mvc3R5bGUuY3NzIiA/PiAtLT4NCjxzdmcgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIGNsYXNzPSdjaGVja2JveC1pY29uLXN2ZyB1bmNoZWNrZWQtc3ZnJyBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KICAgIDxyZWN0IHg9IjAuNSIgeT0iMC41IiB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHJ4PSIzLjUiIGZpbGw9IndoaXRlIiBzdHJva2U9IiNCOUJEQkEiLz4NCjwvc3ZnPg0K",Ir="data:image/svg+xml;base64,PCEtLSA8P3htbC1zdHlsZXNoZWV0IHR5cGU9InRleHQvY3NzIiBocmVmPSIuLi9jc3Mvc3R5bGUuY3NzIiA/PiAtLT4NCjxzdmcgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBjbGFzcz0nY2hlY2tib3gtaWNvbi1zdmcgY2hlY2tlZC1zdmcnIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgICA8c3R5bGU+DQogICAgICAgIC5jaGVja2JveC1pY29uLXN2ZyBwYXRoIHsgZmlsbDogIzI5NDA2YTsgfQ0KICAgICAgICAuY2hlY2tlZC1zdmcgcGF0aCB7IGZpbGw6ICNmZGM1NGE7IH0NCiAgICA8L3N0eWxlPg0KICAgIA0KICAgIDxwYXRoIGQ9Ik0xNi4xOSAySDcuODFDNC4xNyAyIDIgNC4xNyAyIDcuODFWMTYuMThDMiAxOS44MyA0LjE3IDIyIDcuODEgMjJIMTYuMThDMTkuODIgMjIgMjEuOTkgMTkuODMgMjEuOTkgMTYuMTlWNy44MUMyMiA0LjE3IDE5LjgzIDIgMTYuMTkgMlpNMTYuNzggOS43TDExLjExIDE1LjM3QzEwLjk3IDE1LjUxIDEwLjc4IDE1LjU5IDEwLjU4IDE1LjU5QzEwLjM4IDE1LjU5IDEwLjE5IDE1LjUxIDEwLjA1IDE1LjM3TDcuMjIgMTIuNTRDNi45MyAxMi4yNSA2LjkzIDExLjc3IDcuMjIgMTEuNDhDNy41MSAxMS4xOSA3Ljk5IDExLjE5IDguMjggMTEuNDhMMTAuNTggMTMuNzhMMTUuNzIgOC42NEMxNi4wMSA4LjM1IDE2LjQ5IDguMzUgMTYuNzggOC42NEMxNy4wNyA4LjkzIDE3LjA3IDkuNCAxNi43OCA5LjdaIiBmaWxsPSIjMjkyRDMyIi8+DQo8L3N2Zz4NCg==";var Ar=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,Ue=(i,t,e,s)=>{for(var n=s>1?void 0:s?Tr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Ar(t,e,n),n};M.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`
1001
1001
  <input type='checkbox' id='genus-checkbox' class='genus-checkbox' @change=${this.getInputValue} value=${this.inputValue} />
1002
1002
  <label class='label genus-checkbox-label' for='genus-checkbox'>
1003
1003
  <span class="label-text">${this.labelText}</span>
@@ -1006,11 +1006,11 @@
1006
1006
  <input type='checkbox' id='genus-checkbox' class='genus-checkbox' @change=${this.getInputValue} value=${this.inputValue} />
1007
1007
  <label class='label genus-checkbox-label genus-checkbox-label--with-icon' for='genus-checkbox'>
1008
1008
  <span class="label-text">${this.labelText}</span>
1009
- <object class="genus-icon checkbox-icon unchecked-icon" data='${wr}' width='18' height='18'></object>
1010
- <object class="genus-icon checkbox-icon checked-icon" data='${vr}' width='18' height='18'></object>
1009
+ <object class="genus-icon checkbox-icon unchecked-icon" data='${vr}' width='18' height='18'></object>
1010
+ <object class="genus-icon checkbox-icon checked-icon" data='${Ir}' width='18' height='18'></object>
1011
1011
  </label>
1012
- `}},v.GenusCheckBox.styles=[Mr,mr,br,xr,yr],Fe([w.property({attribute:"label-text"})],v.GenusCheckBox.prototype,"labelText",2),Fe([w.property({attribute:"input-value"})],v.GenusCheckBox.prototype,"inputValue",2),Fe([w.property({type:Boolean,attribute:"without-icon"})],v.GenusCheckBox.prototype,"withoutIcon",2),v.GenusCheckBox=Fe([w.customElement("genus-checkbox")],v.GenusCheckBox);const Tr=b.css`
1013
- input[type='text'], input[type='email'], input[type='password'], input[type='date']
1012
+ `}},M.GenusCheckBox.styles=[wr,br,xr,yr,Mr],Ue([v.property({attribute:"label-text"})],M.GenusCheckBox.prototype,"labelText",2),Ue([v.property({attribute:"input-value"})],M.GenusCheckBox.prototype,"inputValue",2),Ue([v.property({type:Boolean,attribute:"without-icon"})],M.GenusCheckBox.prototype,"withoutIcon",2),M.GenusCheckBox=Ue([v.customElement("genus-checkbox")],M.GenusCheckBox);const Dr=b.css`
1013
+ input[type='text']
1014
1014
  {
1015
1015
  border: var(--input-border, none);
1016
1016
  padding: var(--input-padding, 1.125rem 0.9375rem);
@@ -1018,18 +1018,9 @@
1018
1018
  color: var(--input-font-color, #213e70);
1019
1019
  }
1020
1020
 
1021
- input[type='text']:focus, input[type='email']:focus, input[type='password']:focus, input[type='date']:focus { outline: none; }
1022
-
1023
- input[type='text']::placeholder,
1024
- input[type='email']::placeholder,
1025
- input[type='password']::placeholder
1026
- { color: var(--input-placeholder-color, #ababab); }
1021
+ input[type='text']:focus { outline: none; }
1027
1022
 
1028
- input[type='date']::-webkit-calendar-picker-indicator, input[type='date']::-webkit-inner-spin-button
1029
- {
1030
- background: transparent;
1031
- z-index: 1;
1032
- }
1023
+ input[type='text']::placeholder { color: var(--input-placeholder-color, #ababab); }
1033
1024
 
1034
1025
  .input-control
1035
1026
  {
@@ -1040,20 +1031,20 @@
1040
1031
  .input-control--without-icon { border-radius: 0.375rem; }
1041
1032
 
1042
1033
  .select-control:hover { cursor: pointer; }
1043
- `,Dr=b.css`
1034
+ `,zr=b.css`
1044
1035
  .input-label
1045
1036
  {
1046
1037
  color: var(--input-label-colour, #213e70);
1047
1038
  justify-self: start;
1048
1039
  grid-area: il;
1049
1040
  }
1050
- `,zr=b.css`
1041
+ `,kr=b.css`
1051
1042
  .icon
1052
1043
  {
1053
1044
  width: 1.5625rem;
1054
1045
  height: 1.5625rem;
1055
1046
  }
1056
- `,Os=b.css`
1047
+ `,Ps=b.css`
1057
1048
  input[type='text']
1058
1049
  {
1059
1050
  font-family: var(--textbox-font-family, 'Sofia Pro');
@@ -1078,7 +1069,7 @@
1078
1069
  font-size: var(--option-item-font-size, 1rem);
1079
1070
  color: var(--option-item-color, #2d2d2d);
1080
1071
  }
1081
- `,kr=b.css`
1072
+ `,Lr=b.css`
1082
1073
  * { box-sizing: border-box; }
1083
1074
 
1084
1075
  .icon-container
@@ -1090,7 +1081,7 @@
1090
1081
  }
1091
1082
 
1092
1083
  .drop-down { position: relative; }
1093
- `,Ps=b.css`
1084
+ `,js=b.css`
1094
1085
  .options
1095
1086
  {
1096
1087
  list-style: none;
@@ -1158,7 +1149,7 @@
1158
1149
  opacity: 1;
1159
1150
  z-index: 1;
1160
1151
  }
1161
- `,Lr=b.css`
1152
+ `,Nr=b.css`
1162
1153
  .form-field
1163
1154
  {
1164
1155
  display: grid;
@@ -1176,19 +1167,19 @@
1176
1167
  grid-row-gap: 0;
1177
1168
  grid-template-areas: 'ic ic ic ic ic icc';
1178
1169
  }
1179
- `,Nr=b.css`
1170
+ `,Cr=b.css`
1180
1171
  .icon-container
1181
1172
  {
1182
1173
  display: flex;
1183
1174
  place-items: center;
1184
1175
  justify-content: center;
1185
1176
  }
1186
- `,js="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDx0aXRsZT5JY29ubHkvTGlnaHQvQXJyb3cgLSBEb3duIDI8L3RpdGxlPg0KICAgIDxnIGlkPSJJY29ubHkvTGlnaHQvQXJyb3ctLS1Eb3duLTIiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+DQogICAgICAgIDxnIGlkPSJBcnJvdy0tLURvd24tMiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNS4wMDAwMDAsIDguNTAwMDAwKSIgc3Ryb2tlPSIjMjAzZTcwIiBzdHJva2Utd2lkdGg9IjEuMjUiPg0KICAgICAgICAgICAgPHBvbHlsaW5lIGlkPSJTdHJva2UtMSIgcG9pbnRzPSIxNCAwIDcgNyAwIDAiPjwvcG9seWxpbmU+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=";var Cr=Object.defineProperty,Sr=Object.getOwnPropertyDescriptor,Tt=(i,t,e,s)=>{for(var n=s>1?void 0:s?Sr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Cr(t,e,n),n};let rt=class extends b.LitElement{constructor(){super(...arguments),this.labelText="",this.inputValue="",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.dispatchEvent(new CustomEvent("selected",{detail:t}))},this.renderDropDownControl=()=>{let i;return this.withoutLabel?i=b.html`
1177
+ `,Es="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICAgIDx0aXRsZT5JY29ubHkvTGlnaHQvQXJyb3cgLSBEb3duIDI8L3RpdGxlPg0KICAgIDxnIGlkPSJJY29ubHkvTGlnaHQvQXJyb3ctLS1Eb3duLTIiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+DQogICAgICAgIDxnIGlkPSJBcnJvdy0tLURvd24tMiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNS4wMDAwMDAsIDguNTAwMDAwKSIgc3Ryb2tlPSIjMjAzZTcwIiBzdHJva2Utd2lkdGg9IjEuMjUiPg0KICAgICAgICAgICAgPHBvbHlsaW5lIGlkPSJTdHJva2UtMSIgcG9pbnRzPSIxNCAwIDcgNyAwIDAiPjwvcG9seWxpbmU+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=";var Sr=Object.defineProperty,Or=Object.getOwnPropertyDescriptor,Tt=(i,t,e,s)=>{for(var n=s>1?void 0:s?Or(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Sr(t,e,n),n};let rt=class extends b.LitElement{constructor(){super(...arguments),this.labelText="",this.inputValue="",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.dispatchEvent(new CustomEvent("selected",{detail:t}))},this.renderDropDownControl=()=>{let i;return this.withoutLabel?i=b.html`
1187
1178
  <div class='drop-down'>
1188
1179
  <div class='form-field form-field--without-label'>
1189
1180
  <input class='input-control select-control' type='text' @click=${this._toggleOptions} placeholder=${this.placeholderText} value=${this.inputValue} readonly />
1190
1181
  <div class='icon-container'>
1191
- <object class="genus-icon input-icon" data='${js}' width='20' height='20'></object>
1182
+ <object class="genus-icon input-icon" data='${Es}' width='20' height='20'></object>
1192
1183
  </div>
1193
1184
  </div>
1194
1185
  <ul class='options options-${this.displayPosition} ${this._showOptionsCSS}' @click=${this.selectOption}>
@@ -1200,17 +1191,17 @@
1200
1191
  <label class='input-label'>${this.labelText}</label>
1201
1192
  <input class='input-control select-control' type='text' @click=${this._toggleOptions} placeholder=${this.placeholderText} value=${this.inputValue} readonly />
1202
1193
  <div class='icon-container'>
1203
- <object class="genus-icon input-icon" data='${js}' width='20' height='20'></object>
1194
+ <object class="genus-icon input-icon" data='${Es}' width='20' height='20'></object>
1204
1195
  </div>
1205
1196
  </div>
1206
1197
  <ul class='options options-${this.displayPosition} ${this._showOptionsCSS}' @click=${this.selectOption}>
1207
1198
  <slot></slot>
1208
1199
  </ul>
1209
- </div>`,i},this._showOptionsCSS="",this._toggleOptions=()=>{this._showOptionsCSS=this._showOptionsCSS?"":`options-${this.displayPosition}--show`}}render(){return this.renderDropDownControl()}};rt.styles=[Tr,Dr,zr,Os,kr,Ps,Lr,Nr],Tt([w.property({attribute:"label-text"})],rt.prototype,"labelText",2),Tt([w.property({attribute:"input-value"})],rt.prototype,"inputValue",2),Tt([w.property({attribute:"placeholder-text"})],rt.prototype,"placeholderText",2),Tt([w.property({attribute:"without-label",type:Boolean})],rt.prototype,"withoutLabel",2),Tt([w.property({attribute:"display-position"})],rt.prototype,"displayPosition",2),Tt([w.property()],rt.prototype,"options",2),Tt([w.state()],rt.prototype,"_showOptionsCSS",2),rt=Tt([w.customElement("genus-dropdown")],rt);var Or=Object.defineProperty,Pr=Object.getOwnPropertyDescriptor,Es=(i,t,e,s)=>{for(var n=s>1?void 0:s?Pr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Or(t,e,n),n};let ue=class extends b.LitElement{constructor(){super(...arguments),this.optionValue=""}render(){return b.html`
1200
+ </div>`,i},this._showOptionsCSS="",this._toggleOptions=()=>{this._showOptionsCSS=this._showOptionsCSS?"":`options-${this.displayPosition}--show`}}render(){return this.renderDropDownControl()}};rt.styles=[Dr,zr,kr,Ps,Lr,js,Nr,Cr],Tt([v.property({attribute:"label-text"})],rt.prototype,"labelText",2),Tt([v.property({attribute:"input-value"})],rt.prototype,"inputValue",2),Tt([v.property({attribute:"placeholder-text"})],rt.prototype,"placeholderText",2),Tt([v.property({attribute:"without-label",type:Boolean})],rt.prototype,"withoutLabel",2),Tt([v.property({attribute:"display-position"})],rt.prototype,"displayPosition",2),Tt([v.property()],rt.prototype,"options",2),Tt([v.state()],rt.prototype,"_showOptionsCSS",2),rt=Tt([v.customElement("genus-dropdown")],rt);var Pr=Object.defineProperty,jr=Object.getOwnPropertyDescriptor,Vs=(i,t,e,s)=>{for(var n=s>1?void 0:s?jr(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Pr(t,e,n),n};let fe=class extends b.LitElement{constructor(){super(...arguments),this.optionValue=""}render(){return b.html`
1210
1201
  <li class='options__list-item' option-value=${this.optionValue}>
1211
1202
  <slot></slot>
1212
1203
  </li>
1213
- `}};ue.styles=[Os,Ps],Es([w.property({attribute:"option-value"})],ue.prototype,"optionValue",2),ue=Es([w.customElement("genus-dropdown-option")],ue);const jr=Object.freeze(Object.defineProperty({__proto__:null,get GenusDropDown(){return rt},get GenusDropDownOption(){return ue}},Symbol.toStringTag,{value:"Module"})),Er=b.css`
1204
+ `}};fe.styles=[Ps,js],Vs([v.property({attribute:"option-value"})],fe.prototype,"optionValue",2),fe=Vs([v.customElement("genus-dropdown-option")],fe);const Er=Object.freeze(Object.defineProperty({__proto__:null,get GenusDropDown(){return rt},get GenusDropDownOption(){return fe}},Symbol.toStringTag,{value:"Module"})),Vr=b.css`
1214
1205
  *
1215
1206
  {
1216
1207
  margin: 0;
@@ -1235,14 +1226,14 @@
1235
1226
  border-top: none;
1236
1227
  background: #fff;
1237
1228
  }
1238
- `,Vr=b.css`
1229
+ `,Br=b.css`
1239
1230
  .chart__title
1240
1231
  {
1241
1232
  font-family: var(--chart-title-font-family, 'Sofia Pro Semi');
1242
1233
  font-size: var(--chart-title-font-size, 1.25rem);
1243
1234
  color: var(--chart-title-color, #2d2d2d);
1244
1235
  }
1245
- `,Br=b.css`
1236
+ `,Rr=b.css`
1246
1237
  .chart__head
1247
1238
  {
1248
1239
  display: flex;
@@ -1254,19 +1245,19 @@
1254
1245
  * https://github.com/kurkle/color#readme
1255
1246
  * (c) 2023 Jukka Kurkela
1256
1247
  * Released under the MIT License
1257
- */function fe(i){return i+.5|0}const Dt=(i,t,e)=>Math.max(Math.min(i,e),t);function ge(i){return Dt(fe(i*2.55),0,255)}function zt(i){return Dt(fe(i*255),0,255)}function mt(i){return Dt(fe(i/2.55)/100,0,1)}function Vs(i){return Dt(fe(i*100),0,100)}const at={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},Pi=[..."0123456789ABCDEF"],Rr=i=>Pi[i&15],Wr=i=>Pi[(i&240)>>4]+Pi[i&15],Ue=i=>(i&240)>>4===(i&15),Hr=i=>Ue(i.r)&&Ue(i.g)&&Ue(i.b)&&Ue(i.a);function Zr(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&at[i[1]]*17,g:255&at[i[2]]*17,b:255&at[i[3]]*17,a:t===5?at[i[4]]*17:255}:(t===7||t===9)&&(e={r:at[i[1]]<<4|at[i[2]],g:at[i[3]]<<4|at[i[4]],b:at[i[5]]<<4|at[i[6]],a:t===9?at[i[7]]<<4|at[i[8]]:255})),e}const Gr=(i,t)=>i<255?t(i):"";function Fr(i){var t=Hr(i)?Rr:Wr;return i?"#"+t(i.r)+t(i.g)+t(i.b)+Gr(i.a,t):void 0}const Ur=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Bs(i,t,e){const s=t*Math.min(e,1-e),n=(o,a=(o+i/30)%12)=>e-s*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function Yr(i,t,e){const s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function Xr(i,t,e){const s=Bs(i,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function Kr(i,t,e,s,n){return i===n?(t-e)/s+(t<e?6:0):t===n?(e-i)/s+2:(i-t)/s+4}function ji(i){const e=i.r/255,s=i.g/255,n=i.b/255,o=Math.max(e,s,n),a=Math.min(e,s,n),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=Kr(e,s,n,h,o),l=l*60+.5),[l|0,c||0,r]}function Ei(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(zt)}function Vi(i,t,e){return Ei(Bs,i,t,e)}function Qr(i,t,e){return Ei(Xr,i,t,e)}function Jr(i,t,e){return Ei(Yr,i,t,e)}function Rs(i){return(i%360+360)%360}function qr(i){const t=Ur.exec(i);let e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?ge(+t[5]):zt(+t[5]));const n=Rs(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?s=Qr(n,o,a):t[1]==="hsv"?s=Jr(n,o,a):s=Vi(n,o,a),{r:s[0],g:s[1],b:s[2],a:e}}function _r(i,t){var e=ji(i);e[0]=Rs(e[0]+t),e=Vi(e),i.r=e[0],i.g=e[1],i.b=e[2]}function $r(i){if(!i)return;const t=ji(i),e=t[0],s=Vs(t[1]),n=Vs(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${mt(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}const Ws={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"},Hs={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 tl(){const i={},t=Object.keys(Hs),e=Object.keys(Ws);let s,n,o,a,r;for(s=0;s<t.length;s++){for(a=r=t[s],n=0;n<e.length;n++)o=e[n],r=r.replace(o,Ws[o]);o=parseInt(Hs[a],16),i[r]=[o>>16&255,o>>8&255,o&255]}return i}let Ye;function el(i){Ye||(Ye=tl(),Ye.transparent=[0,0,0,0]);const t=Ye[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const il=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function sl(i){const t=il.exec(i);let e=255,s,n,o;if(t){if(t[7]!==s){const a=+t[7];e=t[8]?ge(a):Dt(a*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?ge(s):Dt(s,0,255)),n=255&(t[4]?ge(n):Dt(n,0,255)),o=255&(t[6]?ge(o):Dt(o,0,255)),{r:s,g:n,b:o,a:e}}}function nl(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${mt(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const Bi=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,te=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function ol(i,t,e){const s=te(mt(i.r)),n=te(mt(i.g)),o=te(mt(i.b));return{r:zt(Bi(s+e*(te(mt(t.r))-s))),g:zt(Bi(n+e*(te(mt(t.g))-n))),b:zt(Bi(o+e*(te(mt(t.b))-o))),a:i.a+e*(t.a-i.a)}}function Xe(i,t,e){if(i){let s=ji(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=Vi(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function Zs(i,t){return i&&Object.assign(t||{},i)}function Gs(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=zt(i[3]))):(t=Zs(i,{r:0,g:0,b:0,a:1}),t.a=zt(t.a)),t}function al(i){return i.charAt(0)==="r"?sl(i):qr(i)}class pe{constructor(t){if(t instanceof pe)return t;const e=typeof t;let s;e==="object"?s=Gs(t):e==="string"&&(s=Zr(t)||el(t)||al(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=Zs(this._rgb);return t&&(t.a=mt(t.a)),t}set rgb(t){this._rgb=Gs(t)}rgbString(){return this._valid?nl(this._rgb):void 0}hexString(){return this._valid?Fr(this._rgb):void 0}hslString(){return this._valid?$r(this._rgb):void 0}mix(t,e){if(t){const s=this.rgb,n=t.rgb;let o;const a=e===o?.5:e,r=2*a-1,l=s.a-n.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=a*s.a+(1-a)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=ol(this._rgb,t._rgb,e)),this}clone(){return new pe(this.rgb)}alpha(t){return this._rgb.a=zt(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=fe(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}}/*!
1248
+ */function ge(i){return i+.5|0}const Dt=(i,t,e)=>Math.max(Math.min(i,e),t);function pe(i){return Dt(ge(i*2.55),0,255)}function zt(i){return Dt(ge(i*255),0,255)}function mt(i){return Dt(ge(i/2.55)/100,0,1)}function Bs(i){return Dt(ge(i*100),0,100)}const at={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},ji=[..."0123456789ABCDEF"],Wr=i=>ji[i&15],Gr=i=>ji[(i&240)>>4]+ji[i&15],Ye=i=>(i&240)>>4===(i&15),Hr=i=>Ye(i.r)&&Ye(i.g)&&Ye(i.b)&&Ye(i.a);function Zr(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&at[i[1]]*17,g:255&at[i[2]]*17,b:255&at[i[3]]*17,a:t===5?at[i[4]]*17:255}:(t===7||t===9)&&(e={r:at[i[1]]<<4|at[i[2]],g:at[i[3]]<<4|at[i[4]],b:at[i[5]]<<4|at[i[6]],a:t===9?at[i[7]]<<4|at[i[8]]:255})),e}const Fr=(i,t)=>i<255?t(i):"";function Ur(i){var t=Hr(i)?Wr:Gr;return i?"#"+t(i.r)+t(i.g)+t(i.b)+Fr(i.a,t):void 0}const Yr=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Rs(i,t,e){const s=t*Math.min(e,1-e),n=(o,a=(o+i/30)%12)=>e-s*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function Kr(i,t,e){const s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function Xr(i,t,e){const s=Rs(i,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function Qr(i,t,e,s,n){return i===n?(t-e)/s+(t<e?6:0):t===n?(e-i)/s+2:(i-t)/s+4}function Ei(i){const e=i.r/255,s=i.g/255,n=i.b/255,o=Math.max(e,s,n),a=Math.min(e,s,n),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,s,n,h,o),l=l*60+.5),[l|0,c||0,r]}function Vi(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(zt)}function Bi(i,t,e){return Vi(Rs,i,t,e)}function Jr(i,t,e){return Vi(Xr,i,t,e)}function qr(i,t,e){return Vi(Kr,i,t,e)}function Ws(i){return(i%360+360)%360}function _r(i){const t=Yr.exec(i);let e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?pe(+t[5]):zt(+t[5]));const n=Ws(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?s=Jr(n,o,a):t[1]==="hsv"?s=qr(n,o,a):s=Bi(n,o,a),{r:s[0],g:s[1],b:s[2],a:e}}function $r(i,t){var e=Ei(i);e[0]=Ws(e[0]+t),e=Bi(e),i.r=e[0],i.g=e[1],i.b=e[2]}function tl(i){if(!i)return;const t=Ei(i),e=t[0],s=Bs(t[1]),n=Bs(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${mt(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}const Gs={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"},Hs={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(Hs),e=Object.keys(Gs);let s,n,o,a,r;for(s=0;s<t.length;s++){for(a=r=t[s],n=0;n<e.length;n++)o=e[n],r=r.replace(o,Gs[o]);o=parseInt(Hs[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 sl=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function nl(i){const t=sl.exec(i);let e=255,s,n,o;if(t){if(t[7]!==s){const a=+t[7];e=t[8]?pe(a):Dt(a*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?pe(s):Dt(s,0,255)),n=255&(t[4]?pe(n):Dt(n,0,255)),o=255&(t[6]?pe(o):Dt(o,0,255)),{r:s,g:n,b:o,a:e}}}function ol(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${mt(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,ee=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function al(i,t,e){const s=ee(mt(i.r)),n=ee(mt(i.g)),o=ee(mt(i.b));return{r:zt(Ri(s+e*(ee(mt(t.r))-s))),g:zt(Ri(n+e*(ee(mt(t.g))-n))),b:zt(Ri(o+e*(ee(mt(t.b))-o))),a:i.a+e*(t.a-i.a)}}function Xe(i,t,e){if(i){let s=Ei(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=Bi(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function Zs(i,t){return i&&Object.assign(t||{},i)}function Fs(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=zt(i[3]))):(t=Zs(i,{r:0,g:0,b:0,a:1}),t.a=zt(t.a)),t}function rl(i){return i.charAt(0)==="r"?nl(i):_r(i)}class me{constructor(t){if(t instanceof me)return t;const e=typeof t;let s;e==="object"?s=Fs(t):e==="string"&&(s=Zr(t)||il(t)||rl(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=Zs(this._rgb);return t&&(t.a=mt(t.a)),t}set rgb(t){this._rgb=Fs(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 s=this.rgb,n=t.rgb;let o;const a=e===o?.5:e,r=2*a-1,l=s.a-n.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=a*s.a+(1-a)*n.a,this.rgb=s}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=zt(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=ge(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}}/*!
1258
1249
  * Chart.js v4.4.0
1259
1250
  * https://www.chartjs.org
1260
1251
  * (c) 2023 Chart.js Contributors
1261
1252
  * Released under the MIT License
1262
- */function bt(){}const rl=(()=>{let i=0;return()=>i++})();function j(i){return i===null||typeof i>"u"}function R(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 O(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function G(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function st(i,t){return G(i)?i:t}function N(i,t){return typeof i>"u"?t:i}const ll=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,Fs=(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,s){let n,o,a;if(R(i))if(o=i.length,s)for(n=o-1;n>=0;n--)t.call(e,i[n],n);else for(n=0;n<o;n++)t.call(e,i[n],n);else if(O(i))for(a=Object.keys(i),o=a.length,n=0;n<o;n++)t.call(e,i[a[n]],a[n])}function Ke(i,t){let e,s,n,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,s=i.length;e<s;++e)if(n=i[e],o=t[e],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function Qe(i){if(R(i))return i.map(Qe);if(O(i)){const t=Object.create(null),e=Object.keys(i),s=e.length;let n=0;for(;n<s;++n)t[e[n]]=Qe(i[e[n]]);return t}return i}function Us(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function cl(i,t,e,s){if(!Us(i))return;const n=t[i],o=e[i];O(n)&&O(o)?me(n,o,s):t[i]=Qe(o)}function me(i,t,e){const s=R(t)?t:[t],n=s.length;if(!O(i))return i;e=e||{};const o=e.merger||cl;let a;for(let r=0;r<n;++r){if(a=s[r],!O(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 be(i,t){return me(i,t,{merger:hl})}function hl(i,t,e){if(!Us(i))return;const s=t[i],n=e[i];O(s)&&O(n)?be(s,n):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=Qe(n))}const Ys={"":i=>i,x:i=>i.x,y:i=>i.y};function dl(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function ul(i){const t=dl(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function kt(i,t){return(Ys[t]||(Ys[t]=ul(t)))(i)}function Ri(i){return i.charAt(0).toUpperCase()+i.slice(1)}const xe=i=>typeof i<"u",Lt=i=>typeof i=="function",Xs=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function fl(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const W=Math.PI,H=2*W,gl=H+W,Je=Number.POSITIVE_INFINITY,pl=W/180,U=W/2,Et=W/4,Ks=W*2/3,Nt=Math.log10,ut=Math.sign;function ye(i,t,e){return Math.abs(i-t)<e}function Qs(i){const t=Math.round(i);i=ye(i,t,i/1e3)?t:i;const e=Math.pow(10,Math.floor(Nt(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function ml(i){const t=[],e=Math.sqrt(i);let s;for(s=1;s<e;s++)i%s===0&&(t.push(s),t.push(i/s));return e===(e|0)&&t.push(e),t.sort((n,o)=>n-o).pop(),t}function ee(i){return!isNaN(parseFloat(i))&&isFinite(i)}function bl(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function Js(i,t,e){let s,n,o;for(s=0,n=i.length;s<n;s++)o=i[s][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function lt(i){return i*(W/180)}function Wi(i){return i*(180/W)}function qs(i){if(!G(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function _s(i,t){const e=t.x-i.x,s=t.y-i.y,n=Math.sqrt(e*e+s*s);let o=Math.atan2(s,e);return o<-.5*W&&(o+=H),{angle:o,distance:n}}function Hi(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function xl(i,t){return(i-t+gl)%H-W}function nt(i){return(i%H+H)%H}function Me(i,t,e,s){const n=nt(i),o=nt(t),a=nt(e),r=nt(o-n),l=nt(a-n),c=nt(n-o),h=nt(n-a);return n===o||n===a||s&&o===a||r>l&&c<h}function K(i,t,e){return Math.max(t,Math.min(e,i))}function yl(i){return K(i,-32768,32767)}function xt(i,t,e,s=1e-6){return i>=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function Zi(i,t,e){e=e||(a=>i[a]<t);let s=i.length-1,n=0,o;for(;s-n>1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const yt=(i,t,e,s)=>Zi(i,e,s?n=>{const o=i[n][t];return o<e||o===e&&i[n+1][t]===e}:n=>i[n][t]<e),Ml=(i,t,e)=>Zi(i,e,s=>i[s][t]>=e);function wl(i,t,e){let s=0,n=i.length;for(;s<n&&i[s]<t;)s++;for(;n>s&&i[n-1]>e;)n--;return s>0||n<i.length?i.slice(s,n):i}const $s=["push","pop","shift","splice","unshift"];function vl(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),$s.forEach(e=>{const s="_onData"+Ri(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const a=n.apply(this,o);return i._chartjs.listeners.forEach(r=>{typeof r[s]=="function"&&r[s](...o)}),a}})})}function tn(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&($s.forEach(o=>{delete i[o]}),delete i._chartjs)}function en(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const sn=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function nn(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,sn.call(window,()=>{s=!1,i.apply(t,e)}))}}function Il(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const Gi=i=>i==="start"?"left":i==="end"?"right":"center",q=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Al=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function on(i,t,e){const s=t.length;let n=0,o=s;if(i._sorted){const{iScale:a,_parsed:r}=i,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(n=K(Math.min(yt(r,l,c).lo,e?s:yt(t,l,a.getPixelForValue(c)).lo),0,s-1)),u?o=K(Math.max(yt(r,a.axis,h,!0).hi+1,e?0:yt(t,l,a.getPixelForValue(h),!0).hi+1),n,s)-n:o=s-n}return{start:n,count:o}}function an(i){const{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;const o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}const qe=i=>i===0||i===1,rn=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*H/e)),ln=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*H/e)+1,we={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(W*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=>qe(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=>qe(i)?i:rn(i,.075,.3),easeOutElastic:i=>qe(i)?i:ln(i,.075,.3),easeInOutElastic(i){return qe(i)?i:i<.5?.5*rn(i*2,.1125,.45):.5+.5*ln(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-we.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?we.easeInBounce(i*2)*.5:we.easeOutBounce(i*2-1)*.5+.5};function Fi(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function cn(i){return Fi(i)?i:new pe(i)}function Ui(i){return Fi(i)?i:new pe(i).saturate(.5).darken(.1).hexString()}const Tl=["x","y","borderWidth","radius","tension"],Dl=["color","borderColor","backgroundColor"];function zl(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:Dl},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 kl(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const hn=new Map;function Ll(i,t){t=t||{};const e=i+JSON.stringify(t);let s=hn.get(e);return s||(s=new Intl.NumberFormat(i,t),hn.set(e,s)),s}function ve(i,t,e){return Ll(t,e).format(i)}const dn={values(i){return R(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const s=this.chart.options.locale;let n,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)&&(n="scientific"),o=Nl(i,e)}const a=Nt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),ve(i,s,l)},logarithmic(i,t,e){if(i===0)return"0";const s=e[t].significand||i/Math.pow(10,Math.floor(Nt(i)));return[1,2,3,5,10,15].includes(s)||t>.8*e.length?dn.numeric.call(this,i,t,e):""}};function Nl(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:dn};function Cl(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 Vt=Object.create(null),Yi=Object.create(null);function Ie(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;s<n;++s){const o=e[s];i=i[o]||(i[o]=Object.create(null))}return i}function Xi(i,t,e){return typeof t=="string"?me(Ie(i,t),e):me(Ie(i,""),t)}class Sl{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=s=>s.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=(s,n)=>Ui(n.backgroundColor),this.hoverBorderColor=(s,n)=>Ui(n.borderColor),this.hoverColor=(s,n)=>Ui(n.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 Xi(this,t,e)}get(t){return Ie(this,t)}describe(t,e){return Xi(Yi,t,e)}override(t,e){return Xi(Vt,t,e)}route(t,e,s,n){const o=Ie(this,t),a=Ie(this,s),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[r],c=a[n];return O(l)?Object.assign({},c,l):N(l,c)},set(l){this[r]=l}}})}apply(t){t.forEach(e=>e(this))}}var F=new Sl({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[zl,kl,Cl]);function Ol(i){return!i||j(i.size)||j(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function $e(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function Pl(i,t,e,s){s=s||{};let n=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(n=s.data={},o=s.garbageCollect=[],s.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&&!R(d))a=$e(i,n,o,a,d);else if(R(d))for(c=0,h=d.length;c<h;c++)u=d[c],u!=null&&!R(u)&&(a=$e(i,n,o,a,u));i.restore();const f=o.length/2;if(f>e.length){for(l=0;l<f;l++)delete n[o[l]];o.splice(0,f)}return a}function Bt(i,t,e){const s=i.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*s)/s+n}function un(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,s){fn(i,t,e,s,null)}function fn(i,t,e,s,n){let o,a,r,l,c,h,d,u;const f=t.pointStyle,g=t.rotation,p=t.radius;let m=(g||0)*pl;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,s),i.rotate(m),i.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),i.restore();return}if(!(isNaN(p)||p<=0)){switch(i.beginPath(),f){default:n?i.ellipse(e,s,n/2,p,0,0,H):i.arc(e,s,p,0,H),i.closePath();break;case"triangle":h=n?n/2:p,i.moveTo(e+Math.sin(m)*h,s-Math.cos(m)*p),m+=Ks,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*p),m+=Ks,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*p),i.closePath();break;case"rectRounded":c=p*.516,l=p-c,a=Math.cos(m+Et)*l,d=Math.cos(m+Et)*(n?n/2-c:l),r=Math.sin(m+Et)*l,u=Math.sin(m+Et)*(n?n/2-c:l),i.arc(e-d,s-r,c,m-W,m-U),i.arc(e+u,s-a,c,m-U,m),i.arc(e+d,s+r,c,m,m+U),i.arc(e-u,s+a,c,m+U,m+W),i.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*p,h=n?n/2:l,i.rect(e-h,s-l,2*h,2*l);break}m+=Et;case"rectRot":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),i.moveTo(e-d,s-r),i.lineTo(e+u,s-a),i.lineTo(e+d,s+r),i.lineTo(e-u,s+a),i.closePath();break;case"crossRot":m+=Et;case"cross":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),i.moveTo(e-d,s-r),i.lineTo(e+d,s+r),i.moveTo(e+u,s-a),i.lineTo(e-u,s+a);break;case"star":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),i.moveTo(e-d,s-r),i.lineTo(e+d,s+r),i.moveTo(e+u,s-a),i.lineTo(e-u,s+a),m+=Et,d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),i.moveTo(e-d,s-r),i.lineTo(e+d,s+r),i.moveTo(e+u,s-a),i.lineTo(e-u,s+a);break;case"line":a=n?n/2:Math.cos(m)*p,r=Math.sin(m)*p,i.moveTo(e-a,s-r),i.lineTo(e+a,s+r);break;case"dash":i.moveTo(e,s),i.lineTo(e+Math.cos(m)*(n?n/2:p),s+Math.sin(m)*p);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 ti(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function ei(i){i.restore()}function jl(i,t,e,s,n){if(!t)return i.lineTo(e.x,e.y);if(n==="middle"){const o=(t.x+e.x)/2;i.lineTo(o,t.y),i.lineTo(o,e.y)}else n==="after"!=!!s?i.lineTo(t.x,e.y):i.lineTo(e.x,t.y);i.lineTo(e.x,e.y)}function El(i,t,e,s){if(!t)return i.lineTo(e.x,e.y);i.bezierCurveTo(s?t.cp1x:t.cp2x,s?t.cp1y:t.cp2y,s?e.cp2x:e.cp1x,s?e.cp2y:e.cp1y,e.x,e.y)}function Vl(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),j(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 Bl(i,t,e,s,n){if(n.strikethrough||n.underline){const o=i.measureText(s),a=t-o.actualBoundingBoxLeft,r=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,c=e+o.actualBoundingBoxDescent,h=n.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=n.decorationWidth||2,i.moveTo(a,h),i.lineTo(r,h),i.stroke()}}function Rl(i,t){const e=i.fillStyle;i.fillStyle=t.color,i.fillRect(t.left,t.top,t.width,t.height),i.fillStyle=e}function Rt(i,t,e,s,n,o={}){const a=R(t)?t:[t],r=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=n.string,Vl(i,o),l=0;l<a.length;++l)c=a[l],o.backdrop&&Rl(i,o.backdrop),r&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),j(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,e,s,o.maxWidth)),i.fillText(c,e,s,o.maxWidth),Bl(i,e,s,c,o),s+=Number(n.lineHeight);i.restore()}function Ae(i,t){const{x:e,y:s,w:n,h:o,radius:a}=t;i.arc(e+a.topLeft,s+a.topLeft,a.topLeft,1.5*W,W,!0),i.lineTo(e,s+o-a.bottomLeft),i.arc(e+a.bottomLeft,s+o-a.bottomLeft,a.bottomLeft,W,U,!0),i.lineTo(e+n-a.bottomRight,s+o),i.arc(e+n-a.bottomRight,s+o-a.bottomRight,a.bottomRight,U,0,!0),i.lineTo(e+n,s+a.topRight),i.arc(e+n-a.topRight,s+a.topRight,a.topRight,0,-U,!0),i.lineTo(e+a.topLeft,s)}const Wl=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Hl=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Zl(i,t){const e=(""+i).match(Wl);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 Gl=i=>+i||0;function Qi(i,t){const e={},s=O(t),n=s?Object.keys(t):t,o=O(i)?s?a=>N(i[a],i[t[a]]):a=>i[a]:()=>i;for(const a of n)e[a]=Gl(o(a));return e}function gn(i){return Qi(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Wt(i){return Qi(i,["topLeft","topRight","bottomLeft","bottomRight"])}function _(i){const t=gn(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function X(i,t){i=i||{},t=t||F.font;let e=N(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=N(i.style,t.style);s&&!(""+s).match(Hl)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:N(i.family,t.family),lineHeight:Zl(N(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:N(i.weight,t.weight),string:""};return n.string=Ol(n),n}function Te(i,t,e,s){let n=!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),n=!1),e!==void 0&&R(r)&&(r=r[e%r.length],n=!1),r!==void 0))return s&&!n&&(s.cacheable=!1),r}function Fl(i,t,e){const{min:s,max:n}=i,o=Fs(t,(n-s)/2),a=(r,l)=>e&&r===0?0:r+l;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function Ct(i,t){return Object.assign(Object.create(i),t)}function Ji(i,t=[""],e,s,n=()=>i[0]){const o=e||i;typeof s>"u"&&(s=yn("_fallback",i));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:r=>Ji([r,...i],t,o,s)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete i[0][l],!0},get(r,l){return mn(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 Mn(r).includes(l)},ownKeys(r){return Mn(r)},set(r,l,c){const h=r._storage||(r._storage=n());return r[l]=h[l]=c,delete r._keys,!0}})}function ie(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:pn(i,s),setContext:o=>ie(i,o,e,s),override:o=>ie(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,a){return delete o[a],delete i[a],!0},get(o,a,r){return mn(o,a,()=>Yl(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 pn(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:Lt(e)?e:()=>e,isIndexable:Lt(s)?s:()=>s}}const Ul=(i,t)=>i?i+Ri(t):t,qi=(i,t)=>O(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function mn(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];const s=e();return i[t]=s,s}function Yl(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=i;let r=s[t];return Lt(r)&&a.isScriptable(t)&&(r=Xl(t,r,i,e)),R(r)&&r.length&&(r=Kl(t,r,i,a.isIndexable)),qi(t,r)&&(r=ie(r,n,o&&o[t],a)),r}function Xl(i,t,e,s){const{_proxy:n,_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||s);return r.delete(i),qi(i,l)&&(l=_i(n._scopes,n,i,l)),l}function Kl(i,t,e,s){const{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=e;if(typeof o.index<"u"&&s(i))return t[o.index%t.length];if(O(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=_i(c,n,i,h);t.push(ie(d,o,a&&a[i],r))}}return t}function bn(i,t,e){return Lt(i)?i(t,e):i}const Ql=(i,t)=>i===!0?t:typeof i=="string"?kt(t,i):void 0;function Jl(i,t,e,s,n){for(const o of t){const a=Ql(e,o);if(a){i.add(a);const r=bn(a._fallback,e,n);if(typeof r<"u"&&r!==e&&r!==s)return r}else if(a===!1&&typeof s<"u"&&e!==s)return null}return!1}function _i(i,t,e,s){const n=t._rootScopes,o=bn(t._fallback,e,s),a=[...i,...n],r=new Set;r.add(s);let l=xn(r,a,e,o||e,s);return l===null||typeof o<"u"&&o!==e&&(l=xn(r,a,o,l,s),l===null)?!1:Ji(Array.from(r),[""],n,o,()=>ql(t,e,s))}function xn(i,t,e,s,n){for(;e;)e=Jl(i,t,e,s,n);return e}function ql(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return R(n)&&O(e)?e:n||{}}function _l(i,t,e,s){let n;for(const o of t)if(n=yn(Ul(o,i),e),typeof n<"u")return qi(i,n)?_i(e,s,i,n):n}function yn(i,t){for(const e of t){if(!e)continue;const s=e[i];if(typeof s<"u")return s}}function Mn(i){let t=i._keys;return t||(t=i._keys=$l(i._scopes)),t}function $l(i){const t=new Set;for(const e of i)for(const s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}function wn(i,t,e,s){const{iScale:n}=i,{key:o="r"}=this._parsing,a=new Array(s);let r,l,c,h;for(r=0,l=s;r<l;++r)c=r+e,h=t[c],a[r]={r:n.parse(kt(h,o),c)};return a}const tc=Number.EPSILON||1e-14,se=(i,t)=>t<i.length&&!i[t].skip&&i[t],vn=i=>i==="x"?"y":"x";function ec(i,t,e,s){const n=i.skip?t:i,o=t,a=e.skip?t:e,r=Hi(o,n),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=s*c,u=s*h;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function ic(i,t,e){const s=i.length;let n,o,a,r,l,c=se(i,0);for(let h=0;h<s-1;++h)if(l=c,c=se(i,h+1),!(!l||!c)){if(ye(t[h],0,tc)){e[h]=e[h+1]=0;continue}n=e[h]/t[h],o=e[h+1]/t[h],r=Math.pow(n,2)+Math.pow(o,2),!(r<=9)&&(a=3/Math.sqrt(r),e[h]=n*a*t[h],e[h+1]=o*a*t[h])}}function sc(i,t,e="x"){const s=vn(e),n=i.length;let o,a,r,l=se(i,0);for(let c=0;c<n;++c){if(a=r,r=l,l=se(i,c+1),!r)continue;const h=r[e],d=r[s];a&&(o=(h-a[e])/3,r[`cp1${e}`]=h-o,r[`cp1${s}`]=d-o*t[c]),l&&(o=(l[e]-h)/3,r[`cp2${e}`]=h+o,r[`cp2${s}`]=d+o*t[c])}}function nc(i,t="x"){const e=vn(t),s=i.length,n=Array(s).fill(0),o=Array(s);let a,r,l,c=se(i,0);for(a=0;a<s;++a)if(r=l,l=c,c=se(i,a+1),!!l){if(c){const h=c[t]-l[t];n[a]=h!==0?(c[e]-l[e])/h:0}o[a]=r?c?ut(n[a-1])!==ut(n[a])?0:(n[a-1]+n[a])/2:n[a-1]:n[a]}ic(i,n,o),sc(i,o,t)}function ii(i,t,e){return Math.max(Math.min(i,e),t)}function oc(i,t){let e,s,n,o,a,r=Mt(i[0],t);for(e=0,s=i.length;e<s;++e)a=o,o=r,r=e<s-1&&Mt(i[e+1],t),o&&(n=i[e],a&&(n.cp1x=ii(n.cp1x,t.left,t.right),n.cp1y=ii(n.cp1y,t.top,t.bottom)),r&&(n.cp2x=ii(n.cp2x,t.left,t.right),n.cp2y=ii(n.cp2y,t.top,t.bottom)))}function ac(i,t,e,s,n){let o,a,r,l;if(t.spanGaps&&(i=i.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")nc(i,n);else{let c=s?i[i.length-1]:i[0];for(o=0,a=i.length;o<a;++o)r=i[o],l=ec(c,r,i[Math.min(o+1,a-(s?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&&oc(i,e)}function In(){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 s;return typeof i=="string"?(s=parseInt(i,10),i.indexOf("%")!==-1&&(s=s/100*t.parentNode[e])):s=i,s}const ni=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function rc(i,t){return ni(i).getPropertyValue(t)}const lc=["top","right","bottom","left"];function Ht(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=lc[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const cc=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function hc(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let a=!1,r,l;if(cc(n,o,i.target))r=n,l=o;else{const c=t.getBoundingClientRect();r=s.clientX-c.left,l=s.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function Zt(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=ni(e),o=n.boxSizing==="border-box",a=Ht(n,"padding"),r=Ht(n,"border","width"),{x:l,y:c,box:h}=hc(i,e),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:g}=t;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*e.width/s),y:Math.round((c-u)/g*e.height/s)}}function dc(i,t,e){let s,n;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=ni(o),l=Ht(r,"border","width"),c=Ht(r,"padding");t=a.width-c.width-l.width,e=a.height-c.height-l.height,s=si(r.maxWidth,o,"clientWidth"),n=si(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||Je,maxHeight:n||Je}}const oi=i=>Math.round(i*10)/10;function uc(i,t,e,s){const n=ni(i),o=Ht(n,"margin"),a=si(n.maxWidth,i,"clientWidth")||Je,r=si(n.maxHeight,i,"clientHeight")||Je,l=dc(i,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const u=Ht(n,"border","width"),f=Ht(n,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=oi(Math.min(c,a,l.maxWidth)),h=oi(Math.min(h,r,l.maxHeight)),c&&!h&&(h=oi(c/2)),(t!==void 0||e!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=oi(Math.floor(h*s))),{width:c,height:h}}function An(i,t,e){const s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);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!==s||a.height!==n||a.width!==o?(i.currentDevicePixelRatio=s,a.height=n,a.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const fc=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 Tn(i,t){const e=rc(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function Gt(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function gc(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function pc(i,t,e,s){const n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},a=Gt(i,n,e),r=Gt(n,o,e),l=Gt(o,t,e),c=Gt(a,r,e),h=Gt(r,l,e);return Gt(c,h,e)}const mc=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,s){return e-s},leftForLtr(e,s){return e-s}}},bc=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function ne(i,t,e){return i?mc(t,e):bc()}function Dn(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function zn(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function kn(i){return i==="angle"?{between:Me,compare:xl,normalize:nt}:{between:xt,compare:(t,e)=>t-e,normalize:t=>t}}function Ln({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function xc(i,t,e){const{property:s,start:n,end:o}=e,{between:a,normalize:r}=kn(s),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][s]),n,o);++u)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:i.style}}function Nn(i,t,e){if(!e)return[i];const{property:s,start:n,end:o}=e,a=t.length,{compare:r,between:l,normalize:c}=kn(s),{start:h,end:d,loop:u,style:f}=xc(i,t,e),g=[];let p=!1,m=null,x,y,A;const I=()=>l(n,A,x)&&r(n,A)!==0,M=()=>r(o,x)===0||l(o,A,x),D=()=>p||I(),z=()=>!p||M();for(let k=h,L=h;k<=d;++k)y=t[k%a],!y.skip&&(x=c(y[s]),x!==A&&(p=l(x,n,o),m===null&&D()&&(m=r(x,n)===0?k:L),m!==null&&z()&&(g.push(Ln({start:m,end:k,loop:u,count:a,style:f})),m=null),L=k,A=x));return m!==null&&g.push(Ln({start:m,end:d,loop:u,count:a,style:f})),g}function Cn(i,t){const e=[],s=i.segments;for(let n=0;n<s.length;n++){const o=Nn(s[n],i.points,t);o.length&&e.push(...o)}return e}function yc(i,t,e,s){let n=0,o=t-1;if(e&&!s)for(;n<t&&!i[n].skip;)n++;for(;n<t&&i[n].skip;)n++;for(n%=t,e&&(o+=n);o>n&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function Mc(i,t,e,s){const n=i.length,o=[];let a=t,r=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%n];c.skip||c.stop?r.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=a=c.stop?l:null):(a=l,r.skip&&(t=l)),r=c}return a!==null&&o.push({start:t%n,end:a%n,loop:s}),o}function wc(i,t){const e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];const o=!!i._loop,{start:a,end:r}=yc(e,n,o,s);if(s===!0)return Sn(i,[{start:a,end:r,loop:o}],e,t);const l=r<a?r+n:r,c=!!i._fullLoop&&a===0&&r===n-1;return Sn(i,Mc(e,a,l,c),e,t)}function Sn(i,t,e,s){return!s||!s.setContext||!e?t:vc(i,t,e,s)}function vc(i,t,e,s){const n=i._chart.getContext(),o=On(i.options),{_datasetIndex:a,options:{spanGaps:r}}=i,l=e.length,c=[];let h=o,d=t[0].start,u=d;function f(g,p,m,x){const y=r?-1:1;if(g!==p){for(g+=l;e[g%l].skip;)g-=y;for(;e[p%l].skip;)p+=y;g%l!==p%l&&(c.push({start:g%l,end:p%l,loop:m,style:x}),h=x,d=p%l)}}for(const g of t){d=r?d:g.start;let p=e[d%l],m;for(u=d+1;u<=g.end;u++){const x=e[u%l];m=On(s.setContext(Ct(n,{type:"segment",p0:p,p1:x,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:a}))),Ic(m,h)&&f(d,u-1,g.loop,h),p=x,h=m}d<u-1&&f(d,u-1,g.loop,h)}return c}function On(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Ic(i,t){if(!t)return!1;const e=[],s=function(n,o){return Fi(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(i,s)!==JSON.stringify(t,s)}/*!
1253
+ */function bt(){}const ll=(()=>{let i=0;return()=>i++})();function j(i){return i===null||typeof i>"u"}function R(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 O(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function Z(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function st(i,t){return Z(i)?i:t}function N(i,t){return typeof i>"u"?t:i}const cl=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,Us=(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,s){let n,o,a;if(R(i))if(o=i.length,s)for(n=o-1;n>=0;n--)t.call(e,i[n],n);else for(n=0;n<o;n++)t.call(e,i[n],n);else if(O(i))for(a=Object.keys(i),o=a.length,n=0;n<o;n++)t.call(e,i[a[n]],a[n])}function Qe(i,t){let e,s,n,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,s=i.length;e<s;++e)if(n=i[e],o=t[e],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function Je(i){if(R(i))return i.map(Je);if(O(i)){const t=Object.create(null),e=Object.keys(i),s=e.length;let n=0;for(;n<s;++n)t[e[n]]=Je(i[e[n]]);return t}return i}function Ys(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function hl(i,t,e,s){if(!Ys(i))return;const n=t[i],o=e[i];O(n)&&O(o)?be(n,o,s):t[i]=Je(o)}function be(i,t,e){const s=R(t)?t:[t],n=s.length;if(!O(i))return i;e=e||{};const o=e.merger||hl;let a;for(let r=0;r<n;++r){if(a=s[r],!O(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(!Ys(i))return;const s=t[i],n=e[i];O(s)&&O(n)?xe(s,n):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=Je(n))}const Ks={"":i=>i,x:i=>i.x,y:i=>i.y};function ul(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function fl(i){const t=ul(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function kt(i,t){return(Ks[t]||(Ks[t]=fl(t)))(i)}function Wi(i){return i.charAt(0).toUpperCase()+i.slice(1)}const ye=i=>typeof i<"u",Lt=i=>typeof i=="function",Xs=(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 W=Math.PI,G=2*W,pl=G+W,qe=Number.POSITIVE_INFINITY,ml=W/180,U=W/2,Et=W/4,Qs=W*2/3,Nt=Math.log10,ut=Math.sign;function Me(i,t,e){return Math.abs(i-t)<e}function Js(i){const t=Math.round(i);i=Me(i,t,i/1e3)?t:i;const e=Math.pow(10,Math.floor(Nt(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function bl(i){const t=[],e=Math.sqrt(i);let s;for(s=1;s<e;s++)i%s===0&&(t.push(s),t.push(i/s));return e===(e|0)&&t.push(e),t.sort((n,o)=>n-o).pop(),t}function ie(i){return!isNaN(parseFloat(i))&&isFinite(i)}function xl(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function qs(i,t,e){let s,n,o;for(s=0,n=i.length;s<n;s++)o=i[s][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function lt(i){return i*(W/180)}function Gi(i){return i*(180/W)}function _s(i){if(!Z(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function $s(i,t){const e=t.x-i.x,s=t.y-i.y,n=Math.sqrt(e*e+s*s);let o=Math.atan2(s,e);return o<-.5*W&&(o+=G),{angle:o,distance:n}}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+pl)%G-W}function nt(i){return(i%G+G)%G}function we(i,t,e,s){const n=nt(i),o=nt(t),a=nt(e),r=nt(o-n),l=nt(a-n),c=nt(n-o),h=nt(n-a);return n===o||n===a||s&&o===a||r>l&&c<h}function X(i,t,e){return Math.max(t,Math.min(e,i))}function Ml(i){return X(i,-32768,32767)}function xt(i,t,e,s=1e-6){return i>=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function Zi(i,t,e){e=e||(a=>i[a]<t);let s=i.length-1,n=0,o;for(;s-n>1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const yt=(i,t,e,s)=>Zi(i,e,s?n=>{const o=i[n][t];return o<e||o===e&&i[n+1][t]===e}:n=>i[n][t]<e),wl=(i,t,e)=>Zi(i,e,s=>i[s][t]>=e);function vl(i,t,e){let s=0,n=i.length;for(;s<n&&i[s]<t;)s++;for(;n>s&&i[n-1]>e;)n--;return s>0||n<i.length?i.slice(s,n):i}const tn=["push","pop","shift","splice","unshift"];function Il(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),tn.forEach(e=>{const s="_onData"+Wi(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const a=n.apply(this,o);return i._chartjs.listeners.forEach(r=>{typeof r[s]=="function"&&r[s](...o)}),a}})})}function en(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(tn.forEach(o=>{delete i[o]}),delete i._chartjs)}function sn(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const nn=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function on(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,nn.call(window,()=>{s=!1,i.apply(t,e)}))}}function Al(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const Fi=i=>i==="start"?"left":i==="end"?"right":"center",q=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Tl=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function an(i,t,e){const s=t.length;let n=0,o=s;if(i._sorted){const{iScale:a,_parsed:r}=i,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(n=X(Math.min(yt(r,l,c).lo,e?s:yt(t,l,a.getPixelForValue(c)).lo),0,s-1)),u?o=X(Math.max(yt(r,a.axis,h,!0).hi+1,e?0:yt(t,l,a.getPixelForValue(h),!0).hi+1),n,s)-n:o=s-n}return{start:n,count:o}}function rn(i){const{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;const o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}const _e=i=>i===0||i===1,ln=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*G/e)),cn=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*G/e)+1,ve={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(W*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:ln(i,.075,.3),easeOutElastic:i=>_e(i)?i:cn(i,.075,.3),easeInOutElastic(i){return _e(i)?i:i<.5?.5*ln(i*2,.1125,.45):.5+.5*cn(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-ve.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?ve.easeInBounce(i*2)*.5:ve.easeOutBounce(i*2-1)*.5+.5};function Ui(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function hn(i){return Ui(i)?i:new me(i)}function Yi(i){return Ui(i)?i:new me(i).saturate(.5).darken(.1).hexString()}const Dl=["x","y","borderWidth","radius","tension"],zl=["color","borderColor","backgroundColor"];function kl(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:zl},numbers:{type:"number",properties:Dl}}),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 dn=new Map;function Nl(i,t){t=t||{};const e=i+JSON.stringify(t);let s=dn.get(e);return s||(s=new Intl.NumberFormat(i,t),dn.set(e,s)),s}function Ie(i,t,e){return Nl(t,e).format(i)}const un={values(i){return R(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const s=this.chart.options.locale;let n,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)&&(n="scientific"),o=Cl(i,e)}const a=Nt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Ie(i,s,l)},logarithmic(i,t,e){if(i===0)return"0";const s=e[t].significand||i/Math.pow(10,Math.floor(Nt(i)));return[1,2,3,5,10,15].includes(s)||t>.8*e.length?un.numeric.call(this,i,t,e):""}};function Cl(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:un};function Sl(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 Vt=Object.create(null),Ki=Object.create(null);function Ae(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;s<n;++s){const o=e[s];i=i[o]||(i[o]=Object.create(null))}return i}function Xi(i,t,e){return typeof t=="string"?be(Ae(i,t),e):be(Ae(i,""),t)}class Ol{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=s=>s.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=(s,n)=>Yi(n.backgroundColor),this.hoverBorderColor=(s,n)=>Yi(n.borderColor),this.hoverColor=(s,n)=>Yi(n.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 Xi(this,t,e)}get(t){return Ae(this,t)}describe(t,e){return Xi(Ki,t,e)}override(t,e){return Xi(Vt,t,e)}route(t,e,s,n){const o=Ae(this,t),a=Ae(this,s),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[r],c=a[n];return O(l)?Object.assign({},c,l):N(l,c)},set(l){this[r]=l}}})}apply(t){t.forEach(e=>e(this))}}var F=new Ol({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[kl,Ll,Sl]);function Pl(i){return!i||j(i.size)||j(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function ti(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function jl(i,t,e,s){s=s||{};let n=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(n=s.data={},o=s.garbageCollect=[],s.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&&!R(d))a=ti(i,n,o,a,d);else if(R(d))for(c=0,h=d.length;c<h;c++)u=d[c],u!=null&&!R(u)&&(a=ti(i,n,o,a,u));i.restore();const f=o.length/2;if(f>e.length){for(l=0;l<f;l++)delete n[o[l]];o.splice(0,f)}return a}function Bt(i,t,e){const s=i.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*s)/s+n}function fn(i,t){t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore()}function Qi(i,t,e,s){gn(i,t,e,s,null)}function gn(i,t,e,s,n){let o,a,r,l,c,h,d,u;const f=t.pointStyle,g=t.rotation,p=t.radius;let m=(g||0)*ml;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,s),i.rotate(m),i.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),i.restore();return}if(!(isNaN(p)||p<=0)){switch(i.beginPath(),f){default:n?i.ellipse(e,s,n/2,p,0,0,G):i.arc(e,s,p,0,G),i.closePath();break;case"triangle":h=n?n/2:p,i.moveTo(e+Math.sin(m)*h,s-Math.cos(m)*p),m+=Qs,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*p),m+=Qs,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*p),i.closePath();break;case"rectRounded":c=p*.516,l=p-c,a=Math.cos(m+Et)*l,d=Math.cos(m+Et)*(n?n/2-c:l),r=Math.sin(m+Et)*l,u=Math.sin(m+Et)*(n?n/2-c:l),i.arc(e-d,s-r,c,m-W,m-U),i.arc(e+u,s-a,c,m-U,m),i.arc(e+d,s+r,c,m,m+U),i.arc(e-u,s+a,c,m+U,m+W),i.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*p,h=n?n/2:l,i.rect(e-h,s-l,2*h,2*l);break}m+=Et;case"rectRot":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),i.moveTo(e-d,s-r),i.lineTo(e+u,s-a),i.lineTo(e+d,s+r),i.lineTo(e-u,s+a),i.closePath();break;case"crossRot":m+=Et;case"cross":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),i.moveTo(e-d,s-r),i.lineTo(e+d,s+r),i.moveTo(e+u,s-a),i.lineTo(e-u,s+a);break;case"star":d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),i.moveTo(e-d,s-r),i.lineTo(e+d,s+r),i.moveTo(e+u,s-a),i.lineTo(e-u,s+a),m+=Et,d=Math.cos(m)*(n?n/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),i.moveTo(e-d,s-r),i.lineTo(e+d,s+r),i.moveTo(e+u,s-a),i.lineTo(e-u,s+a);break;case"line":a=n?n/2:Math.cos(m)*p,r=Math.sin(m)*p,i.moveTo(e-a,s-r),i.lineTo(e+a,s+r);break;case"dash":i.moveTo(e,s),i.lineTo(e+Math.cos(m)*(n?n/2:p),s+Math.sin(m)*p);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,s,n){if(!t)return i.lineTo(e.x,e.y);if(n==="middle"){const o=(t.x+e.x)/2;i.lineTo(o,t.y),i.lineTo(o,e.y)}else n==="after"!=!!s?i.lineTo(t.x,e.y):i.lineTo(e.x,t.y);i.lineTo(e.x,e.y)}function Vl(i,t,e,s){if(!t)return i.lineTo(e.x,e.y);i.bezierCurveTo(s?t.cp1x:t.cp2x,s?t.cp1y:t.cp2y,s?e.cp2x:e.cp1x,s?e.cp2y:e.cp1y,e.x,e.y)}function Bl(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),j(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 Rl(i,t,e,s,n){if(n.strikethrough||n.underline){const o=i.measureText(s),a=t-o.actualBoundingBoxLeft,r=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,c=e+o.actualBoundingBoxDescent,h=n.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=n.decorationWidth||2,i.moveTo(a,h),i.lineTo(r,h),i.stroke()}}function Wl(i,t){const e=i.fillStyle;i.fillStyle=t.color,i.fillRect(t.left,t.top,t.width,t.height),i.fillStyle=e}function Rt(i,t,e,s,n,o={}){const a=R(t)?t:[t],r=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=n.string,Bl(i,o),l=0;l<a.length;++l)c=a[l],o.backdrop&&Wl(i,o.backdrop),r&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),j(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,e,s,o.maxWidth)),i.fillText(c,e,s,o.maxWidth),Rl(i,e,s,c,o),s+=Number(n.lineHeight);i.restore()}function Te(i,t){const{x:e,y:s,w:n,h:o,radius:a}=t;i.arc(e+a.topLeft,s+a.topLeft,a.topLeft,1.5*W,W,!0),i.lineTo(e,s+o-a.bottomLeft),i.arc(e+a.bottomLeft,s+o-a.bottomLeft,a.bottomLeft,W,U,!0),i.lineTo(e+n-a.bottomRight,s+o),i.arc(e+n-a.bottomRight,s+o-a.bottomRight,a.bottomRight,U,0,!0),i.lineTo(e+n,s+a.topRight),i.arc(e+n-a.topRight,s+a.topRight,a.topRight,0,-U,!0),i.lineTo(e+a.topLeft,s)}const Gl=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Hl=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Zl(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 Fl=i=>+i||0;function Ji(i,t){const e={},s=O(t),n=s?Object.keys(t):t,o=O(i)?s?a=>N(i[a],i[t[a]]):a=>i[a]:()=>i;for(const a of n)e[a]=Fl(o(a));return e}function pn(i){return Ji(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Wt(i){return Ji(i,["topLeft","topRight","bottomLeft","bottomRight"])}function _(i){const t=pn(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function K(i,t){i=i||{},t=t||F.font;let e=N(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=N(i.style,t.style);s&&!(""+s).match(Hl)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:N(i.family,t.family),lineHeight:Zl(N(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:N(i.weight,t.weight),string:""};return n.string=Pl(n),n}function De(i,t,e,s){let n=!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),n=!1),e!==void 0&&R(r)&&(r=r[e%r.length],n=!1),r!==void 0))return s&&!n&&(s.cacheable=!1),r}function Ul(i,t,e){const{min:s,max:n}=i,o=Us(t,(n-s)/2),a=(r,l)=>e&&r===0?0:r+l;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function Ct(i,t){return Object.assign(Object.create(i),t)}function qi(i,t=[""],e,s,n=()=>i[0]){const o=e||i;typeof s>"u"&&(s=Mn("_fallback",i));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:r=>qi([r,...i],t,o,s)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete i[0][l],!0},get(r,l){return bn(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 wn(r).includes(l)},ownKeys(r){return wn(r)},set(r,l,c){const h=r._storage||(r._storage=n());return r[l]=h[l]=c,delete r._keys,!0}})}function se(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:mn(i,s),setContext:o=>se(i,o,e,s),override:o=>se(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,a){return delete o[a],delete i[a],!0},get(o,a,r){return bn(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 mn(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:Lt(e)?e:()=>e,isIndexable:Lt(s)?s:()=>s}}const Yl=(i,t)=>i?i+Wi(t):t,_i=(i,t)=>O(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function bn(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];const s=e();return i[t]=s,s}function Kl(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=i;let r=s[t];return Lt(r)&&a.isScriptable(t)&&(r=Xl(t,r,i,e)),R(r)&&r.length&&(r=Ql(t,r,i,a.isIndexable)),_i(t,r)&&(r=se(r,n,o&&o[t],a)),r}function Xl(i,t,e,s){const{_proxy:n,_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||s);return r.delete(i),_i(i,l)&&(l=$i(n._scopes,n,i,l)),l}function Ql(i,t,e,s){const{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=e;if(typeof o.index<"u"&&s(i))return t[o.index%t.length];if(O(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=$i(c,n,i,h);t.push(se(d,o,a&&a[i],r))}}return t}function xn(i,t,e){return Lt(i)?i(t,e):i}const Jl=(i,t)=>i===!0?t:typeof i=="string"?kt(t,i):void 0;function ql(i,t,e,s,n){for(const o of t){const a=Jl(e,o);if(a){i.add(a);const r=xn(a._fallback,e,n);if(typeof r<"u"&&r!==e&&r!==s)return r}else if(a===!1&&typeof s<"u"&&e!==s)return null}return!1}function $i(i,t,e,s){const n=t._rootScopes,o=xn(t._fallback,e,s),a=[...i,...n],r=new Set;r.add(s);let l=yn(r,a,e,o||e,s);return l===null||typeof o<"u"&&o!==e&&(l=yn(r,a,o,l,s),l===null)?!1:qi(Array.from(r),[""],n,o,()=>_l(t,e,s))}function yn(i,t,e,s,n){for(;e;)e=ql(i,t,e,s,n);return e}function _l(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return R(n)&&O(e)?e:n||{}}function $l(i,t,e,s){let n;for(const o of t)if(n=Mn(Yl(o,i),e),typeof n<"u")return _i(i,n)?$i(e,s,i,n):n}function Mn(i,t){for(const e of t){if(!e)continue;const s=e[i];if(typeof s<"u")return s}}function wn(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 s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}function vn(i,t,e,s){const{iScale:n}=i,{key:o="r"}=this._parsing,a=new Array(s);let r,l,c,h;for(r=0,l=s;r<l;++r)c=r+e,h=t[c],a[r]={r:n.parse(kt(h,o),c)};return a}const ec=Number.EPSILON||1e-14,ne=(i,t)=>t<i.length&&!i[t].skip&&i[t],In=i=>i==="x"?"y":"x";function ic(i,t,e,s){const n=i.skip?t:i,o=t,a=e.skip?t:e,r=Hi(o,n),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=s*c,u=s*h;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function sc(i,t,e){const s=i.length;let n,o,a,r,l,c=ne(i,0);for(let h=0;h<s-1;++h)if(l=c,c=ne(i,h+1),!(!l||!c)){if(Me(t[h],0,ec)){e[h]=e[h+1]=0;continue}n=e[h]/t[h],o=e[h+1]/t[h],r=Math.pow(n,2)+Math.pow(o,2),!(r<=9)&&(a=3/Math.sqrt(r),e[h]=n*a*t[h],e[h+1]=o*a*t[h])}}function nc(i,t,e="x"){const s=In(e),n=i.length;let o,a,r,l=ne(i,0);for(let c=0;c<n;++c){if(a=r,r=l,l=ne(i,c+1),!r)continue;const h=r[e],d=r[s];a&&(o=(h-a[e])/3,r[`cp1${e}`]=h-o,r[`cp1${s}`]=d-o*t[c]),l&&(o=(l[e]-h)/3,r[`cp2${e}`]=h+o,r[`cp2${s}`]=d+o*t[c])}}function oc(i,t="x"){const e=In(t),s=i.length,n=Array(s).fill(0),o=Array(s);let a,r,l,c=ne(i,0);for(a=0;a<s;++a)if(r=l,l=c,c=ne(i,a+1),!!l){if(c){const h=c[t]-l[t];n[a]=h!==0?(c[e]-l[e])/h:0}o[a]=r?c?ut(n[a-1])!==ut(n[a])?0:(n[a-1]+n[a])/2:n[a-1]:n[a]}sc(i,n,o),nc(i,o,t)}function si(i,t,e){return Math.max(Math.min(i,e),t)}function ac(i,t){let e,s,n,o,a,r=Mt(i[0],t);for(e=0,s=i.length;e<s;++e)a=o,o=r,r=e<s-1&&Mt(i[e+1],t),o&&(n=i[e],a&&(n.cp1x=si(n.cp1x,t.left,t.right),n.cp1y=si(n.cp1y,t.top,t.bottom)),r&&(n.cp2x=si(n.cp2x,t.left,t.right),n.cp2y=si(n.cp2y,t.top,t.bottom)))}function rc(i,t,e,s,n){let o,a,r,l;if(t.spanGaps&&(i=i.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")oc(i,n);else{let c=s?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-(s?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 An(){return typeof window<"u"&&typeof document<"u"}function ts(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function ni(i,t,e){let s;return typeof i=="string"?(s=parseInt(i,10),i.indexOf("%")!==-1&&(s=s/100*t.parentNode[e])):s=i,s}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 Gt(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=cc[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const hc=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function dc(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let a=!1,r,l;if(hc(n,o,i.target))r=n,l=o;else{const c=t.getBoundingClientRect();r=s.clientX-c.left,l=s.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function Ht(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=oi(e),o=n.boxSizing==="border-box",a=Gt(n,"padding"),r=Gt(n,"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:g}=t;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*e.width/s),y:Math.round((c-u)/g*e.height/s)}}function uc(i,t,e){let s,n;if(t===void 0||e===void 0){const o=ts(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const a=o.getBoundingClientRect(),r=oi(o),l=Gt(r,"border","width"),c=Gt(r,"padding");t=a.width-c.width-l.width,e=a.height-c.height-l.height,s=ni(r.maxWidth,o,"clientWidth"),n=ni(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||qe,maxHeight:n||qe}}const ai=i=>Math.round(i*10)/10;function fc(i,t,e,s){const n=oi(i),o=Gt(n,"margin"),a=ni(n.maxWidth,i,"clientWidth")||qe,r=ni(n.maxHeight,i,"clientHeight")||qe,l=uc(i,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const u=Gt(n,"border","width"),f=Gt(n,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s: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)&&s&&l.height&&h>l.height&&(h=l.height,c=ai(Math.floor(h*s))),{width:c,height:h}}function Tn(i,t,e){const s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);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!==s||a.height!==n||a.width!==o?(i.currentDevicePixelRatio=s,a.height=n,a.width=o,i.ctx.setTransform(s,0,0,s,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 Dn(i,t){const e=lc(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function Zt(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function pc(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function mc(i,t,e,s){const n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},a=Zt(i,n,e),r=Zt(n,o,e),l=Zt(o,t,e),c=Zt(a,r,e),h=Zt(r,l,e);return Zt(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,s){return e-s},leftForLtr(e,s){return e-s}}},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 oe(i,t,e){return i?bc(t,e):xc()}function zn(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function kn(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function Ln(i){return i==="angle"?{between:we,compare:yl,normalize:nt}:{between:xt,compare:(t,e)=>t-e,normalize:t=>t}}function Nn({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function yc(i,t,e){const{property:s,start:n,end:o}=e,{between:a,normalize:r}=Ln(s),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][s]),n,o);++u)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:i.style}}function Cn(i,t,e){if(!e)return[i];const{property:s,start:n,end:o}=e,a=t.length,{compare:r,between:l,normalize:c}=Ln(s),{start:h,end:d,loop:u,style:f}=yc(i,t,e),g=[];let p=!1,m=null,x,y,A;const I=()=>l(n,A,x)&&r(n,A)!==0,w=()=>r(o,x)===0||l(o,A,x),D=()=>p||I(),z=()=>!p||w();for(let k=h,L=h;k<=d;++k)y=t[k%a],!y.skip&&(x=c(y[s]),x!==A&&(p=l(x,n,o),m===null&&D()&&(m=r(x,n)===0?k:L),m!==null&&z()&&(g.push(Nn({start:m,end:k,loop:u,count:a,style:f})),m=null),L=k,A=x));return m!==null&&g.push(Nn({start:m,end:d,loop:u,count:a,style:f})),g}function Sn(i,t){const e=[],s=i.segments;for(let n=0;n<s.length;n++){const o=Cn(s[n],i.points,t);o.length&&e.push(...o)}return e}function Mc(i,t,e,s){let n=0,o=t-1;if(e&&!s)for(;n<t&&!i[n].skip;)n++;for(;n<t&&i[n].skip;)n++;for(n%=t,e&&(o+=n);o>n&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function wc(i,t,e,s){const n=i.length,o=[];let a=t,r=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%n];c.skip||c.stop?r.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=a=c.stop?l:null):(a=l,r.skip&&(t=l)),r=c}return a!==null&&o.push({start:t%n,end:a%n,loop:s}),o}function vc(i,t){const e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];const o=!!i._loop,{start:a,end:r}=Mc(e,n,o,s);if(s===!0)return On(i,[{start:a,end:r,loop:o}],e,t);const l=r<a?r+n:r,c=!!i._fullLoop&&a===0&&r===n-1;return On(i,wc(e,a,l,c),e,t)}function On(i,t,e,s){return!s||!s.setContext||!e?t:Ic(i,t,e,s)}function Ic(i,t,e,s){const n=i._chart.getContext(),o=Pn(i.options),{_datasetIndex:a,options:{spanGaps:r}}=i,l=e.length,c=[];let h=o,d=t[0].start,u=d;function f(g,p,m,x){const y=r?-1:1;if(g!==p){for(g+=l;e[g%l].skip;)g-=y;for(;e[p%l].skip;)p+=y;g%l!==p%l&&(c.push({start:g%l,end:p%l,loop:m,style:x}),h=x,d=p%l)}}for(const g of t){d=r?d:g.start;let p=e[d%l],m;for(u=d+1;u<=g.end;u++){const x=e[u%l];m=Pn(s.setContext(Ct(n,{type:"segment",p0:p,p1:x,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:a}))),Ac(m,h)&&f(d,u-1,g.loop,h),p=x,h=m}d<u-1&&f(d,u-1,g.loop,h)}return c}function Pn(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Ac(i,t){if(!t)return!1;const e=[],s=function(n,o){return Ui(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(i,s)!==JSON.stringify(t,s)}/*!
1263
1254
  * Chart.js v4.4.0
1264
1255
  * https://www.chartjs.org
1265
1256
  * (c) 2023 Chart.js Contributors
1266
1257
  * Released under the MIT License
1267
- */class Ac{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,s,n){const o=e.listeners[n],a=e.duration;o.forEach(r=>r({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(s-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=sn.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}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((s,n)=>Math.max(s,n._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 s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var wt=new Ac;const Pn="transparent",Tc={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=cn(i||Pn),n=s.valid&&cn(t||Pn);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class Dc{constructor(t,e,s,n){const o=e[s];n=Te([t.to,n,o,t.from]);const a=Te([t.from,o,n]);this._active=!0,this._fn=t.fn||Tc[t.type||typeof a],this._easing=we[t.easing]||we.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=s,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,a=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Te([t.to,e,n,t.from]),this._from=Te([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to;let l;if(this._active=o!==r&&(a||e<s),!this._active){this._target[n]=r,this._notify(!0);return}if(e<0){this._target[n]=o;return}l=e/s%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,r,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n<s.length;n++)s[n][e]()}}class jn{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!O(t))return;const e=Object.keys(F.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const o=t[n];if(!O(o))return;const a={};for(const r of e)a[r]=o[r];(R(o.properties)&&o.properties||[n]).forEach(r=>{(r===n||!s.has(r))&&s.set(r,a)})})}_animateOptions(t,e){const s=e.options,n=kc(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&zc(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],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"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const u=s.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 Dc(u,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return wt.add(this._chart,s),!0}}function zc(i,t){const e=[],s=Object.keys(t);for(let n=0;n<s.length;n++){const o=i[s[n]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function kc(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 En(i,t){const e=i&&i.options||{},s=e.reverse,n=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:s?o:n,end:s?n:o}}function Lc(i,t,e){if(e===!1)return!1;const s=En(i,e),n=En(t,e);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}function Nc(i){let t,e,s,n;return O(i)?(t=i.top,e=i.right,s=i.bottom,n=i.left):t=e=s=n=i,{top:t,right:e,bottom:s,left:n,disabled:i===!1}}function Vn(i,t){const e=[],s=i._getSortedDatasetMetas(t);let n,o;for(n=0,o=s.length;n<o;++n)e.push(s[n].index);return e}function Bn(i,t,e,s={}){const n=i.keys,o=s.mode==="single";let a,r,l,c;if(t!==null){for(a=0,r=n.length;a<r;++a){if(l=+n[a],l===e){if(s.all)continue;break}c=i.values[l],G(c)&&(o||t===0||ut(t)===ut(c))&&(t+=c)}return t}}function Cc(i){const t=Object.keys(i),e=new Array(t.length);let s,n,o;for(s=0,n=t.length;s<n;++s)o=t[s],e[s]={x:o,y:i[o]};return e}function Rn(i,t){const e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function Sc(i,t,e){return`${i.id}.${t.id}.${e.stack||e.type}`}function Oc(i){const{min:t,max:e,minDefined:s,maxDefined:n}=i.getUserBounds();return{min:s?t:Number.NEGATIVE_INFINITY,max:n?e:Number.POSITIVE_INFINITY}}function Pc(i,t,e){const s=i[t]||(i[t]={});return s[e]||(s[e]={})}function Wn(i,t,e,s){for(const n of t.getMatchingVisibleMetas(s).reverse()){const o=i[n.index];if(e&&o>0||!e&&o<0)return n.index}return null}function Hn(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,c=a.axis,h=Sc(o,a,s),d=t.length;let u;for(let f=0;f<d;++f){const g=t[f],{[l]:p,[c]:m}=g,x=g._stacks||(g._stacks={});u=x[c]=Pc(n,h,p),u[r]=m,u._top=Wn(u,a,!0,s.type),u._bottom=Wn(u,a,!1,s.type);const y=u._visualValues||(u._visualValues={});y[r]=m}}function ts(i,t){const e=i.scales;return Object.keys(e).filter(s=>e[s].axis===t).shift()}function jc(i,t){return Ct(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Ec(i,t,e){return Ct(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function De(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}const es=i=>i==="reset"||i==="none",Zn=(i,t)=>t?i:Object.assign({},i),Vc=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:Vn(e,!0),values:null};class ct{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=Rn(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&&De(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,u,f,g)=>d==="x"?u:d==="r"?g:f,o=e.xAxisID=N(s.xAxisID,ts(t,"x")),a=e.yAxisID=N(s.yAxisID,ts(t,"y")),r=e.rAxisID=N(s.rAxisID,ts(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,a,r),h=e.vAxisID=n(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&&tn(this._data,this),t._stacked&&De(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(O(e))this._data=Cc(e);else if(s!==e){if(s){tn(s,this);const n=this._cachedMeta;De(n),n._parsed=[]}e&&Object.isExtensible(e)&&vl(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,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Rn(e.vScale,e),e.stack!==s.stack&&(n=!0,De(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&Hn(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:a}=s,r=o.axis;let l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,u;if(this._parsing===!1)s._parsed=n,s._sorted=!0,u=n;else{R(n[t])?u=this.parseArrayData(s,n,t,e):O(n[t])?u=this.parseObjectData(s,n,t,e):u=this.parsePrimitiveData(s,n,t,e);const f=()=>d[r]===null||c&&d[r]<c[r];for(h=0;h<e;++h)s._parsed[h+t]=d=u[h],l&&(f()&&(l=!1),c=d);s._sorted=l}a&&Hn(this,u)}parsePrimitiveData(t,e,s,n){const{iScale:o,vScale:a}=t,r=o.axis,l=a.axis,c=o.getLabels(),h=o===a,d=new Array(n);let u,f,g;for(u=0,f=n;u<f;++u)g=u+s,d[u]={[r]:h||o.parse(c[g],g),[l]:a.parse(e[g],g)};return d}parseArrayData(t,e,s,n){const{xScale:o,yScale:a}=t,r=new Array(n);let l,c,h,d;for(l=0,c=n;l<c;++l)h=l+s,d=e[h],r[l]={x:o.parse(d[0],h),y:a.parse(d[1],h)};return r}parseObjectData(t,e,s,n){const{xScale:o,yScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,c=new Array(n);let h,d,u,f;for(h=0,d=n;h<d;++h)u=h+s,f=e[u],c[h]={x:o.parse(kt(f,r),u),y:a.parse(kt(f,l),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,s){const n=this.chart,o=this._cachedMeta,a=e[t.axis],r={keys:Vn(n,!0),values:e._stacks[t.axis]._visualValues};return Bn(r,a,o.index,{mode:s})}updateRangeFromParsed(t,e,s,n){const o=s[e.axis];let a=o===null?NaN:o;const r=n&&s._stacks[e.axis];n&&r&&(n.values=r,a=Bn(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const s=this._cachedMeta,n=s._parsed,o=s._sorted&&t===s.iScale,a=n.length,r=this._getOtherScale(t),l=Vc(e,s,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=Oc(r);let u,f;function g(){f=n[u];const p=f[r.axis];return!G(f[t.axis])||h>p||d<p}for(u=0;u<a&&!(!g()&&(this.updateRangeFromParsed(c,t,f,l),o));++u);if(o){for(u=a-1;u>=0;--u)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,a;for(n=0,o=e.length;n<o;++n)a=e[n][t.axis],G(a)&&s.push(a);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,s=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:s?""+s.getLabelForValue(o[s.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=Nc(N(this.options.clip,Lc(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,s=this._cachedMeta,n=s.data||[],o=e.chartArea,a=[],r=this._drawStart||0,l=this._drawCount||n.length-r,c=this.options.drawActiveElementsOnTop;let h;for(s.dataset&&s.dataset.draw(t,o,r,l),h=r;h<r+l;++h){const d=n[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 s=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,e,s){const n=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=Ec(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=jc(this.chart.getContext(),this.index)),o.dataset=n,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=s,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",s){const n=e==="active",o=this._cachedDataOpts,a=t+"-"+e,r=o[a],l=this.enableOptionSharing&&xe(s);if(r)return Zn(r,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),d=n?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),h),f=Object.keys(F.elements[t]),g=()=>this.getContext(s,n,e),p=c.resolveNamedOptions(u,f,g,d);return p.$shared&&(p.$shared=l,o[a]=Object.freeze(Zn(p,l))),p}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(n.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,s,e))}const c=new jn(n,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||es(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),a=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:a}}updateElement(t,e,s,n){es(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!es(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"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,s=this._cachedMeta.data;for(const[r,l,c]of this._syncList)this[r](l,c);this._syncList=[];const n=s.length,o=e.length,a=Math.min(o,n);a&&this.parse(0,a),o>n?this._insertElements(n,o-n,t):o<n&&this._removeElements(o,n-o)}_insertElements(t,e,s=!0){const n=this._cachedMeta,o=n.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(n._parsed),this.parse(t,e),s&&this.updateElements(o,t,e,"reset")}updateElements(t,e,s,n){}_removeElements(t,e){const s=this._cachedMeta;if(this._parsing){const n=s._parsed.splice(t,e);s._stacked&&De(s,n)}s.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,s,n]=t;this[e](s,n)}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 s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}T(ct,"defaults",{}),T(ct,"datasetElementType",null),T(ct,"dataElementType",null);function Bc(i,t){if(!i._cache.$bar){const e=i.getMatchingVisibleMetas(t);let s=[];for(let n=0,o=e.length;n<o;n++)s=s.concat(e[n].controller.getAllParsedValues(i));i._cache.$bar=en(s.sort((n,o)=>n-o))}return i._cache.$bar}function Rc(i){const t=i.iScale,e=Bc(t,i.type);let s=t._length,n,o,a,r;const l=()=>{a===32767||a===-32768||(xe(r)&&(s=Math.min(s,Math.abs(a-r)||s)),r=a)};for(n=0,o=e.length;n<o;++n)a=t.getPixelForValue(e[n]),l();for(r=void 0,n=0,o=t.ticks.length;n<o;++n)a=t.getPixelForTick(n),l();return s}function Wc(i,t,e,s){const n=e.barThickness;let o,a;return j(n)?(o=t.min*e.categoryPercentage,a=e.barPercentage):(o=n*s,a=1),{chunk:o/s,ratio:a,start:t.pixels[i]-o/2}}function Hc(i,t,e,s){const n=t.pixels,o=n[i];let a=i>0?n[i-1]:null,r=i<n.length-1?n[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/s,ratio:e.barPercentage,start:c}}function Zc(i,t,e,s){const n=e.parse(i[0],s),o=e.parse(i[1],s),a=Math.min(n,o),r=Math.max(n,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:n,end:o,min:a,max:r}}function Gn(i,t,e,s){return R(i)?Zc(i,t,e,s):t[e.axis]=e.parse(i,s),t}function Fn(i,t,e,s){const n=i.iScale,o=i.vScale,a=n.getLabels(),r=n===o,l=[];let c,h,d,u;for(c=e,h=e+s;c<h;++c)u=t[c],d={},d[n.axis]=r||n.parse(a[c],c),l.push(Gn(u,d,o,c));return l}function is(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function Gc(i,t,e){return i!==0?ut(i):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Fc(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.base<i.y,e="bottom",s="top"),t?(n="end",o="start"):(n="start",o="end"),{start:e,end:s,reverse:t,top:n,bottom:o}}function Uc(i,t,e,s){let n=t.borderSkipped;const o={};if(!n){i.borderSkipped=o;return}if(n===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:r,reverse:l,top:c,bottom:h}=Fc(i);n==="middle"&&e&&(i.enableBorderRadius=!0,(e._top||0)===s?n=c:(e._bottom||0)===s?n=h:(o[Un(h,a,r,l)]=!0,n=c)),o[Un(n,a,r,l)]=!0,i.borderSkipped=o}function Un(i,t,e,s){return s?(i=Yc(i,t,e),i=Yn(i,e,t)):i=Yn(i,t,e),i}function Yc(i,t,e){return i===t?e:i===e?t:i}function Yn(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 ai extends ct{parsePrimitiveData(t,e,s,n){return Fn(t,e,s,n)}parseArrayData(t,e,s,n){return Fn(t,e,s,n)}parseObjectData(t,e,s,n){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,g,p;for(u=s,f=s+n;u<f;++u)p=e[u],g={},g[o.axis]=o.parse(kt(p,c),u),d.push(Gn(kt(p,h),g,a,u));return d}updateRangeFromParsed(t,e,s,n){super.updateRangeFromParsed(t,e,s,n);const o=s._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:s,vScale:n}=e,o=this.getParsed(t),a=o._custom,r=is(a)?"["+a.start+", "+a.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+s.getLabelForValue(o[s.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,s,n){const o=n==="reset",{index:a,_cachedMeta:{vScale:r}}=this,l=r.getBasePixel(),c=r.isHorizontal(),h=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,n);for(let f=e;f<e+s;f++){const g=this.getParsed(f),p=o||j(g[r.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,h),x=(g._stacks||{})[r.axis],y={horizontal:c,base:p.base,enableBorderRadius:!x||is(g._custom)||a===x._top||a===x._bottom,x:c?p.head:m.center,y:c?m.center:p.head,height:c?m.size:Math.abs(p.size),width:c?Math.abs(p.size):m.size};u&&(y.options=d||this.resolveDataElementOptions(f,t[f].active?"active":n));const A=y.options||t[f].options;Uc(y,A,x,a),Xc(y,A,h.ratio),this.updateElement(t[f],f,y,n)}}_getStacks(t,e){const{iScale:s}=this._cachedMeta,n=s.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=s.options.stacked,a=[],r=l=>{const c=l.controller.getParsed(e),h=c&&c[l.vScale.axis];if(j(h)||isNaN(h))return!0};for(const l of n)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,s){const n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,s=e.iScale,n=[];let o,a;for(o=0,a=e.data.length;o<a;++o)n.push(s.getPixelForValue(this.getParsed(o)[s.axis],o));const r=t.barThickness;return{min:r||Rc(e),pixels:n,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:s,index:n},options:{base:o,minBarLength:a}}=this,r=o||0,l=this.getParsed(t),c=l._custom,h=is(c);let d=l[e.axis],u=0,f=s?this.applyStack(e,l,s):d,g,p;f!==d&&(u=f-d,f=d),h&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&ut(d)!==ut(c.barEnd)&&(u=0),u+=d);const m=!j(o)&&!h?o:u;let x=e.getPixelForValue(m);if(this.chart.getDataVisibility(t)?g=e.getPixelForValue(u+f):g=x,p=g-x,Math.abs(p)<a){p=Gc(p,e,r)*a,d===r&&(x-=p/2);const y=e.getPixelForDecimal(0),A=e.getPixelForDecimal(1),I=Math.min(y,A),M=Math.max(y,A);x=Math.max(Math.min(x,M),I),g=x+p,s&&!h&&(l._stacks[e.axis]._visualValues[n]=e.getValueForPixel(g)-e.getValueForPixel(x))}if(x===e.getPixelForValue(r)){const y=ut(p)*e.getLineWidthForValue(r)/2;x+=y,p-=y}return{size:p,base:x,head:g,center:g+p/2}}_calculateBarIndexPixels(t,e){const s=e.scale,n=this.options,o=n.skipNull,a=N(n.maxBarThickness,1/0);let r,l;if(e.grouped){const c=o?this._getStackCount(t):e.stackCount,h=n.barThickness==="flex"?Hc(t,e,n,c):Wc(t,e,n,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=s.getPixelForValue(this.getParsed(t)[s.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,s=t.data,n=s.length;let o=0;for(;o<n;++o)this.getParsed(o)[e.axis]!==null&&s[o].draw(this._ctx)}}T(ai,"id","bar"),T(ai,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),T(ai,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class ri extends ct{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,s,n){const o=super.parsePrimitiveData(t,e,s,n);for(let a=0;a<o.length;a++)o[a]._custom=this.resolveDataElementOptions(a+s).radius;return o}parseArrayData(t,e,s,n){const o=super.parseArrayData(t,e,s,n);for(let a=0;a<o.length;a++){const r=e[s+a];o[a]._custom=N(r[2],this.resolveDataElementOptions(a+s).radius)}return o}parseObjectData(t,e,s,n){const o=super.parseObjectData(t,e,s,n);for(let a=0;a<o.length;a++){const r=e[s+a];o[a]._custom=N(r&&r.r&&+r.r,this.resolveDataElementOptions(a+s).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let s=t.length-1;s>=0;--s)e=Math.max(e,t[s].size(this.resolveDataElementOptions(s))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart.data.labels||[],{xScale:n,yScale:o}=e,a=this.getParsed(t),r=n.getLabelForValue(a.x),l=o.getLabelForValue(a.y),c=a._custom;return{label:s[t]||"",value:"("+r+", "+l+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,s,n){const o=n==="reset",{iScale:a,vScale:r}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,n),h=a.axis,d=r.axis;for(let u=e;u<e+s;u++){const f=t[u],g=!o&&this.getParsed(u),p={},m=p[h]=o?a.getPixelForDecimal(.5):a.getPixelForValue(g[h]),x=p[d]=o?r.getBasePixel():r.getPixelForValue(g[d]);p.skip=isNaN(m)||isNaN(x),c&&(p.options=l||this.resolveDataElementOptions(u,f.active?"active":n),o&&(p.options.radius=0)),this.updateElement(f,u,p,n)}}resolveDataElementOptions(t,e){const s=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const o=n.radius;return e!=="active"&&(n.radius=0),n.radius+=N(s&&s._custom,o),n}}T(ri,"id","bubble"),T(ri,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),T(ri,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Kc(i,t,e){let s=1,n=1,o=0,a=0;if(t<H){const r=i,l=r+t,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(A,I,M)=>Me(A,r,l,!0)?1:Math.max(I,I*e,M,M*e),g=(A,I,M)=>Me(A,r,l,!0)?-1:Math.min(I,I*e,M,M*e),p=f(0,c,d),m=f(U,h,u),x=g(W,c,d),y=g(W+U,h,u);s=(p-x)/2,n=(m-y)/2,o=-(p+x)/2,a=-(m+y)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}class Ft extends ct{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 s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let o=l=>+s[l];if(O(s[t])){const{key:l="value"}=this._parsing;o=c=>+kt(s[c],l)}let a,r;for(a=t,r=t+e;a<r;++a)n._parsed[a]=o(a)}}_getRotation(){return lt(this.options.rotation-90)}_getCircumference(){return lt(this.options.circumference)}_getRotationExtents(){let t=H,e=-H;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const n=this.chart.getDatasetMeta(s).controller,o=n._getRotation(),a=n._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:s}=e,n=this._cachedMeta,o=n.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(s.width,s.height)-a)/2,0),l=Math.min(ll(this.options.cutout,r),1),c=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:g,offsetY:p}=Kc(d,h,l),m=(s.width-a)/u,x=(s.height-a)/f,y=Math.max(Math.min(m,x)/2,0),A=Fs(this.options.radius,y),I=Math.max(A*l,0),M=(A-I)/this._getVisibleDatasetWeightTotal();this.offsetX=g*A,this.offsetY=p*A,n.total=this.calculateTotal(),this.outerRadius=A-M*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-M*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const s=this.options,n=this._cachedMeta,o=this._getCircumference();return e&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||n._parsed[t]===null||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*o/H)}updateElements(t,e,s,n){const o=n==="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,g=u?0:this.outerRadius,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(e,n);let x=this._getRotation(),y;for(y=0;y<e;++y)x+=this._circumference(y,o);for(y=e;y<e+s;++y){const A=this._circumference(y,o),I=t[y],M={x:h+this.offsetX,y:d+this.offsetY,startAngle:x,endAngle:x+A,circumference:A,outerRadius:g,innerRadius:f};m&&(M.options=p||this.resolveDataElementOptions(y,I.active?"active":n)),x+=A,this.updateElement(I,y,M,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let s=0,n;for(n=0;n<e.length;n++){const o=t._parsed[n];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(n)&&!e[n].hidden&&(s+=Math.abs(o))}return s}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?H*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=ve(e._parsed[t],s.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const s=this.chart;let n,o,a,r,l;if(!t){for(n=0,o=s.data.datasets.length;n<o;++n)if(s.isDatasetVisible(n)){a=s.getDatasetMeta(n),t=a.data,r=a.controller;break}}if(!t)return 0;for(n=0,o=t.length;n<o;++n)l=r.resolveDataElementOptions(n),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let s=0,n=t.length;s<n;++s){const o=this.resolveDataElementOptions(s);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(e+=this._getRingWeight(s));return e}_getRingWeight(t){return Math.max(N(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}T(Ft,"id","doughnut"),T(Ft,"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"}),T(Ft,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),T(Ft,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:s,color:n}}=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:n,lineWidth:l.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index),s.chart.update()}}}});class li extends ct{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:s,data:n=[],_dataset:o}=e,a=this.chart._animationsDisabled;let{start:r,count:l}=on(e,n,a);this._drawStart=r,this._drawCount=l,an(e)&&(r=0,l=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=n;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!a,options:c},t),this.updateElements(n,r,l,t)}updateElements(t,e,s,n){const o=n==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,n),u=a.axis,f=r.axis,{spanGaps:g,segment:p}=this.options,m=ee(g)?g:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||o||n==="none",y=e+s,A=t.length;let I=e>0&&this.getParsed(e-1);for(let M=0;M<A;++M){const D=t[M],z=x?D:{};if(M<e||M>=y){z.skip=!0;continue}const k=this.getParsed(M),L=j(k[f]),C=z[u]=a.getPixelForValue(k[u],M),S=z[f]=o||L?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,k,l):k[f],M);z.skip=isNaN(C)||isNaN(S)||L,z.stop=M>0&&Math.abs(k[u]-I[u])>m,p&&(z.parsed=k,z.raw=c.data[M]),d&&(z.options=h||this.resolveDataElementOptions(M,D.active?"active":n)),x||this.updateElement(D,M,z,n),I=k}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}T(li,"id","line"),T(li,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),T(li,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ze extends ct{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=ve(e._parsed[t].r,s.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,s,n){return wn.bind(this)(t,e,s,n)}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((s,n)=>{const o=this.getParsed(n).r;!isNaN(o)&&this.chart.getDataVisibility(n)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,s=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),a=Math.max(s.cutoutPercentage?o/100*s.cutoutPercentage:1,0),r=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,s,n){const o=n==="reset",a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*W;let f=u,g;const p=360/this.countVisibleElements();for(g=0;g<e;++g)f+=this._computeAngle(g,n,p);for(g=e;g<e+s;g++){const m=t[g];let x=f,y=f+this._computeAngle(g,n,p),A=a.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;f=y,o&&(l.animateScale&&(A=0),l.animateRotate&&(x=y=u));const I={x:h,y:d,innerRadius:0,outerRadius:A,startAngle:x,endAngle:y,options:this.resolveDataElementOptions(g,m.active?"active":n)};this.updateElement(m,g,I,n)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((s,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,s){return this.chart.getDataVisibility(t)?lt(this.resolveDataElementOptions(t,e).angle||s):0}}T(ze,"id","polarArea"),T(ze,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),T(ze,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:s,color:n}}=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:n,lineWidth:l.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index),s.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class ss extends Ft{}T(ss,"id","pie"),T(ss,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class ci extends ct{getLabelAndValue(t){const e=this._cachedMeta.vScale,s=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(s[e.axis])}}parseObjectData(t,e,s,n){return wn.bind(this)(t,e,s,n)}update(t){const e=this._cachedMeta,s=e.dataset,n=e.data||[],o=e.iScale.getLabels();if(s.points=n,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const r={_loop:!0,_fullLoop:o.length===n.length,options:a};this.updateElement(s,void 0,r,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,s,n){const o=this._cachedMeta.rScale,a=n==="reset";for(let r=e;r<e+s;r++){const l=t[r],c=this.resolveDataElementOptions(r,l.active?"active":n),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,n)}}}T(ci,"id","radar"),T(ci,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),T(ci,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class hi extends ct{getLabelAndValue(t){const e=this._cachedMeta,s=this.chart.data.labels||[],{xScale:n,yScale:o}=e,a=this.getParsed(t),r=n.getLabelForValue(a.x),l=o.getLabelForValue(a.y);return{label:s[t]||"",value:"("+r+", "+l+")"}}update(t){const e=this._cachedMeta,{data:s=[]}=e,n=this.chart._animationsDisabled;let{start:o,count:a}=on(e,s,n);if(this._drawStart=o,this._drawCount=a,an(e)&&(o=0,a=s.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=s;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!n,options:c},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(s,o,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,s,n){const o=n==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,h=this.resolveDataElementOptions(e,n),d=this.getSharedOptions(h),u=this.includeOptions(n,d),f=a.axis,g=r.axis,{spanGaps:p,segment:m}=this.options,x=ee(p)?p:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||o||n==="none";let A=e>0&&this.getParsed(e-1);for(let I=e;I<e+s;++I){const M=t[I],D=this.getParsed(I),z=y?M:{},k=j(D[g]),L=z[f]=a.getPixelForValue(D[f],I),C=z[g]=o||k?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,D,l):D[g],I);z.skip=isNaN(L)||isNaN(C)||k,z.stop=I>0&&Math.abs(D[f]-A[f])>x,m&&(z.parsed=D,z.raw=c.data[I]),u&&(z.options=d||this.resolveDataElementOptions(I,M.active?"active":n)),y||this.updateElement(M,I,z,n),A=D}this.updateSharedOptions(d,n,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 s=t.dataset,n=s.options&&s.options.borderWidth||0;if(!e.length)return n;const o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,o,a)/2}}T(hi,"id","scatter"),T(hi,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),T(hi,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Qc=Object.freeze({__proto__:null,BarController:ai,BubbleController:ri,DoughnutController:Ft,LineController:li,PieController:ss,PolarAreaController:ze,RadarController:ci,ScatterController:hi});function Ut(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ns{constructor(t){T(this,"options");this.options=t||{}}static override(t){Object.assign(ns.prototype,t)}init(){}formats(){return Ut()}parse(){return Ut()}format(){return Ut()}add(){return Ut()}diff(){return Ut()}startOf(){return Ut()}endOf(){return Ut()}}var Jc={_date:ns};function qc(i,t,e,s){const{controller:n,data:o,_sorted:a}=i,r=n._cachedMeta.iScale;if(r&&t===r.axis&&t!=="r"&&a&&o.length){const l=r._reversePixels?Ml:yt;if(s){if(n._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 ke(i,t,e,s,n){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}=qc(o[r],t,a,n);for(let f=d;f<=u;++f){const g=h[f];g.skip||s(g,c,f)}}}function _c(i){const t=i.indexOf("x")!==-1,e=i.indexOf("y")!==-1;return function(s,n){const o=t?Math.abs(s.x-n.x):0,a=e?Math.abs(s.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function os(i,t,e,s,n){const o=[];return!n&&!i.isPointInArea(t)||ke(i,e,t,function(r,l,c){!n&&!Mt(r,i.chartArea,0)||r.inRange(t.x,t.y,s)&&o.push({element:r,datasetIndex:l,index:c})},!0),o}function $c(i,t,e,s){let n=[];function o(a,r,l){const{startAngle:c,endAngle:h}=a.getProps(["startAngle","endAngle"],s),{angle:d}=_s(a,{x:t.x,y:t.y});Me(d,c,h)&&n.push({element:a,datasetIndex:r,index:l})}return ke(i,e,t,o),n}function th(i,t,e,s,n,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,n);if(s&&!f)return;const g=h.getCenterPoint(n);if(!(!!o||i.isPointInArea(g))&&!f)return;const m=r(t,g);m<l?(a=[{element:h,datasetIndex:d,index:u}],l=m):m===l&&a.push({element:h,datasetIndex:d,index:u})}return ke(i,e,t,c),a}function as(i,t,e,s,n,o){return!o&&!i.isPointInArea(t)?[]:e==="r"&&!s?$c(i,t,e,n):th(i,t,e,s,n,o)}function Xn(i,t,e,s,n){const o=[],a=e==="x"?"inXRange":"inYRange";let r=!1;return ke(i,e,t,(l,c,h)=>{l[a](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(t.x,t.y,n))}),s&&!r?[]:o}var eh={evaluateInteractionItems:ke,modes:{index(i,t,e,s){const n=Zt(t,i),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?os(i,n,o,s,a):as(i,n,o,!1,s,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,s){const n=Zt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;let r=e.intersect?os(i,n,o,s,a):as(i,n,o,!1,s,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,s){const n=Zt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;return os(i,n,o,s,a)},nearest(i,t,e,s){const n=Zt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;return as(i,n,o,e.intersect,s,a)},x(i,t,e,s){const n=Zt(t,i);return Xn(i,n,"x",e.intersect,s)},y(i,t,e,s){const n=Zt(t,i);return Xn(i,n,"y",e.intersect,s)}}};const Kn=["left","top","right","bottom"];function Le(i,t){return i.filter(e=>e.pos===t)}function Qn(i,t){return i.filter(e=>Kn.indexOf(e.pos)===-1&&e.box.axis===t)}function Ne(i,t){return i.sort((e,s)=>{const n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function ih(i){const t=[];let e,s,n,o,a,r;for(e=0,s=(i||[]).length;e<s;++e)n=i[e],{position:o,options:{stack:a,stackWeight:r=1}}=n,t.push({index:e,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:a&&o+a,stackWeight:r});return t}function sh(i){const t={};for(const e of i){const{stack:s,pos:n,stackWeight:o}=e;if(!s||!Kn.includes(n))continue;const a=t[s]||(t[s]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function nh(i,t){const e=sh(i),{vBoxMaxWidth:s,hBoxMaxHeight:n}=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*s:l&&t.availableWidth,r.height=n):(r.width=s,r.height=h?h*n:l&&t.availableHeight)}return e}function oh(i){const t=ih(i),e=Ne(t.filter(c=>c.box.fullSize),!0),s=Ne(Le(t,"left"),!0),n=Ne(Le(t,"right")),o=Ne(Le(t,"top"),!0),a=Ne(Le(t,"bottom")),r=Qn(t,"x"),l=Qn(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:Le(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}function Jn(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function qn(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 ah(i,t,e,s){const{pos:n,box:o}=e,a=i.maxPadding;if(!O(n)){e.size&&(i[n]-=e.size);const d=s[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[n]+=e.size}o.getPadding&&qn(a,o.getPadding());const r=Math.max(0,t.outerWidth-Jn(a,i,"left","right")),l=Math.max(0,t.outerHeight-Jn(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 rh(i){const t=i.maxPadding;function e(s){const n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function lh(i,t){const e=t.maxPadding;function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return s(i?["left","right"]:["top","bottom"])}function Ce(i,t,e,s){const n=[];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,lh(r.horizontal,t));const{same:d,other:u}=ah(t,e,r,s);c|=d&&n.length,h=h||u,l.fullSize||n.push(r)}return c&&Ce(n,t,e,s)||h}function di(i,t,e,s,n){i.top=e,i.left=t,i.right=t+s,i.bottom=e+n,i.width=s,i.height=n}function _n(i,t,e,s){const n=e.padding;let{x:o,y:a}=t;for(const r of i){const l=r.box,c=s[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;xe(c.start)&&(a=c.start),l.fullSize?di(l,n.left,a,e.outerWidth-n.right-n.left,u):di(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;xe(c.start)&&(o=c.start),l.fullSize?di(l,o,n.top,u,e.outerHeight-n.bottom-n.top):di(l,o,t.top+c.placed,u,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=a}var $={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,s){if(!i)return;const n=_(i.options.layout.padding),o=Math.max(t-n.width,0),a=Math.max(e-n.height,0),r=oh(i.boxes),l=r.vertical,c=r.horizontal;E(i.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const h=l.reduce((p,m)=>m.box.options&&m.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},n);qn(u,_(s));const f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),g=nh(l.concat(c),d);Ce(r.fullSize,f,d,g),Ce(l,f,d,g),Ce(c,f,d,g)&&Ce(l,f,d,g),rh(f),_n(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,_n(r.rightAndBottom,f,d,g),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},E(r.chartArea,p=>{const m=p.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class $n{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class ch extends $n{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ui="$chartjs",hh={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},to=i=>i===null||i==="";function dh(i,t){const e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[ui]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",to(n)){const o=Tn(i,"width");o!==void 0&&(i.width=o)}if(to(s))if(i.style.height==="")i.height=i.width/(t||2);else{const o=Tn(i,"height");o!==void 0&&(i.height=o)}return i}const eo=fc?{passive:!0}:!1;function uh(i,t,e){i.addEventListener(t,e,eo)}function fh(i,t,e){i.canvas.removeEventListener(t,e,eo)}function gh(i,t){const e=hh[i.type]||i.type,{x:s,y:n}=Zt(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function fi(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function ph(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||fi(r.addedNodes,s),a=a&&!fi(r.removedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function mh(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||fi(r.removedNodes,s),a=a&&!fi(r.addedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const Se=new Map;let io=0;function so(){const i=window.devicePixelRatio;i!==io&&(io=i,Se.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function bh(i,t){Se.size||window.addEventListener("resize",so),Se.set(i,t)}function xh(i){Se.delete(i),Se.size||window.removeEventListener("resize",so)}function yh(i,t,e){const s=i.canvas,n=s&&$i(s);if(!n)return;const o=nn((r,l)=>{const c=n.clientWidth;e(r,l),c<n.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(n),bh(i,o),a}function rs(i,t,e){e&&e.disconnect(),t==="resize"&&xh(i)}function Mh(i,t,e){const s=i.canvas,n=nn(o=>{i.ctx!==null&&e(gh(o,i))},i);return uh(s,t,n),n}class wh extends $n{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(dh(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e[ui])return!1;const s=e[ui].initial;["height","width"].forEach(o=>{const a=s[o];j(a)?e.removeAttribute(o):e.setAttribute(o,a)});const n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[ui],!0}addEventListener(t,e,s){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),a={attach:ph,detach:mh,resize:yh}[e]||Mh;n[e]=a(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:rs,detach:rs,resize:rs}[e]||fh)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return uc(t,e,s,n)}isAttached(t){const e=$i(t);return!!(e&&e.isConnected)}}function vh(i){return!In()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?ch:wh}class ht{constructor(){T(this,"x");T(this,"y");T(this,"active",!1);T(this,"options");T(this,"$animations")}tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return ee(this.x)&&ee(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}}T(ht,"defaults",{}),T(ht,"defaultRoutes");function Ih(i,t){const e=i.options.ticks,s=Ah(i),n=Math.min(e.maxTicksLimit||s,s),o=e.major.enabled?Dh(t):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>n)return zh(t,c,o,a/n),c;const h=Th(o,t,n);if(a>0){let d,u;const f=a>1?Math.round((l-r)/(a-1)):null;for(gi(t,c,h,j(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,j(f)?t.length:l+f),c}return gi(t,c,h),c}function Ah(i){const t=i.options.offset,e=i._tickSize(),s=i._length/e+(t?0:1),n=i._maxLength/e;return Math.floor(Math.min(s,n))}function Th(i,t,e){const s=kh(i),n=t.length/e;if(!s)return Math.max(n,1);const o=ml(s);for(let a=0,r=o.length-1;a<r;a++){const l=o[a];if(l>n)return l}return Math.max(n,1)}function Dh(i){const t=[];let e,s;for(e=0,s=i.length;e<s;e++)i[e].major&&t.push(e);return t}function zh(i,t,e,s){let n=0,o=e[0],a;for(s=Math.ceil(s),a=0;a<i.length;a++)a===o&&(t.push(i[a]),n++,o=e[n*s])}function gi(i,t,e,s,n){const o=N(s,0),a=Math.min(N(n,i.length),i.length);let r=0,l,c,h;for(e=Math.ceil(e),n&&(l=n-s,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 kh(i){const t=i.length;let e,s;if(t<2)return!1;for(s=i[0],e=1;e<t;++e)if(i[e]-i[e-1]!==s)return!1;return s}const Lh=i=>i==="left"?"right":i==="right"?"left":i,no=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,oo=(i,t)=>Math.min(t||i,i);function ao(i,t){const e=[],s=i.length/t,n=i.length;let o=0;for(;o<n;o+=s)e.push(i[Math.floor(o)]);return e}function Nh(i,t,e){const s=i.ticks.length,n=Math.min(t,s-1),o=i._startPixel,a=i._endPixel,r=1e-6;let l=i.getPixelForTick(n),c;if(!(e&&(s===1?c=Math.max(l-o,a-l):t===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(n-1))/2,l+=n<t?c:-c,l<o-r||l>a+r)))return l}function Ch(i,t){E(i,e=>{const s=e.gc,n=s.length/2;let o;if(n>t){for(o=0;o<n;++o)delete e.data[s[o]];s.splice(0,n)}})}function Oe(i){return i.drawTicks?i.tickLength:0}function ro(i,t){if(!i.display)return 0;const e=X(i.font,t),s=_(i.padding);return(R(i.text)?i.text.length:1)*e.lineHeight+s.height}function Sh(i,t){return Ct(i,{scale:t,type:"scale"})}function Oh(i,t,e){return Ct(i,{tick:e,index:t,type:"tick"})}function Ph(i,t,e){let s=Gi(i);return(e&&t!=="right"||!e&&t==="right")&&(s=Lh(s)),s}function jh(i,t,e,s){const{top:n,left:o,bottom:a,right:r,chart:l}=i,{chartArea:c,scales:h}=l;let d=0,u,f,g;const p=a-n,m=r-o;if(i.isHorizontal()){if(f=q(s,o,r),O(e)){const x=Object.keys(e)[0],y=e[x];g=h[x].getPixelForValue(y)+p-t}else e==="center"?g=(c.bottom+c.top)/2+p-t:g=no(i,e,t);u=r-o}else{if(O(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=no(i,e,t);g=q(s,a,n),d=e==="left"?-U:U}return{titleX:f,titleY:g,maxWidth:u,rotation:d}}class Yt extends ht{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:s,_suggestedMax:n}=this;return t=st(t,Number.POSITIVE_INFINITY),e=st(e,Number.NEGATIVE_INFINITY),s=st(s,Number.POSITIVE_INFINITY),n=st(n,Number.NEGATIVE_INFINITY),{min:st(t,s),max:st(e,n),minDefined:G(t),maxDefined:G(e)}}getMinMax(t){let{min:e,max:s,minDefined:n,maxDefined:o}=this.getUserBounds(),a;if(n&&o)return{min:e,max:s};const r=this.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)a=r[l].controller.getMinMax(this,t),n||(e=Math.min(e,a.min)),o||(s=Math.max(s,a.max));return e=o&&e>s?s:e,s=n&&e>s?e:s,{min:st(e,st(s,e)),max:st(s,st(e,s))}}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,s){const{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Fl(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=r<this.ticks.length;this._convertTicksToLabels(l?ao(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Ih(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,s;this.isHorizontal()?(e=this.left,s=this.right):(e=this.top,s=this.bottom,t=!t),this._startPixel=e,this._endPixel=s,this._reversePixels=t,this._length=s-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 s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s],o.label=B(e.callback,[o.value,s,t],this)}afterTickToLabelConversion(){B(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){B(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,s=oo(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,o=e.maxRotation;let a=n,r,l,c;if(!this._isVisible()||!e.display||n>=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=K(this.chart.width-d,0,this.maxWidth);r=t.offset?this.maxWidth/s:f/(s-1),d+6>r&&(r=f/(s-(t.offset?.5:1)),l=this.maxHeight-Oe(t.grid)-e.padding-ro(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=Wi(Math.min(Math.asin(K((h.highest.height+6)/r,-1,1)),Math.asin(K(l/c,-1,1))-Math.asin(K(u/c,-1,1)))),a=Math.max(n,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:s,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const l=ro(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=Oe(o)+l):(t.height=this.maxHeight,t.width=Oe(o)+l),s.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=s.padding*2,g=lt(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(r){const x=s.mirror?0:m*d.width+p*u.height;t.height=Math.min(this.maxHeight,t.height+x+f)}else{const x=s.mirror?0:p*d.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+x+f)}this._calculatePadding(c,h,m,p)}}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,s,n){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=n*t.width,f=s*e.height):(u=s*t.height,f=n*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,s;for(e=0,s=t.length;e<s;e++)j(t[e].label)&&(t.splice(e,1),s--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let s=this.ticks;e<s.length&&(s=ao(s,e)),this._labelSizes=t=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,s){const{ctx:n,_longestTextCache:o}=this,a=[],r=[],l=Math.floor(e/oo(e,s));let c=0,h=0,d,u,f,g,p,m,x,y,A,I,M;for(d=0;d<e;d+=l){if(g=t[d].label,p=this._resolveTickFontOptions(d),n.font=m=p.string,x=o[m]=o[m]||{data:{},gc:[]},y=p.lineHeight,A=I=0,!j(g)&&!R(g))A=$e(n,x.data,x.gc,A,g),I=y;else if(R(g))for(u=0,f=g.length;u<f;++u)M=g[u],!j(M)&&!R(M)&&(A=$e(n,x.data,x.gc,A,M),I+=y);a.push(A),r.push(I),c=Math.max(A,c),h=Math.max(I,h)}Ch(o,e);const D=a.indexOf(c),z=r.indexOf(h),k=L=>({width:a[L]||0,height:r[L]||0});return{first:k(0),last:k(e-1),widest:k(D),highest:k(z),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 yl(this._alignToPixels?Bt(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 s=e[t];return s.$context||(s.$context=Oh(this.getContext(),t,s))}return this.$context||(this.$context=Sh(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=lt(this.labelRotation),s=Math.abs(Math.cos(e)),n=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*s>r*n?r/s:l/n:l*n<r*s?l/s:r/n}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,s=this.chart,n=this.options,{grid:o,position:a,border:r}=n,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=Oe(o),f=[],g=r.setContext(this.getContext()),p=g.display?g.width:0,m=p/2,x=function(Z){return Bt(s,Z,p)};let y,A,I,M,D,z,k,L,C,S,P,J;if(a==="top")y=x(this.bottom),z=this.bottom-u,L=y-m,S=x(t.top)+m,J=t.bottom;else if(a==="bottom")y=x(this.top),S=t.top,J=x(t.bottom)-m,z=y+m,L=this.top+u;else if(a==="left")y=x(this.right),D=this.right-u,k=y-m,C=x(t.left)+m,P=t.right;else if(a==="right")y=x(this.left),C=t.left,P=x(t.right)-m,D=y+m,k=this.left+u;else if(e==="x"){if(a==="center")y=x((t.top+t.bottom)/2+.5);else if(O(a)){const Z=Object.keys(a)[0],Y=a[Z];y=x(this.chart.scales[Z].getPixelForValue(Y))}S=t.top,J=t.bottom,z=y+m,L=z+u}else if(e==="y"){if(a==="center")y=x((t.left+t.right)/2);else if(O(a)){const Z=Object.keys(a)[0],Y=a[Z];y=x(this.chart.scales[Z].getPixelForValue(Y))}D=y-m,k=D-u,C=t.left,P=t.right}const ot=N(n.ticks.maxTicksLimit,d),V=Math.max(1,Math.ceil(d/ot));for(A=0;A<d;A+=V){const Z=this.getContext(A),Y=o.setContext(Z),dt=r.setContext(Z),tt=Y.lineWidth,ae=Y.color,Ni=dt.dash||[],re=dt.dashOffset,We=Y.tickWidth,He=Y.tickColor,Ze=Y.tickBorderDash||[],Ge=Y.tickBorderDashOffset;I=Nh(this,A,l),I!==void 0&&(M=Bt(s,I,tt),c?D=k=C=P=M:z=L=S=J=M,f.push({tx1:D,ty1:z,tx2:k,ty2:L,x1:C,y1:S,x2:P,y2:J,width:tt,color:ae,borderDash:Ni,borderDashOffset:re,tickWidth:We,tickColor:He,tickBorderDash:Ze,tickBorderDashOffset:Ge}))}return this._ticksLength=d,this._borderValue=y,f}_computeLabelItems(t){const e=this.axis,s=this.options,{position:n,ticks:o}=s,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=Oe(s.grid),f=u+h,g=d?-h:f,p=-lt(this.labelRotation),m=[];let x,y,A,I,M,D,z,k,L,C,S,P,J="middle";if(n==="top")D=this.bottom-g,z=this._getXAxisLabelAlignment();else if(n==="bottom")D=this.top+g,z=this._getXAxisLabelAlignment();else if(n==="left"){const V=this._getYAxisLabelAlignment(u);z=V.textAlign,M=V.x}else if(n==="right"){const V=this._getYAxisLabelAlignment(u);z=V.textAlign,M=V.x}else if(e==="x"){if(n==="center")D=(t.top+t.bottom)/2+f;else if(O(n)){const V=Object.keys(n)[0],Z=n[V];D=this.chart.scales[V].getPixelForValue(Z)+f}z=this._getXAxisLabelAlignment()}else if(e==="y"){if(n==="center")M=(t.left+t.right)/2-f;else if(O(n)){const V=Object.keys(n)[0],Z=n[V];M=this.chart.scales[V].getPixelForValue(Z)}z=this._getYAxisLabelAlignment(u).textAlign}e==="y"&&(l==="start"?J="top":l==="end"&&(J="bottom"));const ot=this._getLabelSizes();for(x=0,y=r.length;x<y;++x){A=r[x],I=A.label;const V=o.setContext(this.getContext(x));k=this.getPixelForTick(x)+o.labelOffset,L=this._resolveTickFontOptions(x),C=L.lineHeight,S=R(I)?I.length:1;const Z=S/2,Y=V.color,dt=V.textStrokeColor,tt=V.textStrokeWidth;let ae=z;a?(M=k,z==="inner"&&(x===y-1?ae=this.options.reverse?"left":"right":x===0?ae=this.options.reverse?"right":"left":ae="center"),n==="top"?c==="near"||p!==0?P=-S*C+C/2:c==="center"?P=-ot.highest.height/2-Z*C+C:P=-ot.highest.height+C/2:c==="near"||p!==0?P=C/2:c==="center"?P=ot.highest.height/2-Z*C:P=ot.highest.height-S*C,d&&(P*=-1),p!==0&&!V.showLabelBackdrop&&(M+=C/2*Math.sin(p))):(D=k,P=(1-S)*C/2);let Ni;if(V.showLabelBackdrop){const re=_(V.backdropPadding),We=ot.heights[x],He=ot.widths[x];let Ze=P-re.top,Ge=0-re.left;switch(J){case"middle":Ze-=We/2;break;case"bottom":Ze-=We;break}switch(z){case"center":Ge-=He/2;break;case"right":Ge-=He;break}Ni={left:Ge,top:Ze,width:He+re.width,height:We+re.height,color:V.backdropColor}}m.push({label:I,font:L,textOffset:P,options:{rotation:p,color:Y,strokeColor:dt,strokeWidth:tt,textAlign:ae,textBaseline:J,translation:[M,D],backdrop:Ni}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-lt(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,a=this._getLabelSizes(),r=t+o,l=a.widest.width;let c,h;return e==="left"?n?(h=this.right+o,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-r,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?n?(h=this.left+o,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+r,s==="near"?c="left":s==="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:s,top:n,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(s,n,o,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(o=>o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,a=n.length;o<a;++o){const l=n[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:s,grid:n}}=this,o=s.setContext(this.getContext()),a=s.display?o.width:0;if(!a)return;const r=n.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,h,d,u;this.isHorizontal()?(c=Bt(t,this.left,a)-a/2,h=Bt(t,this.right,r)+r/2,d=u=l):(d=Bt(t,this.top,a)-a/2,u=Bt(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 s=this.ctx,n=this._computeLabelArea();n&&ti(s,n);const o=this.getLabelItems(t);for(const a of o){const r=a.options,l=a.font,c=a.label,h=a.textOffset;Rt(s,c,0,h,l,r)}n&&ei(s)}drawTitle(){const{ctx:t,options:{position:e,title:s,reverse:n}}=this;if(!s.display)return;const o=X(s.font),a=_(s.padding),r=s.align;let l=o.lineHeight/2;e==="bottom"||e==="center"||O(e)?(l+=a.bottom,R(s.text)&&(l+=o.lineHeight*(s.text.length-1))):l+=a.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=jh(this,l,e,r);Rt(t,s.text,0,0,o,{color:s.color,maxWidth:d,rotation:u,textAlign:Ph(r,e,n),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,s=N(t.grid&&t.grid.z,-1),n=N(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Yt.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,a;for(o=0,a=e.length;o<a;++o){const r=e[o];r[s]===this.id&&(!t||r.type===t)&&n.push(r)}return n}_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 pi{constructor(t,e,s){this.type=t,this.scope=e,this.override=s,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 s;Bh(e)&&(s=this.register(e));const n=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in n||(n[o]=t,Eh(t,a,s),this.override&&F.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,s=t.id,n=this.scope;s in e&&delete e[s],n&&s in F[n]&&(delete F[n][s],this.override&&delete Vt[s])}}function Eh(i,t,e){const s=me(Object.create(null),[e?F.get(e):{},F.get(t),i.defaults]);F.set(t,s),i.defaultRoutes&&Vh(t,i.defaultRoutes),i.descriptors&&F.describe(t,i.descriptors)}function Vh(i,t){Object.keys(t).forEach(e=>{const s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");F.route(o,n,l,r)})}function Bh(i){return"id"in i&&"defaults"in i}class Rh{constructor(){this.controllers=new pi(ct,"datasets",!0),this.elements=new pi(ht,"elements"),this.plugins=new pi(Object,"plugins"),this.scales=new pi(Yt,"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,s){[...e].forEach(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):E(n,a=>{const r=s||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,s){const n=Ri(t);B(s["before"+n],[],s),e[t](s),B(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const s=this._typedRegistries[e];if(s.isForType(t))return s}return this.plugins}_get(t,e,s){const n=e.get(t);if(n===void 0)throw new Error('"'+t+'" is not a registered '+s+".");return n}}var ft=new Rh;class Wh{constructor(){this._init=[]}notify(t,e,s,n){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=n?this._descriptors(t).filter(n):this._descriptors(t),a=this._notify(o,t,e,s);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,s,n){n=n||{};for(const o of t){const a=o.plugin,r=a[s],l=[e,n,o.options];if(B(r,l,a)===!1&&n.cancelable)return!1}return!0}invalidate(){j(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 s=t&&t.config,n=N(s.options&&s.options.plugins,{}),o=Hh(s);return n===!1&&!e?[]:Gh(t,o,n,e)}_notifyStateChanges(t){const e=this._oldCache||[],s=this._cache,n=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function Hh(i){const t={},e=[],s=Object.keys(ft.plugins.items);for(let o=0;o<s.length;o++)e.push(ft.getPlugin(s[o]));const n=i.plugins||[];for(let o=0;o<n.length;o++){const a=n[o];e.indexOf(a)===-1&&(e.push(a),t[a.id]=!0)}return{plugins:e,localIds:t}}function Zh(i,t){return!t&&i===!1?null:i===!0?{}:i}function Gh(i,{plugins:t,localIds:e},s,n){const o=[],a=i.getContext();for(const r of t){const l=r.id,c=Zh(s[l],n);c!==null&&o.push({plugin:r,options:Fh(i.config,{plugin:r,local:e[l]},c,a)})}return o}function Fh(i,{plugin:t,local:e},s,n){const o=i.pluginScopeKeys(t),a=i.getOptionScopes(s,o);return e&&t.defaults&&a.push(t.defaults),i.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ls(i,t){const e=F.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function Uh(i,t){let e=i;return i==="_index_"?e=t:i==="_value_"&&(e=t==="x"?"y":"x"),e}function Yh(i,t){return i===t?"_index_":"_value_"}function lo(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 cs(i,...t){if(lo(i))return i;for(const e of t){const s=e.axis||Xh(e.position)||i.length>1&&lo(i[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function co(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function Kh(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(s=>s.xAxisID===i||s.yAxisID===i);if(e.length)return co(i,"x",e[0])||co(i,"y",e[0])}return{}}function Qh(i,t){const e=Vt[i.type]||{scales:{}},s=t.scales||{},n=ls(i.type,t),o=Object.create(null);return Object.keys(s).forEach(a=>{const r=s[a];if(!O(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=cs(a,r,Kh(a,i),F.scales[r.type]),c=Yh(l,n),h=e.scales||{};o[a]=be(Object.create(null),[{axis:l},r,h[l],h[c]])}),i.data.datasets.forEach(a=>{const r=a.type||i.type,l=a.indexAxis||ls(r,t),h=(Vt[r]||{}).scales||{};Object.keys(h).forEach(d=>{const u=Uh(d,l),f=a[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),be(o[f],[{axis:u},s[f],h[d]])})}),Object.keys(o).forEach(a=>{const r=o[a];be(r,[F.scales[r.type],F.scale])}),o}function ho(i){const t=i.options||(i.options={});t.plugins=N(t.plugins,{}),t.scales=Qh(i,t)}function uo(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Jh(i){return i=i||{},i.data=uo(i.data),ho(i),i}const fo=new Map,go=new Set;function mi(i,t){let e=fo.get(i);return e||(e=t(),fo.set(i,e),go.add(e)),e}const Pe=(i,t,e)=>{const s=kt(t,e);s!==void 0&&i.add(s)};class qh{constructor(t){this._config=Jh(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=uo(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(),ho(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return mi(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return mi(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return mi(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,s=this.type;return mi(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const s=this._scopeCache;let n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){const{options:n,type:o}=this,a=this._cachedScopes(t,s),r=a.get(e);if(r)return r;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>Pe(l,t,d))),h.forEach(d=>Pe(l,n,d)),h.forEach(d=>Pe(l,Vt[o]||{},d)),h.forEach(d=>Pe(l,F,d)),h.forEach(d=>Pe(l,Yi,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),go.has(e)&&a.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,Vt[e]||{},F.datasets[e]||{},{type:e},F,Yi]}resolveNamedOptions(t,e,s,n=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=po(this._resolverCache,t,n);let l=a;if($h(a,e)){o.$shared=!1,s=Lt(s)?s():s;const c=this.createResolver(t,s,r);l=ie(a,s,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){const{resolver:o}=po(this._resolverCache,t,s);return O(e)?ie(o,e,void 0,n):o}}function po(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));const n=e.join();let o=s.get(n);return o||(o={resolver:Ji(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},s.set(n,o)),o}const _h=i=>O(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||Lt(i[e]),!1);function $h(i,t){const{isScriptable:e,isIndexable:s}=pn(i);for(const n of t){const o=e(n),a=s(n),r=(a||o)&&i[n];if(o&&(Lt(r)||_h(r))||a&&R(r))return!0}return!1}var td="4.4.0";const ed=["top","bottom","left","right","chartArea"];function mo(i,t){return i==="top"||i==="bottom"||ed.indexOf(i)===-1&&t==="x"}function bo(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function xo(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),B(e&&e.onComplete,[i],t)}function id(i){const t=i.chart,e=t.options.animation;B(e&&e.onProgress,[i],t)}function yo(i){return In()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const bi={},Mo=i=>{const t=yo(i);return Object.values(bi).filter(e=>e.canvas===t).pop()};function sd(i,t,e){const s=Object.keys(i);for(const n of s){const o=+n;if(o>=t){const a=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=a)}}}function nd(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}function xi(i,t,e){return i.options.clip?i[e]:t[e]}function od(i,t){const{xScale:e,yScale:s}=i;return e&&s?{left:xi(e,t,"left"),right:xi(e,t,"right"),top:xi(s,t,"top"),bottom:xi(s,t,"bottom")}:t}class vt{static register(...t){ft.add(...t),wo()}static unregister(...t){ft.remove(...t),wo()}constructor(t,e){const s=this.config=new qh(e),n=yo(t),o=Mo(n);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=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||vh(n)),this.platform.updateConfig(s);const r=this.platform.acquireContext(n,a.aspectRatio),l=r&&r.canvas,c=l&&l.height,h=l&&l.width;if(this.id=rl(),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 Wh,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Il(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],bi[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}wt.listen(this,"complete",xo),wt.listen(this,"progress",id),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return j(t)?e&&o?o:n?s/n: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 ft}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():An(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return un(this.canvas,this.ctx),this}stop(){return wt.stop(this),this}resize(t,e){wt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,o),r=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,An(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),B(s.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};E(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((a,r)=>(a[r]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const r=e[a],l=cs(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=cs(l,r),h=N(r.type,a.dtype);(r.position===void 0||mo(r.position,c)!==mo(a.dposition))&&(r.position=a.dposition),n[l]=!0;let d=null;if(l in s&&s[l].type===h)d=s[l];else{const u=ft.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(r,t)}),E(n,(a,r)=>{a||delete s[r]}),E(s,a=>{$.configure(this,a,a.options),$.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;n<s;++n)this._destroyDatasetMeta(n);t.splice(e,s-e)}this._sortedMetasets=t.slice(0).sort(bo("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s<n;s++){const o=e[s];let a=this.getDatasetMeta(s);const r=o.type||this.config.type;if(a.type&&a.type!==r&&(this._destroyDatasetMeta(s),a=this.getDatasetMeta(s)),a.type=r,a.indexAxis=o.indexAxis||ls(r,this.options),a.order=o.order||0,a.index=s,a.label=""+o.label,a.visible=this.isDatasetVisible(s),a.controller)a.controller.updateIndex(s),a.controller.linkScales();else{const l=ft.getController(r),{datasetElementType:c,dataElementType:h}=F.datasets[r];Object.assign(l,{dataElementType:ft.getElement(h),datasetElementType:c&&ft.getElement(c)}),a.controller=new l(this,s),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 s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.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=!n&&o.indexOf(d)===-1;d.buildOrUpdateElements(u),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=s.layout.autoPadding?a:0,this._updateLayout(a),n||E(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(bo("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=>{$.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Xs(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of e){const a=s==="_removeElements"?-o:o;sd(t,n,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),n=s(0);for(let o=1;o<e;o++)if(!Xs(n,s(o)))return;return Array.from(n).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;$.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],E(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e<s;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,s=this.data.datasets.length;e<s;++e)this._updateDataset(e,Lt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const s=this.getDatasetMeta(t),n={meta:s,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(s.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(wt.has(this)?this.attached&&!wt.running(this)&&wt.start(this):(this.draw(),xo({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:s,height:n}=this._resizeBeforeDraw;this._resize(s,n),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,s=[];let n,o;for(n=0,o=e.length;n<o;++n){const a=e[n];(!t||a.visible)&&s.push(a)}return s}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,s=t._clip,n=!s.disabled,o=od(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(n&&ti(e,{left:s.left===!1?0:o.left-s.left,right:s.right===!1?this.width:o.right+s.right,top:s.top===!1?0:o.top-s.top,bottom:s.bottom===!1?this.height:o.bottom+s.bottom}),t.controller.draw(),n&&ei(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return Mt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){const o=eh.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={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},s.push(n)),n}getContext(){return this.$context||(this.$context=Ct(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){const s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const n=s?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,n);xe(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),a.update(o,{visible:s}),this.update(r=>r.datasetIndex===t?n: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(),wt.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(),un(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete bi[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,s=(o,a)=>{e.addEventListener(this,o,a),t[o]=a},n=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};E(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(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=()=>{n("attach",r),this.attached=!0,this.resize(),s("resize",o),s("detach",a)};a=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("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,s){const n=s?"set":"remove";let o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,l=t.length;r<l;++r){a=t[r];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[n+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],s=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}});!Ke(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,s){const n=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=s?t:o(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:n=[],options:o}=this,a=e,r=this._getActiveElements(t,n,s,a),l=fl(t),c=nd(t,this._lastEvent,s,l);s&&(this._lastEvent=null,B(o.onHover,[t,r,this],this),l&&B(o.onClick,[t,r,this],this));const h=!Ke(r,n);return(h||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}T(vt,"defaults",F),T(vt,"instances",bi),T(vt,"overrides",Vt),T(vt,"registry",ft),T(vt,"version",td),T(vt,"getChart",Mo);function wo(){return E(vt.instances,i=>i._plugins.invalidate())}function ad(i,t,e){const{startAngle:s,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=t;let c=n/r;i.beginPath(),i.arc(o,a,r,s-c,e+c),l>n?(c=n/l,i.arc(o,a,l,e+c,s-c,!0)):i.arc(o,a,n,e+U,s-U),i.closePath(),i.clip()}function rd(i){return Qi(i,["outerStart","outerEnd","innerStart","innerEnd"])}function ld(i,t,e,s){const n=rd(i.options.borderRadius),o=(e-t)/2,a=Math.min(o,s*t/2),r=l=>{const c=(e-Math.min(o,l))*s/2;return K(l,0,Math.min(o,c))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:K(n.innerStart,0,a),innerEnd:K(n.innerEnd,0,a)}}function oe(i,t,e,s){return{x:e+i*Math.cos(t),y:s+i*Math.sin(t)}}function yi(i,t,e,s,n,o){const{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:h}=t,d=Math.max(t.outerRadius+s+e-c,0),u=h>0?h+s+e+c:0;let f=0;const g=n-l;if(s){const V=h>0?h-s:0,Z=d>0?d-s:0,Y=(V+Z)/2,dt=Y!==0?g*Y/(Y+s):g;f=(g-dt)/2}const p=Math.max(.001,g*d-e/W)/d,m=(g-p)/2,x=l+m+f,y=n-m-f,{outerStart:A,outerEnd:I,innerStart:M,innerEnd:D}=ld(t,u,d,y-x),z=d-A,k=d-I,L=x+A/z,C=y-I/k,S=u+M,P=u+D,J=x+M/S,ot=y-D/P;if(i.beginPath(),o){const V=(L+C)/2;if(i.arc(a,r,d,L,V),i.arc(a,r,d,V,C),I>0){const tt=oe(k,C,a,r);i.arc(tt.x,tt.y,I,C,y+U)}const Z=oe(P,y,a,r);if(i.lineTo(Z.x,Z.y),D>0){const tt=oe(P,ot,a,r);i.arc(tt.x,tt.y,D,y+U,ot+Math.PI)}const Y=(y-D/u+(x+M/u))/2;if(i.arc(a,r,u,y-D/u,Y,!0),i.arc(a,r,u,Y,x+M/u,!0),M>0){const tt=oe(S,J,a,r);i.arc(tt.x,tt.y,M,J+Math.PI,x-U)}const dt=oe(z,x,a,r);if(i.lineTo(dt.x,dt.y),A>0){const tt=oe(z,L,a,r);i.arc(tt.x,tt.y,A,x-U,L)}}else{i.moveTo(a,r);const V=Math.cos(L)*d+a,Z=Math.sin(L)*d+r;i.lineTo(V,Z);const Y=Math.cos(C)*d+a,dt=Math.sin(C)*d+r;i.lineTo(Y,dt)}i.closePath()}function cd(i,t,e,s,n){const{fullCircles:o,startAngle:a,circumference:r}=t;let l=t.endAngle;if(o){yi(i,t,e,s,l,n);for(let c=0;c<o;++c)i.fill();isNaN(r)||(l=a+(r%H||H))}return yi(i,t,e,s,l,n),i.fill(),l}function hd(i,t,e,s,n){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 g=t.endAngle;if(o){yi(i,t,e,s,g,n);for(let p=0;p<o;++p)i.stroke();isNaN(r)||(g=a+(r%H||H))}f&&ad(i,t,g),o||(yi(i,t,e,s,g,n),i.stroke())}class je extends ht{constructor(e){super();T(this,"circumference");T(this,"endAngle");T(this,"fullCircles");T(this,"innerRadius");T(this,"outerRadius");T(this,"pixelMargin");T(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,s,n){const o=this.getProps(["x","y"],n),{angle:a,distance:r}=_s(o,{x:e,y:s}),{startAngle:l,endAngle:c,innerRadius:h,outerRadius:d,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),f=(this.options.spacing+this.options.borderWidth)/2,p=N(u,c-l)>=H||Me(a,l,c),m=xt(r,h+f,d+f);return p&&m}getCenterPoint(e){const{x:s,y:n,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:s+Math.cos(d)*u,y:n+Math.sin(d)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:s,circumference:n}=this,o=(s.offset||0)/4,a=(s.spacing||0)/2,r=s.circular;if(this.pixelMargin=s.borderAlign==="inner"?.33:0,this.fullCircles=n>H?Math.floor(n/H):0,n===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(W,n||0)),h=o*c;e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,cd(e,this,h,a,r),hd(e,this,h,a,r),e.restore()}}T(je,"id","arc"),T(je,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),T(je,"defaultRoutes",{backgroundColor:"backgroundColor"}),T(je,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function vo(i,t,e=t){i.lineCap=N(e.borderCapStyle,t.borderCapStyle),i.setLineDash(N(e.borderDash,t.borderDash)),i.lineDashOffset=N(e.borderDashOffset,t.borderDashOffset),i.lineJoin=N(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=N(e.borderWidth,t.borderWidth),i.strokeStyle=N(e.borderColor,t.borderColor)}function dd(i,t,e){i.lineTo(e.x,e.y)}function ud(i){return i.stepped?jl:i.tension||i.cubicInterpolationMode==="monotone"?El:dd}function Io(i,t,e={}){const s=i.length,{start:n=0,end:o=s-1}=e,{start:a,end:r}=t,l=Math.max(n,a),c=Math.min(o,r),h=n<a&&o<a||n>r&&o>r;return{count:s,start:l,loop:t.loop,ilen:c<l&&!h?s+c-l:c-l}}function fd(i,t,e,s){const{points:n,options:o}=t,{count:a,start:r,loop:l,ilen:c}=Io(n,e,s),h=ud(o);let{move:d=!0,reverse:u}=s||{},f,g,p;for(f=0;f<=c;++f)g=n[(r+(u?c-f:f))%a],!g.skip&&(d?(i.moveTo(g.x,g.y),d=!1):h(i,p,g,u,o.stepped),p=g);return l&&(g=n[(r+(u?c:0))%a],h(i,p,g,u,o.stepped)),!!l}function gd(i,t,e,s){const n=t.points,{count:o,start:a,ilen:r}=Io(n,e,s),{move:l=!0,reverse:c}=s||{};let h=0,d=0,u,f,g,p,m,x;const y=I=>(a+(c?r-I:I))%o,A=()=>{p!==m&&(i.lineTo(h,m),i.lineTo(h,p),i.lineTo(h,x))};for(l&&(f=n[y(0)],i.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=n[y(u)],f.skip)continue;const I=f.x,M=f.y,D=I|0;D===g?(M<p?p=M:M>m&&(m=M),h=(d*h+I)/++d):(A(),i.lineTo(I,M),g=D,d=0,p=m=M),x=M}A()}function hs(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:fd}function pd(i){return i.stepped?gc:i.tension||i.cubicInterpolationMode==="monotone"?pc:Gt}function md(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),vo(i,t.options),i.stroke(n)}function bd(i,t,e,s){const{segments:n,options:o}=t,a=hs(t);for(const r of n)vo(i,o,r.style),i.beginPath(),a(i,t,r,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}const xd=typeof Path2D=="function";function yd(i,t,e,s){xd&&!t.options.segment?md(i,t,e,s):bd(i,t,e,s)}class St extends ht{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 s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const n=s.spanGaps?this._loop:this._fullLoop;ac(this._points,s,t,n,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=wc(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,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){const s=this.options,n=t[e],o=this.points,a=Cn(this,{property:e,start:n,end:n});if(!a.length)return;const r=[],l=pd(s);let c,h;for(c=0,h=a.length;c<h;++c){const{start:d,end:u}=a[c],f=o[d],g=o[u];if(f===g){r.push(f);continue}const p=Math.abs((n-f[e])/(g[e]-f[e])),m=l(f,g,p,s.stepped);m[e]=t[e],r.push(m)}return r.length===1?r[0]:r}pathSegment(t,e,s){return hs(this)(t,this,e,s)}path(t,e,s){const n=this.segments,o=hs(this);let a=this._loop;e=e||0,s=s||this.points.length-e;for(const r of n)a&=o(t,this,r,{start:e,end:e+s-1});return!!a}draw(t,e,s,n){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),yd(t,this,s,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}T(St,"id","line"),T(St,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),T(St,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),T(St,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Ao(i,t,e,s){const n=i.options,{[e]:o}=i.getProps([e],s);return Math.abs(t-o)<n.radius+n.hitRadius}class Mi extends ht{constructor(e){super();T(this,"parsed");T(this,"skip");T(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,s,n){const o=this.options,{x:a,y:r}=this.getProps(["x","y"],n);return Math.pow(e-a,2)+Math.pow(s-r,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,s){return Ao(this,e,"x",s)}inYRange(e,s){return Ao(this,e,"y",s)}getCenterPoint(e){const{x:s,y:n}=this.getProps(["x","y"],e);return{x:s,y:n}}size(e){e=e||this.options||{};let s=e.radius||0;s=Math.max(s,s&&e.hoverRadius||0);const n=s&&e.borderWidth||0;return(s+n)*2}draw(e,s){const n=this.options;this.skip||n.radius<.1||!Mt(this,s,this.size(n)/2)||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,Ki(e,n,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}T(Mi,"id","point"),T(Mi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),T(Mi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function To(i,t){const{x:e,y:s,base:n,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,n),l=Math.max(e,n),c=s-d,h=s+d):(d=o/2,r=e-d,l=e+d,c=Math.min(s,n),h=Math.max(s,n)),{left:r,top:c,right:l,bottom:h}}function Ot(i,t,e,s){return i?0:K(t,e,s)}function Md(i,t,e){const s=i.options.borderWidth,n=i.borderSkipped,o=gn(s);return{t:Ot(n.top,o.top,0,e),r:Ot(n.right,o.right,0,t),b:Ot(n.bottom,o.bottom,0,e),l:Ot(n.left,o.left,0,t)}}function wd(i,t,e){const{enableBorderRadius:s}=i.getProps(["enableBorderRadius"]),n=i.options.borderRadius,o=Wt(n),a=Math.min(t,e),r=i.borderSkipped,l=s||O(n);return{topLeft:Ot(!l||r.top||r.left,o.topLeft,0,a),topRight:Ot(!l||r.top||r.right,o.topRight,0,a),bottomLeft:Ot(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:Ot(!l||r.bottom||r.right,o.bottomRight,0,a)}}function vd(i){const t=To(i),e=t.right-t.left,s=t.bottom-t.top,n=Md(i,e/2,s/2),o=wd(i,e/2,s/2);return{outer:{x:t.left,y:t.top,w:e,h:s,radius:o},inner:{x:t.left+n.l,y:t.top+n.t,w:e-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}function ds(i,t,e,s){const n=t===null,o=e===null,r=i&&!(n&&o)&&To(i,s);return r&&(n||xt(t,r.left,r.right))&&(o||xt(e,r.top,r.bottom))}function Id(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function Ad(i,t){i.rect(t.x,t.y,t.w,t.h)}function us(i,t,e={}){const s=i.x!==e.x?-t:0,n=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-s,a=(i.y+i.h!==e.y+e.h?t:0)-n;return{x:i.x+s,y:i.y+n,w:i.w+o,h:i.h+a,radius:i.radius}}class wi extends ht{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:s,backgroundColor:n}}=this,{inner:o,outer:a}=vd(this),r=Id(a.radius)?Ae:Ad;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),r(t,us(a,e,o)),t.clip(),r(t,us(o,-e,a)),t.fillStyle=s,t.fill("evenodd")),t.beginPath(),r(t,us(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,s){return ds(this,t,e,s)}inXRange(t,e){return ds(this,t,null,e)}inYRange(t,e){return ds(this,null,t,e)}getCenterPoint(t){const{x:e,y:s,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?s:(s+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}T(wi,"id","bar"),T(wi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),T(wi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Td=Object.freeze({__proto__:null,ArcElement:je,BarElement:wi,LineElement:St,PointElement:Mi});const fs=["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=fs.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));function zo(i){return fs[i%fs.length]}function ko(i){return Do[i%Do.length]}function Dd(i,t){return i.borderColor=zo(t),i.backgroundColor=ko(t),++t}function zd(i,t){return i.backgroundColor=i.data.map(()=>zo(t++)),t}function kd(i,t){return i.backgroundColor=i.data.map(()=>ko(t++)),t}function Ld(i){let t=0;return(e,s)=>{const n=i.getDatasetMeta(s).controller;n instanceof Ft?t=zd(e,t):n instanceof ze?t=kd(e,t):n&&(t=Dd(e,t))}}function Lo(i){let t;for(t in i)if(i[t].borderColor||i[t].backgroundColor)return!0;return!1}function Nd(i){return i&&(i.borderColor||i.backgroundColor)}var Cd={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,t,e){if(!e.enabled)return;const{data:{datasets:s},options:n}=i.config,{elements:o}=n;if(!e.forceOverride&&(Lo(s)||Nd(n)||o&&Lo(o)))return;const a=Ld(i);s.forEach(a)}};function Sd(i,t,e,s,n){const o=n.samples||s;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,g,p;for(a[l++]=i[h],d=0;d<o-2;d++){let m=0,x=0,y;const A=Math.floor((d+1)*r)+1+t,I=Math.min(Math.floor((d+2)*r)+1,e)+t,M=I-A;for(y=A;y<I;y++)m+=i[y].x,x+=i[y].y;m/=M,x/=M;const D=Math.floor(d*r)+1+t,z=Math.min(Math.floor((d+1)*r)+1,e)+t,{x:k,y:L}=i[h];for(f=g=-1,y=D;y<z;y++)g=.5*Math.abs((k-m)*(i[y].y-L)-(k-i[y].x)*(x-L)),g>f&&(f=g,u=i[y],p=y);a[l++]=u,h=p}return a[l++]=i[c],a}function Od(i,t,e,s){let n=0,o=0,a,r,l,c,h,d,u,f,g,p;const m=[],x=t+e-1,y=i[t].x,I=i[x].x-y;for(a=t;a<t+e;++a){r=i[a],l=(r.x-y)/I*s,c=r.y;const M=l|0;if(M===h)c<g?(g=c,d=a):c>p&&(p=c,u=a),n=(o*n+r.x)/++o;else{const D=a-1;if(!j(d)&&!j(u)){const z=Math.min(d,u),k=Math.max(d,u);z!==f&&z!==D&&m.push({...i[z],x:n}),k!==f&&k!==D&&m.push({...i[k],x:n})}a>0&&D!==f&&m.push(i[D]),m.push(r),h=M,o=0,g=p=c,d=u=f=a}}return m}function No(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 Co(i){i.data.datasets.forEach(t=>{No(t)})}function Pd(i,t){const e=t.length;let s=0,n;const{iScale:o}=i,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(s=K(yt(t,o.axis,a).lo,0,e-1)),c?n=K(yt(t,o.axis,r).hi+1,s,e)-s:n=e-s,{start:s,count:n}}var jd={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){Co(i);return}const s=i.width;i.data.datasets.forEach((n,o)=>{const{_data:a,indexAxis:r}=n,l=i.getDatasetMeta(o),c=a||n.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}=Pd(l,c);const f=e.threshold||4*s;if(u<=f){No(n);return}j(a)&&(n._data=c,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let g;switch(e.algorithm){case"lttb":g=Sd(c,d,u,s,e);break;case"min-max":g=Od(c,d,u,s);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=g})},destroy(i){Co(i)}};function Ed(i,t,e){const s=i.segments,n=i.points,o=t.points,a=[];for(const r of s){let{start:l,end:c}=r;c=ps(l,c,n);const h=gs(e,n[l],n[c],r.loop);if(!t.segments){a.push({source:r,target:h,start:n[l],end:n[c]});continue}const d=Cn(t,h);for(const u of d){const f=gs(e,o[u.start],o[u.end],u.loop),g=Nn(r,n,f);for(const p of g)a.push({source:p,target:u,start:{[e]:So(h,f,"start",Math.max)},end:{[e]:So(h,f,"end",Math.min)}})}}return a}function gs(i,t,e,s){if(s)return;let n=t[i],o=e[i];return i==="angle"&&(n=nt(n),o=nt(o)),{property:i,start:n,end:o}}function Vd(i,t){const{x:e=null,y:s=null}=i||{},n=t.points,o=[];return t.segments.forEach(({start:a,end:r})=>{r=ps(a,r,n);const l=n[a],c=n[r];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function ps(i,t,e){for(;t>i;t--){const s=e[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function So(i,t,e,s){return i&&t?s(i[e],t[e]):i?i[e]:t?t[e]:0}function Oo(i,t){let e=[],s=!1;return R(i)?(s=!0,e=i):e=Vd(i,t),e.length?new St({points:e,options:{tension:0},_loop:s,_fullLoop:s}):null}function Po(i){return i&&i.fill!==!1}function Bd(i,t,e){let n=i[t].fill;const o=[t];let a;if(!e)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!G(n))return n;if(a=i[n],!a)return!1;if(a.visible)return n;o.push(n),n=a.fill}return!1}function Rd(i,t,e){const s=Gd(i);if(O(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return G(n)&&Math.floor(n)===n?Wd(s[0],t,n,e):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Wd(i,t,e,s){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=s?!1:e}function Hd(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:O(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Zd(i,t,e){let s;return i==="start"?s=e:i==="end"?s=t.options.reverse?t.min:t.max:O(i)?s=i.value:s=t.getBaseValue(),s}function Gd(i){const t=i.options,e=t.fill;let s=N(e&&e.target,e);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function Fd(i){const{scale:t,index:e,line:s}=i,n=[],o=s.segments,a=s.points,r=Ud(t,e);r.push(Oo({x:null,y:t.bottom},s));for(let l=0;l<o.length;l++){const c=o[l];for(let h=c.start;h<=c.end;h++)Yd(n,a[h],r)}return new St({points:n,options:{}})}function Ud(i,t){const e=[],s=i.getMatchingVisibleMetas("line");for(let n=0;n<s.length;n++){const o=s[n];if(o.index===t)break;o.hidden||e.unshift(o.dataset)}return e}function Yd(i,t,e){const s=[];for(let n=0;n<e.length;n++){const o=e[n],{first:a,last:r,point:l}=Xd(o,t,"x");if(!(!l||a&&r)){if(a)s.unshift(l);else if(i.push(l),!r)break}}i.push(...s)}function Xd(i,t,e){const s=i.interpolate(t,e);if(!s)return{};const n=s[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(xt(n,d,u)){r=n===d,l=n===u;break}}return{first:r,last:l,point:s}}class jo{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,s){const{x:n,y:o,radius:a}=this;return e=e||{start:0,end:H},t.arc(n,o,a,e.end,e.start,!0),!s.bounds}interpolate(t){const{x:e,y:s,radius:n}=this,o=t.angle;return{x:e+Math.cos(o)*n,y:s+Math.sin(o)*n,angle:o}}}function Kd(i){const{chart:t,fill:e,line:s}=i;if(G(e))return Qd(t,e);if(e==="stack")return Fd(i);if(e==="shape")return!0;const n=Jd(i);return n instanceof jo?n:Oo(n,s)}function Qd(i,t){const e=i.getDatasetMeta(t);return e&&i.isDatasetVisible(t)?e.dataset:null}function Jd(i){return(i.scale||{}).getPointPositionForValue?_d(i):qd(i)}function qd(i){const{scale:t={},fill:e}=i,s=Hd(e,t);if(G(s)){const n=t.isHorizontal();return{x:n?s:null,y:n?null:s}}return null}function _d(i){const{scale:t,fill:e}=i,s=t.options,n=t.getLabels().length,o=s.reverse?t.max:t.min,a=Zd(e,t,o),r=[];if(s.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<n;++l)r.push(t.getPointPositionForValue(l,a));return r}function ms(i,t,e){const s=Kd(t),{line:n,scale:o,axis:a}=t,r=n.options,l=r.fill,c=r.backgroundColor,{above:h=c,below:d=c}=l||{};s&&n.points.length&&(ti(i,e),$d(i,{line:n,target:s,above:h,below:d,area:e,scale:o,axis:a}),ei(i))}function $d(i,t){const{line:e,target:s,above:n,below:o,area:a,scale:r}=t,l=e._loop?"angle":t.axis;i.save(),l==="x"&&o!==n&&(Eo(i,s,a.top),Vo(i,{line:e,target:s,color:n,scale:r,property:l}),i.restore(),i.save(),Eo(i,s,a.bottom)),Vo(i,{line:e,target:s,color:o,scale:r,property:l}),i.restore()}function Eo(i,t,e){const{segments:s,points:n}=t;let o=!0,a=!1;i.beginPath();for(const r of s){const{start:l,end:c}=r,h=n[l],d=n[ps(l,c,n)];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 Vo(i,t){const{line:e,target:s,property:n,color:o,scale:a}=t,r=Ed(e,s,n);for(const{source:l,target:c,start:h,end:d}of r){const{style:{backgroundColor:u=o}={}}=l,f=s!==!0;i.save(),i.fillStyle=u,tu(i,a,f&&gs(n,h,d)),i.beginPath();const g=!!e.pathSegment(i,l);let p;if(f){g?i.closePath():Bo(i,s,d,n);const m=!!s.pathSegment(i,c,{move:g,reverse:!0});p=g&&m,p||Bo(i,s,h,n)}i.closePath(),i.fill(p?"evenodd":"nonzero"),i.restore()}}function tu(i,t,e){const{top:s,bottom:n}=t.chart.chartArea,{property:o,start:a,end:r}=e||{};o==="x"&&(i.beginPath(),i.rect(a,s,r-a,n-s),i.clip())}function Bo(i,t,e,s){const n=t.interpolate(e,s);n&&i.lineTo(n.x,n.y)}var eu={id:"filler",afterDatasetsUpdate(i,t,e){const s=(i.data.datasets||[]).length,n=[];let o,a,r,l;for(a=0;a<s;++a)o=i.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof St&&(l={visible:i.isDatasetVisible(a),index:a,fill:Rd(r,a,s),chart:i,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,n.push(l);for(a=0;a<s;++a)l=n[a],!(!l||l.fill===!1)&&(l.fill=Bd(n,a,e.propagate))},beforeDraw(i,t,e){const s=e.drawTime==="beforeDraw",n=i.getSortedVisibleDatasetMetas(),o=i.chartArea;for(let a=n.length-1;a>=0;--a){const r=n[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),s&&r.fill&&ms(i.ctx,r,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const s=i.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){const o=s[n].$filler;Po(o)&&ms(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){const s=t.meta.$filler;!Po(s)||e.drawTime!=="beforeDatasetDraw"||ms(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Ro=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},iu=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class Wo extends ht{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,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,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(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,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 s=t.labels,n=X(s.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=Ro(s,o);let c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,n,r,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){const{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+r;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((g,p)=>{const m=s+e/2+o.measureText(g.text).width;(p===0||c[c.length-1]+m+2*r>a)&&(d+=h,c[c.length-(p>0?0:1)]=0,f+=h,u++),l[p]={left:0,top:f,row:u,width:m,height:n},c[c.length-1]+=m+r}),d}_fitCols(t,e,s,n){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,g=0,p=0;return this.legendItems.forEach((m,x)=>{const{itemWidth:y,itemHeight:A}=su(s,e,o,m,n);x>0&&f+A+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,p++,u=f=0),l[x]={left:g,top:f,col:p,width:y,height:A},u=Math.max(u,y),f+=A+r}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,a=ne(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=q(s,this.left+n,this.right-this.lineWidths[r]);for(const c of e)r!==c.row&&(r=c.row,l=q(s,this.left+n,this.right-this.lineWidths[r])),c.top+=this.top+t+n,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+n}else{let r=0,l=q(s,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const c of e)c.col!==r&&(r=c.col,l=q(s,this.top+t+n,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+n,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;ti(t,this),this._draw(),ei(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:a}=t,r=F.color,l=ne(t.rtl,this.left,this.width),c=X(a.font),{padding:h}=a,d=c.size,u=d/2;let f;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:g,boxHeight:p,itemHeight:m}=Ro(a,d),x=function(D,z,k){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;n.save();const L=N(k.lineWidth,1);if(n.fillStyle=N(k.fillStyle,r),n.lineCap=N(k.lineCap,"butt"),n.lineDashOffset=N(k.lineDashOffset,0),n.lineJoin=N(k.lineJoin,"miter"),n.lineWidth=L,n.strokeStyle=N(k.strokeStyle,r),n.setLineDash(N(k.lineDash,[])),a.usePointStyle){const C={radius:p*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:L},S=l.xPlus(D,g/2),P=z+u;fn(n,C,S,P,a.pointStyleWidth&&g)}else{const C=z+Math.max((d-p)/2,0),S=l.leftForLtr(D,g),P=Wt(k.borderRadius);n.beginPath(),Object.values(P).some(J=>J!==0)?Ae(n,{x:S,y:C,w:g,h:p,radius:P}):n.rect(S,C,g,p),n.fill(),L!==0&&n.stroke()}n.restore()},y=function(D,z,k){Rt(n,k.text,D,z+m/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},A=this.isHorizontal(),I=this._computeTitleHeight();A?f={x:q(o,this.left+h,this.right-s[0]),y:this.top+h+I,line:0}:f={x:this.left+h,y:q(o,this.top+I+h,this.bottom-e[0].height),line:0},Dn(this.ctx,t.textDirection);const M=m+h;this.legendItems.forEach((D,z)=>{n.strokeStyle=D.fontColor,n.fillStyle=D.fontColor;const k=n.measureText(D.text).width,L=l.textAlign(D.textAlign||(D.textAlign=a.textAlign)),C=g+u+k;let S=f.x,P=f.y;l.setWidth(this.width),A?z>0&&S+C+h>this.right&&(P=f.y+=M,f.line++,S=f.x=q(o,this.left+h,this.right-s[f.line])):z>0&&P+M>this.bottom&&(S=f.x=S+e[f.line].width+h,f.line++,P=f.y=q(o,this.top+I+h,this.bottom-e[f.line].height));const J=l.x(S);if(x(J,P,D),S=Al(L,S+g+u,A?S+C:this.right,t.rtl),y(l.x(S),P,D),A)f.x+=C+h;else if(typeof D.text!="string"){const ot=c.lineHeight;f.y+=Ho(D,ot)+h}else f.y+=M}),zn(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,s=X(e.font),n=_(e.padding);if(!e.display)return;const o=ne(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=s.size/2,c=n.top+l;let h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=q(t.align,d,this.right-u);else{const g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);h=c+q(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const f=q(r,d,d+u);a.textAlign=o.textAlign(Gi(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=s.string,Rt(a,e.text,f,h,s)}_computeTitleHeight(){const t=this.options.title,e=X(t.font),s=_(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(xt(t,this.left,this.right)&&xt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;s<o.length;++s)if(n=o[s],xt(t,n.left,n.left+n.width)&&xt(e,n.top,n.top+n.height))return this.legendItems[s]}return null}handleEvent(t){const e=this.options;if(!au(t.type,e))return;const s=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const n=this._hoveredItem,o=iu(n,s);n&&!o&&B(e.onLeave,[t,n,this],this),this._hoveredItem=s,s&&!o&&B(e.onHover,[t,s,this],this)}else s&&B(e.onClick,[t,s,this],this)}}function su(i,t,e,s,n){const o=nu(s,i,t,e),a=ou(n,s,t.lineHeight);return{itemWidth:o,itemHeight:a}}function nu(i,t,e,s){let n=i.text;return n&&typeof n!="string"&&(n=n.reduce((o,a)=>o.length>a.length?o:a)),t+e.size/2+s.measureText(n).width}function ou(i,t,e){let s=i;return typeof t.text!="string"&&(s=Ho(t,e)),s}function Ho(i,t){const e=i.text?i.text.length:0;return t*e}function au(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var ru={id:"legend",_element:Wo,start(i,t,e){const s=i.legend=new Wo({ctx:i.ctx,options:e,chart:i});$.configure(i,s,e),$.addBox(i,s)},stop(i){$.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const s=i.legend;$.configure(i,s,e),s.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 s=t.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),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:s,textAlign:n,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:s||c.pointStyle,rotation:c.rotation,textAlign:n||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 bs extends ht{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 s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=R(s.text)?s.text.length:1;this._padding=_(s.padding);const o=n*X(s.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:s,bottom:n,right:o,options:a}=this,r=a.align;let l=0,c,h,d;return this.isHorizontal()?(h=q(r,s,o),d=e+t,c=o-s):(a.position==="left"?(h=s+t,d=q(r,n,e),l=W*-.5):(h=o-t,d=q(r,e,n),l=W*.5),c=n-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const s=X(e.font),o=s.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);Rt(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:Gi(e.align),textBaseline:"middle",translation:[a,r]})}}function lu(i,t){const e=new bs({ctx:i.ctx,options:t,chart:i});$.configure(i,e,t),$.addBox(i,e),i.titleBlock=e}var cu={id:"title",_element:bs,start(i,t,e){lu(i,e)},stop(i){const t=i.titleBlock;$.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const s=i.titleBlock;$.configure(i,s,e),s.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 vi=new WeakMap;var hu={id:"subtitle",start(i,t,e){const s=new bs({ctx:i.ctx,options:e,chart:i});$.configure(i,s,e),$.addBox(i,s),vi.set(i,s)},stop(i){$.removeBox(i,vi.get(i)),vi.delete(i)},beforeUpdate(i,t,e){const s=vi.get(i);$.configure(i,s,e),s.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 Ee={average(i){if(!i.length)return!1;let t,e,s=0,n=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();s+=r.x,n+=r.y,++o}}return{x:s/o,y:n/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,s=t.y,n=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<n&&(n=h,r=l)}}if(r){const l=r.tooltipPosition();e=l.x,s=l.y}return{x:e,y:s}}};function gt(i,t){return t&&(R(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function It(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
1258
+ */class Tc{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,s,n){const o=e.listeners[n],a=e.duration;o.forEach(r=>r({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(s-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=nn.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}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((s,n)=>Math.max(s,n._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 s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var wt=new Tc;const jn="transparent",Dc={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=hn(i||jn),n=s.valid&&hn(t||jn);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class zc{constructor(t,e,s,n){const o=e[s];n=De([t.to,n,o,t.from]);const a=De([t.from,o,n]);this._active=!0,this._fn=t.fn||Dc[t.type||typeof a],this._easing=ve[t.easing]||ve.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=s,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,a=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=De([t.to,e,n,t.from]),this._from=De([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to;let l;if(this._active=o!==r&&(a||e<s),!this._active){this._target[n]=r,this._notify(!0);return}if(e<0){this._target[n]=o;return}l=e/s%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,r,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n<s.length;n++)s[n][e]()}}class En{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!O(t))return;const e=Object.keys(F.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const o=t[n];if(!O(o))return;const a={};for(const r of e)a[r]=o[r];(R(o.properties)&&o.properties||[n]).forEach(r=>{(r===n||!s.has(r))&&s.set(r,a)})})}_animateOptions(t,e){const s=e.options,n=Lc(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&kc(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],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"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const u=s.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 zc(u,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return wt.add(this._chart,s),!0}}function kc(i,t){const e=[],s=Object.keys(t);for(let n=0;n<s.length;n++){const o=i[s[n]];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 Vn(i,t){const e=i&&i.options||{},s=e.reverse,n=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:s?o:n,end:s?n:o}}function Nc(i,t,e){if(e===!1)return!1;const s=Vn(i,e),n=Vn(t,e);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}function Cc(i){let t,e,s,n;return O(i)?(t=i.top,e=i.right,s=i.bottom,n=i.left):t=e=s=n=i,{top:t,right:e,bottom:s,left:n,disabled:i===!1}}function Bn(i,t){const e=[],s=i._getSortedDatasetMetas(t);let n,o;for(n=0,o=s.length;n<o;++n)e.push(s[n].index);return e}function Rn(i,t,e,s={}){const n=i.keys,o=s.mode==="single";let a,r,l,c;if(t!==null){for(a=0,r=n.length;a<r;++a){if(l=+n[a],l===e){if(s.all)continue;break}c=i.values[l],Z(c)&&(o||t===0||ut(t)===ut(c))&&(t+=c)}return t}}function Sc(i){const t=Object.keys(i),e=new Array(t.length);let s,n,o;for(s=0,n=t.length;s<n;++s)o=t[s],e[s]={x:o,y:i[o]};return e}function Wn(i,t){const e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function Oc(i,t,e){return`${i.id}.${t.id}.${e.stack||e.type}`}function Pc(i){const{min:t,max:e,minDefined:s,maxDefined:n}=i.getUserBounds();return{min:s?t:Number.NEGATIVE_INFINITY,max:n?e:Number.POSITIVE_INFINITY}}function jc(i,t,e){const s=i[t]||(i[t]={});return s[e]||(s[e]={})}function Gn(i,t,e,s){for(const n of t.getMatchingVisibleMetas(s).reverse()){const o=i[n.index];if(e&&o>0||!e&&o<0)return n.index}return null}function Hn(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,c=a.axis,h=Oc(o,a,s),d=t.length;let u;for(let f=0;f<d;++f){const g=t[f],{[l]:p,[c]:m}=g,x=g._stacks||(g._stacks={});u=x[c]=jc(n,h,p),u[r]=m,u._top=Gn(u,a,!0,s.type),u._bottom=Gn(u,a,!1,s.type);const y=u._visualValues||(u._visualValues={});y[r]=m}}function es(i,t){const e=i.scales;return Object.keys(e).filter(s=>e[s].axis===t).shift()}function Ec(i,t){return Ct(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Vc(i,t,e){return Ct(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function ze(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}const is=i=>i==="reset"||i==="none",Zn=(i,t)=>t?i:Object.assign({},i),Bc=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:Bn(e,!0),values:null};class ct{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Wn(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&ze(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,u,f,g)=>d==="x"?u:d==="r"?g:f,o=e.xAxisID=N(s.xAxisID,es(t,"x")),a=e.yAxisID=N(s.yAxisID,es(t,"y")),r=e.rAxisID=N(s.rAxisID,es(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,a,r),h=e.vAxisID=n(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&&en(this._data,this),t._stacked&&ze(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(O(e))this._data=Sc(e);else if(s!==e){if(s){en(s,this);const n=this._cachedMeta;ze(n),n._parsed=[]}e&&Object.isExtensible(e)&&Il(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,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Wn(e.vScale,e),e.stack!==s.stack&&(n=!0,ze(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&Hn(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:a}=s,r=o.axis;let l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,u;if(this._parsing===!1)s._parsed=n,s._sorted=!0,u=n;else{R(n[t])?u=this.parseArrayData(s,n,t,e):O(n[t])?u=this.parseObjectData(s,n,t,e):u=this.parsePrimitiveData(s,n,t,e);const f=()=>d[r]===null||c&&d[r]<c[r];for(h=0;h<e;++h)s._parsed[h+t]=d=u[h],l&&(f()&&(l=!1),c=d);s._sorted=l}a&&Hn(this,u)}parsePrimitiveData(t,e,s,n){const{iScale:o,vScale:a}=t,r=o.axis,l=a.axis,c=o.getLabels(),h=o===a,d=new Array(n);let u,f,g;for(u=0,f=n;u<f;++u)g=u+s,d[u]={[r]:h||o.parse(c[g],g),[l]:a.parse(e[g],g)};return d}parseArrayData(t,e,s,n){const{xScale:o,yScale:a}=t,r=new Array(n);let l,c,h,d;for(l=0,c=n;l<c;++l)h=l+s,d=e[h],r[l]={x:o.parse(d[0],h),y:a.parse(d[1],h)};return r}parseObjectData(t,e,s,n){const{xScale:o,yScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,c=new Array(n);let h,d,u,f;for(h=0,d=n;h<d;++h)u=h+s,f=e[u],c[h]={x:o.parse(kt(f,r),u),y:a.parse(kt(f,l),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,s){const n=this.chart,o=this._cachedMeta,a=e[t.axis],r={keys:Bn(n,!0),values:e._stacks[t.axis]._visualValues};return Rn(r,a,o.index,{mode:s})}updateRangeFromParsed(t,e,s,n){const o=s[e.axis];let a=o===null?NaN:o;const r=n&&s._stacks[e.axis];n&&r&&(n.values=r,a=Rn(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const s=this._cachedMeta,n=s._parsed,o=s._sorted&&t===s.iScale,a=n.length,r=this._getOtherScale(t),l=Bc(e,s,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=Pc(r);let u,f;function g(){f=n[u];const p=f[r.axis];return!Z(f[t.axis])||h>p||d<p}for(u=0;u<a&&!(!g()&&(this.updateRangeFromParsed(c,t,f,l),o));++u);if(o){for(u=a-1;u>=0;--u)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,a;for(n=0,o=e.length;n<o;++n)a=e[n][t.axis],Z(a)&&s.push(a);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,s=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:s?""+s.getLabelForValue(o[s.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=Cc(N(this.options.clip,Nc(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,s=this._cachedMeta,n=s.data||[],o=e.chartArea,a=[],r=this._drawStart||0,l=this._drawCount||n.length-r,c=this.options.drawActiveElementsOnTop;let h;for(s.dataset&&s.dataset.draw(t,o,r,l),h=r;h<r+l;++h){const d=n[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 s=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,e,s){const n=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=Vc(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=Ec(this.chart.getContext(),this.index)),o.dataset=n,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=s,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",s){const n=e==="active",o=this._cachedDataOpts,a=t+"-"+e,r=o[a],l=this.enableOptionSharing&&ye(s);if(r)return Zn(r,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),d=n?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),h),f=Object.keys(F.elements[t]),g=()=>this.getContext(s,n,e),p=c.resolveNamedOptions(u,f,g,d);return p.$shared&&(p.$shared=l,o[a]=Object.freeze(Zn(p,l))),p}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(n.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,s,e))}const c=new En(n,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||is(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),a=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:a}}updateElement(t,e,s,n){is(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!is(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"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,s=this._cachedMeta.data;for(const[r,l,c]of this._syncList)this[r](l,c);this._syncList=[];const n=s.length,o=e.length,a=Math.min(o,n);a&&this.parse(0,a),o>n?this._insertElements(n,o-n,t):o<n&&this._removeElements(o,n-o)}_insertElements(t,e,s=!0){const n=this._cachedMeta,o=n.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(n._parsed),this.parse(t,e),s&&this.updateElements(o,t,e,"reset")}updateElements(t,e,s,n){}_removeElements(t,e){const s=this._cachedMeta;if(this._parsing){const n=s._parsed.splice(t,e);s._stacked&&ze(s,n)}s.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,s,n]=t;this[e](s,n)}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 s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}T(ct,"defaults",{}),T(ct,"datasetElementType",null),T(ct,"dataElementType",null);function Rc(i,t){if(!i._cache.$bar){const e=i.getMatchingVisibleMetas(t);let s=[];for(let n=0,o=e.length;n<o;n++)s=s.concat(e[n].controller.getAllParsedValues(i));i._cache.$bar=sn(s.sort((n,o)=>n-o))}return i._cache.$bar}function Wc(i){const t=i.iScale,e=Rc(t,i.type);let s=t._length,n,o,a,r;const l=()=>{a===32767||a===-32768||(ye(r)&&(s=Math.min(s,Math.abs(a-r)||s)),r=a)};for(n=0,o=e.length;n<o;++n)a=t.getPixelForValue(e[n]),l();for(r=void 0,n=0,o=t.ticks.length;n<o;++n)a=t.getPixelForTick(n),l();return s}function Gc(i,t,e,s){const n=e.barThickness;let o,a;return j(n)?(o=t.min*e.categoryPercentage,a=e.barPercentage):(o=n*s,a=1),{chunk:o/s,ratio:a,start:t.pixels[i]-o/2}}function Hc(i,t,e,s){const n=t.pixels,o=n[i];let a=i>0?n[i-1]:null,r=i<n.length-1?n[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/s,ratio:e.barPercentage,start:c}}function Zc(i,t,e,s){const n=e.parse(i[0],s),o=e.parse(i[1],s),a=Math.min(n,o),r=Math.max(n,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:n,end:o,min:a,max:r}}function Fn(i,t,e,s){return R(i)?Zc(i,t,e,s):t[e.axis]=e.parse(i,s),t}function Un(i,t,e,s){const n=i.iScale,o=i.vScale,a=n.getLabels(),r=n===o,l=[];let c,h,d,u;for(c=e,h=e+s;c<h;++c)u=t[c],d={},d[n.axis]=r||n.parse(a[c],c),l.push(Fn(u,d,o,c));return l}function ss(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function Fc(i,t,e){return i!==0?ut(i):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Uc(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.base<i.y,e="bottom",s="top"),t?(n="end",o="start"):(n="start",o="end"),{start:e,end:s,reverse:t,top:n,bottom:o}}function Yc(i,t,e,s){let n=t.borderSkipped;const o={};if(!n){i.borderSkipped=o;return}if(n===!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);n==="middle"&&e&&(i.enableBorderRadius=!0,(e._top||0)===s?n=c:(e._bottom||0)===s?n=h:(o[Yn(h,a,r,l)]=!0,n=c)),o[Yn(n,a,r,l)]=!0,i.borderSkipped=o}function Yn(i,t,e,s){return s?(i=Kc(i,t,e),i=Kn(i,e,t)):i=Kn(i,t,e),i}function Kc(i,t,e){return i===t?e:i===e?t:i}function Kn(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 ct{parsePrimitiveData(t,e,s,n){return Un(t,e,s,n)}parseArrayData(t,e,s,n){return Un(t,e,s,n)}parseObjectData(t,e,s,n){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,g,p;for(u=s,f=s+n;u<f;++u)p=e[u],g={},g[o.axis]=o.parse(kt(p,c),u),d.push(Fn(kt(p,h),g,a,u));return d}updateRangeFromParsed(t,e,s,n){super.updateRangeFromParsed(t,e,s,n);const o=s._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:s,vScale:n}=e,o=this.getParsed(t),a=o._custom,r=ss(a)?"["+a.start+", "+a.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+s.getLabelForValue(o[s.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,s,n){const o=n==="reset",{index:a,_cachedMeta:{vScale:r}}=this,l=r.getBasePixel(),c=r.isHorizontal(),h=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,n);for(let f=e;f<e+s;f++){const g=this.getParsed(f),p=o||j(g[r.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,h),x=(g._stacks||{})[r.axis],y={horizontal:c,base:p.base,enableBorderRadius:!x||ss(g._custom)||a===x._top||a===x._bottom,x:c?p.head:m.center,y:c?m.center:p.head,height:c?m.size:Math.abs(p.size),width:c?Math.abs(p.size):m.size};u&&(y.options=d||this.resolveDataElementOptions(f,t[f].active?"active":n));const A=y.options||t[f].options;Yc(y,A,x,a),Xc(y,A,h.ratio),this.updateElement(t[f],f,y,n)}}_getStacks(t,e){const{iScale:s}=this._cachedMeta,n=s.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=s.options.stacked,a=[],r=l=>{const c=l.controller.getParsed(e),h=c&&c[l.vScale.axis];if(j(h)||isNaN(h))return!0};for(const l of n)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,s){const n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,s=e.iScale,n=[];let o,a;for(o=0,a=e.data.length;o<a;++o)n.push(s.getPixelForValue(this.getParsed(o)[s.axis],o));const r=t.barThickness;return{min:r||Wc(e),pixels:n,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:s,index:n},options:{base:o,minBarLength:a}}=this,r=o||0,l=this.getParsed(t),c=l._custom,h=ss(c);let d=l[e.axis],u=0,f=s?this.applyStack(e,l,s):d,g,p;f!==d&&(u=f-d,f=d),h&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&ut(d)!==ut(c.barEnd)&&(u=0),u+=d);const m=!j(o)&&!h?o:u;let x=e.getPixelForValue(m);if(this.chart.getDataVisibility(t)?g=e.getPixelForValue(u+f):g=x,p=g-x,Math.abs(p)<a){p=Fc(p,e,r)*a,d===r&&(x-=p/2);const y=e.getPixelForDecimal(0),A=e.getPixelForDecimal(1),I=Math.min(y,A),w=Math.max(y,A);x=Math.max(Math.min(x,w),I),g=x+p,s&&!h&&(l._stacks[e.axis]._visualValues[n]=e.getValueForPixel(g)-e.getValueForPixel(x))}if(x===e.getPixelForValue(r)){const y=ut(p)*e.getLineWidthForValue(r)/2;x+=y,p-=y}return{size:p,base:x,head:g,center:g+p/2}}_calculateBarIndexPixels(t,e){const s=e.scale,n=this.options,o=n.skipNull,a=N(n.maxBarThickness,1/0);let r,l;if(e.grouped){const c=o?this._getStackCount(t):e.stackCount,h=n.barThickness==="flex"?Hc(t,e,n,c):Gc(t,e,n,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=s.getPixelForValue(this.getParsed(t)[s.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,s=t.data,n=s.length;let o=0;for(;o<n;++o)this.getParsed(o)[e.axis]!==null&&s[o].draw(this._ctx)}}T(ri,"id","bar"),T(ri,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),T(ri,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class li extends ct{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,s,n){const o=super.parsePrimitiveData(t,e,s,n);for(let a=0;a<o.length;a++)o[a]._custom=this.resolveDataElementOptions(a+s).radius;return o}parseArrayData(t,e,s,n){const o=super.parseArrayData(t,e,s,n);for(let a=0;a<o.length;a++){const r=e[s+a];o[a]._custom=N(r[2],this.resolveDataElementOptions(a+s).radius)}return o}parseObjectData(t,e,s,n){const o=super.parseObjectData(t,e,s,n);for(let a=0;a<o.length;a++){const r=e[s+a];o[a]._custom=N(r&&r.r&&+r.r,this.resolveDataElementOptions(a+s).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let s=t.length-1;s>=0;--s)e=Math.max(e,t[s].size(this.resolveDataElementOptions(s))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart.data.labels||[],{xScale:n,yScale:o}=e,a=this.getParsed(t),r=n.getLabelForValue(a.x),l=o.getLabelForValue(a.y),c=a._custom;return{label:s[t]||"",value:"("+r+", "+l+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,s,n){const o=n==="reset",{iScale:a,vScale:r}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,n),h=a.axis,d=r.axis;for(let u=e;u<e+s;u++){const f=t[u],g=!o&&this.getParsed(u),p={},m=p[h]=o?a.getPixelForDecimal(.5):a.getPixelForValue(g[h]),x=p[d]=o?r.getBasePixel():r.getPixelForValue(g[d]);p.skip=isNaN(m)||isNaN(x),c&&(p.options=l||this.resolveDataElementOptions(u,f.active?"active":n),o&&(p.options.radius=0)),this.updateElement(f,u,p,n)}}resolveDataElementOptions(t,e){const s=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const o=n.radius;return e!=="active"&&(n.radius=0),n.radius+=N(s&&s._custom,o),n}}T(li,"id","bubble"),T(li,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),T(li,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Qc(i,t,e){let s=1,n=1,o=0,a=0;if(t<G){const r=i,l=r+t,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(A,I,w)=>we(A,r,l,!0)?1:Math.max(I,I*e,w,w*e),g=(A,I,w)=>we(A,r,l,!0)?-1:Math.min(I,I*e,w,w*e),p=f(0,c,d),m=f(U,h,u),x=g(W,c,d),y=g(W+U,h,u);s=(p-x)/2,n=(m-y)/2,o=-(p+x)/2,a=-(m+y)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}class Ft extends ct{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 s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let o=l=>+s[l];if(O(s[t])){const{key:l="value"}=this._parsing;o=c=>+kt(s[c],l)}let a,r;for(a=t,r=t+e;a<r;++a)n._parsed[a]=o(a)}}_getRotation(){return lt(this.options.rotation-90)}_getCircumference(){return lt(this.options.circumference)}_getRotationExtents(){let t=G,e=-G;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const n=this.chart.getDatasetMeta(s).controller,o=n._getRotation(),a=n._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:s}=e,n=this._cachedMeta,o=n.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(s.width,s.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:g,offsetY:p}=Qc(d,h,l),m=(s.width-a)/u,x=(s.height-a)/f,y=Math.max(Math.min(m,x)/2,0),A=Us(this.options.radius,y),I=Math.max(A*l,0),w=(A-I)/this._getVisibleDatasetWeightTotal();this.offsetX=g*A,this.offsetY=p*A,n.total=this.calculateTotal(),this.outerRadius=A-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const s=this.options,n=this._cachedMeta,o=this._getCircumference();return e&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||n._parsed[t]===null||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*o/G)}updateElements(t,e,s,n){const o=n==="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,g=u?0:this.outerRadius,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(e,n);let x=this._getRotation(),y;for(y=0;y<e;++y)x+=this._circumference(y,o);for(y=e;y<e+s;++y){const A=this._circumference(y,o),I=t[y],w={x:h+this.offsetX,y:d+this.offsetY,startAngle:x,endAngle:x+A,circumference:A,outerRadius:g,innerRadius:f};m&&(w.options=p||this.resolveDataElementOptions(y,I.active?"active":n)),x+=A,this.updateElement(I,y,w,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let s=0,n;for(n=0;n<e.length;n++){const o=t._parsed[n];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(n)&&!e[n].hidden&&(s+=Math.abs(o))}return s}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?G*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=Ie(e._parsed[t],s.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const s=this.chart;let n,o,a,r,l;if(!t){for(n=0,o=s.data.datasets.length;n<o;++n)if(s.isDatasetVisible(n)){a=s.getDatasetMeta(n),t=a.data,r=a.controller;break}}if(!t)return 0;for(n=0,o=t.length;n<o;++n)l=r.resolveDataElementOptions(n),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let s=0,n=t.length;s<n;++s){const o=this.resolveDataElementOptions(s);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(e+=this._getRingWeight(s));return e}_getRingWeight(t){return Math.max(N(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}T(Ft,"id","doughnut"),T(Ft,"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"}),T(Ft,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),T(Ft,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:s,color:n}}=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:n,lineWidth:l.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index),s.chart.update()}}}});class ci extends ct{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:s,data:n=[],_dataset:o}=e,a=this.chart._animationsDisabled;let{start:r,count:l}=an(e,n,a);this._drawStart=r,this._drawCount=l,rn(e)&&(r=0,l=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=n;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!a,options:c},t),this.updateElements(n,r,l,t)}updateElements(t,e,s,n){const o=n==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,n),u=a.axis,f=r.axis,{spanGaps:g,segment:p}=this.options,m=ie(g)?g:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||o||n==="none",y=e+s,A=t.length;let I=e>0&&this.getParsed(e-1);for(let w=0;w<A;++w){const D=t[w],z=x?D:{};if(w<e||w>=y){z.skip=!0;continue}const k=this.getParsed(w),L=j(k[f]),C=z[u]=a.getPixelForValue(k[u],w),S=z[f]=o||L?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,k,l):k[f],w);z.skip=isNaN(C)||isNaN(S)||L,z.stop=w>0&&Math.abs(k[u]-I[u])>m,p&&(z.parsed=k,z.raw=c.data[w]),d&&(z.options=h||this.resolveDataElementOptions(w,D.active?"active":n)),x||this.updateElement(D,w,z,n),I=k}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}T(ci,"id","line"),T(ci,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),T(ci,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ke extends ct{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=Ie(e._parsed[t].r,s.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,s,n){return vn.bind(this)(t,e,s,n)}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((s,n)=>{const o=this.getParsed(n).r;!isNaN(o)&&this.chart.getDataVisibility(n)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,s=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),a=Math.max(s.cutoutPercentage?o/100*s.cutoutPercentage:1,0),r=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,s,n){const o=n==="reset",a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*W;let f=u,g;const p=360/this.countVisibleElements();for(g=0;g<e;++g)f+=this._computeAngle(g,n,p);for(g=e;g<e+s;g++){const m=t[g];let x=f,y=f+this._computeAngle(g,n,p),A=a.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;f=y,o&&(l.animateScale&&(A=0),l.animateRotate&&(x=y=u));const I={x:h,y:d,innerRadius:0,outerRadius:A,startAngle:x,endAngle:y,options:this.resolveDataElementOptions(g,m.active?"active":n)};this.updateElement(m,g,I,n)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((s,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,s){return this.chart.getDataVisibility(t)?lt(this.resolveDataElementOptions(t,e).angle||s):0}}T(ke,"id","polarArea"),T(ke,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),T(ke,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:s,color:n}}=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:n,lineWidth:l.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index),s.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class ns extends Ft{}T(ns,"id","pie"),T(ns,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class hi extends ct{getLabelAndValue(t){const e=this._cachedMeta.vScale,s=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(s[e.axis])}}parseObjectData(t,e,s,n){return vn.bind(this)(t,e,s,n)}update(t){const e=this._cachedMeta,s=e.dataset,n=e.data||[],o=e.iScale.getLabels();if(s.points=n,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const r={_loop:!0,_fullLoop:o.length===n.length,options:a};this.updateElement(s,void 0,r,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,s,n){const o=this._cachedMeta.rScale,a=n==="reset";for(let r=e;r<e+s;r++){const l=t[r],c=this.resolveDataElementOptions(r,l.active?"active":n),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,n)}}}T(hi,"id","radar"),T(hi,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),T(hi,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class di extends ct{getLabelAndValue(t){const e=this._cachedMeta,s=this.chart.data.labels||[],{xScale:n,yScale:o}=e,a=this.getParsed(t),r=n.getLabelForValue(a.x),l=o.getLabelForValue(a.y);return{label:s[t]||"",value:"("+r+", "+l+")"}}update(t){const e=this._cachedMeta,{data:s=[]}=e,n=this.chart._animationsDisabled;let{start:o,count:a}=an(e,s,n);if(this._drawStart=o,this._drawCount=a,rn(e)&&(o=0,a=s.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=s;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!n,options:c},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(s,o,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,s,n){const o=n==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,h=this.resolveDataElementOptions(e,n),d=this.getSharedOptions(h),u=this.includeOptions(n,d),f=a.axis,g=r.axis,{spanGaps:p,segment:m}=this.options,x=ie(p)?p:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||o||n==="none";let A=e>0&&this.getParsed(e-1);for(let I=e;I<e+s;++I){const w=t[I],D=this.getParsed(I),z=y?w:{},k=j(D[g]),L=z[f]=a.getPixelForValue(D[f],I),C=z[g]=o||k?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,D,l):D[g],I);z.skip=isNaN(L)||isNaN(C)||k,z.stop=I>0&&Math.abs(D[f]-A[f])>x,m&&(z.parsed=D,z.raw=c.data[I]),u&&(z.options=d||this.resolveDataElementOptions(I,w.active?"active":n)),y||this.updateElement(w,I,z,n),A=D}this.updateSharedOptions(d,n,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 s=t.dataset,n=s.options&&s.options.borderWidth||0;if(!e.length)return n;const o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,o,a)/2}}T(di,"id","scatter"),T(di,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),T(di,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Jc=Object.freeze({__proto__:null,BarController:ri,BubbleController:li,DoughnutController:Ft,LineController:ci,PieController:ns,PolarAreaController:ke,RadarController:hi,ScatterController:di});function Ut(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class os{constructor(t){T(this,"options");this.options=t||{}}static override(t){Object.assign(os.prototype,t)}init(){}formats(){return Ut()}parse(){return Ut()}format(){return Ut()}add(){return Ut()}diff(){return Ut()}startOf(){return Ut()}endOf(){return Ut()}}var qc={_date:os};function _c(i,t,e,s){const{controller:n,data:o,_sorted:a}=i,r=n._cachedMeta.iScale;if(r&&t===r.axis&&t!=="r"&&a&&o.length){const l=r._reversePixels?wl:yt;if(s){if(n._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,s,n){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,n);for(let f=d;f<=u;++f){const g=h[f];g.skip||s(g,c,f)}}}function $c(i){const t=i.indexOf("x")!==-1,e=i.indexOf("y")!==-1;return function(s,n){const o=t?Math.abs(s.x-n.x):0,a=e?Math.abs(s.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function as(i,t,e,s,n){const o=[];return!n&&!i.isPointInArea(t)||Le(i,e,t,function(r,l,c){!n&&!Mt(r,i.chartArea,0)||r.inRange(t.x,t.y,s)&&o.push({element:r,datasetIndex:l,index:c})},!0),o}function th(i,t,e,s){let n=[];function o(a,r,l){const{startAngle:c,endAngle:h}=a.getProps(["startAngle","endAngle"],s),{angle:d}=$s(a,{x:t.x,y:t.y});we(d,c,h)&&n.push({element:a,datasetIndex:r,index:l})}return Le(i,e,t,o),n}function eh(i,t,e,s,n,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,n);if(s&&!f)return;const g=h.getCenterPoint(n);if(!(!!o||i.isPointInArea(g))&&!f)return;const m=r(t,g);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 rs(i,t,e,s,n,o){return!o&&!i.isPointInArea(t)?[]:e==="r"&&!s?th(i,t,e,n):eh(i,t,e,s,n,o)}function Xn(i,t,e,s,n){const o=[],a=e==="x"?"inXRange":"inYRange";let r=!1;return Le(i,e,t,(l,c,h)=>{l[a](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(t.x,t.y,n))}),s&&!r?[]:o}var ih={evaluateInteractionItems:Le,modes:{index(i,t,e,s){const n=Ht(t,i),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?as(i,n,o,s,a):rs(i,n,o,!1,s,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,s){const n=Ht(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;let r=e.intersect?as(i,n,o,s,a):rs(i,n,o,!1,s,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,s){const n=Ht(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;return as(i,n,o,s,a)},nearest(i,t,e,s){const n=Ht(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;return rs(i,n,o,e.intersect,s,a)},x(i,t,e,s){const n=Ht(t,i);return Xn(i,n,"x",e.intersect,s)},y(i,t,e,s){const n=Ht(t,i);return Xn(i,n,"y",e.intersect,s)}}};const Qn=["left","top","right","bottom"];function Ne(i,t){return i.filter(e=>e.pos===t)}function Jn(i,t){return i.filter(e=>Qn.indexOf(e.pos)===-1&&e.box.axis===t)}function Ce(i,t){return i.sort((e,s)=>{const n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function sh(i){const t=[];let e,s,n,o,a,r;for(e=0,s=(i||[]).length;e<s;++e)n=i[e],{position:o,options:{stack:a,stackWeight:r=1}}=n,t.push({index:e,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:a&&o+a,stackWeight:r});return t}function nh(i){const t={};for(const e of i){const{stack:s,pos:n,stackWeight:o}=e;if(!s||!Qn.includes(n))continue;const a=t[s]||(t[s]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function oh(i,t){const e=nh(i),{vBoxMaxWidth:s,hBoxMaxHeight:n}=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*s:l&&t.availableWidth,r.height=n):(r.width=s,r.height=h?h*n:l&&t.availableHeight)}return e}function ah(i){const t=sh(i),e=Ce(t.filter(c=>c.box.fullSize),!0),s=Ce(Ne(t,"left"),!0),n=Ce(Ne(t,"right")),o=Ce(Ne(t,"top"),!0),a=Ce(Ne(t,"bottom")),r=Jn(t,"x"),l=Jn(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:Ne(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}function qn(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function _n(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,s){const{pos:n,box:o}=e,a=i.maxPadding;if(!O(n)){e.size&&(i[n]-=e.size);const d=s[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[n]+=e.size}o.getPadding&&_n(a,o.getPadding());const r=Math.max(0,t.outerWidth-qn(a,i,"left","right")),l=Math.max(0,t.outerHeight-qn(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(s){const n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function ch(i,t){const e=t.maxPadding;function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return s(i?["left","right"]:["top","bottom"])}function Se(i,t,e,s){const n=[];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,s);c|=d&&n.length,h=h||u,l.fullSize||n.push(r)}return c&&Se(n,t,e,s)||h}function ui(i,t,e,s,n){i.top=e,i.left=t,i.right=t+s,i.bottom=e+n,i.width=s,i.height=n}function $n(i,t,e,s){const n=e.padding;let{x:o,y:a}=t;for(const r of i){const l=r.box,c=s[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,n.left,a,e.outerWidth-n.right-n.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,n.top,u,e.outerHeight-n.bottom-n.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 $={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,s){if(!i)return;const n=_(i.options.layout.padding),o=Math.max(t-n.width,0),a=Math.max(e-n.height,0),r=ah(i.boxes),l=r.vertical,c=r.horizontal;E(i.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const h=l.reduce((p,m)=>m.box.options&&m.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},n);_n(u,_(s));const f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),g=oh(l.concat(c),d);Se(r.fullSize,f,d,g),Se(l,f,d,g),Se(c,f,d,g)&&Se(l,f,d,g),lh(f),$n(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,$n(r.rightAndBottom,f,d,g),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},E(r.chartArea,p=>{const m=p.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class to{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class hh extends to{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"},eo=i=>i===null||i==="";function uh(i,t){const e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[fi]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",eo(n)){const o=Dn(i,"width");o!==void 0&&(i.width=o)}if(eo(s))if(i.style.height==="")i.height=i.width/(t||2);else{const o=Dn(i,"height");o!==void 0&&(i.height=o)}return i}const io=gc?{passive:!0}:!1;function fh(i,t,e){i.addEventListener(t,e,io)}function gh(i,t,e){i.canvas.removeEventListener(t,e,io)}function ph(i,t){const e=dh[i.type]||i.type,{x:s,y:n}=Ht(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function gi(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function mh(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||gi(r.addedNodes,s),a=a&&!gi(r.removedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function bh(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||gi(r.removedNodes,s),a=a&&!gi(r.addedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const Oe=new Map;let so=0;function no(){const i=window.devicePixelRatio;i!==so&&(so=i,Oe.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function xh(i,t){Oe.size||window.addEventListener("resize",no),Oe.set(i,t)}function yh(i){Oe.delete(i),Oe.size||window.removeEventListener("resize",no)}function Mh(i,t,e){const s=i.canvas,n=s&&ts(s);if(!n)return;const o=on((r,l)=>{const c=n.clientWidth;e(r,l),c<n.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(n),xh(i,o),a}function ls(i,t,e){e&&e.disconnect(),t==="resize"&&yh(i)}function wh(i,t,e){const s=i.canvas,n=on(o=>{i.ctx!==null&&e(ph(o,i))},i);return fh(s,t,n),n}class vh extends to{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(uh(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e[fi])return!1;const s=e[fi].initial;["height","width"].forEach(o=>{const a=s[o];j(a)?e.removeAttribute(o):e.setAttribute(o,a)});const n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[fi],!0}addEventListener(t,e,s){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),a={attach:mh,detach:bh,resize:Mh}[e]||wh;n[e]=a(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:ls,detach:ls,resize:ls}[e]||gh)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return fc(t,e,s,n)}isAttached(t){const e=ts(t);return!!(e&&e.isConnected)}}function Ih(i){return!An()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?hh:vh}class ht{constructor(){T(this,"x");T(this,"y");T(this,"active",!1);T(this,"options");T(this,"$animations")}tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return ie(this.x)&&ie(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}}T(ht,"defaults",{}),T(ht,"defaultRoutes");function Ah(i,t){const e=i.options.ticks,s=Th(i),n=Math.min(e.maxTicksLimit||s,s),o=e.major.enabled?zh(t):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>n)return kh(t,c,o,a/n),c;const h=Dh(o,t,n);if(a>0){let d,u;const f=a>1?Math.round((l-r)/(a-1)):null;for(pi(t,c,h,j(f)?0:r-f,r),d=0,u=a-1;d<u;d++)pi(t,c,h,o[d],o[d+1]);return pi(t,c,h,l,j(f)?t.length:l+f),c}return pi(t,c,h),c}function Th(i){const t=i.options.offset,e=i._tickSize(),s=i._length/e+(t?0:1),n=i._maxLength/e;return Math.floor(Math.min(s,n))}function Dh(i,t,e){const s=Lh(i),n=t.length/e;if(!s)return Math.max(n,1);const o=bl(s);for(let a=0,r=o.length-1;a<r;a++){const l=o[a];if(l>n)return l}return Math.max(n,1)}function zh(i){const t=[];let e,s;for(e=0,s=i.length;e<s;e++)i[e].major&&t.push(e);return t}function kh(i,t,e,s){let n=0,o=e[0],a;for(s=Math.ceil(s),a=0;a<i.length;a++)a===o&&(t.push(i[a]),n++,o=e[n*s])}function pi(i,t,e,s,n){const o=N(s,0),a=Math.min(N(n,i.length),i.length);let r=0,l,c,h;for(e=Math.ceil(e),n&&(l=n-s,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,s;if(t<2)return!1;for(s=i[0],e=1;e<t;++e)if(i[e]-i[e-1]!==s)return!1;return s}const Nh=i=>i==="left"?"right":i==="right"?"left":i,oo=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,ao=(i,t)=>Math.min(t||i,i);function ro(i,t){const e=[],s=i.length/t,n=i.length;let o=0;for(;o<n;o+=s)e.push(i[Math.floor(o)]);return e}function Ch(i,t,e){const s=i.ticks.length,n=Math.min(t,s-1),o=i._startPixel,a=i._endPixel,r=1e-6;let l=i.getPixelForTick(n),c;if(!(e&&(s===1?c=Math.max(l-o,a-l):t===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(n-1))/2,l+=n<t?c:-c,l<o-r||l>a+r)))return l}function Sh(i,t){E(i,e=>{const s=e.gc,n=s.length/2;let o;if(n>t){for(o=0;o<n;++o)delete e.data[s[o]];s.splice(0,n)}})}function Pe(i){return i.drawTicks?i.tickLength:0}function lo(i,t){if(!i.display)return 0;const e=K(i.font,t),s=_(i.padding);return(R(i.text)?i.text.length:1)*e.lineHeight+s.height}function Oh(i,t){return Ct(i,{scale:t,type:"scale"})}function Ph(i,t,e){return Ct(i,{tick:e,index:t,type:"tick"})}function jh(i,t,e){let s=Fi(i);return(e&&t!=="right"||!e&&t==="right")&&(s=Nh(s)),s}function Eh(i,t,e,s){const{top:n,left:o,bottom:a,right:r,chart:l}=i,{chartArea:c,scales:h}=l;let d=0,u,f,g;const p=a-n,m=r-o;if(i.isHorizontal()){if(f=q(s,o,r),O(e)){const x=Object.keys(e)[0],y=e[x];g=h[x].getPixelForValue(y)+p-t}else e==="center"?g=(c.bottom+c.top)/2+p-t:g=oo(i,e,t);u=r-o}else{if(O(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=oo(i,e,t);g=q(s,a,n),d=e==="left"?-U:U}return{titleX:f,titleY:g,maxWidth:u,rotation:d}}class Yt extends ht{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:s,_suggestedMax:n}=this;return t=st(t,Number.POSITIVE_INFINITY),e=st(e,Number.NEGATIVE_INFINITY),s=st(s,Number.POSITIVE_INFINITY),n=st(n,Number.NEGATIVE_INFINITY),{min:st(t,s),max:st(e,n),minDefined:Z(t),maxDefined:Z(e)}}getMinMax(t){let{min:e,max:s,minDefined:n,maxDefined:o}=this.getUserBounds(),a;if(n&&o)return{min:e,max:s};const r=this.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)a=r[l].controller.getMinMax(this,t),n||(e=Math.min(e,a.min)),o||(s=Math.max(s,a.max));return e=o&&e>s?s:e,s=n&&e>s?e:s,{min:st(e,st(s,e)),max:st(s,st(e,s))}}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,s){const{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Ul(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=r<this.ticks.length;this._convertTicksToLabels(l?ro(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Ah(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,s;this.isHorizontal()?(e=this.left,s=this.right):(e=this.top,s=this.bottom,t=!t),this._startPixel=e,this._endPixel=s,this._reversePixels=t,this._length=s-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 s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s],o.label=B(e.callback,[o.value,s,t],this)}afterTickToLabelConversion(){B(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){B(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,s=ao(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,o=e.maxRotation;let a=n,r,l,c;if(!this._isVisible()||!e.display||n>=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=X(this.chart.width-d,0,this.maxWidth);r=t.offset?this.maxWidth/s:f/(s-1),d+6>r&&(r=f/(s-(t.offset?.5:1)),l=this.maxHeight-Pe(t.grid)-e.padding-lo(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=Gi(Math.min(Math.asin(X((h.highest.height+6)/r,-1,1)),Math.asin(X(l/c,-1,1))-Math.asin(X(u/c,-1,1)))),a=Math.max(n,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:s,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const l=lo(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=Pe(o)+l):(t.height=this.maxHeight,t.width=Pe(o)+l),s.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=s.padding*2,g=lt(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(r){const x=s.mirror?0:m*d.width+p*u.height;t.height=Math.min(this.maxHeight,t.height+x+f)}else{const x=s.mirror?0:p*d.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+x+f)}this._calculatePadding(c,h,m,p)}}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,s,n){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=n*t.width,f=s*e.height):(u=s*t.height,f=n*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,s;for(e=0,s=t.length;e<s;e++)j(t[e].label)&&(t.splice(e,1),s--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let s=this.ticks;e<s.length&&(s=ro(s,e)),this._labelSizes=t=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,s){const{ctx:n,_longestTextCache:o}=this,a=[],r=[],l=Math.floor(e/ao(e,s));let c=0,h=0,d,u,f,g,p,m,x,y,A,I,w;for(d=0;d<e;d+=l){if(g=t[d].label,p=this._resolveTickFontOptions(d),n.font=m=p.string,x=o[m]=o[m]||{data:{},gc:[]},y=p.lineHeight,A=I=0,!j(g)&&!R(g))A=ti(n,x.data,x.gc,A,g),I=y;else if(R(g))for(u=0,f=g.length;u<f;++u)w=g[u],!j(w)&&!R(w)&&(A=ti(n,x.data,x.gc,A,w),I+=y);a.push(A),r.push(I),c=Math.max(A,c),h=Math.max(I,h)}Sh(o,e);const D=a.indexOf(c),z=r.indexOf(h),k=L=>({width:a[L]||0,height:r[L]||0});return{first:k(0),last:k(e-1),widest:k(D),highest:k(z),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 Ml(this._alignToPixels?Bt(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 s=e[t];return s.$context||(s.$context=Ph(this.getContext(),t,s))}return this.$context||(this.$context=Oh(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=lt(this.labelRotation),s=Math.abs(Math.cos(e)),n=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*s>r*n?r/s:l/n:l*n<r*s?l/s:r/n}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,s=this.chart,n=this.options,{grid:o,position:a,border:r}=n,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=Pe(o),f=[],g=r.setContext(this.getContext()),p=g.display?g.width:0,m=p/2,x=function(H){return Bt(s,H,p)};let y,A,I,w,D,z,k,L,C,S,P,J;if(a==="top")y=x(this.bottom),z=this.bottom-u,L=y-m,S=x(t.top)+m,J=t.bottom;else if(a==="bottom")y=x(this.top),S=t.top,J=x(t.bottom)-m,z=y+m,L=this.top+u;else if(a==="left")y=x(this.right),D=this.right-u,k=y-m,C=x(t.left)+m,P=t.right;else if(a==="right")y=x(this.left),C=t.left,P=x(t.right)-m,D=y+m,k=this.left+u;else if(e==="x"){if(a==="center")y=x((t.top+t.bottom)/2+.5);else if(O(a)){const H=Object.keys(a)[0],Y=a[H];y=x(this.chart.scales[H].getPixelForValue(Y))}S=t.top,J=t.bottom,z=y+m,L=z+u}else if(e==="y"){if(a==="center")y=x((t.left+t.right)/2);else if(O(a)){const H=Object.keys(a)[0],Y=a[H];y=x(this.chart.scales[H].getPixelForValue(Y))}D=y-m,k=D-u,C=t.left,P=t.right}const ot=N(n.ticks.maxTicksLimit,d),V=Math.max(1,Math.ceil(d/ot));for(A=0;A<d;A+=V){const H=this.getContext(A),Y=o.setContext(H),dt=r.setContext(H),tt=Y.lineWidth,re=Y.color,Ci=dt.dash||[],le=dt.dashOffset,Ge=Y.tickWidth,He=Y.tickColor,Ze=Y.tickBorderDash||[],Fe=Y.tickBorderDashOffset;I=Ch(this,A,l),I!==void 0&&(w=Bt(s,I,tt),c?D=k=C=P=w:z=L=S=J=w,f.push({tx1:D,ty1:z,tx2:k,ty2:L,x1:C,y1:S,x2:P,y2:J,width:tt,color:re,borderDash:Ci,borderDashOffset:le,tickWidth:Ge,tickColor:He,tickBorderDash:Ze,tickBorderDashOffset:Fe}))}return this._ticksLength=d,this._borderValue=y,f}_computeLabelItems(t){const e=this.axis,s=this.options,{position:n,ticks:o}=s,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=Pe(s.grid),f=u+h,g=d?-h:f,p=-lt(this.labelRotation),m=[];let x,y,A,I,w,D,z,k,L,C,S,P,J="middle";if(n==="top")D=this.bottom-g,z=this._getXAxisLabelAlignment();else if(n==="bottom")D=this.top+g,z=this._getXAxisLabelAlignment();else if(n==="left"){const V=this._getYAxisLabelAlignment(u);z=V.textAlign,w=V.x}else if(n==="right"){const V=this._getYAxisLabelAlignment(u);z=V.textAlign,w=V.x}else if(e==="x"){if(n==="center")D=(t.top+t.bottom)/2+f;else if(O(n)){const V=Object.keys(n)[0],H=n[V];D=this.chart.scales[V].getPixelForValue(H)+f}z=this._getXAxisLabelAlignment()}else if(e==="y"){if(n==="center")w=(t.left+t.right)/2-f;else if(O(n)){const V=Object.keys(n)[0],H=n[V];w=this.chart.scales[V].getPixelForValue(H)}z=this._getYAxisLabelAlignment(u).textAlign}e==="y"&&(l==="start"?J="top":l==="end"&&(J="bottom"));const ot=this._getLabelSizes();for(x=0,y=r.length;x<y;++x){A=r[x],I=A.label;const V=o.setContext(this.getContext(x));k=this.getPixelForTick(x)+o.labelOffset,L=this._resolveTickFontOptions(x),C=L.lineHeight,S=R(I)?I.length:1;const H=S/2,Y=V.color,dt=V.textStrokeColor,tt=V.textStrokeWidth;let re=z;a?(w=k,z==="inner"&&(x===y-1?re=this.options.reverse?"left":"right":x===0?re=this.options.reverse?"right":"left":re="center"),n==="top"?c==="near"||p!==0?P=-S*C+C/2:c==="center"?P=-ot.highest.height/2-H*C+C:P=-ot.highest.height+C/2:c==="near"||p!==0?P=C/2:c==="center"?P=ot.highest.height/2-H*C:P=ot.highest.height-S*C,d&&(P*=-1),p!==0&&!V.showLabelBackdrop&&(w+=C/2*Math.sin(p))):(D=k,P=(1-S)*C/2);let Ci;if(V.showLabelBackdrop){const le=_(V.backdropPadding),Ge=ot.heights[x],He=ot.widths[x];let Ze=P-le.top,Fe=0-le.left;switch(J){case"middle":Ze-=Ge/2;break;case"bottom":Ze-=Ge;break}switch(z){case"center":Fe-=He/2;break;case"right":Fe-=He;break}Ci={left:Fe,top:Ze,width:He+le.width,height:Ge+le.height,color:V.backdropColor}}m.push({label:I,font:L,textOffset:P,options:{rotation:p,color:Y,strokeColor:dt,strokeWidth:tt,textAlign:re,textBaseline:J,translation:[w,D],backdrop:Ci}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-lt(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,a=this._getLabelSizes(),r=t+o,l=a.widest.width;let c,h;return e==="left"?n?(h=this.right+o,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-r,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?n?(h=this.left+o,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+r,s==="near"?c="left":s==="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:s,top:n,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(s,n,o,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(o=>o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,a=n.length;o<a;++o){const l=n[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:s,grid:n}}=this,o=s.setContext(this.getContext()),a=s.display?o.width:0;if(!a)return;const r=n.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,h,d,u;this.isHorizontal()?(c=Bt(t,this.left,a)-a/2,h=Bt(t,this.right,r)+r/2,d=u=l):(d=Bt(t,this.top,a)-a/2,u=Bt(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 s=this.ctx,n=this._computeLabelArea();n&&ei(s,n);const o=this.getLabelItems(t);for(const a of o){const r=a.options,l=a.font,c=a.label,h=a.textOffset;Rt(s,c,0,h,l,r)}n&&ii(s)}drawTitle(){const{ctx:t,options:{position:e,title:s,reverse:n}}=this;if(!s.display)return;const o=K(s.font),a=_(s.padding),r=s.align;let l=o.lineHeight/2;e==="bottom"||e==="center"||O(e)?(l+=a.bottom,R(s.text)&&(l+=o.lineHeight*(s.text.length-1))):l+=a.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=Eh(this,l,e,r);Rt(t,s.text,0,0,o,{color:s.color,maxWidth:d,rotation:u,textAlign:jh(r,e,n),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,s=N(t.grid&&t.grid.z,-1),n=N(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Yt.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,a;for(o=0,a=e.length;o<a;++o){const r=e[o];r[s]===this.id&&(!t||r.type===t)&&n.push(r)}return n}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return K(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class mi{constructor(t,e,s){this.type=t,this.scope=e,this.override=s,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 s;Rh(e)&&(s=this.register(e));const n=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in n||(n[o]=t,Vh(t,a,s),this.override&&F.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,s=t.id,n=this.scope;s in e&&delete e[s],n&&s in F[n]&&(delete F[n][s],this.override&&delete Vt[s])}}function Vh(i,t,e){const s=be(Object.create(null),[e?F.get(e):{},F.get(t),i.defaults]);F.set(t,s),i.defaultRoutes&&Bh(t,i.defaultRoutes),i.descriptors&&F.describe(t,i.descriptors)}function Bh(i,t){Object.keys(t).forEach(e=>{const s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");F.route(o,n,l,r)})}function Rh(i){return"id"in i&&"defaults"in i}class Wh{constructor(){this.controllers=new mi(ct,"datasets",!0),this.elements=new mi(ht,"elements"),this.plugins=new mi(Object,"plugins"),this.scales=new mi(Yt,"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,s){[...e].forEach(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):E(n,a=>{const r=s||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,s){const n=Wi(t);B(s["before"+n],[],s),e[t](s),B(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const s=this._typedRegistries[e];if(s.isForType(t))return s}return this.plugins}_get(t,e,s){const n=e.get(t);if(n===void 0)throw new Error('"'+t+'" is not a registered '+s+".");return n}}var ft=new Wh;class Gh{constructor(){this._init=[]}notify(t,e,s,n){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=n?this._descriptors(t).filter(n):this._descriptors(t),a=this._notify(o,t,e,s);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,s,n){n=n||{};for(const o of t){const a=o.plugin,r=a[s],l=[e,n,o.options];if(B(r,l,a)===!1&&n.cancelable)return!1}return!0}invalidate(){j(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 s=t&&t.config,n=N(s.options&&s.options.plugins,{}),o=Hh(s);return n===!1&&!e?[]:Fh(t,o,n,e)}_notifyStateChanges(t){const e=this._oldCache||[],s=this._cache,n=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function Hh(i){const t={},e=[],s=Object.keys(ft.plugins.items);for(let o=0;o<s.length;o++)e.push(ft.getPlugin(s[o]));const n=i.plugins||[];for(let o=0;o<n.length;o++){const a=n[o];e.indexOf(a)===-1&&(e.push(a),t[a.id]=!0)}return{plugins:e,localIds:t}}function Zh(i,t){return!t&&i===!1?null:i===!0?{}:i}function Fh(i,{plugins:t,localIds:e},s,n){const o=[],a=i.getContext();for(const r of t){const l=r.id,c=Zh(s[l],n);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},s,n){const o=i.pluginScopeKeys(t),a=i.getOptionScopes(s,o);return e&&t.defaults&&a.push(t.defaults),i.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function cs(i,t){const e=F.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function Yh(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 co(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 hs(i,...t){if(co(i))return i;for(const e of t){const s=e.axis||Xh(e.position)||i.length>1&&co(i[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function ho(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(s=>s.xAxisID===i||s.yAxisID===i);if(e.length)return ho(i,"x",e[0])||ho(i,"y",e[0])}return{}}function Jh(i,t){const e=Vt[i.type]||{scales:{}},s=t.scales||{},n=cs(i.type,t),o=Object.create(null);return Object.keys(s).forEach(a=>{const r=s[a];if(!O(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=hs(a,r,Qh(a,i),F.scales[r.type]),c=Kh(l,n),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||cs(r,t),h=(Vt[r]||{}).scales||{};Object.keys(h).forEach(d=>{const u=Yh(d,l),f=a[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),xe(o[f],[{axis:u},s[f],h[d]])})}),Object.keys(o).forEach(a=>{const r=o[a];xe(r,[F.scales[r.type],F.scale])}),o}function uo(i){const t=i.options||(i.options={});t.plugins=N(t.plugins,{}),t.scales=Jh(i,t)}function fo(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function qh(i){return i=i||{},i.data=fo(i.data),uo(i),i}const go=new Map,po=new Set;function bi(i,t){let e=go.get(i);return e||(e=t(),go.set(i,e),po.add(e)),e}const je=(i,t,e)=>{const s=kt(t,e);s!==void 0&&i.add(s)};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=fo(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(),uo(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,s=this.type;return bi(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const s=this._scopeCache;let n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){const{options:n,type:o}=this,a=this._cachedScopes(t,s),r=a.get(e);if(r)return r;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>je(l,t,d))),h.forEach(d=>je(l,n,d)),h.forEach(d=>je(l,Vt[o]||{},d)),h.forEach(d=>je(l,F,d)),h.forEach(d=>je(l,Ki,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),po.has(e)&&a.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,Vt[e]||{},F.datasets[e]||{},{type:e},F,Ki]}resolveNamedOptions(t,e,s,n=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=mo(this._resolverCache,t,n);let l=a;if(td(a,e)){o.$shared=!1,s=Lt(s)?s():s;const c=this.createResolver(t,s,r);l=se(a,s,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){const{resolver:o}=mo(this._resolverCache,t,s);return O(e)?se(o,e,void 0,n):o}}function mo(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));const n=e.join();let o=s.get(n);return o||(o={resolver:qi(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},s.set(n,o)),o}const $h=i=>O(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||Lt(i[e]),!1);function td(i,t){const{isScriptable:e,isIndexable:s}=mn(i);for(const n of t){const o=e(n),a=s(n),r=(a||o)&&i[n];if(o&&(Lt(r)||$h(r))||a&&R(r))return!0}return!1}var ed="4.4.0";const id=["top","bottom","left","right","chartArea"];function bo(i,t){return i==="top"||i==="bottom"||id.indexOf(i)===-1&&t==="x"}function xo(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function yo(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 Mo(i){return An()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const xi={},wo=i=>{const t=Mo(i);return Object.values(xi).filter(e=>e.canvas===t).pop()};function nd(i,t,e){const s=Object.keys(i);for(const n of s){const o=+n;if(o>=t){const a=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=a)}}}function od(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}function yi(i,t,e){return i.options.clip?i[e]:t[e]}function ad(i,t){const{xScale:e,yScale:s}=i;return e&&s?{left:yi(e,t,"left"),right:yi(e,t,"right"),top:yi(s,t,"top"),bottom:yi(s,t,"bottom")}:t}class vt{static register(...t){ft.add(...t),vo()}static unregister(...t){ft.remove(...t),vo()}constructor(t,e){const s=this.config=new _h(e),n=Mo(t),o=wo(n);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=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Ih(n)),this.platform.updateConfig(s);const r=this.platform.acquireContext(n,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 Gh,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Al(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}wt.listen(this,"complete",yo),wt.listen(this,"progress",sd),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return j(t)?e&&o?o:n?s/n: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 ft}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Tn(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return fn(this.canvas,this.ctx),this}stop(){return wt.stop(this),this}resize(t,e){wt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,o),r=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Tn(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),B(s.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};E(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((a,r)=>(a[r]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const r=e[a],l=hs(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=hs(l,r),h=N(r.type,a.dtype);(r.position===void 0||bo(r.position,c)!==bo(a.dposition))&&(r.position=a.dposition),n[l]=!0;let d=null;if(l in s&&s[l].type===h)d=s[l];else{const u=ft.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(r,t)}),E(n,(a,r)=>{a||delete s[r]}),E(s,a=>{$.configure(this,a,a.options),$.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;n<s;++n)this._destroyDatasetMeta(n);t.splice(e,s-e)}this._sortedMetasets=t.slice(0).sort(xo("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s<n;s++){const o=e[s];let a=this.getDatasetMeta(s);const r=o.type||this.config.type;if(a.type&&a.type!==r&&(this._destroyDatasetMeta(s),a=this.getDatasetMeta(s)),a.type=r,a.indexAxis=o.indexAxis||cs(r,this.options),a.order=o.order||0,a.index=s,a.label=""+o.label,a.visible=this.isDatasetVisible(s),a.controller)a.controller.updateIndex(s),a.controller.linkScales();else{const l=ft.getController(r),{datasetElementType:c,dataElementType:h}=F.datasets[r];Object.assign(l,{dataElementType:ft.getElement(h),datasetElementType:c&&ft.getElement(c)}),a.controller=new l(this,s),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 s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.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=!n&&o.indexOf(d)===-1;d.buildOrUpdateElements(u),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=s.layout.autoPadding?a:0,this._updateLayout(a),n||E(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(xo("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=>{$.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Xs(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of e){const a=s==="_removeElements"?-o:o;nd(t,n,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),n=s(0);for(let o=1;o<e;o++)if(!Xs(n,s(o)))return;return Array.from(n).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;$.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],E(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e<s;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,s=this.data.datasets.length;e<s;++e)this._updateDataset(e,Lt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const s=this.getDatasetMeta(t),n={meta:s,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(s.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(wt.has(this)?this.attached&&!wt.running(this)&&wt.start(this):(this.draw(),yo({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:s,height:n}=this._resizeBeforeDraw;this._resize(s,n),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,s=[];let n,o;for(n=0,o=e.length;n<o;++n){const a=e[n];(!t||a.visible)&&s.push(a)}return s}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,s=t._clip,n=!s.disabled,o=ad(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(n&&ei(e,{left:s.left===!1?0:o.left-s.left,right:s.right===!1?this.width:o.right+s.right,top:s.top===!1?0:o.top-s.top,bottom:s.bottom===!1?this.height:o.bottom+s.bottom}),t.controller.draw(),n&&ii(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return Mt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){const o=ih.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={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},s.push(n)),n}getContext(){return this.$context||(this.$context=Ct(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){const s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const n=s?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,n);ye(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),a.update(o,{visible:s}),this.update(r=>r.datasetIndex===t?n: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(),wt.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(),fn(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,s=(o,a)=>{e.addEventListener(this,o,a),t[o]=a},n=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};E(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(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=()=>{n("attach",r),this.attached=!0,this.resize(),s("resize",o),s("detach",a)};a=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("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,s){const n=s?"set":"remove";let o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,l=t.length;r<l;++r){a=t[r];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[n+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],s=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(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,s){const n=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=s?t:o(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:n=[],options:o}=this,a=e,r=this._getActiveElements(t,n,s,a),l=gl(t),c=od(t,this._lastEvent,s,l);s&&(this._lastEvent=null,B(o.onHover,[t,r,this],this),l&&B(o.onClick,[t,r,this],this));const h=!Qe(r,n);return(h||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}T(vt,"defaults",F),T(vt,"instances",xi),T(vt,"overrides",Vt),T(vt,"registry",ft),T(vt,"version",ed),T(vt,"getChart",wo);function vo(){return E(vt.instances,i=>i._plugins.invalidate())}function rd(i,t,e){const{startAngle:s,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=t;let c=n/r;i.beginPath(),i.arc(o,a,r,s-c,e+c),l>n?(c=n/l,i.arc(o,a,l,e+c,s-c,!0)):i.arc(o,a,n,e+U,s-U),i.closePath(),i.clip()}function ld(i){return Ji(i,["outerStart","outerEnd","innerStart","innerEnd"])}function cd(i,t,e,s){const n=ld(i.options.borderRadius),o=(e-t)/2,a=Math.min(o,s*t/2),r=l=>{const c=(e-Math.min(o,l))*s/2;return X(l,0,Math.min(o,c))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:X(n.innerStart,0,a),innerEnd:X(n.innerEnd,0,a)}}function ae(i,t,e,s){return{x:e+i*Math.cos(t),y:s+i*Math.sin(t)}}function Mi(i,t,e,s,n,o){const{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:h}=t,d=Math.max(t.outerRadius+s+e-c,0),u=h>0?h+s+e+c:0;let f=0;const g=n-l;if(s){const V=h>0?h-s:0,H=d>0?d-s:0,Y=(V+H)/2,dt=Y!==0?g*Y/(Y+s):g;f=(g-dt)/2}const p=Math.max(.001,g*d-e/W)/d,m=(g-p)/2,x=l+m+f,y=n-m-f,{outerStart:A,outerEnd:I,innerStart:w,innerEnd:D}=cd(t,u,d,y-x),z=d-A,k=d-I,L=x+A/z,C=y-I/k,S=u+w,P=u+D,J=x+w/S,ot=y-D/P;if(i.beginPath(),o){const V=(L+C)/2;if(i.arc(a,r,d,L,V),i.arc(a,r,d,V,C),I>0){const tt=ae(k,C,a,r);i.arc(tt.x,tt.y,I,C,y+U)}const H=ae(P,y,a,r);if(i.lineTo(H.x,H.y),D>0){const tt=ae(P,ot,a,r);i.arc(tt.x,tt.y,D,y+U,ot+Math.PI)}const Y=(y-D/u+(x+w/u))/2;if(i.arc(a,r,u,y-D/u,Y,!0),i.arc(a,r,u,Y,x+w/u,!0),w>0){const tt=ae(S,J,a,r);i.arc(tt.x,tt.y,w,J+Math.PI,x-U)}const dt=ae(z,x,a,r);if(i.lineTo(dt.x,dt.y),A>0){const tt=ae(z,L,a,r);i.arc(tt.x,tt.y,A,x-U,L)}}else{i.moveTo(a,r);const V=Math.cos(L)*d+a,H=Math.sin(L)*d+r;i.lineTo(V,H);const Y=Math.cos(C)*d+a,dt=Math.sin(C)*d+r;i.lineTo(Y,dt)}i.closePath()}function hd(i,t,e,s,n){const{fullCircles:o,startAngle:a,circumference:r}=t;let l=t.endAngle;if(o){Mi(i,t,e,s,l,n);for(let c=0;c<o;++c)i.fill();isNaN(r)||(l=a+(r%G||G))}return Mi(i,t,e,s,l,n),i.fill(),l}function dd(i,t,e,s,n){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 g=t.endAngle;if(o){Mi(i,t,e,s,g,n);for(let p=0;p<o;++p)i.stroke();isNaN(r)||(g=a+(r%G||G))}f&&rd(i,t,g),o||(Mi(i,t,e,s,g,n),i.stroke())}class Ee extends ht{constructor(e){super();T(this,"circumference");T(this,"endAngle");T(this,"fullCircles");T(this,"innerRadius");T(this,"outerRadius");T(this,"pixelMargin");T(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,s,n){const o=this.getProps(["x","y"],n),{angle:a,distance:r}=$s(o,{x:e,y:s}),{startAngle:l,endAngle:c,innerRadius:h,outerRadius:d,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),f=(this.options.spacing+this.options.borderWidth)/2,p=N(u,c-l)>=G||we(a,l,c),m=xt(r,h+f,d+f);return p&&m}getCenterPoint(e){const{x:s,y:n,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:s+Math.cos(d)*u,y:n+Math.sin(d)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:s,circumference:n}=this,o=(s.offset||0)/4,a=(s.spacing||0)/2,r=s.circular;if(this.pixelMargin=s.borderAlign==="inner"?.33:0,this.fullCircles=n>G?Math.floor(n/G):0,n===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(W,n||0)),h=o*c;e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,hd(e,this,h,a,r),dd(e,this,h,a,r),e.restore()}}T(Ee,"id","arc"),T(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}),T(Ee,"defaultRoutes",{backgroundColor:"backgroundColor"}),T(Ee,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function Io(i,t,e=t){i.lineCap=N(e.borderCapStyle,t.borderCapStyle),i.setLineDash(N(e.borderDash,t.borderDash)),i.lineDashOffset=N(e.borderDashOffset,t.borderDashOffset),i.lineJoin=N(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=N(e.borderWidth,t.borderWidth),i.strokeStyle=N(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"?Vl:ud}function Ao(i,t,e={}){const s=i.length,{start:n=0,end:o=s-1}=e,{start:a,end:r}=t,l=Math.max(n,a),c=Math.min(o,r),h=n<a&&o<a||n>r&&o>r;return{count:s,start:l,loop:t.loop,ilen:c<l&&!h?s+c-l:c-l}}function gd(i,t,e,s){const{points:n,options:o}=t,{count:a,start:r,loop:l,ilen:c}=Ao(n,e,s),h=fd(o);let{move:d=!0,reverse:u}=s||{},f,g,p;for(f=0;f<=c;++f)g=n[(r+(u?c-f:f))%a],!g.skip&&(d?(i.moveTo(g.x,g.y),d=!1):h(i,p,g,u,o.stepped),p=g);return l&&(g=n[(r+(u?c:0))%a],h(i,p,g,u,o.stepped)),!!l}function pd(i,t,e,s){const n=t.points,{count:o,start:a,ilen:r}=Ao(n,e,s),{move:l=!0,reverse:c}=s||{};let h=0,d=0,u,f,g,p,m,x;const y=I=>(a+(c?r-I:I))%o,A=()=>{p!==m&&(i.lineTo(h,m),i.lineTo(h,p),i.lineTo(h,x))};for(l&&(f=n[y(0)],i.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=n[y(u)],f.skip)continue;const I=f.x,w=f.y,D=I|0;D===g?(w<p?p=w:w>m&&(m=w),h=(d*h+I)/++d):(A(),i.lineTo(I,w),g=D,d=0,p=m=w),x=w}A()}function ds(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?pd:gd}function md(i){return i.stepped?pc:i.tension||i.cubicInterpolationMode==="monotone"?mc:Zt}function bd(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),Io(i,t.options),i.stroke(n)}function xd(i,t,e,s){const{segments:n,options:o}=t,a=ds(t);for(const r of n)Io(i,o,r.style),i.beginPath(),a(i,t,r,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}const yd=typeof Path2D=="function";function Md(i,t,e,s){yd&&!t.options.segment?bd(i,t,e,s):xd(i,t,e,s)}class St extends ht{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 s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const n=s.spanGaps?this._loop:this._fullLoop;rc(this._points,s,t,n,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=vc(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,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){const s=this.options,n=t[e],o=this.points,a=Sn(this,{property:e,start:n,end:n});if(!a.length)return;const r=[],l=md(s);let c,h;for(c=0,h=a.length;c<h;++c){const{start:d,end:u}=a[c],f=o[d],g=o[u];if(f===g){r.push(f);continue}const p=Math.abs((n-f[e])/(g[e]-f[e])),m=l(f,g,p,s.stepped);m[e]=t[e],r.push(m)}return r.length===1?r[0]:r}pathSegment(t,e,s){return ds(this)(t,this,e,s)}path(t,e,s){const n=this.segments,o=ds(this);let a=this._loop;e=e||0,s=s||this.points.length-e;for(const r of n)a&=o(t,this,r,{start:e,end:e+s-1});return!!a}draw(t,e,s,n){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Md(t,this,s,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}T(St,"id","line"),T(St,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),T(St,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),T(St,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function To(i,t,e,s){const n=i.options,{[e]:o}=i.getProps([e],s);return Math.abs(t-o)<n.radius+n.hitRadius}class wi extends ht{constructor(e){super();T(this,"parsed");T(this,"skip");T(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,s,n){const o=this.options,{x:a,y:r}=this.getProps(["x","y"],n);return Math.pow(e-a,2)+Math.pow(s-r,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,s){return To(this,e,"x",s)}inYRange(e,s){return To(this,e,"y",s)}getCenterPoint(e){const{x:s,y:n}=this.getProps(["x","y"],e);return{x:s,y:n}}size(e){e=e||this.options||{};let s=e.radius||0;s=Math.max(s,s&&e.hoverRadius||0);const n=s&&e.borderWidth||0;return(s+n)*2}draw(e,s){const n=this.options;this.skip||n.radius<.1||!Mt(this,s,this.size(n)/2)||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,Qi(e,n,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}T(wi,"id","point"),T(wi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),T(wi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Do(i,t){const{x:e,y:s,base:n,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,n),l=Math.max(e,n),c=s-d,h=s+d):(d=o/2,r=e-d,l=e+d,c=Math.min(s,n),h=Math.max(s,n)),{left:r,top:c,right:l,bottom:h}}function Ot(i,t,e,s){return i?0:X(t,e,s)}function wd(i,t,e){const s=i.options.borderWidth,n=i.borderSkipped,o=pn(s);return{t:Ot(n.top,o.top,0,e),r:Ot(n.right,o.right,0,t),b:Ot(n.bottom,o.bottom,0,e),l:Ot(n.left,o.left,0,t)}}function vd(i,t,e){const{enableBorderRadius:s}=i.getProps(["enableBorderRadius"]),n=i.options.borderRadius,o=Wt(n),a=Math.min(t,e),r=i.borderSkipped,l=s||O(n);return{topLeft:Ot(!l||r.top||r.left,o.topLeft,0,a),topRight:Ot(!l||r.top||r.right,o.topRight,0,a),bottomLeft:Ot(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:Ot(!l||r.bottom||r.right,o.bottomRight,0,a)}}function Id(i){const t=Do(i),e=t.right-t.left,s=t.bottom-t.top,n=wd(i,e/2,s/2),o=vd(i,e/2,s/2);return{outer:{x:t.left,y:t.top,w:e,h:s,radius:o},inner:{x:t.left+n.l,y:t.top+n.t,w:e-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}function us(i,t,e,s){const n=t===null,o=e===null,r=i&&!(n&&o)&&Do(i,s);return r&&(n||xt(t,r.left,r.right))&&(o||xt(e,r.top,r.bottom))}function Ad(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 fs(i,t,e={}){const s=i.x!==e.x?-t:0,n=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-s,a=(i.y+i.h!==e.y+e.h?t:0)-n;return{x:i.x+s,y:i.y+n,w:i.w+o,h:i.h+a,radius:i.radius}}class vi extends ht{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:s,backgroundColor:n}}=this,{inner:o,outer:a}=Id(this),r=Ad(a.radius)?Te:Td;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),r(t,fs(a,e,o)),t.clip(),r(t,fs(o,-e,a)),t.fillStyle=s,t.fill("evenodd")),t.beginPath(),r(t,fs(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,s){return us(this,t,e,s)}inXRange(t,e){return us(this,t,null,e)}inYRange(t,e){return us(this,null,t,e)}getCenterPoint(t){const{x:e,y:s,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?s:(s+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}T(vi,"id","bar"),T(vi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),T(vi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Dd=Object.freeze({__proto__:null,ArcElement:Ee,BarElement:vi,LineElement:St,PointElement:wi});const gs=["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)"],zo=gs.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));function ko(i){return gs[i%gs.length]}function Lo(i){return zo[i%zo.length]}function zd(i,t){return i.borderColor=ko(t),i.backgroundColor=Lo(t),++t}function kd(i,t){return i.backgroundColor=i.data.map(()=>ko(t++)),t}function Ld(i,t){return i.backgroundColor=i.data.map(()=>Lo(t++)),t}function Nd(i){let t=0;return(e,s)=>{const n=i.getDatasetMeta(s).controller;n instanceof Ft?t=kd(e,t):n instanceof ke?t=Ld(e,t):n&&(t=zd(e,t))}}function No(i){let t;for(t in i)if(i[t].borderColor||i[t].backgroundColor)return!0;return!1}function Cd(i){return i&&(i.borderColor||i.backgroundColor)}var Sd={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,t,e){if(!e.enabled)return;const{data:{datasets:s},options:n}=i.config,{elements:o}=n;if(!e.forceOverride&&(No(s)||Cd(n)||o&&No(o)))return;const a=Nd(i);s.forEach(a)}};function Od(i,t,e,s,n){const o=n.samples||s;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,g,p;for(a[l++]=i[h],d=0;d<o-2;d++){let m=0,x=0,y;const A=Math.floor((d+1)*r)+1+t,I=Math.min(Math.floor((d+2)*r)+1,e)+t,w=I-A;for(y=A;y<I;y++)m+=i[y].x,x+=i[y].y;m/=w,x/=w;const D=Math.floor(d*r)+1+t,z=Math.min(Math.floor((d+1)*r)+1,e)+t,{x:k,y:L}=i[h];for(f=g=-1,y=D;y<z;y++)g=.5*Math.abs((k-m)*(i[y].y-L)-(k-i[y].x)*(x-L)),g>f&&(f=g,u=i[y],p=y);a[l++]=u,h=p}return a[l++]=i[c],a}function Pd(i,t,e,s){let n=0,o=0,a,r,l,c,h,d,u,f,g,p;const m=[],x=t+e-1,y=i[t].x,I=i[x].x-y;for(a=t;a<t+e;++a){r=i[a],l=(r.x-y)/I*s,c=r.y;const w=l|0;if(w===h)c<g?(g=c,d=a):c>p&&(p=c,u=a),n=(o*n+r.x)/++o;else{const D=a-1;if(!j(d)&&!j(u)){const z=Math.min(d,u),k=Math.max(d,u);z!==f&&z!==D&&m.push({...i[z],x:n}),k!==f&&k!==D&&m.push({...i[k],x:n})}a>0&&D!==f&&m.push(i[D]),m.push(r),h=w,o=0,g=p=c,d=u=f=a}}return m}function Co(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 So(i){i.data.datasets.forEach(t=>{Co(t)})}function jd(i,t){const e=t.length;let s=0,n;const{iScale:o}=i,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(s=X(yt(t,o.axis,a).lo,0,e-1)),c?n=X(yt(t,o.axis,r).hi+1,s,e)-s:n=e-s,{start:s,count:n}}var Ed={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){So(i);return}const s=i.width;i.data.datasets.forEach((n,o)=>{const{_data:a,indexAxis:r}=n,l=i.getDatasetMeta(o),c=a||n.data;if(De([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}=jd(l,c);const f=e.threshold||4*s;if(u<=f){Co(n);return}j(a)&&(n._data=c,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let g;switch(e.algorithm){case"lttb":g=Od(c,d,u,s,e);break;case"min-max":g=Pd(c,d,u,s);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=g})},destroy(i){So(i)}};function Vd(i,t,e){const s=i.segments,n=i.points,o=t.points,a=[];for(const r of s){let{start:l,end:c}=r;c=ms(l,c,n);const h=ps(e,n[l],n[c],r.loop);if(!t.segments){a.push({source:r,target:h,start:n[l],end:n[c]});continue}const d=Sn(t,h);for(const u of d){const f=ps(e,o[u.start],o[u.end],u.loop),g=Cn(r,n,f);for(const p of g)a.push({source:p,target:u,start:{[e]:Oo(h,f,"start",Math.max)},end:{[e]:Oo(h,f,"end",Math.min)}})}}return a}function ps(i,t,e,s){if(s)return;let n=t[i],o=e[i];return i==="angle"&&(n=nt(n),o=nt(o)),{property:i,start:n,end:o}}function Bd(i,t){const{x:e=null,y:s=null}=i||{},n=t.points,o=[];return t.segments.forEach(({start:a,end:r})=>{r=ms(a,r,n);const l=n[a],c=n[r];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function ms(i,t,e){for(;t>i;t--){const s=e[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function Oo(i,t,e,s){return i&&t?s(i[e],t[e]):i?i[e]:t?t[e]:0}function Po(i,t){let e=[],s=!1;return R(i)?(s=!0,e=i):e=Bd(i,t),e.length?new St({points:e,options:{tension:0},_loop:s,_fullLoop:s}):null}function jo(i){return i&&i.fill!==!1}function Rd(i,t,e){let n=i[t].fill;const o=[t];let a;if(!e)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!Z(n))return n;if(a=i[n],!a)return!1;if(a.visible)return n;o.push(n),n=a.fill}return!1}function Wd(i,t,e){const s=Fd(i);if(O(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return Z(n)&&Math.floor(n)===n?Gd(s[0],t,n,e):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Gd(i,t,e,s){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=s?!1:e}function Hd(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:O(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Zd(i,t,e){let s;return i==="start"?s=e:i==="end"?s=t.options.reverse?t.min:t.max:O(i)?s=i.value:s=t.getBaseValue(),s}function Fd(i){const t=i.options,e=t.fill;let s=N(e&&e.target,e);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function Ud(i){const{scale:t,index:e,line:s}=i,n=[],o=s.segments,a=s.points,r=Yd(t,e);r.push(Po({x:null,y:t.bottom},s));for(let l=0;l<o.length;l++){const c=o[l];for(let h=c.start;h<=c.end;h++)Kd(n,a[h],r)}return new St({points:n,options:{}})}function Yd(i,t){const e=[],s=i.getMatchingVisibleMetas("line");for(let n=0;n<s.length;n++){const o=s[n];if(o.index===t)break;o.hidden||e.unshift(o.dataset)}return e}function Kd(i,t,e){const s=[];for(let n=0;n<e.length;n++){const o=e[n],{first:a,last:r,point:l}=Xd(o,t,"x");if(!(!l||a&&r)){if(a)s.unshift(l);else if(i.push(l),!r)break}}i.push(...s)}function Xd(i,t,e){const s=i.interpolate(t,e);if(!s)return{};const n=s[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(xt(n,d,u)){r=n===d,l=n===u;break}}return{first:r,last:l,point:s}}class Eo{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,s){const{x:n,y:o,radius:a}=this;return e=e||{start:0,end:G},t.arc(n,o,a,e.end,e.start,!0),!s.bounds}interpolate(t){const{x:e,y:s,radius:n}=this,o=t.angle;return{x:e+Math.cos(o)*n,y:s+Math.sin(o)*n,angle:o}}}function Qd(i){const{chart:t,fill:e,line:s}=i;if(Z(e))return Jd(t,e);if(e==="stack")return Ud(i);if(e==="shape")return!0;const n=qd(i);return n instanceof Eo?n:Po(n,s)}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,s=Hd(e,t);if(Z(s)){const n=t.isHorizontal();return{x:n?s:null,y:n?null:s}}return null}function $d(i){const{scale:t,fill:e}=i,s=t.options,n=t.getLabels().length,o=s.reverse?t.max:t.min,a=Zd(e,t,o),r=[];if(s.grid.circular){const l=t.getPointPositionForValue(0,o);return new Eo({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(a)})}for(let l=0;l<n;++l)r.push(t.getPointPositionForValue(l,a));return r}function bs(i,t,e){const s=Qd(t),{line:n,scale:o,axis:a}=t,r=n.options,l=r.fill,c=r.backgroundColor,{above:h=c,below:d=c}=l||{};s&&n.points.length&&(ei(i,e),tu(i,{line:n,target:s,above:h,below:d,area:e,scale:o,axis:a}),ii(i))}function tu(i,t){const{line:e,target:s,above:n,below:o,area:a,scale:r}=t,l=e._loop?"angle":t.axis;i.save(),l==="x"&&o!==n&&(Vo(i,s,a.top),Bo(i,{line:e,target:s,color:n,scale:r,property:l}),i.restore(),i.save(),Vo(i,s,a.bottom)),Bo(i,{line:e,target:s,color:o,scale:r,property:l}),i.restore()}function Vo(i,t,e){const{segments:s,points:n}=t;let o=!0,a=!1;i.beginPath();for(const r of s){const{start:l,end:c}=r,h=n[l],d=n[ms(l,c,n)];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 Bo(i,t){const{line:e,target:s,property:n,color:o,scale:a}=t,r=Vd(e,s,n);for(const{source:l,target:c,start:h,end:d}of r){const{style:{backgroundColor:u=o}={}}=l,f=s!==!0;i.save(),i.fillStyle=u,eu(i,a,f&&ps(n,h,d)),i.beginPath();const g=!!e.pathSegment(i,l);let p;if(f){g?i.closePath():Ro(i,s,d,n);const m=!!s.pathSegment(i,c,{move:g,reverse:!0});p=g&&m,p||Ro(i,s,h,n)}i.closePath(),i.fill(p?"evenodd":"nonzero"),i.restore()}}function eu(i,t,e){const{top:s,bottom:n}=t.chart.chartArea,{property:o,start:a,end:r}=e||{};o==="x"&&(i.beginPath(),i.rect(a,s,r-a,n-s),i.clip())}function Ro(i,t,e,s){const n=t.interpolate(e,s);n&&i.lineTo(n.x,n.y)}var iu={id:"filler",afterDatasetsUpdate(i,t,e){const s=(i.data.datasets||[]).length,n=[];let o,a,r,l;for(a=0;a<s;++a)o=i.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof St&&(l={visible:i.isDatasetVisible(a),index:a,fill:Wd(r,a,s),chart:i,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,n.push(l);for(a=0;a<s;++a)l=n[a],!(!l||l.fill===!1)&&(l.fill=Rd(n,a,e.propagate))},beforeDraw(i,t,e){const s=e.drawTime==="beforeDraw",n=i.getSortedVisibleDatasetMetas(),o=i.chartArea;for(let a=n.length-1;a>=0;--a){const r=n[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),s&&r.fill&&bs(i.ctx,r,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const s=i.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){const o=s[n].$filler;jo(o)&&bs(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){const s=t.meta.$filler;!jo(s)||e.drawTime!=="beforeDatasetDraw"||bs(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Wo=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},su=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class Go extends ht{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,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,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(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,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 s=t.labels,n=K(s.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=Wo(s,o);let c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,n,r,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){const{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+r;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((g,p)=>{const m=s+e/2+o.measureText(g.text).width;(p===0||c[c.length-1]+m+2*r>a)&&(d+=h,c[c.length-(p>0?0:1)]=0,f+=h,u++),l[p]={left:0,top:f,row:u,width:m,height:n},c[c.length-1]+=m+r}),d}_fitCols(t,e,s,n){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,g=0,p=0;return this.legendItems.forEach((m,x)=>{const{itemWidth:y,itemHeight:A}=nu(s,e,o,m,n);x>0&&f+A+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,p++,u=f=0),l[x]={left:g,top:f,col:p,width:y,height:A},u=Math.max(u,y),f+=A+r}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,a=oe(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=q(s,this.left+n,this.right-this.lineWidths[r]);for(const c of e)r!==c.row&&(r=c.row,l=q(s,this.left+n,this.right-this.lineWidths[r])),c.top+=this.top+t+n,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+n}else{let r=0,l=q(s,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const c of e)c.col!==r&&(r=c.col,l=q(s,this.top+t+n,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+n,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+n}}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:s,ctx:n}=this,{align:o,labels:a}=t,r=F.color,l=oe(t.rtl,this.left,this.width),c=K(a.font),{padding:h}=a,d=c.size,u=d/2;let f;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:g,boxHeight:p,itemHeight:m}=Wo(a,d),x=function(D,z,k){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;n.save();const L=N(k.lineWidth,1);if(n.fillStyle=N(k.fillStyle,r),n.lineCap=N(k.lineCap,"butt"),n.lineDashOffset=N(k.lineDashOffset,0),n.lineJoin=N(k.lineJoin,"miter"),n.lineWidth=L,n.strokeStyle=N(k.strokeStyle,r),n.setLineDash(N(k.lineDash,[])),a.usePointStyle){const C={radius:p*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:L},S=l.xPlus(D,g/2),P=z+u;gn(n,C,S,P,a.pointStyleWidth&&g)}else{const C=z+Math.max((d-p)/2,0),S=l.leftForLtr(D,g),P=Wt(k.borderRadius);n.beginPath(),Object.values(P).some(J=>J!==0)?Te(n,{x:S,y:C,w:g,h:p,radius:P}):n.rect(S,C,g,p),n.fill(),L!==0&&n.stroke()}n.restore()},y=function(D,z,k){Rt(n,k.text,D,z+m/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},A=this.isHorizontal(),I=this._computeTitleHeight();A?f={x:q(o,this.left+h,this.right-s[0]),y:this.top+h+I,line:0}:f={x:this.left+h,y:q(o,this.top+I+h,this.bottom-e[0].height),line:0},zn(this.ctx,t.textDirection);const w=m+h;this.legendItems.forEach((D,z)=>{n.strokeStyle=D.fontColor,n.fillStyle=D.fontColor;const k=n.measureText(D.text).width,L=l.textAlign(D.textAlign||(D.textAlign=a.textAlign)),C=g+u+k;let S=f.x,P=f.y;l.setWidth(this.width),A?z>0&&S+C+h>this.right&&(P=f.y+=w,f.line++,S=f.x=q(o,this.left+h,this.right-s[f.line])):z>0&&P+w>this.bottom&&(S=f.x=S+e[f.line].width+h,f.line++,P=f.y=q(o,this.top+I+h,this.bottom-e[f.line].height));const J=l.x(S);if(x(J,P,D),S=Tl(L,S+g+u,A?S+C:this.right,t.rtl),y(l.x(S),P,D),A)f.x+=C+h;else if(typeof D.text!="string"){const ot=c.lineHeight;f.y+=Ho(D,ot)+h}else f.y+=w}),kn(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,s=K(e.font),n=_(e.padding);if(!e.display)return;const o=oe(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=s.size/2,c=n.top+l;let h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=q(t.align,d,this.right-u);else{const g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);h=c+q(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const f=q(r,d,d+u);a.textAlign=o.textAlign(Fi(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=s.string,Rt(a,e.text,f,h,s)}_computeTitleHeight(){const t=this.options.title,e=K(t.font),s=_(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(xt(t,this.left,this.right)&&xt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;s<o.length;++s)if(n=o[s],xt(t,n.left,n.left+n.width)&&xt(e,n.top,n.top+n.height))return this.legendItems[s]}return null}handleEvent(t){const e=this.options;if(!ru(t.type,e))return;const s=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const n=this._hoveredItem,o=su(n,s);n&&!o&&B(e.onLeave,[t,n,this],this),this._hoveredItem=s,s&&!o&&B(e.onHover,[t,s,this],this)}else s&&B(e.onClick,[t,s,this],this)}}function nu(i,t,e,s,n){const o=ou(s,i,t,e),a=au(n,s,t.lineHeight);return{itemWidth:o,itemHeight:a}}function ou(i,t,e,s){let n=i.text;return n&&typeof n!="string"&&(n=n.reduce((o,a)=>o.length>a.length?o:a)),t+e.size/2+s.measureText(n).width}function au(i,t,e){let s=i;return typeof t.text!="string"&&(s=Ho(t,e)),s}function Ho(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:Go,start(i,t,e){const s=i.legend=new Go({ctx:i.ctx,options:e,chart:i});$.configure(i,s,e),$.addBox(i,s)},stop(i){$.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const s=i.legend;$.configure(i,s,e),s.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 s=t.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),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:s,textAlign:n,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:s||c.pointStyle,rotation:c.rotation,textAlign:n||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 xs extends ht{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 s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=R(s.text)?s.text.length:1;this._padding=_(s.padding);const o=n*K(s.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:s,bottom:n,right:o,options:a}=this,r=a.align;let l=0,c,h,d;return this.isHorizontal()?(h=q(r,s,o),d=e+t,c=o-s):(a.position==="left"?(h=s+t,d=q(r,n,e),l=W*-.5):(h=o-t,d=q(r,e,n),l=W*.5),c=n-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const s=K(e.font),o=s.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);Rt(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:Fi(e.align),textBaseline:"middle",translation:[a,r]})}}function cu(i,t){const e=new xs({ctx:i.ctx,options:t,chart:i});$.configure(i,e,t),$.addBox(i,e),i.titleBlock=e}var hu={id:"title",_element:xs,start(i,t,e){cu(i,e)},stop(i){const t=i.titleBlock;$.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const s=i.titleBlock;$.configure(i,s,e),s.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 Ii=new WeakMap;var du={id:"subtitle",start(i,t,e){const s=new xs({ctx:i.ctx,options:e,chart:i});$.configure(i,s,e),$.addBox(i,s),Ii.set(i,s)},stop(i){$.removeBox(i,Ii.get(i)),Ii.delete(i)},beforeUpdate(i,t,e){const s=Ii.get(i);$.configure(i,s,e),s.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 Ve={average(i){if(!i.length)return!1;let t,e,s=0,n=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();s+=r.x,n+=r.y,++o}}return{x:s/o,y:n/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,s=t.y,n=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<n&&(n=h,r=l)}}if(r){const l=r.tooltipPosition();e=l.x,s=l.y}return{x:e,y:s}}};function gt(i,t){return t&&(R(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function It(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
1268
1259
  `)>-1?i.split(`
1269
- `):i}function du(i,t){const{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:i,label:a,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function Zo(i,t){const e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:a,boxHeight:r}=t,l=X(t.bodyFont),c=X(t.titleFont),h=X(t.footerFont),d=o.length,u=n.length,f=s.length,g=_(t.padding);let p=g.height,m=0,x=s.reduce((I,M)=>I+M.before.length+M.lines.length+M.after.length,0);if(x+=i.beforeBody.length+i.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),x){const I=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;p+=f*I+(x-f)*l.lineHeight+(x-1)*t.bodySpacing}u&&(p+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let y=0;const A=function(I){m=Math.max(m,e.measureText(I).width+y)};return e.save(),e.font=c.string,E(i.title,A),e.font=l.string,E(i.beforeBody.concat(i.afterBody),A),y=t.displayColors?a+2+t.boxPadding:0,E(s,I=>{E(I.before,A),E(I.lines,A),E(I.after,A)}),y=0,e.font=h.string,E(i.footer,A),e.restore(),m+=g.width,{width:m,height:p}}function uu(i,t){const{y:e,height:s}=t;return e<s/2?"top":e>i.height-s/2?"bottom":"center"}function fu(i,t,e,s){const{x:n,width:o}=s,a=e.caretSize+e.caretPadding;if(i==="left"&&n+o+a>t.width||i==="right"&&n-o-a<0)return!0}function gu(i,t,e,s){const{x:n,width:o}=e,{width:a,chartArea:{left:r,right:l}}=i;let c="center";return s==="center"?c=n<=(r+l)/2?"left":"right":n<=o/2?c="left":n>=a-o/2&&(c="right"),fu(c,i,t,e)&&(c="center"),c}function Go(i,t,e){const s=e.yAlign||t.yAlign||uu(i,e);return{xAlign:e.xAlign||t.xAlign||gu(i,t,e,s),yAlign:s}}function pu(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function mu(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function Fo(i,t,e,s){const{caretSize:n,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Wt(a);let g=pu(t,r);const p=mu(t,l,c);return l==="center"?r==="left"?g+=c:r==="right"&&(g-=c):r==="left"?g-=Math.max(h,u)+n:r==="right"&&(g+=Math.max(d,f)+n),{x:K(g,0,s.width-t.width),y:K(p,0,s.height-t.height)}}function Ii(i,t,e){const s=_(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function Uo(i){return gt([],It(i))}function bu(i,t,e){return Ct(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Yo(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const Xo={beforeTitle:bt,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex<s)return e[t.dataIndex]}return""},afterTitle:bt,beforeBody:bt,beforeLabel:bt,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 j(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:bt,afterBody:bt,beforeFooter:bt,footer:bt,afterFooter:bt};function et(i,t,e,s){const n=i[t].call(e,s);return typeof n>"u"?Xo[t].call(e,s):n}class xs extends ht{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,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new jn(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=bu(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:s}=e,n=et(s,"beforeTitle",this,t),o=et(s,"title",this,t),a=et(s,"afterTitle",this,t);let r=[];return r=gt(r,It(n)),r=gt(r,It(o)),r=gt(r,It(a)),r}getBeforeBody(t,e){return Uo(et(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:s}=e,n=[];return E(t,o=>{const a={before:[],lines:[],after:[]},r=Yo(s,o);gt(a.before,It(et(r,"beforeLabel",this,o))),gt(a.lines,et(r,"label",this,o)),gt(a.after,It(et(r,"afterLabel",this,o))),n.push(a)}),n}getAfterBody(t,e){return Uo(et(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:s}=e,n=et(s,"beforeFooter",this,t),o=et(s,"footer",this,t),a=et(s,"afterFooter",this,t);let r=[];return r=gt(r,It(n)),r=gt(r,It(o)),r=gt(r,It(a)),r}_createItems(t){const e=this._active,s=this.chart.data,n=[],o=[],a=[];let r=[],l,c;for(l=0,c=e.length;l<c;++l)r.push(du(this.chart,e[l]));return t.filter&&(r=r.filter((h,d,u)=>t.filter(h,d,u,s))),t.itemSort&&(r=r.sort((h,d)=>t.itemSort(h,d,s))),E(r,h=>{const d=Yo(t.callbacks,h);n.push(et(d,"labelColor",this,h)),o.push(et(d,"labelPointStyle",this,h)),a.push(et(d,"labelTextColor",this,h))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){const s=this.options.setContext(this.getContext()),n=this._active;let o,a=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const r=Ee[s.position].call(this,n,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);const l=this._size=Zo(this,s),c=Object.assign({},r,l),h=Go(this.chart,s,c),d=Fo(s,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&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){const o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){const{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:r}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=Wt(r),{x:u,y:f}=t,{width:g,height:p}=e;let m,x,y,A,I,M;return o==="center"?(I=f+p/2,n==="left"?(m=u,x=m-a,A=I+a,M=I-a):(m=u+g,x=m+a,A=I-a,M=I+a),y=m):(n==="left"?x=u+Math.max(l,h)+a:n==="right"?x=u+g-Math.max(c,d)-a:x=this.caretX,o==="top"?(A=f,I=A-a,m=x-a,y=x+a):(A=f+p,I=A+a,m=x+a,y=x-a),M=A),{x1:m,x2:x,x3:y,y1:A,y2:I,y3:M}}drawTitle(t,e,s){const n=this.title,o=n.length;let a,r,l;if(o){const c=ne(s.rtl,this.x,this.width);for(t.x=Ii(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",a=X(s.titleFont),r=s.titleSpacing,e.fillStyle=s.titleColor,e.font=a.string,l=0;l<o;++l)e.fillText(n[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===o&&(t.y+=s.titleMarginBottom-r)}}_drawColorBox(t,e,s,n,o){const a=this.labelColors[s],r=this.labelPointStyles[s],{boxHeight:l,boxWidth:c}=o,h=X(o.bodyFont),d=Ii(this,"left",o),u=n.x(d),f=l<h.lineHeight?(h.lineHeight-l)/2:0,g=e.y+f;if(o.usePointStyle){const p={radius:Math.min(c,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},m=n.leftForLtr(u,c)+c/2,x=g+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Ki(t,p,m,x),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Ki(t,p,m,x)}else{t.lineWidth=O(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 p=n.leftForLtr(u,c),m=n.leftForLtr(n.xPlus(u,1),c-2),x=Wt(a.borderRadius);Object.values(x).some(y=>y!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Ae(t,{x:p,y:g,w:c,h:l,radius:x}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Ae(t,{x:m,y:g+1,w:c-2,h:l-2,radius:x}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(p,g,c,l),t.strokeRect(p,g,c,l),t.fillStyle=a.backgroundColor,t.fillRect(m,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){const{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:h}=s,d=X(s.bodyFont);let u=d.lineHeight,f=0;const g=ne(s.rtl,this.x,this.width),p=function(k){e.fillText(k,g.x(t.x+f),t.y+u/2),t.y+=u+o},m=g.textAlign(a);let x,y,A,I,M,D,z;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=Ii(this,m,s),e.fillStyle=s.bodyColor,E(this.beforeBody,p),f=r&&m!=="right"?a==="center"?c/2+h:c+2+h:0,I=0,D=n.length;I<D;++I){for(x=n[I],y=this.labelTextColors[I],e.fillStyle=y,E(x.before,p),A=x.lines,r&&A.length&&(this._drawColorBox(e,t,I,g,s),u=Math.max(d.lineHeight,l)),M=0,z=A.length;M<z;++M)p(A[M]),u=d.lineHeight;E(x.after,p)}f=0,u=d.lineHeight,E(this.afterBody,p),t.y-=o}drawFooter(t,e,s){const n=this.footer,o=n.length;let a,r;if(o){const l=ne(s.rtl,this.x,this.width);for(t.x=Ii(this,s.footerAlign,s),t.y+=s.footerMarginTop,e.textAlign=l.textAlign(s.footerAlign),e.textBaseline="middle",a=X(s.footerFont),e.fillStyle=s.footerColor,e.font=a.string,r=0;r<o;++r)e.fillText(n[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s.footerSpacing}}drawBackground(t,e,s,n){const{xAlign:o,yAlign:a}=this,{x:r,y:l}=t,{width:c,height:h}=s,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=Wt(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(r+d,l),a==="top"&&this.drawCaret(t,e,s,n),e.lineTo(r+c-u,l),e.quadraticCurveTo(r+c,l,r+c,l+u),a==="center"&&o==="right"&&this.drawCaret(t,e,s,n),e.lineTo(r+c,l+h-g),e.quadraticCurveTo(r+c,l+h,r+c-g,l+h),a==="bottom"&&this.drawCaret(t,e,s,n),e.lineTo(r+f,l+h),e.quadraticCurveTo(r,l+h,r,l+h-f),a==="center"&&o==="left"&&this.drawCaret(t,e,s,n),e.lineTo(r,l+d),e.quadraticCurveTo(r,l,r+d,l),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){const a=Ee[t.position].call(this,this._active,this._eventPosition);if(!a)return;const r=this._size=Zo(this,t),l=Object.assign({},a,this._size),c=Go(e,t,l),h=Fo(t,l,c,e);(n._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 s=this.opacity;if(!s)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;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=s,this.drawBackground(o,t,n,e),Dn(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),zn(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const s=this._active,n=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=!Ke(s,n),a=this._positionChanged(n,e);(o||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,s),r=this._positionChanged(a,t),l=e||!Ke(a,o)||r;return l&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return e;const a=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:s,caretY:n,options:o}=this,a=Ee[o.position].call(this,t,e);return a!==!1&&(s!==a.x||n!==a.y)}}T(xs,"positioners",Ee);var xu={id:"tooltip",_element:xs,positioners:Ee,afterInit(i,t,e){e&&(i.tooltip=new xs({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:Xo},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"]},yu=Object.freeze({__proto__:null,Colors:Cd,Decimation:jd,Filler:eu,Legend:ru,SubTitle:hu,Title:cu,Tooltip:xu});const Mu=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function wu(i,t,e,s){const n=i.indexOf(t);if(n===-1)return Mu(i,t,e,s);const o=i.lastIndexOf(t);return n!==o?e:n}const vu=(i,t)=>i===null?null:K(Math.round(i),0,t);function Ko(i){const t=this.getLabels();return i>=0&&i<t.length?t[i]:i}class ys extends Yt{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const s=this.getLabels();for(const{index:n,label:o}of e)s[n]===o&&s.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(j(t))return null;const s=this.getLabels();return e=isFinite(e)&&s[e]===t?e:wu(s,t,N(e,t),this._addedLabels),vu(e,s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:s,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),e||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){const t=this.min,e=this.max,s=this.options.offset,n=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let a=t;a<=e;a++)n.push({value:a});return n}getLabelForValue(t){return Ko.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}}T(ys,"id","category"),T(ys,"defaults",{ticks:{callback:Ko}});function Iu(i,t){const e=[],{bounds:n,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,g=h-1,{min:p,max:m}=t,x=!j(a),y=!j(r),A=!j(c),I=(m-p)/(d+1);let M=Qs((m-p)/g/f)*f,D,z,k,L;if(M<1e-14&&!x&&!y)return[{value:p},{value:m}];L=Math.ceil(m/M)-Math.floor(p/M),L>g&&(M=Qs(L*M/g/f)*f),j(l)||(D=Math.pow(10,l),M=Math.ceil(M*D)/D),n==="ticks"?(z=Math.floor(p/M)*M,k=Math.ceil(m/M)*M):(z=p,k=m),x&&y&&o&&bl((r-a)/o,M/1e3)?(L=Math.round(Math.min((r-a)/M,h)),M=(r-a)/L,z=a,k=r):A?(z=x?a:z,k=y?r:k,L=c-1,M=(k-z)/L):(L=(k-z)/M,ye(L,Math.round(L),M/1e3)?L=Math.round(L):L=Math.ceil(L));const C=Math.max(qs(M),qs(z));D=Math.pow(10,j(l)?C:l),z=Math.round(z*D)/D,k=Math.round(k*D)/D;let S=0;for(x&&(u&&z!==a?(e.push({value:a}),z<a&&S++,ye(Math.round((z+S*M)*D)/D,a,Qo(a,I,i))&&S++):z<a&&S++);S<L;++S){const P=Math.round((z+S*M)*D)/D;if(y&&P>r)break;e.push({value:P})}return y&&u&&k!==r?e.length&&ye(e[e.length-1].value,r,Qo(r,I,i))?e[e.length-1].value=r:e.push({value:r}):(!y||k===r)&&e.push({value:k}),e}function Qo(i,t,{horizontal:e,minRotation:s}){const n=lt(s),o=(e?Math.sin(n):Math.cos(n))||.001,a=.75*t*(""+i).length;return Math.min(t/o,a)}class Ai extends Yt{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 j(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const a=l=>n=e?n:l,r=l=>o=s?o:l;if(t){const l=ut(n),c=ut(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);r(o+l),t||a(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n={maxTicks:s,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=Iu(n,o);return t.bounds==="ticks"&&Js(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,s=this.max;if(super.configure(),this.options.offset&&t.length){const n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return ve(t,this.chart.options.locale,this.options.ticks.format)}}class Ms extends Ai{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=G(t)?t:0,this.max=G(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,s=lt(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}T(Ms,"id","linear"),T(Ms,"defaults",{ticks:{callback:_e.formatters.numeric}});const Ve=i=>Math.floor(Nt(i)),Xt=(i,t)=>Math.pow(10,Ve(i)+t);function Jo(i){return i/Math.pow(10,Ve(i))===1}function qo(i,t,e){const s=Math.pow(10,e),n=Math.floor(i/s);return Math.ceil(t/s)-n}function Au(i,t){const e=t-i;let s=Ve(e);for(;qo(i,t,s)>10;)s++;for(;qo(i,t,s)<10;)s--;return Math.min(s,Ve(i))}function Tu(i,{min:t,max:e}){t=st(i.min,t);const s=[],n=Ve(t);let o=Au(t,e),a=o<0?Math.pow(10,Math.abs(o)):1;const r=Math.pow(10,o),l=n>o?Math.pow(10,n):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=st(i.min,Math.round((l+h+d*Math.pow(10,o))*a)/a);for(;u<e;)s.push({value:u,major:Jo(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=st(i.max,u);return s.push({value:f,major:Jo(f),significand:d}),s}class ws extends Yt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const s=Ai.prototype.parse.apply(this,[t,e]);if(s===0){this._zero=!0;return}return G(s)&&s>0?s:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=G(t)?Math.max(0,t):null,this.max=G(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!G(this._userMin)&&(this.min=t===Xt(this.min,0)?Xt(this.min,-1):Xt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let s=this.min,n=this.max;const o=r=>s=t?s:r,a=r=>n=e?n:r;s===n&&(s<=0?(o(1),a(10)):(o(Xt(s,-1)),a(Xt(n,1)))),s<=0&&o(Xt(n,-1)),n<=0&&a(Xt(s,1)),this.min=s,this.max=n}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},s=Tu(e,this);return t.bounds==="ticks"&&Js(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?"0":ve(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Nt(t),this._valueRange=Nt(this.max)-Nt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Nt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}T(ws,"id","logarithmic"),T(ws,"defaults",{ticks:{callback:_e.formatters.logarithmic,major:{enabled:!0}}});function vs(i){const t=i.ticks;if(t.display&&i.display){const e=_(t.backdropPadding);return N(t.font&&t.font.size,F.font.size)+e.height}return 0}function Du(i,t,e){return e=R(e)?e:[e],{w:Pl(i,t.string,e),h:e.length*t.lineHeight}}function _o(i,t,e,s,n){return i===s||i===n?{start:t-e/2,end:t+e/2}:i<s||i>n?{start:t-e,end:t}:{start:t,end:t+e}}function zu(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),s=[],n=[],o=i._pointLabels.length,a=i.options.pointLabels,r=a.centerPointLabels?W/o:0;for(let l=0;l<o;l++){const c=a.setContext(i.getPointLabelContext(l));n[l]=c.padding;const h=i.getPointPosition(l,i.drawingArea+n[l],r),d=X(c.font),u=Du(i.ctx,d,i._pointLabels[l]);s[l]=u;const f=nt(i.getIndexAngle(l)+r),g=Math.round(Wi(f)),p=_o(g,h.x,u.w,0,180),m=_o(g,h.y,u.h,90,270);ku(e,t,f,p,m)}i.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),i._pointLabelItems=Cu(i,s,n)}function ku(i,t,e,s,n){const o=Math.abs(Math.sin(e)),a=Math.abs(Math.cos(e));let r=0,l=0;s.start<t.l?(r=(t.l-s.start)/o,i.l=Math.min(i.l,t.l-r)):s.end>t.r&&(r=(s.end-t.r)/o,i.r=Math.max(i.r,t.r+r)),n.start<t.t?(l=(t.t-n.start)/a,i.t=Math.min(i.t,t.t-l)):n.end>t.b&&(l=(n.end-t.b)/a,i.b=Math.max(i.b,t.b+l))}function Lu(i,t,e){const s=i.drawingArea,{extra:n,additionalAngle:o,padding:a,size:r}=e,l=i.getPointPosition(t,s+n+a,o),c=Math.round(Wi(nt(l.angle+U))),h=Pu(l.y,r.h,c),d=Su(c),u=Ou(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 Nu(i,t){if(!t)return!0;const{left:e,top:s,right:n,bottom:o}=i;return!(Mt({x:e,y:s},t)||Mt({x:e,y:o},t)||Mt({x:n,y:s},t)||Mt({x:n,y:o},t))}function Cu(i,t,e){const s=[],n=i._pointLabels.length,o=i.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:vs(o)/2,additionalAngle:a?W/n:0};let c;for(let h=0;h<n;h++){l.padding=e[h],l.size=t[h];const d=Lu(i,h,l);s.push(d),r==="auto"&&(d.visible=Nu(d,c),d.visible&&(c=d))}return s}function Su(i){return i===0||i===180?"center":i<180?"left":"right"}function Ou(i,t,e){return e==="right"?i-=t:e==="center"&&(i-=t/2),i}function Pu(i,t,e){return e===90||e===270?i-=t/2:(e>270||e<90)&&(i-=t),i}function ju(i,t,e){const{left:s,top:n,right:o,bottom:a}=e,{backdropColor:r}=t;if(!j(r)){const l=Wt(t.borderRadius),c=_(t.backdropPadding);i.fillStyle=r;const h=s-c.left,d=n-c.top,u=o-s+c.width,f=a-n+c.height;Object.values(l).some(g=>g!==0)?(i.beginPath(),Ae(i,{x:h,y:d,w:u,h:f,radius:l}),i.fill()):i.fillRect(h,d,u,f)}}function Eu(i,t){const{ctx:e,options:{pointLabels:s}}=i;for(let n=t-1;n>=0;n--){const o=i._pointLabelItems[n];if(!o.visible)continue;const a=s.setContext(i.getPointLabelContext(n));ju(e,a,o);const r=X(a.font),{x:l,y:c,textAlign:h}=o;Rt(e,i._pointLabels[n],l,c+r.lineHeight/2,r,{color:a.color,textAlign:h,textBaseline:"middle"})}}function $o(i,t,e,s){const{ctx:n}=i;if(e)n.arc(i.xCenter,i.yCenter,t,0,H);else{let o=i.getPointPosition(0,t);n.moveTo(o.x,o.y);for(let a=1;a<s;a++)o=i.getPointPosition(a,t),n.lineTo(o.x,o.y)}}function Vu(i,t,e,s,n){const o=i.ctx,a=t.circular,{color:r,lineWidth:l}=t;!a&&!s||!r||!l||e<0||(o.save(),o.strokeStyle=r,o.lineWidth=l,o.setLineDash(n.dash),o.lineDashOffset=n.dashOffset,o.beginPath(),$o(i,e,a,s),o.closePath(),o.stroke(),o.restore())}function Bu(i,t,e){return Ct(i,{label:e,index:t,type:"pointLabel"})}class Be extends Ai{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=_(vs(this.options)/2),e=this.width=this.maxWidth-t.width,s=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+s/2+t.top),this.drawingArea=Math.floor(Math.min(e,s)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=G(t)&&!isNaN(t)?t:0,this.max=G(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/vs(this.options))}generateTickLabels(t){Ai.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,s)=>{const n=B(this.options.pointLabels.callback,[e,s],this);return n||n===0?n:""}).filter((e,s)=>this.chart.getDataVisibility(s))}fit(){const t=this.options;t.display&&t.pointLabels.display?zu(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,s,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,s,n))}getIndexAngle(t){const e=H/(this._pointLabels.length||1),s=this.options.startAngle||0;return nt(t*e+lt(s))}getDistanceFromCenterForValue(t){if(j(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(j(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 s=e[t];return Bu(this.getContext(),t,s)}}getPointPosition(t,e,s=0){const n=this.getIndexAngle(t)-U+s;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}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:s,right:n,bottom:o}=this._pointLabelItems[t];return{left:e,top:s,right:n,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const s=this.ctx;s.save(),s.beginPath(),$o(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),s.closePath(),s.fillStyle=t,s.fill(),s.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:s,grid:n,border:o}=e,a=this._pointLabels.length;let r,l,c;if(e.pointLabels.display&&Eu(this,a),n.display&&this.ticks.forEach((h,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(h.value);const u=this.getContext(d),f=n.setContext(u),g=o.setContext(u);Vu(this,f,l,a,g)}}),s.display){for(t.save(),r=a-1;r>=0;r--){const h=s.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,s=e.ticks;if(!s.display)return;const n=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&!e.reverse)return;const c=s.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)}Rt(t,r.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}T(Be,"id","radialLinear"),T(Be,"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}}),T(Be,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),T(Be,"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}},it=Object.keys(Ti);function ta(i,t){return i-t}function ea(i,t){if(j(t))return null;const e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts;let a=t;return typeof s=="function"&&(a=s(a)),G(a)||(a=typeof s=="string"?e.parse(a,s):e.parse(a)),a===null?null:(n&&(a=n==="week"&&(ee(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,n)),+a)}function ia(i,t,e,s){const n=it.length;for(let o=it.indexOf(i);o<n-1;++o){const a=Ti[it[o]],r=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((e-t)/(r*a.size))<=s)return it[o]}return it[n-1]}function Ru(i,t,e,s,n){for(let o=it.length-1;o>=it.indexOf(e);o--){const a=it[o];if(Ti[a].common&&i._adapter.diff(n,s,a)>=t-1)return a}return it[e?it.indexOf(e):0]}function Wu(i){for(let t=it.indexOf(i)+1,e=it.length;t<e;++t)if(Ti[it[t]].common)return it[t]}function sa(i,t,e){if(!e)i[t]=!0;else if(e.length){const{lo:s,hi:n}=Zi(e,t),o=e[s]>=t?e[s]:e[n];i[o]=!0}}function Hu(i,t,e,s){const n=i._adapter,o=+n.startOf(t[0].value,s),a=t[t.length-1].value;let r,l;for(r=o;r<=a;r=+n.add(r,1,s))l=e[r],l>=0&&(t[l].major=!0);return t}function na(i,t,e){const s=[],n={},o=t.length;let a,r;for(a=0;a<o;++a)r=t[a],n[r]=a,s.push({value:r,major:!1});return o===0||!e?s:Hu(i,s,n,e)}class Re extends Yt{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 s=t.time||(t.time={}),n=this._adapter=new Jc._date(t.adapters.date);n.init(e),be(s.displayFormats,n.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:ea(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,s=t.time.unit||"day";let{min:n,max:o,minDefined:a,maxDefined:r}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(n=Math.min(n,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))),n=G(n)&&!isNaN(n)?n:+e.startOf(Date.now(),s),o=G(o)&&!isNaN(o)?o:+e.endOf(Date.now(),s)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],s=t[t.length-1]),{min:e,max:s}}buildTicks(){const t=this.options,e=t.time,s=t.ticks,n=s.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const o=this.min,a=this.max,r=wl(n,o,a);return this._unit=e.unit||(s.autoSkip?ia(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):Ru(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:Wu(this._unit),this.initOffsets(n),t.reverse&&r.reverse(),na(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=K(e,0,a),s=K(s,0,a),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){const t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,a=o.unit||ia(o.minUnit,e,s,this._getLabelCapacity(e)),r=N(n.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=ee(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(s,e,a)>1e5*r)throw new Error(e+" and "+s+" are too far apart with stepSize of "+r+" "+a);const g=n.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;u<s;u=+t.add(u,r,a),f++)sa(h,u,g);return(u===s||n.bounds==="ticks"||f===1)&&sa(h,u,g),Object.keys(h).sort(ta).map(p=>+p)}getLabelForValue(t){const e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,o=this._unit,a=e||n[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,s,n){const o=this.options,a=o.ticks.callback;if(a)return B(a,[t,e,s],this);const r=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&r[l],d=c&&r[c],u=s[e],f=c&&d&&u&&u.major;return this._adapter.format(t,n||(f?d:h))}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e<s;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+s)*e.factor)}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,s=this.ctx.measureText(t).width,n=lt(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(n),a=Math.sin(n),r=this._resolveTickFontOptions(0).size;return{w:s*o+r*a,h:s*a+r*o}}_getLabelCapacity(t){const e=this.options.time,s=e.displayFormats,n=s[e.unit]||s.millisecond,o=this._tickFormatFunction(t,0,na(this,[t],this._majorUnit),n),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,s;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e<s;++e)t=t.concat(n[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,s;if(t.length)return t;const n=this.getLabels();for(e=0,s=n.length;e<s;++e)t.push(ea(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return en(t.sort(ta))}}T(Re,"id","time"),T(Re,"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 Di(i,t,e){let s=0,n=i.length-1,o,a,r,l;e?(t>=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=yt(i,"pos",t)),{pos:o,time:r}=i[s],{pos:a,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=yt(i,"time",t)),{time:o,pos:r}=i[s],{time:a,pos:l}=i[n]);const c=a-o;return c?r+(l-r)*(t-o)/c:r}class Is extends Re{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=Di(e,this.min),this._tableRange=Di(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:s}=this,n=[],o=[];let a,r,l,c,h;for(a=0,r=t.length;a<r;++a)c=t[a],c>=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(a=0,r=n.length;a<r;++a)h=n[a+1],l=n[a-1],c=n[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 s=super.getDataTimestamps();return(!s.includes(t)||!s.length)&&s.splice(0,0,t),(!s.includes(e)||s.length===1)&&s.push(e),s.sort((n,o)=>n-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),s=this.getLabelTimestamps();return e.length&&s.length?t=this.normalize(e.concat(s)):t=e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(Di(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return Di(this._table,s*this._tableRange+this._minPos,!0)}}T(Is,"id","timeseries"),T(Is,"defaults",Re.defaults);var Zu=Object.freeze({__proto__:null,CategoryScale:ys,LinearScale:Ms,LogarithmicScale:ws,RadialLinearScale:Be,TimeScale:Re,TimeSeriesScale:Is});const Gu=[Qc,Td,yu,Zu];vt.register(...Gu);var Fu=Object.defineProperty,Uu=Object.getOwnPropertyDescriptor,Kt=(i,t,e,s)=>{for(var n=s>1?void 0:s?Uu(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Fu(t,e,n),n};v.GenusChart=class extends b.LitElement{constructor(){super(...arguments),this.chartTitle="",this.chartType="",this.chartLabels=[],this.chartDataSets=[],this._createChart=()=>{this._chart=new vt(this._chartCanvas,{type:this.chartType,data:{labels:[...this.chartLabels],datasets:[...this.chartDataSets]}})}}firstUpdated(){this._createChart()}updated(){this._chart.data.datasets=[...this.chartDataSets],this._chart.update()}render(){return b.html`
1260
+ `):i}function uu(i,t){const{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:i,label:a,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function Zo(i,t){const e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:a,boxHeight:r}=t,l=K(t.bodyFont),c=K(t.titleFont),h=K(t.footerFont),d=o.length,u=n.length,f=s.length,g=_(t.padding);let p=g.height,m=0,x=s.reduce((I,w)=>I+w.before.length+w.lines.length+w.after.length,0);if(x+=i.beforeBody.length+i.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),x){const I=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;p+=f*I+(x-f)*l.lineHeight+(x-1)*t.bodySpacing}u&&(p+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let y=0;const A=function(I){m=Math.max(m,e.measureText(I).width+y)};return e.save(),e.font=c.string,E(i.title,A),e.font=l.string,E(i.beforeBody.concat(i.afterBody),A),y=t.displayColors?a+2+t.boxPadding:0,E(s,I=>{E(I.before,A),E(I.lines,A),E(I.after,A)}),y=0,e.font=h.string,E(i.footer,A),e.restore(),m+=g.width,{width:m,height:p}}function fu(i,t){const{y:e,height:s}=t;return e<s/2?"top":e>i.height-s/2?"bottom":"center"}function gu(i,t,e,s){const{x:n,width:o}=s,a=e.caretSize+e.caretPadding;if(i==="left"&&n+o+a>t.width||i==="right"&&n-o-a<0)return!0}function pu(i,t,e,s){const{x:n,width:o}=e,{width:a,chartArea:{left:r,right:l}}=i;let c="center";return s==="center"?c=n<=(r+l)/2?"left":"right":n<=o/2?c="left":n>=a-o/2&&(c="right"),gu(c,i,t,e)&&(c="center"),c}function Fo(i,t,e){const s=e.yAlign||t.yAlign||fu(i,e);return{xAlign:e.xAlign||t.xAlign||pu(i,t,e,s),yAlign:s}}function mu(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function bu(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function Uo(i,t,e,s){const{caretSize:n,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Wt(a);let g=mu(t,r);const p=bu(t,l,c);return l==="center"?r==="left"?g+=c:r==="right"&&(g-=c):r==="left"?g-=Math.max(h,u)+n:r==="right"&&(g+=Math.max(d,f)+n),{x:X(g,0,s.width-t.width),y:X(p,0,s.height-t.height)}}function Ai(i,t,e){const s=_(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function Yo(i){return gt([],It(i))}function xu(i,t,e){return Ct(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Ko(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const Xo={beforeTitle:bt,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex<s)return e[t.dataIndex]}return""},afterTitle:bt,beforeBody:bt,beforeLabel:bt,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 j(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:bt,afterBody:bt,beforeFooter:bt,footer:bt,afterFooter:bt};function et(i,t,e,s){const n=i[t].call(e,s);return typeof n>"u"?Xo[t].call(e,s):n}class ys extends ht{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,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new En(this.chart,n);return n._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:s}=e,n=et(s,"beforeTitle",this,t),o=et(s,"title",this,t),a=et(s,"afterTitle",this,t);let r=[];return r=gt(r,It(n)),r=gt(r,It(o)),r=gt(r,It(a)),r}getBeforeBody(t,e){return Yo(et(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:s}=e,n=[];return E(t,o=>{const a={before:[],lines:[],after:[]},r=Ko(s,o);gt(a.before,It(et(r,"beforeLabel",this,o))),gt(a.lines,et(r,"label",this,o)),gt(a.after,It(et(r,"afterLabel",this,o))),n.push(a)}),n}getAfterBody(t,e){return Yo(et(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:s}=e,n=et(s,"beforeFooter",this,t),o=et(s,"footer",this,t),a=et(s,"afterFooter",this,t);let r=[];return r=gt(r,It(n)),r=gt(r,It(o)),r=gt(r,It(a)),r}_createItems(t){const e=this._active,s=this.chart.data,n=[],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,s))),t.itemSort&&(r=r.sort((h,d)=>t.itemSort(h,d,s))),E(r,h=>{const d=Ko(t.callbacks,h);n.push(et(d,"labelColor",this,h)),o.push(et(d,"labelPointStyle",this,h)),a.push(et(d,"labelTextColor",this,h))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){const s=this.options.setContext(this.getContext()),n=this._active;let o,a=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const r=Ve[s.position].call(this,n,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);const l=this._size=Zo(this,s),c=Object.assign({},r,l),h=Fo(this.chart,s,c),d=Uo(s,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&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){const o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){const{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:r}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=Wt(r),{x:u,y:f}=t,{width:g,height:p}=e;let m,x,y,A,I,w;return o==="center"?(I=f+p/2,n==="left"?(m=u,x=m-a,A=I+a,w=I-a):(m=u+g,x=m+a,A=I-a,w=I+a),y=m):(n==="left"?x=u+Math.max(l,h)+a:n==="right"?x=u+g-Math.max(c,d)-a:x=this.caretX,o==="top"?(A=f,I=A-a,m=x-a,y=x+a):(A=f+p,I=A+a,m=x+a,y=x-a),w=A),{x1:m,x2:x,x3:y,y1:A,y2:I,y3:w}}drawTitle(t,e,s){const n=this.title,o=n.length;let a,r,l;if(o){const c=oe(s.rtl,this.x,this.width);for(t.x=Ai(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",a=K(s.titleFont),r=s.titleSpacing,e.fillStyle=s.titleColor,e.font=a.string,l=0;l<o;++l)e.fillText(n[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===o&&(t.y+=s.titleMarginBottom-r)}}_drawColorBox(t,e,s,n,o){const a=this.labelColors[s],r=this.labelPointStyles[s],{boxHeight:l,boxWidth:c}=o,h=K(o.bodyFont),d=Ai(this,"left",o),u=n.x(d),f=l<h.lineHeight?(h.lineHeight-l)/2:0,g=e.y+f;if(o.usePointStyle){const p={radius:Math.min(c,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},m=n.leftForLtr(u,c)+c/2,x=g+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Qi(t,p,m,x),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Qi(t,p,m,x)}else{t.lineWidth=O(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 p=n.leftForLtr(u,c),m=n.leftForLtr(n.xPlus(u,1),c-2),x=Wt(a.borderRadius);Object.values(x).some(y=>y!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Te(t,{x:p,y:g,w:c,h:l,radius:x}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Te(t,{x:m,y:g+1,w:c-2,h:l-2,radius:x}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(p,g,c,l),t.strokeRect(p,g,c,l),t.fillStyle=a.backgroundColor,t.fillRect(m,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){const{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:h}=s,d=K(s.bodyFont);let u=d.lineHeight,f=0;const g=oe(s.rtl,this.x,this.width),p=function(k){e.fillText(k,g.x(t.x+f),t.y+u/2),t.y+=u+o},m=g.textAlign(a);let x,y,A,I,w,D,z;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=Ai(this,m,s),e.fillStyle=s.bodyColor,E(this.beforeBody,p),f=r&&m!=="right"?a==="center"?c/2+h:c+2+h:0,I=0,D=n.length;I<D;++I){for(x=n[I],y=this.labelTextColors[I],e.fillStyle=y,E(x.before,p),A=x.lines,r&&A.length&&(this._drawColorBox(e,t,I,g,s),u=Math.max(d.lineHeight,l)),w=0,z=A.length;w<z;++w)p(A[w]),u=d.lineHeight;E(x.after,p)}f=0,u=d.lineHeight,E(this.afterBody,p),t.y-=o}drawFooter(t,e,s){const n=this.footer,o=n.length;let a,r;if(o){const l=oe(s.rtl,this.x,this.width);for(t.x=Ai(this,s.footerAlign,s),t.y+=s.footerMarginTop,e.textAlign=l.textAlign(s.footerAlign),e.textBaseline="middle",a=K(s.footerFont),e.fillStyle=s.footerColor,e.font=a.string,r=0;r<o;++r)e.fillText(n[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s.footerSpacing}}drawBackground(t,e,s,n){const{xAlign:o,yAlign:a}=this,{x:r,y:l}=t,{width:c,height:h}=s,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=Wt(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(r+d,l),a==="top"&&this.drawCaret(t,e,s,n),e.lineTo(r+c-u,l),e.quadraticCurveTo(r+c,l,r+c,l+u),a==="center"&&o==="right"&&this.drawCaret(t,e,s,n),e.lineTo(r+c,l+h-g),e.quadraticCurveTo(r+c,l+h,r+c-g,l+h),a==="bottom"&&this.drawCaret(t,e,s,n),e.lineTo(r+f,l+h),e.quadraticCurveTo(r,l+h,r,l+h-f),a==="center"&&o==="left"&&this.drawCaret(t,e,s,n),e.lineTo(r,l+d),e.quadraticCurveTo(r,l,r+d,l),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){const a=Ve[t.position].call(this,this._active,this._eventPosition);if(!a)return;const r=this._size=Zo(this,t),l=Object.assign({},a,this._size),c=Fo(e,t,l),h=Uo(t,l,c,e);(n._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 s=this.opacity;if(!s)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;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=s,this.drawBackground(o,t,n,e),zn(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),kn(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const s=this._active,n=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(s,n),a=this._positionChanged(n,e);(o||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,s),r=this._positionChanged(a,t),l=e||!Qe(a,o)||r;return l&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return e;const a=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:s,caretY:n,options:o}=this,a=Ve[o.position].call(this,t,e);return a!==!1&&(s!==a.x||n!==a.y)}}T(ys,"positioners",Ve);var yu={id:"tooltip",_element:ys,positioners:Ve,afterInit(i,t,e){e&&(i.tooltip=new ys({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:Xo},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"]},Mu=Object.freeze({__proto__:null,Colors:Sd,Decimation:Ed,Filler:iu,Legend:lu,SubTitle:du,Title:hu,Tooltip:yu});const wu=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function vu(i,t,e,s){const n=i.indexOf(t);if(n===-1)return wu(i,t,e,s);const o=i.lastIndexOf(t);return n!==o?e:n}const Iu=(i,t)=>i===null?null:X(Math.round(i),0,t);function Qo(i){const t=this.getLabels();return i>=0&&i<t.length?t[i]:i}class Ms extends Yt{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const s=this.getLabels();for(const{index:n,label:o}of e)s[n]===o&&s.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(j(t))return null;const s=this.getLabels();return e=isFinite(e)&&s[e]===t?e:vu(s,t,N(e,t),this._addedLabels),Iu(e,s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:s,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),e||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){const t=this.min,e=this.max,s=this.options.offset,n=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let a=t;a<=e;a++)n.push({value:a});return n}getLabelForValue(t){return Qo.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}}T(Ms,"id","category"),T(Ms,"defaults",{ticks:{callback:Qo}});function Au(i,t){const e=[],{bounds:n,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,g=h-1,{min:p,max:m}=t,x=!j(a),y=!j(r),A=!j(c),I=(m-p)/(d+1);let w=Js((m-p)/g/f)*f,D,z,k,L;if(w<1e-14&&!x&&!y)return[{value:p},{value:m}];L=Math.ceil(m/w)-Math.floor(p/w),L>g&&(w=Js(L*w/g/f)*f),j(l)||(D=Math.pow(10,l),w=Math.ceil(w*D)/D),n==="ticks"?(z=Math.floor(p/w)*w,k=Math.ceil(m/w)*w):(z=p,k=m),x&&y&&o&&xl((r-a)/o,w/1e3)?(L=Math.round(Math.min((r-a)/w,h)),w=(r-a)/L,z=a,k=r):A?(z=x?a:z,k=y?r:k,L=c-1,w=(k-z)/L):(L=(k-z)/w,Me(L,Math.round(L),w/1e3)?L=Math.round(L):L=Math.ceil(L));const C=Math.max(_s(w),_s(z));D=Math.pow(10,j(l)?C:l),z=Math.round(z*D)/D,k=Math.round(k*D)/D;let S=0;for(x&&(u&&z!==a?(e.push({value:a}),z<a&&S++,Me(Math.round((z+S*w)*D)/D,a,Jo(a,I,i))&&S++):z<a&&S++);S<L;++S){const P=Math.round((z+S*w)*D)/D;if(y&&P>r)break;e.push({value:P})}return y&&u&&k!==r?e.length&&Me(e[e.length-1].value,r,Jo(r,I,i))?e[e.length-1].value=r:e.push({value:r}):(!y||k===r)&&e.push({value:k}),e}function Jo(i,t,{horizontal:e,minRotation:s}){const n=lt(s),o=(e?Math.sin(n):Math.cos(n))||.001,a=.75*t*(""+i).length;return Math.min(t/o,a)}class Ti extends Yt{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 j(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const a=l=>n=e?n:l,r=l=>o=s?o:l;if(t){const l=ut(n),c=ut(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);r(o+l),t||a(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n={maxTicks:s,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=Au(n,o);return t.bounds==="ticks"&&qs(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,s=this.max;if(super.configure(),this.options.offset&&t.length){const n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return Ie(t,this.chart.options.locale,this.options.ticks.format)}}class ws extends Ti{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Z(t)?t:0,this.max=Z(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,s=lt(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}T(ws,"id","linear"),T(ws,"defaults",{ticks:{callback:$e.formatters.numeric}});const Be=i=>Math.floor(Nt(i)),Kt=(i,t)=>Math.pow(10,Be(i)+t);function qo(i){return i/Math.pow(10,Be(i))===1}function _o(i,t,e){const s=Math.pow(10,e),n=Math.floor(i/s);return Math.ceil(t/s)-n}function Tu(i,t){const e=t-i;let s=Be(e);for(;_o(i,t,s)>10;)s++;for(;_o(i,t,s)<10;)s--;return Math.min(s,Be(i))}function Du(i,{min:t,max:e}){t=st(i.min,t);const s=[],n=Be(t);let o=Tu(t,e),a=o<0?Math.pow(10,Math.abs(o)):1;const r=Math.pow(10,o),l=n>o?Math.pow(10,n):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=st(i.min,Math.round((l+h+d*Math.pow(10,o))*a)/a);for(;u<e;)s.push({value:u,major:qo(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=st(i.max,u);return s.push({value:f,major:qo(f),significand:d}),s}class vs extends Yt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const s=Ti.prototype.parse.apply(this,[t,e]);if(s===0){this._zero=!0;return}return Z(s)&&s>0?s:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Z(t)?Math.max(0,t):null,this.max=Z(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Z(this._userMin)&&(this.min=t===Kt(this.min,0)?Kt(this.min,-1):Kt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let s=this.min,n=this.max;const o=r=>s=t?s:r,a=r=>n=e?n:r;s===n&&(s<=0?(o(1),a(10)):(o(Kt(s,-1)),a(Kt(n,1)))),s<=0&&o(Kt(n,-1)),n<=0&&a(Kt(s,1)),this.min=s,this.max=n}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},s=Du(e,this);return t.bounds==="ticks"&&qs(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?"0":Ie(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Nt(t),this._valueRange=Nt(this.max)-Nt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Nt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}T(vs,"id","logarithmic"),T(vs,"defaults",{ticks:{callback:$e.formatters.logarithmic,major:{enabled:!0}}});function Is(i){const t=i.ticks;if(t.display&&i.display){const e=_(t.backdropPadding);return N(t.font&&t.font.size,F.font.size)+e.height}return 0}function zu(i,t,e){return e=R(e)?e:[e],{w:jl(i,t.string,e),h:e.length*t.lineHeight}}function $o(i,t,e,s,n){return i===s||i===n?{start:t-e/2,end:t+e/2}:i<s||i>n?{start:t-e,end:t}:{start:t,end:t+e}}function ku(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),s=[],n=[],o=i._pointLabels.length,a=i.options.pointLabels,r=a.centerPointLabels?W/o:0;for(let l=0;l<o;l++){const c=a.setContext(i.getPointLabelContext(l));n[l]=c.padding;const h=i.getPointPosition(l,i.drawingArea+n[l],r),d=K(c.font),u=zu(i.ctx,d,i._pointLabels[l]);s[l]=u;const f=nt(i.getIndexAngle(l)+r),g=Math.round(Gi(f)),p=$o(g,h.x,u.w,0,180),m=$o(g,h.y,u.h,90,270);Lu(e,t,f,p,m)}i.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),i._pointLabelItems=Su(i,s,n)}function Lu(i,t,e,s,n){const o=Math.abs(Math.sin(e)),a=Math.abs(Math.cos(e));let r=0,l=0;s.start<t.l?(r=(t.l-s.start)/o,i.l=Math.min(i.l,t.l-r)):s.end>t.r&&(r=(s.end-t.r)/o,i.r=Math.max(i.r,t.r+r)),n.start<t.t?(l=(t.t-n.start)/a,i.t=Math.min(i.t,t.t-l)):n.end>t.b&&(l=(n.end-t.b)/a,i.b=Math.max(i.b,t.b+l))}function Nu(i,t,e){const s=i.drawingArea,{extra:n,additionalAngle:o,padding:a,size:r}=e,l=i.getPointPosition(t,s+n+a,o),c=Math.round(Gi(nt(l.angle+U))),h=ju(l.y,r.h,c),d=Ou(c),u=Pu(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 Cu(i,t){if(!t)return!0;const{left:e,top:s,right:n,bottom:o}=i;return!(Mt({x:e,y:s},t)||Mt({x:e,y:o},t)||Mt({x:n,y:s},t)||Mt({x:n,y:o},t))}function Su(i,t,e){const s=[],n=i._pointLabels.length,o=i.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:Is(o)/2,additionalAngle:a?W/n:0};let c;for(let h=0;h<n;h++){l.padding=e[h],l.size=t[h];const d=Nu(i,h,l);s.push(d),r==="auto"&&(d.visible=Cu(d,c),d.visible&&(c=d))}return s}function Ou(i){return i===0||i===180?"center":i<180?"left":"right"}function Pu(i,t,e){return e==="right"?i-=t:e==="center"&&(i-=t/2),i}function ju(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:s,top:n,right:o,bottom:a}=e,{backdropColor:r}=t;if(!j(r)){const l=Wt(t.borderRadius),c=_(t.backdropPadding);i.fillStyle=r;const h=s-c.left,d=n-c.top,u=o-s+c.width,f=a-n+c.height;Object.values(l).some(g=>g!==0)?(i.beginPath(),Te(i,{x:h,y:d,w:u,h:f,radius:l}),i.fill()):i.fillRect(h,d,u,f)}}function Vu(i,t){const{ctx:e,options:{pointLabels:s}}=i;for(let n=t-1;n>=0;n--){const o=i._pointLabelItems[n];if(!o.visible)continue;const a=s.setContext(i.getPointLabelContext(n));Eu(e,a,o);const r=K(a.font),{x:l,y:c,textAlign:h}=o;Rt(e,i._pointLabels[n],l,c+r.lineHeight/2,r,{color:a.color,textAlign:h,textBaseline:"middle"})}}function ta(i,t,e,s){const{ctx:n}=i;if(e)n.arc(i.xCenter,i.yCenter,t,0,G);else{let o=i.getPointPosition(0,t);n.moveTo(o.x,o.y);for(let a=1;a<s;a++)o=i.getPointPosition(a,t),n.lineTo(o.x,o.y)}}function Bu(i,t,e,s,n){const o=i.ctx,a=t.circular,{color:r,lineWidth:l}=t;!a&&!s||!r||!l||e<0||(o.save(),o.strokeStyle=r,o.lineWidth=l,o.setLineDash(n.dash),o.lineDashOffset=n.dashOffset,o.beginPath(),ta(i,e,a,s),o.closePath(),o.stroke(),o.restore())}function Ru(i,t,e){return Ct(i,{label:e,index:t,type:"pointLabel"})}class Re extends Ti{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=_(Is(this.options)/2),e=this.width=this.maxWidth-t.width,s=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+s/2+t.top),this.drawingArea=Math.floor(Math.min(e,s)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=Z(t)&&!isNaN(t)?t:0,this.max=Z(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Is(this.options))}generateTickLabels(t){Ti.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,s)=>{const n=B(this.options.pointLabels.callback,[e,s],this);return n||n===0?n:""}).filter((e,s)=>this.chart.getDataVisibility(s))}fit(){const t=this.options;t.display&&t.pointLabels.display?ku(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,s,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,s,n))}getIndexAngle(t){const e=G/(this._pointLabels.length||1),s=this.options.startAngle||0;return nt(t*e+lt(s))}getDistanceFromCenterForValue(t){if(j(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(j(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 s=e[t];return Ru(this.getContext(),t,s)}}getPointPosition(t,e,s=0){const n=this.getIndexAngle(t)-U+s;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}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:s,right:n,bottom:o}=this._pointLabelItems[t];return{left:e,top:s,right:n,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const s=this.ctx;s.save(),s.beginPath(),ta(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),s.closePath(),s.fillStyle=t,s.fill(),s.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:s,grid:n,border:o}=e,a=this._pointLabels.length;let r,l,c;if(e.pointLabels.display&&Vu(this,a),n.display&&this.ticks.forEach((h,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(h.value);const u=this.getContext(d),f=n.setContext(u),g=o.setContext(u);Bu(this,f,l,a,g)}}),s.display){for(t.save(),r=a-1;r>=0;r--){const h=s.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,s=e.ticks;if(!s.display)return;const n=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&!e.reverse)return;const c=s.setContext(this.getContext(l)),h=K(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)}Rt(t,r.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}T(Re,"id","radialLinear"),T(Re,"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}}),T(Re,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),T(Re,"descriptors",{angleLines:{_fallback:"grid"}});const Di={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}},it=Object.keys(Di);function ea(i,t){return i-t}function ia(i,t){if(j(t))return null;const e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts;let a=t;return typeof s=="function"&&(a=s(a)),Z(a)||(a=typeof s=="string"?e.parse(a,s):e.parse(a)),a===null?null:(n&&(a=n==="week"&&(ie(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,n)),+a)}function sa(i,t,e,s){const n=it.length;for(let o=it.indexOf(i);o<n-1;++o){const a=Di[it[o]],r=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((e-t)/(r*a.size))<=s)return it[o]}return it[n-1]}function Wu(i,t,e,s,n){for(let o=it.length-1;o>=it.indexOf(e);o--){const a=it[o];if(Di[a].common&&i._adapter.diff(n,s,a)>=t-1)return a}return it[e?it.indexOf(e):0]}function Gu(i){for(let t=it.indexOf(i)+1,e=it.length;t<e;++t)if(Di[it[t]].common)return it[t]}function na(i,t,e){if(!e)i[t]=!0;else if(e.length){const{lo:s,hi:n}=Zi(e,t),o=e[s]>=t?e[s]:e[n];i[o]=!0}}function Hu(i,t,e,s){const n=i._adapter,o=+n.startOf(t[0].value,s),a=t[t.length-1].value;let r,l;for(r=o;r<=a;r=+n.add(r,1,s))l=e[r],l>=0&&(t[l].major=!0);return t}function oa(i,t,e){const s=[],n={},o=t.length;let a,r;for(a=0;a<o;++a)r=t[a],n[r]=a,s.push({value:r,major:!1});return o===0||!e?s:Hu(i,s,n,e)}class We extends Yt{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 s=t.time||(t.time={}),n=this._adapter=new qc._date(t.adapters.date);n.init(e),xe(s.displayFormats,n.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:ia(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,s=t.time.unit||"day";let{min:n,max:o,minDefined:a,maxDefined:r}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(n=Math.min(n,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))),n=Z(n)&&!isNaN(n)?n:+e.startOf(Date.now(),s),o=Z(o)&&!isNaN(o)?o:+e.endOf(Date.now(),s)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],s=t[t.length-1]),{min:e,max:s}}buildTicks(){const t=this.options,e=t.time,s=t.ticks,n=s.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const o=this.min,a=this.max,r=vl(n,o,a);return this._unit=e.unit||(s.autoSkip?sa(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):Wu(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:Gu(this._unit),this.initOffsets(n),t.reverse&&r.reverse(),oa(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=X(e,0,a),s=X(s,0,a),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){const t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,a=o.unit||sa(o.minUnit,e,s,this._getLabelCapacity(e)),r=N(n.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=ie(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(s,e,a)>1e5*r)throw new Error(e+" and "+s+" are too far apart with stepSize of "+r+" "+a);const g=n.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;u<s;u=+t.add(u,r,a),f++)na(h,u,g);return(u===s||n.bounds==="ticks"||f===1)&&na(h,u,g),Object.keys(h).sort(ea).map(p=>+p)}getLabelForValue(t){const e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,o=this._unit,a=e||n[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,s,n){const o=this.options,a=o.ticks.callback;if(a)return B(a,[t,e,s],this);const r=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&r[l],d=c&&r[c],u=s[e],f=c&&d&&u&&u.major;return this._adapter.format(t,n||(f?d:h))}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e<s;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+s)*e.factor)}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,s=this.ctx.measureText(t).width,n=lt(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(n),a=Math.sin(n),r=this._resolveTickFontOptions(0).size;return{w:s*o+r*a,h:s*a+r*o}}_getLabelCapacity(t){const e=this.options.time,s=e.displayFormats,n=s[e.unit]||s.millisecond,o=this._tickFormatFunction(t,0,oa(this,[t],this._majorUnit),n),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,s;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e<s;++e)t=t.concat(n[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,s;if(t.length)return t;const n=this.getLabels();for(e=0,s=n.length;e<s;++e)t.push(ia(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return sn(t.sort(ea))}}T(We,"id","time"),T(We,"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 zi(i,t,e){let s=0,n=i.length-1,o,a,r,l;e?(t>=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=yt(i,"pos",t)),{pos:o,time:r}=i[s],{pos:a,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=yt(i,"time",t)),{time:o,pos:r}=i[s],{time:a,pos:l}=i[n]);const c=a-o;return c?r+(l-r)*(t-o)/c:r}class As extends We{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=zi(e,this.min),this._tableRange=zi(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:s}=this,n=[],o=[];let a,r,l,c,h;for(a=0,r=t.length;a<r;++a)c=t[a],c>=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(a=0,r=n.length;a<r;++a)h=n[a+1],l=n[a-1],c=n[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 s=super.getDataTimestamps();return(!s.includes(t)||!s.length)&&s.splice(0,0,t),(!s.includes(e)||s.length===1)&&s.push(e),s.sort((n,o)=>n-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),s=this.getLabelTimestamps();return e.length&&s.length?t=this.normalize(e.concat(s)):t=e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(zi(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return zi(this._table,s*this._tableRange+this._minPos,!0)}}T(As,"id","timeseries"),T(As,"defaults",We.defaults);var Zu=Object.freeze({__proto__:null,CategoryScale:Ms,LinearScale:ws,LogarithmicScale:vs,RadialLinearScale:Re,TimeScale:We,TimeSeriesScale:As});const Fu=[Jc,Dd,Mu,Zu];vt.register(...Fu);var Uu=Object.defineProperty,Yu=Object.getOwnPropertyDescriptor,Pt=(i,t,e,s)=>{for(var n=s>1?void 0:s?Yu(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Uu(t,e,n),n};M.GenusChart=class extends b.LitElement{constructor(){super(...arguments),this.chartTitle="",this.chartType="",this.chartLabels=[],this.chartDataSets=[],this.chartOptions={},this._createChart=()=>{this._chart=new vt(this._chartCanvas,{type:this.chartType,data:{labels:[...this.chartLabels],datasets:[...this.chartDataSets]},options:{...this.chartOptions}})}}firstUpdated(){this._createChart()}updated(){this._chart.data.datasets=[...this.chartDataSets],this._chart.update()}render(){return b.html`
1270
1261
  <div class='chart'>
1271
1262
  <div class='chart__head'>
1272
1263
  <h4 class='chart__title'>${this.chartTitle}</h4>
@@ -1276,7 +1267,7 @@
1276
1267
  <canvas id='chart-canvas'></canvas>
1277
1268
  </div>
1278
1269
  </div>
1279
- `}},v.GenusChart.styles=[Er,Vr,Br],Kt([w.property({attribute:"chart-title"})],v.GenusChart.prototype,"chartTitle",2),Kt([w.property({attribute:"chart-type"})],v.GenusChart.prototype,"chartType",2),Kt([w.property({attribute:"chart-labels",type:Array})],v.GenusChart.prototype,"chartLabels",2),Kt([w.property({attribute:"chart-datasets",type:Array})],v.GenusChart.prototype,"chartDataSets",2),Kt([w.query("#chart-canvas")],v.GenusChart.prototype,"_chartCanvas",2),Kt([w.state()],v.GenusChart.prototype,"_chart",2),v.GenusChart=Kt([w.customElement("genus-chart")],v.GenusChart);const oa=b.css`
1270
+ `}},M.GenusChart.styles=[Vr,Br,Rr],Pt([v.property({attribute:"chart-title"})],M.GenusChart.prototype,"chartTitle",2),Pt([v.property({attribute:"chart-type"})],M.GenusChart.prototype,"chartType",2),Pt([v.property({attribute:"chart-labels",type:Array})],M.GenusChart.prototype,"chartLabels",2),Pt([v.property({attribute:"chart-datasets",type:Array})],M.GenusChart.prototype,"chartDataSets",2),Pt([v.property({attribute:"chart-options",type:Object})],M.GenusChart.prototype,"chartOptions",2),Pt([v.query("#chart-canvas")],M.GenusChart.prototype,"_chartCanvas",2),Pt([v.state()],M.GenusChart.prototype,"_chart",2),M.GenusChart=Pt([v.customElement("genus-chart")],M.GenusChart);const aa=b.css`
1280
1271
  .table
1281
1272
  {
1282
1273
  display: table;
@@ -1328,7 +1319,7 @@
1328
1319
  height: 0;
1329
1320
  background: none;
1330
1321
  }
1331
- `,Yu=b.css`
1322
+ `,Ku=b.css`
1332
1323
  *
1333
1324
  {
1334
1325
  margin: 0;
@@ -1359,7 +1350,7 @@
1359
1350
  justify-content: space-between;
1360
1351
  align-items: center;
1361
1352
  }
1362
- `,aa=b.css`
1353
+ `,ra=b.css`
1363
1354
  .table__title
1364
1355
  {
1365
1356
  font-family: var(--table-title-font-family, 'Sofia Pro Semi');
@@ -1380,7 +1371,7 @@
1380
1371
  font-size: var(--tr-font-size, 0.85rem);
1381
1372
  color: var(--tr-font-color, #5e5e5f);
1382
1373
  }
1383
- `;var Ku=Object.defineProperty,Qu=Object.getOwnPropertyDescriptor,zi=(i,t,e,s)=>{for(var n=s>1?void 0:s?Qu(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Ku(t,e,n),n};let Qt=class extends b.LitElement{constructor(){super(...arguments),this.tableHeaders=[],this.tableTitle="",this.readonly=!1,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}}render(){return b.html`
1374
+ `;var Qu=Object.defineProperty,Ju=Object.getOwnPropertyDescriptor,ki=(i,t,e,s)=>{for(var n=s>1?void 0:s?Ju(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Qu(t,e,n),n};let Xt=class extends b.LitElement{constructor(){super(...arguments),this.tableHeaders=[],this.tableTitle="",this.readonly=!1,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}}render(){return b.html`
1384
1375
  <div class='card'>
1385
1376
  <div class='card__head'>
1386
1377
  <h4 class='table__title'>${this.tableTitle}</h4>
@@ -1397,12 +1388,12 @@
1397
1388
  </div>
1398
1389
  </div>
1399
1390
  </div>
1400
- `}};Qt.styles=[Yu,oa,Xu,aa],zi([w.property({attribute:"table-headers",type:Array})],Qt.prototype,"tableHeaders",2),zi([w.property({attribute:"table-title"})],Qt.prototype,"tableTitle",2),zi([w.property({attribute:"readonly",type:Boolean})],Qt.prototype,"readonly",2),Qt=zi([w.customElement("genus-table")],Qt);var Ju=Object.defineProperty,qu=Object.getOwnPropertyDescriptor,ki=(i,t,e,s)=>{for(var n=s>1?void 0:s?qu(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Ju(t,e,n),n};let Jt=class extends b.LitElement{constructor(){super(...arguments),this.dataObject={},this.readonly=!1,this.isLastRow=!1,this._containsHTML=i=>/<[a-z][\s\S]*>/i.test(i),this.generateDataColumns=()=>{let i=[],t=1;for(let e of Object.values(this.dataObject))this._containsHTML(e)?(i.push(b.html`<div class='td'><slot name='htmlContent-${t}'></slot></td>`),t++):i.push(b.html`<div class='td'>${e}</div>`);return t>1&&(t=1),i}}render(){return b.html`
1391
+ `}};Xt.styles=[Ku,aa,Xu,ra],ki([v.property({attribute:"table-headers",type:Array})],Xt.prototype,"tableHeaders",2),ki([v.property({attribute:"table-title"})],Xt.prototype,"tableTitle",2),ki([v.property({attribute:"readonly",type:Boolean})],Xt.prototype,"readonly",2),Xt=ki([v.customElement("genus-table")],Xt);var qu=Object.defineProperty,_u=Object.getOwnPropertyDescriptor,Li=(i,t,e,s)=>{for(var n=s>1?void 0:s?_u(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&qu(t,e,n),n};let Qt=class extends b.LitElement{constructor(){super(...arguments),this.dataObject={},this.readonly=!1,this.isLastRow=!1,this._containsHTML=i=>/<[a-z][\s\S]*>/i.test(i),this.generateDataColumns=()=>{let i=[],t=1;for(let e of Object.values(this.dataObject))this._containsHTML(e)?(i.push(b.html`<div class='td'><slot name='htmlContent-${t}'></slot></td>`),t++):i.push(b.html`<div class='td'>${e}</div>`);return t>1&&(t=1),i}}render(){return b.html`
1401
1392
  <div class=${this.isLastRow?"tr tr--last":"tr"}>
1402
1393
  ${this.generateDataColumns()}
1403
1394
  ${this.readonly?b.html``:b.html`<div class="td"><slot></slot></div>`}
1404
1395
  </div>
1405
- `}};Jt.styles=[oa,aa],ki([w.property({attribute:"data-object",type:Object})],Jt.prototype,"dataObject",2),ki([w.property({attribute:"readonly",type:Boolean})],Jt.prototype,"readonly",2),ki([w.property({attribute:"last-row",type:Boolean})],Jt.prototype,"isLastRow",2),Jt=ki([w.customElement("genus-table-row")],Jt);const _u=Object.freeze(Object.defineProperty({__proto__:null,get GenusTable(){return Qt},get GenusTableRow(){return Jt}},Symbol.toStringTag,{value:"Module"})),$u=b.css`
1396
+ `}};Qt.styles=[aa,ra],Li([v.property({attribute:"data-object",type:Object})],Qt.prototype,"dataObject",2),Li([v.property({attribute:"readonly",type:Boolean})],Qt.prototype,"readonly",2),Li([v.property({attribute:"last-row",type:Boolean})],Qt.prototype,"isLastRow",2),Qt=Li([v.customElement("genus-table-row")],Qt);const $u=Object.freeze(Object.defineProperty({__proto__:null,get GenusTable(){return Xt},get GenusTableRow(){return Qt}},Symbol.toStringTag,{value:"Module"})),tf=b.css`
1406
1397
  .toast
1407
1398
  {
1408
1399
  position: absolute;
@@ -1447,7 +1438,7 @@
1447
1438
  opacity: 1;
1448
1439
  }
1449
1440
  }
1450
- `,tf=b.css`
1441
+ `,ef=b.css`
1451
1442
  .toast__message
1452
1443
  {
1453
1444
  margin: 0;
@@ -1459,9 +1450,9 @@
1459
1450
  .toast--error .toast__message { color: #981f10; }
1460
1451
 
1461
1452
  .toast--success .toast__message { color: #0f753e; }
1462
- `,ef=b.css`
1463
- .genus-icon { pointer-events: none; }
1464
1453
  `,sf=b.css`
1454
+ .genus-icon { pointer-events: none; }
1455
+ `,nf=b.css`
1465
1456
  .toast
1466
1457
  {
1467
1458
  display: grid;
@@ -1469,19 +1460,19 @@
1469
1460
  grid-column-gap: 1rem;
1470
1461
  align-items: center;
1471
1462
  }
1472
- `,nf=b.css`
1463
+ `,of=b.css`
1473
1464
  .close-btn
1474
1465
  {
1475
1466
  display: block;
1476
1467
  width: 1.25rem;
1477
1468
  height: 1.25rem;
1478
1469
  }
1479
- `,of="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+SWNvbmx5L0JvbGQvQ2xvc2UgU3F1YXJlPC90aXRsZT4KICAgIDxnIGlkPSJJY29ubHkvQm9sZC9DbG9zZS1TcXVhcmUiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJDbG9zZS1TcXVhcmUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEuOTk5ODAwLCAxLjk5OTIwMCkiIGZpbGw9IiNmZTMzMWEiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNC4zNCwyLjg0MjE3MDk0ZS0xNCBDMTcuNzMsMi44NDIxNzA5NGUtMTQgMjAsMi4zOCAyMCw1LjkyIEwyMCw1LjkyIEwyMCwxNC4wOTEgQzIwLDE3LjYyMSAxNy43MywyMCAxNC4zNCwyMCBMMTQuMzQsMjAgTDUuNjcsMjAgQzIuMjgsMjAgMCwxNy42MjEgMCwxNC4wOTEgTDAsMTQuMDkxIEwwLDUuOTIgQzAsMi4zOCAyLjI4LDIuODQyMTcwOTRlLTE0IDUuNjcsMi44NDIxNzA5NGUtMTQgTDUuNjcsMi44NDIxNzA5NGUtMTQgWiBNMTMuMDEsNi45NzEgQzEyLjY3LDYuNjMgMTIuMTIsNi42MyAxMS43Nyw2Ljk3MSBMMTEuNzcsNi45NzEgTDEwLDguNzUgTDguMjIsNi45NzEgQzcuODcsNi42MyA3LjMyLDYuNjMgNi45OCw2Ljk3MSBDNi42NCw3LjMxMSA2LjY0LDcuODcxIDYuOTgsOC4yMSBMNi45OCw4LjIxIEw4Ljc2LDkuOTkxIEw2Ljk4LDExLjc2MSBDNi42NCwxMi4xMTEgNi42NCwxMi42NjEgNi45OCwxMyBDNy4xNSwxMy4xNyA3LjM4LDEzLjI2MSA3LjYsMTMuMjYxIEM3LjgzLDEzLjI2MSA4LjA1LDEzLjE3IDguMjIsMTMgTDguMjIsMTMgTDEwLDExLjIzMSBMMTEuNzgsMTMgQzExLjk1LDEzLjE4MSAxMi4xNywxMy4yNjEgMTIuMzksMTMuMjYxIEMxMi42MiwxMy4yNjEgMTIuODQsMTMuMTcgMTMuMDEsMTMgQzEzLjM1LDEyLjY2MSAxMy4zNSwxMi4xMTEgMTMuMDEsMTEuNzcxIEwxMy4wMSwxMS43NzEgTDExLjIzLDkuOTkxIEwxMy4wMSw4LjIxIEMxMy4zNSw3Ljg3MSAxMy4zNSw3LjMxMSAxMy4wMSw2Ljk3MSBaIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=",af="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+SWNvbmx5L0JvbGQvQ2xvc2UgU3F1YXJlPC90aXRsZT4KICAgIDxnIGlkPSJJY29ubHkvQm9sZC9DbG9zZS1TcXVhcmUiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJDbG9zZS1TcXVhcmUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEuOTk5ODAwLCAxLjk5OTIwMCkiIGZpbGw9IiMxOWMzNjgiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNC4zNCwyLjg0MjE3MDk0ZS0xNCBDMTcuNzMsMi44NDIxNzA5NGUtMTQgMjAsMi4zOCAyMCw1LjkyIEwyMCw1LjkyIEwyMCwxNC4wOTEgQzIwLDE3LjYyMSAxNy43MywyMCAxNC4zNCwyMCBMMTQuMzQsMjAgTDUuNjcsMjAgQzIuMjgsMjAgMCwxNy42MjEgMCwxNC4wOTEgTDAsMTQuMDkxIEwwLDUuOTIgQzAsMi4zOCAyLjI4LDIuODQyMTcwOTRlLTE0IDUuNjcsMi44NDIxNzA5NGUtMTQgTDUuNjcsMi44NDIxNzA5NGUtMTQgWiBNMTMuMDEsNi45NzEgQzEyLjY3LDYuNjMgMTIuMTIsNi42MyAxMS43Nyw2Ljk3MSBMMTEuNzcsNi45NzEgTDEwLDguNzUgTDguMjIsNi45NzEgQzcuODcsNi42MyA3LjMyLDYuNjMgNi45OCw2Ljk3MSBDNi42NCw3LjMxMSA2LjY0LDcuODcxIDYuOTgsOC4yMSBMNi45OCw4LjIxIEw4Ljc2LDkuOTkxIEw2Ljk4LDExLjc2MSBDNi42NCwxMi4xMTEgNi42NCwxMi42NjEgNi45OCwxMyBDNy4xNSwxMy4xNyA3LjM4LDEzLjI2MSA3LjYsMTMuMjYxIEM3LjgzLDEzLjI2MSA4LjA1LDEzLjE3IDguMjIsMTMgTDguMjIsMTMgTDEwLDExLjIzMSBMMTEuNzgsMTMgQzExLjk1LDEzLjE4MSAxMi4xNywxMy4yNjEgMTIuMzksMTMuMjYxIEMxMi42MiwxMy4yNjEgMTIuODQsMTMuMTcgMTMuMDEsMTMgQzEzLjM1LDEyLjY2MSAxMy4zNSwxMi4xMTEgMTMuMDEsMTEuNzcxIEwxMy4wMSwxMS43NzEgTDExLjIzLDkuOTkxIEwxMy4wMSw4LjIxIEMxMy4zNSw3Ljg3MSAxMy4zNSw3LjMxMSAxMy4wMSw2Ljk3MSBaIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=";var rf=Object.defineProperty,lf=Object.getOwnPropertyDescriptor,Li=(i,t,e,s)=>{for(var n=s>1?void 0:s?lf(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&rf(t,e,n),n};v.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`
1470
+ `,af="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+SWNvbmx5L0JvbGQvQ2xvc2UgU3F1YXJlPC90aXRsZT4KICAgIDxnIGlkPSJJY29ubHkvQm9sZC9DbG9zZS1TcXVhcmUiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJDbG9zZS1TcXVhcmUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEuOTk5ODAwLCAxLjk5OTIwMCkiIGZpbGw9IiNmZTMzMWEiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNC4zNCwyLjg0MjE3MDk0ZS0xNCBDMTcuNzMsMi44NDIxNzA5NGUtMTQgMjAsMi4zOCAyMCw1LjkyIEwyMCw1LjkyIEwyMCwxNC4wOTEgQzIwLDE3LjYyMSAxNy43MywyMCAxNC4zNCwyMCBMMTQuMzQsMjAgTDUuNjcsMjAgQzIuMjgsMjAgMCwxNy42MjEgMCwxNC4wOTEgTDAsMTQuMDkxIEwwLDUuOTIgQzAsMi4zOCAyLjI4LDIuODQyMTcwOTRlLTE0IDUuNjcsMi44NDIxNzA5NGUtMTQgTDUuNjcsMi44NDIxNzA5NGUtMTQgWiBNMTMuMDEsNi45NzEgQzEyLjY3LDYuNjMgMTIuMTIsNi42MyAxMS43Nyw2Ljk3MSBMMTEuNzcsNi45NzEgTDEwLDguNzUgTDguMjIsNi45NzEgQzcuODcsNi42MyA3LjMyLDYuNjMgNi45OCw2Ljk3MSBDNi42NCw3LjMxMSA2LjY0LDcuODcxIDYuOTgsOC4yMSBMNi45OCw4LjIxIEw4Ljc2LDkuOTkxIEw2Ljk4LDExLjc2MSBDNi42NCwxMi4xMTEgNi42NCwxMi42NjEgNi45OCwxMyBDNy4xNSwxMy4xNyA3LjM4LDEzLjI2MSA3LjYsMTMuMjYxIEM3LjgzLDEzLjI2MSA4LjA1LDEzLjE3IDguMjIsMTMgTDguMjIsMTMgTDEwLDExLjIzMSBMMTEuNzgsMTMgQzExLjk1LDEzLjE4MSAxMi4xNywxMy4yNjEgMTIuMzksMTMuMjYxIEMxMi42MiwxMy4yNjEgMTIuODQsMTMuMTcgMTMuMDEsMTMgQzEzLjM1LDEyLjY2MSAxMy4zNSwxMi4xMTEgMTMuMDEsMTEuNzcxIEwxMy4wMSwxMS43NzEgTDExLjIzLDkuOTkxIEwxMy4wMSw4LjIxIEMxMy4zNSw3Ljg3MSAxMy4zNSw3LjMxMSAxMy4wMSw2Ljk3MSBaIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=",rf="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+SWNvbmx5L0JvbGQvQ2xvc2UgU3F1YXJlPC90aXRsZT4KICAgIDxnIGlkPSJJY29ubHkvQm9sZC9DbG9zZS1TcXVhcmUiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJDbG9zZS1TcXVhcmUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEuOTk5ODAwLCAxLjk5OTIwMCkiIGZpbGw9IiMxOWMzNjgiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNC4zNCwyLjg0MjE3MDk0ZS0xNCBDMTcuNzMsMi44NDIxNzA5NGUtMTQgMjAsMi4zOCAyMCw1LjkyIEwyMCw1LjkyIEwyMCwxNC4wOTEgQzIwLDE3LjYyMSAxNy43MywyMCAxNC4zNCwyMCBMMTQuMzQsMjAgTDUuNjcsMjAgQzIuMjgsMjAgMCwxNy42MjEgMCwxNC4wOTEgTDAsMTQuMDkxIEwwLDUuOTIgQzAsMi4zOCAyLjI4LDIuODQyMTcwOTRlLTE0IDUuNjcsMi44NDIxNzA5NGUtMTQgTDUuNjcsMi44NDIxNzA5NGUtMTQgWiBNMTMuMDEsNi45NzEgQzEyLjY3LDYuNjMgMTIuMTIsNi42MyAxMS43Nyw2Ljk3MSBMMTEuNzcsNi45NzEgTDEwLDguNzUgTDguMjIsNi45NzEgQzcuODcsNi42MyA3LjMyLDYuNjMgNi45OCw2Ljk3MSBDNi42NCw3LjMxMSA2LjY0LDcuODcxIDYuOTgsOC4yMSBMNi45OCw4LjIxIEw4Ljc2LDkuOTkxIEw2Ljk4LDExLjc2MSBDNi42NCwxMi4xMTEgNi42NCwxMi42NjEgNi45OCwxMyBDNy4xNSwxMy4xNyA3LjM4LDEzLjI2MSA3LjYsMTMuMjYxIEM3LjgzLDEzLjI2MSA4LjA1LDEzLjE3IDguMjIsMTMgTDguMjIsMTMgTDEwLDExLjIzMSBMMTEuNzgsMTMgQzExLjk1LDEzLjE4MSAxMi4xNywxMy4yNjEgMTIuMzksMTMuMjYxIEMxMi42MiwxMy4yNjEgMTIuODQsMTMuMTcgMTMuMDEsMTMgQzEzLjM1LDEyLjY2MSAxMy4zNSwxMi4xMTEgMTMuMDEsMTEuNzcxIEwxMy4wMSwxMS43NzEgTDExLjIzLDkuOTkxIEwxMy4wMSw4LjIxIEMxMy4zNSw3Ljg3MSAxMy4zNSw3LjMxMSAxMy4wMSw2Ljk3MSBaIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=";var lf=Object.defineProperty,cf=Object.getOwnPropertyDescriptor,Ni=(i,t,e,s)=>{for(var n=s>1?void 0:s?cf(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&lf(t,e,n),n};M.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`
1480
1471
  <div class='toast toast--${this.toastType} ${this.showToast?"toast--show-toast":""}'>
1481
1472
  <p class='toast__message'>${this.toastMessage}</p>
1482
- ${this.toastType==="success"?b.html`<span class='close-btn' @click=${this.setToastVisibility}><object class="genus-icon" data='${af}' width='20' height='20'></object></span>`:b.html`<span class='close-btn' @click=${this.setToastVisibility}><object class="genus-icon" data='${of}' width='20' height='20'></object></span>`}
1473
+ ${this.toastType==="success"?b.html`<span class='close-btn' @click=${this.setToastVisibility}><object class="genus-icon" data='${rf}' width='20' height='20'></object></span>`:b.html`<span class='close-btn' @click=${this.setToastVisibility}><object class="genus-icon" data='${af}' width='20' height='20'></object></span>`}
1483
1474
  </div>
1484
- `}},v.GenusToastMessage.styles=[$u,tf,sf,ef,nf],Li([w.property({attribute:"toast-message"})],v.GenusToastMessage.prototype,"toastMessage",2),Li([w.property({attribute:"toast-type"})],v.GenusToastMessage.prototype,"toastType",2),Li([w.property({type:Boolean,attribute:"show-toast"})],v.GenusToastMessage.prototype,"showToast",2),v.GenusToastMessage=Li([w.customElement("genus-toast-message")],v.GenusToastMessage);const cf=b.css`
1475
+ `}},M.GenusToastMessage.styles=[tf,ef,nf,sf,of],Ni([v.property({attribute:"toast-message"})],M.GenusToastMessage.prototype,"toastMessage",2),Ni([v.property({attribute:"toast-type"})],M.GenusToastMessage.prototype,"toastType",2),Ni([v.property({type:Boolean,attribute:"show-toast"})],M.GenusToastMessage.prototype,"showToast",2),M.GenusToastMessage=Ni([v.customElement("genus-toast-message")],M.GenusToastMessage);const hf=b.css`
1485
1476
  *
1486
1477
  {
1487
1478
  margin: 0;
@@ -1500,18 +1491,28 @@
1500
1491
  .icon-container
1501
1492
  {
1502
1493
  background: var(--icon-container-background-color, #f2f7f9);
1503
- width: 3.125rem;
1504
- height: 3.125rem;
1494
+ width: 2.5rem;
1495
+ height: 2.5rem;
1505
1496
  border-radius: 0.625rem;
1497
+ align-self: center;
1506
1498
  grid-area: ic;
1507
1499
  }
1508
- `,hf=b.css`
1500
+
1501
+ ::slotted(*)
1502
+ {
1503
+ align-self: center;
1504
+ grid-area: a;
1505
+ }
1506
+ `,df=b.css`
1509
1507
  .data-header
1510
1508
  {
1511
1509
  font-family: var(--data-header-font-family, 'Sofia Pro Semi');
1512
1510
  font-size: var(--data-header-font-size, 1rem);
1513
1511
  color: var(--data-header-color, #213e70);
1514
- align-self: end;
1512
+ width: 12.5rem;
1513
+ white-space: nowrap;
1514
+ overflow: hidden;
1515
+ text-overflow: ellipsis;
1515
1516
  grid-area: dh;
1516
1517
  }
1517
1518
 
@@ -1522,14 +1523,6 @@
1522
1523
  color: var(--data-text-color, #ccc);
1523
1524
  grid-area: dtxt;
1524
1525
  }
1525
- `,df=b.css`
1526
- .illustration-icon
1527
- {
1528
- align-self: center;
1529
- grid-area: ill;
1530
- width: var(--illustration-icon-width, 1.25rem);
1531
- height: var(--illustration-icon-height, 1.25rem);
1532
- }
1533
1526
  `,uf=b.css`
1534
1527
  .data-list-item
1535
1528
  {
@@ -1537,8 +1530,8 @@
1537
1530
  grid-template-columns: max-content 1fr max-content;
1538
1531
  grid-template-rows: repeat(2, max-content);
1539
1532
  grid-template-areas:
1540
- "ic dh ill"
1541
- "ic dtxt ill";
1533
+ "ic dh a"
1534
+ "ic dtxt a";
1542
1535
 
1543
1536
  grid-column-gap: 1rem;
1544
1537
  grid-row-gap: 0.25rem;
@@ -1548,11 +1541,11 @@
1548
1541
  {
1549
1542
  grid-template-columns: 1fr max-content;
1550
1543
  grid-template-areas:
1551
- "dh ill"
1552
- "dtxt ill";
1544
+ "dh a"
1545
+ "dtxt a";
1553
1546
  }
1554
1547
 
1555
- .data-list-item--no-illustration
1548
+ .data-list-item--no-action
1556
1549
  {
1557
1550
  grid-template-columns: max-content 1fr;
1558
1551
  grid-template-areas:
@@ -1560,7 +1553,7 @@
1560
1553
  "ic dtxt";
1561
1554
  }
1562
1555
 
1563
- .data-list-item--no-icon-illustration
1556
+ .data-list-item--no-icon-action
1564
1557
  {
1565
1558
  grid-template-columns: 1fr;
1566
1559
  grid-template-areas:
@@ -1574,33 +1567,83 @@
1574
1567
  justify-content: center;
1575
1568
  align-items: center;
1576
1569
  }
1577
- `;var gf=Object.defineProperty,pf=Object.getOwnPropertyDescriptor,Pt=(i,t,e,s)=>{for(var n=s>1?void 0:s?pf(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&gf(t,e,n),n};v.GenusDataListItem=class extends b.LitElement{constructor(){super(...arguments),this.dataHeader="",this.dataText="",this.datCardIconSrc="",this.illustrationIconSrc="",this.withoutIcon=!1,this.withoutIllustration=!1,this.withoutIconandIllustration=!1,this.renderDataItem=()=>{let t;return this.withoutIcon?t=b.html`
1570
+ `;var gf=Object.defineProperty,pf=Object.getOwnPropertyDescriptor,Jt=(i,t,e,s)=>{for(var n=s>1?void 0:s?pf(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&gf(t,e,n),n};M.GenusDataListItem=class extends b.LitElement{constructor(){super(...arguments),this.dataHeader="",this.dataText="",this.dataCardIconSrc="",this.withoutIcon=!1,this.withoutAction=!1,this.withoutIconandAction=!1,this.renderDataItem=()=>{let t;return this.withoutIcon?t=b.html`
1578
1571
  <div class='data-list-item data-list-item--no-icon'>
1579
1572
  <h6 class='data-header'>${this.dataHeader}</h4>
1580
1573
  <p class='data-text'>${this.dataText}</p>
1581
1574
 
1582
- <object data=${this.illustrationIconSrc} class='illustration-icon' width='25' height='25'></object>
1583
- </div>`:this.withoutIllustration?t=b.html`
1584
- <div class='data-list-item data-list-item--no-illustration'>
1575
+ <slot></slot>
1576
+ </div>`:this.withoutAction?t=b.html`
1577
+ <div class='data-list-item data-list-item--no-action'>
1585
1578
  <div class='icon-container'>
1586
- <object data=${this.datCardIconSrc} width='25' height='25'></object>
1579
+ <object data=${this.dataCardIconSrc} width='25' height='25'></object>
1587
1580
  </div>
1588
1581
  <h6 class='data-header'>${this.dataHeader}</h4>
1589
1582
  <p class='data-text'>${this.dataText}</p>
1590
- </div>`:this.withoutIconandIllustration?t=b.html`
1591
- <div class='data-list-item data-list-item--no-icon-illustration'>
1583
+ </div>`:this.withoutIconandAction?t=b.html`
1584
+ <div class='data-list-item data-list-item--no-icon-action'>
1592
1585
  <h6 class='data-header'>${this.dataHeader}</h4>
1593
1586
  <p class='data-text'>${this.dataText}</p>
1594
1587
  </div>`:t=b.html`
1595
1588
  <div class='data-list-item'>
1596
1589
  <div class='icon-container'>
1597
- <object data=${this.datCardIconSrc} width='25' height='25'></object>
1590
+ <object data=${this.dataCardIconSrc} width='25' height='25'></object>
1598
1591
  </div>
1599
1592
  <h6 class='data-header'>${this.dataHeader}</h4>
1600
1593
  <p class='data-text'>${this.dataText}</p>
1601
1594
 
1602
- <object data=${this.illustrationIconSrc} class='illustration-icon' width='25' height='25'></object>
1603
- </div>`,t}}render(){return this.renderDataItem()}},v.GenusDataListItem.styles=[cf,hf,df,uf,ff],Pt([w.property({attribute:"data-header"})],v.GenusDataListItem.prototype,"dataHeader",2),Pt([w.property({attribute:"data-text"})],v.GenusDataListItem.prototype,"dataText",2),Pt([w.property({attribute:"svg-icon-src"})],v.GenusDataListItem.prototype,"datCardIconSrc",2),Pt([w.property({attribute:"illustration-icon-src"})],v.GenusDataListItem.prototype,"illustrationIconSrc",2),Pt([w.property({type:Boolean,attribute:"without-icon"})],v.GenusDataListItem.prototype,"withoutIcon",2),Pt([w.property({type:Boolean,attribute:"without-illustration"})],v.GenusDataListItem.prototype,"withoutIllustration",2),Pt([w.property({type:Boolean,attribute:"without-icon-illustration"})],v.GenusDataListItem.prototype,"withoutIconandIllustration",2),v.GenusDataListItem=Pt([w.customElement("genus-data-list-item")],v.GenusDataListItem),(()=>{let i=`
1595
+ <slot></slot>
1596
+ </div>`,t}}render(){return this.renderDataItem()}},M.GenusDataListItem.styles=[hf,df,uf,ff],Jt([v.property({attribute:"data-header"})],M.GenusDataListItem.prototype,"dataHeader",2),Jt([v.property({attribute:"data-text"})],M.GenusDataListItem.prototype,"dataText",2),Jt([v.property({attribute:"svg-icon-src"})],M.GenusDataListItem.prototype,"dataCardIconSrc",2),Jt([v.property({type:Boolean,attribute:"without-icon"})],M.GenusDataListItem.prototype,"withoutIcon",2),Jt([v.property({type:Boolean,attribute:"without-action"})],M.GenusDataListItem.prototype,"withoutAction",2),Jt([v.property({type:Boolean,attribute:"without-icon-action"})],M.GenusDataListItem.prototype,"withoutIconandAction",2),M.GenusDataListItem=Jt([v.customElement("genus-data-list-item")],M.GenusDataListItem);const mf=b.css`
1597
+ .upload-label
1598
+ {
1599
+ display: flex;
1600
+ justify-content: center;
1601
+ align-items: center;
1602
+ column-gap: 1rem;
1603
+ }
1604
+
1605
+ .upload-label--without-button-text, .upload-label--without-icon { column-gap: unset; }
1606
+ `,bf=b.css`
1607
+ .button-text
1608
+ {
1609
+ font-family: var(--button-text-font-family, 'Sofia Pro Regular');
1610
+ font-size: var(--button-text-font-size, 1rem);
1611
+ color: var(--button-text-color, #203e70);
1612
+ }
1613
+ `,xf=b.css`
1614
+ .button-icon
1615
+ {
1616
+ width: var(--icon-width, 1.25rem);
1617
+ height: var(--icon-height, 1.25rem);
1618
+ }
1619
+ `,yf=b.css`
1620
+ .upload-label
1621
+ {
1622
+ padding: var(--upload-button-padding, 1rem);
1623
+ background: var(--upload-button-background-color, #f2f7f9);
1624
+ border-radius: var(--upload-button-radius, 0.375rem);
1625
+ }
1626
+
1627
+ .upload-label:hover { cursor: pointer; }
1628
+ `,Mf=b.css`
1629
+ input[type='file'] { display: none; }
1630
+ `;var wf=Object.defineProperty,vf=Object.getOwnPropertyDescriptor,qt=(i,t,e,s)=>{for(var n=s>1?void 0:s?vf(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&wf(t,e,n),n};M.GenusFileUpload=class extends b.LitElement{constructor(){super(...arguments),this.buttonText="",this.svgIconSrc="",this.specificFileTypes="",this.withoutIcon=!1,this.withoutButtonText=!1,this.getInputValue=()=>{let t=[];this._fileInput.files&&(t=Array.from(this._fileInput.files).map(s=>({fileName:s==null?void 0:s.name,fileSize:(s==null?void 0:s.size)/1024>=1024?`${((s==null?void 0:s.size)/1024/1024).toFixed(1)} MB`:`${((s==null?void 0:s.size)/1024).toFixed(1)} KB`}))),this.dispatchEvent(new CustomEvent("selected",{detail:t}))},this.renderInputControl=()=>{let t;return this.withoutIcon?t=b.html`
1631
+ <input type='file' id='file-input' accept='${this.specificFileTypes}' @change='${this.getInputValue}' multiple />
1632
+ <label class='upload-label upload-label--without-icon' for='file-input'>
1633
+ <span class='button-text'>${this.buttonText}</span>
1634
+ </label>
1635
+ `:this.withoutButtonText?t=b.html`
1636
+ <input type='file' id='file-input' accept='${this.specificFileTypes}' @change='${this.getInputValue}' multiple />
1637
+ <label class='upload-label upload-label--without-button-text' for='file-input'>
1638
+ <object class='button-icon' data='${this.svgIconSrc}' width='20' height='20'></object>
1639
+ </label>
1640
+ `:t=b.html`
1641
+ <input type='file' id='file-input' accept='${this.specificFileTypes}' @change='${this.getInputValue}' multiple />
1642
+ <label class='upload-label' for='file-input'>
1643
+ <object class='button-icon' data='${this.svgIconSrc}' width='20' height='20'></object>
1644
+ <span class='button-text'>${this.buttonText}</span>
1645
+ </label>
1646
+ `,t}}render(){return this.renderInputControl()}},M.GenusFileUpload.styles=[yf,xf,bf,Mf,mf],qt([v.property({attribute:"button-text"})],M.GenusFileUpload.prototype,"buttonText",2),qt([v.property({attribute:"svg-icon-src"})],M.GenusFileUpload.prototype,"svgIconSrc",2),qt([v.property({attribute:"file-types"})],M.GenusFileUpload.prototype,"specificFileTypes",2),qt([v.property({type:Boolean,attribute:"without-icon"})],M.GenusFileUpload.prototype,"withoutIcon",2),qt([v.property({type:Boolean,attribute:"without-button-text"})],M.GenusFileUpload.prototype,"withoutButtonText",2),qt([v.query("#file-input")],M.GenusFileUpload.prototype,"_fileInput",2),M.GenusFileUpload=qt([v.customElement("genus-file-upload")],M.GenusFileUpload),(()=>{let i=`
1604
1647
  @font-face
1605
1648
  {
1606
1649
  font-family: 'Sofia Pro';
@@ -1642,4 +1685,4 @@
1642
1685
  font-style: normal;
1643
1686
  font-display: swap;
1644
1687
  }
1645
- `;if(Object.getPrototypeOf(Object.getPrototypeOf(globalThis))!==Object.prototype&&!document.getElementById("injectedStyle")){let e=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.id="injectedStyle",s.type="text/css",s.innerText=i,e.appendChild(s)}})(),v.GenusCheckBoxGroup=pr,v.GenusDataTable=_u,v.GenusDropDownSelect=jr,v.GenusTabs=Wa,v.GenusWizard=Ya,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
1688
+ `;if(Object.getPrototypeOf(Object.getPrototypeOf(globalThis))!==Object.prototype&&!document.getElementById("injectedStyle")){let e=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.id="injectedStyle",s.type="text/css",s.innerText=i,e.appendChild(s)}})(),M.GenusCheckBoxGroup=mr,M.GenusDataTable=$u,M.GenusDropDownSelect=Er,M.GenusTabs=Ga,M.GenusWizard=Ka,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})});