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