@kong-ui-public/analytics-chart 0.9.15 → 0.9.17
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/style.css +1 -1
- package/dist/vitals-chart.es.js +252 -249
- package/dist/vitals-chart.umd.js +6 -6
- package/package.json +3 -3
package/dist/vitals-chart.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var th = Object.defineProperty;
|
|
2
2
|
var eh = (n, t, e) => t in n ? th(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
3
|
var S = (n, t, e) => (eh(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
-
import { computed as E, shallowRef as ks, onMounted as Cs, onBeforeUnmount as Ps, watch as he, defineComponent as se, ref as ut, resolveComponent as nn, openBlock as X, createElementBlock as
|
|
4
|
+
import { computed as E, shallowRef as ks, onMounted as Cs, onBeforeUnmount as Ps, watch as he, defineComponent as se, ref as ut, resolveComponent as nn, openBlock as X, createElementBlock as wt, normalizeClass as wn, normalizeStyle as fe, createElementVNode as lt, toDisplayString as xt, createBlock as Jt, createCommentVNode as qt, Fragment as nr, renderList as Os, toRef as gt, inject as ir, unref as pt, reactive as Es, createVNode as Se, version as nh, toRaw as ca, h as Kc, isProxy as Zc, provide as _o, withCtx as re, createTextVNode as Le, createSlots as ih, renderSlot as rh } from "vue";
|
|
5
5
|
import { createI18n as ah, i18nTComponent as sh } from "@kong-ui-public/i18n";
|
|
6
6
|
const oh = "No data in the current time frame", lh = "Once there is traffic, it will display here", ch = "Not all data is shown in the below report. Reports are currently limited to a maximum of {maxReturned} entities.", uh = "no-name", dh = "Total", hh = {
|
|
7
7
|
ms: "ms",
|
|
@@ -587,11 +587,11 @@ function nt(n) {
|
|
|
587
587
|
function B(n) {
|
|
588
588
|
return n !== null && Object.prototype.toString.call(n) === "[object Object]";
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function _t(n) {
|
|
591
591
|
return (typeof n == "number" || n instanceof Number) && isFinite(+n);
|
|
592
592
|
}
|
|
593
593
|
function Zt(n, t) {
|
|
594
|
-
return
|
|
594
|
+
return _t(n) ? n : t;
|
|
595
595
|
}
|
|
596
596
|
function W(n, t) {
|
|
597
597
|
return typeof n > "u" ? t : n;
|
|
@@ -719,7 +719,7 @@ const Gt = (n) => typeof n < "u", Xt = (n) => typeof n == "function", Co = (n, t
|
|
|
719
719
|
function Xh(n) {
|
|
720
720
|
return n.type === "mouseup" || n.type === "click" || n.type === "contextmenu";
|
|
721
721
|
}
|
|
722
|
-
const G = Math.PI, dt = 2 * G, Gh = dt + G, sr = Number.POSITIVE_INFINITY, Ns = G / 180,
|
|
722
|
+
const G = Math.PI, dt = 2 * G, Gh = dt + G, sr = Number.POSITIVE_INFINITY, Ns = G / 180, mt = G / 2, ee = G / 4, or = G * 2 / 3, Ne = Math.log10, ge = Math.sign;
|
|
723
723
|
function Jn(n, t, e) {
|
|
724
724
|
return Math.abs(n - t) < e;
|
|
725
725
|
}
|
|
@@ -748,14 +748,14 @@ function iu(n, t, e) {
|
|
|
748
748
|
for (i = 0, r = n.length; i < r; i++)
|
|
749
749
|
a = n[i][e], isNaN(a) || (t.min = Math.min(t.min, a), t.max = Math.max(t.max, a));
|
|
750
750
|
}
|
|
751
|
-
function
|
|
751
|
+
function At(n) {
|
|
752
752
|
return n * (G / 180);
|
|
753
753
|
}
|
|
754
754
|
function _r(n) {
|
|
755
755
|
return n * (180 / G);
|
|
756
756
|
}
|
|
757
757
|
function Oo(n) {
|
|
758
|
-
if (!
|
|
758
|
+
if (!_t(n))
|
|
759
759
|
return;
|
|
760
760
|
let t = 1, e = 0;
|
|
761
761
|
for (; Math.round(n * t) / t !== n; )
|
|
@@ -929,8 +929,8 @@ const Ri = (n) => n === 0 || n === 1, Ao = (n, t, e) => -(Math.pow(2, 10 * (n -=
|
|
|
929
929
|
easeInQuint: (n) => n * n * n * n * n,
|
|
930
930
|
easeOutQuint: (n) => (n -= 1) * n * n * n * n + 1,
|
|
931
931
|
easeInOutQuint: (n) => (n /= 0.5) < 1 ? 0.5 * n * n * n * n * n : 0.5 * ((n -= 2) * n * n * n * n + 2),
|
|
932
|
-
easeInSine: (n) => -Math.cos(n *
|
|
933
|
-
easeOutSine: (n) => Math.sin(n *
|
|
932
|
+
easeInSine: (n) => -Math.cos(n * mt) + 1,
|
|
933
|
+
easeOutSine: (n) => Math.sin(n * mt),
|
|
934
934
|
easeInOutSine: (n) => -0.5 * (Math.cos(G * n) - 1),
|
|
935
935
|
easeInExpo: (n) => n === 0 ? 0 : Math.pow(2, 10 * (n - 1)),
|
|
936
936
|
easeOutExpo: (n) => n === 1 ? 1 : -Math.pow(2, -10 * n) + 1,
|
|
@@ -1310,7 +1310,7 @@ function hu(n, t, e, i, r) {
|
|
|
1310
1310
|
u = r ? r / 2 : v, n.moveTo(e + Math.sin(p) * u, i - Math.cos(p) * v), p += or, n.lineTo(e + Math.sin(p) * u, i - Math.cos(p) * v), p += or, n.lineTo(e + Math.sin(p) * u, i - Math.cos(p) * v), n.closePath();
|
|
1311
1311
|
break;
|
|
1312
1312
|
case "rectRounded":
|
|
1313
|
-
c = v * 0.516, l = v - c, s = Math.cos(p + ee) * l, d = Math.cos(p + ee) * (r ? r / 2 - c : l), o = Math.sin(p + ee) * l, h = Math.sin(p + ee) * (r ? r / 2 - c : l), n.arc(e - d, i - o, c, p - G, p -
|
|
1313
|
+
c = v * 0.516, l = v - c, s = Math.cos(p + ee) * l, d = Math.cos(p + ee) * (r ? r / 2 - c : l), o = Math.sin(p + ee) * l, h = Math.sin(p + ee) * (r ? r / 2 - c : l), n.arc(e - d, i - o, c, p - G, p - mt), n.arc(e + h, i - s, c, p - mt, p), n.arc(e + d, i + o, c, p, p + mt), n.arc(e - h, i + s, c, p + mt, p + G), n.closePath();
|
|
1314
1314
|
break;
|
|
1315
1315
|
case "rect":
|
|
1316
1316
|
if (!g) {
|
|
@@ -1390,7 +1390,7 @@ function sn(n, t, e, i, r, a = {}) {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
function Mn(n, t) {
|
|
1392
1392
|
const { x: e, y: i, w: r, h: a, radius: s } = t;
|
|
1393
|
-
n.arc(e + s.topLeft, i + s.topLeft, s.topLeft, 1.5 * G, G, !0), n.lineTo(e, i + a - s.bottomLeft), n.arc(e + s.bottomLeft, i + a - s.bottomLeft, s.bottomLeft, G,
|
|
1393
|
+
n.arc(e + s.topLeft, i + s.topLeft, s.topLeft, 1.5 * G, G, !0), n.lineTo(e, i + a - s.bottomLeft), n.arc(e + s.bottomLeft, i + a - s.bottomLeft, s.bottomLeft, G, mt, !0), n.lineTo(e + r - s.bottomRight, i + a), n.arc(e + r - s.bottomRight, i + a - s.bottomRight, s.bottomRight, mt, 0, !0), n.lineTo(e + r, i + s.topRight), n.arc(e + r - s.topRight, i + s.topRight, s.topRight, 0, -mt, !0), n.lineTo(e + s.topLeft, i);
|
|
1394
1394
|
}
|
|
1395
1395
|
const wf = /^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/, _f = /^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;
|
|
1396
1396
|
function Mf(n, t) {
|
|
@@ -1429,11 +1429,11 @@ function He(n) {
|
|
|
1429
1429
|
"bottomRight"
|
|
1430
1430
|
]);
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1432
|
+
function Rt(n) {
|
|
1433
1433
|
const t = fu(n);
|
|
1434
1434
|
return t.width = t.left + t.right, t.height = t.top + t.bottom, t;
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1436
|
+
function vt(n, t) {
|
|
1437
1437
|
n = n || {}, t = t || Dt.font;
|
|
1438
1438
|
let e = W(n.size, t.size);
|
|
1439
1439
|
typeof e == "string" && (e = parseInt(e, 10));
|
|
@@ -2430,7 +2430,7 @@ function Vo(n, t, e, i = {}) {
|
|
|
2430
2430
|
continue;
|
|
2431
2431
|
break;
|
|
2432
2432
|
}
|
|
2433
|
-
c = n.values[l],
|
|
2433
|
+
c = n.values[l], _t(c) && (a || t === 0 || ge(t) === ge(c)) && (t += c);
|
|
2434
2434
|
}
|
|
2435
2435
|
return t;
|
|
2436
2436
|
}
|
|
@@ -2660,7 +2660,7 @@ class ae {
|
|
|
2660
2660
|
function g() {
|
|
2661
2661
|
f = r[h];
|
|
2662
2662
|
const v = f[o.axis];
|
|
2663
|
-
return !
|
|
2663
|
+
return !_t(f[t.axis]) || u > v || d < v;
|
|
2664
2664
|
}
|
|
2665
2665
|
for (h = 0; h < s && !(!g() && (this.updateRangeFromParsed(c, t, f, l), a)); ++h)
|
|
2666
2666
|
;
|
|
@@ -2677,7 +2677,7 @@ class ae {
|
|
|
2677
2677
|
const e = this._cachedMeta._parsed, i = [];
|
|
2678
2678
|
let r, a, s;
|
|
2679
2679
|
for (r = 0, a = e.length; r < a; ++r)
|
|
2680
|
-
s = e[r][t.axis],
|
|
2680
|
+
s = e[r][t.axis], _t(s) && i.push(s);
|
|
2681
2681
|
return i;
|
|
2682
2682
|
}
|
|
2683
2683
|
getMaxOverflow() {
|
|
@@ -3249,7 +3249,7 @@ S(Xi, "id", "bubble"), S(Xi, "defaults", {
|
|
|
3249
3249
|
function Pg(n, t, e) {
|
|
3250
3250
|
let i = 1, r = 1, a = 0, s = 0;
|
|
3251
3251
|
if (t < dt) {
|
|
3252
|
-
const o = n, l = o + t, c = Math.cos(o), u = Math.sin(o), d = Math.cos(l), h = Math.sin(l), f = (y, x, w) => li(y, o, l, !0) ? 1 : Math.max(x, x * e, w, w * e), g = (y, x, w) => li(y, o, l, !0) ? -1 : Math.min(x, x * e, w, w * e), v = f(0, c, d), p = f(
|
|
3252
|
+
const o = n, l = o + t, c = Math.cos(o), u = Math.sin(o), d = Math.cos(l), h = Math.sin(l), f = (y, x, w) => li(y, o, l, !0) ? 1 : Math.max(x, x * e, w, w * e), g = (y, x, w) => li(y, o, l, !0) ? -1 : Math.min(x, x * e, w, w * e), v = f(0, c, d), p = f(mt, u, h), m = g(G, c, d), b = g(G + mt, u, h);
|
|
3253
3253
|
i = (v - m) / 2, r = (p - b) / 2, a = -(v + m) / 2, s = -(p + b) / 2;
|
|
3254
3254
|
}
|
|
3255
3255
|
return {
|
|
@@ -3281,10 +3281,10 @@ class Fe extends ae {
|
|
|
3281
3281
|
}
|
|
3282
3282
|
}
|
|
3283
3283
|
_getRotation() {
|
|
3284
|
-
return
|
|
3284
|
+
return At(this.options.rotation - 90);
|
|
3285
3285
|
}
|
|
3286
3286
|
_getCircumference() {
|
|
3287
|
-
return
|
|
3287
|
+
return At(this.options.circumference);
|
|
3288
3288
|
}
|
|
3289
3289
|
_getRotationExtents() {
|
|
3290
3290
|
let t = dt, e = -dt;
|
|
@@ -3563,7 +3563,7 @@ class ri extends ae {
|
|
|
3563
3563
|
}), e;
|
|
3564
3564
|
}
|
|
3565
3565
|
_computeAngle(t, e, i) {
|
|
3566
|
-
return this.chart.getDataVisibility(t) ?
|
|
3566
|
+
return this.chart.getDataVisibility(t) ? At(this.resolveDataElementOptions(t, e).angle || i) : 0;
|
|
3567
3567
|
}
|
|
3568
3568
|
}
|
|
3569
3569
|
S(ri, "id", "polarArea"), S(ri, "defaults", {
|
|
@@ -4165,7 +4165,7 @@ var Ht = {
|
|
|
4165
4165
|
update(n, t, e, i) {
|
|
4166
4166
|
if (!n)
|
|
4167
4167
|
return;
|
|
4168
|
-
const r =
|
|
4168
|
+
const r = Rt(n.options.layout.padding), a = Math.max(t - r.width, 0), s = Math.max(e - r.height, 0), o = Yg(n.boxes), l = o.vertical, c = o.horizontal;
|
|
4169
4169
|
ot(n.boxes, (v) => {
|
|
4170
4170
|
typeof v.beforeLayout == "function" && v.beforeLayout();
|
|
4171
4171
|
});
|
|
@@ -4178,7 +4178,7 @@ var Ht = {
|
|
|
4178
4178
|
vBoxMaxWidth: a / 2 / u,
|
|
4179
4179
|
hBoxMaxHeight: s / 2
|
|
4180
4180
|
}), h = Object.assign({}, r);
|
|
4181
|
-
Ou(h,
|
|
4181
|
+
Ou(h, Rt(i));
|
|
4182
4182
|
const f = Object.assign({
|
|
4183
4183
|
maxPadding: h,
|
|
4184
4184
|
w: a,
|
|
@@ -4535,7 +4535,7 @@ function Fn(n) {
|
|
|
4535
4535
|
function cl(n, t) {
|
|
4536
4536
|
if (!n.display)
|
|
4537
4537
|
return 0;
|
|
4538
|
-
const e =
|
|
4538
|
+
const e = vt(n.font, t), i = Rt(n.padding);
|
|
4539
4539
|
return (nt(n.text) ? n.text.length : 1) * e.lineHeight + i.height;
|
|
4540
4540
|
}
|
|
4541
4541
|
function dp(n, t) {
|
|
@@ -4572,7 +4572,7 @@ function gp(n, t, e, i) {
|
|
|
4572
4572
|
f = u[m].getPixelForValue(b) - p + t;
|
|
4573
4573
|
} else
|
|
4574
4574
|
e === "center" ? f = (c.left + c.right) / 2 - p + t : f = sl(n, e, t);
|
|
4575
|
-
g = Wt(i, s, r), d = e === "left" ? -
|
|
4575
|
+
g = Wt(i, s, r), d = e === "left" ? -mt : mt;
|
|
4576
4576
|
}
|
|
4577
4577
|
return {
|
|
4578
4578
|
titleX: f,
|
|
@@ -4601,8 +4601,8 @@ class cn extends Ft {
|
|
|
4601
4601
|
return t = Zt(t, Number.POSITIVE_INFINITY), e = Zt(e, Number.NEGATIVE_INFINITY), i = Zt(i, Number.POSITIVE_INFINITY), r = Zt(r, Number.NEGATIVE_INFINITY), {
|
|
4602
4602
|
min: Zt(t, i),
|
|
4603
4603
|
max: Zt(e, r),
|
|
4604
|
-
minDefined:
|
|
4605
|
-
maxDefined:
|
|
4604
|
+
minDefined: _t(t),
|
|
4605
|
+
maxDefined: _t(e)
|
|
4606
4606
|
};
|
|
4607
4607
|
}
|
|
4608
4608
|
getMinMax(t) {
|
|
@@ -4756,7 +4756,7 @@ class cn extends Ft {
|
|
|
4756
4756
|
if (s) {
|
|
4757
4757
|
const l = cl(r, e.options.font);
|
|
4758
4758
|
if (o ? (t.width = this.maxWidth, t.height = Fn(a) + l) : (t.height = this.maxHeight, t.width = Fn(a) + l), i.display && this.ticks.length) {
|
|
4759
|
-
const { first: c, last: u, widest: d, highest: h } = this._getLabelSizes(), f = i.padding * 2, g =
|
|
4759
|
+
const { first: c, last: u, widest: d, highest: h } = this._getLabelSizes(), f = i.padding * 2, g = At(this.labelRotation), v = Math.cos(g), p = Math.sin(g);
|
|
4760
4760
|
if (o) {
|
|
4761
4761
|
const m = i.mirror ? 0 : p * d.width + v * h.height;
|
|
4762
4762
|
t.height = Math.min(this.maxHeight, t.height + m + f);
|
|
@@ -4876,7 +4876,7 @@ class cn extends Ft {
|
|
|
4876
4876
|
return this.$context || (this.$context = dp(this.chart.getContext(), this));
|
|
4877
4877
|
}
|
|
4878
4878
|
_tickSize() {
|
|
4879
|
-
const t = this.options.ticks, e =
|
|
4879
|
+
const t = this.options.ticks, e = At(this.labelRotation), i = Math.abs(Math.cos(e)), r = Math.abs(Math.sin(e)), a = this._getLabelSizes(), s = t.autoSkipPadding || 0, o = a ? a.widest.width + s : 0, l = a ? a.highest.height + s : 0;
|
|
4880
4880
|
return this.isHorizontal() ? l * i > o * r ? o / i : l / r : l * r < o * i ? l / i : o / r;
|
|
4881
4881
|
}
|
|
4882
4882
|
_isVisible() {
|
|
@@ -4915,7 +4915,7 @@ class cn extends Ft {
|
|
|
4915
4915
|
}
|
|
4916
4916
|
const ht = W(r.ticks.maxTicksLimit, d), I = Math.max(1, Math.ceil(d / ht));
|
|
4917
4917
|
for (y = 0; y < d; y += I) {
|
|
4918
|
-
const H = this.getContext(y), K = a.setContext(H),
|
|
4918
|
+
const H = this.getContext(y), K = a.setContext(H), Lt = o.setContext(H), k = K.lineWidth, L = K.color, F = Lt.dash || [], z = Lt.dashOffset, j = K.tickWidth, q = K.tickColor, yt = K.tickBorderDash || [], ft = K.tickBorderDashOffset;
|
|
4919
4919
|
x = cp(this, y, l), x !== void 0 && (w = Ke(i, x, k), c ? _ = T = O = N = w : M = D = R = V = w, f.push({
|
|
4920
4920
|
tx1: _,
|
|
4921
4921
|
ty1: M,
|
|
@@ -4931,14 +4931,14 @@ class cn extends Ft {
|
|
|
4931
4931
|
borderDashOffset: z,
|
|
4932
4932
|
tickWidth: j,
|
|
4933
4933
|
tickColor: q,
|
|
4934
|
-
tickBorderDash:
|
|
4934
|
+
tickBorderDash: yt,
|
|
4935
4935
|
tickBorderDashOffset: ft
|
|
4936
4936
|
}));
|
|
4937
4937
|
}
|
|
4938
4938
|
return this._ticksLength = d, this._borderValue = b, f;
|
|
4939
4939
|
}
|
|
4940
4940
|
_computeLabelItems(t) {
|
|
4941
|
-
const e = this.axis, i = this.options, { position: r, ticks: a } = i, s = this.isHorizontal(), o = this.ticks, { align: l, crossAlign: c, padding: u, mirror: d } = a, h = Fn(i.grid), f = h + u, g = d ? -u : f, v = -
|
|
4941
|
+
const e = this.axis, i = this.options, { position: r, ticks: a } = i, s = this.isHorizontal(), o = this.ticks, { align: l, crossAlign: c, padding: u, mirror: d } = a, h = Fn(i.grid), f = h + u, g = d ? -u : f, v = -At(this.labelRotation), p = [];
|
|
4942
4942
|
let m, b, y, x, w, _, M, T, D, O, R, N, V = "middle";
|
|
4943
4943
|
if (r === "top")
|
|
4944
4944
|
_ = this.bottom - g, M = this._getXAxisLabelAlignment();
|
|
@@ -4973,19 +4973,19 @@ class cn extends Ft {
|
|
|
4973
4973
|
y = o[m], x = y.label;
|
|
4974
4974
|
const I = a.setContext(this.getContext(m));
|
|
4975
4975
|
T = this.getPixelForTick(m) + a.labelOffset, D = this._resolveTickFontOptions(m), O = D.lineHeight, R = nt(x) ? x.length : 1;
|
|
4976
|
-
const H = R / 2, K = I.color,
|
|
4976
|
+
const H = R / 2, K = I.color, Lt = I.textStrokeColor, k = I.textStrokeWidth;
|
|
4977
4977
|
let L = M;
|
|
4978
4978
|
s ? (w = T, M === "inner" && (m === b - 1 ? L = this.options.reverse ? "left" : "right" : m === 0 ? L = this.options.reverse ? "right" : "left" : L = "center"), r === "top" ? c === "near" || v !== 0 ? N = -R * O + O / 2 : c === "center" ? N = -ht.highest.height / 2 - H * O + O : N = -ht.highest.height + O / 2 : c === "near" || v !== 0 ? N = O / 2 : c === "center" ? N = ht.highest.height / 2 - H * O : N = ht.highest.height - R * O, d && (N *= -1), v !== 0 && !I.showLabelBackdrop && (w += O / 2 * Math.sin(v))) : (_ = T, N = (1 - R) * O / 2);
|
|
4979
4979
|
let F;
|
|
4980
4980
|
if (I.showLabelBackdrop) {
|
|
4981
|
-
const z =
|
|
4982
|
-
let
|
|
4981
|
+
const z = Rt(I.backdropPadding), j = ht.heights[m], q = ht.widths[m];
|
|
4982
|
+
let yt = N - z.top, ft = 0 - z.left;
|
|
4983
4983
|
switch (V) {
|
|
4984
4984
|
case "middle":
|
|
4985
|
-
|
|
4985
|
+
yt -= j / 2;
|
|
4986
4986
|
break;
|
|
4987
4987
|
case "bottom":
|
|
4988
|
-
|
|
4988
|
+
yt -= j;
|
|
4989
4989
|
break;
|
|
4990
4990
|
}
|
|
4991
4991
|
switch (M) {
|
|
@@ -4998,7 +4998,7 @@ class cn extends Ft {
|
|
|
4998
4998
|
}
|
|
4999
4999
|
F = {
|
|
5000
5000
|
left: ft,
|
|
5001
|
-
top:
|
|
5001
|
+
top: yt,
|
|
5002
5002
|
width: q + z.width,
|
|
5003
5003
|
height: j + z.height,
|
|
5004
5004
|
color: I.backdropColor
|
|
@@ -5011,7 +5011,7 @@ class cn extends Ft {
|
|
|
5011
5011
|
options: {
|
|
5012
5012
|
rotation: v,
|
|
5013
5013
|
color: K,
|
|
5014
|
-
strokeColor:
|
|
5014
|
+
strokeColor: Lt,
|
|
5015
5015
|
strokeWidth: k,
|
|
5016
5016
|
textAlign: L,
|
|
5017
5017
|
textBaseline: V,
|
|
@@ -5027,7 +5027,7 @@ class cn extends Ft {
|
|
|
5027
5027
|
}
|
|
5028
5028
|
_getXAxisLabelAlignment() {
|
|
5029
5029
|
const { position: t, ticks: e } = this.options;
|
|
5030
|
-
if (-
|
|
5030
|
+
if (-At(this.labelRotation))
|
|
5031
5031
|
return t === "top" ? "left" : "right";
|
|
5032
5032
|
let r = "center";
|
|
5033
5033
|
return e.align === "start" ? r = "left" : e.align === "end" ? r = "right" : e.align === "inner" && (r = "inner"), r;
|
|
@@ -5123,7 +5123,7 @@ class cn extends Ft {
|
|
|
5123
5123
|
const { ctx: t, options: { position: e, title: i, reverse: r } } = this;
|
|
5124
5124
|
if (!i.display)
|
|
5125
5125
|
return;
|
|
5126
|
-
const a =
|
|
5126
|
+
const a = vt(i.font), s = Rt(i.padding), o = i.align;
|
|
5127
5127
|
let l = a.lineHeight / 2;
|
|
5128
5128
|
e === "bottom" || e === "center" || B(e) ? (l += s.bottom, nt(i.text) && (l += a.lineHeight * (i.text.length - 1))) : l += s.top;
|
|
5129
5129
|
const { titleX: c, titleY: u, maxWidth: d, rotation: h } = gp(this, l, e, o);
|
|
@@ -5183,7 +5183,7 @@ class cn extends Ft {
|
|
|
5183
5183
|
}
|
|
5184
5184
|
_resolveTickFontOptions(t) {
|
|
5185
5185
|
const e = this.options.ticks.setContext(this.getContext(t));
|
|
5186
|
-
return
|
|
5186
|
+
return vt(e.font);
|
|
5187
5187
|
}
|
|
5188
5188
|
_maxDigits() {
|
|
5189
5189
|
const t = this._resolveTickFontOptions(0).lineHeight;
|
|
@@ -6191,7 +6191,7 @@ function bl() {
|
|
|
6191
6191
|
function Wp(n, t, e) {
|
|
6192
6192
|
const { startAngle: i, pixelMargin: r, x: a, y: s, outerRadius: o, innerRadius: l } = t;
|
|
6193
6193
|
let c = r / o;
|
|
6194
|
-
n.beginPath(), n.arc(a, s, o, i - c, e + c), l > r ? (c = r / l, n.arc(a, s, l, e + c, i - c, !0)) : n.arc(a, s, r, e +
|
|
6194
|
+
n.beginPath(), n.arc(a, s, o, i - c, e + c), l > r ? (c = r / l, n.arc(a, s, l, e + c, i - c, !0)) : n.arc(a, s, r, e + mt, i - mt), n.closePath(), n.clip();
|
|
6195
6195
|
}
|
|
6196
6196
|
function Up(n) {
|
|
6197
6197
|
return Us(n, [
|
|
@@ -6224,37 +6224,37 @@ function dr(n, t, e, i, r, a) {
|
|
|
6224
6224
|
let f = 0;
|
|
6225
6225
|
const g = r - l;
|
|
6226
6226
|
if (i) {
|
|
6227
|
-
const I = u > 0 ? u - i : 0, H = d > 0 ? d - i : 0, K = (I + H) / 2,
|
|
6228
|
-
f = (g -
|
|
6227
|
+
const I = u > 0 ? u - i : 0, H = d > 0 ? d - i : 0, K = (I + H) / 2, Lt = K !== 0 ? g * K / (K + i) : g;
|
|
6228
|
+
f = (g - Lt) / 2;
|
|
6229
6229
|
}
|
|
6230
6230
|
const v = Math.max(1e-3, g * d - e / G) / d, p = (g - v) / 2, m = l + p + f, b = r - p - f, { outerStart: y, outerEnd: x, innerStart: w, innerEnd: _ } = Hp(t, h, d, b - m), M = d - y, T = d - x, D = m + y / M, O = b - x / T, R = h + w, N = h + _, V = m + w / R, ht = b - _ / N;
|
|
6231
6231
|
if (n.beginPath(), a) {
|
|
6232
6232
|
const I = (D + O) / 2;
|
|
6233
6233
|
if (n.arc(s, o, d, D, I), n.arc(s, o, d, I, O), x > 0) {
|
|
6234
6234
|
const k = gn(T, O, s, o);
|
|
6235
|
-
n.arc(k.x, k.y, x, O, b +
|
|
6235
|
+
n.arc(k.x, k.y, x, O, b + mt);
|
|
6236
6236
|
}
|
|
6237
6237
|
const H = gn(N, b, s, o);
|
|
6238
6238
|
if (n.lineTo(H.x, H.y), _ > 0) {
|
|
6239
6239
|
const k = gn(N, ht, s, o);
|
|
6240
|
-
n.arc(k.x, k.y, _, b +
|
|
6240
|
+
n.arc(k.x, k.y, _, b + mt, ht + Math.PI);
|
|
6241
6241
|
}
|
|
6242
6242
|
const K = (b - _ / h + (m + w / h)) / 2;
|
|
6243
6243
|
if (n.arc(s, o, h, b - _ / h, K, !0), n.arc(s, o, h, K, m + w / h, !0), w > 0) {
|
|
6244
6244
|
const k = gn(R, V, s, o);
|
|
6245
|
-
n.arc(k.x, k.y, w, V + Math.PI, m -
|
|
6245
|
+
n.arc(k.x, k.y, w, V + Math.PI, m - mt);
|
|
6246
6246
|
}
|
|
6247
|
-
const
|
|
6248
|
-
if (n.lineTo(
|
|
6247
|
+
const Lt = gn(M, m, s, o);
|
|
6248
|
+
if (n.lineTo(Lt.x, Lt.y), y > 0) {
|
|
6249
6249
|
const k = gn(M, D, s, o);
|
|
6250
|
-
n.arc(k.x, k.y, y, m -
|
|
6250
|
+
n.arc(k.x, k.y, y, m - mt, D);
|
|
6251
6251
|
}
|
|
6252
6252
|
} else {
|
|
6253
6253
|
n.moveTo(s, o);
|
|
6254
6254
|
const I = Math.cos(D) * d + s, H = Math.sin(D) * d + o;
|
|
6255
6255
|
n.lineTo(I, H);
|
|
6256
|
-
const K = Math.cos(O) * d + s,
|
|
6257
|
-
n.lineTo(K,
|
|
6256
|
+
const K = Math.cos(O) * d + s, Lt = Math.sin(O) * d + o;
|
|
6257
|
+
n.lineTo(K, Lt);
|
|
6258
6258
|
}
|
|
6259
6259
|
n.closePath();
|
|
6260
6260
|
}
|
|
@@ -6992,7 +6992,7 @@ function vm(n, t, e) {
|
|
|
6992
6992
|
if (!e)
|
|
6993
6993
|
return r;
|
|
6994
6994
|
for (; r !== !1 && a.indexOf(r) === -1; ) {
|
|
6995
|
-
if (!
|
|
6995
|
+
if (!_t(r))
|
|
6996
6996
|
return r;
|
|
6997
6997
|
if (s = n[r], !s)
|
|
6998
6998
|
return !1;
|
|
@@ -7007,7 +7007,7 @@ function bm(n, t, e) {
|
|
|
7007
7007
|
if (B(i))
|
|
7008
7008
|
return isNaN(i.value) ? !1 : i;
|
|
7009
7009
|
let r = parseFloat(i);
|
|
7010
|
-
return
|
|
7010
|
+
return _t(r) && Math.floor(r) === r ? ym(i[0], t, r, e) : [
|
|
7011
7011
|
"origin",
|
|
7012
7012
|
"start",
|
|
7013
7013
|
"end",
|
|
@@ -7111,7 +7111,7 @@ class ju {
|
|
|
7111
7111
|
}
|
|
7112
7112
|
function km(n) {
|
|
7113
7113
|
const { chart: t, fill: e, line: i } = n;
|
|
7114
|
-
if (
|
|
7114
|
+
if (_t(e))
|
|
7115
7115
|
return Cm(t, e);
|
|
7116
7116
|
if (e === "stack")
|
|
7117
7117
|
return Mm(n);
|
|
@@ -7129,7 +7129,7 @@ function Pm(n) {
|
|
|
7129
7129
|
}
|
|
7130
7130
|
function Om(n) {
|
|
7131
7131
|
const { scale: t = {}, fill: e } = n, i = xm(e, t);
|
|
7132
|
-
if (
|
|
7132
|
+
if (_t(i)) {
|
|
7133
7133
|
const r = t.isHorizontal();
|
|
7134
7134
|
return {
|
|
7135
7135
|
x: r ? i : null,
|
|
@@ -7292,7 +7292,7 @@ class Pl extends Ft {
|
|
|
7292
7292
|
this.width = this.height = 0;
|
|
7293
7293
|
return;
|
|
7294
7294
|
}
|
|
7295
|
-
const i = t.labels, r =
|
|
7295
|
+
const i = t.labels, r = vt(i.font), a = r.size, s = this._computeTitleHeight(), { boxWidth: o, itemHeight: l } = Cl(i, a);
|
|
7296
7296
|
let c, u;
|
|
7297
7297
|
e.font = r.string, this.isHorizontal() ? (c = this.maxWidth, u = this._fitRows(s, a, o, l) + 10) : (u = this.maxHeight, c = this._fitCols(s, r, o, l) + 10), this.width = Math.min(c, t.maxWidth || this.maxWidth), this.height = Math.min(u, t.maxHeight || this.maxHeight);
|
|
7298
7298
|
}
|
|
@@ -7358,7 +7358,7 @@ class Pl extends Ft {
|
|
|
7358
7358
|
}
|
|
7359
7359
|
}
|
|
7360
7360
|
_draw() {
|
|
7361
|
-
const { options: t, columnSizes: e, lineWidths: i, ctx: r } = this, { align: a, labels: s } = t, o = Dt.color, l = bn(t.rtl, this.left, this.width), c =
|
|
7361
|
+
const { options: t, columnSizes: e, lineWidths: i, ctx: r } = this, { align: a, labels: s } = t, o = Dt.color, l = bn(t.rtl, this.left, this.width), c = vt(s.font), { padding: u } = s, d = c.size, h = d / 2;
|
|
7362
7362
|
let f;
|
|
7363
7363
|
this.drawTitle(), r.textAlign = l.textAlign("left"), r.textBaseline = "middle", r.lineWidth = 0.5, r.font = c.string;
|
|
7364
7364
|
const { boxWidth: g, boxHeight: v, itemHeight: p } = Cl(s, d), m = function(_, M, T) {
|
|
@@ -7417,7 +7417,7 @@ class Pl extends Ft {
|
|
|
7417
7417
|
}), _u(this.ctx, t.textDirection);
|
|
7418
7418
|
}
|
|
7419
7419
|
drawTitle() {
|
|
7420
|
-
const t = this.options, e = t.title, i =
|
|
7420
|
+
const t = this.options, e = t.title, i = vt(e.font), r = Rt(e.padding);
|
|
7421
7421
|
if (!e.display)
|
|
7422
7422
|
return;
|
|
7423
7423
|
const a = bn(t.rtl, this.left, this.width), s = this.ctx, o = e.position, l = i.size / 2, c = r.top + l;
|
|
@@ -7432,7 +7432,7 @@ class Pl extends Ft {
|
|
|
7432
7432
|
s.textAlign = a.textAlign(Ys(o)), s.textBaseline = "middle", s.strokeStyle = e.color, s.fillStyle = e.color, s.font = i.string, sn(s, e.text, f, u, i);
|
|
7433
7433
|
}
|
|
7434
7434
|
_computeTitleHeight() {
|
|
7435
|
-
const t = this.options.title, e =
|
|
7435
|
+
const t = this.options.title, e = vt(t.font), i = Rt(t.padding);
|
|
7436
7436
|
return t.display ? e.lineHeight + i.height : 0;
|
|
7437
7437
|
}
|
|
7438
7438
|
_getLegendItemAt(t, e) {
|
|
@@ -7535,7 +7535,7 @@ var Um = {
|
|
|
7535
7535
|
generateLabels(n) {
|
|
7536
7536
|
const t = n.data.datasets, { labels: { usePointStyle: e, pointStyle: i, textAlign: r, color: a, useBorderRadius: s, borderRadius: o } } = n.legend.options;
|
|
7537
7537
|
return n._getSortedDatasetMetas().map((l) => {
|
|
7538
|
-
const c = l.controller.getStyle(e ? 0 : void 0), u =
|
|
7538
|
+
const c = l.controller.getStyle(e ? 0 : void 0), u = Rt(c.borderWidth);
|
|
7539
7539
|
return {
|
|
7540
7540
|
text: t[l.index].label,
|
|
7541
7541
|
fillStyle: c.backgroundColor,
|
|
@@ -7586,8 +7586,8 @@ class Xs extends Ft {
|
|
|
7586
7586
|
}
|
|
7587
7587
|
this.width = this.right = t, this.height = this.bottom = e;
|
|
7588
7588
|
const r = nt(i.text) ? i.text.length : 1;
|
|
7589
|
-
this._padding =
|
|
7590
|
-
const a = r *
|
|
7589
|
+
this._padding = Rt(i.padding);
|
|
7590
|
+
const a = r * vt(i.font).lineHeight + this._padding.height;
|
|
7591
7591
|
this.isHorizontal() ? this.height = a : this.width = a;
|
|
7592
7592
|
}
|
|
7593
7593
|
isHorizontal() {
|
|
@@ -7608,7 +7608,7 @@ class Xs extends Ft {
|
|
|
7608
7608
|
const t = this.ctx, e = this.options;
|
|
7609
7609
|
if (!e.display)
|
|
7610
7610
|
return;
|
|
7611
|
-
const i =
|
|
7611
|
+
const i = vt(e.font), a = i.lineHeight / 2 + this._padding.top, { titleX: s, titleY: o, maxWidth: l, rotation: c } = this._drawArgs(a);
|
|
7612
7612
|
sn(t, e.text, 0, 0, i, {
|
|
7613
7613
|
color: e.color,
|
|
7614
7614
|
maxWidth: l,
|
|
@@ -7763,7 +7763,7 @@ function Bm(n, t) {
|
|
|
7763
7763
|
};
|
|
7764
7764
|
}
|
|
7765
7765
|
function Ol(n, t) {
|
|
7766
|
-
const e = n.chart.ctx, { body: i, footer: r, title: a } = n, { boxWidth: s, boxHeight: o } = t, l =
|
|
7766
|
+
const e = n.chart.ctx, { body: i, footer: r, title: a } = n, { boxWidth: s, boxHeight: o } = t, l = vt(t.bodyFont), c = vt(t.titleFont), u = vt(t.footerFont), d = a.length, h = r.length, f = i.length, g = Rt(t.padding);
|
|
7767
7767
|
let v = g.height, p = 0, m = i.reduce((x, w) => x + w.before.length + w.lines.length + w.after.length, 0);
|
|
7768
7768
|
if (m += n.beforeBody.length + n.afterBody.length, d && (v += d * c.lineHeight + (d - 1) * t.titleSpacing + t.titleMarginBottom), m) {
|
|
7769
7769
|
const x = t.displayColors ? Math.max(o, l.lineHeight) : l.lineHeight;
|
|
@@ -7820,7 +7820,7 @@ function Al(n, t, e, i) {
|
|
|
7820
7820
|
};
|
|
7821
7821
|
}
|
|
7822
7822
|
function zi(n, t, e) {
|
|
7823
|
-
const i =
|
|
7823
|
+
const i = Rt(e.padding);
|
|
7824
7824
|
return t === "center" ? n.x + n.width / 2 : t === "right" ? n.x + n.width - i.right : n.x + i.left;
|
|
7825
7825
|
}
|
|
7826
7826
|
function Rl(n) {
|
|
@@ -7995,12 +7995,12 @@ class xa extends Ft {
|
|
|
7995
7995
|
let s, o, l;
|
|
7996
7996
|
if (a) {
|
|
7997
7997
|
const c = bn(i.rtl, this.x, this.width);
|
|
7998
|
-
for (t.x = zi(this, i.titleAlign, i), e.textAlign = c.textAlign(i.titleAlign), e.textBaseline = "middle", s =
|
|
7998
|
+
for (t.x = zi(this, i.titleAlign, i), e.textAlign = c.textAlign(i.titleAlign), e.textBaseline = "middle", s = vt(i.titleFont), o = i.titleSpacing, e.fillStyle = i.titleColor, e.font = s.string, l = 0; l < a; ++l)
|
|
7999
7999
|
e.fillText(r[l], c.x(t.x), t.y + s.lineHeight / 2), t.y += s.lineHeight + o, l + 1 === a && (t.y += i.titleMarginBottom - o);
|
|
8000
8000
|
}
|
|
8001
8001
|
}
|
|
8002
8002
|
_drawColorBox(t, e, i, r, a) {
|
|
8003
|
-
const s = this.labelColors[i], o = this.labelPointStyles[i], { boxHeight: l, boxWidth: c } = a, u =
|
|
8003
|
+
const s = this.labelColors[i], o = this.labelPointStyles[i], { boxHeight: l, boxWidth: c } = a, u = vt(a.bodyFont), d = zi(this, "left", a), h = r.x(d), f = l < u.lineHeight ? (u.lineHeight - l) / 2 : 0, g = e.y + f;
|
|
8004
8004
|
if (a.usePointStyle) {
|
|
8005
8005
|
const v = {
|
|
8006
8006
|
radius: Math.min(c, l) / 2,
|
|
@@ -8029,7 +8029,7 @@ class xa extends Ft {
|
|
|
8029
8029
|
t.fillStyle = this.labelTextColors[i];
|
|
8030
8030
|
}
|
|
8031
8031
|
drawBody(t, e, i) {
|
|
8032
|
-
const { body: r } = this, { bodySpacing: a, bodyAlign: s, displayColors: o, boxHeight: l, boxWidth: c, boxPadding: u } = i, d =
|
|
8032
|
+
const { body: r } = this, { bodySpacing: a, bodyAlign: s, displayColors: o, boxHeight: l, boxWidth: c, boxPadding: u } = i, d = vt(i.bodyFont);
|
|
8033
8033
|
let h = d.lineHeight, f = 0;
|
|
8034
8034
|
const g = bn(i.rtl, this.x, this.width), v = function(T) {
|
|
8035
8035
|
e.fillText(T, g.x(t.x + f), t.y + h / 2), t.y += h + a;
|
|
@@ -8047,7 +8047,7 @@ class xa extends Ft {
|
|
|
8047
8047
|
let s, o;
|
|
8048
8048
|
if (a) {
|
|
8049
8049
|
const l = bn(i.rtl, this.x, this.width);
|
|
8050
|
-
for (t.x = zi(this, i.footerAlign, i), t.y += i.footerMarginTop, e.textAlign = l.textAlign(i.footerAlign), e.textBaseline = "middle", s =
|
|
8050
|
+
for (t.x = zi(this, i.footerAlign, i), t.y += i.footerMarginTop, e.textAlign = l.textAlign(i.footerAlign), e.textBaseline = "middle", s = vt(i.footerFont), e.fillStyle = i.footerColor, e.font = s.string, o = 0; o < a; ++o)
|
|
8051
8051
|
e.fillText(r[o], l.x(t.x), t.y + s.lineHeight / 2), t.y += s.lineHeight + i.footerSpacing;
|
|
8052
8052
|
}
|
|
8053
8053
|
}
|
|
@@ -8082,7 +8082,7 @@ class xa extends Ft {
|
|
|
8082
8082
|
y: this.y
|
|
8083
8083
|
};
|
|
8084
8084
|
i = Math.abs(i) < 1e-3 ? 0 : i;
|
|
8085
|
-
const s =
|
|
8085
|
+
const s = Rt(e.padding), o = this.title.length || this.beforeBody.length || this.body.length || this.afterBody.length || this.footer.length;
|
|
8086
8086
|
e.enabled && o && (t.save(), t.globalAlpha = i, this.drawBackground(a, t, r, e), wu(t, e.textDirection), a.y += s.top, this.drawTitle(a, t, e), this.drawBody(a, t, e), this.drawFooter(a, t, e), _u(t, e.textDirection), t.restore());
|
|
8087
8087
|
}
|
|
8088
8088
|
getActiveElements() {
|
|
@@ -8360,7 +8360,7 @@ function ev(n, t) {
|
|
|
8360
8360
|
}), e;
|
|
8361
8361
|
}
|
|
8362
8362
|
function Nl(n, t, { horizontal: e, minRotation: i }) {
|
|
8363
|
-
const r =
|
|
8363
|
+
const r = At(i), a = (e ? Math.sin(r) : Math.cos(r)) || 1e-3, s = 0.75 * t * ("" + n).length;
|
|
8364
8364
|
return Math.min(t / a, s);
|
|
8365
8365
|
}
|
|
8366
8366
|
class hr extends cn {
|
|
@@ -8427,10 +8427,10 @@ class hr extends cn {
|
|
|
8427
8427
|
class _a extends hr {
|
|
8428
8428
|
determineDataLimits() {
|
|
8429
8429
|
const { min: t, max: e } = this.getMinMax(!0);
|
|
8430
|
-
this.min =
|
|
8430
|
+
this.min = _t(t) ? t : 0, this.max = _t(e) ? e : 1, this.handleTickRangeOptions();
|
|
8431
8431
|
}
|
|
8432
8432
|
computeTickLimit() {
|
|
8433
|
-
const t = this.isHorizontal(), e = t ? this.width : this.height, i =
|
|
8433
|
+
const t = this.isHorizontal(), e = t ? this.width : this.height, i = At(this.options.ticks.minRotation), r = (t ? Math.sin(i) : Math.cos(i)) || 1e-3, a = this._resolveTickFontOptions(0);
|
|
8434
8434
|
return Math.ceil(e / Math.min(40, a.lineHeight / r));
|
|
8435
8435
|
}
|
|
8436
8436
|
getPixelForValue(t) {
|
|
@@ -8494,11 +8494,11 @@ class Ma extends cn {
|
|
|
8494
8494
|
this._zero = !0;
|
|
8495
8495
|
return;
|
|
8496
8496
|
}
|
|
8497
|
-
return
|
|
8497
|
+
return _t(i) && i > 0 ? i : null;
|
|
8498
8498
|
}
|
|
8499
8499
|
determineDataLimits() {
|
|
8500
8500
|
const { min: t, max: e } = this.getMinMax(!0);
|
|
8501
|
-
this.min =
|
|
8501
|
+
this.min = _t(t) ? Math.max(0, t) : null, this.max = _t(e) ? Math.max(0, e) : null, this.options.beginAtZero && (this._zero = !0), this._zero && this.min !== this._suggestedMin && !_t(this._userMin) && (this.min = t === Qe(this.min, 0) ? Qe(this.min, -1) : Qe(this.min, 0)), this.handleTickRangeOptions();
|
|
8502
8502
|
}
|
|
8503
8503
|
handleTickRangeOptions() {
|
|
8504
8504
|
const { minDefined: t, maxDefined: e } = this.getUserBounds();
|
|
@@ -8539,7 +8539,7 @@ S(Ma, "id", "logarithmic"), S(Ma, "defaults", {
|
|
|
8539
8539
|
function Ta(n) {
|
|
8540
8540
|
const t = n.ticks;
|
|
8541
8541
|
if (t.display && n.display) {
|
|
8542
|
-
const e =
|
|
8542
|
+
const e = Rt(t.backdropPadding);
|
|
8543
8543
|
return W(t.font && t.font.size, Dt.font.size) + e.height;
|
|
8544
8544
|
}
|
|
8545
8545
|
return 0;
|
|
@@ -8574,7 +8574,7 @@ function av(n) {
|
|
|
8574
8574
|
for (let l = 0; l < a; l++) {
|
|
8575
8575
|
const c = s.setContext(n.getPointLabelContext(l));
|
|
8576
8576
|
r[l] = c.padding;
|
|
8577
|
-
const u = n.getPointPosition(l, n.drawingArea + r[l], o), d =
|
|
8577
|
+
const u = n.getPointPosition(l, n.drawingArea + r[l], o), d = vt(c.font), h = rv(n.ctx, d, n._pointLabels[l]);
|
|
8578
8578
|
i[l] = h;
|
|
8579
8579
|
const f = Qt(n.getIndexAngle(l) + o), g = Math.round(_r(f)), v = Wl(g, u.x, h.w, 0, 180), p = Wl(g, u.y, h.h, 90, 270);
|
|
8580
8580
|
sv(e, t, f, v, p);
|
|
@@ -8587,7 +8587,7 @@ function sv(n, t, e, i, r) {
|
|
|
8587
8587
|
i.start < t.l ? (o = (t.l - i.start) / a, n.l = Math.min(n.l, t.l - o)) : i.end > t.r && (o = (i.end - t.r) / a, n.r = Math.max(n.r, t.r + o)), r.start < t.t ? (l = (t.t - r.start) / s, n.t = Math.min(n.t, t.t - l)) : r.end > t.b && (l = (r.end - t.b) / s, n.b = Math.max(n.b, t.b + l));
|
|
8588
8588
|
}
|
|
8589
8589
|
function ov(n, t, e) {
|
|
8590
|
-
const i = n.drawingArea, { extra: r, additionalAngle: a, padding: s, size: o } = e, l = n.getPointPosition(t, i + r + s, a), c = Math.round(_r(Qt(l.angle +
|
|
8590
|
+
const i = n.drawingArea, { extra: r, additionalAngle: a, padding: s, size: o } = e, l = n.getPointPosition(t, i + r + s, a), c = Math.round(_r(Qt(l.angle + mt))), u = hv(l.y, o.h, c), d = uv(c), h = dv(l.x, o.w, d);
|
|
8591
8591
|
return {
|
|
8592
8592
|
visible: !0,
|
|
8593
8593
|
x: l.x,
|
|
@@ -8642,7 +8642,7 @@ function hv(n, t, e) {
|
|
|
8642
8642
|
function fv(n, t, e) {
|
|
8643
8643
|
const { left: i, top: r, right: a, bottom: s } = e, { backdropColor: o } = t;
|
|
8644
8644
|
if (!U(o)) {
|
|
8645
|
-
const l = He(t.borderRadius), c =
|
|
8645
|
+
const l = He(t.borderRadius), c = Rt(t.backdropPadding);
|
|
8646
8646
|
n.fillStyle = o;
|
|
8647
8647
|
const u = i - c.left, d = r - c.top, h = a - i + c.width, f = s - r + c.height;
|
|
8648
8648
|
Object.values(l).some((g) => g !== 0) ? (n.beginPath(), Mn(n, {
|
|
@@ -8662,7 +8662,7 @@ function gv(n, t) {
|
|
|
8662
8662
|
continue;
|
|
8663
8663
|
const s = i.setContext(n.getPointLabelContext(r));
|
|
8664
8664
|
fv(e, s, a);
|
|
8665
|
-
const o =
|
|
8665
|
+
const o = vt(s.font), { x: l, y: c, textAlign: u } = a;
|
|
8666
8666
|
sn(e, n._pointLabels[r], l, c + o.lineHeight / 2, o, {
|
|
8667
8667
|
color: s.color,
|
|
8668
8668
|
textAlign: u,
|
|
@@ -8697,12 +8697,12 @@ class Gn extends hr {
|
|
|
8697
8697
|
super(t), this.xCenter = void 0, this.yCenter = void 0, this.drawingArea = void 0, this._pointLabels = [], this._pointLabelItems = [];
|
|
8698
8698
|
}
|
|
8699
8699
|
setDimensions() {
|
|
8700
|
-
const t = this._padding =
|
|
8700
|
+
const t = this._padding = Rt(Ta(this.options) / 2), e = this.width = this.maxWidth - t.width, i = this.height = this.maxHeight - t.height;
|
|
8701
8701
|
this.xCenter = Math.floor(this.left + e / 2 + t.left), this.yCenter = Math.floor(this.top + i / 2 + t.top), this.drawingArea = Math.floor(Math.min(e, i) / 2);
|
|
8702
8702
|
}
|
|
8703
8703
|
determineDataLimits() {
|
|
8704
8704
|
const { min: t, max: e } = this.getMinMax(!1);
|
|
8705
|
-
this.min =
|
|
8705
|
+
this.min = _t(t) && !isNaN(t) ? t : 0, this.max = _t(e) && !isNaN(e) ? e : 0, this.handleTickRangeOptions();
|
|
8706
8706
|
}
|
|
8707
8707
|
computeTickLimit() {
|
|
8708
8708
|
return Math.ceil(this.drawingArea / Ta(this.options));
|
|
@@ -8725,7 +8725,7 @@ class Gn extends hr {
|
|
|
8725
8725
|
}
|
|
8726
8726
|
getIndexAngle(t) {
|
|
8727
8727
|
const e = dt / (this._pointLabels.length || 1), i = this.options.startAngle || 0;
|
|
8728
|
-
return Qt(t * e +
|
|
8728
|
+
return Qt(t * e + At(i));
|
|
8729
8729
|
}
|
|
8730
8730
|
getDistanceFromCenterForValue(t) {
|
|
8731
8731
|
if (U(t))
|
|
@@ -8747,7 +8747,7 @@ class Gn extends hr {
|
|
|
8747
8747
|
}
|
|
8748
8748
|
}
|
|
8749
8749
|
getPointPosition(t, e, i = 0) {
|
|
8750
|
-
const r = this.getIndexAngle(t) -
|
|
8750
|
+
const r = this.getIndexAngle(t) - mt + i;
|
|
8751
8751
|
return {
|
|
8752
8752
|
x: Math.cos(r) * e + this.xCenter,
|
|
8753
8753
|
y: Math.sin(r) * e + this.yCenter,
|
|
@@ -8804,10 +8804,10 @@ class Gn extends hr {
|
|
|
8804
8804
|
t.save(), t.translate(this.xCenter, this.yCenter), t.rotate(r), t.textAlign = "center", t.textBaseline = "middle", this.ticks.forEach((o, l) => {
|
|
8805
8805
|
if (l === 0 && !e.reverse)
|
|
8806
8806
|
return;
|
|
8807
|
-
const c = i.setContext(this.getContext(l)), u =
|
|
8807
|
+
const c = i.setContext(this.getContext(l)), u = vt(c.font);
|
|
8808
8808
|
if (a = this.getDistanceFromCenterForValue(this.ticks[l].value), c.showLabelBackdrop) {
|
|
8809
8809
|
t.font = u.string, s = t.measureText(o.label).width, t.fillStyle = c.backdropColor;
|
|
8810
|
-
const d =
|
|
8810
|
+
const d = Rt(c.backdropPadding);
|
|
8811
8811
|
t.fillRect(-s / 2 - d.left, -a - u.size / 2 - d.top, s + d.width, u.size + d.height);
|
|
8812
8812
|
}
|
|
8813
8813
|
sn(t, o.label, 0, -a, u, {
|
|
@@ -8914,7 +8914,7 @@ function Hl(n, t) {
|
|
|
8914
8914
|
return null;
|
|
8915
8915
|
const e = n._adapter, { parser: i, round: r, isoWeekday: a } = n._parseOpts;
|
|
8916
8916
|
let s = t;
|
|
8917
|
-
return typeof i == "function" && (s = i(s)),
|
|
8917
|
+
return typeof i == "function" && (s = i(s)), _t(s) || (s = typeof i == "string" ? e.parse(s, i) : e.parse(s)), s === null ? null : (r && (s = r === "week" && (je(a) || a === !0) ? e.startOf(s, "isoWeek", a) : e.startOf(s, r)), +s);
|
|
8918
8918
|
}
|
|
8919
8919
|
function zl(n, t, e, i) {
|
|
8920
8920
|
const r = Vt.length;
|
|
@@ -8995,7 +8995,7 @@ class di extends cn {
|
|
|
8995
8995
|
function l(c) {
|
|
8996
8996
|
!s && !isNaN(c.min) && (r = Math.min(r, c.min)), !o && !isNaN(c.max) && (a = Math.max(a, c.max));
|
|
8997
8997
|
}
|
|
8998
|
-
(!s || !o) && (l(this._getLabelBounds()), (t.bounds !== "ticks" || t.ticks.source !== "labels") && l(this.getMinMax(!1))), r =
|
|
8998
|
+
(!s || !o) && (l(this._getLabelBounds()), (t.bounds !== "ticks" || t.ticks.source !== "labels") && l(this.getMinMax(!1))), r = _t(r) && !isNaN(r) ? r : +e.startOf(Date.now(), i), a = _t(a) && !isNaN(a) ? a : +e.endOf(Date.now(), i) + 1, this.min = Math.min(r, a - 1), this.max = Math.max(r + 1, a);
|
|
8999
8999
|
}
|
|
9000
9000
|
_getLabelBounds() {
|
|
9001
9001
|
const t = this.getLabelTimestamps();
|
|
@@ -9070,7 +9070,7 @@ class di extends cn {
|
|
|
9070
9070
|
return this.min + i * (this.max - this.min);
|
|
9071
9071
|
}
|
|
9072
9072
|
_getLabelSize(t) {
|
|
9073
|
-
const e = this.options.ticks, i = this.ctx.measureText(t).width, r =
|
|
9073
|
+
const e = this.options.ticks, i = this.ctx.measureText(t).width, r = At(this.isHorizontal() ? e.maxRotation : e.minRotation), a = Math.cos(r), s = Math.sin(r), o = this._resolveTickFontOptions(0).size;
|
|
9074
9074
|
return {
|
|
9075
9075
|
w: i * a + o * s,
|
|
9076
9076
|
h: i * s + o * a
|
|
@@ -9274,7 +9274,7 @@ function ke(n) {
|
|
|
9274
9274
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
9275
9275
|
}, ke(n);
|
|
9276
9276
|
}
|
|
9277
|
-
function
|
|
9277
|
+
function bt(n) {
|
|
9278
9278
|
if (n === null || n === !0 || n === !1)
|
|
9279
9279
|
return NaN;
|
|
9280
9280
|
var t = Number(n);
|
|
@@ -9291,12 +9291,12 @@ function Y(n) {
|
|
|
9291
9291
|
}
|
|
9292
9292
|
function Gu(n, t) {
|
|
9293
9293
|
A(2, arguments);
|
|
9294
|
-
var e = Y(n), i =
|
|
9294
|
+
var e = Y(n), i = bt(t);
|
|
9295
9295
|
return isNaN(i) ? /* @__PURE__ */ new Date(NaN) : (i && e.setDate(e.getDate() + i), e);
|
|
9296
9296
|
}
|
|
9297
9297
|
function Ks(n, t) {
|
|
9298
9298
|
A(2, arguments);
|
|
9299
|
-
var e = Y(n), i =
|
|
9299
|
+
var e = Y(n), i = bt(t);
|
|
9300
9300
|
if (isNaN(i))
|
|
9301
9301
|
return /* @__PURE__ */ new Date(NaN);
|
|
9302
9302
|
if (!i)
|
|
@@ -9308,13 +9308,13 @@ function Ks(n, t) {
|
|
|
9308
9308
|
}
|
|
9309
9309
|
function vi(n, t) {
|
|
9310
9310
|
A(2, arguments);
|
|
9311
|
-
var e = Y(n).getTime(), i =
|
|
9311
|
+
var e = Y(n).getTime(), i = bt(t);
|
|
9312
9312
|
return new Date(e + i);
|
|
9313
9313
|
}
|
|
9314
9314
|
var Sv = 36e5;
|
|
9315
9315
|
function kv(n, t) {
|
|
9316
9316
|
A(2, arguments);
|
|
9317
|
-
var e =
|
|
9317
|
+
var e = bt(t);
|
|
9318
9318
|
return vi(n, e * Sv);
|
|
9319
9319
|
}
|
|
9320
9320
|
var Cv = {};
|
|
@@ -9324,7 +9324,7 @@ function Ge() {
|
|
|
9324
9324
|
function Vl(n, t) {
|
|
9325
9325
|
var e, i, r, a, s, o, l, c;
|
|
9326
9326
|
A(1, arguments);
|
|
9327
|
-
var u = Ge(), d =
|
|
9327
|
+
var u = Ge(), d = bt((e = (i = (r = (a = t == null ? void 0 : t.weekStartsOn) !== null && a !== void 0 ? a : t == null || (s = t.locale) === null || s === void 0 || (o = s.options) === null || o === void 0 ? void 0 : o.weekStartsOn) !== null && r !== void 0 ? r : u.weekStartsOn) !== null && i !== void 0 ? i : (l = u.locale) === null || l === void 0 || (c = l.options) === null || c === void 0 ? void 0 : c.weekStartsOn) !== null && e !== void 0 ? e : 0);
|
|
9328
9328
|
if (!(d >= 0 && d <= 6))
|
|
9329
9329
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
9330
9330
|
var h = Y(n), f = h.getDay(), g = (f < d ? 7 : 0) + f - d;
|
|
@@ -9348,27 +9348,27 @@ function Ov(n, t) {
|
|
|
9348
9348
|
var Ev = 6e4;
|
|
9349
9349
|
function Av(n, t) {
|
|
9350
9350
|
A(2, arguments);
|
|
9351
|
-
var e =
|
|
9351
|
+
var e = bt(t);
|
|
9352
9352
|
return vi(n, e * Ev);
|
|
9353
9353
|
}
|
|
9354
9354
|
function Rv(n, t) {
|
|
9355
9355
|
A(2, arguments);
|
|
9356
|
-
var e =
|
|
9356
|
+
var e = bt(t), i = e * 3;
|
|
9357
9357
|
return Ks(n, i);
|
|
9358
9358
|
}
|
|
9359
9359
|
function Lv(n, t) {
|
|
9360
9360
|
A(2, arguments);
|
|
9361
|
-
var e =
|
|
9361
|
+
var e = bt(t);
|
|
9362
9362
|
return vi(n, e * 1e3);
|
|
9363
9363
|
}
|
|
9364
9364
|
function Iv(n, t) {
|
|
9365
9365
|
A(2, arguments);
|
|
9366
|
-
var e =
|
|
9366
|
+
var e = bt(t), i = e * 7;
|
|
9367
9367
|
return Gu(n, i);
|
|
9368
9368
|
}
|
|
9369
9369
|
function Nv(n, t) {
|
|
9370
9370
|
A(2, arguments);
|
|
9371
|
-
var e =
|
|
9371
|
+
var e = bt(t);
|
|
9372
9372
|
return Ks(n, e * 12);
|
|
9373
9373
|
}
|
|
9374
9374
|
function ai(n, t) {
|
|
@@ -9514,7 +9514,7 @@ function e0(n) {
|
|
|
9514
9514
|
function n0(n, t) {
|
|
9515
9515
|
var e, i, r, a, s, o, l, c;
|
|
9516
9516
|
A(1, arguments);
|
|
9517
|
-
var u = Ge(), d =
|
|
9517
|
+
var u = Ge(), d = bt((e = (i = (r = (a = t == null ? void 0 : t.weekStartsOn) !== null && a !== void 0 ? a : t == null || (s = t.locale) === null || s === void 0 || (o = s.options) === null || o === void 0 ? void 0 : o.weekStartsOn) !== null && r !== void 0 ? r : u.weekStartsOn) !== null && i !== void 0 ? i : (l = u.locale) === null || l === void 0 || (c = l.options) === null || c === void 0 ? void 0 : c.weekStartsOn) !== null && e !== void 0 ? e : 0);
|
|
9518
9518
|
if (!(d >= 0 && d <= 6))
|
|
9519
9519
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
9520
9520
|
var h = Y(n), f = h.getDay(), g = (f < d ? -7 : 0) + 6 - (f - d);
|
|
@@ -9537,7 +9537,7 @@ function a0(n) {
|
|
|
9537
9537
|
}
|
|
9538
9538
|
function td(n, t) {
|
|
9539
9539
|
A(2, arguments);
|
|
9540
|
-
var e =
|
|
9540
|
+
var e = bt(t);
|
|
9541
9541
|
return vi(n, -e);
|
|
9542
9542
|
}
|
|
9543
9543
|
var s0 = 864e5;
|
|
@@ -9578,7 +9578,7 @@ function nd(n) {
|
|
|
9578
9578
|
function on(n, t) {
|
|
9579
9579
|
var e, i, r, a, s, o, l, c;
|
|
9580
9580
|
A(1, arguments);
|
|
9581
|
-
var u = Ge(), d =
|
|
9581
|
+
var u = Ge(), d = bt((e = (i = (r = (a = t == null ? void 0 : t.weekStartsOn) !== null && a !== void 0 ? a : t == null || (s = t.locale) === null || s === void 0 || (o = s.options) === null || o === void 0 ? void 0 : o.weekStartsOn) !== null && r !== void 0 ? r : u.weekStartsOn) !== null && i !== void 0 ? i : (l = u.locale) === null || l === void 0 || (c = l.options) === null || c === void 0 ? void 0 : c.weekStartsOn) !== null && e !== void 0 ? e : 0);
|
|
9582
9582
|
if (!(d >= 0 && d <= 6))
|
|
9583
9583
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
9584
9584
|
var h = Y(n), f = h.getUTCDay(), g = (f < d ? 7 : 0) + f - d;
|
|
@@ -9587,7 +9587,7 @@ function on(n, t) {
|
|
|
9587
9587
|
function Qs(n, t) {
|
|
9588
9588
|
var e, i, r, a, s, o, l, c;
|
|
9589
9589
|
A(1, arguments);
|
|
9590
|
-
var u = Y(n), d = u.getUTCFullYear(), h = Ge(), f =
|
|
9590
|
+
var u = Y(n), d = u.getUTCFullYear(), h = Ge(), f = bt((e = (i = (r = (a = t == null ? void 0 : t.firstWeekContainsDate) !== null && a !== void 0 ? a : t == null || (s = t.locale) === null || s === void 0 || (o = s.options) === null || o === void 0 ? void 0 : o.firstWeekContainsDate) !== null && r !== void 0 ? r : h.firstWeekContainsDate) !== null && i !== void 0 ? i : (l = h.locale) === null || l === void 0 || (c = l.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && e !== void 0 ? e : 1);
|
|
9591
9591
|
if (!(f >= 1 && f <= 7))
|
|
9592
9592
|
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
9593
9593
|
var g = /* @__PURE__ */ new Date(0);
|
|
@@ -9600,7 +9600,7 @@ function Qs(n, t) {
|
|
|
9600
9600
|
function u0(n, t) {
|
|
9601
9601
|
var e, i, r, a, s, o, l, c;
|
|
9602
9602
|
A(1, arguments);
|
|
9603
|
-
var u = Ge(), d =
|
|
9603
|
+
var u = Ge(), d = bt((e = (i = (r = (a = t == null ? void 0 : t.firstWeekContainsDate) !== null && a !== void 0 ? a : t == null || (s = t.locale) === null || s === void 0 || (o = s.options) === null || o === void 0 ? void 0 : o.firstWeekContainsDate) !== null && r !== void 0 ? r : u.firstWeekContainsDate) !== null && i !== void 0 ? i : (l = u.locale) === null || l === void 0 || (c = l.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && e !== void 0 ? e : 1), h = Qs(n, t), f = /* @__PURE__ */ new Date(0);
|
|
9604
9604
|
f.setUTCFullYear(h, 0, d), f.setUTCHours(0, 0, 0, 0);
|
|
9605
9605
|
var g = on(f, t);
|
|
9606
9606
|
return g;
|
|
@@ -10719,10 +10719,10 @@ var ib = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, rb = /P+p+|P+|
|
|
|
10719
10719
|
function lb(n, t, e) {
|
|
10720
10720
|
var i, r, a, s, o, l, c, u, d, h, f, g, v, p, m, b, y, x;
|
|
10721
10721
|
A(2, arguments);
|
|
10722
|
-
var w = String(t), _ = Ge(), M = (i = (r = e == null ? void 0 : e.locale) !== null && r !== void 0 ? r : _.locale) !== null && i !== void 0 ? i : od, T =
|
|
10722
|
+
var w = String(t), _ = Ge(), M = (i = (r = e == null ? void 0 : e.locale) !== null && r !== void 0 ? r : _.locale) !== null && i !== void 0 ? i : od, T = bt((a = (s = (o = (l = e == null ? void 0 : e.firstWeekContainsDate) !== null && l !== void 0 ? l : e == null || (c = e.locale) === null || c === void 0 || (u = c.options) === null || u === void 0 ? void 0 : u.firstWeekContainsDate) !== null && o !== void 0 ? o : _.firstWeekContainsDate) !== null && s !== void 0 ? s : (d = _.locale) === null || d === void 0 || (h = d.options) === null || h === void 0 ? void 0 : h.firstWeekContainsDate) !== null && a !== void 0 ? a : 1);
|
|
10723
10723
|
if (!(T >= 1 && T <= 7))
|
|
10724
10724
|
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
10725
|
-
var D =
|
|
10725
|
+
var D = bt((f = (g = (v = (p = e == null ? void 0 : e.weekStartsOn) !== null && p !== void 0 ? p : e == null || (m = e.locale) === null || m === void 0 || (b = m.options) === null || b === void 0 ? void 0 : b.weekStartsOn) !== null && v !== void 0 ? v : _.weekStartsOn) !== null && g !== void 0 ? g : (y = _.locale) === null || y === void 0 || (x = y.options) === null || x === void 0 ? void 0 : x.weekStartsOn) !== null && f !== void 0 ? f : 0);
|
|
10726
10726
|
if (!(D >= 0 && D <= 6))
|
|
10727
10727
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
10728
10728
|
if (!M.localize)
|
|
@@ -11560,7 +11560,7 @@ var yb = /* @__PURE__ */ function(n) {
|
|
|
11560
11560
|
}(rt);
|
|
11561
11561
|
function kb(n, t, e) {
|
|
11562
11562
|
A(2, arguments);
|
|
11563
|
-
var i = Y(n), r =
|
|
11563
|
+
var i = Y(n), r = bt(t), a = id(i, e) - r;
|
|
11564
11564
|
return i.setUTCDate(i.getUTCDate() - a * 7), i;
|
|
11565
11565
|
}
|
|
11566
11566
|
var Cb = /* @__PURE__ */ function(n) {
|
|
@@ -11601,7 +11601,7 @@ var Cb = /* @__PURE__ */ function(n) {
|
|
|
11601
11601
|
}(rt);
|
|
11602
11602
|
function Pb(n, t) {
|
|
11603
11603
|
A(2, arguments);
|
|
11604
|
-
var e = Y(n), i =
|
|
11604
|
+
var e = Y(n), i = bt(t), r = nd(e) - i;
|
|
11605
11605
|
return e.setUTCDate(e.getUTCDate() - r * 7), e;
|
|
11606
11606
|
}
|
|
11607
11607
|
var Ob = /* @__PURE__ */ function(n) {
|
|
@@ -11716,10 +11716,10 @@ var Ob = /* @__PURE__ */ function(n) {
|
|
|
11716
11716
|
function to(n, t, e) {
|
|
11717
11717
|
var i, r, a, s, o, l, c, u;
|
|
11718
11718
|
A(2, arguments);
|
|
11719
|
-
var d = Ge(), h =
|
|
11719
|
+
var d = Ge(), h = bt((i = (r = (a = (s = e == null ? void 0 : e.weekStartsOn) !== null && s !== void 0 ? s : e == null || (o = e.locale) === null || o === void 0 || (l = o.options) === null || l === void 0 ? void 0 : l.weekStartsOn) !== null && a !== void 0 ? a : d.weekStartsOn) !== null && r !== void 0 ? r : (c = d.locale) === null || c === void 0 || (u = c.options) === null || u === void 0 ? void 0 : u.weekStartsOn) !== null && i !== void 0 ? i : 0);
|
|
11720
11720
|
if (!(h >= 0 && h <= 6))
|
|
11721
11721
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
11722
|
-
var f = Y(n), g =
|
|
11722
|
+
var f = Y(n), g = bt(t), v = f.getUTCDay(), p = g % 7, m = (p + 7) % 7, b = (m < h ? 7 : 0) + g - v;
|
|
11723
11723
|
return f.setUTCDate(f.getUTCDate() + b), f;
|
|
11724
11724
|
}
|
|
11725
11725
|
var Ib = /* @__PURE__ */ function(n) {
|
|
@@ -11947,7 +11947,7 @@ var Ib = /* @__PURE__ */ function(n) {
|
|
|
11947
11947
|
}(rt);
|
|
11948
11948
|
function Yb(n, t) {
|
|
11949
11949
|
A(2, arguments);
|
|
11950
|
-
var e =
|
|
11950
|
+
var e = bt(t);
|
|
11951
11951
|
e % 7 === 0 && (e = e - 7);
|
|
11952
11952
|
var i = 1, r = Y(n), a = r.getUTCDay(), s = e % 7, o = (s + 7) % 7, l = (o < i ? 7 : 0) + e - a;
|
|
11953
11953
|
return r.setUTCDate(r.getUTCDate() + l), r;
|
|
@@ -12563,10 +12563,10 @@ function oy(n, t, e, i) {
|
|
|
12563
12563
|
var _ = String(n), M = String(t), T = Ge(), D = (r = (a = i == null ? void 0 : i.locale) !== null && a !== void 0 ? a : T.locale) !== null && r !== void 0 ? r : od;
|
|
12564
12564
|
if (!D.match)
|
|
12565
12565
|
throw new RangeError("locale must contain match property");
|
|
12566
|
-
var O =
|
|
12566
|
+
var O = bt((s = (o = (l = (c = i == null ? void 0 : i.firstWeekContainsDate) !== null && c !== void 0 ? c : i == null || (u = i.locale) === null || u === void 0 || (d = u.options) === null || d === void 0 ? void 0 : d.firstWeekContainsDate) !== null && l !== void 0 ? l : T.firstWeekContainsDate) !== null && o !== void 0 ? o : (h = T.locale) === null || h === void 0 || (f = h.options) === null || f === void 0 ? void 0 : f.firstWeekContainsDate) !== null && s !== void 0 ? s : 1);
|
|
12567
12567
|
if (!(O >= 1 && O <= 7))
|
|
12568
12568
|
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
12569
|
-
var R =
|
|
12569
|
+
var R = bt((g = (v = (p = (m = i == null ? void 0 : i.weekStartsOn) !== null && m !== void 0 ? m : i == null || (b = i.locale) === null || b === void 0 || (y = b.options) === null || y === void 0 ? void 0 : y.weekStartsOn) !== null && p !== void 0 ? p : T.weekStartsOn) !== null && v !== void 0 ? v : (x = T.locale) === null || x === void 0 || (w = x.options) === null || w === void 0 ? void 0 : w.weekStartsOn) !== null && g !== void 0 ? g : 0);
|
|
12570
12570
|
if (!(R >= 0 && R <= 6))
|
|
12571
12571
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
12572
12572
|
if (M === "")
|
|
@@ -12584,7 +12584,7 @@ function oy(n, t, e, i) {
|
|
|
12584
12584
|
return ct;
|
|
12585
12585
|
}).join("").match(ey), I = [], H = Jl(ht), K;
|
|
12586
12586
|
try {
|
|
12587
|
-
var
|
|
12587
|
+
var Lt = function() {
|
|
12588
12588
|
var et = K.value;
|
|
12589
12589
|
!(i != null && i.useAdditionalWeekYearTokens) && sd(et) && gr(et, M, n), !(i != null && i.useAdditionalDayOfYearTokens) && ad(et) && gr(et, M, n);
|
|
12590
12590
|
var Yt = et[0], be = ty[Yt];
|
|
@@ -12620,7 +12620,7 @@ function oy(n, t, e, i) {
|
|
|
12620
12620
|
}
|
|
12621
12621
|
};
|
|
12622
12622
|
for (H.s(); !(K = H.n()).done; ) {
|
|
12623
|
-
var k =
|
|
12623
|
+
var k = Lt();
|
|
12624
12624
|
if (ke(k) === "object")
|
|
12625
12625
|
return k.v;
|
|
12626
12626
|
}
|
|
@@ -12648,10 +12648,10 @@ function oy(n, t, e, i) {
|
|
|
12648
12648
|
}), F = Y(e);
|
|
12649
12649
|
if (isNaN(F.getTime()))
|
|
12650
12650
|
return /* @__PURE__ */ new Date(NaN);
|
|
12651
|
-
var z = td(F, fr(F)), j = {}, q = Jl(L),
|
|
12651
|
+
var z = td(F, fr(F)), j = {}, q = Jl(L), yt;
|
|
12652
12652
|
try {
|
|
12653
|
-
for (q.s(); !(
|
|
12654
|
-
var ft =
|
|
12653
|
+
for (q.s(); !(yt = q.n()).done; ) {
|
|
12654
|
+
var ft = yt.value;
|
|
12655
12655
|
if (!ft.validate(z, N))
|
|
12656
12656
|
return /* @__PURE__ */ new Date(NaN);
|
|
12657
12657
|
var it = ft.set(z, j, N);
|
|
@@ -12685,7 +12685,7 @@ function dy(n) {
|
|
|
12685
12685
|
function fd(n, t) {
|
|
12686
12686
|
var e;
|
|
12687
12687
|
A(1, arguments);
|
|
12688
|
-
var i =
|
|
12688
|
+
var i = bt((e = t == null ? void 0 : t.additionalDigits) !== null && e !== void 0 ? e : 2);
|
|
12689
12689
|
if (i !== 2 && i !== 1 && i !== 0)
|
|
12690
12690
|
throw new RangeError("additionalDigits must be 0, 1 or 2");
|
|
12691
12691
|
if (!(typeof n == "string" || Object.prototype.toString.call(n) === "[object String]"))
|
|
@@ -12801,7 +12801,7 @@ function ky(n) {
|
|
|
12801
12801
|
var t = n / Yv;
|
|
12802
12802
|
return Math.floor(t);
|
|
12803
12803
|
}
|
|
12804
|
-
var Ut = /* @__PURE__ */ ((n) => (n.DOUGHNUT = "Doughnut", n.HORIZONTAL_BAR = "HorizontalBar", n.VERTICAL_BAR = "VerticalBar", n.TIMESERIES_LINE = "Line", n.TIMESERIES_BAR = "TimeSeriesBar", n))(Ut || {}), eo = /* @__PURE__ */ ((n) => (n.GAUGE = "Gauge", n.TOPN = "TopN", n))(eo || {}),
|
|
12804
|
+
var Ut = /* @__PURE__ */ ((n) => (n.DOUGHNUT = "Doughnut", n.HORIZONTAL_BAR = "HorizontalBar", n.VERTICAL_BAR = "VerticalBar", n.TIMESERIES_LINE = "Line", n.TIMESERIES_BAR = "TimeSeriesBar", n))(Ut || {}), eo = /* @__PURE__ */ ((n) => (n.GAUGE = "Gauge", n.TOPN = "TopN", n))(eo || {}), Et = /* @__PURE__ */ ((n) => (n.Hidden = "hidden", n.Right = "right", n.Bottom = "bottom", n))(Et || {}), Kn = /* @__PURE__ */ ((n) => (n.Hidden = "hidden", n.SingleMetric = "single", n.Full = "full", n))(Kn || {});
|
|
12805
12805
|
const no = (n, t) => {
|
|
12806
12806
|
var i, r;
|
|
12807
12807
|
const { tooltip: e } = t;
|
|
@@ -14347,12 +14347,12 @@ var ux = Za.exports;
|
|
|
14347
14347
|
}), t.default = y;
|
|
14348
14348
|
var i = e(Iy), r = e(Yy), a = e(me), s = e(qy), o = e(Xy), l = e(_d), c = wi, u = e(un), d = e(Bt), h = dn, f = e(ux), g = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, v = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, p = /^'([^]*?)'?$/, m = /''/g, b = /[a-zA-Z]/;
|
|
14349
14349
|
function y(w, _, M) {
|
|
14350
|
-
var T, D, O, R, N, V, ht, I, H, K,
|
|
14350
|
+
var T, D, O, R, N, V, ht, I, H, K, Lt, k, L, F, z, j, q, yt;
|
|
14351
14351
|
(0, d.default)(2, arguments);
|
|
14352
14352
|
var ft = String(_), it = (0, h.getDefaultOptions)(), ct = (T = (D = M == null ? void 0 : M.locale) !== null && D !== void 0 ? D : it.locale) !== null && T !== void 0 ? T : f.default, et = (0, u.default)((O = (R = (N = (V = M == null ? void 0 : M.firstWeekContainsDate) !== null && V !== void 0 ? V : M == null || (ht = M.locale) === null || ht === void 0 || (I = ht.options) === null || I === void 0 ? void 0 : I.firstWeekContainsDate) !== null && N !== void 0 ? N : it.firstWeekContainsDate) !== null && R !== void 0 ? R : (H = it.locale) === null || H === void 0 || (K = H.options) === null || K === void 0 ? void 0 : K.firstWeekContainsDate) !== null && O !== void 0 ? O : 1);
|
|
14353
14353
|
if (!(et >= 1 && et <= 7))
|
|
14354
14354
|
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
14355
|
-
var Yt = (0, u.default)((
|
|
14355
|
+
var Yt = (0, u.default)((Lt = (k = (L = (F = M == null ? void 0 : M.weekStartsOn) !== null && F !== void 0 ? F : M == null || (z = M.locale) === null || z === void 0 || (j = z.options) === null || j === void 0 ? void 0 : j.weekStartsOn) !== null && L !== void 0 ? L : it.weekStartsOn) !== null && k !== void 0 ? k : (q = it.locale) === null || q === void 0 || (yt = q.options) === null || yt === void 0 ? void 0 : yt.weekStartsOn) !== null && Lt !== void 0 ? Lt : 0);
|
|
14356
14356
|
if (!(Yt >= 0 && Yt <= 6))
|
|
14357
14357
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
14358
14358
|
if (!ct.localize)
|
|
@@ -14903,12 +14903,12 @@ const hs = 10, pe = [
|
|
|
14903
14903
|
borderJoinStyle: "round",
|
|
14904
14904
|
fill: !0
|
|
14905
14905
|
}, ta = /* @__PURE__ */ new Map(), ea = (n, t) => t === "bytes" ? Gs(n) : t === "count/minute" ? n.toFixed(2) : ds.format(n), dc = (n) => {
|
|
14906
|
-
const e = document.createElement("canvas").getContext("2d"), i =
|
|
14906
|
+
const e = document.createElement("canvas").getContext("2d"), i = vt({});
|
|
14907
14907
|
return e.font = i.string, e.measureText(n).width;
|
|
14908
14908
|
}, Gx = () => {
|
|
14909
14909
|
const n = "label_height";
|
|
14910
14910
|
if (!ta.has(n)) {
|
|
14911
|
-
const t =
|
|
14911
|
+
const t = vt({});
|
|
14912
14912
|
ta.set(n, t.lineHeight);
|
|
14913
14913
|
}
|
|
14914
14914
|
return ta.get(n);
|
|
@@ -15149,7 +15149,7 @@ function nw(n) {
|
|
|
15149
15149
|
}))
|
|
15150
15150
|
};
|
|
15151
15151
|
}
|
|
15152
|
-
var iw = Object.defineProperty, rw = (n, t, e) => t in n ? iw(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, oe = (n, t, e) => (rw(n, typeof t != "symbol" ? t + "" : t, e), e), $ = /* @__PURE__ */ ((n) => (n.MINUTELY = "Minutely", n.HOURLY = "Hourly", n.DAILY = "Daily", n.WEEKLY = "Weekly", n))($ || {}),
|
|
15152
|
+
var iw = Object.defineProperty, rw = (n, t, e) => t in n ? iw(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, oe = (n, t, e) => (rw(n, typeof t != "symbol" ? t + "" : t, e), e), $ = /* @__PURE__ */ ((n) => (n.MINUTELY = "Minutely", n.HOURLY = "Hourly", n.DAILY = "Daily", n.WEEKLY = "Weekly", n))($ || {}), Mt = /* @__PURE__ */ ((n) => (n.FIFTEEN_MIN = "15m", n.ONE_HOUR = "1h", n.SIX_HOUR = "6h", n.TWELVE_HOUR = "12h", n.ONE_DAY = "24h", n.SEVEN_DAY = "7d", n.THIRTY_DAY = "30d", n.CURRENT_WEEK = "current_week", n.CURRENT_MONTH = "current_month", n.CURRENT_QUARTER = "current_quarter", n.PREVIOUS_WEEK = "previous_week", n.PREVIOUS_MONTH = "previous_month", n.PREVIOUS_QUARTER = "previous_quarter", n))(Mt || {});
|
|
15153
15153
|
function oo(n) {
|
|
15154
15154
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
15155
15155
|
}
|
|
@@ -15714,8 +15714,8 @@ class jw extends ie {
|
|
|
15714
15714
|
return t && (e = kn(e, t)), e;
|
|
15715
15715
|
}
|
|
15716
15716
|
}
|
|
15717
|
-
|
|
15718
|
-
key:
|
|
15717
|
+
Mt.FIFTEEN_MIN, new ie({
|
|
15718
|
+
key: Mt.FIFTEEN_MIN,
|
|
15719
15719
|
display: "Last 15 minutes",
|
|
15720
15720
|
timeframeText: "15 minutes",
|
|
15721
15721
|
timeframeLength: () => 60 * 15,
|
|
@@ -15723,8 +15723,8 @@ _t.FIFTEEN_MIN, new ie({
|
|
|
15723
15723
|
dataGranularity: $.MINUTELY,
|
|
15724
15724
|
isRelative: !0,
|
|
15725
15725
|
allowedTiers: ["free", "trial", "plus", "enterprise"]
|
|
15726
|
-
}),
|
|
15727
|
-
key:
|
|
15726
|
+
}), Mt.ONE_HOUR, new ie({
|
|
15727
|
+
key: Mt.ONE_HOUR,
|
|
15728
15728
|
display: "Last hour",
|
|
15729
15729
|
timeframeText: "One hour",
|
|
15730
15730
|
timeframeLength: () => 60 * 60 * 1,
|
|
@@ -15732,8 +15732,8 @@ _t.FIFTEEN_MIN, new ie({
|
|
|
15732
15732
|
dataGranularity: $.MINUTELY,
|
|
15733
15733
|
isRelative: !0,
|
|
15734
15734
|
allowedTiers: ["free", "trial", "plus", "enterprise"]
|
|
15735
|
-
}),
|
|
15736
|
-
key:
|
|
15735
|
+
}), Mt.SIX_HOUR, new ie({
|
|
15736
|
+
key: Mt.SIX_HOUR,
|
|
15737
15737
|
display: "Last 6 hours",
|
|
15738
15738
|
timeframeText: "6 hours",
|
|
15739
15739
|
timeframeLength: () => 60 * 60 * 6,
|
|
@@ -15741,8 +15741,8 @@ _t.FIFTEEN_MIN, new ie({
|
|
|
15741
15741
|
dataGranularity: $.HOURLY,
|
|
15742
15742
|
isRelative: !0,
|
|
15743
15743
|
allowedTiers: ["free", "trial", "plus", "enterprise"]
|
|
15744
|
-
}),
|
|
15745
|
-
key:
|
|
15744
|
+
}), Mt.TWELVE_HOUR, new ie({
|
|
15745
|
+
key: Mt.TWELVE_HOUR,
|
|
15746
15746
|
display: "Last 12 hours",
|
|
15747
15747
|
timeframeText: "12 hours",
|
|
15748
15748
|
timeframeLength: () => 60 * 60 * 12,
|
|
@@ -15750,8 +15750,8 @@ _t.FIFTEEN_MIN, new ie({
|
|
|
15750
15750
|
dataGranularity: $.HOURLY,
|
|
15751
15751
|
isRelative: !0,
|
|
15752
15752
|
allowedTiers: ["free", "trial", "plus", "enterprise"]
|
|
15753
|
-
}),
|
|
15754
|
-
key:
|
|
15753
|
+
}), Mt.ONE_DAY, new ie({
|
|
15754
|
+
key: Mt.ONE_DAY,
|
|
15755
15755
|
display: "Last 24 hours",
|
|
15756
15756
|
timeframeText: "24 hours",
|
|
15757
15757
|
timeframeLength: () => 60 * 60 * 24,
|
|
@@ -15759,8 +15759,8 @@ _t.FIFTEEN_MIN, new ie({
|
|
|
15759
15759
|
dataGranularity: $.HOURLY,
|
|
15760
15760
|
isRelative: !0,
|
|
15761
15761
|
allowedTiers: ["free", "trial", "plus", "enterprise"]
|
|
15762
|
-
}),
|
|
15763
|
-
key:
|
|
15762
|
+
}), Mt.SEVEN_DAY, new ie({
|
|
15763
|
+
key: Mt.SEVEN_DAY,
|
|
15764
15764
|
display: "Last 7 days",
|
|
15765
15765
|
timeframeText: "7 days",
|
|
15766
15766
|
timeframeLength: () => 60 * 60 * 24 * 7,
|
|
@@ -15768,8 +15768,8 @@ _t.FIFTEEN_MIN, new ie({
|
|
|
15768
15768
|
dataGranularity: $.DAILY,
|
|
15769
15769
|
isRelative: !0,
|
|
15770
15770
|
allowedTiers: ["trial", "plus", "enterprise"]
|
|
15771
|
-
}),
|
|
15772
|
-
key:
|
|
15771
|
+
}), Mt.THIRTY_DAY, new ie({
|
|
15772
|
+
key: Mt.THIRTY_DAY,
|
|
15773
15773
|
display: "Last 30 days",
|
|
15774
15774
|
timeframeText: "30 days",
|
|
15775
15775
|
timeframeLength: () => 60 * 60 * 24 * 30,
|
|
@@ -15777,8 +15777,8 @@ _t.FIFTEEN_MIN, new ie({
|
|
|
15777
15777
|
dataGranularity: $.DAILY,
|
|
15778
15778
|
isRelative: !0,
|
|
15779
15779
|
allowedTiers: ["trial", "plus", "enterprise"]
|
|
15780
|
-
}),
|
|
15781
|
-
key:
|
|
15780
|
+
}), Mt.CURRENT_WEEK, new zw({
|
|
15781
|
+
key: Mt.CURRENT_WEEK,
|
|
15782
15782
|
display: "This week",
|
|
15783
15783
|
timeframeText: "Week",
|
|
15784
15784
|
timeframeLength: () => {
|
|
@@ -15789,8 +15789,8 @@ _t.FIFTEEN_MIN, new ie({
|
|
|
15789
15789
|
dataGranularity: $.DAILY,
|
|
15790
15790
|
isRelative: !1,
|
|
15791
15791
|
allowedTiers: ["plus", "enterprise"]
|
|
15792
|
-
}),
|
|
15793
|
-
key:
|
|
15792
|
+
}), Mt.CURRENT_MONTH, new $w({
|
|
15793
|
+
key: Mt.CURRENT_MONTH,
|
|
15794
15794
|
display: "This month",
|
|
15795
15795
|
timeframeText: "Month",
|
|
15796
15796
|
timeframeLength: () => {
|
|
@@ -15801,8 +15801,8 @@ _t.FIFTEEN_MIN, new ie({
|
|
|
15801
15801
|
dataGranularity: $.DAILY,
|
|
15802
15802
|
isRelative: !1,
|
|
15803
15803
|
allowedTiers: ["plus", "enterprise"]
|
|
15804
|
-
}),
|
|
15805
|
-
key:
|
|
15804
|
+
}), Mt.PREVIOUS_WEEK, new Bw({
|
|
15805
|
+
key: Mt.PREVIOUS_WEEK,
|
|
15806
15806
|
display: "Previous week",
|
|
15807
15807
|
timeframeText: "Week",
|
|
15808
15808
|
timeframeLength: () => 60 * 60 * 24 * 7,
|
|
@@ -15810,8 +15810,8 @@ _t.FIFTEEN_MIN, new ie({
|
|
|
15810
15810
|
dataGranularity: $.DAILY,
|
|
15811
15811
|
isRelative: !1,
|
|
15812
15812
|
allowedTiers: ["plus", "enterprise"]
|
|
15813
|
-
}),
|
|
15814
|
-
key:
|
|
15813
|
+
}), Mt.PREVIOUS_MONTH, new jw({
|
|
15814
|
+
key: Mt.PREVIOUS_MONTH,
|
|
15815
15815
|
display: "Previous month",
|
|
15816
15816
|
timeframeText: "Month",
|
|
15817
15817
|
timeframeLength: () => {
|
|
@@ -16267,7 +16267,7 @@ function Ar(n) {
|
|
|
16267
16267
|
}
|
|
16268
16268
|
}
|
|
16269
16269
|
function fo(n, { x: t, y: e }, i) {
|
|
16270
|
-
i && (n.translate(t, e), n.rotate(
|
|
16270
|
+
i && (n.translate(t, e), n.rotate(At(i)), n.translate(-t, -e));
|
|
16271
16271
|
}
|
|
16272
16272
|
function qe(n, t) {
|
|
16273
16273
|
if (t && t.borderWidth)
|
|
@@ -16283,7 +16283,7 @@ function go(n, t) {
|
|
|
16283
16283
|
width: Ve(e.width, t.width),
|
|
16284
16284
|
height: Ve(e.height, t.height)
|
|
16285
16285
|
};
|
|
16286
|
-
const i = t.font, r = nt(i) ? i.map((l) =>
|
|
16286
|
+
const i = t.font, r = nt(i) ? i.map((l) => vt(l)) : [vt(i)], a = t.textStrokeWidth, s = nt(e) ? e : [e], o = s.join() + d_(r) + a + (n._measureText ? "-spriting" : "");
|
|
16287
16287
|
return sa.has(o) || sa.set(o, m_(n, s, r, a)), sa.get(o);
|
|
16288
16288
|
}
|
|
16289
16289
|
function Yd(n, t, e) {
|
|
@@ -16304,7 +16304,7 @@ function h_(n, t, e) {
|
|
|
16304
16304
|
n.save(), n.globalAlpha = y_(e.opacity, i.style.opacity), n.drawImage(i, t.x, t.y, t.width, t.height), n.restore();
|
|
16305
16305
|
return;
|
|
16306
16306
|
}
|
|
16307
|
-
const r = nt(i) ? i : [i], a = e.font, s = nt(a) ? a.map((d) =>
|
|
16307
|
+
const r = nt(i) ? i : [i], a = e.font, s = nt(a) ? a.map((d) => vt(d)) : [vt(a)], o = e.color, l = nt(o) ? o : [o], c = l_(t, e), u = t.y + e.textStrokeWidth / 2;
|
|
16308
16308
|
n.save(), n.textBaseline = "middle", n.textAlign = e.textAlign, f_(n, e) && v_(n, { x: c, y: u }, r, s), b_(n, { x: c, y: u }, r, { fonts: s, colors: l }), n.restore();
|
|
16309
16309
|
}
|
|
16310
16310
|
function f_(n, t) {
|
|
@@ -16330,7 +16330,7 @@ function p_(n, { x: t, y: e, radius: i, rotation: r, style: a, rad: s }) {
|
|
|
16330
16330
|
n.moveTo(t + Math.sin(s) * i, e - Math.cos(s) * i), s += or, n.lineTo(t + Math.sin(s) * i, e - Math.cos(s) * i), s += or, n.lineTo(t + Math.sin(s) * i, e - Math.cos(s) * i), n.closePath();
|
|
16331
16331
|
break;
|
|
16332
16332
|
case "rectRounded":
|
|
16333
|
-
u = i * 0.516, c = i - u, o = Math.cos(s + ee) * c, l = Math.sin(s + ee) * c, n.arc(t - o, e - l, u, s - G, s -
|
|
16333
|
+
u = i * 0.516, c = i - u, o = Math.cos(s + ee) * c, l = Math.sin(s + ee) * c, n.arc(t - o, e - l, u, s - G, s - mt), n.arc(t + l, e - o, u, s - mt, s), n.arc(t + o, e + l, u, s, s + mt), n.arc(t - l, e + o, u, s + mt, s + G), n.closePath();
|
|
16334
16334
|
break;
|
|
16335
16335
|
case "rect":
|
|
16336
16336
|
if (!r) {
|
|
@@ -16394,7 +16394,7 @@ const Dc = {
|
|
|
16394
16394
|
yScaleID: { min: "yMin", max: "yMax", start: "bottom", end: "top", startProp: "y", endProp: "y2" }
|
|
16395
16395
|
};
|
|
16396
16396
|
function Cn(n, t, e) {
|
|
16397
|
-
return t = typeof t == "number" ? t : n.parse(t),
|
|
16397
|
+
return t = typeof t == "number" ? t : n.parse(t), _t(t) ? n.getPixelForValue(t) : e;
|
|
16398
16398
|
}
|
|
16399
16399
|
function ln(n, t, e) {
|
|
16400
16400
|
const i = t[e];
|
|
@@ -16528,7 +16528,7 @@ function $d(n, t) {
|
|
|
16528
16528
|
function S_(n, t, e) {
|
|
16529
16529
|
const i = e.label;
|
|
16530
16530
|
i.backgroundColor = "transparent", i.callout.display = !1;
|
|
16531
|
-
const r = ho(i.position), a =
|
|
16531
|
+
const r = ho(i.position), a = Rt(i.padding), s = go(n.ctx, i), o = T_({ properties: t, options: e }, s, r, a), l = D_({ properties: t, options: e }, s, r, a), c = s.width + a.width, u = s.height + a.height;
|
|
16532
16532
|
return {
|
|
16533
16533
|
x: o,
|
|
16534
16534
|
y: l,
|
|
@@ -16620,7 +16620,7 @@ function R_(n, t) {
|
|
|
16620
16620
|
I_(e, t);
|
|
16621
16621
|
}
|
|
16622
16622
|
function Pc(n, t, e, i) {
|
|
16623
|
-
if (
|
|
16623
|
+
if (_t(t[e]) && !L_(n.options, e, i)) {
|
|
16624
16624
|
const r = n[e] !== t[e];
|
|
16625
16625
|
return n[e] = t[e], r;
|
|
16626
16626
|
}
|
|
@@ -16663,7 +16663,7 @@ function Oc(n, t, e, i) {
|
|
|
16663
16663
|
}
|
|
16664
16664
|
class An extends Ft {
|
|
16665
16665
|
inRange(t, e, i, r) {
|
|
16666
|
-
const { x: a, y: s } = hn({ x: t, y: e }, this.getCenterPoint(r),
|
|
16666
|
+
const { x: a, y: s } = hn({ x: t, y: e }, this.getCenterPoint(r), At(-this.options.rotation));
|
|
16667
16667
|
return Ed({ x: a, y: s }, this.getProps(["x", "y", "x2", "y2"], r), i, this.options.borderWidth);
|
|
16668
16668
|
}
|
|
16669
16669
|
getCenterPoint(t) {
|
|
@@ -16746,7 +16746,7 @@ An.descriptors = {
|
|
|
16746
16746
|
const jd = ["left", "bottom", "top", "right"];
|
|
16747
16747
|
class Mi extends Ft {
|
|
16748
16748
|
inRange(t, e, i, r) {
|
|
16749
|
-
const { x: a, y: s } = hn({ x: t, y: e }, this.getCenterPoint(r),
|
|
16749
|
+
const { x: a, y: s } = hn({ x: t, y: e }, this.getCenterPoint(r), At(-this.rotation));
|
|
16750
16750
|
return Ed({ x: a, y: s }, this.getProps(["x", "y", "x2", "y2"], r), i, this.options.borderWidth);
|
|
16751
16751
|
}
|
|
16752
16752
|
getCenterPoint(t) {
|
|
@@ -16764,7 +16764,7 @@ class Mi extends Ft {
|
|
|
16764
16764
|
const { centerX: o, centerY: l } = po(t, e);
|
|
16765
16765
|
i = { x: o, y: l };
|
|
16766
16766
|
}
|
|
16767
|
-
const r =
|
|
16767
|
+
const r = Rt(e.padding), a = go(t.ctx, e), s = Y_(i, a, e, r);
|
|
16768
16768
|
return {
|
|
16769
16769
|
initProperties: _i(t, s, e),
|
|
16770
16770
|
pointX: i.x,
|
|
@@ -16861,7 +16861,7 @@ function W_(n, t) {
|
|
|
16861
16861
|
return n.restore();
|
|
16862
16862
|
const { separatorStart: l, separatorEnd: c } = U_(t, s), { sideStart: u, sideEnd: d } = z_(t, s, l);
|
|
16863
16863
|
(a.margin > 0 || r.borderWidth === 0) && (n.moveTo(l.x, l.y), n.lineTo(c.x, c.y)), n.moveTo(u.x, u.y), n.lineTo(d.x, d.y);
|
|
16864
|
-
const h = hn({ x: e, y: i }, t.getCenterPoint(),
|
|
16864
|
+
const h = hn({ x: e, y: i }, t.getCenterPoint(), At(-t.rotation));
|
|
16865
16865
|
n.lineTo(h.x, h.y), n.stroke(), n.restore();
|
|
16866
16866
|
}
|
|
16867
16867
|
function U_(n, t) {
|
|
@@ -16889,7 +16889,7 @@ function B_(n, t) {
|
|
|
16889
16889
|
function j_(n, t) {
|
|
16890
16890
|
const { x: e, y: i, x2: r, y2: a, width: s, height: o, pointX: l, pointY: c, centerX: u, centerY: d, rotation: h } = n, f = { x: u, y: d }, g = t.start, v = Ve(s, g), p = Ve(o, g), m = [e, e + v, e + v, r], b = [i + p, a, i, a], y = [];
|
|
16891
16891
|
for (let x = 0; x < 4; x++) {
|
|
16892
|
-
const w = hn({ x: m[x], y: b[x] }, f,
|
|
16892
|
+
const w = hn({ x: m[x], y: b[x] }, f, At(h));
|
|
16893
16893
|
y.push({
|
|
16894
16894
|
position: jd[x],
|
|
16895
16895
|
distance: _n(w, { x: l, y: c })
|
|
@@ -16898,7 +16898,7 @@ function j_(n, t) {
|
|
|
16898
16898
|
return y.sort((x, w) => x.distance - w.distance)[0].position;
|
|
16899
16899
|
}
|
|
16900
16900
|
function V_({ x: n, y: t, width: e, height: i, options: r }) {
|
|
16901
|
-
const a = r.borderWidth / 2, s =
|
|
16901
|
+
const a = r.borderWidth / 2, s = Rt(r.padding);
|
|
16902
16902
|
return {
|
|
16903
16903
|
x: n + s.left + a,
|
|
16904
16904
|
y: t + s.top + a,
|
|
@@ -17087,7 +17087,7 @@ function Ms(n, { mouseX: t, mouseY: e }, i, r) {
|
|
|
17087
17087
|
return a.options.display && a.inRange(t, e, r, i);
|
|
17088
17088
|
}
|
|
17089
17089
|
function J_(n, t, e) {
|
|
17090
|
-
const i = e.borderWidth, r =
|
|
17090
|
+
const i = e.borderWidth, r = Rt(e.padding), a = go(n.ctx, e), s = a.width + r.width + i, o = a.height + r.height + i;
|
|
17091
17091
|
return e1(t, e, { width: s, height: o, padding: r }, n.chartArea);
|
|
17092
17092
|
}
|
|
17093
17093
|
function t1(n) {
|
|
@@ -17095,7 +17095,7 @@ function t1(n) {
|
|
|
17095
17095
|
return a > G / 2 ? a - G : a < G / -2 ? a + G : a;
|
|
17096
17096
|
}
|
|
17097
17097
|
function e1(n, t, e, i) {
|
|
17098
|
-
const { width: r, height: a, padding: s } = e, { xAdjust: o, yAdjust: l } = t, c = { x: n.x, y: n.y }, u = { x: n.x2, y: n.y2 }, d = t.rotation === "auto" ? t1(n) :
|
|
17098
|
+
const { width: r, height: a, padding: s } = e, { xAdjust: o, yAdjust: l } = t, c = { x: n.x, y: n.y }, u = { x: n.x2, y: n.y2 }, d = t.rotation === "auto" ? t1(n) : At(t.rotation), h = n1(r, a, d), f = i1(n, t, { labelSize: h, padding: s }, i), g = n.cp ? _s(c, n.cp, u, f) : vo(c, u, f), v = { size: h.w, min: i.left, max: i.right, padding: s.left }, p = { size: h.h, min: i.top, max: i.bottom, padding: s.top }, m = Wc(g.x, v) + o, b = Wc(g.y, p) + l;
|
|
17099
17099
|
return {
|
|
17100
17100
|
x: m - r / 2,
|
|
17101
17101
|
y: b - a / 2,
|
|
@@ -17179,7 +17179,7 @@ class Di extends Ft {
|
|
|
17179
17179
|
const a = this.options.rotation, s = this.options.borderWidth;
|
|
17180
17180
|
if (i !== "x" && i !== "y")
|
|
17181
17181
|
return o1({ x: t, y: e }, this.getProps(["width", "height", "centerX", "centerY"], r), a, s);
|
|
17182
|
-
const { x: o, y: l, x2: c, y2: u } = this.getProps(["x", "y", "x2", "y2"], r), d = s / 2, h = i === "y" ? { start: l, end: u } : { start: o, end: c }, f = hn({ x: t, y: e }, this.getCenterPoint(r),
|
|
17182
|
+
const { x: o, y: l, x2: c, y2: u } = this.getProps(["x", "y", "x2", "y2"], r), d = s / 2, h = i === "y" ? { start: l, end: u } : { start: o, end: c }, f = hn({ x: t, y: e }, this.getCenterPoint(r), At(-a));
|
|
17183
17183
|
return f[i] >= h.start - d - en && f[i] <= h.end + d + en;
|
|
17184
17184
|
}
|
|
17185
17185
|
getCenterPoint(t) {
|
|
@@ -17234,7 +17234,7 @@ function o1(n, t, e, i) {
|
|
|
17234
17234
|
const { width: r, height: a, centerX: s, centerY: o } = t, l = r / 2, c = a / 2;
|
|
17235
17235
|
if (l <= 0 || c <= 0)
|
|
17236
17236
|
return !1;
|
|
17237
|
-
const u =
|
|
17237
|
+
const u = At(e || 0), d = i / 2 || 0, h = Math.cos(u), f = Math.sin(u), g = Math.pow(h * (n.x - s) + f * (n.y - o), 2), v = Math.pow(f * (n.x - s) - h * (n.y - o), 2);
|
|
17238
17238
|
return g / Math.pow(l + d, 2) + v / Math.pow(c + d, 2) <= 1.0001;
|
|
17239
17239
|
}
|
|
17240
17240
|
class Rr extends Ft {
|
|
@@ -17297,7 +17297,7 @@ class Lr extends Ft {
|
|
|
17297
17297
|
inRange(t, e, i, r) {
|
|
17298
17298
|
if (i !== "x" && i !== "y")
|
|
17299
17299
|
return this.options.radius >= 0.1 && this.elements.length > 1 && c1(this.elements, t, e, r);
|
|
17300
|
-
const a = hn({ x: t, y: e }, this.getCenterPoint(r),
|
|
17300
|
+
const a = hn({ x: t, y: e }, this.getCenterPoint(r), At(-this.options.rotation)), s = this.elements.map((c) => i === "y" ? c.bY : c.bX), o = Math.min(...s), l = Math.max(...s);
|
|
17301
17301
|
return a[i] >= o && a[i] <= l;
|
|
17302
17302
|
}
|
|
17303
17303
|
getCenterPoint(t) {
|
|
@@ -17673,7 +17673,7 @@ const _1 = { class: "tooltip-title" }, M1 = { class: "title font-bold" }, T1 = {
|
|
|
17673
17673
|
}
|
|
17674
17674
|
return (h, f) => {
|
|
17675
17675
|
const g = nn("KIcon");
|
|
17676
|
-
return n.showTooltip ? (X(),
|
|
17676
|
+
return n.showTooltip ? (X(), wt("div", {
|
|
17677
17677
|
key: 0,
|
|
17678
17678
|
ref_key: "tooltipEl",
|
|
17679
17679
|
ref: i,
|
|
@@ -17682,23 +17682,23 @@ const _1 = { class: "tooltip-title" }, M1 = { class: "title font-bold" }, T1 = {
|
|
|
17682
17682
|
onMousedown: l
|
|
17683
17683
|
}, [
|
|
17684
17684
|
lt("div", _1, [
|
|
17685
|
-
lt("span", M1,
|
|
17685
|
+
lt("span", M1, xt(n.tooltipTitle), 1),
|
|
17686
17686
|
n.locked ? (X(), Jt(g, {
|
|
17687
17687
|
key: 0,
|
|
17688
17688
|
class: "drag-icon",
|
|
17689
17689
|
icon: "drag"
|
|
17690
17690
|
})) : qt("", !0),
|
|
17691
|
-
n.context ? (X(),
|
|
17691
|
+
n.context ? (X(), wt("span", T1, xt(n.context), 1)) : qt("", !0)
|
|
17692
17692
|
]),
|
|
17693
17693
|
lt("ul", D1, [
|
|
17694
|
-
(X(!0),
|
|
17695
|
-
n.series.length ? (X(),
|
|
17694
|
+
(X(!0), wt(nr, null, Os(n.series, ({ backgroundColor: v, borderColor: p, label: m, value: b }) => (X(), wt(nr, { key: m }, [
|
|
17695
|
+
n.series.length ? (X(), wt("li", S1, [
|
|
17696
17696
|
lt("div", {
|
|
17697
17697
|
class: "tooltip-legend",
|
|
17698
17698
|
style: fe({ background: v, "border-color": p })
|
|
17699
17699
|
}, null, 4),
|
|
17700
|
-
lt("span", k1,
|
|
17701
|
-
lt("span", C1,
|
|
17700
|
+
lt("span", k1, xt(m), 1),
|
|
17701
|
+
lt("span", C1, xt(b), 1)
|
|
17702
17702
|
])) : qt("", !0)
|
|
17703
17703
|
], 64))), 128))
|
|
17704
17704
|
])
|
|
@@ -17711,7 +17711,7 @@ const Ce = (n, t) => {
|
|
|
17711
17711
|
for (const [i, r] of t)
|
|
17712
17712
|
e[i] = r;
|
|
17713
17713
|
return e;
|
|
17714
|
-
}, yo = /* @__PURE__ */ Ce(P1, [["__scopeId", "data-v-7db65e4a"]]), O1 = ["onClick"], E1 =
|
|
17714
|
+
}, yo = /* @__PURE__ */ Ce(P1, [["__scopeId", "data-v-7db65e4a"]]), O1 = ["onClick"], E1 = ["title"], A1 = {
|
|
17715
17715
|
key: 0,
|
|
17716
17716
|
class: "sub-label"
|
|
17717
17717
|
}, R1 = /* @__PURE__ */ se({
|
|
@@ -17743,16 +17743,16 @@ const Ce = (n, t) => {
|
|
|
17743
17743
|
const u = t.chartInstance instanceof ne ? t.chartInstance : t.chartInstance.chart, d = u.getDatasetMeta(l);
|
|
17744
17744
|
return d.dataset || c === void 0 ? u.isDatasetVisible(l) : !(d.data.length && d.data[c].hidden);
|
|
17745
17745
|
}, a = (l) => ({
|
|
17746
|
-
[
|
|
17747
|
-
[
|
|
17748
|
-
[
|
|
17749
|
-
})[l], s = ir("showLegendValues", !0), o = ir("legendPosition", ut(
|
|
17750
|
-
return (l, c) =>
|
|
17746
|
+
[Et.Right]: "vertical",
|
|
17747
|
+
[Et.Bottom]: "horizontal",
|
|
17748
|
+
[Et.Hidden]: "hidden"
|
|
17749
|
+
})[l], s = ir("showLegendValues", !0), o = ir("legendPosition", ut(Et.Right));
|
|
17750
|
+
return (l, c) => pt(o) !== pt(Et).Hidden ? (X(), wt("ul", {
|
|
17751
17751
|
key: 0,
|
|
17752
|
-
class: wn(["legend-container", a(
|
|
17752
|
+
class: wn(["legend-container", a(pt(o))]),
|
|
17753
17753
|
"data-testid": "legend"
|
|
17754
17754
|
}, [
|
|
17755
|
-
(X(!0),
|
|
17755
|
+
(X(!0), wt(nr, null, Os(e.value, ({ fillStyle: u, strokeStyle: d, text: h, datasetIndex: f, index: g, value: v }) => (X(), wt("li", {
|
|
17756
17756
|
key: h,
|
|
17757
17757
|
onClick: (p) => i(f, g)
|
|
17758
17758
|
}, [
|
|
@@ -17763,14 +17763,17 @@ const Ce = (n, t) => {
|
|
|
17763
17763
|
lt("div", {
|
|
17764
17764
|
class: wn({ "strike-through": !r(f, g) })
|
|
17765
17765
|
}, [
|
|
17766
|
-
lt("div",
|
|
17767
|
-
|
|
17766
|
+
lt("div", {
|
|
17767
|
+
class: "label",
|
|
17768
|
+
title: pt(o) === pt(Et).Bottom && h
|
|
17769
|
+
}, xt(h), 9, E1),
|
|
17770
|
+
v && pt(s) ? (X(), wt("div", A1, xt(v.formatted), 1)) : qt("", !0)
|
|
17768
17771
|
], 2)
|
|
17769
17772
|
], 8, O1))), 128))
|
|
17770
17773
|
], 2)) : qt("", !0);
|
|
17771
17774
|
}
|
|
17772
17775
|
});
|
|
17773
|
-
const xo = /* @__PURE__ */ Ce(R1, [["__scopeId", "data-v-
|
|
17776
|
+
const xo = /* @__PURE__ */ Ce(R1, [["__scopeId", "data-v-7d4239b5"]]);
|
|
17774
17777
|
let qi;
|
|
17775
17778
|
const L1 = new Uint8Array(16);
|
|
17776
17779
|
function I1() {
|
|
@@ -17879,9 +17882,9 @@ const jc = (n, t) => {
|
|
|
17879
17882
|
const t = n, { i18n: e } = kt.useI18n(), i = ({ chart: k }, L) => {
|
|
17880
17883
|
var j;
|
|
17881
17884
|
const F = k.data, z = (j = F.labels) == null ? void 0 : j.indexOf(L);
|
|
17882
|
-
return F.datasets.reduce((q,
|
|
17885
|
+
return F.datasets.reduce((q, yt, ft) => {
|
|
17883
17886
|
if (k.isDatasetVisible(ft)) {
|
|
17884
|
-
const it =
|
|
17887
|
+
const it = yt.data[z];
|
|
17885
17888
|
return isNaN(it) ? q : q + it;
|
|
17886
17889
|
} else
|
|
17887
17890
|
return q;
|
|
@@ -17893,7 +17896,7 @@ const jc = (n, t) => {
|
|
|
17893
17896
|
type: "label",
|
|
17894
17897
|
yValue: (it) => j ? L : i(it, L),
|
|
17895
17898
|
xValue: (it) => j ? i(it, L) : L
|
|
17896
|
-
},
|
|
17899
|
+
}, yt = {
|
|
17897
17900
|
...q,
|
|
17898
17901
|
position: j ? { x: "start", y: "center" } : { x: "center", y: "end" },
|
|
17899
17902
|
yAdjust: () => j ? 0 : -Math.abs(Gx()),
|
|
@@ -17906,10 +17909,10 @@ const jc = (n, t) => {
|
|
|
17906
17909
|
color: qx
|
|
17907
17910
|
};
|
|
17908
17911
|
return {
|
|
17909
|
-
[`${L}-value`]:
|
|
17912
|
+
[`${L}-value`]: yt,
|
|
17910
17913
|
[`${L}-percent`]: ft
|
|
17911
17914
|
};
|
|
17912
|
-
}, a = ut(), s = ut(), o = ut($e()), l = $e(), c = $e(), u = ut([]), d = ut(ir("legendPosition",
|
|
17915
|
+
}, a = ut(), s = ut(), o = ut($e()), l = $e(), c = $e(), u = ut([]), d = ut(ir("legendPosition", Et.Right)), h = ut({
|
|
17913
17916
|
show: !1,
|
|
17914
17917
|
top: "0px",
|
|
17915
17918
|
left: "0px",
|
|
@@ -18026,15 +18029,15 @@ const jc = (n, t) => {
|
|
|
18026
18029
|
R
|
|
18027
18030
|
), V = E(() => {
|
|
18028
18031
|
m.value;
|
|
18029
|
-
const k = t.chartData.labels, L = t.chartData.datasets, F = k.map((q,
|
|
18030
|
-
return F.map((q) => dc(ea(q, f.value) + fc(q, z))).reduce((q,
|
|
18032
|
+
const k = t.chartData.labels, L = t.chartData.datasets, F = k.map((q, yt) => L.reduce((ft, it) => isNaN(Number(it.data[yt])) ? ft : ft + Number(it.data[yt]), 0)), z = N.value ? hc(N.value, t.chartData) : Kx(t.chartData);
|
|
18033
|
+
return F.map((q) => dc(ea(q, f.value) + fc(q, z))).reduce((q, yt) => Math.max(q, yt), 0) + Vc;
|
|
18031
18034
|
});
|
|
18032
18035
|
Ps(() => {
|
|
18033
18036
|
ne.unregister($c);
|
|
18034
18037
|
});
|
|
18035
18038
|
const ht = {
|
|
18036
|
-
[
|
|
18037
|
-
[
|
|
18039
|
+
[Et.Right]: "legend-row",
|
|
18040
|
+
[Et.Bottom]: "column"
|
|
18038
18041
|
}, I = E(() => {
|
|
18039
18042
|
if (s.value && N.value) {
|
|
18040
18043
|
const k = window.devicePixelRatio, L = N.value, F = L.scales.y.width * k + j1, z = (L.scales.y.height + L.scales.y.top + L.scales.x.height) * k, j = s.value.getContext("2d");
|
|
@@ -18048,8 +18051,8 @@ const jc = (n, t) => {
|
|
|
18048
18051
|
return null;
|
|
18049
18052
|
}), H = (k) => {
|
|
18050
18053
|
if (I.value && N.value) {
|
|
18051
|
-
const L = I.value.scale, F = I.value.targetCtx, z = I.value.width, j = I.value.height, q = N.value,
|
|
18052
|
-
F.fillStyle = "white", ft.scrollLeft >= z1 && ft.scrollLeft <= $1 ? (F.globalCompositeOperation = "source-over", F.clearRect(0, 0, z, j), F.drawImage(
|
|
18054
|
+
const L = I.value.scale, F = I.value.targetCtx, z = I.value.width, j = I.value.height, q = N.value, yt = q.canvas, ft = k.target;
|
|
18055
|
+
F.fillStyle = "white", ft.scrollLeft >= z1 && ft.scrollLeft <= $1 ? (F.globalCompositeOperation = "source-over", F.clearRect(0, 0, z, j), F.drawImage(yt, 0, 0, z, j, 0, 0, z, j), F.globalCompositeOperation = "destination-over", F.fillRect(0, 0, z, j)) : (F.globalCompositeOperation = "source-over", F.fillRect(0, (q.scales.y.height + q.scales.y.top + B1) * L, z, q.scales.x.height * L)), p.offset = ft.scrollLeft, h.value.offset = ft.scrollLeft;
|
|
18053
18056
|
}
|
|
18054
18057
|
}, K = ({ width: k, height: L }) => {
|
|
18055
18058
|
p.width = k, p.height = L;
|
|
@@ -18064,10 +18067,10 @@ const jc = (n, t) => {
|
|
|
18064
18067
|
}), he(() => t.annotations, (k) => {
|
|
18065
18068
|
N.value && (k ? N.value.options.plugins.annotation.annotations = b(t.chartData) : delete N.value.options.plugins.annotation.annotations);
|
|
18066
18069
|
});
|
|
18067
|
-
const
|
|
18070
|
+
const Lt = () => {
|
|
18068
18071
|
p.showTooltip && (p.locked = !p.locked);
|
|
18069
18072
|
};
|
|
18070
|
-
return (k, L) => (X(),
|
|
18073
|
+
return (k, L) => (X(), wt("div", {
|
|
18071
18074
|
class: wn(["chart-parent", ht[d.value]])
|
|
18072
18075
|
}, [
|
|
18073
18076
|
lt("canvas", {
|
|
@@ -18081,7 +18084,7 @@ const jc = (n, t) => {
|
|
|
18081
18084
|
"overflow-x": T.value > oa ? "auto" : "hidden"
|
|
18082
18085
|
}),
|
|
18083
18086
|
"on:scroll": H,
|
|
18084
|
-
onClick: L[0] || (L[0] = (F) =>
|
|
18087
|
+
onClick: L[0] || (L[0] = (F) => Lt())
|
|
18085
18088
|
}, [
|
|
18086
18089
|
lt("div", {
|
|
18087
18090
|
class: "chart-body",
|
|
@@ -18096,11 +18099,11 @@ const jc = (n, t) => {
|
|
|
18096
18099
|
}, null, 512)
|
|
18097
18100
|
], 4)
|
|
18098
18101
|
], 36),
|
|
18099
|
-
h.value.show ? (X(),
|
|
18102
|
+
h.value.show ? (X(), wt("div", {
|
|
18100
18103
|
key: 0,
|
|
18101
18104
|
class: "axis-tooltip",
|
|
18102
18105
|
style: fe({ top: h.value.top, left: h.value.left })
|
|
18103
|
-
},
|
|
18106
|
+
}, xt(h.value.text), 5)) : qt("", !0),
|
|
18104
18107
|
Se(yo, {
|
|
18105
18108
|
context: p.tooltipContext,
|
|
18106
18109
|
left: p.left,
|
|
@@ -18113,7 +18116,7 @@ const jc = (n, t) => {
|
|
|
18113
18116
|
}, null, 8, ["context", "left", "locked", "series", "show-tooltip", "tooltip-title", "top"]),
|
|
18114
18117
|
Se(xo, {
|
|
18115
18118
|
id: o.value,
|
|
18116
|
-
"chart-instance":
|
|
18119
|
+
"chart-instance": pt(N),
|
|
18117
18120
|
items: u.value
|
|
18118
18121
|
}, null, 8, ["id", "chart-instance", "items"])
|
|
18119
18122
|
], 2));
|
|
@@ -18403,7 +18406,7 @@ const eM = /* @__PURE__ */ wo("bar", ni), Jd = /* @__PURE__ */ wo("doughnut", Fe
|
|
|
18403
18406
|
legendPosition: {
|
|
18404
18407
|
type: String,
|
|
18405
18408
|
required: !1,
|
|
18406
|
-
default:
|
|
18409
|
+
default: Et.Right
|
|
18407
18410
|
},
|
|
18408
18411
|
legendValues: {
|
|
18409
18412
|
type: Object,
|
|
@@ -18463,13 +18466,13 @@ const eM = /* @__PURE__ */ wo("bar", ni), Jd = /* @__PURE__ */ wo("doughnut", Fe
|
|
|
18463
18466
|
tooltipState: o,
|
|
18464
18467
|
legendID: i.value
|
|
18465
18468
|
}), h = ut(), f = (v) => ({
|
|
18466
|
-
[
|
|
18467
|
-
[
|
|
18468
|
-
[
|
|
18469
|
+
[Et.Right]: "legend-row",
|
|
18470
|
+
[Et.Bottom]: "column",
|
|
18471
|
+
[Et.Hidden]: "hidden"
|
|
18469
18472
|
})[v], g = ({ width: v, height: p }) => {
|
|
18470
18473
|
o.width = v, o.height = p;
|
|
18471
18474
|
};
|
|
18472
|
-
return (v, p) => (X(),
|
|
18475
|
+
return (v, p) => (X(), wt("div", {
|
|
18473
18476
|
class: wn(["chart-parent", f(n.legendPosition)]),
|
|
18474
18477
|
"data-testid": "doughnut-chart-parent"
|
|
18475
18478
|
}, [
|
|
@@ -18477,12 +18480,12 @@ const eM = /* @__PURE__ */ wo("bar", ni), Jd = /* @__PURE__ */ wo("doughnut", Fe
|
|
|
18477
18480
|
class: "chart-container",
|
|
18478
18481
|
style: fe({ height: n.height, width: n.width })
|
|
18479
18482
|
}, [
|
|
18480
|
-
Se(
|
|
18483
|
+
Se(pt(Jd), {
|
|
18481
18484
|
ref_key: "chartInstance",
|
|
18482
18485
|
ref: h,
|
|
18483
18486
|
"chart-id": r.value,
|
|
18484
18487
|
data: u.value,
|
|
18485
|
-
options:
|
|
18488
|
+
options: pt(d),
|
|
18486
18489
|
plugins: [l]
|
|
18487
18490
|
}, null, 8, ["chart-id", "data", "options", "plugins"]),
|
|
18488
18491
|
Se(yo, {
|
|
@@ -18606,7 +18609,7 @@ const rM = /* @__PURE__ */ Ce(iM, [["__scopeId", "data-v-de0db02a"]]), qc = (n,
|
|
|
18606
18609
|
}
|
|
18607
18610
|
},
|
|
18608
18611
|
setup(n) {
|
|
18609
|
-
const t = n, { i18n: e } = kt.useI18n(), i = ut(), r = ut($e()), a = ut($e()), s = ut([]), o = ut(), l = ut(ir("legendPosition",
|
|
18612
|
+
const t = n, { i18n: e } = kt.useI18n(), i = ut(), r = ut($e()), a = ut($e()), s = ut([]), o = ut(), l = ut(ir("legendPosition", Et.Right)), c = E(() => t.metricUnit && e.t(`chartUnits.${t.metricUnit}`)), u = Es({
|
|
18610
18613
|
showTooltip: !1,
|
|
18611
18614
|
tooltipContext: "",
|
|
18612
18615
|
tooltipSeries: [],
|
|
@@ -18638,9 +18641,9 @@ const rM = /* @__PURE__ */ Ce(iM, [["__scopeId", "data-v-de0db02a"]]), qc = (n,
|
|
|
18638
18641
|
}));
|
|
18639
18642
|
kt.useReportChartDataForSynthetics(gt(t, "chartData"), gt(t, "syntheticsDataKey"));
|
|
18640
18643
|
const v = (y) => Vx(y, { short: [$.DAILY, $.WEEKLY].includes(t.granularity) }), p = (y) => ({
|
|
18641
|
-
[
|
|
18642
|
-
[
|
|
18643
|
-
[
|
|
18644
|
+
[Et.Right]: "legend-row",
|
|
18645
|
+
[Et.Bottom]: "column",
|
|
18646
|
+
[Et.Hidden]: "hidden"
|
|
18644
18647
|
})[y], m = ({ width: y, height: x }) => {
|
|
18645
18648
|
u.width = y, u.height = x;
|
|
18646
18649
|
}, b = () => {
|
|
@@ -18649,7 +18652,7 @@ const rM = /* @__PURE__ */ Ce(iM, [["__scopeId", "data-v-de0db02a"]]), qc = (n,
|
|
|
18649
18652
|
};
|
|
18650
18653
|
return he(() => t.type, () => {
|
|
18651
18654
|
u.locked = !1, u.showTooltip = !1, delete la.clickedSegment;
|
|
18652
|
-
}), (y, x) => (X(),
|
|
18655
|
+
}), (y, x) => (X(), wt("div", {
|
|
18653
18656
|
class: wn(["chart-parent", p(l.value)]),
|
|
18654
18657
|
"data-testid": "line-chart-parent"
|
|
18655
18658
|
}, [
|
|
@@ -18658,23 +18661,23 @@ const rM = /* @__PURE__ */ Ce(iM, [["__scopeId", "data-v-de0db02a"]]), qc = (n,
|
|
|
18658
18661
|
style: fe({ height: n.height, width: n.width }),
|
|
18659
18662
|
onClick: x[0] || (x[0] = (w) => b())
|
|
18660
18663
|
}, [
|
|
18661
|
-
n.type ===
|
|
18664
|
+
n.type === pt(Ut).TIMESERIES_LINE ? (X(), Jt(pt(nM), {
|
|
18662
18665
|
key: 0,
|
|
18663
18666
|
ref_key: "chartInstance",
|
|
18664
18667
|
ref: i,
|
|
18665
18668
|
"chart-id": a.value,
|
|
18666
18669
|
data: g.value,
|
|
18667
18670
|
"data-testid": "time-series-line-chart",
|
|
18668
|
-
options:
|
|
18671
|
+
options: pt(f),
|
|
18669
18672
|
plugins: h.value
|
|
18670
|
-
}, null, 8, ["chart-id", "data", "options", "plugins"])) : n.type ===
|
|
18673
|
+
}, null, 8, ["chart-id", "data", "options", "plugins"])) : n.type === pt(Ut).TIMESERIES_BAR ? (X(), Jt(pt(eM), {
|
|
18671
18674
|
key: 1,
|
|
18672
18675
|
ref_key: "chartInstance",
|
|
18673
18676
|
ref: i,
|
|
18674
18677
|
"chart-id": a.value,
|
|
18675
18678
|
data: g.value,
|
|
18676
18679
|
"data-testid": "time-series-bar-chart",
|
|
18677
|
-
options:
|
|
18680
|
+
options: pt(f),
|
|
18678
18681
|
plugins: h.value
|
|
18679
18682
|
}, null, 8, ["chart-id", "data", "options", "plugins"])) : qt("", !0)
|
|
18680
18683
|
], 4),
|
|
@@ -18741,7 +18744,7 @@ const sM = /* @__PURE__ */ Ce(aM, [["__scopeId", "data-v-24536659"]]), oM = "#99
|
|
|
18741
18744
|
legendPosition: {
|
|
18742
18745
|
type: String,
|
|
18743
18746
|
required: !1,
|
|
18744
|
-
default:
|
|
18747
|
+
default: Et.Right
|
|
18745
18748
|
},
|
|
18746
18749
|
syntheticsDataKey: {
|
|
18747
18750
|
type: String,
|
|
@@ -18793,7 +18796,7 @@ const sM = /* @__PURE__ */ Ce(aM, [["__scopeId", "data-v-24536659"]]), oM = "#99
|
|
|
18793
18796
|
}), s = E(() => {
|
|
18794
18797
|
var M;
|
|
18795
18798
|
return (M = t.chartData.meta) != null && M.metricUnits ? Object.values(t.chartData.meta.metricUnits)[0] : "";
|
|
18796
|
-
}), o = E(() => t.showLegendValues && t.legendPosition !==
|
|
18799
|
+
}), o = E(() => t.showLegendValues && t.legendPosition !== Et.Bottom), { legendValues: l } = kt.useChartLegendValues(i, t.chartOptions.type, s), c = E(() => {
|
|
18797
18800
|
var M, T, D;
|
|
18798
18801
|
return ((D = (T = (M = t.chartData) == null ? void 0 : M.meta) == null ? void 0 : T.limit) == null ? void 0 : D.toString()) || null;
|
|
18799
18802
|
}), u = E(() => {
|
|
@@ -18827,9 +18830,9 @@ const sM = /* @__PURE__ */ Ce(aM, [["__scopeId", "data-v-24536659"]]), oM = "#99
|
|
|
18827
18830
|
) || $.HOURLY);
|
|
18828
18831
|
return _o("showLegendValues", o), _o("legendPosition", gt(t, "legendPosition")), (M, T) => {
|
|
18829
18832
|
const D = nn("KIcon"), O = nn("KTooltip"), R = nn("KEmptyState");
|
|
18830
|
-
return X(),
|
|
18833
|
+
return X(), wt("div", lM, [
|
|
18831
18834
|
lt("div", cM, [
|
|
18832
|
-
n.chartTitle ? (X(),
|
|
18835
|
+
n.chartTitle ? (X(), wt("div", uM, xt(n.chartTitle), 1)) : qt("", !0),
|
|
18833
18836
|
lt("div", dM, [
|
|
18834
18837
|
w.value && u.value && c.value ? (X(), Jt(O, {
|
|
18835
18838
|
key: 0,
|
|
@@ -18838,7 +18841,7 @@ const sM = /* @__PURE__ */ Ce(aM, [["__scopeId", "data-v-24536659"]]), oM = "#99
|
|
|
18838
18841
|
placement: "right"
|
|
18839
18842
|
}, {
|
|
18840
18843
|
content: re(() => [
|
|
18841
|
-
Le(
|
|
18844
|
+
Le(xt(pt(d)), 1)
|
|
18842
18845
|
]),
|
|
18843
18846
|
default: re(() => [
|
|
18844
18847
|
lt("div", hM, [
|
|
@@ -18847,7 +18850,7 @@ const sM = /* @__PURE__ */ Ce(aM, [["__scopeId", "data-v-24536659"]]), oM = "#99
|
|
|
18847
18850
|
color: "currentColor",
|
|
18848
18851
|
"hide-title": "",
|
|
18849
18852
|
icon: "warning",
|
|
18850
|
-
"secondary-color":
|
|
18853
|
+
"secondary-color": pt(oM),
|
|
18851
18854
|
size: "18"
|
|
18852
18855
|
}, null, 8, ["secondary-color"])
|
|
18853
18856
|
])
|
|
@@ -18856,7 +18859,7 @@ const sM = /* @__PURE__ */ Ce(aM, [["__scopeId", "data-v-24536659"]]), oM = "#99
|
|
|
18856
18859
|
})) : qt("", !0)
|
|
18857
18860
|
])
|
|
18858
18861
|
]),
|
|
18859
|
-
w.value ? (X(),
|
|
18862
|
+
w.value ? (X(), wt("div", fM, [
|
|
18860
18863
|
f.value ? (X(), Jt(sM, {
|
|
18861
18864
|
key: 0,
|
|
18862
18865
|
"chart-data": i.value,
|
|
@@ -18865,7 +18868,7 @@ const sM = /* @__PURE__ */ Ce(aM, [["__scopeId", "data-v-24536659"]]), oM = "#99
|
|
|
18865
18868
|
fill: n.chartOptions.fill,
|
|
18866
18869
|
granularity: _.value,
|
|
18867
18870
|
height: n.height,
|
|
18868
|
-
"legend-values":
|
|
18871
|
+
"legend-values": pt(l),
|
|
18869
18872
|
"metric-axes-title": p.value,
|
|
18870
18873
|
"metric-unit": s.value,
|
|
18871
18874
|
stacked: n.chartOptions.stacked,
|
|
@@ -18881,7 +18884,7 @@ const sM = /* @__PURE__ */ Ce(aM, [["__scopeId", "data-v-24536659"]]), oM = "#99
|
|
|
18881
18884
|
"chart-data": i.value,
|
|
18882
18885
|
"data-testid": "bar-chart-container",
|
|
18883
18886
|
"dimension-axes-title": m.value,
|
|
18884
|
-
"legend-values":
|
|
18887
|
+
"legend-values": pt(l),
|
|
18885
18888
|
"metric-axes-title": p.value,
|
|
18886
18889
|
"metric-unit": s.value,
|
|
18887
18890
|
orientation: v.value,
|
|
@@ -18893,7 +18896,7 @@ const sM = /* @__PURE__ */ Ce(aM, [["__scopeId", "data-v-24536659"]]), oM = "#99
|
|
|
18893
18896
|
"dataset-colors": n.chartOptions.chartDatasetColors,
|
|
18894
18897
|
fill: n.chartOptions.fill,
|
|
18895
18898
|
"legend-position": n.legendPosition,
|
|
18896
|
-
"legend-values":
|
|
18899
|
+
"legend-values": pt(l),
|
|
18897
18900
|
"metric-unit": s.value,
|
|
18898
18901
|
"synthetics-data-key": n.syntheticsDataKey,
|
|
18899
18902
|
"tooltip-title": n.tooltipTitle,
|
|
@@ -18908,10 +18911,10 @@ const sM = /* @__PURE__ */ Ce(aM, [["__scopeId", "data-v-24536659"]]), oM = "#99
|
|
|
18908
18911
|
"icon-size": "170"
|
|
18909
18912
|
}, {
|
|
18910
18913
|
title: re(() => [
|
|
18911
|
-
Le(
|
|
18914
|
+
Le(xt(y.value), 1)
|
|
18912
18915
|
]),
|
|
18913
18916
|
message: re(() => [
|
|
18914
|
-
Le(
|
|
18917
|
+
Le(xt(x.value), 1)
|
|
18915
18918
|
]),
|
|
18916
18919
|
_: 1
|
|
18917
18920
|
}))
|
|
@@ -18991,21 +18994,21 @@ const zM = /* @__PURE__ */ Ce(gM, [["__scopeId", "data-v-bd1de2bc"]]), pM = {
|
|
|
18991
18994
|
var f;
|
|
18992
18995
|
return `color: ${(f = r == null ? void 0 : r.value[0]) == null ? void 0 : f.backgroundColor[0]}`;
|
|
18993
18996
|
}), d = E(() => [Kn.Full, Kn.SingleMetric].includes(t.metricDisplay)), h = E(() => t.metricDisplay === Kn.Full);
|
|
18994
|
-
return (f, g) => (X(),
|
|
18997
|
+
return (f, g) => (X(), wt("div", pM, [
|
|
18995
18998
|
lt("div", mM, [
|
|
18996
|
-
d.value ? (X(),
|
|
18999
|
+
d.value ? (X(), wt("div", {
|
|
18997
19000
|
key: 0,
|
|
18998
19001
|
class: "metric-large",
|
|
18999
19002
|
"data-testid": "doughnut-chart-metric",
|
|
19000
19003
|
style: fe(u.value)
|
|
19001
|
-
},
|
|
19002
|
-
h.value ? (X(),
|
|
19004
|
+
}, xt(l.value), 5)) : qt("", !0),
|
|
19005
|
+
h.value ? (X(), wt("div", vM, xt(pt(e).t("total")) + ": " + xt(c.value), 1)) : qt("", !0)
|
|
19003
19006
|
]),
|
|
19004
19007
|
lt("div", {
|
|
19005
19008
|
class: "chart-container",
|
|
19006
19009
|
style: fe({ height: n.height, width: n.width })
|
|
19007
19010
|
}, [
|
|
19008
|
-
Se(
|
|
19011
|
+
Se(pt(Jd), {
|
|
19009
19012
|
ref_key: "chartInstance",
|
|
19010
19013
|
ref: o,
|
|
19011
19014
|
"chart-id": i.value,
|
|
@@ -19065,8 +19068,8 @@ const yM = /* @__PURE__ */ Ce(bM, [["__scopeId", "data-v-4398af32"]]), xM = { cl
|
|
|
19065
19068
|
}), a = E(() => t.chartOptions.type === eo.GAUGE), s = E(() => t.emptyStateTitle || e.t("noDataAvailableTitle")), o = E(() => t.chartData && t.chartData.meta && t.chartData.records.length);
|
|
19066
19069
|
return (l, c) => {
|
|
19067
19070
|
const u = nn("KEmptyState");
|
|
19068
|
-
return X(),
|
|
19069
|
-
o.value ? (X(),
|
|
19071
|
+
return X(), wt("div", xM, [
|
|
19072
|
+
o.value ? (X(), wt("div", wM, [
|
|
19070
19073
|
a.value ? (X(), Jt(yM, {
|
|
19071
19074
|
key: 0,
|
|
19072
19075
|
"chart-data": i.value,
|
|
@@ -19086,7 +19089,7 @@ const yM = /* @__PURE__ */ Ce(bM, [["__scopeId", "data-v-4398af32"]]), xM = { cl
|
|
|
19086
19089
|
"icon-size": "80"
|
|
19087
19090
|
}, {
|
|
19088
19091
|
title: re(() => [
|
|
19089
|
-
Le(
|
|
19092
|
+
Le(xt(s.value), 1)
|
|
19090
19093
|
]),
|
|
19091
19094
|
_: 1
|
|
19092
19095
|
}))
|
|
@@ -19169,21 +19172,21 @@ const $M = /* @__PURE__ */ Ce(_M, [["__scopeId", "data-v-6808e51e"]]), MM = { "d
|
|
|
19169
19172
|
"is-error": ""
|
|
19170
19173
|
}, {
|
|
19171
19174
|
title: re(() => [
|
|
19172
|
-
Le(
|
|
19175
|
+
Le(xt(pt(e).t("topNTable.defaultErrorStateTitle")), 1)
|
|
19173
19176
|
]),
|
|
19174
19177
|
message: re(() => [
|
|
19175
|
-
Le(
|
|
19178
|
+
Le(xt(c.value), 1)
|
|
19176
19179
|
]),
|
|
19177
19180
|
_: 1
|
|
19178
|
-
})) : r.value ? (X(),
|
|
19181
|
+
})) : r.value ? (X(), wt("div", DM, [
|
|
19179
19182
|
lt("div", SM, [
|
|
19180
19183
|
lt("div", kM, [
|
|
19181
|
-
lt("div", CM,
|
|
19182
|
-
lt("div", PM,
|
|
19184
|
+
lt("div", CM, xt(pt(e).t("topNTable.nameLabel")), 1),
|
|
19185
|
+
lt("div", PM, xt(l.value), 1)
|
|
19183
19186
|
])
|
|
19184
19187
|
]),
|
|
19185
19188
|
lt("div", OM, [
|
|
19186
|
-
(X(!0),
|
|
19189
|
+
(X(!0), wt(nr, null, Os(i.value, (m, b) => (X(), wt("div", {
|
|
19187
19190
|
key: `entry-${b}`,
|
|
19188
19191
|
class: "table-row",
|
|
19189
19192
|
"data-testid": `row-${u(m)}`
|
|
@@ -19196,10 +19199,10 @@ const $M = /* @__PURE__ */ Ce(_M, [["__scopeId", "data-v-6808e51e"]]), MM = { "d
|
|
|
19196
19199
|
dimension: a.value
|
|
19197
19200
|
}
|
|
19198
19201
|
}, () => [
|
|
19199
|
-
Le(
|
|
19202
|
+
Le(xt(d(m)), 1)
|
|
19200
19203
|
], !0)
|
|
19201
19204
|
]),
|
|
19202
|
-
lt("div", RM, " " +
|
|
19205
|
+
lt("div", RM, " " + xt(h(m)), 1)
|
|
19203
19206
|
], 8, EM))), 128))
|
|
19204
19207
|
])
|
|
19205
19208
|
])) : (X(), Jt(v, {
|
|
@@ -19210,7 +19213,7 @@ const $M = /* @__PURE__ */ Ce(_M, [["__scopeId", "data-v-6808e51e"]]), MM = { "d
|
|
|
19210
19213
|
"icon-size": "80"
|
|
19211
19214
|
}, {
|
|
19212
19215
|
title: re(() => [
|
|
19213
|
-
Le(
|
|
19216
|
+
Le(xt(n.emptyStateTitle || pt(e).t("topNTable.defaultEmptyStateTitle")), 1)
|
|
19214
19217
|
]),
|
|
19215
19218
|
_: 1
|
|
19216
19219
|
}))
|
|
@@ -19220,14 +19223,14 @@ const $M = /* @__PURE__ */ Ce(_M, [["__scopeId", "data-v-6808e51e"]]), MM = { "d
|
|
|
19220
19223
|
n.title ? {
|
|
19221
19224
|
name: "title",
|
|
19222
19225
|
fn: re(() => [
|
|
19223
|
-
lt("div", MM,
|
|
19226
|
+
lt("div", MM, xt(n.title), 1)
|
|
19224
19227
|
]),
|
|
19225
19228
|
key: "0"
|
|
19226
19229
|
} : void 0,
|
|
19227
19230
|
n.description ? {
|
|
19228
19231
|
name: "actions",
|
|
19229
19232
|
fn: re(() => [
|
|
19230
|
-
lt("div", TM,
|
|
19233
|
+
lt("div", TM, xt(n.description), 1)
|
|
19231
19234
|
]),
|
|
19232
19235
|
key: "1"
|
|
19233
19236
|
} : void 0
|
|
@@ -19292,7 +19295,7 @@ const BM = /* @__PURE__ */ Ce(LM, [["__scopeId", "data-v-53ae6b81"]]), Xc = "#e0
|
|
|
19292
19295
|
};
|
|
19293
19296
|
export {
|
|
19294
19297
|
zM as AnalyticsChart,
|
|
19295
|
-
|
|
19298
|
+
Et as ChartLegendPosition,
|
|
19296
19299
|
Kn as ChartMetricDisplay,
|
|
19297
19300
|
Ut as ChartTypes,
|
|
19298
19301
|
eo as ChartTypesSimple,
|