dynamic-mui 2.0.26 → 2.2.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/README.md +218 -37
- package/dist/AxisSharedComponents-BbsKw1BT.js +3 -0
- package/dist/AxisSharedComponents-xLtpOLH_.mjs +605 -0
- package/dist/ChartsAxis-CANvBdY9.mjs +47 -0
- package/dist/ChartsAxis-EZ7m_KrU.js +1 -0
- package/dist/ChartsGrid-BCRTvNTr.js +3 -0
- package/dist/ChartsGrid-C_HT7qpL.mjs +381 -0
- package/dist/ChartsWrapper-CM7EDyAK.js +5 -0
- package/dist/ChartsWrapper-CO5_Z6BD.mjs +1878 -0
- package/dist/ChartsXAxis-CPmuCRhq.mjs +487 -0
- package/dist/ChartsXAxis-DFFY1sPg.js +3 -0
- package/dist/ChartsYAxis-DLUMr9vG.mjs +392 -0
- package/dist/ChartsYAxis-fpevi1sP.js +1 -0
- package/dist/XmlShapeDeserializer-3yQdm0b0.mjs +237 -0
- package/dist/XmlShapeDeserializer-XKJAoqLc.js +1 -0
- package/dist/ai/client.d.ts +2 -0
- package/dist/ai/index.d.ts +4 -0
- package/dist/ai/mapping.d.ts +14 -0
- package/dist/ai/react/AIFill.d.ts +25 -0
- package/dist/ai/react/AIForm.d.ts +29 -0
- package/dist/ai/react/AIFormGenerator.d.ts +20 -0
- package/dist/ai/react/AISchemaReview.d.ts +18 -0
- package/dist/ai/react/AITextAssist.d.ts +35 -0
- package/dist/ai/react/AIVisionImport.d.ts +21 -0
- package/dist/ai/react/index.d.ts +6 -0
- package/dist/ai/types.d.ts +107 -0
- package/dist/clampAngle-BvZjnf53.mjs +11 -0
- package/dist/clampAngle-DpAsDoeT.js +1 -0
- package/dist/components/FormGenerator.d.ts +46 -1
- package/dist/components/controls/AddressField/addressfield.d.ts +2 -0
- package/dist/components/controls/Alert/alert.d.ts +3 -0
- package/dist/components/controls/AsyncAutocomplete/asyncautocomplete.d.ts +9 -0
- package/dist/components/controls/Button/button.d.ts +3 -0
- package/dist/components/controls/CascadeSelect/cascadeselect.d.ts +2 -0
- package/dist/components/controls/CheckBox/checkbox.d.ts +1 -1
- package/dist/components/controls/ChipSelect/chipselect.d.ts +3 -0
- package/dist/components/controls/ColorPicker/colorpicker.d.ts +3 -0
- package/dist/components/controls/Computed/computed.d.ts +7 -0
- package/dist/components/controls/ConsentField/consentfield.d.ts +3 -0
- package/dist/components/controls/CurrencyField/currencyfield.d.ts +2 -0
- package/dist/components/controls/DateRangePicker/daterangepicker.d.ts +3 -0
- package/dist/components/controls/EditableTable/editabletable.d.ts +2 -0
- package/dist/components/controls/FileUpload/fileupload.d.ts +3 -0
- package/dist/components/controls/FormWizard/formwizard.d.ts +2 -0
- package/dist/components/controls/GeoField/geofield.d.ts +6 -0
- package/dist/components/controls/IntlPhone/intlphone.d.ts +2 -0
- package/dist/components/controls/KeyValueField/keyvaluefield.d.ts +2 -0
- package/dist/components/controls/LocationField/locationfield.d.ts +1 -1
- package/dist/components/controls/MarkdownEditor/markdowneditor.d.ts +3 -0
- package/dist/components/controls/MatrixField/matrixfield.d.ts +3 -0
- package/dist/components/controls/MultiTextbox/multitextbox.d.ts +1 -1
- package/dist/components/controls/NpsScale/npsscale.d.ts +3 -0
- package/dist/components/controls/NumberField/numberfield.d.ts +1 -1
- package/dist/components/controls/NumberStepper/numberstepper.d.ts +2 -0
- package/dist/components/controls/OtpField/otpfield.d.ts +2 -0
- package/dist/components/controls/PasswordField/passwordfield.d.ts +2 -0
- package/dist/components/controls/PhoneField/phonefield.d.ts +2 -0
- package/dist/components/controls/Radio/radio.d.ts +1 -1
- package/dist/components/controls/Rating/rating.d.ts +3 -0
- package/dist/components/controls/RichTextEditor/richtexteditor.d.ts +3 -0
- package/dist/components/controls/Select/select.d.ts +1 -1
- package/dist/components/controls/Slider/slider.d.ts +3 -0
- package/dist/components/controls/SummaryField/summaryfield.d.ts +7 -0
- package/dist/components/controls/Switch/switch.d.ts +1 -1
- package/dist/components/controls/TagsInput/tagsinput.d.ts +3 -0
- package/dist/components/controls/TextField/textfield.d.ts +1 -1
- package/dist/components/controls/ToggleButtons/togglebuttons.d.ts +3 -0
- package/dist/components/controls/index.d.ts +60 -0
- package/dist/createSelector-B-9FwV16.mjs +430 -0
- package/dist/createSelector-f0oqn8Lr.js +7 -0
- package/dist/date-utils-CFUUt6NL.js +4 -0
- package/dist/date-utils-pGzaKb0p.mjs +477 -0
- package/dist/dynamic-mui.cjs.js +1 -1
- package/dist/dynamic-mui.es.js +19 -6
- package/dist/index--8Zky9Oh.js +299 -0
- package/dist/index-6WTs1Xy_.js +1 -0
- package/dist/index-B1R1akM2.js +1 -0
- package/dist/index-BW8_rRff.js +7 -0
- package/dist/index-BXFVK_GX.js +1 -0
- package/dist/index-B_KNUTjy.js +1 -0
- package/dist/index-BhaKvHkU.mjs +62051 -0
- package/dist/index-Bif92ima.js +1 -0
- package/dist/index-BnZOu8CL.js +1 -0
- package/dist/index-CDxpgRlR.mjs +7 -0
- package/dist/index-CThMfvtJ.mjs +2555 -0
- package/dist/index-CVqLvm8B.js +1 -0
- package/dist/index-CodJBIn6.mjs +1665 -0
- package/dist/index-Cr6Wp_S-.mjs +3141 -0
- package/dist/index-CslPwsrf.mjs +4 -0
- package/dist/index-CuV0MQzZ.mjs +1173 -0
- package/dist/{index-BGfWFaIb.mjs → index-DA0XouZs.mjs} +16 -16
- package/dist/index-DKS5Sz9e.js +14 -0
- package/dist/index-DSkYYZuW.mjs +4 -0
- package/dist/index-DU78_FiA.js +1 -0
- package/dist/index-D_mYhgJ0.js +10 -0
- package/dist/index-DcWfyXJp.mjs +92 -0
- package/dist/index-Dlimbnxj.mjs +2965 -0
- package/dist/index-MllWgTJ5.mjs +9372 -0
- package/dist/index-in5z9hUb.js +133 -0
- package/dist/index-qUW7FnZ-.mjs +20540 -0
- package/dist/index.browser-BSu11T_q.mjs +363 -0
- package/dist/index.browser-By7-GABP.js +4 -0
- package/dist/index.d.ts +4 -1
- package/dist/isDeepEqual-BHfPvf9U.mjs +393 -0
- package/dist/isDeepEqual-CqxZGVRk.js +1 -0
- package/dist/loadCognitoIdentity-DtYTy-DW.js +1 -0
- package/dist/loadCognitoIdentity-DzdR91GB.mjs +872 -0
- package/dist/loadSts-Cic6UToN.mjs +593 -0
- package/dist/loadSts-csbFP6zX.js +1 -0
- package/dist/noAuth-B8ui2kBg.mjs +71 -0
- package/dist/noAuth-JPA2o4dt.js +1 -0
- package/dist/playground/AIContext.d.ts +18 -0
- package/dist/playground/AIPanel.d.ts +10 -0
- package/dist/playground/DemoGallery.d.ts +6 -0
- package/dist/playground/Sidebar.d.ts +9 -1
- package/dist/playground/demoForms.d.ts +3 -0
- package/dist/playground/demoRecipes.d.ts +15 -0
- package/dist/playground/demoVariants.d.ts +11 -0
- package/dist/schema.d.ts +404 -0
- package/dist/theme/theme.d.ts +5 -0
- package/dist/types.d.ts +97 -10
- package/dist/useAxis-DSbfEtO7.js +3 -0
- package/dist/useAxis-SiNBMMWq.mjs +3010 -0
- package/dist/useChartContainerProps-Bl3hO-r1.mjs +5418 -0
- package/dist/useChartContainerProps-C_C_PZoi.js +12 -0
- package/dist/useItemHighlightedGetter-9CIwqsGj.js +1 -0
- package/dist/useItemHighlightedGetter-CTISrNdV.mjs +88 -0
- package/dist/util/helper.d.ts +2 -30
- package/dist/util/premiumStyles.d.ts +27 -0
- package/dist/util/rules.d.ts +35 -0
- package/package.json +2 -2
- package/dist/index-BHROoqH4.js +0 -1
- package/dist/index-S6BQaF_5.js +0 -465
- package/dist/index-Wtsz8Yiv.mjs +0 -102315
- package/dist/loadCognitoIdentity-CiUaDv6q.mjs +0 -935
- package/dist/loadCognitoIdentity-DN_MCNUl.js +0 -1
|
@@ -0,0 +1,1878 @@
|
|
|
1
|
+
import { n as ft, p as te, m as Y, h as pt, s as ht, f as gt, q as G, r as mt, t as re, i as xt, b as E, d as ve, u as $e, a as Le, v as qe, w as yt, x as bt, y as Ct, z as It, A as vt, B as Tt, C as Ot, E as Rt, F as At, c as Fe, G as jt, H as kt } from "./useAxis-SiNBMMWq.mjs";
|
|
2
|
+
import { w as wt, o as Nt, f as me, _ as j, p as Pt, n as xe, c as le, g as ce, h as se, s as $, T as Te, u as Oe, r as De, b as ze, j as c, a as F, i as _, P as r, q as Et, t as St, k as Mt, v as _t, H as Ve, e as $t, x as Lt } from "./index-BhaKvHkU.mjs";
|
|
3
|
+
import { a as A, c as J, b as qt } from "./createSelector-B-9FwV16.mjs";
|
|
4
|
+
import { W as Ft, d as Re, X as Ue, Y as Dt, Z as zt, _ as He, $ as Vt, a0 as Ut, a1 as Ht, a2 as Wt, y as Ne, O as Bt, a3 as Yt, a4 as Gt, a5 as Jt } from "./useChartContainerProps-Bl3hO-r1.mjs";
|
|
5
|
+
import * as T from "react";
|
|
6
|
+
import { a as Kt } from "./clampAngle-BvZjnf53.mjs";
|
|
7
|
+
import { i as Qt } from "./isDeepEqual-BHfPvf9U.mjs";
|
|
8
|
+
import * as Zt from "react-dom";
|
|
9
|
+
const Xt = (e) => e.animation, es = A(Xt, (e) => e.skip || e.skipAnimationRequests > 0), ts = (e) => e.tooltip, We = A(ts, (e) => e?.item ?? null), ss = A(We, (e) => e !== null), Ae = A(Re, We, Ue, (e, t, s) => e === "keyboard" ? s : t ?? null), rs = A(Re, ss, Ft, (e, t, s) => e === "keyboard" ? s : t), ns = J(Ae, ht, gt, G, mt, Y, function(t, {
|
|
10
|
+
axis: s,
|
|
11
|
+
axisIds: n
|
|
12
|
+
}, {
|
|
13
|
+
axis: o,
|
|
14
|
+
axisIds: i
|
|
15
|
+
}, a, d, p) {
|
|
16
|
+
if (!t)
|
|
17
|
+
return {};
|
|
18
|
+
const y = p[t.type]?.series[t.seriesId];
|
|
19
|
+
if (!y)
|
|
20
|
+
return {};
|
|
21
|
+
const g = {
|
|
22
|
+
rotationAxes: a,
|
|
23
|
+
radiusAxes: d
|
|
24
|
+
}, m = re(y) ? y.xAxisId ?? n[0] : void 0, h = re(y) ? y.yAxisId ?? i[0] : void 0;
|
|
25
|
+
return m !== void 0 && (g.x = s[m]), h !== void 0 && (g.y = o[h]), g;
|
|
26
|
+
}), os = J(Ae, ft, te, Y, pt, ns, function(t, s, n, o, i, a, d = "top") {
|
|
27
|
+
if (!t)
|
|
28
|
+
return null;
|
|
29
|
+
const p = o[t.type]?.series[t.seriesId];
|
|
30
|
+
return p ? n[p.type].tooltipItemPositionGetter?.({
|
|
31
|
+
series: o,
|
|
32
|
+
seriesLayout: i,
|
|
33
|
+
drawingArea: s,
|
|
34
|
+
axesConfig: a,
|
|
35
|
+
identifier: t,
|
|
36
|
+
placement: d
|
|
37
|
+
}) ?? null : null;
|
|
38
|
+
}), is = (e) => (t, s) => Math.atan2(t - e.cx, e.cy - s);
|
|
39
|
+
function Pe(e, t) {
|
|
40
|
+
const {
|
|
41
|
+
scale: s,
|
|
42
|
+
data: n,
|
|
43
|
+
reverse: o
|
|
44
|
+
} = e;
|
|
45
|
+
if (!xt(s))
|
|
46
|
+
throw new Error("MUI X Charts: getAxisValue is not implemented for polare continuous axes.");
|
|
47
|
+
if (!n)
|
|
48
|
+
return -1;
|
|
49
|
+
const i = Kt(t - Math.min(...s.range())), a = s.bandwidth() === 0 ? Math.floor((i + s.step() / 2) / s.step()) % n.length : Math.floor(i / s.step());
|
|
50
|
+
return a < 0 || a >= n.length ? -1 : o ? n.length - 1 - a : a;
|
|
51
|
+
}
|
|
52
|
+
function ue() {
|
|
53
|
+
return E().use(Y);
|
|
54
|
+
}
|
|
55
|
+
const as = A(Y, (e, t) => e[t]);
|
|
56
|
+
J(Y, (e, t, s) => {
|
|
57
|
+
if (s === void 0 || Array.isArray(s) && s.length === 0)
|
|
58
|
+
return e[t]?.seriesOrder?.map((i) => e[t]?.series[i]) ?? [];
|
|
59
|
+
if (!Array.isArray(s))
|
|
60
|
+
return e[t]?.series?.[s];
|
|
61
|
+
const n = [], o = [];
|
|
62
|
+
for (const i of s) {
|
|
63
|
+
const a = e[t]?.series?.[i];
|
|
64
|
+
a ? n.push(a) : o.push(i);
|
|
65
|
+
}
|
|
66
|
+
if (process.env.NODE_ENV !== "production" && o.length > 0) {
|
|
67
|
+
const i = o.map((d) => JSON.stringify(d)).join(", "), a = `use${t.charAt(0).toUpperCase()}${t.slice(1)}Series`;
|
|
68
|
+
wt([`MUI X Charts: The following ids provided to "${a}" could not be found: ${i}.`, `Make sure that they exist and their series are using the "${t}" series type.`]);
|
|
69
|
+
}
|
|
70
|
+
return n;
|
|
71
|
+
});
|
|
72
|
+
const Nr = (e) => E().use(as, e);
|
|
73
|
+
function ls() {
|
|
74
|
+
return !1;
|
|
75
|
+
}
|
|
76
|
+
function Be(e, t) {
|
|
77
|
+
return !e || !t ? ls : function(n) {
|
|
78
|
+
return n ? e.highlight === "series" ? n.seriesId === t.seriesId : e.highlight === "item" ? n.dataIndex === t.dataIndex && n.seriesId === t.seriesId : !1 : !1;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function cs() {
|
|
82
|
+
return !1;
|
|
83
|
+
}
|
|
84
|
+
function Ye(e, t) {
|
|
85
|
+
return !e || !t ? cs : function(n) {
|
|
86
|
+
return n ? e.fade === "series" ? n.seriesId === t.seriesId && n.dataIndex !== t.dataIndex : e.fade === "global" ? n.seriesId !== t.seriesId || n.dataIndex !== t.dataIndex : !1 : !1;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function je(e, t, s) {
|
|
90
|
+
return e?.highlight === "series" && t?.seriesId === s;
|
|
91
|
+
}
|
|
92
|
+
function us(e, t, s) {
|
|
93
|
+
return je(e, t, s) ? !1 : e?.fade === "global" && t != null || e?.fade === "series" && t?.seriesId === s;
|
|
94
|
+
}
|
|
95
|
+
function Ge(e, t, s) {
|
|
96
|
+
return e?.highlight === "item" && t?.seriesId === s ? t.dataIndex : null;
|
|
97
|
+
}
|
|
98
|
+
function ds(e, t, s) {
|
|
99
|
+
return je(e, t, s) || Ge(e, t, s) === t?.dataIndex ? null : (e?.fade === "series" || e?.fade === "global") && t?.seriesId === s ? t.dataIndex : null;
|
|
100
|
+
}
|
|
101
|
+
const fs = (e) => e.highlight, ps = A(Y, (e) => {
|
|
102
|
+
const t = /* @__PURE__ */ new Map();
|
|
103
|
+
return Object.keys(e).forEach((s) => {
|
|
104
|
+
const n = e[s];
|
|
105
|
+
n?.seriesOrder?.forEach((o) => {
|
|
106
|
+
const i = n?.series[o];
|
|
107
|
+
t.set(o, i?.highlightScope);
|
|
108
|
+
});
|
|
109
|
+
}), t;
|
|
110
|
+
}), q = J(fs, Ue, function(t, s) {
|
|
111
|
+
return t.isControlled || t.lastUpdate === "pointer" ? t.item : s;
|
|
112
|
+
}), D = A(ps, q, function(t, s) {
|
|
113
|
+
if (!s)
|
|
114
|
+
return null;
|
|
115
|
+
const n = t.get(s.seriesId);
|
|
116
|
+
return n === void 0 ? null : n;
|
|
117
|
+
}), Pr = J(D, q, Be), Er = J(D, q, Ye), hs = A(D, q, function(t, s, n) {
|
|
118
|
+
return Be(t, s)(n);
|
|
119
|
+
}), Sr = A(D, q, je), Mr = A(D, q, us), _r = A(D, q, ds), $r = A(D, q, Ge), gs = A(D, q, function(t, s, n) {
|
|
120
|
+
return Ye(t, s)(n);
|
|
121
|
+
});
|
|
122
|
+
function Lr(e) {
|
|
123
|
+
const t = E(), s = t.use(hs, e), n = t.use(gs, e);
|
|
124
|
+
return {
|
|
125
|
+
isHighlighted: s,
|
|
126
|
+
isFaded: !s && n
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function ms(e, t) {
|
|
130
|
+
return Object.keys(e).flatMap((s) => {
|
|
131
|
+
const n = t[s].legendGetter;
|
|
132
|
+
return n === void 0 ? [] : n(e[s]);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
function xs() {
|
|
136
|
+
const e = ue(), s = E().use(te);
|
|
137
|
+
return {
|
|
138
|
+
items: ms(e, s)
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
var pe, Ee;
|
|
142
|
+
function ys() {
|
|
143
|
+
if (Ee) return pe;
|
|
144
|
+
Ee = 1;
|
|
145
|
+
var e = 4, t = 1e-3, s = 1e-7, n = 10, o = 11, i = 1 / (o - 1), a = typeof Float32Array == "function";
|
|
146
|
+
function d(u, l) {
|
|
147
|
+
return 1 - 3 * l + 3 * u;
|
|
148
|
+
}
|
|
149
|
+
function p(u, l) {
|
|
150
|
+
return 3 * l - 6 * u;
|
|
151
|
+
}
|
|
152
|
+
function y(u) {
|
|
153
|
+
return 3 * u;
|
|
154
|
+
}
|
|
155
|
+
function g(u, l, f) {
|
|
156
|
+
return ((d(l, f) * u + p(l, f)) * u + y(l)) * u;
|
|
157
|
+
}
|
|
158
|
+
function m(u, l, f) {
|
|
159
|
+
return 3 * d(l, f) * u * u + 2 * p(l, f) * u + y(l);
|
|
160
|
+
}
|
|
161
|
+
function h(u, l, f, x, C) {
|
|
162
|
+
var v, b, w = 0;
|
|
163
|
+
do
|
|
164
|
+
b = l + (f - l) / 2, v = g(b, x, C) - u, v > 0 ? f = b : l = b;
|
|
165
|
+
while (Math.abs(v) > s && ++w < n);
|
|
166
|
+
return b;
|
|
167
|
+
}
|
|
168
|
+
function I(u, l, f, x) {
|
|
169
|
+
for (var C = 0; C < e; ++C) {
|
|
170
|
+
var v = m(l, f, x);
|
|
171
|
+
if (v === 0)
|
|
172
|
+
return l;
|
|
173
|
+
var b = g(l, f, x) - u;
|
|
174
|
+
l -= b / v;
|
|
175
|
+
}
|
|
176
|
+
return l;
|
|
177
|
+
}
|
|
178
|
+
function k(u) {
|
|
179
|
+
return u;
|
|
180
|
+
}
|
|
181
|
+
return pe = function(l, f, x, C) {
|
|
182
|
+
if (!(0 <= l && l <= 1 && 0 <= x && x <= 1))
|
|
183
|
+
throw new Error("bezier x values must be in [0, 1] range");
|
|
184
|
+
if (l === f && x === C)
|
|
185
|
+
return k;
|
|
186
|
+
for (var v = a ? new Float32Array(o) : new Array(o), b = 0; b < o; ++b)
|
|
187
|
+
v[b] = g(b * i, l, x);
|
|
188
|
+
function w(N) {
|
|
189
|
+
for (var O = 0, R = 1, P = o - 1; R !== P && v[R] <= N; ++R)
|
|
190
|
+
O += i;
|
|
191
|
+
--R;
|
|
192
|
+
var S = (N - v[R]) / (v[R + 1] - v[R]), M = O + S * i, L = m(M, l, x);
|
|
193
|
+
return L >= t ? I(N, M, l, x) : L === 0 ? M : h(N, O, O + i, l, x);
|
|
194
|
+
}
|
|
195
|
+
return function(O) {
|
|
196
|
+
return O === 0 ? 0 : O === 1 ? 1 : g(w(O), f, C);
|
|
197
|
+
};
|
|
198
|
+
}, pe;
|
|
199
|
+
}
|
|
200
|
+
var bs = ys();
|
|
201
|
+
const Cs = /* @__PURE__ */ Nt(bs), Is = 300, qr = "cubic-bezier(0.66, 0, 0.34, 1)", vs = Cs(0.66, 0, 0.34, 1);
|
|
202
|
+
var B = 0, Q = 0, K = 0, Je = 1e3, ne, Z, oe = 0, z = 0, de = 0, X = typeof performance == "object" && performance.now ? performance : Date, Ke = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
|
|
203
|
+
setTimeout(e, 17);
|
|
204
|
+
};
|
|
205
|
+
function ke() {
|
|
206
|
+
return z || (Ke(Ts), z = X.now() + de);
|
|
207
|
+
}
|
|
208
|
+
function Ts() {
|
|
209
|
+
z = 0;
|
|
210
|
+
}
|
|
211
|
+
function ie() {
|
|
212
|
+
this._call = this._time = this._next = null;
|
|
213
|
+
}
|
|
214
|
+
ie.prototype = Qe.prototype = {
|
|
215
|
+
constructor: ie,
|
|
216
|
+
restart: function(e, t, s) {
|
|
217
|
+
if (typeof e != "function") throw new TypeError("callback is not a function");
|
|
218
|
+
s = (s == null ? ke() : +s) + (t == null ? 0 : +t), !this._next && Z !== this && (Z ? Z._next = this : ne = this, Z = this), this._call = e, this._time = s, ye();
|
|
219
|
+
},
|
|
220
|
+
stop: function() {
|
|
221
|
+
this._call && (this._call = null, this._time = 1 / 0, ye());
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
function Qe(e, t, s) {
|
|
225
|
+
var n = new ie();
|
|
226
|
+
return n.restart(e, t, s), n;
|
|
227
|
+
}
|
|
228
|
+
function Os() {
|
|
229
|
+
ke(), ++B;
|
|
230
|
+
for (var e = ne, t; e; )
|
|
231
|
+
(t = z - e._time) >= 0 && e._call.call(void 0, t), e = e._next;
|
|
232
|
+
--B;
|
|
233
|
+
}
|
|
234
|
+
function Se() {
|
|
235
|
+
z = (oe = X.now()) + de, B = Q = 0;
|
|
236
|
+
try {
|
|
237
|
+
Os();
|
|
238
|
+
} finally {
|
|
239
|
+
B = 0, As(), z = 0;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
function Rs() {
|
|
243
|
+
var e = X.now(), t = e - oe;
|
|
244
|
+
t > Je && (de -= t, oe = e);
|
|
245
|
+
}
|
|
246
|
+
function As() {
|
|
247
|
+
for (var e, t = ne, s, n = 1 / 0; t; )
|
|
248
|
+
t._call ? (n > t._time && (n = t._time), e = t, t = t._next) : (s = t._next, t._next = null, t = e ? e._next = s : ne = s);
|
|
249
|
+
Z = e, ye(n);
|
|
250
|
+
}
|
|
251
|
+
function ye(e) {
|
|
252
|
+
if (!B) {
|
|
253
|
+
Q && (Q = clearTimeout(Q));
|
|
254
|
+
var t = e - z;
|
|
255
|
+
t > 24 ? (e < 1 / 0 && (Q = setTimeout(Se, e - X.now() - de)), K && (K = clearInterval(K))) : (K || (oe = X.now(), K = setInterval(Rs, Je)), B = 1, Ke(Se));
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
function js(e, t, s) {
|
|
259
|
+
var n = new ie();
|
|
260
|
+
return t = t == null ? 0 : +t, n.restart((o) => {
|
|
261
|
+
n.stop(), e(o + t);
|
|
262
|
+
}, t, s), n;
|
|
263
|
+
}
|
|
264
|
+
class ks {
|
|
265
|
+
elapsed = 0;
|
|
266
|
+
timer = null;
|
|
267
|
+
/**
|
|
268
|
+
* Create a new ResumableTransition.
|
|
269
|
+
* @param duration Duration in milliseconds
|
|
270
|
+
* @param easingFn The easing function
|
|
271
|
+
* @param onTick Callback function called on each animation frame with the eased time in range [0, 1].
|
|
272
|
+
*/
|
|
273
|
+
constructor(t, s, n) {
|
|
274
|
+
this.duration = t, this.easingFn = s, this.onTickCallback = n, this.resume();
|
|
275
|
+
}
|
|
276
|
+
get running() {
|
|
277
|
+
return this.timer !== null;
|
|
278
|
+
}
|
|
279
|
+
timerCallback(t) {
|
|
280
|
+
this.elapsed = Math.min(t, this.duration);
|
|
281
|
+
const s = this.duration === 0 ? 1 : this.elapsed / this.duration, n = this.easingFn(s);
|
|
282
|
+
this.onTickCallback(n), this.elapsed >= this.duration && this.stop();
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Resume the transition
|
|
286
|
+
*/
|
|
287
|
+
resume() {
|
|
288
|
+
if (this.running || this.elapsed >= this.duration)
|
|
289
|
+
return this;
|
|
290
|
+
const t = ke() - this.elapsed;
|
|
291
|
+
return this.timer = Qe((s) => this.timerCallback(s), 0, t), this;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Stops the transition.
|
|
295
|
+
*/
|
|
296
|
+
stop() {
|
|
297
|
+
return this.running ? (this.timer && (this.timer.stop(), this.timer = null), this) : this;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Immediately finishes the transition and calls the tick callback with the final value.
|
|
301
|
+
*/
|
|
302
|
+
finish() {
|
|
303
|
+
return this.stop(), js(() => this.timerCallback(this.duration)), this;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
function ws(e, t) {
|
|
307
|
+
if (Object.is(e, t))
|
|
308
|
+
return !0;
|
|
309
|
+
if (typeof e != "object" || e === null || typeof t != "object" || t === null)
|
|
310
|
+
return !1;
|
|
311
|
+
const s = Object.keys(e), n = Object.keys(t);
|
|
312
|
+
if (s.length !== n.length)
|
|
313
|
+
return !1;
|
|
314
|
+
for (let o = 0; o < s.length; o += 1) {
|
|
315
|
+
const i = s[o];
|
|
316
|
+
if (!Object.prototype.hasOwnProperty.call(t, i) || // @ts-ignore
|
|
317
|
+
!Object.is(e[i], t[i]))
|
|
318
|
+
return !1;
|
|
319
|
+
}
|
|
320
|
+
return !0;
|
|
321
|
+
}
|
|
322
|
+
function Ns(e, {
|
|
323
|
+
createInterpolator: t,
|
|
324
|
+
applyProps: s,
|
|
325
|
+
skip: n,
|
|
326
|
+
initialProps: o = e
|
|
327
|
+
}) {
|
|
328
|
+
const i = T.useRef(o), a = T.useRef(null), d = T.useRef(null), p = T.useRef(e);
|
|
329
|
+
me(() => {
|
|
330
|
+
p.current = e;
|
|
331
|
+
}, [e]), me(() => {
|
|
332
|
+
n && (a.current?.finish(), a.current = null, d.current = null, i.current = e);
|
|
333
|
+
}, [e, n]);
|
|
334
|
+
const y = T.useCallback((m) => {
|
|
335
|
+
const h = i.current, I = t(h, e);
|
|
336
|
+
a.current = new ks(Is, vs, (k) => {
|
|
337
|
+
const u = I(k);
|
|
338
|
+
i.current = u, s(m, u);
|
|
339
|
+
});
|
|
340
|
+
}, [s, t, e]);
|
|
341
|
+
return [T.useCallback((m) => {
|
|
342
|
+
if (m === null) {
|
|
343
|
+
a.current?.stop();
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
const h = d.current;
|
|
347
|
+
if (h === m) {
|
|
348
|
+
if (ws(p.current, e)) {
|
|
349
|
+
a.current?.resume();
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
a.current?.stop();
|
|
353
|
+
}
|
|
354
|
+
h && a.current?.stop(), d.current = m, (a.current || !n) && y(m);
|
|
355
|
+
}, [y, e, n]), i.current];
|
|
356
|
+
}
|
|
357
|
+
function Fr(e, {
|
|
358
|
+
createInterpolator: t,
|
|
359
|
+
transformProps: s,
|
|
360
|
+
applyProps: n,
|
|
361
|
+
skip: o,
|
|
362
|
+
initialProps: i = e,
|
|
363
|
+
ref: a
|
|
364
|
+
}) {
|
|
365
|
+
const d = s ?? ((m) => m), [p, y] = Ns(e, {
|
|
366
|
+
initialProps: i,
|
|
367
|
+
createInterpolator: t,
|
|
368
|
+
applyProps: (m, h) => n(m, d(h)),
|
|
369
|
+
skip: o
|
|
370
|
+
}), g = s(o ? e : y);
|
|
371
|
+
return j({}, g, {
|
|
372
|
+
ref: Pt(p, a)
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
function Ps() {
|
|
376
|
+
return ve().chartRootRef;
|
|
377
|
+
}
|
|
378
|
+
const Ze = () => {
|
|
379
|
+
const e = T.useContext(Dt);
|
|
380
|
+
if (e === null)
|
|
381
|
+
throw new Error(["MUI X Charts: Can not find the charts localization context.", "It looks like you forgot to wrap your component in ChartsLocalizationProvider.", "This can also happen if you are bundling multiple versions of the `@mui/x-charts` package"].join(`
|
|
382
|
+
`));
|
|
383
|
+
return e;
|
|
384
|
+
};
|
|
385
|
+
function Dr() {
|
|
386
|
+
return E().use(zt);
|
|
387
|
+
}
|
|
388
|
+
function zr(e) {
|
|
389
|
+
const s = E().use(es);
|
|
390
|
+
return e || s;
|
|
391
|
+
}
|
|
392
|
+
function Es(e) {
|
|
393
|
+
"hasPointerCapture" in e.currentTarget && e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId);
|
|
394
|
+
}
|
|
395
|
+
const Vr = (e, t) => {
|
|
396
|
+
const {
|
|
397
|
+
instance: s
|
|
398
|
+
} = ve(), n = T.useRef(!1), o = xe(() => {
|
|
399
|
+
n.current = !0, s.setLastUpdateSource("pointer"), s.setTooltipItem(e), s.setHighlight(
|
|
400
|
+
// @ts-ignore
|
|
401
|
+
e.type === "sankey" ? e : {
|
|
402
|
+
seriesId: e.seriesId,
|
|
403
|
+
dataIndex: e.dataIndex
|
|
404
|
+
}
|
|
405
|
+
);
|
|
406
|
+
}), i = xe(() => {
|
|
407
|
+
n.current = !1, s.removeTooltipItem(e), s.clearHighlight();
|
|
408
|
+
});
|
|
409
|
+
return T.useEffect(() => () => {
|
|
410
|
+
n.current && i();
|
|
411
|
+
}, [i]), T.useMemo(() => t ? {} : {
|
|
412
|
+
onPointerEnter: o,
|
|
413
|
+
onPointerLeave: i,
|
|
414
|
+
onPointerDown: Es
|
|
415
|
+
}, [t, o, i]);
|
|
416
|
+
};
|
|
417
|
+
function Ss(e) {
|
|
418
|
+
return ce("MuiChartsTooltip", e);
|
|
419
|
+
}
|
|
420
|
+
const H = se("MuiChartsTooltip", ["root", "paper", "table", "row", "cell", "mark", "markContainer", "labelCell", "valueCell", "axisValueCell"]), fe = (e) => le({
|
|
421
|
+
root: ["root"],
|
|
422
|
+
paper: ["paper"],
|
|
423
|
+
table: ["table"],
|
|
424
|
+
row: ["row"],
|
|
425
|
+
cell: ["cell"],
|
|
426
|
+
mark: ["mark"],
|
|
427
|
+
markContainer: ["markContainer"],
|
|
428
|
+
labelCell: ["labelCell"],
|
|
429
|
+
valueCell: ["valueCell"],
|
|
430
|
+
axisValueCell: ["axisValueCell"]
|
|
431
|
+
}, Ss, e);
|
|
432
|
+
function Ms() {
|
|
433
|
+
const e = E(), t = e.use(Ae), s = e.use(te), n = ue(), {
|
|
434
|
+
xAxis: o,
|
|
435
|
+
xAxisIds: i
|
|
436
|
+
} = $e(), {
|
|
437
|
+
yAxis: a,
|
|
438
|
+
yAxisIds: d
|
|
439
|
+
} = Le(), {
|
|
440
|
+
zAxis: p,
|
|
441
|
+
zAxisIds: y
|
|
442
|
+
} = He(), {
|
|
443
|
+
rotationAxis: g,
|
|
444
|
+
rotationAxisIds: m
|
|
445
|
+
} = qe();
|
|
446
|
+
if (!t)
|
|
447
|
+
return null;
|
|
448
|
+
const h = n[t.type]?.series[t.seriesId];
|
|
449
|
+
if (!h)
|
|
450
|
+
return null;
|
|
451
|
+
const I = re(h) ? h.xAxisId ?? i[0] : void 0, k = re(h) ? h.yAxisId ?? d[0] : void 0, u = "zAxisId" in h ? h.zAxisId ?? y[0] : y[0], l = m[0], f = s[h.type].colorProcessor?.(h, I !== void 0 ? o[I] : void 0, k !== void 0 ? a[k] : void 0, u !== void 0 ? p[u] : void 0) ?? (() => ""), x = {};
|
|
452
|
+
return I !== void 0 && (x.x = o[I]), k !== void 0 && (x.y = a[k]), l !== void 0 && (x.rotation = g[l]), s[h.type].tooltipGetter({
|
|
453
|
+
series: h,
|
|
454
|
+
axesConfig: x,
|
|
455
|
+
getColor: f,
|
|
456
|
+
identifier: t
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
const be = $("div", {
|
|
460
|
+
name: "MuiChartsTooltip",
|
|
461
|
+
slot: "Container",
|
|
462
|
+
overridesResolver: (e, t) => t.paper
|
|
463
|
+
// FIXME: Inconsistent naming with slot
|
|
464
|
+
})(({
|
|
465
|
+
theme: e
|
|
466
|
+
}) => ({
|
|
467
|
+
backgroundColor: (e.vars || e).palette.background.paper,
|
|
468
|
+
color: (e.vars || e).palette.text.primary,
|
|
469
|
+
borderRadius: (e.vars || e).shape?.borderRadius,
|
|
470
|
+
border: `solid ${(e.vars || e).palette.divider} 1px`
|
|
471
|
+
})), Ce = $("table", {
|
|
472
|
+
name: "MuiChartsTooltip",
|
|
473
|
+
slot: "Table"
|
|
474
|
+
})(({
|
|
475
|
+
theme: e
|
|
476
|
+
}) => ({
|
|
477
|
+
borderSpacing: 0,
|
|
478
|
+
[`& .${H.markContainer}`]: {
|
|
479
|
+
display: "inline-block",
|
|
480
|
+
width: `calc(20px + ${e.spacing(1.5)})`,
|
|
481
|
+
verticalAlign: "middle"
|
|
482
|
+
},
|
|
483
|
+
"& caption": {
|
|
484
|
+
borderBottom: `solid ${(e.vars || e).palette.divider} 1px`,
|
|
485
|
+
padding: e.spacing(0.5, 1.5),
|
|
486
|
+
textAlign: "start",
|
|
487
|
+
whiteSpace: "nowrap",
|
|
488
|
+
"& span": {
|
|
489
|
+
marginRight: e.spacing(1.5)
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
})), Ie = $("tr", {
|
|
493
|
+
name: "MuiChartsTooltip",
|
|
494
|
+
slot: "Row"
|
|
495
|
+
})(({
|
|
496
|
+
theme: e
|
|
497
|
+
}) => ({
|
|
498
|
+
"tr:first-of-type& td": {
|
|
499
|
+
paddingTop: e.spacing(0.5)
|
|
500
|
+
},
|
|
501
|
+
"tr:last-of-type& td": {
|
|
502
|
+
paddingBottom: e.spacing(0.5)
|
|
503
|
+
}
|
|
504
|
+
})), W = $(Te, {
|
|
505
|
+
name: "MuiChartsTooltip",
|
|
506
|
+
slot: "Cell"
|
|
507
|
+
})(({
|
|
508
|
+
theme: e
|
|
509
|
+
}) => ({
|
|
510
|
+
verticalAlign: "middle",
|
|
511
|
+
color: (e.vars || e).palette.text.secondary,
|
|
512
|
+
textAlign: "start",
|
|
513
|
+
[`&.${H.cell}`]: {
|
|
514
|
+
paddingLeft: e.spacing(1),
|
|
515
|
+
paddingRight: e.spacing(1)
|
|
516
|
+
},
|
|
517
|
+
[`&.${H.labelCell}`]: {
|
|
518
|
+
whiteSpace: "nowrap",
|
|
519
|
+
fontWeight: e.typography.fontWeightRegular
|
|
520
|
+
},
|
|
521
|
+
[`&.${H.valueCell}, &.${H.axisValueCell}`]: {
|
|
522
|
+
color: (e.vars || e).palette.text.primary,
|
|
523
|
+
fontWeight: e.typography.fontWeightMedium
|
|
524
|
+
},
|
|
525
|
+
[`&.${H.valueCell}`]: {
|
|
526
|
+
paddingLeft: e.spacing(1.5),
|
|
527
|
+
paddingRight: e.spacing(1.5)
|
|
528
|
+
},
|
|
529
|
+
"td:first-of-type&, th:first-of-type&": {
|
|
530
|
+
paddingLeft: e.spacing(1.5)
|
|
531
|
+
},
|
|
532
|
+
"td:last-of-type&, th:last-of-type&": {
|
|
533
|
+
paddingRight: e.spacing(1.5)
|
|
534
|
+
}
|
|
535
|
+
}));
|
|
536
|
+
function _s(e) {
|
|
537
|
+
return ce("MuiChartsLabelMark", e);
|
|
538
|
+
}
|
|
539
|
+
const U = se("MuiChartsLabelMark", ["root", "line", "square", "circle", "mask", "fill"]), $s = (e) => {
|
|
540
|
+
const {
|
|
541
|
+
type: t
|
|
542
|
+
} = e;
|
|
543
|
+
return le({
|
|
544
|
+
root: typeof t == "function" ? ["root"] : ["root", t],
|
|
545
|
+
mask: ["mask"],
|
|
546
|
+
fill: ["fill"]
|
|
547
|
+
}, _s, e.classes);
|
|
548
|
+
}, we = (e, t, s) => /* @__PURE__ */ T.forwardRef(function(o, i) {
|
|
549
|
+
const a = Oe({
|
|
550
|
+
props: o,
|
|
551
|
+
// eslint-disable-next-line material-ui/mui-name-matches-component-name
|
|
552
|
+
name: e
|
|
553
|
+
}), d = typeof t.defaultProps == "function" ? t.defaultProps(a) : t.defaultProps ?? {}, p = De(d, a), y = ze(), g = t.classesResolver?.(p, y), m = /* @__PURE__ */ T.forwardRef(s);
|
|
554
|
+
return process.env.NODE_ENV !== "production" && (m.displayName = "OutComponent"), process.env.NODE_ENV !== "production" && (m.displayName = `consumeThemeProps(${e})`), /* @__PURE__ */ c.jsx(m, j({}, p, {
|
|
555
|
+
classes: g,
|
|
556
|
+
ref: i
|
|
557
|
+
}));
|
|
558
|
+
});
|
|
559
|
+
process.env.NODE_ENV !== "production" && (we.displayName = "consumeThemeProps");
|
|
560
|
+
const Ls = ["type", "color", "className", "classes"], qs = $("div", {
|
|
561
|
+
name: "MuiChartsLabelMark",
|
|
562
|
+
slot: "Root"
|
|
563
|
+
})(() => ({
|
|
564
|
+
display: "flex",
|
|
565
|
+
width: 14,
|
|
566
|
+
height: 14,
|
|
567
|
+
[`&.${U.line}`]: {
|
|
568
|
+
width: 16,
|
|
569
|
+
height: "unset",
|
|
570
|
+
alignItems: "center",
|
|
571
|
+
[`.${U.mask}`]: {
|
|
572
|
+
height: 4,
|
|
573
|
+
width: "100%",
|
|
574
|
+
borderRadius: 1,
|
|
575
|
+
overflow: "hidden"
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
[`&.${U.square}`]: {
|
|
579
|
+
height: 13,
|
|
580
|
+
width: 13,
|
|
581
|
+
borderRadius: 2,
|
|
582
|
+
overflow: "hidden"
|
|
583
|
+
},
|
|
584
|
+
[`&.${U.circle}`]: {
|
|
585
|
+
height: 15,
|
|
586
|
+
width: 15
|
|
587
|
+
},
|
|
588
|
+
svg: {
|
|
589
|
+
display: "block"
|
|
590
|
+
},
|
|
591
|
+
[`& .${U.mask} > *`]: {
|
|
592
|
+
height: "100%",
|
|
593
|
+
width: "100%"
|
|
594
|
+
},
|
|
595
|
+
[`& .${U.mask}`]: {
|
|
596
|
+
height: "100%",
|
|
597
|
+
width: "100%"
|
|
598
|
+
}
|
|
599
|
+
})), ee = we("MuiChartsLabelMark", {
|
|
600
|
+
defaultProps: {
|
|
601
|
+
type: "square"
|
|
602
|
+
},
|
|
603
|
+
classesResolver: $s
|
|
604
|
+
}, function(t, s) {
|
|
605
|
+
const {
|
|
606
|
+
type: n,
|
|
607
|
+
color: o,
|
|
608
|
+
className: i,
|
|
609
|
+
classes: a
|
|
610
|
+
} = t, d = F(t, Ls), p = n;
|
|
611
|
+
return /* @__PURE__ */ c.jsx(qs, j({
|
|
612
|
+
className: _(a?.root, i),
|
|
613
|
+
ownerState: t,
|
|
614
|
+
"aria-hidden": "true",
|
|
615
|
+
ref: s
|
|
616
|
+
}, d, {
|
|
617
|
+
children: /* @__PURE__ */ c.jsx("div", {
|
|
618
|
+
className: a?.mask,
|
|
619
|
+
children: typeof p == "function" ? /* @__PURE__ */ c.jsx(p, {
|
|
620
|
+
className: a?.fill,
|
|
621
|
+
color: o
|
|
622
|
+
}) : /* @__PURE__ */ c.jsx("svg", {
|
|
623
|
+
viewBox: "0 0 24 24",
|
|
624
|
+
preserveAspectRatio: n === "line" ? "none" : void 0,
|
|
625
|
+
children: n === "circle" ? /* @__PURE__ */ c.jsx("circle", {
|
|
626
|
+
className: a?.fill,
|
|
627
|
+
r: "12",
|
|
628
|
+
cx: "12",
|
|
629
|
+
cy: "12",
|
|
630
|
+
fill: o
|
|
631
|
+
}) : /* @__PURE__ */ c.jsx("rect", {
|
|
632
|
+
className: a?.fill,
|
|
633
|
+
width: "24",
|
|
634
|
+
height: "24",
|
|
635
|
+
fill: o
|
|
636
|
+
})
|
|
637
|
+
})
|
|
638
|
+
})
|
|
639
|
+
}));
|
|
640
|
+
});
|
|
641
|
+
process.env.NODE_ENV !== "production" && (ee.propTypes = {
|
|
642
|
+
// ----------------------------- Warning --------------------------------
|
|
643
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
644
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
645
|
+
// ----------------------------------------------------------------------
|
|
646
|
+
/**
|
|
647
|
+
* Override or extend the styles applied to the component.
|
|
648
|
+
*/
|
|
649
|
+
classes: r.object,
|
|
650
|
+
/**
|
|
651
|
+
* The color of the mark.
|
|
652
|
+
*/
|
|
653
|
+
color: r.string,
|
|
654
|
+
/**
|
|
655
|
+
* The type of the mark.
|
|
656
|
+
* @default 'square'
|
|
657
|
+
*/
|
|
658
|
+
type: r.oneOf(["circle", "line", "square"])
|
|
659
|
+
});
|
|
660
|
+
function Xe(e) {
|
|
661
|
+
const {
|
|
662
|
+
classes: t,
|
|
663
|
+
sx: s
|
|
664
|
+
} = e, n = Ms(), o = fe(t);
|
|
665
|
+
if (!n)
|
|
666
|
+
return null;
|
|
667
|
+
if ("values" in n) {
|
|
668
|
+
const {
|
|
669
|
+
label: y,
|
|
670
|
+
color: g,
|
|
671
|
+
markType: m
|
|
672
|
+
} = n;
|
|
673
|
+
return /* @__PURE__ */ c.jsx(be, {
|
|
674
|
+
sx: s,
|
|
675
|
+
className: o.paper,
|
|
676
|
+
children: /* @__PURE__ */ c.jsxs(Ce, {
|
|
677
|
+
className: o.table,
|
|
678
|
+
children: [/* @__PURE__ */ c.jsxs(Te, {
|
|
679
|
+
component: "caption",
|
|
680
|
+
children: [/* @__PURE__ */ c.jsx("div", {
|
|
681
|
+
className: o.markContainer,
|
|
682
|
+
children: /* @__PURE__ */ c.jsx(ee, {
|
|
683
|
+
type: m,
|
|
684
|
+
color: g,
|
|
685
|
+
className: o.mark
|
|
686
|
+
})
|
|
687
|
+
}), y]
|
|
688
|
+
}), /* @__PURE__ */ c.jsx("tbody", {
|
|
689
|
+
children: n.values.map(({
|
|
690
|
+
formattedValue: h,
|
|
691
|
+
label: I
|
|
692
|
+
}) => /* @__PURE__ */ c.jsxs(Ie, {
|
|
693
|
+
className: o.row,
|
|
694
|
+
children: [/* @__PURE__ */ c.jsx(W, {
|
|
695
|
+
className: _(o.labelCell, o.cell),
|
|
696
|
+
component: "th",
|
|
697
|
+
children: I
|
|
698
|
+
}), /* @__PURE__ */ c.jsx(W, {
|
|
699
|
+
className: _(o.valueCell, o.cell),
|
|
700
|
+
component: "td",
|
|
701
|
+
children: h
|
|
702
|
+
})]
|
|
703
|
+
}, I))
|
|
704
|
+
})]
|
|
705
|
+
})
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
const {
|
|
709
|
+
color: i,
|
|
710
|
+
label: a,
|
|
711
|
+
formattedValue: d,
|
|
712
|
+
markType: p
|
|
713
|
+
} = n;
|
|
714
|
+
return /* @__PURE__ */ c.jsx(be, {
|
|
715
|
+
sx: s,
|
|
716
|
+
className: o.paper,
|
|
717
|
+
children: /* @__PURE__ */ c.jsx(Ce, {
|
|
718
|
+
className: o.table,
|
|
719
|
+
children: /* @__PURE__ */ c.jsx("tbody", {
|
|
720
|
+
children: /* @__PURE__ */ c.jsxs(Ie, {
|
|
721
|
+
className: o.row,
|
|
722
|
+
children: [/* @__PURE__ */ c.jsxs(W, {
|
|
723
|
+
className: _(o.labelCell, o.cell),
|
|
724
|
+
component: "th",
|
|
725
|
+
children: [/* @__PURE__ */ c.jsx("div", {
|
|
726
|
+
className: o.markContainer,
|
|
727
|
+
children: /* @__PURE__ */ c.jsx(ee, {
|
|
728
|
+
type: p,
|
|
729
|
+
color: i,
|
|
730
|
+
className: o.mark
|
|
731
|
+
})
|
|
732
|
+
}), a]
|
|
733
|
+
}), /* @__PURE__ */ c.jsx(W, {
|
|
734
|
+
className: _(o.valueCell, o.cell),
|
|
735
|
+
component: "td",
|
|
736
|
+
children: d
|
|
737
|
+
})]
|
|
738
|
+
})
|
|
739
|
+
})
|
|
740
|
+
})
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
process.env.NODE_ENV !== "production" && (Xe.propTypes = {
|
|
744
|
+
// ----------------------------- Warning --------------------------------
|
|
745
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
746
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
747
|
+
// ----------------------------------------------------------------------
|
|
748
|
+
/**
|
|
749
|
+
* Override or extend the styles applied to the component.
|
|
750
|
+
*/
|
|
751
|
+
classes: r.object,
|
|
752
|
+
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object])
|
|
753
|
+
});
|
|
754
|
+
function Fs(e) {
|
|
755
|
+
const s = E().use(te);
|
|
756
|
+
return T.useMemo(() => {
|
|
757
|
+
const o = {};
|
|
758
|
+
return Object.keys(s).forEach((i) => {
|
|
759
|
+
o[i] = s[i].colorProcessor;
|
|
760
|
+
}), o;
|
|
761
|
+
}, [s]);
|
|
762
|
+
}
|
|
763
|
+
function Ds(e) {
|
|
764
|
+
return e instanceof Date ? e.toUTCString() : e.toLocaleString();
|
|
765
|
+
}
|
|
766
|
+
const zs = "@media (pointer: fine)", Vs = () => Et(zs, {
|
|
767
|
+
defaultMatches: !0
|
|
768
|
+
}), et = (e, t) => t, tt = (e, t) => t;
|
|
769
|
+
function st(e, t, s) {
|
|
770
|
+
return Array.isArray(s) ? s.map((n) => Pe(t.axis[n], e)) : Pe(t.axis[s], e);
|
|
771
|
+
}
|
|
772
|
+
const rt = A(Ut, Vt, yt, (e, t, s) => e === null || t === null ? null : is(s)(e, t)), Us = A(rt, G, et, (e, t, s = t.axisIds[0]) => e === null ? null : st(e, t, s)), nt = A(rt, G, tt, (e, t, s = t.axisIds) => e === null ? null : st(e, t, s));
|
|
773
|
+
A(G, Us, et, (e, t, s = e.axisIds[0]) => {
|
|
774
|
+
if (t === null || t === -1 || e.axisIds.length === 0)
|
|
775
|
+
return null;
|
|
776
|
+
const n = e.axis[s]?.data;
|
|
777
|
+
return n ? n[t] : null;
|
|
778
|
+
});
|
|
779
|
+
A(G, nt, tt, (e, t, s = e.axisIds) => t === null ? null : s.map((n, o) => {
|
|
780
|
+
const i = t[o];
|
|
781
|
+
return i === -1 ? null : e.axis[n].data?.[i];
|
|
782
|
+
}));
|
|
783
|
+
const ot = qt({
|
|
784
|
+
memoizeOptions: {
|
|
785
|
+
// Keep the same reference if array content is the same.
|
|
786
|
+
// If possible, avoid this pattern by creating selectors that
|
|
787
|
+
// uses string/number as arguments.
|
|
788
|
+
resultEqualityCheck: Qt
|
|
789
|
+
}
|
|
790
|
+
})(nt, G, (e, t) => e === null ? [] : t.axisIds.map((s, n) => ({
|
|
791
|
+
axisId: s,
|
|
792
|
+
dataIndex: e[n]
|
|
793
|
+
})).filter(({
|
|
794
|
+
axisId: s,
|
|
795
|
+
dataIndex: n
|
|
796
|
+
}) => t.axis[s].triggerTooltip && n >= 0)), Hs = A(ot, (e) => e.length > 0);
|
|
797
|
+
function he(e, t, s) {
|
|
798
|
+
const n = e.data?.[t] ?? null, i = (e.valueFormatter ?? ((a) => e.scaleType === "utc" ? Ds(a) : a.toLocaleString()))(n, {
|
|
799
|
+
location: "tooltip",
|
|
800
|
+
scale: e.scale
|
|
801
|
+
});
|
|
802
|
+
return {
|
|
803
|
+
axisDirection: s,
|
|
804
|
+
axisId: e.id,
|
|
805
|
+
mainAxis: e,
|
|
806
|
+
dataIndex: t,
|
|
807
|
+
axisValue: n,
|
|
808
|
+
axisFormattedValue: i,
|
|
809
|
+
seriesItems: []
|
|
810
|
+
};
|
|
811
|
+
}
|
|
812
|
+
function Ws(e = {}) {
|
|
813
|
+
const {
|
|
814
|
+
multipleAxes: t,
|
|
815
|
+
directions: s
|
|
816
|
+
} = e, n = bt(), o = Ct(), i = It(), a = E(), d = a.use(Ht), p = a.use(Wt), y = a.use(ot), g = ue(), {
|
|
817
|
+
xAxis: m
|
|
818
|
+
} = $e(), {
|
|
819
|
+
yAxis: h
|
|
820
|
+
} = Le(), {
|
|
821
|
+
zAxis: I,
|
|
822
|
+
zAxisIds: k
|
|
823
|
+
} = He(), {
|
|
824
|
+
rotationAxis: u
|
|
825
|
+
} = qe(), l = Fs();
|
|
826
|
+
if (d.length === 0 && p.length === 0 && y.length === 0)
|
|
827
|
+
return null;
|
|
828
|
+
const f = [];
|
|
829
|
+
return (s === void 0 || s.includes("x")) && d.forEach(({
|
|
830
|
+
axisId: x,
|
|
831
|
+
dataIndex: C
|
|
832
|
+
}) => {
|
|
833
|
+
!t && f.length > 1 || f.push(he(m[x], C, "x"));
|
|
834
|
+
}), (s === void 0 || s.includes("y")) && p.forEach(({
|
|
835
|
+
axisId: x,
|
|
836
|
+
dataIndex: C
|
|
837
|
+
}) => {
|
|
838
|
+
!t && f.length > 1 || f.push(he(h[x], C, "y"));
|
|
839
|
+
}), (s === void 0 || s.includes("rotation")) && y.forEach(({
|
|
840
|
+
axisId: x,
|
|
841
|
+
dataIndex: C
|
|
842
|
+
}) => {
|
|
843
|
+
!t && f.length > 1 || f.push(he(u[x], C, "rotation"));
|
|
844
|
+
}), Object.keys(g).filter(vt).forEach((x) => {
|
|
845
|
+
const C = g[x];
|
|
846
|
+
return C ? C.seriesOrder.forEach((v) => {
|
|
847
|
+
const b = C.series[v], w = b.xAxisId ?? n.id, N = b.yAxisId ?? o.id, O = f.findIndex(({
|
|
848
|
+
axisDirection: R,
|
|
849
|
+
axisId: P
|
|
850
|
+
}) => R === "x" && P === w || R === "y" && P === N);
|
|
851
|
+
if (O >= 0) {
|
|
852
|
+
const R = "zAxisId" in b ? b.zAxisId : k[0], {
|
|
853
|
+
dataIndex: P
|
|
854
|
+
} = f[O], S = l[x]?.(b, m[w], h[N], R ? I[R] : void 0)(P) ?? "", M = b.data[P] ?? null, L = b.valueFormatter(M, {
|
|
855
|
+
dataIndex: P
|
|
856
|
+
}), V = Ne(b.label, "tooltip") ?? null;
|
|
857
|
+
f[O].seriesItems.push({
|
|
858
|
+
seriesId: v,
|
|
859
|
+
color: S,
|
|
860
|
+
value: M,
|
|
861
|
+
formattedValue: L,
|
|
862
|
+
formattedLabel: V,
|
|
863
|
+
markType: b.labelMarkType
|
|
864
|
+
});
|
|
865
|
+
}
|
|
866
|
+
}) : [];
|
|
867
|
+
}), Object.keys(g).filter(Tt).forEach((x) => {
|
|
868
|
+
const C = g[x];
|
|
869
|
+
return C ? C.seriesOrder.forEach((v) => {
|
|
870
|
+
const b = C.series[v], w = (
|
|
871
|
+
// @ts-expect-error Should be fixed when we introduce a polar series with a rotationAxisId
|
|
872
|
+
b.rotationAxisId ?? i?.id
|
|
873
|
+
), N = f.findIndex(({
|
|
874
|
+
axisDirection: O,
|
|
875
|
+
axisId: R
|
|
876
|
+
}) => O === "rotation" && R === w);
|
|
877
|
+
if (N >= 0) {
|
|
878
|
+
const {
|
|
879
|
+
dataIndex: O
|
|
880
|
+
} = f[N], R = l[x]?.(b)(O) ?? "", P = b.data[O] ?? null, S = b.valueFormatter(P, {
|
|
881
|
+
dataIndex: O
|
|
882
|
+
}), M = Ne(b.label, "tooltip") ?? null;
|
|
883
|
+
f[N].seriesItems.push({
|
|
884
|
+
seriesId: v,
|
|
885
|
+
color: R,
|
|
886
|
+
value: P,
|
|
887
|
+
formattedValue: S,
|
|
888
|
+
formattedLabel: M,
|
|
889
|
+
markType: b.labelMarkType
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
}) : [];
|
|
893
|
+
}), t ? f : f.length === 0 ? f[0] : null;
|
|
894
|
+
}
|
|
895
|
+
function Bs(e) {
|
|
896
|
+
return Ws(j({}, e, {
|
|
897
|
+
multipleAxes: !0
|
|
898
|
+
}));
|
|
899
|
+
}
|
|
900
|
+
function it(e) {
|
|
901
|
+
const t = fe(e.classes), s = Bs();
|
|
902
|
+
return s === null ? null : /* @__PURE__ */ c.jsx(be, {
|
|
903
|
+
sx: e.sx,
|
|
904
|
+
className: t.paper,
|
|
905
|
+
children: s.map(({
|
|
906
|
+
axisId: n,
|
|
907
|
+
mainAxis: o,
|
|
908
|
+
axisValue: i,
|
|
909
|
+
axisFormattedValue: a,
|
|
910
|
+
seriesItems: d
|
|
911
|
+
}) => /* @__PURE__ */ c.jsxs(Ce, {
|
|
912
|
+
className: t.table,
|
|
913
|
+
children: [i != null && !o.hideTooltip && /* @__PURE__ */ c.jsx(Te, {
|
|
914
|
+
component: "caption",
|
|
915
|
+
children: a
|
|
916
|
+
}), /* @__PURE__ */ c.jsx("tbody", {
|
|
917
|
+
children: d.map(({
|
|
918
|
+
seriesId: p,
|
|
919
|
+
color: y,
|
|
920
|
+
formattedValue: g,
|
|
921
|
+
formattedLabel: m,
|
|
922
|
+
markType: h
|
|
923
|
+
}) => g == null ? null : /* @__PURE__ */ c.jsxs(Ie, {
|
|
924
|
+
className: t.row,
|
|
925
|
+
children: [/* @__PURE__ */ c.jsxs(W, {
|
|
926
|
+
className: _(t.labelCell, t.cell),
|
|
927
|
+
component: "th",
|
|
928
|
+
children: [/* @__PURE__ */ c.jsx("div", {
|
|
929
|
+
className: t.markContainer,
|
|
930
|
+
children: /* @__PURE__ */ c.jsx(ee, {
|
|
931
|
+
type: h,
|
|
932
|
+
color: y,
|
|
933
|
+
className: t.mark
|
|
934
|
+
})
|
|
935
|
+
}), m || null]
|
|
936
|
+
}), /* @__PURE__ */ c.jsx(W, {
|
|
937
|
+
className: _(t.valueCell, t.cell),
|
|
938
|
+
component: "td",
|
|
939
|
+
children: g
|
|
940
|
+
})]
|
|
941
|
+
}, p))
|
|
942
|
+
})]
|
|
943
|
+
}, n))
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
process.env.NODE_ENV !== "production" && (it.propTypes = {
|
|
947
|
+
// ----------------------------- Warning --------------------------------
|
|
948
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
949
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
950
|
+
// ----------------------------------------------------------------------
|
|
951
|
+
/**
|
|
952
|
+
* Override or extend the styles applied to the component.
|
|
953
|
+
*/
|
|
954
|
+
classes: r.object,
|
|
955
|
+
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object])
|
|
956
|
+
});
|
|
957
|
+
function ae(e) {
|
|
958
|
+
const {
|
|
959
|
+
children: t,
|
|
960
|
+
defer: s = !1,
|
|
961
|
+
fallback: n = null
|
|
962
|
+
} = e, [o, i] = T.useState(!1);
|
|
963
|
+
return me(() => {
|
|
964
|
+
s || i(!0);
|
|
965
|
+
}, [s]), T.useEffect(() => {
|
|
966
|
+
s && i(!0);
|
|
967
|
+
}, [s]), o ? t : n;
|
|
968
|
+
}
|
|
969
|
+
process.env.NODE_ENV !== "production" && (ae.propTypes = {
|
|
970
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
971
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
972
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
973
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
974
|
+
/**
|
|
975
|
+
* You can wrap a node.
|
|
976
|
+
*/
|
|
977
|
+
children: r.node,
|
|
978
|
+
/**
|
|
979
|
+
* If `true`, the component will not only prevent server-side rendering.
|
|
980
|
+
* It will also defer the rendering of the children into a different screen frame.
|
|
981
|
+
* @default false
|
|
982
|
+
*/
|
|
983
|
+
defer: r.bool,
|
|
984
|
+
/**
|
|
985
|
+
* The fallback content to display.
|
|
986
|
+
* @default null
|
|
987
|
+
*/
|
|
988
|
+
fallback: r.node
|
|
989
|
+
});
|
|
990
|
+
process.env.NODE_ENV !== "production" && (ae.propTypes = St(ae.propTypes));
|
|
991
|
+
function Ys(e) {
|
|
992
|
+
let t, s;
|
|
993
|
+
const n = () => {
|
|
994
|
+
s = null, e(...t);
|
|
995
|
+
};
|
|
996
|
+
function o(...i) {
|
|
997
|
+
t = i, s || (s = requestAnimationFrame(n));
|
|
998
|
+
}
|
|
999
|
+
return o.clear = () => {
|
|
1000
|
+
s && (cancelAnimationFrame(s), s = null);
|
|
1001
|
+
}, o;
|
|
1002
|
+
}
|
|
1003
|
+
function Gs() {
|
|
1004
|
+
const e = E(), t = e.use(Ot), s = e.use(Rt);
|
|
1005
|
+
return t !== void 0 ? "polar" : s !== void 0 ? "cartesian" : "none";
|
|
1006
|
+
}
|
|
1007
|
+
const Js = ["trigger", "position", "anchor", "classes", "children"], Me = () => !1, Ks = () => null;
|
|
1008
|
+
function Qs(e, t, s) {
|
|
1009
|
+
return s ? Me : e === "item" ? rs : t === "polar" ? Hs : t === "cartesian" ? Jt : Me;
|
|
1010
|
+
}
|
|
1011
|
+
const Zs = $(_t, {
|
|
1012
|
+
name: "MuiChartsTooltip",
|
|
1013
|
+
slot: "Root"
|
|
1014
|
+
})(({
|
|
1015
|
+
theme: e
|
|
1016
|
+
}) => ({
|
|
1017
|
+
pointerEvents: "none",
|
|
1018
|
+
zIndex: e.zIndex.modal
|
|
1019
|
+
}));
|
|
1020
|
+
function at(e) {
|
|
1021
|
+
const t = Oe({
|
|
1022
|
+
props: e,
|
|
1023
|
+
name: "MuiChartsTooltipContainer"
|
|
1024
|
+
}), {
|
|
1025
|
+
trigger: s = "axis",
|
|
1026
|
+
position: n,
|
|
1027
|
+
anchor: o = "pointer",
|
|
1028
|
+
classes: i,
|
|
1029
|
+
children: a
|
|
1030
|
+
} = t, d = F(t, Js), p = E(), y = Bt(), g = T.useRef(null), m = fe(i), h = p.use(Yt), I = Vs(), k = T.useRef(null), u = Mt(() => ({
|
|
1031
|
+
x: 0,
|
|
1032
|
+
y: 0
|
|
1033
|
+
})), l = Gs(), f = p.use(Gt), x = p.use(Qs(s, l, f)), v = p.use(Re) === "keyboard" || h === null ? "node" : o, b = p.use(s === "item" && v === "node" ? os : Ks, n), w = b !== null;
|
|
1034
|
+
T.useEffect(() => {
|
|
1035
|
+
const S = y.current;
|
|
1036
|
+
if (S === null)
|
|
1037
|
+
return () => {
|
|
1038
|
+
};
|
|
1039
|
+
if (w)
|
|
1040
|
+
return;
|
|
1041
|
+
const M = Ys((V, dt) => {
|
|
1042
|
+
u.current = {
|
|
1043
|
+
x: V,
|
|
1044
|
+
y: dt
|
|
1045
|
+
}, k.current?.update();
|
|
1046
|
+
}), L = (V) => {
|
|
1047
|
+
M(V.clientX, V.clientY);
|
|
1048
|
+
};
|
|
1049
|
+
return S.addEventListener("pointermove", L), S.addEventListener("pointerenter", L), () => {
|
|
1050
|
+
S.removeEventListener("pointermove", L), S.removeEventListener("pointerenter", L), M.clear();
|
|
1051
|
+
};
|
|
1052
|
+
}, [y, u, w]);
|
|
1053
|
+
const N = T.useMemo(() => ({
|
|
1054
|
+
getBoundingClientRect: () => ({
|
|
1055
|
+
x: u.current.x,
|
|
1056
|
+
y: u.current.y,
|
|
1057
|
+
top: u.current.y,
|
|
1058
|
+
left: u.current.x,
|
|
1059
|
+
right: u.current.x,
|
|
1060
|
+
bottom: u.current.y,
|
|
1061
|
+
width: 0,
|
|
1062
|
+
height: 0,
|
|
1063
|
+
toJSON: () => ""
|
|
1064
|
+
})
|
|
1065
|
+
}), [u]), O = h === "mouse" || I, R = h === "touch" || !I, P = T.useMemo(() => [
|
|
1066
|
+
{
|
|
1067
|
+
name: "offset",
|
|
1068
|
+
options: {
|
|
1069
|
+
offset: () => R && !w ? [0, 64] : [0, 8]
|
|
1070
|
+
}
|
|
1071
|
+
},
|
|
1072
|
+
...O ? [] : [{
|
|
1073
|
+
name: "flip",
|
|
1074
|
+
options: {
|
|
1075
|
+
fallbackPlacements: ["top-end", "top-start", "bottom-end", "bottom"]
|
|
1076
|
+
}
|
|
1077
|
+
}],
|
|
1078
|
+
// Keep default behavior
|
|
1079
|
+
{
|
|
1080
|
+
name: "preventOverflow",
|
|
1081
|
+
options: {
|
|
1082
|
+
altAxis: !0
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
], [O, w, R]);
|
|
1086
|
+
return s === "none" ? null : /* @__PURE__ */ c.jsxs(T.Fragment, {
|
|
1087
|
+
children: [y.current && /* @__PURE__ */ Zt.createPortal(/* @__PURE__ */ c.jsx("rect", j({
|
|
1088
|
+
ref: g
|
|
1089
|
+
}, b, {
|
|
1090
|
+
display: "hidden",
|
|
1091
|
+
pointerEvents: "none",
|
|
1092
|
+
opacity: 0,
|
|
1093
|
+
width: 1,
|
|
1094
|
+
height: 1
|
|
1095
|
+
})), y.current), /* @__PURE__ */ c.jsx(ae, {
|
|
1096
|
+
children: x && /* @__PURE__ */ c.jsx(Zs, j({}, d, {
|
|
1097
|
+
className: m?.root,
|
|
1098
|
+
open: x,
|
|
1099
|
+
placement: d.placement ?? n ?? (!w && O ? "right-start" : "top"),
|
|
1100
|
+
popperRef: k,
|
|
1101
|
+
anchorEl: b ? g.current : N,
|
|
1102
|
+
modifiers: P,
|
|
1103
|
+
children: a
|
|
1104
|
+
}))
|
|
1105
|
+
})]
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
process.env.NODE_ENV !== "production" && (at.propTypes = {
|
|
1109
|
+
// ----------------------------- Warning --------------------------------
|
|
1110
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1111
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
1112
|
+
// ----------------------------------------------------------------------
|
|
1113
|
+
/**
|
|
1114
|
+
* Determine if the tooltip should be placed on the pointer location or on the node.
|
|
1115
|
+
* @default 'pointer'
|
|
1116
|
+
*/
|
|
1117
|
+
anchor: r.oneOf(["node", "pointer"]),
|
|
1118
|
+
/**
|
|
1119
|
+
* An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
|
|
1120
|
+
* or a function that returns either.
|
|
1121
|
+
* It's used to set the position of the popper.
|
|
1122
|
+
* The return value will passed as the reference object of the Popper instance.
|
|
1123
|
+
*/
|
|
1124
|
+
anchorEl: r.oneOfType([Ve, r.object, r.func]),
|
|
1125
|
+
/**
|
|
1126
|
+
* Popper render function or node.
|
|
1127
|
+
*/
|
|
1128
|
+
children: r.node,
|
|
1129
|
+
/**
|
|
1130
|
+
* Override or extend the styles applied to the component.
|
|
1131
|
+
*/
|
|
1132
|
+
classes: r.object,
|
|
1133
|
+
/**
|
|
1134
|
+
* The component used for the root node.
|
|
1135
|
+
* Either a string to use a HTML element or a component.
|
|
1136
|
+
*/
|
|
1137
|
+
component: r.elementType,
|
|
1138
|
+
/**
|
|
1139
|
+
* The components used for each slot inside the Popper.
|
|
1140
|
+
* Either a string to use a HTML element or a component.
|
|
1141
|
+
*
|
|
1142
|
+
* @deprecated use the `slots` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
1143
|
+
* @default {}
|
|
1144
|
+
*/
|
|
1145
|
+
components: r.shape({
|
|
1146
|
+
Root: r.elementType
|
|
1147
|
+
}),
|
|
1148
|
+
/**
|
|
1149
|
+
* The props used for each slot inside the Popper.
|
|
1150
|
+
*
|
|
1151
|
+
* @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
1152
|
+
* @default {}
|
|
1153
|
+
*/
|
|
1154
|
+
componentsProps: r.shape({
|
|
1155
|
+
root: r.oneOfType([r.func, r.object])
|
|
1156
|
+
}),
|
|
1157
|
+
/**
|
|
1158
|
+
* An HTML element or function that returns one.
|
|
1159
|
+
* The `container` will have the portal children appended to it.
|
|
1160
|
+
*
|
|
1161
|
+
* You can also provide a callback, which is called in a React layout effect.
|
|
1162
|
+
* This lets you set the container from a ref, and also makes server-side rendering possible.
|
|
1163
|
+
*
|
|
1164
|
+
* By default, it uses the body of the top-level document object,
|
|
1165
|
+
* so it's simply `document.body` most of the time.
|
|
1166
|
+
*/
|
|
1167
|
+
container: r.oneOfType([(e, t) => e[t] == null ? new Error(`Prop '${t}' is required but wasn't specified`) : typeof e[t] != "object" || e[t].nodeType !== 1 ? new Error(`Expected prop '${t}' to be of type Element`) : null, r.func]),
|
|
1168
|
+
/**
|
|
1169
|
+
* The `children` will be under the DOM hierarchy of the parent component.
|
|
1170
|
+
* @default false
|
|
1171
|
+
*/
|
|
1172
|
+
disablePortal: r.bool,
|
|
1173
|
+
/**
|
|
1174
|
+
* Always keep the children in the DOM.
|
|
1175
|
+
* This prop can be useful in SEO situation or
|
|
1176
|
+
* when you want to maximize the responsiveness of the Popper.
|
|
1177
|
+
* @default false
|
|
1178
|
+
*/
|
|
1179
|
+
keepMounted: r.bool,
|
|
1180
|
+
/**
|
|
1181
|
+
* Popper.js is based on a "plugin-like" architecture,
|
|
1182
|
+
* most of its features are fully encapsulated "modifiers".
|
|
1183
|
+
*
|
|
1184
|
+
* A modifier is a function that is called each time Popper.js needs to
|
|
1185
|
+
* compute the position of the popper.
|
|
1186
|
+
* For this reason, modifiers should be very performant to avoid bottlenecks.
|
|
1187
|
+
* To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
|
|
1188
|
+
*/
|
|
1189
|
+
modifiers: r.arrayOf(r.shape({
|
|
1190
|
+
data: r.object,
|
|
1191
|
+
effect: r.func,
|
|
1192
|
+
enabled: r.bool,
|
|
1193
|
+
fn: r.func,
|
|
1194
|
+
name: r.any,
|
|
1195
|
+
options: r.object,
|
|
1196
|
+
phase: r.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]),
|
|
1197
|
+
requires: r.arrayOf(r.string),
|
|
1198
|
+
requiresIfExists: r.arrayOf(r.string)
|
|
1199
|
+
})),
|
|
1200
|
+
/**
|
|
1201
|
+
* If `true`, the component is shown.
|
|
1202
|
+
*/
|
|
1203
|
+
open: r.bool,
|
|
1204
|
+
/**
|
|
1205
|
+
* Popper placement.
|
|
1206
|
+
* @default 'bottom'
|
|
1207
|
+
*/
|
|
1208
|
+
placement: r.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
1209
|
+
/**
|
|
1210
|
+
* Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
|
|
1211
|
+
* @default {}
|
|
1212
|
+
*/
|
|
1213
|
+
popperOptions: r.shape({
|
|
1214
|
+
modifiers: r.array,
|
|
1215
|
+
onFirstUpdate: r.func,
|
|
1216
|
+
placement: r.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
1217
|
+
strategy: r.oneOf(["absolute", "fixed"])
|
|
1218
|
+
}),
|
|
1219
|
+
/**
|
|
1220
|
+
* A ref that points to the used popper instance.
|
|
1221
|
+
*/
|
|
1222
|
+
popperRef: r.oneOfType([r.func, r.shape({
|
|
1223
|
+
current: r.shape({
|
|
1224
|
+
destroy: r.func.isRequired,
|
|
1225
|
+
forceUpdate: r.func.isRequired,
|
|
1226
|
+
setOptions: r.func.isRequired,
|
|
1227
|
+
state: r.shape({
|
|
1228
|
+
attributes: r.object.isRequired,
|
|
1229
|
+
elements: r.object.isRequired,
|
|
1230
|
+
modifiersData: r.object.isRequired,
|
|
1231
|
+
options: r.object.isRequired,
|
|
1232
|
+
orderedModifiers: r.arrayOf(r.object).isRequired,
|
|
1233
|
+
placement: r.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]).isRequired,
|
|
1234
|
+
rects: r.object.isRequired,
|
|
1235
|
+
reset: r.bool.isRequired,
|
|
1236
|
+
scrollParents: r.object.isRequired,
|
|
1237
|
+
strategy: r.oneOf(["absolute", "fixed"]).isRequired,
|
|
1238
|
+
styles: r.object.isRequired
|
|
1239
|
+
}).isRequired,
|
|
1240
|
+
update: r.func.isRequired
|
|
1241
|
+
})
|
|
1242
|
+
})]),
|
|
1243
|
+
/**
|
|
1244
|
+
* Determines the tooltip position relatively to the anchor.
|
|
1245
|
+
*/
|
|
1246
|
+
position: r.oneOf(["bottom", "left", "right", "top"]),
|
|
1247
|
+
/**
|
|
1248
|
+
* The props used for each slot inside the Popper.
|
|
1249
|
+
* @default {}
|
|
1250
|
+
*/
|
|
1251
|
+
slotProps: r.object,
|
|
1252
|
+
/**
|
|
1253
|
+
* The components used for each slot inside the Popper.
|
|
1254
|
+
* Either a string to use a HTML element or a component.
|
|
1255
|
+
* @default {}
|
|
1256
|
+
*/
|
|
1257
|
+
slots: r.object,
|
|
1258
|
+
/**
|
|
1259
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1260
|
+
*/
|
|
1261
|
+
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
|
|
1262
|
+
/**
|
|
1263
|
+
* Help supporting a react-transition-group/Transition component.
|
|
1264
|
+
* @default false
|
|
1265
|
+
*/
|
|
1266
|
+
transition: r.bool,
|
|
1267
|
+
/**
|
|
1268
|
+
* Select the kind of tooltip to display
|
|
1269
|
+
* - 'item': Shows data about the item below the mouse;
|
|
1270
|
+
* - 'axis': Shows values associated with the hovered x value;
|
|
1271
|
+
* - 'none': Does not display tooltip.
|
|
1272
|
+
* @default 'axis'
|
|
1273
|
+
*/
|
|
1274
|
+
trigger: r.oneOf(["axis", "item", "none"])
|
|
1275
|
+
});
|
|
1276
|
+
function Xs(e) {
|
|
1277
|
+
const {
|
|
1278
|
+
classes: t,
|
|
1279
|
+
trigger: s = "axis"
|
|
1280
|
+
} = e, n = fe(t);
|
|
1281
|
+
return /* @__PURE__ */ c.jsx(at, j({}, e, {
|
|
1282
|
+
classes: t,
|
|
1283
|
+
children: s === "axis" ? /* @__PURE__ */ c.jsx(it, {
|
|
1284
|
+
classes: n
|
|
1285
|
+
}) : /* @__PURE__ */ c.jsx(Xe, {
|
|
1286
|
+
classes: n
|
|
1287
|
+
})
|
|
1288
|
+
}));
|
|
1289
|
+
}
|
|
1290
|
+
process.env.NODE_ENV !== "production" && (Xs.propTypes = {
|
|
1291
|
+
// ----------------------------- Warning --------------------------------
|
|
1292
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1293
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
1294
|
+
// ----------------------------------------------------------------------
|
|
1295
|
+
/**
|
|
1296
|
+
* Determine if the tooltip should be placed on the pointer location or on the node.
|
|
1297
|
+
* @default 'pointer'
|
|
1298
|
+
*/
|
|
1299
|
+
anchor: r.oneOf(["node", "pointer"]),
|
|
1300
|
+
/**
|
|
1301
|
+
* An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
|
|
1302
|
+
* or a function that returns either.
|
|
1303
|
+
* It's used to set the position of the popper.
|
|
1304
|
+
* The return value will passed as the reference object of the Popper instance.
|
|
1305
|
+
*/
|
|
1306
|
+
anchorEl: r.oneOfType([Ve, r.object, r.func]),
|
|
1307
|
+
/**
|
|
1308
|
+
* Override or extend the styles applied to the component.
|
|
1309
|
+
*/
|
|
1310
|
+
classes: r.object,
|
|
1311
|
+
/**
|
|
1312
|
+
* The component used for the root node.
|
|
1313
|
+
* Either a string to use a HTML element or a component.
|
|
1314
|
+
*/
|
|
1315
|
+
component: r.elementType,
|
|
1316
|
+
/**
|
|
1317
|
+
* The components used for each slot inside the Popper.
|
|
1318
|
+
* Either a string to use a HTML element or a component.
|
|
1319
|
+
*
|
|
1320
|
+
* @deprecated use the `slots` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
1321
|
+
* @default {}
|
|
1322
|
+
*/
|
|
1323
|
+
components: r.shape({
|
|
1324
|
+
Root: r.elementType
|
|
1325
|
+
}),
|
|
1326
|
+
/**
|
|
1327
|
+
* The props used for each slot inside the Popper.
|
|
1328
|
+
*
|
|
1329
|
+
* @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
1330
|
+
* @default {}
|
|
1331
|
+
*/
|
|
1332
|
+
componentsProps: r.shape({
|
|
1333
|
+
root: r.oneOfType([r.func, r.object])
|
|
1334
|
+
}),
|
|
1335
|
+
/**
|
|
1336
|
+
* An HTML element or function that returns one.
|
|
1337
|
+
* The `container` will have the portal children appended to it.
|
|
1338
|
+
*
|
|
1339
|
+
* You can also provide a callback, which is called in a React layout effect.
|
|
1340
|
+
* This lets you set the container from a ref, and also makes server-side rendering possible.
|
|
1341
|
+
*
|
|
1342
|
+
* By default, it uses the body of the top-level document object,
|
|
1343
|
+
* so it's simply `document.body` most of the time.
|
|
1344
|
+
*/
|
|
1345
|
+
container: r.oneOfType([(e, t) => e[t] == null ? new Error(`Prop '${t}' is required but wasn't specified`) : typeof e[t] != "object" || e[t].nodeType !== 1 ? new Error(`Expected prop '${t}' to be of type Element`) : null, r.func]),
|
|
1346
|
+
/**
|
|
1347
|
+
* The `children` will be under the DOM hierarchy of the parent component.
|
|
1348
|
+
* @default false
|
|
1349
|
+
*/
|
|
1350
|
+
disablePortal: r.bool,
|
|
1351
|
+
/**
|
|
1352
|
+
* Always keep the children in the DOM.
|
|
1353
|
+
* This prop can be useful in SEO situation or
|
|
1354
|
+
* when you want to maximize the responsiveness of the Popper.
|
|
1355
|
+
* @default false
|
|
1356
|
+
*/
|
|
1357
|
+
keepMounted: r.bool,
|
|
1358
|
+
/**
|
|
1359
|
+
* Popper.js is based on a "plugin-like" architecture,
|
|
1360
|
+
* most of its features are fully encapsulated "modifiers".
|
|
1361
|
+
*
|
|
1362
|
+
* A modifier is a function that is called each time Popper.js needs to
|
|
1363
|
+
* compute the position of the popper.
|
|
1364
|
+
* For this reason, modifiers should be very performant to avoid bottlenecks.
|
|
1365
|
+
* To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
|
|
1366
|
+
*/
|
|
1367
|
+
modifiers: r.arrayOf(r.shape({
|
|
1368
|
+
data: r.object,
|
|
1369
|
+
effect: r.func,
|
|
1370
|
+
enabled: r.bool,
|
|
1371
|
+
fn: r.func,
|
|
1372
|
+
name: r.any,
|
|
1373
|
+
options: r.object,
|
|
1374
|
+
phase: r.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]),
|
|
1375
|
+
requires: r.arrayOf(r.string),
|
|
1376
|
+
requiresIfExists: r.arrayOf(r.string)
|
|
1377
|
+
})),
|
|
1378
|
+
/**
|
|
1379
|
+
* If `true`, the component is shown.
|
|
1380
|
+
*/
|
|
1381
|
+
open: r.bool,
|
|
1382
|
+
/**
|
|
1383
|
+
* Popper placement.
|
|
1384
|
+
* @default 'bottom'
|
|
1385
|
+
*/
|
|
1386
|
+
placement: r.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
1387
|
+
/**
|
|
1388
|
+
* Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
|
|
1389
|
+
* @default {}
|
|
1390
|
+
*/
|
|
1391
|
+
popperOptions: r.shape({
|
|
1392
|
+
modifiers: r.array,
|
|
1393
|
+
onFirstUpdate: r.func,
|
|
1394
|
+
placement: r.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
1395
|
+
strategy: r.oneOf(["absolute", "fixed"])
|
|
1396
|
+
}),
|
|
1397
|
+
/**
|
|
1398
|
+
* A ref that points to the used popper instance.
|
|
1399
|
+
*/
|
|
1400
|
+
popperRef: r.oneOfType([r.func, r.shape({
|
|
1401
|
+
current: r.shape({
|
|
1402
|
+
destroy: r.func.isRequired,
|
|
1403
|
+
forceUpdate: r.func.isRequired,
|
|
1404
|
+
setOptions: r.func.isRequired,
|
|
1405
|
+
state: r.shape({
|
|
1406
|
+
attributes: r.object.isRequired,
|
|
1407
|
+
elements: r.object.isRequired,
|
|
1408
|
+
modifiersData: r.object.isRequired,
|
|
1409
|
+
options: r.object.isRequired,
|
|
1410
|
+
orderedModifiers: r.arrayOf(r.object).isRequired,
|
|
1411
|
+
placement: r.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]).isRequired,
|
|
1412
|
+
rects: r.object.isRequired,
|
|
1413
|
+
reset: r.bool.isRequired,
|
|
1414
|
+
scrollParents: r.object.isRequired,
|
|
1415
|
+
strategy: r.oneOf(["absolute", "fixed"]).isRequired,
|
|
1416
|
+
styles: r.object.isRequired
|
|
1417
|
+
}).isRequired,
|
|
1418
|
+
update: r.func.isRequired
|
|
1419
|
+
})
|
|
1420
|
+
})]),
|
|
1421
|
+
/**
|
|
1422
|
+
* Determines the tooltip position relatively to the anchor.
|
|
1423
|
+
*/
|
|
1424
|
+
position: r.oneOf(["bottom", "left", "right", "top"]),
|
|
1425
|
+
/**
|
|
1426
|
+
* The props used for each slot inside the Popper.
|
|
1427
|
+
* @default {}
|
|
1428
|
+
*/
|
|
1429
|
+
slotProps: r.object,
|
|
1430
|
+
/**
|
|
1431
|
+
* The components used for each slot inside the Popper.
|
|
1432
|
+
* Either a string to use a HTML element or a component.
|
|
1433
|
+
* @default {}
|
|
1434
|
+
*/
|
|
1435
|
+
slots: r.object,
|
|
1436
|
+
/**
|
|
1437
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1438
|
+
*/
|
|
1439
|
+
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
|
|
1440
|
+
/**
|
|
1441
|
+
* Help supporting a react-transition-group/Transition component.
|
|
1442
|
+
* @default false
|
|
1443
|
+
*/
|
|
1444
|
+
transition: r.bool,
|
|
1445
|
+
/**
|
|
1446
|
+
* Select the kind of tooltip to display
|
|
1447
|
+
* - 'item': Shows data about the item below the mouse;
|
|
1448
|
+
* - 'axis': Shows values associated with the hovered x value;
|
|
1449
|
+
* - 'none': Does not display tooltip.
|
|
1450
|
+
* @default 'axis'
|
|
1451
|
+
*/
|
|
1452
|
+
trigger: r.oneOf(["axis", "item", "none"])
|
|
1453
|
+
});
|
|
1454
|
+
const er = (e) => ({
|
|
1455
|
+
type: "series",
|
|
1456
|
+
color: e.color,
|
|
1457
|
+
label: e.label,
|
|
1458
|
+
seriesId: e.seriesId,
|
|
1459
|
+
itemId: e.itemId,
|
|
1460
|
+
dataIndex: e.dataIndex
|
|
1461
|
+
});
|
|
1462
|
+
function tr(e) {
|
|
1463
|
+
return ce("MuiChartsLegend", e);
|
|
1464
|
+
}
|
|
1465
|
+
const sr = (e) => {
|
|
1466
|
+
const {
|
|
1467
|
+
classes: t,
|
|
1468
|
+
direction: s
|
|
1469
|
+
} = e;
|
|
1470
|
+
return le({
|
|
1471
|
+
root: ["root", s],
|
|
1472
|
+
item: ["item"],
|
|
1473
|
+
mark: ["mark"],
|
|
1474
|
+
label: ["label"],
|
|
1475
|
+
series: ["series"],
|
|
1476
|
+
hidden: ["hidden"]
|
|
1477
|
+
}, tr, t);
|
|
1478
|
+
}, ge = se("MuiChartsLegend", ["root", "item", "series", "mark", "label", "vertical", "horizontal", "hidden"]), rr = ["slots", "slotProps"], nr = ["ownerState"], lt = (e, t, s, n) => {
|
|
1479
|
+
function o(i, a) {
|
|
1480
|
+
const d = Oe({
|
|
1481
|
+
props: i,
|
|
1482
|
+
// eslint-disable-next-line material-ui/mui-name-matches-component-name
|
|
1483
|
+
name: e
|
|
1484
|
+
}), p = typeof s.defaultProps == "function" ? s.defaultProps(d) : s.defaultProps ?? {}, y = De(p, d), g = y, {
|
|
1485
|
+
slots: m,
|
|
1486
|
+
slotProps: h
|
|
1487
|
+
} = g, I = F(g, rr), k = ze(), u = s.classesResolver?.(y, k), l = m?.[t] ?? n, f = s.propagateSlots && !m?.[t], x = $t({
|
|
1488
|
+
elementType: l,
|
|
1489
|
+
externalSlotProps: h?.[t],
|
|
1490
|
+
additionalProps: j({}, I, {
|
|
1491
|
+
classes: u
|
|
1492
|
+
}, f && {
|
|
1493
|
+
slots: m,
|
|
1494
|
+
slotProps: h
|
|
1495
|
+
}),
|
|
1496
|
+
ownerState: {}
|
|
1497
|
+
}), C = F(x, nr), v = j({}, C);
|
|
1498
|
+
for (const b of s.omitProps ?? [])
|
|
1499
|
+
delete v[b];
|
|
1500
|
+
return process.env.NODE_ENV !== "production" && (l.displayName = `${e}.slots.${t}`), /* @__PURE__ */ c.jsx(l, j({}, v, {
|
|
1501
|
+
ref: a
|
|
1502
|
+
}));
|
|
1503
|
+
}
|
|
1504
|
+
return /* @__PURE__ */ T.forwardRef(o);
|
|
1505
|
+
};
|
|
1506
|
+
process.env.NODE_ENV !== "production" && (lt.displayName = "consumeSlots");
|
|
1507
|
+
function or(e) {
|
|
1508
|
+
return ce("MuiChartsLabel", e);
|
|
1509
|
+
}
|
|
1510
|
+
se("MuiChartsLabel", ["root"]);
|
|
1511
|
+
const ir = (e) => le({
|
|
1512
|
+
root: ["root"]
|
|
1513
|
+
}, or, e.classes), ar = ["children", "className", "classes"], ct = we("MuiChartsLabel", {
|
|
1514
|
+
classesResolver: ir
|
|
1515
|
+
}, function(t, s) {
|
|
1516
|
+
const {
|
|
1517
|
+
children: n,
|
|
1518
|
+
className: o,
|
|
1519
|
+
classes: i
|
|
1520
|
+
} = t, a = F(t, ar);
|
|
1521
|
+
return /* @__PURE__ */ c.jsx("span", j({
|
|
1522
|
+
className: _(i?.root, o),
|
|
1523
|
+
ref: s
|
|
1524
|
+
}, a, {
|
|
1525
|
+
children: n
|
|
1526
|
+
}));
|
|
1527
|
+
});
|
|
1528
|
+
process.env.NODE_ENV !== "production" && (ct.propTypes = {
|
|
1529
|
+
// ----------------------------- Warning --------------------------------
|
|
1530
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1531
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
1532
|
+
// ----------------------------------------------------------------------
|
|
1533
|
+
children: r.node,
|
|
1534
|
+
/**
|
|
1535
|
+
* Override or extend the styles applied to the component.
|
|
1536
|
+
*/
|
|
1537
|
+
classes: r.object
|
|
1538
|
+
});
|
|
1539
|
+
const lr = ["direction", "onItemClick", "className", "classes", "toggleVisibilityOnClick"], cr = $("ul", {
|
|
1540
|
+
name: "MuiChartsLegend",
|
|
1541
|
+
slot: "Root"
|
|
1542
|
+
})(({
|
|
1543
|
+
ownerState: e,
|
|
1544
|
+
theme: t
|
|
1545
|
+
}) => j({}, t.typography.caption, {
|
|
1546
|
+
color: (t.vars || t).palette.text.primary,
|
|
1547
|
+
lineHeight: "100%",
|
|
1548
|
+
display: "flex",
|
|
1549
|
+
flexDirection: e.direction === "vertical" ? "column" : "row",
|
|
1550
|
+
alignItems: e.direction === "vertical" ? void 0 : "center",
|
|
1551
|
+
flexShrink: 0,
|
|
1552
|
+
gap: t.spacing(2),
|
|
1553
|
+
listStyleType: "none",
|
|
1554
|
+
paddingInlineStart: 0,
|
|
1555
|
+
marginBlock: t.spacing(1),
|
|
1556
|
+
marginInline: t.spacing(1),
|
|
1557
|
+
flexWrap: "wrap",
|
|
1558
|
+
li: {
|
|
1559
|
+
display: e.direction === "horizontal" ? "inline-flex" : void 0
|
|
1560
|
+
},
|
|
1561
|
+
[`button.${ge.series}`]: {
|
|
1562
|
+
// Reset button styles
|
|
1563
|
+
background: "none",
|
|
1564
|
+
border: "none",
|
|
1565
|
+
padding: 0,
|
|
1566
|
+
fontFamily: "inherit",
|
|
1567
|
+
fontWeight: "inherit",
|
|
1568
|
+
fontSize: "inherit",
|
|
1569
|
+
letterSpacing: "inherit",
|
|
1570
|
+
color: "inherit"
|
|
1571
|
+
},
|
|
1572
|
+
[`& .${ge.series}`]: {
|
|
1573
|
+
display: e.direction === "vertical" ? "flex" : "inline-flex",
|
|
1574
|
+
alignItems: "center",
|
|
1575
|
+
gap: t.spacing(1),
|
|
1576
|
+
cursor: e.onItemClick || e.toggleVisibilityOnClick ? "pointer" : "default",
|
|
1577
|
+
[`&.${ge.hidden}`]: {
|
|
1578
|
+
opacity: 0.5
|
|
1579
|
+
}
|
|
1580
|
+
},
|
|
1581
|
+
gridArea: "legend"
|
|
1582
|
+
})), ut = lt("MuiChartsLegend", "legend", {
|
|
1583
|
+
defaultProps: {
|
|
1584
|
+
direction: "horizontal"
|
|
1585
|
+
},
|
|
1586
|
+
// @ts-expect-error position is used only in the slots, but it is passed to the SVG wrapper.
|
|
1587
|
+
// We omit it here to avoid passing to slots.
|
|
1588
|
+
omitProps: ["position"],
|
|
1589
|
+
classesResolver: sr
|
|
1590
|
+
}, /* @__PURE__ */ T.forwardRef(function(t, s) {
|
|
1591
|
+
const n = xs(), {
|
|
1592
|
+
instance: o
|
|
1593
|
+
} = ve(), i = E(), a = i.use(te), d = i.use(At), {
|
|
1594
|
+
onItemClick: p,
|
|
1595
|
+
className: y,
|
|
1596
|
+
classes: g,
|
|
1597
|
+
toggleVisibilityOnClick: m
|
|
1598
|
+
} = t, h = F(t, lr), I = !!(p || m), k = I ? "button" : "div", u = xe((l, f) => (x) => {
|
|
1599
|
+
p && l && p(x, er(l), f), m && o.toggleItemVisibility({
|
|
1600
|
+
// TODO: Remove in v9
|
|
1601
|
+
// @ts-expect-error item always has type defined.
|
|
1602
|
+
type: l.type,
|
|
1603
|
+
seriesId: l.seriesId,
|
|
1604
|
+
dataIndex: l.dataIndex
|
|
1605
|
+
});
|
|
1606
|
+
});
|
|
1607
|
+
return n.items.length === 0 ? null : /* @__PURE__ */ c.jsx(cr, j({
|
|
1608
|
+
className: _(g?.root, y),
|
|
1609
|
+
ref: s
|
|
1610
|
+
}, h, {
|
|
1611
|
+
ownerState: t,
|
|
1612
|
+
children: n.items.map((l, f) => {
|
|
1613
|
+
const x = d(a, {
|
|
1614
|
+
// TODO: Remove in v9
|
|
1615
|
+
// @ts-expect-error item always has type defined.
|
|
1616
|
+
type: l.type,
|
|
1617
|
+
seriesId: l.seriesId,
|
|
1618
|
+
dataIndex: l.dataIndex
|
|
1619
|
+
});
|
|
1620
|
+
return /* @__PURE__ */ c.jsx("li", {
|
|
1621
|
+
className: g?.item,
|
|
1622
|
+
"data-series": l.seriesId,
|
|
1623
|
+
"data-index": l.dataIndex,
|
|
1624
|
+
children: /* @__PURE__ */ c.jsxs(k, {
|
|
1625
|
+
className: _(g?.series, !x && g?.hidden),
|
|
1626
|
+
role: I ? "button" : void 0,
|
|
1627
|
+
type: I ? "button" : void 0,
|
|
1628
|
+
onClick: I ? u(l, f) : void 0,
|
|
1629
|
+
children: [/* @__PURE__ */ c.jsx(ee, {
|
|
1630
|
+
className: g?.mark,
|
|
1631
|
+
color: l.color,
|
|
1632
|
+
type: l.markType
|
|
1633
|
+
}), /* @__PURE__ */ c.jsx(ct, {
|
|
1634
|
+
className: g?.label,
|
|
1635
|
+
children: l.label
|
|
1636
|
+
})]
|
|
1637
|
+
})
|
|
1638
|
+
}, `${l.seriesId}-${l.dataIndex}`);
|
|
1639
|
+
})
|
|
1640
|
+
}));
|
|
1641
|
+
}));
|
|
1642
|
+
process.env.NODE_ENV !== "production" && (ut.displayName = "ChartsLegend");
|
|
1643
|
+
process.env.NODE_ENV !== "production" && (ut.propTypes = {
|
|
1644
|
+
// ----------------------------- Warning --------------------------------
|
|
1645
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1646
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
1647
|
+
// ----------------------------------------------------------------------
|
|
1648
|
+
/**
|
|
1649
|
+
* Override or extend the styles applied to the component.
|
|
1650
|
+
*/
|
|
1651
|
+
classes: r.object,
|
|
1652
|
+
className: r.string,
|
|
1653
|
+
/**
|
|
1654
|
+
* The direction of the legend layout.
|
|
1655
|
+
* The default depends on the chart.
|
|
1656
|
+
*/
|
|
1657
|
+
direction: r.oneOf(["horizontal", "vertical"]),
|
|
1658
|
+
/**
|
|
1659
|
+
* Callback fired when a legend item is clicked.
|
|
1660
|
+
* @param {React.MouseEvent<HTMLButtonElement, MouseEvent>} event The click event.
|
|
1661
|
+
* @param {SeriesLegendItemContext} legendItem The legend item data.
|
|
1662
|
+
* @param {number} index The index of the clicked legend item.
|
|
1663
|
+
*/
|
|
1664
|
+
onItemClick: r.func,
|
|
1665
|
+
/**
|
|
1666
|
+
* The props used for each component slot.
|
|
1667
|
+
* @default {}
|
|
1668
|
+
*/
|
|
1669
|
+
slotProps: r.object,
|
|
1670
|
+
/**
|
|
1671
|
+
* Overridable component slots.
|
|
1672
|
+
* @default {}
|
|
1673
|
+
*/
|
|
1674
|
+
slots: r.object,
|
|
1675
|
+
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
|
|
1676
|
+
/**
|
|
1677
|
+
* If `true`, clicking on a legend item will toggle the visibility of the corresponding series.
|
|
1678
|
+
* @default false
|
|
1679
|
+
*/
|
|
1680
|
+
toggleVisibilityOnClick: r.bool
|
|
1681
|
+
});
|
|
1682
|
+
const ur = ["message"], dr = $("text", {
|
|
1683
|
+
slot: "internal",
|
|
1684
|
+
shouldForwardProp: void 0
|
|
1685
|
+
})(({
|
|
1686
|
+
theme: e
|
|
1687
|
+
}) => j({}, e.typography.body2, {
|
|
1688
|
+
stroke: "none",
|
|
1689
|
+
fill: (e.vars || e).palette.text.primary,
|
|
1690
|
+
shapeRendering: "crispEdges",
|
|
1691
|
+
textAnchor: "middle",
|
|
1692
|
+
dominantBaseline: "middle"
|
|
1693
|
+
}));
|
|
1694
|
+
function fr(e) {
|
|
1695
|
+
const {
|
|
1696
|
+
message: t
|
|
1697
|
+
} = e, s = F(e, ur), {
|
|
1698
|
+
top: n,
|
|
1699
|
+
left: o,
|
|
1700
|
+
height: i,
|
|
1701
|
+
width: a
|
|
1702
|
+
} = Fe(), {
|
|
1703
|
+
localeText: d
|
|
1704
|
+
} = Ze();
|
|
1705
|
+
return /* @__PURE__ */ c.jsx(dr, j({
|
|
1706
|
+
x: o + a / 2,
|
|
1707
|
+
y: n + i / 2
|
|
1708
|
+
}, s, {
|
|
1709
|
+
children: t ?? d.loading
|
|
1710
|
+
}));
|
|
1711
|
+
}
|
|
1712
|
+
const pr = ["message"], hr = $("text", {
|
|
1713
|
+
slot: "internal",
|
|
1714
|
+
shouldForwardProp: void 0
|
|
1715
|
+
})(({
|
|
1716
|
+
theme: e
|
|
1717
|
+
}) => j({}, e.typography.body2, {
|
|
1718
|
+
stroke: "none",
|
|
1719
|
+
fill: (e.vars || e).palette.text.primary,
|
|
1720
|
+
shapeRendering: "crispEdges",
|
|
1721
|
+
textAnchor: "middle",
|
|
1722
|
+
dominantBaseline: "middle"
|
|
1723
|
+
}));
|
|
1724
|
+
function gr(e) {
|
|
1725
|
+
const {
|
|
1726
|
+
message: t
|
|
1727
|
+
} = e, s = F(e, pr), {
|
|
1728
|
+
top: n,
|
|
1729
|
+
left: o,
|
|
1730
|
+
height: i,
|
|
1731
|
+
width: a
|
|
1732
|
+
} = Fe(), {
|
|
1733
|
+
localeText: d
|
|
1734
|
+
} = Ze();
|
|
1735
|
+
return /* @__PURE__ */ c.jsx(hr, j({
|
|
1736
|
+
x: o + a / 2,
|
|
1737
|
+
y: n + i / 2
|
|
1738
|
+
}, s, {
|
|
1739
|
+
children: t ?? d.noData
|
|
1740
|
+
}));
|
|
1741
|
+
}
|
|
1742
|
+
function mr() {
|
|
1743
|
+
const e = ue();
|
|
1744
|
+
return Object.values(e).every((t) => {
|
|
1745
|
+
if (!t)
|
|
1746
|
+
return !0;
|
|
1747
|
+
const {
|
|
1748
|
+
series: s,
|
|
1749
|
+
seriesOrder: n
|
|
1750
|
+
} = t;
|
|
1751
|
+
return n.every((o) => {
|
|
1752
|
+
const i = s[o];
|
|
1753
|
+
return i.type === "sankey" ? i.data.links.length === 0 : i.data.length === 0;
|
|
1754
|
+
});
|
|
1755
|
+
});
|
|
1756
|
+
}
|
|
1757
|
+
function Ur(e) {
|
|
1758
|
+
const t = mr();
|
|
1759
|
+
if (e.loading) {
|
|
1760
|
+
const s = e.slots?.loadingOverlay ?? fr;
|
|
1761
|
+
return /* @__PURE__ */ c.jsx(s, j({}, e.slotProps?.loadingOverlay));
|
|
1762
|
+
}
|
|
1763
|
+
if (t) {
|
|
1764
|
+
const s = e.slots?.noDataOverlay ?? gr;
|
|
1765
|
+
return /* @__PURE__ */ c.jsx(s, j({}, e.slotProps?.noDataOverlay));
|
|
1766
|
+
}
|
|
1767
|
+
return null;
|
|
1768
|
+
}
|
|
1769
|
+
const _e = se("MuiChartsToolbar", ["root"]), xr = (e) => e?.horizontal === "start" ? "start" : e?.horizontal === "end" ? "end" : "center", yr = (e) => e?.vertical === "top" ? "flex-start" : e?.vertical === "bottom" ? "flex-end" : "center", br = (e, t, s) => e ? '"chart"' : t === "vertical" ? s?.horizontal === "start" ? '"legend chart"' : '"chart legend"' : s?.vertical === "bottom" ? `"chart"
|
|
1770
|
+
"legend"` : `"legend"
|
|
1771
|
+
"chart"`, Cr = (e = !1, t = "horizontal", s = "end", n = void 0) => {
|
|
1772
|
+
const o = n ? "auto" : "1fr";
|
|
1773
|
+
return t === "horizontal" || e ? o : s === "start" ? `auto ${o}` : `${o} auto`;
|
|
1774
|
+
}, Ir = (e = !1, t = "horizontal", s = "top") => t === "vertical" || e ? "1fr" : s === "bottom" ? "1fr auto" : "auto 1fr", vr = $("div", {
|
|
1775
|
+
name: "MuiChartsWrapper",
|
|
1776
|
+
slot: "Root",
|
|
1777
|
+
shouldForwardProp: (e) => Lt(e) && e !== "extendVertically" && e !== "width"
|
|
1778
|
+
})(({
|
|
1779
|
+
ownerState: e,
|
|
1780
|
+
width: t
|
|
1781
|
+
}) => {
|
|
1782
|
+
const s = Cr(e.hideLegend, e.legendDirection, e.legendPosition?.horizontal, t), n = Ir(e.hideLegend, e.legendDirection, e.legendPosition?.vertical), o = br(e.hideLegend, e.legendDirection, e.legendPosition);
|
|
1783
|
+
return {
|
|
1784
|
+
variants: [{
|
|
1785
|
+
props: {
|
|
1786
|
+
extendVertically: !0
|
|
1787
|
+
},
|
|
1788
|
+
style: {
|
|
1789
|
+
height: "100%",
|
|
1790
|
+
minHeight: 0
|
|
1791
|
+
}
|
|
1792
|
+
}],
|
|
1793
|
+
flex: 1,
|
|
1794
|
+
display: "grid",
|
|
1795
|
+
gridTemplateColumns: s,
|
|
1796
|
+
gridTemplateRows: n,
|
|
1797
|
+
gridTemplateAreas: o,
|
|
1798
|
+
[`&:has(.${_e.root})`]: {
|
|
1799
|
+
// Add a row for toolbar if there is one.
|
|
1800
|
+
gridTemplateRows: `auto ${n}`,
|
|
1801
|
+
gridTemplateAreas: `"${s.split(" ").map(() => "toolbar").join(" ")}"
|
|
1802
|
+
${o}`
|
|
1803
|
+
},
|
|
1804
|
+
[`& .${_e.root}`]: {
|
|
1805
|
+
gridArea: "toolbar",
|
|
1806
|
+
justifySelf: "center"
|
|
1807
|
+
},
|
|
1808
|
+
justifyContent: "safe center",
|
|
1809
|
+
justifyItems: xr(e.legendPosition),
|
|
1810
|
+
alignItems: yr(e.legendPosition)
|
|
1811
|
+
};
|
|
1812
|
+
});
|
|
1813
|
+
function Tr(e) {
|
|
1814
|
+
const {
|
|
1815
|
+
children: t,
|
|
1816
|
+
sx: s,
|
|
1817
|
+
extendVertically: n
|
|
1818
|
+
} = e, o = Ps(), i = E(), a = i.use(jt), d = i.use(kt);
|
|
1819
|
+
return /* @__PURE__ */ c.jsx(vr, {
|
|
1820
|
+
ref: o,
|
|
1821
|
+
ownerState: e,
|
|
1822
|
+
sx: s,
|
|
1823
|
+
extendVertically: n ?? d === void 0,
|
|
1824
|
+
width: a,
|
|
1825
|
+
children: t
|
|
1826
|
+
});
|
|
1827
|
+
}
|
|
1828
|
+
process.env.NODE_ENV !== "production" && (Tr.propTypes = {
|
|
1829
|
+
// ----------------------------- Warning --------------------------------
|
|
1830
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1831
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
1832
|
+
// ----------------------------------------------------------------------
|
|
1833
|
+
children: r.node,
|
|
1834
|
+
/**
|
|
1835
|
+
* If `true`, the chart wrapper set `height: 100%`.
|
|
1836
|
+
* @default `false` if the `height` prop is set. And `true` otherwise.
|
|
1837
|
+
*/
|
|
1838
|
+
extendVertically: r.bool,
|
|
1839
|
+
/**
|
|
1840
|
+
* If `true`, the legend is not rendered.
|
|
1841
|
+
* @default false
|
|
1842
|
+
*/
|
|
1843
|
+
hideLegend: r.bool,
|
|
1844
|
+
/**
|
|
1845
|
+
* The direction of the legend.
|
|
1846
|
+
* @default 'horizontal'
|
|
1847
|
+
*/
|
|
1848
|
+
legendDirection: r.oneOf(["horizontal", "vertical"]),
|
|
1849
|
+
/**
|
|
1850
|
+
* The position of the legend.
|
|
1851
|
+
* @default { horizontal: 'center', vertical: 'bottom' }
|
|
1852
|
+
*/
|
|
1853
|
+
legendPosition: r.shape({
|
|
1854
|
+
horizontal: r.oneOf(["center", "end", "start"]),
|
|
1855
|
+
vertical: r.oneOf(["bottom", "middle", "top"])
|
|
1856
|
+
}),
|
|
1857
|
+
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object])
|
|
1858
|
+
});
|
|
1859
|
+
export {
|
|
1860
|
+
qr as A,
|
|
1861
|
+
Xs as C,
|
|
1862
|
+
Er as a,
|
|
1863
|
+
Fr as b,
|
|
1864
|
+
Vr as c,
|
|
1865
|
+
Is as d,
|
|
1866
|
+
Dr as e,
|
|
1867
|
+
zr as f,
|
|
1868
|
+
Lr as g,
|
|
1869
|
+
Tr as h,
|
|
1870
|
+
ut as i,
|
|
1871
|
+
Ur as j,
|
|
1872
|
+
Sr as k,
|
|
1873
|
+
Mr as l,
|
|
1874
|
+
$r as m,
|
|
1875
|
+
_r as n,
|
|
1876
|
+
Pr as s,
|
|
1877
|
+
Nr as u
|
|
1878
|
+
};
|