@sheetxl/utils-mui 0.7.28-beta.4 → 0.8.0-beta.10
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/browser/esm/{j3660jGOxTGgMAzl.mjs → C9y4YEtSjLoI4eoI.mjs} +6 -6
- package/browser/esm/Cijezc4MPpSmVgKY.mjs +2685 -0
- package/browser/esm/index.mjs +911 -796
- package/licenses/dependencies.txt +2 -74
- package/node/esm/{CKZStonsPru7gSGW.mjs → CDbyr3-seMLR2Y_3.mjs} +3 -3
- package/node/esm/index.mjs +1174 -1029
- package/package.json +10 -13
- package/resources/locales/en/ui.msg.json +1 -0
- package/types/src/button/ExhibitMenuItem.d.ts +12 -0
- package/types/src/components/AnimatedLoadingPanel.d.ts +42 -0
- package/types/src/components/LazyLoadErrorPanel.d.ts +16 -0
- package/types/src/components/index.d.ts +1 -0
- package/types/src/dialog/index.d.ts +1 -0
- package/types/src/dialog/lazyModal.d.ts +25 -0
- package/types/src/theme/ExhibitTheme.d.ts +0 -36
- package/browser/cjs/CMDyOaq_TZmhbR3R.cjs +0 -1
- package/browser/cjs/GeHQP4M_1ydWv9v4.cjs +0 -3
- package/browser/cjs/index.cjs +0 -4
- package/browser/esm/BtypB0nqvk9FmxKZ.mjs +0 -2544
|
@@ -0,0 +1,2685 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.8.0-beta.10
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { Backdrop as e, Box as t, Button as n, Chip as r, CircularProgress as i, DialogActions as a, DialogContent as o, DialogTitle as s, Fade as c, IconButton as l, Paper as u, Tooltip as d, Typography as f, Unstable_TrapFocus as p, createTheme as m, useTheme as h, useThemeProps as g } from "@mui/material";
|
|
8
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
9
|
+
import * as b from "react";
|
|
10
|
+
import x, { Fragment as S, cloneElement as C, forwardRef as w, memo as T, useEffect as E, useId as D, useLayoutEffect as O, useMemo as k, useRef as A, useState as j, version as M } from "react";
|
|
11
|
+
import { alpha as N, darken as P, lighten as F } from "@mui/system";
|
|
12
|
+
import { CommonUtils as I } from "@sheetxl/utils";
|
|
13
|
+
import { Command as ee, DynamicIcon as te, KeyCodes as ne, KeyModifiers as L, NotifierType as R, ReactUtils as re, floatThemeScopeProps as ie, getScrollbarCssVariables as z, useCallbackRef as ae, useFloatSurface as oe, useFullscreenPortal as se, useImperativeElement as ce, useMeasure as le, useTranslator as ue, zIndexVar as de } from "@sheetxl/utils-react";
|
|
14
|
+
import { deepmerge as fe } from "@mui/utils";
|
|
15
|
+
import pe, { createPortal as me } from "react-dom";
|
|
16
|
+
var he = Object.create, ge = Object.defineProperty, _e = Object.getOwnPropertyDescriptor, ve = Object.getOwnPropertyNames, ye = Object.getPrototypeOf, be = Object.prototype.hasOwnProperty, xe = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), Se = (e, t, n) => (n = e == null ? {} : he(ye(e)), ((e, t, n, r) => {
|
|
17
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i, a = ve(t), o = 0, s = a.length; o < s; o++) i = a[o], be.call(e, i) || i === n || ge(e, i, {
|
|
18
|
+
get: ((e) => t[e]).bind(null, i),
|
|
19
|
+
enumerable: !(r = _e(t, i)) || r.enumerable
|
|
20
|
+
});
|
|
21
|
+
return e;
|
|
22
|
+
})(!t && e && e.__esModule && be.call(e, "default") ? n : ge(n, "default", {
|
|
23
|
+
value: e,
|
|
24
|
+
enumerable: !0
|
|
25
|
+
}), e));
|
|
26
|
+
function Ce(e) {
|
|
27
|
+
var t, n, r = "";
|
|
28
|
+
if (typeof e == "string" || typeof e == "number") r += e;
|
|
29
|
+
else if (typeof e == "object") {
|
|
30
|
+
if (Array.isArray(e)) {
|
|
31
|
+
var i = e.length;
|
|
32
|
+
for (t = 0; t < i; t++) e[t] && (n = Ce(e[t])) && (r && (r += " "), r += n);
|
|
33
|
+
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
34
|
+
}
|
|
35
|
+
return r;
|
|
36
|
+
}
|
|
37
|
+
function we() {
|
|
38
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = Ce(e)) && (r && (r += " "), r += t);
|
|
39
|
+
return r;
|
|
40
|
+
}
|
|
41
|
+
function Te(e, t) {
|
|
42
|
+
if (typeof e == "function") return e(t);
|
|
43
|
+
e && (e.current = t);
|
|
44
|
+
}
|
|
45
|
+
var Ee = parseInt(M.split(".")[0], 10) >= 19 ? function(e) {
|
|
46
|
+
return (t) => {
|
|
47
|
+
let n = [];
|
|
48
|
+
for (let r of e) {
|
|
49
|
+
let e = Te(r, t), i = typeof e == "function";
|
|
50
|
+
n.push(i ? e : () => Te(r, null));
|
|
51
|
+
}
|
|
52
|
+
return () => {
|
|
53
|
+
for (let e of n) e();
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
} : function(e) {
|
|
57
|
+
return (t) => {
|
|
58
|
+
for (let n of e) Te(n, t);
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
function De(e) {
|
|
62
|
+
return k(() => Ee(e), e);
|
|
63
|
+
}
|
|
64
|
+
var Oe = T(w((e, n) => {
|
|
65
|
+
let { chips: i, sx: a, ...o } = e, s = k(() => {
|
|
66
|
+
if (!i) return null;
|
|
67
|
+
let e = Array.isArray(i) ? i : [i], t = [], n = e.length;
|
|
68
|
+
for (let i = 0; i < n; i++) {
|
|
69
|
+
let n = e[i], a = null;
|
|
70
|
+
typeof n == "string" ? a = v(r, {
|
|
71
|
+
label: n,
|
|
72
|
+
color: "primary",
|
|
73
|
+
size: "small",
|
|
74
|
+
sx: { scale: "0.8" }
|
|
75
|
+
}, "chip-" + i) : C(n, { key: "chip-" + i }), t.push(a);
|
|
76
|
+
}
|
|
77
|
+
return t;
|
|
78
|
+
}, [i]);
|
|
79
|
+
return v(t, {
|
|
80
|
+
ref: n,
|
|
81
|
+
sx: {
|
|
82
|
+
display: "flex",
|
|
83
|
+
flexDirection: "row",
|
|
84
|
+
marginLeft: "4px",
|
|
85
|
+
gap: "2px",
|
|
86
|
+
...a
|
|
87
|
+
},
|
|
88
|
+
...o,
|
|
89
|
+
children: s
|
|
90
|
+
});
|
|
91
|
+
})), ke = (e) => {
|
|
92
|
+
if (e.palette.mode === "dark") return `drop-shadow(0px 0px 1px ${e.palette.mode === "dark" ? e.palette.text.primary : e.palette.divider})`;
|
|
93
|
+
}, Ae = (e = 1) => (t) => {
|
|
94
|
+
if (t.palette.mode === "dark") return `drop-shadow(0px 0px ${e}px ${t.palette.mode === "dark" ? t.palette.text.primary : t.palette.divider})`;
|
|
95
|
+
}, je = (e) => v(te, {
|
|
96
|
+
...e,
|
|
97
|
+
iconKey: "ArrowDownOutline"
|
|
98
|
+
}), Me = (e) => v(te, {
|
|
99
|
+
...e,
|
|
100
|
+
iconKey: "ArrowRightOutline"
|
|
101
|
+
}), Ne = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, Pe = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, Fe = function(e, t = null) {
|
|
102
|
+
if (!e) return e;
|
|
103
|
+
e = e.replace(Ne, function(e, t, n, r) {
|
|
104
|
+
return t + t + n + n + r + r;
|
|
105
|
+
});
|
|
106
|
+
let n = Pe.exec(e);
|
|
107
|
+
return n ? t === null ? `rgb(${parseInt(n[1], 16)}, ${parseInt(n[2], 16)}, ${parseInt(n[3], 16)})` : `rgb(${parseInt(n[1], 16)} ${parseInt(n[2], 16)} ${parseInt(n[3], 16)} / ${100 * t}%)` : e;
|
|
108
|
+
}, Ie = function(e, t = .2, n = "light") {
|
|
109
|
+
if (!e) return e;
|
|
110
|
+
let r = n !== "dark";
|
|
111
|
+
t < 0 && (r = !r, t *= -1), e = Fe(e);
|
|
112
|
+
try {
|
|
113
|
+
return r ? P(e, Math.max(0, Math.min(1, 1 * t))) : F(e, Math.max(0, Math.min(1, 1.5 * t)));
|
|
114
|
+
} catch {
|
|
115
|
+
return e;
|
|
116
|
+
}
|
|
117
|
+
}, Le = (e) => {
|
|
118
|
+
e.stopPropagation();
|
|
119
|
+
}, Re = {
|
|
120
|
+
onMouseDown: Le,
|
|
121
|
+
onTouchStart: Le
|
|
122
|
+
}, ze = (e, t) => {
|
|
123
|
+
let n = m({ palette: { mode: e ? "dark" : "light" } }), r = {
|
|
124
|
+
"--icon-shadow": e ? n.palette.text.primary : n.palette.divider,
|
|
125
|
+
"--icon-size": "1.25rem",
|
|
126
|
+
"@media (pointer: coarse)": { "--icon-size": "1.75rem" }
|
|
127
|
+
}, i = {
|
|
128
|
+
typography: {},
|
|
129
|
+
palette: {
|
|
130
|
+
mode: e ? "dark" : "light",
|
|
131
|
+
text: {
|
|
132
|
+
secondary: e ? n.palette.text.secondary : N(n.palette.text.secondary, .75),
|
|
133
|
+
icon: e ? N(n.palette.text.secondary, .7) : N(n.palette.text.primary, .75)
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
components: {
|
|
137
|
+
MuiDialogTitle: { styleOverrides: { root: { fontWeight: "normal" } } },
|
|
138
|
+
MuiSelect: {
|
|
139
|
+
defaultProps: {
|
|
140
|
+
IconComponent: je,
|
|
141
|
+
MenuProps: {
|
|
142
|
+
container: () => document.fullscreenElement,
|
|
143
|
+
...Re
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
styleOverrides: { icon: { top: "unset" } }
|
|
147
|
+
},
|
|
148
|
+
MuiListItemIcon: { styleOverrides: { root: {
|
|
149
|
+
minWidth: "0px !important",
|
|
150
|
+
overflow: "hidden",
|
|
151
|
+
marginLeft: "0px",
|
|
152
|
+
marginRight: "6px",
|
|
153
|
+
padding: "1px 1px",
|
|
154
|
+
border: "solid transparent 1px",
|
|
155
|
+
color: "unset"
|
|
156
|
+
} } },
|
|
157
|
+
MuiMenuItem: { styleOverrides: { root: {
|
|
158
|
+
paddingTop: "2px",
|
|
159
|
+
paddingBottom: "2px",
|
|
160
|
+
marginLeft: "4px",
|
|
161
|
+
marginRight: "4px",
|
|
162
|
+
paddingLeft: "6px",
|
|
163
|
+
paddingRight: "18px",
|
|
164
|
+
borderRadius: "4px",
|
|
165
|
+
fontSize: "0.875em",
|
|
166
|
+
"@media (pointer: coarse)": { fontSize: "1em" },
|
|
167
|
+
"&.Mui-selected": {}
|
|
168
|
+
} } },
|
|
169
|
+
MuiMenu: {
|
|
170
|
+
defaultProps: {
|
|
171
|
+
container: () => document.fullscreenElement,
|
|
172
|
+
...Re
|
|
173
|
+
},
|
|
174
|
+
styleOverrides: { root: {
|
|
175
|
+
paddingTop: "2px",
|
|
176
|
+
paddingBottom: "2px",
|
|
177
|
+
marginLeft: "4px",
|
|
178
|
+
marginRight: "4px",
|
|
179
|
+
paddingLeft: "6px",
|
|
180
|
+
paddingRight: "18px",
|
|
181
|
+
borderRadius: "4px",
|
|
182
|
+
fontSize: "0.875em",
|
|
183
|
+
"@media (pointer: coarse)": { fontSize: "1em" },
|
|
184
|
+
"&.Mui-selected": {}
|
|
185
|
+
} }
|
|
186
|
+
},
|
|
187
|
+
MuiToolbar: { styleOverrides: { root: {
|
|
188
|
+
paddingTop: "4px",
|
|
189
|
+
paddingBottom: "4px",
|
|
190
|
+
"@media (min-width: 600px)": {
|
|
191
|
+
paddingTop: "4px",
|
|
192
|
+
paddingBottom: "4px"
|
|
193
|
+
}
|
|
194
|
+
} } },
|
|
195
|
+
MuiDivider: { styleOverrides: { root: {
|
|
196
|
+
marginTop: "4px !important",
|
|
197
|
+
marginBottom: "4px !important",
|
|
198
|
+
marginLeft: "0px",
|
|
199
|
+
marginRight: "0px"
|
|
200
|
+
} } },
|
|
201
|
+
MuiInputBase: { styleOverrides: { root: {} } },
|
|
202
|
+
MuiPaper: { styleOverrides: { root: {
|
|
203
|
+
...r,
|
|
204
|
+
backgroundImage: "none"
|
|
205
|
+
} } },
|
|
206
|
+
MuiPopover: { styleOverrides: { paper: {
|
|
207
|
+
backgroundColor: `var(--sxl-color-elevated, var(--sxl-color-base-100, ${n.palette.background.paper}))`,
|
|
208
|
+
border: "1px solid var(--sxl-color-elevated-border, transparent)"
|
|
209
|
+
} } },
|
|
210
|
+
MuiPopper: { styleOverrides: { root: { "& .menu": {
|
|
211
|
+
marginTop: "4px",
|
|
212
|
+
marginBottom: "4px",
|
|
213
|
+
borderRadius: "4px"
|
|
214
|
+
} } } },
|
|
215
|
+
SmartInputField: { styleOverrides: {
|
|
216
|
+
automatic: {
|
|
217
|
+
transition: "opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
218
|
+
color: function() {
|
|
219
|
+
return n.palette.text.secondary;
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
dirty: {
|
|
223
|
+
fontStyle: "italic",
|
|
224
|
+
color: function() {
|
|
225
|
+
return n.palette.text.secondary;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
} }
|
|
229
|
+
}
|
|
230
|
+
}, a = i;
|
|
231
|
+
return t && (a = fe(i, t)), m(a);
|
|
232
|
+
};
|
|
233
|
+
function Be(e, t) {
|
|
234
|
+
return t = fe({
|
|
235
|
+
track: Ie(e.palette.background.paper, .05, e?.palette.mode),
|
|
236
|
+
thumb: Ie(e.palette.background.paper, .3, e?.palette.mode),
|
|
237
|
+
active: e.palette.primary.main,
|
|
238
|
+
corner: e.palette.background.paper,
|
|
239
|
+
outline: !1
|
|
240
|
+
}, t || {}), z({
|
|
241
|
+
track: N(t.track, .2),
|
|
242
|
+
thumb: t.thumb,
|
|
243
|
+
button: t.button,
|
|
244
|
+
active: t.active,
|
|
245
|
+
corner: t.corner || t.thumb,
|
|
246
|
+
border: t.track
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
function Ve(e, t) {
|
|
250
|
+
let n = Be(e, t), r = {
|
|
251
|
+
...n,
|
|
252
|
+
"& .scrollbar, & .vsb-track, & .vsb-thumb": { ...n },
|
|
253
|
+
"&::-webkit-scrollbar, & *::-webkit-scrollbar": {
|
|
254
|
+
backgroundColor: "var(--scrollbar-track-color)",
|
|
255
|
+
width: "var(--scrollbar-width)",
|
|
256
|
+
height: "var(--scrollbar-height)"
|
|
257
|
+
},
|
|
258
|
+
"&::-webkit-scrollbar-button": { display: "none" },
|
|
259
|
+
"& .scrollbar-button": {
|
|
260
|
+
fill: "var(--scrollbar-thumb-color)",
|
|
261
|
+
backgroundColor: "transparent",
|
|
262
|
+
transition: "fill opacity 260ms ease",
|
|
263
|
+
width: "var(--scrollbar-width)",
|
|
264
|
+
height: "var(--scrollbar-height)"
|
|
265
|
+
},
|
|
266
|
+
"& .scrollbar-button:hover:not([disabled])": { fill: "var(--scrollbar-active-color)" },
|
|
267
|
+
"& .scrollbar-button:disabled": { opacity: .8 },
|
|
268
|
+
"&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {},
|
|
269
|
+
"&::-webkit-scrollbar-track-piece, & *::-webkit-scrollbar-track-piece": {},
|
|
270
|
+
"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": {
|
|
271
|
+
borderRadius: "var(--scrollbar-border-radius)",
|
|
272
|
+
backgroundColor: "var(--scrollbar-thumb-color)",
|
|
273
|
+
minHeight: "var(--scrollbar-min-thumb-size)",
|
|
274
|
+
minWidth: "var(--scrollbar-min-thumb-size)",
|
|
275
|
+
border: "var(--scrollbar-border-width) solid var(--scrollbar-border-color)"
|
|
276
|
+
},
|
|
277
|
+
"&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus": {
|
|
278
|
+
backgroundColor: "var(--scrollbar-active-color)",
|
|
279
|
+
border: t?.outline ? t.outline : void 0
|
|
280
|
+
},
|
|
281
|
+
"&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active": {
|
|
282
|
+
backgroundColor: "var(--scrollbar-active-color)",
|
|
283
|
+
border: t?.outline ? t.outline : void 0
|
|
284
|
+
},
|
|
285
|
+
"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": {
|
|
286
|
+
backgroundColor: "var(--scrollbar-active-color)",
|
|
287
|
+
border: t?.outline ? t.outline : void 0
|
|
288
|
+
},
|
|
289
|
+
"&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": { backgroundColor: "var(--scrollbar-corner-color)" }
|
|
290
|
+
};
|
|
291
|
+
return I.getPlatform() === I.OSType.Firefox && (r["* .pseudo-scrollbar"] = { scrollbarColor: "var(--scrollbar-thumb-color) transparent" }, r["* .pseudo-scrollbar:hover:not([disabled])"] = { scrollbarColor: "var(--scrollbar-active-color) transparent" }), r;
|
|
292
|
+
}
|
|
293
|
+
var He = w((e, t) => {
|
|
294
|
+
let { slotProps: n, ...r } = e, { getPortalContainer: i, isFullscreen: a } = se();
|
|
295
|
+
return v(d, {
|
|
296
|
+
ref: t,
|
|
297
|
+
slotProps: {
|
|
298
|
+
...n,
|
|
299
|
+
popper: {
|
|
300
|
+
container: a ? i : void 0,
|
|
301
|
+
...n?.popper || {}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
...r
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
He.displayName = "SimpleTooltip";
|
|
308
|
+
var Ue = T((e) => {
|
|
309
|
+
let { modifier: n, sx: r, ...i } = e;
|
|
310
|
+
return v(t, {
|
|
311
|
+
sx: {
|
|
312
|
+
marginLeft: "1px",
|
|
313
|
+
marginRight: "1px",
|
|
314
|
+
borderRadius: "4px",
|
|
315
|
+
borderStyle: "solid",
|
|
316
|
+
borderTopWidth: "1px",
|
|
317
|
+
borderLeftWidth: "1px",
|
|
318
|
+
borderRightWidth: "1px",
|
|
319
|
+
borderBottomWidth: "2px",
|
|
320
|
+
borderTopColor: (e) => N(e.palette.background.paper, e.palette.action.disabledOpacity),
|
|
321
|
+
borderLeftColor: (e) => N(e.palette.background.paper, e.palette.action.disabledOpacity),
|
|
322
|
+
borderRightColor: (e) => N(e.palette.background.paper, e.palette.action.disabledOpacity),
|
|
323
|
+
borderBottomColor: (e) => N(e.palette.background.paper, 1 - e.palette.action.disabledOpacity),
|
|
324
|
+
backgroundColor: (e) => N(e.palette.action.hover, e.palette.action.disabledOpacity),
|
|
325
|
+
paddingLeft: "4px",
|
|
326
|
+
paddingRight: "4px",
|
|
327
|
+
minHeight: "1.6em",
|
|
328
|
+
display: "flex",
|
|
329
|
+
justifyContent: "center",
|
|
330
|
+
alignItems: "center",
|
|
331
|
+
boxSizing: "content-box",
|
|
332
|
+
overflow: "hidden",
|
|
333
|
+
...r
|
|
334
|
+
},
|
|
335
|
+
...i,
|
|
336
|
+
children: v(t, {
|
|
337
|
+
sx: {
|
|
338
|
+
display: "flex",
|
|
339
|
+
alignItems: "center",
|
|
340
|
+
justifyContent: "center",
|
|
341
|
+
textAlign: "center",
|
|
342
|
+
"& *": { fontWeight: "500" }
|
|
343
|
+
},
|
|
344
|
+
children: n
|
|
345
|
+
})
|
|
346
|
+
});
|
|
347
|
+
}), We = (e, n, r = !1, i = null) => {
|
|
348
|
+
if (Array.isArray(e)) {
|
|
349
|
+
let a = [], o = e;
|
|
350
|
+
for (let e = 0; e < o.length; e++) a.push(We(o[e], n, r, i ?? "" + e));
|
|
351
|
+
return v(t, {
|
|
352
|
+
sx: {
|
|
353
|
+
display: "flex",
|
|
354
|
+
alignItems: "center",
|
|
355
|
+
flexDirection: "column"
|
|
356
|
+
},
|
|
357
|
+
children: a
|
|
358
|
+
}, i);
|
|
359
|
+
}
|
|
360
|
+
if (!e?.key) return null;
|
|
361
|
+
let a = {};
|
|
362
|
+
for (let t = 0; e.modifiers && t < e.modifiers.length; t++) a[e.modifiers[t]] = !0;
|
|
363
|
+
let o = [], s = I.getPlatform() === I.OSType.MacOS || I.getPlatform() === I.OSType.IOS ? n("shortcut.modifier.cmd") : n("shortcut.modifier.ctrl");
|
|
364
|
+
return a?.[L.Ctrl] && (o.push(v(Ue, { modifier: r ? "^" : v("div", {
|
|
365
|
+
style: { paddingRight: "1px" },
|
|
366
|
+
children: s
|
|
367
|
+
}) }, "ctrl")), o.push("+")), a?.[L.Alt] && (o.push(v(Ue, { modifier: r ? "⌥" : n("shortcut.modifier.alt") }, "alt")), o.push("+")), a?.[L.Shift] && (o.push(v(Ue, { modifier: r ? "⇧" : v("div", {
|
|
368
|
+
style: { paddingRight: "1px" },
|
|
369
|
+
children: n("shortcut.modifier.shift")
|
|
370
|
+
}) }, "shift")), o.push("+")), a?.[L.Meta] && (o.push(v(Ue, { modifier: r ? v("div", {
|
|
371
|
+
style: { paddingTop: "1px" },
|
|
372
|
+
children: "⌘"
|
|
373
|
+
}) : n("shortcut.modifier.meta") }, "meta")), o.push("+")), o.push(v(Ue, { modifier: re.toPrettyKeyCode(e.key) }, "character")), v(t, {
|
|
374
|
+
sx: {
|
|
375
|
+
display: "flex",
|
|
376
|
+
alignItems: "center",
|
|
377
|
+
flexShrink: 0,
|
|
378
|
+
whiteSpace: "nowrap"
|
|
379
|
+
},
|
|
380
|
+
children: o
|
|
381
|
+
}, i);
|
|
382
|
+
}, Ge = T(w((e, n) => {
|
|
383
|
+
let { disabled: r = !1, label: i, shortcut: a, chips: o, description: s, maxWidth: c = 280, useModifierSymbols: l = !1, children: u, simple: d, componentDisabled: p = !1, sx: m, ...h } = e, g = ue(), b = null;
|
|
384
|
+
a && (b = We(a, g, l));
|
|
385
|
+
let [x, S] = j(null);
|
|
386
|
+
return E(() => {
|
|
387
|
+
Promise.resolve(i).then((e) => {
|
|
388
|
+
S(e);
|
|
389
|
+
});
|
|
390
|
+
}, [i]), v(He, {
|
|
391
|
+
slotProps: { popper: {
|
|
392
|
+
sx: {
|
|
393
|
+
"& .MuiTooltip-tooltip": { marginTop: "0px !important" },
|
|
394
|
+
...m
|
|
395
|
+
},
|
|
396
|
+
modifiers: [{
|
|
397
|
+
name: "offset",
|
|
398
|
+
options: { offset: [0, 14] }
|
|
399
|
+
}]
|
|
400
|
+
} },
|
|
401
|
+
className: "tooltip-wrapper",
|
|
402
|
+
tabIndex: -1,
|
|
403
|
+
title: !r && x ? y(t, {
|
|
404
|
+
sx: { maxWidth: `${c}px` },
|
|
405
|
+
ref: n,
|
|
406
|
+
children: [y(t, {
|
|
407
|
+
sx: {
|
|
408
|
+
display: "flex",
|
|
409
|
+
flexDirection: "row",
|
|
410
|
+
marginBottom: s ? "4px" : "0px"
|
|
411
|
+
},
|
|
412
|
+
children: [
|
|
413
|
+
v(f, {
|
|
414
|
+
variant: "subtitle1",
|
|
415
|
+
component: "div",
|
|
416
|
+
sx: { flex: "1 1 100%" },
|
|
417
|
+
children: x
|
|
418
|
+
}),
|
|
419
|
+
o ? v(Oe, { chips: o }) : null,
|
|
420
|
+
b ? v(t, { sx: { marginLeft: "8px" } }, "leadingSpace") : v(_, {}),
|
|
421
|
+
b
|
|
422
|
+
]
|
|
423
|
+
}), s ? v(f, {
|
|
424
|
+
variant: "caption",
|
|
425
|
+
sx: {
|
|
426
|
+
whiteSpace: "pre-line",
|
|
427
|
+
lineHeight: "1.4"
|
|
428
|
+
},
|
|
429
|
+
children: s
|
|
430
|
+
}) : v(_, {})]
|
|
431
|
+
}) : "",
|
|
432
|
+
enterDelay: 260,
|
|
433
|
+
enterNextDelay: 130,
|
|
434
|
+
leaveDelay: 230,
|
|
435
|
+
disableInteractive: !0,
|
|
436
|
+
...h,
|
|
437
|
+
children: v("div", {
|
|
438
|
+
style: {
|
|
439
|
+
display: "flex",
|
|
440
|
+
alignItems: "stretch",
|
|
441
|
+
justifyContent: "stretch"
|
|
442
|
+
},
|
|
443
|
+
children: u
|
|
444
|
+
})
|
|
445
|
+
});
|
|
446
|
+
})), Ke = {
|
|
447
|
+
"dialog.cancel": "Cancel",
|
|
448
|
+
"dialog.ok": "Ok",
|
|
449
|
+
"lazyLoad.retry": "Retry",
|
|
450
|
+
"overflow.more": "More",
|
|
451
|
+
"overflow.moreDescription": "More toolbar options…",
|
|
452
|
+
"scroll.edgeBottom": " Bottom: ''Ctrl+Click'' to scroll to the end",
|
|
453
|
+
"scroll.edgeLeft": " Left: ''Ctrl+Click'' to scroll to the beginning",
|
|
454
|
+
"scroll.edgeRight": " Right: ''Ctrl+Click'' to scroll to the end",
|
|
455
|
+
"scroll.edgeTop": " Top: ''Ctrl+Click'' to scroll to the beginning",
|
|
456
|
+
"shortcut.modifier.alt": "Alt",
|
|
457
|
+
"shortcut.modifier.cmd": "Cmd",
|
|
458
|
+
"shortcut.modifier.ctrl": "Ctrl",
|
|
459
|
+
"shortcut.modifier.meta": "Meta",
|
|
460
|
+
"shortcut.modifier.shift": "Shift",
|
|
461
|
+
"stackTrace.causedBy": "Caused by: {cause}",
|
|
462
|
+
"stackTrace.copy": "Copy stack trace",
|
|
463
|
+
"stackTrace.heading": "Stack Trace",
|
|
464
|
+
"stackTrace.headingFrames": "Stack Trace ({count} frames)",
|
|
465
|
+
"stackTrace.log": "Log error to console",
|
|
466
|
+
"stackTrace.moreFrames": "... and {count} more frames",
|
|
467
|
+
"window.close": "Close"
|
|
468
|
+
}, { DefaultCommandCatalogService: qe } = ee, Je = !1;
|
|
469
|
+
function Ye() {
|
|
470
|
+
Je || (Je = !0, qe.registerFromManifest("@sheetxl/utils-mui", import.meta.url, { messages: Ke }));
|
|
471
|
+
}
|
|
472
|
+
var Xe = xe((e, t) => {
|
|
473
|
+
t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
474
|
+
}), Ze = xe((e, t) => {
|
|
475
|
+
var n = Xe();
|
|
476
|
+
function r() {}
|
|
477
|
+
function i() {}
|
|
478
|
+
i.resetWarningCache = r, t.exports = function() {
|
|
479
|
+
function e(e, t, r, i, a, o) {
|
|
480
|
+
if (o !== n) {
|
|
481
|
+
var s = /* @__PURE__ */ Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
|
|
482
|
+
throw s.name = "Invariant Violation", s;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
function t() {
|
|
486
|
+
return e;
|
|
487
|
+
}
|
|
488
|
+
e.isRequired = e;
|
|
489
|
+
var a = {
|
|
490
|
+
array: e,
|
|
491
|
+
bigint: e,
|
|
492
|
+
bool: e,
|
|
493
|
+
func: e,
|
|
494
|
+
number: e,
|
|
495
|
+
object: e,
|
|
496
|
+
string: e,
|
|
497
|
+
symbol: e,
|
|
498
|
+
any: e,
|
|
499
|
+
arrayOf: t,
|
|
500
|
+
element: e,
|
|
501
|
+
elementType: e,
|
|
502
|
+
instanceOf: t,
|
|
503
|
+
node: e,
|
|
504
|
+
objectOf: t,
|
|
505
|
+
oneOf: t,
|
|
506
|
+
oneOfType: t,
|
|
507
|
+
shape: t,
|
|
508
|
+
exact: t,
|
|
509
|
+
checkPropTypes: i,
|
|
510
|
+
resetWarningCache: r
|
|
511
|
+
};
|
|
512
|
+
return a.PropTypes = a, a;
|
|
513
|
+
};
|
|
514
|
+
}), B = Se(xe((e, t) => {
|
|
515
|
+
t.exports = Ze()();
|
|
516
|
+
})(), 1);
|
|
517
|
+
function Qe(e, t) {
|
|
518
|
+
for (let n = 0, r = e.length; n < r; n++) if (t.apply(t, [
|
|
519
|
+
e[n],
|
|
520
|
+
n,
|
|
521
|
+
e
|
|
522
|
+
])) return e[n];
|
|
523
|
+
}
|
|
524
|
+
function $e(e) {
|
|
525
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
|
|
526
|
+
}
|
|
527
|
+
function et(e) {
|
|
528
|
+
return typeof e == "number" && !isNaN(e);
|
|
529
|
+
}
|
|
530
|
+
function V(e) {
|
|
531
|
+
return parseInt(e, 10);
|
|
532
|
+
}
|
|
533
|
+
function tt(e, t, n) {
|
|
534
|
+
if (e[t]) return /* @__PURE__ */ Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`);
|
|
535
|
+
}
|
|
536
|
+
var nt = [
|
|
537
|
+
"Moz",
|
|
538
|
+
"Webkit",
|
|
539
|
+
"O",
|
|
540
|
+
"ms"
|
|
541
|
+
];
|
|
542
|
+
function rt(e, t) {
|
|
543
|
+
return t ? `${t}${function(e) {
|
|
544
|
+
let t = "", n = !0;
|
|
545
|
+
for (let r = 0; r < e.length; r++) n ? (t += e[r].toUpperCase(), n = !1) : e[r] === "-" ? n = !0 : t += e[r];
|
|
546
|
+
return t;
|
|
547
|
+
}(e)}` : e;
|
|
548
|
+
}
|
|
549
|
+
var it = function(e = "transform") {
|
|
550
|
+
if (typeof window > "u") return "";
|
|
551
|
+
let t = window.document?.documentElement?.style;
|
|
552
|
+
if (!t || e in t) return "";
|
|
553
|
+
for (let n = 0; n < nt.length; n++) if (rt(e, nt[n]) in t) return nt[n];
|
|
554
|
+
return "";
|
|
555
|
+
}(), at = "";
|
|
556
|
+
function ot(e, t) {
|
|
557
|
+
at ||= Qe([
|
|
558
|
+
"matches",
|
|
559
|
+
"webkitMatchesSelector",
|
|
560
|
+
"mozMatchesSelector",
|
|
561
|
+
"msMatchesSelector",
|
|
562
|
+
"oMatchesSelector"
|
|
563
|
+
], function(t) {
|
|
564
|
+
return $e(e[t]);
|
|
565
|
+
}) ?? "";
|
|
566
|
+
let n = e[at];
|
|
567
|
+
return !!$e(n) && !!n.call(e, t);
|
|
568
|
+
}
|
|
569
|
+
function st(e, t, n) {
|
|
570
|
+
let r = e;
|
|
571
|
+
do {
|
|
572
|
+
if (ot(r, t)) return !0;
|
|
573
|
+
if (r === n) return !1;
|
|
574
|
+
r = r.parentNode;
|
|
575
|
+
} while (r);
|
|
576
|
+
return !1;
|
|
577
|
+
}
|
|
578
|
+
function ct(e, t, n, r) {
|
|
579
|
+
if (!e) return;
|
|
580
|
+
let i = {
|
|
581
|
+
capture: !0,
|
|
582
|
+
...r
|
|
583
|
+
}, a = n;
|
|
584
|
+
e.addEventListener ? e.addEventListener(t, a, i) : e.attachEvent ? e.attachEvent("on" + t, a) : e["on" + t] = a;
|
|
585
|
+
}
|
|
586
|
+
function lt(e, t, n, r) {
|
|
587
|
+
if (!e) return;
|
|
588
|
+
let i = {
|
|
589
|
+
capture: !0,
|
|
590
|
+
...r
|
|
591
|
+
}, a = n;
|
|
592
|
+
e.removeEventListener ? e.removeEventListener(t, a, i) : e.detachEvent ? e.detachEvent("on" + t, a) : e["on" + t] = null;
|
|
593
|
+
}
|
|
594
|
+
function ut(e) {
|
|
595
|
+
let t = e.clientHeight, n = e.ownerDocument.defaultView.getComputedStyle(e);
|
|
596
|
+
return t += V(n.borderTopWidth), t += V(n.borderBottomWidth), t;
|
|
597
|
+
}
|
|
598
|
+
function dt(e) {
|
|
599
|
+
let t = e.clientWidth, n = e.ownerDocument.defaultView.getComputedStyle(e);
|
|
600
|
+
return t += V(n.borderLeftWidth), t += V(n.borderRightWidth), t;
|
|
601
|
+
}
|
|
602
|
+
function ft(e) {
|
|
603
|
+
let t = e.clientHeight, n = e.ownerDocument.defaultView.getComputedStyle(e);
|
|
604
|
+
return t -= V(n.paddingTop), t -= V(n.paddingBottom), t;
|
|
605
|
+
}
|
|
606
|
+
function pt(e) {
|
|
607
|
+
let t = e.clientWidth, n = e.ownerDocument.defaultView.getComputedStyle(e);
|
|
608
|
+
return t -= V(n.paddingLeft), t -= V(n.paddingRight), t;
|
|
609
|
+
}
|
|
610
|
+
function mt({ x: e, y: t }, n, r) {
|
|
611
|
+
let i = `translate(${e}${r},${t}${r})`;
|
|
612
|
+
return n && (i = `translate(${typeof n.x == "string" ? n.x : n.x + r}, ${typeof n.y == "string" ? n.y : n.y + r})` + i), i;
|
|
613
|
+
}
|
|
614
|
+
function ht(e, t) {
|
|
615
|
+
if (!e) return;
|
|
616
|
+
let n = e.getElementById("react-draggable-style-el");
|
|
617
|
+
if (!n) {
|
|
618
|
+
n = e.createElement("style"), n.type = "text/css", n.id = "react-draggable-style-el";
|
|
619
|
+
let r = t ?? (typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0);
|
|
620
|
+
r && n.setAttribute("nonce", r), n.innerHTML = ".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n", n.innerHTML += ".react-draggable-transparent-selection *::selection {all: inherit;}\n", e.getElementsByTagName("head")[0].appendChild(n);
|
|
621
|
+
}
|
|
622
|
+
var r, i;
|
|
623
|
+
e.body && (r = e.body, i = "react-draggable-transparent-selection", r.classList ? r.classList.add(i) : r.className.match(RegExp(`(?:^|\\s)${i}(?!\\S)`)) || (r.className += ` ${i}`));
|
|
624
|
+
}
|
|
625
|
+
function gt(e) {
|
|
626
|
+
window.requestAnimationFrame ? window.requestAnimationFrame(() => {
|
|
627
|
+
_t(e);
|
|
628
|
+
}) : _t(e);
|
|
629
|
+
}
|
|
630
|
+
function _t(e) {
|
|
631
|
+
var t, n;
|
|
632
|
+
if (e) try {
|
|
633
|
+
e.body && (t = e.body, n = "react-draggable-transparent-selection", t.classList ? t.classList.remove(n) : t.className = t.className.replace(RegExp(`(?:^|\\s)${n}(?!\\S)`, "g"), ""));
|
|
634
|
+
let r = e.selection;
|
|
635
|
+
if (r) r.empty();
|
|
636
|
+
else {
|
|
637
|
+
let t = (e.defaultView || window).getSelection();
|
|
638
|
+
t && t.type !== "Caret" && t.removeAllRanges();
|
|
639
|
+
}
|
|
640
|
+
} catch {}
|
|
641
|
+
}
|
|
642
|
+
function vt(e, t, n) {
|
|
643
|
+
return [Math.round(t / e[0]) * e[0], Math.round(n / e[1]) * e[1]];
|
|
644
|
+
}
|
|
645
|
+
function yt(e) {
|
|
646
|
+
return e.props.axis === "both" || e.props.axis === "x";
|
|
647
|
+
}
|
|
648
|
+
function bt(e) {
|
|
649
|
+
return e.props.axis === "both" || e.props.axis === "y";
|
|
650
|
+
}
|
|
651
|
+
function xt(e, t, n) {
|
|
652
|
+
let r = typeof t == "number" ? function(e, t) {
|
|
653
|
+
return e.targetTouches && Qe(e.targetTouches, (e) => t === e.identifier) || e.changedTouches && Qe(e.changedTouches, (e) => t === e.identifier);
|
|
654
|
+
}(e, t) : null;
|
|
655
|
+
if (typeof t == "number" && !r) return null;
|
|
656
|
+
let i = wt(n);
|
|
657
|
+
return function(e, t, n) {
|
|
658
|
+
let r = t === t.ownerDocument.body ? {
|
|
659
|
+
left: 0,
|
|
660
|
+
top: 0
|
|
661
|
+
} : t.getBoundingClientRect();
|
|
662
|
+
return {
|
|
663
|
+
x: (e.clientX + t.scrollLeft - r.left) / n,
|
|
664
|
+
y: (e.clientY + t.scrollTop - r.top) / n
|
|
665
|
+
};
|
|
666
|
+
}(r || e, n.props.offsetParent || i.offsetParent || i.ownerDocument.body, n.props.scale);
|
|
667
|
+
}
|
|
668
|
+
function St(e, t, n) {
|
|
669
|
+
let r = !et(e.lastX), i = wt(e);
|
|
670
|
+
return r ? {
|
|
671
|
+
node: i,
|
|
672
|
+
deltaX: 0,
|
|
673
|
+
deltaY: 0,
|
|
674
|
+
lastX: t,
|
|
675
|
+
lastY: n,
|
|
676
|
+
x: t,
|
|
677
|
+
y: n
|
|
678
|
+
} : {
|
|
679
|
+
node: i,
|
|
680
|
+
deltaX: t - e.lastX,
|
|
681
|
+
deltaY: n - e.lastY,
|
|
682
|
+
lastX: e.lastX,
|
|
683
|
+
lastY: e.lastY,
|
|
684
|
+
x: t,
|
|
685
|
+
y: n
|
|
686
|
+
};
|
|
687
|
+
}
|
|
688
|
+
function Ct(e, t) {
|
|
689
|
+
let n = e.props.scale;
|
|
690
|
+
return {
|
|
691
|
+
node: t.node,
|
|
692
|
+
x: e.state.x + t.deltaX / n,
|
|
693
|
+
y: e.state.y + t.deltaY / n,
|
|
694
|
+
deltaX: t.deltaX / n,
|
|
695
|
+
deltaY: t.deltaY / n,
|
|
696
|
+
lastX: e.state.x,
|
|
697
|
+
lastY: e.state.y
|
|
698
|
+
};
|
|
699
|
+
}
|
|
700
|
+
function wt(e) {
|
|
701
|
+
let t = e.findDOMNode();
|
|
702
|
+
if (!t) throw Error("<DraggableCore>: Unmounted during event!");
|
|
703
|
+
return t;
|
|
704
|
+
}
|
|
705
|
+
var Tt = {
|
|
706
|
+
start: "touchstart",
|
|
707
|
+
move: "touchmove",
|
|
708
|
+
stop: "touchend"
|
|
709
|
+
}, Et = {
|
|
710
|
+
start: "mousedown",
|
|
711
|
+
move: "mousemove",
|
|
712
|
+
stop: "mouseup"
|
|
713
|
+
}, Dt = Et, Ot = class extends b.Component {
|
|
714
|
+
constructor() {
|
|
715
|
+
super(...arguments), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, this.touchIdentifier = null, this.mounted = !1, this.handleDragStart = (e) => {
|
|
716
|
+
if (this.props.onMouseDown(e), !this.props.allowAnyClick && (typeof e.button == "number" && e.button !== 0 || e.ctrlKey)) return !1;
|
|
717
|
+
let t = this.findDOMNode();
|
|
718
|
+
if (!t || !t.ownerDocument || !t.ownerDocument.body) throw Error("<DraggableCore> not mounted on DragStart!");
|
|
719
|
+
let { ownerDocument: n } = t;
|
|
720
|
+
if (this.props.disabled || !(e.target instanceof n.defaultView.Node) || this.props.handle && !st(e.target, this.props.handle, t) || this.props.cancel && st(e.target, this.props.cancel, t)) return;
|
|
721
|
+
e.type !== "touchstart" || this.props.allowMobileScroll || e.preventDefault();
|
|
722
|
+
let r = function(e) {
|
|
723
|
+
return e.targetTouches && e.targetTouches[0] ? e.targetTouches[0].identifier : e.changedTouches && e.changedTouches[0] ? e.changedTouches[0].identifier : void 0;
|
|
724
|
+
}(e);
|
|
725
|
+
this.touchIdentifier = r;
|
|
726
|
+
let i = xt(e, r, this);
|
|
727
|
+
if (i == null) return;
|
|
728
|
+
let { x: a, y: o } = i, s = St(this, a, o);
|
|
729
|
+
this.props.onStart, !1 !== this.props.onStart(e, s) && !1 !== this.mounted && (this.props.enableUserSelectHack && ht(n, this.props.nonce), this.dragging = !0, this.lastX = a, this.lastY = o, ct(n, Dt.move, this.handleDrag), ct(n, Dt.stop, this.handleDragStop));
|
|
730
|
+
}, this.handleDrag = (e) => {
|
|
731
|
+
let t = xt(e, this.touchIdentifier, this);
|
|
732
|
+
if (t == null) return;
|
|
733
|
+
let { x: n, y: r } = t;
|
|
734
|
+
if (Array.isArray(this.props.grid)) {
|
|
735
|
+
let e = n - this.lastX, t = r - this.lastY;
|
|
736
|
+
if ([e, t] = vt(this.props.grid, e, t), !e && !t) return;
|
|
737
|
+
n = this.lastX + e, r = this.lastY + t;
|
|
738
|
+
}
|
|
739
|
+
let i = St(this, n, r);
|
|
740
|
+
if (!1 !== this.props.onDrag(e, i) && !1 !== this.mounted) this.lastX = n, this.lastY = r;
|
|
741
|
+
else try {
|
|
742
|
+
this.handleDragStop(new MouseEvent("mouseup"));
|
|
743
|
+
} catch {
|
|
744
|
+
let e = document.createEvent("MouseEvents");
|
|
745
|
+
e.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.handleDragStop(e);
|
|
746
|
+
}
|
|
747
|
+
}, this.handleDragStop = (e) => {
|
|
748
|
+
if (!this.dragging) return;
|
|
749
|
+
let t = xt(e, this.touchIdentifier, this);
|
|
750
|
+
if (t == null) return;
|
|
751
|
+
let { x: n, y: r } = t;
|
|
752
|
+
if (Array.isArray(this.props.grid)) {
|
|
753
|
+
let e = n - this.lastX || 0, t = r - this.lastY || 0;
|
|
754
|
+
[e, t] = vt(this.props.grid, e, t), n = this.lastX + e, r = this.lastY + t;
|
|
755
|
+
}
|
|
756
|
+
let i = St(this, n, r);
|
|
757
|
+
if (!1 === this.props.onStop(e, i) || !1 === this.mounted) return !1;
|
|
758
|
+
let a = this.findDOMNode();
|
|
759
|
+
a && this.props.enableUserSelectHack && gt(a.ownerDocument), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, a && (lt(a.ownerDocument, Dt.move, this.handleDrag), lt(a.ownerDocument, Dt.stop, this.handleDragStop));
|
|
760
|
+
}, this.onMouseDown = (e) => (Dt = Et, this.handleDragStart(e)), this.onMouseUp = (e) => (Dt = Et, this.handleDragStop(e)), this.onTouchStart = (e) => (Dt = Tt, this.handleDragStart(e)), this.onTouchEnd = (e) => (Dt = Tt, this.handleDragStop(e));
|
|
761
|
+
}
|
|
762
|
+
componentDidMount() {
|
|
763
|
+
this.mounted = !0;
|
|
764
|
+
let e = this.findDOMNode();
|
|
765
|
+
e && ct(e, Tt.start, this.onTouchStart, { passive: !1 });
|
|
766
|
+
}
|
|
767
|
+
componentWillUnmount() {
|
|
768
|
+
this.mounted = !1;
|
|
769
|
+
let e = this.findDOMNode();
|
|
770
|
+
if (e) {
|
|
771
|
+
let { ownerDocument: t } = e;
|
|
772
|
+
lt(t, Et.move, this.handleDrag), lt(t, Tt.move, this.handleDrag), lt(t, Et.stop, this.handleDragStop), lt(t, Tt.stop, this.handleDragStop), lt(e, Tt.start, this.onTouchStart, { passive: !1 }), this.props.enableUserSelectHack && gt(t);
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
findDOMNode() {
|
|
776
|
+
if (this.props?.nodeRef) return this.props.nodeRef.current;
|
|
777
|
+
let e = pe;
|
|
778
|
+
return typeof e.findDOMNode == "function" ? e.findDOMNode(this) : null;
|
|
779
|
+
}
|
|
780
|
+
render() {
|
|
781
|
+
return b.cloneElement(b.Children.only(this.props.children), {
|
|
782
|
+
onMouseDown: this.onMouseDown,
|
|
783
|
+
onMouseUp: this.onMouseUp,
|
|
784
|
+
onTouchEnd: this.onTouchEnd
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
Ot.displayName = "DraggableCore", Ot.propTypes = {
|
|
789
|
+
allowAnyClick: B.default.bool,
|
|
790
|
+
allowMobileScroll: B.default.bool,
|
|
791
|
+
children: B.default.node.isRequired,
|
|
792
|
+
disabled: B.default.bool,
|
|
793
|
+
enableUserSelectHack: B.default.bool,
|
|
794
|
+
offsetParent: function(e, t) {
|
|
795
|
+
if (e[t] && e[t].nodeType !== 1) throw Error("Draggable's offsetParent must be a DOM Node.");
|
|
796
|
+
},
|
|
797
|
+
grid: B.default.arrayOf(B.default.number),
|
|
798
|
+
handle: B.default.string,
|
|
799
|
+
cancel: B.default.string,
|
|
800
|
+
nodeRef: B.default.object,
|
|
801
|
+
nonce: B.default.string,
|
|
802
|
+
onStart: B.default.func,
|
|
803
|
+
onDrag: B.default.func,
|
|
804
|
+
onStop: B.default.func,
|
|
805
|
+
onMouseDown: B.default.func,
|
|
806
|
+
scale: B.default.number,
|
|
807
|
+
className: tt,
|
|
808
|
+
style: tt,
|
|
809
|
+
transform: tt
|
|
810
|
+
}, Ot.defaultProps = {
|
|
811
|
+
allowAnyClick: !1,
|
|
812
|
+
allowMobileScroll: !1,
|
|
813
|
+
disabled: !1,
|
|
814
|
+
enableUserSelectHack: !0,
|
|
815
|
+
onStart: function() {},
|
|
816
|
+
onDrag: function() {},
|
|
817
|
+
onStop: function() {},
|
|
818
|
+
onMouseDown: function() {},
|
|
819
|
+
scale: 1
|
|
820
|
+
};
|
|
821
|
+
var kt = class extends b.Component {
|
|
822
|
+
constructor(e) {
|
|
823
|
+
super(e), this.onDragStart = (e, t) => {
|
|
824
|
+
if (!1 === this.props.onStart(e, Ct(this, t))) return !1;
|
|
825
|
+
this.setState({
|
|
826
|
+
dragging: !0,
|
|
827
|
+
dragged: !0
|
|
828
|
+
});
|
|
829
|
+
}, this.onDrag = (e, t) => {
|
|
830
|
+
if (!this.state.dragging) return !1;
|
|
831
|
+
let n = Ct(this, t), r = {
|
|
832
|
+
x: n.x,
|
|
833
|
+
y: n.y,
|
|
834
|
+
slackX: 0,
|
|
835
|
+
slackY: 0
|
|
836
|
+
};
|
|
837
|
+
if (this.props.bounds) {
|
|
838
|
+
let { x: e, y: t } = r;
|
|
839
|
+
r.x += this.state.slackX, r.y += this.state.slackY;
|
|
840
|
+
let [i, a] = function(e, t, n) {
|
|
841
|
+
if (!e.props.bounds) return [t, n];
|
|
842
|
+
let { bounds: r } = e.props;
|
|
843
|
+
r = typeof r == "string" ? r : function(e) {
|
|
844
|
+
return {
|
|
845
|
+
left: e.left,
|
|
846
|
+
top: e.top,
|
|
847
|
+
right: e.right,
|
|
848
|
+
bottom: e.bottom
|
|
849
|
+
};
|
|
850
|
+
}(r);
|
|
851
|
+
let i = wt(e);
|
|
852
|
+
if (typeof r == "string") {
|
|
853
|
+
let { ownerDocument: e } = i, t = e.defaultView;
|
|
854
|
+
if (!t) throw Error("Cannot resolve the owner window of the draggable node.");
|
|
855
|
+
let n;
|
|
856
|
+
if (n = r === "parent" ? i.parentNode : i.getRootNode().querySelector(r), !(n instanceof t.HTMLElement)) throw Error("Bounds selector \"" + r + "\" could not find an element.");
|
|
857
|
+
let a = n, o = t.getComputedStyle(i), s = t.getComputedStyle(a);
|
|
858
|
+
r = {
|
|
859
|
+
left: -i.offsetLeft + V(s.paddingLeft) + V(o.marginLeft),
|
|
860
|
+
top: -i.offsetTop + V(s.paddingTop) + V(o.marginTop),
|
|
861
|
+
right: pt(a) - dt(i) - i.offsetLeft + V(s.paddingRight) - V(o.marginRight),
|
|
862
|
+
bottom: ft(a) - ut(i) - i.offsetTop + V(s.paddingBottom) - V(o.marginBottom)
|
|
863
|
+
};
|
|
864
|
+
}
|
|
865
|
+
return et(r.right) && (t = Math.min(t, r.right)), et(r.bottom) && (n = Math.min(n, r.bottom)), et(r.left) && (t = Math.max(t, r.left)), et(r.top) && (n = Math.max(n, r.top)), [t, n];
|
|
866
|
+
}(this, r.x, r.y);
|
|
867
|
+
r.x = i, r.y = a, r.slackX = this.state.slackX + (e - r.x), r.slackY = this.state.slackY + (t - r.y), n.x = r.x, n.y = r.y, n.deltaX = r.x - this.state.x, n.deltaY = r.y - this.state.y;
|
|
868
|
+
}
|
|
869
|
+
if (!1 === this.props.onDrag(e, n)) return !1;
|
|
870
|
+
this.setState(r);
|
|
871
|
+
}, this.onDragStop = (e, t) => {
|
|
872
|
+
if (!this.state.dragging || !1 === this.props.onStop(e, Ct(this, t))) return !1;
|
|
873
|
+
let n = {
|
|
874
|
+
dragging: !1,
|
|
875
|
+
slackX: 0,
|
|
876
|
+
slackY: 0
|
|
877
|
+
};
|
|
878
|
+
if (this.props.position) {
|
|
879
|
+
let { x: e, y: t } = this.props.position;
|
|
880
|
+
n.x = e, n.y = t;
|
|
881
|
+
}
|
|
882
|
+
this.setState(n);
|
|
883
|
+
}, this.state = {
|
|
884
|
+
dragging: !1,
|
|
885
|
+
dragged: !1,
|
|
886
|
+
x: e.position ? e.position.x : e.defaultPosition.x,
|
|
887
|
+
y: e.position ? e.position.y : e.defaultPosition.y,
|
|
888
|
+
prevPropsPosition: { ...e.position },
|
|
889
|
+
slackX: 0,
|
|
890
|
+
slackY: 0,
|
|
891
|
+
isElementSVG: !1
|
|
892
|
+
}, !e.position || e.onDrag || e.onStop || console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
|
|
893
|
+
}
|
|
894
|
+
static getDerivedStateFromProps({ position: e }, { prevPropsPosition: t }) {
|
|
895
|
+
return !e || t && e.x === t.x && e.y === t.y ? null : {
|
|
896
|
+
x: e.x,
|
|
897
|
+
y: e.y,
|
|
898
|
+
prevPropsPosition: { ...e }
|
|
899
|
+
};
|
|
900
|
+
}
|
|
901
|
+
componentDidMount() {
|
|
902
|
+
window.SVGElement !== void 0 && this.findDOMNode() instanceof window.SVGElement && this.setState({ isElementSVG: !0 });
|
|
903
|
+
}
|
|
904
|
+
componentWillUnmount() {
|
|
905
|
+
this.state.dragging && this.setState({ dragging: !1 });
|
|
906
|
+
}
|
|
907
|
+
findDOMNode() {
|
|
908
|
+
if (this.props?.nodeRef) return this.props.nodeRef.current;
|
|
909
|
+
let e = pe;
|
|
910
|
+
return typeof e.findDOMNode == "function" ? e.findDOMNode(this) : null;
|
|
911
|
+
}
|
|
912
|
+
render() {
|
|
913
|
+
let { axis: e, bounds: t, children: n, defaultPosition: r, defaultClassName: i, defaultClassNameDragging: a, defaultClassNameDragged: o, position: s, positionOffset: c, scale: l, ...u } = this.props, d = {}, f = null, p = !s || this.state.dragging, m = s || r, h = {
|
|
914
|
+
x: yt(this) && p ? this.state.x : m.x,
|
|
915
|
+
y: bt(this) && p ? this.state.y : m.y
|
|
916
|
+
};
|
|
917
|
+
this.state.isElementSVG ? f = function(e, t) {
|
|
918
|
+
return mt(e, t, "");
|
|
919
|
+
}(h, c) : d = function(e, t) {
|
|
920
|
+
let n = mt(e, t, "px");
|
|
921
|
+
return { [rt("transform", it)]: n };
|
|
922
|
+
}(h, c);
|
|
923
|
+
let g = b.Children.only(n), _ = we(g.props.className || "", i, {
|
|
924
|
+
[a]: this.state.dragging,
|
|
925
|
+
[o]: this.state.dragged
|
|
926
|
+
});
|
|
927
|
+
return b.createElement(Ot, {
|
|
928
|
+
...u,
|
|
929
|
+
onStart: this.onDragStart,
|
|
930
|
+
onDrag: this.onDrag,
|
|
931
|
+
onStop: this.onDragStop
|
|
932
|
+
}, b.cloneElement(g, {
|
|
933
|
+
className: _,
|
|
934
|
+
style: {
|
|
935
|
+
...g.props.style,
|
|
936
|
+
...d
|
|
937
|
+
},
|
|
938
|
+
transform: f
|
|
939
|
+
}));
|
|
940
|
+
}
|
|
941
|
+
};
|
|
942
|
+
kt.displayName = "Draggable", kt.propTypes = {
|
|
943
|
+
...Ot.propTypes,
|
|
944
|
+
axis: B.default.oneOf([
|
|
945
|
+
"both",
|
|
946
|
+
"x",
|
|
947
|
+
"y",
|
|
948
|
+
"none"
|
|
949
|
+
]),
|
|
950
|
+
bounds: B.default.oneOfType([
|
|
951
|
+
B.default.shape({
|
|
952
|
+
left: B.default.number,
|
|
953
|
+
right: B.default.number,
|
|
954
|
+
top: B.default.number,
|
|
955
|
+
bottom: B.default.number
|
|
956
|
+
}),
|
|
957
|
+
B.default.string,
|
|
958
|
+
B.default.oneOf([!1])
|
|
959
|
+
]),
|
|
960
|
+
defaultClassName: B.default.string,
|
|
961
|
+
defaultClassNameDragging: B.default.string,
|
|
962
|
+
defaultClassNameDragged: B.default.string,
|
|
963
|
+
defaultPosition: B.default.shape({
|
|
964
|
+
x: B.default.number,
|
|
965
|
+
y: B.default.number
|
|
966
|
+
}),
|
|
967
|
+
positionOffset: B.default.shape({
|
|
968
|
+
x: B.default.oneOfType([B.default.number, B.default.string]),
|
|
969
|
+
y: B.default.oneOfType([B.default.number, B.default.string])
|
|
970
|
+
}),
|
|
971
|
+
position: B.default.shape({
|
|
972
|
+
x: B.default.number,
|
|
973
|
+
y: B.default.number
|
|
974
|
+
}),
|
|
975
|
+
className: tt,
|
|
976
|
+
style: tt,
|
|
977
|
+
transform: tt
|
|
978
|
+
}, kt.defaultProps = {
|
|
979
|
+
...Ot.defaultProps,
|
|
980
|
+
axis: "both",
|
|
981
|
+
bounds: !1,
|
|
982
|
+
defaultClassName: "react-draggable",
|
|
983
|
+
defaultClassNameDragging: "react-draggable-dragging",
|
|
984
|
+
defaultClassNameDragged: "react-draggable-dragged",
|
|
985
|
+
defaultPosition: {
|
|
986
|
+
x: 0,
|
|
987
|
+
y: 0
|
|
988
|
+
},
|
|
989
|
+
scale: 1
|
|
990
|
+
};
|
|
991
|
+
var At = kt;
|
|
992
|
+
Ye();
|
|
993
|
+
var jt = {
|
|
994
|
+
x: 0,
|
|
995
|
+
y: 0
|
|
996
|
+
}, Mt = T(w((e, t) => {
|
|
997
|
+
let { defaultPosition: n = jt, PaperComponent: r = u, onDragStop: i, rootSel: a = ".MuiModal-root", handleSel: o = ".draggable-title", titleSize: s, rootSize: c, ...l } = e, d = A(null), f = k(() => s?.width && s?.height && c?.width && c?.height ? {
|
|
998
|
+
left: 0,
|
|
999
|
+
top: 0,
|
|
1000
|
+
right: c.width - s.width,
|
|
1001
|
+
bottom: c.height - s.height
|
|
1002
|
+
} : null, [s, c]), [p, m] = j(null), [h, g] = j(null), _ = p ?? n ?? null, y = k(() => _ && f ? {
|
|
1003
|
+
x: Math.max(0, Math.min(_.x, f.right)),
|
|
1004
|
+
y: Math.max(0, Math.min(_.y, f.bottom))
|
|
1005
|
+
} : _, [_, f]), b = De([d, t]);
|
|
1006
|
+
return v(At, {
|
|
1007
|
+
nodeRef: d,
|
|
1008
|
+
handle: o,
|
|
1009
|
+
cancel: "[class*=\"MuiDialogContent-root\"]",
|
|
1010
|
+
position: y ?? void 0,
|
|
1011
|
+
bounds: f ?? ".MuiModal-root",
|
|
1012
|
+
enableUserSelectHack: !1,
|
|
1013
|
+
onStop: i,
|
|
1014
|
+
onStart: (e, t) => {
|
|
1015
|
+
let n = e;
|
|
1016
|
+
g({
|
|
1017
|
+
x: (n.clientX ?? n.touches?.[0]?.clientX) - t.x,
|
|
1018
|
+
y: (n.clientY ?? n.touches?.[0]?.clientY) - t.y
|
|
1019
|
+
});
|
|
1020
|
+
},
|
|
1021
|
+
onDrag: (e, t) => {
|
|
1022
|
+
let n = e;
|
|
1023
|
+
if (!h) return;
|
|
1024
|
+
let r = n.clientX ?? n.touches?.[0]?.clientX, i = n.clientY ?? n.touches?.[0]?.clientY;
|
|
1025
|
+
m({
|
|
1026
|
+
x: r - h.x,
|
|
1027
|
+
y: i - h.y
|
|
1028
|
+
});
|
|
1029
|
+
},
|
|
1030
|
+
children: v(r, {
|
|
1031
|
+
ref: b,
|
|
1032
|
+
...l
|
|
1033
|
+
})
|
|
1034
|
+
});
|
|
1035
|
+
})), Nt = {
|
|
1036
|
+
x: "50",
|
|
1037
|
+
y: "50"
|
|
1038
|
+
}, Pt = T(w((n, r) => {
|
|
1039
|
+
let i = g({
|
|
1040
|
+
props: n,
|
|
1041
|
+
name: "MuiDialog"
|
|
1042
|
+
}), a = h(), o = ue(), d = {
|
|
1043
|
+
enter: .66 * a.transitions.duration.enteringScreen,
|
|
1044
|
+
exit: .66 * a.transitions.duration.leavingScreen
|
|
1045
|
+
}, { title: f = "SheetXL", onCancel: m, onDone: _, onShow: b, onShown: x, onHide: S, onClose: C, open: w, autoFocusSel: T, children: k, transitionDuration: M = d, TransitionProps: P, slots: F = I.EmptyArray, slotProps: ee = I.EmptyArray, sx: L, className: R, onMouseDown: re, initialPosition: z = Nt, isModal: fe = !1, suspendModal: pe = !1, restoreFocus: he = !0, disableAutoDestroy: ge = !1, revealToken: _e, startHidden: ve = !1, ...ye } = i, be = F.transition ?? c, xe = F.backdrop ?? e, Se = F.paper ?? u, Ce = ee.transition;
|
|
1046
|
+
P && (Ce = {
|
|
1047
|
+
...P,
|
|
1048
|
+
...Ce
|
|
1049
|
+
});
|
|
1050
|
+
let Te = ee.backdrop, Ee = ee.paper, [Oe, ke] = j(null), [Ae, je] = j(!1), [Me, Ne] = j(!1), Pe = A(null), [Fe, Ie] = le(), Le = A(null), Re = A(null), [ze, Be] = le(), He = A(null), Ue = D(), We = A(null);
|
|
1051
|
+
O(() => {
|
|
1052
|
+
if (!Oe || ve) return;
|
|
1053
|
+
let e = !!w;
|
|
1054
|
+
We.current !== e && (We.current = e, je(e));
|
|
1055
|
+
}, [
|
|
1056
|
+
w,
|
|
1057
|
+
Oe,
|
|
1058
|
+
ve
|
|
1059
|
+
]);
|
|
1060
|
+
let Ke = ae(() => {
|
|
1061
|
+
m?.(), je(!1);
|
|
1062
|
+
}, [m]);
|
|
1063
|
+
O(() => {
|
|
1064
|
+
if (Oe) return;
|
|
1065
|
+
let e = Le.current, t = He.current;
|
|
1066
|
+
if (!e || !t) return;
|
|
1067
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
|
|
1068
|
+
if (n.width === 0 && n.height === 0 || r.width === 0 && r.height === 0) return;
|
|
1069
|
+
let i = n.height - r.height, a = n.width - r.width, o = .5 * a, s = .5 * i;
|
|
1070
|
+
typeof z?.x == "number" ? o = z.x : typeof z?.x == "string" && (o = a * (parseFloat(z.x) / 100)), typeof z?.y == "number" ? s = z.y : typeof z?.y == "string" && (s = i * (parseFloat(z.y) / 100)), ke({
|
|
1071
|
+
x: o,
|
|
1072
|
+
y: s
|
|
1073
|
+
});
|
|
1074
|
+
});
|
|
1075
|
+
let [qe, Je] = j(!1), [Ye, Xe] = j(null), [Ze, B] = j(null), Qe = ae((e) => {
|
|
1076
|
+
if (Ye) return Ye.focus(e), !0;
|
|
1077
|
+
if (T) {
|
|
1078
|
+
let t = Re.current?.querySelectorAll?.(T);
|
|
1079
|
+
if (t && t.length > 0) return t[0]?.focus?.(e), !0;
|
|
1080
|
+
}
|
|
1081
|
+
return Re.current?.focus?.(e), !1;
|
|
1082
|
+
}, [Ye, T]), $e = ce(r, () => ({ focus: (e) => {
|
|
1083
|
+
Qe(e);
|
|
1084
|
+
} }), []), et = A(_e);
|
|
1085
|
+
E(() => {
|
|
1086
|
+
_e !== et.current && (et.current = _e, je(!0));
|
|
1087
|
+
}, [_e]);
|
|
1088
|
+
let V = {
|
|
1089
|
+
...Ce,
|
|
1090
|
+
onExited: (e) => {
|
|
1091
|
+
_?.(null), ge || Ce?.onExited?.(e);
|
|
1092
|
+
},
|
|
1093
|
+
onExit: (e) => {
|
|
1094
|
+
let t = Ze, n = typeof he == "function" ? he() : he;
|
|
1095
|
+
t && !1 !== n && requestAnimationFrame(() => {
|
|
1096
|
+
$e.current?.contains(document.activeElement) && t.focus();
|
|
1097
|
+
}), S?.(), Ne(!1), Ce?.onExit?.(e);
|
|
1098
|
+
},
|
|
1099
|
+
onEntered: (e, t) => {
|
|
1100
|
+
b?.(), Ce?.onEntered?.(e, t);
|
|
1101
|
+
},
|
|
1102
|
+
onEntering: (e, t) => {
|
|
1103
|
+
Ne(!0), x?.($e.current);
|
|
1104
|
+
}
|
|
1105
|
+
};
|
|
1106
|
+
E(() => {
|
|
1107
|
+
Me && Qe();
|
|
1108
|
+
}, [Me]);
|
|
1109
|
+
let tt = De([He, r]), nt = v(p, {
|
|
1110
|
+
open: Me,
|
|
1111
|
+
disableAutoFocus: !0,
|
|
1112
|
+
disableEnforceFocus: !qe,
|
|
1113
|
+
disableRestoreFocus: !0 !== he,
|
|
1114
|
+
children: v(be, {
|
|
1115
|
+
in: Ae,
|
|
1116
|
+
timeout: M,
|
|
1117
|
+
role: "presentation",
|
|
1118
|
+
...V,
|
|
1119
|
+
children: v(t, {
|
|
1120
|
+
className: "MuiDialog-container",
|
|
1121
|
+
ref: Re,
|
|
1122
|
+
tabIndex: 0,
|
|
1123
|
+
sx: {
|
|
1124
|
+
outline: "none",
|
|
1125
|
+
position: "relative"
|
|
1126
|
+
},
|
|
1127
|
+
onKeyDown: (e) => {
|
|
1128
|
+
e.which === ne.Escape && (Ke(), Pe.current?.start(e, { center: !1 }), setTimeout(() => Pe.current?.stop(e), 180)), e.stopPropagation();
|
|
1129
|
+
},
|
|
1130
|
+
children: y(Mt, {
|
|
1131
|
+
ref: tt,
|
|
1132
|
+
className: we({ "Mui-focusVisible": qe }, R, "draggable"),
|
|
1133
|
+
sx: {
|
|
1134
|
+
"& *": (e) => Ve(e),
|
|
1135
|
+
pointerEvents: "auto",
|
|
1136
|
+
userSelect: "none",
|
|
1137
|
+
backgroundColor: "var(--sxl-color-elevated, var(--sxl-color-base-100))",
|
|
1138
|
+
border: "1px solid var(--sxl-color-elevated-border, transparent)",
|
|
1139
|
+
"&:hover:not([disabled]):not(.Mui-focusVisible)": { outline: (e) => `solid ${N(e.palette.text?.primary, .2)} 1px` },
|
|
1140
|
+
"&.Mui-focusVisible": { outline: (e) => `solid ${N(e.palette.text?.primary, .2)} 1px` },
|
|
1141
|
+
position: "absolute",
|
|
1142
|
+
maxWidth: "100%",
|
|
1143
|
+
...L
|
|
1144
|
+
},
|
|
1145
|
+
defaultPosition: Oe,
|
|
1146
|
+
titleSize: Be,
|
|
1147
|
+
rootSize: Ie,
|
|
1148
|
+
PaperComponent: Se,
|
|
1149
|
+
...ye,
|
|
1150
|
+
...Ee,
|
|
1151
|
+
children: [f ? v(s, {
|
|
1152
|
+
className: we({ "Mui-selected": qe }, "draggable-title"),
|
|
1153
|
+
sx: {
|
|
1154
|
+
cursor: "move",
|
|
1155
|
+
display: "flex",
|
|
1156
|
+
color: (e) => e.palette.text.secondary,
|
|
1157
|
+
boxSizing: "border-box",
|
|
1158
|
+
padding: "0 0",
|
|
1159
|
+
transitionProperty: "opacity",
|
|
1160
|
+
transitionDuration: (e) => `${e.transitions.duration.shortest}ms`,
|
|
1161
|
+
opacity: .7,
|
|
1162
|
+
"&.Mui-selected": {
|
|
1163
|
+
opacity: 1,
|
|
1164
|
+
transitionDuration: (e) => e.transitions.duration.shortest / 2 + "ms"
|
|
1165
|
+
},
|
|
1166
|
+
backgroundColor: (e) => N(e.palette.action.hover, .03)
|
|
1167
|
+
},
|
|
1168
|
+
ref: ze,
|
|
1169
|
+
children: y(t, {
|
|
1170
|
+
sx: {
|
|
1171
|
+
display: "flex",
|
|
1172
|
+
flex: "1 1 10%",
|
|
1173
|
+
flexDirection: "row",
|
|
1174
|
+
alignItems: "center",
|
|
1175
|
+
marginTop: (e) => e.spacing(.25),
|
|
1176
|
+
marginBottom: (e) => e.spacing(.25),
|
|
1177
|
+
marginLeft: (e) => e.spacing(1),
|
|
1178
|
+
marginRight: (e) => e.spacing(1)
|
|
1179
|
+
},
|
|
1180
|
+
children: [v(t, {
|
|
1181
|
+
sx: {
|
|
1182
|
+
flex: "1 1 100%",
|
|
1183
|
+
paddingLeft: (e) => e.spacing(1)
|
|
1184
|
+
},
|
|
1185
|
+
children: f
|
|
1186
|
+
}), v(Ge, {
|
|
1187
|
+
label: o("window.close"),
|
|
1188
|
+
children: v(l, {
|
|
1189
|
+
"aria-label": "close",
|
|
1190
|
+
sx: { color: (e) => e.palette.text.icon ?? e.palette.action.active },
|
|
1191
|
+
touchRippleRef: Pe,
|
|
1192
|
+
onPointerDown: (e) => {
|
|
1193
|
+
Pe.current?.start(e, { center: !1 }), e.stopPropagation(), e.preventDefault();
|
|
1194
|
+
},
|
|
1195
|
+
onPointerUp: Ke,
|
|
1196
|
+
children: v(te, { iconKey: "Close" })
|
|
1197
|
+
})
|
|
1198
|
+
})]
|
|
1199
|
+
})
|
|
1200
|
+
}) : null, k]
|
|
1201
|
+
})
|
|
1202
|
+
})
|
|
1203
|
+
})
|
|
1204
|
+
}), rt = null;
|
|
1205
|
+
fe && !pe && (rt = v(xe, {
|
|
1206
|
+
...Te,
|
|
1207
|
+
open: Ae,
|
|
1208
|
+
onMouseDown: (e) => {
|
|
1209
|
+
Ke(), Te?.onMouseDown?.(e);
|
|
1210
|
+
},
|
|
1211
|
+
onClick: (e) => {
|
|
1212
|
+
C?.(e, "backdropClick"), Te?.onClick?.(e);
|
|
1213
|
+
},
|
|
1214
|
+
sx: {
|
|
1215
|
+
pointerEvents: "auto",
|
|
1216
|
+
...Te?.sx
|
|
1217
|
+
}
|
|
1218
|
+
}));
|
|
1219
|
+
let { getPortalContainer: it } = se(), { className: at, attrs: ot } = ie(oe()?.themeScope), st = De([
|
|
1220
|
+
$e,
|
|
1221
|
+
Fe,
|
|
1222
|
+
Le
|
|
1223
|
+
]);
|
|
1224
|
+
return me(y(t, {
|
|
1225
|
+
className: we("MuiModal-root", at),
|
|
1226
|
+
...ot,
|
|
1227
|
+
sx: {
|
|
1228
|
+
position: "fixed",
|
|
1229
|
+
zIndex: de("popup"),
|
|
1230
|
+
right: "0",
|
|
1231
|
+
bottom: "0",
|
|
1232
|
+
top: "0",
|
|
1233
|
+
left: "0",
|
|
1234
|
+
outline: "0",
|
|
1235
|
+
display: "block",
|
|
1236
|
+
pointerEvents: "none"
|
|
1237
|
+
},
|
|
1238
|
+
ref: st,
|
|
1239
|
+
onPointerDown: (e) => {
|
|
1240
|
+
qe && (e.target === Re.current || e.target.tabIndex < 0) && Re.current?.contains(document.activeElement);
|
|
1241
|
+
},
|
|
1242
|
+
onContextMenu: (e) => {
|
|
1243
|
+
e.isPropagationStopped() || e.preventDefault();
|
|
1244
|
+
},
|
|
1245
|
+
onFocus: (e) => {
|
|
1246
|
+
!qe && (e.target === Re.current || e.target.tabIndex < 0) && setTimeout(() => {
|
|
1247
|
+
Qe();
|
|
1248
|
+
}, 100), Je(!0), Re.current?.contains(e.target) && e.target !== Re.current && Xe(e.target), e.relatedTarget && !Ze && B(e.relatedTarget);
|
|
1249
|
+
},
|
|
1250
|
+
onBlur: (e) => {
|
|
1251
|
+
$e?.current?.contains(e.relatedTarget) || (B(null), Je(!1));
|
|
1252
|
+
},
|
|
1253
|
+
children: [rt, nt]
|
|
1254
|
+
}), it(), Ue);
|
|
1255
|
+
})), H = typeof window < "u" ? window : {
|
|
1256
|
+
screen: {},
|
|
1257
|
+
navigator: {}
|
|
1258
|
+
}, Ft = (H.matchMedia || function() {
|
|
1259
|
+
return { matches: !1 };
|
|
1260
|
+
}).bind(H), It = { get passive() {
|
|
1261
|
+
return !0;
|
|
1262
|
+
} }, Lt = function() {};
|
|
1263
|
+
H.addEventListener && H.addEventListener("p", Lt, It), H.removeEventListener && H.removeEventListener("p", Lt, !1);
|
|
1264
|
+
var Rt = "ontouchstart" in H, zt = Rt || "TouchEvent" in H && Ft("(any-pointer: coarse)").matches, Bt = (H.navigator.maxTouchPoints || 0) > 0 || zt, Vt = H.navigator.userAgent || "", Ht = Ft("(pointer: coarse)").matches && /iPad|Macintosh/.test(Vt) && Math.min(H.screen.width || 0, H.screen.height || 0) >= 768, Ut = (Ft("(pointer: coarse)").matches || !Ft("(pointer: fine)").matches && Rt) && !/Windows.*Firefox/.test(Vt), Wt = Ft("(any-pointer: fine)").matches || Ft("(any-hover: hover)").matches || Ht || !Rt, Gt = !Bt || !Wt && Ut ? Bt ? "touchOnly" : "mouseOnly" : "hybrid", Kt = Gt === "mouseOnly" ? "mouse" : Gt === "touchOnly" || Ut ? "touch" : "mouse", qt = (e) => e.type === "checkbox", Jt = (e) => e.type === "file", Yt = (e) => e instanceof Date, U = (e) => e == null, Xt = (e) => typeof e == "object", W = (e) => !U(e) && !Array.isArray(e) && Xt(e) && !Yt(e), Zt = /[.[\]'"]/, Qt = (e) => e.split(Zt).filter(Boolean), $t = typeof window < "u" && window.HTMLElement !== void 0 && typeof document < "u";
|
|
1265
|
+
function G(e) {
|
|
1266
|
+
if (typeof e != "object" || !e) return e;
|
|
1267
|
+
if (e instanceof Date) return new Date(e);
|
|
1268
|
+
let t = typeof Blob < "u" && e instanceof Blob, n = typeof FileList < "u" && e instanceof FileList;
|
|
1269
|
+
if ($t && (t || n)) return e;
|
|
1270
|
+
let r = Array.isArray(e);
|
|
1271
|
+
if (!r && e.constructor !== Object) return e;
|
|
1272
|
+
let i = r ? [] : Object.create(Object.getPrototypeOf(e));
|
|
1273
|
+
for (let t in e) Object.prototype.hasOwnProperty.call(e, t) && (i[t] = G(e[t]));
|
|
1274
|
+
return i;
|
|
1275
|
+
}
|
|
1276
|
+
var en = "blur", tn = "focusout", nn = "submit", rn = "trigger", an = "valid", on = "onBlur", sn = "onChange", cn = "onSubmit", ln = "onTouched", un = "all", dn = "max", fn = "min", pn = "maxLength", mn = "minLength", hn = "pattern", gn = "required", _n = "validate", vn = [
|
|
1277
|
+
gn,
|
|
1278
|
+
fn,
|
|
1279
|
+
dn,
|
|
1280
|
+
mn,
|
|
1281
|
+
pn,
|
|
1282
|
+
hn,
|
|
1283
|
+
_n
|
|
1284
|
+
], yn = "form", bn = "root", xn = [
|
|
1285
|
+
"__proto__",
|
|
1286
|
+
"constructor",
|
|
1287
|
+
"prototype"
|
|
1288
|
+
], Sn = /^\w*$/, Cn = (e) => Sn.test(e), K = (e) => e === void 0, q = (e, t, n) => {
|
|
1289
|
+
if (!t || !W(e)) return n;
|
|
1290
|
+
let r = Cn(t) ? [t] : Qt(t);
|
|
1291
|
+
if (r.some((e) => xn.includes(e))) return n;
|
|
1292
|
+
let i = r.reduce((e, t) => U(e) ? void 0 : e[t], e);
|
|
1293
|
+
return K(i) || i === e ? K(e[t]) ? n : e[t] : i;
|
|
1294
|
+
}, wn = (e) => typeof e == "boolean", J = (e) => typeof e == "function", Y = (e, t, n) => {
|
|
1295
|
+
let r = -1, i = Cn(t) ? [t] : Qt(t), a = i.length, o = a - 1;
|
|
1296
|
+
for (; ++r < a;) {
|
|
1297
|
+
let t = i[r], a = n;
|
|
1298
|
+
if (r !== o) {
|
|
1299
|
+
let n = e[t];
|
|
1300
|
+
a = W(n) || Array.isArray(n) ? n : isNaN(+i[r + 1]) ? {} : [];
|
|
1301
|
+
}
|
|
1302
|
+
if (xn.includes(t)) return;
|
|
1303
|
+
e[t] = a, e = e[t];
|
|
1304
|
+
}
|
|
1305
|
+
}, Tn = x.createContext(null);
|
|
1306
|
+
Tn.displayName = "HookFormControlContext";
|
|
1307
|
+
var En = $t ? x.useLayoutEffect : x.useEffect, Dn = (e) => U(e) || !Xt(e), On = (e, t) => t.length === 0 && !Array.isArray(e) && !((e) => {
|
|
1308
|
+
let t = e.constructor && e.constructor.prototype;
|
|
1309
|
+
return W(t) && t.hasOwnProperty("isPrototypeOf");
|
|
1310
|
+
})(e);
|
|
1311
|
+
function X(e, t, n = /* @__PURE__ */ new WeakMap()) {
|
|
1312
|
+
if (e === t) return !0;
|
|
1313
|
+
if (Dn(e) || Dn(t)) return Object.is(e, t);
|
|
1314
|
+
if (Yt(e) && Yt(t)) return Object.is(e.getTime(), t.getTime());
|
|
1315
|
+
let r = Object.keys(e), i = Object.keys(t);
|
|
1316
|
+
if (r.length !== i.length) return !1;
|
|
1317
|
+
if (On(e, r) || On(t, i)) return Object.is(e, t);
|
|
1318
|
+
if (!r.length && Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
1319
|
+
let a = n.get(e);
|
|
1320
|
+
if (a && a.has(t)) return !0;
|
|
1321
|
+
if (a) a.add(t);
|
|
1322
|
+
else {
|
|
1323
|
+
let r = /* @__PURE__ */ new WeakSet();
|
|
1324
|
+
r.add(t), n.set(e, r);
|
|
1325
|
+
}
|
|
1326
|
+
for (let i of r) {
|
|
1327
|
+
let r = e[i];
|
|
1328
|
+
if (!(i in t)) return !1;
|
|
1329
|
+
if (i !== "ref") {
|
|
1330
|
+
let e = t[i];
|
|
1331
|
+
if (Yt(r) && Yt(e) || (W(r) || Array.isArray(r)) && (W(e) || Array.isArray(e)) ? !X(r, e, n) : !Object.is(r, e)) return !1;
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
return !0;
|
|
1335
|
+
}
|
|
1336
|
+
var Z = (e) => typeof e == "string", kn = (e) => ({
|
|
1337
|
+
isOnSubmit: !e || e === cn,
|
|
1338
|
+
isOnBlur: e === on,
|
|
1339
|
+
isOnChange: e === sn,
|
|
1340
|
+
isOnAll: e === un,
|
|
1341
|
+
isOnTouch: e === ln
|
|
1342
|
+
}), An = (e, t, n) => {
|
|
1343
|
+
if (n) return !1;
|
|
1344
|
+
if (t.watchAll || t.watch.has(e)) return !0;
|
|
1345
|
+
for (let n of t.watch) if (e.startsWith(n) && e.charAt(n.length) === ".") return !0;
|
|
1346
|
+
return !1;
|
|
1347
|
+
}, jn = (e, t, n) => {
|
|
1348
|
+
for (let r of n || Object.keys(e)) {
|
|
1349
|
+
if (r === "_f") continue;
|
|
1350
|
+
let i = n ? q(e, r) : e[r];
|
|
1351
|
+
if (i) {
|
|
1352
|
+
let { _f: e } = i;
|
|
1353
|
+
if (e) {
|
|
1354
|
+
if (e.refs && e.refs[0] && t(e.refs[0], e.name) || e.ref && t(e.ref, e.name) || jn(i, t)) return !0;
|
|
1355
|
+
} else if ((W(i) || Array.isArray(i)) && jn(i, t)) return !0;
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
}, Mn = (e, t, n) => {
|
|
1359
|
+
let r = q(e, n), i = Array.isArray(r) ? r : [];
|
|
1360
|
+
return Y(i, bn, t[n]), Y(e, n, i), e;
|
|
1361
|
+
}, Q = (e) => W(e) && !Object.keys(e).length, Nn = (e) => {
|
|
1362
|
+
if (!$t) return !1;
|
|
1363
|
+
let t = e ? e.ownerDocument : 0;
|
|
1364
|
+
return e instanceof (t && t.defaultView ? t.defaultView.HTMLElement : HTMLElement);
|
|
1365
|
+
}, Pn = (e) => e.type === "radio", Fn = (e) => e instanceof RegExp, In = (e, t, n, r, i) => t ? {
|
|
1366
|
+
...n[e],
|
|
1367
|
+
types: {
|
|
1368
|
+
...n[e] && n[e].types ? n[e].types : {},
|
|
1369
|
+
[r]: i || !0
|
|
1370
|
+
}
|
|
1371
|
+
} : {}, Ln = {
|
|
1372
|
+
value: !1,
|
|
1373
|
+
isValid: !1
|
|
1374
|
+
}, Rn = {
|
|
1375
|
+
value: !0,
|
|
1376
|
+
isValid: !0
|
|
1377
|
+
}, zn = (e) => {
|
|
1378
|
+
if (!Array.isArray(e)) return Ln;
|
|
1379
|
+
if (e.length > 1) {
|
|
1380
|
+
let t = e.filter((e) => e && e.checked && !e.disabled).map((e) => e.value);
|
|
1381
|
+
return {
|
|
1382
|
+
value: t,
|
|
1383
|
+
isValid: !!t.length
|
|
1384
|
+
};
|
|
1385
|
+
}
|
|
1386
|
+
let t = e[0];
|
|
1387
|
+
return t && t.checked && !t.disabled ? t.attributes && "value" in t.attributes ? K(t.value) || t.value === "" ? Rn : {
|
|
1388
|
+
value: t.value,
|
|
1389
|
+
isValid: !0
|
|
1390
|
+
} : Rn : Ln;
|
|
1391
|
+
}, Bn = {
|
|
1392
|
+
isValid: !1,
|
|
1393
|
+
value: null
|
|
1394
|
+
}, Vn = (e) => Array.isArray(e) ? e.reduce((e, t) => t && t.checked && !t.disabled ? {
|
|
1395
|
+
isValid: !0,
|
|
1396
|
+
value: t.value
|
|
1397
|
+
} : e, Bn) : Bn;
|
|
1398
|
+
function Hn(e, t, n = "validate") {
|
|
1399
|
+
if (Z(e) || Array.isArray(e) && e.every(Z) || wn(e) && !e) return {
|
|
1400
|
+
type: n,
|
|
1401
|
+
message: Z(e) ? e : "",
|
|
1402
|
+
ref: t
|
|
1403
|
+
};
|
|
1404
|
+
}
|
|
1405
|
+
var Un = (e) => W(e) && !Fn(e) ? e : {
|
|
1406
|
+
value: e,
|
|
1407
|
+
message: ""
|
|
1408
|
+
}, Wn = async (e, t, n, r, i, a) => {
|
|
1409
|
+
let { ref: o, refs: s, required: c, maxLength: l, minLength: u, min: d, max: f, pattern: p, validate: m, name: h, valueAsNumber: g, mount: _, _c: v } = e._f, y = q(n, h);
|
|
1410
|
+
if (!_ || t.has(h)) return {};
|
|
1411
|
+
let b = s ? s[0] : o, x = (e) => {
|
|
1412
|
+
if (i && b.reportValidity) {
|
|
1413
|
+
let t = wn(e) ? "" : e || "";
|
|
1414
|
+
s ? s.forEach((e) => J(e.setCustomValidity) && e.setCustomValidity(t)) : b.setCustomValidity(t), b.reportValidity();
|
|
1415
|
+
}
|
|
1416
|
+
}, S = {}, C = Pn(o), w = qt(o), T = C || w, E = (g || Jt(o)) && K(o.value) && K(y) || Nn(o) && o.value === "" && !v || y === "" || Array.isArray(y) && !y.length, D = In.bind(null, h, r, S), O = (e, t, n, r = pn, i = mn) => {
|
|
1417
|
+
let a = e ? t : n;
|
|
1418
|
+
S[h] = {
|
|
1419
|
+
type: e ? r : i,
|
|
1420
|
+
message: a,
|
|
1421
|
+
ref: o,
|
|
1422
|
+
...D(e ? r : i, a)
|
|
1423
|
+
};
|
|
1424
|
+
};
|
|
1425
|
+
if (a ? !Array.isArray(y) || !y.length : c && (!T && (E || U(y)) || wn(y) && !y || w && !zn(s).isValid || C && !Vn(s).isValid)) {
|
|
1426
|
+
let { value: e, message: t } = Z(c) ? {
|
|
1427
|
+
value: !!c,
|
|
1428
|
+
message: c
|
|
1429
|
+
} : Un(c);
|
|
1430
|
+
if (e && (S[h] = {
|
|
1431
|
+
type: gn,
|
|
1432
|
+
message: t,
|
|
1433
|
+
ref: b,
|
|
1434
|
+
...D(gn, t)
|
|
1435
|
+
}, !r)) return x(t), S;
|
|
1436
|
+
}
|
|
1437
|
+
if (!(E || U(d) && U(f))) {
|
|
1438
|
+
let e, t, n = Un(f), i = Un(d);
|
|
1439
|
+
if (U(y) || Yt(y) || isNaN(y)) {
|
|
1440
|
+
let r = o.valueAsDate || new Date(y), a = (e) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + e), s = o.type == "time", c = o.type == "week";
|
|
1441
|
+
Z(n.value) && y && (e = s ? a(y) > a(n.value) : c ? y > n.value : r > new Date(n.value)), Z(i.value) && y && (t = s ? a(y) < a(i.value) : c ? y < i.value : r < new Date(i.value));
|
|
1442
|
+
} else {
|
|
1443
|
+
let r = o.valueAsNumber || y && +y;
|
|
1444
|
+
U(n.value) || (e = r > n.value), U(i.value) || (t = r < i.value);
|
|
1445
|
+
}
|
|
1446
|
+
if ((e || t) && (O(!!e, n.message, i.message, dn, fn), !r)) return x(S[h].message), S;
|
|
1447
|
+
}
|
|
1448
|
+
if ((l || u) && !E && (Z(y) || a && Array.isArray(y))) {
|
|
1449
|
+
let e = Un(l), t = Un(u), n = !U(e.value) && y.length > +e.value, i = !U(t.value) && y.length < +t.value;
|
|
1450
|
+
if ((n || i) && (O(n, e.message, t.message), !r)) return x(S[h].message), S;
|
|
1451
|
+
}
|
|
1452
|
+
if (p && !E && Z(y)) {
|
|
1453
|
+
let { value: e, message: t } = Un(p);
|
|
1454
|
+
if (Fn(e) && !y.match(e) && (S[h] = {
|
|
1455
|
+
type: hn,
|
|
1456
|
+
message: t,
|
|
1457
|
+
ref: o,
|
|
1458
|
+
...D(hn, t)
|
|
1459
|
+
}, !r)) return x(t), S;
|
|
1460
|
+
}
|
|
1461
|
+
if (m) {
|
|
1462
|
+
if (J(m)) {
|
|
1463
|
+
let e = Hn(await m(y, n), b);
|
|
1464
|
+
if (e && (S[h] = {
|
|
1465
|
+
...e,
|
|
1466
|
+
...D(_n, e.message)
|
|
1467
|
+
}, !r)) return x(e.message), S;
|
|
1468
|
+
} else if (W(m)) {
|
|
1469
|
+
let e = {};
|
|
1470
|
+
for (let t in m) {
|
|
1471
|
+
if (!Q(e) && !r) break;
|
|
1472
|
+
let i = Hn(await m[t](y, n), b, t);
|
|
1473
|
+
i && (e = {
|
|
1474
|
+
...i,
|
|
1475
|
+
...D(t, i.message)
|
|
1476
|
+
}, r || x(i.message), r && (S[h] = e));
|
|
1477
|
+
}
|
|
1478
|
+
if (!Q(e) && (S[h] = {
|
|
1479
|
+
ref: b,
|
|
1480
|
+
...e
|
|
1481
|
+
}, !r)) return S;
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
let k = S[h];
|
|
1485
|
+
return x(!k || k.message), S;
|
|
1486
|
+
}, Gn = (e) => Array.isArray(e) ? e : [e], Kn = (e) => Array.isArray(e) ? e.filter(Boolean) : [];
|
|
1487
|
+
function $(e, t) {
|
|
1488
|
+
if (Z(t) && Object.prototype.hasOwnProperty.call(e, t)) return delete e[t], e;
|
|
1489
|
+
let n = Array.isArray(t) ? t : Cn(t) ? [t] : Qt(t);
|
|
1490
|
+
if (n.some((e) => xn.includes(String(e)))) return e;
|
|
1491
|
+
let r = n.length === 1 ? e : function(e, t) {
|
|
1492
|
+
let n = t.length - 1, r = 0;
|
|
1493
|
+
for (; r < n;) {
|
|
1494
|
+
if (U(e)) {
|
|
1495
|
+
e = void 0;
|
|
1496
|
+
break;
|
|
1497
|
+
}
|
|
1498
|
+
e = e[t[r]], r++;
|
|
1499
|
+
}
|
|
1500
|
+
return e;
|
|
1501
|
+
}(e, n), i = n.length - 1, a = n[i];
|
|
1502
|
+
return r && delete r[a], i !== 0 && (W(r) && Q(r) || Array.isArray(r) && function(e) {
|
|
1503
|
+
for (let t in e) if (e.hasOwnProperty(t) && !K(e[t])) return !1;
|
|
1504
|
+
return !0;
|
|
1505
|
+
}(r)) && $(e, n.slice(0, -1)), e;
|
|
1506
|
+
}
|
|
1507
|
+
var qn = x.createContext(null);
|
|
1508
|
+
qn.displayName = "HookFormContext";
|
|
1509
|
+
var Jn = ({ children: e, watch: t, getValues: n, getErrors: r, getFieldState: i, setError: a, clearErrors: o, setValue: s, setValues: c, trigger: l, formState: u, resetField: d, reset: f, resetDefaultValues: p, handleSubmit: m, unregister: h, control: g, register: _, setFocus: v, subscribe: y }) => {
|
|
1510
|
+
let b = x.useMemo(() => ({
|
|
1511
|
+
watch: t,
|
|
1512
|
+
getValues: n,
|
|
1513
|
+
getErrors: r,
|
|
1514
|
+
getFieldState: i,
|
|
1515
|
+
setError: a,
|
|
1516
|
+
clearErrors: o,
|
|
1517
|
+
setValue: s,
|
|
1518
|
+
setValues: c,
|
|
1519
|
+
trigger: l,
|
|
1520
|
+
formState: u,
|
|
1521
|
+
resetField: d,
|
|
1522
|
+
reset: f,
|
|
1523
|
+
resetDefaultValues: p,
|
|
1524
|
+
handleSubmit: m,
|
|
1525
|
+
unregister: h,
|
|
1526
|
+
control: g,
|
|
1527
|
+
register: _,
|
|
1528
|
+
setFocus: v,
|
|
1529
|
+
subscribe: y
|
|
1530
|
+
}), [
|
|
1531
|
+
o,
|
|
1532
|
+
g,
|
|
1533
|
+
u,
|
|
1534
|
+
r,
|
|
1535
|
+
i,
|
|
1536
|
+
n,
|
|
1537
|
+
m,
|
|
1538
|
+
_,
|
|
1539
|
+
f,
|
|
1540
|
+
p,
|
|
1541
|
+
d,
|
|
1542
|
+
a,
|
|
1543
|
+
v,
|
|
1544
|
+
s,
|
|
1545
|
+
c,
|
|
1546
|
+
y,
|
|
1547
|
+
l,
|
|
1548
|
+
h,
|
|
1549
|
+
t
|
|
1550
|
+
]);
|
|
1551
|
+
return x.createElement(qn.Provider, { value: b }, x.createElement(Tn.Provider, { value: b.control }, e));
|
|
1552
|
+
}, Yn = () => {
|
|
1553
|
+
let e = [];
|
|
1554
|
+
return {
|
|
1555
|
+
get observers() {
|
|
1556
|
+
return e;
|
|
1557
|
+
},
|
|
1558
|
+
next: (t) => {
|
|
1559
|
+
for (let n of e) n.next && n.next(t);
|
|
1560
|
+
},
|
|
1561
|
+
subscribe: (t) => (e.push(t), { unsubscribe: () => {
|
|
1562
|
+
e = e.filter((e) => e !== t);
|
|
1563
|
+
} }),
|
|
1564
|
+
unsubscribe: () => {
|
|
1565
|
+
e = [];
|
|
1566
|
+
}
|
|
1567
|
+
};
|
|
1568
|
+
};
|
|
1569
|
+
function Xn(e, t) {
|
|
1570
|
+
let n = Array.isArray(e) ? [] : {};
|
|
1571
|
+
for (let r in e) if (e.hasOwnProperty(r)) {
|
|
1572
|
+
let i = e[r], a = t[r];
|
|
1573
|
+
i && (W(i) || Array.isArray(i)) && a ? n[r] = Xn(i, a) : e[r] && (n[r] = a);
|
|
1574
|
+
}
|
|
1575
|
+
return n;
|
|
1576
|
+
}
|
|
1577
|
+
var Zn = (e, t) => e !== null && Xt(e) && Object.prototype.hasOwnProperty.call(e, t), Qn = (e, t) => {
|
|
1578
|
+
if (!t) return !1;
|
|
1579
|
+
let n = e;
|
|
1580
|
+
for (let r of Cn(t) ? [t] : Qt(t)) {
|
|
1581
|
+
if (!Zn(n, r)) return Zn(e, t);
|
|
1582
|
+
n = n[r];
|
|
1583
|
+
}
|
|
1584
|
+
return !0;
|
|
1585
|
+
}, $n = (e) => e.type === "select-multiple", er = (e) => Nn(e) && e.isConnected;
|
|
1586
|
+
function tr(e) {
|
|
1587
|
+
return Array.isArray(e) || W(e);
|
|
1588
|
+
}
|
|
1589
|
+
function nr(e, t, n = "", r = []) {
|
|
1590
|
+
for (let i in e) {
|
|
1591
|
+
let a = n ? `${n}.${i}` : i, o = e[i];
|
|
1592
|
+
tr(o) && tr(q(t, a)) ? nr(o, t, a, r) : r.push(a);
|
|
1593
|
+
}
|
|
1594
|
+
return r;
|
|
1595
|
+
}
|
|
1596
|
+
function rr(e) {
|
|
1597
|
+
return Array.isArray(e) || W(e) && !((e) => {
|
|
1598
|
+
for (let t in e) if (J(e[t])) return !0;
|
|
1599
|
+
return !1;
|
|
1600
|
+
})(e);
|
|
1601
|
+
}
|
|
1602
|
+
function ir(e) {
|
|
1603
|
+
return !(!e || !("_f" in e));
|
|
1604
|
+
}
|
|
1605
|
+
function ar(e) {
|
|
1606
|
+
return Array.isArray(e) ? !e.some((e) => !K(e)) : !Object.keys(e).length;
|
|
1607
|
+
}
|
|
1608
|
+
function or(e, t) {
|
|
1609
|
+
Array.isArray(e) ? e[t] = void 0 : delete e[t];
|
|
1610
|
+
}
|
|
1611
|
+
function sr(e, t = {}, n) {
|
|
1612
|
+
for (let r in e) {
|
|
1613
|
+
let i = e[r], a = n && n[r];
|
|
1614
|
+
!rr(i) || Array.isArray(i) && ir(a) ? K(i) || (t[r] = !0) : (t[r] = Array.isArray(i) ? [] : {}, sr(i, t[r], a), ar(t[r]) && or(t, r));
|
|
1615
|
+
}
|
|
1616
|
+
return t;
|
|
1617
|
+
}
|
|
1618
|
+
function cr(e, t, n, r) {
|
|
1619
|
+
n ||= sr(t, {}, r);
|
|
1620
|
+
for (let i in e) {
|
|
1621
|
+
let a = e[i], o = r && r[i];
|
|
1622
|
+
!rr(a) || Array.isArray(a) && ir(o) ? X(a, t[i]) ? or(n, i) : n[i] = !0 : (K(t) || Dn(n[i]) ? n[i] = sr(a, Array.isArray(a) ? [] : {}, o) : cr(a, U(t) ? {} : t[i], n[i], o), ar(n[i]) && or(n, i));
|
|
1623
|
+
}
|
|
1624
|
+
return n;
|
|
1625
|
+
}
|
|
1626
|
+
var lr = (e, { valueAsNumber: t, valueAsDate: n, setValueAs: r }) => K(e) ? e : t ? e === "" ? NaN : e && +e : n && Z(e) ? new Date(e) : r ? r(e) : e;
|
|
1627
|
+
function ur(e) {
|
|
1628
|
+
let t = e.ref;
|
|
1629
|
+
return Jt(t) ? t.files : Pn(t) ? Vn(e.refs).value : $n(t) ? [...t.selectedOptions].map(({ value: e }) => e) : qt(t) ? zn(e.refs).value : lr(t.value, e);
|
|
1630
|
+
}
|
|
1631
|
+
var dr = (e) => K(e) ? e : Fn(e) ? e.source : W(e) ? Fn(e.value) ? e.value.source : e.value : e, fr = "AsyncFunction", pr = (e) => {
|
|
1632
|
+
if (!e || !e.validate) return !1;
|
|
1633
|
+
if (J(e.validate)) return e.validate.constructor.name === fr;
|
|
1634
|
+
if (W(e.validate)) {
|
|
1635
|
+
for (let t in e.validate) if (e.validate[t].constructor.name === fr) return !0;
|
|
1636
|
+
}
|
|
1637
|
+
return !1;
|
|
1638
|
+
};
|
|
1639
|
+
function mr(e, t, n) {
|
|
1640
|
+
let r = q(e, n);
|
|
1641
|
+
if (r?.type || r?.message || Array.isArray(r)) return {
|
|
1642
|
+
error: r,
|
|
1643
|
+
name: n
|
|
1644
|
+
};
|
|
1645
|
+
let i = n.split(".");
|
|
1646
|
+
for (; i.length;) {
|
|
1647
|
+
let r = i.join("."), a = q(t, r), o = q(e, r);
|
|
1648
|
+
if (a && !Array.isArray(a) && n !== r) return { name: n };
|
|
1649
|
+
if (o && o.type) return {
|
|
1650
|
+
name: r,
|
|
1651
|
+
error: o
|
|
1652
|
+
};
|
|
1653
|
+
if (o && o.root && o.root.type) return {
|
|
1654
|
+
name: `${r}.root`,
|
|
1655
|
+
error: o.root
|
|
1656
|
+
};
|
|
1657
|
+
i.pop();
|
|
1658
|
+
}
|
|
1659
|
+
return { name: n };
|
|
1660
|
+
}
|
|
1661
|
+
var hr = {
|
|
1662
|
+
mode: cn,
|
|
1663
|
+
reValidateMode: sn,
|
|
1664
|
+
shouldFocusError: !0
|
|
1665
|
+
}, gr = {
|
|
1666
|
+
submitCount: 0,
|
|
1667
|
+
isDirty: !1,
|
|
1668
|
+
isReady: !1,
|
|
1669
|
+
isValidating: !1,
|
|
1670
|
+
isSubmitted: !1,
|
|
1671
|
+
isSubmitting: !1,
|
|
1672
|
+
isSubmitSuccessful: !1,
|
|
1673
|
+
isValid: !1,
|
|
1674
|
+
touchedFields: {},
|
|
1675
|
+
dirtyFields: {},
|
|
1676
|
+
validatingFields: {}
|
|
1677
|
+
};
|
|
1678
|
+
function _r(e = {}) {
|
|
1679
|
+
let t = {
|
|
1680
|
+
...hr,
|
|
1681
|
+
...e
|
|
1682
|
+
}, n = {
|
|
1683
|
+
...G(gr),
|
|
1684
|
+
isLoading: J(t.defaultValues),
|
|
1685
|
+
errors: t.errors || {},
|
|
1686
|
+
disabled: t.disabled || !1
|
|
1687
|
+
}, r = {}, i = (W(t.defaultValues) || W(t.values)) && G(t.defaultValues || t.values) || {}, a = t.shouldUnregister ? {} : G(i), o = {
|
|
1688
|
+
action: !1,
|
|
1689
|
+
actionArrayLengths: /* @__PURE__ */ new Map(),
|
|
1690
|
+
mount: !1,
|
|
1691
|
+
watch: !1,
|
|
1692
|
+
keepIsValid: !1
|
|
1693
|
+
}, s = {
|
|
1694
|
+
mount: /* @__PURE__ */ new Set(),
|
|
1695
|
+
disabled: /* @__PURE__ */ new Set(),
|
|
1696
|
+
unMount: /* @__PURE__ */ new Set(),
|
|
1697
|
+
array: /* @__PURE__ */ new Set(),
|
|
1698
|
+
watch: /* @__PURE__ */ new Set(),
|
|
1699
|
+
registerName: /* @__PURE__ */ new Set()
|
|
1700
|
+
}, c = {}, l = {}, u = 0, d = kn(t.mode), f = kn(t.reValidateMode), p = {
|
|
1701
|
+
isDirty: !1,
|
|
1702
|
+
dirtyFields: !1,
|
|
1703
|
+
validatingFields: !1,
|
|
1704
|
+
touchedFields: !1,
|
|
1705
|
+
isValidating: !1,
|
|
1706
|
+
isValid: !1,
|
|
1707
|
+
errors: !1
|
|
1708
|
+
}, m = { ...p }, h = { ...m }, g = (...e) => e.some((e) => m[e] || h[e]), _ = {
|
|
1709
|
+
array: Yn(),
|
|
1710
|
+
state: Yn()
|
|
1711
|
+
}, v = 0, y = 0, b = t.criteriaMode === un, x = (e, t) => (n) => {
|
|
1712
|
+
clearTimeout(l[e]), l[e] = setTimeout(t, n);
|
|
1713
|
+
}, S = (e) => {
|
|
1714
|
+
clearTimeout(l[e]), delete l[e], delete c[e];
|
|
1715
|
+
}, C = (e) => {
|
|
1716
|
+
S(e);
|
|
1717
|
+
let t = `${e}.`;
|
|
1718
|
+
for (let e of Object.keys(c)) e.startsWith(t) && S(e);
|
|
1719
|
+
}, w = async (e) => {
|
|
1720
|
+
if (!o.keepIsValid && !t.disabled && (g("isValid") || e)) {
|
|
1721
|
+
let e = ++v, i;
|
|
1722
|
+
t.resolver ? (i = Q((await A()).errors), e === v && T()) : i = await M({
|
|
1723
|
+
fields: r,
|
|
1724
|
+
onlyCheckValid: !0,
|
|
1725
|
+
eventType: an
|
|
1726
|
+
}), e === v && i !== n.isValid && _.state.next({ isValid: i });
|
|
1727
|
+
}
|
|
1728
|
+
}, T = (e, r) => {
|
|
1729
|
+
!t.disabled && g("isValidating", "validatingFields") && ((e || s.mount).forEach((e) => {
|
|
1730
|
+
e && (r ? Y(n.validatingFields, e, r) : $(n.validatingFields, e));
|
|
1731
|
+
}), _.state.next({
|
|
1732
|
+
validatingFields: n.validatingFields,
|
|
1733
|
+
isValidating: !Q(n.validatingFields)
|
|
1734
|
+
}));
|
|
1735
|
+
}, E = () => {
|
|
1736
|
+
n.dirtyFields = cr(i, a, void 0, r);
|
|
1737
|
+
}, D = (e, t) => {
|
|
1738
|
+
Y(n.errors, e, t), n.errors = { ...n.errors }, _.state.next({ errors: n.errors });
|
|
1739
|
+
}, O = (c, l, u, d) => {
|
|
1740
|
+
let f = q(r, c);
|
|
1741
|
+
if (f) {
|
|
1742
|
+
if (((e) => {
|
|
1743
|
+
let t = Cn(e) ? [e] : Qt(e), n = a, r = i;
|
|
1744
|
+
for (let e = 0; e < t.length - 1; e++) {
|
|
1745
|
+
let i = t[e];
|
|
1746
|
+
if (n = U(n) ? n : n[i], r = U(r) ? r : r[i], n === null && r !== null) return !0;
|
|
1747
|
+
}
|
|
1748
|
+
return !1;
|
|
1749
|
+
})(c) || ((e) => {
|
|
1750
|
+
if (!o.actionArrayLengths.size) return !1;
|
|
1751
|
+
let t = Cn(e) ? [e] : Qt(e), n = a, r = "", i = -1, s = 0;
|
|
1752
|
+
for (let e = 0; e < t.length; e++) {
|
|
1753
|
+
if (U(n)) return !1;
|
|
1754
|
+
let a = t[e];
|
|
1755
|
+
if (r = r ? `${r}.${a}` : a, Array.isArray(n) && +a >= n.length) return i !== -1 && (e !== i || +a < s);
|
|
1756
|
+
if (o.actionArrayLengths.has(r) && (i = e + 1, s = o.actionArrayLengths.get(r)), n = n[a], K(n) && i !== -1 && e > i && +t[i] < s) return !0;
|
|
1757
|
+
}
|
|
1758
|
+
return !1;
|
|
1759
|
+
})(c)) return;
|
|
1760
|
+
let r = K(q(a, c)), p = q(a, c, K(u) ? q(i, c) : u);
|
|
1761
|
+
K(p) || d && d.defaultChecked || l ? Y(a, c, l ? p : ur(f._f)) : F(c, p), o.mount && !o.action && (t.resolver && g("isValidating", "validatingFields") ? Promise.resolve().then(() => w()) : w(), r && n.isDirty && g("isDirty") && (N() || (n.isDirty = !1, _.state.next({ ...n }))), e.shouldUnregister && r && !K(q(a, c)) && An(c, s) && (o.watch = !0));
|
|
1762
|
+
}
|
|
1763
|
+
}, k = (e, o, s, c, l) => {
|
|
1764
|
+
let u = !1, d = !1, f = { name: e };
|
|
1765
|
+
if (!t.disabled || !0 === c) {
|
|
1766
|
+
if (!s || c) {
|
|
1767
|
+
let t = X(q(i, e), o);
|
|
1768
|
+
g("isDirty") && (d = n.isDirty, n.isDirty = f.isDirty = !t || N(), u = d !== f.isDirty), d = !!q(n.dirtyFields, e), t === n.isDirty ? t ? $(n.dirtyFields, e) : Y(n.dirtyFields, e, !0) : ((e, t) => {
|
|
1769
|
+
for (let n in e) n in t || delete e[n];
|
|
1770
|
+
Object.assign(e, t);
|
|
1771
|
+
})(n.dirtyFields, cr(i, a, void 0, r)), f.dirtyFields = n.dirtyFields, u ||= g("dirtyFields") && d !== !t;
|
|
1772
|
+
}
|
|
1773
|
+
if (s) {
|
|
1774
|
+
let t = q(n.touchedFields, e);
|
|
1775
|
+
t || (Y(n.touchedFields, e, s), f.touchedFields = n.touchedFields, u ||= g("touchedFields") && t !== s);
|
|
1776
|
+
}
|
|
1777
|
+
u && l && _.state.next(f);
|
|
1778
|
+
}
|
|
1779
|
+
return u ? f : {};
|
|
1780
|
+
}, A = async (e) => (T(e, !0), await t.resolver(a, t.context, ((e, t, n, r) => {
|
|
1781
|
+
let i = {};
|
|
1782
|
+
for (let n of e) {
|
|
1783
|
+
let e = q(t, n);
|
|
1784
|
+
e && Y(i, n, e._f);
|
|
1785
|
+
}
|
|
1786
|
+
return {
|
|
1787
|
+
criteriaMode: n,
|
|
1788
|
+
names: [...e],
|
|
1789
|
+
fields: i,
|
|
1790
|
+
shouldUseNativeValidation: r
|
|
1791
|
+
};
|
|
1792
|
+
})(e || s.mount, r, t.criteriaMode, t.shouldUseNativeValidation))), j = async ({ name: e, eventType: r }) => {
|
|
1793
|
+
if (t.validate) {
|
|
1794
|
+
let i = y, o = await t.validate({
|
|
1795
|
+
formValues: a,
|
|
1796
|
+
formState: n,
|
|
1797
|
+
name: e,
|
|
1798
|
+
eventType: r
|
|
1799
|
+
});
|
|
1800
|
+
if (i !== y) return !0;
|
|
1801
|
+
if (W(o)) {
|
|
1802
|
+
let e = !0;
|
|
1803
|
+
ie(yn);
|
|
1804
|
+
for (let t in o) {
|
|
1805
|
+
let n = o[t];
|
|
1806
|
+
n && (e = !1, z(`${yn}.${t}`, {
|
|
1807
|
+
message: Z(n.message) ? n.message : "",
|
|
1808
|
+
type: n.type || _n
|
|
1809
|
+
}));
|
|
1810
|
+
}
|
|
1811
|
+
return e;
|
|
1812
|
+
}
|
|
1813
|
+
return Z(o) || !o ? (z(yn, {
|
|
1814
|
+
message: o || "",
|
|
1815
|
+
type: _n
|
|
1816
|
+
}), !1) : (ie(yn), !0);
|
|
1817
|
+
}
|
|
1818
|
+
return !0;
|
|
1819
|
+
}, M = async ({ fields: r, onlyCheckValid: i, name: o, eventType: c, context: l = {
|
|
1820
|
+
valid: !0,
|
|
1821
|
+
runRootValidation: !1
|
|
1822
|
+
} }) => {
|
|
1823
|
+
let u = y;
|
|
1824
|
+
if (t.validate && !l.runRootValidation && (l.runRootValidation = !0, !await j({
|
|
1825
|
+
name: o,
|
|
1826
|
+
eventType: c
|
|
1827
|
+
}) && (l.valid = !1, i))) return l.valid;
|
|
1828
|
+
for (let o in r) {
|
|
1829
|
+
let d = r[o];
|
|
1830
|
+
if (d) {
|
|
1831
|
+
let { _f: r, ...f } = d;
|
|
1832
|
+
if (r) {
|
|
1833
|
+
let o = s.array.has(r.name), c = d._f && pr(d._f), f = g("isValidating", "validatingFields");
|
|
1834
|
+
c && f && T([r.name], !0);
|
|
1835
|
+
let p = await Wn(d, s.disabled, a, b, t.shouldUseNativeValidation && !i, o);
|
|
1836
|
+
if (u !== y) return l.valid;
|
|
1837
|
+
if (c && f && T([r.name]), p[r.name] && (l.valid = !1, i) || (i || (S(r.name), q(p, r.name) ? o ? Mn(n.errors, p, r.name) : Y(n.errors, r.name, p[r.name]) : $(n.errors, r.name)), e.shouldUseNativeValidation && p[r.name])) break;
|
|
1838
|
+
}
|
|
1839
|
+
!Q(f) && await M({
|
|
1840
|
+
context: l,
|
|
1841
|
+
onlyCheckValid: i,
|
|
1842
|
+
fields: f,
|
|
1843
|
+
name: o,
|
|
1844
|
+
eventType: c
|
|
1845
|
+
});
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
return l.valid;
|
|
1849
|
+
}, N = (e, t) => (e && t && Y(a, e, t), !X(o.mount ? a : i, i)), P = (e, t, n) => ((e, t, n, r, i) => Z(e) ? (r && t.watch.add(e), q(n, e, i)) : Array.isArray(e) ? e.map((e) => (r && t.watch.add(e), q(n, e, q(i, e)))) : (r && (t.watchAll = !0), n))(e, s, { ...o.mount ? a : K(t) || Z(e) ? i : t }, n, t), F = (e, t, n = {}, i = !1, o = !1, s = !1) => {
|
|
1850
|
+
let c = q(r, e), l = t;
|
|
1851
|
+
if (c) {
|
|
1852
|
+
let n = c._f;
|
|
1853
|
+
n && (!n.disabled && Y(a, e, lr(t, n)), l = Nn(n.ref) && U(t) ? "" : t, $n(n.ref) ? [...n.ref.options].forEach((e) => e.selected = l.includes(e.value)) : n.refs ? qt(n.ref) ? n.refs.forEach((e) => {
|
|
1854
|
+
e.defaultChecked && e.disabled || (e.checked = Array.isArray(l) ? !!l.find((t) => t === e.value) : l === e.value || !!l);
|
|
1855
|
+
}) : n.refs.forEach((e) => e.checked = e.value === l) : Jt(n.ref) ? n.ref.value = "" : (n.ref.value = l, n.ref.type || o || s || _.state.next({
|
|
1856
|
+
name: e,
|
|
1857
|
+
values: i ? a : G(a)
|
|
1858
|
+
})));
|
|
1859
|
+
}
|
|
1860
|
+
(n.shouldDirty || n.shouldTouch) && k(e, c && c._f && !c._f.disabled && (c._f.valueAsNumber || c._f.valueAsDate || c._f.setValueAs) ? lr(t, c._f) : l, n.shouldTouch, n.shouldDirty, !o), n.shouldValidate && R(e, { delayError: n.delayError }), n.shouldValidate && c && c._f && c._f.deps && (!Array.isArray(c._f.deps) || c._f.deps.length > 0) && R(c._f.deps);
|
|
1861
|
+
}, I = (e, t, n, i = !1, o = !1, c = !1) => {
|
|
1862
|
+
s.array.has(e) && _.array.next({
|
|
1863
|
+
name: e,
|
|
1864
|
+
values: i ? a : G(a)
|
|
1865
|
+
});
|
|
1866
|
+
for (let a in t) {
|
|
1867
|
+
if (!t.hasOwnProperty(a)) continue;
|
|
1868
|
+
let l = t[a], u = e + "." + a, d = q(r, u);
|
|
1869
|
+
(s.array.has(e) || W(l) || d && !d._f) && !Yt(l) ? I(u, l, n, i, o, c) : F(u, l, n, i, o, c);
|
|
1870
|
+
}
|
|
1871
|
+
}, ee = (e, t, i, c, l = !1) => {
|
|
1872
|
+
let u = q(r, e), d = s.array.has(e), f = c ? t : G(t), p = X(q(a, e), f);
|
|
1873
|
+
if (p || Y(a, e, f), d) _.array.next({
|
|
1874
|
+
name: e,
|
|
1875
|
+
values: c ? a : G(a)
|
|
1876
|
+
}), g("isDirty", "dirtyFields") && i.shouldDirty && (E(), l || _.state.next({
|
|
1877
|
+
name: e,
|
|
1878
|
+
dirtyFields: n.dirtyFields,
|
|
1879
|
+
isDirty: N(e, f)
|
|
1880
|
+
})), i.shouldValidate && R(e, { delayError: i.delayError });
|
|
1881
|
+
else {
|
|
1882
|
+
let t = Array.isArray(f) && !f.length || Q(f), n = !p && !l;
|
|
1883
|
+
!u || u._f || U(f) || t ? F(e, f, i, c, l, n) : I(e, f, i, c, l, n);
|
|
1884
|
+
}
|
|
1885
|
+
if (!p && !l) {
|
|
1886
|
+
let t = An(e, s), r = c ? a : G(a);
|
|
1887
|
+
if (_.state.next({
|
|
1888
|
+
...t && n,
|
|
1889
|
+
name: o.mount || t ? e : void 0,
|
|
1890
|
+
values: r
|
|
1891
|
+
}), !d) for (let t of ((e, t) => {
|
|
1892
|
+
let n = t.split("."), r = [], i = n[0];
|
|
1893
|
+
for (let t = 1; t < n.length; i += "." + n[t++]) !isNaN(+n[t]) && e.has(i) && r.push(`${i}.${n[t]}`);
|
|
1894
|
+
return r;
|
|
1895
|
+
})(s.array, e)) _.state.next({
|
|
1896
|
+
name: t,
|
|
1897
|
+
values: r
|
|
1898
|
+
});
|
|
1899
|
+
}
|
|
1900
|
+
}, te = (e, t, n = {}) => ee(e, t, n, !1), ne = async (e) => {
|
|
1901
|
+
o.mount = !0;
|
|
1902
|
+
let i = e.target, l = i.name, p = !0, m = q(r, l), h = (e) => {
|
|
1903
|
+
p = Number.isNaN(e) || Yt(e) && isNaN(e.getTime()) || X(e, q(a, l, e));
|
|
1904
|
+
};
|
|
1905
|
+
if (m) {
|
|
1906
|
+
let o, v, C = i.type ? ur(m._f) : ((e) => W(e) && e.target ? qt(e.target) ? e.target.checked : Jt(e.target) ? e.target.files : e.target.value : e)(e), E = e.type === en || e.type === tn, O = !(((e) => e.mount && (e.required || !K(e.required) && !1 !== e.required || !K(e.min) || !K(e.max) || !K(e.maxLength) || !K(e.minLength) || e.pattern || e.validate))(m._f) || t.validate || t.resolver || q(n.errors, l) || m._f.deps), N = O || ((e, t, n, r, i) => !i.isOnAll && (!n && i.isOnTouch ? !(t || e) : (n ? r.isOnBlur : i.isOnBlur) ? !e : !(n ? r.isOnChange : i.isOnChange) || e))(E, q(n.touchedFields, l), n.isSubmitted, f, d), P = An(l, s, E);
|
|
1907
|
+
if (Y(a, l, G(C)), E) {
|
|
1908
|
+
if (!i || !i.readOnly) {
|
|
1909
|
+
m._f.onBlur && m._f.onBlur(e);
|
|
1910
|
+
let t = c[l];
|
|
1911
|
+
t && t(0);
|
|
1912
|
+
}
|
|
1913
|
+
} else m._f.onChange && m._f.onChange(e);
|
|
1914
|
+
let F = k(l, C, E), I = !Q(F) || P;
|
|
1915
|
+
if (!E && _.state.next({
|
|
1916
|
+
name: l,
|
|
1917
|
+
type: e.type,
|
|
1918
|
+
...u ? { values: G(a) } : {}
|
|
1919
|
+
}), N) return O && n.isValid || !g("isValid") || (t.mode === "onBlur" ? E && w() : E || w()), I && _.state.next({
|
|
1920
|
+
name: l,
|
|
1921
|
+
...P ? {} : F
|
|
1922
|
+
});
|
|
1923
|
+
if (!t.resolver && t.validate && await j({
|
|
1924
|
+
name: l,
|
|
1925
|
+
eventType: e.type
|
|
1926
|
+
}), !E && P && _.state.next({ ...n }), t.resolver) {
|
|
1927
|
+
let e = y, { errors: t } = await A([l]);
|
|
1928
|
+
if (e !== y) return;
|
|
1929
|
+
if (T([l]), h(C), !p) return void (!Q(F) && _.state.next(F));
|
|
1930
|
+
let i = mr(n.errors, r, l), a = mr(t, r, i.name || l);
|
|
1931
|
+
o = a.error, l = a.name, v = Q(t);
|
|
1932
|
+
} else {
|
|
1933
|
+
let n = y;
|
|
1934
|
+
if (T([l], !0), o = (await Wn(m, s.disabled, a, b, t.shouldUseNativeValidation))[l], n !== y) return;
|
|
1935
|
+
if (T([l]), h(C), p) {
|
|
1936
|
+
if (o) v = !1;
|
|
1937
|
+
else if (g("isValid") && (v = await M({
|
|
1938
|
+
fields: r,
|
|
1939
|
+
onlyCheckValid: !0,
|
|
1940
|
+
name: l,
|
|
1941
|
+
eventType: e.type
|
|
1942
|
+
}), n !== y)) return;
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
p && (m._f.deps && (!Array.isArray(m._f.deps) || m._f.deps.length > 0) && R(m._f.deps), ((e, r, i, a) => {
|
|
1946
|
+
let o = q(n.errors, e), s = g("isValid") && wn(r) && n.isValid !== r;
|
|
1947
|
+
if (t.delayError && i ? (c[e] = x(e, () => D(e, i)), c[e](t.delayError)) : (S(e), i ? Y(n.errors, e, i) : $(n.errors, e), n.errors = { ...n.errors }), (i ? !X(o, i) : o) || !Q(a) || s) {
|
|
1948
|
+
let t = {
|
|
1949
|
+
...a,
|
|
1950
|
+
...s && wn(r) ? { isValid: r } : {},
|
|
1951
|
+
errors: n.errors,
|
|
1952
|
+
name: e
|
|
1953
|
+
};
|
|
1954
|
+
_.state.next(t);
|
|
1955
|
+
}
|
|
1956
|
+
})(l, v, o, F));
|
|
1957
|
+
}
|
|
1958
|
+
}, L = (e, t) => {
|
|
1959
|
+
if (q(n.errors, t) && e.focus) return e.focus(), 1;
|
|
1960
|
+
}, R = async (e, i = {}) => {
|
|
1961
|
+
let a, o, l = Gn(e);
|
|
1962
|
+
if (t.resolver) {
|
|
1963
|
+
let t = y, i = await (async (e) => {
|
|
1964
|
+
let t = y, { errors: i } = await A(e);
|
|
1965
|
+
if (t !== y) return i;
|
|
1966
|
+
if (T(e), e) {
|
|
1967
|
+
for (let t of e) {
|
|
1968
|
+
let e = q(i, t);
|
|
1969
|
+
C(t);
|
|
1970
|
+
let a = s.array.has(t) && W(e) && !Object.keys(e).some((e) => !Number.isNaN(Number(e))), o = q(r, t), c = W(o) && Object.keys(o).some((e) => e !== "_f");
|
|
1971
|
+
a ? Mn(n.errors, { [t]: e }, t) : e?.type || e?.message || Array.isArray(e) || W(e) && c ? Y(n.errors, t, e) : $(n.errors, t);
|
|
1972
|
+
}
|
|
1973
|
+
n.errors = { ...n.errors };
|
|
1974
|
+
} else Object.keys(c).forEach(S), n.errors = i;
|
|
1975
|
+
return i;
|
|
1976
|
+
})(K(e) ? e : l);
|
|
1977
|
+
if (a = Q(i), o = e ? !l.some((e) => q(i, e)) : a, t !== y) return o;
|
|
1978
|
+
} else e ? (o = (await Promise.all(l.map(async (e) => {
|
|
1979
|
+
let t = q(r, e);
|
|
1980
|
+
return await M({
|
|
1981
|
+
fields: t && t._f ? { [e]: t } : t,
|
|
1982
|
+
eventType: rn
|
|
1983
|
+
});
|
|
1984
|
+
}))).every(Boolean), (o || n.isValid) && w()) : o = a = await M({
|
|
1985
|
+
fields: r,
|
|
1986
|
+
name: e,
|
|
1987
|
+
eventType: rn
|
|
1988
|
+
});
|
|
1989
|
+
if (i.delayError && t.delayError && Z(e)) {
|
|
1990
|
+
let r = q(n.errors, e);
|
|
1991
|
+
r ? ($(n.errors, e), c[e] = x(e, () => D(e, r)), c[e](t.delayError)) : S(e);
|
|
1992
|
+
}
|
|
1993
|
+
if (i.shouldTouch) for (let t of e ? l : s.mount) !s.array.has(t) && Y(n.touchedFields, t, !0);
|
|
1994
|
+
return _.state.next({
|
|
1995
|
+
...!Z(e) || g("isValid") && a !== n.isValid ? {} : { name: e },
|
|
1996
|
+
...t.resolver || !e ? { isValid: a } : {},
|
|
1997
|
+
...i.shouldTouch && g("touchedFields") ? { touchedFields: n.touchedFields } : {},
|
|
1998
|
+
errors: n.errors
|
|
1999
|
+
}), i.shouldFocus && !o && jn(r, L, e ? l : s.mount), o;
|
|
2000
|
+
}, re = (e, t) => {
|
|
2001
|
+
let r = t || n, i = q(r.errors, e);
|
|
2002
|
+
return {
|
|
2003
|
+
invalid: !!i,
|
|
2004
|
+
isDirty: !!q(r.dirtyFields, e),
|
|
2005
|
+
error: i,
|
|
2006
|
+
isValidating: !!q(r.validatingFields, e),
|
|
2007
|
+
isTouched: !!q(r.touchedFields, e)
|
|
2008
|
+
};
|
|
2009
|
+
}, ie = (e) => {
|
|
2010
|
+
let t = e ? Gn(e) : void 0;
|
|
2011
|
+
t ? t.forEach((e) => {
|
|
2012
|
+
C(e), $(n.errors, e), _.state.next({
|
|
2013
|
+
name: e,
|
|
2014
|
+
errors: n.errors
|
|
2015
|
+
});
|
|
2016
|
+
}) : (Object.keys(c).forEach(S), n.errors = {}, _.state.next({ errors: n.errors }));
|
|
2017
|
+
}, z = (e, t, i) => {
|
|
2018
|
+
C(e);
|
|
2019
|
+
let a = (q(r, e, { _f: {} })._f || {}).ref, { ref: o, message: s, type: c, types: l, ...u } = q(n.errors, e) || {};
|
|
2020
|
+
Y(n.errors, e, {
|
|
2021
|
+
...u,
|
|
2022
|
+
...t,
|
|
2023
|
+
ref: a
|
|
2024
|
+
}), _.state.next({
|
|
2025
|
+
name: e,
|
|
2026
|
+
errors: n.errors,
|
|
2027
|
+
isValid: !1
|
|
2028
|
+
}), i && i.shouldFocus && a && a.focus && a.focus();
|
|
2029
|
+
}, ae = (e) => {
|
|
2030
|
+
let t = !!e.formState?.values;
|
|
2031
|
+
t && u++;
|
|
2032
|
+
let { unsubscribe: r } = _.state.subscribe({ next: (t) => {
|
|
2033
|
+
if (r = e.name, o = t.name, s = e.exact, (!r || !o || r === o || Gn(r).some((e) => e && (s ? e === o || e.startsWith(o + ".") : e.startsWith(o) || o.startsWith(e)))) && ((e, t, n, r) => {
|
|
2034
|
+
n(e);
|
|
2035
|
+
let i = Object.keys(e).filter((e) => e !== "name");
|
|
2036
|
+
return !i.length || r && i.length >= Object.keys(t).length || i.find((e) => t[e] === (!r || un));
|
|
2037
|
+
})(t, e.formState || m, pe, e.reRenderRoot)) {
|
|
2038
|
+
let r = { ...a };
|
|
2039
|
+
e.callback({
|
|
2040
|
+
values: r,
|
|
2041
|
+
...n,
|
|
2042
|
+
...t,
|
|
2043
|
+
defaultValues: i
|
|
2044
|
+
});
|
|
2045
|
+
}
|
|
2046
|
+
var r, o, s;
|
|
2047
|
+
} });
|
|
2048
|
+
if (!t) return r;
|
|
2049
|
+
let o = !1;
|
|
2050
|
+
return () => {
|
|
2051
|
+
o || (o = !0, u--, r());
|
|
2052
|
+
};
|
|
2053
|
+
}, oe = (e, o = {}) => {
|
|
2054
|
+
for (let c of e ? Gn(e) : s.mount) s.mount.delete(c), s.array.delete(c), s.disabled.delete(c), o.keepValue || ($(r, c), $(a, c)), o.keepError || (C(c), $(n.errors, c)), !o.keepDirty && $(n.dirtyFields, c), !o.keepTouched && $(n.touchedFields, c), !o.keepIsValidating && $(n.validatingFields, c), !t.shouldUnregister && !o.keepDefaultValue && $(i, c);
|
|
2055
|
+
u && _.state.next({ values: G(a) }), _.state.next({
|
|
2056
|
+
...n,
|
|
2057
|
+
...o.keepDirty ? {} : { isDirty: N() },
|
|
2058
|
+
...o.keepIsValidating ? {} : { isValidating: !Q(n.validatingFields) }
|
|
2059
|
+
}), !o.keepIsValid && w();
|
|
2060
|
+
}, se = ({ disabled: e, name: t }) => {
|
|
2061
|
+
if (wn(e) && o.mount || e || s.disabled.has(t)) {
|
|
2062
|
+
let n = s.disabled.has(t) !== !!e;
|
|
2063
|
+
e ? s.disabled.add(t) : s.disabled.delete(t), n && o.mount && !o.action && w();
|
|
2064
|
+
}
|
|
2065
|
+
}, ce = (e, n = {}) => {
|
|
2066
|
+
let a = q(r, e), c = wn(n.disabled) || wn(t.disabled), l = !s.registerName.has(e) && a && a._f && !a._f.mount;
|
|
2067
|
+
if (Y(r, e, {
|
|
2068
|
+
...a || {},
|
|
2069
|
+
_f: {
|
|
2070
|
+
...a && a._f ? a._f : { ref: { name: e } },
|
|
2071
|
+
name: e,
|
|
2072
|
+
mount: !0,
|
|
2073
|
+
...n
|
|
2074
|
+
}
|
|
2075
|
+
}), s.mount.add(e), a && a._f) {
|
|
2076
|
+
let t = q(r, e);
|
|
2077
|
+
for (let e of vn) e in n || delete t._f[e];
|
|
2078
|
+
}
|
|
2079
|
+
return a && !l ? se({
|
|
2080
|
+
disabled: wn(n.disabled) ? n.disabled : t.disabled,
|
|
2081
|
+
name: e
|
|
2082
|
+
}) : O(e, !0, n.value), {
|
|
2083
|
+
...c ? { disabled: n.disabled || t.disabled } : {},
|
|
2084
|
+
...t.progressive ? {
|
|
2085
|
+
required: !!n.required,
|
|
2086
|
+
min: dr(n.min),
|
|
2087
|
+
max: dr(n.max),
|
|
2088
|
+
minLength: dr(n.minLength),
|
|
2089
|
+
maxLength: dr(n.maxLength),
|
|
2090
|
+
pattern: dr(n.pattern)
|
|
2091
|
+
} : {},
|
|
2092
|
+
name: e,
|
|
2093
|
+
onChange: ne,
|
|
2094
|
+
onBlur: ne,
|
|
2095
|
+
ref: (c) => {
|
|
2096
|
+
if (c) {
|
|
2097
|
+
s.registerName.add(e), ce(e, n), s.registerName.delete(e), a = q(r, e);
|
|
2098
|
+
let t = K(c.value) && c.querySelectorAll && c.querySelectorAll("input,select,textarea")[0] || c, o = ((e) => Pn(e) || qt(e))(t), l = a._f.refs || [];
|
|
2099
|
+
if (o ? l.find((e) => e === t) : t === a._f.ref) return;
|
|
2100
|
+
let u = { ...a._f };
|
|
2101
|
+
o ? (u.refs = [
|
|
2102
|
+
...l.filter(er),
|
|
2103
|
+
t,
|
|
2104
|
+
...Array.isArray(q(i, e)) ? [{}] : []
|
|
2105
|
+
], u.ref = {
|
|
2106
|
+
type: t.type,
|
|
2107
|
+
name: e
|
|
2108
|
+
}) : (u.ref = t, delete u.refs), Y(r, e, { _f: u }), O(e, !1, void 0, t);
|
|
2109
|
+
} else a = q(r, e, {}), a._f && (a._f.mount = !1), (t.shouldUnregister || n.shouldUnregister) && (!((e, t) => t.split(".").some((t, n, r) => !isNaN(Number(t)) && e.has(r.slice(0, n).join("."))))(s.array, e) || !o.action) && s.unMount.add(e);
|
|
2110
|
+
}
|
|
2111
|
+
};
|
|
2112
|
+
}, le = () => t.shouldFocusError && !t.shouldUseNativeValidation && jn(r, L, s.mount), ue = (e, i) => async (o) => {
|
|
2113
|
+
let l, u;
|
|
2114
|
+
o && (o.preventDefault && o.preventDefault(), o.persist && o.persist());
|
|
2115
|
+
let d = G(a);
|
|
2116
|
+
if (_.state.next({ isSubmitting: !0 }), t.resolver) {
|
|
2117
|
+
let e = y, { errors: t, values: r } = await A();
|
|
2118
|
+
if (e !== y) return;
|
|
2119
|
+
T(), Object.keys(c).forEach(S), n.errors = t, d = G(r);
|
|
2120
|
+
} else {
|
|
2121
|
+
let e = y;
|
|
2122
|
+
if (await M({
|
|
2123
|
+
fields: r,
|
|
2124
|
+
eventType: nn
|
|
2125
|
+
}), e !== y) return;
|
|
2126
|
+
$(n.errors, bn);
|
|
2127
|
+
}
|
|
2128
|
+
if (s.disabled.size) for (let e of s.disabled) $(d, e);
|
|
2129
|
+
if (Q(n.errors)) {
|
|
2130
|
+
_.state.next({ errors: {} });
|
|
2131
|
+
try {
|
|
2132
|
+
l = await e(d, o);
|
|
2133
|
+
} catch (e) {
|
|
2134
|
+
u = e;
|
|
2135
|
+
}
|
|
2136
|
+
} else i && await i({ ...n.errors }, o), le(), setTimeout(le);
|
|
2137
|
+
if (_.state.next({
|
|
2138
|
+
isSubmitted: !0,
|
|
2139
|
+
isSubmitting: !1,
|
|
2140
|
+
isSubmitSuccessful: Q(n.errors) && !u,
|
|
2141
|
+
submitCount: n.submitCount + 1,
|
|
2142
|
+
errors: n.errors
|
|
2143
|
+
}), u) throw u;
|
|
2144
|
+
return l;
|
|
2145
|
+
}, de = (e, l = {}) => {
|
|
2146
|
+
y++;
|
|
2147
|
+
let u = e ? G(e) : i, d = G(u), f = Q(e), p = d, h = r;
|
|
2148
|
+
if (Object.keys(c).forEach(S), l.keepDefaultValues || (i = u), !l.keepValues) {
|
|
2149
|
+
if (l.keepDirtyValues) {
|
|
2150
|
+
let e = /* @__PURE__ */ new Set([...s.mount, ...nr(cr(i, a, void 0, h), n.dirtyFields)]);
|
|
2151
|
+
for (let t of e) {
|
|
2152
|
+
let e = q(n.dirtyFields, t), r = q(a, t), i = q(p, t);
|
|
2153
|
+
e && !K(r) ? Y(p, t, r) : e || K(i) || te(t, i);
|
|
2154
|
+
}
|
|
2155
|
+
} else {
|
|
2156
|
+
if ($t && K(e)) for (let e of s.mount) {
|
|
2157
|
+
let t = q(r, e);
|
|
2158
|
+
if (t && t._f) {
|
|
2159
|
+
let e = Array.isArray(t._f.refs) ? t._f.refs[0] : t._f.ref;
|
|
2160
|
+
if (Nn(e)) {
|
|
2161
|
+
let t = e.closest("form");
|
|
2162
|
+
if (t) {
|
|
2163
|
+
t.reset();
|
|
2164
|
+
break;
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
if (l.keepFieldsRef) for (let e of s.mount) te(e, q(p, e));
|
|
2170
|
+
else r = {};
|
|
2171
|
+
}
|
|
2172
|
+
if (t.shouldUnregister) {
|
|
2173
|
+
if (a = l.keepDefaultValues ? G(i) : {}, l.keepFieldsRef) for (let e of s.mount) Y(a, e, q(p, e));
|
|
2174
|
+
} else a = G(p);
|
|
2175
|
+
_.array.next({ values: { ...p } }), _.state.next({
|
|
2176
|
+
name: void 0,
|
|
2177
|
+
type: void 0,
|
|
2178
|
+
values: { ...p }
|
|
2179
|
+
});
|
|
2180
|
+
}
|
|
2181
|
+
s = {
|
|
2182
|
+
mount: l.keepDirtyValues ? s.mount : /* @__PURE__ */ new Set(),
|
|
2183
|
+
unMount: /* @__PURE__ */ new Set(),
|
|
2184
|
+
array: /* @__PURE__ */ new Set(),
|
|
2185
|
+
registerName: /* @__PURE__ */ new Set(),
|
|
2186
|
+
disabled: /* @__PURE__ */ new Set(),
|
|
2187
|
+
watch: /* @__PURE__ */ new Set(),
|
|
2188
|
+
watchAll: !1,
|
|
2189
|
+
focus: ""
|
|
2190
|
+
}, o.mount = !m.isValid || !!l.keepIsValid || !!l.keepDirtyValues || !t.shouldUnregister && !Q(p), o.watch = !!t.shouldUnregister, o.keepIsValid = !!l.keepIsValid, o.action = !1, o.actionArrayLengths.clear(), l.keepErrors || (n.errors = {}), _.state.next({
|
|
2191
|
+
submitCount: l.keepSubmitCount ? n.submitCount : 0,
|
|
2192
|
+
isDirty: !f && (l.keepDirty ? n.isDirty : l.keepValues ? N() : !(!l.keepDefaultValues || X(e, i))),
|
|
2193
|
+
isSubmitted: !!l.keepIsSubmitted && n.isSubmitted,
|
|
2194
|
+
dirtyFields: f ? {} : l.keepDirtyValues ? l.keepDefaultValues && a ? cr(i, a, void 0, h) : n.dirtyFields : l.keepDefaultValues && e ? cr(i, e, void 0, h) : l.keepDirty ? n.dirtyFields : l.keepValues ? cr(i, a, void 0, h) : {},
|
|
2195
|
+
touchedFields: l.keepTouched ? n.touchedFields : {},
|
|
2196
|
+
...l.keepIsValidating || !n.isValidating && Q(n.validatingFields) ? null : {
|
|
2197
|
+
validatingFields: {},
|
|
2198
|
+
isValidating: !1
|
|
2199
|
+
},
|
|
2200
|
+
errors: l.keepErrors ? n.errors : {},
|
|
2201
|
+
isSubmitSuccessful: !!l.keepIsSubmitSuccessful && n.isSubmitSuccessful,
|
|
2202
|
+
isSubmitting: !1,
|
|
2203
|
+
defaultValues: i
|
|
2204
|
+
});
|
|
2205
|
+
}, fe = (e, n) => de(J(e) ? e(a) : e, {
|
|
2206
|
+
...t.resetOptions,
|
|
2207
|
+
...n
|
|
2208
|
+
}), pe = (e) => {
|
|
2209
|
+
let { name: t, type: r, values: i, ...a } = e;
|
|
2210
|
+
n = {
|
|
2211
|
+
...n,
|
|
2212
|
+
...a
|
|
2213
|
+
};
|
|
2214
|
+
};
|
|
2215
|
+
_.state.subscribe({ next: pe });
|
|
2216
|
+
let me = {
|
|
2217
|
+
control: {
|
|
2218
|
+
register: ce,
|
|
2219
|
+
unregister: oe,
|
|
2220
|
+
getFieldState: re,
|
|
2221
|
+
handleSubmit: ue,
|
|
2222
|
+
setError: z,
|
|
2223
|
+
_subscribe: ae,
|
|
2224
|
+
_runSchema: A,
|
|
2225
|
+
_updateIsValidating: T,
|
|
2226
|
+
_focusError: le,
|
|
2227
|
+
_getWatch: P,
|
|
2228
|
+
_getDirty: N,
|
|
2229
|
+
_setValid: w,
|
|
2230
|
+
_setFieldArray: (e, i = [], s, c, l = !0, u = !0) => {
|
|
2231
|
+
if (c && s && !t.disabled) {
|
|
2232
|
+
o.action = !0;
|
|
2233
|
+
let t = q(r, e);
|
|
2234
|
+
if (o.actionArrayLengths.has(e) || o.actionArrayLengths.set(e, Array.isArray(t) ? t.length : 0), u && Array.isArray(t)) {
|
|
2235
|
+
let n = s(t, c.argA, c.argB);
|
|
2236
|
+
l && Y(r, e, n);
|
|
2237
|
+
}
|
|
2238
|
+
let a = q(n.errors, e);
|
|
2239
|
+
if (u && Array.isArray(a)) {
|
|
2240
|
+
let t = a.root, r = s(a, c.argA, c.argB) || a;
|
|
2241
|
+
t && (r.root = t), l && Y(n.errors, e, r), ((e, t) => {
|
|
2242
|
+
let n = q(e, t);
|
|
2243
|
+
!Kn(n).length && (n == null || !n.root) && $(e, t);
|
|
2244
|
+
})(n.errors, e);
|
|
2245
|
+
}
|
|
2246
|
+
let d = q(n.touchedFields, e), f = u && Array.isArray(d);
|
|
2247
|
+
if (f) {
|
|
2248
|
+
let t = s(d, c.argA, c.argB);
|
|
2249
|
+
l && Y(n.touchedFields, e, t);
|
|
2250
|
+
}
|
|
2251
|
+
let p = q(n.dirtyFields, e);
|
|
2252
|
+
if (u && Array.isArray(p)) {
|
|
2253
|
+
let t = s(p, c.argA, c.argB) || p;
|
|
2254
|
+
l && Y(n.dirtyFields, e, t);
|
|
2255
|
+
}
|
|
2256
|
+
g("dirtyFields") && E(), _.state.next({
|
|
2257
|
+
name: e,
|
|
2258
|
+
isDirty: N(e, i),
|
|
2259
|
+
dirtyFields: n.dirtyFields,
|
|
2260
|
+
...f && { touchedFields: n.touchedFields },
|
|
2261
|
+
errors: n.errors,
|
|
2262
|
+
isValid: n.isValid
|
|
2263
|
+
});
|
|
2264
|
+
} else Y(a, e, i);
|
|
2265
|
+
},
|
|
2266
|
+
_setDisabledField: se,
|
|
2267
|
+
_setErrors: (e) => {
|
|
2268
|
+
Object.keys(c).forEach(S);
|
|
2269
|
+
let t = !Q(e);
|
|
2270
|
+
n.errors = e, _.state.next({
|
|
2271
|
+
errors: n.errors,
|
|
2272
|
+
...t ? { isValid: !1 } : {}
|
|
2273
|
+
}), !t && o.mount && w();
|
|
2274
|
+
},
|
|
2275
|
+
_getFieldArray: (e) => Kn(q(o.mount ? a : i, e, t.shouldUnregister ? q(i, e, []) : [])),
|
|
2276
|
+
_reset: de,
|
|
2277
|
+
_resetDefaultValues: () => J(t.defaultValues) && t.defaultValues().then((e) => {
|
|
2278
|
+
fe(e, t.resetOptions), _.state.next({ isLoading: !1 });
|
|
2279
|
+
}),
|
|
2280
|
+
_removeUnmounted: () => {
|
|
2281
|
+
for (let e of s.unMount) {
|
|
2282
|
+
let t = q(r, e);
|
|
2283
|
+
t && (t._f.refs ? t._f.refs.every((e) => !er(e)) : !er(t._f.ref)) && oe(e);
|
|
2284
|
+
}
|
|
2285
|
+
s.unMount = /* @__PURE__ */ new Set();
|
|
2286
|
+
},
|
|
2287
|
+
_disableForm: (e) => {
|
|
2288
|
+
wn(e) && (_.state.next({ disabled: e }), jn(r, (t, n) => {
|
|
2289
|
+
let i = q(r, n);
|
|
2290
|
+
i && (t.disabled = i._f.disabled || e, Array.isArray(i._f.refs) && i._f.refs.forEach((t) => {
|
|
2291
|
+
t.disabled = i._f.disabled || e;
|
|
2292
|
+
}));
|
|
2293
|
+
}, 0));
|
|
2294
|
+
},
|
|
2295
|
+
_subjects: _,
|
|
2296
|
+
_proxyFormState: m,
|
|
2297
|
+
get _fields() {
|
|
2298
|
+
return r;
|
|
2299
|
+
},
|
|
2300
|
+
get _formValues() {
|
|
2301
|
+
return a;
|
|
2302
|
+
},
|
|
2303
|
+
get _state() {
|
|
2304
|
+
return o;
|
|
2305
|
+
},
|
|
2306
|
+
set _state(e) {
|
|
2307
|
+
o = e;
|
|
2308
|
+
},
|
|
2309
|
+
get _defaultValues() {
|
|
2310
|
+
return i;
|
|
2311
|
+
},
|
|
2312
|
+
get _names() {
|
|
2313
|
+
return s;
|
|
2314
|
+
},
|
|
2315
|
+
set _names(e) {
|
|
2316
|
+
s = e;
|
|
2317
|
+
},
|
|
2318
|
+
get _formState() {
|
|
2319
|
+
return n;
|
|
2320
|
+
},
|
|
2321
|
+
get _options() {
|
|
2322
|
+
return t;
|
|
2323
|
+
},
|
|
2324
|
+
set _options(e) {
|
|
2325
|
+
t = {
|
|
2326
|
+
...t,
|
|
2327
|
+
...e
|
|
2328
|
+
}, d = kn(t.mode), f = kn(t.reValidateMode), b = t.criteriaMode === un;
|
|
2329
|
+
}
|
|
2330
|
+
},
|
|
2331
|
+
subscribe: (e) => (o.mount = !0, h = {
|
|
2332
|
+
...h,
|
|
2333
|
+
...e.formState
|
|
2334
|
+
}, ae({
|
|
2335
|
+
...e,
|
|
2336
|
+
formState: {
|
|
2337
|
+
...p,
|
|
2338
|
+
...e.formState
|
|
2339
|
+
}
|
|
2340
|
+
})),
|
|
2341
|
+
trigger: R,
|
|
2342
|
+
register: ce,
|
|
2343
|
+
handleSubmit: ue,
|
|
2344
|
+
watch: (e, t) => {
|
|
2345
|
+
if (J(e)) {
|
|
2346
|
+
u++;
|
|
2347
|
+
let { unsubscribe: n } = _.state.subscribe({ next: (n) => "values" in n && e(n.values || P(void 0, t), n) }), r = !1;
|
|
2348
|
+
return { unsubscribe: () => {
|
|
2349
|
+
r || (r = !0, u--, n());
|
|
2350
|
+
} };
|
|
2351
|
+
}
|
|
2352
|
+
return P(e, t, !0);
|
|
2353
|
+
},
|
|
2354
|
+
setValue: te,
|
|
2355
|
+
setValues: (e, t = {}) => {
|
|
2356
|
+
let r = J(e) ? e(a) : e;
|
|
2357
|
+
if (!X(a, r)) {
|
|
2358
|
+
a = {
|
|
2359
|
+
...a,
|
|
2360
|
+
...r
|
|
2361
|
+
};
|
|
2362
|
+
for (let e of s.mount) Qn(r, e) && ee(e, q(r, e), t, !0, !0);
|
|
2363
|
+
_.state.next({
|
|
2364
|
+
...n,
|
|
2365
|
+
name: void 0,
|
|
2366
|
+
type: void 0,
|
|
2367
|
+
...u ? { values: a } : {}
|
|
2368
|
+
}), t.shouldValidate && w();
|
|
2369
|
+
}
|
|
2370
|
+
},
|
|
2371
|
+
getValues: (e, t) => {
|
|
2372
|
+
let r = { ...o.mount ? a : i };
|
|
2373
|
+
return t && (r = Xn(t.dirtyFields ? n.dirtyFields : n.touchedFields, r)), K(e) ? r : Z(e) ? q(r, e) : e.map((e) => q(r, e));
|
|
2374
|
+
},
|
|
2375
|
+
getErrors: (e) => K(e) ? { ...n.errors } : Z(e) ? q(n.errors, e) : e.map((e) => q(n.errors, e)),
|
|
2376
|
+
reset: fe,
|
|
2377
|
+
resetField: (e, t = {}) => {
|
|
2378
|
+
q(r, e) && ($(n.validatingFields, e), K(t.defaultValue) ? te(e, G(q(i, e))) : (te(e, t.defaultValue), Y(i, e, G(t.defaultValue))), t.keepTouched || $(n.touchedFields, e), t.keepDirty || ($(n.dirtyFields, e), n.isDirty = t.defaultValue ? N(e, G(q(i, e))) : N()), t.keepError || (C(e), $(n.errors, e), w()), _.state.next({
|
|
2379
|
+
...n,
|
|
2380
|
+
isValidating: !Q(n.validatingFields)
|
|
2381
|
+
}));
|
|
2382
|
+
},
|
|
2383
|
+
resetDefaultValues: (e, t = {}) => {
|
|
2384
|
+
if (i = G(e), !t.keepDirty) {
|
|
2385
|
+
let e = cr(i, a, void 0, r);
|
|
2386
|
+
n.dirtyFields = e, n.isDirty = !Q(e);
|
|
2387
|
+
}
|
|
2388
|
+
t.keepIsValid || w(), _.state.next({
|
|
2389
|
+
...n,
|
|
2390
|
+
defaultValues: i
|
|
2391
|
+
});
|
|
2392
|
+
},
|
|
2393
|
+
clearErrors: ie,
|
|
2394
|
+
unregister: oe,
|
|
2395
|
+
setError: z,
|
|
2396
|
+
setFocus: (e, t = {}) => {
|
|
2397
|
+
let n = q(r, e), i = n && n._f;
|
|
2398
|
+
if (i) {
|
|
2399
|
+
let e = i.refs ? i.refs[0] : i.ref;
|
|
2400
|
+
e.focus && setTimeout(() => {
|
|
2401
|
+
e.focus(), t.shouldSelect && J(e.select) && e.select();
|
|
2402
|
+
});
|
|
2403
|
+
}
|
|
2404
|
+
},
|
|
2405
|
+
getFieldState: re
|
|
2406
|
+
};
|
|
2407
|
+
return {
|
|
2408
|
+
...me,
|
|
2409
|
+
formControl: me
|
|
2410
|
+
};
|
|
2411
|
+
}
|
|
2412
|
+
function vr(e = {}) {
|
|
2413
|
+
let t = x.useRef(void 0), n = x.useRef(void 0), r = x.useRef(e.formControl), i = x.useRef(!!e.validate), [a, o] = x.useState(() => ({
|
|
2414
|
+
...G(gr),
|
|
2415
|
+
isLoading: J(e.defaultValues),
|
|
2416
|
+
errors: e.errors || {},
|
|
2417
|
+
disabled: e.disabled || !1,
|
|
2418
|
+
defaultValues: J(e.defaultValues) ? void 0 : e.defaultValues
|
|
2419
|
+
}));
|
|
2420
|
+
if (!t.current || e.formControl && r.current !== e.formControl) {
|
|
2421
|
+
if (r.current = e.formControl, e.formControl) t.current = {
|
|
2422
|
+
...e.formControl,
|
|
2423
|
+
formState: a
|
|
2424
|
+
}, e.defaultValues && !J(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
|
|
2425
|
+
else {
|
|
2426
|
+
let { formControl: n, ...r } = _r(e);
|
|
2427
|
+
t.current = {
|
|
2428
|
+
...r,
|
|
2429
|
+
formState: a
|
|
2430
|
+
};
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2433
|
+
let s = t.current.control;
|
|
2434
|
+
s._options = {
|
|
2435
|
+
...e,
|
|
2436
|
+
validate: e.validate
|
|
2437
|
+
};
|
|
2438
|
+
let c = () => ({
|
|
2439
|
+
...s._formState,
|
|
2440
|
+
defaultValues: s._defaultValues
|
|
2441
|
+
}), { resyncIfNeeded: l, snapshot: u } = function(e) {
|
|
2442
|
+
let t = x.useRef(!1), n = x.useRef(!1), r = x.useRef(void 0), i = x.useRef(0);
|
|
2443
|
+
return i.current++, !n.current && e && (n.current = !0, r.current = G(e())), {
|
|
2444
|
+
resyncIfNeeded: x.useCallback((e, a, o) => {
|
|
2445
|
+
if (e && (t.current || n.current && i.current > 1)) {
|
|
2446
|
+
let e = a();
|
|
2447
|
+
X(r.current, e) || o(e);
|
|
2448
|
+
}
|
|
2449
|
+
t.current = !0;
|
|
2450
|
+
}, []),
|
|
2451
|
+
snapshot: x.useCallback((e, t) => {
|
|
2452
|
+
e && (r.current = G(t()));
|
|
2453
|
+
}, [])
|
|
2454
|
+
};
|
|
2455
|
+
}(c);
|
|
2456
|
+
return En(() => {
|
|
2457
|
+
l(!0, c, o);
|
|
2458
|
+
let e = s._subscribe({
|
|
2459
|
+
formState: s._proxyFormState,
|
|
2460
|
+
callback: () => o({
|
|
2461
|
+
...s._formState,
|
|
2462
|
+
defaultValues: s._defaultValues
|
|
2463
|
+
}),
|
|
2464
|
+
reRenderRoot: !0
|
|
2465
|
+
});
|
|
2466
|
+
return o((e) => ({
|
|
2467
|
+
...e,
|
|
2468
|
+
isReady: !0
|
|
2469
|
+
})), s._formState.isReady = !0, () => {
|
|
2470
|
+
e(), u(!0, c);
|
|
2471
|
+
};
|
|
2472
|
+
}, [
|
|
2473
|
+
s,
|
|
2474
|
+
l,
|
|
2475
|
+
u
|
|
2476
|
+
]), x.useEffect(() => s._disableForm(e.disabled), [s, e.disabled]), x.useEffect(() => {
|
|
2477
|
+
e.mode && (s._options.mode = e.mode), e.reValidateMode && (s._options.reValidateMode = e.reValidateMode);
|
|
2478
|
+
}, [
|
|
2479
|
+
s,
|
|
2480
|
+
e.mode,
|
|
2481
|
+
e.reValidateMode
|
|
2482
|
+
]), x.useEffect(() => {
|
|
2483
|
+
e.errors && (s._setErrors(e.errors), s._focusError());
|
|
2484
|
+
}, [s, e.errors]), x.useEffect(() => {
|
|
2485
|
+
var n;
|
|
2486
|
+
i.current && !e.validate && ((n = t.current) == null || n.clearErrors(yn)), i.current = !!e.validate;
|
|
2487
|
+
}, [e.validate]), x.useEffect(() => {
|
|
2488
|
+
e.shouldUnregister && s._subjects.state.next({ values: s._getWatch() });
|
|
2489
|
+
}, [s, e.shouldUnregister]), x.useEffect(() => {
|
|
2490
|
+
if (s._proxyFormState.isDirty) {
|
|
2491
|
+
let e = s._getDirty();
|
|
2492
|
+
e !== a.isDirty && s._subjects.state.next({ isDirty: e });
|
|
2493
|
+
}
|
|
2494
|
+
}, [s, a.isDirty]), x.useEffect(() => {
|
|
2495
|
+
e.values && !X(e.values, n.current) ? (s._reset(e.values, {
|
|
2496
|
+
keepFieldsRef: !0,
|
|
2497
|
+
...s._options.resetOptions
|
|
2498
|
+
}), s._options.resetOptions?.keepIsValid || s._setValid(), n.current = e.values, o((e) => ({ ...e }))) : s._resetDefaultValues();
|
|
2499
|
+
}, [s, e.values]), x.useEffect(() => {
|
|
2500
|
+
s._state.mount || (s._setValid(), s._state.mount = !0), s._state.watch && (s._state.watch = !1, s._subjects.state.next({ ...s._formState })), s._removeUnmounted();
|
|
2501
|
+
}), t.current.formState = x.useMemo(() => ((e, t, n, r = !0) => {
|
|
2502
|
+
let i = {};
|
|
2503
|
+
for (let a in e) Object.defineProperty(i, a, { get: () => {
|
|
2504
|
+
let i = a;
|
|
2505
|
+
return t._proxyFormState[i] !== un && (t._proxyFormState[i] = !r || un), n && (n[i] = !0), e[i];
|
|
2506
|
+
} });
|
|
2507
|
+
return i;
|
|
2508
|
+
})(a, s), [s, a]), t.current;
|
|
2509
|
+
}
|
|
2510
|
+
var yr = ["Ok", "Cancel"], br = {
|
|
2511
|
+
[R.Info]: "ValidationInformation",
|
|
2512
|
+
[R.Warning]: "ValidationWarning",
|
|
2513
|
+
[R.Error]: "ValidationStop",
|
|
2514
|
+
[R.Success]: "Check"
|
|
2515
|
+
}, xr = (e) => typeof e == "string" ? e : e.id ?? e, Sr = (e, t) => t !== void 0 && xr(e) === xr(t), Cr = (e) => typeof e != "string" && (typeof e.disabled == "function" ? e.disabled() : !0 === e.disabled), wr = T(w((e, r) => {
|
|
2516
|
+
let { description: s, type: c, icon: l, onCancel: u, onOption: d, onDone: p, onValidateOption: m, options: h = yr, autoFocusSel: g = ".defaultOption", defaultOption: _ = h[0], cancelOption: b = "Cancel", autoFocus: x, children: C, ...w } = e, T = vr({ shouldUseNativeValidation: !1 }), { handleSubmit: E, formState: D } = T, O = A(null), M = A(null), P = ue(), F = k(() => {
|
|
2517
|
+
let e = typeof l == "string" ? l : l ? void 0 : br[c];
|
|
2518
|
+
return e ? v(te, {
|
|
2519
|
+
iconKey: e,
|
|
2520
|
+
size: 32,
|
|
2521
|
+
ariaHidden: !0
|
|
2522
|
+
}) : l ?? null;
|
|
2523
|
+
}, [l, c]), I = ae((e) => typeof e == "string" ? e === "Ok" ? P("dialog.ok") : e === "Cancel" ? P("dialog.cancel") : e : typeof e.label == "function" ? e.label() : e.label, [P]), ee = A(null), [L, R] = j(null), re = ae(async (e) => {
|
|
2524
|
+
let t = xr(e);
|
|
2525
|
+
if (L !== null || Cr(e)) return;
|
|
2526
|
+
let n = Sr(e, b), r;
|
|
2527
|
+
try {
|
|
2528
|
+
if (R(t), r = !!n || (await Promise.resolve(m?.(t)) ?? !0), !0 !== r) return;
|
|
2529
|
+
await Promise.resolve(d?.(t, n, Sr(e, _))), p?.(t);
|
|
2530
|
+
} catch {} finally {
|
|
2531
|
+
R(null);
|
|
2532
|
+
}
|
|
2533
|
+
}, [
|
|
2534
|
+
d,
|
|
2535
|
+
p,
|
|
2536
|
+
m,
|
|
2537
|
+
b,
|
|
2538
|
+
_,
|
|
2539
|
+
L
|
|
2540
|
+
]), ie = ae((e, t) => {
|
|
2541
|
+
setTimeout(() => {
|
|
2542
|
+
re(_);
|
|
2543
|
+
}, 180);
|
|
2544
|
+
}, [re, _]), z = ae(() => {
|
|
2545
|
+
d?.(xr(b), !0, !1), u?.(), p?.(null);
|
|
2546
|
+
}, [
|
|
2547
|
+
d,
|
|
2548
|
+
b,
|
|
2549
|
+
u,
|
|
2550
|
+
p
|
|
2551
|
+
]), oe = D && (Object.keys(D.errors).length > 0 || D.disabled || D.isSubmitting), se = ae((e, t, r) => {
|
|
2552
|
+
let a = Sr(e, b), o = {
|
|
2553
|
+
className: t ? "defaultOption" : "action",
|
|
2554
|
+
type: t ? "submit" : "button",
|
|
2555
|
+
style: { minWidth: "75px" },
|
|
2556
|
+
onClick: () => {
|
|
2557
|
+
a ? z() : t || re(e);
|
|
2558
|
+
}
|
|
2559
|
+
}, s = typeof e == "string" ? void 0 : e.renderButton;
|
|
2560
|
+
if (s) return v(S, { children: s(o, t) }, `action:${r}`);
|
|
2561
|
+
let c = L !== null && Sr(e, L), l = {
|
|
2562
|
+
className: t ? "defaultOption" : "action",
|
|
2563
|
+
variant: t ? "contained" : "outlined",
|
|
2564
|
+
size: "small",
|
|
2565
|
+
disabled: !a && (oe || Cr(e)) || L !== null && !c,
|
|
2566
|
+
color: "primary",
|
|
2567
|
+
...o
|
|
2568
|
+
};
|
|
2569
|
+
if (t || a) {
|
|
2570
|
+
let e = t ? O : M;
|
|
2571
|
+
l.touchRippleRef = e, l.onPointerDown = (t) => {
|
|
2572
|
+
e.current?.start(t, { center: !1 }), t.stopPropagation(), t.preventDefault();
|
|
2573
|
+
};
|
|
2574
|
+
}
|
|
2575
|
+
return y(n, {
|
|
2576
|
+
...l,
|
|
2577
|
+
children: [v("div", {
|
|
2578
|
+
style: { visibility: c ? "hidden" : void 0 },
|
|
2579
|
+
children: I(e)
|
|
2580
|
+
}), m && !a ? v(i, {
|
|
2581
|
+
size: 16,
|
|
2582
|
+
color: "inherit",
|
|
2583
|
+
style: { opacity: +!!c },
|
|
2584
|
+
sx: {
|
|
2585
|
+
position: "absolute",
|
|
2586
|
+
top: "calc(50% - 8px)",
|
|
2587
|
+
left: "calc(50% - 8px)",
|
|
2588
|
+
zIndex: 1,
|
|
2589
|
+
pointerEvents: "none",
|
|
2590
|
+
transition: "opacity 120ms"
|
|
2591
|
+
}
|
|
2592
|
+
}) : null]
|
|
2593
|
+
}, `action:${r}`);
|
|
2594
|
+
}, [
|
|
2595
|
+
h,
|
|
2596
|
+
_,
|
|
2597
|
+
b,
|
|
2598
|
+
D,
|
|
2599
|
+
I,
|
|
2600
|
+
L
|
|
2601
|
+
]), ce = k(() => {
|
|
2602
|
+
let e = [];
|
|
2603
|
+
for (let t = 0; t < h.length; t++) {
|
|
2604
|
+
let n = h[t], r = _ === void 0 ? t === 0 : Sr(n, _);
|
|
2605
|
+
e.push(se(n, r, t));
|
|
2606
|
+
}
|
|
2607
|
+
return e;
|
|
2608
|
+
}, [
|
|
2609
|
+
h,
|
|
2610
|
+
_,
|
|
2611
|
+
D,
|
|
2612
|
+
P,
|
|
2613
|
+
L
|
|
2614
|
+
]);
|
|
2615
|
+
return v(Pt, {
|
|
2616
|
+
onCancel: z,
|
|
2617
|
+
initialPosition: { y: Kt === "touch" ? "15" : "35" },
|
|
2618
|
+
onDone: p,
|
|
2619
|
+
autoFocusSel: g,
|
|
2620
|
+
isModal: !0,
|
|
2621
|
+
ref: r,
|
|
2622
|
+
...w,
|
|
2623
|
+
children: v(Jn, {
|
|
2624
|
+
...T,
|
|
2625
|
+
children: y("form", {
|
|
2626
|
+
ref: ee,
|
|
2627
|
+
onSubmit: E(ie),
|
|
2628
|
+
children: [v(o, {
|
|
2629
|
+
dividers: !0,
|
|
2630
|
+
onKeyDown: (e) => {
|
|
2631
|
+
if (e.isDefaultPrevented()) return;
|
|
2632
|
+
e.stopPropagation();
|
|
2633
|
+
let t = null, n = null, r = e.which === ne.Escape && b;
|
|
2634
|
+
if (r) {
|
|
2635
|
+
if (L !== null) return;
|
|
2636
|
+
t = b, n = M;
|
|
2637
|
+
} else {
|
|
2638
|
+
if (oe || L !== null) return;
|
|
2639
|
+
e.which === ne.Enter && (t = _ ?? h[0], n = O);
|
|
2640
|
+
}
|
|
2641
|
+
t && (n?.current?.start(e, { center: !1 }), setTimeout(() => {
|
|
2642
|
+
n?.current?.stop(e), r && z();
|
|
2643
|
+
}, 180));
|
|
2644
|
+
},
|
|
2645
|
+
children: y(t, {
|
|
2646
|
+
sx: {
|
|
2647
|
+
display: "flex",
|
|
2648
|
+
flexDirection: "column",
|
|
2649
|
+
whiteSpace: "pre-wrap",
|
|
2650
|
+
rowGap: (e) => e.spacing(F || s ? 1.5 : 0)
|
|
2651
|
+
},
|
|
2652
|
+
children: [y(t, {
|
|
2653
|
+
sx: {
|
|
2654
|
+
display: "flex",
|
|
2655
|
+
flexDirection: "row",
|
|
2656
|
+
alignItems: "flex-start",
|
|
2657
|
+
columnGap: (e) => e.spacing(2)
|
|
2658
|
+
},
|
|
2659
|
+
children: [F ? v(t, {
|
|
2660
|
+
sx: {
|
|
2661
|
+
display: "flex",
|
|
2662
|
+
flex: "none"
|
|
2663
|
+
},
|
|
2664
|
+
children: F
|
|
2665
|
+
}) : null, v(f, {
|
|
2666
|
+
sx: { alignSelf: "center" },
|
|
2667
|
+
children: s
|
|
2668
|
+
})]
|
|
2669
|
+
}), C]
|
|
2670
|
+
})
|
|
2671
|
+
}), v(a, {
|
|
2672
|
+
sx: {
|
|
2673
|
+
paddingTop: (e) => e.spacing(1),
|
|
2674
|
+
paddingBottom: (e) => e.spacing(1),
|
|
2675
|
+
paddingLeft: (e) => e.spacing(1),
|
|
2676
|
+
paddingRight: (e) => e.spacing(1),
|
|
2677
|
+
backgroundColor: (e) => N(e.palette.action.hover, .03)
|
|
2678
|
+
},
|
|
2679
|
+
children: ce
|
|
2680
|
+
})]
|
|
2681
|
+
})
|
|
2682
|
+
})
|
|
2683
|
+
});
|
|
2684
|
+
}));
|
|
2685
|
+
export { Oe as _, Ge as a, Be as c, Ie as d, Fe as f, ke as g, Ae as h, Ye as i, Ve as l, Me as m, xr as n, We as o, je as p, Pt as r, He as s, wr as t, ze as u, De as v, we as y };
|