genus-ui 1.49.4 → 1.50.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +336 -332
- package/dist/index.umd.js +4 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2,7 +2,7 @@ var Aa = Object.defineProperty;
|
|
|
2
2
|
var Ta = (i, t, e) => t in i ? Aa(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
3
|
var v = (i, t, e) => (Ta(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
4
|
import { css as D, LitElement as Q, html as z } from "lit";
|
|
5
|
-
import { property as k, state as at, customElement as J, queryAssignedElements as
|
|
5
|
+
import { property as k, state as at, customElement as J, queryAssignedElements as po, query as go } from "lit/decorators.js";
|
|
6
6
|
const Da = D`
|
|
7
7
|
* { box-sizing: border-box; }
|
|
8
8
|
`, za = D`
|
|
@@ -108,6 +108,10 @@ const Oa = D`
|
|
|
108
108
|
background: var(--input-background-color, #f2f7f9);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
input[type='text'].input-control--without-icon,
|
|
112
|
+
input[type='email'].input-control--without-icon,
|
|
113
|
+
input[type='password'].input-control--without-icon { border-right: var(--input-border); }
|
|
114
|
+
|
|
111
115
|
input[type='text']:focus,
|
|
112
116
|
input[type='email']:focus,
|
|
113
117
|
input[type='password']:focus,
|
|
@@ -722,7 +726,7 @@ let Vt = class extends Q {
|
|
|
722
726
|
};
|
|
723
727
|
Vt.styles = [Ga, Xa, Ka, Qa, Ja, qa];
|
|
724
728
|
$e([
|
|
725
|
-
|
|
729
|
+
po()
|
|
726
730
|
], Vt.prototype, "_tabContents", 2);
|
|
727
731
|
$e([
|
|
728
732
|
at()
|
|
@@ -886,7 +890,7 @@ let kt = class extends Q {
|
|
|
886
890
|
};
|
|
887
891
|
kt.styles = [mo, bo, sr, xo];
|
|
888
892
|
Me([
|
|
889
|
-
|
|
893
|
+
po()
|
|
890
894
|
], kt.prototype, "_stepContents", 2);
|
|
891
895
|
Me([
|
|
892
896
|
k({ attribute: "current-step", type: Number })
|
|
@@ -1035,10 +1039,10 @@ const Bf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1035
1039
|
column-gap: 0.6rem;
|
|
1036
1040
|
}
|
|
1037
1041
|
`, Ws = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNSAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxjaXJjbGUgY3g9IjcuNSIgY3k9IjcuNSIgcj0iNyIgZmlsbD0iI0ZERkRGRCIgc3Ryb2tlPSIjQjlCREJBIi8+DQo8L3N2Zz4NCg==", Hs = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIGNsYXNzPSJyYWRpby1pY29uLXN2ZyBjaGVja2VkLXN2ZyIgdmlld0JveD0iMCAwIDE1IDE1IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KICAgIDxzdHlsZT4NCiAgICAgICAgLnJhZGlvLWljb24tc3ZnIGNpcmNsZSB7IGZpbGw6ICNmZGM1NGE7IH0NCiAgICAgICAgLmNoZWNrZWQtc3ZnIHBhdGggeyBzdHJva2U6ICMzYzQ5OWU7IH0NCiAgICA8L3N0eWxlPg0KDQogICAgPGNpcmNsZSBjeD0iNy41IiBjeT0iNy41IiByPSI3LjUiLz4NCiAgICA8cGF0aCBkPSJNNSA4LjAwNUw2Ljg5MiA5Ljg5OEwxMC43OSA2IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4NCjwvc3ZnPg0K";
|
|
1038
|
-
var
|
|
1039
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
1042
|
+
var pr = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, ne = (i, t, e, s) => {
|
|
1043
|
+
for (var n = s > 1 ? void 0 : s ? gr(t, e) : t, o = i.length - 1, a; o >= 0; o--)
|
|
1040
1044
|
(a = i[o]) && (n = (s ? a(t, e, n) : a(n)) || n);
|
|
1041
|
-
return s && n &&
|
|
1045
|
+
return s && n && pr(t, e, n), n;
|
|
1042
1046
|
};
|
|
1043
1047
|
let Lt = class extends Q {
|
|
1044
1048
|
constructor() {
|
|
@@ -1330,7 +1334,7 @@ var Ir = Object.defineProperty, Ar = Object.getOwnPropertyDescriptor, Ms = (i, t
|
|
|
1330
1334
|
(a = i[o]) && (n = (s ? a(t, e, n) : a(n)) || n);
|
|
1331
1335
|
return s && n && Ir(t, e, n), n;
|
|
1332
1336
|
};
|
|
1333
|
-
let
|
|
1337
|
+
let pe = class extends Q {
|
|
1334
1338
|
constructor() {
|
|
1335
1339
|
super(...arguments), this.optionValue = "", this.optionID = "";
|
|
1336
1340
|
}
|
|
@@ -1345,16 +1349,16 @@ let ge = class extends Q {
|
|
|
1345
1349
|
`;
|
|
1346
1350
|
}
|
|
1347
1351
|
};
|
|
1348
|
-
|
|
1352
|
+
pe.styles = [yo, vr, Mo];
|
|
1349
1353
|
Ms([
|
|
1350
1354
|
k({ attribute: "option-value" })
|
|
1351
|
-
],
|
|
1355
|
+
], pe.prototype, "optionValue", 2);
|
|
1352
1356
|
Ms([
|
|
1353
1357
|
k({ attribute: "option-id" })
|
|
1354
|
-
],
|
|
1355
|
-
|
|
1358
|
+
], pe.prototype, "optionID", 2);
|
|
1359
|
+
pe = Ms([
|
|
1356
1360
|
J("genus-checkbox-option")
|
|
1357
|
-
],
|
|
1361
|
+
], pe);
|
|
1358
1362
|
const Tr = D`
|
|
1359
1363
|
.options-container
|
|
1360
1364
|
{
|
|
@@ -1415,7 +1419,7 @@ const Wf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1415
1419
|
return Ze;
|
|
1416
1420
|
},
|
|
1417
1421
|
get GenusCheckBoxOption() {
|
|
1418
|
-
return
|
|
1422
|
+
return pe;
|
|
1419
1423
|
}
|
|
1420
1424
|
}, Symbol.toStringTag, { value: "Module" })), Nr = D`
|
|
1421
1425
|
.label-text
|
|
@@ -1479,7 +1483,7 @@ var Vr = Object.defineProperty, Rr = Object.getOwnPropertyDescriptor, Pi = (i, t
|
|
|
1479
1483
|
(a = i[o]) && (n = (s ? a(t, e, n) : a(n)) || n);
|
|
1480
1484
|
return s && n && Vr(t, e, n), n;
|
|
1481
1485
|
};
|
|
1482
|
-
let
|
|
1486
|
+
let ge = class extends Q {
|
|
1483
1487
|
constructor() {
|
|
1484
1488
|
super(...arguments), this.labelText = "", this.inputValue = "", this.withoutIcon = !1, this.getInputValue = () => {
|
|
1485
1489
|
this.dispatchEvent(new CustomEvent("checked", { detail: this.inputValue }));
|
|
@@ -1501,19 +1505,19 @@ let pe = class extends Q {
|
|
|
1501
1505
|
`;
|
|
1502
1506
|
}
|
|
1503
1507
|
};
|
|
1504
|
-
|
|
1508
|
+
ge.styles = [jr, Nr, Sr, Cr, Or];
|
|
1505
1509
|
Pi([
|
|
1506
1510
|
k({ attribute: "label-text" })
|
|
1507
|
-
],
|
|
1511
|
+
], ge.prototype, "labelText", 2);
|
|
1508
1512
|
Pi([
|
|
1509
1513
|
k({ attribute: "input-value" })
|
|
1510
|
-
],
|
|
1514
|
+
], ge.prototype, "inputValue", 2);
|
|
1511
1515
|
Pi([
|
|
1512
1516
|
k({ type: Boolean, attribute: "without-icon" })
|
|
1513
|
-
],
|
|
1514
|
-
|
|
1517
|
+
], ge.prototype, "withoutIcon", 2);
|
|
1518
|
+
ge = Pi([
|
|
1515
1519
|
J("genus-checkbox")
|
|
1516
|
-
],
|
|
1520
|
+
], ge);
|
|
1517
1521
|
const Br = D`
|
|
1518
1522
|
input[type='text']
|
|
1519
1523
|
{
|
|
@@ -1687,7 +1691,7 @@ var Yr = Object.defineProperty, Gr = Object.getOwnPropertyDescriptor, Ht = (i, t
|
|
|
1687
1691
|
(a = i[o]) && (n = (s ? a(t, e, n) : a(n)) || n);
|
|
1688
1692
|
return s && n && Yr(t, e, n), n;
|
|
1689
1693
|
};
|
|
1690
|
-
let
|
|
1694
|
+
let pt = class extends Q {
|
|
1691
1695
|
constructor() {
|
|
1692
1696
|
super(...arguments), this.labelText = "", this.inputValue = "", this.placeholderText = "", this.withoutLabel = !1, this.displayPosition = "bottom", this.options = "", this.selectOption = (i) => {
|
|
1693
1697
|
let t = i.target.getAttribute("option-value");
|
|
@@ -1726,31 +1730,31 @@ let gt = class extends Q {
|
|
|
1726
1730
|
return this.renderDropDownControl();
|
|
1727
1731
|
}
|
|
1728
1732
|
};
|
|
1729
|
-
|
|
1733
|
+
pt.styles = [Br, Wr, Hr, vo, Zr, Io, Fr, Ur];
|
|
1730
1734
|
Ht([
|
|
1731
1735
|
k({ attribute: "label-text" })
|
|
1732
|
-
],
|
|
1736
|
+
], pt.prototype, "labelText", 2);
|
|
1733
1737
|
Ht([
|
|
1734
1738
|
k({ attribute: "input-value" })
|
|
1735
|
-
],
|
|
1739
|
+
], pt.prototype, "inputValue", 2);
|
|
1736
1740
|
Ht([
|
|
1737
1741
|
k({ attribute: "placeholder-text" })
|
|
1738
|
-
],
|
|
1742
|
+
], pt.prototype, "placeholderText", 2);
|
|
1739
1743
|
Ht([
|
|
1740
1744
|
k({ attribute: "without-label", type: Boolean })
|
|
1741
|
-
],
|
|
1745
|
+
], pt.prototype, "withoutLabel", 2);
|
|
1742
1746
|
Ht([
|
|
1743
1747
|
k({ attribute: "display-position" })
|
|
1744
|
-
],
|
|
1748
|
+
], pt.prototype, "displayPosition", 2);
|
|
1745
1749
|
Ht([
|
|
1746
1750
|
k()
|
|
1747
|
-
],
|
|
1751
|
+
], pt.prototype, "options", 2);
|
|
1748
1752
|
Ht([
|
|
1749
1753
|
at()
|
|
1750
|
-
],
|
|
1751
|
-
|
|
1754
|
+
], pt.prototype, "_showOptionsCSS", 2);
|
|
1755
|
+
pt = Ht([
|
|
1752
1756
|
J("genus-dropdown")
|
|
1753
|
-
],
|
|
1757
|
+
], pt);
|
|
1754
1758
|
var Kr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, Ao = (i, t, e, s) => {
|
|
1755
1759
|
for (var n = s > 1 ? void 0 : s ? Xr(t, e) : t, o = i.length - 1, a; o >= 0; o--)
|
|
1756
1760
|
(a = i[o]) && (n = (s ? a(t, e, n) : a(n)) || n);
|
|
@@ -1778,7 +1782,7 @@ Fe = Ao([
|
|
|
1778
1782
|
const Hf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1779
1783
|
__proto__: null,
|
|
1780
1784
|
get GenusDropDown() {
|
|
1781
|
-
return
|
|
1785
|
+
return pt;
|
|
1782
1786
|
},
|
|
1783
1787
|
get GenusDropDownOption() {
|
|
1784
1788
|
return Fe;
|
|
@@ -2117,7 +2121,7 @@ function fl() {
|
|
|
2117
2121
|
return i;
|
|
2118
2122
|
}
|
|
2119
2123
|
let oi;
|
|
2120
|
-
function
|
|
2124
|
+
function pl(i) {
|
|
2121
2125
|
oi || (oi = fl(), oi.transparent = [0, 0, 0, 0]);
|
|
2122
2126
|
const t = oi[i.toLowerCase()];
|
|
2123
2127
|
return t && {
|
|
@@ -2127,9 +2131,9 @@ function gl(i) {
|
|
|
2127
2131
|
a: t.length === 4 ? t[3] : 255
|
|
2128
2132
|
};
|
|
2129
2133
|
}
|
|
2130
|
-
const
|
|
2134
|
+
const gl = /^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;
|
|
2131
2135
|
function ml(i) {
|
|
2132
|
-
const t =
|
|
2136
|
+
const t = gl.exec(i);
|
|
2133
2137
|
let e = 255, s, n, o;
|
|
2134
2138
|
if (t) {
|
|
2135
2139
|
if (t[7] !== s) {
|
|
@@ -2179,7 +2183,7 @@ class Ue {
|
|
|
2179
2183
|
return t;
|
|
2180
2184
|
const e = typeof t;
|
|
2181
2185
|
let s;
|
|
2182
|
-
e === "object" ? s = Gs(t) : e === "string" && (s = el(t) ||
|
|
2186
|
+
e === "object" ? s = Gs(t) : e === "string" && (s = el(t) || pl(t) || yl(t)), this._rgb = s, this._valid = !!s;
|
|
2183
2187
|
}
|
|
2184
2188
|
get valid() {
|
|
2185
2189
|
return this._valid;
|
|
@@ -2982,45 +2986,45 @@ function as(i, t, e, s) {
|
|
|
2982
2986
|
}
|
|
2983
2987
|
function Bo(i, t, e, s, n) {
|
|
2984
2988
|
let o, a, r, l, c, h, d, u;
|
|
2985
|
-
const f = t.pointStyle,
|
|
2986
|
-
let m = (
|
|
2989
|
+
const f = t.pointStyle, p = t.rotation, g = t.radius;
|
|
2990
|
+
let m = (p || 0) * kl;
|
|
2987
2991
|
if (f && typeof f == "object" && (o = f.toString(), o === "[object HTMLImageElement]" || o === "[object HTMLCanvasElement]")) {
|
|
2988
2992
|
i.save(), i.translate(e, s), i.rotate(m), i.drawImage(f, -f.width / 2, -f.height / 2, f.width, f.height), i.restore();
|
|
2989
2993
|
return;
|
|
2990
2994
|
}
|
|
2991
|
-
if (!(isNaN(
|
|
2995
|
+
if (!(isNaN(g) || g <= 0)) {
|
|
2992
2996
|
switch (i.beginPath(), f) {
|
|
2993
2997
|
default:
|
|
2994
|
-
n ? i.ellipse(e, s, n / 2,
|
|
2998
|
+
n ? i.ellipse(e, s, n / 2, g, 0, 0, W) : i.arc(e, s, g, 0, W), i.closePath();
|
|
2995
2999
|
break;
|
|
2996
3000
|
case "triangle":
|
|
2997
|
-
h = n ? n / 2 :
|
|
3001
|
+
h = n ? n / 2 : g, i.moveTo(e + Math.sin(m) * h, s - Math.cos(m) * g), m += Qs, i.lineTo(e + Math.sin(m) * h, s - Math.cos(m) * g), m += Qs, i.lineTo(e + Math.sin(m) * h, s - Math.cos(m) * g), i.closePath();
|
|
2998
3002
|
break;
|
|
2999
3003
|
case "rectRounded":
|
|
3000
|
-
c =
|
|
3004
|
+
c = g * 0.516, l = g - c, a = Math.cos(m + Ut) * l, d = Math.cos(m + Ut) * (n ? n / 2 - c : l), r = Math.sin(m + Ut) * l, u = Math.sin(m + Ut) * (n ? n / 2 - c : l), i.arc(e - d, s - r, c, m - H, m - K), i.arc(e + u, s - a, c, m - K, m), i.arc(e + d, s + r, c, m, m + K), i.arc(e - u, s + a, c, m + K, m + H), i.closePath();
|
|
3001
3005
|
break;
|
|
3002
3006
|
case "rect":
|
|
3003
|
-
if (!
|
|
3004
|
-
l = Math.SQRT1_2 *
|
|
3007
|
+
if (!p) {
|
|
3008
|
+
l = Math.SQRT1_2 * g, h = n ? n / 2 : l, i.rect(e - h, s - l, 2 * h, 2 * l);
|
|
3005
3009
|
break;
|
|
3006
3010
|
}
|
|
3007
3011
|
m += Ut;
|
|
3008
3012
|
case "rectRot":
|
|
3009
|
-
d = Math.cos(m) * (n ? n / 2 :
|
|
3013
|
+
d = Math.cos(m) * (n ? n / 2 : g), a = Math.cos(m) * g, r = Math.sin(m) * g, u = Math.sin(m) * (n ? n / 2 : g), i.moveTo(e - d, s - r), i.lineTo(e + u, s - a), i.lineTo(e + d, s + r), i.lineTo(e - u, s + a), i.closePath();
|
|
3010
3014
|
break;
|
|
3011
3015
|
case "crossRot":
|
|
3012
3016
|
m += Ut;
|
|
3013
3017
|
case "cross":
|
|
3014
|
-
d = Math.cos(m) * (n ? n / 2 :
|
|
3018
|
+
d = Math.cos(m) * (n ? n / 2 : g), a = Math.cos(m) * g, r = Math.sin(m) * g, u = Math.sin(m) * (n ? n / 2 : g), i.moveTo(e - d, s - r), i.lineTo(e + d, s + r), i.moveTo(e + u, s - a), i.lineTo(e - u, s + a);
|
|
3015
3019
|
break;
|
|
3016
3020
|
case "star":
|
|
3017
|
-
d = Math.cos(m) * (n ? n / 2 :
|
|
3021
|
+
d = Math.cos(m) * (n ? n / 2 : g), a = Math.cos(m) * g, r = Math.sin(m) * g, u = Math.sin(m) * (n ? n / 2 : g), i.moveTo(e - d, s - r), i.lineTo(e + d, s + r), i.moveTo(e + u, s - a), i.lineTo(e - u, s + a), m += Ut, d = Math.cos(m) * (n ? n / 2 : g), a = Math.cos(m) * g, r = Math.sin(m) * g, u = Math.sin(m) * (n ? n / 2 : g), i.moveTo(e - d, s - r), i.lineTo(e + d, s + r), i.moveTo(e + u, s - a), i.lineTo(e - u, s + a);
|
|
3018
3022
|
break;
|
|
3019
3023
|
case "line":
|
|
3020
|
-
a = n ? n / 2 : Math.cos(m) *
|
|
3024
|
+
a = n ? n / 2 : Math.cos(m) * g, r = Math.sin(m) * g, i.moveTo(e - a, s - r), i.lineTo(e + a, s + r);
|
|
3021
3025
|
break;
|
|
3022
3026
|
case "dash":
|
|
3023
|
-
i.moveTo(e, s), i.lineTo(e + Math.cos(m) * (n ? n / 2 :
|
|
3027
|
+
i.moveTo(e, s), i.lineTo(e + Math.cos(m) * (n ? n / 2 : g), s + Math.sin(m) * g);
|
|
3024
3028
|
break;
|
|
3025
3029
|
case !1:
|
|
3026
3030
|
i.closePath();
|
|
@@ -3398,7 +3402,7 @@ function Yo(i, t, e, s) {
|
|
|
3398
3402
|
return a;
|
|
3399
3403
|
}
|
|
3400
3404
|
const fc = Number.EPSILON || 1e-14, xe = (i, t) => t < i.length && !i[t].skip && i[t], Go = (i) => i === "x" ? "y" : "x";
|
|
3401
|
-
function
|
|
3405
|
+
function pc(i, t, e, s) {
|
|
3402
3406
|
const n = i.skip ? t : i, o = t, a = e.skip ? t : e, r = ns(o, n), l = ns(a, o);
|
|
3403
3407
|
let c = r / (r + l), h = l / (r + l);
|
|
3404
3408
|
c = isNaN(c) ? 0 : c, h = isNaN(h) ? 0 : h;
|
|
@@ -3414,7 +3418,7 @@ function gc(i, t, e, s) {
|
|
|
3414
3418
|
}
|
|
3415
3419
|
};
|
|
3416
3420
|
}
|
|
3417
|
-
function
|
|
3421
|
+
function gc(i, t, e) {
|
|
3418
3422
|
const s = i.length;
|
|
3419
3423
|
let n, o, a, r, l, c = xe(i, 0);
|
|
3420
3424
|
for (let h = 0; h < s - 1; ++h)
|
|
@@ -3447,7 +3451,7 @@ function bc(i, t = "x") {
|
|
|
3447
3451
|
}
|
|
3448
3452
|
o[a] = r ? c ? xt(n[a - 1]) !== xt(n[a]) ? 0 : (n[a - 1] + n[a]) / 2 : n[a - 1] : n[a];
|
|
3449
3453
|
}
|
|
3450
|
-
|
|
3454
|
+
gc(i, n, o), mc(i, o, t);
|
|
3451
3455
|
}
|
|
3452
3456
|
function li(i, t, e) {
|
|
3453
3457
|
return Math.max(Math.min(i, e), t);
|
|
@@ -3464,7 +3468,7 @@ function yc(i, t, e, s, n) {
|
|
|
3464
3468
|
else {
|
|
3465
3469
|
let c = s ? i[i.length - 1] : i[0];
|
|
3466
3470
|
for (o = 0, a = i.length; o < a; ++o)
|
|
3467
|
-
r = i[o], l =
|
|
3471
|
+
r = i[o], l = pc(c, r, i[Math.min(o + 1, a - (s ? 0 : 1)) % a], t.tension), r.cp1x = l.previous.x, r.cp1y = l.previous.y, r.cp2x = l.next.x, r.cp2y = l.next.y, c = r;
|
|
3468
3472
|
}
|
|
3469
3473
|
t.capBezierPoints && xc(i, e);
|
|
3470
3474
|
}
|
|
@@ -3518,10 +3522,10 @@ function Xt(i, t) {
|
|
|
3518
3522
|
if ("native" in i)
|
|
3519
3523
|
return i;
|
|
3520
3524
|
const { canvas: e, currentDevicePixelRatio: s } = t, n = Bi(e), o = n.boxSizing === "border-box", a = _t(n, "padding"), r = _t(n, "border", "width"), { x: l, y: c, box: h } = Ic(i, e), d = a.left + (h && r.left), u = a.top + (h && r.top);
|
|
3521
|
-
let { width: f, height:
|
|
3522
|
-
return o && (f -= a.width + r.width,
|
|
3525
|
+
let { width: f, height: p } = t;
|
|
3526
|
+
return o && (f -= a.width + r.width, p -= a.height + r.height), {
|
|
3523
3527
|
x: Math.round((l - d) / f * e.width / s),
|
|
3524
|
-
y: Math.round((c - u) /
|
|
3528
|
+
y: Math.round((c - u) / p * e.height / s)
|
|
3525
3529
|
};
|
|
3526
3530
|
}
|
|
3527
3531
|
function Ac(i, t, e) {
|
|
@@ -3688,24 +3692,24 @@ function qo(i, t, e) {
|
|
|
3688
3692
|
return [
|
|
3689
3693
|
i
|
|
3690
3694
|
];
|
|
3691
|
-
const { property: s, start: n, end: o } = e, a = t.length, { compare: r, between: l, normalize: c } = Jo(s), { start: h, end: d, loop: u, style: f } = Sc(i, t, e),
|
|
3692
|
-
let
|
|
3693
|
-
const M = () => l(n, w, b) && r(n, w) !== 0, y = () => r(o, b) === 0 || l(o, w, b), I = () =>
|
|
3695
|
+
const { property: s, start: n, end: o } = e, a = t.length, { compare: r, between: l, normalize: c } = Jo(s), { start: h, end: d, loop: u, style: f } = Sc(i, t, e), p = [];
|
|
3696
|
+
let g = !1, m = null, b, x, w;
|
|
3697
|
+
const M = () => l(n, w, b) && r(n, w) !== 0, y = () => r(o, b) === 0 || l(o, w, b), I = () => g || M(), A = () => !g || y();
|
|
3694
3698
|
for (let T = h, L = h; T <= d; ++T)
|
|
3695
|
-
x = t[T % a], !x.skip && (b = c(x[s]), b !== w && (
|
|
3699
|
+
x = t[T % a], !x.skip && (b = c(x[s]), b !== w && (g = l(b, n, o), m === null && I() && (m = r(b, n) === 0 ? T : L), m !== null && A() && (p.push(cn({
|
|
3696
3700
|
start: m,
|
|
3697
3701
|
end: T,
|
|
3698
3702
|
loop: u,
|
|
3699
3703
|
count: a,
|
|
3700
3704
|
style: f
|
|
3701
3705
|
})), m = null), L = T, w = b));
|
|
3702
|
-
return m !== null &&
|
|
3706
|
+
return m !== null && p.push(cn({
|
|
3703
3707
|
start: m,
|
|
3704
3708
|
end: d,
|
|
3705
3709
|
loop: u,
|
|
3706
3710
|
count: a,
|
|
3707
3711
|
style: f
|
|
3708
|
-
})),
|
|
3712
|
+
})), p;
|
|
3709
3713
|
}
|
|
3710
3714
|
function _o(i, t) {
|
|
3711
3715
|
const e = [], s = i.segments;
|
|
@@ -3768,36 +3772,36 @@ function hn(i, t, e, s) {
|
|
|
3768
3772
|
function Pc(i, t, e, s) {
|
|
3769
3773
|
const n = i._chart.getContext(), o = dn(i.options), { _datasetIndex: a, options: { spanGaps: r } } = i, l = e.length, c = [];
|
|
3770
3774
|
let h = o, d = t[0].start, u = d;
|
|
3771
|
-
function f(
|
|
3775
|
+
function f(p, g, m, b) {
|
|
3772
3776
|
const x = r ? -1 : 1;
|
|
3773
|
-
if (
|
|
3774
|
-
for (
|
|
3775
|
-
|
|
3776
|
-
for (; e[
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
start:
|
|
3780
|
-
end:
|
|
3777
|
+
if (p !== g) {
|
|
3778
|
+
for (p += l; e[p % l].skip; )
|
|
3779
|
+
p -= x;
|
|
3780
|
+
for (; e[g % l].skip; )
|
|
3781
|
+
g += x;
|
|
3782
|
+
p % l !== g % l && (c.push({
|
|
3783
|
+
start: p % l,
|
|
3784
|
+
end: g % l,
|
|
3781
3785
|
loop: m,
|
|
3782
3786
|
style: b
|
|
3783
|
-
}), h = b, d =
|
|
3787
|
+
}), h = b, d = g % l);
|
|
3784
3788
|
}
|
|
3785
3789
|
}
|
|
3786
|
-
for (const
|
|
3787
|
-
d = r ? d :
|
|
3788
|
-
let
|
|
3789
|
-
for (u = d + 1; u <=
|
|
3790
|
+
for (const p of t) {
|
|
3791
|
+
d = r ? d : p.start;
|
|
3792
|
+
let g = e[d % l], m;
|
|
3793
|
+
for (u = d + 1; u <= p.end; u++) {
|
|
3790
3794
|
const b = e[u % l];
|
|
3791
3795
|
m = dn(s.setContext(Zt(n, {
|
|
3792
3796
|
type: "segment",
|
|
3793
|
-
p0:
|
|
3797
|
+
p0: g,
|
|
3794
3798
|
p1: b,
|
|
3795
3799
|
p0DataIndex: (u - 1) % l,
|
|
3796
3800
|
p1DataIndex: u % l,
|
|
3797
3801
|
datasetIndex: a
|
|
3798
|
-
}))), Ec(m, h) && f(d, u - 1,
|
|
3802
|
+
}))), Ec(m, h) && f(d, u - 1, p.loop, h), g = b, h = m;
|
|
3799
3803
|
}
|
|
3800
|
-
d < u - 1 && f(d, u - 1,
|
|
3804
|
+
d < u - 1 && f(d, u - 1, p.loop, h);
|
|
3801
3805
|
}
|
|
3802
3806
|
return c;
|
|
3803
3807
|
}
|
|
@@ -4107,7 +4111,7 @@ function ta(i, t) {
|
|
|
4107
4111
|
e.push(s[n].index);
|
|
4108
4112
|
return e;
|
|
4109
4113
|
}
|
|
4110
|
-
function
|
|
4114
|
+
function pn(i, t, e, s = {}) {
|
|
4111
4115
|
const n = i.keys, o = s.mode === "single";
|
|
4112
4116
|
let a, r, l, c;
|
|
4113
4117
|
if (t !== null) {
|
|
@@ -4132,7 +4136,7 @@ function Uc(i) {
|
|
|
4132
4136
|
};
|
|
4133
4137
|
return e;
|
|
4134
4138
|
}
|
|
4135
|
-
function
|
|
4139
|
+
function gn(i, t) {
|
|
4136
4140
|
const e = i && i.options.stacked;
|
|
4137
4141
|
return e || e === void 0 && t.stack !== void 0;
|
|
4138
4142
|
}
|
|
@@ -4162,8 +4166,8 @@ function bn(i, t) {
|
|
|
4162
4166
|
const { chart: e, _cachedMeta: s } = i, n = e._stacks || (e._stacks = {}), { iScale: o, vScale: a, index: r } = s, l = o.axis, c = a.axis, h = Yc(o, a, s), d = t.length;
|
|
4163
4167
|
let u;
|
|
4164
4168
|
for (let f = 0; f < d; ++f) {
|
|
4165
|
-
const
|
|
4166
|
-
u = b[c] = Kc(n, h,
|
|
4169
|
+
const p = t[f], { [l]: g, [c]: m } = p, b = p._stacks || (p._stacks = {});
|
|
4170
|
+
u = b[c] = Kc(n, h, g), u[r] = m, u._top = mn(u, a, !0, s.type), u._bottom = mn(u, a, !1, s.type);
|
|
4167
4171
|
const x = u._visualValues || (u._visualValues = {});
|
|
4168
4172
|
x[r] = m;
|
|
4169
4173
|
}
|
|
@@ -4216,13 +4220,13 @@ class ft {
|
|
|
4216
4220
|
}
|
|
4217
4221
|
initialize() {
|
|
4218
4222
|
const t = this._cachedMeta;
|
|
4219
|
-
this.configure(), this.linkScales(), t._stacked =
|
|
4223
|
+
this.configure(), this.linkScales(), t._stacked = gn(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");
|
|
4220
4224
|
}
|
|
4221
4225
|
updateIndex(t) {
|
|
4222
4226
|
this.index !== t && De(this._cachedMeta), this.index = t;
|
|
4223
4227
|
}
|
|
4224
4228
|
linkScales() {
|
|
4225
|
-
const t = this.chart, e = this._cachedMeta, s = this.getDataset(), n = (d, u, f,
|
|
4229
|
+
const t = this.chart, e = this._cachedMeta, s = this.getDataset(), n = (d, u, f, p) => d === "x" ? u : d === "r" ? p : f, o = e.xAxisID = N(s.xAxisID, Ki(t, "x")), a = e.yAxisID = N(s.yAxisID, Ki(t, "y")), r = e.rAxisID = N(s.rAxisID, Ki(t, "r")), l = e.indexAxis, c = e.iAxisID = n(l, o, a, r), h = e.vAxisID = n(l, a, o, r);
|
|
4226
4230
|
e.xScale = this.getScaleForId(o), e.yScale = this.getScaleForId(a), e.rScale = this.getScaleForId(r), e.iScale = this.getScaleForId(c), e.vScale = this.getScaleForId(h);
|
|
4227
4231
|
}
|
|
4228
4232
|
getDataset() {
|
|
@@ -4267,7 +4271,7 @@ class ft {
|
|
|
4267
4271
|
let n = !1;
|
|
4268
4272
|
this._dataCheck();
|
|
4269
4273
|
const o = e._stacked;
|
|
4270
|
-
e._stacked =
|
|
4274
|
+
e._stacked = gn(e.vScale, e), e.stack !== s.stack && (n = !0, De(e), e.stack = s.stack), this._resyncElements(t), (n || o !== e._stacked) && bn(this, e._parsed);
|
|
4271
4275
|
}
|
|
4272
4276
|
configure() {
|
|
4273
4277
|
const t = this.chart.config, e = t.datasetScopeKeys(this._type), s = t.getOptionScopes(this.getDataset(), e, !0);
|
|
@@ -4289,11 +4293,11 @@ class ft {
|
|
|
4289
4293
|
}
|
|
4290
4294
|
parsePrimitiveData(t, e, s, n) {
|
|
4291
4295
|
const { iScale: o, vScale: a } = t, r = o.axis, l = a.axis, c = o.getLabels(), h = o === a, d = new Array(n);
|
|
4292
|
-
let u, f,
|
|
4296
|
+
let u, f, p;
|
|
4293
4297
|
for (u = 0, f = n; u < f; ++u)
|
|
4294
|
-
|
|
4295
|
-
[r]: h || o.parse(c[
|
|
4296
|
-
[l]: a.parse(e[
|
|
4298
|
+
p = u + s, d[u] = {
|
|
4299
|
+
[r]: h || o.parse(c[p], p),
|
|
4300
|
+
[l]: a.parse(e[p], p)
|
|
4297
4301
|
};
|
|
4298
4302
|
return d;
|
|
4299
4303
|
}
|
|
@@ -4328,7 +4332,7 @@ class ft {
|
|
|
4328
4332
|
keys: ta(n, !0),
|
|
4329
4333
|
values: e._stacks[t.axis]._visualValues
|
|
4330
4334
|
};
|
|
4331
|
-
return
|
|
4335
|
+
return pn(r, a, o.index, {
|
|
4332
4336
|
mode: s
|
|
4333
4337
|
});
|
|
4334
4338
|
}
|
|
@@ -4336,7 +4340,7 @@ class ft {
|
|
|
4336
4340
|
const o = s[e.axis];
|
|
4337
4341
|
let a = o === null ? NaN : o;
|
|
4338
4342
|
const r = n && s._stacks[e.axis];
|
|
4339
|
-
n && r && (n.values = r, a =
|
|
4343
|
+
n && r && (n.values = r, a = pn(n, o, this._cachedMeta.index)), t.min = Math.min(t.min, a), t.max = Math.max(t.max, a);
|
|
4340
4344
|
}
|
|
4341
4345
|
getMinMax(t, e) {
|
|
4342
4346
|
const s = this._cachedMeta, n = s._parsed, o = s._sorted && t === s.iScale, a = n.length, r = this._getOtherScale(t), l = Jc(e, s, this.chart), c = {
|
|
@@ -4344,16 +4348,16 @@ class ft {
|
|
|
4344
4348
|
max: Number.NEGATIVE_INFINITY
|
|
4345
4349
|
}, { min: h, max: d } = Gc(r);
|
|
4346
4350
|
let u, f;
|
|
4347
|
-
function
|
|
4351
|
+
function p() {
|
|
4348
4352
|
f = n[u];
|
|
4349
|
-
const
|
|
4350
|
-
return !F(f[t.axis]) || h >
|
|
4353
|
+
const g = f[r.axis];
|
|
4354
|
+
return !F(f[t.axis]) || h > g || d < g;
|
|
4351
4355
|
}
|
|
4352
|
-
for (u = 0; u < a && !(!
|
|
4356
|
+
for (u = 0; u < a && !(!p() && (this.updateRangeFromParsed(c, t, f, l), o)); ++u)
|
|
4353
4357
|
;
|
|
4354
4358
|
if (o) {
|
|
4355
4359
|
for (u = a - 1; u >= 0; --u)
|
|
4356
|
-
if (!
|
|
4360
|
+
if (!p()) {
|
|
4357
4361
|
this.updateRangeFromParsed(c, t, f, l);
|
|
4358
4362
|
break;
|
|
4359
4363
|
}
|
|
@@ -4425,8 +4429,8 @@ class ft {
|
|
|
4425
4429
|
] : [
|
|
4426
4430
|
t,
|
|
4427
4431
|
""
|
|
4428
|
-
], u = c.getOptionScopes(this.getDataset(), h), f = Object.keys(U.elements[t]),
|
|
4429
|
-
return
|
|
4432
|
+
], u = c.getOptionScopes(this.getDataset(), h), f = Object.keys(U.elements[t]), p = () => this.getContext(s, n, e), g = c.resolveNamedOptions(u, f, p, d);
|
|
4433
|
+
return g.$shared && (g.$shared = l, o[a] = Object.freeze(xn(g, l))), g;
|
|
4430
4434
|
}
|
|
4431
4435
|
_resolveAnimations(t, e, s) {
|
|
4432
4436
|
const n = this.chart, o = this._cachedDataOpts, a = `animation-${e}`, r = o[a];
|
|
@@ -4687,9 +4691,9 @@ class xi extends ft {
|
|
|
4687
4691
|
}
|
|
4688
4692
|
parseObjectData(t, e, s, n) {
|
|
4689
4693
|
const { iScale: o, vScale: a } = t, { xAxisKey: r = "x", yAxisKey: l = "y" } = this._parsing, c = o.axis === "x" ? r : l, h = a.axis === "x" ? r : l, d = [];
|
|
4690
|
-
let u, f,
|
|
4694
|
+
let u, f, p, g;
|
|
4691
4695
|
for (u = s, f = s + n; u < f; ++u)
|
|
4692
|
-
|
|
4696
|
+
g = e[u], p = {}, p[o.axis] = o.parse(Bt(g, c), u), d.push(ea(Bt(g, h), p, a, u));
|
|
4693
4697
|
return d;
|
|
4694
4698
|
}
|
|
4695
4699
|
updateRangeFromParsed(t, e, s, n) {
|
|
@@ -4719,17 +4723,17 @@ class xi extends ft {
|
|
|
4719
4723
|
updateElements(t, e, s, n) {
|
|
4720
4724
|
const o = n === "reset", { index: a, _cachedMeta: { vScale: r } } = this, l = r.getBasePixel(), c = r.isHorizontal(), h = this._getRuler(), { sharedOptions: d, includeOptions: u } = this._getSharedOptions(e, n);
|
|
4721
4725
|
for (let f = e; f < e + s; f++) {
|
|
4722
|
-
const
|
|
4726
|
+
const p = this.getParsed(f), g = o || P(p[r.axis]) ? {
|
|
4723
4727
|
base: l,
|
|
4724
4728
|
head: l
|
|
4725
|
-
} : this._calculateBarValuePixels(f), m = this._calculateBarIndexPixels(f, h), b = (
|
|
4729
|
+
} : this._calculateBarValuePixels(f), m = this._calculateBarIndexPixels(f, h), b = (p._stacks || {})[r.axis], x = {
|
|
4726
4730
|
horizontal: c,
|
|
4727
|
-
base:
|
|
4728
|
-
enableBorderRadius: !b || Qi(
|
|
4729
|
-
x: c ?
|
|
4730
|
-
y: c ? m.center :
|
|
4731
|
-
height: c ? m.size : Math.abs(
|
|
4732
|
-
width: c ? Math.abs(
|
|
4731
|
+
base: g.base,
|
|
4732
|
+
enableBorderRadius: !b || Qi(p._custom) || a === b._top || a === b._bottom,
|
|
4733
|
+
x: c ? g.head : m.center,
|
|
4734
|
+
y: c ? m.center : g.head,
|
|
4735
|
+
height: c ? m.size : Math.abs(g.size),
|
|
4736
|
+
width: c ? Math.abs(g.size) : m.size
|
|
4733
4737
|
};
|
|
4734
4738
|
u && (x.options = d || this.resolveDataElementOptions(f, t[f].active ? "active" : n));
|
|
4735
4739
|
const w = x.options || t[f].options;
|
|
@@ -4773,24 +4777,24 @@ class xi extends ft {
|
|
|
4773
4777
|
}
|
|
4774
4778
|
_calculateBarValuePixels(t) {
|
|
4775
4779
|
const { _cachedMeta: { vScale: e, _stacked: s, index: n }, options: { base: o, minBarLength: a } } = this, r = o || 0, l = this.getParsed(t), c = l._custom, h = Qi(c);
|
|
4776
|
-
let d = l[e.axis], u = 0, f = s ? this.applyStack(e, l, s) : d,
|
|
4780
|
+
let d = l[e.axis], u = 0, f = s ? this.applyStack(e, l, s) : d, p, g;
|
|
4777
4781
|
f !== d && (u = f - d, f = d), h && (d = c.barStart, f = c.barEnd - c.barStart, d !== 0 && xt(d) !== xt(c.barEnd) && (u = 0), u += d);
|
|
4778
4782
|
const m = !P(o) && !h ? o : u;
|
|
4779
4783
|
let b = e.getPixelForValue(m);
|
|
4780
|
-
if (this.chart.getDataVisibility(t) ?
|
|
4781
|
-
|
|
4784
|
+
if (this.chart.getDataVisibility(t) ? p = e.getPixelForValue(u + f) : p = b, g = p - b, Math.abs(g) < a) {
|
|
4785
|
+
g = ih(g, e, r) * a, d === r && (b -= g / 2);
|
|
4782
4786
|
const x = e.getPixelForDecimal(0), w = e.getPixelForDecimal(1), M = Math.min(x, w), y = Math.max(x, w);
|
|
4783
|
-
b = Math.max(Math.min(b, y), M),
|
|
4787
|
+
b = Math.max(Math.min(b, y), M), p = b + g, s && !h && (l._stacks[e.axis]._visualValues[n] = e.getValueForPixel(p) - e.getValueForPixel(b));
|
|
4784
4788
|
}
|
|
4785
4789
|
if (b === e.getPixelForValue(r)) {
|
|
4786
|
-
const x = xt(
|
|
4787
|
-
b += x,
|
|
4790
|
+
const x = xt(g) * e.getLineWidthForValue(r) / 2;
|
|
4791
|
+
b += x, g -= x;
|
|
4788
4792
|
}
|
|
4789
4793
|
return {
|
|
4790
|
-
size:
|
|
4794
|
+
size: g,
|
|
4791
4795
|
base: b,
|
|
4792
|
-
head:
|
|
4793
|
-
center:
|
|
4796
|
+
head: p,
|
|
4797
|
+
center: p + g / 2
|
|
4794
4798
|
};
|
|
4795
4799
|
}
|
|
4796
4800
|
_calculateBarIndexPixels(t, e) {
|
|
@@ -4895,8 +4899,8 @@ class yi extends ft {
|
|
|
4895
4899
|
updateElements(t, e, s, n) {
|
|
4896
4900
|
const o = n === "reset", { iScale: a, vScale: r } = this._cachedMeta, { sharedOptions: l, includeOptions: c } = this._getSharedOptions(e, n), h = a.axis, d = r.axis;
|
|
4897
4901
|
for (let u = e; u < e + s; u++) {
|
|
4898
|
-
const f = t[u],
|
|
4899
|
-
|
|
4902
|
+
const f = t[u], p = !o && this.getParsed(u), g = {}, m = g[h] = o ? a.getPixelForDecimal(0.5) : a.getPixelForValue(p[h]), b = g[d] = o ? r.getBasePixel() : r.getPixelForValue(p[d]);
|
|
4903
|
+
g.skip = isNaN(m) || isNaN(b), c && (g.options = l || this.resolveDataElementOptions(u, f.active ? "active" : n), o && (g.options.radius = 0)), this.updateElement(f, u, g, n);
|
|
4900
4904
|
}
|
|
4901
4905
|
}
|
|
4902
4906
|
resolveDataElementOptions(t, e) {
|
|
@@ -4936,8 +4940,8 @@ v(yi, "id", "bubble"), v(yi, "defaults", {
|
|
|
4936
4940
|
function rh(i, t, e) {
|
|
4937
4941
|
let s = 1, n = 1, o = 0, a = 0;
|
|
4938
4942
|
if (t < W) {
|
|
4939
|
-
const r = i, l = r + t, c = Math.cos(r), h = Math.sin(r), d = Math.cos(l), u = Math.sin(l), f = (w, M, y) => Ke(w, r, l, !0) ? 1 : Math.max(M, M * e, y, y * e),
|
|
4940
|
-
s = (
|
|
4943
|
+
const r = i, l = r + t, c = Math.cos(r), h = Math.sin(r), d = Math.cos(l), u = Math.sin(l), f = (w, M, y) => Ke(w, r, l, !0) ? 1 : Math.max(M, M * e, y, y * e), p = (w, M, y) => Ke(w, r, l, !0) ? -1 : Math.min(M, M * e, y, y * e), g = f(0, c, d), m = f(K, h, u), b = p(H, c, d), x = p(H + K, h, u);
|
|
4944
|
+
s = (g - b) / 2, n = (m - x) / 2, o = -(g + b) / 2, a = -(m + x) / 2;
|
|
4941
4945
|
}
|
|
4942
4946
|
return {
|
|
4943
4947
|
ratioX: s,
|
|
@@ -4986,15 +4990,15 @@ class Jt extends ft {
|
|
|
4986
4990
|
};
|
|
4987
4991
|
}
|
|
4988
4992
|
update(t) {
|
|
4989
|
-
const e = this.chart, { chartArea: s } = e, n = this._cachedMeta, o = n.data, a = this.getMaxBorderWidth() + this.getMaxOffset(o) + this.options.spacing, r = Math.max((Math.min(s.width, s.height) - a) / 2, 0), l = Math.min(wl(this.options.cutout, r), 1), c = this._getRingWeight(this.index), { circumference: h, rotation: d } = this._getRotationExtents(), { ratioX: u, ratioY: f, offsetX:
|
|
4990
|
-
this.offsetX =
|
|
4993
|
+
const e = this.chart, { chartArea: s } = e, n = this._cachedMeta, o = n.data, a = this.getMaxBorderWidth() + this.getMaxOffset(o) + this.options.spacing, r = Math.max((Math.min(s.width, s.height) - a) / 2, 0), l = Math.min(wl(this.options.cutout, r), 1), c = this._getRingWeight(this.index), { circumference: h, rotation: d } = this._getRotationExtents(), { ratioX: u, ratioY: f, offsetX: p, offsetY: g } = rh(d, h, l), m = (s.width - a) / u, b = (s.height - a) / f, x = Math.max(Math.min(m, b) / 2, 0), w = ko(this.options.radius, x), M = Math.max(w * l, 0), y = (w - M) / this._getVisibleDatasetWeightTotal();
|
|
4994
|
+
this.offsetX = p * w, this.offsetY = g * w, n.total = this.calculateTotal(), this.outerRadius = w - y * this._getRingWeightOffset(this.index), this.innerRadius = Math.max(this.outerRadius - y * c, 0), this.updateElements(o, 0, o.length, t);
|
|
4991
4995
|
}
|
|
4992
4996
|
_circumference(t, e) {
|
|
4993
4997
|
const s = this.options, n = this._cachedMeta, o = this._getCircumference();
|
|
4994
4998
|
return e && s.animation.animateRotate || !this.chart.getDataVisibility(t) || n._parsed[t] === null || n.data[t].hidden ? 0 : this.calculateCircumference(n._parsed[t] * o / W);
|
|
4995
4999
|
}
|
|
4996
5000
|
updateElements(t, e, s, n) {
|
|
4997
|
-
const o = n === "reset", a = this.chart, r = a.chartArea, c = a.options.animation, h = (r.left + r.right) / 2, d = (r.top + r.bottom) / 2, u = o && c.animateScale, f = u ? 0 : this.innerRadius,
|
|
5001
|
+
const o = n === "reset", a = this.chart, r = a.chartArea, c = a.options.animation, h = (r.left + r.right) / 2, d = (r.top + r.bottom) / 2, u = o && c.animateScale, f = u ? 0 : this.innerRadius, p = u ? 0 : this.outerRadius, { sharedOptions: g, includeOptions: m } = this._getSharedOptions(e, n);
|
|
4998
5002
|
let b = this._getRotation(), x;
|
|
4999
5003
|
for (x = 0; x < e; ++x)
|
|
5000
5004
|
b += this._circumference(x, o);
|
|
@@ -5005,10 +5009,10 @@ class Jt extends ft {
|
|
|
5005
5009
|
startAngle: b,
|
|
5006
5010
|
endAngle: b + w,
|
|
5007
5011
|
circumference: w,
|
|
5008
|
-
outerRadius:
|
|
5012
|
+
outerRadius: p,
|
|
5009
5013
|
innerRadius: f
|
|
5010
5014
|
};
|
|
5011
|
-
m && (y.options =
|
|
5015
|
+
m && (y.options = g || this.resolveDataElementOptions(x, M.active ? "active" : n)), b += w, this.updateElement(M, x, y, n);
|
|
5012
5016
|
}
|
|
5013
5017
|
}
|
|
5014
5018
|
calculateTotal() {
|
|
@@ -5149,7 +5153,7 @@ class Mi extends ft {
|
|
|
5149
5153
|
}, t), this.updateElements(n, r, l, t);
|
|
5150
5154
|
}
|
|
5151
5155
|
updateElements(t, e, s, n) {
|
|
5152
|
-
const o = n === "reset", { iScale: a, vScale: r, _stacked: l, _dataset: c } = this._cachedMeta, { sharedOptions: h, includeOptions: d } = this._getSharedOptions(e, n), u = a.axis, f = r.axis, { spanGaps:
|
|
5156
|
+
const o = n === "reset", { iScale: a, vScale: r, _stacked: l, _dataset: c } = this._cachedMeta, { sharedOptions: h, includeOptions: d } = this._getSharedOptions(e, n), u = a.axis, f = r.axis, { spanGaps: p, segment: g } = this.options, m = me(p) ? p : Number.POSITIVE_INFINITY, b = this.chart._animationsDisabled || o || n === "none", x = e + s, w = t.length;
|
|
5153
5157
|
let M = e > 0 && this.getParsed(e - 1);
|
|
5154
5158
|
for (let y = 0; y < w; ++y) {
|
|
5155
5159
|
const I = t[y], A = b ? I : {};
|
|
@@ -5158,7 +5162,7 @@ class Mi extends ft {
|
|
|
5158
5162
|
continue;
|
|
5159
5163
|
}
|
|
5160
5164
|
const T = this.getParsed(y), L = P(T[f]), S = A[u] = a.getPixelForValue(T[u], y), C = A[f] = o || L ? r.getBasePixel() : r.getPixelForValue(l ? this.applyStack(r, T, l) : T[f], y);
|
|
5161
|
-
A.skip = isNaN(S) || isNaN(C) || L, A.stop = y > 0 && Math.abs(T[u] - M[u]) > m,
|
|
5165
|
+
A.skip = isNaN(S) || isNaN(C) || L, A.stop = y > 0 && Math.abs(T[u] - M[u]) > m, g && (A.parsed = T, A.raw = c.data[y]), d && (A.options = h || this.resolveDataElementOptions(y, I.active ? "active" : n)), b || this.updateElement(I, y, A, n), M = T;
|
|
5162
5166
|
}
|
|
5163
5167
|
}
|
|
5164
5168
|
getMaxOverflow() {
|
|
@@ -5222,13 +5226,13 @@ class He extends ft {
|
|
|
5222
5226
|
}
|
|
5223
5227
|
updateElements(t, e, s, n) {
|
|
5224
5228
|
const o = n === "reset", a = this.chart, l = a.options.animation, c = this._cachedMeta.rScale, h = c.xCenter, d = c.yCenter, u = c.getIndexAngle(0) - 0.5 * H;
|
|
5225
|
-
let f = u,
|
|
5226
|
-
const
|
|
5227
|
-
for (
|
|
5228
|
-
f += this._computeAngle(
|
|
5229
|
-
for (
|
|
5230
|
-
const m = t[
|
|
5231
|
-
let b = f, x = f + this._computeAngle(
|
|
5229
|
+
let f = u, p;
|
|
5230
|
+
const g = 360 / this.countVisibleElements();
|
|
5231
|
+
for (p = 0; p < e; ++p)
|
|
5232
|
+
f += this._computeAngle(p, n, g);
|
|
5233
|
+
for (p = e; p < e + s; p++) {
|
|
5234
|
+
const m = t[p];
|
|
5235
|
+
let b = f, x = f + this._computeAngle(p, n, g), w = a.getDataVisibility(p) ? c.getDistanceFromCenterForValue(this.getParsed(p).r) : 0;
|
|
5232
5236
|
f = x, o && (l.animateScale && (w = 0), l.animateRotate && (b = x = u));
|
|
5233
5237
|
const M = {
|
|
5234
5238
|
x: h,
|
|
@@ -5237,9 +5241,9 @@ class He extends ft {
|
|
|
5237
5241
|
outerRadius: w,
|
|
5238
5242
|
startAngle: b,
|
|
5239
5243
|
endAngle: x,
|
|
5240
|
-
options: this.resolveDataElementOptions(
|
|
5244
|
+
options: this.resolveDataElementOptions(p, m.active ? "active" : n)
|
|
5241
5245
|
};
|
|
5242
|
-
this.updateElement(m,
|
|
5246
|
+
this.updateElement(m, p, M, n);
|
|
5243
5247
|
}
|
|
5244
5248
|
}
|
|
5245
5249
|
countVisibleElements() {
|
|
@@ -5416,10 +5420,10 @@ class vi extends ft {
|
|
|
5416
5420
|
!this.datasetElementType && t && (this.datasetElementType = this.chart.registry.getElement("line")), super.addElements();
|
|
5417
5421
|
}
|
|
5418
5422
|
updateElements(t, e, s, n) {
|
|
5419
|
-
const o = n === "reset", { iScale: a, vScale: r, _stacked: l, _dataset: c } = this._cachedMeta, h = this.resolveDataElementOptions(e, n), d = this.getSharedOptions(h), u = this.includeOptions(n, d), f = a.axis,
|
|
5423
|
+
const o = n === "reset", { iScale: a, vScale: r, _stacked: l, _dataset: c } = this._cachedMeta, h = this.resolveDataElementOptions(e, n), d = this.getSharedOptions(h), u = this.includeOptions(n, d), f = a.axis, p = r.axis, { spanGaps: g, segment: m } = this.options, b = me(g) ? g : Number.POSITIVE_INFINITY, x = this.chart._animationsDisabled || o || n === "none";
|
|
5420
5424
|
let w = e > 0 && this.getParsed(e - 1);
|
|
5421
5425
|
for (let M = e; M < e + s; ++M) {
|
|
5422
|
-
const y = t[M], I = this.getParsed(M), A = x ? y : {}, T = P(I[
|
|
5426
|
+
const y = t[M], I = this.getParsed(M), A = x ? y : {}, T = P(I[p]), L = A[f] = a.getPixelForValue(I[f], M), S = A[p] = o || T ? r.getBasePixel() : r.getPixelForValue(l ? this.applyStack(r, I, l) : I[p], M);
|
|
5423
5427
|
A.skip = isNaN(L) || isNaN(S) || T, A.stop = M > 0 && Math.abs(I[f] - w[f]) > b, m && (A.parsed = I, A.raw = c.data[M]), u && (A.options = d || this.resolveDataElementOptions(M, y.active ? "active" : n)), x || this.updateElement(y, M, A, n), w = I;
|
|
5424
5428
|
}
|
|
5425
5429
|
this.updateSharedOptions(d, n, h);
|
|
@@ -5545,8 +5549,8 @@ function ii(i, t, e, s, n) {
|
|
|
5545
5549
|
for (let r = 0, l = o.length; r < l; ++r) {
|
|
5546
5550
|
const { index: c, data: h } = o[r], { lo: d, hi: u } = hh(o[r], t, a, n);
|
|
5547
5551
|
for (let f = d; f <= u; ++f) {
|
|
5548
|
-
const
|
|
5549
|
-
|
|
5552
|
+
const p = h[f];
|
|
5553
|
+
p.skip || s(p, c, f);
|
|
5550
5554
|
}
|
|
5551
5555
|
}
|
|
5552
5556
|
}
|
|
@@ -5593,10 +5597,10 @@ function fh(i, t, e, s, n, o) {
|
|
|
5593
5597
|
const f = h.inRange(t.x, t.y, n);
|
|
5594
5598
|
if (s && !f)
|
|
5595
5599
|
return;
|
|
5596
|
-
const
|
|
5597
|
-
if (!(!!o || i.isPointInArea(
|
|
5600
|
+
const p = h.getCenterPoint(n);
|
|
5601
|
+
if (!(!!o || i.isPointInArea(p)) && !f)
|
|
5598
5602
|
return;
|
|
5599
|
-
const m = r(t,
|
|
5603
|
+
const m = r(t, p);
|
|
5600
5604
|
m < l ? (a = [
|
|
5601
5605
|
{
|
|
5602
5606
|
element: h,
|
|
@@ -5625,7 +5629,7 @@ function vn(i, t, e, s, n) {
|
|
|
5625
5629
|
}), r = r || l.inRange(t.x, t.y, n));
|
|
5626
5630
|
}), s && !r ? [] : o;
|
|
5627
5631
|
}
|
|
5628
|
-
var
|
|
5632
|
+
var ph = {
|
|
5629
5633
|
evaluateInteractionItems: ii,
|
|
5630
5634
|
modes: {
|
|
5631
5635
|
index(i, t, e, s) {
|
|
@@ -5690,7 +5694,7 @@ function ke(i, t) {
|
|
|
5690
5694
|
return n.weight === o.weight ? n.index - o.index : n.weight - o.weight;
|
|
5691
5695
|
});
|
|
5692
5696
|
}
|
|
5693
|
-
function
|
|
5697
|
+
function gh(i) {
|
|
5694
5698
|
const t = [];
|
|
5695
5699
|
let e, s, n, o, a, r;
|
|
5696
5700
|
for (e = 0, s = (i || []).length; e < s; ++e)
|
|
@@ -5732,7 +5736,7 @@ function bh(i, t) {
|
|
|
5732
5736
|
return e;
|
|
5733
5737
|
}
|
|
5734
5738
|
function xh(i) {
|
|
5735
|
-
const t =
|
|
5739
|
+
const t = gh(i), e = ke(t.filter((c) => c.box.fullSize), !0), s = ke(ze(t, "left"), !0), n = ke(ze(t, "right")), o = ke(ze(t, "top"), !0), a = ke(ze(t, "bottom")), r = In(t, "x"), l = In(t, "y");
|
|
5736
5740
|
return {
|
|
5737
5741
|
fullSize: e,
|
|
5738
5742
|
leftAndTop: s.concat(o),
|
|
@@ -5853,10 +5857,10 @@ var it = {
|
|
|
5853
5857
|
if (!i)
|
|
5854
5858
|
return;
|
|
5855
5859
|
const n = st(i.options.layout.padding), o = Math.max(t - n.width, 0), a = Math.max(e - n.height, 0), r = xh(i.boxes), l = r.vertical, c = r.horizontal;
|
|
5856
|
-
E(i.boxes, (
|
|
5857
|
-
typeof
|
|
5860
|
+
E(i.boxes, (g) => {
|
|
5861
|
+
typeof g.beforeLayout == "function" && g.beforeLayout();
|
|
5858
5862
|
});
|
|
5859
|
-
const h = l.reduce((
|
|
5863
|
+
const h = l.reduce((g, m) => m.box.options && m.box.options.display === !1 ? g : g + 1, 0) || 1, d = Object.freeze({
|
|
5860
5864
|
outerWidth: t,
|
|
5861
5865
|
outerHeight: e,
|
|
5862
5866
|
padding: n,
|
|
@@ -5872,16 +5876,16 @@ var it = {
|
|
|
5872
5876
|
h: a,
|
|
5873
5877
|
x: n.left,
|
|
5874
5878
|
y: n.top
|
|
5875
|
-
}, n),
|
|
5876
|
-
Oe(r.fullSize, f, d,
|
|
5879
|
+
}, n), p = bh(l.concat(c), d);
|
|
5880
|
+
Oe(r.fullSize, f, d, p), Oe(l, f, d, p), Oe(c, f, d, p) && Oe(l, f, d, p), Mh(f), Tn(r.leftAndTop, f, d, p), f.x += f.w, f.y += f.h, Tn(r.rightAndBottom, f, d, p), i.chartArea = {
|
|
5877
5881
|
left: f.left,
|
|
5878
5882
|
top: f.top,
|
|
5879
5883
|
right: f.left + f.w,
|
|
5880
5884
|
bottom: f.top + f.h,
|
|
5881
5885
|
height: f.h,
|
|
5882
5886
|
width: f.w
|
|
5883
|
-
}, E(r.chartArea, (
|
|
5884
|
-
const m =
|
|
5887
|
+
}, E(r.chartArea, (g) => {
|
|
5888
|
+
const m = g.box;
|
|
5885
5889
|
Object.assign(m, i.chartArea), m.update(f.w, f.h, {
|
|
5886
5890
|
left: 0,
|
|
5887
5891
|
top: 0,
|
|
@@ -6099,7 +6103,7 @@ class jh extends na {
|
|
|
6099
6103
|
function Ph(i) {
|
|
6100
6104
|
return !Ko() || typeof OffscreenCanvas < "u" && i instanceof OffscreenCanvas ? vh : jh;
|
|
6101
6105
|
}
|
|
6102
|
-
class
|
|
6106
|
+
class gt {
|
|
6103
6107
|
constructor() {
|
|
6104
6108
|
v(this, "x");
|
|
6105
6109
|
v(this, "y");
|
|
@@ -6130,7 +6134,7 @@ class pt {
|
|
|
6130
6134
|
}), n;
|
|
6131
6135
|
}
|
|
6132
6136
|
}
|
|
6133
|
-
v(
|
|
6137
|
+
v(gt, "defaults", {}), v(gt, "defaultRoutes");
|
|
6134
6138
|
function Eh(i, t) {
|
|
6135
6139
|
const e = i.options.ticks, s = Vh(i), n = Math.min(e.maxTicksLimit || s, s), o = e.major.enabled ? Bh(t) : [], a = o.length, r = o[0], l = o[a - 1], c = [];
|
|
6136
6140
|
if (a > n)
|
|
@@ -6244,14 +6248,14 @@ function Kh(i, t, e) {
|
|
|
6244
6248
|
}
|
|
6245
6249
|
function Xh(i, t, e, s) {
|
|
6246
6250
|
const { top: n, left: o, bottom: a, right: r, chart: l } = i, { chartArea: c, scales: h } = l;
|
|
6247
|
-
let d = 0, u, f,
|
|
6248
|
-
const
|
|
6251
|
+
let d = 0, u, f, p;
|
|
6252
|
+
const g = a - n, m = r - o;
|
|
6249
6253
|
if (i.isHorizontal()) {
|
|
6250
6254
|
if (f = et(s, o, r), O(e)) {
|
|
6251
6255
|
const b = Object.keys(e)[0], x = e[b];
|
|
6252
|
-
|
|
6256
|
+
p = h[b].getPixelForValue(x) + g - t;
|
|
6253
6257
|
} else
|
|
6254
|
-
e === "center" ?
|
|
6258
|
+
e === "center" ? p = (c.bottom + c.top) / 2 + g - t : p = kn(i, e, t);
|
|
6255
6259
|
u = r - o;
|
|
6256
6260
|
} else {
|
|
6257
6261
|
if (O(e)) {
|
|
@@ -6259,16 +6263,16 @@ function Xh(i, t, e, s) {
|
|
|
6259
6263
|
f = h[b].getPixelForValue(x) - m + t;
|
|
6260
6264
|
} else
|
|
6261
6265
|
e === "center" ? f = (c.left + c.right) / 2 - m + t : f = kn(i, e, t);
|
|
6262
|
-
|
|
6266
|
+
p = et(s, a, n), d = e === "left" ? -K : K;
|
|
6263
6267
|
}
|
|
6264
6268
|
return {
|
|
6265
6269
|
titleX: f,
|
|
6266
|
-
titleY:
|
|
6270
|
+
titleY: p,
|
|
6267
6271
|
maxWidth: u,
|
|
6268
6272
|
rotation: d
|
|
6269
6273
|
};
|
|
6270
6274
|
}
|
|
6271
|
-
class oe extends
|
|
6275
|
+
class oe extends gt {
|
|
6272
6276
|
constructor(t) {
|
|
6273
6277
|
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 = {
|
|
6274
6278
|
left: 0,
|
|
@@ -6443,15 +6447,15 @@ class oe extends pt {
|
|
|
6443
6447
|
if (a) {
|
|
6444
6448
|
const l = Sn(n, e.options.font);
|
|
6445
6449
|
if (r ? (t.width = this.maxWidth, t.height = Le(o) + l) : (t.height = this.maxHeight, t.width = Le(o) + l), s.display && this.ticks.length) {
|
|
6446
|
-
const { first: c, last: h, widest: d, highest: u } = this._getLabelSizes(), f = s.padding * 2,
|
|
6450
|
+
const { first: c, last: h, widest: d, highest: u } = this._getLabelSizes(), f = s.padding * 2, p = ut(this.labelRotation), g = Math.cos(p), m = Math.sin(p);
|
|
6447
6451
|
if (r) {
|
|
6448
|
-
const b = s.mirror ? 0 : m * d.width +
|
|
6452
|
+
const b = s.mirror ? 0 : m * d.width + g * u.height;
|
|
6449
6453
|
t.height = Math.min(this.maxHeight, t.height + b + f);
|
|
6450
6454
|
} else {
|
|
6451
|
-
const b = s.mirror ? 0 :
|
|
6455
|
+
const b = s.mirror ? 0 : g * d.width + m * u.height;
|
|
6452
6456
|
t.width = Math.min(this.maxWidth, t.width + b + f);
|
|
6453
6457
|
}
|
|
6454
|
-
this._calculatePadding(c, h, m,
|
|
6458
|
+
this._calculatePadding(c, h, m, g);
|
|
6455
6459
|
}
|
|
6456
6460
|
}
|
|
6457
6461
|
this._handleMargins(), r ? (this.width = this._length = e.width - this._margins.left - this._margins.right, this.height = t.height) : (this.width = t.width, this.height = this._length = e.height - this._margins.top - this._margins.bottom);
|
|
@@ -6500,16 +6504,16 @@ class oe extends pt {
|
|
|
6500
6504
|
}
|
|
6501
6505
|
_computeLabelSizes(t, e, s) {
|
|
6502
6506
|
const { ctx: n, _longestTextCache: o } = this, a = [], r = [], l = Math.floor(e / Ln(e, s));
|
|
6503
|
-
let c = 0, h = 0, d, u, f,
|
|
6507
|
+
let c = 0, h = 0, d, u, f, p, g, m, b, x, w, M, y;
|
|
6504
6508
|
for (d = 0; d < e; d += l) {
|
|
6505
|
-
if (
|
|
6509
|
+
if (p = t[d].label, g = this._resolveTickFontOptions(d), n.font = m = g.string, b = o[m] = o[m] || {
|
|
6506
6510
|
data: {},
|
|
6507
6511
|
gc: []
|
|
6508
|
-
}, x =
|
|
6509
|
-
w = Ni(n, b.data, b.gc, w,
|
|
6510
|
-
else if (B(
|
|
6511
|
-
for (u = 0, f =
|
|
6512
|
-
y =
|
|
6512
|
+
}, x = g.lineHeight, w = M = 0, !P(p) && !B(p))
|
|
6513
|
+
w = Ni(n, b.data, b.gc, w, p), M = x;
|
|
6514
|
+
else if (B(p))
|
|
6515
|
+
for (u = 0, f = p.length; u < f; ++u)
|
|
6516
|
+
y = p[u], !P(y) && !B(y) && (w = Ni(n, b.data, b.gc, w, y), M += x);
|
|
6513
6517
|
a.push(w), r.push(M), c = Math.max(w, c), h = Math.max(M, h);
|
|
6514
6518
|
}
|
|
6515
6519
|
Uh(o, e);
|
|
@@ -6571,8 +6575,8 @@ class oe extends pt {
|
|
|
6571
6575
|
return t !== "auto" ? !!t : this.getMatchingVisibleMetas().length > 0;
|
|
6572
6576
|
}
|
|
6573
6577
|
_computeGridLineItems(t) {
|
|
6574
|
-
const e = this.axis, s = this.chart, n = this.options, { grid: o, position: a, border: r } = n, l = o.offset, c = this.isHorizontal(), d = this.ticks.length + (l ? 1 : 0), u = Le(o), f = [],
|
|
6575
|
-
return Yt(s, Z,
|
|
6578
|
+
const e = this.axis, s = this.chart, n = this.options, { grid: o, position: a, border: r } = n, l = o.offset, c = this.isHorizontal(), d = this.ticks.length + (l ? 1 : 0), u = Le(o), f = [], p = r.setContext(this.getContext()), g = p.display ? p.width : 0, m = g / 2, b = function(Z) {
|
|
6579
|
+
return Yt(s, Z, g);
|
|
6576
6580
|
};
|
|
6577
6581
|
let x, w, M, y, I, A, T, L, S, C, j, $;
|
|
6578
6582
|
if (a === "top")
|
|
@@ -6625,12 +6629,12 @@ class oe extends pt {
|
|
|
6625
6629
|
return this._ticksLength = d, this._borderValue = x, f;
|
|
6626
6630
|
}
|
|
6627
6631
|
_computeLabelItems(t) {
|
|
6628
|
-
const e = this.axis, s = this.options, { position: n, ticks: o } = s, a = this.isHorizontal(), r = this.ticks, { align: l, crossAlign: c, padding: h, mirror: d } = o, u = Le(s.grid), f = u + h,
|
|
6632
|
+
const e = this.axis, s = this.options, { position: n, ticks: o } = s, a = this.isHorizontal(), r = this.ticks, { align: l, crossAlign: c, padding: h, mirror: d } = o, u = Le(s.grid), f = u + h, p = d ? -h : f, g = -ut(this.labelRotation), m = [];
|
|
6629
6633
|
let b, x, w, M, y, I, A, T, L, S, C, j, $ = "middle";
|
|
6630
6634
|
if (n === "top")
|
|
6631
|
-
I = this.bottom -
|
|
6635
|
+
I = this.bottom - p, A = this._getXAxisLabelAlignment();
|
|
6632
6636
|
else if (n === "bottom")
|
|
6633
|
-
I = this.top +
|
|
6637
|
+
I = this.top + p, A = this._getXAxisLabelAlignment();
|
|
6634
6638
|
else if (n === "left") {
|
|
6635
6639
|
const V = this._getYAxisLabelAlignment(u);
|
|
6636
6640
|
A = V.textAlign, y = V.x;
|
|
@@ -6662,7 +6666,7 @@ class oe extends pt {
|
|
|
6662
6666
|
T = this.getPixelForTick(b) + o.labelOffset, L = this._resolveTickFontOptions(b), S = L.lineHeight, C = B(M) ? M.length : 1;
|
|
6663
6667
|
const Z = C / 2, G = V.color, dt = V.textStrokeColor, tt = V.textStrokeWidth;
|
|
6664
6668
|
let le = A;
|
|
6665
|
-
a ? (y = T, A === "inner" && (b === x - 1 ? le = this.options.reverse ? "left" : "right" : b === 0 ? le = this.options.reverse ? "right" : "left" : le = "center"), n === "top" ? c === "near" ||
|
|
6669
|
+
a ? (y = T, A === "inner" && (b === x - 1 ? le = this.options.reverse ? "left" : "right" : b === 0 ? le = this.options.reverse ? "right" : "left" : le = "center"), n === "top" ? c === "near" || g !== 0 ? j = -C * S + S / 2 : c === "center" ? j = -rt.highest.height / 2 - Z * S + S : j = -rt.highest.height + S / 2 : c === "near" || g !== 0 ? j = S / 2 : c === "center" ? j = rt.highest.height / 2 - Z * S : j = rt.highest.height - C * S, d && (j *= -1), g !== 0 && !V.showLabelBackdrop && (y += S / 2 * Math.sin(g))) : (I = T, j = (1 - C) * S / 2);
|
|
6666
6670
|
let si;
|
|
6667
6671
|
if (V.showLabelBackdrop) {
|
|
6668
6672
|
const ce = st(V.backdropPadding), ve = rt.heights[b], Ie = rt.widths[b];
|
|
@@ -6696,7 +6700,7 @@ class oe extends pt {
|
|
|
6696
6700
|
font: L,
|
|
6697
6701
|
textOffset: j,
|
|
6698
6702
|
options: {
|
|
6699
|
-
rotation:
|
|
6703
|
+
rotation: g,
|
|
6700
6704
|
color: G,
|
|
6701
6705
|
strokeColor: dt,
|
|
6702
6706
|
strokeWidth: tt,
|
|
@@ -6922,7 +6926,7 @@ function qh(i) {
|
|
|
6922
6926
|
}
|
|
6923
6927
|
class _h {
|
|
6924
6928
|
constructor() {
|
|
6925
|
-
this.controllers = new ui(ft, "datasets", !0), this.elements = new ui(
|
|
6929
|
+
this.controllers = new ui(ft, "datasets", !0), this.elements = new ui(gt, "elements"), this.plugins = new ui(Object, "plugins"), this.scales = new ui(oe, "scales"), this._typedRegistries = [
|
|
6926
6930
|
this.controllers,
|
|
6927
6931
|
this.scales,
|
|
6928
6932
|
this.elements
|
|
@@ -7332,7 +7336,7 @@ function ud(i, t) {
|
|
|
7332
7336
|
return !1;
|
|
7333
7337
|
}
|
|
7334
7338
|
var fd = "4.4.0";
|
|
7335
|
-
const
|
|
7339
|
+
const pd = [
|
|
7336
7340
|
"top",
|
|
7337
7341
|
"bottom",
|
|
7338
7342
|
"left",
|
|
@@ -7340,7 +7344,7 @@ const gd = [
|
|
|
7340
7344
|
"chartArea"
|
|
7341
7345
|
];
|
|
7342
7346
|
function En(i, t) {
|
|
7343
|
-
return i === "top" || i === "bottom" ||
|
|
7347
|
+
return i === "top" || i === "bottom" || pd.indexOf(i) === -1 && t === "x";
|
|
7344
7348
|
}
|
|
7345
7349
|
function Vn(i, t) {
|
|
7346
7350
|
return function(e, s) {
|
|
@@ -7353,7 +7357,7 @@ function Rn(i) {
|
|
|
7353
7357
|
i
|
|
7354
7358
|
], t);
|
|
7355
7359
|
}
|
|
7356
|
-
function
|
|
7360
|
+
function gd(i) {
|
|
7357
7361
|
const t = i.chart, e = t.options.animation;
|
|
7358
7362
|
R(e && e.onProgress, [
|
|
7359
7363
|
i
|
|
@@ -7379,16 +7383,16 @@ function md(i, t, e) {
|
|
|
7379
7383
|
function bd(i, t, e, s) {
|
|
7380
7384
|
return !e || i.type === "mouseout" ? null : s ? t : i;
|
|
7381
7385
|
}
|
|
7382
|
-
function
|
|
7386
|
+
function pi(i, t, e) {
|
|
7383
7387
|
return i.options.clip ? i[e] : t[e];
|
|
7384
7388
|
}
|
|
7385
7389
|
function xd(i, t) {
|
|
7386
7390
|
const { xScale: e, yScale: s } = i;
|
|
7387
7391
|
return e && s ? {
|
|
7388
|
-
left:
|
|
7389
|
-
right:
|
|
7390
|
-
top:
|
|
7391
|
-
bottom:
|
|
7392
|
+
left: pi(e, t, "left"),
|
|
7393
|
+
right: pi(e, t, "right"),
|
|
7394
|
+
top: pi(s, t, "top"),
|
|
7395
|
+
bottom: pi(s, t, "bottom")
|
|
7392
7396
|
} : t;
|
|
7393
7397
|
}
|
|
7394
7398
|
class At {
|
|
@@ -7409,7 +7413,7 @@ class At {
|
|
|
7409
7413
|
console.error("Failed to create chart: can't acquire context from the given item");
|
|
7410
7414
|
return;
|
|
7411
7415
|
}
|
|
7412
|
-
wt.listen(this, "complete", Rn), wt.listen(this, "progress",
|
|
7416
|
+
wt.listen(this, "complete", Rn), wt.listen(this, "progress", gd), this._initialize(), this.attached && this.update();
|
|
7413
7417
|
}
|
|
7414
7418
|
get aspectRatio() {
|
|
7415
7419
|
const { options: { aspectRatio: t, maintainAspectRatio: e }, width: s, height: n, _aspectRatio: o } = this;
|
|
@@ -7690,7 +7694,7 @@ class At {
|
|
|
7690
7694
|
return zt(t, this.chartArea, this._minPadding);
|
|
7691
7695
|
}
|
|
7692
7696
|
getElementsAtEventForMode(t, e, s, n) {
|
|
7693
|
-
const o =
|
|
7697
|
+
const o = ph.modes[e];
|
|
7694
7698
|
return typeof o == "function" ? o(this, t, s, n) : [];
|
|
7695
7699
|
}
|
|
7696
7700
|
getDatasetMeta(t) {
|
|
@@ -7909,12 +7913,12 @@ function de(i, t, e, s) {
|
|
|
7909
7913
|
function Oi(i, t, e, s, n, o) {
|
|
7910
7914
|
const { x: a, y: r, startAngle: l, pixelMargin: c, innerRadius: h } = t, d = Math.max(t.outerRadius + s + e - c, 0), u = h > 0 ? h + s + e + c : 0;
|
|
7911
7915
|
let f = 0;
|
|
7912
|
-
const
|
|
7916
|
+
const p = n - l;
|
|
7913
7917
|
if (s) {
|
|
7914
|
-
const V = h > 0 ? h - s : 0, Z = d > 0 ? d - s : 0, G = (V + Z) / 2, dt = G !== 0 ?
|
|
7915
|
-
f = (
|
|
7918
|
+
const V = h > 0 ? h - s : 0, Z = d > 0 ? d - s : 0, G = (V + Z) / 2, dt = G !== 0 ? p * G / (G + s) : p;
|
|
7919
|
+
f = (p - dt) / 2;
|
|
7916
7920
|
}
|
|
7917
|
-
const
|
|
7921
|
+
const g = Math.max(1e-3, p * d - e / H) / d, m = (p - g) / 2, b = l + m + f, x = n - m - f, { outerStart: w, outerEnd: M, innerStart: y, innerEnd: I } = wd(t, u, d, x - b), A = d - w, T = d - M, L = b + w / A, S = x - M / T, C = u + y, j = u + I, $ = b + y / C, rt = x - I / j;
|
|
7918
7922
|
if (i.beginPath(), o) {
|
|
7919
7923
|
const V = (L + S) / 2;
|
|
7920
7924
|
if (i.arc(a, r, d, L, V), i.arc(a, r, d, V, S), M > 0) {
|
|
@@ -7961,16 +7965,16 @@ function Id(i, t, e, s, n) {
|
|
|
7961
7965
|
if (!c)
|
|
7962
7966
|
return;
|
|
7963
7967
|
i.setLineDash(d || []), i.lineDashOffset = u, f ? (i.lineWidth = c * 2, i.lineJoin = h || "round") : (i.lineWidth = c, i.lineJoin = h || "bevel");
|
|
7964
|
-
let
|
|
7968
|
+
let p = t.endAngle;
|
|
7965
7969
|
if (o) {
|
|
7966
|
-
Oi(i, t, e, s,
|
|
7967
|
-
for (let
|
|
7970
|
+
Oi(i, t, e, s, p, n);
|
|
7971
|
+
for (let g = 0; g < o; ++g)
|
|
7968
7972
|
i.stroke();
|
|
7969
|
-
isNaN(r) || (
|
|
7973
|
+
isNaN(r) || (p = a + (r % W || W));
|
|
7970
7974
|
}
|
|
7971
|
-
f && yd(i, t,
|
|
7975
|
+
f && yd(i, t, p), o || (Oi(i, t, e, s, p, n), i.stroke());
|
|
7972
7976
|
}
|
|
7973
|
-
class je extends
|
|
7977
|
+
class je extends gt {
|
|
7974
7978
|
constructor(e) {
|
|
7975
7979
|
super();
|
|
7976
7980
|
v(this, "circumference");
|
|
@@ -7995,8 +7999,8 @@ class je extends pt {
|
|
|
7995
7999
|
"innerRadius",
|
|
7996
8000
|
"outerRadius",
|
|
7997
8001
|
"circumference"
|
|
7998
|
-
], n), f = (this.options.spacing + this.options.borderWidth) / 2,
|
|
7999
|
-
return
|
|
8002
|
+
], n), f = (this.options.spacing + this.options.borderWidth) / 2, g = N(u, c - l) >= W || Ke(a, l, c), m = Tt(r, h + f, d + f);
|
|
8003
|
+
return g && m;
|
|
8000
8004
|
}
|
|
8001
8005
|
getCenterPoint(e) {
|
|
8002
8006
|
const { x: s, y: n, startAngle: o, endAngle: a, innerRadius: r, outerRadius: l } = this.getProps([
|
|
@@ -8064,22 +8068,22 @@ function ua(i, t, e = {}) {
|
|
|
8064
8068
|
}
|
|
8065
8069
|
function Dd(i, t, e, s) {
|
|
8066
8070
|
const { points: n, options: o } = t, { count: a, start: r, loop: l, ilen: c } = ua(n, e, s), h = Td(o);
|
|
8067
|
-
let { move: d = !0, reverse: u } = s || {}, f,
|
|
8071
|
+
let { move: d = !0, reverse: u } = s || {}, f, p, g;
|
|
8068
8072
|
for (f = 0; f <= c; ++f)
|
|
8069
|
-
|
|
8070
|
-
return l && (
|
|
8073
|
+
p = n[(r + (u ? c - f : f)) % a], !p.skip && (d ? (i.moveTo(p.x, p.y), d = !1) : h(i, g, p, u, o.stepped), g = p);
|
|
8074
|
+
return l && (p = n[(r + (u ? c : 0)) % a], h(i, g, p, u, o.stepped)), !!l;
|
|
8071
8075
|
}
|
|
8072
8076
|
function zd(i, t, e, s) {
|
|
8073
8077
|
const n = t.points, { count: o, start: a, ilen: r } = ua(n, e, s), { move: l = !0, reverse: c } = s || {};
|
|
8074
|
-
let h = 0, d = 0, u, f,
|
|
8078
|
+
let h = 0, d = 0, u, f, p, g, m, b;
|
|
8075
8079
|
const x = (M) => (a + (c ? r - M : M)) % o, w = () => {
|
|
8076
|
-
|
|
8080
|
+
g !== m && (i.lineTo(h, m), i.lineTo(h, g), i.lineTo(h, b));
|
|
8077
8081
|
};
|
|
8078
8082
|
for (l && (f = n[x(0)], i.moveTo(f.x, f.y)), u = 0; u <= r; ++u) {
|
|
8079
8083
|
if (f = n[x(u)], f.skip)
|
|
8080
8084
|
continue;
|
|
8081
8085
|
const M = f.x, y = f.y, I = M | 0;
|
|
8082
|
-
I ===
|
|
8086
|
+
I === p ? (y < g ? g = y : y > m && (m = y), h = (d * h + M) / ++d) : (w(), i.lineTo(M, y), p = I, d = 0, g = m = y), b = y;
|
|
8083
8087
|
}
|
|
8084
8088
|
w();
|
|
8085
8089
|
}
|
|
@@ -8106,7 +8110,7 @@ const Sd = typeof Path2D == "function";
|
|
|
8106
8110
|
function Cd(i, t, e, s) {
|
|
8107
8111
|
Sd && !t.options.segment ? Ld(i, t, e, s) : Nd(i, t, e, s);
|
|
8108
8112
|
}
|
|
8109
|
-
class jt extends
|
|
8113
|
+
class jt extends gt {
|
|
8110
8114
|
constructor(t) {
|
|
8111
8115
|
super(), this.animated = !0, this.options = void 0, this._chart = void 0, this._loop = void 0, this._fullLoop = void 0, this._path = void 0, this._points = void 0, this._segments = void 0, this._decimated = !1, this._pointsUpdated = !1, this._datasetIndex = void 0, t && Object.assign(this, t);
|
|
8112
8116
|
}
|
|
@@ -8145,12 +8149,12 @@ class jt extends pt {
|
|
|
8145
8149
|
const r = [], l = kd(s);
|
|
8146
8150
|
let c, h;
|
|
8147
8151
|
for (c = 0, h = a.length; c < h; ++c) {
|
|
8148
|
-
const { start: d, end: u } = a[c], f = o[d],
|
|
8149
|
-
if (f ===
|
|
8152
|
+
const { start: d, end: u } = a[c], f = o[d], p = o[u];
|
|
8153
|
+
if (f === p) {
|
|
8150
8154
|
r.push(f);
|
|
8151
8155
|
continue;
|
|
8152
8156
|
}
|
|
8153
|
-
const
|
|
8157
|
+
const g = Math.abs((n - f[e]) / (p[e] - f[e])), m = l(f, p, g, s.stepped);
|
|
8154
8158
|
m[e] = t[e], r.push(m);
|
|
8155
8159
|
}
|
|
8156
8160
|
return r.length === 1 ? r[0] : r;
|
|
@@ -8199,7 +8203,7 @@ function Hn(i, t, e, s) {
|
|
|
8199
8203
|
], s);
|
|
8200
8204
|
return Math.abs(t - o) < n.radius + n.hitRadius;
|
|
8201
8205
|
}
|
|
8202
|
-
class Ti extends
|
|
8206
|
+
class Ti extends gt {
|
|
8203
8207
|
constructor(e) {
|
|
8204
8208
|
super();
|
|
8205
8209
|
v(this, "parsed");
|
|
@@ -8347,7 +8351,7 @@ function ts(i, t, e = {}) {
|
|
|
8347
8351
|
radius: i.radius
|
|
8348
8352
|
};
|
|
8349
8353
|
}
|
|
8350
|
-
class Di extends
|
|
8354
|
+
class Di extends gt {
|
|
8351
8355
|
constructor(t) {
|
|
8352
8356
|
super(), this.options = void 0, this.horizontal = void 0, this.base = void 0, this.width = void 0, this.height = void 0, this.inflateAmount = void 0, t && Object.assign(this, t);
|
|
8353
8357
|
}
|
|
@@ -8407,20 +8411,20 @@ const ds = [
|
|
|
8407
8411
|
"rgb(201, 203, 207)"
|
|
8408
8412
|
// grey
|
|
8409
8413
|
], Zn = /* @__PURE__ */ ds.map((i) => i.replace("rgb(", "rgba(").replace(")", ", 0.5)"));
|
|
8410
|
-
function
|
|
8414
|
+
function pa(i) {
|
|
8411
8415
|
return ds[i % ds.length];
|
|
8412
8416
|
}
|
|
8413
|
-
function
|
|
8417
|
+
function ga(i) {
|
|
8414
8418
|
return Zn[i % Zn.length];
|
|
8415
8419
|
}
|
|
8416
8420
|
function Bd(i, t) {
|
|
8417
|
-
return i.borderColor =
|
|
8421
|
+
return i.borderColor = pa(t), i.backgroundColor = ga(t), ++t;
|
|
8418
8422
|
}
|
|
8419
8423
|
function Wd(i, t) {
|
|
8420
|
-
return i.backgroundColor = i.data.map(() =>
|
|
8424
|
+
return i.backgroundColor = i.data.map(() => pa(t++)), t;
|
|
8421
8425
|
}
|
|
8422
8426
|
function Hd(i, t) {
|
|
8423
|
-
return i.backgroundColor = i.data.map(() =>
|
|
8427
|
+
return i.backgroundColor = i.data.map(() => ga(t++)), t;
|
|
8424
8428
|
}
|
|
8425
8429
|
function Zd(i) {
|
|
8426
8430
|
let t = 0;
|
|
@@ -8462,7 +8466,7 @@ function Yd(i, t, e, s, n) {
|
|
|
8462
8466
|
const a = [], r = (e - 2) / (o - 2);
|
|
8463
8467
|
let l = 0;
|
|
8464
8468
|
const c = t + e - 1;
|
|
8465
|
-
let h = t, d, u, f,
|
|
8469
|
+
let h = t, d, u, f, p, g;
|
|
8466
8470
|
for (a[l++] = i[h], d = 0; d < o - 2; d++) {
|
|
8467
8471
|
let m = 0, b = 0, x;
|
|
8468
8472
|
const w = Math.floor((d + 1) * r) + 1 + t, M = Math.min(Math.floor((d + 2) * r) + 1, e) + t, y = M - w;
|
|
@@ -8470,20 +8474,20 @@ function Yd(i, t, e, s, n) {
|
|
|
8470
8474
|
m += i[x].x, b += i[x].y;
|
|
8471
8475
|
m /= y, b /= y;
|
|
8472
8476
|
const I = Math.floor(d * r) + 1 + t, A = Math.min(Math.floor((d + 1) * r) + 1, e) + t, { x: T, y: L } = i[h];
|
|
8473
|
-
for (f =
|
|
8474
|
-
|
|
8475
|
-
a[l++] = u, h =
|
|
8477
|
+
for (f = p = -1, x = I; x < A; x++)
|
|
8478
|
+
p = 0.5 * Math.abs((T - m) * (i[x].y - L) - (T - i[x].x) * (b - L)), p > f && (f = p, u = i[x], g = x);
|
|
8479
|
+
a[l++] = u, h = g;
|
|
8476
8480
|
}
|
|
8477
8481
|
return a[l++] = i[c], a;
|
|
8478
8482
|
}
|
|
8479
8483
|
function Gd(i, t, e, s) {
|
|
8480
|
-
let n = 0, o = 0, a, r, l, c, h, d, u, f,
|
|
8484
|
+
let n = 0, o = 0, a, r, l, c, h, d, u, f, p, g;
|
|
8481
8485
|
const m = [], b = t + e - 1, x = i[t].x, M = i[b].x - x;
|
|
8482
8486
|
for (a = t; a < t + e; ++a) {
|
|
8483
8487
|
r = i[a], l = (r.x - x) / M * s, c = r.y;
|
|
8484
8488
|
const y = l | 0;
|
|
8485
8489
|
if (y === h)
|
|
8486
|
-
c <
|
|
8490
|
+
c < p ? (p = c, d = a) : c > g && (g = c, u = a), n = (o * n + r.x) / ++o;
|
|
8487
8491
|
else {
|
|
8488
8492
|
const I = a - 1;
|
|
8489
8493
|
if (!P(d) && !P(u)) {
|
|
@@ -8496,7 +8500,7 @@ function Gd(i, t, e, s) {
|
|
|
8496
8500
|
x: n
|
|
8497
8501
|
});
|
|
8498
8502
|
}
|
|
8499
|
-
a > 0 && I !== f && m.push(i[I]), m.push(r), h = y, o = 0,
|
|
8503
|
+
a > 0 && I !== f && m.push(i[I]), m.push(r), h = y, o = 0, p = g = c, d = u = f = a;
|
|
8500
8504
|
}
|
|
8501
8505
|
}
|
|
8502
8506
|
return m;
|
|
@@ -8560,22 +8564,22 @@ var Xd = {
|
|
|
8560
8564
|
get: function() {
|
|
8561
8565
|
return this._decimated;
|
|
8562
8566
|
},
|
|
8563
|
-
set: function(
|
|
8564
|
-
this._data =
|
|
8567
|
+
set: function(g) {
|
|
8568
|
+
this._data = g;
|
|
8565
8569
|
}
|
|
8566
8570
|
}));
|
|
8567
|
-
let
|
|
8571
|
+
let p;
|
|
8568
8572
|
switch (e.algorithm) {
|
|
8569
8573
|
case "lttb":
|
|
8570
|
-
|
|
8574
|
+
p = Yd(c, d, u, s, e);
|
|
8571
8575
|
break;
|
|
8572
8576
|
case "min-max":
|
|
8573
|
-
|
|
8577
|
+
p = Gd(c, d, u, s);
|
|
8574
8578
|
break;
|
|
8575
8579
|
default:
|
|
8576
8580
|
throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`);
|
|
8577
8581
|
}
|
|
8578
|
-
n._decimated =
|
|
8582
|
+
n._decimated = p;
|
|
8579
8583
|
});
|
|
8580
8584
|
},
|
|
8581
8585
|
destroy(i) {
|
|
@@ -8599,10 +8603,10 @@ function Qd(i, t, e) {
|
|
|
8599
8603
|
}
|
|
8600
8604
|
const d = _o(t, h);
|
|
8601
8605
|
for (const u of d) {
|
|
8602
|
-
const f = us(e, o[u.start], o[u.end], u.loop),
|
|
8603
|
-
for (const
|
|
8606
|
+
const f = us(e, o[u.start], o[u.end], u.loop), p = qo(r, n, f);
|
|
8607
|
+
for (const g of p)
|
|
8604
8608
|
a.push({
|
|
8605
|
-
source:
|
|
8609
|
+
source: g,
|
|
8606
8610
|
target: u,
|
|
8607
8611
|
start: {
|
|
8608
8612
|
[e]: Yn(h, f, "start", Math.max)
|
|
@@ -8884,17 +8888,17 @@ function Xn(i, t) {
|
|
|
8884
8888
|
for (const { source: l, target: c, start: h, end: d } of r) {
|
|
8885
8889
|
const { style: { backgroundColor: u = o } = {} } = l, f = s !== !0;
|
|
8886
8890
|
i.save(), i.fillStyle = u, fu(i, a, f && us(n, h, d)), i.beginPath();
|
|
8887
|
-
const
|
|
8888
|
-
let
|
|
8891
|
+
const p = !!e.pathSegment(i, l);
|
|
8892
|
+
let g;
|
|
8889
8893
|
if (f) {
|
|
8890
|
-
|
|
8894
|
+
p ? i.closePath() : Qn(i, s, d, n);
|
|
8891
8895
|
const m = !!s.pathSegment(i, c, {
|
|
8892
|
-
move:
|
|
8896
|
+
move: p,
|
|
8893
8897
|
reverse: !0
|
|
8894
8898
|
});
|
|
8895
|
-
|
|
8899
|
+
g = p && m, g || Qn(i, s, h, n);
|
|
8896
8900
|
}
|
|
8897
|
-
i.closePath(), i.fill(
|
|
8901
|
+
i.closePath(), i.fill(g ? "evenodd" : "nonzero"), i.restore();
|
|
8898
8902
|
}
|
|
8899
8903
|
}
|
|
8900
8904
|
function fu(i, t, e) {
|
|
@@ -8905,7 +8909,7 @@ function Qn(i, t, e, s) {
|
|
|
8905
8909
|
const n = t.interpolate(e, s);
|
|
8906
8910
|
n && i.lineTo(n.x, n.y);
|
|
8907
8911
|
}
|
|
8908
|
-
var
|
|
8912
|
+
var pu = {
|
|
8909
8913
|
id: "filler",
|
|
8910
8914
|
afterDatasetsUpdate(i, t, e) {
|
|
8911
8915
|
const s = (i.data.datasets || []).length, n = [];
|
|
@@ -8955,8 +8959,8 @@ const Jn = (i, t) => {
|
|
|
8955
8959
|
boxHeight: e,
|
|
8956
8960
|
itemHeight: Math.max(t, e)
|
|
8957
8961
|
};
|
|
8958
|
-
},
|
|
8959
|
-
class qn extends
|
|
8962
|
+
}, gu = (i, t) => i !== null && t !== null && i.datasetIndex === t.datasetIndex && i.index === t.index;
|
|
8963
|
+
class qn extends gt {
|
|
8960
8964
|
constructor(t) {
|
|
8961
8965
|
super(), this._added = !1, this.legendHitBoxes = [], this._hoveredItem = null, this.doughnutMode = !1, this.chart = t.chart, this.options = t.options, this.ctx = t.ctx, this.legendItems = void 0, this.columnSizes = void 0, this.lineWidths = void 0, this.maxHeight = void 0, this.maxWidth = void 0, this.top = void 0, this.bottom = void 0, this.left = void 0, this.right = void 0, this.height = void 0, this.width = void 0, this._margins = void 0, this.position = void 0, this.weight = void 0, this.fullSize = void 0;
|
|
8962
8966
|
}
|
|
@@ -8990,9 +8994,9 @@ class qn extends pt {
|
|
|
8990
8994
|
let d = t;
|
|
8991
8995
|
o.textAlign = "left", o.textBaseline = "middle";
|
|
8992
8996
|
let u = -1, f = -h;
|
|
8993
|
-
return this.legendItems.forEach((
|
|
8994
|
-
const m = s + e / 2 + o.measureText(
|
|
8995
|
-
(
|
|
8997
|
+
return this.legendItems.forEach((p, g) => {
|
|
8998
|
+
const m = s + e / 2 + o.measureText(p.text).width;
|
|
8999
|
+
(g === 0 || c[c.length - 1] + m + 2 * r > a) && (d += h, c[c.length - (g > 0 ? 0 : 1)] = 0, f += h, u++), l[g] = {
|
|
8996
9000
|
left: 0,
|
|
8997
9001
|
top: f,
|
|
8998
9002
|
row: u,
|
|
@@ -9003,16 +9007,16 @@ class qn extends pt {
|
|
|
9003
9007
|
}
|
|
9004
9008
|
_fitCols(t, e, s, n) {
|
|
9005
9009
|
const { ctx: o, maxHeight: a, options: { labels: { padding: r } } } = this, l = this.legendHitBoxes = [], c = this.columnSizes = [], h = a - t;
|
|
9006
|
-
let d = r, u = 0, f = 0,
|
|
9010
|
+
let d = r, u = 0, f = 0, p = 0, g = 0;
|
|
9007
9011
|
return this.legendItems.forEach((m, b) => {
|
|
9008
9012
|
const { itemWidth: x, itemHeight: w } = mu(s, e, o, m, n);
|
|
9009
9013
|
b > 0 && f + w + 2 * r > h && (d += u + r, c.push({
|
|
9010
9014
|
width: u,
|
|
9011
9015
|
height: f
|
|
9012
|
-
}),
|
|
9013
|
-
left:
|
|
9016
|
+
}), p += u + r, g++, u = f = 0), l[b] = {
|
|
9017
|
+
left: p,
|
|
9014
9018
|
top: f,
|
|
9015
|
-
col:
|
|
9019
|
+
col: g,
|
|
9016
9020
|
width: x,
|
|
9017
9021
|
height: w
|
|
9018
9022
|
}, u = Math.max(u, x), f += w + r;
|
|
@@ -9048,28 +9052,28 @@ class qn extends pt {
|
|
|
9048
9052
|
const { options: t, columnSizes: e, lineWidths: s, ctx: n } = this, { align: o, labels: a } = t, r = U.color, l = ue(t.rtl, this.left, this.width), c = X(a.font), { padding: h } = a, d = c.size, u = d / 2;
|
|
9049
9053
|
let f;
|
|
9050
9054
|
this.drawTitle(), n.textAlign = l.textAlign("left"), n.textBaseline = "middle", n.lineWidth = 0.5, n.font = c.string;
|
|
9051
|
-
const { boxWidth:
|
|
9052
|
-
if (isNaN(
|
|
9055
|
+
const { boxWidth: p, boxHeight: g, itemHeight: m } = Jn(a, d), b = function(I, A, T) {
|
|
9056
|
+
if (isNaN(p) || p <= 0 || isNaN(g) || g < 0)
|
|
9053
9057
|
return;
|
|
9054
9058
|
n.save();
|
|
9055
9059
|
const L = N(T.lineWidth, 1);
|
|
9056
9060
|
if (n.fillStyle = N(T.fillStyle, r), n.lineCap = N(T.lineCap, "butt"), n.lineDashOffset = N(T.lineDashOffset, 0), n.lineJoin = N(T.lineJoin, "miter"), n.lineWidth = L, n.strokeStyle = N(T.strokeStyle, r), n.setLineDash(N(T.lineDash, [])), a.usePointStyle) {
|
|
9057
9061
|
const S = {
|
|
9058
|
-
radius:
|
|
9062
|
+
radius: g * Math.SQRT2 / 2,
|
|
9059
9063
|
pointStyle: T.pointStyle,
|
|
9060
9064
|
rotation: T.rotation,
|
|
9061
9065
|
borderWidth: L
|
|
9062
|
-
}, C = l.xPlus(I,
|
|
9063
|
-
Bo(n, S, C, j, a.pointStyleWidth &&
|
|
9066
|
+
}, C = l.xPlus(I, p / 2), j = A + u;
|
|
9067
|
+
Bo(n, S, C, j, a.pointStyleWidth && p);
|
|
9064
9068
|
} else {
|
|
9065
|
-
const S = A + Math.max((d -
|
|
9069
|
+
const S = A + Math.max((d - g) / 2, 0), C = l.leftForLtr(I, p), j = qt(T.borderRadius);
|
|
9066
9070
|
n.beginPath(), Object.values(j).some(($) => $ !== 0) ? Xe(n, {
|
|
9067
9071
|
x: C,
|
|
9068
9072
|
y: S,
|
|
9069
|
-
w:
|
|
9070
|
-
h:
|
|
9073
|
+
w: p,
|
|
9074
|
+
h: g,
|
|
9071
9075
|
radius: j
|
|
9072
|
-
}) : n.rect(C, S,
|
|
9076
|
+
}) : n.rect(C, S, p, g), n.fill(), L !== 0 && n.stroke();
|
|
9073
9077
|
}
|
|
9074
9078
|
n.restore();
|
|
9075
9079
|
}, x = function(I, A, T) {
|
|
@@ -9090,11 +9094,11 @@ class qn extends pt {
|
|
|
9090
9094
|
const y = m + h;
|
|
9091
9095
|
this.legendItems.forEach((I, A) => {
|
|
9092
9096
|
n.strokeStyle = I.fontColor, n.fillStyle = I.fontColor;
|
|
9093
|
-
const T = n.measureText(I.text).width, L = l.textAlign(I.textAlign || (I.textAlign = a.textAlign)), S =
|
|
9097
|
+
const T = n.measureText(I.text).width, L = l.textAlign(I.textAlign || (I.textAlign = a.textAlign)), S = p + u + T;
|
|
9094
9098
|
let C = f.x, j = f.y;
|
|
9095
9099
|
l.setWidth(this.width), w ? A > 0 && C + S + h > this.right && (j = f.y += y, f.line++, C = f.x = et(o, this.left + h, this.right - s[f.line])) : A > 0 && j + y > this.bottom && (C = f.x = C + e[f.line].width + h, f.line++, j = f.y = et(o, this.top + M + h, this.bottom - e[f.line].height));
|
|
9096
9100
|
const $ = l.x(C);
|
|
9097
|
-
if (b($, j, I), C = Vl(L, C +
|
|
9101
|
+
if (b($, j, I), C = Vl(L, C + p + u, w ? C + S : this.right, t.rtl), x(l.x(C), j, I), w)
|
|
9098
9102
|
f.x += S + h;
|
|
9099
9103
|
else if (typeof I.text != "string") {
|
|
9100
9104
|
const rt = c.lineHeight;
|
|
@@ -9112,8 +9116,8 @@ class qn extends pt {
|
|
|
9112
9116
|
if (this.isHorizontal())
|
|
9113
9117
|
u = Math.max(...this.lineWidths), h = this.top + c, d = et(t.align, d, this.right - u);
|
|
9114
9118
|
else {
|
|
9115
|
-
const
|
|
9116
|
-
h = c + et(t.align, this.top, this.bottom -
|
|
9119
|
+
const p = this.columnSizes.reduce((g, m) => Math.max(g, m.height), 0);
|
|
9120
|
+
h = c + et(t.align, this.top, this.bottom - p - t.labels.padding - this._computeTitleHeight());
|
|
9117
9121
|
}
|
|
9118
9122
|
const f = et(r, d, d + u);
|
|
9119
9123
|
a.textAlign = o.textAlign(zs(r)), a.textBaseline = "middle", a.strokeStyle = e.color, a.fillStyle = e.color, a.font = s.string, ee(a, e.text, f, h, s);
|
|
@@ -9137,7 +9141,7 @@ class qn extends pt {
|
|
|
9137
9141
|
return;
|
|
9138
9142
|
const s = this._getLegendItemAt(t.x, t.y);
|
|
9139
9143
|
if (t.type === "mousemove" || t.type === "mouseout") {
|
|
9140
|
-
const n = this._hoveredItem, o =
|
|
9144
|
+
const n = this._hoveredItem, o = gu(n, s);
|
|
9141
9145
|
n && !o && R(e.onLeave, [
|
|
9142
9146
|
t,
|
|
9143
9147
|
n,
|
|
@@ -9261,7 +9265,7 @@ var Mu = {
|
|
|
9261
9265
|
}
|
|
9262
9266
|
}
|
|
9263
9267
|
};
|
|
9264
|
-
class Es extends
|
|
9268
|
+
class Es extends gt {
|
|
9265
9269
|
constructor(t) {
|
|
9266
9270
|
super(), this.chart = t.chart, this.options = t.options, this.ctx = t.ctx, this._padding = void 0, this.top = void 0, this.bottom = void 0, this.left = void 0, this.right = void 0, this.width = void 0, this.height = void 0, this.position = void 0, this.weight = void 0, this.fullSize = void 0;
|
|
9267
9271
|
}
|
|
@@ -9351,7 +9355,7 @@ var vu = {
|
|
|
9351
9355
|
_indexable: !1
|
|
9352
9356
|
}
|
|
9353
9357
|
};
|
|
9354
|
-
const
|
|
9358
|
+
const gi = /* @__PURE__ */ new WeakMap();
|
|
9355
9359
|
var Iu = {
|
|
9356
9360
|
id: "subtitle",
|
|
9357
9361
|
start(i, t, e) {
|
|
@@ -9360,13 +9364,13 @@ var Iu = {
|
|
|
9360
9364
|
options: e,
|
|
9361
9365
|
chart: i
|
|
9362
9366
|
});
|
|
9363
|
-
it.configure(i, s, e), it.addBox(i, s),
|
|
9367
|
+
it.configure(i, s, e), it.addBox(i, s), gi.set(i, s);
|
|
9364
9368
|
},
|
|
9365
9369
|
stop(i) {
|
|
9366
|
-
it.removeBox(i,
|
|
9370
|
+
it.removeBox(i, gi.get(i)), gi.delete(i);
|
|
9367
9371
|
},
|
|
9368
9372
|
beforeUpdate(i, t, e) {
|
|
9369
|
-
const s =
|
|
9373
|
+
const s = gi.get(i);
|
|
9370
9374
|
it.configure(i, s, e), s.options = e;
|
|
9371
9375
|
},
|
|
9372
9376
|
defaults: {
|
|
@@ -9450,22 +9454,22 @@ function Au(i, t) {
|
|
|
9450
9454
|
};
|
|
9451
9455
|
}
|
|
9452
9456
|
function _n(i, t) {
|
|
9453
|
-
const e = i.chart.ctx, { body: s, footer: n, title: o } = i, { boxWidth: a, boxHeight: r } = t, l = X(t.bodyFont), c = X(t.titleFont), h = X(t.footerFont), d = o.length, u = n.length, f = s.length,
|
|
9454
|
-
let
|
|
9455
|
-
if (b += i.beforeBody.length + i.afterBody.length, d && (
|
|
9457
|
+
const e = i.chart.ctx, { body: s, footer: n, title: o } = i, { boxWidth: a, boxHeight: r } = t, l = X(t.bodyFont), c = X(t.titleFont), h = X(t.footerFont), d = o.length, u = n.length, f = s.length, p = st(t.padding);
|
|
9458
|
+
let g = p.height, m = 0, b = s.reduce((M, y) => M + y.before.length + y.lines.length + y.after.length, 0);
|
|
9459
|
+
if (b += i.beforeBody.length + i.afterBody.length, d && (g += d * c.lineHeight + (d - 1) * t.titleSpacing + t.titleMarginBottom), b) {
|
|
9456
9460
|
const M = t.displayColors ? Math.max(r, l.lineHeight) : l.lineHeight;
|
|
9457
|
-
|
|
9461
|
+
g += f * M + (b - f) * l.lineHeight + (b - 1) * t.bodySpacing;
|
|
9458
9462
|
}
|
|
9459
|
-
u && (
|
|
9463
|
+
u && (g += t.footerMarginTop + u * h.lineHeight + (u - 1) * t.footerSpacing);
|
|
9460
9464
|
let x = 0;
|
|
9461
9465
|
const w = function(M) {
|
|
9462
9466
|
m = Math.max(m, e.measureText(M).width + x);
|
|
9463
9467
|
};
|
|
9464
9468
|
return e.save(), e.font = c.string, E(i.title, w), e.font = l.string, E(i.beforeBody.concat(i.afterBody), w), x = t.displayColors ? a + 2 + t.boxPadding : 0, E(s, (M) => {
|
|
9465
9469
|
E(M.before, w), E(M.lines, w), E(M.after, w);
|
|
9466
|
-
}), x = 0, e.font = h.string, E(i.footer, w), e.restore(), m +=
|
|
9470
|
+
}), x = 0, e.font = h.string, E(i.footer, w), e.restore(), m += p.width, {
|
|
9467
9471
|
width: m,
|
|
9468
|
-
height:
|
|
9472
|
+
height: g
|
|
9469
9473
|
};
|
|
9470
9474
|
}
|
|
9471
9475
|
function Tu(i, t) {
|
|
@@ -9499,11 +9503,11 @@ function Lu(i, t, e) {
|
|
|
9499
9503
|
}
|
|
9500
9504
|
function to(i, t, e, s) {
|
|
9501
9505
|
const { caretSize: n, caretPadding: o, cornerRadius: a } = i, { xAlign: r, yAlign: l } = e, c = n + o, { topLeft: h, topRight: d, bottomLeft: u, bottomRight: f } = qt(a);
|
|
9502
|
-
let
|
|
9503
|
-
const
|
|
9504
|
-
return l === "center" ? r === "left" ?
|
|
9505
|
-
x: _(
|
|
9506
|
-
y: _(
|
|
9506
|
+
let p = ku(t, r);
|
|
9507
|
+
const g = Lu(t, l, c);
|
|
9508
|
+
return l === "center" ? r === "left" ? p += c : r === "right" && (p -= c) : r === "left" ? p -= Math.max(h, u) + n : r === "right" && (p += Math.max(d, f) + n), {
|
|
9509
|
+
x: _(p, 0, s.width - t.width),
|
|
9510
|
+
y: _(g, 0, s.height - t.height)
|
|
9507
9511
|
};
|
|
9508
9512
|
}
|
|
9509
9513
|
function mi(i, t, e) {
|
|
@@ -9580,7 +9584,7 @@ function nt(i, t, e, s) {
|
|
|
9580
9584
|
const n = i[t].call(e, s);
|
|
9581
9585
|
return typeof n > "u" ? Ma[t].call(e, s) : n;
|
|
9582
9586
|
}
|
|
9583
|
-
class fs extends
|
|
9587
|
+
class fs extends gt {
|
|
9584
9588
|
constructor(t) {
|
|
9585
9589
|
super(), this.opacity = 0, this._active = [], this._eventPosition = void 0, this._size = void 0, this._cachedAnimations = void 0, this._tooltipItems = [], this.$animations = void 0, this.$context = void 0, this.chart = t.chart, this.options = t.options, this.dataPoints = void 0, this.title = void 0, this.beforeBody = void 0, this.body = void 0, this.afterBody = void 0, this.footer = void 0, this.xAlign = void 0, this.yAlign = void 0, this.x = void 0, this.y = void 0, this.height = void 0, this.width = void 0, this.caretX = void 0, this.caretY = void 0, this.labelColors = void 0, this.labelPointStyles = void 0, this.labelTextColors = void 0;
|
|
9586
9590
|
}
|
|
@@ -9666,9 +9670,9 @@ class fs extends pt {
|
|
|
9666
9670
|
e.lineTo(o.x1, o.y1), e.lineTo(o.x2, o.y2), e.lineTo(o.x3, o.y3);
|
|
9667
9671
|
}
|
|
9668
9672
|
getCaretPosition(t, e, s) {
|
|
9669
|
-
const { xAlign: n, yAlign: o } = this, { caretSize: a, cornerRadius: r } = s, { topLeft: l, topRight: c, bottomLeft: h, bottomRight: d } = qt(r), { x: u, y: f } = t, { width:
|
|
9673
|
+
const { xAlign: n, yAlign: o } = this, { caretSize: a, cornerRadius: r } = s, { topLeft: l, topRight: c, bottomLeft: h, bottomRight: d } = qt(r), { x: u, y: f } = t, { width: p, height: g } = e;
|
|
9670
9674
|
let m, b, x, w, M, y;
|
|
9671
|
-
return o === "center" ? (M = f +
|
|
9675
|
+
return o === "center" ? (M = f + g / 2, n === "left" ? (m = u, b = m - a, w = M + a, y = M - a) : (m = u + p, b = m + a, w = M - a, y = M + a), x = m) : (n === "left" ? b = u + Math.max(l, h) + a : n === "right" ? b = u + p - Math.max(c, d) - a : b = this.caretX, o === "top" ? (w = f, M = w - a, m = b - a, x = b + a) : (w = f + g, M = w + a, m = b + a, x = b - a), y = w), {
|
|
9672
9676
|
x1: m,
|
|
9673
9677
|
x2: b,
|
|
9674
9678
|
x3: x,
|
|
@@ -9687,47 +9691,47 @@ class fs extends pt {
|
|
|
9687
9691
|
}
|
|
9688
9692
|
}
|
|
9689
9693
|
_drawColorBox(t, e, s, n, o) {
|
|
9690
|
-
const a = this.labelColors[s], r = this.labelPointStyles[s], { boxHeight: l, boxWidth: c } = o, h = X(o.bodyFont), d = mi(this, "left", o), u = n.x(d), f = l < h.lineHeight ? (h.lineHeight - l) / 2 : 0,
|
|
9694
|
+
const a = this.labelColors[s], r = this.labelPointStyles[s], { boxHeight: l, boxWidth: c } = o, h = X(o.bodyFont), d = mi(this, "left", o), u = n.x(d), f = l < h.lineHeight ? (h.lineHeight - l) / 2 : 0, p = e.y + f;
|
|
9691
9695
|
if (o.usePointStyle) {
|
|
9692
|
-
const
|
|
9696
|
+
const g = {
|
|
9693
9697
|
radius: Math.min(c, l) / 2,
|
|
9694
9698
|
pointStyle: r.pointStyle,
|
|
9695
9699
|
rotation: r.rotation,
|
|
9696
9700
|
borderWidth: 1
|
|
9697
|
-
}, m = n.leftForLtr(u, c) + c / 2, b =
|
|
9698
|
-
t.strokeStyle = o.multiKeyBackground, t.fillStyle = o.multiKeyBackground, as(t,
|
|
9701
|
+
}, m = n.leftForLtr(u, c) + c / 2, b = p + l / 2;
|
|
9702
|
+
t.strokeStyle = o.multiKeyBackground, t.fillStyle = o.multiKeyBackground, as(t, g, m, b), t.strokeStyle = a.borderColor, t.fillStyle = a.backgroundColor, as(t, g, m, b);
|
|
9699
9703
|
} else {
|
|
9700
9704
|
t.lineWidth = O(a.borderWidth) ? Math.max(...Object.values(a.borderWidth)) : a.borderWidth || 1, t.strokeStyle = a.borderColor, t.setLineDash(a.borderDash || []), t.lineDashOffset = a.borderDashOffset || 0;
|
|
9701
|
-
const
|
|
9705
|
+
const g = n.leftForLtr(u, c), m = n.leftForLtr(n.xPlus(u, 1), c - 2), b = qt(a.borderRadius);
|
|
9702
9706
|
Object.values(b).some((x) => x !== 0) ? (t.beginPath(), t.fillStyle = o.multiKeyBackground, Xe(t, {
|
|
9703
|
-
x:
|
|
9704
|
-
y:
|
|
9707
|
+
x: g,
|
|
9708
|
+
y: p,
|
|
9705
9709
|
w: c,
|
|
9706
9710
|
h: l,
|
|
9707
9711
|
radius: b
|
|
9708
9712
|
}), t.fill(), t.stroke(), t.fillStyle = a.backgroundColor, t.beginPath(), Xe(t, {
|
|
9709
9713
|
x: m,
|
|
9710
|
-
y:
|
|
9714
|
+
y: p + 1,
|
|
9711
9715
|
w: c - 2,
|
|
9712
9716
|
h: l - 2,
|
|
9713
9717
|
radius: b
|
|
9714
|
-
}), t.fill()) : (t.fillStyle = o.multiKeyBackground, t.fillRect(
|
|
9718
|
+
}), t.fill()) : (t.fillStyle = o.multiKeyBackground, t.fillRect(g, p, c, l), t.strokeRect(g, p, c, l), t.fillStyle = a.backgroundColor, t.fillRect(m, p + 1, c - 2, l - 2));
|
|
9715
9719
|
}
|
|
9716
9720
|
t.fillStyle = this.labelTextColors[s];
|
|
9717
9721
|
}
|
|
9718
9722
|
drawBody(t, e, s) {
|
|
9719
9723
|
const { body: n } = this, { bodySpacing: o, bodyAlign: a, displayColors: r, boxHeight: l, boxWidth: c, boxPadding: h } = s, d = X(s.bodyFont);
|
|
9720
9724
|
let u = d.lineHeight, f = 0;
|
|
9721
|
-
const
|
|
9722
|
-
e.fillText(T,
|
|
9723
|
-
}, m =
|
|
9725
|
+
const p = ue(s.rtl, this.x, this.width), g = function(T) {
|
|
9726
|
+
e.fillText(T, p.x(t.x + f), t.y + u / 2), t.y += u + o;
|
|
9727
|
+
}, m = p.textAlign(a);
|
|
9724
9728
|
let b, x, w, M, y, I, A;
|
|
9725
|
-
for (e.textAlign = a, e.textBaseline = "middle", e.font = d.string, t.x = mi(this, m, s), e.fillStyle = s.bodyColor, E(this.beforeBody,
|
|
9726
|
-
for (b = n[M], x = this.labelTextColors[M], e.fillStyle = x, E(b.before,
|
|
9727
|
-
|
|
9728
|
-
E(b.after,
|
|
9729
|
+
for (e.textAlign = a, e.textBaseline = "middle", e.font = d.string, t.x = mi(this, m, s), e.fillStyle = s.bodyColor, E(this.beforeBody, g), f = r && m !== "right" ? a === "center" ? c / 2 + h : c + 2 + h : 0, M = 0, I = n.length; M < I; ++M) {
|
|
9730
|
+
for (b = n[M], x = this.labelTextColors[M], e.fillStyle = x, E(b.before, g), w = b.lines, r && w.length && (this._drawColorBox(e, t, M, p, s), u = Math.max(d.lineHeight, l)), y = 0, A = w.length; y < A; ++y)
|
|
9731
|
+
g(w[y]), u = d.lineHeight;
|
|
9732
|
+
E(b.after, g);
|
|
9729
9733
|
}
|
|
9730
|
-
f = 0, u = d.lineHeight, E(this.afterBody,
|
|
9734
|
+
f = 0, u = d.lineHeight, E(this.afterBody, g), t.y -= o;
|
|
9731
9735
|
}
|
|
9732
9736
|
drawFooter(t, e, s) {
|
|
9733
9737
|
const n = this.footer, o = n.length;
|
|
@@ -9739,8 +9743,8 @@ class fs extends pt {
|
|
|
9739
9743
|
}
|
|
9740
9744
|
}
|
|
9741
9745
|
drawBackground(t, e, s, n) {
|
|
9742
|
-
const { xAlign: o, yAlign: a } = this, { x: r, y: l } = t, { width: c, height: h } = s, { topLeft: d, topRight: u, bottomLeft: f, bottomRight:
|
|
9743
|
-
e.fillStyle = n.backgroundColor, e.strokeStyle = n.borderColor, e.lineWidth = n.borderWidth, e.beginPath(), e.moveTo(r + d, l), a === "top" && this.drawCaret(t, e, s, n), e.lineTo(r + c - u, l), e.quadraticCurveTo(r + c, l, r + c, l + u), a === "center" && o === "right" && this.drawCaret(t, e, s, n), e.lineTo(r + c, l + h -
|
|
9746
|
+
const { xAlign: o, yAlign: a } = this, { x: r, y: l } = t, { width: c, height: h } = s, { topLeft: d, topRight: u, bottomLeft: f, bottomRight: p } = qt(n.cornerRadius);
|
|
9747
|
+
e.fillStyle = n.backgroundColor, e.strokeStyle = n.borderColor, e.lineWidth = n.borderWidth, e.beginPath(), e.moveTo(r + d, l), a === "top" && this.drawCaret(t, e, s, n), e.lineTo(r + c - u, l), e.quadraticCurveTo(r + c, l, r + c, l + u), a === "center" && o === "right" && this.drawCaret(t, e, s, n), e.lineTo(r + c, l + h - p), e.quadraticCurveTo(r + c, l + h, r + c - p, l + h), a === "bottom" && this.drawCaret(t, e, s, n), e.lineTo(r + f, l + h), e.quadraticCurveTo(r, l + h, r, l + h - f), a === "center" && o === "left" && this.drawCaret(t, e, s, n), e.lineTo(r, l + d), e.quadraticCurveTo(r, l, r + d, l), e.closePath(), e.fill(), n.borderWidth > 0 && e.stroke();
|
|
9744
9748
|
}
|
|
9745
9749
|
_updateAnimationTarget(t) {
|
|
9746
9750
|
const e = this.chart, s = this.$animations, n = s && s.x, o = s && s.y;
|
|
@@ -9932,7 +9936,7 @@ var Su = {
|
|
|
9932
9936
|
__proto__: null,
|
|
9933
9937
|
Colors: Ud,
|
|
9934
9938
|
Decimation: Xd,
|
|
9935
|
-
Filler:
|
|
9939
|
+
Filler: pu,
|
|
9936
9940
|
Legend: Mu,
|
|
9937
9941
|
SubTitle: Iu,
|
|
9938
9942
|
Title: vu,
|
|
@@ -9954,7 +9958,7 @@ function so(i) {
|
|
|
9954
9958
|
const t = this.getLabels();
|
|
9955
9959
|
return i >= 0 && i < t.length ? t[i] : i;
|
|
9956
9960
|
}
|
|
9957
|
-
class
|
|
9961
|
+
class ps extends oe {
|
|
9958
9962
|
constructor(t) {
|
|
9959
9963
|
super(t), this._startValue = void 0, this._valueRange = 0, this._addedLabels = [];
|
|
9960
9964
|
}
|
|
@@ -10009,24 +10013,24 @@ class gs extends oe {
|
|
|
10009
10013
|
return this.bottom;
|
|
10010
10014
|
}
|
|
10011
10015
|
}
|
|
10012
|
-
v(
|
|
10016
|
+
v(ps, "id", "category"), v(ps, "defaults", {
|
|
10013
10017
|
ticks: {
|
|
10014
10018
|
callback: so
|
|
10015
10019
|
}
|
|
10016
10020
|
});
|
|
10017
10021
|
function Eu(i, t) {
|
|
10018
|
-
const e = [], { bounds: n, step: o, min: a, max: r, precision: l, count: c, maxTicks: h, maxDigits: d, includeBounds: u } = i, f = o || 1,
|
|
10019
|
-
let y = Js((m -
|
|
10022
|
+
const e = [], { bounds: n, step: o, min: a, max: r, precision: l, count: c, maxTicks: h, maxDigits: d, includeBounds: u } = i, f = o || 1, p = h - 1, { min: g, max: m } = t, b = !P(a), x = !P(r), w = !P(c), M = (m - g) / (d + 1);
|
|
10023
|
+
let y = Js((m - g) / p / f) * f, I, A, T, L;
|
|
10020
10024
|
if (y < 1e-14 && !b && !x)
|
|
10021
10025
|
return [
|
|
10022
10026
|
{
|
|
10023
|
-
value:
|
|
10027
|
+
value: g
|
|
10024
10028
|
},
|
|
10025
10029
|
{
|
|
10026
10030
|
value: m
|
|
10027
10031
|
}
|
|
10028
10032
|
];
|
|
10029
|
-
L = Math.ceil(m / y) - Math.floor(
|
|
10033
|
+
L = Math.ceil(m / y) - Math.floor(g / y), L > p && (y = Js(L * y / p / f) * f), P(l) || (I = Math.pow(10, l), y = Math.ceil(y * I) / I), n === "ticks" ? (A = Math.floor(g / y) * y, T = Math.ceil(m / y) * y) : (A = g, T = m), b && x && o && Nl((r - a) / o, y / 1e3) ? (L = Math.round(Math.min((r - a) / y, h)), y = (r - a) / L, A = a, T = r) : w ? (A = b ? a : A, T = x ? r : T, L = c - 1, y = (T - A) / L) : (L = (T - A) / y, Re(L, Math.round(L), y / 1e3) ? L = Math.round(L) : L = Math.ceil(L));
|
|
10030
10034
|
const S = Math.max(qs(y), qs(A));
|
|
10031
10035
|
I = Math.pow(10, P(l) ? S : l), A = Math.round(A * I) / I, T = Math.round(T * I) / I;
|
|
10032
10036
|
let C = 0;
|
|
@@ -10111,7 +10115,7 @@ class ji extends oe {
|
|
|
10111
10115
|
return ei(t, this.chart.options.locale, this.options.ticks.format);
|
|
10112
10116
|
}
|
|
10113
10117
|
}
|
|
10114
|
-
class
|
|
10118
|
+
class gs extends ji {
|
|
10115
10119
|
determineDataLimits() {
|
|
10116
10120
|
const { min: t, max: e } = this.getMinMax(!0);
|
|
10117
10121
|
this.min = F(t) ? t : 0, this.max = F(e) ? e : 1, this.handleTickRangeOptions();
|
|
@@ -10127,7 +10131,7 @@ class ps extends ji {
|
|
|
10127
10131
|
return this._startValue + this.getDecimalForPixel(t) * this._valueRange;
|
|
10128
10132
|
}
|
|
10129
10133
|
}
|
|
10130
|
-
v(
|
|
10134
|
+
v(gs, "id", "linear"), v(gs, "defaults", {
|
|
10131
10135
|
ticks: {
|
|
10132
10136
|
callback: Ei.formatters.numeric
|
|
10133
10137
|
}
|
|
@@ -10263,8 +10267,8 @@ function Wu(i) {
|
|
|
10263
10267
|
n[l] = c.padding;
|
|
10264
10268
|
const h = i.getPointPosition(l, i.drawingArea + n[l], r), d = X(c.font), u = Bu(i.ctx, d, i._pointLabels[l]);
|
|
10265
10269
|
s[l] = u;
|
|
10266
|
-
const f = ct(i.getIndexAngle(l) + r),
|
|
10267
|
-
Hu(e, t, f,
|
|
10270
|
+
const f = ct(i.getIndexAngle(l) + r), p = Math.round(Ts(f)), g = ro(p, h.x, u.w, 0, 180), m = ro(p, h.y, u.h, 90, 270);
|
|
10271
|
+
Hu(e, t, f, g, m);
|
|
10268
10272
|
}
|
|
10269
10273
|
i.setCenterPoint(t.l - e.l, e.r - t.r, t.t - e.t, e.b - t.b), i._pointLabelItems = Uu(i, s, n);
|
|
10270
10274
|
}
|
|
@@ -10332,7 +10336,7 @@ function Xu(i, t, e) {
|
|
|
10332
10336
|
const l = qt(t.borderRadius), c = st(t.backdropPadding);
|
|
10333
10337
|
i.fillStyle = r;
|
|
10334
10338
|
const h = s - c.left, d = n - c.top, u = o - s + c.width, f = a - n + c.height;
|
|
10335
|
-
Object.values(l).some((
|
|
10339
|
+
Object.values(l).some((p) => p !== 0) ? (i.beginPath(), Xe(i, {
|
|
10336
10340
|
x: h,
|
|
10337
10341
|
y: d,
|
|
10338
10342
|
w: u,
|
|
@@ -10469,8 +10473,8 @@ class Ee extends ji {
|
|
|
10469
10473
|
if (e.pointLabels.display && Qu(this, a), n.display && this.ticks.forEach((h, d) => {
|
|
10470
10474
|
if (d !== 0) {
|
|
10471
10475
|
l = this.getDistanceFromCenterForValue(h.value);
|
|
10472
|
-
const u = this.getContext(d), f = n.setContext(u),
|
|
10473
|
-
Ju(this, f, l, a,
|
|
10476
|
+
const u = this.getContext(d), f = n.setContext(u), p = o.setContext(u);
|
|
10477
|
+
Ju(this, f, l, a, p);
|
|
10474
10478
|
}
|
|
10475
10479
|
}), s.display) {
|
|
10476
10480
|
for (t.save(), r = a - 1; r >= 0; r--) {
|
|
@@ -10716,10 +10720,10 @@ class qe extends oe {
|
|
|
10716
10720
|
let d = e, u, f;
|
|
10717
10721
|
if (c && (d = +t.startOf(d, "isoWeek", l)), d = +t.startOf(d, c ? "day" : a), t.diff(s, e, a) > 1e5 * r)
|
|
10718
10722
|
throw new Error(e + " and " + s + " are too far apart with stepSize of " + r + " " + a);
|
|
10719
|
-
const
|
|
10723
|
+
const p = n.ticks.source === "data" && this.getDataTimestamps();
|
|
10720
10724
|
for (u = d, f = 0; u < s; u = +t.add(u, r, a), f++)
|
|
10721
|
-
uo(h, u,
|
|
10722
|
-
return (u === s || n.bounds === "ticks" || f === 1) && uo(h, u,
|
|
10725
|
+
uo(h, u, p);
|
|
10726
|
+
return (u === s || n.bounds === "ticks" || f === 1) && uo(h, u, p), Object.keys(h).sort(lo).map((g) => +g);
|
|
10723
10727
|
}
|
|
10724
10728
|
getLabelForValue(t) {
|
|
10725
10729
|
const e = this._adapter, s = this.options.time;
|
|
@@ -10873,8 +10877,8 @@ class xs extends qe {
|
|
|
10873
10877
|
v(xs, "id", "timeseries"), v(xs, "defaults", qe.defaults);
|
|
10874
10878
|
var ef = /* @__PURE__ */ Object.freeze({
|
|
10875
10879
|
__proto__: null,
|
|
10876
|
-
CategoryScale:
|
|
10877
|
-
LinearScale:
|
|
10880
|
+
CategoryScale: ps,
|
|
10881
|
+
LinearScale: gs,
|
|
10878
10882
|
LogarithmicScale: ms,
|
|
10879
10883
|
RadialLinearScale: Ee,
|
|
10880
10884
|
TimeScale: qe,
|
|
@@ -10945,7 +10949,7 @@ Ft([
|
|
|
10945
10949
|
k({ attribute: "chart-options", type: Object })
|
|
10946
10950
|
], yt.prototype, "chartOptions", 2);
|
|
10947
10951
|
Ft([
|
|
10948
|
-
|
|
10952
|
+
go("#chart-canvas")
|
|
10949
10953
|
], yt.prototype, "_chartCanvas", 2);
|
|
10950
10954
|
Ft([
|
|
10951
10955
|
at()
|
|
@@ -11207,9 +11211,9 @@ const Zf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11207
11211
|
.toast--error .toast__message { color: #981f10; }
|
|
11208
11212
|
|
|
11209
11213
|
.toast--success .toast__message { color: #0f753e; }
|
|
11210
|
-
`, gf = D`
|
|
11211
|
-
.genus-icon { pointer-events: none; }
|
|
11212
11214
|
`, pf = D`
|
|
11215
|
+
.genus-icon { pointer-events: none; }
|
|
11216
|
+
`, gf = D`
|
|
11213
11217
|
.toast
|
|
11214
11218
|
{
|
|
11215
11219
|
display: grid;
|
|
@@ -11245,7 +11249,7 @@ let ye = class extends Q {
|
|
|
11245
11249
|
`;
|
|
11246
11250
|
}
|
|
11247
11251
|
};
|
|
11248
|
-
ye.styles = [uf, ff,
|
|
11252
|
+
ye.styles = [uf, ff, gf, pf, mf];
|
|
11249
11253
|
Fi([
|
|
11250
11254
|
k({ attribute: "toast-message" })
|
|
11251
11255
|
], ye.prototype, "toastMessage", 2);
|
|
@@ -11515,7 +11519,7 @@ re([
|
|
|
11515
11519
|
k({ type: Boolean, attribute: "without-button-text" })
|
|
11516
11520
|
], St.prototype, "withoutButtonText", 2);
|
|
11517
11521
|
re([
|
|
11518
|
-
|
|
11522
|
+
go("#file-input")
|
|
11519
11523
|
], St.prototype, "_fileInput", 2);
|
|
11520
11524
|
St = re([
|
|
11521
11525
|
J("genus-file-upload")
|
|
@@ -11572,7 +11576,7 @@ const jf = () => {
|
|
|
11572
11576
|
jf();
|
|
11573
11577
|
export {
|
|
11574
11578
|
yt as GenusChart,
|
|
11575
|
-
|
|
11579
|
+
ge as GenusCheckBox,
|
|
11576
11580
|
Wf as GenusCheckBoxGroup,
|
|
11577
11581
|
Rt as GenusDataCard,
|
|
11578
11582
|
Nt as GenusDataListItem,
|