@alfadocs/ui-kit 1.65.0 → 1.66.0
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/_chunks/chart-CwmyCuWe.js +1340 -0
- package/dist/_chunks/heatmap-C1TeC7wT.js +3650 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/use-apex-radial-centre.d.ts +7 -4
- package/dist/components/chart/index.js +1 -1
- package/dist/components/heatmap/heatmap-context.d.ts +3 -0
- package/dist/components/heatmap/heatmap-disclosure.d.ts +67 -0
- package/dist/components/heatmap/heatmap-grid.d.ts +1 -1
- package/dist/components/heatmap/heatmap-legend.d.ts +5 -2
- package/dist/components/heatmap/heatmap-model.d.ts +107 -15
- package/dist/components/heatmap/heatmap-table-view.d.ts +3 -2
- package/dist/components/heatmap/heatmap.d.ts +33 -7
- package/dist/components/heatmap/index.d.ts +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +2 -0
- package/dist/i18n/locales/ar.js +2 -0
- package/dist/i18n/locales/de.d.ts +2 -0
- package/dist/i18n/locales/de.js +2 -0
- package/dist/i18n/locales/el.d.ts +2 -0
- package/dist/i18n/locales/el.js +2 -0
- package/dist/i18n/locales/en.d.ts +2 -0
- package/dist/i18n/locales/en.js +2 -0
- package/dist/i18n/locales/es.d.ts +2 -0
- package/dist/i18n/locales/es.js +2 -0
- package/dist/i18n/locales/fr.d.ts +2 -0
- package/dist/i18n/locales/fr.js +2 -0
- package/dist/i18n/locales/hi.d.ts +2 -0
- package/dist/i18n/locales/hi.js +2 -0
- package/dist/i18n/locales/it.d.ts +2 -0
- package/dist/i18n/locales/it.js +2 -0
- package/dist/i18n/locales/ja.d.ts +2 -0
- package/dist/i18n/locales/ja.js +2 -0
- package/dist/i18n/locales/nl.d.ts +2 -0
- package/dist/i18n/locales/nl.js +2 -0
- package/dist/i18n/locales/pl.d.ts +2 -0
- package/dist/i18n/locales/pl.js +2 -0
- package/dist/i18n/locales/pt.d.ts +2 -0
- package/dist/i18n/locales/pt.js +2 -0
- package/dist/i18n/locales/ro.d.ts +2 -0
- package/dist/i18n/locales/ro.js +2 -0
- package/dist/i18n/locales/ru.d.ts +2 -0
- package/dist/i18n/locales/ru.js +2 -0
- package/dist/i18n/locales/sq.d.ts +2 -0
- package/dist/i18n/locales/sq.js +2 -0
- package/dist/i18n/locales/sv.d.ts +2 -0
- package/dist/i18n/locales/sv.js +2 -0
- package/dist/i18n/locales/tr.d.ts +2 -0
- package/dist/i18n/locales/tr.js +2 -0
- package/dist/i18n/locales/zh.d.ts +2 -0
- package/dist/i18n/locales/zh.js +2 -0
- package/dist/index.js +2 -2
- package/dist/locales/ar.json +2 -0
- package/dist/locales/de.json +2 -0
- package/dist/locales/el.json +2 -0
- package/dist/locales/en.json +2 -0
- package/dist/locales/es.json +2 -0
- package/dist/locales/fr.json +2 -0
- package/dist/locales/hi.json +2 -0
- package/dist/locales/it.json +2 -0
- package/dist/locales/ja.json +2 -0
- package/dist/locales/nl.json +2 -0
- package/dist/locales/pl.json +2 -0
- package/dist/locales/pt.json +2 -0
- package/dist/locales/ro.json +2 -0
- package/dist/locales/ru.json +2 -0
- package/dist/locales/sq.json +2 -0
- package/dist/locales/sv.json +2 -0
- package/dist/locales/tr.json +2 -0
- package/dist/locales/zh.json +2 -0
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/chart-CIzXxNeM.js +0 -1322
- package/dist/_chunks/heatmap-BxRHM8Et.js +0 -2865
|
@@ -1,1322 +0,0 @@
|
|
|
1
|
-
import { jsx as F, jsxs as pe } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect as se, forwardRef as mt, useId as ft, useMemo as D, useRef as ie, useState as ae, useImperativeHandle as yt } from "react";
|
|
3
|
-
import { c as Me } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as gt } from "react-i18next";
|
|
5
|
-
import bt from "react-apexcharts";
|
|
6
|
-
import Je from "apexcharts";
|
|
7
|
-
import { u as vt, a as xt, g as Qe, b as St, r as At } from "./apexcharts-theme-DNoXvgnZ.js";
|
|
8
|
-
import { u as Et } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
9
|
-
import { u as wt } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
10
|
-
import { c as Lt } from "./intl-locale-FWh-Y5_3.js";
|
|
11
|
-
import { e as he } from "./escape-html-Cn9Fao6a.js";
|
|
12
|
-
import { c as Ct } from "./compose-refs-C0k0tdqF.js";
|
|
13
|
-
import { u as Tt } from "./registry-DvAUVLHh.js";
|
|
14
|
-
import { I as Mt } from "./icon-button-C_1TgRiK.js";
|
|
15
|
-
import { I as It } from "./icon-button-group-NIHji7_y.js";
|
|
16
|
-
import { c as ge } from "./createLucideIcon-DhHxpK9K.js";
|
|
17
|
-
/**
|
|
18
|
-
* @license lucide-react v1.22.0 - ISC
|
|
19
|
-
*
|
|
20
|
-
* This source code is licensed under the ISC license.
|
|
21
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/
|
|
23
|
-
const Nt = [
|
|
24
|
-
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
25
|
-
[
|
|
26
|
-
"path",
|
|
27
|
-
{
|
|
28
|
-
d: "M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z",
|
|
29
|
-
key: "q0gr47"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
], Rt = ge("chart-area", Nt);
|
|
33
|
-
/**
|
|
34
|
-
* @license lucide-react v1.22.0 - ISC
|
|
35
|
-
*
|
|
36
|
-
* This source code is licensed under the ISC license.
|
|
37
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/
|
|
39
|
-
const Ot = [
|
|
40
|
-
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
41
|
-
["path", { d: "M18 17V9", key: "2bz60n" }],
|
|
42
|
-
["path", { d: "M13 17V5", key: "1frdt8" }],
|
|
43
|
-
["path", { d: "M8 17v-3", key: "17ska0" }]
|
|
44
|
-
], Pt = ge("chart-column", Ot);
|
|
45
|
-
/**
|
|
46
|
-
* @license lucide-react v1.22.0 - ISC
|
|
47
|
-
*
|
|
48
|
-
* This source code is licensed under the ISC license.
|
|
49
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/
|
|
51
|
-
const _t = [
|
|
52
|
-
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
53
|
-
["path", { d: "m19 9-5 5-4-4-3 3", key: "2osh9i" }]
|
|
54
|
-
], kt = ge("chart-line", _t);
|
|
55
|
-
/**
|
|
56
|
-
* @license lucide-react v1.22.0 - ISC
|
|
57
|
-
*
|
|
58
|
-
* This source code is licensed under the ISC license.
|
|
59
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/
|
|
61
|
-
const zt = [
|
|
62
|
-
[
|
|
63
|
-
"path",
|
|
64
|
-
{
|
|
65
|
-
d: "M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",
|
|
66
|
-
key: "pzmjnu"
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
["path", { d: "M21.21 15.89A10 10 0 1 1 8 2.83", key: "k2fpak" }]
|
|
70
|
-
], Bt = ge("chart-pie", zt);
|
|
71
|
-
/**
|
|
72
|
-
* @license lucide-react v1.22.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/
|
|
77
|
-
const $t = [
|
|
78
|
-
[
|
|
79
|
-
"path",
|
|
80
|
-
{
|
|
81
|
-
d: "M20.5 10a2.5 2.5 0 0 1-2.4-3H18a2.95 2.95 0 0 1-2.6-4.4 10 10 0 1 0 6.3 7.1c-.3.2-.8.3-1.2.3",
|
|
82
|
-
key: "19sr3x"
|
|
83
|
-
}
|
|
84
|
-
],
|
|
85
|
-
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
86
|
-
], qt = ge("donut", $t), Ft = ".apexcharts-legend, .apexcharts-toolbar";
|
|
87
|
-
function we(e, n, t) {
|
|
88
|
-
!e || e.getAttribute(n) === t || (t === null ? e.removeAttribute(n) : e.setAttribute(n, t));
|
|
89
|
-
}
|
|
90
|
-
function Ht(e, n) {
|
|
91
|
-
se(() => {
|
|
92
|
-
if (!e) return;
|
|
93
|
-
const t = () => {
|
|
94
|
-
e.querySelectorAll(".apexcharts-canvas").forEach((l) => {
|
|
95
|
-
Array.from(l.children).forEach((b) => {
|
|
96
|
-
b.matches(Ft) || we(b, "aria-hidden", "true");
|
|
97
|
-
});
|
|
98
|
-
}), e.querySelectorAll(".apexcharts-toolbar").forEach((l) => {
|
|
99
|
-
var y;
|
|
100
|
-
const b = ((y = l.querySelector(".apexcharts-menu-icon")) == null ? void 0 : y.getAttribute("aria-expanded")) === "true";
|
|
101
|
-
we(
|
|
102
|
-
l.querySelector(".apexcharts-menu"),
|
|
103
|
-
"inert",
|
|
104
|
-
b ? null : ""
|
|
105
|
-
);
|
|
106
|
-
}), e.querySelectorAll(
|
|
107
|
-
'.apexcharts-legend-series[role="button"]'
|
|
108
|
-
).forEach((l) => {
|
|
109
|
-
we(l, "aria-label", null);
|
|
110
|
-
const b = l.getAttribute("data:collapsed") === "true" ? "false" : "true";
|
|
111
|
-
we(l, "aria-pressed", n ? b : null);
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
let o = 0;
|
|
115
|
-
const h = (l) => {
|
|
116
|
-
const b = l.target instanceof Element ? l.target.closest(".apexcharts-legend-series") : null, y = b == null ? void 0 : b.getAttribute("rel");
|
|
117
|
-
y && (cancelAnimationFrame(o), o = requestAnimationFrame(() => {
|
|
118
|
-
var r;
|
|
119
|
-
const E = document.activeElement;
|
|
120
|
-
E && E !== document.body || (r = e.querySelector(
|
|
121
|
-
`.apexcharts-legend-series[rel="${CSS.escape(y)}"]`
|
|
122
|
-
)) == null || r.focus();
|
|
123
|
-
}));
|
|
124
|
-
};
|
|
125
|
-
t();
|
|
126
|
-
const a = new MutationObserver(t);
|
|
127
|
-
return a.observe(e, {
|
|
128
|
-
childList: !0,
|
|
129
|
-
subtree: !0,
|
|
130
|
-
attributes: !0,
|
|
131
|
-
attributeFilter: [
|
|
132
|
-
"aria-hidden",
|
|
133
|
-
"aria-label",
|
|
134
|
-
"aria-pressed",
|
|
135
|
-
"aria-expanded"
|
|
136
|
-
]
|
|
137
|
-
}), e.addEventListener("click", h), () => {
|
|
138
|
-
a.disconnect(), e.removeEventListener("click", h), cancelAnimationFrame(o);
|
|
139
|
-
};
|
|
140
|
-
}, [e, n]);
|
|
141
|
-
}
|
|
142
|
-
const Re = '.apexcharts-legend-series[role="button"]', et = ".apexcharts-legend-text", Le = "--chart-legend-item-size", Oe = "--chart-legend-value-size", Wt = ".chart-legend-value", Vt = ".chart-legend-name", Dt = 350;
|
|
143
|
-
function Ce(e, n, t) {
|
|
144
|
-
t && e.getAttribute(n) !== "true" ? e.setAttribute(n, "true") : !t && e.hasAttribute(n) && e.removeAttribute(n);
|
|
145
|
-
}
|
|
146
|
-
const te = (e, n) => Number.parseFloat(e.getPropertyValue(n)) || 0;
|
|
147
|
-
function Gt(e, n) {
|
|
148
|
-
se(() => {
|
|
149
|
-
if (!e || !n) return;
|
|
150
|
-
let t = null, o = 0, h = 0;
|
|
151
|
-
const a = () => {
|
|
152
|
-
if (!t) return;
|
|
153
|
-
const i = Math.abs(t.scrollLeft), p = t.scrollWidth - t.clientWidth;
|
|
154
|
-
h = i, Ce(t, "data-fade-start", i > 1), Ce(t, "data-fade-end", p - i > 1);
|
|
155
|
-
}, l = () => {
|
|
156
|
-
if (!t) return;
|
|
157
|
-
const i = getComputedStyle(t).direction === "rtl" ? -1 : 1;
|
|
158
|
-
Math.abs(Math.abs(t.scrollLeft) - h) > 1 && (t.scrollLeft = i * h);
|
|
159
|
-
}, b = () => {
|
|
160
|
-
if (!t) return;
|
|
161
|
-
const i = t.clientWidth, p = Array.from(
|
|
162
|
-
t.querySelectorAll(`:scope > ${Re}`)
|
|
163
|
-
).filter((L) => L.getClientRects().length > 0), x = (L, f, A = "") => te(L, `${f}-inline-start${A}`) + te(L, `${f}-inline-end${A}`), m = p.map((L) => {
|
|
164
|
-
const f = L.querySelector(Wt);
|
|
165
|
-
if (!f) return 0;
|
|
166
|
-
const A = getComputedStyle(L);
|
|
167
|
-
let _ = x(A, "padding") + x(A, "border", "-width");
|
|
168
|
-
for (const K of Array.from(L.children)) {
|
|
169
|
-
const T = getComputedStyle(K);
|
|
170
|
-
_ += x(T, "margin") + (K.contains(f) ? x(T, "padding") + x(T, "border", "-width") : K.getBoundingClientRect().width);
|
|
171
|
-
}
|
|
172
|
-
return _ + f.getBoundingClientRect().width;
|
|
173
|
-
}), I = getComputedStyle(t), N = te(I, "padding-inline-start"), Q = te(I, "padding-inline-end"), z = t.style.getPropertyValue(Le);
|
|
174
|
-
if (t.style.removeProperty(Le), p.length === 0) return;
|
|
175
|
-
p.forEach((L, f) => {
|
|
176
|
-
m[f] > 0 ? L.style.setProperty(Oe, `${Math.ceil(m[f])}px`) : L.style.removeProperty(Oe);
|
|
177
|
-
});
|
|
178
|
-
const Y = p.map(
|
|
179
|
-
(L) => te(getComputedStyle(L), "min-inline-size")
|
|
180
|
-
), U = Math.max(...Y), v = getComputedStyle(p[0]), C = te(v, "margin-inline-start") + te(v, "margin-inline-end"), s = Y.reduce((L, f) => L + f + C, 0);
|
|
181
|
-
if (U <= 0 || N + Q + s <= i)
|
|
182
|
-
return;
|
|
183
|
-
const S = Math.floor(
|
|
184
|
-
(i - N - C / 2 - U / 2) / (U + C)
|
|
185
|
-
);
|
|
186
|
-
if (S < 1) return;
|
|
187
|
-
const P = (i - N - C / 2 - S * C) / (S + 0.5);
|
|
188
|
-
t.style.setProperty(
|
|
189
|
-
Le,
|
|
190
|
-
z && Math.abs(Number.parseFloat(z) - P) < 0.5 ? z : `${Math.floor(P * 100) / 100}px`
|
|
191
|
-
);
|
|
192
|
-
}, y = new ResizeObserver(() => {
|
|
193
|
-
b(), a();
|
|
194
|
-
}), { fonts: E } = e.ownerDocument, r = () => {
|
|
195
|
-
b(), a();
|
|
196
|
-
}, c = () => {
|
|
197
|
-
const i = e.querySelector(".apexcharts-legend"), p = i !== t;
|
|
198
|
-
p && (t && (t.removeEventListener("scroll", a), y.unobserve(t)), t = i, t && (t.addEventListener("scroll", a, { passive: !0 }), y.observe(t))), b(), p && l(), a();
|
|
199
|
-
};
|
|
200
|
-
let d = !1, u = 0, H;
|
|
201
|
-
const G = (i) => t !== null && i.target instanceof Node && t.contains(i.target), k = () => {
|
|
202
|
-
cancelAnimationFrame(u), clearTimeout(H), d = !1;
|
|
203
|
-
}, j = (i) => {
|
|
204
|
-
k(), d = G(i);
|
|
205
|
-
}, W = (i) => {
|
|
206
|
-
if (d) {
|
|
207
|
-
if (!G(i)) {
|
|
208
|
-
k();
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
clearTimeout(H), H = setTimeout(
|
|
212
|
-
k,
|
|
213
|
-
i.pointerType === "touch" ? Dt : 0
|
|
214
|
-
);
|
|
215
|
-
}
|
|
216
|
-
}, J = () => {
|
|
217
|
-
d && (clearTimeout(H), cancelAnimationFrame(u), u = requestAnimationFrame(() => {
|
|
218
|
-
u = requestAnimationFrame(() => {
|
|
219
|
-
d = !1;
|
|
220
|
-
});
|
|
221
|
-
}));
|
|
222
|
-
}, X = (i) => {
|
|
223
|
-
if (!t) return;
|
|
224
|
-
const p = t.getBoundingClientRect(), x = i.getBoundingClientRect(), m = getComputedStyle(t), I = p.left + te(m, "scroll-padding-left"), N = p.right - te(m, "scroll-padding-right");
|
|
225
|
-
x.left < I || x.width > N - I ? t.scrollLeft -= I - x.left : x.right > N && (t.scrollLeft += x.right - N);
|
|
226
|
-
}, ee = (i) => {
|
|
227
|
-
const { target: p } = i;
|
|
228
|
-
!t || !(p instanceof HTMLElement) || t.contains(p) && (d && !p.matches(":focus-visible") ? l() : X(p), a());
|
|
229
|
-
}, w = () => {
|
|
230
|
-
cancelAnimationFrame(o), o = requestAnimationFrame(a);
|
|
231
|
-
}, R = (i) => {
|
|
232
|
-
var I;
|
|
233
|
-
const { target: p } = i, x = p instanceof Element ? (I = p.closest(Re)) == null ? void 0 : I.querySelector(et) : null;
|
|
234
|
-
if (!x || !(t != null && t.contains(x))) return;
|
|
235
|
-
const m = x.querySelector(Vt) ?? x;
|
|
236
|
-
if (m.scrollWidth > m.clientWidth) {
|
|
237
|
-
const N = x.textContent ?? "";
|
|
238
|
-
x.title !== N && (x.title = N);
|
|
239
|
-
} else x.hasAttribute("title") && x.removeAttribute("title");
|
|
240
|
-
}, $ = (i) => i instanceof Element && (i.closest(".apexcharts-legend") !== null || i.querySelector(".apexcharts-legend") !== null), M = new MutationObserver((i) => {
|
|
241
|
-
i.some(
|
|
242
|
-
(x) => [x.target, ...x.addedNodes, ...x.removedNodes].some(
|
|
243
|
-
$
|
|
244
|
-
)
|
|
245
|
-
) && c();
|
|
246
|
-
}), O = e.ownerDocument.defaultView ?? window;
|
|
247
|
-
return c(), M.observe(e, { childList: !0, subtree: !0 }), O.addEventListener("pointerdown", j, !0), O.addEventListener("pointerup", W, !0), O.addEventListener("pointercancel", k, !0), O.addEventListener("click", J, !0), O.addEventListener("blur", k), e.addEventListener("keydown", k), e.addEventListener("focusin", ee), e.addEventListener("focusout", w), e.addEventListener("mouseover", R), E == null || E.addEventListener("loadingdone", r), () => {
|
|
248
|
-
M.disconnect(), y.disconnect(), cancelAnimationFrame(o), k(), O.removeEventListener("pointerdown", j, !0), O.removeEventListener("pointerup", W, !0), O.removeEventListener("pointercancel", k, !0), O.removeEventListener("click", J, !0), O.removeEventListener("blur", k), e.removeEventListener("keydown", k), e.removeEventListener("focusin", ee), e.removeEventListener("focusout", w), e.removeEventListener("mouseover", R), E == null || E.removeEventListener("loadingdone", r), e.querySelectorAll(`${et}[title]`).forEach((i) => i.removeAttribute("title")), t && (t.removeEventListener("scroll", a), t.style.removeProperty(Le), t.querySelectorAll(Re).forEach((i) => i.style.removeProperty(Oe)), Ce(t, "data-fade-start", !1), Ce(t, "data-fade-end", !1));
|
|
249
|
-
};
|
|
250
|
-
}, [e, n]);
|
|
251
|
-
}
|
|
252
|
-
const Ut = ".apexcharts-xaxis-texts-g > text.apexcharts-xaxis-label", Kt = 0.5;
|
|
253
|
-
function jt(e) {
|
|
254
|
-
const n = e.getCTM();
|
|
255
|
-
if (!n) return null;
|
|
256
|
-
const { x: t, y: o, width: h, height: a } = e.getBBox();
|
|
257
|
-
return h === 0 && a === 0 ? null : [
|
|
258
|
-
[t, o],
|
|
259
|
-
[t + h, o],
|
|
260
|
-
[t + h, o + a],
|
|
261
|
-
[t, o + a]
|
|
262
|
-
].map(([l, b]) => {
|
|
263
|
-
const y = new DOMPoint(l, b).matrixTransform(n);
|
|
264
|
-
return { x: y.x, y: y.y };
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
function Xt(e, n, t) {
|
|
268
|
-
return [e, n].some(
|
|
269
|
-
(o) => o.some((h, a) => {
|
|
270
|
-
const l = o[(a + 1) % o.length], b = h.y - l.y, y = l.x - h.x, E = Math.hypot(b, y);
|
|
271
|
-
if (E === 0) return !1;
|
|
272
|
-
const r = (u) => u.map((H) => (H.x * b + H.y * y) / E), c = r(e), d = r(n);
|
|
273
|
-
return Math.min(...d) - Math.max(...c) >= t || Math.min(...c) - Math.max(...d) >= t;
|
|
274
|
-
})
|
|
275
|
-
);
|
|
276
|
-
}
|
|
277
|
-
function Yt(e) {
|
|
278
|
-
se(() => {
|
|
279
|
-
if (!e) return;
|
|
280
|
-
const n = () => {
|
|
281
|
-
const a = Array.from(
|
|
282
|
-
e.querySelectorAll(Ut)
|
|
283
|
-
).filter((r) => (r.textContent ?? "").trim() !== "");
|
|
284
|
-
if (a.length === 0 || typeof a[0].getBBox != "function")
|
|
285
|
-
return;
|
|
286
|
-
const l = a.map(jt), b = Kt * (Number.parseFloat(getComputedStyle(a[0]).fontSize) || 0), y = (r) => {
|
|
287
|
-
for (let c = r; c < a.length; c += r) {
|
|
288
|
-
const d = l[c - r], u = l[c];
|
|
289
|
-
if (d && u && !Xt(d, u, b)) return !1;
|
|
290
|
-
}
|
|
291
|
-
return !0;
|
|
292
|
-
};
|
|
293
|
-
let E = 1;
|
|
294
|
-
for (; E < a.length && !y(E); ) E += 1;
|
|
295
|
-
a.forEach((r, c) => {
|
|
296
|
-
const d = c % E === 0;
|
|
297
|
-
d && r.hasAttribute("visibility") ? r.removeAttribute("visibility") : !d && r.getAttribute("visibility") !== "hidden" && r.setAttribute("visibility", "hidden");
|
|
298
|
-
});
|
|
299
|
-
}, t = (a) => a instanceof Element && (a.closest(".apexcharts-xaxis") !== null || a.querySelector(".apexcharts-xaxis") !== null), o = new MutationObserver((a) => {
|
|
300
|
-
a.some(
|
|
301
|
-
(l) => [l.target, ...l.addedNodes].some(t)
|
|
302
|
-
) && n();
|
|
303
|
-
}), { fonts: h } = e.ownerDocument;
|
|
304
|
-
return n(), o.observe(e, { childList: !0, subtree: !0 }), h == null || h.addEventListener("loadingdone", n), () => {
|
|
305
|
-
o.disconnect(), h == null || h.removeEventListener("loadingdone", n);
|
|
306
|
-
};
|
|
307
|
-
}, [e]);
|
|
308
|
-
}
|
|
309
|
-
const tt = "http://www.w3.org/2000/svg", Te = ".apexcharts-radialbar .apexcharts-datalabels-group", Zt = ".apexcharts-datalabel-label", Jt = ".apexcharts-datalabel-value", Qt = ".apexcharts-radialbar-hollow", me = "--chart-centre-size", er = "var(--type-label-size)", tr = 0.5, rr = 0.25, nr = 1, rt = "data-centre-name", Pe = "data-centre-line", nt = /[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}]/u, ar = /^[)\]})】」』〕〉》、。,.・:;!?ー…]/u, sr = /[([{(【「『〔〈《]$/u;
|
|
310
|
-
function or(e) {
|
|
311
|
-
if (typeof Intl.Segmenter != "function") return null;
|
|
312
|
-
try {
|
|
313
|
-
return new Intl.Segmenter(e, { granularity: "word" });
|
|
314
|
-
} catch {
|
|
315
|
-
return new Intl.Segmenter(void 0, { granularity: "word" });
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
function ir(e, n) {
|
|
319
|
-
const t = [[e]], o = or(n), h = o ? Array.from(o.segment(e), (l) => l.segment) : e.split(/(\s+)/);
|
|
320
|
-
let a = 0;
|
|
321
|
-
return h.forEach((l, b) => {
|
|
322
|
-
a += l.length;
|
|
323
|
-
const y = h[b + 1];
|
|
324
|
-
if (y === void 0) return;
|
|
325
|
-
const E = /^\s+$/.test(l) || /^\s+$/.test(y), r = nt.test(l.slice(-1)) || nt.test(y.charAt(0));
|
|
326
|
-
if (!E && !r) return;
|
|
327
|
-
const c = e.slice(0, a).trim(), d = e.slice(a).trim();
|
|
328
|
-
!c || !d || ar.test(d) || sr.test(c) || t.some(([u, H]) => u === c && H === d) || t.push([c, d]);
|
|
329
|
-
}), t;
|
|
330
|
-
}
|
|
331
|
-
function cr(e, n, t) {
|
|
332
|
-
se(() => {
|
|
333
|
-
if (!e || !n) return;
|
|
334
|
-
const o = () => {
|
|
335
|
-
try {
|
|
336
|
-
h();
|
|
337
|
-
} finally {
|
|
338
|
-
l.takeRecords();
|
|
339
|
-
}
|
|
340
|
-
}, h = () => {
|
|
341
|
-
if (e.getClientRects().length === 0) return;
|
|
342
|
-
const r = e.querySelector(Te), c = e.querySelector(Qt), d = (r == null ? void 0 : r.querySelector(Jt)) ?? null, u = (r == null ? void 0 : r.querySelector(Zt)) ?? null;
|
|
343
|
-
if (!r || !c) return;
|
|
344
|
-
const H = c.getCTM(), G = r.getCTM();
|
|
345
|
-
if (!H || !G) return;
|
|
346
|
-
const k = G.inverse().multiply(H), j = new DOMPoint(
|
|
347
|
-
c.cx.baseVal.value,
|
|
348
|
-
c.cy.baseVal.value
|
|
349
|
-
).matrixTransform(k), W = c.r.baseVal.value * Math.hypot(k.a, k.b) - nr;
|
|
350
|
-
if (W <= 0) return;
|
|
351
|
-
const { x: J, y: X } = j, ee = (v, C, s) => {
|
|
352
|
-
const S = Math.max(Math.abs(C - X), Math.abs(s - X));
|
|
353
|
-
return S < W && v / 2 <= Math.sqrt(W ** 2 - S ** 2);
|
|
354
|
-
}, w = u && u.querySelector(`tspan[${Pe}]`) ? u.getAttribute(rt) ?? "" : (u == null ? void 0 : u.textContent) ?? "";
|
|
355
|
-
for (const v of [u, d])
|
|
356
|
-
v == null || v.style.removeProperty(me), v == null || v.removeAttribute("visibility");
|
|
357
|
-
const R = (v) => Number.parseFloat(getComputedStyle(v).fontSize) || 0, $ = (v, C) => {
|
|
358
|
-
v.style.setProperty(me, er);
|
|
359
|
-
const s = Math.min(R(v), C);
|
|
360
|
-
return v.style.removeProperty(me), s;
|
|
361
|
-
};
|
|
362
|
-
let M = 0, O = 0, i = 0;
|
|
363
|
-
if (d && (d.textContent ?? "") !== "") {
|
|
364
|
-
M = R(d);
|
|
365
|
-
const v = $(d, M);
|
|
366
|
-
O = d.getComputedTextLength(), i = d.getBBox().height;
|
|
367
|
-
const C = Math.hypot(O / 2, i / 2);
|
|
368
|
-
if (C > W) {
|
|
369
|
-
const s = Math.max(W / C, v / M);
|
|
370
|
-
M *= s, O *= s, i *= s;
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
const p = M > 0 ? rr * M : 0, x = (v) => v.length > 0 ? p : 0;
|
|
374
|
-
let m = 0, I = null, N = 0;
|
|
375
|
-
if (u && w.trim() !== "") {
|
|
376
|
-
N = R(u);
|
|
377
|
-
const v = $(u, N), C = (f) => (u.textContent = f, u.getComputedTextLength());
|
|
378
|
-
u.textContent = w, m = u.getBBox().height / N;
|
|
379
|
-
const [s, ...S] = ir(w, t).map((f) => ({
|
|
380
|
-
lines: f,
|
|
381
|
-
widths: f.map(C)
|
|
382
|
-
})), P = [
|
|
383
|
-
s,
|
|
384
|
-
...S.sort(
|
|
385
|
-
(f, A) => Math.max(...f.widths) - Math.max(...A.widths)
|
|
386
|
-
)
|
|
387
|
-
], L = [];
|
|
388
|
-
for (let f = N; f > v + 0.01; f -= tr)
|
|
389
|
-
L.push(f);
|
|
390
|
-
L.push(v);
|
|
391
|
-
for (const f of L) {
|
|
392
|
-
const A = f / N, _ = m * f, K = P.find(({ lines: T, widths: ce }) => {
|
|
393
|
-
const le = T.length * _ + x(T) + i, re = X - le / 2, be = ce.every(
|
|
394
|
-
(Ie, de) => ee(Ie * A, re + de * _, re + (de + 1) * _)
|
|
395
|
-
), ue = re + T.length * _ + x(T);
|
|
396
|
-
return be && (i === 0 || ee(O, ue, ue + i));
|
|
397
|
-
});
|
|
398
|
-
if (K) {
|
|
399
|
-
I = { lines: K.lines, size: f };
|
|
400
|
-
break;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
const Q = (I == null ? void 0 : I.lines) ?? [], z = I ? m * I.size : 0, Y = Q.length * z + x(Q) + i, U = X - Y / 2;
|
|
405
|
-
if (u)
|
|
406
|
-
if (u.textContent = "", u.setAttribute(rt, w), u.setAttribute("dominant-baseline", "central"), u.setAttribute("x", String(J)), u.setAttribute("y", String(U + z / 2)), Q.forEach((v, C) => {
|
|
407
|
-
const s = e.ownerDocument.createElementNS(tt, "tspan");
|
|
408
|
-
s.setAttribute(Pe, ""), s.setAttribute("x", String(J)), s.setAttribute("y", String(U + (C + 0.5) * z)), s.textContent = v, u.appendChild(s);
|
|
409
|
-
}), I)
|
|
410
|
-
I.size < N - 0.01 && u.style.setProperty(me, `${I.size}px`);
|
|
411
|
-
else {
|
|
412
|
-
const v = e.ownerDocument.createElementNS(tt, "tspan");
|
|
413
|
-
v.setAttribute(Pe, ""), v.textContent = w, u.appendChild(v), u.setAttribute("visibility", "hidden");
|
|
414
|
-
}
|
|
415
|
-
d && i > 0 && (d.setAttribute("dominant-baseline", "central"), d.setAttribute("x", String(J)), d.setAttribute("y", String(U + Y - i / 2)), M < R(d) - 0.01 && d.style.setProperty(me, `${M}px`));
|
|
416
|
-
}, a = (r) => {
|
|
417
|
-
var c;
|
|
418
|
-
return r instanceof Element && (r.closest(Te) !== null || r.querySelector(Te) !== null) || r instanceof Text && ((c = r.parentElement) == null ? void 0 : c.closest(Te)) != null;
|
|
419
|
-
}, l = new MutationObserver((r) => {
|
|
420
|
-
r.some(
|
|
421
|
-
(c) => [c.target, ...c.addedNodes].some(a)
|
|
422
|
-
) && o();
|
|
423
|
-
}), b = (r) => (r ?? "").split(/\s+/).filter((c) => c.startsWith("theme-")).sort().join(" "), y = new MutationObserver((r) => {
|
|
424
|
-
r.some(
|
|
425
|
-
(c) => c.target instanceof Element && b(c.oldValue) !== b(c.target.getAttribute("class"))
|
|
426
|
-
) && o();
|
|
427
|
-
});
|
|
428
|
-
for (let r = e.parentElement; r; r = r.parentElement)
|
|
429
|
-
y.observe(r, {
|
|
430
|
-
attributes: !0,
|
|
431
|
-
attributeFilter: ["class"],
|
|
432
|
-
attributeOldValue: !0
|
|
433
|
-
});
|
|
434
|
-
const { fonts: E } = e.ownerDocument;
|
|
435
|
-
return o(), l.observe(e, {
|
|
436
|
-
childList: !0,
|
|
437
|
-
subtree: !0,
|
|
438
|
-
characterData: !0
|
|
439
|
-
}), E == null || E.addEventListener("loadingdone", o), () => {
|
|
440
|
-
l.disconnect(), y.disconnect(), E == null || E.removeEventListener("loadingdone", o);
|
|
441
|
-
};
|
|
442
|
-
}, [e, n, t]);
|
|
443
|
-
}
|
|
444
|
-
const lr = {
|
|
445
|
-
id: "chart",
|
|
446
|
-
// view_change backs the opt-in type switcher (`switchableTypes` prop):
|
|
447
|
-
// the same chart re-presented as line / bar / area / pie / donut.
|
|
448
|
-
capabilities: ["view_change"],
|
|
449
|
-
state: {
|
|
450
|
-
declaredType: {
|
|
451
|
-
type: "'line' | 'bar' | 'pie' | 'donut' | 'area' | 'radialBar'",
|
|
452
|
-
descriptionKey: "ui.agent.chart.state.declaredType",
|
|
453
|
-
description: "The consumer-declared chart type — the shape `update_series` expects.",
|
|
454
|
-
read: (e) => e.getTypeState().declaredType
|
|
455
|
-
},
|
|
456
|
-
effectiveType: {
|
|
457
|
-
type: "'line' | 'bar' | 'pie' | 'donut' | 'area' | 'radialBar'",
|
|
458
|
-
descriptionKey: "ui.agent.chart.state.effectiveType",
|
|
459
|
-
description: "The type currently rendered — differs from declaredType after a type-switcher pick.",
|
|
460
|
-
read: (e) => e.getTypeState().effectiveType
|
|
461
|
-
},
|
|
462
|
-
availableTypes: {
|
|
463
|
-
type: "ChartType[]",
|
|
464
|
-
descriptionKey: "ui.agent.chart.state.availableTypes",
|
|
465
|
-
description: "Types the switcher offers. Empty when the chart has no type switcher.",
|
|
466
|
-
read: (e) => e.getTypeState().availableTypes
|
|
467
|
-
}
|
|
468
|
-
},
|
|
469
|
-
actions: {
|
|
470
|
-
change_view: {
|
|
471
|
-
// Switching the presentation is a write (it changes what the user
|
|
472
|
-
// sees) but is trivially reversible by switching back.
|
|
473
|
-
safety: "write",
|
|
474
|
-
argsType: "type",
|
|
475
|
-
argsSchema: {
|
|
476
|
-
type: "object",
|
|
477
|
-
properties: {
|
|
478
|
-
type: {
|
|
479
|
-
type: "string",
|
|
480
|
-
enum: ["line", "bar", "area", "pie", "donut"],
|
|
481
|
-
description: "The chart type to render."
|
|
482
|
-
}
|
|
483
|
-
},
|
|
484
|
-
required: ["type"]
|
|
485
|
-
},
|
|
486
|
-
returns: "boolean (accepted)",
|
|
487
|
-
returnsSchema: {
|
|
488
|
-
type: "boolean",
|
|
489
|
-
description: "True when the switch was applied; false when the chart has no type switcher or the type is not offered (check availableTypes first)."
|
|
490
|
-
},
|
|
491
|
-
idempotent: !0,
|
|
492
|
-
descriptionKey: "ui.agent.chart.actions.changeView",
|
|
493
|
-
description: "Switch the rendered chart type via the type switcher. No-op (returns false) when the chart has no switcher or the type is not offered.",
|
|
494
|
-
invoke: (e, n) => e.setType(n.type)
|
|
495
|
-
},
|
|
496
|
-
update_series: {
|
|
497
|
-
// Replacing the rendered series mutates what the chart displays — it
|
|
498
|
-
// is a write, reversible by pushing the prior series back.
|
|
499
|
-
safety: "write",
|
|
500
|
-
argsType: "series",
|
|
501
|
-
// `series` is `ChartSeries[]` (line/bar/area) OR `number[]`
|
|
502
|
-
// (pie/donut/radialBar). Both shapes are accepted; the handle routes
|
|
503
|
-
// by chart type internally.
|
|
504
|
-
argsSchema: {
|
|
505
|
-
type: "object",
|
|
506
|
-
properties: {
|
|
507
|
-
series: {
|
|
508
|
-
oneOf: [
|
|
509
|
-
{
|
|
510
|
-
type: "array",
|
|
511
|
-
description: "Categorical series for line / bar / area charts.",
|
|
512
|
-
items: {
|
|
513
|
-
type: "object",
|
|
514
|
-
properties: {
|
|
515
|
-
name: { type: "string" },
|
|
516
|
-
data: { type: "array", items: { type: "number" } },
|
|
517
|
-
role: {
|
|
518
|
-
type: "string",
|
|
519
|
-
enum: ["primary", "compare"],
|
|
520
|
-
description: "Optional. 'compare' renders this series as a secondary, colour-blind-safe overlay (e.g. the previous period) — a dotted stroke in its paired primary's colour for line/area, a tinted bar with a dotted outline for bar. Omit for a normal primary series."
|
|
521
|
-
}
|
|
522
|
-
},
|
|
523
|
-
required: ["name", "data"]
|
|
524
|
-
}
|
|
525
|
-
},
|
|
526
|
-
{
|
|
527
|
-
type: "array",
|
|
528
|
-
description: "Flat values for pie / donut / radialBar charts.",
|
|
529
|
-
items: { type: "number" }
|
|
530
|
-
}
|
|
531
|
-
]
|
|
532
|
-
}
|
|
533
|
-
},
|
|
534
|
-
required: ["series"]
|
|
535
|
-
},
|
|
536
|
-
idempotent: !0,
|
|
537
|
-
descriptionKey: "ui.agent.chart.actions.updateSeries",
|
|
538
|
-
description: "Replace the chart series without remounting. Pass the DECLARED type’s shape (see declaredType state); when the user has switched the view cross-shape the values are converted to the rendered shape. The data and its summary table persist across type switches, resizes and theme changes until the host passes a new series prop.",
|
|
539
|
-
invoke: (e, n) => {
|
|
540
|
-
e.updateSeries(n.series);
|
|
541
|
-
}
|
|
542
|
-
},
|
|
543
|
-
export_png: {
|
|
544
|
-
safety: "read",
|
|
545
|
-
returns: "string (PNG data URI)",
|
|
546
|
-
returnsSchema: {
|
|
547
|
-
type: "string",
|
|
548
|
-
description: "A `data:image/png;base64,…` URI of the rendered chart."
|
|
549
|
-
},
|
|
550
|
-
idempotent: !0,
|
|
551
|
-
descriptionKey: "ui.agent.chart.actions.exportPng",
|
|
552
|
-
description: "Return a PNG data URI of the chart for export or screenshotting. Waits until series pushed with update_series are drawn.",
|
|
553
|
-
invoke: (e) => e.dataURI()
|
|
554
|
-
}
|
|
555
|
-
},
|
|
556
|
-
domHooks: {
|
|
557
|
-
root: { attr: "data-component", value: "chart" },
|
|
558
|
-
instanceId: {
|
|
559
|
-
attr: "data-component-id",
|
|
560
|
-
sourceProp: "id",
|
|
561
|
-
description: "Sourced from the id prop."
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
}, ur = Me(
|
|
565
|
-
"ds:relative ds:block ds:w-full apex-theme-alfadocs",
|
|
566
|
-
{
|
|
567
|
-
variants: {
|
|
568
|
-
density: {
|
|
569
|
-
compact: "ds:min-h-[var(--chart-min-height-compact)]",
|
|
570
|
-
comfortable: "ds:min-h-[var(--chart-min-height-comfortable)]",
|
|
571
|
-
// Applied when an explicit `height` prop is given and no density was
|
|
572
|
-
// requested: the wrapper must not exceed the caller's height (a 96px
|
|
573
|
-
// KPI chart inside a card must not reserve 320px).
|
|
574
|
-
none: ""
|
|
575
|
-
}
|
|
576
|
-
},
|
|
577
|
-
defaultVariants: { density: "comfortable" }
|
|
578
|
-
}
|
|
579
|
-
), dr = Me("", {
|
|
580
|
-
variants: {
|
|
581
|
-
fill: {
|
|
582
|
-
none: "",
|
|
583
|
-
// The figure is the root: it takes the share itself.
|
|
584
|
-
root: "ds:h-[var(--chart-fill-size)] ds:min-h-[var(--chart-min-height-fill)]",
|
|
585
|
-
// Below the switcher row: the rest.
|
|
586
|
-
rest: "ds:min-h-[var(--chart-min-height-fill)] ds:flex-1"
|
|
587
|
-
}
|
|
588
|
-
},
|
|
589
|
-
defaultVariants: { fill: "none" }
|
|
590
|
-
}), pr = Me("", {
|
|
591
|
-
variants: {
|
|
592
|
-
fill: { false: "", true: "ds:absolute ds:inset-0" }
|
|
593
|
-
},
|
|
594
|
-
defaultVariants: { fill: !1 }
|
|
595
|
-
}), hr = Me("ds:w-full", {
|
|
596
|
-
variants: {
|
|
597
|
-
fill: {
|
|
598
|
-
false: "ds:block",
|
|
599
|
-
true: "ds:flex ds:flex-col ds:h-[var(--chart-fill-size)] ds:min-h-min"
|
|
600
|
-
}
|
|
601
|
-
},
|
|
602
|
-
defaultVariants: { fill: !1 }
|
|
603
|
-
}), mr = [
|
|
604
|
-
"verticalLines",
|
|
605
|
-
"horizontalLines",
|
|
606
|
-
"slantedLines",
|
|
607
|
-
"squares",
|
|
608
|
-
"circles"
|
|
609
|
-
], fr = ["line", "bar", "area"], yr = ["pie", "donut", "radialBar"], at = [
|
|
610
|
-
"line",
|
|
611
|
-
"bar",
|
|
612
|
-
"area",
|
|
613
|
-
"pie",
|
|
614
|
-
"donut"
|
|
615
|
-
], gr = {
|
|
616
|
-
line: "chart.typeSwitcher.line",
|
|
617
|
-
bar: "chart.typeSwitcher.bar",
|
|
618
|
-
area: "chart.typeSwitcher.area",
|
|
619
|
-
pie: "chart.typeSwitcher.pie",
|
|
620
|
-
donut: "chart.typeSwitcher.donut"
|
|
621
|
-
}, br = {
|
|
622
|
-
line: /* @__PURE__ */ F(kt, {}),
|
|
623
|
-
bar: /* @__PURE__ */ F(Pt, {}),
|
|
624
|
-
area: /* @__PURE__ */ F(Rt, {}),
|
|
625
|
-
pie: /* @__PURE__ */ F(Bt, {}),
|
|
626
|
-
donut: /* @__PURE__ */ F(qt, {})
|
|
627
|
-
}, vr = 2, ct = "0 6", xr = 5, Sr = 20, Ar = -45, Er = 640, wr = 300, Lr = 160;
|
|
628
|
-
function Cr(e, n) {
|
|
629
|
-
!e || n.length === 0 || e.querySelectorAll(
|
|
630
|
-
".apexcharts-bar-series > .apexcharts-series"
|
|
631
|
-
).forEach((t) => {
|
|
632
|
-
const o = Number(t.getAttribute("data:realIndex"));
|
|
633
|
-
n.includes(o) && t.querySelectorAll("path.apexcharts-bar-area").forEach(
|
|
634
|
-
(h) => {
|
|
635
|
-
if (typeof h.getBBox != "function") return;
|
|
636
|
-
const a = h.getBBox();
|
|
637
|
-
h.setAttribute(
|
|
638
|
-
"d",
|
|
639
|
-
`M ${a.x} ${a.y + a.height} L ${a.x} ${a.y} L ${a.x + a.width} ${a.y} L ${a.x + a.width} ${a.y + a.height}`
|
|
640
|
-
), h.setAttribute("stroke-dasharray", ct), h.setAttribute("stroke-linecap", "round");
|
|
641
|
-
}
|
|
642
|
-
);
|
|
643
|
-
});
|
|
644
|
-
}
|
|
645
|
-
function st(e) {
|
|
646
|
-
const n = getComputedStyle(e), t = (o) => Number.parseFloat(n.getPropertyValue(o)) || 0;
|
|
647
|
-
return t("--min-target-size") + t("--focus-ring-offset") + t("--focus-ring-width");
|
|
648
|
-
}
|
|
649
|
-
function Tr(e, n) {
|
|
650
|
-
if (e === void 0) return n;
|
|
651
|
-
if (typeof e == "number") return e;
|
|
652
|
-
const t = Number.parseInt(e, 10);
|
|
653
|
-
return e.trim().endsWith("%") ? n * t / 100 : t;
|
|
654
|
-
}
|
|
655
|
-
function lt(e, n) {
|
|
656
|
-
if (n) return n;
|
|
657
|
-
const t = new Intl.NumberFormat(e, {
|
|
658
|
-
style: "percent",
|
|
659
|
-
maximumFractionDigits: 2
|
|
660
|
-
});
|
|
661
|
-
return (o) => t.format(o / 100);
|
|
662
|
-
}
|
|
663
|
-
function Mr(e) {
|
|
664
|
-
return typeof e == "number" ? e : e.trim().endsWith("%") ? Number.NaN : Number.parseInt(e, 10);
|
|
665
|
-
}
|
|
666
|
-
function ot(e, n, t, o, h, a) {
|
|
667
|
-
if (o === h)
|
|
668
|
-
return {
|
|
669
|
-
effectiveSeries: e,
|
|
670
|
-
effectiveCategories: n,
|
|
671
|
-
effectiveLabels: t
|
|
672
|
-
};
|
|
673
|
-
if (!o) {
|
|
674
|
-
const y = e.filter((r) => r.role !== "compare");
|
|
675
|
-
return {
|
|
676
|
-
effectiveSeries: y.map((r) => r.data.reduce((c, d) => c + d, 0)),
|
|
677
|
-
effectiveCategories: void 0,
|
|
678
|
-
effectiveLabels: y.map((r) => r.name)
|
|
679
|
-
};
|
|
680
|
-
}
|
|
681
|
-
return {
|
|
682
|
-
effectiveSeries: [{ name: a, data: e }],
|
|
683
|
-
effectiveCategories: t ?? [],
|
|
684
|
-
effectiveLabels: void 0
|
|
685
|
-
};
|
|
686
|
-
}
|
|
687
|
-
function it({
|
|
688
|
-
themeOptions: e,
|
|
689
|
-
toolbarBand: n,
|
|
690
|
-
chartId: t,
|
|
691
|
-
toolbar: o,
|
|
692
|
-
reducedMotion: h,
|
|
693
|
-
toolbarLocale: a,
|
|
694
|
-
locale: l,
|
|
695
|
-
effectiveLabels: b,
|
|
696
|
-
formatValue: y,
|
|
697
|
-
noDataText: E,
|
|
698
|
-
effectiveType: r,
|
|
699
|
-
effectiveSeries: c,
|
|
700
|
-
effectiveCategories: d,
|
|
701
|
-
isRtl: u,
|
|
702
|
-
patterns: H,
|
|
703
|
-
stacked: G,
|
|
704
|
-
orientation: k,
|
|
705
|
-
curve: j,
|
|
706
|
-
colors: W,
|
|
707
|
-
radialValueFormatter: J,
|
|
708
|
-
narrow: X,
|
|
709
|
-
short: ee,
|
|
710
|
-
wrapperRef: w
|
|
711
|
-
}) {
|
|
712
|
-
var Q, z, Y, U, v, C;
|
|
713
|
-
const R = e, $ = ye(r) && Array.isArray(c) ? c.map((s) => s.role === "compare") : [], M = $.some(Boolean), O = M && r === "bar", i = O && c.some(
|
|
714
|
-
(s) => s.role === "compare" && s.data.some((S) => S < 0)
|
|
715
|
-
), p = O && k === "vertical" && !i, x = M ? St() : 0.3, m = {
|
|
716
|
-
...R,
|
|
717
|
-
chart: {
|
|
718
|
-
...R.chart,
|
|
719
|
-
id: t,
|
|
720
|
-
toolbar: { show: o },
|
|
721
|
-
zoom: { enabled: o },
|
|
722
|
-
animations: {
|
|
723
|
-
enabled: !h,
|
|
724
|
-
dynamicAnimation: { enabled: !h }
|
|
725
|
-
},
|
|
726
|
-
locales: [a],
|
|
727
|
-
defaultLocale: l,
|
|
728
|
-
parentHeightOffset: 0,
|
|
729
|
-
// Keep the keyboard-operable legend; drop Apex's data-point navigation
|
|
730
|
-
// and live announcements (English-only, and the summary table covers them).
|
|
731
|
-
accessibility: {
|
|
732
|
-
enabled: !0,
|
|
733
|
-
announcements: { enabled: !1 },
|
|
734
|
-
keyboard: { enabled: !0, navigation: { enabled: !1 } }
|
|
735
|
-
},
|
|
736
|
-
// Stacking is axis-only, so a slice or radial chart never receives it.
|
|
737
|
-
// Sent as false too: ApexCharts merges an update into its config, so
|
|
738
|
-
// leaving it out would keep an earlier `true`.
|
|
739
|
-
...ye(r) ? { stacked: G } : {}
|
|
740
|
-
},
|
|
741
|
-
// Only set `labels` when the effective type actually has them (slice
|
|
742
|
-
// charts). Emitting `labels: undefined` crashes ApexCharts' bar
|
|
743
|
-
// renderer — `parseDataAxisCharts` reads `labels.length` and throws
|
|
744
|
-
// "Cannot read properties of undefined (reading 'length')", which
|
|
745
|
-
// aborts the render and leaves a blank chart. Absent is safe; area /
|
|
746
|
-
// line tolerate the undefined but bar does not, so never pass it.
|
|
747
|
-
...b ? { labels: b } : {},
|
|
748
|
-
legend: {
|
|
749
|
-
...R.legend,
|
|
750
|
-
position: "bottom",
|
|
751
|
-
// ApexCharts legend.horizontalAlign is a physical prop mapped internally
|
|
752
|
-
// to the chart's own text flow. For RTL we flip via `yaxis.opposite`
|
|
753
|
-
// and ApexCharts' own `direction: 'rtl'` handling; legend stays anchored
|
|
754
|
-
// to the inline-start by asking for 'left' on LTR and 'right' on RTL.
|
|
755
|
-
horizontalAlign: u ? "right" : "left",
|
|
756
|
-
fontFamily: "inherit",
|
|
757
|
-
// apexcharts-theme.css sizes the legend hit areas and ring room from
|
|
758
|
-
// this 4px; pinned so an ApexCharts default change cannot break them.
|
|
759
|
-
itemMargin: { horizontal: 5, vertical: 4 },
|
|
760
|
-
// ApexCharts writes legend text as HTML: a series named "R&D" or
|
|
761
|
-
// "<b>" must read as written, not as markup.
|
|
762
|
-
formatter: (s) => he(String(s))
|
|
763
|
-
},
|
|
764
|
-
// The tooltip, like the legend, is written as HTML: its heading (the
|
|
765
|
-
// category) and each series name are escaped too.
|
|
766
|
-
tooltip: {
|
|
767
|
-
...R.tooltip,
|
|
768
|
-
x: {
|
|
769
|
-
...(Q = R.tooltip) == null ? void 0 : Q.x,
|
|
770
|
-
// A line or area chart hands ApexCharts its categories as positions
|
|
771
|
-
// (1..n), so the heading is named from the point's index, as
|
|
772
|
-
// ApexCharts' own axis label is.
|
|
773
|
-
formatter: (s, S) => he(
|
|
774
|
-
String((d == null ? void 0 : d[(S == null ? void 0 : S.dataPointIndex) ?? -1]) ?? s)
|
|
775
|
-
)
|
|
776
|
-
},
|
|
777
|
-
y: {
|
|
778
|
-
formatter: (s) => y(s),
|
|
779
|
-
title: {
|
|
780
|
-
formatter: (s) => s ? `${he(String(s))}: ` : ""
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
},
|
|
784
|
-
noData: {
|
|
785
|
-
text: E
|
|
786
|
-
}
|
|
787
|
-
}, I = o && n ? n : 0, N = ee && ye(r) ? Sr : 0;
|
|
788
|
-
if (m.title = I || N ? { ...m.title, text: "", margin: I - N } : { ...m.title, text: void 0, margin: xr }, W && W.length > 0 && (m.colors = W), M) {
|
|
789
|
-
const s = m.colors ?? R.colors ?? [], S = (A) => s[A % Math.max(s.length, 1)], P = c.map((A, _) => A.role === "compare" ? -1 : _).filter((A) => A >= 0);
|
|
790
|
-
let L = 0;
|
|
791
|
-
m.colors = c.map((A, _) => {
|
|
792
|
-
if (A.role !== "compare") return S(_);
|
|
793
|
-
const K = P.length ? P[Math.min(L++, P.length - 1)] : _;
|
|
794
|
-
return S(K);
|
|
795
|
-
});
|
|
796
|
-
const f = m.colors.map(
|
|
797
|
-
(A, _) => $[_] ? At(A) : A
|
|
798
|
-
);
|
|
799
|
-
m.legend = {
|
|
800
|
-
...m.legend,
|
|
801
|
-
markers: {
|
|
802
|
-
...((z = m.legend) == null ? void 0 : z.markers) ?? {},
|
|
803
|
-
fillColors: f
|
|
804
|
-
}
|
|
805
|
-
};
|
|
806
|
-
}
|
|
807
|
-
if (ye(r)) {
|
|
808
|
-
const s = r === "bar" && k === "horizontal";
|
|
809
|
-
m.xaxis = {
|
|
810
|
-
...R.xaxis,
|
|
811
|
-
categories: d ?? [],
|
|
812
|
-
labels: {
|
|
813
|
-
...(Y = R.xaxis) == null ? void 0 : Y.labels,
|
|
814
|
-
formatter: s ? (S) => y(Number(S)) : void 0,
|
|
815
|
-
// A narrow chart thins crowded labels rather than turning them sideways.
|
|
816
|
-
// Sent both ways, so a widened chart rotates. ApexCharts draws every
|
|
817
|
-
// label and useApexXLabelSpacing thins them: its own test keeps two
|
|
818
|
-
// labels that touch, or overlap when the second is wider.
|
|
819
|
-
rotate: X ? 0 : Ar,
|
|
820
|
-
hideOverlappingLabels: !1
|
|
821
|
-
},
|
|
822
|
-
// The hover tooltip already heads with the category. ApexCharts' own
|
|
823
|
-
// x-axis box repeats it below the axis, outside the chart's box.
|
|
824
|
-
tooltip: { enabled: !1 }
|
|
825
|
-
}, m.yaxis = {
|
|
826
|
-
...R.yaxis,
|
|
827
|
-
opposite: u,
|
|
828
|
-
...s ? {} : { labels: { formatter: (S) => y(S) } }
|
|
829
|
-
}, m.stroke = {
|
|
830
|
-
curve: j,
|
|
831
|
-
width: r === "bar" ? M ? $.map((S) => S ? vr : 0) : 0 : 2,
|
|
832
|
-
...M ? {
|
|
833
|
-
lineCap: "round",
|
|
834
|
-
// Runtime accepts a string dash; the published types say
|
|
835
|
-
// `number` → one documented cast. `'0 6'` + round cap ⇒ dots.
|
|
836
|
-
dashArray: $.map(
|
|
837
|
-
(S) => S ? ct : 0
|
|
838
|
-
)
|
|
839
|
-
} : {}
|
|
840
|
-
}, m.dataLabels = { enabled: !1 };
|
|
841
|
-
}
|
|
842
|
-
if (r === "radialBar") {
|
|
843
|
-
const s = lt(l, J), S = R.plotOptions ?? {}, P = (U = S.radialBar) == null ? void 0 : U.dataLabels;
|
|
844
|
-
m.plotOptions = {
|
|
845
|
-
...S,
|
|
846
|
-
radialBar: {
|
|
847
|
-
...S.radialBar ?? {},
|
|
848
|
-
dataLabels: {
|
|
849
|
-
...P ?? {},
|
|
850
|
-
name: { ...(P == null ? void 0 : P.name) ?? {}, color: (v = R.chart) == null ? void 0 : v.foreColor },
|
|
851
|
-
value: {
|
|
852
|
-
...(P == null ? void 0 : P.value) ?? {},
|
|
853
|
-
formatter: (A) => s(Number(A))
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
};
|
|
858
|
-
const L = Array.isArray(c) && c.length > 1, f = u ? "rtl" : "ltr";
|
|
859
|
-
m.legend = {
|
|
860
|
-
...m.legend,
|
|
861
|
-
show: L,
|
|
862
|
-
...L ? {
|
|
863
|
-
formatter: (A, _) => {
|
|
864
|
-
const K = Number(
|
|
865
|
-
c[(_ == null ? void 0 : _.seriesIndex) ?? 0]
|
|
866
|
-
);
|
|
867
|
-
return `<span class="chart-legend-ring" dir="${f}"><span class="chart-legend-name">${he(String(A))}</span> <span class="chart-legend-value">${he(s(K))}</span></span>`;
|
|
868
|
-
}
|
|
869
|
-
} : {}
|
|
870
|
-
};
|
|
871
|
-
}
|
|
872
|
-
if (r === "bar") {
|
|
873
|
-
const s = R.plotOptions ?? {};
|
|
874
|
-
m.plotOptions = {
|
|
875
|
-
...s,
|
|
876
|
-
bar: {
|
|
877
|
-
...s.bar ?? {},
|
|
878
|
-
horizontal: k === "horizontal"
|
|
879
|
-
}
|
|
880
|
-
};
|
|
881
|
-
}
|
|
882
|
-
if (H ? m.fill = {
|
|
883
|
-
type: M ? $.map((s) => s ? "solid" : "pattern") : "pattern",
|
|
884
|
-
opacity: M ? $.map(
|
|
885
|
-
(s) => s ? x : r === "area" ? 0.3 : 1
|
|
886
|
-
) : r === "area" ? 0.3 : 1,
|
|
887
|
-
pattern: {
|
|
888
|
-
style: [...mr],
|
|
889
|
-
strokeWidth: 2
|
|
890
|
-
}
|
|
891
|
-
} : O ? m.fill = {
|
|
892
|
-
type: "solid",
|
|
893
|
-
opacity: $.map((s) => s ? x : 1)
|
|
894
|
-
} : r === "area" && (m.fill = M ? {
|
|
895
|
-
type: "gradient",
|
|
896
|
-
opacity: $.map((s) => s ? x : 0.3)
|
|
897
|
-
} : {
|
|
898
|
-
type: "gradient",
|
|
899
|
-
opacity: 0.3
|
|
900
|
-
}), p) {
|
|
901
|
-
const s = $.map((L, f) => L ? f : -1).filter((L) => L >= 0), S = () => Cr(w.current, s), P = () => typeof requestAnimationFrame == "function" ? requestAnimationFrame(S) : S();
|
|
902
|
-
m.chart = {
|
|
903
|
-
...m.chart,
|
|
904
|
-
events: {
|
|
905
|
-
...((C = m.chart) == null ? void 0 : C.events) ?? {},
|
|
906
|
-
mounted: () => P(),
|
|
907
|
-
updated: () => P(),
|
|
908
|
-
animationEnd: () => S()
|
|
909
|
-
}
|
|
910
|
-
};
|
|
911
|
-
}
|
|
912
|
-
return Ir(m, r);
|
|
913
|
-
}
|
|
914
|
-
function Ir(e, n) {
|
|
915
|
-
var o, h, a, l, b, y;
|
|
916
|
-
if (!ye(n)) return e;
|
|
917
|
-
const t = (o = e.chart) == null ? void 0 : o.events;
|
|
918
|
-
return {
|
|
919
|
-
...e,
|
|
920
|
-
colors: e.colors,
|
|
921
|
-
chart: {
|
|
922
|
-
...e.chart,
|
|
923
|
-
events: {
|
|
924
|
-
...t,
|
|
925
|
-
mounted: t == null ? void 0 : t.mounted,
|
|
926
|
-
updated: t == null ? void 0 : t.updated,
|
|
927
|
-
animationEnd: t == null ? void 0 : t.animationEnd
|
|
928
|
-
}
|
|
929
|
-
},
|
|
930
|
-
stroke: {
|
|
931
|
-
...e.stroke,
|
|
932
|
-
lineCap: ((h = e.stroke) == null ? void 0 : h.lineCap) ?? (n === "bar" ? "square" : "butt"),
|
|
933
|
-
dashArray: ((a = e.stroke) == null ? void 0 : a.dashArray) ?? 0
|
|
934
|
-
},
|
|
935
|
-
legend: {
|
|
936
|
-
...e.legend,
|
|
937
|
-
markers: {
|
|
938
|
-
...(l = e.legend) == null ? void 0 : l.markers,
|
|
939
|
-
fillColors: (y = (b = e.legend) == null ? void 0 : b.markers) == null ? void 0 : y.fillColors
|
|
940
|
-
}
|
|
941
|
-
},
|
|
942
|
-
fill: e.fill ?? { type: "solid", opacity: 0.85 }
|
|
943
|
-
};
|
|
944
|
-
}
|
|
945
|
-
function fe(e) {
|
|
946
|
-
return yr.includes(e);
|
|
947
|
-
}
|
|
948
|
-
function ye(e) {
|
|
949
|
-
return fr.includes(e);
|
|
950
|
-
}
|
|
951
|
-
function Nr(e, n) {
|
|
952
|
-
return fe(n) ? [
|
|
953
|
-
{
|
|
954
|
-
name: "",
|
|
955
|
-
data: e
|
|
956
|
-
}
|
|
957
|
-
] : e;
|
|
958
|
-
}
|
|
959
|
-
const Rr = mt(
|
|
960
|
-
({
|
|
961
|
-
title: e,
|
|
962
|
-
id: n,
|
|
963
|
-
type: t,
|
|
964
|
-
series: o,
|
|
965
|
-
categories: h,
|
|
966
|
-
labels: a,
|
|
967
|
-
height: l,
|
|
968
|
-
width: b,
|
|
969
|
-
patterns: y = !1,
|
|
970
|
-
stacked: E = !1,
|
|
971
|
-
orientation: r = "vertical",
|
|
972
|
-
curve: c = "smooth",
|
|
973
|
-
colors: d,
|
|
974
|
-
toolbar: u = !1,
|
|
975
|
-
locale: H,
|
|
976
|
-
radialValueFormatter: G,
|
|
977
|
-
valueFormatter: k,
|
|
978
|
-
switchableTypes: j,
|
|
979
|
-
onTypeChange: W,
|
|
980
|
-
density: J,
|
|
981
|
-
className: X
|
|
982
|
-
}, ee) => {
|
|
983
|
-
const { t: w, i18n: R } = gt("ui"), $ = ft(), M = D(
|
|
984
|
-
() => `chart-${$.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
985
|
-
[$]
|
|
986
|
-
), O = `${M}-summary`, i = ie(null), [p, x] = ae(null), m = D(
|
|
987
|
-
() => Ct(i, x),
|
|
988
|
-
[]
|
|
989
|
-
), I = D(() => ({ current: p }), [p]), [N, Q] = ae(0), z = typeof l == "string" && l.trim().endsWith("%") ? l.trim() : void 0, [Y, U] = ae(0), v = ie(!1);
|
|
990
|
-
v.current = z !== void 0, wt(() => {
|
|
991
|
-
z && p && U(Math.floor(p.clientHeight));
|
|
992
|
-
}, [z, p]), vt(I), xt(I);
|
|
993
|
-
const C = Lt(
|
|
994
|
-
H ?? R.language ?? "en",
|
|
995
|
-
R.language
|
|
996
|
-
), [s, S] = ae(() => {
|
|
997
|
-
try {
|
|
998
|
-
return Qe();
|
|
999
|
-
} catch {
|
|
1000
|
-
return {};
|
|
1001
|
-
}
|
|
1002
|
-
});
|
|
1003
|
-
se(() => {
|
|
1004
|
-
if (typeof document > "u") return;
|
|
1005
|
-
let g;
|
|
1006
|
-
const B = new MutationObserver(() => {
|
|
1007
|
-
clearTimeout(g), g = setTimeout(() => {
|
|
1008
|
-
try {
|
|
1009
|
-
S(Qe());
|
|
1010
|
-
} catch {
|
|
1011
|
-
}
|
|
1012
|
-
}, 50);
|
|
1013
|
-
});
|
|
1014
|
-
return B.observe(document.documentElement, {
|
|
1015
|
-
attributes: !0,
|
|
1016
|
-
attributeFilter: ["class"]
|
|
1017
|
-
}), () => {
|
|
1018
|
-
clearTimeout(g), B.disconnect();
|
|
1019
|
-
};
|
|
1020
|
-
}, []);
|
|
1021
|
-
const [P, L] = ae(
|
|
1022
|
-
() => typeof document > "u" ? 0 : st(document.documentElement)
|
|
1023
|
-
);
|
|
1024
|
-
se(() => {
|
|
1025
|
-
if (!p || !u) return;
|
|
1026
|
-
const g = new ResizeObserver(() => B()), B = () => {
|
|
1027
|
-
const q = p.querySelector(".apexcharts-toolbar");
|
|
1028
|
-
q && g.observe(q), L(
|
|
1029
|
-
Math.max(st(p), (q == null ? void 0 : q.offsetHeight) ?? 0)
|
|
1030
|
-
);
|
|
1031
|
-
};
|
|
1032
|
-
B();
|
|
1033
|
-
const Z = new MutationObserver(B);
|
|
1034
|
-
for (let q = p.parentElement; q; q = q.parentElement)
|
|
1035
|
-
Z.observe(q, { attributes: !0, attributeFilter: ["class"] });
|
|
1036
|
-
const V = new MutationObserver((q) => {
|
|
1037
|
-
q.flatMap((oe) => [...oe.addedNodes]).some(
|
|
1038
|
-
(oe) => oe instanceof Element && (oe.matches(".apexcharts-toolbar") || oe.querySelector(".apexcharts-toolbar"))
|
|
1039
|
-
) && B();
|
|
1040
|
-
});
|
|
1041
|
-
return V.observe(p, { childList: !0, subtree: !0 }), () => {
|
|
1042
|
-
g.disconnect(), Z.disconnect(), V.disconnect();
|
|
1043
|
-
};
|
|
1044
|
-
}, [p, u]), se(() => {
|
|
1045
|
-
const g = p;
|
|
1046
|
-
if (!g || typeof ResizeObserver > "u") return;
|
|
1047
|
-
const B = new ResizeObserver((Z) => {
|
|
1048
|
-
const V = Z[0];
|
|
1049
|
-
V && (Q(Math.floor(V.contentRect.width)), v.current && U(Math.floor(V.contentRect.height)));
|
|
1050
|
-
});
|
|
1051
|
-
return B.observe(g), () => B.disconnect();
|
|
1052
|
-
}, [p]);
|
|
1053
|
-
const f = D(() => {
|
|
1054
|
-
if (!j || j.length === 0) return [];
|
|
1055
|
-
const g = j.filter(
|
|
1056
|
-
(Z) => at.includes(Z)
|
|
1057
|
-
);
|
|
1058
|
-
if (!at.includes(t))
|
|
1059
|
-
return [];
|
|
1060
|
-
const B = g.includes(t) ? g : [t, ...g];
|
|
1061
|
-
return [...new Set(B)];
|
|
1062
|
-
}, [j, t]), A = f.length >= 2, [_, K] = ae(null), T = A && _ && f.includes(_) ? _ : t;
|
|
1063
|
-
Ht(
|
|
1064
|
-
p,
|
|
1065
|
-
T !== "pie" && T !== "donut"
|
|
1066
|
-
);
|
|
1067
|
-
const ce = fe(t), le = fe(T), [re, be] = ae(null), [ue, Ie] = ae(o);
|
|
1068
|
-
ue !== o && (Ie(o), re && be(null));
|
|
1069
|
-
const de = re && re.base === o && ue === o ? re.next : o, _e = ie(o);
|
|
1070
|
-
_e.current = o;
|
|
1071
|
-
const { effectiveSeries: ne, effectiveCategories: ve, effectiveLabels: xe } = D(
|
|
1072
|
-
() => ot(
|
|
1073
|
-
de,
|
|
1074
|
-
h,
|
|
1075
|
-
a,
|
|
1076
|
-
ce,
|
|
1077
|
-
le,
|
|
1078
|
-
w("chart.table.value")
|
|
1079
|
-
),
|
|
1080
|
-
[de, h, a, ce, le, w]
|
|
1081
|
-
), ke = (g) => ot(
|
|
1082
|
-
g,
|
|
1083
|
-
h,
|
|
1084
|
-
a,
|
|
1085
|
-
ce,
|
|
1086
|
-
le,
|
|
1087
|
-
w("chart.table.value")
|
|
1088
|
-
), ze = ie(ke);
|
|
1089
|
-
ze.current = ke;
|
|
1090
|
-
const Be = ie(Promise.resolve()), Ne = D(
|
|
1091
|
-
() => ({
|
|
1092
|
-
async dataURI() {
|
|
1093
|
-
await Be.current;
|
|
1094
|
-
const g = Je.getChartByID(M);
|
|
1095
|
-
return g ? (await g.dataURI()).imgURI : "";
|
|
1096
|
-
},
|
|
1097
|
-
updateSeries(g) {
|
|
1098
|
-
be({ base: _e.current, next: g });
|
|
1099
|
-
const B = Je.getChartByID(M);
|
|
1100
|
-
if (!B) return;
|
|
1101
|
-
const Z = ze.current(g), V = { ...je.current, ...Z };
|
|
1102
|
-
Be.current = B.updateOptions(
|
|
1103
|
-
{ ...it(V), series: Z.effectiveSeries },
|
|
1104
|
-
!1,
|
|
1105
|
-
!0
|
|
1106
|
-
).catch(() => {
|
|
1107
|
-
});
|
|
1108
|
-
},
|
|
1109
|
-
setType(g) {
|
|
1110
|
-
return !A || !f.includes(g) ? !1 : (K(g), !0);
|
|
1111
|
-
},
|
|
1112
|
-
getTypeState() {
|
|
1113
|
-
return {
|
|
1114
|
-
declaredType: t,
|
|
1115
|
-
effectiveType: T,
|
|
1116
|
-
availableTypes: A ? [...f] : []
|
|
1117
|
-
};
|
|
1118
|
-
}
|
|
1119
|
-
}),
|
|
1120
|
-
[M, t, T, A, f]
|
|
1121
|
-
);
|
|
1122
|
-
yt(ee, () => Ne, [Ne]), Tt(lr, Ne, n);
|
|
1123
|
-
const $e = typeof document < "u" && document.documentElement.dir === "rtl", qe = D(
|
|
1124
|
-
() => Nr(ne, T),
|
|
1125
|
-
[ne, T]
|
|
1126
|
-
), Fe = D(
|
|
1127
|
-
() => new Intl.NumberFormat(C),
|
|
1128
|
-
[C]
|
|
1129
|
-
), Se = D(
|
|
1130
|
-
() => k ?? ((g) => Fe.format(g)),
|
|
1131
|
-
[k, Fe]
|
|
1132
|
-
), He = D(
|
|
1133
|
-
() => ({
|
|
1134
|
-
name: C,
|
|
1135
|
-
options: {
|
|
1136
|
-
toolbar: {
|
|
1137
|
-
download: w("chart.toolbar.download"),
|
|
1138
|
-
// Names the button that opens the export menu (Apex: "Menu").
|
|
1139
|
-
menu: w("chart.toolbar.download"),
|
|
1140
|
-
selection: w("chart.toolbar.selection"),
|
|
1141
|
-
selectionZoom: w("chart.toolbar.selectionZoom"),
|
|
1142
|
-
zoomIn: w("chart.toolbar.zoomIn"),
|
|
1143
|
-
zoomOut: w("chart.toolbar.zoomOut"),
|
|
1144
|
-
pan: w("chart.toolbar.pan"),
|
|
1145
|
-
reset: w("chart.toolbar.reset"),
|
|
1146
|
-
exportToSVG: w("chart.toolbar.exportToSVG"),
|
|
1147
|
-
exportToPNG: w("chart.toolbar.exportToPNG"),
|
|
1148
|
-
exportToCSV: w("chart.toolbar.exportToCSV")
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
}),
|
|
1152
|
-
[C, w]
|
|
1153
|
-
), We = Et(), Ve = w("chart.noData"), De = Tr(b, N), Ge = De > 0 && De < Er, ut = b ?? (N > 0 ? N : "100%"), Ue = z ? Y > 0 ? Y : Lr : l ?? 320, Ke = Mr(Ue), Ae = Ke > 0 && Ke < wr;
|
|
1154
|
-
Gt(p, Ae), Yt(p), cr(p, T === "radialBar", C), ie(!1), se(() => {
|
|
1155
|
-
}, [T, G, ne]);
|
|
1156
|
-
const Ee = D(
|
|
1157
|
-
() => ({
|
|
1158
|
-
themeOptions: s,
|
|
1159
|
-
toolbarBand: P,
|
|
1160
|
-
chartId: M,
|
|
1161
|
-
toolbar: u,
|
|
1162
|
-
reducedMotion: We,
|
|
1163
|
-
toolbarLocale: He,
|
|
1164
|
-
locale: C,
|
|
1165
|
-
effectiveLabels: xe,
|
|
1166
|
-
formatValue: Se,
|
|
1167
|
-
noDataText: Ve,
|
|
1168
|
-
effectiveType: T,
|
|
1169
|
-
effectiveSeries: ne,
|
|
1170
|
-
effectiveCategories: ve,
|
|
1171
|
-
isRtl: $e,
|
|
1172
|
-
patterns: y,
|
|
1173
|
-
stacked: E,
|
|
1174
|
-
orientation: r,
|
|
1175
|
-
curve: c,
|
|
1176
|
-
colors: d,
|
|
1177
|
-
radialValueFormatter: G,
|
|
1178
|
-
narrow: Ge,
|
|
1179
|
-
short: Ae,
|
|
1180
|
-
wrapperRef: i
|
|
1181
|
-
}),
|
|
1182
|
-
[
|
|
1183
|
-
s,
|
|
1184
|
-
P,
|
|
1185
|
-
M,
|
|
1186
|
-
u,
|
|
1187
|
-
We,
|
|
1188
|
-
He,
|
|
1189
|
-
C,
|
|
1190
|
-
xe,
|
|
1191
|
-
Se,
|
|
1192
|
-
Ve,
|
|
1193
|
-
T,
|
|
1194
|
-
ne,
|
|
1195
|
-
ve,
|
|
1196
|
-
$e,
|
|
1197
|
-
y,
|
|
1198
|
-
E,
|
|
1199
|
-
r,
|
|
1200
|
-
c,
|
|
1201
|
-
d,
|
|
1202
|
-
G,
|
|
1203
|
-
Ge,
|
|
1204
|
-
Ae
|
|
1205
|
-
]
|
|
1206
|
-
), dt = D(
|
|
1207
|
-
() => it(Ee),
|
|
1208
|
-
[Ee]
|
|
1209
|
-
), je = ie(Ee);
|
|
1210
|
-
je.current = Ee;
|
|
1211
|
-
const pt = D(() => {
|
|
1212
|
-
const g = fe(T) ? xe ?? [] : ve ?? [], B = qe, Z = T === "radialBar" ? lt(C, G) : Se;
|
|
1213
|
-
return /* @__PURE__ */ F("div", { className: "ds:sr-only", children: /* @__PURE__ */ pe("table", { id: O, children: [
|
|
1214
|
-
/* @__PURE__ */ F("caption", { children: e }),
|
|
1215
|
-
/* @__PURE__ */ F("thead", { children: /* @__PURE__ */ pe("tr", { children: [
|
|
1216
|
-
/* @__PURE__ */ F("th", { scope: "col", children: w("chart.table.series") }),
|
|
1217
|
-
g.map((V, q) => /* @__PURE__ */ F("th", { scope: "col", children: V }, `${V}-${q}`))
|
|
1218
|
-
] }) }),
|
|
1219
|
-
/* @__PURE__ */ F("tbody", { children: B.map((V, q) => /* @__PURE__ */ pe("tr", { children: [
|
|
1220
|
-
/* @__PURE__ */ F("th", { scope: "row", children: V.name || w("chart.table.value") }),
|
|
1221
|
-
V.data.map((Ze, oe) => /* @__PURE__ */ F("td", { children: Z(Ze) }, `${q}-${oe}`))
|
|
1222
|
-
] }, `${V.name}-${q}`)) })
|
|
1223
|
-
] }) });
|
|
1224
|
-
}, [
|
|
1225
|
-
T,
|
|
1226
|
-
qe,
|
|
1227
|
-
xe,
|
|
1228
|
-
ve,
|
|
1229
|
-
O,
|
|
1230
|
-
e,
|
|
1231
|
-
w,
|
|
1232
|
-
Se,
|
|
1233
|
-
G,
|
|
1234
|
-
C
|
|
1235
|
-
]), ht = D(() => (fe(T), ne), [ne, T]), Xe = z ? {
|
|
1236
|
-
"--chart-fill-size": z
|
|
1237
|
-
} : void 0, Ye = /* @__PURE__ */ pe(
|
|
1238
|
-
"div",
|
|
1239
|
-
{
|
|
1240
|
-
ref: m,
|
|
1241
|
-
role: "figure",
|
|
1242
|
-
"aria-label": e,
|
|
1243
|
-
"aria-describedby": O,
|
|
1244
|
-
"data-legend-layout": Ae ? "row" : void 0,
|
|
1245
|
-
className: ur({
|
|
1246
|
-
// Explicit height wins over the density min-height unless the
|
|
1247
|
-
// caller also asked for a density explicitly.
|
|
1248
|
-
// A `%` height takes its height from the parent, never a density.
|
|
1249
|
-
density: z ? "none" : J ?? (l !== void 0 ? "none" : void 0),
|
|
1250
|
-
className: [
|
|
1251
|
-
dr({
|
|
1252
|
-
fill: z ? A ? "rest" : "root" : "none"
|
|
1253
|
-
}),
|
|
1254
|
-
A ? void 0 : X
|
|
1255
|
-
].filter(Boolean).join(" ")
|
|
1256
|
-
}),
|
|
1257
|
-
style: A ? void 0 : Xe,
|
|
1258
|
-
...A ? {} : { "data-component": "chart", "data-component-id": n },
|
|
1259
|
-
children: [
|
|
1260
|
-
pt,
|
|
1261
|
-
/* @__PURE__ */ F(
|
|
1262
|
-
bt,
|
|
1263
|
-
{
|
|
1264
|
-
className: pr({ fill: z !== void 0 }),
|
|
1265
|
-
type: T,
|
|
1266
|
-
series: ht,
|
|
1267
|
-
options: dt,
|
|
1268
|
-
width: ut,
|
|
1269
|
-
height: Ue
|
|
1270
|
-
},
|
|
1271
|
-
T
|
|
1272
|
-
)
|
|
1273
|
-
]
|
|
1274
|
-
}
|
|
1275
|
-
);
|
|
1276
|
-
return A ? /* @__PURE__ */ pe(
|
|
1277
|
-
"div",
|
|
1278
|
-
{
|
|
1279
|
-
"data-component": "chart",
|
|
1280
|
-
"data-component-id": n,
|
|
1281
|
-
className: hr({
|
|
1282
|
-
fill: z !== void 0,
|
|
1283
|
-
className: X
|
|
1284
|
-
}),
|
|
1285
|
-
style: Xe,
|
|
1286
|
-
children: [
|
|
1287
|
-
/* @__PURE__ */ F("div", { className: "ds:mb-[var(--spacing-xs)] ds:flex ds:justify-end", children: /* @__PURE__ */ F(
|
|
1288
|
-
It,
|
|
1289
|
-
{
|
|
1290
|
-
role: "radiogroup",
|
|
1291
|
-
mode: "toggle-single",
|
|
1292
|
-
size: "sm",
|
|
1293
|
-
"aria-label": w("chart.typeSwitcher.label"),
|
|
1294
|
-
value: T,
|
|
1295
|
-
onValueChange: (g) => {
|
|
1296
|
-
g !== T && (K(g), W == null || W(g));
|
|
1297
|
-
},
|
|
1298
|
-
children: f.map((g) => /* @__PURE__ */ F(
|
|
1299
|
-
Mt,
|
|
1300
|
-
{
|
|
1301
|
-
value: g,
|
|
1302
|
-
type: "button",
|
|
1303
|
-
icon: br[g],
|
|
1304
|
-
"aria-label": w(gr[g])
|
|
1305
|
-
},
|
|
1306
|
-
g
|
|
1307
|
-
))
|
|
1308
|
-
}
|
|
1309
|
-
) }),
|
|
1310
|
-
Ye
|
|
1311
|
-
]
|
|
1312
|
-
}
|
|
1313
|
-
) : Ye;
|
|
1314
|
-
}
|
|
1315
|
-
);
|
|
1316
|
-
Rr.displayName = "Chart";
|
|
1317
|
-
export {
|
|
1318
|
-
Rr as C,
|
|
1319
|
-
ur as a,
|
|
1320
|
-
lr as c
|
|
1321
|
-
};
|
|
1322
|
-
//# sourceMappingURL=chart-CIzXxNeM.js.map
|