@konstructio/ui 0.1.2-alpha.4 → 0.1.2-alpha.40
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/{Combination-VYaRRJBZ.js → Combination-BtmnusWq.js} +141 -138
- package/dist/DatePicker.css +1 -1
- package/dist/Modal-CtAG97Ts.js +99 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/chevron-down-DgT-uSF9.js +5 -0
- package/dist/chevron-left-C4LEg1fH.js +7 -0
- package/dist/chevron-up-CRyLc5Ml.js +54 -0
- package/dist/chevron-up-DrQr2Fwd.js +5 -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 +42 -44
- package/dist/components/Badge/Badge.variants.js +8 -6
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +24 -23
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.variants.js +1 -1
- package/dist/components/Card/Card.variants.js +5 -9
- package/dist/components/Checkbox/Checkbox.js +6 -6
- 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 +1243 -1191
- package/dist/components/Divider/Divider.variants.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +37 -31
- package/dist/components/Dropdown/Dropdown.variants.js +9 -4
- package/dist/components/Dropdown/components/List/List.js +128 -59
- package/dist/components/Dropdown/components/ListItem/ListItem.js +90 -39
- package/dist/components/Dropdown/components/Wrapper.js +141 -134
- package/dist/components/Dropdown/constants/index.js +4 -0
- package/dist/components/Dropdown/constants/pagination.js +4 -0
- package/dist/components/Dropdown/contexts/dropdown.context.js +17 -0
- package/dist/components/Dropdown/contexts/dropdown.provider.js +48 -20
- package/dist/components/Dropdown/hooks/useDropdown.js +74 -29
- package/dist/components/Dropdown/hooks/useNavigationList.js +27 -39
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.variants.js +2 -2
- 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/Input/Input.variants.js +2 -1
- package/dist/components/Loading/Loading.js +1 -7
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +4 -4
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +34 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +34 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.js +38 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +38 -0
- package/dist/components/MultiSelectDropdown/components/List/List.js +37 -0
- package/dist/components/MultiSelectDropdown/components/List/List.variants.js +23 -0
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +105 -0
- package/dist/components/MultiSelectDropdown/components/index.js +8 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.js +21 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.js +13 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +138 -0
- package/dist/components/MultiSelectDropdown/contexts/index.js +6 -0
- package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +32 -0
- package/dist/components/NumberInput/NumberInput.js +2 -2
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +8 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +46 -0
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +27 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +629 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +36 -0
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +45 -0
- package/dist/components/PhoneNumberInput/components/Wrapper.js +625 -0
- package/dist/components/PhoneNumberInput/components/index.js +6 -0
- package/dist/components/PhoneNumberInput/contexts/index.js +8 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.context.js +28 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +13 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +6144 -0
- package/dist/components/PhoneNumberInput/utils/index.js +11 -0
- package/dist/components/PieChart/PieChart.js +647 -664
- package/dist/components/RadioCard/RadioCard.variants.js +1 -6
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Sidebar/Sidebar.variants.js +2 -2
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +29 -28
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +8 -8
- package/dist/components/Switch/Switch.variants.js +4 -4
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.variants.js +1 -1
- 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 +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Tag/Tag.variants.js +1 -0
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +49 -98
- package/dist/components/TimePicker/TimePicker.variants.js +2 -2
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/Toast/Toast.js +283 -255
- package/dist/components/Toast/Toast.variants.js +37 -24
- package/dist/components/Tooltip/Tooltip.js +15 -14
- package/dist/components/Tooltip/Tooltip.variants.js +5 -4
- package/dist/components/Typography/Typography.variants.js +18 -23
- 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 +72 -0
- package/dist/components/VirtualizedTable/components/Body/Body.js +51 -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 +93 -0
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +48 -0
- package/dist/components/VirtualizedTable/components/Header/Header.js +84 -0
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +53 -0
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +67 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +34 -0
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +27 -0
- package/dist/components/VirtualizedTable/components/index.js +16 -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 +32 -0
- package/dist/components/VirtualizedTable/contexts/table.hook.js +11 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +85 -0
- package/dist/components/index.js +88 -80
- package/dist/contexts/theme.provider.js +0 -1
- package/dist/{createLucideIcon-DbC6TvM5.js → createLucideIcon-D4r5Phnh.js} +0 -24
- package/dist/debounce-BFejQm9P.js +200 -0
- package/dist/ellipsis-vertical-BVPtjl5f.js +9 -0
- package/dist/{index-h-Ul0anl.js → index--V_ZsiQe.js} +1 -22
- package/dist/index-2hB40Iuc.js +1873 -0
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/{index-bwWKd82e.js → index-BbQkJE5L.js} +1 -1
- package/dist/index-BtQfgaSF.js +60 -0
- package/dist/index-C3tHPg8y.js +662 -0
- package/dist/index-C65LtGuU.js +137 -0
- package/dist/index-CIAmiWcw.js +200 -0
- package/dist/index-CSFe9uC5.js +14 -0
- package/dist/index-CSWGJT-v.js +1722 -0
- package/dist/{index-D3xzCzcO.js → index-CdwPV0FE.js} +4 -4
- package/dist/index-CigKKiZS.js +91 -0
- package/dist/{index-BAraV3ai.js → index-DH2Fnov1.js} +11 -12
- package/dist/index-DLcqcWxM.js +29 -0
- package/dist/index-Dbt2vBmS.js +136 -0
- package/dist/{index-DB2XhXHn.js → index-DpW9ExsS.js} +7 -7
- package/dist/index-DrWQH0QF.js +55 -0
- package/dist/index-Ds6U2x4Z.js +479 -0
- package/dist/{index-C1g_chDT.js → index-mPY_8Y5v.js} +2 -2
- package/dist/index-ohdbKsws.js +27 -0
- package/dist/index.d.ts +232 -23
- package/dist/index.js +112 -102
- package/dist/libphonenumber-_7ZyKWA7.js +11549 -0
- package/dist/loader-juvMSJ9L.js +5 -0
- package/dist/package.json +48 -34
- package/dist/styles.css +1 -1
- package/dist/ui/civo-theme.css +191 -167
- package/dist/{useBreadcrumb-B8DnuqkR.js → useBreadcrumb-BAHbGQ_O.js} +0 -10
- package/dist/utils/index.js +534 -501
- package/dist/{x-BPcqkRZd.js → x-DPU9OdYH.js} +1 -1
- package/package.json +48 -34
- package/dist/Modal-V67Uz78z.js +0 -98
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/chevron-down-BLZPftpV.js +0 -11
- package/dist/index-BXuxPoz7.js +0 -435
- package/dist/index-BfXxHr_2.js +0 -125
- package/dist/index-C9T9HQaa.js +0 -423
- package/dist/index-CZnD2QxM.js +0 -32
- package/dist/index-CrBonFvu.js +0 -144
- package/dist/index-Cvx4lqTq.js +0 -47
- package/dist/index-DQH6odE9.js +0 -82
- package/dist/index-Oq5GlCHP.js +0 -131
- package/dist/index-iXyXtdgP.js +0 -31
|
@@ -1,29 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
* @kurkle/color v0.3.4
|
|
5
|
-
* https://github.com/kurkle/color#readme
|
|
6
|
-
* (c) 2024 Jukka Kurkela
|
|
7
|
-
* Released under the MIT License
|
|
8
|
-
*/
|
|
9
|
-
function Rt(e) {
|
|
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
|
+
function It(e) {
|
|
10
4
|
return e + 0.5 | 0;
|
|
11
5
|
}
|
|
12
6
|
const Q = (e, t, s) => Math.max(Math.min(e, s), t);
|
|
13
|
-
function
|
|
14
|
-
return Q(
|
|
7
|
+
function kt(e) {
|
|
8
|
+
return Q(It(e * 2.55), 0, 255);
|
|
15
9
|
}
|
|
16
|
-
function
|
|
17
|
-
return Q(
|
|
10
|
+
function et(e) {
|
|
11
|
+
return Q(It(e * 255), 0, 255);
|
|
18
12
|
}
|
|
19
13
|
function G(e) {
|
|
20
|
-
return Q(
|
|
14
|
+
return Q(It(e / 2.55) / 100, 0, 1);
|
|
21
15
|
}
|
|
22
|
-
function
|
|
23
|
-
return Q(
|
|
16
|
+
function Te(e) {
|
|
17
|
+
return Q(It(e * 100), 0, 100);
|
|
24
18
|
}
|
|
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
|
|
19
|
+
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);
|
|
20
|
+
function di(e) {
|
|
27
21
|
var t = e.length, s;
|
|
28
22
|
return e[0] === "#" && (t === 4 || t === 5 ? s = {
|
|
29
23
|
r: 255 & N[e[1]] * 17,
|
|
@@ -37,75 +31,75 @@ function fi(e) {
|
|
|
37
31
|
a: t === 9 ? N[e[7]] << 4 | N[e[8]] : 255
|
|
38
32
|
})), s;
|
|
39
33
|
}
|
|
40
|
-
const
|
|
41
|
-
function
|
|
42
|
-
var t =
|
|
43
|
-
return e ? "#" + t(e.r) + t(e.g) + t(e.b) +
|
|
34
|
+
const fi = (e, t) => e < 255 ? t(e) : "";
|
|
35
|
+
function ui(e) {
|
|
36
|
+
var t = hi(e) ? ci : li;
|
|
37
|
+
return e ? "#" + t(e.r) + t(e.g) + t(e.b) + fi(e.a, t) : void 0;
|
|
44
38
|
}
|
|
45
|
-
const
|
|
39
|
+
const gi = /^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;
|
|
46
40
|
function As(e, t, s) {
|
|
47
41
|
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
42
|
return [n(0), n(8), n(4)];
|
|
49
43
|
}
|
|
50
|
-
function
|
|
44
|
+
function pi(e, t, s) {
|
|
51
45
|
const i = (n, o = (n + e / 60) % 6) => s - s * t * Math.max(Math.min(o, 4 - o, 1), 0);
|
|
52
46
|
return [i(5), i(3), i(1)];
|
|
53
47
|
}
|
|
54
|
-
function
|
|
48
|
+
function mi(e, t, s) {
|
|
55
49
|
const i = As(e, 1, 0.5);
|
|
56
50
|
let n;
|
|
57
51
|
for (t + s > 1 && (n = 1 / (t + s), t *= n, s *= n), n = 0; n < 3; n++)
|
|
58
52
|
i[n] *= 1 - t - s, i[n] += t;
|
|
59
53
|
return i;
|
|
60
54
|
}
|
|
61
|
-
function
|
|
55
|
+
function _i(e, t, s, i, n) {
|
|
62
56
|
return e === n ? (t - s) / i + (t < s ? 6 : 0) : t === n ? (s - e) / i + 2 : (e - t) / i + 4;
|
|
63
57
|
}
|
|
64
|
-
function
|
|
58
|
+
function we(e) {
|
|
65
59
|
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
60
|
let c, l, h;
|
|
67
|
-
return o !== r && (h = o - r, l = a > 0.5 ? h / (2 - o - r) : h / (o + r), c =
|
|
61
|
+
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
62
|
}
|
|
69
|
-
function
|
|
70
|
-
return (Array.isArray(t) ? e(t[0], t[1], t[2]) : e(t, s, i)).map(
|
|
63
|
+
function Me(e, t, s, i) {
|
|
64
|
+
return (Array.isArray(t) ? e(t[0], t[1], t[2]) : e(t, s, i)).map(et);
|
|
71
65
|
}
|
|
72
|
-
function
|
|
73
|
-
return
|
|
66
|
+
function ke(e, t, s) {
|
|
67
|
+
return Me(As, e, t, s);
|
|
74
68
|
}
|
|
75
|
-
function
|
|
76
|
-
return
|
|
69
|
+
function bi(e, t, s) {
|
|
70
|
+
return Me(mi, e, t, s);
|
|
77
71
|
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
72
|
+
function xi(e, t, s) {
|
|
73
|
+
return Me(pi, e, t, s);
|
|
80
74
|
}
|
|
81
75
|
function Ps(e) {
|
|
82
76
|
return (e % 360 + 360) % 360;
|
|
83
77
|
}
|
|
84
|
-
function
|
|
85
|
-
const t =
|
|
78
|
+
function yi(e) {
|
|
79
|
+
const t = gi.exec(e);
|
|
86
80
|
let s = 255, i;
|
|
87
81
|
if (!t)
|
|
88
82
|
return;
|
|
89
|
-
t[5] !== i && (s = t[6] ?
|
|
83
|
+
t[5] !== i && (s = t[6] ? kt(+t[5]) : et(+t[5]));
|
|
90
84
|
const n = Ps(+t[2]), o = +t[3] / 100, r = +t[4] / 100;
|
|
91
|
-
return t[1] === "hwb" ? i =
|
|
85
|
+
return t[1] === "hwb" ? i = bi(n, o, r) : t[1] === "hsv" ? i = xi(n, o, r) : i = ke(n, o, r), {
|
|
92
86
|
r: i[0],
|
|
93
87
|
g: i[1],
|
|
94
88
|
b: i[2],
|
|
95
89
|
a: s
|
|
96
90
|
};
|
|
97
91
|
}
|
|
98
|
-
function
|
|
99
|
-
var s =
|
|
100
|
-
s[0] = Ps(s[0] + t), s =
|
|
92
|
+
function vi(e, t) {
|
|
93
|
+
var s = we(e);
|
|
94
|
+
s[0] = Ps(s[0] + t), s = ke(s), e.r = s[0], e.g = s[1], e.b = s[2];
|
|
101
95
|
}
|
|
102
|
-
function
|
|
96
|
+
function wi(e) {
|
|
103
97
|
if (!e)
|
|
104
98
|
return;
|
|
105
|
-
const t =
|
|
99
|
+
const t = we(e), s = t[0], i = Te(t[1]), n = Te(t[2]);
|
|
106
100
|
return e.a < 255 ? `hsla(${s}, ${i}%, ${n}%, ${G(e.a)})` : `hsl(${s}, ${i}%, ${n}%)`;
|
|
107
101
|
}
|
|
108
|
-
const
|
|
102
|
+
const Le = {
|
|
109
103
|
x: "dark",
|
|
110
104
|
Z: "light",
|
|
111
105
|
Y: "re",
|
|
@@ -133,7 +127,7 @@ const Te = {
|
|
|
133
127
|
H: "ea",
|
|
134
128
|
I: "ightg",
|
|
135
129
|
J: "wh"
|
|
136
|
-
},
|
|
130
|
+
}, ze = {
|
|
137
131
|
OiceXe: "f0f8ff",
|
|
138
132
|
antiquewEte: "faebd7",
|
|
139
133
|
aqua: "ffff",
|
|
@@ -283,20 +277,20 @@ const Te = {
|
|
|
283
277
|
Lw: "ffff00",
|
|
284
278
|
LwgYF: "9acd32"
|
|
285
279
|
};
|
|
286
|
-
function
|
|
287
|
-
const e = {}, t = Object.keys(
|
|
280
|
+
function Mi() {
|
|
281
|
+
const e = {}, t = Object.keys(ze), s = Object.keys(Le);
|
|
288
282
|
let i, n, o, r, a;
|
|
289
283
|
for (i = 0; i < t.length; i++) {
|
|
290
284
|
for (r = a = t[i], n = 0; n < s.length; n++)
|
|
291
|
-
o = s[n], a = a.replace(o,
|
|
292
|
-
o = parseInt(
|
|
285
|
+
o = s[n], a = a.replace(o, Le[o]);
|
|
286
|
+
o = parseInt(ze[r], 16), e[a] = [o >> 16 & 255, o >> 8 & 255, o & 255];
|
|
293
287
|
}
|
|
294
288
|
return e;
|
|
295
289
|
}
|
|
296
|
-
let
|
|
297
|
-
function
|
|
298
|
-
|
|
299
|
-
const t =
|
|
290
|
+
let Ft;
|
|
291
|
+
function ki(e) {
|
|
292
|
+
Ft || (Ft = Mi(), Ft.transparent = [0, 0, 0, 0]);
|
|
293
|
+
const t = Ft[e.toLowerCase()];
|
|
300
294
|
return t && {
|
|
301
295
|
r: t[0],
|
|
302
296
|
g: t[1],
|
|
@@ -304,16 +298,16 @@ function Si(e) {
|
|
|
304
298
|
a: t.length === 4 ? t[3] : 255
|
|
305
299
|
};
|
|
306
300
|
}
|
|
307
|
-
const
|
|
308
|
-
function
|
|
309
|
-
const t =
|
|
301
|
+
const Si = /^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;
|
|
302
|
+
function Oi(e) {
|
|
303
|
+
const t = Si.exec(e);
|
|
310
304
|
let s = 255, i, n, o;
|
|
311
305
|
if (t) {
|
|
312
306
|
if (t[7] !== i) {
|
|
313
307
|
const r = +t[7];
|
|
314
|
-
s = t[8] ?
|
|
308
|
+
s = t[8] ? kt(r) : Q(r * 255, 0, 255);
|
|
315
309
|
}
|
|
316
|
-
return i = +t[1], n = +t[3], o = +t[5], i = 255 & (t[2] ?
|
|
310
|
+
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
311
|
r: i,
|
|
318
312
|
g: n,
|
|
319
313
|
b: o,
|
|
@@ -321,42 +315,42 @@ function Di(e) {
|
|
|
321
315
|
};
|
|
322
316
|
}
|
|
323
317
|
}
|
|
324
|
-
function
|
|
318
|
+
function Di(e) {
|
|
325
319
|
return e && (e.a < 255 ? `rgba(${e.r}, ${e.g}, ${e.b}, ${G(e.a)})` : `rgb(${e.r}, ${e.g}, ${e.b})`);
|
|
326
320
|
}
|
|
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 =
|
|
321
|
+
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);
|
|
322
|
+
function Ci(e, t, s) {
|
|
323
|
+
const i = ft(G(e.r)), n = ft(G(e.g)), o = ft(G(e.b));
|
|
330
324
|
return {
|
|
331
|
-
r:
|
|
332
|
-
g:
|
|
333
|
-
b:
|
|
325
|
+
r: et(ae(i + s * (ft(G(t.r)) - i))),
|
|
326
|
+
g: et(ae(n + s * (ft(G(t.g)) - n))),
|
|
327
|
+
b: et(ae(o + s * (ft(G(t.b)) - o))),
|
|
334
328
|
a: e.a + s * (t.a - e.a)
|
|
335
329
|
};
|
|
336
330
|
}
|
|
337
|
-
function
|
|
331
|
+
function jt(e, t, s) {
|
|
338
332
|
if (e) {
|
|
339
|
-
let i =
|
|
340
|
-
i[t] = Math.max(0, Math.min(i[t] + i[t] * s, t === 0 ? 360 : 1)), i =
|
|
333
|
+
let i = we(e);
|
|
334
|
+
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
335
|
}
|
|
342
336
|
}
|
|
343
337
|
function Es(e, t) {
|
|
344
338
|
return e && Object.assign(t || {}, e);
|
|
345
339
|
}
|
|
346
|
-
function
|
|
340
|
+
function Fe(e) {
|
|
347
341
|
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 =
|
|
342
|
+
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
343
|
}
|
|
350
|
-
function
|
|
351
|
-
return e.charAt(0) === "r" ?
|
|
344
|
+
function Ai(e) {
|
|
345
|
+
return e.charAt(0) === "r" ? Oi(e) : yi(e);
|
|
352
346
|
}
|
|
353
|
-
class
|
|
347
|
+
class Ct {
|
|
354
348
|
constructor(t) {
|
|
355
|
-
if (t instanceof
|
|
349
|
+
if (t instanceof Ct)
|
|
356
350
|
return t;
|
|
357
351
|
const s = typeof t;
|
|
358
352
|
let i;
|
|
359
|
-
s === "object" ? i =
|
|
353
|
+
s === "object" ? i = Fe(t) : s === "string" && (i = di(t) || ki(t) || Ai(t)), this._rgb = i, this._valid = !!i;
|
|
360
354
|
}
|
|
361
355
|
get valid() {
|
|
362
356
|
return this._valid;
|
|
@@ -366,16 +360,16 @@ class Dt {
|
|
|
366
360
|
return t && (t.a = G(t.a)), t;
|
|
367
361
|
}
|
|
368
362
|
set rgb(t) {
|
|
369
|
-
this._rgb =
|
|
363
|
+
this._rgb = Fe(t);
|
|
370
364
|
}
|
|
371
365
|
rgbString() {
|
|
372
|
-
return this._valid ?
|
|
366
|
+
return this._valid ? Di(this._rgb) : void 0;
|
|
373
367
|
}
|
|
374
368
|
hexString() {
|
|
375
|
-
return this._valid ?
|
|
369
|
+
return this._valid ? ui(this._rgb) : void 0;
|
|
376
370
|
}
|
|
377
371
|
hslString() {
|
|
378
|
-
return this._valid ?
|
|
372
|
+
return this._valid ? wi(this._rgb) : void 0;
|
|
379
373
|
}
|
|
380
374
|
mix(t, s) {
|
|
381
375
|
if (t) {
|
|
@@ -387,20 +381,20 @@ class Dt {
|
|
|
387
381
|
return this;
|
|
388
382
|
}
|
|
389
383
|
interpolate(t, s) {
|
|
390
|
-
return t && (this._rgb =
|
|
384
|
+
return t && (this._rgb = Ci(this._rgb, t._rgb, s)), this;
|
|
391
385
|
}
|
|
392
386
|
clone() {
|
|
393
|
-
return new
|
|
387
|
+
return new Ct(this.rgb);
|
|
394
388
|
}
|
|
395
389
|
alpha(t) {
|
|
396
|
-
return this._rgb.a =
|
|
390
|
+
return this._rgb.a = et(t), this;
|
|
397
391
|
}
|
|
398
392
|
clearer(t) {
|
|
399
393
|
const s = this._rgb;
|
|
400
394
|
return s.a *= 1 - t, this;
|
|
401
395
|
}
|
|
402
396
|
greyscale() {
|
|
403
|
-
const t = this._rgb, s =
|
|
397
|
+
const t = this._rgb, s = It(t.r * 0.3 + t.g * 0.59 + t.b * 0.11);
|
|
404
398
|
return t.r = t.g = t.b = s, this;
|
|
405
399
|
}
|
|
406
400
|
opaquer(t) {
|
|
@@ -412,28 +406,22 @@ class Dt {
|
|
|
412
406
|
return t.r = 255 - t.r, t.g = 255 - t.g, t.b = 255 - t.b, this;
|
|
413
407
|
}
|
|
414
408
|
lighten(t) {
|
|
415
|
-
return
|
|
409
|
+
return jt(this._rgb, 2, t), this;
|
|
416
410
|
}
|
|
417
411
|
darken(t) {
|
|
418
|
-
return
|
|
412
|
+
return jt(this._rgb, 2, -t), this;
|
|
419
413
|
}
|
|
420
414
|
saturate(t) {
|
|
421
|
-
return
|
|
415
|
+
return jt(this._rgb, 1, t), this;
|
|
422
416
|
}
|
|
423
417
|
desaturate(t) {
|
|
424
|
-
return
|
|
418
|
+
return jt(this._rgb, 1, -t), this;
|
|
425
419
|
}
|
|
426
420
|
rotate(t) {
|
|
427
|
-
return
|
|
421
|
+
return vi(this._rgb, t), this;
|
|
428
422
|
}
|
|
429
423
|
}
|
|
430
|
-
|
|
431
|
-
* Chart.js v4.5.0
|
|
432
|
-
* https://www.chartjs.org
|
|
433
|
-
* (c) 2025 Chart.js Contributors
|
|
434
|
-
* Released under the MIT License
|
|
435
|
-
*/
|
|
436
|
-
const Ei = /* @__PURE__ */ (() => {
|
|
424
|
+
const Pi = /* @__PURE__ */ (() => {
|
|
437
425
|
let e = 0;
|
|
438
426
|
return () => e++;
|
|
439
427
|
})();
|
|
@@ -449,16 +437,16 @@ function B(e) {
|
|
|
449
437
|
function w(e) {
|
|
450
438
|
return e !== null && Object.prototype.toString.call(e) === "[object Object]";
|
|
451
439
|
}
|
|
452
|
-
function
|
|
440
|
+
function pt(e) {
|
|
453
441
|
return (typeof e == "number" || e instanceof Number) && isFinite(+e);
|
|
454
442
|
}
|
|
455
443
|
function K(e, t) {
|
|
456
|
-
return
|
|
444
|
+
return pt(e) ? e : t;
|
|
457
445
|
}
|
|
458
446
|
function A(e, t) {
|
|
459
447
|
return typeof e > "u" ? t : e;
|
|
460
448
|
}
|
|
461
|
-
const
|
|
449
|
+
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
450
|
function E(e, t, s) {
|
|
463
451
|
if (e && typeof e.call == "function")
|
|
464
452
|
return e.apply(s, t);
|
|
@@ -472,7 +460,7 @@ function j(e, t, s, i) {
|
|
|
472
460
|
for (r = Object.keys(e), o = r.length, n = 0; n < o; n++)
|
|
473
461
|
t.call(s, e[r[n]], r[n]);
|
|
474
462
|
}
|
|
475
|
-
function
|
|
463
|
+
function je(e, t) {
|
|
476
464
|
let s, i, n, o;
|
|
477
465
|
if (!e || !t || e.length !== t.length)
|
|
478
466
|
return !1;
|
|
@@ -500,20 +488,20 @@ function Is(e) {
|
|
|
500
488
|
"constructor"
|
|
501
489
|
].indexOf(e) === -1;
|
|
502
490
|
}
|
|
503
|
-
function
|
|
491
|
+
function Ri(e, t, s, i) {
|
|
504
492
|
if (!Is(e))
|
|
505
493
|
return;
|
|
506
494
|
const n = t[e], o = s[e];
|
|
507
|
-
w(n) && w(o) ?
|
|
495
|
+
w(n) && w(o) ? At(n, o, i) : t[e] = Zt(o);
|
|
508
496
|
}
|
|
509
|
-
function
|
|
497
|
+
function At(e, t, s) {
|
|
510
498
|
const i = B(t) ? t : [
|
|
511
499
|
t
|
|
512
500
|
], n = i.length;
|
|
513
501
|
if (!w(e))
|
|
514
502
|
return e;
|
|
515
503
|
s = s || {};
|
|
516
|
-
const o = s.merger ||
|
|
504
|
+
const o = s.merger || Ri;
|
|
517
505
|
let r;
|
|
518
506
|
for (let a = 0; a < n; ++a) {
|
|
519
507
|
if (r = i[a], !w(r))
|
|
@@ -525,32 +513,32 @@ function Ct(e, t, s) {
|
|
|
525
513
|
return e;
|
|
526
514
|
}
|
|
527
515
|
function Kt(e, t) {
|
|
528
|
-
return
|
|
529
|
-
merger:
|
|
516
|
+
return At(e, t, {
|
|
517
|
+
merger: Ii
|
|
530
518
|
});
|
|
531
519
|
}
|
|
532
|
-
function
|
|
520
|
+
function Ii(e, t, s) {
|
|
533
521
|
if (!Is(e))
|
|
534
522
|
return;
|
|
535
523
|
const i = t[e], n = s[e];
|
|
536
524
|
w(i) && w(n) ? Kt(i, n) : Object.prototype.hasOwnProperty.call(t, e) || (t[e] = Zt(n));
|
|
537
525
|
}
|
|
538
|
-
const
|
|
526
|
+
const Be = {
|
|
539
527
|
// Chart.helpers.core resolveObjectKey should resolve empty key to root object
|
|
540
528
|
"": (e) => e,
|
|
541
529
|
// default resolvers
|
|
542
530
|
x: (e) => e.x,
|
|
543
531
|
y: (e) => e.y
|
|
544
532
|
};
|
|
545
|
-
function
|
|
533
|
+
function Ti(e) {
|
|
546
534
|
const t = e.split("."), s = [];
|
|
547
535
|
let i = "";
|
|
548
536
|
for (const n of t)
|
|
549
537
|
i += n, i.endsWith("\\") ? i = i.slice(0, -1) + "." : (s.push(i), i = "");
|
|
550
538
|
return s;
|
|
551
539
|
}
|
|
552
|
-
function
|
|
553
|
-
const t =
|
|
540
|
+
function Li(e) {
|
|
541
|
+
const t = Ti(e);
|
|
554
542
|
return (s) => {
|
|
555
543
|
for (const i of t) {
|
|
556
544
|
if (i === "")
|
|
@@ -560,13 +548,13 @@ function zi(e) {
|
|
|
560
548
|
return s;
|
|
561
549
|
};
|
|
562
550
|
}
|
|
563
|
-
function
|
|
564
|
-
return (
|
|
551
|
+
function Pt(e, t) {
|
|
552
|
+
return (Be[t] || (Be[t] = Li(t)))(e);
|
|
565
553
|
}
|
|
566
|
-
function
|
|
554
|
+
function Se(e) {
|
|
567
555
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
568
556
|
}
|
|
569
|
-
const Gt = (e) => typeof e < "u",
|
|
557
|
+
const Gt = (e) => typeof e < "u", st = (e) => typeof e == "function", He = (e, t) => {
|
|
570
558
|
if (e.size !== t.size)
|
|
571
559
|
return !1;
|
|
572
560
|
for (const s of e)
|
|
@@ -574,27 +562,27 @@ const Gt = (e) => typeof e < "u", et = (e) => typeof e == "function", Be = (e, t
|
|
|
574
562
|
return !1;
|
|
575
563
|
return !0;
|
|
576
564
|
};
|
|
577
|
-
function
|
|
565
|
+
function zi(e) {
|
|
578
566
|
return e.type === "mouseup" || e.type === "click" || e.type === "contextmenu";
|
|
579
567
|
}
|
|
580
|
-
const z = Math.PI, T = 2 * z, Qt = Number.POSITIVE_INFINITY, $ = z / 2,
|
|
581
|
-
function
|
|
568
|
+
const z = Math.PI, T = 2 * z, Qt = Number.POSITIVE_INFINITY, $ = z / 2, We = Math.sign;
|
|
569
|
+
function Fi(e) {
|
|
582
570
|
const t = [], s = Math.sqrt(e);
|
|
583
571
|
let i;
|
|
584
572
|
for (i = 1; i < s; i++)
|
|
585
573
|
e % i === 0 && (t.push(i), t.push(e / i));
|
|
586
574
|
return s === (s | 0) && t.push(s), t.sort((n, o) => n - o).pop(), t;
|
|
587
575
|
}
|
|
588
|
-
function
|
|
576
|
+
function ji(e) {
|
|
589
577
|
return typeof e == "symbol" || typeof e == "object" && e !== null && !(Symbol.toPrimitive in e || "toString" in e || "valueOf" in e);
|
|
590
578
|
}
|
|
591
|
-
function
|
|
592
|
-
return !
|
|
579
|
+
function Ve(e) {
|
|
580
|
+
return !ji(e) && !isNaN(parseFloat(e)) && isFinite(e);
|
|
593
581
|
}
|
|
594
|
-
function
|
|
582
|
+
function gt(e) {
|
|
595
583
|
return e * (z / 180);
|
|
596
584
|
}
|
|
597
|
-
function
|
|
585
|
+
function Bi(e) {
|
|
598
586
|
return e * (180 / z);
|
|
599
587
|
}
|
|
600
588
|
function Ts(e, t) {
|
|
@@ -615,10 +603,10 @@ function Jt(e, t, s, i) {
|
|
|
615
603
|
function J(e, t, s) {
|
|
616
604
|
return Math.max(t, Math.min(s, e));
|
|
617
605
|
}
|
|
618
|
-
function
|
|
606
|
+
function Hi(e) {
|
|
619
607
|
return J(e, -32768, 32767);
|
|
620
608
|
}
|
|
621
|
-
function
|
|
609
|
+
function Wi(e, t, s, i = 1e-6) {
|
|
622
610
|
return e >= Math.min(t, s) - i && e <= Math.max(t, s) + i;
|
|
623
611
|
}
|
|
624
612
|
function Ls(e, t, s) {
|
|
@@ -631,17 +619,17 @@ function Ls(e, t, s) {
|
|
|
631
619
|
hi: i
|
|
632
620
|
};
|
|
633
621
|
}
|
|
634
|
-
const
|
|
622
|
+
const Vi = (e, t, s, i) => Ls(e, s, i ? (n) => {
|
|
635
623
|
const o = e[n][t];
|
|
636
624
|
return o < s || o === s && e[n + 1][t] === s;
|
|
637
|
-
} : (n) => e[n][t] < s),
|
|
625
|
+
} : (n) => e[n][t] < s), Ni = (e, t, s) => Ls(e, s, (i) => e[i][t] >= s), zs = [
|
|
638
626
|
"push",
|
|
639
627
|
"pop",
|
|
640
628
|
"shift",
|
|
641
629
|
"splice",
|
|
642
630
|
"unshift"
|
|
643
631
|
];
|
|
644
|
-
function
|
|
632
|
+
function $i(e, t) {
|
|
645
633
|
if (e._chartjs) {
|
|
646
634
|
e._chartjs.listeners.push(t);
|
|
647
635
|
return;
|
|
@@ -655,7 +643,7 @@ function Yi(e, t) {
|
|
|
655
643
|
]
|
|
656
644
|
}
|
|
657
645
|
}), zs.forEach((s) => {
|
|
658
|
-
const i = "_onData" +
|
|
646
|
+
const i = "_onData" + Se(s), n = e[s];
|
|
659
647
|
Object.defineProperty(e, s, {
|
|
660
648
|
configurable: !0,
|
|
661
649
|
enumerable: !1,
|
|
@@ -668,7 +656,7 @@ function Yi(e, t) {
|
|
|
668
656
|
});
|
|
669
657
|
});
|
|
670
658
|
}
|
|
671
|
-
function
|
|
659
|
+
function Ne(e, t) {
|
|
672
660
|
const s = e._chartjs;
|
|
673
661
|
if (!s)
|
|
674
662
|
return;
|
|
@@ -690,13 +678,13 @@ function js(e, t) {
|
|
|
690
678
|
}));
|
|
691
679
|
};
|
|
692
680
|
}
|
|
693
|
-
function
|
|
681
|
+
function Yi(e, t) {
|
|
694
682
|
let s;
|
|
695
683
|
return function(...i) {
|
|
696
684
|
return t ? (clearTimeout(s), s = setTimeout(e, t, i)) : e.apply(this, i), t;
|
|
697
685
|
};
|
|
698
686
|
}
|
|
699
|
-
const
|
|
687
|
+
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
688
|
linear: (e) => e,
|
|
701
689
|
easeInQuad: (e) => e * e,
|
|
702
690
|
easeOutQuad: (e) => -e * (e - 2),
|
|
@@ -715,14 +703,14 @@ const Ki = (e) => e === "start" ? "left" : e === "end" ? "right" : "center", Ne
|
|
|
715
703
|
easeInOutSine: (e) => -0.5 * (Math.cos(z * e) - 1),
|
|
716
704
|
easeInExpo: (e) => e === 0 ? 0 : Math.pow(2, 10 * (e - 1)),
|
|
717
705
|
easeOutExpo: (e) => e === 1 ? 1 : -Math.pow(2, -10 * e) + 1,
|
|
718
|
-
easeInOutExpo: (e) =>
|
|
706
|
+
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
707
|
easeInCirc: (e) => e >= 1 ? e : -(Math.sqrt(1 - e * e) - 1),
|
|
720
708
|
easeOutCirc: (e) => Math.sqrt(1 - (e -= 1) * e),
|
|
721
709
|
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) =>
|
|
710
|
+
easeInElastic: (e) => Bt(e) ? e : Ye(e, 0.075, 0.3),
|
|
711
|
+
easeOutElastic: (e) => Bt(e) ? e : Xe(e, 0.075, 0.3),
|
|
724
712
|
easeInOutElastic(e) {
|
|
725
|
-
return
|
|
713
|
+
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
714
|
},
|
|
727
715
|
easeInBack(e) {
|
|
728
716
|
return e * e * ((1.70158 + 1) * e - 1.70158);
|
|
@@ -734,11 +722,11 @@ const Ki = (e) => e === "start" ? "left" : e === "end" ? "right" : "center", Ne
|
|
|
734
722
|
let t = 1.70158;
|
|
735
723
|
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
724
|
},
|
|
737
|
-
easeInBounce: (e) => 1 -
|
|
725
|
+
easeInBounce: (e) => 1 - Ot.easeOutBounce(1 - e),
|
|
738
726
|
easeOutBounce(e) {
|
|
739
727
|
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
728
|
},
|
|
741
|
-
easeInOutBounce: (e) => e < 0.5 ?
|
|
729
|
+
easeInOutBounce: (e) => e < 0.5 ? Ot.easeInBounce(e * 2) * 0.5 : Ot.easeOutBounce(e * 2 - 1) * 0.5 + 0.5
|
|
742
730
|
};
|
|
743
731
|
function Bs(e) {
|
|
744
732
|
if (e && typeof e == "object") {
|
|
@@ -747,24 +735,24 @@ function Bs(e) {
|
|
|
747
735
|
}
|
|
748
736
|
return !1;
|
|
749
737
|
}
|
|
750
|
-
function
|
|
751
|
-
return Bs(e) ? e : new
|
|
738
|
+
function Ke(e) {
|
|
739
|
+
return Bs(e) ? e : new Ct(e);
|
|
752
740
|
}
|
|
753
741
|
function ce(e) {
|
|
754
|
-
return Bs(e) ? e : new
|
|
742
|
+
return Bs(e) ? e : new Ct(e).saturate(0.5).darken(0.1).hexString();
|
|
755
743
|
}
|
|
756
|
-
const
|
|
744
|
+
const Ki = [
|
|
757
745
|
"x",
|
|
758
746
|
"y",
|
|
759
747
|
"borderWidth",
|
|
760
748
|
"radius",
|
|
761
749
|
"tension"
|
|
762
|
-
],
|
|
750
|
+
], Ui = [
|
|
763
751
|
"color",
|
|
764
752
|
"borderColor",
|
|
765
753
|
"backgroundColor"
|
|
766
754
|
];
|
|
767
|
-
function
|
|
755
|
+
function qi(e) {
|
|
768
756
|
e.set("animation", {
|
|
769
757
|
delay: void 0,
|
|
770
758
|
duration: 1e3,
|
|
@@ -781,11 +769,11 @@ function Zi(e) {
|
|
|
781
769
|
}), e.set("animations", {
|
|
782
770
|
colors: {
|
|
783
771
|
type: "color",
|
|
784
|
-
properties:
|
|
772
|
+
properties: Ui
|
|
785
773
|
},
|
|
786
774
|
numbers: {
|
|
787
775
|
type: "number",
|
|
788
|
-
properties:
|
|
776
|
+
properties: Ki
|
|
789
777
|
}
|
|
790
778
|
}), e.describe("animations", {
|
|
791
779
|
_fallback: "animation"
|
|
@@ -825,7 +813,7 @@ function Zi(e) {
|
|
|
825
813
|
}
|
|
826
814
|
});
|
|
827
815
|
}
|
|
828
|
-
function
|
|
816
|
+
function Zi(e) {
|
|
829
817
|
e.set("layout", {
|
|
830
818
|
autoPadding: !0,
|
|
831
819
|
padding: {
|
|
@@ -836,25 +824,25 @@ function Gi(e) {
|
|
|
836
824
|
}
|
|
837
825
|
});
|
|
838
826
|
}
|
|
839
|
-
const
|
|
840
|
-
function
|
|
827
|
+
const Ue = /* @__PURE__ */ new Map();
|
|
828
|
+
function Gi(e, t) {
|
|
841
829
|
t = t || {};
|
|
842
830
|
const s = e + JSON.stringify(t);
|
|
843
|
-
let i =
|
|
844
|
-
return i || (i = new Intl.NumberFormat(e, t),
|
|
831
|
+
let i = Ue.get(s);
|
|
832
|
+
return i || (i = new Intl.NumberFormat(e, t), Ue.set(s, i)), i;
|
|
845
833
|
}
|
|
846
|
-
function
|
|
847
|
-
return
|
|
834
|
+
function Qi(e, t, s) {
|
|
835
|
+
return Gi(t, s).format(e);
|
|
848
836
|
}
|
|
849
|
-
const
|
|
837
|
+
const Ji = {
|
|
850
838
|
values(e) {
|
|
851
839
|
return B(e) ? e : "" + e;
|
|
852
840
|
}
|
|
853
841
|
};
|
|
854
|
-
var
|
|
855
|
-
formatters:
|
|
842
|
+
var tn = {
|
|
843
|
+
formatters: Ji
|
|
856
844
|
};
|
|
857
|
-
function
|
|
845
|
+
function en(e) {
|
|
858
846
|
e.set("scale", {
|
|
859
847
|
display: !0,
|
|
860
848
|
offset: !1,
|
|
@@ -898,7 +886,7 @@ function sn(e) {
|
|
|
898
886
|
autoSkip: !0,
|
|
899
887
|
autoSkipPadding: 3,
|
|
900
888
|
labelOffset: 0,
|
|
901
|
-
callback:
|
|
889
|
+
callback: tn.formatters.values,
|
|
902
890
|
minor: {},
|
|
903
891
|
major: {},
|
|
904
892
|
align: "center",
|
|
@@ -918,8 +906,8 @@ function sn(e) {
|
|
|
918
906
|
_indexable: (t) => t !== "backdropPadding"
|
|
919
907
|
});
|
|
920
908
|
}
|
|
921
|
-
const
|
|
922
|
-
function
|
|
909
|
+
const ct = /* @__PURE__ */ Object.create(null), _e = /* @__PURE__ */ Object.create(null);
|
|
910
|
+
function Dt(e, t) {
|
|
923
911
|
if (!t)
|
|
924
912
|
return e;
|
|
925
913
|
const s = t.split(".");
|
|
@@ -930,9 +918,9 @@ function Ot(e, t) {
|
|
|
930
918
|
return e;
|
|
931
919
|
}
|
|
932
920
|
function le(e, t, s) {
|
|
933
|
-
return typeof t == "string" ?
|
|
921
|
+
return typeof t == "string" ? At(Dt(e, t), s) : At(Dt(e, ""), t);
|
|
934
922
|
}
|
|
935
|
-
class
|
|
923
|
+
class sn {
|
|
936
924
|
constructor(t, s) {
|
|
937
925
|
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
926
|
"mousemove",
|
|
@@ -956,16 +944,16 @@ class nn {
|
|
|
956
944
|
return le(this, t, s);
|
|
957
945
|
}
|
|
958
946
|
get(t) {
|
|
959
|
-
return
|
|
947
|
+
return Dt(this, t);
|
|
960
948
|
}
|
|
961
949
|
describe(t, s) {
|
|
962
950
|
return le(_e, t, s);
|
|
963
951
|
}
|
|
964
952
|
override(t, s) {
|
|
965
|
-
return le(
|
|
953
|
+
return le(ct, t, s);
|
|
966
954
|
}
|
|
967
955
|
route(t, s, i, n) {
|
|
968
|
-
const o =
|
|
956
|
+
const o = Dt(this, t), r = Dt(this, i), a = "_" + s;
|
|
969
957
|
Object.defineProperties(o, {
|
|
970
958
|
[a]: {
|
|
971
959
|
value: o[s],
|
|
@@ -987,7 +975,7 @@ class nn {
|
|
|
987
975
|
t.forEach((s) => s(this));
|
|
988
976
|
}
|
|
989
977
|
}
|
|
990
|
-
var R = /* @__PURE__ */ new
|
|
978
|
+
var R = /* @__PURE__ */ new sn({
|
|
991
979
|
_scriptable: (e) => !e.startsWith("on"),
|
|
992
980
|
_indexable: (e) => e !== "events",
|
|
993
981
|
hover: {
|
|
@@ -998,22 +986,22 @@ var R = /* @__PURE__ */ new nn({
|
|
|
998
986
|
_indexable: !1
|
|
999
987
|
}
|
|
1000
988
|
}, [
|
|
989
|
+
qi,
|
|
1001
990
|
Zi,
|
|
1002
|
-
|
|
1003
|
-
sn
|
|
991
|
+
en
|
|
1004
992
|
]);
|
|
1005
|
-
function
|
|
993
|
+
function nn(e) {
|
|
1006
994
|
return !e || W(e.size) || W(e.family) ? null : (e.style ? e.style + " " : "") + (e.weight ? e.weight + " " : "") + e.size + "px " + e.family;
|
|
1007
995
|
}
|
|
1008
|
-
function
|
|
996
|
+
function qe(e, t, s, i, n) {
|
|
1009
997
|
let o = t[n];
|
|
1010
998
|
return o || (o = t[n] = e.measureText(n).width, s.push(n)), o > i && (i = o), i;
|
|
1011
999
|
}
|
|
1012
|
-
function
|
|
1000
|
+
function ot(e, t, s) {
|
|
1013
1001
|
const i = e.currentDevicePixelRatio, n = s !== 0 ? Math.max(s / 2, 0.5) : 0;
|
|
1014
1002
|
return Math.round((t - n) * i) / i + n;
|
|
1015
1003
|
}
|
|
1016
|
-
function
|
|
1004
|
+
function Ze(e, t) {
|
|
1017
1005
|
!t && !e || (t = t || e.getContext("2d"), t.save(), t.resetTransform(), t.clearRect(0, 0, e.width, e.height), t.restore());
|
|
1018
1006
|
}
|
|
1019
1007
|
function Hs(e, t, s) {
|
|
@@ -1025,31 +1013,31 @@ function Ws(e, t) {
|
|
|
1025
1013
|
function Vs(e) {
|
|
1026
1014
|
e.restore();
|
|
1027
1015
|
}
|
|
1028
|
-
function
|
|
1016
|
+
function on(e, t) {
|
|
1029
1017
|
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
1018
|
}
|
|
1031
|
-
function
|
|
1019
|
+
function rn(e, t, s, i, n) {
|
|
1032
1020
|
if (n.strikethrough || n.underline) {
|
|
1033
1021
|
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
1022
|
e.strokeStyle = e.fillStyle, e.beginPath(), e.lineWidth = n.decorationWidth || 2, e.moveTo(r, h), e.lineTo(a, h), e.stroke();
|
|
1035
1023
|
}
|
|
1036
1024
|
}
|
|
1037
|
-
function
|
|
1025
|
+
function an(e, t) {
|
|
1038
1026
|
const s = e.fillStyle;
|
|
1039
1027
|
e.fillStyle = t.color, e.fillRect(t.left, t.top, t.width, t.height), e.fillStyle = s;
|
|
1040
1028
|
}
|
|
1041
|
-
function
|
|
1029
|
+
function Ge(e, t, s, i, n, o = {}) {
|
|
1042
1030
|
const r = B(t) ? t : [
|
|
1043
1031
|
t
|
|
1044
1032
|
], a = o.strokeWidth > 0 && o.strokeColor !== "";
|
|
1045
1033
|
let c, l;
|
|
1046
|
-
for (e.save(), e.font = n.string,
|
|
1047
|
-
l = r[c], o.backdrop &&
|
|
1034
|
+
for (e.save(), e.font = n.string, on(e, o), c = 0; c < r.length; ++c)
|
|
1035
|
+
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
1036
|
e.restore();
|
|
1049
1037
|
}
|
|
1050
|
-
const
|
|
1051
|
-
function
|
|
1052
|
-
const s = ("" + e).match(
|
|
1038
|
+
const cn = /^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/, ln = /^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;
|
|
1039
|
+
function hn(e, t) {
|
|
1040
|
+
const s = ("" + e).match(cn);
|
|
1053
1041
|
if (!s || s[1] === "normal")
|
|
1054
1042
|
return t * 1.2;
|
|
1055
1043
|
switch (e = +s[2], s[3]) {
|
|
@@ -1061,14 +1049,14 @@ function dn(e, t) {
|
|
|
1061
1049
|
}
|
|
1062
1050
|
return t * e;
|
|
1063
1051
|
}
|
|
1064
|
-
const
|
|
1052
|
+
const dn = (e) => +e || 0;
|
|
1065
1053
|
function Ns(e, t) {
|
|
1066
1054
|
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
1055
|
for (const r of n)
|
|
1068
|
-
s[r] =
|
|
1056
|
+
s[r] = dn(o(r));
|
|
1069
1057
|
return s;
|
|
1070
1058
|
}
|
|
1071
|
-
function
|
|
1059
|
+
function fn(e) {
|
|
1072
1060
|
return Ns(e, {
|
|
1073
1061
|
top: "y",
|
|
1074
1062
|
right: "x",
|
|
@@ -1076,8 +1064,8 @@ function un(e) {
|
|
|
1076
1064
|
left: "x"
|
|
1077
1065
|
});
|
|
1078
1066
|
}
|
|
1079
|
-
function
|
|
1080
|
-
const t =
|
|
1067
|
+
function Et(e) {
|
|
1068
|
+
const t = fn(e);
|
|
1081
1069
|
return t.width = t.left + t.right, t.height = t.top + t.bottom, t;
|
|
1082
1070
|
}
|
|
1083
1071
|
function be(e, t) {
|
|
@@ -1085,34 +1073,34 @@ function be(e, t) {
|
|
|
1085
1073
|
let s = A(e.size, t.size);
|
|
1086
1074
|
typeof s == "string" && (s = parseInt(s, 10));
|
|
1087
1075
|
let i = A(e.style, t.style);
|
|
1088
|
-
i && !("" + i).match(
|
|
1076
|
+
i && !("" + i).match(ln) && (console.warn('Invalid font style specified: "' + i + '"'), i = void 0);
|
|
1089
1077
|
const n = {
|
|
1090
1078
|
family: A(e.family, t.family),
|
|
1091
|
-
lineHeight:
|
|
1079
|
+
lineHeight: hn(A(e.lineHeight, t.lineHeight), s),
|
|
1092
1080
|
size: s,
|
|
1093
1081
|
style: i,
|
|
1094
1082
|
weight: A(e.weight, t.weight),
|
|
1095
1083
|
string: ""
|
|
1096
1084
|
};
|
|
1097
|
-
return n.string =
|
|
1085
|
+
return n.string = nn(n), n;
|
|
1098
1086
|
}
|
|
1099
|
-
function
|
|
1087
|
+
function Ht(e, t, s, i) {
|
|
1100
1088
|
let n, o, r;
|
|
1101
1089
|
for (n = 0, o = e.length; n < o; ++n)
|
|
1102
1090
|
if (r = e[n], r !== void 0 && r !== void 0)
|
|
1103
1091
|
return r;
|
|
1104
1092
|
}
|
|
1105
|
-
function
|
|
1093
|
+
function un(e, t, s) {
|
|
1106
1094
|
const { min: i, max: n } = e, o = Rs(t, (n - i) / 2), r = (a, c) => s && a === 0 ? 0 : a + c;
|
|
1107
1095
|
return {
|
|
1108
1096
|
min: r(i, -Math.abs(o)),
|
|
1109
1097
|
max: r(n, o)
|
|
1110
1098
|
};
|
|
1111
1099
|
}
|
|
1112
|
-
function
|
|
1100
|
+
function Tt(e, t) {
|
|
1113
1101
|
return Object.assign(Object.create(e), t);
|
|
1114
1102
|
}
|
|
1115
|
-
function
|
|
1103
|
+
function Oe(e, t = [
|
|
1116
1104
|
""
|
|
1117
1105
|
], s, i, n = () => e[0]) {
|
|
1118
1106
|
const o = s || e;
|
|
@@ -1124,7 +1112,7 @@ function Se(e, t = [
|
|
|
1124
1112
|
_rootScopes: o,
|
|
1125
1113
|
_fallback: i,
|
|
1126
1114
|
_getTarget: n,
|
|
1127
|
-
override: (a) =>
|
|
1115
|
+
override: (a) => Oe([
|
|
1128
1116
|
a,
|
|
1129
1117
|
...e
|
|
1130
1118
|
], t, o, i)
|
|
@@ -1140,7 +1128,7 @@ function Se(e, t = [
|
|
|
1140
1128
|
* A trap for getting property values.
|
|
1141
1129
|
*/
|
|
1142
1130
|
get(a, c) {
|
|
1143
|
-
return Ys(a, c, () =>
|
|
1131
|
+
return Ys(a, c, () => vn(c, t, e, a));
|
|
1144
1132
|
},
|
|
1145
1133
|
/**
|
|
1146
1134
|
* A trap for Object.getOwnPropertyDescriptor.
|
|
@@ -1159,13 +1147,13 @@ function Se(e, t = [
|
|
|
1159
1147
|
* A trap for the in operator.
|
|
1160
1148
|
*/
|
|
1161
1149
|
has(a, c) {
|
|
1162
|
-
return
|
|
1150
|
+
return Je(a).includes(c);
|
|
1163
1151
|
},
|
|
1164
1152
|
/**
|
|
1165
1153
|
* A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols.
|
|
1166
1154
|
*/
|
|
1167
1155
|
ownKeys(a) {
|
|
1168
|
-
return
|
|
1156
|
+
return Je(a);
|
|
1169
1157
|
},
|
|
1170
1158
|
/**
|
|
1171
1159
|
* A trap for setting property values.
|
|
@@ -1176,7 +1164,7 @@ function Se(e, t = [
|
|
|
1176
1164
|
}
|
|
1177
1165
|
});
|
|
1178
1166
|
}
|
|
1179
|
-
function
|
|
1167
|
+
function mt(e, t, s, i) {
|
|
1180
1168
|
const n = {
|
|
1181
1169
|
_cacheable: !1,
|
|
1182
1170
|
_proxy: e,
|
|
@@ -1184,8 +1172,8 @@ function pt(e, t, s, i) {
|
|
|
1184
1172
|
_subProxy: s,
|
|
1185
1173
|
_stack: /* @__PURE__ */ new Set(),
|
|
1186
1174
|
_descriptors: $s(e, i),
|
|
1187
|
-
setContext: (o) =>
|
|
1188
|
-
override: (o) =>
|
|
1175
|
+
setContext: (o) => mt(e, o, s, i),
|
|
1176
|
+
override: (o) => mt(e.override(o), t, s, i)
|
|
1189
1177
|
};
|
|
1190
1178
|
return new Proxy(n, {
|
|
1191
1179
|
/**
|
|
@@ -1198,7 +1186,7 @@ function pt(e, t, s, i) {
|
|
|
1198
1186
|
* A trap for getting property values.
|
|
1199
1187
|
*/
|
|
1200
1188
|
get(o, r, a) {
|
|
1201
|
-
return Ys(o, r, () =>
|
|
1189
|
+
return Ys(o, r, () => pn(o, r, a));
|
|
1202
1190
|
},
|
|
1203
1191
|
/**
|
|
1204
1192
|
* A trap for Object.getOwnPropertyDescriptor.
|
|
@@ -1245,31 +1233,31 @@ function $s(e, t = {
|
|
|
1245
1233
|
allKeys: n,
|
|
1246
1234
|
scriptable: s,
|
|
1247
1235
|
indexable: i,
|
|
1248
|
-
isScriptable:
|
|
1249
|
-
isIndexable:
|
|
1236
|
+
isScriptable: st(s) ? s : () => s,
|
|
1237
|
+
isIndexable: st(i) ? i : () => i
|
|
1250
1238
|
};
|
|
1251
1239
|
}
|
|
1252
|
-
const
|
|
1240
|
+
const gn = (e, t) => e ? e + Se(t) : t, De = (e, t) => w(t) && e !== "adapters" && (Object.getPrototypeOf(t) === null || t.constructor === Object);
|
|
1253
1241
|
function Ys(e, t, s) {
|
|
1254
1242
|
if (Object.prototype.hasOwnProperty.call(e, t) || t === "constructor")
|
|
1255
1243
|
return e[t];
|
|
1256
1244
|
const i = s();
|
|
1257
1245
|
return e[t] = i, i;
|
|
1258
1246
|
}
|
|
1259
|
-
function
|
|
1247
|
+
function pn(e, t, s) {
|
|
1260
1248
|
const { _proxy: i, _context: n, _subProxy: o, _descriptors: r } = e;
|
|
1261
1249
|
let a = i[t];
|
|
1262
|
-
return
|
|
1250
|
+
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
1251
|
}
|
|
1264
|
-
function
|
|
1252
|
+
function mn(e, t, s, i) {
|
|
1265
1253
|
const { _proxy: n, _context: o, _subProxy: r, _stack: a } = s;
|
|
1266
1254
|
if (a.has(e))
|
|
1267
1255
|
throw new Error("Recursion detected: " + Array.from(a).join("->") + "->" + e);
|
|
1268
1256
|
a.add(e);
|
|
1269
1257
|
let c = t(o, r || i);
|
|
1270
|
-
return a.delete(e),
|
|
1258
|
+
return a.delete(e), De(e, c) && (c = Ce(n._scopes, n, e, c)), c;
|
|
1271
1259
|
}
|
|
1272
|
-
function
|
|
1260
|
+
function _n(e, t, s, i) {
|
|
1273
1261
|
const { _proxy: n, _context: o, _subProxy: r, _descriptors: a } = s;
|
|
1274
1262
|
if (typeof o.index < "u" && i(e))
|
|
1275
1263
|
return t[o.index % t.length];
|
|
@@ -1277,19 +1265,19 @@ function bn(e, t, s, i) {
|
|
|
1277
1265
|
const c = t, l = n._scopes.filter((h) => h !== c);
|
|
1278
1266
|
t = [];
|
|
1279
1267
|
for (const h of c) {
|
|
1280
|
-
const d =
|
|
1281
|
-
t.push(
|
|
1268
|
+
const d = Ce(l, n, e, h);
|
|
1269
|
+
t.push(mt(d, o, r && r[e], a));
|
|
1282
1270
|
}
|
|
1283
1271
|
}
|
|
1284
1272
|
return t;
|
|
1285
1273
|
}
|
|
1286
1274
|
function Xs(e, t, s) {
|
|
1287
|
-
return
|
|
1275
|
+
return st(e) ? e(t, s) : e;
|
|
1288
1276
|
}
|
|
1289
|
-
const
|
|
1290
|
-
function
|
|
1277
|
+
const bn = (e, t) => e === !0 ? t : typeof e == "string" ? Pt(t, e) : void 0;
|
|
1278
|
+
function xn(e, t, s, i, n) {
|
|
1291
1279
|
for (const o of t) {
|
|
1292
|
-
const r =
|
|
1280
|
+
const r = bn(s, o);
|
|
1293
1281
|
if (r) {
|
|
1294
1282
|
e.add(r);
|
|
1295
1283
|
const a = Xs(r._fallback, s, n);
|
|
@@ -1300,33 +1288,33 @@ function yn(e, t, s, i, n) {
|
|
|
1300
1288
|
}
|
|
1301
1289
|
return !1;
|
|
1302
1290
|
}
|
|
1303
|
-
function
|
|
1291
|
+
function Ce(e, t, s, i) {
|
|
1304
1292
|
const n = t._rootScopes, o = Xs(t._fallback, s, i), r = [
|
|
1305
1293
|
...e,
|
|
1306
1294
|
...n
|
|
1307
1295
|
], a = /* @__PURE__ */ new Set();
|
|
1308
1296
|
a.add(i);
|
|
1309
|
-
let c =
|
|
1310
|
-
return c === null || typeof o < "u" && o !== s && (c =
|
|
1297
|
+
let c = Qe(a, r, s, o || s, i);
|
|
1298
|
+
return c === null || typeof o < "u" && o !== s && (c = Qe(a, r, o, c, i), c === null) ? !1 : Oe(Array.from(a), [
|
|
1311
1299
|
""
|
|
1312
|
-
], n, o, () =>
|
|
1300
|
+
], n, o, () => yn(t, s, i));
|
|
1313
1301
|
}
|
|
1314
|
-
function
|
|
1302
|
+
function Qe(e, t, s, i, n) {
|
|
1315
1303
|
for (; s; )
|
|
1316
|
-
s =
|
|
1304
|
+
s = xn(e, t, s, i, n);
|
|
1317
1305
|
return s;
|
|
1318
1306
|
}
|
|
1319
|
-
function
|
|
1307
|
+
function yn(e, t, s) {
|
|
1320
1308
|
const i = e._getTarget();
|
|
1321
1309
|
t in i || (i[t] = {});
|
|
1322
1310
|
const n = i[t];
|
|
1323
1311
|
return B(n) && w(s) ? s : n || {};
|
|
1324
1312
|
}
|
|
1325
|
-
function
|
|
1313
|
+
function vn(e, t, s, i) {
|
|
1326
1314
|
let n;
|
|
1327
1315
|
for (const o of t)
|
|
1328
|
-
if (n = Ks(
|
|
1329
|
-
return
|
|
1316
|
+
if (n = Ks(gn(o, e), s), typeof n < "u")
|
|
1317
|
+
return De(e, n) ? Ce(s, i, e, n) : n;
|
|
1330
1318
|
}
|
|
1331
1319
|
function Ks(e, t) {
|
|
1332
1320
|
for (const s of t) {
|
|
@@ -1337,21 +1325,21 @@ function Ks(e, t) {
|
|
|
1337
1325
|
return i;
|
|
1338
1326
|
}
|
|
1339
1327
|
}
|
|
1340
|
-
function
|
|
1328
|
+
function Je(e) {
|
|
1341
1329
|
let t = e._keys;
|
|
1342
|
-
return t || (t = e._keys =
|
|
1330
|
+
return t || (t = e._keys = wn(e._scopes)), t;
|
|
1343
1331
|
}
|
|
1344
|
-
function
|
|
1332
|
+
function wn(e) {
|
|
1345
1333
|
const t = /* @__PURE__ */ new Set();
|
|
1346
1334
|
for (const s of e)
|
|
1347
1335
|
for (const i of Object.keys(s).filter((n) => !n.startsWith("_")))
|
|
1348
1336
|
t.add(i);
|
|
1349
1337
|
return Array.from(t);
|
|
1350
1338
|
}
|
|
1351
|
-
function
|
|
1339
|
+
function Ae() {
|
|
1352
1340
|
return typeof window < "u" && typeof document < "u";
|
|
1353
1341
|
}
|
|
1354
|
-
function
|
|
1342
|
+
function Pe(e) {
|
|
1355
1343
|
let t = e.parentNode;
|
|
1356
1344
|
return t && t.toString() === "[object ShadowRoot]" && (t = t.host), t;
|
|
1357
1345
|
}
|
|
@@ -1360,29 +1348,29 @@ function te(e, t, s) {
|
|
|
1360
1348
|
return typeof e == "string" ? (i = parseInt(e, 10), e.indexOf("%") !== -1 && (i = i / 100 * t.parentNode[s])) : i = e, i;
|
|
1361
1349
|
}
|
|
1362
1350
|
const ie = (e) => e.ownerDocument.defaultView.getComputedStyle(e, null);
|
|
1363
|
-
function
|
|
1351
|
+
function Mn(e, t) {
|
|
1364
1352
|
return ie(e).getPropertyValue(t);
|
|
1365
1353
|
}
|
|
1366
|
-
const
|
|
1354
|
+
const kn = [
|
|
1367
1355
|
"top",
|
|
1368
1356
|
"right",
|
|
1369
1357
|
"bottom",
|
|
1370
1358
|
"left"
|
|
1371
1359
|
];
|
|
1372
|
-
function
|
|
1360
|
+
function at(e, t, s) {
|
|
1373
1361
|
const i = {};
|
|
1374
1362
|
s = s ? "-" + s : "";
|
|
1375
1363
|
for (let n = 0; n < 4; n++) {
|
|
1376
|
-
const o =
|
|
1364
|
+
const o = kn[n];
|
|
1377
1365
|
i[o] = parseFloat(e[t + "-" + o + s]) || 0;
|
|
1378
1366
|
}
|
|
1379
1367
|
return i.width = i.left + i.right, i.height = i.top + i.bottom, i;
|
|
1380
1368
|
}
|
|
1381
|
-
const
|
|
1382
|
-
function
|
|
1369
|
+
const Sn = (e, t, s) => (e > 0 || t > 0) && (!s || !s.shadowRoot);
|
|
1370
|
+
function On(e, t) {
|
|
1383
1371
|
const s = e.touches, i = s && s.length ? s[0] : e, { offsetX: n, offsetY: o } = i;
|
|
1384
1372
|
let r = !1, a, c;
|
|
1385
|
-
if (
|
|
1373
|
+
if (Sn(n, o, e.target))
|
|
1386
1374
|
a = n, c = o;
|
|
1387
1375
|
else {
|
|
1388
1376
|
const l = t.getBoundingClientRect();
|
|
@@ -1394,24 +1382,24 @@ function Dn(e, t) {
|
|
|
1394
1382
|
box: r
|
|
1395
1383
|
};
|
|
1396
1384
|
}
|
|
1397
|
-
function
|
|
1385
|
+
function rt(e, t) {
|
|
1398
1386
|
if ("native" in e)
|
|
1399
1387
|
return e;
|
|
1400
|
-
const { canvas: s, currentDevicePixelRatio: i } = t, n = ie(s), o = n.boxSizing === "border-box", r =
|
|
1388
|
+
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
1389
|
let { width: u, height: g } = t;
|
|
1402
1390
|
return o && (u -= r.width + a.width, g -= r.height + a.height), {
|
|
1403
1391
|
x: Math.round((c - d) / u * s.width / i),
|
|
1404
1392
|
y: Math.round((l - f) / g * s.height / i)
|
|
1405
1393
|
};
|
|
1406
1394
|
}
|
|
1407
|
-
function
|
|
1395
|
+
function Dn(e, t, s) {
|
|
1408
1396
|
let i, n;
|
|
1409
1397
|
if (t === void 0 || s === void 0) {
|
|
1410
|
-
const o = e &&
|
|
1398
|
+
const o = e && Pe(e);
|
|
1411
1399
|
if (!o)
|
|
1412
1400
|
t = e.clientWidth, s = e.clientHeight;
|
|
1413
1401
|
else {
|
|
1414
|
-
const r = o.getBoundingClientRect(), a = ie(o), c =
|
|
1402
|
+
const r = o.getBoundingClientRect(), a = ie(o), c = at(a, "border", "width"), l = at(a, "padding");
|
|
1415
1403
|
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
1404
|
}
|
|
1417
1405
|
}
|
|
@@ -1422,26 +1410,26 @@ function Cn(e, t, s) {
|
|
|
1422
1410
|
maxHeight: n || Qt
|
|
1423
1411
|
};
|
|
1424
1412
|
}
|
|
1425
|
-
const
|
|
1426
|
-
function
|
|
1427
|
-
const n = ie(e), o =
|
|
1413
|
+
const tt = (e) => Math.round(e * 10) / 10;
|
|
1414
|
+
function Cn(e, t, s, i) {
|
|
1415
|
+
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
1416
|
let { width: l, height: h } = c;
|
|
1429
1417
|
if (n.boxSizing === "content-box") {
|
|
1430
|
-
const f =
|
|
1418
|
+
const f = at(n, "border", "width"), u = at(n, "padding");
|
|
1431
1419
|
l -= u.width + f.width, h -= u.height + f.height;
|
|
1432
1420
|
}
|
|
1433
|
-
return l = Math.max(0, l - o.width), h = Math.max(0, i ? l / i : h - o.height), l =
|
|
1421
|
+
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
1422
|
width: l,
|
|
1435
1423
|
height: h
|
|
1436
1424
|
};
|
|
1437
1425
|
}
|
|
1438
|
-
function
|
|
1439
|
-
const i = t || 1, n =
|
|
1440
|
-
e.height =
|
|
1426
|
+
function ts(e, t, s) {
|
|
1427
|
+
const i = t || 1, n = tt(e.height * i), o = tt(e.width * i);
|
|
1428
|
+
e.height = tt(e.height), e.width = tt(e.width);
|
|
1441
1429
|
const r = e.canvas;
|
|
1442
1430
|
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
1431
|
}
|
|
1444
|
-
const
|
|
1432
|
+
const An = function() {
|
|
1445
1433
|
let e = !1;
|
|
1446
1434
|
try {
|
|
1447
1435
|
const t = {
|
|
@@ -1449,19 +1437,19 @@ const Pn = function() {
|
|
|
1449
1437
|
return e = !0, !1;
|
|
1450
1438
|
}
|
|
1451
1439
|
};
|
|
1452
|
-
|
|
1440
|
+
Ae() && (window.addEventListener("test", null, t), window.removeEventListener("test", null, t));
|
|
1453
1441
|
} catch {
|
|
1454
1442
|
}
|
|
1455
1443
|
return e;
|
|
1456
1444
|
}();
|
|
1457
|
-
function
|
|
1458
|
-
const s =
|
|
1445
|
+
function es(e, t) {
|
|
1446
|
+
const s = Mn(e, t), i = s && s.match(/^(\d+)(\.\d+)?px$/);
|
|
1459
1447
|
return i ? +i[1] : void 0;
|
|
1460
1448
|
}
|
|
1461
1449
|
function Wt(e, t, s) {
|
|
1462
1450
|
return e.options.clip ? e[s] : t[s];
|
|
1463
1451
|
}
|
|
1464
|
-
function
|
|
1452
|
+
function Pn(e, t) {
|
|
1465
1453
|
const { xScale: s, yScale: i } = e;
|
|
1466
1454
|
return s && i ? {
|
|
1467
1455
|
left: Wt(s, t, "left"),
|
|
@@ -1470,11 +1458,11 @@ function En(e, t) {
|
|
|
1470
1458
|
bottom: Wt(i, t, "bottom")
|
|
1471
1459
|
} : t;
|
|
1472
1460
|
}
|
|
1473
|
-
function
|
|
1461
|
+
function En(e, t) {
|
|
1474
1462
|
const s = t._clip;
|
|
1475
1463
|
if (s.disabled)
|
|
1476
1464
|
return !1;
|
|
1477
|
-
const i =
|
|
1465
|
+
const i = Pn(t, e.chartArea);
|
|
1478
1466
|
return {
|
|
1479
1467
|
left: s.left === !1 ? 0 : i.left - (s.left === !0 ? 0 : s.left),
|
|
1480
1468
|
right: s.right === !1 ? e.width : i.right + (s.right === !0 ? 0 : s.right),
|
|
@@ -1482,13 +1470,7 @@ function Rn(e, t) {
|
|
|
1482
1470
|
bottom: s.bottom === !1 ? e.height : i.bottom + (s.bottom === !0 ? 0 : s.bottom)
|
|
1483
1471
|
};
|
|
1484
1472
|
}
|
|
1485
|
-
|
|
1486
|
-
* Chart.js v4.5.0
|
|
1487
|
-
* https://www.chartjs.org
|
|
1488
|
-
* (c) 2025 Chart.js Contributors
|
|
1489
|
-
* Released under the MIT License
|
|
1490
|
-
*/
|
|
1491
|
-
class In {
|
|
1473
|
+
class Rn {
|
|
1492
1474
|
constructor() {
|
|
1493
1475
|
this._request = null, this._charts = /* @__PURE__ */ new Map(), this._running = !1, this._lastDate = void 0;
|
|
1494
1476
|
}
|
|
@@ -1564,34 +1546,34 @@ class In {
|
|
|
1564
1546
|
return this._charts.delete(t);
|
|
1565
1547
|
}
|
|
1566
1548
|
}
|
|
1567
|
-
var Z = /* @__PURE__ */ new
|
|
1568
|
-
const
|
|
1549
|
+
var Z = /* @__PURE__ */ new Rn();
|
|
1550
|
+
const ss = "transparent", In = {
|
|
1569
1551
|
boolean(e, t, s) {
|
|
1570
1552
|
return s > 0.5 ? t : e;
|
|
1571
1553
|
},
|
|
1572
1554
|
color(e, t, s) {
|
|
1573
|
-
const i =
|
|
1555
|
+
const i = Ke(e || ss), n = i.valid && Ke(t || ss);
|
|
1574
1556
|
return n && n.valid ? n.mix(i, s).hexString() : t;
|
|
1575
1557
|
},
|
|
1576
1558
|
number(e, t, s) {
|
|
1577
1559
|
return e + (t - e) * s;
|
|
1578
1560
|
}
|
|
1579
1561
|
};
|
|
1580
|
-
class
|
|
1562
|
+
class Tn {
|
|
1581
1563
|
constructor(t, s, i, n) {
|
|
1582
1564
|
const o = s[i];
|
|
1583
|
-
n =
|
|
1565
|
+
n = Ht([
|
|
1584
1566
|
t.to,
|
|
1585
1567
|
n,
|
|
1586
1568
|
o,
|
|
1587
1569
|
t.from
|
|
1588
1570
|
]);
|
|
1589
|
-
const r =
|
|
1571
|
+
const r = Ht([
|
|
1590
1572
|
t.from,
|
|
1591
1573
|
o,
|
|
1592
1574
|
n
|
|
1593
1575
|
]);
|
|
1594
|
-
this._active = !0, this._fn = t.fn ||
|
|
1576
|
+
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
1577
|
}
|
|
1596
1578
|
active() {
|
|
1597
1579
|
return this._active;
|
|
@@ -1600,12 +1582,12 @@ class Ln {
|
|
|
1600
1582
|
if (this._active) {
|
|
1601
1583
|
this._notify(!1);
|
|
1602
1584
|
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 =
|
|
1585
|
+
this._start = i, this._duration = Math.floor(Math.max(r, t.duration)), this._total += o, this._loop = !!t.loop, this._to = Ht([
|
|
1604
1586
|
t.to,
|
|
1605
1587
|
s,
|
|
1606
1588
|
n,
|
|
1607
1589
|
t.from
|
|
1608
|
-
]), this._from =
|
|
1590
|
+
]), this._from = Ht([
|
|
1609
1591
|
t.from,
|
|
1610
1592
|
n,
|
|
1611
1593
|
s
|
|
@@ -1643,7 +1625,7 @@ class Ln {
|
|
|
1643
1625
|
i[n][s]();
|
|
1644
1626
|
}
|
|
1645
1627
|
}
|
|
1646
|
-
class
|
|
1628
|
+
class Ln {
|
|
1647
1629
|
constructor(t, s) {
|
|
1648
1630
|
this._chart = t, this._properties = /* @__PURE__ */ new Map(), this.configure(s);
|
|
1649
1631
|
}
|
|
@@ -1666,11 +1648,11 @@ class zn {
|
|
|
1666
1648
|
});
|
|
1667
1649
|
}
|
|
1668
1650
|
_animateOptions(t, s) {
|
|
1669
|
-
const i = s.options, n =
|
|
1651
|
+
const i = s.options, n = Fn(t, i);
|
|
1670
1652
|
if (!n)
|
|
1671
1653
|
return [];
|
|
1672
1654
|
const o = this._createAnimations(n, i);
|
|
1673
|
-
return i.$shared &&
|
|
1655
|
+
return i.$shared && zn(t.options.$animations, i).then(() => {
|
|
1674
1656
|
t.options = i;
|
|
1675
1657
|
}, () => {
|
|
1676
1658
|
}), o;
|
|
@@ -1699,7 +1681,7 @@ class zn {
|
|
|
1699
1681
|
t[l] = h;
|
|
1700
1682
|
continue;
|
|
1701
1683
|
}
|
|
1702
|
-
o[l] = d = new
|
|
1684
|
+
o[l] = d = new Tn(f, t, l, h), n.push(d);
|
|
1703
1685
|
}
|
|
1704
1686
|
return n;
|
|
1705
1687
|
}
|
|
@@ -1713,7 +1695,7 @@ class zn {
|
|
|
1713
1695
|
return Z.add(this._chart, i), !0;
|
|
1714
1696
|
}
|
|
1715
1697
|
}
|
|
1716
|
-
function
|
|
1698
|
+
function zn(e, t) {
|
|
1717
1699
|
const s = [], i = Object.keys(t);
|
|
1718
1700
|
for (let n = 0; n < i.length; n++) {
|
|
1719
1701
|
const o = e[i[n]];
|
|
@@ -1721,7 +1703,7 @@ function Fn(e, t) {
|
|
|
1721
1703
|
}
|
|
1722
1704
|
return Promise.all(s);
|
|
1723
1705
|
}
|
|
1724
|
-
function
|
|
1706
|
+
function Fn(e, t) {
|
|
1725
1707
|
if (!t)
|
|
1726
1708
|
return;
|
|
1727
1709
|
let s = e.options;
|
|
@@ -1734,17 +1716,17 @@ function jn(e, t) {
|
|
|
1734
1716
|
$animations: {}
|
|
1735
1717
|
})), s;
|
|
1736
1718
|
}
|
|
1737
|
-
function
|
|
1719
|
+
function is(e, t) {
|
|
1738
1720
|
const s = e && e.options || {}, i = s.reverse, n = s.min === void 0 ? t : 0, o = s.max === void 0 ? t : 0;
|
|
1739
1721
|
return {
|
|
1740
1722
|
start: i ? o : n,
|
|
1741
1723
|
end: i ? n : o
|
|
1742
1724
|
};
|
|
1743
1725
|
}
|
|
1744
|
-
function
|
|
1726
|
+
function jn(e, t, s) {
|
|
1745
1727
|
if (s === !1)
|
|
1746
1728
|
return !1;
|
|
1747
|
-
const i =
|
|
1729
|
+
const i = is(e, s), n = is(t, s);
|
|
1748
1730
|
return {
|
|
1749
1731
|
top: n.end,
|
|
1750
1732
|
right: i.end,
|
|
@@ -1752,7 +1734,7 @@ function Bn(e, t, s) {
|
|
|
1752
1734
|
left: i.start
|
|
1753
1735
|
};
|
|
1754
1736
|
}
|
|
1755
|
-
function
|
|
1737
|
+
function Bn(e) {
|
|
1756
1738
|
let t, s, i, n;
|
|
1757
1739
|
return w(e) ? (t = e.top, s = e.right, i = e.bottom, n = e.left) : t = s = i = n = e, {
|
|
1758
1740
|
top: t,
|
|
@@ -1769,7 +1751,7 @@ function Us(e, t) {
|
|
|
1769
1751
|
s.push(i[n].index);
|
|
1770
1752
|
return s;
|
|
1771
1753
|
}
|
|
1772
|
-
function
|
|
1754
|
+
function ns(e, t, s, i = {}) {
|
|
1773
1755
|
const n = e.keys, o = i.mode === "single";
|
|
1774
1756
|
let r, a, c, l;
|
|
1775
1757
|
if (t === null)
|
|
@@ -1781,11 +1763,11 @@ function is(e, t, s, i = {}) {
|
|
|
1781
1763
|
continue;
|
|
1782
1764
|
break;
|
|
1783
1765
|
}
|
|
1784
|
-
l = e.values[c],
|
|
1766
|
+
l = e.values[c], pt(l) && (o || t === 0 || We(t) === We(l)) && (t += l);
|
|
1785
1767
|
}
|
|
1786
1768
|
return !h && !i.all ? 0 : t;
|
|
1787
1769
|
}
|
|
1788
|
-
function
|
|
1770
|
+
function Hn(e, t) {
|
|
1789
1771
|
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
1772
|
let c, l, h;
|
|
1791
1773
|
for (c = 0, l = r.length; c < l; ++c)
|
|
@@ -1799,21 +1781,21 @@ function he(e, t) {
|
|
|
1799
1781
|
const s = e && e.options.stacked;
|
|
1800
1782
|
return s || s === void 0 && t.stack !== void 0;
|
|
1801
1783
|
}
|
|
1802
|
-
function
|
|
1784
|
+
function Wn(e, t, s) {
|
|
1803
1785
|
return `${e.id}.${t.id}.${s.stack || s.type}`;
|
|
1804
1786
|
}
|
|
1805
|
-
function
|
|
1787
|
+
function Vn(e) {
|
|
1806
1788
|
const { min: t, max: s, minDefined: i, maxDefined: n } = e.getUserBounds();
|
|
1807
1789
|
return {
|
|
1808
1790
|
min: i ? t : Number.NEGATIVE_INFINITY,
|
|
1809
1791
|
max: n ? s : Number.POSITIVE_INFINITY
|
|
1810
1792
|
};
|
|
1811
1793
|
}
|
|
1812
|
-
function
|
|
1794
|
+
function Nn(e, t, s) {
|
|
1813
1795
|
const i = e[t] || (e[t] = {});
|
|
1814
1796
|
return i[s] || (i[s] = {});
|
|
1815
1797
|
}
|
|
1816
|
-
function
|
|
1798
|
+
function os(e, t, s, i) {
|
|
1817
1799
|
for (const n of t.getMatchingVisibleMetas(i).reverse()) {
|
|
1818
1800
|
const o = e[n.index];
|
|
1819
1801
|
if (s && o > 0 || !s && o < 0)
|
|
@@ -1821,12 +1803,12 @@ function ns(e, t, s, i) {
|
|
|
1821
1803
|
}
|
|
1822
1804
|
return null;
|
|
1823
1805
|
}
|
|
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 =
|
|
1806
|
+
function rs(e, t) {
|
|
1807
|
+
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
1808
|
let f;
|
|
1827
1809
|
for (let u = 0; u < d; ++u) {
|
|
1828
1810
|
const g = t[u], { [c]: m, [l]: b } = g, p = g._stacks || (g._stacks = {});
|
|
1829
|
-
f = p[l] =
|
|
1811
|
+
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
1812
|
const _ = f._visualValues || (f._visualValues = {});
|
|
1831
1813
|
_[a] = b;
|
|
1832
1814
|
}
|
|
@@ -1835,8 +1817,8 @@ function de(e, t) {
|
|
|
1835
1817
|
const s = e.scales;
|
|
1836
1818
|
return Object.keys(s).filter((i) => s[i].axis === t).shift();
|
|
1837
1819
|
}
|
|
1838
|
-
function
|
|
1839
|
-
return
|
|
1820
|
+
function $n(e, t) {
|
|
1821
|
+
return Tt(e, {
|
|
1840
1822
|
active: !1,
|
|
1841
1823
|
dataset: void 0,
|
|
1842
1824
|
datasetIndex: t,
|
|
@@ -1845,8 +1827,8 @@ function Yn(e, t) {
|
|
|
1845
1827
|
type: "dataset"
|
|
1846
1828
|
});
|
|
1847
1829
|
}
|
|
1848
|
-
function
|
|
1849
|
-
return
|
|
1830
|
+
function Yn(e, t, s) {
|
|
1831
|
+
return Tt(e, {
|
|
1850
1832
|
active: !1,
|
|
1851
1833
|
dataIndex: t,
|
|
1852
1834
|
parsed: void 0,
|
|
@@ -1857,7 +1839,7 @@ function Xn(e, t, s) {
|
|
|
1857
1839
|
type: "data"
|
|
1858
1840
|
});
|
|
1859
1841
|
}
|
|
1860
|
-
function
|
|
1842
|
+
function xt(e, t) {
|
|
1861
1843
|
const s = e.controller.index, i = e.vScale && e.vScale.axis;
|
|
1862
1844
|
if (i) {
|
|
1863
1845
|
t = t || e._parsed;
|
|
@@ -1869,7 +1851,7 @@ function bt(e, t) {
|
|
|
1869
1851
|
}
|
|
1870
1852
|
}
|
|
1871
1853
|
}
|
|
1872
|
-
const fe = (e) => e === "reset" || e === "none",
|
|
1854
|
+
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
1855
|
keys: Us(s, !0),
|
|
1874
1856
|
values: null
|
|
1875
1857
|
};
|
|
@@ -1885,7 +1867,7 @@ class qs {
|
|
|
1885
1867
|
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
1868
|
}
|
|
1887
1869
|
updateIndex(t) {
|
|
1888
|
-
this.index !== t &&
|
|
1870
|
+
this.index !== t && xt(this._cachedMeta), this.index = t;
|
|
1889
1871
|
}
|
|
1890
1872
|
linkScales() {
|
|
1891
1873
|
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 +1891,20 @@ class qs {
|
|
|
1909
1891
|
}
|
|
1910
1892
|
_destroy() {
|
|
1911
1893
|
const t = this._cachedMeta;
|
|
1912
|
-
this._data &&
|
|
1894
|
+
this._data && Ne(this._data, this), t._stacked && xt(t);
|
|
1913
1895
|
}
|
|
1914
1896
|
_dataCheck() {
|
|
1915
1897
|
const t = this.getDataset(), s = t.data || (t.data = []), i = this._data;
|
|
1916
1898
|
if (w(s)) {
|
|
1917
1899
|
const n = this._cachedMeta;
|
|
1918
|
-
this._data =
|
|
1900
|
+
this._data = Hn(s, n);
|
|
1919
1901
|
} else if (i !== s) {
|
|
1920
1902
|
if (i) {
|
|
1921
|
-
|
|
1903
|
+
Ne(i, this);
|
|
1922
1904
|
const n = this._cachedMeta;
|
|
1923
|
-
|
|
1905
|
+
xt(n), n._parsed = [];
|
|
1924
1906
|
}
|
|
1925
|
-
s && Object.isExtensible(s) &&
|
|
1907
|
+
s && Object.isExtensible(s) && $i(s, this), this._syncList = [], this._data = s;
|
|
1926
1908
|
}
|
|
1927
1909
|
}
|
|
1928
1910
|
addElements() {
|
|
@@ -1934,7 +1916,7 @@ class qs {
|
|
|
1934
1916
|
let n = !1;
|
|
1935
1917
|
this._dataCheck();
|
|
1936
1918
|
const o = s._stacked;
|
|
1937
|
-
s._stacked = he(s.vScale, s), s.stack !== i.stack && (n = !0,
|
|
1919
|
+
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
1920
|
}
|
|
1939
1921
|
configure() {
|
|
1940
1922
|
const t = this.chart.config, s = t.datasetScopeKeys(this._type), i = t.getOptionScopes(this.getDataset(), s, !0);
|
|
@@ -1952,7 +1934,7 @@ class qs {
|
|
|
1952
1934
|
i._parsed[h + t] = d = f[h], c && (u() && (c = !1), l = d);
|
|
1953
1935
|
i._sorted = c;
|
|
1954
1936
|
}
|
|
1955
|
-
r &&
|
|
1937
|
+
r && rs(this, f);
|
|
1956
1938
|
}
|
|
1957
1939
|
parsePrimitiveData(t, s, i, n) {
|
|
1958
1940
|
const { iScale: o, vScale: r } = t, a = o.axis, c = r.axis, l = o.getLabels(), h = o === r, d = new Array(n);
|
|
@@ -1979,8 +1961,8 @@ class qs {
|
|
|
1979
1961
|
let h, d, f, u;
|
|
1980
1962
|
for (h = 0, d = n; h < d; ++h)
|
|
1981
1963
|
f = h + i, u = s[f], l[h] = {
|
|
1982
|
-
x: o.parse(
|
|
1983
|
-
y: r.parse(
|
|
1964
|
+
x: o.parse(Pt(u, a), f),
|
|
1965
|
+
y: r.parse(Pt(u, c), f)
|
|
1984
1966
|
};
|
|
1985
1967
|
return l;
|
|
1986
1968
|
}
|
|
@@ -1995,7 +1977,7 @@ class qs {
|
|
|
1995
1977
|
keys: Us(n, !0),
|
|
1996
1978
|
values: s._stacks[t.axis]._visualValues
|
|
1997
1979
|
};
|
|
1998
|
-
return
|
|
1980
|
+
return ns(a, r, o.index, {
|
|
1999
1981
|
mode: i
|
|
2000
1982
|
});
|
|
2001
1983
|
}
|
|
@@ -2003,18 +1985,18 @@ class qs {
|
|
|
2003
1985
|
const o = i[s.axis];
|
|
2004
1986
|
let r = o === null ? NaN : o;
|
|
2005
1987
|
const a = n && i._stacks[s.axis];
|
|
2006
|
-
n && a && (n.values = a, r =
|
|
1988
|
+
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
1989
|
}
|
|
2008
1990
|
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 =
|
|
1991
|
+
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
1992
|
min: Number.POSITIVE_INFINITY,
|
|
2011
1993
|
max: Number.NEGATIVE_INFINITY
|
|
2012
|
-
}, { min: h, max: d } =
|
|
1994
|
+
}, { min: h, max: d } = Vn(a);
|
|
2013
1995
|
let f, u;
|
|
2014
1996
|
function g() {
|
|
2015
1997
|
u = n[f];
|
|
2016
1998
|
const m = u[a.axis];
|
|
2017
|
-
return !
|
|
1999
|
+
return !pt(u[t.axis]) || h > m || d < m;
|
|
2018
2000
|
}
|
|
2019
2001
|
for (f = 0; f < r && !(!g() && (this.updateRangeFromParsed(l, t, u, c), o)); ++f)
|
|
2020
2002
|
;
|
|
@@ -2031,7 +2013,7 @@ class qs {
|
|
|
2031
2013
|
const s = this._cachedMeta._parsed, i = [];
|
|
2032
2014
|
let n, o, r;
|
|
2033
2015
|
for (n = 0, o = s.length; n < o; ++n)
|
|
2034
|
-
r = s[n][t.axis],
|
|
2016
|
+
r = s[n][t.axis], pt(r) && i.push(r);
|
|
2035
2017
|
return i;
|
|
2036
2018
|
}
|
|
2037
2019
|
getMaxOverflow() {
|
|
@@ -2046,7 +2028,7 @@ class qs {
|
|
|
2046
2028
|
}
|
|
2047
2029
|
_update(t) {
|
|
2048
2030
|
const s = this._cachedMeta;
|
|
2049
|
-
this.update(t || "default"), s._clip =
|
|
2031
|
+
this.update(t || "default"), s._clip = Bn(A(this.options.clip, jn(s.xScale, s.yScale, this.getMaxOverflow())));
|
|
2050
2032
|
}
|
|
2051
2033
|
update(t) {
|
|
2052
2034
|
}
|
|
@@ -2069,9 +2051,9 @@ class qs {
|
|
|
2069
2051
|
let o;
|
|
2070
2052
|
if (t >= 0 && t < this._cachedMeta.data.length) {
|
|
2071
2053
|
const r = this._cachedMeta.data[t];
|
|
2072
|
-
o = r.$context || (r.$context =
|
|
2054
|
+
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
2055
|
} else
|
|
2074
|
-
o = this.$context || (this.$context =
|
|
2056
|
+
o = this.$context || (this.$context = $n(this.chart.getContext(), this.index)), o.dataset = n, o.index = o.datasetIndex = this.index;
|
|
2075
2057
|
return o.active = !!s, o.mode = i, o;
|
|
2076
2058
|
}
|
|
2077
2059
|
resolveDatasetElementOptions(t) {
|
|
@@ -2083,7 +2065,7 @@ class qs {
|
|
|
2083
2065
|
_resolveElementOptions(t, s = "default", i) {
|
|
2084
2066
|
const n = s === "active", o = this._cachedDataOpts, r = t + "-" + s, a = o[r], c = this.enableOptionSharing && Gt(i);
|
|
2085
2067
|
if (a)
|
|
2086
|
-
return
|
|
2068
|
+
return as(a, c);
|
|
2087
2069
|
const l = this.chart.config, h = l.datasetElementScopeKeys(this._type, t), d = n ? [
|
|
2088
2070
|
`${t}Hover`,
|
|
2089
2071
|
"hover",
|
|
@@ -2093,7 +2075,7 @@ class qs {
|
|
|
2093
2075
|
t,
|
|
2094
2076
|
""
|
|
2095
2077
|
], 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(
|
|
2078
|
+
return m.$shared && (m.$shared = c, o[r] = Object.freeze(as(m, c))), m;
|
|
2097
2079
|
}
|
|
2098
2080
|
_resolveAnimations(t, s, i) {
|
|
2099
2081
|
const n = this.chart, o = this._cachedDataOpts, r = `animation-${s}`, a = o[r];
|
|
@@ -2104,7 +2086,7 @@ class qs {
|
|
|
2104
2086
|
const h = this.chart.config, d = h.datasetAnimationScopeKeys(this._type, s), f = h.getOptionScopes(this.getDataset(), d);
|
|
2105
2087
|
c = h.createResolver(f, this.getContext(t, i, s));
|
|
2106
2088
|
}
|
|
2107
|
-
const l = new
|
|
2089
|
+
const l = new Ln(n, c && c.animations);
|
|
2108
2090
|
return c && c._cacheable && (o[r] = Object.freeze(l)), l;
|
|
2109
2091
|
}
|
|
2110
2092
|
getSharedOptions(t) {
|
|
@@ -2173,7 +2155,7 @@ class qs {
|
|
|
2173
2155
|
const i = this._cachedMeta;
|
|
2174
2156
|
if (this._parsing) {
|
|
2175
2157
|
const n = i._parsed.splice(t, s);
|
|
2176
|
-
i._stacked &&
|
|
2158
|
+
i._stacked && xt(i, n);
|
|
2177
2159
|
}
|
|
2178
2160
|
i.data.splice(t, s);
|
|
2179
2161
|
}
|
|
@@ -2232,7 +2214,7 @@ class qs {
|
|
|
2232
2214
|
]);
|
|
2233
2215
|
}
|
|
2234
2216
|
}
|
|
2235
|
-
function
|
|
2217
|
+
function Kn(e, t, s) {
|
|
2236
2218
|
let i = 1, n = 1, o = 0, r = 0;
|
|
2237
2219
|
if (t < T) {
|
|
2238
2220
|
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 +2227,7 @@ function Un(e, t, s) {
|
|
|
2245
2227
|
offsetY: r
|
|
2246
2228
|
};
|
|
2247
2229
|
}
|
|
2248
|
-
class
|
|
2230
|
+
class Un extends qs {
|
|
2249
2231
|
static id = "doughnut";
|
|
2250
2232
|
static defaults = {
|
|
2251
2233
|
datasetElementType: !1,
|
|
@@ -2288,24 +2270,25 @@ class qn extends qs {
|
|
|
2288
2270
|
legend: {
|
|
2289
2271
|
labels: {
|
|
2290
2272
|
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
|
-
|
|
2273
|
+
const s = t.data, { labels: { pointStyle: i, textAlign: n, color: o, useBorderRadius: r, borderRadius: a } } = t.legend.options;
|
|
2274
|
+
return s.labels.length && s.datasets.length ? s.labels.map((c, l) => {
|
|
2275
|
+
const d = t.getDatasetMeta(0).controller.getStyle(l);
|
|
2276
|
+
return {
|
|
2277
|
+
text: c,
|
|
2278
|
+
fillStyle: d.backgroundColor,
|
|
2279
|
+
fontColor: o,
|
|
2280
|
+
hidden: !t.getDataVisibility(l),
|
|
2281
|
+
lineDash: d.borderDash,
|
|
2282
|
+
lineDashOffset: d.borderDashOffset,
|
|
2283
|
+
lineJoin: d.borderJoinStyle,
|
|
2284
|
+
lineWidth: d.borderWidth,
|
|
2285
|
+
strokeStyle: d.borderColor,
|
|
2286
|
+
textAlign: n,
|
|
2287
|
+
pointStyle: i,
|
|
2288
|
+
borderRadius: r && (a || d.borderRadius),
|
|
2289
|
+
index: l
|
|
2290
|
+
};
|
|
2291
|
+
}) : [];
|
|
2309
2292
|
}
|
|
2310
2293
|
},
|
|
2311
2294
|
onClick(t, s, i) {
|
|
@@ -2327,7 +2310,7 @@ class qn extends qs {
|
|
|
2327
2310
|
let o = (c) => +i[c];
|
|
2328
2311
|
if (w(i[t])) {
|
|
2329
2312
|
const { key: c = "value" } = this._parsing;
|
|
2330
|
-
o = (l) => +
|
|
2313
|
+
o = (l) => +Pt(i[l], c);
|
|
2331
2314
|
}
|
|
2332
2315
|
let r, a;
|
|
2333
2316
|
for (r = t, a = t + s; r < a; ++r)
|
|
@@ -2335,10 +2318,10 @@ class qn extends qs {
|
|
|
2335
2318
|
}
|
|
2336
2319
|
}
|
|
2337
2320
|
_getRotation() {
|
|
2338
|
-
return
|
|
2321
|
+
return gt(this.options.rotation - 90);
|
|
2339
2322
|
}
|
|
2340
2323
|
_getCircumference() {
|
|
2341
|
-
return
|
|
2324
|
+
return gt(this.options.circumference);
|
|
2342
2325
|
}
|
|
2343
2326
|
_getRotationExtents() {
|
|
2344
2327
|
let t = T, s = -T;
|
|
@@ -2353,7 +2336,7 @@ class qn extends qs {
|
|
|
2353
2336
|
};
|
|
2354
2337
|
}
|
|
2355
2338
|
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(
|
|
2339
|
+
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
2340
|
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
2341
|
}
|
|
2359
2342
|
_circumference(t, s) {
|
|
@@ -2392,7 +2375,7 @@ class qn extends qs {
|
|
|
2392
2375
|
return s > 0 && !isNaN(t) ? T * (Math.abs(t) / s) : 0;
|
|
2393
2376
|
}
|
|
2394
2377
|
getLabelAndValue(t) {
|
|
2395
|
-
const s = this._cachedMeta, i = this.chart, n = i.data.labels || [], o =
|
|
2378
|
+
const s = this._cachedMeta, i = this.chart, n = i.data.labels || [], o = Qi(s._parsed[t], i.options.locale);
|
|
2396
2379
|
return {
|
|
2397
2380
|
label: n[t] || "",
|
|
2398
2381
|
value: o
|
|
@@ -2436,10 +2419,10 @@ class qn extends qs {
|
|
|
2436
2419
|
return this._getRingWeightOffset(this.chart.data.datasets.length) || 1;
|
|
2437
2420
|
}
|
|
2438
2421
|
}
|
|
2439
|
-
function
|
|
2422
|
+
function qn(e, t, s, i) {
|
|
2440
2423
|
const { controller: n, data: o, _sorted: r } = e, a = n._cachedMeta.iScale, c = e.dataset && e.dataset.options ? e.dataset.options.spanGaps : null;
|
|
2441
2424
|
if (a && t === a.axis && t !== "r" && r && o.length) {
|
|
2442
|
-
const l = a._reversePixels ?
|
|
2425
|
+
const l = a._reversePixels ? Ni : Vi;
|
|
2443
2426
|
if (i) {
|
|
2444
2427
|
if (n._sharedOptions) {
|
|
2445
2428
|
const h = o[0], d = typeof h.getRange == "function" && h.getRange(t);
|
|
@@ -2470,14 +2453,14 @@ function Zn(e, t, s, i) {
|
|
|
2470
2453
|
function ne(e, t, s, i, n) {
|
|
2471
2454
|
const o = e.getSortedVisibleDatasetMetas(), r = s[t];
|
|
2472
2455
|
for (let a = 0, c = o.length; a < c; ++a) {
|
|
2473
|
-
const { index: l, data: h } = o[a], { lo: d, hi: f } =
|
|
2456
|
+
const { index: l, data: h } = o[a], { lo: d, hi: f } = qn(o[a], t, r, n);
|
|
2474
2457
|
for (let u = d; u <= f; ++u) {
|
|
2475
2458
|
const g = h[u];
|
|
2476
2459
|
g.skip || i(g, l, u);
|
|
2477
2460
|
}
|
|
2478
2461
|
}
|
|
2479
2462
|
}
|
|
2480
|
-
function
|
|
2463
|
+
function Zn(e) {
|
|
2481
2464
|
const t = e.indexOf("x") !== -1, s = e.indexOf("y") !== -1;
|
|
2482
2465
|
return function(i, n) {
|
|
2483
2466
|
const o = t ? Math.abs(i.x - n.x) : 0, r = s ? Math.abs(i.y - n.y) : 0;
|
|
@@ -2494,7 +2477,7 @@ function ue(e, t, s, i, n) {
|
|
|
2494
2477
|
});
|
|
2495
2478
|
}, !0), o;
|
|
2496
2479
|
}
|
|
2497
|
-
function
|
|
2480
|
+
function Gn(e, t, s, i) {
|
|
2498
2481
|
let n = [];
|
|
2499
2482
|
function o(r, a, c) {
|
|
2500
2483
|
const { startAngle: l, endAngle: h } = r.getProps([
|
|
@@ -2512,9 +2495,9 @@ function Qn(e, t, s, i) {
|
|
|
2512
2495
|
}
|
|
2513
2496
|
return ne(e, s, t, o), n;
|
|
2514
2497
|
}
|
|
2515
|
-
function
|
|
2498
|
+
function Qn(e, t, s, i, n, o) {
|
|
2516
2499
|
let r = [];
|
|
2517
|
-
const a =
|
|
2500
|
+
const a = Zn(s);
|
|
2518
2501
|
let c = Number.POSITIVE_INFINITY;
|
|
2519
2502
|
function l(h, d, f) {
|
|
2520
2503
|
const u = h.inRange(t.x, t.y, n);
|
|
@@ -2539,9 +2522,9 @@ function Jn(e, t, s, i, n, o) {
|
|
|
2539
2522
|
return ne(e, s, t, l), r;
|
|
2540
2523
|
}
|
|
2541
2524
|
function ge(e, t, s, i, n, o) {
|
|
2542
|
-
return !o && !e.isPointInArea(t) ? [] : s === "r" && !i ?
|
|
2525
|
+
return !o && !e.isPointInArea(t) ? [] : s === "r" && !i ? Gn(e, t, s, n) : Qn(e, t, s, i, n, o);
|
|
2543
2526
|
}
|
|
2544
|
-
function
|
|
2527
|
+
function cs(e, t, s, i, n) {
|
|
2545
2528
|
const o = [], r = s === "x" ? "inXRange" : "inYRange";
|
|
2546
2529
|
let a = !1;
|
|
2547
2530
|
return ne(e, s, t, (c, l, h) => {
|
|
@@ -2552,10 +2535,10 @@ function as(e, t, s, i, n) {
|
|
|
2552
2535
|
}), a = a || c.inRange(t.x, t.y, n));
|
|
2553
2536
|
}), i && !a ? [] : o;
|
|
2554
2537
|
}
|
|
2555
|
-
var
|
|
2538
|
+
var Jn = {
|
|
2556
2539
|
modes: {
|
|
2557
2540
|
index(e, t, s, i) {
|
|
2558
|
-
const n =
|
|
2541
|
+
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
2542
|
return a.length ? (e.getSortedVisibleDatasetMetas().forEach((l) => {
|
|
2560
2543
|
const h = a[0].index, d = l.data[h];
|
|
2561
2544
|
d && !d.skip && c.push({
|
|
@@ -2566,7 +2549,7 @@ var to = {
|
|
|
2566
2549
|
}), c) : [];
|
|
2567
2550
|
},
|
|
2568
2551
|
dataset(e, t, s, i) {
|
|
2569
|
-
const n =
|
|
2552
|
+
const n = rt(t, e), o = s.axis || "xy", r = s.includeInvisible || !1;
|
|
2570
2553
|
let a = s.intersect ? ue(e, n, o, i, r) : ge(e, n, o, !1, i, r);
|
|
2571
2554
|
if (a.length > 0) {
|
|
2572
2555
|
const c = a[0].datasetIndex, l = e.getDatasetMeta(c).data;
|
|
@@ -2581,20 +2564,20 @@ var to = {
|
|
|
2581
2564
|
return a;
|
|
2582
2565
|
},
|
|
2583
2566
|
point(e, t, s, i) {
|
|
2584
|
-
const n =
|
|
2567
|
+
const n = rt(t, e), o = s.axis || "xy", r = s.includeInvisible || !1;
|
|
2585
2568
|
return ue(e, n, o, i, r);
|
|
2586
2569
|
},
|
|
2587
2570
|
nearest(e, t, s, i) {
|
|
2588
|
-
const n =
|
|
2571
|
+
const n = rt(t, e), o = s.axis || "xy", r = s.includeInvisible || !1;
|
|
2589
2572
|
return ge(e, n, o, s.intersect, i, r);
|
|
2590
2573
|
},
|
|
2591
2574
|
x(e, t, s, i) {
|
|
2592
|
-
const n =
|
|
2593
|
-
return
|
|
2575
|
+
const n = rt(t, e);
|
|
2576
|
+
return cs(e, n, "x", s.intersect, i);
|
|
2594
2577
|
},
|
|
2595
2578
|
y(e, t, s, i) {
|
|
2596
|
-
const n =
|
|
2597
|
-
return
|
|
2579
|
+
const n = rt(t, e);
|
|
2580
|
+
return cs(e, n, "y", s.intersect, i);
|
|
2598
2581
|
}
|
|
2599
2582
|
}
|
|
2600
2583
|
};
|
|
@@ -2604,19 +2587,19 @@ const Zs = [
|
|
|
2604
2587
|
"right",
|
|
2605
2588
|
"bottom"
|
|
2606
2589
|
];
|
|
2607
|
-
function
|
|
2590
|
+
function yt(e, t) {
|
|
2608
2591
|
return e.filter((s) => s.pos === t);
|
|
2609
2592
|
}
|
|
2610
|
-
function
|
|
2593
|
+
function ls(e, t) {
|
|
2611
2594
|
return e.filter((s) => Zs.indexOf(s.pos) === -1 && s.box.axis === t);
|
|
2612
2595
|
}
|
|
2613
|
-
function
|
|
2596
|
+
function vt(e, t) {
|
|
2614
2597
|
return e.sort((s, i) => {
|
|
2615
2598
|
const n = t ? i : s, o = t ? s : i;
|
|
2616
2599
|
return n.weight === o.weight ? n.index - o.index : n.weight - o.weight;
|
|
2617
2600
|
});
|
|
2618
2601
|
}
|
|
2619
|
-
function
|
|
2602
|
+
function to(e) {
|
|
2620
2603
|
const t = [];
|
|
2621
2604
|
let s, i, n, o, r, a;
|
|
2622
2605
|
for (s = 0, i = (e || []).length; s < i; ++s)
|
|
@@ -2631,7 +2614,7 @@ function eo(e) {
|
|
|
2631
2614
|
});
|
|
2632
2615
|
return t;
|
|
2633
2616
|
}
|
|
2634
|
-
function
|
|
2617
|
+
function eo(e) {
|
|
2635
2618
|
const t = {};
|
|
2636
2619
|
for (const s of e) {
|
|
2637
2620
|
const { stack: i, pos: n, stackWeight: o } = s;
|
|
@@ -2647,8 +2630,8 @@ function so(e) {
|
|
|
2647
2630
|
}
|
|
2648
2631
|
return t;
|
|
2649
2632
|
}
|
|
2650
|
-
function
|
|
2651
|
-
const s =
|
|
2633
|
+
function so(e, t) {
|
|
2634
|
+
const s = eo(e), { vBoxMaxWidth: i, hBoxMaxHeight: n } = t;
|
|
2652
2635
|
let o, r, a;
|
|
2653
2636
|
for (o = 0, r = e.length; o < r; ++o) {
|
|
2654
2637
|
a = e[o];
|
|
@@ -2657,24 +2640,24 @@ function io(e, t) {
|
|
|
2657
2640
|
}
|
|
2658
2641
|
return s;
|
|
2659
2642
|
}
|
|
2660
|
-
function
|
|
2661
|
-
const t =
|
|
2643
|
+
function io(e) {
|
|
2644
|
+
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
2645
|
return {
|
|
2663
2646
|
fullSize: s,
|
|
2664
2647
|
leftAndTop: i.concat(o),
|
|
2665
2648
|
rightAndBottom: n.concat(c).concat(r).concat(a),
|
|
2666
|
-
chartArea:
|
|
2649
|
+
chartArea: yt(t, "chartArea"),
|
|
2667
2650
|
vertical: i.concat(n).concat(c),
|
|
2668
2651
|
horizontal: o.concat(r).concat(a)
|
|
2669
2652
|
};
|
|
2670
2653
|
}
|
|
2671
|
-
function
|
|
2654
|
+
function hs(e, t, s, i) {
|
|
2672
2655
|
return Math.max(e[s], t[s]) + Math.max(e[i], t[i]);
|
|
2673
2656
|
}
|
|
2674
2657
|
function Gs(e, t) {
|
|
2675
2658
|
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
2659
|
}
|
|
2677
|
-
function
|
|
2660
|
+
function no(e, t, s, i) {
|
|
2678
2661
|
const { pos: n, box: o } = s, r = e.maxPadding;
|
|
2679
2662
|
if (!w(n)) {
|
|
2680
2663
|
s.size && (e[n] -= s.size);
|
|
@@ -2685,7 +2668,7 @@ function oo(e, t, s, i) {
|
|
|
2685
2668
|
d.size = Math.max(d.size, s.horizontal ? o.height : o.width), s.size = d.size / d.count, e[n] += s.size;
|
|
2686
2669
|
}
|
|
2687
2670
|
o.getPadding && Gs(r, o.getPadding());
|
|
2688
|
-
const a = Math.max(0, t.outerWidth -
|
|
2671
|
+
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
2672
|
return e.w = a, e.h = c, s.horizontal ? {
|
|
2690
2673
|
same: l,
|
|
2691
2674
|
other: h
|
|
@@ -2694,7 +2677,7 @@ function oo(e, t, s, i) {
|
|
|
2694
2677
|
other: l
|
|
2695
2678
|
};
|
|
2696
2679
|
}
|
|
2697
|
-
function
|
|
2680
|
+
function oo(e) {
|
|
2698
2681
|
const t = e.maxPadding;
|
|
2699
2682
|
function s(i) {
|
|
2700
2683
|
const n = Math.max(t[i] - e[i], 0);
|
|
@@ -2702,7 +2685,7 @@ function ro(e) {
|
|
|
2702
2685
|
}
|
|
2703
2686
|
e.y += s("top"), e.x += s("left"), s("right"), s("bottom");
|
|
2704
2687
|
}
|
|
2705
|
-
function
|
|
2688
|
+
function ro(e, t) {
|
|
2706
2689
|
const s = t.maxPadding;
|
|
2707
2690
|
function i(n) {
|
|
2708
2691
|
const o = {
|
|
@@ -2723,20 +2706,20 @@ function ao(e, t) {
|
|
|
2723
2706
|
"bottom"
|
|
2724
2707
|
]);
|
|
2725
2708
|
}
|
|
2726
|
-
function
|
|
2709
|
+
function St(e, t, s, i) {
|
|
2727
2710
|
const n = [];
|
|
2728
2711
|
let o, r, a, c, l, h;
|
|
2729
2712
|
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 } =
|
|
2713
|
+
a = e[o], c = a.box, c.update(a.width || t.w, a.height || t.h, ro(a.horizontal, t));
|
|
2714
|
+
const { same: d, other: f } = no(t, s, a, i);
|
|
2732
2715
|
l |= d && n.length, h = h || f, c.fullSize || n.push(a);
|
|
2733
2716
|
}
|
|
2734
|
-
return l &&
|
|
2717
|
+
return l && St(n, t, s, i) || h;
|
|
2735
2718
|
}
|
|
2736
2719
|
function Vt(e, t, s, i, n) {
|
|
2737
2720
|
e.top = s, e.left = t, e.right = t + i, e.bottom = s + n, e.width = i, e.height = n;
|
|
2738
2721
|
}
|
|
2739
|
-
function
|
|
2722
|
+
function ds(e, t, s, i) {
|
|
2740
2723
|
const n = s.padding;
|
|
2741
2724
|
let { x: o, y: r } = t;
|
|
2742
2725
|
for (const a of e) {
|
|
@@ -2777,7 +2760,7 @@ var Nt = {
|
|
|
2777
2760
|
update(e, t, s, i) {
|
|
2778
2761
|
if (!e)
|
|
2779
2762
|
return;
|
|
2780
|
-
const n =
|
|
2763
|
+
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
2764
|
j(e.boxes, (m) => {
|
|
2782
2765
|
typeof m.beforeLayout == "function" && m.beforeLayout();
|
|
2783
2766
|
});
|
|
@@ -2790,15 +2773,15 @@ var Nt = {
|
|
|
2790
2773
|
vBoxMaxWidth: o / 2 / h,
|
|
2791
2774
|
hBoxMaxHeight: r / 2
|
|
2792
2775
|
}), f = Object.assign({}, n);
|
|
2793
|
-
Gs(f,
|
|
2776
|
+
Gs(f, Et(i));
|
|
2794
2777
|
const u = Object.assign({
|
|
2795
2778
|
maxPadding: f,
|
|
2796
2779
|
w: o,
|
|
2797
2780
|
h: r,
|
|
2798
2781
|
x: n.left,
|
|
2799
2782
|
y: n.top
|
|
2800
|
-
}, n), g =
|
|
2801
|
-
|
|
2783
|
+
}, n), g = so(c.concat(l), d);
|
|
2784
|
+
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
2785
|
left: u.left,
|
|
2803
2786
|
top: u.top,
|
|
2804
2787
|
right: u.left + u.w,
|
|
@@ -2841,7 +2824,7 @@ class Qs {
|
|
|
2841
2824
|
updateConfig(t) {
|
|
2842
2825
|
}
|
|
2843
2826
|
}
|
|
2844
|
-
class
|
|
2827
|
+
class ao extends Qs {
|
|
2845
2828
|
acquireContext(t) {
|
|
2846
2829
|
return t && t.getContext && t.getContext("2d") || null;
|
|
2847
2830
|
}
|
|
@@ -2849,7 +2832,7 @@ class co extends Qs {
|
|
|
2849
2832
|
t.options.animation = !1;
|
|
2850
2833
|
}
|
|
2851
2834
|
}
|
|
2852
|
-
const Ut = "$chartjs",
|
|
2835
|
+
const Ut = "$chartjs", co = {
|
|
2853
2836
|
touchstart: "mousedown",
|
|
2854
2837
|
touchmove: "mousemove",
|
|
2855
2838
|
touchend: "mouseup",
|
|
@@ -2859,8 +2842,8 @@ const Ut = "$chartjs", lo = {
|
|
|
2859
2842
|
pointerup: "mouseup",
|
|
2860
2843
|
pointerleave: "mouseout",
|
|
2861
2844
|
pointerout: "mouseout"
|
|
2862
|
-
},
|
|
2863
|
-
function
|
|
2845
|
+
}, fs = (e) => e === null || e === "";
|
|
2846
|
+
function lo(e, t) {
|
|
2864
2847
|
const s = e.style, i = e.getAttribute("height"), n = e.getAttribute("width");
|
|
2865
2848
|
if (e[Ut] = {
|
|
2866
2849
|
initial: {
|
|
@@ -2872,30 +2855,30 @@ function ho(e, t) {
|
|
|
2872
2855
|
width: s.width
|
|
2873
2856
|
}
|
|
2874
2857
|
}
|
|
2875
|
-
}, s.display = s.display || "block", s.boxSizing = s.boxSizing || "border-box",
|
|
2876
|
-
const o =
|
|
2858
|
+
}, s.display = s.display || "block", s.boxSizing = s.boxSizing || "border-box", fs(n)) {
|
|
2859
|
+
const o = es(e, "width");
|
|
2877
2860
|
o !== void 0 && (e.width = o);
|
|
2878
2861
|
}
|
|
2879
|
-
if (
|
|
2862
|
+
if (fs(i))
|
|
2880
2863
|
if (e.style.height === "")
|
|
2881
2864
|
e.height = e.width / (t || 2);
|
|
2882
2865
|
else {
|
|
2883
|
-
const o =
|
|
2866
|
+
const o = es(e, "height");
|
|
2884
2867
|
o !== void 0 && (e.height = o);
|
|
2885
2868
|
}
|
|
2886
2869
|
return e;
|
|
2887
2870
|
}
|
|
2888
|
-
const Js =
|
|
2871
|
+
const Js = An ? {
|
|
2889
2872
|
passive: !0
|
|
2890
2873
|
} : !1;
|
|
2891
|
-
function
|
|
2874
|
+
function ho(e, t, s) {
|
|
2892
2875
|
e && e.addEventListener(t, s, Js);
|
|
2893
2876
|
}
|
|
2894
|
-
function
|
|
2877
|
+
function fo(e, t, s) {
|
|
2895
2878
|
e && e.canvas && e.canvas.removeEventListener(t, s, Js);
|
|
2896
2879
|
}
|
|
2897
|
-
function
|
|
2898
|
-
const s =
|
|
2880
|
+
function uo(e, t) {
|
|
2881
|
+
const s = co[e.type] || e.type, { x: i, y: n } = rt(e, t);
|
|
2899
2882
|
return {
|
|
2900
2883
|
type: s,
|
|
2901
2884
|
chart: t,
|
|
@@ -2909,7 +2892,7 @@ function ee(e, t) {
|
|
|
2909
2892
|
if (s === t || s.contains(t))
|
|
2910
2893
|
return !0;
|
|
2911
2894
|
}
|
|
2912
|
-
function
|
|
2895
|
+
function go(e, t, s) {
|
|
2913
2896
|
const i = e.canvas, n = new MutationObserver((o) => {
|
|
2914
2897
|
let r = !1;
|
|
2915
2898
|
for (const a of o)
|
|
@@ -2921,7 +2904,7 @@ function po(e, t, s) {
|
|
|
2921
2904
|
subtree: !0
|
|
2922
2905
|
}), n;
|
|
2923
2906
|
}
|
|
2924
|
-
function
|
|
2907
|
+
function po(e, t, s) {
|
|
2925
2908
|
const i = e.canvas, n = new MutationObserver((o) => {
|
|
2926
2909
|
let r = !1;
|
|
2927
2910
|
for (const a of o)
|
|
@@ -2933,22 +2916,22 @@ function mo(e, t, s) {
|
|
|
2933
2916
|
subtree: !0
|
|
2934
2917
|
}), n;
|
|
2935
2918
|
}
|
|
2936
|
-
const
|
|
2937
|
-
let
|
|
2919
|
+
const Rt = /* @__PURE__ */ new Map();
|
|
2920
|
+
let us = 0;
|
|
2938
2921
|
function ti() {
|
|
2939
2922
|
const e = window.devicePixelRatio;
|
|
2940
|
-
e !==
|
|
2923
|
+
e !== us && (us = e, Rt.forEach((t, s) => {
|
|
2941
2924
|
s.currentDevicePixelRatio !== e && t();
|
|
2942
2925
|
}));
|
|
2943
2926
|
}
|
|
2944
|
-
function
|
|
2945
|
-
|
|
2927
|
+
function mo(e, t) {
|
|
2928
|
+
Rt.size || window.addEventListener("resize", ti), Rt.set(e, t);
|
|
2946
2929
|
}
|
|
2947
|
-
function
|
|
2948
|
-
|
|
2930
|
+
function _o(e) {
|
|
2931
|
+
Rt.delete(e), Rt.size || window.removeEventListener("resize", ti);
|
|
2949
2932
|
}
|
|
2950
|
-
function
|
|
2951
|
-
const i = e.canvas, n = i &&
|
|
2933
|
+
function bo(e, t, s) {
|
|
2934
|
+
const i = e.canvas, n = i && Pe(i);
|
|
2952
2935
|
if (!n)
|
|
2953
2936
|
return;
|
|
2954
2937
|
const o = js((a, c) => {
|
|
@@ -2958,21 +2941,21 @@ function xo(e, t, s) {
|
|
|
2958
2941
|
const c = a[0], l = c.contentRect.width, h = c.contentRect.height;
|
|
2959
2942
|
l === 0 && h === 0 || o(l, h);
|
|
2960
2943
|
});
|
|
2961
|
-
return r.observe(n),
|
|
2944
|
+
return r.observe(n), mo(e, o), r;
|
|
2962
2945
|
}
|
|
2963
2946
|
function pe(e, t, s) {
|
|
2964
|
-
s && s.disconnect(), t === "resize" &&
|
|
2947
|
+
s && s.disconnect(), t === "resize" && _o(e);
|
|
2965
2948
|
}
|
|
2966
|
-
function
|
|
2949
|
+
function xo(e, t, s) {
|
|
2967
2950
|
const i = e.canvas, n = js((o) => {
|
|
2968
|
-
e.ctx !== null && s(
|
|
2951
|
+
e.ctx !== null && s(uo(o, e));
|
|
2969
2952
|
}, e);
|
|
2970
|
-
return
|
|
2953
|
+
return ho(i, t, n), n;
|
|
2971
2954
|
}
|
|
2972
|
-
class
|
|
2955
|
+
class yo extends Qs {
|
|
2973
2956
|
acquireContext(t, s) {
|
|
2974
2957
|
const i = t && t.getContext && t.getContext("2d");
|
|
2975
|
-
return i && i.canvas === t ? (
|
|
2958
|
+
return i && i.canvas === t ? (lo(t, s), i) : null;
|
|
2976
2959
|
}
|
|
2977
2960
|
releaseContext(t) {
|
|
2978
2961
|
const s = t.canvas;
|
|
@@ -2994,10 +2977,10 @@ class vo extends Qs {
|
|
|
2994
2977
|
addEventListener(t, s, i) {
|
|
2995
2978
|
this.removeEventListener(t, s);
|
|
2996
2979
|
const n = t.$proxies || (t.$proxies = {}), r = {
|
|
2997
|
-
attach:
|
|
2998
|
-
detach:
|
|
2999
|
-
resize:
|
|
3000
|
-
}[s] ||
|
|
2980
|
+
attach: go,
|
|
2981
|
+
detach: po,
|
|
2982
|
+
resize: bo
|
|
2983
|
+
}[s] || xo;
|
|
3001
2984
|
n[s] = r(t, s, i);
|
|
3002
2985
|
}
|
|
3003
2986
|
removeEventListener(t, s) {
|
|
@@ -3008,23 +2991,23 @@ class vo extends Qs {
|
|
|
3008
2991
|
attach: pe,
|
|
3009
2992
|
detach: pe,
|
|
3010
2993
|
resize: pe
|
|
3011
|
-
}[s] ||
|
|
2994
|
+
}[s] || fo)(t, s, n), i[s] = void 0;
|
|
3012
2995
|
}
|
|
3013
2996
|
getDevicePixelRatio() {
|
|
3014
2997
|
return window.devicePixelRatio;
|
|
3015
2998
|
}
|
|
3016
2999
|
getMaximumSize(t, s, i, n) {
|
|
3017
|
-
return
|
|
3000
|
+
return Cn(t, s, i, n);
|
|
3018
3001
|
}
|
|
3019
3002
|
isAttached(t) {
|
|
3020
|
-
const s = t &&
|
|
3003
|
+
const s = t && Pe(t);
|
|
3021
3004
|
return !!(s && s.isConnected);
|
|
3022
3005
|
}
|
|
3023
3006
|
}
|
|
3024
|
-
function
|
|
3025
|
-
return !
|
|
3007
|
+
function vo(e) {
|
|
3008
|
+
return !Ae() || typeof OffscreenCanvas < "u" && e instanceof OffscreenCanvas ? ao : yo;
|
|
3026
3009
|
}
|
|
3027
|
-
class
|
|
3010
|
+
class Ee {
|
|
3028
3011
|
static defaults = {};
|
|
3029
3012
|
static defaultRoutes = void 0;
|
|
3030
3013
|
x;
|
|
@@ -3043,7 +3026,7 @@ class Pe {
|
|
|
3043
3026
|
};
|
|
3044
3027
|
}
|
|
3045
3028
|
hasValue() {
|
|
3046
|
-
return
|
|
3029
|
+
return Ve(this.x) && Ve(this.y);
|
|
3047
3030
|
}
|
|
3048
3031
|
getProps(t, s) {
|
|
3049
3032
|
const i = this.$animations;
|
|
@@ -3055,11 +3038,11 @@ class Pe {
|
|
|
3055
3038
|
}), n;
|
|
3056
3039
|
}
|
|
3057
3040
|
}
|
|
3058
|
-
function
|
|
3059
|
-
const s = e.options.ticks, i =
|
|
3041
|
+
function wo(e, t) {
|
|
3042
|
+
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
3043
|
if (r > n)
|
|
3061
|
-
return
|
|
3062
|
-
const h =
|
|
3044
|
+
return Oo(t, l, o, r / n), l;
|
|
3045
|
+
const h = ko(o, t, n);
|
|
3063
3046
|
if (r > 0) {
|
|
3064
3047
|
let d, f;
|
|
3065
3048
|
const u = r > 1 ? Math.round((c - a) / (r - 1)) : null;
|
|
@@ -3069,15 +3052,15 @@ function Mo(e, t) {
|
|
|
3069
3052
|
}
|
|
3070
3053
|
return $t(t, l, h), l;
|
|
3071
3054
|
}
|
|
3072
|
-
function
|
|
3055
|
+
function Mo(e) {
|
|
3073
3056
|
const t = e.options.offset, s = e._tickSize(), i = e._length / s + (t ? 0 : 1), n = e._maxLength / s;
|
|
3074
3057
|
return Math.floor(Math.min(i, n));
|
|
3075
3058
|
}
|
|
3076
|
-
function
|
|
3077
|
-
const i =
|
|
3059
|
+
function ko(e, t, s) {
|
|
3060
|
+
const i = Do(e), n = t.length / s;
|
|
3078
3061
|
if (!i)
|
|
3079
3062
|
return Math.max(n, 1);
|
|
3080
|
-
const o =
|
|
3063
|
+
const o = Fi(i);
|
|
3081
3064
|
for (let r = 0, a = o.length - 1; r < a; r++) {
|
|
3082
3065
|
const c = o[r];
|
|
3083
3066
|
if (c > n)
|
|
@@ -3085,14 +3068,14 @@ function So(e, t, s) {
|
|
|
3085
3068
|
}
|
|
3086
3069
|
return Math.max(n, 1);
|
|
3087
3070
|
}
|
|
3088
|
-
function
|
|
3071
|
+
function So(e) {
|
|
3089
3072
|
const t = [];
|
|
3090
3073
|
let s, i;
|
|
3091
3074
|
for (s = 0, i = e.length; s < i; s++)
|
|
3092
3075
|
e[s].major && t.push(s);
|
|
3093
3076
|
return t;
|
|
3094
3077
|
}
|
|
3095
|
-
function
|
|
3078
|
+
function Oo(e, t, s, i) {
|
|
3096
3079
|
let n = 0, o = s[0], r;
|
|
3097
3080
|
for (i = Math.ceil(i), r = 0; r < e.length; r++)
|
|
3098
3081
|
r === o && (t.push(e[r]), n++, o = s[n * i]);
|
|
@@ -3105,7 +3088,7 @@ function $t(e, t, s, i, n) {
|
|
|
3105
3088
|
for (l = Math.max(o, 0); l < r; l++)
|
|
3106
3089
|
l === h && (t.push(e[l]), a++, h = Math.round(o + a * s));
|
|
3107
3090
|
}
|
|
3108
|
-
function
|
|
3091
|
+
function Do(e) {
|
|
3109
3092
|
const t = e.length;
|
|
3110
3093
|
let s, i;
|
|
3111
3094
|
if (t < 2)
|
|
@@ -3115,21 +3098,21 @@ function Co(e) {
|
|
|
3115
3098
|
return !1;
|
|
3116
3099
|
return i;
|
|
3117
3100
|
}
|
|
3118
|
-
const
|
|
3119
|
-
function
|
|
3101
|
+
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);
|
|
3102
|
+
function ms(e, t) {
|
|
3120
3103
|
const s = [], i = e.length / t, n = e.length;
|
|
3121
3104
|
let o = 0;
|
|
3122
3105
|
for (; o < n; o += i)
|
|
3123
3106
|
s.push(e[Math.floor(o)]);
|
|
3124
3107
|
return s;
|
|
3125
3108
|
}
|
|
3126
|
-
function
|
|
3109
|
+
function Ao(e, t, s) {
|
|
3127
3110
|
const i = e.ticks.length, n = Math.min(t, i - 1), o = e._startPixel, r = e._endPixel, a = 1e-6;
|
|
3128
3111
|
let c = e.getPixelForTick(n), l;
|
|
3129
3112
|
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
3113
|
return c;
|
|
3131
3114
|
}
|
|
3132
|
-
function
|
|
3115
|
+
function Po(e, t) {
|
|
3133
3116
|
j(e, (s) => {
|
|
3134
3117
|
const i = s.gc, n = i.length / 2;
|
|
3135
3118
|
let o;
|
|
@@ -3140,48 +3123,48 @@ function Eo(e, t) {
|
|
|
3140
3123
|
}
|
|
3141
3124
|
});
|
|
3142
3125
|
}
|
|
3143
|
-
function
|
|
3126
|
+
function wt(e) {
|
|
3144
3127
|
return e.drawTicks ? e.tickLength : 0;
|
|
3145
3128
|
}
|
|
3146
|
-
function
|
|
3129
|
+
function _s(e, t) {
|
|
3147
3130
|
if (!e.display)
|
|
3148
3131
|
return 0;
|
|
3149
|
-
const s = be(e.font, t), i =
|
|
3132
|
+
const s = be(e.font, t), i = Et(e.padding);
|
|
3150
3133
|
return (B(e.text) ? e.text.length : 1) * s.lineHeight + i.height;
|
|
3151
3134
|
}
|
|
3152
|
-
function
|
|
3153
|
-
return
|
|
3135
|
+
function Eo(e, t) {
|
|
3136
|
+
return Tt(e, {
|
|
3154
3137
|
scale: t,
|
|
3155
3138
|
type: "scale"
|
|
3156
3139
|
});
|
|
3157
3140
|
}
|
|
3158
|
-
function
|
|
3159
|
-
return
|
|
3141
|
+
function Ro(e, t, s) {
|
|
3142
|
+
return Tt(e, {
|
|
3160
3143
|
tick: s,
|
|
3161
3144
|
index: t,
|
|
3162
3145
|
type: "tick"
|
|
3163
3146
|
});
|
|
3164
3147
|
}
|
|
3165
|
-
function
|
|
3166
|
-
let i =
|
|
3167
|
-
return (s && t !== "right" || !s && t === "right") && (i =
|
|
3148
|
+
function Io(e, t, s) {
|
|
3149
|
+
let i = Xi(e);
|
|
3150
|
+
return (s && t !== "right" || !s && t === "right") && (i = Co(i)), i;
|
|
3168
3151
|
}
|
|
3169
|
-
function
|
|
3152
|
+
function To(e, t, s, i) {
|
|
3170
3153
|
const { top: n, left: o, bottom: r, right: a, chart: c } = e, { chartArea: l, scales: h } = c;
|
|
3171
3154
|
let d = 0, f, u, g;
|
|
3172
3155
|
const m = r - n, b = a - o;
|
|
3173
3156
|
if (e.isHorizontal()) {
|
|
3174
|
-
if (u =
|
|
3157
|
+
if (u = $e(i, o, a), w(s)) {
|
|
3175
3158
|
const p = Object.keys(s)[0], _ = s[p];
|
|
3176
3159
|
g = h[p].getPixelForValue(_) + m - t;
|
|
3177
|
-
} else s === "center" ? g = (l.bottom + l.top) / 2 + m - t : g =
|
|
3160
|
+
} else s === "center" ? g = (l.bottom + l.top) / 2 + m - t : g = gs(e, s, t);
|
|
3178
3161
|
f = a - o;
|
|
3179
3162
|
} else {
|
|
3180
3163
|
if (w(s)) {
|
|
3181
3164
|
const p = Object.keys(s)[0], _ = s[p];
|
|
3182
3165
|
u = h[p].getPixelForValue(_) - b + t;
|
|
3183
|
-
} else s === "center" ? u = (l.left + l.right) / 2 - b + t : u =
|
|
3184
|
-
g =
|
|
3166
|
+
} else s === "center" ? u = (l.left + l.right) / 2 - b + t : u = gs(e, s, t);
|
|
3167
|
+
g = $e(i, r, n), d = s === "left" ? -$ : $;
|
|
3185
3168
|
}
|
|
3186
3169
|
return {
|
|
3187
3170
|
titleX: u,
|
|
@@ -3190,7 +3173,7 @@ function Lo(e, t, s, i) {
|
|
|
3190
3173
|
rotation: d
|
|
3191
3174
|
};
|
|
3192
3175
|
}
|
|
3193
|
-
class
|
|
3176
|
+
class Re extends Ee {
|
|
3194
3177
|
constructor(t) {
|
|
3195
3178
|
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
3179
|
left: 0,
|
|
@@ -3210,8 +3193,8 @@ class Ee extends Pe {
|
|
|
3210
3193
|
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
3194
|
min: K(t, i),
|
|
3212
3195
|
max: K(s, n),
|
|
3213
|
-
minDefined:
|
|
3214
|
-
maxDefined:
|
|
3196
|
+
minDefined: pt(t),
|
|
3197
|
+
maxDefined: pt(s)
|
|
3215
3198
|
};
|
|
3216
3199
|
}
|
|
3217
3200
|
getMinMax(t) {
|
|
@@ -3262,9 +3245,9 @@ class Ee extends Pe {
|
|
|
3262
3245
|
right: 0,
|
|
3263
3246
|
top: 0,
|
|
3264
3247
|
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 =
|
|
3248
|
+
}, 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
3249
|
const c = a < this.ticks.length;
|
|
3267
|
-
this._convertTicksToLabels(c ?
|
|
3250
|
+
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
3251
|
}
|
|
3269
3252
|
configure() {
|
|
3270
3253
|
let t = this.options.reverse, s, i;
|
|
@@ -3336,14 +3319,14 @@ class Ee extends Pe {
|
|
|
3336
3319
|
]);
|
|
3337
3320
|
}
|
|
3338
3321
|
calculateLabelRotation() {
|
|
3339
|
-
const t = this.options, s = t.ticks, i =
|
|
3322
|
+
const t = this.options, s = t.ticks, i = ps(this.ticks.length, t.ticks.maxTicksLimit), n = s.minRotation || 0, o = s.maxRotation;
|
|
3340
3323
|
let r = n, a, c, l;
|
|
3341
3324
|
if (!this._isVisible() || !s.display || n >= o || i <= 1 || !this.isHorizontal()) {
|
|
3342
3325
|
this.labelRotation = n;
|
|
3343
3326
|
return;
|
|
3344
3327
|
}
|
|
3345
3328
|
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 -
|
|
3329
|
+
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
3330
|
}
|
|
3348
3331
|
afterCalculateLabelRotation() {
|
|
3349
3332
|
E(this.options.afterCalculateLabelRotation, [
|
|
@@ -3363,9 +3346,9 @@ class Ee extends Pe {
|
|
|
3363
3346
|
height: 0
|
|
3364
3347
|
}, { chart: s, options: { ticks: i, title: n, grid: o } } = this, r = this._isVisible(), a = this.isHorizontal();
|
|
3365
3348
|
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 =
|
|
3349
|
+
const c = _s(n, s.options.font);
|
|
3350
|
+
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) {
|
|
3351
|
+
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
3352
|
if (a) {
|
|
3370
3353
|
const p = i.mirror ? 0 : b * d.width + m * f.height;
|
|
3371
3354
|
t.height = Math.min(this.maxHeight, t.height + p + u);
|
|
@@ -3416,25 +3399,25 @@ class Ee extends Pe {
|
|
|
3416
3399
|
if (!t) {
|
|
3417
3400
|
const s = this.options.ticks.sampleSize;
|
|
3418
3401
|
let i = this.ticks;
|
|
3419
|
-
s < i.length && (i =
|
|
3402
|
+
s < i.length && (i = ms(i, s)), this._labelSizes = t = this._computeLabelSizes(i, i.length, this.options.ticks.maxTicksLimit);
|
|
3420
3403
|
}
|
|
3421
3404
|
return t;
|
|
3422
3405
|
}
|
|
3423
3406
|
_computeLabelSizes(t, s, i) {
|
|
3424
|
-
const { ctx: n, _longestTextCache: o } = this, r = [], a = [], c = Math.floor(s /
|
|
3407
|
+
const { ctx: n, _longestTextCache: o } = this, r = [], a = [], c = Math.floor(s / ps(s, i));
|
|
3425
3408
|
let l = 0, h = 0, d, f, u, g, m, b, p, _, x, v, y;
|
|
3426
3409
|
for (d = 0; d < s; d += c) {
|
|
3427
3410
|
if (g = t[d].label, m = this._resolveTickFontOptions(d), n.font = b = m.string, p = o[b] = o[b] || {
|
|
3428
3411
|
data: {},
|
|
3429
3412
|
gc: []
|
|
3430
3413
|
}, _ = m.lineHeight, x = v = 0, !W(g) && !B(g))
|
|
3431
|
-
x =
|
|
3414
|
+
x = qe(n, p.data, p.gc, x, g), v = _;
|
|
3432
3415
|
else if (B(g))
|
|
3433
3416
|
for (f = 0, u = g.length; f < u; ++f)
|
|
3434
|
-
y = g[f], !W(y) && !B(y) && (x =
|
|
3417
|
+
y = g[f], !W(y) && !B(y) && (x = qe(n, p.data, p.gc, x, y), v += _);
|
|
3435
3418
|
r.push(x), a.push(v), l = Math.max(x, l), h = Math.max(v, h);
|
|
3436
3419
|
}
|
|
3437
|
-
|
|
3420
|
+
Po(o, s);
|
|
3438
3421
|
const O = r.indexOf(l), D = a.indexOf(h), L = (I) => ({
|
|
3439
3422
|
width: r[I] || 0,
|
|
3440
3423
|
height: a[I] || 0
|
|
@@ -3463,7 +3446,7 @@ class Ee extends Pe {
|
|
|
3463
3446
|
getPixelForDecimal(t) {
|
|
3464
3447
|
this._reversePixels && (t = 1 - t);
|
|
3465
3448
|
const s = this._startPixel + t * this._length;
|
|
3466
|
-
return
|
|
3449
|
+
return Hi(this._alignToPixels ? ot(this.chart, s, 0) : s);
|
|
3467
3450
|
}
|
|
3468
3451
|
getDecimalForPixel(t) {
|
|
3469
3452
|
const s = (t - this._startPixel) / this._length;
|
|
@@ -3480,12 +3463,12 @@ class Ee extends Pe {
|
|
|
3480
3463
|
const s = this.ticks || [];
|
|
3481
3464
|
if (t >= 0 && t < s.length) {
|
|
3482
3465
|
const i = s[t];
|
|
3483
|
-
return i.$context || (i.$context =
|
|
3466
|
+
return i.$context || (i.$context = Ro(this.getContext(), t, i));
|
|
3484
3467
|
}
|
|
3485
|
-
return this.$context || (this.$context =
|
|
3468
|
+
return this.$context || (this.$context = Eo(this.chart.getContext(), this));
|
|
3486
3469
|
}
|
|
3487
3470
|
_tickSize() {
|
|
3488
|
-
const t = this.options.ticks, s =
|
|
3471
|
+
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
3472
|
return this.isHorizontal() ? c * i > a * n ? a / i : c / n : c * n < a * i ? c / i : a / n;
|
|
3490
3473
|
}
|
|
3491
3474
|
_isVisible() {
|
|
@@ -3493,8 +3476,8 @@ class Ee extends Pe {
|
|
|
3493
3476
|
return t !== "auto" ? !!t : this.getMatchingVisibleMetas().length > 0;
|
|
3494
3477
|
}
|
|
3495
3478
|
_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
|
|
3479
|
+
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) {
|
|
3480
|
+
return ot(i, S, m);
|
|
3498
3481
|
};
|
|
3499
3482
|
let _, x, v, y, O, D, L, I, k, H, P, V;
|
|
3500
3483
|
if (r === "top")
|
|
@@ -3524,8 +3507,8 @@ class Ee extends Pe {
|
|
|
3524
3507
|
}
|
|
3525
3508
|
const Y = A(n.ticks.maxTicksLimit, d), M = Math.max(1, Math.ceil(d / Y));
|
|
3526
3509
|
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 =
|
|
3510
|
+
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;
|
|
3511
|
+
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
3512
|
tx1: O,
|
|
3530
3513
|
ty1: D,
|
|
3531
3514
|
tx2: L,
|
|
@@ -3535,19 +3518,19 @@ class Ee extends Pe {
|
|
|
3535
3518
|
x2: P,
|
|
3536
3519
|
y2: V,
|
|
3537
3520
|
width: F,
|
|
3538
|
-
color:
|
|
3539
|
-
borderDash:
|
|
3540
|
-
borderDashOffset:
|
|
3541
|
-
tickWidth:
|
|
3542
|
-
tickColor:
|
|
3543
|
-
tickBorderDash:
|
|
3544
|
-
tickBorderDashOffset:
|
|
3521
|
+
color: lt,
|
|
3522
|
+
borderDash: Lt,
|
|
3523
|
+
borderDashOffset: ht,
|
|
3524
|
+
tickWidth: _t,
|
|
3525
|
+
tickColor: it,
|
|
3526
|
+
tickBorderDash: bt,
|
|
3527
|
+
tickBorderDashOffset: nt
|
|
3545
3528
|
}));
|
|
3546
3529
|
}
|
|
3547
3530
|
return this._ticksLength = d, this._borderValue = _, u;
|
|
3548
3531
|
}
|
|
3549
3532
|
_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 =
|
|
3533
|
+
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
3534
|
let p, _, x, v, y, O, D, L, I, k, H, P, V = "middle";
|
|
3552
3535
|
if (n === "top")
|
|
3553
3536
|
O = this.bottom - g, D = this._getXAxisLabelAlignment();
|
|
@@ -3583,36 +3566,36 @@ class Ee extends Pe {
|
|
|
3583
3566
|
const M = o.setContext(this.getContext(p));
|
|
3584
3567
|
L = this.getPixelForTick(p) + o.labelOffset, I = this._resolveTickFontOptions(p), k = I.lineHeight, H = B(v) ? v.length : 1;
|
|
3585
3568
|
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
|
|
3569
|
+
let lt = D;
|
|
3570
|
+
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);
|
|
3571
|
+
let Lt;
|
|
3589
3572
|
if (M.showLabelBackdrop) {
|
|
3590
|
-
const
|
|
3591
|
-
let
|
|
3573
|
+
const ht = Et(M.backdropPadding), _t = Y.heights[p], it = Y.widths[p];
|
|
3574
|
+
let bt = P - ht.top, nt = 0 - ht.left;
|
|
3592
3575
|
switch (V) {
|
|
3593
3576
|
case "middle":
|
|
3594
|
-
|
|
3577
|
+
bt -= _t / 2;
|
|
3595
3578
|
break;
|
|
3596
3579
|
case "bottom":
|
|
3597
|
-
|
|
3580
|
+
bt -= _t;
|
|
3598
3581
|
break;
|
|
3599
3582
|
}
|
|
3600
3583
|
switch (D) {
|
|
3601
3584
|
case "center":
|
|
3602
|
-
|
|
3585
|
+
nt -= it / 2;
|
|
3603
3586
|
break;
|
|
3604
3587
|
case "right":
|
|
3605
|
-
|
|
3588
|
+
nt -= it;
|
|
3606
3589
|
break;
|
|
3607
3590
|
case "inner":
|
|
3608
|
-
p === _ - 1 ?
|
|
3591
|
+
p === _ - 1 ? nt -= it : p > 0 && (nt -= it / 2);
|
|
3609
3592
|
break;
|
|
3610
3593
|
}
|
|
3611
|
-
|
|
3612
|
-
left:
|
|
3613
|
-
top:
|
|
3614
|
-
width:
|
|
3615
|
-
height:
|
|
3594
|
+
Lt = {
|
|
3595
|
+
left: nt,
|
|
3596
|
+
top: bt,
|
|
3597
|
+
width: it + ht.width,
|
|
3598
|
+
height: _t + ht.height,
|
|
3616
3599
|
color: M.backdropColor
|
|
3617
3600
|
};
|
|
3618
3601
|
}
|
|
@@ -3625,13 +3608,13 @@ class Ee extends Pe {
|
|
|
3625
3608
|
color: C,
|
|
3626
3609
|
strokeColor: X,
|
|
3627
3610
|
strokeWidth: F,
|
|
3628
|
-
textAlign:
|
|
3611
|
+
textAlign: lt,
|
|
3629
3612
|
textBaseline: V,
|
|
3630
3613
|
translation: [
|
|
3631
3614
|
y,
|
|
3632
3615
|
O
|
|
3633
3616
|
],
|
|
3634
|
-
backdrop:
|
|
3617
|
+
backdrop: Lt
|
|
3635
3618
|
}
|
|
3636
3619
|
});
|
|
3637
3620
|
}
|
|
@@ -3639,7 +3622,7 @@ class Ee extends Pe {
|
|
|
3639
3622
|
}
|
|
3640
3623
|
_getXAxisLabelAlignment() {
|
|
3641
3624
|
const { position: t, ticks: s } = this.options;
|
|
3642
|
-
if (-
|
|
3625
|
+
if (-gt(this.labelRotation))
|
|
3643
3626
|
return t === "top" ? "left" : "right";
|
|
3644
3627
|
let n = "center";
|
|
3645
3628
|
return s.align === "start" ? n = "left" : s.align === "end" ? n = "right" : s.align === "inner" && (n = "inner"), n;
|
|
@@ -3717,7 +3700,7 @@ class Ee extends Pe {
|
|
|
3717
3700
|
return;
|
|
3718
3701
|
const a = n.setContext(this.getContext(0)).lineWidth, c = this._borderValue;
|
|
3719
3702
|
let l, h, d, f;
|
|
3720
|
-
this.isHorizontal() ? (l =
|
|
3703
|
+
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
3704
|
}
|
|
3722
3705
|
drawLabels(t) {
|
|
3723
3706
|
if (!this.options.ticks.display)
|
|
@@ -3727,7 +3710,7 @@ class Ee extends Pe {
|
|
|
3727
3710
|
const o = this.getLabelItems(t);
|
|
3728
3711
|
for (const r of o) {
|
|
3729
3712
|
const a = r.options, c = r.font, l = r.label, h = r.textOffset;
|
|
3730
|
-
|
|
3713
|
+
Ge(i, l, 0, h, c, a);
|
|
3731
3714
|
}
|
|
3732
3715
|
n && Vs(i);
|
|
3733
3716
|
}
|
|
@@ -3735,15 +3718,15 @@ class Ee extends Pe {
|
|
|
3735
3718
|
const { ctx: t, options: { position: s, title: i, reverse: n } } = this;
|
|
3736
3719
|
if (!i.display)
|
|
3737
3720
|
return;
|
|
3738
|
-
const o = be(i.font), r =
|
|
3721
|
+
const o = be(i.font), r = Et(i.padding), a = i.align;
|
|
3739
3722
|
let c = o.lineHeight / 2;
|
|
3740
3723
|
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
|
-
|
|
3724
|
+
const { titleX: l, titleY: h, maxWidth: d, rotation: f } = To(this, c, s, a);
|
|
3725
|
+
Ge(t, i.text, 0, 0, o, {
|
|
3743
3726
|
color: i.color,
|
|
3744
3727
|
maxWidth: d,
|
|
3745
3728
|
rotation: f,
|
|
3746
|
-
textAlign:
|
|
3729
|
+
textAlign: Io(a, s, n),
|
|
3747
3730
|
textBaseline: "middle",
|
|
3748
3731
|
translation: [
|
|
3749
3732
|
l,
|
|
@@ -3756,7 +3739,7 @@ class Ee extends Pe {
|
|
|
3756
3739
|
}
|
|
3757
3740
|
_layers() {
|
|
3758
3741
|
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 !==
|
|
3742
|
+
return !this._isVisible() || this.draw !== Re.prototype.draw ? [
|
|
3760
3743
|
{
|
|
3761
3744
|
z: s,
|
|
3762
3745
|
draw: (o) => {
|
|
@@ -3812,29 +3795,29 @@ class Yt {
|
|
|
3812
3795
|
register(t) {
|
|
3813
3796
|
const s = Object.getPrototypeOf(t);
|
|
3814
3797
|
let i;
|
|
3815
|
-
|
|
3798
|
+
Fo(s) && (i = this.register(s));
|
|
3816
3799
|
const n = this.items, o = t.id, r = this.scope + "." + o;
|
|
3817
3800
|
if (!o)
|
|
3818
3801
|
throw new Error("class does not have id: " + t);
|
|
3819
|
-
return o in n || (n[o] = t,
|
|
3802
|
+
return o in n || (n[o] = t, Lo(t, r, i), this.override && R.override(t.id, t.overrides)), r;
|
|
3820
3803
|
}
|
|
3821
3804
|
get(t) {
|
|
3822
3805
|
return this.items[t];
|
|
3823
3806
|
}
|
|
3824
3807
|
unregister(t) {
|
|
3825
3808
|
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
|
|
3809
|
+
i in s && delete s[i], n && i in R[n] && (delete R[n][i], this.override && delete ct[i]);
|
|
3827
3810
|
}
|
|
3828
3811
|
}
|
|
3829
|
-
function
|
|
3830
|
-
const i =
|
|
3812
|
+
function Lo(e, t, s) {
|
|
3813
|
+
const i = At(/* @__PURE__ */ Object.create(null), [
|
|
3831
3814
|
s ? R.get(s) : {},
|
|
3832
3815
|
R.get(t),
|
|
3833
3816
|
e.defaults
|
|
3834
3817
|
]);
|
|
3835
|
-
R.set(t, i), e.defaultRoutes &&
|
|
3818
|
+
R.set(t, i), e.defaultRoutes && zo(t, e.defaultRoutes), e.descriptors && R.describe(t, e.descriptors);
|
|
3836
3819
|
}
|
|
3837
|
-
function
|
|
3820
|
+
function zo(e, t) {
|
|
3838
3821
|
Object.keys(t).forEach((s) => {
|
|
3839
3822
|
const i = s.split("."), n = i.pop(), o = [
|
|
3840
3823
|
e
|
|
@@ -3842,12 +3825,12 @@ function Fo(e, t) {
|
|
|
3842
3825
|
R.route(o, n, c, a);
|
|
3843
3826
|
});
|
|
3844
3827
|
}
|
|
3845
|
-
function
|
|
3828
|
+
function Fo(e) {
|
|
3846
3829
|
return "id" in e && "defaults" in e;
|
|
3847
3830
|
}
|
|
3848
|
-
class
|
|
3831
|
+
class jo {
|
|
3849
3832
|
constructor() {
|
|
3850
|
-
this.controllers = new Yt(qs, "datasets", !0), this.elements = new Yt(
|
|
3833
|
+
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
3834
|
this.controllers,
|
|
3852
3835
|
this.scales,
|
|
3853
3836
|
this.elements
|
|
@@ -3907,7 +3890,7 @@ class Bo {
|
|
|
3907
3890
|
});
|
|
3908
3891
|
}
|
|
3909
3892
|
_exec(t, s, i) {
|
|
3910
|
-
const n =
|
|
3893
|
+
const n = Se(t);
|
|
3911
3894
|
E(i["before" + n], [], i), s[t](i), E(i["after" + n], [], i);
|
|
3912
3895
|
}
|
|
3913
3896
|
_getRegistryForType(t) {
|
|
@@ -3925,15 +3908,16 @@ class Bo {
|
|
|
3925
3908
|
return n;
|
|
3926
3909
|
}
|
|
3927
3910
|
}
|
|
3928
|
-
var U = /* @__PURE__ */ new
|
|
3929
|
-
class
|
|
3911
|
+
var U = /* @__PURE__ */ new jo();
|
|
3912
|
+
class Bo {
|
|
3930
3913
|
constructor() {
|
|
3931
|
-
this._init =
|
|
3914
|
+
this._init = void 0;
|
|
3932
3915
|
}
|
|
3933
3916
|
notify(t, s, i, n) {
|
|
3934
|
-
s === "beforeInit" && (this._init = this._createDescriptors(t, !0), this._notify(this._init, t, "install"))
|
|
3917
|
+
if (s === "beforeInit" && (this._init = this._createDescriptors(t, !0), this._notify(this._init, t, "install")), this._init === void 0)
|
|
3918
|
+
return;
|
|
3935
3919
|
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;
|
|
3920
|
+
return s === "afterDestroy" && (this._notify(o, t, "stop"), this._notify(this._init, t, "uninstall"), this._init = void 0), r;
|
|
3937
3921
|
}
|
|
3938
3922
|
_notify(t, s, i, n) {
|
|
3939
3923
|
n = n || {};
|
|
@@ -3958,15 +3942,15 @@ class Ho {
|
|
|
3958
3942
|
return this._notifyStateChanges(t), s;
|
|
3959
3943
|
}
|
|
3960
3944
|
_createDescriptors(t, s) {
|
|
3961
|
-
const i = t && t.config, n = A(i.options && i.options.plugins, {}), o =
|
|
3962
|
-
return n === !1 && !s ? [] :
|
|
3945
|
+
const i = t && t.config, n = A(i.options && i.options.plugins, {}), o = Ho(i);
|
|
3946
|
+
return n === !1 && !s ? [] : Vo(t, o, n, s);
|
|
3963
3947
|
}
|
|
3964
3948
|
_notifyStateChanges(t) {
|
|
3965
3949
|
const s = this._oldCache || [], i = this._cache, n = (o, r) => o.filter((a) => !r.some((c) => a.plugin.id === c.plugin.id));
|
|
3966
3950
|
this._notify(n(s, i), t, "stop"), this._notify(n(i, s), t, "start");
|
|
3967
3951
|
}
|
|
3968
3952
|
}
|
|
3969
|
-
function
|
|
3953
|
+
function Ho(e) {
|
|
3970
3954
|
const t = {}, s = [], i = Object.keys(U.plugins.items);
|
|
3971
3955
|
for (let o = 0; o < i.length; o++)
|
|
3972
3956
|
s.push(U.getPlugin(i[o]));
|
|
@@ -3980,16 +3964,16 @@ function Wo(e) {
|
|
|
3980
3964
|
localIds: t
|
|
3981
3965
|
};
|
|
3982
3966
|
}
|
|
3983
|
-
function
|
|
3967
|
+
function Wo(e, t) {
|
|
3984
3968
|
return !t && e === !1 ? null : e === !0 ? {} : e;
|
|
3985
3969
|
}
|
|
3986
|
-
function
|
|
3970
|
+
function Vo(e, { plugins: t, localIds: s }, i, n) {
|
|
3987
3971
|
const o = [], r = e.getContext();
|
|
3988
3972
|
for (const a of t) {
|
|
3989
|
-
const c = a.id, l =
|
|
3973
|
+
const c = a.id, l = Wo(i[c], n);
|
|
3990
3974
|
l !== null && o.push({
|
|
3991
3975
|
plugin: a,
|
|
3992
|
-
options:
|
|
3976
|
+
options: No(e.config, {
|
|
3993
3977
|
plugin: a,
|
|
3994
3978
|
local: s[c]
|
|
3995
3979
|
}, l, r)
|
|
@@ -3997,7 +3981,7 @@ function No(e, { plugins: t, localIds: s }, i, n) {
|
|
|
3997
3981
|
}
|
|
3998
3982
|
return o;
|
|
3999
3983
|
}
|
|
4000
|
-
function
|
|
3984
|
+
function No(e, { plugin: t, local: s }, i, n) {
|
|
4001
3985
|
const o = e.pluginScopeKeys(t), r = e.getOptionScopes(i, o);
|
|
4002
3986
|
return s && t.defaults && r.push(t.defaults), e.createResolver(r, n, [
|
|
4003
3987
|
""
|
|
@@ -4011,49 +3995,49 @@ function xe(e, t) {
|
|
|
4011
3995
|
const s = R.datasets[e] || {};
|
|
4012
3996
|
return ((t.datasets || {})[e] || {}).indexAxis || t.indexAxis || s.indexAxis || "x";
|
|
4013
3997
|
}
|
|
4014
|
-
function
|
|
3998
|
+
function $o(e, t) {
|
|
4015
3999
|
let s = e;
|
|
4016
4000
|
return e === "_index_" ? s = t : e === "_value_" && (s = t === "x" ? "y" : "x"), s;
|
|
4017
4001
|
}
|
|
4018
|
-
function
|
|
4002
|
+
function Yo(e, t) {
|
|
4019
4003
|
return e === t ? "_index_" : "_value_";
|
|
4020
4004
|
}
|
|
4021
|
-
function
|
|
4005
|
+
function bs(e) {
|
|
4022
4006
|
if (e === "x" || e === "y" || e === "r")
|
|
4023
4007
|
return e;
|
|
4024
4008
|
}
|
|
4025
|
-
function
|
|
4009
|
+
function Xo(e) {
|
|
4026
4010
|
if (e === "top" || e === "bottom")
|
|
4027
4011
|
return "x";
|
|
4028
4012
|
if (e === "left" || e === "right")
|
|
4029
4013
|
return "y";
|
|
4030
4014
|
}
|
|
4031
4015
|
function ye(e, ...t) {
|
|
4032
|
-
if (
|
|
4016
|
+
if (bs(e))
|
|
4033
4017
|
return e;
|
|
4034
4018
|
for (const s of t) {
|
|
4035
|
-
const i = s.axis ||
|
|
4019
|
+
const i = s.axis || Xo(s.position) || e.length > 1 && bs(e[0].toLowerCase());
|
|
4036
4020
|
if (i)
|
|
4037
4021
|
return i;
|
|
4038
4022
|
}
|
|
4039
4023
|
throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`);
|
|
4040
4024
|
}
|
|
4041
|
-
function
|
|
4025
|
+
function xs(e, t, s) {
|
|
4042
4026
|
if (s[t + "AxisID"] === e)
|
|
4043
4027
|
return {
|
|
4044
4028
|
axis: t
|
|
4045
4029
|
};
|
|
4046
4030
|
}
|
|
4047
|
-
function
|
|
4031
|
+
function Ko(e, t) {
|
|
4048
4032
|
if (t.data && t.data.datasets) {
|
|
4049
4033
|
const s = t.data.datasets.filter((i) => i.xAxisID === e || i.yAxisID === e);
|
|
4050
4034
|
if (s.length)
|
|
4051
|
-
return
|
|
4035
|
+
return xs(e, "x", s[0]) || xs(e, "y", s[0]);
|
|
4052
4036
|
}
|
|
4053
4037
|
return {};
|
|
4054
4038
|
}
|
|
4055
|
-
function
|
|
4056
|
-
const s =
|
|
4039
|
+
function Uo(e, t) {
|
|
4040
|
+
const s = ct[e.type] || {
|
|
4057
4041
|
scales: {}
|
|
4058
4042
|
}, i = t.scales || {}, n = xe(e.type, t), o = /* @__PURE__ */ Object.create(null);
|
|
4059
4043
|
return Object.keys(i).forEach((r) => {
|
|
@@ -4062,7 +4046,7 @@ function qo(e, t) {
|
|
|
4062
4046
|
return console.error(`Invalid scale configuration for scale: ${r}`);
|
|
4063
4047
|
if (a._proxy)
|
|
4064
4048
|
return console.warn(`Ignoring resolver passed as options for scale: ${r}`);
|
|
4065
|
-
const c = ye(r, a,
|
|
4049
|
+
const c = ye(r, a, Ko(r, e), R.scales[a.type]), l = Yo(c, n), h = s.scales || {};
|
|
4066
4050
|
o[r] = Kt(/* @__PURE__ */ Object.create(null), [
|
|
4067
4051
|
{
|
|
4068
4052
|
axis: c
|
|
@@ -4072,9 +4056,9 @@ function qo(e, t) {
|
|
|
4072
4056
|
h[l]
|
|
4073
4057
|
]);
|
|
4074
4058
|
}), e.data.datasets.forEach((r) => {
|
|
4075
|
-
const a = r.type || e.type, c = r.indexAxis || xe(a, t), h = (
|
|
4059
|
+
const a = r.type || e.type, c = r.indexAxis || xe(a, t), h = (ct[a] || {}).scales || {};
|
|
4076
4060
|
Object.keys(h).forEach((d) => {
|
|
4077
|
-
const f =
|
|
4061
|
+
const f = $o(d, c), u = r[f + "AxisID"] || f;
|
|
4078
4062
|
o[u] = o[u] || /* @__PURE__ */ Object.create(null), Kt(o[u], [
|
|
4079
4063
|
{
|
|
4080
4064
|
axis: f
|
|
@@ -4093,26 +4077,26 @@ function qo(e, t) {
|
|
|
4093
4077
|
}
|
|
4094
4078
|
function ei(e) {
|
|
4095
4079
|
const t = e.options || (e.options = {});
|
|
4096
|
-
t.plugins = A(t.plugins, {}), t.scales =
|
|
4080
|
+
t.plugins = A(t.plugins, {}), t.scales = Uo(e, t);
|
|
4097
4081
|
}
|
|
4098
4082
|
function si(e) {
|
|
4099
4083
|
return e = e || {}, e.datasets = e.datasets || [], e.labels = e.labels || [], e;
|
|
4100
4084
|
}
|
|
4101
|
-
function
|
|
4085
|
+
function qo(e) {
|
|
4102
4086
|
return e = e || {}, e.data = si(e.data), ei(e), e;
|
|
4103
4087
|
}
|
|
4104
|
-
const
|
|
4088
|
+
const ys = /* @__PURE__ */ new Map(), ii = /* @__PURE__ */ new Set();
|
|
4105
4089
|
function Xt(e, t) {
|
|
4106
|
-
let s =
|
|
4107
|
-
return s || (s = t(),
|
|
4090
|
+
let s = ys.get(e);
|
|
4091
|
+
return s || (s = t(), ys.set(e, s), ii.add(s)), s;
|
|
4108
4092
|
}
|
|
4109
|
-
const
|
|
4110
|
-
const i =
|
|
4093
|
+
const Mt = (e, t, s) => {
|
|
4094
|
+
const i = Pt(t, s);
|
|
4111
4095
|
i !== void 0 && e.add(i);
|
|
4112
4096
|
};
|
|
4113
|
-
class
|
|
4097
|
+
class Zo {
|
|
4114
4098
|
constructor(t) {
|
|
4115
|
-
this._config =
|
|
4099
|
+
this._config = qo(t), this._scopeCache = /* @__PURE__ */ new Map(), this._resolverCache = /* @__PURE__ */ new Map();
|
|
4116
4100
|
}
|
|
4117
4101
|
get platform() {
|
|
4118
4102
|
return this._config.platform;
|
|
@@ -4195,7 +4179,7 @@ class Go {
|
|
|
4195
4179
|
return a;
|
|
4196
4180
|
const c = /* @__PURE__ */ new Set();
|
|
4197
4181
|
s.forEach((h) => {
|
|
4198
|
-
t && (c.add(t), h.forEach((d) =>
|
|
4182
|
+
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
4183
|
});
|
|
4200
4184
|
const l = Array.from(c);
|
|
4201
4185
|
return l.length === 0 && l.push(/* @__PURE__ */ Object.create(null)), ii.has(s) && r.set(s, l), l;
|
|
@@ -4204,7 +4188,7 @@ class Go {
|
|
|
4204
4188
|
const { options: t, type: s } = this;
|
|
4205
4189
|
return [
|
|
4206
4190
|
t,
|
|
4207
|
-
|
|
4191
|
+
ct[s] || {},
|
|
4208
4192
|
R.datasets[s] || {},
|
|
4209
4193
|
{
|
|
4210
4194
|
type: s
|
|
@@ -4218,12 +4202,12 @@ class Go {
|
|
|
4218
4202
|
]) {
|
|
4219
4203
|
const o = {
|
|
4220
4204
|
$shared: !0
|
|
4221
|
-
}, { resolver: r, subPrefixes: a } =
|
|
4205
|
+
}, { resolver: r, subPrefixes: a } = vs(this._resolverCache, t, n);
|
|
4222
4206
|
let c = r;
|
|
4223
|
-
if (
|
|
4224
|
-
o.$shared = !1, i =
|
|
4207
|
+
if (Qo(r, s)) {
|
|
4208
|
+
o.$shared = !1, i = st(i) ? i() : i;
|
|
4225
4209
|
const l = this.createResolver(t, i, a);
|
|
4226
|
-
c =
|
|
4210
|
+
c = mt(r, i, l);
|
|
4227
4211
|
}
|
|
4228
4212
|
for (const l of s)
|
|
4229
4213
|
o[l] = c[l];
|
|
@@ -4232,66 +4216,66 @@ class Go {
|
|
|
4232
4216
|
createResolver(t, s, i = [
|
|
4233
4217
|
""
|
|
4234
4218
|
], n) {
|
|
4235
|
-
const { resolver: o } =
|
|
4236
|
-
return w(s) ?
|
|
4219
|
+
const { resolver: o } = vs(this._resolverCache, t, i);
|
|
4220
|
+
return w(s) ? mt(o, s, void 0, n) : o;
|
|
4237
4221
|
}
|
|
4238
4222
|
}
|
|
4239
|
-
function
|
|
4223
|
+
function vs(e, t, s) {
|
|
4240
4224
|
let i = e.get(t);
|
|
4241
4225
|
i || (i = /* @__PURE__ */ new Map(), e.set(t, i));
|
|
4242
4226
|
const n = s.join();
|
|
4243
4227
|
let o = i.get(n);
|
|
4244
4228
|
return o || (o = {
|
|
4245
|
-
resolver:
|
|
4229
|
+
resolver: Oe(t, s),
|
|
4246
4230
|
subPrefixes: s.filter((a) => !a.toLowerCase().includes("hover"))
|
|
4247
4231
|
}, i.set(n, o)), o;
|
|
4248
4232
|
}
|
|
4249
|
-
const
|
|
4250
|
-
function
|
|
4233
|
+
const Go = (e) => w(e) && Object.getOwnPropertyNames(e).some((t) => st(e[t]));
|
|
4234
|
+
function Qo(e, t) {
|
|
4251
4235
|
const { isScriptable: s, isIndexable: i } = $s(e);
|
|
4252
4236
|
for (const n of t) {
|
|
4253
4237
|
const o = s(n), r = i(n), a = (r || o) && e[n];
|
|
4254
|
-
if (o && (
|
|
4238
|
+
if (o && (st(a) || Go(a)) || r && B(a))
|
|
4255
4239
|
return !0;
|
|
4256
4240
|
}
|
|
4257
4241
|
return !1;
|
|
4258
4242
|
}
|
|
4259
|
-
var
|
|
4260
|
-
const
|
|
4243
|
+
var Jo = "4.5.1";
|
|
4244
|
+
const tr = [
|
|
4261
4245
|
"top",
|
|
4262
4246
|
"bottom",
|
|
4263
4247
|
"left",
|
|
4264
4248
|
"right",
|
|
4265
4249
|
"chartArea"
|
|
4266
4250
|
];
|
|
4267
|
-
function vs(e, t) {
|
|
4268
|
-
return e === "top" || e === "bottom" || er.indexOf(e) === -1 && t === "x";
|
|
4269
|
-
}
|
|
4270
4251
|
function ws(e, t) {
|
|
4252
|
+
return e === "top" || e === "bottom" || tr.indexOf(e) === -1 && t === "x";
|
|
4253
|
+
}
|
|
4254
|
+
function Ms(e, t) {
|
|
4271
4255
|
return function(s, i) {
|
|
4272
4256
|
return s[e] === i[e] ? s[t] - i[t] : s[e] - i[e];
|
|
4273
4257
|
};
|
|
4274
4258
|
}
|
|
4275
|
-
function
|
|
4259
|
+
function ks(e) {
|
|
4276
4260
|
const t = e.chart, s = t.options.animation;
|
|
4277
4261
|
t.notifyPlugins("afterRender"), E(s && s.onComplete, [
|
|
4278
4262
|
e
|
|
4279
4263
|
], t);
|
|
4280
4264
|
}
|
|
4281
|
-
function
|
|
4265
|
+
function er(e) {
|
|
4282
4266
|
const t = e.chart, s = t.options.animation;
|
|
4283
4267
|
E(s && s.onProgress, [
|
|
4284
4268
|
e
|
|
4285
4269
|
], t);
|
|
4286
4270
|
}
|
|
4287
4271
|
function ni(e) {
|
|
4288
|
-
return
|
|
4272
|
+
return Ae() && typeof e == "string" ? e = document.getElementById(e) : e && e.length && (e = e[0]), e && e.canvas && (e = e.canvas), e;
|
|
4289
4273
|
}
|
|
4290
|
-
const qt = {},
|
|
4274
|
+
const qt = {}, Ss = (e) => {
|
|
4291
4275
|
const t = ni(e);
|
|
4292
4276
|
return Object.values(qt).filter((s) => s.canvas === t).pop();
|
|
4293
4277
|
};
|
|
4294
|
-
function
|
|
4278
|
+
function sr(e, t, s) {
|
|
4295
4279
|
const i = Object.keys(e);
|
|
4296
4280
|
for (const n of i) {
|
|
4297
4281
|
const o = +n;
|
|
@@ -4301,34 +4285,34 @@ function ir(e, t, s) {
|
|
|
4301
4285
|
}
|
|
4302
4286
|
}
|
|
4303
4287
|
}
|
|
4304
|
-
function
|
|
4288
|
+
function ir(e, t, s, i) {
|
|
4305
4289
|
return !s || e.type === "mouseout" ? null : i ? t : e;
|
|
4306
4290
|
}
|
|
4307
4291
|
let oe = class {
|
|
4308
4292
|
static defaults = R;
|
|
4309
4293
|
static instances = qt;
|
|
4310
|
-
static overrides =
|
|
4294
|
+
static overrides = ct;
|
|
4311
4295
|
static registry = U;
|
|
4312
|
-
static version =
|
|
4313
|
-
static getChart =
|
|
4296
|
+
static version = Jo;
|
|
4297
|
+
static getChart = Ss;
|
|
4314
4298
|
static register(...t) {
|
|
4315
|
-
U.add(...t),
|
|
4299
|
+
U.add(...t), Os();
|
|
4316
4300
|
}
|
|
4317
4301
|
static unregister(...t) {
|
|
4318
|
-
U.remove(...t),
|
|
4302
|
+
U.remove(...t), Os();
|
|
4319
4303
|
}
|
|
4320
4304
|
constructor(t, s) {
|
|
4321
|
-
const i = this.config = new
|
|
4305
|
+
const i = this.config = new Zo(s), n = ni(t), o = Ss(n);
|
|
4322
4306
|
if (o)
|
|
4323
4307
|
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
4308
|
const r = i.createResolver(i.chartOptionScopes(), this.getContext());
|
|
4325
|
-
this.platform = new (i.platform ||
|
|
4309
|
+
this.platform = new (i.platform || vo(n))(), this.platform.updateConfig(i);
|
|
4326
4310
|
const a = this.platform.acquireContext(n, r.aspectRatio), c = a && a.canvas, l = c && c.height, h = c && c.width;
|
|
4327
|
-
if (this.id =
|
|
4311
|
+
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
4312
|
console.error("Failed to create chart: can't acquire context from the given item");
|
|
4329
4313
|
return;
|
|
4330
4314
|
}
|
|
4331
|
-
Z.listen(this, "complete",
|
|
4315
|
+
Z.listen(this, "complete", ks), Z.listen(this, "progress", er), this._initialize(), this.attached && this.update();
|
|
4332
4316
|
}
|
|
4333
4317
|
get aspectRatio() {
|
|
4334
4318
|
const { options: { aspectRatio: t, maintainAspectRatio: s }, width: i, height: n, _aspectRatio: o } = this;
|
|
@@ -4350,10 +4334,10 @@ let oe = class {
|
|
|
4350
4334
|
return U;
|
|
4351
4335
|
}
|
|
4352
4336
|
_initialize() {
|
|
4353
|
-
return this.notifyPlugins("beforeInit"), this.options.responsive ? this.resize() :
|
|
4337
|
+
return this.notifyPlugins("beforeInit"), this.options.responsive ? this.resize() : ts(this, this.options.devicePixelRatio), this.bindEvents(), this.notifyPlugins("afterInit"), this;
|
|
4354
4338
|
}
|
|
4355
4339
|
clear() {
|
|
4356
|
-
return
|
|
4340
|
+
return Ze(this.canvas, this.ctx), this;
|
|
4357
4341
|
}
|
|
4358
4342
|
stop() {
|
|
4359
4343
|
return Z.stop(this), this;
|
|
@@ -4366,7 +4350,7 @@ let oe = class {
|
|
|
4366
4350
|
}
|
|
4367
4351
|
_resize(t, s) {
|
|
4368
4352
|
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,
|
|
4353
|
+
this.width = r.width, this.height = r.height, this._aspectRatio = this.aspectRatio, ts(this, a, !0) && (this.notifyPlugins("resize", {
|
|
4370
4354
|
size: r
|
|
4371
4355
|
}), E(i.onResize, [
|
|
4372
4356
|
this,
|
|
@@ -4391,7 +4375,7 @@ let oe = class {
|
|
|
4391
4375
|
};
|
|
4392
4376
|
}))), j(o, (r) => {
|
|
4393
4377
|
const a = r.options, c = a.id, l = ye(c, a), h = A(a.type, r.dtype);
|
|
4394
|
-
(a.position === void 0 ||
|
|
4378
|
+
(a.position === void 0 || ws(a.position, l) !== ws(r.dposition)) && (a.position = r.dposition), n[c] = !0;
|
|
4395
4379
|
let d = null;
|
|
4396
4380
|
if (c in i && i[c].type === h)
|
|
4397
4381
|
d = i[c];
|
|
@@ -4418,7 +4402,7 @@ let oe = class {
|
|
|
4418
4402
|
this._destroyDatasetMeta(n);
|
|
4419
4403
|
t.splice(s, i - s);
|
|
4420
4404
|
}
|
|
4421
|
-
this._sortedMetasets = t.slice(0).sort(
|
|
4405
|
+
this._sortedMetasets = t.slice(0).sort(Ms("order", "index"));
|
|
4422
4406
|
}
|
|
4423
4407
|
_removeUnreferencedMetasets() {
|
|
4424
4408
|
const { _metasets: t, data: { datasets: s } } = this;
|
|
@@ -4473,7 +4457,7 @@ let oe = class {
|
|
|
4473
4457
|
l.reset();
|
|
4474
4458
|
}), this._updateDatasets(t), this.notifyPlugins("afterUpdate", {
|
|
4475
4459
|
mode: t
|
|
4476
|
-
}), this._layers.sort(
|
|
4460
|
+
}), this._layers.sort(Ms("z", "_idx"));
|
|
4477
4461
|
const { _active: a, _lastEvent: c } = this;
|
|
4478
4462
|
c ? this._eventHandler(c, !0) : a.length && this._updateHoverStyles(a, a, !0), this.render();
|
|
4479
4463
|
}
|
|
@@ -4484,13 +4468,13 @@ let oe = class {
|
|
|
4484
4468
|
}
|
|
4485
4469
|
_checkEventBindings() {
|
|
4486
4470
|
const t = this.options, s = new Set(Object.keys(this._listeners)), i = new Set(t.events);
|
|
4487
|
-
(!
|
|
4471
|
+
(!He(s, i) || !!this._responsiveListeners !== t.responsive) && (this.unbindEvents(), this.bindEvents());
|
|
4488
4472
|
}
|
|
4489
4473
|
_updateHiddenIndices() {
|
|
4490
4474
|
const { _hiddenIndices: t } = this, s = this._getUniformDataChanges() || [];
|
|
4491
4475
|
for (const { method: i, start: n, count: o } of s) {
|
|
4492
4476
|
const r = i === "_removeElements" ? -o : o;
|
|
4493
|
-
|
|
4477
|
+
sr(t, n, r);
|
|
4494
4478
|
}
|
|
4495
4479
|
}
|
|
4496
4480
|
_getUniformDataChanges() {
|
|
@@ -4500,7 +4484,7 @@ let oe = class {
|
|
|
4500
4484
|
this._dataChanges = [];
|
|
4501
4485
|
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
4486
|
for (let o = 1; o < s; o++)
|
|
4503
|
-
if (!
|
|
4487
|
+
if (!He(n, i(o)))
|
|
4504
4488
|
return;
|
|
4505
4489
|
return Array.from(n).map((o) => o.split(",")).map((o) => ({
|
|
4506
4490
|
method: o[1],
|
|
@@ -4529,7 +4513,7 @@ let oe = class {
|
|
|
4529
4513
|
for (let s = 0, i = this.data.datasets.length; s < i; ++s)
|
|
4530
4514
|
this.getDatasetMeta(s).controller.configure();
|
|
4531
4515
|
for (let s = 0, i = this.data.datasets.length; s < i; ++s)
|
|
4532
|
-
this._updateDataset(s,
|
|
4516
|
+
this._updateDataset(s, st(t) ? t({
|
|
4533
4517
|
datasetIndex: s
|
|
4534
4518
|
}) : t);
|
|
4535
4519
|
this.notifyPlugins("afterDatasetsUpdate", {
|
|
@@ -4549,7 +4533,7 @@ let oe = class {
|
|
|
4549
4533
|
render() {
|
|
4550
4534
|
this.notifyPlugins("beforeRender", {
|
|
4551
4535
|
cancelable: !0
|
|
4552
|
-
}) !== !1 && (Z.has(this) ? this.attached && !Z.running(this) && Z.start(this) : (this.draw(),
|
|
4536
|
+
}) !== !1 && (Z.has(this) ? this.attached && !Z.running(this) && Z.start(this) : (this.draw(), ks({
|
|
4553
4537
|
chart: this
|
|
4554
4538
|
})));
|
|
4555
4539
|
}
|
|
@@ -4597,14 +4581,14 @@ let oe = class {
|
|
|
4597
4581
|
meta: t,
|
|
4598
4582
|
index: t.index,
|
|
4599
4583
|
cancelable: !0
|
|
4600
|
-
}, n =
|
|
4584
|
+
}, n = En(this, t);
|
|
4601
4585
|
this.notifyPlugins("beforeDatasetDraw", i) !== !1 && (n && Ws(s, n), t.controller.draw(), n && Vs(s), i.cancelable = !1, this.notifyPlugins("afterDatasetDraw", i));
|
|
4602
4586
|
}
|
|
4603
4587
|
isPointInArea(t) {
|
|
4604
4588
|
return Hs(t, this.chartArea, this._minPadding);
|
|
4605
4589
|
}
|
|
4606
4590
|
getElementsAtEventForMode(t, s, i, n) {
|
|
4607
|
-
const o =
|
|
4591
|
+
const o = Jn.modes[s];
|
|
4608
4592
|
return typeof o == "function" ? o(this, t, i, n) : [];
|
|
4609
4593
|
}
|
|
4610
4594
|
getDatasetMeta(t) {
|
|
@@ -4626,7 +4610,7 @@ let oe = class {
|
|
|
4626
4610
|
}, i.push(n)), n;
|
|
4627
4611
|
}
|
|
4628
4612
|
getContext() {
|
|
4629
|
-
return this.$context || (this.$context =
|
|
4613
|
+
return this.$context || (this.$context = Tt(null, {
|
|
4630
4614
|
chart: this,
|
|
4631
4615
|
type: "chart"
|
|
4632
4616
|
}));
|
|
@@ -4675,7 +4659,7 @@ let oe = class {
|
|
|
4675
4659
|
destroy() {
|
|
4676
4660
|
this.notifyPlugins("beforeDestroy");
|
|
4677
4661
|
const { canvas: t, ctx: s } = this;
|
|
4678
|
-
this._stop(), this.config.clearCache(), t && (this.unbindEvents(),
|
|
4662
|
+
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
4663
|
}
|
|
4680
4664
|
toBase64Image(...t) {
|
|
4681
4665
|
return this.canvas.toDataURL(...t);
|
|
@@ -4738,7 +4722,7 @@ let oe = class {
|
|
|
4738
4722
|
index: r
|
|
4739
4723
|
};
|
|
4740
4724
|
});
|
|
4741
|
-
!
|
|
4725
|
+
!je(i, s) && (this._active = i, this._lastEvent = null, this._updateHoverStyles(i, s));
|
|
4742
4726
|
}
|
|
4743
4727
|
notifyPlugins(t, s, i) {
|
|
4744
4728
|
return this._plugins.notify(this, t, s, i);
|
|
@@ -4763,7 +4747,7 @@ let oe = class {
|
|
|
4763
4747
|
return i.cancelable = !1, this.notifyPlugins("afterEvent", i, n), (o || i.changed) && this.render(), this;
|
|
4764
4748
|
}
|
|
4765
4749
|
_handleEvent(t, s, i) {
|
|
4766
|
-
const { _active: n = [], options: o } = this, r = s, a = this._getActiveElements(t, n, i, r), c =
|
|
4750
|
+
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
4751
|
i && (this._lastEvent = null, E(o.onHover, [
|
|
4768
4752
|
t,
|
|
4769
4753
|
a,
|
|
@@ -4773,7 +4757,7 @@ let oe = class {
|
|
|
4773
4757
|
a,
|
|
4774
4758
|
this
|
|
4775
4759
|
], this));
|
|
4776
|
-
const h = !
|
|
4760
|
+
const h = !je(a, n);
|
|
4777
4761
|
return (h || s) && (this._active = a, this._updateHoverStyles(a, n, s)), this._lastEvent = l, h;
|
|
4778
4762
|
}
|
|
4779
4763
|
_getActiveElements(t, s, i, n) {
|
|
@@ -4785,10 +4769,10 @@ let oe = class {
|
|
|
4785
4769
|
return this.getElementsAtEventForMode(t, o.mode, o, n);
|
|
4786
4770
|
}
|
|
4787
4771
|
};
|
|
4788
|
-
function
|
|
4772
|
+
function Os() {
|
|
4789
4773
|
return j(oe.instances, (e) => e._plugins.invalidate());
|
|
4790
4774
|
}
|
|
4791
|
-
function
|
|
4775
|
+
function nr(e, t, s) {
|
|
4792
4776
|
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
4777
|
if (e.beginPath(), e.arc(n, o, r - l / 2, i + d / 2, s - d / 2), a > 0) {
|
|
4794
4778
|
const f = Math.min(l / a, q(i - s));
|
|
@@ -4804,12 +4788,12 @@ function or(e, t, s) {
|
|
|
4804
4788
|
}
|
|
4805
4789
|
e.closePath(), e.moveTo(0, 0), e.rect(0, 0, e.canvas.width, e.canvas.height), e.clip("evenodd");
|
|
4806
4790
|
}
|
|
4807
|
-
function
|
|
4791
|
+
function or(e, t, s) {
|
|
4808
4792
|
const { startAngle: i, pixelMargin: n, x: o, y: r, outerRadius: a, innerRadius: c } = t;
|
|
4809
4793
|
let l = n / a;
|
|
4810
4794
|
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
4795
|
}
|
|
4812
|
-
function
|
|
4796
|
+
function rr(e) {
|
|
4813
4797
|
return Ns(e, [
|
|
4814
4798
|
"outerStart",
|
|
4815
4799
|
"outerEnd",
|
|
@@ -4817,8 +4801,8 @@ function ar(e) {
|
|
|
4817
4801
|
"innerEnd"
|
|
4818
4802
|
]);
|
|
4819
4803
|
}
|
|
4820
|
-
function
|
|
4821
|
-
const n =
|
|
4804
|
+
function ar(e, t, s, i) {
|
|
4805
|
+
const n = rr(e.options.borderRadius), o = (s - t) / 2, r = Math.min(o, i * t / 2), a = (c) => {
|
|
4822
4806
|
const l = (s - Math.min(o, c)) * i / 2;
|
|
4823
4807
|
return J(c, 0, Math.min(o, l));
|
|
4824
4808
|
};
|
|
@@ -4829,7 +4813,7 @@ function cr(e, t, s, i) {
|
|
|
4829
4813
|
innerEnd: J(n.innerEnd, 0, r)
|
|
4830
4814
|
};
|
|
4831
4815
|
}
|
|
4832
|
-
function
|
|
4816
|
+
function ut(e, t, s, i) {
|
|
4833
4817
|
return {
|
|
4834
4818
|
x: s + e * Math.cos(t),
|
|
4835
4819
|
y: i + e * Math.sin(t)
|
|
@@ -4843,26 +4827,26 @@ function se(e, t, s, i, n, o) {
|
|
|
4843
4827
|
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
4828
|
u = (g - X) / 2;
|
|
4845
4829
|
}
|
|
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 } =
|
|
4830
|
+
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
4831
|
if (e.beginPath(), o) {
|
|
4848
4832
|
const M = (I + k) / 2;
|
|
4849
4833
|
if (e.arc(r, a, d, I, M), e.arc(r, a, d, M, k), v > 0) {
|
|
4850
|
-
const F =
|
|
4834
|
+
const F = ut(L, k, r, a);
|
|
4851
4835
|
e.arc(F.x, F.y, v, k, _ + $);
|
|
4852
4836
|
}
|
|
4853
|
-
const S =
|
|
4837
|
+
const S = ut(P, _, r, a);
|
|
4854
4838
|
if (e.lineTo(S.x, S.y), O > 0) {
|
|
4855
|
-
const F =
|
|
4839
|
+
const F = ut(P, Y, r, a);
|
|
4856
4840
|
e.arc(F.x, F.y, O, _ + $, Y + Math.PI);
|
|
4857
4841
|
}
|
|
4858
4842
|
const C = (_ - O / f + (p + y / f)) / 2;
|
|
4859
4843
|
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 =
|
|
4844
|
+
const F = ut(H, V, r, a);
|
|
4861
4845
|
e.arc(F.x, F.y, y, V + Math.PI, p - $);
|
|
4862
4846
|
}
|
|
4863
|
-
const X =
|
|
4847
|
+
const X = ut(D, p, r, a);
|
|
4864
4848
|
if (e.lineTo(X.x, X.y), x > 0) {
|
|
4865
|
-
const F =
|
|
4849
|
+
const F = ut(D, I, r, a);
|
|
4866
4850
|
e.arc(F.x, F.y, x, p - $, I);
|
|
4867
4851
|
}
|
|
4868
4852
|
} else {
|
|
@@ -4874,7 +4858,7 @@ function se(e, t, s, i, n, o) {
|
|
|
4874
4858
|
}
|
|
4875
4859
|
e.closePath();
|
|
4876
4860
|
}
|
|
4877
|
-
function
|
|
4861
|
+
function cr(e, t, s, i, n) {
|
|
4878
4862
|
const { fullCircles: o, startAngle: r, circumference: a } = t;
|
|
4879
4863
|
let c = t.endAngle;
|
|
4880
4864
|
if (o) {
|
|
@@ -4885,7 +4869,7 @@ function lr(e, t, s, i, n) {
|
|
|
4885
4869
|
}
|
|
4886
4870
|
return se(e, t, s, i, c, n), e.fill(), c;
|
|
4887
4871
|
}
|
|
4888
|
-
function
|
|
4872
|
+
function lr(e, t, s, i, n) {
|
|
4889
4873
|
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
4874
|
if (!l)
|
|
4891
4875
|
return;
|
|
@@ -4897,9 +4881,9 @@ function hr(e, t, s, i, n) {
|
|
|
4897
4881
|
e.stroke();
|
|
4898
4882
|
isNaN(a) || (m = r + (a % T || T));
|
|
4899
4883
|
}
|
|
4900
|
-
g &&
|
|
4884
|
+
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
4885
|
}
|
|
4902
|
-
class
|
|
4886
|
+
class hr extends Ee {
|
|
4903
4887
|
static id = "arc";
|
|
4904
4888
|
static defaults = {
|
|
4905
4889
|
borderAlign: "center",
|
|
@@ -4945,7 +4929,7 @@ class dr extends Pe {
|
|
|
4945
4929
|
"innerRadius",
|
|
4946
4930
|
"outerRadius",
|
|
4947
4931
|
"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 =
|
|
4932
|
+
], 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
4933
|
return m && b;
|
|
4950
4934
|
}
|
|
4951
4935
|
getCenterPoint(t) {
|
|
@@ -4973,22 +4957,21 @@ class dr extends Pe {
|
|
|
4973
4957
|
const a = (this.startAngle + this.endAngle) / 2;
|
|
4974
4958
|
t.translate(Math.cos(a) * n, Math.sin(a) * n);
|
|
4975
4959
|
const c = 1 - Math.sin(Math.min(z, i || 0)), l = n * c;
|
|
4976
|
-
t.fillStyle = s.backgroundColor, t.strokeStyle = s.borderColor,
|
|
4960
|
+
t.fillStyle = s.backgroundColor, t.strokeStyle = s.borderColor, cr(t, this, l, o, r), lr(t, this, l, o, r), t.restore();
|
|
4977
4961
|
}
|
|
4978
4962
|
}
|
|
4979
4963
|
const oi = "label";
|
|
4980
|
-
function
|
|
4964
|
+
function Ds(e, t) {
|
|
4981
4965
|
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
4982
4966
|
}
|
|
4983
|
-
function
|
|
4967
|
+
function dr(e, t) {
|
|
4984
4968
|
const s = e.options;
|
|
4985
4969
|
s && t && Object.assign(s, t);
|
|
4986
4970
|
}
|
|
4987
4971
|
function ri(e, t) {
|
|
4988
4972
|
e.labels = t;
|
|
4989
4973
|
}
|
|
4990
|
-
function ai(e, t) {
|
|
4991
|
-
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : oi;
|
|
4974
|
+
function ai(e, t, s = oi) {
|
|
4992
4975
|
const i = [];
|
|
4993
4976
|
e.datasets = t.map((n) => {
|
|
4994
4977
|
const o = e.datasets.find((r) => r[s] === n[s]);
|
|
@@ -4997,43 +4980,42 @@ function ai(e, t) {
|
|
|
4997
4980
|
} : (i.push(o), Object.assign(o, n), o);
|
|
4998
4981
|
});
|
|
4999
4982
|
}
|
|
5000
|
-
function
|
|
5001
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : oi;
|
|
4983
|
+
function fr(e, t = oi) {
|
|
5002
4984
|
const s = {
|
|
5003
4985
|
labels: [],
|
|
5004
4986
|
datasets: []
|
|
5005
4987
|
};
|
|
5006
4988
|
return ri(s, e.labels), ai(s, e.datasets, t), s;
|
|
5007
4989
|
}
|
|
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 =
|
|
4990
|
+
function ur(e, t) {
|
|
4991
|
+
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
4992
|
u.current && (g.current = new oe(u.current, {
|
|
5011
4993
|
type: r,
|
|
5012
|
-
data:
|
|
4994
|
+
data: fr(a, o),
|
|
5013
4995
|
options: c && {
|
|
5014
4996
|
...c
|
|
5015
4997
|
},
|
|
5016
4998
|
plugins: l
|
|
5017
|
-
}),
|
|
4999
|
+
}), Ds(t, g.current));
|
|
5018
5000
|
}, b = () => {
|
|
5019
|
-
|
|
5001
|
+
Ds(t, null), g.current && (g.current.destroy(), g.current = null);
|
|
5020
5002
|
};
|
|
5021
|
-
return
|
|
5022
|
-
!n && g.current && c &&
|
|
5003
|
+
return dt(() => {
|
|
5004
|
+
!n && g.current && c && dr(g.current, c);
|
|
5023
5005
|
}, [
|
|
5024
5006
|
n,
|
|
5025
5007
|
c
|
|
5026
|
-
]),
|
|
5008
|
+
]), dt(() => {
|
|
5027
5009
|
!n && g.current && ri(g.current.config.data, a.labels);
|
|
5028
5010
|
}, [
|
|
5029
5011
|
n,
|
|
5030
5012
|
a.labels
|
|
5031
|
-
]),
|
|
5013
|
+
]), dt(() => {
|
|
5032
5014
|
!n && g.current && a.datasets && ai(g.current.config.data, a.datasets, o);
|
|
5033
5015
|
}, [
|
|
5034
5016
|
n,
|
|
5035
5017
|
a.datasets
|
|
5036
|
-
]),
|
|
5018
|
+
]), dt(() => {
|
|
5037
5019
|
g.current && (n ? (b(), setTimeout(m)) : g.current.update(d));
|
|
5038
5020
|
}, [
|
|
5039
5021
|
n,
|
|
@@ -5041,29 +5023,30 @@ function gr(e, t) {
|
|
|
5041
5023
|
a.labels,
|
|
5042
5024
|
a.datasets,
|
|
5043
5025
|
d
|
|
5044
|
-
]),
|
|
5026
|
+
]), dt(() => {
|
|
5045
5027
|
g.current && (b(), setTimeout(m));
|
|
5046
5028
|
}, [
|
|
5047
5029
|
r
|
|
5048
|
-
]),
|
|
5030
|
+
]), dt(() => (m(), () => b()), []), /* @__PURE__ */ ve("canvas", {
|
|
5049
5031
|
ref: u,
|
|
5050
5032
|
role: "img",
|
|
5051
5033
|
height: s,
|
|
5052
5034
|
width: i,
|
|
5053
|
-
...f
|
|
5054
|
-
|
|
5035
|
+
...f,
|
|
5036
|
+
children: h
|
|
5037
|
+
});
|
|
5055
5038
|
}
|
|
5056
|
-
const
|
|
5057
|
-
function
|
|
5058
|
-
return oe.register(t), /* @__PURE__ */ Cs((s, i) => /* @__PURE__ */
|
|
5039
|
+
const gr = /* @__PURE__ */ Cs(ur);
|
|
5040
|
+
function pr(e, t) {
|
|
5041
|
+
return oe.register(t), /* @__PURE__ */ Cs((s, i) => /* @__PURE__ */ ve(gr, {
|
|
5059
5042
|
...s,
|
|
5060
5043
|
ref: i,
|
|
5061
5044
|
type: e
|
|
5062
5045
|
}));
|
|
5063
5046
|
}
|
|
5064
|
-
const
|
|
5065
|
-
oe.register(
|
|
5066
|
-
const
|
|
5047
|
+
const mr = /* @__PURE__ */ pr("doughnut", Un);
|
|
5048
|
+
oe.register(hr);
|
|
5049
|
+
const yr = ({
|
|
5067
5050
|
values: e,
|
|
5068
5051
|
colors: t = ["#525252", "#00D492"],
|
|
5069
5052
|
borderColors: s = ["#FFFFFF", "#FFFFFF"],
|
|
@@ -5131,8 +5114,8 @@ const vr = ({
|
|
|
5131
5114
|
a,
|
|
5132
5115
|
d
|
|
5133
5116
|
]);
|
|
5134
|
-
return /* @__PURE__ */
|
|
5117
|
+
return /* @__PURE__ */ ve(mr, { data: g, options: m, plugins: b, redraw: u });
|
|
5135
5118
|
};
|
|
5136
5119
|
export {
|
|
5137
|
-
|
|
5120
|
+
yr as PieChart
|
|
5138
5121
|
};
|