@konstructio/ui 0.1.2-alpha.2 → 0.1.2-alpha.20
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/{Modal-V67Uz78z.js → Modal-B8jrP02v.js} +20 -20
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/{chevron-down-BLZPftpV.js → chevron-down-J5nS1Tu0.js} +2 -2
- package/dist/chevron-right-DeMVrnIg.js +19 -0
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Badge/Badge.js +31 -28
- package/dist/components/Badge/Badge.variants.js +7 -5
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +24 -23
- package/dist/components/Button/Button.variants.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +5 -4
- package/dist/components/Checkbox/Checkbox.variants.js +5 -4
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +2 -2
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +545 -543
- package/dist/components/Dropdown/Dropdown.js +36 -24
- package/dist/components/Dropdown/Dropdown.variants.js +32 -9
- package/dist/components/Dropdown/components/List/List.js +64 -45
- package/dist/components/Dropdown/components/List/List.variants.js +9 -7
- package/dist/components/Dropdown/components/ListItem/ListItem.js +70 -24
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +9 -7
- package/dist/components/Dropdown/components/Wrapper.js +154 -108
- package/dist/components/Dropdown/contexts/dropdown.context.js +9 -8
- package/dist/components/Dropdown/contexts/dropdown.provider.js +20 -19
- package/dist/components/Dropdown/hooks/useDropdown.js +30 -27
- package/dist/components/Dropdown/hooks/useNavigationList.js +32 -28
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Loading/Loading.js +2 -2
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +2 -2
- package/dist/components/PieChart/PieChart.js +649 -648
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +29 -28
- package/dist/components/Skeleton/Skeleton.js +42 -0
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +6 -5
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.variants.js +45 -24
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +9 -8
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +98 -49
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Toast/Toast.js +57 -55
- package/dist/components/VirtualizedTable/VirtualizedTable.js +121 -0
- package/dist/components/VirtualizedTable/VirtualizedTable.variants.js +5 -0
- package/dist/components/VirtualizedTable/assets/chevron-down.js +25 -0
- package/dist/components/VirtualizedTable/assets/chevron-up.js +25 -0
- package/dist/components/VirtualizedTable/assets/index.js +6 -0
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +40 -0
- package/dist/components/VirtualizedTable/components/Body/Body.js +26 -0
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +165 -0
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +34 -0
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +88 -0
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +48 -0
- package/dist/components/VirtualizedTable/components/Header/Header.js +82 -0
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +45 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1871 -0
- package/dist/components/VirtualizedTable/components/index.js +14 -0
- package/dist/components/VirtualizedTable/constants/index.js +5 -0
- package/dist/components/VirtualizedTable/constants/pagination.js +5 -0
- package/dist/components/VirtualizedTable/contexts/index.js +8 -0
- package/dist/components/VirtualizedTable/contexts/table.context.js +31 -0
- package/dist/components/VirtualizedTable/contexts/table.hook.js +11 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +84 -0
- package/dist/components/index.js +44 -40
- package/dist/{createLucideIcon-DbC6TvM5.js → createLucideIcon-DGhJ8Z4k.js} +4 -4
- package/dist/debounce-BFejQm9P.js +200 -0
- package/dist/ellipsis-vertical-DpnVYRxI.js +15 -0
- package/dist/{index-D3xzCzcO.js → index-0XtjXVpJ.js} +2 -2
- package/dist/index-BAEWsOG1.js +27 -0
- package/dist/index-BVRIAMfe.js +36 -0
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/{index-Oq5GlCHP.js → index-Bn4c-gww.js} +1 -1
- package/dist/index-CffpTFMi.js +137 -0
- package/dist/{index-BAraV3ai.js → index-DQJhMz8c.js} +1 -1
- package/dist/index-DdXGVVBv.js +15 -0
- package/dist/index-Dx2grAuN.js +1742 -0
- package/dist/{index-h-Ul0anl.js → index-N2OStZoU.js} +1 -1
- package/dist/{index-BXuxPoz7.js → index-amYX3uxF.js} +18 -17
- package/dist/{index-DB2XhXHn.js → index-l3NwplN0.js} +11 -10
- package/dist/{index-iXyXtdgP.js → index-sp5ZfG6g.js} +1 -1
- package/dist/index.d.ts +121 -10
- package/dist/index.js +41 -37
- package/dist/package.json +33 -25
- package/dist/styles.css +1 -1
- package/dist/ui/civo-theme.css +191 -167
- package/dist/{x-BPcqkRZd.js → x-4F_5p77m.js} +1 -1
- package/package.json +33 -25
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/chevron-up-RLP4nX7V.js +0 -54
- package/dist/index-C9T9HQaa.js +0 -423
- package/dist/index-CZnD2QxM.js +0 -32
- package/dist/index-CrBonFvu.js +0 -144
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as ve } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Cs, useRef as Ie, useEffect as dt, useMemo as re } from "react";
|
|
3
3
|
/*!
|
|
4
4
|
* @kurkle/color v0.3.4
|
|
5
5
|
* https://github.com/kurkle/color#readme
|
|
6
6
|
* (c) 2024 Jukka Kurkela
|
|
7
7
|
* Released under the MIT License
|
|
8
8
|
*/
|
|
9
|
-
function
|
|
9
|
+
function It(e) {
|
|
10
10
|
return e + 0.5 | 0;
|
|
11
11
|
}
|
|
12
12
|
const Q = (e, t, s) => Math.max(Math.min(e, s), t);
|
|
13
|
-
function
|
|
14
|
-
return Q(
|
|
13
|
+
function kt(e) {
|
|
14
|
+
return Q(It(e * 2.55), 0, 255);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
return Q(
|
|
16
|
+
function et(e) {
|
|
17
|
+
return Q(It(e * 255), 0, 255);
|
|
18
18
|
}
|
|
19
19
|
function G(e) {
|
|
20
|
-
return Q(
|
|
20
|
+
return Q(It(e / 2.55) / 100, 0, 1);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
return Q(
|
|
22
|
+
function Te(e) {
|
|
23
|
+
return Q(It(e * 100), 0, 100);
|
|
24
24
|
}
|
|
25
|
-
const N = { 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 }, me = [..."0123456789ABCDEF"],
|
|
26
|
-
function
|
|
25
|
+
const N = { 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 }, me = [..."0123456789ABCDEF"], ci = (e) => me[e & 15], li = (e) => me[(e & 240) >> 4] + me[e & 15], zt = (e) => (e & 240) >> 4 === (e & 15), hi = (e) => zt(e.r) && zt(e.g) && zt(e.b) && zt(e.a);
|
|
26
|
+
function di(e) {
|
|
27
27
|
var t = e.length, s;
|
|
28
28
|
return e[0] === "#" && (t === 4 || t === 5 ? s = {
|
|
29
29
|
r: 255 & N[e[1]] * 17,
|
|
@@ -37,75 +37,75 @@ function fi(e) {
|
|
|
37
37
|
a: t === 9 ? N[e[7]] << 4 | N[e[8]] : 255
|
|
38
38
|
})), s;
|
|
39
39
|
}
|
|
40
|
-
const
|
|
41
|
-
function
|
|
42
|
-
var t =
|
|
43
|
-
return e ? "#" + t(e.r) + t(e.g) + t(e.b) +
|
|
40
|
+
const fi = (e, t) => e < 255 ? t(e) : "";
|
|
41
|
+
function ui(e) {
|
|
42
|
+
var t = hi(e) ? ci : li;
|
|
43
|
+
return e ? "#" + t(e.r) + t(e.g) + t(e.b) + fi(e.a, t) : void 0;
|
|
44
44
|
}
|
|
45
|
-
const
|
|
45
|
+
const gi = /^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;
|
|
46
46
|
function As(e, t, s) {
|
|
47
47
|
const i = t * Math.min(s, 1 - s), n = (o, r = (o + e / 30) % 12) => s - i * Math.max(Math.min(r - 3, 9 - r, 1), -1);
|
|
48
48
|
return [n(0), n(8), n(4)];
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function pi(e, t, s) {
|
|
51
51
|
const i = (n, o = (n + e / 60) % 6) => s - s * t * Math.max(Math.min(o, 4 - o, 1), 0);
|
|
52
52
|
return [i(5), i(3), i(1)];
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function mi(e, t, s) {
|
|
55
55
|
const i = As(e, 1, 0.5);
|
|
56
56
|
let n;
|
|
57
57
|
for (t + s > 1 && (n = 1 / (t + s), t *= n, s *= n), n = 0; n < 3; n++)
|
|
58
58
|
i[n] *= 1 - t - s, i[n] += t;
|
|
59
59
|
return i;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function _i(e, t, s, i, n) {
|
|
62
62
|
return e === n ? (t - s) / i + (t < s ? 6 : 0) : t === n ? (s - e) / i + 2 : (e - t) / i + 4;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function we(e) {
|
|
65
65
|
const s = e.r / 255, i = e.g / 255, n = e.b / 255, o = Math.max(s, i, n), r = Math.min(s, i, n), a = (o + r) / 2;
|
|
66
66
|
let c, l, h;
|
|
67
|
-
return o !== r && (h = o - r, l = a > 0.5 ? h / (2 - o - r) : h / (o + r), c =
|
|
67
|
+
return o !== r && (h = o - r, l = a > 0.5 ? h / (2 - o - r) : h / (o + r), c = _i(s, i, n, h, o), c = c * 60 + 0.5), [c | 0, l || 0, a];
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
return (Array.isArray(t) ? e(t[0], t[1], t[2]) : e(t, s, i)).map(
|
|
69
|
+
function Me(e, t, s, i) {
|
|
70
|
+
return (Array.isArray(t) ? e(t[0], t[1], t[2]) : e(t, s, i)).map(et);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
return
|
|
72
|
+
function ke(e, t, s) {
|
|
73
|
+
return Me(As, e, t, s);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
return
|
|
75
|
+
function bi(e, t, s) {
|
|
76
|
+
return Me(mi, e, t, s);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
78
|
+
function xi(e, t, s) {
|
|
79
|
+
return Me(pi, e, t, s);
|
|
80
80
|
}
|
|
81
81
|
function Ps(e) {
|
|
82
82
|
return (e % 360 + 360) % 360;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
const t =
|
|
84
|
+
function yi(e) {
|
|
85
|
+
const t = gi.exec(e);
|
|
86
86
|
let s = 255, i;
|
|
87
87
|
if (!t)
|
|
88
88
|
return;
|
|
89
|
-
t[5] !== i && (s = t[6] ?
|
|
89
|
+
t[5] !== i && (s = t[6] ? kt(+t[5]) : et(+t[5]));
|
|
90
90
|
const n = Ps(+t[2]), o = +t[3] / 100, r = +t[4] / 100;
|
|
91
|
-
return t[1] === "hwb" ? i =
|
|
91
|
+
return t[1] === "hwb" ? i = bi(n, o, r) : t[1] === "hsv" ? i = xi(n, o, r) : i = ke(n, o, r), {
|
|
92
92
|
r: i[0],
|
|
93
93
|
g: i[1],
|
|
94
94
|
b: i[2],
|
|
95
95
|
a: s
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
var s =
|
|
100
|
-
s[0] = Ps(s[0] + t), s =
|
|
98
|
+
function vi(e, t) {
|
|
99
|
+
var s = we(e);
|
|
100
|
+
s[0] = Ps(s[0] + t), s = ke(s), e.r = s[0], e.g = s[1], e.b = s[2];
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function wi(e) {
|
|
103
103
|
if (!e)
|
|
104
104
|
return;
|
|
105
|
-
const t =
|
|
105
|
+
const t = we(e), s = t[0], i = Te(t[1]), n = Te(t[2]);
|
|
106
106
|
return e.a < 255 ? `hsla(${s}, ${i}%, ${n}%, ${G(e.a)})` : `hsl(${s}, ${i}%, ${n}%)`;
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const Le = {
|
|
109
109
|
x: "dark",
|
|
110
110
|
Z: "light",
|
|
111
111
|
Y: "re",
|
|
@@ -133,7 +133,7 @@ const Te = {
|
|
|
133
133
|
H: "ea",
|
|
134
134
|
I: "ightg",
|
|
135
135
|
J: "wh"
|
|
136
|
-
},
|
|
136
|
+
}, ze = {
|
|
137
137
|
OiceXe: "f0f8ff",
|
|
138
138
|
antiquewEte: "faebd7",
|
|
139
139
|
aqua: "ffff",
|
|
@@ -283,20 +283,20 @@ const Te = {
|
|
|
283
283
|
Lw: "ffff00",
|
|
284
284
|
LwgYF: "9acd32"
|
|
285
285
|
};
|
|
286
|
-
function
|
|
287
|
-
const e = {}, t = Object.keys(
|
|
286
|
+
function Mi() {
|
|
287
|
+
const e = {}, t = Object.keys(ze), s = Object.keys(Le);
|
|
288
288
|
let i, n, o, r, a;
|
|
289
289
|
for (i = 0; i < t.length; i++) {
|
|
290
290
|
for (r = a = t[i], n = 0; n < s.length; n++)
|
|
291
|
-
o = s[n], a = a.replace(o,
|
|
292
|
-
o = parseInt(
|
|
291
|
+
o = s[n], a = a.replace(o, Le[o]);
|
|
292
|
+
o = parseInt(ze[r], 16), e[a] = [o >> 16 & 255, o >> 8 & 255, o & 255];
|
|
293
293
|
}
|
|
294
294
|
return e;
|
|
295
295
|
}
|
|
296
|
-
let
|
|
297
|
-
function
|
|
298
|
-
|
|
299
|
-
const t =
|
|
296
|
+
let Ft;
|
|
297
|
+
function ki(e) {
|
|
298
|
+
Ft || (Ft = Mi(), Ft.transparent = [0, 0, 0, 0]);
|
|
299
|
+
const t = Ft[e.toLowerCase()];
|
|
300
300
|
return t && {
|
|
301
301
|
r: t[0],
|
|
302
302
|
g: t[1],
|
|
@@ -304,16 +304,16 @@ function Si(e) {
|
|
|
304
304
|
a: t.length === 4 ? t[3] : 255
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
|
-
const
|
|
308
|
-
function
|
|
309
|
-
const t =
|
|
307
|
+
const Si = /^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;
|
|
308
|
+
function Oi(e) {
|
|
309
|
+
const t = Si.exec(e);
|
|
310
310
|
let s = 255, i, n, o;
|
|
311
311
|
if (t) {
|
|
312
312
|
if (t[7] !== i) {
|
|
313
313
|
const r = +t[7];
|
|
314
|
-
s = t[8] ?
|
|
314
|
+
s = t[8] ? kt(r) : Q(r * 255, 0, 255);
|
|
315
315
|
}
|
|
316
|
-
return i = +t[1], n = +t[3], o = +t[5], i = 255 & (t[2] ?
|
|
316
|
+
return i = +t[1], n = +t[3], o = +t[5], i = 255 & (t[2] ? kt(i) : Q(i, 0, 255)), n = 255 & (t[4] ? kt(n) : Q(n, 0, 255)), o = 255 & (t[6] ? kt(o) : Q(o, 0, 255)), {
|
|
317
317
|
r: i,
|
|
318
318
|
g: n,
|
|
319
319
|
b: o,
|
|
@@ -321,42 +321,42 @@ function Di(e) {
|
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Di(e) {
|
|
325
325
|
return e && (e.a < 255 ? `rgba(${e.r}, ${e.g}, ${e.b}, ${G(e.a)})` : `rgb(${e.r}, ${e.g}, ${e.b})`);
|
|
326
326
|
}
|
|
327
|
-
const ae = (e) => e <= 31308e-7 ? e * 12.92 : Math.pow(e, 1 / 2.4) * 1.055 - 0.055,
|
|
328
|
-
function
|
|
329
|
-
const i =
|
|
327
|
+
const ae = (e) => e <= 31308e-7 ? e * 12.92 : Math.pow(e, 1 / 2.4) * 1.055 - 0.055, ft = (e) => e <= 0.04045 ? e / 12.92 : Math.pow((e + 0.055) / 1.055, 2.4);
|
|
328
|
+
function Ci(e, t, s) {
|
|
329
|
+
const i = ft(G(e.r)), n = ft(G(e.g)), o = ft(G(e.b));
|
|
330
330
|
return {
|
|
331
|
-
r:
|
|
332
|
-
g:
|
|
333
|
-
b:
|
|
331
|
+
r: et(ae(i + s * (ft(G(t.r)) - i))),
|
|
332
|
+
g: et(ae(n + s * (ft(G(t.g)) - n))),
|
|
333
|
+
b: et(ae(o + s * (ft(G(t.b)) - o))),
|
|
334
334
|
a: e.a + s * (t.a - e.a)
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function jt(e, t, s) {
|
|
338
338
|
if (e) {
|
|
339
|
-
let i =
|
|
340
|
-
i[t] = Math.max(0, Math.min(i[t] + i[t] * s, t === 0 ? 360 : 1)), i =
|
|
339
|
+
let i = we(e);
|
|
340
|
+
i[t] = Math.max(0, Math.min(i[t] + i[t] * s, t === 0 ? 360 : 1)), i = ke(i), e.r = i[0], e.g = i[1], e.b = i[2];
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
function Es(e, t) {
|
|
344
344
|
return e && Object.assign(t || {}, e);
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function Fe(e) {
|
|
347
347
|
var t = { r: 0, g: 0, b: 0, a: 255 };
|
|
348
|
-
return Array.isArray(e) ? e.length >= 3 && (t = { r: e[0], g: e[1], b: e[2], a: 255 }, e.length > 3 && (t.a =
|
|
348
|
+
return Array.isArray(e) ? e.length >= 3 && (t = { r: e[0], g: e[1], b: e[2], a: 255 }, e.length > 3 && (t.a = et(e[3]))) : (t = Es(e, { r: 0, g: 0, b: 0, a: 1 }), t.a = et(t.a)), t;
|
|
349
349
|
}
|
|
350
|
-
function
|
|
351
|
-
return e.charAt(0) === "r" ?
|
|
350
|
+
function Ai(e) {
|
|
351
|
+
return e.charAt(0) === "r" ? Oi(e) : yi(e);
|
|
352
352
|
}
|
|
353
|
-
class
|
|
353
|
+
class Ct {
|
|
354
354
|
constructor(t) {
|
|
355
|
-
if (t instanceof
|
|
355
|
+
if (t instanceof Ct)
|
|
356
356
|
return t;
|
|
357
357
|
const s = typeof t;
|
|
358
358
|
let i;
|
|
359
|
-
s === "object" ? i =
|
|
359
|
+
s === "object" ? i = Fe(t) : s === "string" && (i = di(t) || ki(t) || Ai(t)), this._rgb = i, this._valid = !!i;
|
|
360
360
|
}
|
|
361
361
|
get valid() {
|
|
362
362
|
return this._valid;
|
|
@@ -366,16 +366,16 @@ class Dt {
|
|
|
366
366
|
return t && (t.a = G(t.a)), t;
|
|
367
367
|
}
|
|
368
368
|
set rgb(t) {
|
|
369
|
-
this._rgb =
|
|
369
|
+
this._rgb = Fe(t);
|
|
370
370
|
}
|
|
371
371
|
rgbString() {
|
|
372
|
-
return this._valid ?
|
|
372
|
+
return this._valid ? Di(this._rgb) : void 0;
|
|
373
373
|
}
|
|
374
374
|
hexString() {
|
|
375
|
-
return this._valid ?
|
|
375
|
+
return this._valid ? ui(this._rgb) : void 0;
|
|
376
376
|
}
|
|
377
377
|
hslString() {
|
|
378
|
-
return this._valid ?
|
|
378
|
+
return this._valid ? wi(this._rgb) : void 0;
|
|
379
379
|
}
|
|
380
380
|
mix(t, s) {
|
|
381
381
|
if (t) {
|
|
@@ -387,20 +387,20 @@ class Dt {
|
|
|
387
387
|
return this;
|
|
388
388
|
}
|
|
389
389
|
interpolate(t, s) {
|
|
390
|
-
return t && (this._rgb =
|
|
390
|
+
return t && (this._rgb = Ci(this._rgb, t._rgb, s)), this;
|
|
391
391
|
}
|
|
392
392
|
clone() {
|
|
393
|
-
return new
|
|
393
|
+
return new Ct(this.rgb);
|
|
394
394
|
}
|
|
395
395
|
alpha(t) {
|
|
396
|
-
return this._rgb.a =
|
|
396
|
+
return this._rgb.a = et(t), this;
|
|
397
397
|
}
|
|
398
398
|
clearer(t) {
|
|
399
399
|
const s = this._rgb;
|
|
400
400
|
return s.a *= 1 - t, this;
|
|
401
401
|
}
|
|
402
402
|
greyscale() {
|
|
403
|
-
const t = this._rgb, s =
|
|
403
|
+
const t = this._rgb, s = It(t.r * 0.3 + t.g * 0.59 + t.b * 0.11);
|
|
404
404
|
return t.r = t.g = t.b = s, this;
|
|
405
405
|
}
|
|
406
406
|
opaquer(t) {
|
|
@@ -412,28 +412,28 @@ class Dt {
|
|
|
412
412
|
return t.r = 255 - t.r, t.g = 255 - t.g, t.b = 255 - t.b, this;
|
|
413
413
|
}
|
|
414
414
|
lighten(t) {
|
|
415
|
-
return
|
|
415
|
+
return jt(this._rgb, 2, t), this;
|
|
416
416
|
}
|
|
417
417
|
darken(t) {
|
|
418
|
-
return
|
|
418
|
+
return jt(this._rgb, 2, -t), this;
|
|
419
419
|
}
|
|
420
420
|
saturate(t) {
|
|
421
|
-
return
|
|
421
|
+
return jt(this._rgb, 1, t), this;
|
|
422
422
|
}
|
|
423
423
|
desaturate(t) {
|
|
424
|
-
return
|
|
424
|
+
return jt(this._rgb, 1, -t), this;
|
|
425
425
|
}
|
|
426
426
|
rotate(t) {
|
|
427
|
-
return
|
|
427
|
+
return vi(this._rgb, t), this;
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
/*!
|
|
431
|
-
* Chart.js v4.5.
|
|
431
|
+
* Chart.js v4.5.1
|
|
432
432
|
* https://www.chartjs.org
|
|
433
433
|
* (c) 2025 Chart.js Contributors
|
|
434
434
|
* Released under the MIT License
|
|
435
435
|
*/
|
|
436
|
-
const
|
|
436
|
+
const Pi = /* @__PURE__ */ (() => {
|
|
437
437
|
let e = 0;
|
|
438
438
|
return () => e++;
|
|
439
439
|
})();
|
|
@@ -449,16 +449,16 @@ function B(e) {
|
|
|
449
449
|
function w(e) {
|
|
450
450
|
return e !== null && Object.prototype.toString.call(e) === "[object Object]";
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function pt(e) {
|
|
453
453
|
return (typeof e == "number" || e instanceof Number) && isFinite(+e);
|
|
454
454
|
}
|
|
455
455
|
function K(e, t) {
|
|
456
|
-
return
|
|
456
|
+
return pt(e) ? e : t;
|
|
457
457
|
}
|
|
458
458
|
function A(e, t) {
|
|
459
459
|
return typeof e > "u" ? t : e;
|
|
460
460
|
}
|
|
461
|
-
const
|
|
461
|
+
const Ei = (e, t) => typeof e == "string" && e.endsWith("%") ? parseFloat(e) / 100 : +e / t, Rs = (e, t) => typeof e == "string" && e.endsWith("%") ? parseFloat(e) / 100 * t : +e;
|
|
462
462
|
function E(e, t, s) {
|
|
463
463
|
if (e && typeof e.call == "function")
|
|
464
464
|
return e.apply(s, t);
|
|
@@ -472,7 +472,7 @@ function j(e, t, s, i) {
|
|
|
472
472
|
for (r = Object.keys(e), o = r.length, n = 0; n < o; n++)
|
|
473
473
|
t.call(s, e[r[n]], r[n]);
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function je(e, t) {
|
|
476
476
|
let s, i, n, o;
|
|
477
477
|
if (!e || !t || e.length !== t.length)
|
|
478
478
|
return !1;
|
|
@@ -500,20 +500,20 @@ function Is(e) {
|
|
|
500
500
|
"constructor"
|
|
501
501
|
].indexOf(e) === -1;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Ri(e, t, s, i) {
|
|
504
504
|
if (!Is(e))
|
|
505
505
|
return;
|
|
506
506
|
const n = t[e], o = s[e];
|
|
507
|
-
w(n) && w(o) ?
|
|
507
|
+
w(n) && w(o) ? At(n, o, i) : t[e] = Zt(o);
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function At(e, t, s) {
|
|
510
510
|
const i = B(t) ? t : [
|
|
511
511
|
t
|
|
512
512
|
], n = i.length;
|
|
513
513
|
if (!w(e))
|
|
514
514
|
return e;
|
|
515
515
|
s = s || {};
|
|
516
|
-
const o = s.merger ||
|
|
516
|
+
const o = s.merger || Ri;
|
|
517
517
|
let r;
|
|
518
518
|
for (let a = 0; a < n; ++a) {
|
|
519
519
|
if (r = i[a], !w(r))
|
|
@@ -525,32 +525,32 @@ function Ct(e, t, s) {
|
|
|
525
525
|
return e;
|
|
526
526
|
}
|
|
527
527
|
function Kt(e, t) {
|
|
528
|
-
return
|
|
529
|
-
merger:
|
|
528
|
+
return At(e, t, {
|
|
529
|
+
merger: Ii
|
|
530
530
|
});
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function Ii(e, t, s) {
|
|
533
533
|
if (!Is(e))
|
|
534
534
|
return;
|
|
535
535
|
const i = t[e], n = s[e];
|
|
536
536
|
w(i) && w(n) ? Kt(i, n) : Object.prototype.hasOwnProperty.call(t, e) || (t[e] = Zt(n));
|
|
537
537
|
}
|
|
538
|
-
const
|
|
538
|
+
const Be = {
|
|
539
539
|
// Chart.helpers.core resolveObjectKey should resolve empty key to root object
|
|
540
540
|
"": (e) => e,
|
|
541
541
|
// default resolvers
|
|
542
542
|
x: (e) => e.x,
|
|
543
543
|
y: (e) => e.y
|
|
544
544
|
};
|
|
545
|
-
function
|
|
545
|
+
function Ti(e) {
|
|
546
546
|
const t = e.split("."), s = [];
|
|
547
547
|
let i = "";
|
|
548
548
|
for (const n of t)
|
|
549
549
|
i += n, i.endsWith("\\") ? i = i.slice(0, -1) + "." : (s.push(i), i = "");
|
|
550
550
|
return s;
|
|
551
551
|
}
|
|
552
|
-
function
|
|
553
|
-
const t =
|
|
552
|
+
function Li(e) {
|
|
553
|
+
const t = Ti(e);
|
|
554
554
|
return (s) => {
|
|
555
555
|
for (const i of t) {
|
|
556
556
|
if (i === "")
|
|
@@ -560,13 +560,13 @@ function zi(e) {
|
|
|
560
560
|
return s;
|
|
561
561
|
};
|
|
562
562
|
}
|
|
563
|
-
function
|
|
564
|
-
return (
|
|
563
|
+
function Pt(e, t) {
|
|
564
|
+
return (Be[t] || (Be[t] = Li(t)))(e);
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function Se(e) {
|
|
567
567
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
568
568
|
}
|
|
569
|
-
const Gt = (e) => typeof e < "u",
|
|
569
|
+
const Gt = (e) => typeof e < "u", st = (e) => typeof e == "function", He = (e, t) => {
|
|
570
570
|
if (e.size !== t.size)
|
|
571
571
|
return !1;
|
|
572
572
|
for (const s of e)
|
|
@@ -574,27 +574,27 @@ const Gt = (e) => typeof e < "u", et = (e) => typeof e == "function", Be = (e, t
|
|
|
574
574
|
return !1;
|
|
575
575
|
return !0;
|
|
576
576
|
};
|
|
577
|
-
function
|
|
577
|
+
function zi(e) {
|
|
578
578
|
return e.type === "mouseup" || e.type === "click" || e.type === "contextmenu";
|
|
579
579
|
}
|
|
580
|
-
const z = Math.PI, T = 2 * z, Qt = Number.POSITIVE_INFINITY, $ = z / 2,
|
|
581
|
-
function
|
|
580
|
+
const z = Math.PI, T = 2 * z, Qt = Number.POSITIVE_INFINITY, $ = z / 2, We = Math.sign;
|
|
581
|
+
function Fi(e) {
|
|
582
582
|
const t = [], s = Math.sqrt(e);
|
|
583
583
|
let i;
|
|
584
584
|
for (i = 1; i < s; i++)
|
|
585
585
|
e % i === 0 && (t.push(i), t.push(e / i));
|
|
586
586
|
return s === (s | 0) && t.push(s), t.sort((n, o) => n - o).pop(), t;
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function ji(e) {
|
|
589
589
|
return typeof e == "symbol" || typeof e == "object" && e !== null && !(Symbol.toPrimitive in e || "toString" in e || "valueOf" in e);
|
|
590
590
|
}
|
|
591
|
-
function
|
|
592
|
-
return !
|
|
591
|
+
function Ve(e) {
|
|
592
|
+
return !ji(e) && !isNaN(parseFloat(e)) && isFinite(e);
|
|
593
593
|
}
|
|
594
|
-
function
|
|
594
|
+
function gt(e) {
|
|
595
595
|
return e * (z / 180);
|
|
596
596
|
}
|
|
597
|
-
function
|
|
597
|
+
function Bi(e) {
|
|
598
598
|
return e * (180 / z);
|
|
599
599
|
}
|
|
600
600
|
function Ts(e, t) {
|
|
@@ -615,10 +615,10 @@ function Jt(e, t, s, i) {
|
|
|
615
615
|
function J(e, t, s) {
|
|
616
616
|
return Math.max(t, Math.min(s, e));
|
|
617
617
|
}
|
|
618
|
-
function
|
|
618
|
+
function Hi(e) {
|
|
619
619
|
return J(e, -32768, 32767);
|
|
620
620
|
}
|
|
621
|
-
function
|
|
621
|
+
function Wi(e, t, s, i = 1e-6) {
|
|
622
622
|
return e >= Math.min(t, s) - i && e <= Math.max(t, s) + i;
|
|
623
623
|
}
|
|
624
624
|
function Ls(e, t, s) {
|
|
@@ -631,17 +631,17 @@ function Ls(e, t, s) {
|
|
|
631
631
|
hi: i
|
|
632
632
|
};
|
|
633
633
|
}
|
|
634
|
-
const
|
|
634
|
+
const Vi = (e, t, s, i) => Ls(e, s, i ? (n) => {
|
|
635
635
|
const o = e[n][t];
|
|
636
636
|
return o < s || o === s && e[n + 1][t] === s;
|
|
637
|
-
} : (n) => e[n][t] < s),
|
|
637
|
+
} : (n) => e[n][t] < s), Ni = (e, t, s) => Ls(e, s, (i) => e[i][t] >= s), zs = [
|
|
638
638
|
"push",
|
|
639
639
|
"pop",
|
|
640
640
|
"shift",
|
|
641
641
|
"splice",
|
|
642
642
|
"unshift"
|
|
643
643
|
];
|
|
644
|
-
function
|
|
644
|
+
function $i(e, t) {
|
|
645
645
|
if (e._chartjs) {
|
|
646
646
|
e._chartjs.listeners.push(t);
|
|
647
647
|
return;
|
|
@@ -655,7 +655,7 @@ function Yi(e, t) {
|
|
|
655
655
|
]
|
|
656
656
|
}
|
|
657
657
|
}), zs.forEach((s) => {
|
|
658
|
-
const i = "_onData" +
|
|
658
|
+
const i = "_onData" + Se(s), n = e[s];
|
|
659
659
|
Object.defineProperty(e, s, {
|
|
660
660
|
configurable: !0,
|
|
661
661
|
enumerable: !1,
|
|
@@ -668,7 +668,7 @@ function Yi(e, t) {
|
|
|
668
668
|
});
|
|
669
669
|
});
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function Ne(e, t) {
|
|
672
672
|
const s = e._chartjs;
|
|
673
673
|
if (!s)
|
|
674
674
|
return;
|
|
@@ -690,13 +690,13 @@ function js(e, t) {
|
|
|
690
690
|
}));
|
|
691
691
|
};
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function Yi(e, t) {
|
|
694
694
|
let s;
|
|
695
695
|
return function(...i) {
|
|
696
696
|
return t ? (clearTimeout(s), s = setTimeout(e, t, i)) : e.apply(this, i), t;
|
|
697
697
|
};
|
|
698
698
|
}
|
|
699
|
-
const
|
|
699
|
+
const Xi = (e) => e === "start" ? "left" : e === "end" ? "right" : "center", $e = (e, t, s) => e === "start" ? t : e === "end" ? s : (t + s) / 2, Bt = (e) => e === 0 || e === 1, Ye = (e, t, s) => -(Math.pow(2, 10 * (e -= 1)) * Math.sin((e - t) * T / s)), Xe = (e, t, s) => Math.pow(2, -10 * e) * Math.sin((e - t) * T / s) + 1, Ot = {
|
|
700
700
|
linear: (e) => e,
|
|
701
701
|
easeInQuad: (e) => e * e,
|
|
702
702
|
easeOutQuad: (e) => -e * (e - 2),
|
|
@@ -715,14 +715,14 @@ const Ki = (e) => e === "start" ? "left" : e === "end" ? "right" : "center", Ne
|
|
|
715
715
|
easeInOutSine: (e) => -0.5 * (Math.cos(z * e) - 1),
|
|
716
716
|
easeInExpo: (e) => e === 0 ? 0 : Math.pow(2, 10 * (e - 1)),
|
|
717
717
|
easeOutExpo: (e) => e === 1 ? 1 : -Math.pow(2, -10 * e) + 1,
|
|
718
|
-
easeInOutExpo: (e) =>
|
|
718
|
+
easeInOutExpo: (e) => Bt(e) ? e : e < 0.5 ? 0.5 * Math.pow(2, 10 * (e * 2 - 1)) : 0.5 * (-Math.pow(2, -10 * (e * 2 - 1)) + 2),
|
|
719
719
|
easeInCirc: (e) => e >= 1 ? e : -(Math.sqrt(1 - e * e) - 1),
|
|
720
720
|
easeOutCirc: (e) => Math.sqrt(1 - (e -= 1) * e),
|
|
721
721
|
easeInOutCirc: (e) => (e /= 0.5) < 1 ? -0.5 * (Math.sqrt(1 - e * e) - 1) : 0.5 * (Math.sqrt(1 - (e -= 2) * e) + 1),
|
|
722
|
-
easeInElastic: (e) =>
|
|
723
|
-
easeOutElastic: (e) =>
|
|
722
|
+
easeInElastic: (e) => Bt(e) ? e : Ye(e, 0.075, 0.3),
|
|
723
|
+
easeOutElastic: (e) => Bt(e) ? e : Xe(e, 0.075, 0.3),
|
|
724
724
|
easeInOutElastic(e) {
|
|
725
|
-
return
|
|
725
|
+
return Bt(e) ? e : e < 0.5 ? 0.5 * Ye(e * 2, 0.1125, 0.45) : 0.5 + 0.5 * Xe(e * 2 - 1, 0.1125, 0.45);
|
|
726
726
|
},
|
|
727
727
|
easeInBack(e) {
|
|
728
728
|
return e * e * ((1.70158 + 1) * e - 1.70158);
|
|
@@ -734,11 +734,11 @@ const Ki = (e) => e === "start" ? "left" : e === "end" ? "right" : "center", Ne
|
|
|
734
734
|
let t = 1.70158;
|
|
735
735
|
return (e /= 0.5) < 1 ? 0.5 * (e * e * (((t *= 1.525) + 1) * e - t)) : 0.5 * ((e -= 2) * e * (((t *= 1.525) + 1) * e + t) + 2);
|
|
736
736
|
},
|
|
737
|
-
easeInBounce: (e) => 1 -
|
|
737
|
+
easeInBounce: (e) => 1 - Ot.easeOutBounce(1 - e),
|
|
738
738
|
easeOutBounce(e) {
|
|
739
739
|
return e < 1 / 2.75 ? 7.5625 * e * e : e < 2 / 2.75 ? 7.5625 * (e -= 1.5 / 2.75) * e + 0.75 : e < 2.5 / 2.75 ? 7.5625 * (e -= 2.25 / 2.75) * e + 0.9375 : 7.5625 * (e -= 2.625 / 2.75) * e + 0.984375;
|
|
740
740
|
},
|
|
741
|
-
easeInOutBounce: (e) => e < 0.5 ?
|
|
741
|
+
easeInOutBounce: (e) => e < 0.5 ? Ot.easeInBounce(e * 2) * 0.5 : Ot.easeOutBounce(e * 2 - 1) * 0.5 + 0.5
|
|
742
742
|
};
|
|
743
743
|
function Bs(e) {
|
|
744
744
|
if (e && typeof e == "object") {
|
|
@@ -747,24 +747,24 @@ function Bs(e) {
|
|
|
747
747
|
}
|
|
748
748
|
return !1;
|
|
749
749
|
}
|
|
750
|
-
function
|
|
751
|
-
return Bs(e) ? e : new
|
|
750
|
+
function Ke(e) {
|
|
751
|
+
return Bs(e) ? e : new Ct(e);
|
|
752
752
|
}
|
|
753
753
|
function ce(e) {
|
|
754
|
-
return Bs(e) ? e : new
|
|
754
|
+
return Bs(e) ? e : new Ct(e).saturate(0.5).darken(0.1).hexString();
|
|
755
755
|
}
|
|
756
|
-
const
|
|
756
|
+
const Ki = [
|
|
757
757
|
"x",
|
|
758
758
|
"y",
|
|
759
759
|
"borderWidth",
|
|
760
760
|
"radius",
|
|
761
761
|
"tension"
|
|
762
|
-
],
|
|
762
|
+
], Ui = [
|
|
763
763
|
"color",
|
|
764
764
|
"borderColor",
|
|
765
765
|
"backgroundColor"
|
|
766
766
|
];
|
|
767
|
-
function
|
|
767
|
+
function qi(e) {
|
|
768
768
|
e.set("animation", {
|
|
769
769
|
delay: void 0,
|
|
770
770
|
duration: 1e3,
|
|
@@ -781,11 +781,11 @@ function Zi(e) {
|
|
|
781
781
|
}), e.set("animations", {
|
|
782
782
|
colors: {
|
|
783
783
|
type: "color",
|
|
784
|
-
properties:
|
|
784
|
+
properties: Ui
|
|
785
785
|
},
|
|
786
786
|
numbers: {
|
|
787
787
|
type: "number",
|
|
788
|
-
properties:
|
|
788
|
+
properties: Ki
|
|
789
789
|
}
|
|
790
790
|
}), e.describe("animations", {
|
|
791
791
|
_fallback: "animation"
|
|
@@ -825,7 +825,7 @@ function Zi(e) {
|
|
|
825
825
|
}
|
|
826
826
|
});
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function Zi(e) {
|
|
829
829
|
e.set("layout", {
|
|
830
830
|
autoPadding: !0,
|
|
831
831
|
padding: {
|
|
@@ -836,25 +836,25 @@ function Gi(e) {
|
|
|
836
836
|
}
|
|
837
837
|
});
|
|
838
838
|
}
|
|
839
|
-
const
|
|
840
|
-
function
|
|
839
|
+
const Ue = /* @__PURE__ */ new Map();
|
|
840
|
+
function Gi(e, t) {
|
|
841
841
|
t = t || {};
|
|
842
842
|
const s = e + JSON.stringify(t);
|
|
843
|
-
let i =
|
|
844
|
-
return i || (i = new Intl.NumberFormat(e, t),
|
|
843
|
+
let i = Ue.get(s);
|
|
844
|
+
return i || (i = new Intl.NumberFormat(e, t), Ue.set(s, i)), i;
|
|
845
845
|
}
|
|
846
|
-
function
|
|
847
|
-
return
|
|
846
|
+
function Qi(e, t, s) {
|
|
847
|
+
return Gi(t, s).format(e);
|
|
848
848
|
}
|
|
849
|
-
const
|
|
849
|
+
const Ji = {
|
|
850
850
|
values(e) {
|
|
851
851
|
return B(e) ? e : "" + e;
|
|
852
852
|
}
|
|
853
853
|
};
|
|
854
|
-
var
|
|
855
|
-
formatters:
|
|
854
|
+
var tn = {
|
|
855
|
+
formatters: Ji
|
|
856
856
|
};
|
|
857
|
-
function
|
|
857
|
+
function en(e) {
|
|
858
858
|
e.set("scale", {
|
|
859
859
|
display: !0,
|
|
860
860
|
offset: !1,
|
|
@@ -898,7 +898,7 @@ function sn(e) {
|
|
|
898
898
|
autoSkip: !0,
|
|
899
899
|
autoSkipPadding: 3,
|
|
900
900
|
labelOffset: 0,
|
|
901
|
-
callback:
|
|
901
|
+
callback: tn.formatters.values,
|
|
902
902
|
minor: {},
|
|
903
903
|
major: {},
|
|
904
904
|
align: "center",
|
|
@@ -918,8 +918,8 @@ function sn(e) {
|
|
|
918
918
|
_indexable: (t) => t !== "backdropPadding"
|
|
919
919
|
});
|
|
920
920
|
}
|
|
921
|
-
const
|
|
922
|
-
function
|
|
921
|
+
const ct = /* @__PURE__ */ Object.create(null), _e = /* @__PURE__ */ Object.create(null);
|
|
922
|
+
function Dt(e, t) {
|
|
923
923
|
if (!t)
|
|
924
924
|
return e;
|
|
925
925
|
const s = t.split(".");
|
|
@@ -930,9 +930,9 @@ function Ot(e, t) {
|
|
|
930
930
|
return e;
|
|
931
931
|
}
|
|
932
932
|
function le(e, t, s) {
|
|
933
|
-
return typeof t == "string" ?
|
|
933
|
+
return typeof t == "string" ? At(Dt(e, t), s) : At(Dt(e, ""), t);
|
|
934
934
|
}
|
|
935
|
-
class
|
|
935
|
+
class sn {
|
|
936
936
|
constructor(t, s) {
|
|
937
937
|
this.animation = void 0, this.backgroundColor = "rgba(0,0,0,0.1)", this.borderColor = "rgba(0,0,0,0.1)", this.color = "#666", this.datasets = {}, this.devicePixelRatio = (i) => i.chart.platform.getDevicePixelRatio(), this.elements = {}, this.events = [
|
|
938
938
|
"mousemove",
|
|
@@ -956,16 +956,16 @@ class nn {
|
|
|
956
956
|
return le(this, t, s);
|
|
957
957
|
}
|
|
958
958
|
get(t) {
|
|
959
|
-
return
|
|
959
|
+
return Dt(this, t);
|
|
960
960
|
}
|
|
961
961
|
describe(t, s) {
|
|
962
962
|
return le(_e, t, s);
|
|
963
963
|
}
|
|
964
964
|
override(t, s) {
|
|
965
|
-
return le(
|
|
965
|
+
return le(ct, t, s);
|
|
966
966
|
}
|
|
967
967
|
route(t, s, i, n) {
|
|
968
|
-
const o =
|
|
968
|
+
const o = Dt(this, t), r = Dt(this, i), a = "_" + s;
|
|
969
969
|
Object.defineProperties(o, {
|
|
970
970
|
[a]: {
|
|
971
971
|
value: o[s],
|
|
@@ -987,7 +987,7 @@ class nn {
|
|
|
987
987
|
t.forEach((s) => s(this));
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
|
-
var R = /* @__PURE__ */ new
|
|
990
|
+
var R = /* @__PURE__ */ new sn({
|
|
991
991
|
_scriptable: (e) => !e.startsWith("on"),
|
|
992
992
|
_indexable: (e) => e !== "events",
|
|
993
993
|
hover: {
|
|
@@ -998,22 +998,22 @@ var R = /* @__PURE__ */ new nn({
|
|
|
998
998
|
_indexable: !1
|
|
999
999
|
}
|
|
1000
1000
|
}, [
|
|
1001
|
+
qi,
|
|
1001
1002
|
Zi,
|
|
1002
|
-
|
|
1003
|
-
sn
|
|
1003
|
+
en
|
|
1004
1004
|
]);
|
|
1005
|
-
function
|
|
1005
|
+
function nn(e) {
|
|
1006
1006
|
return !e || W(e.size) || W(e.family) ? null : (e.style ? e.style + " " : "") + (e.weight ? e.weight + " " : "") + e.size + "px " + e.family;
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1008
|
+
function qe(e, t, s, i, n) {
|
|
1009
1009
|
let o = t[n];
|
|
1010
1010
|
return o || (o = t[n] = e.measureText(n).width, s.push(n)), o > i && (i = o), i;
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1012
|
+
function ot(e, t, s) {
|
|
1013
1013
|
const i = e.currentDevicePixelRatio, n = s !== 0 ? Math.max(s / 2, 0.5) : 0;
|
|
1014
1014
|
return Math.round((t - n) * i) / i + n;
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1016
|
+
function Ze(e, t) {
|
|
1017
1017
|
!t && !e || (t = t || e.getContext("2d"), t.save(), t.resetTransform(), t.clearRect(0, 0, e.width, e.height), t.restore());
|
|
1018
1018
|
}
|
|
1019
1019
|
function Hs(e, t, s) {
|
|
@@ -1025,31 +1025,31 @@ function Ws(e, t) {
|
|
|
1025
1025
|
function Vs(e) {
|
|
1026
1026
|
e.restore();
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1028
|
+
function on(e, t) {
|
|
1029
1029
|
t.translation && e.translate(t.translation[0], t.translation[1]), W(t.rotation) || e.rotate(t.rotation), t.color && (e.fillStyle = t.color), t.textAlign && (e.textAlign = t.textAlign), t.textBaseline && (e.textBaseline = t.textBaseline);
|
|
1030
1030
|
}
|
|
1031
|
-
function
|
|
1031
|
+
function rn(e, t, s, i, n) {
|
|
1032
1032
|
if (n.strikethrough || n.underline) {
|
|
1033
1033
|
const o = e.measureText(i), r = t - o.actualBoundingBoxLeft, a = t + o.actualBoundingBoxRight, c = s - o.actualBoundingBoxAscent, l = s + o.actualBoundingBoxDescent, h = n.strikethrough ? (c + l) / 2 : l;
|
|
1034
1034
|
e.strokeStyle = e.fillStyle, e.beginPath(), e.lineWidth = n.decorationWidth || 2, e.moveTo(r, h), e.lineTo(a, h), e.stroke();
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
|
-
function
|
|
1037
|
+
function an(e, t) {
|
|
1038
1038
|
const s = e.fillStyle;
|
|
1039
1039
|
e.fillStyle = t.color, e.fillRect(t.left, t.top, t.width, t.height), e.fillStyle = s;
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1041
|
+
function Ge(e, t, s, i, n, o = {}) {
|
|
1042
1042
|
const r = B(t) ? t : [
|
|
1043
1043
|
t
|
|
1044
1044
|
], a = o.strokeWidth > 0 && o.strokeColor !== "";
|
|
1045
1045
|
let c, l;
|
|
1046
|
-
for (e.save(), e.font = n.string,
|
|
1047
|
-
l = r[c], o.backdrop &&
|
|
1046
|
+
for (e.save(), e.font = n.string, on(e, o), c = 0; c < r.length; ++c)
|
|
1047
|
+
l = r[c], o.backdrop && an(e, o.backdrop), a && (o.strokeColor && (e.strokeStyle = o.strokeColor), W(o.strokeWidth) || (e.lineWidth = o.strokeWidth), e.strokeText(l, s, i, o.maxWidth)), e.fillText(l, s, i, o.maxWidth), rn(e, s, i, l, o), i += Number(n.lineHeight);
|
|
1048
1048
|
e.restore();
|
|
1049
1049
|
}
|
|
1050
|
-
const
|
|
1051
|
-
function
|
|
1052
|
-
const s = ("" + e).match(
|
|
1050
|
+
const cn = /^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/, ln = /^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;
|
|
1051
|
+
function hn(e, t) {
|
|
1052
|
+
const s = ("" + e).match(cn);
|
|
1053
1053
|
if (!s || s[1] === "normal")
|
|
1054
1054
|
return t * 1.2;
|
|
1055
1055
|
switch (e = +s[2], s[3]) {
|
|
@@ -1061,14 +1061,14 @@ function dn(e, t) {
|
|
|
1061
1061
|
}
|
|
1062
1062
|
return t * e;
|
|
1063
1063
|
}
|
|
1064
|
-
const
|
|
1064
|
+
const dn = (e) => +e || 0;
|
|
1065
1065
|
function Ns(e, t) {
|
|
1066
1066
|
const s = {}, i = w(t), n = i ? Object.keys(t) : t, o = w(e) ? i ? (r) => A(e[r], e[t[r]]) : (r) => e[r] : () => e;
|
|
1067
1067
|
for (const r of n)
|
|
1068
|
-
s[r] =
|
|
1068
|
+
s[r] = dn(o(r));
|
|
1069
1069
|
return s;
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function fn(e) {
|
|
1072
1072
|
return Ns(e, {
|
|
1073
1073
|
top: "y",
|
|
1074
1074
|
right: "x",
|
|
@@ -1076,8 +1076,8 @@ function un(e) {
|
|
|
1076
1076
|
left: "x"
|
|
1077
1077
|
});
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1080
|
-
const t =
|
|
1079
|
+
function Et(e) {
|
|
1080
|
+
const t = fn(e);
|
|
1081
1081
|
return t.width = t.left + t.right, t.height = t.top + t.bottom, t;
|
|
1082
1082
|
}
|
|
1083
1083
|
function be(e, t) {
|
|
@@ -1085,34 +1085,34 @@ function be(e, t) {
|
|
|
1085
1085
|
let s = A(e.size, t.size);
|
|
1086
1086
|
typeof s == "string" && (s = parseInt(s, 10));
|
|
1087
1087
|
let i = A(e.style, t.style);
|
|
1088
|
-
i && !("" + i).match(
|
|
1088
|
+
i && !("" + i).match(ln) && (console.warn('Invalid font style specified: "' + i + '"'), i = void 0);
|
|
1089
1089
|
const n = {
|
|
1090
1090
|
family: A(e.family, t.family),
|
|
1091
|
-
lineHeight:
|
|
1091
|
+
lineHeight: hn(A(e.lineHeight, t.lineHeight), s),
|
|
1092
1092
|
size: s,
|
|
1093
1093
|
style: i,
|
|
1094
1094
|
weight: A(e.weight, t.weight),
|
|
1095
1095
|
string: ""
|
|
1096
1096
|
};
|
|
1097
|
-
return n.string =
|
|
1097
|
+
return n.string = nn(n), n;
|
|
1098
1098
|
}
|
|
1099
|
-
function
|
|
1099
|
+
function Ht(e, t, s, i) {
|
|
1100
1100
|
let n, o, r;
|
|
1101
1101
|
for (n = 0, o = e.length; n < o; ++n)
|
|
1102
1102
|
if (r = e[n], r !== void 0 && r !== void 0)
|
|
1103
1103
|
return r;
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1105
|
+
function un(e, t, s) {
|
|
1106
1106
|
const { min: i, max: n } = e, o = Rs(t, (n - i) / 2), r = (a, c) => s && a === 0 ? 0 : a + c;
|
|
1107
1107
|
return {
|
|
1108
1108
|
min: r(i, -Math.abs(o)),
|
|
1109
1109
|
max: r(n, o)
|
|
1110
1110
|
};
|
|
1111
1111
|
}
|
|
1112
|
-
function
|
|
1112
|
+
function Tt(e, t) {
|
|
1113
1113
|
return Object.assign(Object.create(e), t);
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1115
|
+
function Oe(e, t = [
|
|
1116
1116
|
""
|
|
1117
1117
|
], s, i, n = () => e[0]) {
|
|
1118
1118
|
const o = s || e;
|
|
@@ -1124,7 +1124,7 @@ function Se(e, t = [
|
|
|
1124
1124
|
_rootScopes: o,
|
|
1125
1125
|
_fallback: i,
|
|
1126
1126
|
_getTarget: n,
|
|
1127
|
-
override: (a) =>
|
|
1127
|
+
override: (a) => Oe([
|
|
1128
1128
|
a,
|
|
1129
1129
|
...e
|
|
1130
1130
|
], t, o, i)
|
|
@@ -1140,7 +1140,7 @@ function Se(e, t = [
|
|
|
1140
1140
|
* A trap for getting property values.
|
|
1141
1141
|
*/
|
|
1142
1142
|
get(a, c) {
|
|
1143
|
-
return Ys(a, c, () =>
|
|
1143
|
+
return Ys(a, c, () => vn(c, t, e, a));
|
|
1144
1144
|
},
|
|
1145
1145
|
/**
|
|
1146
1146
|
* A trap for Object.getOwnPropertyDescriptor.
|
|
@@ -1159,13 +1159,13 @@ function Se(e, t = [
|
|
|
1159
1159
|
* A trap for the in operator.
|
|
1160
1160
|
*/
|
|
1161
1161
|
has(a, c) {
|
|
1162
|
-
return
|
|
1162
|
+
return Je(a).includes(c);
|
|
1163
1163
|
},
|
|
1164
1164
|
/**
|
|
1165
1165
|
* A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols.
|
|
1166
1166
|
*/
|
|
1167
1167
|
ownKeys(a) {
|
|
1168
|
-
return
|
|
1168
|
+
return Je(a);
|
|
1169
1169
|
},
|
|
1170
1170
|
/**
|
|
1171
1171
|
* A trap for setting property values.
|
|
@@ -1176,7 +1176,7 @@ function Se(e, t = [
|
|
|
1176
1176
|
}
|
|
1177
1177
|
});
|
|
1178
1178
|
}
|
|
1179
|
-
function
|
|
1179
|
+
function mt(e, t, s, i) {
|
|
1180
1180
|
const n = {
|
|
1181
1181
|
_cacheable: !1,
|
|
1182
1182
|
_proxy: e,
|
|
@@ -1184,8 +1184,8 @@ function pt(e, t, s, i) {
|
|
|
1184
1184
|
_subProxy: s,
|
|
1185
1185
|
_stack: /* @__PURE__ */ new Set(),
|
|
1186
1186
|
_descriptors: $s(e, i),
|
|
1187
|
-
setContext: (o) =>
|
|
1188
|
-
override: (o) =>
|
|
1187
|
+
setContext: (o) => mt(e, o, s, i),
|
|
1188
|
+
override: (o) => mt(e.override(o), t, s, i)
|
|
1189
1189
|
};
|
|
1190
1190
|
return new Proxy(n, {
|
|
1191
1191
|
/**
|
|
@@ -1198,7 +1198,7 @@ function pt(e, t, s, i) {
|
|
|
1198
1198
|
* A trap for getting property values.
|
|
1199
1199
|
*/
|
|
1200
1200
|
get(o, r, a) {
|
|
1201
|
-
return Ys(o, r, () =>
|
|
1201
|
+
return Ys(o, r, () => pn(o, r, a));
|
|
1202
1202
|
},
|
|
1203
1203
|
/**
|
|
1204
1204
|
* A trap for Object.getOwnPropertyDescriptor.
|
|
@@ -1245,31 +1245,31 @@ function $s(e, t = {
|
|
|
1245
1245
|
allKeys: n,
|
|
1246
1246
|
scriptable: s,
|
|
1247
1247
|
indexable: i,
|
|
1248
|
-
isScriptable:
|
|
1249
|
-
isIndexable:
|
|
1248
|
+
isScriptable: st(s) ? s : () => s,
|
|
1249
|
+
isIndexable: st(i) ? i : () => i
|
|
1250
1250
|
};
|
|
1251
1251
|
}
|
|
1252
|
-
const
|
|
1252
|
+
const gn = (e, t) => e ? e + Se(t) : t, De = (e, t) => w(t) && e !== "adapters" && (Object.getPrototypeOf(t) === null || t.constructor === Object);
|
|
1253
1253
|
function Ys(e, t, s) {
|
|
1254
1254
|
if (Object.prototype.hasOwnProperty.call(e, t) || t === "constructor")
|
|
1255
1255
|
return e[t];
|
|
1256
1256
|
const i = s();
|
|
1257
1257
|
return e[t] = i, i;
|
|
1258
1258
|
}
|
|
1259
|
-
function
|
|
1259
|
+
function pn(e, t, s) {
|
|
1260
1260
|
const { _proxy: i, _context: n, _subProxy: o, _descriptors: r } = e;
|
|
1261
1261
|
let a = i[t];
|
|
1262
|
-
return
|
|
1262
|
+
return st(a) && r.isScriptable(t) && (a = mn(t, a, e, s)), B(a) && a.length && (a = _n(t, a, e, r.isIndexable)), De(t, a) && (a = mt(a, n, o && o[t], r)), a;
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1264
|
+
function mn(e, t, s, i) {
|
|
1265
1265
|
const { _proxy: n, _context: o, _subProxy: r, _stack: a } = s;
|
|
1266
1266
|
if (a.has(e))
|
|
1267
1267
|
throw new Error("Recursion detected: " + Array.from(a).join("->") + "->" + e);
|
|
1268
1268
|
a.add(e);
|
|
1269
1269
|
let c = t(o, r || i);
|
|
1270
|
-
return a.delete(e),
|
|
1270
|
+
return a.delete(e), De(e, c) && (c = Ce(n._scopes, n, e, c)), c;
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1272
|
+
function _n(e, t, s, i) {
|
|
1273
1273
|
const { _proxy: n, _context: o, _subProxy: r, _descriptors: a } = s;
|
|
1274
1274
|
if (typeof o.index < "u" && i(e))
|
|
1275
1275
|
return t[o.index % t.length];
|
|
@@ -1277,19 +1277,19 @@ function bn(e, t, s, i) {
|
|
|
1277
1277
|
const c = t, l = n._scopes.filter((h) => h !== c);
|
|
1278
1278
|
t = [];
|
|
1279
1279
|
for (const h of c) {
|
|
1280
|
-
const d =
|
|
1281
|
-
t.push(
|
|
1280
|
+
const d = Ce(l, n, e, h);
|
|
1281
|
+
t.push(mt(d, o, r && r[e], a));
|
|
1282
1282
|
}
|
|
1283
1283
|
}
|
|
1284
1284
|
return t;
|
|
1285
1285
|
}
|
|
1286
1286
|
function Xs(e, t, s) {
|
|
1287
|
-
return
|
|
1287
|
+
return st(e) ? e(t, s) : e;
|
|
1288
1288
|
}
|
|
1289
|
-
const
|
|
1290
|
-
function
|
|
1289
|
+
const bn = (e, t) => e === !0 ? t : typeof e == "string" ? Pt(t, e) : void 0;
|
|
1290
|
+
function xn(e, t, s, i, n) {
|
|
1291
1291
|
for (const o of t) {
|
|
1292
|
-
const r =
|
|
1292
|
+
const r = bn(s, o);
|
|
1293
1293
|
if (r) {
|
|
1294
1294
|
e.add(r);
|
|
1295
1295
|
const a = Xs(r._fallback, s, n);
|
|
@@ -1300,33 +1300,33 @@ function yn(e, t, s, i, n) {
|
|
|
1300
1300
|
}
|
|
1301
1301
|
return !1;
|
|
1302
1302
|
}
|
|
1303
|
-
function
|
|
1303
|
+
function Ce(e, t, s, i) {
|
|
1304
1304
|
const n = t._rootScopes, o = Xs(t._fallback, s, i), r = [
|
|
1305
1305
|
...e,
|
|
1306
1306
|
...n
|
|
1307
1307
|
], a = /* @__PURE__ */ new Set();
|
|
1308
1308
|
a.add(i);
|
|
1309
|
-
let c =
|
|
1310
|
-
return c === null || typeof o < "u" && o !== s && (c =
|
|
1309
|
+
let c = Qe(a, r, s, o || s, i);
|
|
1310
|
+
return c === null || typeof o < "u" && o !== s && (c = Qe(a, r, o, c, i), c === null) ? !1 : Oe(Array.from(a), [
|
|
1311
1311
|
""
|
|
1312
|
-
], n, o, () =>
|
|
1312
|
+
], n, o, () => yn(t, s, i));
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1314
|
+
function Qe(e, t, s, i, n) {
|
|
1315
1315
|
for (; s; )
|
|
1316
|
-
s =
|
|
1316
|
+
s = xn(e, t, s, i, n);
|
|
1317
1317
|
return s;
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function yn(e, t, s) {
|
|
1320
1320
|
const i = e._getTarget();
|
|
1321
1321
|
t in i || (i[t] = {});
|
|
1322
1322
|
const n = i[t];
|
|
1323
1323
|
return B(n) && w(s) ? s : n || {};
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1325
|
+
function vn(e, t, s, i) {
|
|
1326
1326
|
let n;
|
|
1327
1327
|
for (const o of t)
|
|
1328
|
-
if (n = Ks(
|
|
1329
|
-
return
|
|
1328
|
+
if (n = Ks(gn(o, e), s), typeof n < "u")
|
|
1329
|
+
return De(e, n) ? Ce(s, i, e, n) : n;
|
|
1330
1330
|
}
|
|
1331
1331
|
function Ks(e, t) {
|
|
1332
1332
|
for (const s of t) {
|
|
@@ -1337,21 +1337,21 @@ function Ks(e, t) {
|
|
|
1337
1337
|
return i;
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function Je(e) {
|
|
1341
1341
|
let t = e._keys;
|
|
1342
|
-
return t || (t = e._keys =
|
|
1342
|
+
return t || (t = e._keys = wn(e._scopes)), t;
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1344
|
+
function wn(e) {
|
|
1345
1345
|
const t = /* @__PURE__ */ new Set();
|
|
1346
1346
|
for (const s of e)
|
|
1347
1347
|
for (const i of Object.keys(s).filter((n) => !n.startsWith("_")))
|
|
1348
1348
|
t.add(i);
|
|
1349
1349
|
return Array.from(t);
|
|
1350
1350
|
}
|
|
1351
|
-
function
|
|
1351
|
+
function Ae() {
|
|
1352
1352
|
return typeof window < "u" && typeof document < "u";
|
|
1353
1353
|
}
|
|
1354
|
-
function
|
|
1354
|
+
function Pe(e) {
|
|
1355
1355
|
let t = e.parentNode;
|
|
1356
1356
|
return t && t.toString() === "[object ShadowRoot]" && (t = t.host), t;
|
|
1357
1357
|
}
|
|
@@ -1360,29 +1360,29 @@ function te(e, t, s) {
|
|
|
1360
1360
|
return typeof e == "string" ? (i = parseInt(e, 10), e.indexOf("%") !== -1 && (i = i / 100 * t.parentNode[s])) : i = e, i;
|
|
1361
1361
|
}
|
|
1362
1362
|
const ie = (e) => e.ownerDocument.defaultView.getComputedStyle(e, null);
|
|
1363
|
-
function
|
|
1363
|
+
function Mn(e, t) {
|
|
1364
1364
|
return ie(e).getPropertyValue(t);
|
|
1365
1365
|
}
|
|
1366
|
-
const
|
|
1366
|
+
const kn = [
|
|
1367
1367
|
"top",
|
|
1368
1368
|
"right",
|
|
1369
1369
|
"bottom",
|
|
1370
1370
|
"left"
|
|
1371
1371
|
];
|
|
1372
|
-
function
|
|
1372
|
+
function at(e, t, s) {
|
|
1373
1373
|
const i = {};
|
|
1374
1374
|
s = s ? "-" + s : "";
|
|
1375
1375
|
for (let n = 0; n < 4; n++) {
|
|
1376
|
-
const o =
|
|
1376
|
+
const o = kn[n];
|
|
1377
1377
|
i[o] = parseFloat(e[t + "-" + o + s]) || 0;
|
|
1378
1378
|
}
|
|
1379
1379
|
return i.width = i.left + i.right, i.height = i.top + i.bottom, i;
|
|
1380
1380
|
}
|
|
1381
|
-
const
|
|
1382
|
-
function
|
|
1381
|
+
const Sn = (e, t, s) => (e > 0 || t > 0) && (!s || !s.shadowRoot);
|
|
1382
|
+
function On(e, t) {
|
|
1383
1383
|
const s = e.touches, i = s && s.length ? s[0] : e, { offsetX: n, offsetY: o } = i;
|
|
1384
1384
|
let r = !1, a, c;
|
|
1385
|
-
if (
|
|
1385
|
+
if (Sn(n, o, e.target))
|
|
1386
1386
|
a = n, c = o;
|
|
1387
1387
|
else {
|
|
1388
1388
|
const l = t.getBoundingClientRect();
|
|
@@ -1394,24 +1394,24 @@ function Dn(e, t) {
|
|
|
1394
1394
|
box: r
|
|
1395
1395
|
};
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1397
|
+
function rt(e, t) {
|
|
1398
1398
|
if ("native" in e)
|
|
1399
1399
|
return e;
|
|
1400
|
-
const { canvas: s, currentDevicePixelRatio: i } = t, n = ie(s), o = n.boxSizing === "border-box", r =
|
|
1400
|
+
const { canvas: s, currentDevicePixelRatio: i } = t, n = ie(s), o = n.boxSizing === "border-box", r = at(n, "padding"), a = at(n, "border", "width"), { x: c, y: l, box: h } = On(e, s), d = r.left + (h && a.left), f = r.top + (h && a.top);
|
|
1401
1401
|
let { width: u, height: g } = t;
|
|
1402
1402
|
return o && (u -= r.width + a.width, g -= r.height + a.height), {
|
|
1403
1403
|
x: Math.round((c - d) / u * s.width / i),
|
|
1404
1404
|
y: Math.round((l - f) / g * s.height / i)
|
|
1405
1405
|
};
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function Dn(e, t, s) {
|
|
1408
1408
|
let i, n;
|
|
1409
1409
|
if (t === void 0 || s === void 0) {
|
|
1410
|
-
const o = e &&
|
|
1410
|
+
const o = e && Pe(e);
|
|
1411
1411
|
if (!o)
|
|
1412
1412
|
t = e.clientWidth, s = e.clientHeight;
|
|
1413
1413
|
else {
|
|
1414
|
-
const r = o.getBoundingClientRect(), a = ie(o), c =
|
|
1414
|
+
const r = o.getBoundingClientRect(), a = ie(o), c = at(a, "border", "width"), l = at(a, "padding");
|
|
1415
1415
|
t = r.width - l.width - c.width, s = r.height - l.height - c.height, i = te(a.maxWidth, o, "clientWidth"), n = te(a.maxHeight, o, "clientHeight");
|
|
1416
1416
|
}
|
|
1417
1417
|
}
|
|
@@ -1422,26 +1422,26 @@ function Cn(e, t, s) {
|
|
|
1422
1422
|
maxHeight: n || Qt
|
|
1423
1423
|
};
|
|
1424
1424
|
}
|
|
1425
|
-
const
|
|
1426
|
-
function
|
|
1427
|
-
const n = ie(e), o =
|
|
1425
|
+
const tt = (e) => Math.round(e * 10) / 10;
|
|
1426
|
+
function Cn(e, t, s, i) {
|
|
1427
|
+
const n = ie(e), o = at(n, "margin"), r = te(n.maxWidth, e, "clientWidth") || Qt, a = te(n.maxHeight, e, "clientHeight") || Qt, c = Dn(e, t, s);
|
|
1428
1428
|
let { width: l, height: h } = c;
|
|
1429
1429
|
if (n.boxSizing === "content-box") {
|
|
1430
|
-
const f =
|
|
1430
|
+
const f = at(n, "border", "width"), u = at(n, "padding");
|
|
1431
1431
|
l -= u.width + f.width, h -= u.height + f.height;
|
|
1432
1432
|
}
|
|
1433
|
-
return l = Math.max(0, l - o.width), h = Math.max(0, i ? l / i : h - o.height), l =
|
|
1433
|
+
return l = Math.max(0, l - o.width), h = Math.max(0, i ? l / i : h - o.height), l = tt(Math.min(l, r, c.maxWidth)), h = tt(Math.min(h, a, c.maxHeight)), l && !h && (h = tt(l / 2)), (t !== void 0 || s !== void 0) && i && c.height && h > c.height && (h = c.height, l = tt(Math.floor(h * i))), {
|
|
1434
1434
|
width: l,
|
|
1435
1435
|
height: h
|
|
1436
1436
|
};
|
|
1437
1437
|
}
|
|
1438
|
-
function
|
|
1439
|
-
const i = t || 1, n =
|
|
1440
|
-
e.height =
|
|
1438
|
+
function ts(e, t, s) {
|
|
1439
|
+
const i = t || 1, n = tt(e.height * i), o = tt(e.width * i);
|
|
1440
|
+
e.height = tt(e.height), e.width = tt(e.width);
|
|
1441
1441
|
const r = e.canvas;
|
|
1442
1442
|
return r.style && (s || !r.style.height && !r.style.width) && (r.style.height = `${e.height}px`, r.style.width = `${e.width}px`), e.currentDevicePixelRatio !== i || r.height !== n || r.width !== o ? (e.currentDevicePixelRatio = i, r.height = n, r.width = o, e.ctx.setTransform(i, 0, 0, i, 0, 0), !0) : !1;
|
|
1443
1443
|
}
|
|
1444
|
-
const
|
|
1444
|
+
const An = function() {
|
|
1445
1445
|
let e = !1;
|
|
1446
1446
|
try {
|
|
1447
1447
|
const t = {
|
|
@@ -1449,19 +1449,19 @@ const Pn = function() {
|
|
|
1449
1449
|
return e = !0, !1;
|
|
1450
1450
|
}
|
|
1451
1451
|
};
|
|
1452
|
-
|
|
1452
|
+
Ae() && (window.addEventListener("test", null, t), window.removeEventListener("test", null, t));
|
|
1453
1453
|
} catch {
|
|
1454
1454
|
}
|
|
1455
1455
|
return e;
|
|
1456
1456
|
}();
|
|
1457
|
-
function
|
|
1458
|
-
const s =
|
|
1457
|
+
function es(e, t) {
|
|
1458
|
+
const s = Mn(e, t), i = s && s.match(/^(\d+)(\.\d+)?px$/);
|
|
1459
1459
|
return i ? +i[1] : void 0;
|
|
1460
1460
|
}
|
|
1461
1461
|
function Wt(e, t, s) {
|
|
1462
1462
|
return e.options.clip ? e[s] : t[s];
|
|
1463
1463
|
}
|
|
1464
|
-
function
|
|
1464
|
+
function Pn(e, t) {
|
|
1465
1465
|
const { xScale: s, yScale: i } = e;
|
|
1466
1466
|
return s && i ? {
|
|
1467
1467
|
left: Wt(s, t, "left"),
|
|
@@ -1470,11 +1470,11 @@ function En(e, t) {
|
|
|
1470
1470
|
bottom: Wt(i, t, "bottom")
|
|
1471
1471
|
} : t;
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1473
|
+
function En(e, t) {
|
|
1474
1474
|
const s = t._clip;
|
|
1475
1475
|
if (s.disabled)
|
|
1476
1476
|
return !1;
|
|
1477
|
-
const i =
|
|
1477
|
+
const i = Pn(t, e.chartArea);
|
|
1478
1478
|
return {
|
|
1479
1479
|
left: s.left === !1 ? 0 : i.left - (s.left === !0 ? 0 : s.left),
|
|
1480
1480
|
right: s.right === !1 ? e.width : i.right + (s.right === !0 ? 0 : s.right),
|
|
@@ -1483,12 +1483,12 @@ function Rn(e, t) {
|
|
|
1483
1483
|
};
|
|
1484
1484
|
}
|
|
1485
1485
|
/*!
|
|
1486
|
-
* Chart.js v4.5.
|
|
1486
|
+
* Chart.js v4.5.1
|
|
1487
1487
|
* https://www.chartjs.org
|
|
1488
1488
|
* (c) 2025 Chart.js Contributors
|
|
1489
1489
|
* Released under the MIT License
|
|
1490
1490
|
*/
|
|
1491
|
-
class
|
|
1491
|
+
class Rn {
|
|
1492
1492
|
constructor() {
|
|
1493
1493
|
this._request = null, this._charts = /* @__PURE__ */ new Map(), this._running = !1, this._lastDate = void 0;
|
|
1494
1494
|
}
|
|
@@ -1564,34 +1564,34 @@ class In {
|
|
|
1564
1564
|
return this._charts.delete(t);
|
|
1565
1565
|
}
|
|
1566
1566
|
}
|
|
1567
|
-
var Z = /* @__PURE__ */ new
|
|
1568
|
-
const
|
|
1567
|
+
var Z = /* @__PURE__ */ new Rn();
|
|
1568
|
+
const ss = "transparent", In = {
|
|
1569
1569
|
boolean(e, t, s) {
|
|
1570
1570
|
return s > 0.5 ? t : e;
|
|
1571
1571
|
},
|
|
1572
1572
|
color(e, t, s) {
|
|
1573
|
-
const i =
|
|
1573
|
+
const i = Ke(e || ss), n = i.valid && Ke(t || ss);
|
|
1574
1574
|
return n && n.valid ? n.mix(i, s).hexString() : t;
|
|
1575
1575
|
},
|
|
1576
1576
|
number(e, t, s) {
|
|
1577
1577
|
return e + (t - e) * s;
|
|
1578
1578
|
}
|
|
1579
1579
|
};
|
|
1580
|
-
class
|
|
1580
|
+
class Tn {
|
|
1581
1581
|
constructor(t, s, i, n) {
|
|
1582
1582
|
const o = s[i];
|
|
1583
|
-
n =
|
|
1583
|
+
n = Ht([
|
|
1584
1584
|
t.to,
|
|
1585
1585
|
n,
|
|
1586
1586
|
o,
|
|
1587
1587
|
t.from
|
|
1588
1588
|
]);
|
|
1589
|
-
const r =
|
|
1589
|
+
const r = Ht([
|
|
1590
1590
|
t.from,
|
|
1591
1591
|
o,
|
|
1592
1592
|
n
|
|
1593
1593
|
]);
|
|
1594
|
-
this._active = !0, this._fn = t.fn ||
|
|
1594
|
+
this._active = !0, this._fn = t.fn || In[t.type || typeof r], this._easing = Ot[t.easing] || Ot.linear, this._start = Math.floor(Date.now() + (t.delay || 0)), this._duration = this._total = Math.floor(t.duration), this._loop = !!t.loop, this._target = s, this._prop = i, this._from = r, this._to = n, this._promises = void 0;
|
|
1595
1595
|
}
|
|
1596
1596
|
active() {
|
|
1597
1597
|
return this._active;
|
|
@@ -1600,12 +1600,12 @@ class Ln {
|
|
|
1600
1600
|
if (this._active) {
|
|
1601
1601
|
this._notify(!1);
|
|
1602
1602
|
const n = this._target[this._prop], o = i - this._start, r = this._duration - o;
|
|
1603
|
-
this._start = i, this._duration = Math.floor(Math.max(r, t.duration)), this._total += o, this._loop = !!t.loop, this._to =
|
|
1603
|
+
this._start = i, this._duration = Math.floor(Math.max(r, t.duration)), this._total += o, this._loop = !!t.loop, this._to = Ht([
|
|
1604
1604
|
t.to,
|
|
1605
1605
|
s,
|
|
1606
1606
|
n,
|
|
1607
1607
|
t.from
|
|
1608
|
-
]), this._from =
|
|
1608
|
+
]), this._from = Ht([
|
|
1609
1609
|
t.from,
|
|
1610
1610
|
n,
|
|
1611
1611
|
s
|
|
@@ -1643,7 +1643,7 @@ class Ln {
|
|
|
1643
1643
|
i[n][s]();
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
1646
|
-
class
|
|
1646
|
+
class Ln {
|
|
1647
1647
|
constructor(t, s) {
|
|
1648
1648
|
this._chart = t, this._properties = /* @__PURE__ */ new Map(), this.configure(s);
|
|
1649
1649
|
}
|
|
@@ -1666,11 +1666,11 @@ class zn {
|
|
|
1666
1666
|
});
|
|
1667
1667
|
}
|
|
1668
1668
|
_animateOptions(t, s) {
|
|
1669
|
-
const i = s.options, n =
|
|
1669
|
+
const i = s.options, n = Fn(t, i);
|
|
1670
1670
|
if (!n)
|
|
1671
1671
|
return [];
|
|
1672
1672
|
const o = this._createAnimations(n, i);
|
|
1673
|
-
return i.$shared &&
|
|
1673
|
+
return i.$shared && zn(t.options.$animations, i).then(() => {
|
|
1674
1674
|
t.options = i;
|
|
1675
1675
|
}, () => {
|
|
1676
1676
|
}), o;
|
|
@@ -1699,7 +1699,7 @@ class zn {
|
|
|
1699
1699
|
t[l] = h;
|
|
1700
1700
|
continue;
|
|
1701
1701
|
}
|
|
1702
|
-
o[l] = d = new
|
|
1702
|
+
o[l] = d = new Tn(f, t, l, h), n.push(d);
|
|
1703
1703
|
}
|
|
1704
1704
|
return n;
|
|
1705
1705
|
}
|
|
@@ -1713,7 +1713,7 @@ class zn {
|
|
|
1713
1713
|
return Z.add(this._chart, i), !0;
|
|
1714
1714
|
}
|
|
1715
1715
|
}
|
|
1716
|
-
function
|
|
1716
|
+
function zn(e, t) {
|
|
1717
1717
|
const s = [], i = Object.keys(t);
|
|
1718
1718
|
for (let n = 0; n < i.length; n++) {
|
|
1719
1719
|
const o = e[i[n]];
|
|
@@ -1721,7 +1721,7 @@ function Fn(e, t) {
|
|
|
1721
1721
|
}
|
|
1722
1722
|
return Promise.all(s);
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1724
|
+
function Fn(e, t) {
|
|
1725
1725
|
if (!t)
|
|
1726
1726
|
return;
|
|
1727
1727
|
let s = e.options;
|
|
@@ -1734,17 +1734,17 @@ function jn(e, t) {
|
|
|
1734
1734
|
$animations: {}
|
|
1735
1735
|
})), s;
|
|
1736
1736
|
}
|
|
1737
|
-
function
|
|
1737
|
+
function is(e, t) {
|
|
1738
1738
|
const s = e && e.options || {}, i = s.reverse, n = s.min === void 0 ? t : 0, o = s.max === void 0 ? t : 0;
|
|
1739
1739
|
return {
|
|
1740
1740
|
start: i ? o : n,
|
|
1741
1741
|
end: i ? n : o
|
|
1742
1742
|
};
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function jn(e, t, s) {
|
|
1745
1745
|
if (s === !1)
|
|
1746
1746
|
return !1;
|
|
1747
|
-
const i =
|
|
1747
|
+
const i = is(e, s), n = is(t, s);
|
|
1748
1748
|
return {
|
|
1749
1749
|
top: n.end,
|
|
1750
1750
|
right: i.end,
|
|
@@ -1752,7 +1752,7 @@ function Bn(e, t, s) {
|
|
|
1752
1752
|
left: i.start
|
|
1753
1753
|
};
|
|
1754
1754
|
}
|
|
1755
|
-
function
|
|
1755
|
+
function Bn(e) {
|
|
1756
1756
|
let t, s, i, n;
|
|
1757
1757
|
return w(e) ? (t = e.top, s = e.right, i = e.bottom, n = e.left) : t = s = i = n = e, {
|
|
1758
1758
|
top: t,
|
|
@@ -1769,7 +1769,7 @@ function Us(e, t) {
|
|
|
1769
1769
|
s.push(i[n].index);
|
|
1770
1770
|
return s;
|
|
1771
1771
|
}
|
|
1772
|
-
function
|
|
1772
|
+
function ns(e, t, s, i = {}) {
|
|
1773
1773
|
const n = e.keys, o = i.mode === "single";
|
|
1774
1774
|
let r, a, c, l;
|
|
1775
1775
|
if (t === null)
|
|
@@ -1781,11 +1781,11 @@ function is(e, t, s, i = {}) {
|
|
|
1781
1781
|
continue;
|
|
1782
1782
|
break;
|
|
1783
1783
|
}
|
|
1784
|
-
l = e.values[c],
|
|
1784
|
+
l = e.values[c], pt(l) && (o || t === 0 || We(t) === We(l)) && (t += l);
|
|
1785
1785
|
}
|
|
1786
1786
|
return !h && !i.all ? 0 : t;
|
|
1787
1787
|
}
|
|
1788
|
-
function
|
|
1788
|
+
function Hn(e, t) {
|
|
1789
1789
|
const { iScale: s, vScale: i } = t, n = s.axis === "x" ? "x" : "y", o = i.axis === "x" ? "x" : "y", r = Object.keys(e), a = new Array(r.length);
|
|
1790
1790
|
let c, l, h;
|
|
1791
1791
|
for (c = 0, l = r.length; c < l; ++c)
|
|
@@ -1799,21 +1799,21 @@ function he(e, t) {
|
|
|
1799
1799
|
const s = e && e.options.stacked;
|
|
1800
1800
|
return s || s === void 0 && t.stack !== void 0;
|
|
1801
1801
|
}
|
|
1802
|
-
function
|
|
1802
|
+
function Wn(e, t, s) {
|
|
1803
1803
|
return `${e.id}.${t.id}.${s.stack || s.type}`;
|
|
1804
1804
|
}
|
|
1805
|
-
function
|
|
1805
|
+
function Vn(e) {
|
|
1806
1806
|
const { min: t, max: s, minDefined: i, maxDefined: n } = e.getUserBounds();
|
|
1807
1807
|
return {
|
|
1808
1808
|
min: i ? t : Number.NEGATIVE_INFINITY,
|
|
1809
1809
|
max: n ? s : Number.POSITIVE_INFINITY
|
|
1810
1810
|
};
|
|
1811
1811
|
}
|
|
1812
|
-
function
|
|
1812
|
+
function Nn(e, t, s) {
|
|
1813
1813
|
const i = e[t] || (e[t] = {});
|
|
1814
1814
|
return i[s] || (i[s] = {});
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1816
|
+
function os(e, t, s, i) {
|
|
1817
1817
|
for (const n of t.getMatchingVisibleMetas(i).reverse()) {
|
|
1818
1818
|
const o = e[n.index];
|
|
1819
1819
|
if (s && o > 0 || !s && o < 0)
|
|
@@ -1821,12 +1821,12 @@ function ns(e, t, s, i) {
|
|
|
1821
1821
|
}
|
|
1822
1822
|
return null;
|
|
1823
1823
|
}
|
|
1824
|
-
function
|
|
1825
|
-
const { chart: s, _cachedMeta: i } = e, n = s._stacks || (s._stacks = {}), { iScale: o, vScale: r, index: a } = i, c = o.axis, l = r.axis, h =
|
|
1824
|
+
function rs(e, t) {
|
|
1825
|
+
const { chart: s, _cachedMeta: i } = e, n = s._stacks || (s._stacks = {}), { iScale: o, vScale: r, index: a } = i, c = o.axis, l = r.axis, h = Wn(o, r, i), d = t.length;
|
|
1826
1826
|
let f;
|
|
1827
1827
|
for (let u = 0; u < d; ++u) {
|
|
1828
1828
|
const g = t[u], { [c]: m, [l]: b } = g, p = g._stacks || (g._stacks = {});
|
|
1829
|
-
f = p[l] =
|
|
1829
|
+
f = p[l] = Nn(n, h, m), f[a] = b, f._top = os(f, r, !0, i.type), f._bottom = os(f, r, !1, i.type);
|
|
1830
1830
|
const _ = f._visualValues || (f._visualValues = {});
|
|
1831
1831
|
_[a] = b;
|
|
1832
1832
|
}
|
|
@@ -1835,8 +1835,8 @@ function de(e, t) {
|
|
|
1835
1835
|
const s = e.scales;
|
|
1836
1836
|
return Object.keys(s).filter((i) => s[i].axis === t).shift();
|
|
1837
1837
|
}
|
|
1838
|
-
function
|
|
1839
|
-
return
|
|
1838
|
+
function $n(e, t) {
|
|
1839
|
+
return Tt(e, {
|
|
1840
1840
|
active: !1,
|
|
1841
1841
|
dataset: void 0,
|
|
1842
1842
|
datasetIndex: t,
|
|
@@ -1845,8 +1845,8 @@ function Yn(e, t) {
|
|
|
1845
1845
|
type: "dataset"
|
|
1846
1846
|
});
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1849
|
-
return
|
|
1848
|
+
function Yn(e, t, s) {
|
|
1849
|
+
return Tt(e, {
|
|
1850
1850
|
active: !1,
|
|
1851
1851
|
dataIndex: t,
|
|
1852
1852
|
parsed: void 0,
|
|
@@ -1857,7 +1857,7 @@ function Xn(e, t, s) {
|
|
|
1857
1857
|
type: "data"
|
|
1858
1858
|
});
|
|
1859
1859
|
}
|
|
1860
|
-
function
|
|
1860
|
+
function xt(e, t) {
|
|
1861
1861
|
const s = e.controller.index, i = e.vScale && e.vScale.axis;
|
|
1862
1862
|
if (i) {
|
|
1863
1863
|
t = t || e._parsed;
|
|
@@ -1869,7 +1869,7 @@ function bt(e, t) {
|
|
|
1869
1869
|
}
|
|
1870
1870
|
}
|
|
1871
1871
|
}
|
|
1872
|
-
const fe = (e) => e === "reset" || e === "none",
|
|
1872
|
+
const fe = (e) => e === "reset" || e === "none", as = (e, t) => t ? e : Object.assign({}, e), Xn = (e, t, s) => e && !t.hidden && t._stacked && {
|
|
1873
1873
|
keys: Us(s, !0),
|
|
1874
1874
|
values: null
|
|
1875
1875
|
};
|
|
@@ -1885,7 +1885,7 @@ class qs {
|
|
|
1885
1885
|
this.configure(), this.linkScales(), t._stacked = he(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");
|
|
1886
1886
|
}
|
|
1887
1887
|
updateIndex(t) {
|
|
1888
|
-
this.index !== t &&
|
|
1888
|
+
this.index !== t && xt(this._cachedMeta), this.index = t;
|
|
1889
1889
|
}
|
|
1890
1890
|
linkScales() {
|
|
1891
1891
|
const t = this.chart, s = this._cachedMeta, i = this.getDataset(), n = (d, f, u, g) => d === "x" ? f : d === "r" ? g : u, o = s.xAxisID = A(i.xAxisID, de(t, "x")), r = s.yAxisID = A(i.yAxisID, de(t, "y")), a = s.rAxisID = A(i.rAxisID, de(t, "r")), c = s.indexAxis, l = s.iAxisID = n(c, o, r, a), h = s.vAxisID = n(c, r, o, a);
|
|
@@ -1909,20 +1909,20 @@ class qs {
|
|
|
1909
1909
|
}
|
|
1910
1910
|
_destroy() {
|
|
1911
1911
|
const t = this._cachedMeta;
|
|
1912
|
-
this._data &&
|
|
1912
|
+
this._data && Ne(this._data, this), t._stacked && xt(t);
|
|
1913
1913
|
}
|
|
1914
1914
|
_dataCheck() {
|
|
1915
1915
|
const t = this.getDataset(), s = t.data || (t.data = []), i = this._data;
|
|
1916
1916
|
if (w(s)) {
|
|
1917
1917
|
const n = this._cachedMeta;
|
|
1918
|
-
this._data =
|
|
1918
|
+
this._data = Hn(s, n);
|
|
1919
1919
|
} else if (i !== s) {
|
|
1920
1920
|
if (i) {
|
|
1921
|
-
|
|
1921
|
+
Ne(i, this);
|
|
1922
1922
|
const n = this._cachedMeta;
|
|
1923
|
-
|
|
1923
|
+
xt(n), n._parsed = [];
|
|
1924
1924
|
}
|
|
1925
|
-
s && Object.isExtensible(s) &&
|
|
1925
|
+
s && Object.isExtensible(s) && $i(s, this), this._syncList = [], this._data = s;
|
|
1926
1926
|
}
|
|
1927
1927
|
}
|
|
1928
1928
|
addElements() {
|
|
@@ -1934,7 +1934,7 @@ class qs {
|
|
|
1934
1934
|
let n = !1;
|
|
1935
1935
|
this._dataCheck();
|
|
1936
1936
|
const o = s._stacked;
|
|
1937
|
-
s._stacked = he(s.vScale, s), s.stack !== i.stack && (n = !0,
|
|
1937
|
+
s._stacked = he(s.vScale, s), s.stack !== i.stack && (n = !0, xt(s), s.stack = i.stack), this._resyncElements(t), (n || o !== s._stacked) && (rs(this, s._parsed), s._stacked = he(s.vScale, s));
|
|
1938
1938
|
}
|
|
1939
1939
|
configure() {
|
|
1940
1940
|
const t = this.chart.config, s = t.datasetScopeKeys(this._type), i = t.getOptionScopes(this.getDataset(), s, !0);
|
|
@@ -1952,7 +1952,7 @@ class qs {
|
|
|
1952
1952
|
i._parsed[h + t] = d = f[h], c && (u() && (c = !1), l = d);
|
|
1953
1953
|
i._sorted = c;
|
|
1954
1954
|
}
|
|
1955
|
-
r &&
|
|
1955
|
+
r && rs(this, f);
|
|
1956
1956
|
}
|
|
1957
1957
|
parsePrimitiveData(t, s, i, n) {
|
|
1958
1958
|
const { iScale: o, vScale: r } = t, a = o.axis, c = r.axis, l = o.getLabels(), h = o === r, d = new Array(n);
|
|
@@ -1979,8 +1979,8 @@ class qs {
|
|
|
1979
1979
|
let h, d, f, u;
|
|
1980
1980
|
for (h = 0, d = n; h < d; ++h)
|
|
1981
1981
|
f = h + i, u = s[f], l[h] = {
|
|
1982
|
-
x: o.parse(
|
|
1983
|
-
y: r.parse(
|
|
1982
|
+
x: o.parse(Pt(u, a), f),
|
|
1983
|
+
y: r.parse(Pt(u, c), f)
|
|
1984
1984
|
};
|
|
1985
1985
|
return l;
|
|
1986
1986
|
}
|
|
@@ -1995,7 +1995,7 @@ class qs {
|
|
|
1995
1995
|
keys: Us(n, !0),
|
|
1996
1996
|
values: s._stacks[t.axis]._visualValues
|
|
1997
1997
|
};
|
|
1998
|
-
return
|
|
1998
|
+
return ns(a, r, o.index, {
|
|
1999
1999
|
mode: i
|
|
2000
2000
|
});
|
|
2001
2001
|
}
|
|
@@ -2003,18 +2003,18 @@ class qs {
|
|
|
2003
2003
|
const o = i[s.axis];
|
|
2004
2004
|
let r = o === null ? NaN : o;
|
|
2005
2005
|
const a = n && i._stacks[s.axis];
|
|
2006
|
-
n && a && (n.values = a, r =
|
|
2006
|
+
n && a && (n.values = a, r = ns(n, o, this._cachedMeta.index)), t.min = Math.min(t.min, r), t.max = Math.max(t.max, r);
|
|
2007
2007
|
}
|
|
2008
2008
|
getMinMax(t, s) {
|
|
2009
|
-
const i = this._cachedMeta, n = i._parsed, o = i._sorted && t === i.iScale, r = n.length, a = this._getOtherScale(t), c =
|
|
2009
|
+
const i = this._cachedMeta, n = i._parsed, o = i._sorted && t === i.iScale, r = n.length, a = this._getOtherScale(t), c = Xn(s, i, this.chart), l = {
|
|
2010
2010
|
min: Number.POSITIVE_INFINITY,
|
|
2011
2011
|
max: Number.NEGATIVE_INFINITY
|
|
2012
|
-
}, { min: h, max: d } =
|
|
2012
|
+
}, { min: h, max: d } = Vn(a);
|
|
2013
2013
|
let f, u;
|
|
2014
2014
|
function g() {
|
|
2015
2015
|
u = n[f];
|
|
2016
2016
|
const m = u[a.axis];
|
|
2017
|
-
return !
|
|
2017
|
+
return !pt(u[t.axis]) || h > m || d < m;
|
|
2018
2018
|
}
|
|
2019
2019
|
for (f = 0; f < r && !(!g() && (this.updateRangeFromParsed(l, t, u, c), o)); ++f)
|
|
2020
2020
|
;
|
|
@@ -2031,7 +2031,7 @@ class qs {
|
|
|
2031
2031
|
const s = this._cachedMeta._parsed, i = [];
|
|
2032
2032
|
let n, o, r;
|
|
2033
2033
|
for (n = 0, o = s.length; n < o; ++n)
|
|
2034
|
-
r = s[n][t.axis],
|
|
2034
|
+
r = s[n][t.axis], pt(r) && i.push(r);
|
|
2035
2035
|
return i;
|
|
2036
2036
|
}
|
|
2037
2037
|
getMaxOverflow() {
|
|
@@ -2046,7 +2046,7 @@ class qs {
|
|
|
2046
2046
|
}
|
|
2047
2047
|
_update(t) {
|
|
2048
2048
|
const s = this._cachedMeta;
|
|
2049
|
-
this.update(t || "default"), s._clip =
|
|
2049
|
+
this.update(t || "default"), s._clip = Bn(A(this.options.clip, jn(s.xScale, s.yScale, this.getMaxOverflow())));
|
|
2050
2050
|
}
|
|
2051
2051
|
update(t) {
|
|
2052
2052
|
}
|
|
@@ -2069,9 +2069,9 @@ class qs {
|
|
|
2069
2069
|
let o;
|
|
2070
2070
|
if (t >= 0 && t < this._cachedMeta.data.length) {
|
|
2071
2071
|
const r = this._cachedMeta.data[t];
|
|
2072
|
-
o = r.$context || (r.$context =
|
|
2072
|
+
o = r.$context || (r.$context = Yn(this.getContext(), t, r)), o.parsed = this.getParsed(t), o.raw = n.data[t], o.index = o.dataIndex = t;
|
|
2073
2073
|
} else
|
|
2074
|
-
o = this.$context || (this.$context =
|
|
2074
|
+
o = this.$context || (this.$context = $n(this.chart.getContext(), this.index)), o.dataset = n, o.index = o.datasetIndex = this.index;
|
|
2075
2075
|
return o.active = !!s, o.mode = i, o;
|
|
2076
2076
|
}
|
|
2077
2077
|
resolveDatasetElementOptions(t) {
|
|
@@ -2083,7 +2083,7 @@ class qs {
|
|
|
2083
2083
|
_resolveElementOptions(t, s = "default", i) {
|
|
2084
2084
|
const n = s === "active", o = this._cachedDataOpts, r = t + "-" + s, a = o[r], c = this.enableOptionSharing && Gt(i);
|
|
2085
2085
|
if (a)
|
|
2086
|
-
return
|
|
2086
|
+
return as(a, c);
|
|
2087
2087
|
const l = this.chart.config, h = l.datasetElementScopeKeys(this._type, t), d = n ? [
|
|
2088
2088
|
`${t}Hover`,
|
|
2089
2089
|
"hover",
|
|
@@ -2093,7 +2093,7 @@ class qs {
|
|
|
2093
2093
|
t,
|
|
2094
2094
|
""
|
|
2095
2095
|
], f = l.getOptionScopes(this.getDataset(), h), u = Object.keys(R.elements[t]), g = () => this.getContext(i, n, s), m = l.resolveNamedOptions(f, u, g, d);
|
|
2096
|
-
return m.$shared && (m.$shared = c, o[r] = Object.freeze(
|
|
2096
|
+
return m.$shared && (m.$shared = c, o[r] = Object.freeze(as(m, c))), m;
|
|
2097
2097
|
}
|
|
2098
2098
|
_resolveAnimations(t, s, i) {
|
|
2099
2099
|
const n = this.chart, o = this._cachedDataOpts, r = `animation-${s}`, a = o[r];
|
|
@@ -2104,7 +2104,7 @@ class qs {
|
|
|
2104
2104
|
const h = this.chart.config, d = h.datasetAnimationScopeKeys(this._type, s), f = h.getOptionScopes(this.getDataset(), d);
|
|
2105
2105
|
c = h.createResolver(f, this.getContext(t, i, s));
|
|
2106
2106
|
}
|
|
2107
|
-
const l = new
|
|
2107
|
+
const l = new Ln(n, c && c.animations);
|
|
2108
2108
|
return c && c._cacheable && (o[r] = Object.freeze(l)), l;
|
|
2109
2109
|
}
|
|
2110
2110
|
getSharedOptions(t) {
|
|
@@ -2173,7 +2173,7 @@ class qs {
|
|
|
2173
2173
|
const i = this._cachedMeta;
|
|
2174
2174
|
if (this._parsing) {
|
|
2175
2175
|
const n = i._parsed.splice(t, s);
|
|
2176
|
-
i._stacked &&
|
|
2176
|
+
i._stacked && xt(i, n);
|
|
2177
2177
|
}
|
|
2178
2178
|
i.data.splice(t, s);
|
|
2179
2179
|
}
|
|
@@ -2232,7 +2232,7 @@ class qs {
|
|
|
2232
2232
|
]);
|
|
2233
2233
|
}
|
|
2234
2234
|
}
|
|
2235
|
-
function
|
|
2235
|
+
function Kn(e, t, s) {
|
|
2236
2236
|
let i = 1, n = 1, o = 0, r = 0;
|
|
2237
2237
|
if (t < T) {
|
|
2238
2238
|
const a = e, c = a + t, l = Math.cos(a), h = Math.sin(a), d = Math.cos(c), f = Math.sin(c), u = (x, v, y) => Jt(x, a, c, !0) ? 1 : Math.max(v, v * s, y, y * s), g = (x, v, y) => Jt(x, a, c, !0) ? -1 : Math.min(v, v * s, y, y * s), m = u(0, l, d), b = u($, h, f), p = g(z, l, d), _ = g(z + $, h, f);
|
|
@@ -2245,7 +2245,7 @@ function Un(e, t, s) {
|
|
|
2245
2245
|
offsetY: r
|
|
2246
2246
|
};
|
|
2247
2247
|
}
|
|
2248
|
-
class
|
|
2248
|
+
class Un extends qs {
|
|
2249
2249
|
static id = "doughnut";
|
|
2250
2250
|
static defaults = {
|
|
2251
2251
|
datasetElementType: !1,
|
|
@@ -2288,24 +2288,25 @@ class qn extends qs {
|
|
|
2288
2288
|
legend: {
|
|
2289
2289
|
labels: {
|
|
2290
2290
|
generateLabels(t) {
|
|
2291
|
-
const s = t.data;
|
|
2292
|
-
|
|
2293
|
-
const
|
|
2294
|
-
return
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2291
|
+
const s = t.data, { labels: { pointStyle: i, textAlign: n, color: o, useBorderRadius: r, borderRadius: a } } = t.legend.options;
|
|
2292
|
+
return s.labels.length && s.datasets.length ? s.labels.map((c, l) => {
|
|
2293
|
+
const d = t.getDatasetMeta(0).controller.getStyle(l);
|
|
2294
|
+
return {
|
|
2295
|
+
text: c,
|
|
2296
|
+
fillStyle: d.backgroundColor,
|
|
2297
|
+
fontColor: o,
|
|
2298
|
+
hidden: !t.getDataVisibility(l),
|
|
2299
|
+
lineDash: d.borderDash,
|
|
2300
|
+
lineDashOffset: d.borderDashOffset,
|
|
2301
|
+
lineJoin: d.borderJoinStyle,
|
|
2302
|
+
lineWidth: d.borderWidth,
|
|
2303
|
+
strokeStyle: d.borderColor,
|
|
2304
|
+
textAlign: n,
|
|
2305
|
+
pointStyle: i,
|
|
2306
|
+
borderRadius: r && (a || d.borderRadius),
|
|
2307
|
+
index: l
|
|
2308
|
+
};
|
|
2309
|
+
}) : [];
|
|
2309
2310
|
}
|
|
2310
2311
|
},
|
|
2311
2312
|
onClick(t, s, i) {
|
|
@@ -2327,7 +2328,7 @@ class qn extends qs {
|
|
|
2327
2328
|
let o = (c) => +i[c];
|
|
2328
2329
|
if (w(i[t])) {
|
|
2329
2330
|
const { key: c = "value" } = this._parsing;
|
|
2330
|
-
o = (l) => +
|
|
2331
|
+
o = (l) => +Pt(i[l], c);
|
|
2331
2332
|
}
|
|
2332
2333
|
let r, a;
|
|
2333
2334
|
for (r = t, a = t + s; r < a; ++r)
|
|
@@ -2335,10 +2336,10 @@ class qn extends qs {
|
|
|
2335
2336
|
}
|
|
2336
2337
|
}
|
|
2337
2338
|
_getRotation() {
|
|
2338
|
-
return
|
|
2339
|
+
return gt(this.options.rotation - 90);
|
|
2339
2340
|
}
|
|
2340
2341
|
_getCircumference() {
|
|
2341
|
-
return
|
|
2342
|
+
return gt(this.options.circumference);
|
|
2342
2343
|
}
|
|
2343
2344
|
_getRotationExtents() {
|
|
2344
2345
|
let t = T, s = -T;
|
|
@@ -2353,7 +2354,7 @@ class qn extends qs {
|
|
|
2353
2354
|
};
|
|
2354
2355
|
}
|
|
2355
2356
|
update(t) {
|
|
2356
|
-
const s = this.chart, { chartArea: i } = s, n = this._cachedMeta, o = n.data, r = this.getMaxBorderWidth() + this.getMaxOffset(o) + this.options.spacing, a = Math.max((Math.min(i.width, i.height) - r) / 2, 0), c = Math.min(
|
|
2357
|
+
const s = this.chart, { chartArea: i } = s, n = this._cachedMeta, o = n.data, r = this.getMaxBorderWidth() + this.getMaxOffset(o) + this.options.spacing, a = Math.max((Math.min(i.width, i.height) - r) / 2, 0), c = Math.min(Ei(this.options.cutout, a), 1), l = this._getRingWeight(this.index), { circumference: h, rotation: d } = this._getRotationExtents(), { ratioX: f, ratioY: u, offsetX: g, offsetY: m } = Kn(d, h, c), b = (i.width - r) / f, p = (i.height - r) / u, _ = Math.max(Math.min(b, p) / 2, 0), x = Rs(this.options.radius, _), v = Math.max(x * c, 0), y = (x - v) / this._getVisibleDatasetWeightTotal();
|
|
2357
2358
|
this.offsetX = g * x, this.offsetY = m * x, n.total = this.calculateTotal(), this.outerRadius = x - y * this._getRingWeightOffset(this.index), this.innerRadius = Math.max(this.outerRadius - y * l, 0), this.updateElements(o, 0, o.length, t);
|
|
2358
2359
|
}
|
|
2359
2360
|
_circumference(t, s) {
|
|
@@ -2392,7 +2393,7 @@ class qn extends qs {
|
|
|
2392
2393
|
return s > 0 && !isNaN(t) ? T * (Math.abs(t) / s) : 0;
|
|
2393
2394
|
}
|
|
2394
2395
|
getLabelAndValue(t) {
|
|
2395
|
-
const s = this._cachedMeta, i = this.chart, n = i.data.labels || [], o =
|
|
2396
|
+
const s = this._cachedMeta, i = this.chart, n = i.data.labels || [], o = Qi(s._parsed[t], i.options.locale);
|
|
2396
2397
|
return {
|
|
2397
2398
|
label: n[t] || "",
|
|
2398
2399
|
value: o
|
|
@@ -2436,10 +2437,10 @@ class qn extends qs {
|
|
|
2436
2437
|
return this._getRingWeightOffset(this.chart.data.datasets.length) || 1;
|
|
2437
2438
|
}
|
|
2438
2439
|
}
|
|
2439
|
-
function
|
|
2440
|
+
function qn(e, t, s, i) {
|
|
2440
2441
|
const { controller: n, data: o, _sorted: r } = e, a = n._cachedMeta.iScale, c = e.dataset && e.dataset.options ? e.dataset.options.spanGaps : null;
|
|
2441
2442
|
if (a && t === a.axis && t !== "r" && r && o.length) {
|
|
2442
|
-
const l = a._reversePixels ?
|
|
2443
|
+
const l = a._reversePixels ? Ni : Vi;
|
|
2443
2444
|
if (i) {
|
|
2444
2445
|
if (n._sharedOptions) {
|
|
2445
2446
|
const h = o[0], d = typeof h.getRange == "function" && h.getRange(t);
|
|
@@ -2470,14 +2471,14 @@ function Zn(e, t, s, i) {
|
|
|
2470
2471
|
function ne(e, t, s, i, n) {
|
|
2471
2472
|
const o = e.getSortedVisibleDatasetMetas(), r = s[t];
|
|
2472
2473
|
for (let a = 0, c = o.length; a < c; ++a) {
|
|
2473
|
-
const { index: l, data: h } = o[a], { lo: d, hi: f } =
|
|
2474
|
+
const { index: l, data: h } = o[a], { lo: d, hi: f } = qn(o[a], t, r, n);
|
|
2474
2475
|
for (let u = d; u <= f; ++u) {
|
|
2475
2476
|
const g = h[u];
|
|
2476
2477
|
g.skip || i(g, l, u);
|
|
2477
2478
|
}
|
|
2478
2479
|
}
|
|
2479
2480
|
}
|
|
2480
|
-
function
|
|
2481
|
+
function Zn(e) {
|
|
2481
2482
|
const t = e.indexOf("x") !== -1, s = e.indexOf("y") !== -1;
|
|
2482
2483
|
return function(i, n) {
|
|
2483
2484
|
const o = t ? Math.abs(i.x - n.x) : 0, r = s ? Math.abs(i.y - n.y) : 0;
|
|
@@ -2494,7 +2495,7 @@ function ue(e, t, s, i, n) {
|
|
|
2494
2495
|
});
|
|
2495
2496
|
}, !0), o;
|
|
2496
2497
|
}
|
|
2497
|
-
function
|
|
2498
|
+
function Gn(e, t, s, i) {
|
|
2498
2499
|
let n = [];
|
|
2499
2500
|
function o(r, a, c) {
|
|
2500
2501
|
const { startAngle: l, endAngle: h } = r.getProps([
|
|
@@ -2512,9 +2513,9 @@ function Qn(e, t, s, i) {
|
|
|
2512
2513
|
}
|
|
2513
2514
|
return ne(e, s, t, o), n;
|
|
2514
2515
|
}
|
|
2515
|
-
function
|
|
2516
|
+
function Qn(e, t, s, i, n, o) {
|
|
2516
2517
|
let r = [];
|
|
2517
|
-
const a =
|
|
2518
|
+
const a = Zn(s);
|
|
2518
2519
|
let c = Number.POSITIVE_INFINITY;
|
|
2519
2520
|
function l(h, d, f) {
|
|
2520
2521
|
const u = h.inRange(t.x, t.y, n);
|
|
@@ -2539,9 +2540,9 @@ function Jn(e, t, s, i, n, o) {
|
|
|
2539
2540
|
return ne(e, s, t, l), r;
|
|
2540
2541
|
}
|
|
2541
2542
|
function ge(e, t, s, i, n, o) {
|
|
2542
|
-
return !o && !e.isPointInArea(t) ? [] : s === "r" && !i ?
|
|
2543
|
+
return !o && !e.isPointInArea(t) ? [] : s === "r" && !i ? Gn(e, t, s, n) : Qn(e, t, s, i, n, o);
|
|
2543
2544
|
}
|
|
2544
|
-
function
|
|
2545
|
+
function cs(e, t, s, i, n) {
|
|
2545
2546
|
const o = [], r = s === "x" ? "inXRange" : "inYRange";
|
|
2546
2547
|
let a = !1;
|
|
2547
2548
|
return ne(e, s, t, (c, l, h) => {
|
|
@@ -2552,10 +2553,10 @@ function as(e, t, s, i, n) {
|
|
|
2552
2553
|
}), a = a || c.inRange(t.x, t.y, n));
|
|
2553
2554
|
}), i && !a ? [] : o;
|
|
2554
2555
|
}
|
|
2555
|
-
var
|
|
2556
|
+
var Jn = {
|
|
2556
2557
|
modes: {
|
|
2557
2558
|
index(e, t, s, i) {
|
|
2558
|
-
const n =
|
|
2559
|
+
const n = rt(t, e), o = s.axis || "x", r = s.includeInvisible || !1, a = s.intersect ? ue(e, n, o, i, r) : ge(e, n, o, !1, i, r), c = [];
|
|
2559
2560
|
return a.length ? (e.getSortedVisibleDatasetMetas().forEach((l) => {
|
|
2560
2561
|
const h = a[0].index, d = l.data[h];
|
|
2561
2562
|
d && !d.skip && c.push({
|
|
@@ -2566,7 +2567,7 @@ var to = {
|
|
|
2566
2567
|
}), c) : [];
|
|
2567
2568
|
},
|
|
2568
2569
|
dataset(e, t, s, i) {
|
|
2569
|
-
const n =
|
|
2570
|
+
const n = rt(t, e), o = s.axis || "xy", r = s.includeInvisible || !1;
|
|
2570
2571
|
let a = s.intersect ? ue(e, n, o, i, r) : ge(e, n, o, !1, i, r);
|
|
2571
2572
|
if (a.length > 0) {
|
|
2572
2573
|
const c = a[0].datasetIndex, l = e.getDatasetMeta(c).data;
|
|
@@ -2581,20 +2582,20 @@ var to = {
|
|
|
2581
2582
|
return a;
|
|
2582
2583
|
},
|
|
2583
2584
|
point(e, t, s, i) {
|
|
2584
|
-
const n =
|
|
2585
|
+
const n = rt(t, e), o = s.axis || "xy", r = s.includeInvisible || !1;
|
|
2585
2586
|
return ue(e, n, o, i, r);
|
|
2586
2587
|
},
|
|
2587
2588
|
nearest(e, t, s, i) {
|
|
2588
|
-
const n =
|
|
2589
|
+
const n = rt(t, e), o = s.axis || "xy", r = s.includeInvisible || !1;
|
|
2589
2590
|
return ge(e, n, o, s.intersect, i, r);
|
|
2590
2591
|
},
|
|
2591
2592
|
x(e, t, s, i) {
|
|
2592
|
-
const n =
|
|
2593
|
-
return
|
|
2593
|
+
const n = rt(t, e);
|
|
2594
|
+
return cs(e, n, "x", s.intersect, i);
|
|
2594
2595
|
},
|
|
2595
2596
|
y(e, t, s, i) {
|
|
2596
|
-
const n =
|
|
2597
|
-
return
|
|
2597
|
+
const n = rt(t, e);
|
|
2598
|
+
return cs(e, n, "y", s.intersect, i);
|
|
2598
2599
|
}
|
|
2599
2600
|
}
|
|
2600
2601
|
};
|
|
@@ -2604,19 +2605,19 @@ const Zs = [
|
|
|
2604
2605
|
"right",
|
|
2605
2606
|
"bottom"
|
|
2606
2607
|
];
|
|
2607
|
-
function
|
|
2608
|
+
function yt(e, t) {
|
|
2608
2609
|
return e.filter((s) => s.pos === t);
|
|
2609
2610
|
}
|
|
2610
|
-
function
|
|
2611
|
+
function ls(e, t) {
|
|
2611
2612
|
return e.filter((s) => Zs.indexOf(s.pos) === -1 && s.box.axis === t);
|
|
2612
2613
|
}
|
|
2613
|
-
function
|
|
2614
|
+
function vt(e, t) {
|
|
2614
2615
|
return e.sort((s, i) => {
|
|
2615
2616
|
const n = t ? i : s, o = t ? s : i;
|
|
2616
2617
|
return n.weight === o.weight ? n.index - o.index : n.weight - o.weight;
|
|
2617
2618
|
});
|
|
2618
2619
|
}
|
|
2619
|
-
function
|
|
2620
|
+
function to(e) {
|
|
2620
2621
|
const t = [];
|
|
2621
2622
|
let s, i, n, o, r, a;
|
|
2622
2623
|
for (s = 0, i = (e || []).length; s < i; ++s)
|
|
@@ -2631,7 +2632,7 @@ function eo(e) {
|
|
|
2631
2632
|
});
|
|
2632
2633
|
return t;
|
|
2633
2634
|
}
|
|
2634
|
-
function
|
|
2635
|
+
function eo(e) {
|
|
2635
2636
|
const t = {};
|
|
2636
2637
|
for (const s of e) {
|
|
2637
2638
|
const { stack: i, pos: n, stackWeight: o } = s;
|
|
@@ -2647,8 +2648,8 @@ function so(e) {
|
|
|
2647
2648
|
}
|
|
2648
2649
|
return t;
|
|
2649
2650
|
}
|
|
2650
|
-
function
|
|
2651
|
-
const s =
|
|
2651
|
+
function so(e, t) {
|
|
2652
|
+
const s = eo(e), { vBoxMaxWidth: i, hBoxMaxHeight: n } = t;
|
|
2652
2653
|
let o, r, a;
|
|
2653
2654
|
for (o = 0, r = e.length; o < r; ++o) {
|
|
2654
2655
|
a = e[o];
|
|
@@ -2657,24 +2658,24 @@ function io(e, t) {
|
|
|
2657
2658
|
}
|
|
2658
2659
|
return s;
|
|
2659
2660
|
}
|
|
2660
|
-
function
|
|
2661
|
-
const t =
|
|
2661
|
+
function io(e) {
|
|
2662
|
+
const t = to(e), s = vt(t.filter((l) => l.box.fullSize), !0), i = vt(yt(t, "left"), !0), n = vt(yt(t, "right")), o = vt(yt(t, "top"), !0), r = vt(yt(t, "bottom")), a = ls(t, "x"), c = ls(t, "y");
|
|
2662
2663
|
return {
|
|
2663
2664
|
fullSize: s,
|
|
2664
2665
|
leftAndTop: i.concat(o),
|
|
2665
2666
|
rightAndBottom: n.concat(c).concat(r).concat(a),
|
|
2666
|
-
chartArea:
|
|
2667
|
+
chartArea: yt(t, "chartArea"),
|
|
2667
2668
|
vertical: i.concat(n).concat(c),
|
|
2668
2669
|
horizontal: o.concat(r).concat(a)
|
|
2669
2670
|
};
|
|
2670
2671
|
}
|
|
2671
|
-
function
|
|
2672
|
+
function hs(e, t, s, i) {
|
|
2672
2673
|
return Math.max(e[s], t[s]) + Math.max(e[i], t[i]);
|
|
2673
2674
|
}
|
|
2674
2675
|
function Gs(e, t) {
|
|
2675
2676
|
e.top = Math.max(e.top, t.top), e.left = Math.max(e.left, t.left), e.bottom = Math.max(e.bottom, t.bottom), e.right = Math.max(e.right, t.right);
|
|
2676
2677
|
}
|
|
2677
|
-
function
|
|
2678
|
+
function no(e, t, s, i) {
|
|
2678
2679
|
const { pos: n, box: o } = s, r = e.maxPadding;
|
|
2679
2680
|
if (!w(n)) {
|
|
2680
2681
|
s.size && (e[n] -= s.size);
|
|
@@ -2685,7 +2686,7 @@ function oo(e, t, s, i) {
|
|
|
2685
2686
|
d.size = Math.max(d.size, s.horizontal ? o.height : o.width), s.size = d.size / d.count, e[n] += s.size;
|
|
2686
2687
|
}
|
|
2687
2688
|
o.getPadding && Gs(r, o.getPadding());
|
|
2688
|
-
const a = Math.max(0, t.outerWidth -
|
|
2689
|
+
const a = Math.max(0, t.outerWidth - hs(r, e, "left", "right")), c = Math.max(0, t.outerHeight - hs(r, e, "top", "bottom")), l = a !== e.w, h = c !== e.h;
|
|
2689
2690
|
return e.w = a, e.h = c, s.horizontal ? {
|
|
2690
2691
|
same: l,
|
|
2691
2692
|
other: h
|
|
@@ -2694,7 +2695,7 @@ function oo(e, t, s, i) {
|
|
|
2694
2695
|
other: l
|
|
2695
2696
|
};
|
|
2696
2697
|
}
|
|
2697
|
-
function
|
|
2698
|
+
function oo(e) {
|
|
2698
2699
|
const t = e.maxPadding;
|
|
2699
2700
|
function s(i) {
|
|
2700
2701
|
const n = Math.max(t[i] - e[i], 0);
|
|
@@ -2702,7 +2703,7 @@ function ro(e) {
|
|
|
2702
2703
|
}
|
|
2703
2704
|
e.y += s("top"), e.x += s("left"), s("right"), s("bottom");
|
|
2704
2705
|
}
|
|
2705
|
-
function
|
|
2706
|
+
function ro(e, t) {
|
|
2706
2707
|
const s = t.maxPadding;
|
|
2707
2708
|
function i(n) {
|
|
2708
2709
|
const o = {
|
|
@@ -2723,20 +2724,20 @@ function ao(e, t) {
|
|
|
2723
2724
|
"bottom"
|
|
2724
2725
|
]);
|
|
2725
2726
|
}
|
|
2726
|
-
function
|
|
2727
|
+
function St(e, t, s, i) {
|
|
2727
2728
|
const n = [];
|
|
2728
2729
|
let o, r, a, c, l, h;
|
|
2729
2730
|
for (o = 0, r = e.length, l = 0; o < r; ++o) {
|
|
2730
|
-
a = e[o], c = a.box, c.update(a.width || t.w, a.height || t.h,
|
|
2731
|
-
const { same: d, other: f } =
|
|
2731
|
+
a = e[o], c = a.box, c.update(a.width || t.w, a.height || t.h, ro(a.horizontal, t));
|
|
2732
|
+
const { same: d, other: f } = no(t, s, a, i);
|
|
2732
2733
|
l |= d && n.length, h = h || f, c.fullSize || n.push(a);
|
|
2733
2734
|
}
|
|
2734
|
-
return l &&
|
|
2735
|
+
return l && St(n, t, s, i) || h;
|
|
2735
2736
|
}
|
|
2736
2737
|
function Vt(e, t, s, i, n) {
|
|
2737
2738
|
e.top = s, e.left = t, e.right = t + i, e.bottom = s + n, e.width = i, e.height = n;
|
|
2738
2739
|
}
|
|
2739
|
-
function
|
|
2740
|
+
function ds(e, t, s, i) {
|
|
2740
2741
|
const n = s.padding;
|
|
2741
2742
|
let { x: o, y: r } = t;
|
|
2742
2743
|
for (const a of e) {
|
|
@@ -2777,7 +2778,7 @@ var Nt = {
|
|
|
2777
2778
|
update(e, t, s, i) {
|
|
2778
2779
|
if (!e)
|
|
2779
2780
|
return;
|
|
2780
|
-
const n =
|
|
2781
|
+
const n = Et(e.options.layout.padding), o = Math.max(t - n.width, 0), r = Math.max(s - n.height, 0), a = io(e.boxes), c = a.vertical, l = a.horizontal;
|
|
2781
2782
|
j(e.boxes, (m) => {
|
|
2782
2783
|
typeof m.beforeLayout == "function" && m.beforeLayout();
|
|
2783
2784
|
});
|
|
@@ -2790,15 +2791,15 @@ var Nt = {
|
|
|
2790
2791
|
vBoxMaxWidth: o / 2 / h,
|
|
2791
2792
|
hBoxMaxHeight: r / 2
|
|
2792
2793
|
}), f = Object.assign({}, n);
|
|
2793
|
-
Gs(f,
|
|
2794
|
+
Gs(f, Et(i));
|
|
2794
2795
|
const u = Object.assign({
|
|
2795
2796
|
maxPadding: f,
|
|
2796
2797
|
w: o,
|
|
2797
2798
|
h: r,
|
|
2798
2799
|
x: n.left,
|
|
2799
2800
|
y: n.top
|
|
2800
|
-
}, n), g =
|
|
2801
|
-
|
|
2801
|
+
}, n), g = so(c.concat(l), d);
|
|
2802
|
+
St(a.fullSize, u, d, g), St(c, u, d, g), St(l, u, d, g) && St(c, u, d, g), oo(u), ds(a.leftAndTop, u, d, g), u.x += u.w, u.y += u.h, ds(a.rightAndBottom, u, d, g), e.chartArea = {
|
|
2802
2803
|
left: u.left,
|
|
2803
2804
|
top: u.top,
|
|
2804
2805
|
right: u.left + u.w,
|
|
@@ -2841,7 +2842,7 @@ class Qs {
|
|
|
2841
2842
|
updateConfig(t) {
|
|
2842
2843
|
}
|
|
2843
2844
|
}
|
|
2844
|
-
class
|
|
2845
|
+
class ao extends Qs {
|
|
2845
2846
|
acquireContext(t) {
|
|
2846
2847
|
return t && t.getContext && t.getContext("2d") || null;
|
|
2847
2848
|
}
|
|
@@ -2849,7 +2850,7 @@ class co extends Qs {
|
|
|
2849
2850
|
t.options.animation = !1;
|
|
2850
2851
|
}
|
|
2851
2852
|
}
|
|
2852
|
-
const Ut = "$chartjs",
|
|
2853
|
+
const Ut = "$chartjs", co = {
|
|
2853
2854
|
touchstart: "mousedown",
|
|
2854
2855
|
touchmove: "mousemove",
|
|
2855
2856
|
touchend: "mouseup",
|
|
@@ -2859,8 +2860,8 @@ const Ut = "$chartjs", lo = {
|
|
|
2859
2860
|
pointerup: "mouseup",
|
|
2860
2861
|
pointerleave: "mouseout",
|
|
2861
2862
|
pointerout: "mouseout"
|
|
2862
|
-
},
|
|
2863
|
-
function
|
|
2863
|
+
}, fs = (e) => e === null || e === "";
|
|
2864
|
+
function lo(e, t) {
|
|
2864
2865
|
const s = e.style, i = e.getAttribute("height"), n = e.getAttribute("width");
|
|
2865
2866
|
if (e[Ut] = {
|
|
2866
2867
|
initial: {
|
|
@@ -2872,30 +2873,30 @@ function ho(e, t) {
|
|
|
2872
2873
|
width: s.width
|
|
2873
2874
|
}
|
|
2874
2875
|
}
|
|
2875
|
-
}, s.display = s.display || "block", s.boxSizing = s.boxSizing || "border-box",
|
|
2876
|
-
const o =
|
|
2876
|
+
}, s.display = s.display || "block", s.boxSizing = s.boxSizing || "border-box", fs(n)) {
|
|
2877
|
+
const o = es(e, "width");
|
|
2877
2878
|
o !== void 0 && (e.width = o);
|
|
2878
2879
|
}
|
|
2879
|
-
if (
|
|
2880
|
+
if (fs(i))
|
|
2880
2881
|
if (e.style.height === "")
|
|
2881
2882
|
e.height = e.width / (t || 2);
|
|
2882
2883
|
else {
|
|
2883
|
-
const o =
|
|
2884
|
+
const o = es(e, "height");
|
|
2884
2885
|
o !== void 0 && (e.height = o);
|
|
2885
2886
|
}
|
|
2886
2887
|
return e;
|
|
2887
2888
|
}
|
|
2888
|
-
const Js =
|
|
2889
|
+
const Js = An ? {
|
|
2889
2890
|
passive: !0
|
|
2890
2891
|
} : !1;
|
|
2891
|
-
function
|
|
2892
|
+
function ho(e, t, s) {
|
|
2892
2893
|
e && e.addEventListener(t, s, Js);
|
|
2893
2894
|
}
|
|
2894
|
-
function
|
|
2895
|
+
function fo(e, t, s) {
|
|
2895
2896
|
e && e.canvas && e.canvas.removeEventListener(t, s, Js);
|
|
2896
2897
|
}
|
|
2897
|
-
function
|
|
2898
|
-
const s =
|
|
2898
|
+
function uo(e, t) {
|
|
2899
|
+
const s = co[e.type] || e.type, { x: i, y: n } = rt(e, t);
|
|
2899
2900
|
return {
|
|
2900
2901
|
type: s,
|
|
2901
2902
|
chart: t,
|
|
@@ -2909,7 +2910,7 @@ function ee(e, t) {
|
|
|
2909
2910
|
if (s === t || s.contains(t))
|
|
2910
2911
|
return !0;
|
|
2911
2912
|
}
|
|
2912
|
-
function
|
|
2913
|
+
function go(e, t, s) {
|
|
2913
2914
|
const i = e.canvas, n = new MutationObserver((o) => {
|
|
2914
2915
|
let r = !1;
|
|
2915
2916
|
for (const a of o)
|
|
@@ -2921,7 +2922,7 @@ function po(e, t, s) {
|
|
|
2921
2922
|
subtree: !0
|
|
2922
2923
|
}), n;
|
|
2923
2924
|
}
|
|
2924
|
-
function
|
|
2925
|
+
function po(e, t, s) {
|
|
2925
2926
|
const i = e.canvas, n = new MutationObserver((o) => {
|
|
2926
2927
|
let r = !1;
|
|
2927
2928
|
for (const a of o)
|
|
@@ -2933,22 +2934,22 @@ function mo(e, t, s) {
|
|
|
2933
2934
|
subtree: !0
|
|
2934
2935
|
}), n;
|
|
2935
2936
|
}
|
|
2936
|
-
const
|
|
2937
|
-
let
|
|
2937
|
+
const Rt = /* @__PURE__ */ new Map();
|
|
2938
|
+
let us = 0;
|
|
2938
2939
|
function ti() {
|
|
2939
2940
|
const e = window.devicePixelRatio;
|
|
2940
|
-
e !==
|
|
2941
|
+
e !== us && (us = e, Rt.forEach((t, s) => {
|
|
2941
2942
|
s.currentDevicePixelRatio !== e && t();
|
|
2942
2943
|
}));
|
|
2943
2944
|
}
|
|
2944
|
-
function
|
|
2945
|
-
|
|
2945
|
+
function mo(e, t) {
|
|
2946
|
+
Rt.size || window.addEventListener("resize", ti), Rt.set(e, t);
|
|
2946
2947
|
}
|
|
2947
|
-
function
|
|
2948
|
-
|
|
2948
|
+
function _o(e) {
|
|
2949
|
+
Rt.delete(e), Rt.size || window.removeEventListener("resize", ti);
|
|
2949
2950
|
}
|
|
2950
|
-
function
|
|
2951
|
-
const i = e.canvas, n = i &&
|
|
2951
|
+
function bo(e, t, s) {
|
|
2952
|
+
const i = e.canvas, n = i && Pe(i);
|
|
2952
2953
|
if (!n)
|
|
2953
2954
|
return;
|
|
2954
2955
|
const o = js((a, c) => {
|
|
@@ -2958,21 +2959,21 @@ function xo(e, t, s) {
|
|
|
2958
2959
|
const c = a[0], l = c.contentRect.width, h = c.contentRect.height;
|
|
2959
2960
|
l === 0 && h === 0 || o(l, h);
|
|
2960
2961
|
});
|
|
2961
|
-
return r.observe(n),
|
|
2962
|
+
return r.observe(n), mo(e, o), r;
|
|
2962
2963
|
}
|
|
2963
2964
|
function pe(e, t, s) {
|
|
2964
|
-
s && s.disconnect(), t === "resize" &&
|
|
2965
|
+
s && s.disconnect(), t === "resize" && _o(e);
|
|
2965
2966
|
}
|
|
2966
|
-
function
|
|
2967
|
+
function xo(e, t, s) {
|
|
2967
2968
|
const i = e.canvas, n = js((o) => {
|
|
2968
|
-
e.ctx !== null && s(
|
|
2969
|
+
e.ctx !== null && s(uo(o, e));
|
|
2969
2970
|
}, e);
|
|
2970
|
-
return
|
|
2971
|
+
return ho(i, t, n), n;
|
|
2971
2972
|
}
|
|
2972
|
-
class
|
|
2973
|
+
class yo extends Qs {
|
|
2973
2974
|
acquireContext(t, s) {
|
|
2974
2975
|
const i = t && t.getContext && t.getContext("2d");
|
|
2975
|
-
return i && i.canvas === t ? (
|
|
2976
|
+
return i && i.canvas === t ? (lo(t, s), i) : null;
|
|
2976
2977
|
}
|
|
2977
2978
|
releaseContext(t) {
|
|
2978
2979
|
const s = t.canvas;
|
|
@@ -2994,10 +2995,10 @@ class vo extends Qs {
|
|
|
2994
2995
|
addEventListener(t, s, i) {
|
|
2995
2996
|
this.removeEventListener(t, s);
|
|
2996
2997
|
const n = t.$proxies || (t.$proxies = {}), r = {
|
|
2997
|
-
attach:
|
|
2998
|
-
detach:
|
|
2999
|
-
resize:
|
|
3000
|
-
}[s] ||
|
|
2998
|
+
attach: go,
|
|
2999
|
+
detach: po,
|
|
3000
|
+
resize: bo
|
|
3001
|
+
}[s] || xo;
|
|
3001
3002
|
n[s] = r(t, s, i);
|
|
3002
3003
|
}
|
|
3003
3004
|
removeEventListener(t, s) {
|
|
@@ -3008,23 +3009,23 @@ class vo extends Qs {
|
|
|
3008
3009
|
attach: pe,
|
|
3009
3010
|
detach: pe,
|
|
3010
3011
|
resize: pe
|
|
3011
|
-
}[s] ||
|
|
3012
|
+
}[s] || fo)(t, s, n), i[s] = void 0;
|
|
3012
3013
|
}
|
|
3013
3014
|
getDevicePixelRatio() {
|
|
3014
3015
|
return window.devicePixelRatio;
|
|
3015
3016
|
}
|
|
3016
3017
|
getMaximumSize(t, s, i, n) {
|
|
3017
|
-
return
|
|
3018
|
+
return Cn(t, s, i, n);
|
|
3018
3019
|
}
|
|
3019
3020
|
isAttached(t) {
|
|
3020
|
-
const s = t &&
|
|
3021
|
+
const s = t && Pe(t);
|
|
3021
3022
|
return !!(s && s.isConnected);
|
|
3022
3023
|
}
|
|
3023
3024
|
}
|
|
3024
|
-
function
|
|
3025
|
-
return !
|
|
3025
|
+
function vo(e) {
|
|
3026
|
+
return !Ae() || typeof OffscreenCanvas < "u" && e instanceof OffscreenCanvas ? ao : yo;
|
|
3026
3027
|
}
|
|
3027
|
-
class
|
|
3028
|
+
class Ee {
|
|
3028
3029
|
static defaults = {};
|
|
3029
3030
|
static defaultRoutes = void 0;
|
|
3030
3031
|
x;
|
|
@@ -3043,7 +3044,7 @@ class Pe {
|
|
|
3043
3044
|
};
|
|
3044
3045
|
}
|
|
3045
3046
|
hasValue() {
|
|
3046
|
-
return
|
|
3047
|
+
return Ve(this.x) && Ve(this.y);
|
|
3047
3048
|
}
|
|
3048
3049
|
getProps(t, s) {
|
|
3049
3050
|
const i = this.$animations;
|
|
@@ -3055,11 +3056,11 @@ class Pe {
|
|
|
3055
3056
|
}), n;
|
|
3056
3057
|
}
|
|
3057
3058
|
}
|
|
3058
|
-
function
|
|
3059
|
-
const s = e.options.ticks, i =
|
|
3059
|
+
function wo(e, t) {
|
|
3060
|
+
const s = e.options.ticks, i = Mo(e), n = Math.min(s.maxTicksLimit || i, i), o = s.major.enabled ? So(t) : [], r = o.length, a = o[0], c = o[r - 1], l = [];
|
|
3060
3061
|
if (r > n)
|
|
3061
|
-
return
|
|
3062
|
-
const h =
|
|
3062
|
+
return Oo(t, l, o, r / n), l;
|
|
3063
|
+
const h = ko(o, t, n);
|
|
3063
3064
|
if (r > 0) {
|
|
3064
3065
|
let d, f;
|
|
3065
3066
|
const u = r > 1 ? Math.round((c - a) / (r - 1)) : null;
|
|
@@ -3069,15 +3070,15 @@ function Mo(e, t) {
|
|
|
3069
3070
|
}
|
|
3070
3071
|
return $t(t, l, h), l;
|
|
3071
3072
|
}
|
|
3072
|
-
function
|
|
3073
|
+
function Mo(e) {
|
|
3073
3074
|
const t = e.options.offset, s = e._tickSize(), i = e._length / s + (t ? 0 : 1), n = e._maxLength / s;
|
|
3074
3075
|
return Math.floor(Math.min(i, n));
|
|
3075
3076
|
}
|
|
3076
|
-
function
|
|
3077
|
-
const i =
|
|
3077
|
+
function ko(e, t, s) {
|
|
3078
|
+
const i = Do(e), n = t.length / s;
|
|
3078
3079
|
if (!i)
|
|
3079
3080
|
return Math.max(n, 1);
|
|
3080
|
-
const o =
|
|
3081
|
+
const o = Fi(i);
|
|
3081
3082
|
for (let r = 0, a = o.length - 1; r < a; r++) {
|
|
3082
3083
|
const c = o[r];
|
|
3083
3084
|
if (c > n)
|
|
@@ -3085,14 +3086,14 @@ function So(e, t, s) {
|
|
|
3085
3086
|
}
|
|
3086
3087
|
return Math.max(n, 1);
|
|
3087
3088
|
}
|
|
3088
|
-
function
|
|
3089
|
+
function So(e) {
|
|
3089
3090
|
const t = [];
|
|
3090
3091
|
let s, i;
|
|
3091
3092
|
for (s = 0, i = e.length; s < i; s++)
|
|
3092
3093
|
e[s].major && t.push(s);
|
|
3093
3094
|
return t;
|
|
3094
3095
|
}
|
|
3095
|
-
function
|
|
3096
|
+
function Oo(e, t, s, i) {
|
|
3096
3097
|
let n = 0, o = s[0], r;
|
|
3097
3098
|
for (i = Math.ceil(i), r = 0; r < e.length; r++)
|
|
3098
3099
|
r === o && (t.push(e[r]), n++, o = s[n * i]);
|
|
@@ -3105,7 +3106,7 @@ function $t(e, t, s, i, n) {
|
|
|
3105
3106
|
for (l = Math.max(o, 0); l < r; l++)
|
|
3106
3107
|
l === h && (t.push(e[l]), a++, h = Math.round(o + a * s));
|
|
3107
3108
|
}
|
|
3108
|
-
function
|
|
3109
|
+
function Do(e) {
|
|
3109
3110
|
const t = e.length;
|
|
3110
3111
|
let s, i;
|
|
3111
3112
|
if (t < 2)
|
|
@@ -3115,21 +3116,21 @@ function Co(e) {
|
|
|
3115
3116
|
return !1;
|
|
3116
3117
|
return i;
|
|
3117
3118
|
}
|
|
3118
|
-
const
|
|
3119
|
-
function
|
|
3119
|
+
const Co = (e) => e === "left" ? "right" : e === "right" ? "left" : e, gs = (e, t, s) => t === "top" || t === "left" ? e[t] + s : e[t] - s, ps = (e, t) => Math.min(t || e, e);
|
|
3120
|
+
function ms(e, t) {
|
|
3120
3121
|
const s = [], i = e.length / t, n = e.length;
|
|
3121
3122
|
let o = 0;
|
|
3122
3123
|
for (; o < n; o += i)
|
|
3123
3124
|
s.push(e[Math.floor(o)]);
|
|
3124
3125
|
return s;
|
|
3125
3126
|
}
|
|
3126
|
-
function
|
|
3127
|
+
function Ao(e, t, s) {
|
|
3127
3128
|
const i = e.ticks.length, n = Math.min(t, i - 1), o = e._startPixel, r = e._endPixel, a = 1e-6;
|
|
3128
3129
|
let c = e.getPixelForTick(n), l;
|
|
3129
3130
|
if (!(s && (i === 1 ? l = Math.max(c - o, r - c) : t === 0 ? l = (e.getPixelForTick(1) - c) / 2 : l = (c - e.getPixelForTick(n - 1)) / 2, c += n < t ? l : -l, c < o - a || c > r + a)))
|
|
3130
3131
|
return c;
|
|
3131
3132
|
}
|
|
3132
|
-
function
|
|
3133
|
+
function Po(e, t) {
|
|
3133
3134
|
j(e, (s) => {
|
|
3134
3135
|
const i = s.gc, n = i.length / 2;
|
|
3135
3136
|
let o;
|
|
@@ -3140,48 +3141,48 @@ function Eo(e, t) {
|
|
|
3140
3141
|
}
|
|
3141
3142
|
});
|
|
3142
3143
|
}
|
|
3143
|
-
function
|
|
3144
|
+
function wt(e) {
|
|
3144
3145
|
return e.drawTicks ? e.tickLength : 0;
|
|
3145
3146
|
}
|
|
3146
|
-
function
|
|
3147
|
+
function _s(e, t) {
|
|
3147
3148
|
if (!e.display)
|
|
3148
3149
|
return 0;
|
|
3149
|
-
const s = be(e.font, t), i =
|
|
3150
|
+
const s = be(e.font, t), i = Et(e.padding);
|
|
3150
3151
|
return (B(e.text) ? e.text.length : 1) * s.lineHeight + i.height;
|
|
3151
3152
|
}
|
|
3152
|
-
function
|
|
3153
|
-
return
|
|
3153
|
+
function Eo(e, t) {
|
|
3154
|
+
return Tt(e, {
|
|
3154
3155
|
scale: t,
|
|
3155
3156
|
type: "scale"
|
|
3156
3157
|
});
|
|
3157
3158
|
}
|
|
3158
|
-
function
|
|
3159
|
-
return
|
|
3159
|
+
function Ro(e, t, s) {
|
|
3160
|
+
return Tt(e, {
|
|
3160
3161
|
tick: s,
|
|
3161
3162
|
index: t,
|
|
3162
3163
|
type: "tick"
|
|
3163
3164
|
});
|
|
3164
3165
|
}
|
|
3165
|
-
function
|
|
3166
|
-
let i =
|
|
3167
|
-
return (s && t !== "right" || !s && t === "right") && (i =
|
|
3166
|
+
function Io(e, t, s) {
|
|
3167
|
+
let i = Xi(e);
|
|
3168
|
+
return (s && t !== "right" || !s && t === "right") && (i = Co(i)), i;
|
|
3168
3169
|
}
|
|
3169
|
-
function
|
|
3170
|
+
function To(e, t, s, i) {
|
|
3170
3171
|
const { top: n, left: o, bottom: r, right: a, chart: c } = e, { chartArea: l, scales: h } = c;
|
|
3171
3172
|
let d = 0, f, u, g;
|
|
3172
3173
|
const m = r - n, b = a - o;
|
|
3173
3174
|
if (e.isHorizontal()) {
|
|
3174
|
-
if (u =
|
|
3175
|
+
if (u = $e(i, o, a), w(s)) {
|
|
3175
3176
|
const p = Object.keys(s)[0], _ = s[p];
|
|
3176
3177
|
g = h[p].getPixelForValue(_) + m - t;
|
|
3177
|
-
} else s === "center" ? g = (l.bottom + l.top) / 2 + m - t : g =
|
|
3178
|
+
} else s === "center" ? g = (l.bottom + l.top) / 2 + m - t : g = gs(e, s, t);
|
|
3178
3179
|
f = a - o;
|
|
3179
3180
|
} else {
|
|
3180
3181
|
if (w(s)) {
|
|
3181
3182
|
const p = Object.keys(s)[0], _ = s[p];
|
|
3182
3183
|
u = h[p].getPixelForValue(_) - b + t;
|
|
3183
|
-
} else s === "center" ? u = (l.left + l.right) / 2 - b + t : u =
|
|
3184
|
-
g =
|
|
3184
|
+
} else s === "center" ? u = (l.left + l.right) / 2 - b + t : u = gs(e, s, t);
|
|
3185
|
+
g = $e(i, r, n), d = s === "left" ? -$ : $;
|
|
3185
3186
|
}
|
|
3186
3187
|
return {
|
|
3187
3188
|
titleX: u,
|
|
@@ -3190,7 +3191,7 @@ function Lo(e, t, s, i) {
|
|
|
3190
3191
|
rotation: d
|
|
3191
3192
|
};
|
|
3192
3193
|
}
|
|
3193
|
-
class
|
|
3194
|
+
class Re extends Ee {
|
|
3194
3195
|
constructor(t) {
|
|
3195
3196
|
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 = {
|
|
3196
3197
|
left: 0,
|
|
@@ -3210,8 +3211,8 @@ class Ee extends Pe {
|
|
|
3210
3211
|
return t = K(t, Number.POSITIVE_INFINITY), s = K(s, Number.NEGATIVE_INFINITY), i = K(i, Number.POSITIVE_INFINITY), n = K(n, Number.NEGATIVE_INFINITY), {
|
|
3211
3212
|
min: K(t, i),
|
|
3212
3213
|
max: K(s, n),
|
|
3213
|
-
minDefined:
|
|
3214
|
-
maxDefined:
|
|
3214
|
+
minDefined: pt(t),
|
|
3215
|
+
maxDefined: pt(s)
|
|
3215
3216
|
};
|
|
3216
3217
|
}
|
|
3217
3218
|
getMinMax(t) {
|
|
@@ -3262,9 +3263,9 @@ class Ee extends Pe {
|
|
|
3262
3263
|
right: 0,
|
|
3263
3264
|
top: 0,
|
|
3264
3265
|
bottom: 0
|
|
3265
|
-
}, i), this.ticks = null, this._labelSizes = null, this._gridLineItems = null, this._labelItems = null, this.beforeSetDimensions(), this.setDimensions(), this.afterSetDimensions(), this._maxLength = this.isHorizontal() ? this.width + i.left + i.right : this.height + i.top + i.bottom, this._dataLimitsCached || (this.beforeDataLimits(), this.determineDataLimits(), this.afterDataLimits(), this._range =
|
|
3266
|
+
}, i), this.ticks = null, this._labelSizes = null, this._gridLineItems = null, this._labelItems = null, this.beforeSetDimensions(), this.setDimensions(), this.afterSetDimensions(), this._maxLength = this.isHorizontal() ? this.width + i.left + i.right : this.height + i.top + i.bottom, this._dataLimitsCached || (this.beforeDataLimits(), this.determineDataLimits(), this.afterDataLimits(), this._range = un(this, o, n), this._dataLimitsCached = !0), this.beforeBuildTicks(), this.ticks = this.buildTicks() || [], this.afterBuildTicks();
|
|
3266
3267
|
const c = a < this.ticks.length;
|
|
3267
|
-
this._convertTicksToLabels(c ?
|
|
3268
|
+
this._convertTicksToLabels(c ? ms(this.ticks, a) : this.ticks), this.configure(), this.beforeCalculateLabelRotation(), this.calculateLabelRotation(), this.afterCalculateLabelRotation(), r.display && (r.autoSkip || r.source === "auto") && (this.ticks = wo(this, this.ticks), this._labelSizes = null, this.afterAutoSkip()), c && this._convertTicksToLabels(this.ticks), this.beforeFit(), this.fit(), this.afterFit(), this.afterUpdate();
|
|
3268
3269
|
}
|
|
3269
3270
|
configure() {
|
|
3270
3271
|
let t = this.options.reverse, s, i;
|
|
@@ -3336,14 +3337,14 @@ class Ee extends Pe {
|
|
|
3336
3337
|
]);
|
|
3337
3338
|
}
|
|
3338
3339
|
calculateLabelRotation() {
|
|
3339
|
-
const t = this.options, s = t.ticks, i =
|
|
3340
|
+
const t = this.options, s = t.ticks, i = ps(this.ticks.length, t.ticks.maxTicksLimit), n = s.minRotation || 0, o = s.maxRotation;
|
|
3340
3341
|
let r = n, a, c, l;
|
|
3341
3342
|
if (!this._isVisible() || !s.display || n >= o || i <= 1 || !this.isHorizontal()) {
|
|
3342
3343
|
this.labelRotation = n;
|
|
3343
3344
|
return;
|
|
3344
3345
|
}
|
|
3345
3346
|
const h = this._getLabelSizes(), d = h.widest.width, f = h.highest.height, u = J(this.chart.width - d, 0, this.maxWidth);
|
|
3346
|
-
a = t.offset ? this.maxWidth / i : u / (i - 1), d + 6 > a && (a = u / (i - (t.offset ? 0.5 : 1)), c = this.maxHeight -
|
|
3347
|
+
a = t.offset ? this.maxWidth / i : u / (i - 1), d + 6 > a && (a = u / (i - (t.offset ? 0.5 : 1)), c = this.maxHeight - wt(t.grid) - s.padding - _s(t.title, this.chart.options.font), l = Math.sqrt(d * d + f * f), r = Bi(Math.min(Math.asin(J((h.highest.height + 6) / a, -1, 1)), Math.asin(J(c / l, -1, 1)) - Math.asin(J(f / l, -1, 1)))), r = Math.max(n, Math.min(o, r))), this.labelRotation = r;
|
|
3347
3348
|
}
|
|
3348
3349
|
afterCalculateLabelRotation() {
|
|
3349
3350
|
E(this.options.afterCalculateLabelRotation, [
|
|
@@ -3363,9 +3364,9 @@ class Ee extends Pe {
|
|
|
3363
3364
|
height: 0
|
|
3364
3365
|
}, { chart: s, options: { ticks: i, title: n, grid: o } } = this, r = this._isVisible(), a = this.isHorizontal();
|
|
3365
3366
|
if (r) {
|
|
3366
|
-
const c =
|
|
3367
|
-
if (a ? (t.width = this.maxWidth, t.height =
|
|
3368
|
-
const { first: l, last: h, widest: d, highest: f } = this._getLabelSizes(), u = i.padding * 2, g =
|
|
3367
|
+
const c = _s(n, s.options.font);
|
|
3368
|
+
if (a ? (t.width = this.maxWidth, t.height = wt(o) + c) : (t.height = this.maxHeight, t.width = wt(o) + c), i.display && this.ticks.length) {
|
|
3369
|
+
const { first: l, last: h, widest: d, highest: f } = this._getLabelSizes(), u = i.padding * 2, g = gt(this.labelRotation), m = Math.cos(g), b = Math.sin(g);
|
|
3369
3370
|
if (a) {
|
|
3370
3371
|
const p = i.mirror ? 0 : b * d.width + m * f.height;
|
|
3371
3372
|
t.height = Math.min(this.maxHeight, t.height + p + u);
|
|
@@ -3416,25 +3417,25 @@ class Ee extends Pe {
|
|
|
3416
3417
|
if (!t) {
|
|
3417
3418
|
const s = this.options.ticks.sampleSize;
|
|
3418
3419
|
let i = this.ticks;
|
|
3419
|
-
s < i.length && (i =
|
|
3420
|
+
s < i.length && (i = ms(i, s)), this._labelSizes = t = this._computeLabelSizes(i, i.length, this.options.ticks.maxTicksLimit);
|
|
3420
3421
|
}
|
|
3421
3422
|
return t;
|
|
3422
3423
|
}
|
|
3423
3424
|
_computeLabelSizes(t, s, i) {
|
|
3424
|
-
const { ctx: n, _longestTextCache: o } = this, r = [], a = [], c = Math.floor(s /
|
|
3425
|
+
const { ctx: n, _longestTextCache: o } = this, r = [], a = [], c = Math.floor(s / ps(s, i));
|
|
3425
3426
|
let l = 0, h = 0, d, f, u, g, m, b, p, _, x, v, y;
|
|
3426
3427
|
for (d = 0; d < s; d += c) {
|
|
3427
3428
|
if (g = t[d].label, m = this._resolveTickFontOptions(d), n.font = b = m.string, p = o[b] = o[b] || {
|
|
3428
3429
|
data: {},
|
|
3429
3430
|
gc: []
|
|
3430
3431
|
}, _ = m.lineHeight, x = v = 0, !W(g) && !B(g))
|
|
3431
|
-
x =
|
|
3432
|
+
x = qe(n, p.data, p.gc, x, g), v = _;
|
|
3432
3433
|
else if (B(g))
|
|
3433
3434
|
for (f = 0, u = g.length; f < u; ++f)
|
|
3434
|
-
y = g[f], !W(y) && !B(y) && (x =
|
|
3435
|
+
y = g[f], !W(y) && !B(y) && (x = qe(n, p.data, p.gc, x, y), v += _);
|
|
3435
3436
|
r.push(x), a.push(v), l = Math.max(x, l), h = Math.max(v, h);
|
|
3436
3437
|
}
|
|
3437
|
-
|
|
3438
|
+
Po(o, s);
|
|
3438
3439
|
const O = r.indexOf(l), D = a.indexOf(h), L = (I) => ({
|
|
3439
3440
|
width: r[I] || 0,
|
|
3440
3441
|
height: a[I] || 0
|
|
@@ -3463,7 +3464,7 @@ class Ee extends Pe {
|
|
|
3463
3464
|
getPixelForDecimal(t) {
|
|
3464
3465
|
this._reversePixels && (t = 1 - t);
|
|
3465
3466
|
const s = this._startPixel + t * this._length;
|
|
3466
|
-
return
|
|
3467
|
+
return Hi(this._alignToPixels ? ot(this.chart, s, 0) : s);
|
|
3467
3468
|
}
|
|
3468
3469
|
getDecimalForPixel(t) {
|
|
3469
3470
|
const s = (t - this._startPixel) / this._length;
|
|
@@ -3480,12 +3481,12 @@ class Ee extends Pe {
|
|
|
3480
3481
|
const s = this.ticks || [];
|
|
3481
3482
|
if (t >= 0 && t < s.length) {
|
|
3482
3483
|
const i = s[t];
|
|
3483
|
-
return i.$context || (i.$context =
|
|
3484
|
+
return i.$context || (i.$context = Ro(this.getContext(), t, i));
|
|
3484
3485
|
}
|
|
3485
|
-
return this.$context || (this.$context =
|
|
3486
|
+
return this.$context || (this.$context = Eo(this.chart.getContext(), this));
|
|
3486
3487
|
}
|
|
3487
3488
|
_tickSize() {
|
|
3488
|
-
const t = this.options.ticks, s =
|
|
3489
|
+
const t = this.options.ticks, s = gt(this.labelRotation), i = Math.abs(Math.cos(s)), n = Math.abs(Math.sin(s)), o = this._getLabelSizes(), r = t.autoSkipPadding || 0, a = o ? o.widest.width + r : 0, c = o ? o.highest.height + r : 0;
|
|
3489
3490
|
return this.isHorizontal() ? c * i > a * n ? a / i : c / n : c * n < a * i ? c / i : a / n;
|
|
3490
3491
|
}
|
|
3491
3492
|
_isVisible() {
|
|
@@ -3493,8 +3494,8 @@ class Ee extends Pe {
|
|
|
3493
3494
|
return t !== "auto" ? !!t : this.getMatchingVisibleMetas().length > 0;
|
|
3494
3495
|
}
|
|
3495
3496
|
_computeGridLineItems(t) {
|
|
3496
|
-
const s = this.axis, i = this.chart, n = this.options, { grid: o, position: r, border: a } = n, c = o.offset, l = this.isHorizontal(), d = this.ticks.length + (c ? 1 : 0), f =
|
|
3497
|
-
return
|
|
3497
|
+
const s = this.axis, i = this.chart, n = this.options, { grid: o, position: r, border: a } = n, c = o.offset, l = this.isHorizontal(), d = this.ticks.length + (c ? 1 : 0), f = wt(o), u = [], g = a.setContext(this.getContext()), m = g.display ? g.width : 0, b = m / 2, p = function(S) {
|
|
3498
|
+
return ot(i, S, m);
|
|
3498
3499
|
};
|
|
3499
3500
|
let _, x, v, y, O, D, L, I, k, H, P, V;
|
|
3500
3501
|
if (r === "top")
|
|
@@ -3524,8 +3525,8 @@ class Ee extends Pe {
|
|
|
3524
3525
|
}
|
|
3525
3526
|
const Y = A(n.ticks.maxTicksLimit, d), M = Math.max(1, Math.ceil(d / Y));
|
|
3526
3527
|
for (x = 0; x < d; x += M) {
|
|
3527
|
-
const S = this.getContext(x), C = o.setContext(S), X = a.setContext(S), F = C.lineWidth,
|
|
3528
|
-
v =
|
|
3528
|
+
const S = this.getContext(x), C = o.setContext(S), X = a.setContext(S), F = C.lineWidth, lt = C.color, Lt = X.dash || [], ht = X.dashOffset, _t = C.tickWidth, it = C.tickColor, bt = C.tickBorderDash || [], nt = C.tickBorderDashOffset;
|
|
3529
|
+
v = Ao(this, x, c), v !== void 0 && (y = ot(i, v, F), l ? O = L = k = P = y : D = I = H = V = y, u.push({
|
|
3529
3530
|
tx1: O,
|
|
3530
3531
|
ty1: D,
|
|
3531
3532
|
tx2: L,
|
|
@@ -3535,19 +3536,19 @@ class Ee extends Pe {
|
|
|
3535
3536
|
x2: P,
|
|
3536
3537
|
y2: V,
|
|
3537
3538
|
width: F,
|
|
3538
|
-
color:
|
|
3539
|
-
borderDash:
|
|
3540
|
-
borderDashOffset:
|
|
3541
|
-
tickWidth:
|
|
3542
|
-
tickColor:
|
|
3543
|
-
tickBorderDash:
|
|
3544
|
-
tickBorderDashOffset:
|
|
3539
|
+
color: lt,
|
|
3540
|
+
borderDash: Lt,
|
|
3541
|
+
borderDashOffset: ht,
|
|
3542
|
+
tickWidth: _t,
|
|
3543
|
+
tickColor: it,
|
|
3544
|
+
tickBorderDash: bt,
|
|
3545
|
+
tickBorderDashOffset: nt
|
|
3545
3546
|
}));
|
|
3546
3547
|
}
|
|
3547
3548
|
return this._ticksLength = d, this._borderValue = _, u;
|
|
3548
3549
|
}
|
|
3549
3550
|
_computeLabelItems(t) {
|
|
3550
|
-
const s = this.axis, i = this.options, { position: n, ticks: o } = i, r = this.isHorizontal(), a = this.ticks, { align: c, crossAlign: l, padding: h, mirror: d } = o, f =
|
|
3551
|
+
const s = this.axis, i = this.options, { position: n, ticks: o } = i, r = this.isHorizontal(), a = this.ticks, { align: c, crossAlign: l, padding: h, mirror: d } = o, f = wt(i.grid), u = f + h, g = d ? -h : u, m = -gt(this.labelRotation), b = [];
|
|
3551
3552
|
let p, _, x, v, y, O, D, L, I, k, H, P, V = "middle";
|
|
3552
3553
|
if (n === "top")
|
|
3553
3554
|
O = this.bottom - g, D = this._getXAxisLabelAlignment();
|
|
@@ -3583,36 +3584,36 @@ class Ee extends Pe {
|
|
|
3583
3584
|
const M = o.setContext(this.getContext(p));
|
|
3584
3585
|
L = this.getPixelForTick(p) + o.labelOffset, I = this._resolveTickFontOptions(p), k = I.lineHeight, H = B(v) ? v.length : 1;
|
|
3585
3586
|
const S = H / 2, C = M.color, X = M.textStrokeColor, F = M.textStrokeWidth;
|
|
3586
|
-
let
|
|
3587
|
-
r ? (y = L, D === "inner" && (p === _ - 1 ?
|
|
3588
|
-
let
|
|
3587
|
+
let lt = D;
|
|
3588
|
+
r ? (y = L, D === "inner" && (p === _ - 1 ? lt = this.options.reverse ? "left" : "right" : p === 0 ? lt = this.options.reverse ? "right" : "left" : lt = "center"), n === "top" ? l === "near" || m !== 0 ? P = -H * k + k / 2 : l === "center" ? P = -Y.highest.height / 2 - S * k + k : P = -Y.highest.height + k / 2 : l === "near" || m !== 0 ? P = k / 2 : l === "center" ? P = Y.highest.height / 2 - S * k : P = Y.highest.height - H * k, d && (P *= -1), m !== 0 && !M.showLabelBackdrop && (y += k / 2 * Math.sin(m))) : (O = L, P = (1 - H) * k / 2);
|
|
3589
|
+
let Lt;
|
|
3589
3590
|
if (M.showLabelBackdrop) {
|
|
3590
|
-
const
|
|
3591
|
-
let
|
|
3591
|
+
const ht = Et(M.backdropPadding), _t = Y.heights[p], it = Y.widths[p];
|
|
3592
|
+
let bt = P - ht.top, nt = 0 - ht.left;
|
|
3592
3593
|
switch (V) {
|
|
3593
3594
|
case "middle":
|
|
3594
|
-
|
|
3595
|
+
bt -= _t / 2;
|
|
3595
3596
|
break;
|
|
3596
3597
|
case "bottom":
|
|
3597
|
-
|
|
3598
|
+
bt -= _t;
|
|
3598
3599
|
break;
|
|
3599
3600
|
}
|
|
3600
3601
|
switch (D) {
|
|
3601
3602
|
case "center":
|
|
3602
|
-
|
|
3603
|
+
nt -= it / 2;
|
|
3603
3604
|
break;
|
|
3604
3605
|
case "right":
|
|
3605
|
-
|
|
3606
|
+
nt -= it;
|
|
3606
3607
|
break;
|
|
3607
3608
|
case "inner":
|
|
3608
|
-
p === _ - 1 ?
|
|
3609
|
+
p === _ - 1 ? nt -= it : p > 0 && (nt -= it / 2);
|
|
3609
3610
|
break;
|
|
3610
3611
|
}
|
|
3611
|
-
|
|
3612
|
-
left:
|
|
3613
|
-
top:
|
|
3614
|
-
width:
|
|
3615
|
-
height:
|
|
3612
|
+
Lt = {
|
|
3613
|
+
left: nt,
|
|
3614
|
+
top: bt,
|
|
3615
|
+
width: it + ht.width,
|
|
3616
|
+
height: _t + ht.height,
|
|
3616
3617
|
color: M.backdropColor
|
|
3617
3618
|
};
|
|
3618
3619
|
}
|
|
@@ -3625,13 +3626,13 @@ class Ee extends Pe {
|
|
|
3625
3626
|
color: C,
|
|
3626
3627
|
strokeColor: X,
|
|
3627
3628
|
strokeWidth: F,
|
|
3628
|
-
textAlign:
|
|
3629
|
+
textAlign: lt,
|
|
3629
3630
|
textBaseline: V,
|
|
3630
3631
|
translation: [
|
|
3631
3632
|
y,
|
|
3632
3633
|
O
|
|
3633
3634
|
],
|
|
3634
|
-
backdrop:
|
|
3635
|
+
backdrop: Lt
|
|
3635
3636
|
}
|
|
3636
3637
|
});
|
|
3637
3638
|
}
|
|
@@ -3639,7 +3640,7 @@ class Ee extends Pe {
|
|
|
3639
3640
|
}
|
|
3640
3641
|
_getXAxisLabelAlignment() {
|
|
3641
3642
|
const { position: t, ticks: s } = this.options;
|
|
3642
|
-
if (-
|
|
3643
|
+
if (-gt(this.labelRotation))
|
|
3643
3644
|
return t === "top" ? "left" : "right";
|
|
3644
3645
|
let n = "center";
|
|
3645
3646
|
return s.align === "start" ? n = "left" : s.align === "end" ? n = "right" : s.align === "inner" && (n = "inner"), n;
|
|
@@ -3717,7 +3718,7 @@ class Ee extends Pe {
|
|
|
3717
3718
|
return;
|
|
3718
3719
|
const a = n.setContext(this.getContext(0)).lineWidth, c = this._borderValue;
|
|
3719
3720
|
let l, h, d, f;
|
|
3720
|
-
this.isHorizontal() ? (l =
|
|
3721
|
+
this.isHorizontal() ? (l = ot(t, this.left, r) - r / 2, h = ot(t, this.right, a) + a / 2, d = f = c) : (d = ot(t, this.top, r) - r / 2, f = ot(t, this.bottom, a) + a / 2, l = h = c), s.save(), s.lineWidth = o.width, s.strokeStyle = o.color, s.beginPath(), s.moveTo(l, d), s.lineTo(h, f), s.stroke(), s.restore();
|
|
3721
3722
|
}
|
|
3722
3723
|
drawLabels(t) {
|
|
3723
3724
|
if (!this.options.ticks.display)
|
|
@@ -3727,7 +3728,7 @@ class Ee extends Pe {
|
|
|
3727
3728
|
const o = this.getLabelItems(t);
|
|
3728
3729
|
for (const r of o) {
|
|
3729
3730
|
const a = r.options, c = r.font, l = r.label, h = r.textOffset;
|
|
3730
|
-
|
|
3731
|
+
Ge(i, l, 0, h, c, a);
|
|
3731
3732
|
}
|
|
3732
3733
|
n && Vs(i);
|
|
3733
3734
|
}
|
|
@@ -3735,15 +3736,15 @@ class Ee extends Pe {
|
|
|
3735
3736
|
const { ctx: t, options: { position: s, title: i, reverse: n } } = this;
|
|
3736
3737
|
if (!i.display)
|
|
3737
3738
|
return;
|
|
3738
|
-
const o = be(i.font), r =
|
|
3739
|
+
const o = be(i.font), r = Et(i.padding), a = i.align;
|
|
3739
3740
|
let c = o.lineHeight / 2;
|
|
3740
3741
|
s === "bottom" || s === "center" || w(s) ? (c += r.bottom, B(i.text) && (c += o.lineHeight * (i.text.length - 1))) : c += r.top;
|
|
3741
|
-
const { titleX: l, titleY: h, maxWidth: d, rotation: f } =
|
|
3742
|
-
|
|
3742
|
+
const { titleX: l, titleY: h, maxWidth: d, rotation: f } = To(this, c, s, a);
|
|
3743
|
+
Ge(t, i.text, 0, 0, o, {
|
|
3743
3744
|
color: i.color,
|
|
3744
3745
|
maxWidth: d,
|
|
3745
3746
|
rotation: f,
|
|
3746
|
-
textAlign:
|
|
3747
|
+
textAlign: Io(a, s, n),
|
|
3747
3748
|
textBaseline: "middle",
|
|
3748
3749
|
translation: [
|
|
3749
3750
|
l,
|
|
@@ -3756,7 +3757,7 @@ class Ee extends Pe {
|
|
|
3756
3757
|
}
|
|
3757
3758
|
_layers() {
|
|
3758
3759
|
const t = this.options, s = t.ticks && t.ticks.z || 0, i = A(t.grid && t.grid.z, -1), n = A(t.border && t.border.z, 0);
|
|
3759
|
-
return !this._isVisible() || this.draw !==
|
|
3760
|
+
return !this._isVisible() || this.draw !== Re.prototype.draw ? [
|
|
3760
3761
|
{
|
|
3761
3762
|
z: s,
|
|
3762
3763
|
draw: (o) => {
|
|
@@ -3812,29 +3813,29 @@ class Yt {
|
|
|
3812
3813
|
register(t) {
|
|
3813
3814
|
const s = Object.getPrototypeOf(t);
|
|
3814
3815
|
let i;
|
|
3815
|
-
|
|
3816
|
+
Fo(s) && (i = this.register(s));
|
|
3816
3817
|
const n = this.items, o = t.id, r = this.scope + "." + o;
|
|
3817
3818
|
if (!o)
|
|
3818
3819
|
throw new Error("class does not have id: " + t);
|
|
3819
|
-
return o in n || (n[o] = t,
|
|
3820
|
+
return o in n || (n[o] = t, Lo(t, r, i), this.override && R.override(t.id, t.overrides)), r;
|
|
3820
3821
|
}
|
|
3821
3822
|
get(t) {
|
|
3822
3823
|
return this.items[t];
|
|
3823
3824
|
}
|
|
3824
3825
|
unregister(t) {
|
|
3825
3826
|
const s = this.items, i = t.id, n = this.scope;
|
|
3826
|
-
i in s && delete s[i], n && i in R[n] && (delete R[n][i], this.override && delete
|
|
3827
|
+
i in s && delete s[i], n && i in R[n] && (delete R[n][i], this.override && delete ct[i]);
|
|
3827
3828
|
}
|
|
3828
3829
|
}
|
|
3829
|
-
function
|
|
3830
|
-
const i =
|
|
3830
|
+
function Lo(e, t, s) {
|
|
3831
|
+
const i = At(/* @__PURE__ */ Object.create(null), [
|
|
3831
3832
|
s ? R.get(s) : {},
|
|
3832
3833
|
R.get(t),
|
|
3833
3834
|
e.defaults
|
|
3834
3835
|
]);
|
|
3835
|
-
R.set(t, i), e.defaultRoutes &&
|
|
3836
|
+
R.set(t, i), e.defaultRoutes && zo(t, e.defaultRoutes), e.descriptors && R.describe(t, e.descriptors);
|
|
3836
3837
|
}
|
|
3837
|
-
function
|
|
3838
|
+
function zo(e, t) {
|
|
3838
3839
|
Object.keys(t).forEach((s) => {
|
|
3839
3840
|
const i = s.split("."), n = i.pop(), o = [
|
|
3840
3841
|
e
|
|
@@ -3842,12 +3843,12 @@ function Fo(e, t) {
|
|
|
3842
3843
|
R.route(o, n, c, a);
|
|
3843
3844
|
});
|
|
3844
3845
|
}
|
|
3845
|
-
function
|
|
3846
|
+
function Fo(e) {
|
|
3846
3847
|
return "id" in e && "defaults" in e;
|
|
3847
3848
|
}
|
|
3848
|
-
class
|
|
3849
|
+
class jo {
|
|
3849
3850
|
constructor() {
|
|
3850
|
-
this.controllers = new Yt(qs, "datasets", !0), this.elements = new Yt(
|
|
3851
|
+
this.controllers = new Yt(qs, "datasets", !0), this.elements = new Yt(Ee, "elements"), this.plugins = new Yt(Object, "plugins"), this.scales = new Yt(Re, "scales"), this._typedRegistries = [
|
|
3851
3852
|
this.controllers,
|
|
3852
3853
|
this.scales,
|
|
3853
3854
|
this.elements
|
|
@@ -3907,7 +3908,7 @@ class Bo {
|
|
|
3907
3908
|
});
|
|
3908
3909
|
}
|
|
3909
3910
|
_exec(t, s, i) {
|
|
3910
|
-
const n =
|
|
3911
|
+
const n = Se(t);
|
|
3911
3912
|
E(i["before" + n], [], i), s[t](i), E(i["after" + n], [], i);
|
|
3912
3913
|
}
|
|
3913
3914
|
_getRegistryForType(t) {
|
|
@@ -3925,15 +3926,16 @@ class Bo {
|
|
|
3925
3926
|
return n;
|
|
3926
3927
|
}
|
|
3927
3928
|
}
|
|
3928
|
-
var U = /* @__PURE__ */ new
|
|
3929
|
-
class
|
|
3929
|
+
var U = /* @__PURE__ */ new jo();
|
|
3930
|
+
class Bo {
|
|
3930
3931
|
constructor() {
|
|
3931
|
-
this._init =
|
|
3932
|
+
this._init = void 0;
|
|
3932
3933
|
}
|
|
3933
3934
|
notify(t, s, i, n) {
|
|
3934
|
-
s === "beforeInit" && (this._init = this._createDescriptors(t, !0), this._notify(this._init, t, "install"))
|
|
3935
|
+
if (s === "beforeInit" && (this._init = this._createDescriptors(t, !0), this._notify(this._init, t, "install")), this._init === void 0)
|
|
3936
|
+
return;
|
|
3935
3937
|
const o = n ? this._descriptors(t).filter(n) : this._descriptors(t), r = this._notify(o, t, s, i);
|
|
3936
|
-
return s === "afterDestroy" && (this._notify(o, t, "stop"), this._notify(this._init, t, "uninstall")), r;
|
|
3938
|
+
return s === "afterDestroy" && (this._notify(o, t, "stop"), this._notify(this._init, t, "uninstall"), this._init = void 0), r;
|
|
3937
3939
|
}
|
|
3938
3940
|
_notify(t, s, i, n) {
|
|
3939
3941
|
n = n || {};
|
|
@@ -3958,15 +3960,15 @@ class Ho {
|
|
|
3958
3960
|
return this._notifyStateChanges(t), s;
|
|
3959
3961
|
}
|
|
3960
3962
|
_createDescriptors(t, s) {
|
|
3961
|
-
const i = t && t.config, n = A(i.options && i.options.plugins, {}), o =
|
|
3962
|
-
return n === !1 && !s ? [] :
|
|
3963
|
+
const i = t && t.config, n = A(i.options && i.options.plugins, {}), o = Ho(i);
|
|
3964
|
+
return n === !1 && !s ? [] : Vo(t, o, n, s);
|
|
3963
3965
|
}
|
|
3964
3966
|
_notifyStateChanges(t) {
|
|
3965
3967
|
const s = this._oldCache || [], i = this._cache, n = (o, r) => o.filter((a) => !r.some((c) => a.plugin.id === c.plugin.id));
|
|
3966
3968
|
this._notify(n(s, i), t, "stop"), this._notify(n(i, s), t, "start");
|
|
3967
3969
|
}
|
|
3968
3970
|
}
|
|
3969
|
-
function
|
|
3971
|
+
function Ho(e) {
|
|
3970
3972
|
const t = {}, s = [], i = Object.keys(U.plugins.items);
|
|
3971
3973
|
for (let o = 0; o < i.length; o++)
|
|
3972
3974
|
s.push(U.getPlugin(i[o]));
|
|
@@ -3980,16 +3982,16 @@ function Wo(e) {
|
|
|
3980
3982
|
localIds: t
|
|
3981
3983
|
};
|
|
3982
3984
|
}
|
|
3983
|
-
function
|
|
3985
|
+
function Wo(e, t) {
|
|
3984
3986
|
return !t && e === !1 ? null : e === !0 ? {} : e;
|
|
3985
3987
|
}
|
|
3986
|
-
function
|
|
3988
|
+
function Vo(e, { plugins: t, localIds: s }, i, n) {
|
|
3987
3989
|
const o = [], r = e.getContext();
|
|
3988
3990
|
for (const a of t) {
|
|
3989
|
-
const c = a.id, l =
|
|
3991
|
+
const c = a.id, l = Wo(i[c], n);
|
|
3990
3992
|
l !== null && o.push({
|
|
3991
3993
|
plugin: a,
|
|
3992
|
-
options:
|
|
3994
|
+
options: No(e.config, {
|
|
3993
3995
|
plugin: a,
|
|
3994
3996
|
local: s[c]
|
|
3995
3997
|
}, l, r)
|
|
@@ -3997,7 +3999,7 @@ function No(e, { plugins: t, localIds: s }, i, n) {
|
|
|
3997
3999
|
}
|
|
3998
4000
|
return o;
|
|
3999
4001
|
}
|
|
4000
|
-
function
|
|
4002
|
+
function No(e, { plugin: t, local: s }, i, n) {
|
|
4001
4003
|
const o = e.pluginScopeKeys(t), r = e.getOptionScopes(i, o);
|
|
4002
4004
|
return s && t.defaults && r.push(t.defaults), e.createResolver(r, n, [
|
|
4003
4005
|
""
|
|
@@ -4011,49 +4013,49 @@ function xe(e, t) {
|
|
|
4011
4013
|
const s = R.datasets[e] || {};
|
|
4012
4014
|
return ((t.datasets || {})[e] || {}).indexAxis || t.indexAxis || s.indexAxis || "x";
|
|
4013
4015
|
}
|
|
4014
|
-
function
|
|
4016
|
+
function $o(e, t) {
|
|
4015
4017
|
let s = e;
|
|
4016
4018
|
return e === "_index_" ? s = t : e === "_value_" && (s = t === "x" ? "y" : "x"), s;
|
|
4017
4019
|
}
|
|
4018
|
-
function
|
|
4020
|
+
function Yo(e, t) {
|
|
4019
4021
|
return e === t ? "_index_" : "_value_";
|
|
4020
4022
|
}
|
|
4021
|
-
function
|
|
4023
|
+
function bs(e) {
|
|
4022
4024
|
if (e === "x" || e === "y" || e === "r")
|
|
4023
4025
|
return e;
|
|
4024
4026
|
}
|
|
4025
|
-
function
|
|
4027
|
+
function Xo(e) {
|
|
4026
4028
|
if (e === "top" || e === "bottom")
|
|
4027
4029
|
return "x";
|
|
4028
4030
|
if (e === "left" || e === "right")
|
|
4029
4031
|
return "y";
|
|
4030
4032
|
}
|
|
4031
4033
|
function ye(e, ...t) {
|
|
4032
|
-
if (
|
|
4034
|
+
if (bs(e))
|
|
4033
4035
|
return e;
|
|
4034
4036
|
for (const s of t) {
|
|
4035
|
-
const i = s.axis ||
|
|
4037
|
+
const i = s.axis || Xo(s.position) || e.length > 1 && bs(e[0].toLowerCase());
|
|
4036
4038
|
if (i)
|
|
4037
4039
|
return i;
|
|
4038
4040
|
}
|
|
4039
4041
|
throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`);
|
|
4040
4042
|
}
|
|
4041
|
-
function
|
|
4043
|
+
function xs(e, t, s) {
|
|
4042
4044
|
if (s[t + "AxisID"] === e)
|
|
4043
4045
|
return {
|
|
4044
4046
|
axis: t
|
|
4045
4047
|
};
|
|
4046
4048
|
}
|
|
4047
|
-
function
|
|
4049
|
+
function Ko(e, t) {
|
|
4048
4050
|
if (t.data && t.data.datasets) {
|
|
4049
4051
|
const s = t.data.datasets.filter((i) => i.xAxisID === e || i.yAxisID === e);
|
|
4050
4052
|
if (s.length)
|
|
4051
|
-
return
|
|
4053
|
+
return xs(e, "x", s[0]) || xs(e, "y", s[0]);
|
|
4052
4054
|
}
|
|
4053
4055
|
return {};
|
|
4054
4056
|
}
|
|
4055
|
-
function
|
|
4056
|
-
const s =
|
|
4057
|
+
function Uo(e, t) {
|
|
4058
|
+
const s = ct[e.type] || {
|
|
4057
4059
|
scales: {}
|
|
4058
4060
|
}, i = t.scales || {}, n = xe(e.type, t), o = /* @__PURE__ */ Object.create(null);
|
|
4059
4061
|
return Object.keys(i).forEach((r) => {
|
|
@@ -4062,7 +4064,7 @@ function qo(e, t) {
|
|
|
4062
4064
|
return console.error(`Invalid scale configuration for scale: ${r}`);
|
|
4063
4065
|
if (a._proxy)
|
|
4064
4066
|
return console.warn(`Ignoring resolver passed as options for scale: ${r}`);
|
|
4065
|
-
const c = ye(r, a,
|
|
4067
|
+
const c = ye(r, a, Ko(r, e), R.scales[a.type]), l = Yo(c, n), h = s.scales || {};
|
|
4066
4068
|
o[r] = Kt(/* @__PURE__ */ Object.create(null), [
|
|
4067
4069
|
{
|
|
4068
4070
|
axis: c
|
|
@@ -4072,9 +4074,9 @@ function qo(e, t) {
|
|
|
4072
4074
|
h[l]
|
|
4073
4075
|
]);
|
|
4074
4076
|
}), e.data.datasets.forEach((r) => {
|
|
4075
|
-
const a = r.type || e.type, c = r.indexAxis || xe(a, t), h = (
|
|
4077
|
+
const a = r.type || e.type, c = r.indexAxis || xe(a, t), h = (ct[a] || {}).scales || {};
|
|
4076
4078
|
Object.keys(h).forEach((d) => {
|
|
4077
|
-
const f =
|
|
4079
|
+
const f = $o(d, c), u = r[f + "AxisID"] || f;
|
|
4078
4080
|
o[u] = o[u] || /* @__PURE__ */ Object.create(null), Kt(o[u], [
|
|
4079
4081
|
{
|
|
4080
4082
|
axis: f
|
|
@@ -4093,26 +4095,26 @@ function qo(e, t) {
|
|
|
4093
4095
|
}
|
|
4094
4096
|
function ei(e) {
|
|
4095
4097
|
const t = e.options || (e.options = {});
|
|
4096
|
-
t.plugins = A(t.plugins, {}), t.scales =
|
|
4098
|
+
t.plugins = A(t.plugins, {}), t.scales = Uo(e, t);
|
|
4097
4099
|
}
|
|
4098
4100
|
function si(e) {
|
|
4099
4101
|
return e = e || {}, e.datasets = e.datasets || [], e.labels = e.labels || [], e;
|
|
4100
4102
|
}
|
|
4101
|
-
function
|
|
4103
|
+
function qo(e) {
|
|
4102
4104
|
return e = e || {}, e.data = si(e.data), ei(e), e;
|
|
4103
4105
|
}
|
|
4104
|
-
const
|
|
4106
|
+
const ys = /* @__PURE__ */ new Map(), ii = /* @__PURE__ */ new Set();
|
|
4105
4107
|
function Xt(e, t) {
|
|
4106
|
-
let s =
|
|
4107
|
-
return s || (s = t(),
|
|
4108
|
+
let s = ys.get(e);
|
|
4109
|
+
return s || (s = t(), ys.set(e, s), ii.add(s)), s;
|
|
4108
4110
|
}
|
|
4109
|
-
const
|
|
4110
|
-
const i =
|
|
4111
|
+
const Mt = (e, t, s) => {
|
|
4112
|
+
const i = Pt(t, s);
|
|
4111
4113
|
i !== void 0 && e.add(i);
|
|
4112
4114
|
};
|
|
4113
|
-
class
|
|
4115
|
+
class Zo {
|
|
4114
4116
|
constructor(t) {
|
|
4115
|
-
this._config =
|
|
4117
|
+
this._config = qo(t), this._scopeCache = /* @__PURE__ */ new Map(), this._resolverCache = /* @__PURE__ */ new Map();
|
|
4116
4118
|
}
|
|
4117
4119
|
get platform() {
|
|
4118
4120
|
return this._config.platform;
|
|
@@ -4195,7 +4197,7 @@ class Go {
|
|
|
4195
4197
|
return a;
|
|
4196
4198
|
const c = /* @__PURE__ */ new Set();
|
|
4197
4199
|
s.forEach((h) => {
|
|
4198
|
-
t && (c.add(t), h.forEach((d) =>
|
|
4200
|
+
t && (c.add(t), h.forEach((d) => Mt(c, t, d))), h.forEach((d) => Mt(c, n, d)), h.forEach((d) => Mt(c, ct[o] || {}, d)), h.forEach((d) => Mt(c, R, d)), h.forEach((d) => Mt(c, _e, d));
|
|
4199
4201
|
});
|
|
4200
4202
|
const l = Array.from(c);
|
|
4201
4203
|
return l.length === 0 && l.push(/* @__PURE__ */ Object.create(null)), ii.has(s) && r.set(s, l), l;
|
|
@@ -4204,7 +4206,7 @@ class Go {
|
|
|
4204
4206
|
const { options: t, type: s } = this;
|
|
4205
4207
|
return [
|
|
4206
4208
|
t,
|
|
4207
|
-
|
|
4209
|
+
ct[s] || {},
|
|
4208
4210
|
R.datasets[s] || {},
|
|
4209
4211
|
{
|
|
4210
4212
|
type: s
|
|
@@ -4218,12 +4220,12 @@ class Go {
|
|
|
4218
4220
|
]) {
|
|
4219
4221
|
const o = {
|
|
4220
4222
|
$shared: !0
|
|
4221
|
-
}, { resolver: r, subPrefixes: a } =
|
|
4223
|
+
}, { resolver: r, subPrefixes: a } = vs(this._resolverCache, t, n);
|
|
4222
4224
|
let c = r;
|
|
4223
|
-
if (
|
|
4224
|
-
o.$shared = !1, i =
|
|
4225
|
+
if (Qo(r, s)) {
|
|
4226
|
+
o.$shared = !1, i = st(i) ? i() : i;
|
|
4225
4227
|
const l = this.createResolver(t, i, a);
|
|
4226
|
-
c =
|
|
4228
|
+
c = mt(r, i, l);
|
|
4227
4229
|
}
|
|
4228
4230
|
for (const l of s)
|
|
4229
4231
|
o[l] = c[l];
|
|
@@ -4232,66 +4234,66 @@ class Go {
|
|
|
4232
4234
|
createResolver(t, s, i = [
|
|
4233
4235
|
""
|
|
4234
4236
|
], n) {
|
|
4235
|
-
const { resolver: o } =
|
|
4236
|
-
return w(s) ?
|
|
4237
|
+
const { resolver: o } = vs(this._resolverCache, t, i);
|
|
4238
|
+
return w(s) ? mt(o, s, void 0, n) : o;
|
|
4237
4239
|
}
|
|
4238
4240
|
}
|
|
4239
|
-
function
|
|
4241
|
+
function vs(e, t, s) {
|
|
4240
4242
|
let i = e.get(t);
|
|
4241
4243
|
i || (i = /* @__PURE__ */ new Map(), e.set(t, i));
|
|
4242
4244
|
const n = s.join();
|
|
4243
4245
|
let o = i.get(n);
|
|
4244
4246
|
return o || (o = {
|
|
4245
|
-
resolver:
|
|
4247
|
+
resolver: Oe(t, s),
|
|
4246
4248
|
subPrefixes: s.filter((a) => !a.toLowerCase().includes("hover"))
|
|
4247
4249
|
}, i.set(n, o)), o;
|
|
4248
4250
|
}
|
|
4249
|
-
const
|
|
4250
|
-
function
|
|
4251
|
+
const Go = (e) => w(e) && Object.getOwnPropertyNames(e).some((t) => st(e[t]));
|
|
4252
|
+
function Qo(e, t) {
|
|
4251
4253
|
const { isScriptable: s, isIndexable: i } = $s(e);
|
|
4252
4254
|
for (const n of t) {
|
|
4253
4255
|
const o = s(n), r = i(n), a = (r || o) && e[n];
|
|
4254
|
-
if (o && (
|
|
4256
|
+
if (o && (st(a) || Go(a)) || r && B(a))
|
|
4255
4257
|
return !0;
|
|
4256
4258
|
}
|
|
4257
4259
|
return !1;
|
|
4258
4260
|
}
|
|
4259
|
-
var
|
|
4260
|
-
const
|
|
4261
|
+
var Jo = "4.5.1";
|
|
4262
|
+
const tr = [
|
|
4261
4263
|
"top",
|
|
4262
4264
|
"bottom",
|
|
4263
4265
|
"left",
|
|
4264
4266
|
"right",
|
|
4265
4267
|
"chartArea"
|
|
4266
4268
|
];
|
|
4267
|
-
function vs(e, t) {
|
|
4268
|
-
return e === "top" || e === "bottom" || er.indexOf(e) === -1 && t === "x";
|
|
4269
|
-
}
|
|
4270
4269
|
function ws(e, t) {
|
|
4270
|
+
return e === "top" || e === "bottom" || tr.indexOf(e) === -1 && t === "x";
|
|
4271
|
+
}
|
|
4272
|
+
function Ms(e, t) {
|
|
4271
4273
|
return function(s, i) {
|
|
4272
4274
|
return s[e] === i[e] ? s[t] - i[t] : s[e] - i[e];
|
|
4273
4275
|
};
|
|
4274
4276
|
}
|
|
4275
|
-
function
|
|
4277
|
+
function ks(e) {
|
|
4276
4278
|
const t = e.chart, s = t.options.animation;
|
|
4277
4279
|
t.notifyPlugins("afterRender"), E(s && s.onComplete, [
|
|
4278
4280
|
e
|
|
4279
4281
|
], t);
|
|
4280
4282
|
}
|
|
4281
|
-
function
|
|
4283
|
+
function er(e) {
|
|
4282
4284
|
const t = e.chart, s = t.options.animation;
|
|
4283
4285
|
E(s && s.onProgress, [
|
|
4284
4286
|
e
|
|
4285
4287
|
], t);
|
|
4286
4288
|
}
|
|
4287
4289
|
function ni(e) {
|
|
4288
|
-
return
|
|
4290
|
+
return Ae() && typeof e == "string" ? e = document.getElementById(e) : e && e.length && (e = e[0]), e && e.canvas && (e = e.canvas), e;
|
|
4289
4291
|
}
|
|
4290
|
-
const qt = {},
|
|
4292
|
+
const qt = {}, Ss = (e) => {
|
|
4291
4293
|
const t = ni(e);
|
|
4292
4294
|
return Object.values(qt).filter((s) => s.canvas === t).pop();
|
|
4293
4295
|
};
|
|
4294
|
-
function
|
|
4296
|
+
function sr(e, t, s) {
|
|
4295
4297
|
const i = Object.keys(e);
|
|
4296
4298
|
for (const n of i) {
|
|
4297
4299
|
const o = +n;
|
|
@@ -4301,34 +4303,34 @@ function ir(e, t, s) {
|
|
|
4301
4303
|
}
|
|
4302
4304
|
}
|
|
4303
4305
|
}
|
|
4304
|
-
function
|
|
4306
|
+
function ir(e, t, s, i) {
|
|
4305
4307
|
return !s || e.type === "mouseout" ? null : i ? t : e;
|
|
4306
4308
|
}
|
|
4307
4309
|
let oe = class {
|
|
4308
4310
|
static defaults = R;
|
|
4309
4311
|
static instances = qt;
|
|
4310
|
-
static overrides =
|
|
4312
|
+
static overrides = ct;
|
|
4311
4313
|
static registry = U;
|
|
4312
|
-
static version =
|
|
4313
|
-
static getChart =
|
|
4314
|
+
static version = Jo;
|
|
4315
|
+
static getChart = Ss;
|
|
4314
4316
|
static register(...t) {
|
|
4315
|
-
U.add(...t),
|
|
4317
|
+
U.add(...t), Os();
|
|
4316
4318
|
}
|
|
4317
4319
|
static unregister(...t) {
|
|
4318
|
-
U.remove(...t),
|
|
4320
|
+
U.remove(...t), Os();
|
|
4319
4321
|
}
|
|
4320
4322
|
constructor(t, s) {
|
|
4321
|
-
const i = this.config = new
|
|
4323
|
+
const i = this.config = new Zo(s), n = ni(t), o = Ss(n);
|
|
4322
4324
|
if (o)
|
|
4323
4325
|
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.");
|
|
4324
4326
|
const r = i.createResolver(i.chartOptionScopes(), this.getContext());
|
|
4325
|
-
this.platform = new (i.platform ||
|
|
4327
|
+
this.platform = new (i.platform || vo(n))(), this.platform.updateConfig(i);
|
|
4326
4328
|
const a = this.platform.acquireContext(n, r.aspectRatio), c = a && a.canvas, l = c && c.height, h = c && c.width;
|
|
4327
|
-
if (this.id =
|
|
4329
|
+
if (this.id = Pi(), this.ctx = a, this.canvas = c, this.width = h, this.height = l, this._options = r, 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 Bo(), this.$proxies = {}, this._hiddenIndices = {}, this.attached = !1, this._animationsDisabled = void 0, this.$context = void 0, this._doResize = Yi((d) => this.update(d), r.resizeDelay || 0), this._dataChanges = [], qt[this.id] = this, !a || !c) {
|
|
4328
4330
|
console.error("Failed to create chart: can't acquire context from the given item");
|
|
4329
4331
|
return;
|
|
4330
4332
|
}
|
|
4331
|
-
Z.listen(this, "complete",
|
|
4333
|
+
Z.listen(this, "complete", ks), Z.listen(this, "progress", er), this._initialize(), this.attached && this.update();
|
|
4332
4334
|
}
|
|
4333
4335
|
get aspectRatio() {
|
|
4334
4336
|
const { options: { aspectRatio: t, maintainAspectRatio: s }, width: i, height: n, _aspectRatio: o } = this;
|
|
@@ -4350,10 +4352,10 @@ let oe = class {
|
|
|
4350
4352
|
return U;
|
|
4351
4353
|
}
|
|
4352
4354
|
_initialize() {
|
|
4353
|
-
return this.notifyPlugins("beforeInit"), this.options.responsive ? this.resize() :
|
|
4355
|
+
return this.notifyPlugins("beforeInit"), this.options.responsive ? this.resize() : ts(this, this.options.devicePixelRatio), this.bindEvents(), this.notifyPlugins("afterInit"), this;
|
|
4354
4356
|
}
|
|
4355
4357
|
clear() {
|
|
4356
|
-
return
|
|
4358
|
+
return Ze(this.canvas, this.ctx), this;
|
|
4357
4359
|
}
|
|
4358
4360
|
stop() {
|
|
4359
4361
|
return Z.stop(this), this;
|
|
@@ -4366,7 +4368,7 @@ let oe = class {
|
|
|
4366
4368
|
}
|
|
4367
4369
|
_resize(t, s) {
|
|
4368
4370
|
const i = this.options, n = this.canvas, o = i.maintainAspectRatio && this.aspectRatio, r = this.platform.getMaximumSize(n, t, s, o), a = i.devicePixelRatio || this.platform.getDevicePixelRatio(), c = this.width ? "resize" : "attach";
|
|
4369
|
-
this.width = r.width, this.height = r.height, this._aspectRatio = this.aspectRatio,
|
|
4371
|
+
this.width = r.width, this.height = r.height, this._aspectRatio = this.aspectRatio, ts(this, a, !0) && (this.notifyPlugins("resize", {
|
|
4370
4372
|
size: r
|
|
4371
4373
|
}), E(i.onResize, [
|
|
4372
4374
|
this,
|
|
@@ -4391,7 +4393,7 @@ let oe = class {
|
|
|
4391
4393
|
};
|
|
4392
4394
|
}))), j(o, (r) => {
|
|
4393
4395
|
const a = r.options, c = a.id, l = ye(c, a), h = A(a.type, r.dtype);
|
|
4394
|
-
(a.position === void 0 ||
|
|
4396
|
+
(a.position === void 0 || ws(a.position, l) !== ws(r.dposition)) && (a.position = r.dposition), n[c] = !0;
|
|
4395
4397
|
let d = null;
|
|
4396
4398
|
if (c in i && i[c].type === h)
|
|
4397
4399
|
d = i[c];
|
|
@@ -4418,7 +4420,7 @@ let oe = class {
|
|
|
4418
4420
|
this._destroyDatasetMeta(n);
|
|
4419
4421
|
t.splice(s, i - s);
|
|
4420
4422
|
}
|
|
4421
|
-
this._sortedMetasets = t.slice(0).sort(
|
|
4423
|
+
this._sortedMetasets = t.slice(0).sort(Ms("order", "index"));
|
|
4422
4424
|
}
|
|
4423
4425
|
_removeUnreferencedMetasets() {
|
|
4424
4426
|
const { _metasets: t, data: { datasets: s } } = this;
|
|
@@ -4473,7 +4475,7 @@ let oe = class {
|
|
|
4473
4475
|
l.reset();
|
|
4474
4476
|
}), this._updateDatasets(t), this.notifyPlugins("afterUpdate", {
|
|
4475
4477
|
mode: t
|
|
4476
|
-
}), this._layers.sort(
|
|
4478
|
+
}), this._layers.sort(Ms("z", "_idx"));
|
|
4477
4479
|
const { _active: a, _lastEvent: c } = this;
|
|
4478
4480
|
c ? this._eventHandler(c, !0) : a.length && this._updateHoverStyles(a, a, !0), this.render();
|
|
4479
4481
|
}
|
|
@@ -4484,13 +4486,13 @@ let oe = class {
|
|
|
4484
4486
|
}
|
|
4485
4487
|
_checkEventBindings() {
|
|
4486
4488
|
const t = this.options, s = new Set(Object.keys(this._listeners)), i = new Set(t.events);
|
|
4487
|
-
(!
|
|
4489
|
+
(!He(s, i) || !!this._responsiveListeners !== t.responsive) && (this.unbindEvents(), this.bindEvents());
|
|
4488
4490
|
}
|
|
4489
4491
|
_updateHiddenIndices() {
|
|
4490
4492
|
const { _hiddenIndices: t } = this, s = this._getUniformDataChanges() || [];
|
|
4491
4493
|
for (const { method: i, start: n, count: o } of s) {
|
|
4492
4494
|
const r = i === "_removeElements" ? -o : o;
|
|
4493
|
-
|
|
4495
|
+
sr(t, n, r);
|
|
4494
4496
|
}
|
|
4495
4497
|
}
|
|
4496
4498
|
_getUniformDataChanges() {
|
|
@@ -4500,7 +4502,7 @@ let oe = class {
|
|
|
4500
4502
|
this._dataChanges = [];
|
|
4501
4503
|
const s = this.data.datasets.length, i = (o) => new Set(t.filter((r) => r[0] === o).map((r, a) => a + "," + r.splice(1).join(","))), n = i(0);
|
|
4502
4504
|
for (let o = 1; o < s; o++)
|
|
4503
|
-
if (!
|
|
4505
|
+
if (!He(n, i(o)))
|
|
4504
4506
|
return;
|
|
4505
4507
|
return Array.from(n).map((o) => o.split(",")).map((o) => ({
|
|
4506
4508
|
method: o[1],
|
|
@@ -4529,7 +4531,7 @@ let oe = class {
|
|
|
4529
4531
|
for (let s = 0, i = this.data.datasets.length; s < i; ++s)
|
|
4530
4532
|
this.getDatasetMeta(s).controller.configure();
|
|
4531
4533
|
for (let s = 0, i = this.data.datasets.length; s < i; ++s)
|
|
4532
|
-
this._updateDataset(s,
|
|
4534
|
+
this._updateDataset(s, st(t) ? t({
|
|
4533
4535
|
datasetIndex: s
|
|
4534
4536
|
}) : t);
|
|
4535
4537
|
this.notifyPlugins("afterDatasetsUpdate", {
|
|
@@ -4549,7 +4551,7 @@ let oe = class {
|
|
|
4549
4551
|
render() {
|
|
4550
4552
|
this.notifyPlugins("beforeRender", {
|
|
4551
4553
|
cancelable: !0
|
|
4552
|
-
}) !== !1 && (Z.has(this) ? this.attached && !Z.running(this) && Z.start(this) : (this.draw(),
|
|
4554
|
+
}) !== !1 && (Z.has(this) ? this.attached && !Z.running(this) && Z.start(this) : (this.draw(), ks({
|
|
4553
4555
|
chart: this
|
|
4554
4556
|
})));
|
|
4555
4557
|
}
|
|
@@ -4597,14 +4599,14 @@ let oe = class {
|
|
|
4597
4599
|
meta: t,
|
|
4598
4600
|
index: t.index,
|
|
4599
4601
|
cancelable: !0
|
|
4600
|
-
}, n =
|
|
4602
|
+
}, n = En(this, t);
|
|
4601
4603
|
this.notifyPlugins("beforeDatasetDraw", i) !== !1 && (n && Ws(s, n), t.controller.draw(), n && Vs(s), i.cancelable = !1, this.notifyPlugins("afterDatasetDraw", i));
|
|
4602
4604
|
}
|
|
4603
4605
|
isPointInArea(t) {
|
|
4604
4606
|
return Hs(t, this.chartArea, this._minPadding);
|
|
4605
4607
|
}
|
|
4606
4608
|
getElementsAtEventForMode(t, s, i, n) {
|
|
4607
|
-
const o =
|
|
4609
|
+
const o = Jn.modes[s];
|
|
4608
4610
|
return typeof o == "function" ? o(this, t, i, n) : [];
|
|
4609
4611
|
}
|
|
4610
4612
|
getDatasetMeta(t) {
|
|
@@ -4626,7 +4628,7 @@ let oe = class {
|
|
|
4626
4628
|
}, i.push(n)), n;
|
|
4627
4629
|
}
|
|
4628
4630
|
getContext() {
|
|
4629
|
-
return this.$context || (this.$context =
|
|
4631
|
+
return this.$context || (this.$context = Tt(null, {
|
|
4630
4632
|
chart: this,
|
|
4631
4633
|
type: "chart"
|
|
4632
4634
|
}));
|
|
@@ -4675,7 +4677,7 @@ let oe = class {
|
|
|
4675
4677
|
destroy() {
|
|
4676
4678
|
this.notifyPlugins("beforeDestroy");
|
|
4677
4679
|
const { canvas: t, ctx: s } = this;
|
|
4678
|
-
this._stop(), this.config.clearCache(), t && (this.unbindEvents(),
|
|
4680
|
+
this._stop(), this.config.clearCache(), t && (this.unbindEvents(), Ze(t, s), this.platform.releaseContext(s), this.canvas = null, this.ctx = null), delete qt[this.id], this.notifyPlugins("afterDestroy");
|
|
4679
4681
|
}
|
|
4680
4682
|
toBase64Image(...t) {
|
|
4681
4683
|
return this.canvas.toDataURL(...t);
|
|
@@ -4738,7 +4740,7 @@ let oe = class {
|
|
|
4738
4740
|
index: r
|
|
4739
4741
|
};
|
|
4740
4742
|
});
|
|
4741
|
-
!
|
|
4743
|
+
!je(i, s) && (this._active = i, this._lastEvent = null, this._updateHoverStyles(i, s));
|
|
4742
4744
|
}
|
|
4743
4745
|
notifyPlugins(t, s, i) {
|
|
4744
4746
|
return this._plugins.notify(this, t, s, i);
|
|
@@ -4763,7 +4765,7 @@ let oe = class {
|
|
|
4763
4765
|
return i.cancelable = !1, this.notifyPlugins("afterEvent", i, n), (o || i.changed) && this.render(), this;
|
|
4764
4766
|
}
|
|
4765
4767
|
_handleEvent(t, s, i) {
|
|
4766
|
-
const { _active: n = [], options: o } = this, r = s, a = this._getActiveElements(t, n, i, r), c =
|
|
4768
|
+
const { _active: n = [], options: o } = this, r = s, a = this._getActiveElements(t, n, i, r), c = zi(t), l = ir(t, this._lastEvent, i, c);
|
|
4767
4769
|
i && (this._lastEvent = null, E(o.onHover, [
|
|
4768
4770
|
t,
|
|
4769
4771
|
a,
|
|
@@ -4773,7 +4775,7 @@ let oe = class {
|
|
|
4773
4775
|
a,
|
|
4774
4776
|
this
|
|
4775
4777
|
], this));
|
|
4776
|
-
const h = !
|
|
4778
|
+
const h = !je(a, n);
|
|
4777
4779
|
return (h || s) && (this._active = a, this._updateHoverStyles(a, n, s)), this._lastEvent = l, h;
|
|
4778
4780
|
}
|
|
4779
4781
|
_getActiveElements(t, s, i, n) {
|
|
@@ -4785,10 +4787,10 @@ let oe = class {
|
|
|
4785
4787
|
return this.getElementsAtEventForMode(t, o.mode, o, n);
|
|
4786
4788
|
}
|
|
4787
4789
|
};
|
|
4788
|
-
function
|
|
4790
|
+
function Os() {
|
|
4789
4791
|
return j(oe.instances, (e) => e._plugins.invalidate());
|
|
4790
4792
|
}
|
|
4791
|
-
function
|
|
4793
|
+
function nr(e, t, s) {
|
|
4792
4794
|
const { startAngle: i, x: n, y: o, outerRadius: r, innerRadius: a, options: c } = t, { borderWidth: l, borderJoinStyle: h } = c, d = Math.min(l / r, q(i - s));
|
|
4793
4795
|
if (e.beginPath(), e.arc(n, o, r - l / 2, i + d / 2, s - d / 2), a > 0) {
|
|
4794
4796
|
const f = Math.min(l / a, q(i - s));
|
|
@@ -4804,12 +4806,12 @@ function or(e, t, s) {
|
|
|
4804
4806
|
}
|
|
4805
4807
|
e.closePath(), e.moveTo(0, 0), e.rect(0, 0, e.canvas.width, e.canvas.height), e.clip("evenodd");
|
|
4806
4808
|
}
|
|
4807
|
-
function
|
|
4809
|
+
function or(e, t, s) {
|
|
4808
4810
|
const { startAngle: i, pixelMargin: n, x: o, y: r, outerRadius: a, innerRadius: c } = t;
|
|
4809
4811
|
let l = n / a;
|
|
4810
4812
|
e.beginPath(), e.arc(o, r, a, i - l, s + l), c > n ? (l = n / c, e.arc(o, r, c, s + l, i - l, !0)) : e.arc(o, r, n, s + $, i - $), e.closePath(), e.clip();
|
|
4811
4813
|
}
|
|
4812
|
-
function
|
|
4814
|
+
function rr(e) {
|
|
4813
4815
|
return Ns(e, [
|
|
4814
4816
|
"outerStart",
|
|
4815
4817
|
"outerEnd",
|
|
@@ -4817,8 +4819,8 @@ function ar(e) {
|
|
|
4817
4819
|
"innerEnd"
|
|
4818
4820
|
]);
|
|
4819
4821
|
}
|
|
4820
|
-
function
|
|
4821
|
-
const n =
|
|
4822
|
+
function ar(e, t, s, i) {
|
|
4823
|
+
const n = rr(e.options.borderRadius), o = (s - t) / 2, r = Math.min(o, i * t / 2), a = (c) => {
|
|
4822
4824
|
const l = (s - Math.min(o, c)) * i / 2;
|
|
4823
4825
|
return J(c, 0, Math.min(o, l));
|
|
4824
4826
|
};
|
|
@@ -4829,7 +4831,7 @@ function cr(e, t, s, i) {
|
|
|
4829
4831
|
innerEnd: J(n.innerEnd, 0, r)
|
|
4830
4832
|
};
|
|
4831
4833
|
}
|
|
4832
|
-
function
|
|
4834
|
+
function ut(e, t, s, i) {
|
|
4833
4835
|
return {
|
|
4834
4836
|
x: s + e * Math.cos(t),
|
|
4835
4837
|
y: i + e * Math.sin(t)
|
|
@@ -4843,26 +4845,26 @@ function se(e, t, s, i, n, o) {
|
|
|
4843
4845
|
const M = h > 0 ? h - i : 0, S = d > 0 ? d - i : 0, C = (M + S) / 2, X = C !== 0 ? g * C / (C + i) : g;
|
|
4844
4846
|
u = (g - X) / 2;
|
|
4845
4847
|
}
|
|
4846
|
-
const m = Math.max(1e-3, g * d - s / z) / d, b = (g - m) / 2, p = c + b + u, _ = n - b - u, { outerStart: x, outerEnd: v, innerStart: y, innerEnd: O } =
|
|
4848
|
+
const m = Math.max(1e-3, g * d - s / z) / d, b = (g - m) / 2, p = c + b + u, _ = n - b - u, { outerStart: x, outerEnd: v, innerStart: y, innerEnd: O } = ar(t, f, d, _ - p), D = d - x, L = d - v, I = p + x / D, k = _ - v / L, H = f + y, P = f + O, V = p + y / H, Y = _ - O / P;
|
|
4847
4849
|
if (e.beginPath(), o) {
|
|
4848
4850
|
const M = (I + k) / 2;
|
|
4849
4851
|
if (e.arc(r, a, d, I, M), e.arc(r, a, d, M, k), v > 0) {
|
|
4850
|
-
const F =
|
|
4852
|
+
const F = ut(L, k, r, a);
|
|
4851
4853
|
e.arc(F.x, F.y, v, k, _ + $);
|
|
4852
4854
|
}
|
|
4853
|
-
const S =
|
|
4855
|
+
const S = ut(P, _, r, a);
|
|
4854
4856
|
if (e.lineTo(S.x, S.y), O > 0) {
|
|
4855
|
-
const F =
|
|
4857
|
+
const F = ut(P, Y, r, a);
|
|
4856
4858
|
e.arc(F.x, F.y, O, _ + $, Y + Math.PI);
|
|
4857
4859
|
}
|
|
4858
4860
|
const C = (_ - O / f + (p + y / f)) / 2;
|
|
4859
4861
|
if (e.arc(r, a, f, _ - O / f, C, !0), e.arc(r, a, f, C, p + y / f, !0), y > 0) {
|
|
4860
|
-
const F =
|
|
4862
|
+
const F = ut(H, V, r, a);
|
|
4861
4863
|
e.arc(F.x, F.y, y, V + Math.PI, p - $);
|
|
4862
4864
|
}
|
|
4863
|
-
const X =
|
|
4865
|
+
const X = ut(D, p, r, a);
|
|
4864
4866
|
if (e.lineTo(X.x, X.y), x > 0) {
|
|
4865
|
-
const F =
|
|
4867
|
+
const F = ut(D, I, r, a);
|
|
4866
4868
|
e.arc(F.x, F.y, x, p - $, I);
|
|
4867
4869
|
}
|
|
4868
4870
|
} else {
|
|
@@ -4874,7 +4876,7 @@ function se(e, t, s, i, n, o) {
|
|
|
4874
4876
|
}
|
|
4875
4877
|
e.closePath();
|
|
4876
4878
|
}
|
|
4877
|
-
function
|
|
4879
|
+
function cr(e, t, s, i, n) {
|
|
4878
4880
|
const { fullCircles: o, startAngle: r, circumference: a } = t;
|
|
4879
4881
|
let c = t.endAngle;
|
|
4880
4882
|
if (o) {
|
|
@@ -4885,7 +4887,7 @@ function lr(e, t, s, i, n) {
|
|
|
4885
4887
|
}
|
|
4886
4888
|
return se(e, t, s, i, c, n), e.fill(), c;
|
|
4887
4889
|
}
|
|
4888
|
-
function
|
|
4890
|
+
function lr(e, t, s, i, n) {
|
|
4889
4891
|
const { fullCircles: o, startAngle: r, circumference: a, options: c } = t, { borderWidth: l, borderJoinStyle: h, borderDash: d, borderDashOffset: f, borderRadius: u } = c, g = c.borderAlign === "inner";
|
|
4890
4892
|
if (!l)
|
|
4891
4893
|
return;
|
|
@@ -4897,9 +4899,9 @@ function hr(e, t, s, i, n) {
|
|
|
4897
4899
|
e.stroke();
|
|
4898
4900
|
isNaN(a) || (m = r + (a % T || T));
|
|
4899
4901
|
}
|
|
4900
|
-
g &&
|
|
4902
|
+
g && or(e, t, m), c.selfJoin && m - r >= z && u === 0 && h !== "miter" && nr(e, t, m), o || (se(e, t, s, i, m, n), e.stroke());
|
|
4901
4903
|
}
|
|
4902
|
-
class
|
|
4904
|
+
class hr extends Ee {
|
|
4903
4905
|
static id = "arc";
|
|
4904
4906
|
static defaults = {
|
|
4905
4907
|
borderAlign: "center",
|
|
@@ -4945,7 +4947,7 @@ class dr extends Pe {
|
|
|
4945
4947
|
"innerRadius",
|
|
4946
4948
|
"outerRadius",
|
|
4947
4949
|
"circumference"
|
|
4948
|
-
], i), f = (this.options.spacing + this.options.borderWidth) / 2, u = A(d, c - a), g = Jt(o, a, c) && a !== c, m = u >= T || g, b =
|
|
4950
|
+
], i), f = (this.options.spacing + this.options.borderWidth) / 2, u = A(d, c - a), g = Jt(o, a, c) && a !== c, m = u >= T || g, b = Wi(r, l + f, h + f);
|
|
4949
4951
|
return m && b;
|
|
4950
4952
|
}
|
|
4951
4953
|
getCenterPoint(t) {
|
|
@@ -4973,22 +4975,21 @@ class dr extends Pe {
|
|
|
4973
4975
|
const a = (this.startAngle + this.endAngle) / 2;
|
|
4974
4976
|
t.translate(Math.cos(a) * n, Math.sin(a) * n);
|
|
4975
4977
|
const c = 1 - Math.sin(Math.min(z, i || 0)), l = n * c;
|
|
4976
|
-
t.fillStyle = s.backgroundColor, t.strokeStyle = s.borderColor,
|
|
4978
|
+
t.fillStyle = s.backgroundColor, t.strokeStyle = s.borderColor, cr(t, this, l, o, r), lr(t, this, l, o, r), t.restore();
|
|
4977
4979
|
}
|
|
4978
4980
|
}
|
|
4979
4981
|
const oi = "label";
|
|
4980
|
-
function
|
|
4982
|
+
function Ds(e, t) {
|
|
4981
4983
|
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
4982
4984
|
}
|
|
4983
|
-
function
|
|
4985
|
+
function dr(e, t) {
|
|
4984
4986
|
const s = e.options;
|
|
4985
4987
|
s && t && Object.assign(s, t);
|
|
4986
4988
|
}
|
|
4987
4989
|
function ri(e, t) {
|
|
4988
4990
|
e.labels = t;
|
|
4989
4991
|
}
|
|
4990
|
-
function ai(e, t) {
|
|
4991
|
-
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : oi;
|
|
4992
|
+
function ai(e, t, s = oi) {
|
|
4992
4993
|
const i = [];
|
|
4993
4994
|
e.datasets = t.map((n) => {
|
|
4994
4995
|
const o = e.datasets.find((r) => r[s] === n[s]);
|
|
@@ -4997,43 +4998,42 @@ function ai(e, t) {
|
|
|
4997
4998
|
} : (i.push(o), Object.assign(o, n), o);
|
|
4998
4999
|
});
|
|
4999
5000
|
}
|
|
5000
|
-
function
|
|
5001
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : oi;
|
|
5001
|
+
function fr(e, t = oi) {
|
|
5002
5002
|
const s = {
|
|
5003
5003
|
labels: [],
|
|
5004
5004
|
datasets: []
|
|
5005
5005
|
};
|
|
5006
5006
|
return ri(s, e.labels), ai(s, e.datasets, t), s;
|
|
5007
5007
|
}
|
|
5008
|
-
function
|
|
5009
|
-
const { height: s = 150, width: i = 300, redraw: n = !1, datasetIdKey: o, type: r, data: a, options: c, plugins: l = [], fallbackContent: h, updateMode: d, ...f } = e, u =
|
|
5008
|
+
function ur(e, t) {
|
|
5009
|
+
const { height: s = 150, width: i = 300, redraw: n = !1, datasetIdKey: o, type: r, data: a, options: c, plugins: l = [], fallbackContent: h, updateMode: d, ...f } = e, u = Ie(null), g = Ie(null), m = () => {
|
|
5010
5010
|
u.current && (g.current = new oe(u.current, {
|
|
5011
5011
|
type: r,
|
|
5012
|
-
data:
|
|
5012
|
+
data: fr(a, o),
|
|
5013
5013
|
options: c && {
|
|
5014
5014
|
...c
|
|
5015
5015
|
},
|
|
5016
5016
|
plugins: l
|
|
5017
|
-
}),
|
|
5017
|
+
}), Ds(t, g.current));
|
|
5018
5018
|
}, b = () => {
|
|
5019
|
-
|
|
5019
|
+
Ds(t, null), g.current && (g.current.destroy(), g.current = null);
|
|
5020
5020
|
};
|
|
5021
|
-
return
|
|
5022
|
-
!n && g.current && c &&
|
|
5021
|
+
return dt(() => {
|
|
5022
|
+
!n && g.current && c && dr(g.current, c);
|
|
5023
5023
|
}, [
|
|
5024
5024
|
n,
|
|
5025
5025
|
c
|
|
5026
|
-
]),
|
|
5026
|
+
]), dt(() => {
|
|
5027
5027
|
!n && g.current && ri(g.current.config.data, a.labels);
|
|
5028
5028
|
}, [
|
|
5029
5029
|
n,
|
|
5030
5030
|
a.labels
|
|
5031
|
-
]),
|
|
5031
|
+
]), dt(() => {
|
|
5032
5032
|
!n && g.current && a.datasets && ai(g.current.config.data, a.datasets, o);
|
|
5033
5033
|
}, [
|
|
5034
5034
|
n,
|
|
5035
5035
|
a.datasets
|
|
5036
|
-
]),
|
|
5036
|
+
]), dt(() => {
|
|
5037
5037
|
g.current && (n ? (b(), setTimeout(m)) : g.current.update(d));
|
|
5038
5038
|
}, [
|
|
5039
5039
|
n,
|
|
@@ -5041,29 +5041,30 @@ function gr(e, t) {
|
|
|
5041
5041
|
a.labels,
|
|
5042
5042
|
a.datasets,
|
|
5043
5043
|
d
|
|
5044
|
-
]),
|
|
5044
|
+
]), dt(() => {
|
|
5045
5045
|
g.current && (b(), setTimeout(m));
|
|
5046
5046
|
}, [
|
|
5047
5047
|
r
|
|
5048
|
-
]),
|
|
5048
|
+
]), dt(() => (m(), () => b()), []), /* @__PURE__ */ ve("canvas", {
|
|
5049
5049
|
ref: u,
|
|
5050
5050
|
role: "img",
|
|
5051
5051
|
height: s,
|
|
5052
5052
|
width: i,
|
|
5053
|
-
...f
|
|
5054
|
-
|
|
5053
|
+
...f,
|
|
5054
|
+
children: h
|
|
5055
|
+
});
|
|
5055
5056
|
}
|
|
5056
|
-
const
|
|
5057
|
-
function
|
|
5058
|
-
return oe.register(t), /* @__PURE__ */ Cs((s, i) => /* @__PURE__ */
|
|
5057
|
+
const gr = /* @__PURE__ */ Cs(ur);
|
|
5058
|
+
function pr(e, t) {
|
|
5059
|
+
return oe.register(t), /* @__PURE__ */ Cs((s, i) => /* @__PURE__ */ ve(gr, {
|
|
5059
5060
|
...s,
|
|
5060
5061
|
ref: i,
|
|
5061
5062
|
type: e
|
|
5062
5063
|
}));
|
|
5063
5064
|
}
|
|
5064
|
-
const
|
|
5065
|
-
oe.register(
|
|
5066
|
-
const
|
|
5065
|
+
const mr = /* @__PURE__ */ pr("doughnut", Un);
|
|
5066
|
+
oe.register(hr);
|
|
5067
|
+
const yr = ({
|
|
5067
5068
|
values: e,
|
|
5068
5069
|
colors: t = ["#525252", "#00D492"],
|
|
5069
5070
|
borderColors: s = ["#FFFFFF", "#FFFFFF"],
|
|
@@ -5131,8 +5132,8 @@ const vr = ({
|
|
|
5131
5132
|
a,
|
|
5132
5133
|
d
|
|
5133
5134
|
]);
|
|
5134
|
-
return /* @__PURE__ */
|
|
5135
|
+
return /* @__PURE__ */ ve(mr, { data: g, options: m, plugins: b, redraw: u });
|
|
5135
5136
|
};
|
|
5136
5137
|
export {
|
|
5137
|
-
|
|
5138
|
+
yr as PieChart
|
|
5138
5139
|
};
|