@sheetxl/utils-mui 0.8.0-beta.22 → 0.8.0-beta.23
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/{ChwH4cpKNUXWYosE.mjs → 0zz0AZs4WvdhQ9OM.mjs} +2 -2
- package/browser/esm/C-ubcDi_VQYRfsbB.mjs +2588 -0
- package/browser/esm/index.mjs +896 -754
- package/licenses/dependencies.txt +1 -1
- package/node/esm/{dXZXZwMw1BlQOopL.mjs → CapKnaq9a-0-L1Et.mjs} +1 -1
- package/node/esm/index.mjs +764 -826
- package/package.json +4 -4
- package/types/src/theme/index.d.ts +0 -1
- package/browser/esm/BoeNTbAcS-FGpa_7.mjs +0 -2691
- package/types/src/theme/ScrollbarTheming.d.ts +0 -12
|
@@ -1,2691 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.8.0-beta.22
|
|
3
|
-
*
|
|
4
|
-
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: MIT
|
|
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, { cloneElement as S, forwardRef as C, memo as w, useEffect as T, useId as E, useLayoutEffect as D, useMemo as O, useRef as k, useState as A, version as ee } from "react";
|
|
11
|
-
import { alpha as j, darken as M, lighten as N } from "@mui/system";
|
|
12
|
-
import { CommonUtils as P } from "@sheetxl/utils";
|
|
13
|
-
import { Command as te, DynamicIcon as ne, KeyCodes as re, KeyModifiers as F, NotifierType as ie, ReactUtils as I, RenderSlot as ae, floatThemeScopeProps as oe, getScrollbarCssVariables as L, useCallbackRef as se, useFloatSurface as ce, useFullscreenPortal as le, useImperativeElement as ue, useMeasure as de, useTranslator as fe, zIndexVar as pe } from "@sheetxl/utils-react";
|
|
14
|
-
import { deepmerge as me } from "@mui/utils";
|
|
15
|
-
import he, { createPortal as ge } from "react-dom";
|
|
16
|
-
var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, be = Object.getOwnPropertyNames, xe = Object.getPrototypeOf, Se = Object.prototype.hasOwnProperty, Ce = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), we = (e, t, n) => (n = e == null ? {} : _e(xe(e)), ((e, t, n, r) => {
|
|
17
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i, a = be(t), o = 0, s = a.length; o < s; o++) i = a[o], Se.call(e, i) || i === n || ve(e, i, {
|
|
18
|
-
get: ((e) => t[e]).bind(null, i),
|
|
19
|
-
enumerable: !(r = ye(t, i)) || r.enumerable
|
|
20
|
-
});
|
|
21
|
-
return e;
|
|
22
|
-
})(!t && e && e.__esModule && Se.call(e, "default") ? n : ve(n, "default", {
|
|
23
|
-
value: e,
|
|
24
|
-
enumerable: !0
|
|
25
|
-
}), e));
|
|
26
|
-
function Te(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 = Te(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 Ee() {
|
|
38
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = Te(e)) && (r && (r += " "), r += t);
|
|
39
|
-
return r;
|
|
40
|
-
}
|
|
41
|
-
function De(e, t) {
|
|
42
|
-
if (typeof e == "function") return e(t);
|
|
43
|
-
e && (e.current = t);
|
|
44
|
-
}
|
|
45
|
-
var Oe = parseInt(ee.split(".")[0], 10) >= 19 ? function(e) {
|
|
46
|
-
return (t) => {
|
|
47
|
-
let n = [];
|
|
48
|
-
for (let r of e) {
|
|
49
|
-
let e = De(r, t), i = typeof e == "function";
|
|
50
|
-
n.push(i ? e : () => De(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) De(n, t);
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
function ke(e) {
|
|
62
|
-
return O(() => Oe(e), e);
|
|
63
|
-
}
|
|
64
|
-
var Ae = w(C((e, n) => {
|
|
65
|
-
let { chips: i, sx: a, ...o } = e, s = O(() => {
|
|
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) : S(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
|
-
})), je = (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
|
-
}, Me = (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
|
-
}, Ne = (e) => v(ne, {
|
|
96
|
-
...e,
|
|
97
|
-
iconKey: "ArrowDownOutline"
|
|
98
|
-
}), Pe = (e) => v(ne, {
|
|
99
|
-
...e,
|
|
100
|
-
iconKey: "ArrowRightOutline"
|
|
101
|
-
}), Fe = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, Ie = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, Le = function(e, t = null) {
|
|
102
|
-
if (!e) return e;
|
|
103
|
-
e = e.replace(Fe, function(e, t, n, r) {
|
|
104
|
-
return t + t + n + n + r + r;
|
|
105
|
-
});
|
|
106
|
-
let n = Ie.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
|
-
}, Re = function(e, t = .2, n = "light") {
|
|
109
|
-
if (!e) return e;
|
|
110
|
-
let r = n !== "dark";
|
|
111
|
-
t < 0 && (r = !r, t *= -1), e = Le(e);
|
|
112
|
-
try {
|
|
113
|
-
return r ? M(e, Math.max(0, Math.min(1, 1 * t))) : N(e, Math.max(0, Math.min(1, 1.5 * t)));
|
|
114
|
-
} catch {
|
|
115
|
-
return e;
|
|
116
|
-
}
|
|
117
|
-
}, ze = (e) => {
|
|
118
|
-
e.stopPropagation();
|
|
119
|
-
}, R = {
|
|
120
|
-
onMouseDown: ze,
|
|
121
|
-
onTouchStart: ze
|
|
122
|
-
}, Be = (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 : j(n.palette.text.secondary, .75),
|
|
133
|
-
icon: e ? j(n.palette.text.secondary, .7) : j(n.palette.text.primary, .75)
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
components: {
|
|
137
|
-
MuiDialogTitle: { styleOverrides: { root: { fontWeight: "normal" } } },
|
|
138
|
-
MuiSelect: {
|
|
139
|
-
defaultProps: {
|
|
140
|
-
IconComponent: Ne,
|
|
141
|
-
MenuProps: {
|
|
142
|
-
container: () => document.fullscreenElement,
|
|
143
|
-
...R
|
|
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
|
-
...R
|
|
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 = me(i, t)), m(a);
|
|
232
|
-
};
|
|
233
|
-
function Ve(e, t) {
|
|
234
|
-
return t = me({
|
|
235
|
-
track: Re(e.palette.background.paper, .05, e?.palette.mode),
|
|
236
|
-
thumb: Re(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 || {}), L({
|
|
241
|
-
track: j(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 He(e, t) {
|
|
250
|
-
let n = Ve(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 P.getPlatform() === P.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 Ue = C((e, t) => {
|
|
294
|
-
let { slotProps: n, ...r } = e, { getPortalContainer: i, isFullscreen: a } = le();
|
|
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
|
-
Ue.displayName = "SimpleTooltip";
|
|
308
|
-
var We = w((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) => j(e.palette.background.paper, e.palette.action.disabledOpacity),
|
|
321
|
-
borderLeftColor: (e) => j(e.palette.background.paper, e.palette.action.disabledOpacity),
|
|
322
|
-
borderRightColor: (e) => j(e.palette.background.paper, e.palette.action.disabledOpacity),
|
|
323
|
-
borderBottomColor: (e) => j(e.palette.background.paper, 1 - e.palette.action.disabledOpacity),
|
|
324
|
-
backgroundColor: (e) => j(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
|
-
}), Ge = (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(Ge(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 = P.getPlatform() === P.OSType.MacOS || P.getPlatform() === P.OSType.IOS ? n("shortcut.modifier.cmd") : n("shortcut.modifier.ctrl");
|
|
364
|
-
return a?.[F.Ctrl] && (o.push(v(We, { modifier: r ? "^" : v("div", {
|
|
365
|
-
style: { paddingRight: "1px" },
|
|
366
|
-
children: s
|
|
367
|
-
}) }, "ctrl")), o.push("+")), a?.[F.Alt] && (o.push(v(We, { modifier: r ? "⌥" : n("shortcut.modifier.alt") }, "alt")), o.push("+")), a?.[F.Shift] && (o.push(v(We, { modifier: r ? "⇧" : v("div", {
|
|
368
|
-
style: { paddingRight: "1px" },
|
|
369
|
-
children: n("shortcut.modifier.shift")
|
|
370
|
-
}) }, "shift")), o.push("+")), a?.[F.Meta] && (o.push(v(We, { modifier: r ? v("div", {
|
|
371
|
-
style: { paddingTop: "1px" },
|
|
372
|
-
children: "⌘"
|
|
373
|
-
}) : n("shortcut.modifier.meta") }, "meta")), o.push("+")), o.push(v(We, { modifier: I.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
|
-
}, Ke = w(C((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 = fe(), b = null;
|
|
384
|
-
a && (b = Ge(a, g, l));
|
|
385
|
-
let [x, S] = A(null);
|
|
386
|
-
return T(() => {
|
|
387
|
-
Promise.resolve(i).then((e) => {
|
|
388
|
-
S(e);
|
|
389
|
-
});
|
|
390
|
-
}, [i]), v(Ue, {
|
|
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(Ae, { 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
|
-
})), qe = {
|
|
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: Je } = te, Ye = !1;
|
|
469
|
-
function Xe() {
|
|
470
|
-
Ye || (Ye = !0, Je.registerFromManifest("@sheetxl/utils-mui", import.meta.url, { messages: qe }));
|
|
471
|
-
}
|
|
472
|
-
var Ze = Ce((e, t) => {
|
|
473
|
-
t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
474
|
-
}), Qe = Ce((e, t) => {
|
|
475
|
-
var n = Ze();
|
|
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
|
-
}), z = we(Ce((e, t) => {
|
|
515
|
-
t.exports = Qe()();
|
|
516
|
-
})(), 1);
|
|
517
|
-
function $e(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 et(e) {
|
|
525
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
|
|
526
|
-
}
|
|
527
|
-
function tt(e) {
|
|
528
|
-
return typeof e == "number" && !isNaN(e);
|
|
529
|
-
}
|
|
530
|
-
function B(e) {
|
|
531
|
-
return parseInt(e, 10);
|
|
532
|
-
}
|
|
533
|
-
function nt(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 rt = [
|
|
537
|
-
"Moz",
|
|
538
|
-
"Webkit",
|
|
539
|
-
"O",
|
|
540
|
-
"ms"
|
|
541
|
-
];
|
|
542
|
-
function it(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 at = 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 < rt.length; n++) if (it(e, rt[n]) in t) return rt[n];
|
|
554
|
-
return "";
|
|
555
|
-
}(), ot = "";
|
|
556
|
-
function st(e, t) {
|
|
557
|
-
ot ||= $e([
|
|
558
|
-
"matches",
|
|
559
|
-
"webkitMatchesSelector",
|
|
560
|
-
"mozMatchesSelector",
|
|
561
|
-
"msMatchesSelector",
|
|
562
|
-
"oMatchesSelector"
|
|
563
|
-
], function(t) {
|
|
564
|
-
return et(e[t]);
|
|
565
|
-
}) ?? "";
|
|
566
|
-
let n = e[ot];
|
|
567
|
-
return !!et(n) && !!n.call(e, t);
|
|
568
|
-
}
|
|
569
|
-
function ct(e, t, n) {
|
|
570
|
-
let r = e;
|
|
571
|
-
do {
|
|
572
|
-
if (st(r, t)) return !0;
|
|
573
|
-
if (r === n) return !1;
|
|
574
|
-
r = r.parentNode;
|
|
575
|
-
} while (r);
|
|
576
|
-
return !1;
|
|
577
|
-
}
|
|
578
|
-
function lt(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 ut(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 dt(e) {
|
|
595
|
-
let t = e.clientHeight, n = e.ownerDocument.defaultView.getComputedStyle(e);
|
|
596
|
-
return t += B(n.borderTopWidth), t += B(n.borderBottomWidth), t;
|
|
597
|
-
}
|
|
598
|
-
function ft(e) {
|
|
599
|
-
let t = e.clientWidth, n = e.ownerDocument.defaultView.getComputedStyle(e);
|
|
600
|
-
return t += B(n.borderLeftWidth), t += B(n.borderRightWidth), t;
|
|
601
|
-
}
|
|
602
|
-
function pt(e) {
|
|
603
|
-
let t = e.clientHeight, n = e.ownerDocument.defaultView.getComputedStyle(e);
|
|
604
|
-
return t -= B(n.paddingTop), t -= B(n.paddingBottom), t;
|
|
605
|
-
}
|
|
606
|
-
function mt(e) {
|
|
607
|
-
let t = e.clientWidth, n = e.ownerDocument.defaultView.getComputedStyle(e);
|
|
608
|
-
return t -= B(n.paddingLeft), t -= B(n.paddingRight), t;
|
|
609
|
-
}
|
|
610
|
-
function ht({ 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 gt(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 _t(e) {
|
|
626
|
-
window.requestAnimationFrame ? window.requestAnimationFrame(() => {
|
|
627
|
-
vt(e);
|
|
628
|
-
}) : vt(e);
|
|
629
|
-
}
|
|
630
|
-
function vt(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 yt(e, t, n) {
|
|
643
|
-
return [Math.round(t / e[0]) * e[0], Math.round(n / e[1]) * e[1]];
|
|
644
|
-
}
|
|
645
|
-
function bt(e) {
|
|
646
|
-
return e.props.axis === "both" || e.props.axis === "x";
|
|
647
|
-
}
|
|
648
|
-
function xt(e) {
|
|
649
|
-
return e.props.axis === "both" || e.props.axis === "y";
|
|
650
|
-
}
|
|
651
|
-
function St(e, t, n) {
|
|
652
|
-
let r = typeof t == "number" ? function(e, t) {
|
|
653
|
-
return e.targetTouches && $e(e.targetTouches, (e) => t === e.identifier) || e.changedTouches && $e(e.changedTouches, (e) => t === e.identifier);
|
|
654
|
-
}(e, t) : null;
|
|
655
|
-
if (typeof t == "number" && !r) return null;
|
|
656
|
-
let i = Tt(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 Ct(e, t, n) {
|
|
669
|
-
let r = !tt(e.lastX), i = Tt(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 wt(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 Tt(e) {
|
|
701
|
-
let t = e.findDOMNode();
|
|
702
|
-
if (!t) throw Error("<DraggableCore>: Unmounted during event!");
|
|
703
|
-
return t;
|
|
704
|
-
}
|
|
705
|
-
var Et = {
|
|
706
|
-
start: "touchstart",
|
|
707
|
-
move: "touchmove",
|
|
708
|
-
stop: "touchend"
|
|
709
|
-
}, Dt = {
|
|
710
|
-
start: "mousedown",
|
|
711
|
-
move: "mousemove",
|
|
712
|
-
stop: "mouseup"
|
|
713
|
-
}, Ot = Dt, kt = 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 && !ct(e.target, this.props.handle, t) || this.props.cancel && ct(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 = St(e, r, this);
|
|
727
|
-
if (i == null) return;
|
|
728
|
-
let { x: a, y: o } = i, s = Ct(this, a, o);
|
|
729
|
-
this.props.onStart, !1 !== this.props.onStart(e, s) && !1 !== this.mounted && (this.props.enableUserSelectHack && gt(n, this.props.nonce), this.dragging = !0, this.lastX = a, this.lastY = o, lt(n, Ot.move, this.handleDrag), lt(n, Ot.stop, this.handleDragStop));
|
|
730
|
-
}, this.handleDrag = (e) => {
|
|
731
|
-
let t = St(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] = yt(this.props.grid, e, t), !e && !t) return;
|
|
737
|
-
n = this.lastX + e, r = this.lastY + t;
|
|
738
|
-
}
|
|
739
|
-
let i = Ct(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 = St(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] = yt(this.props.grid, e, t), n = this.lastX + e, r = this.lastY + t;
|
|
755
|
-
}
|
|
756
|
-
let i = Ct(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 && _t(a.ownerDocument), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, a && (ut(a.ownerDocument, Ot.move, this.handleDrag), ut(a.ownerDocument, Ot.stop, this.handleDragStop));
|
|
760
|
-
}, this.onMouseDown = (e) => (Ot = Dt, this.handleDragStart(e)), this.onMouseUp = (e) => (Ot = Dt, this.handleDragStop(e)), this.onTouchStart = (e) => (Ot = Et, this.handleDragStart(e)), this.onTouchEnd = (e) => (Ot = Et, this.handleDragStop(e));
|
|
761
|
-
}
|
|
762
|
-
componentDidMount() {
|
|
763
|
-
this.mounted = !0;
|
|
764
|
-
let e = this.findDOMNode();
|
|
765
|
-
e && lt(e, Et.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
|
-
ut(t, Dt.move, this.handleDrag), ut(t, Et.move, this.handleDrag), ut(t, Dt.stop, this.handleDragStop), ut(t, Et.stop, this.handleDragStop), ut(e, Et.start, this.onTouchStart, { passive: !1 }), this.props.enableUserSelectHack && _t(t);
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
findDOMNode() {
|
|
776
|
-
if (this.props?.nodeRef) return this.props.nodeRef.current;
|
|
777
|
-
let e = he;
|
|
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
|
-
kt.displayName = "DraggableCore", kt.propTypes = {
|
|
789
|
-
allowAnyClick: z.default.bool,
|
|
790
|
-
allowMobileScroll: z.default.bool,
|
|
791
|
-
children: z.default.node.isRequired,
|
|
792
|
-
disabled: z.default.bool,
|
|
793
|
-
enableUserSelectHack: z.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: z.default.arrayOf(z.default.number),
|
|
798
|
-
handle: z.default.string,
|
|
799
|
-
cancel: z.default.string,
|
|
800
|
-
nodeRef: z.default.object,
|
|
801
|
-
nonce: z.default.string,
|
|
802
|
-
onStart: z.default.func,
|
|
803
|
-
onDrag: z.default.func,
|
|
804
|
-
onStop: z.default.func,
|
|
805
|
-
onMouseDown: z.default.func,
|
|
806
|
-
scale: z.default.number,
|
|
807
|
-
className: nt,
|
|
808
|
-
style: nt,
|
|
809
|
-
transform: nt
|
|
810
|
-
}, kt.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 At = class extends b.Component {
|
|
822
|
-
constructor(e) {
|
|
823
|
-
super(e), this.onDragStart = (e, t) => {
|
|
824
|
-
if (!1 === this.props.onStart(e, wt(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 = wt(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 = Tt(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 + B(s.paddingLeft) + B(o.marginLeft),
|
|
860
|
-
top: -i.offsetTop + B(s.paddingTop) + B(o.marginTop),
|
|
861
|
-
right: mt(a) - ft(i) - i.offsetLeft + B(s.paddingRight) - B(o.marginRight),
|
|
862
|
-
bottom: pt(a) - dt(i) - i.offsetTop + B(s.paddingBottom) - B(o.marginBottom)
|
|
863
|
-
};
|
|
864
|
-
}
|
|
865
|
-
return tt(r.right) && (t = Math.min(t, r.right)), tt(r.bottom) && (n = Math.min(n, r.bottom)), tt(r.left) && (t = Math.max(t, r.left)), tt(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, wt(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 = he;
|
|
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: bt(this) && p ? this.state.x : m.x,
|
|
915
|
-
y: xt(this) && p ? this.state.y : m.y
|
|
916
|
-
};
|
|
917
|
-
this.state.isElementSVG ? f = function(e, t) {
|
|
918
|
-
return ht(e, t, "");
|
|
919
|
-
}(h, c) : d = function(e, t) {
|
|
920
|
-
let n = ht(e, t, "px");
|
|
921
|
-
return { [it("transform", at)]: n };
|
|
922
|
-
}(h, c);
|
|
923
|
-
let g = b.Children.only(n), _ = Ee(g.props.className || "", i, {
|
|
924
|
-
[a]: this.state.dragging,
|
|
925
|
-
[o]: this.state.dragged
|
|
926
|
-
});
|
|
927
|
-
return b.createElement(kt, {
|
|
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
|
-
At.displayName = "Draggable", At.propTypes = {
|
|
943
|
-
...kt.propTypes,
|
|
944
|
-
axis: z.default.oneOf([
|
|
945
|
-
"both",
|
|
946
|
-
"x",
|
|
947
|
-
"y",
|
|
948
|
-
"none"
|
|
949
|
-
]),
|
|
950
|
-
bounds: z.default.oneOfType([
|
|
951
|
-
z.default.shape({
|
|
952
|
-
left: z.default.number,
|
|
953
|
-
right: z.default.number,
|
|
954
|
-
top: z.default.number,
|
|
955
|
-
bottom: z.default.number
|
|
956
|
-
}),
|
|
957
|
-
z.default.string,
|
|
958
|
-
z.default.oneOf([!1])
|
|
959
|
-
]),
|
|
960
|
-
defaultClassName: z.default.string,
|
|
961
|
-
defaultClassNameDragging: z.default.string,
|
|
962
|
-
defaultClassNameDragged: z.default.string,
|
|
963
|
-
defaultPosition: z.default.shape({
|
|
964
|
-
x: z.default.number,
|
|
965
|
-
y: z.default.number
|
|
966
|
-
}),
|
|
967
|
-
positionOffset: z.default.shape({
|
|
968
|
-
x: z.default.oneOfType([z.default.number, z.default.string]),
|
|
969
|
-
y: z.default.oneOfType([z.default.number, z.default.string])
|
|
970
|
-
}),
|
|
971
|
-
position: z.default.shape({
|
|
972
|
-
x: z.default.number,
|
|
973
|
-
y: z.default.number
|
|
974
|
-
}),
|
|
975
|
-
className: nt,
|
|
976
|
-
style: nt,
|
|
977
|
-
transform: nt
|
|
978
|
-
}, At.defaultProps = {
|
|
979
|
-
...kt.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 jt = At;
|
|
992
|
-
Xe();
|
|
993
|
-
var Mt = {
|
|
994
|
-
x: 0,
|
|
995
|
-
y: 0
|
|
996
|
-
}, Nt = w(C((e, t) => {
|
|
997
|
-
let { defaultPosition: n = Mt, PaperComponent: r = u, onDragStop: i, rootSel: a = ".MuiModal-root", handleSel: o = ".draggable-title", titleSize: s, rootSize: c, ...l } = e, d = k(null), f = O(() => 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] = A(null), [h, g] = A(null), _ = p ?? n ?? null, y = O(() => _ && f ? {
|
|
1003
|
-
x: Math.max(0, Math.min(_.x, f.right)),
|
|
1004
|
-
y: Math.max(0, Math.min(_.y, f.bottom))
|
|
1005
|
-
} : _, [_, f]), b = ke([d, t]);
|
|
1006
|
-
return v(jt, {
|
|
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
|
-
})), Pt = {
|
|
1036
|
-
x: "50",
|
|
1037
|
-
y: "50"
|
|
1038
|
-
}, Ft = w(C((n, r) => {
|
|
1039
|
-
let i = g({
|
|
1040
|
-
props: n,
|
|
1041
|
-
name: "MuiDialog"
|
|
1042
|
-
}), a = h(), o = fe(), 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: O, children: ee, transitionDuration: M = d, TransitionProps: N, slots: te = P.EmptyArray, slotProps: F = P.EmptyArray, sx: ie, className: I, onMouseDown: ae, initialPosition: L = Pt, isModal: me = !1, suspendModal: he = !1, restoreFocus: _e = !0, disableAutoDestroy: ve = !1, revealToken: ye, startHidden: be = !1, ...xe } = i, Se = te.transition ?? c, Ce = te.backdrop ?? e, we = te.paper ?? u, Te = F.transition;
|
|
1046
|
-
N && (Te = {
|
|
1047
|
-
...N,
|
|
1048
|
-
...Te
|
|
1049
|
-
});
|
|
1050
|
-
let De = F.backdrop, Oe = F.paper, [Ae, je] = A(null), [Me, Ne] = A(!1), [Pe, Fe] = A(!1), Ie = k(null), [Le, Re] = de(), ze = k(null), R = k(null), [Be, Ve] = de(), Ue = k(null), We = E(), Ge = k(null);
|
|
1051
|
-
D(() => {
|
|
1052
|
-
if (!Ae || be) return;
|
|
1053
|
-
let e = !!w;
|
|
1054
|
-
Ge.current !== e && (Ge.current = e, Ne(e));
|
|
1055
|
-
}, [
|
|
1056
|
-
w,
|
|
1057
|
-
Ae,
|
|
1058
|
-
be
|
|
1059
|
-
]);
|
|
1060
|
-
let qe = se(() => {
|
|
1061
|
-
m?.(), Ne(!1);
|
|
1062
|
-
}, [m]);
|
|
1063
|
-
D(() => {
|
|
1064
|
-
if (Ae) return;
|
|
1065
|
-
let e = ze.current, t = Ue.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 L?.x == "number" ? o = L.x : typeof L?.x == "string" && (o = a * (parseFloat(L.x) / 100)), typeof L?.y == "number" ? s = L.y : typeof L?.y == "string" && (s = i * (parseFloat(L.y) / 100)), je({
|
|
1071
|
-
x: o,
|
|
1072
|
-
y: s
|
|
1073
|
-
});
|
|
1074
|
-
});
|
|
1075
|
-
let [Je, Ye] = A(!1), [Xe, Ze] = A(null), [Qe, z] = A(null), $e = se((e) => {
|
|
1076
|
-
if (Xe) return Xe.focus(e), !0;
|
|
1077
|
-
if (O) {
|
|
1078
|
-
let t = R.current?.querySelectorAll?.(O);
|
|
1079
|
-
if (t && t.length > 0) return t[0]?.focus?.(e), !0;
|
|
1080
|
-
}
|
|
1081
|
-
return R.current?.focus?.(e), !1;
|
|
1082
|
-
}, [Xe, O]), et = ue(r, () => ({ focus: (e) => {
|
|
1083
|
-
$e(e);
|
|
1084
|
-
} }), []), tt = k(ye);
|
|
1085
|
-
T(() => {
|
|
1086
|
-
ye !== tt.current && (tt.current = ye, Ne(!0));
|
|
1087
|
-
}, [ye]);
|
|
1088
|
-
let B = {
|
|
1089
|
-
...Te,
|
|
1090
|
-
onExited: (e) => {
|
|
1091
|
-
_?.(null), ve || Te?.onExited?.(e);
|
|
1092
|
-
},
|
|
1093
|
-
onExit: (e) => {
|
|
1094
|
-
let t = Qe, n = typeof _e == "function" ? _e() : _e;
|
|
1095
|
-
t && !1 !== n && requestAnimationFrame(() => {
|
|
1096
|
-
et.current?.contains(document.activeElement) && t.focus();
|
|
1097
|
-
}), S?.(), Fe(!1), Te?.onExit?.(e);
|
|
1098
|
-
},
|
|
1099
|
-
onEntered: (e, t) => {
|
|
1100
|
-
b?.(), Te?.onEntered?.(e, t);
|
|
1101
|
-
},
|
|
1102
|
-
onEntering: (e, t) => {
|
|
1103
|
-
Fe(!0), x?.(et.current);
|
|
1104
|
-
}
|
|
1105
|
-
};
|
|
1106
|
-
T(() => {
|
|
1107
|
-
Pe && $e();
|
|
1108
|
-
}, [Pe]);
|
|
1109
|
-
let nt = ke([Ue, r]), rt = v(p, {
|
|
1110
|
-
open: Pe,
|
|
1111
|
-
disableAutoFocus: !0,
|
|
1112
|
-
disableEnforceFocus: !Je,
|
|
1113
|
-
disableRestoreFocus: !0 !== _e,
|
|
1114
|
-
children: v(Se, {
|
|
1115
|
-
in: Me,
|
|
1116
|
-
timeout: M,
|
|
1117
|
-
role: "presentation",
|
|
1118
|
-
...B,
|
|
1119
|
-
children: v(t, {
|
|
1120
|
-
className: "MuiDialog-container",
|
|
1121
|
-
ref: R,
|
|
1122
|
-
tabIndex: 0,
|
|
1123
|
-
sx: {
|
|
1124
|
-
outline: "none",
|
|
1125
|
-
position: "relative"
|
|
1126
|
-
},
|
|
1127
|
-
onKeyDown: (e) => {
|
|
1128
|
-
e.which === re.Escape && (qe(), Ie.current?.start(e, { center: !1 }), setTimeout(() => Ie.current?.stop(e), 180)), e.stopPropagation();
|
|
1129
|
-
},
|
|
1130
|
-
children: y(Nt, {
|
|
1131
|
-
ref: nt,
|
|
1132
|
-
className: Ee({ "Mui-focusVisible": Je }, I, "draggable"),
|
|
1133
|
-
sx: {
|
|
1134
|
-
"& *": (e) => He(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 ${j(e.palette.text?.primary, .2)} 1px` },
|
|
1140
|
-
"&.Mui-focusVisible": { outline: (e) => `solid ${j(e.palette.text?.primary, .2)} 1px` },
|
|
1141
|
-
position: "absolute",
|
|
1142
|
-
maxWidth: "100%",
|
|
1143
|
-
...ie
|
|
1144
|
-
},
|
|
1145
|
-
defaultPosition: Ae,
|
|
1146
|
-
titleSize: Ve,
|
|
1147
|
-
rootSize: Re,
|
|
1148
|
-
PaperComponent: we,
|
|
1149
|
-
...xe,
|
|
1150
|
-
...Oe,
|
|
1151
|
-
children: [f ? v(s, {
|
|
1152
|
-
className: Ee({ "Mui-selected": Je }, "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) => j(e.palette.action.hover, .03)
|
|
1167
|
-
},
|
|
1168
|
-
ref: Be,
|
|
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(Ke, {
|
|
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: Ie,
|
|
1192
|
-
onPointerDown: (e) => {
|
|
1193
|
-
Ie.current?.start(e, { center: !1 }), e.stopPropagation(), e.preventDefault();
|
|
1194
|
-
},
|
|
1195
|
-
onPointerUp: qe,
|
|
1196
|
-
children: v(ne, { iconKey: "Close" })
|
|
1197
|
-
})
|
|
1198
|
-
})]
|
|
1199
|
-
})
|
|
1200
|
-
}) : null, ee]
|
|
1201
|
-
})
|
|
1202
|
-
})
|
|
1203
|
-
})
|
|
1204
|
-
}), it = null;
|
|
1205
|
-
me && !he && (it = v(Ce, {
|
|
1206
|
-
...De,
|
|
1207
|
-
open: Me,
|
|
1208
|
-
onMouseDown: (e) => {
|
|
1209
|
-
qe(), De?.onMouseDown?.(e);
|
|
1210
|
-
},
|
|
1211
|
-
onClick: (e) => {
|
|
1212
|
-
C?.(e, "backdropClick"), De?.onClick?.(e);
|
|
1213
|
-
},
|
|
1214
|
-
sx: {
|
|
1215
|
-
pointerEvents: "auto",
|
|
1216
|
-
...De?.sx
|
|
1217
|
-
}
|
|
1218
|
-
}));
|
|
1219
|
-
let { getPortalContainer: at } = le(), { className: ot, attrs: st } = oe(ce()?.themeScope), ct = ke([
|
|
1220
|
-
et,
|
|
1221
|
-
Le,
|
|
1222
|
-
ze
|
|
1223
|
-
]);
|
|
1224
|
-
return ge(y(t, {
|
|
1225
|
-
className: Ee("MuiModal-root", ot),
|
|
1226
|
-
...st,
|
|
1227
|
-
sx: {
|
|
1228
|
-
position: "fixed",
|
|
1229
|
-
zIndex: pe("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: ct,
|
|
1239
|
-
onPointerDown: (e) => {
|
|
1240
|
-
Je && (e.target === R.current || e.target.tabIndex < 0) && R.current?.contains(document.activeElement);
|
|
1241
|
-
},
|
|
1242
|
-
onContextMenu: (e) => {
|
|
1243
|
-
e.isPropagationStopped() || e.preventDefault();
|
|
1244
|
-
},
|
|
1245
|
-
onFocus: (e) => {
|
|
1246
|
-
!Je && (e.target === R.current || e.target.tabIndex < 0) && setTimeout(() => {
|
|
1247
|
-
$e();
|
|
1248
|
-
}, 100), Ye(!0), R.current?.contains(e.target) && e.target !== R.current && Ze(e.target), e.relatedTarget && !Qe && z(e.relatedTarget);
|
|
1249
|
-
},
|
|
1250
|
-
onBlur: (e) => {
|
|
1251
|
-
et?.current?.contains(e.relatedTarget) || (z(null), Ye(!1));
|
|
1252
|
-
},
|
|
1253
|
-
children: [it, rt]
|
|
1254
|
-
}), at(), We);
|
|
1255
|
-
})), V = typeof window < "u" ? window : {
|
|
1256
|
-
screen: {},
|
|
1257
|
-
navigator: {}
|
|
1258
|
-
}, It = (V.matchMedia || function() {
|
|
1259
|
-
return { matches: !1 };
|
|
1260
|
-
}).bind(V), Lt = { get passive() {
|
|
1261
|
-
return !0;
|
|
1262
|
-
} }, Rt = function() {};
|
|
1263
|
-
V.addEventListener && V.addEventListener("p", Rt, Lt), V.removeEventListener && V.removeEventListener("p", Rt, !1);
|
|
1264
|
-
var zt = "ontouchstart" in V, Bt = zt || "TouchEvent" in V && It("(any-pointer: coarse)").matches, Vt = (V.navigator.maxTouchPoints || 0) > 0 || Bt, Ht = V.navigator.userAgent || "", Ut = It("(pointer: coarse)").matches && /iPad|Macintosh/.test(Ht) && Math.min(V.screen.width || 0, V.screen.height || 0) >= 768, Wt = (It("(pointer: coarse)").matches || !It("(pointer: fine)").matches && zt) && !/Windows.*Firefox/.test(Ht), Gt = It("(any-pointer: fine)").matches || It("(any-hover: hover)").matches || Ut || !zt, Kt = !Vt || !Gt && Wt ? Vt ? "touchOnly" : "mouseOnly" : "hybrid", qt = Kt === "mouseOnly" ? "mouse" : Kt === "touchOnly" || Wt ? "touch" : "mouse", Jt = (e) => e.type === "checkbox", Yt = (e) => e.type === "file", Xt = (e) => e instanceof Date, H = (e) => e == null, Zt = (e) => typeof e == "object", U = (e) => !H(e) && !Array.isArray(e) && Zt(e) && !Xt(e), Qt = /[.[\]'"]/, $t = (e) => e.split(Qt).filter(Boolean), en = typeof window < "u" && window.HTMLElement !== void 0 && typeof document < "u";
|
|
1265
|
-
function W(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 (en && (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] = W(e[t]));
|
|
1274
|
-
return i;
|
|
1275
|
-
}
|
|
1276
|
-
var tn = "blur", nn = "focusout", rn = "submit", an = "trigger", on = "valid", sn = "onBlur", cn = "onChange", ln = "onSubmit", un = "onTouched", dn = "all", fn = "max", pn = "min", mn = "maxLength", hn = "minLength", gn = "pattern", _n = "required", vn = "validate", yn = [
|
|
1277
|
-
_n,
|
|
1278
|
-
pn,
|
|
1279
|
-
fn,
|
|
1280
|
-
hn,
|
|
1281
|
-
mn,
|
|
1282
|
-
gn,
|
|
1283
|
-
vn
|
|
1284
|
-
], bn = "form", xn = "root", Sn = [
|
|
1285
|
-
"__proto__",
|
|
1286
|
-
"constructor",
|
|
1287
|
-
"prototype"
|
|
1288
|
-
], Cn = /^\w*$/, wn = (e) => Cn.test(e), G = (e) => e === void 0, K = (e, t, n) => {
|
|
1289
|
-
if (!t || !U(e)) return n;
|
|
1290
|
-
let r = wn(t) ? [t] : $t(t);
|
|
1291
|
-
if (r.some((e) => Sn.includes(e))) return n;
|
|
1292
|
-
let i = r.reduce((e, t) => H(e) ? void 0 : e[t], e);
|
|
1293
|
-
return G(i) || i === e ? G(e[t]) ? n : e[t] : i;
|
|
1294
|
-
}, q = (e) => typeof e == "boolean", J = (e) => typeof e == "function", Y = (e, t, n) => {
|
|
1295
|
-
let r = -1, i = wn(t) ? [t] : $t(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 = U(n) || Array.isArray(n) ? n : isNaN(+i[r + 1]) ? {} : [];
|
|
1301
|
-
}
|
|
1302
|
-
if (Sn.includes(t)) return;
|
|
1303
|
-
e[t] = a, e = e[t];
|
|
1304
|
-
}
|
|
1305
|
-
}, Tn = x.createContext(null);
|
|
1306
|
-
Tn.displayName = "HookFormControlContext";
|
|
1307
|
-
var En = en ? x.useLayoutEffect : x.useEffect, Dn = (e) => H(e) || !Zt(e), On = (e, t) => t.length === 0 && !Array.isArray(e) && !((e) => {
|
|
1308
|
-
let t = e.constructor && e.constructor.prototype;
|
|
1309
|
-
return U(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 (Xt(e) && Xt(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 (Xt(r) && Xt(e) || (U(r) || Array.isArray(r)) && (U(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 === ln,
|
|
1338
|
-
isOnBlur: e === sn,
|
|
1339
|
-
isOnChange: e === cn,
|
|
1340
|
-
isOnAll: e === dn,
|
|
1341
|
-
isOnTouch: e === un
|
|
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 ? K(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 ((U(i) || Array.isArray(i)) && jn(i, t)) return !0;
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
}, Mn = (e, t, n) => {
|
|
1359
|
-
let r = K(e, n), i = Array.isArray(r) ? r : [];
|
|
1360
|
-
return Y(i, xn, t[n]), Y(e, n, i), e;
|
|
1361
|
-
}, Q = (e) => U(e) && !Object.keys(e).length, Nn = (e) => {
|
|
1362
|
-
if (!en) 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 ? G(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) || q(e) && !e) return {
|
|
1400
|
-
type: n,
|
|
1401
|
-
message: Z(e) ? e : "",
|
|
1402
|
-
ref: t
|
|
1403
|
-
};
|
|
1404
|
-
}
|
|
1405
|
-
var Un = (e) => U(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 = K(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 = q(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 = Jt(o), T = C || w, E = (g || Yt(o)) && G(o.value) && G(y) || Nn(o) && o.value === "" && !v || y === "" || Array.isArray(y) && !y.length, D = In.bind(null, h, r, S), O = (e, t, n, r = mn, i = hn) => {
|
|
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 || H(y)) || q(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: _n,
|
|
1432
|
-
message: t,
|
|
1433
|
-
ref: b,
|
|
1434
|
-
...D(_n, t)
|
|
1435
|
-
}, !r)) return x(t), S;
|
|
1436
|
-
}
|
|
1437
|
-
if (!(E || H(d) && H(f))) {
|
|
1438
|
-
let e, t, n = Un(f), i = Un(d);
|
|
1439
|
-
if (H(y) || Xt(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
|
-
H(n.value) || (e = r > n.value), H(i.value) || (t = r < i.value);
|
|
1445
|
-
}
|
|
1446
|
-
if ((e || t) && (O(!!e, n.message, i.message, fn, pn), !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 = !H(e.value) && y.length > +e.value, i = !H(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: gn,
|
|
1456
|
-
message: t,
|
|
1457
|
-
ref: o,
|
|
1458
|
-
...D(gn, 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(vn, e.message)
|
|
1467
|
-
}, !r)) return x(e.message), S;
|
|
1468
|
-
} else if (U(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 : wn(t) ? [t] : $t(t);
|
|
1490
|
-
if (n.some((e) => Sn.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 (H(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 && (U(r) && Q(r) || Array.isArray(r) && function(e) {
|
|
1503
|
-
for (let t in e) if (e.hasOwnProperty(t) && !G(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 && (U(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 && Zt(e) && Object.prototype.hasOwnProperty.call(e, t), Qn = (e, t) => {
|
|
1578
|
-
if (!t) return !1;
|
|
1579
|
-
let n = e;
|
|
1580
|
-
for (let r of wn(t) ? [t] : $t(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) || U(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(K(t, a)) ? nr(o, t, a, r) : r.push(a);
|
|
1593
|
-
}
|
|
1594
|
-
return r;
|
|
1595
|
-
}
|
|
1596
|
-
function rr(e) {
|
|
1597
|
-
return Array.isArray(e) || U(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) => !G(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) ? G(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 : (G(t) || Dn(n[i]) ? n[i] = sr(a, Array.isArray(a) ? [] : {}, o) : cr(a, H(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 }) => G(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 Yt(t) ? t.files : Pn(t) ? Vn(e.refs).value : $n(t) ? [...t.selectedOptions].map(({ value: e }) => e) : Jt(t) ? zn(e.refs).value : lr(t.value, e);
|
|
1630
|
-
}
|
|
1631
|
-
var dr = (e) => G(e) ? e : Fn(e) ? e.source : U(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 (U(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 = K(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 = K(t, r), o = K(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: ln,
|
|
1663
|
-
reValidateMode: cn,
|
|
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
|
-
...W(gr),
|
|
1684
|
-
isLoading: J(t.defaultValues),
|
|
1685
|
-
errors: t.errors || {},
|
|
1686
|
-
disabled: t.disabled || !1
|
|
1687
|
-
}, r = {}, i = (U(t.defaultValues) || U(t.values)) && W(t.defaultValues || t.values) || {}, a = t.shouldUnregister ? {} : W(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 === dn, 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 j({
|
|
1723
|
-
fields: r,
|
|
1724
|
-
onlyCheckValid: !0,
|
|
1725
|
-
eventType: on
|
|
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 = K(r, c);
|
|
1741
|
-
if (f) {
|
|
1742
|
-
if (((e) => {
|
|
1743
|
-
let t = wn(e) ? [e] : $t(e), n = a, r = i;
|
|
1744
|
-
for (let e = 0; e < t.length - 1; e++) {
|
|
1745
|
-
let i = t[e];
|
|
1746
|
-
if (n = H(n) ? n : n[i], r = H(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 = wn(e) ? [e] : $t(e), n = a, r = "", i = -1, s = 0;
|
|
1752
|
-
for (let e = 0; e < t.length; e++) {
|
|
1753
|
-
if (H(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], G(n) && i !== -1 && e > i && +t[i] < s) return !0;
|
|
1757
|
-
}
|
|
1758
|
-
return !1;
|
|
1759
|
-
})(c)) return;
|
|
1760
|
-
let r = G(K(a, c)), p = K(a, c, G(u) ? K(i, c) : u);
|
|
1761
|
-
G(p) || d && d.defaultChecked || l ? Y(a, c, l ? p : ur(f._f)) : P(c, p), o.mount && !o.action && (t.resolver && g("isValidating", "validatingFields") ? Promise.resolve().then(() => w()) : w(), r && n.isDirty && g("isDirty") && (M() || (n.isDirty = !1, _.state.next({ ...n }))), e.shouldUnregister && r && !G(K(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(K(i, e), o);
|
|
1768
|
-
g("isDirty") && (d = n.isDirty, n.isDirty = f.isDirty = !t || M(), u = d !== f.isDirty), d = !!K(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 = K(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 = K(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))), ee = 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 (U(o)) {
|
|
1802
|
-
let e = !0;
|
|
1803
|
-
oe(bn);
|
|
1804
|
-
for (let t in o) {
|
|
1805
|
-
let n = o[t];
|
|
1806
|
-
n && (e = !1, L(`${bn}.${t}`, {
|
|
1807
|
-
message: Z(n.message) ? n.message : "",
|
|
1808
|
-
type: n.type || vn
|
|
1809
|
-
}));
|
|
1810
|
-
}
|
|
1811
|
-
return e;
|
|
1812
|
-
}
|
|
1813
|
-
return Z(o) || !o ? (L(bn, {
|
|
1814
|
-
message: o || "",
|
|
1815
|
-
type: vn
|
|
1816
|
-
}), !1) : (oe(bn), !0);
|
|
1817
|
-
}
|
|
1818
|
-
return !0;
|
|
1819
|
-
}, j = 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 ee({
|
|
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), K(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 j({
|
|
1840
|
-
context: l,
|
|
1841
|
-
onlyCheckValid: i,
|
|
1842
|
-
fields: f,
|
|
1843
|
-
name: o,
|
|
1844
|
-
eventType: c
|
|
1845
|
-
});
|
|
1846
|
-
}
|
|
1847
|
-
}
|
|
1848
|
-
return l.valid;
|
|
1849
|
-
}, M = (e, t) => (e && t && Y(a, e, t), !X(o.mount ? a : i, i)), N = (e, t, n) => ((e, t, n, r, i) => Z(e) ? (r && t.watch.add(e), K(n, e, i)) : Array.isArray(e) ? e.map((e) => (r && t.watch.add(e), K(n, e, K(i, e)))) : (r && (t.watchAll = !0), n))(e, s, { ...o.mount ? a : G(t) || Z(e) ? i : t }, n, t), P = (e, t, n = {}, i = !1, o = !1, s = !1) => {
|
|
1850
|
-
let c = K(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) && H(t) ? "" : t, $n(n.ref) ? [...n.ref.options].forEach((e) => e.selected = l.includes(e.value)) : n.refs ? Jt(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) : Yt(n.ref) ? n.ref.value = "" : (n.ref.value = l, n.ref.type || o || s || _.state.next({
|
|
1856
|
-
name: e,
|
|
1857
|
-
values: i ? a : W(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 && I(e, { delayError: n.delayError }), n.shouldValidate && c && c._f && c._f.deps && (!Array.isArray(c._f.deps) || c._f.deps.length > 0) && I(c._f.deps);
|
|
1861
|
-
}, te = (e, t, n, i = !1, o = !1, c = !1) => {
|
|
1862
|
-
s.array.has(e) && _.array.next({
|
|
1863
|
-
name: e,
|
|
1864
|
-
values: i ? a : W(a)
|
|
1865
|
-
});
|
|
1866
|
-
for (let a in t) {
|
|
1867
|
-
if (!t.hasOwnProperty(a)) continue;
|
|
1868
|
-
let l = t[a], u = e + "." + a, d = K(r, u);
|
|
1869
|
-
(s.array.has(e) || U(l) || d && !d._f) && !Xt(l) ? te(u, l, n, i, o, c) : P(u, l, n, i, o, c);
|
|
1870
|
-
}
|
|
1871
|
-
}, ne = (e, t, i, c, l = !1) => {
|
|
1872
|
-
let u = K(r, e), d = s.array.has(e), f = c ? t : W(t), p = X(K(a, e), f);
|
|
1873
|
-
if (p || Y(a, e, f), d) _.array.next({
|
|
1874
|
-
name: e,
|
|
1875
|
-
values: c ? a : W(a)
|
|
1876
|
-
}), g("isDirty", "dirtyFields") && i.shouldDirty && (E(), l || _.state.next({
|
|
1877
|
-
name: e,
|
|
1878
|
-
dirtyFields: n.dirtyFields,
|
|
1879
|
-
isDirty: M(e, f)
|
|
1880
|
-
})), i.shouldValidate && I(e, { delayError: i.delayError });
|
|
1881
|
-
else {
|
|
1882
|
-
let t = Array.isArray(f) && !f.length || Q(f), n = !p && !l;
|
|
1883
|
-
!u || u._f || H(f) || t ? P(e, f, i, c, l, n) : te(e, f, i, c, l, n);
|
|
1884
|
-
}
|
|
1885
|
-
if (!p && !l) {
|
|
1886
|
-
let t = An(e, s), r = c ? a : W(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
|
-
}, re = (e, t, n = {}) => ne(e, t, n, !1), F = async (e) => {
|
|
1901
|
-
o.mount = !0;
|
|
1902
|
-
let i = e.target, l = i.name, p = !0, m = K(r, l), h = (e) => {
|
|
1903
|
-
p = Number.isNaN(e) || Xt(e) && isNaN(e.getTime()) || X(e, K(a, l, e));
|
|
1904
|
-
};
|
|
1905
|
-
if (m) {
|
|
1906
|
-
let o, v, C = i.type ? ur(m._f) : ((e) => U(e) && e.target ? Jt(e.target) ? e.target.checked : Yt(e.target) ? e.target.files : e.target.value : e)(e), E = e.type === tn || e.type === nn, O = !(((e) => e.mount && (e.required || !G(e.required) && !1 !== e.required || !G(e.min) || !G(e.max) || !G(e.maxLength) || !G(e.minLength) || e.pattern || e.validate))(m._f) || t.validate || t.resolver || K(n.errors, l) || m._f.deps), M = 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, K(n.touchedFields, l), n.isSubmitted, f, d), N = An(l, s, E);
|
|
1907
|
-
if (Y(a, l, W(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 P = k(l, C, E), te = !Q(P) || N;
|
|
1915
|
-
if (!E && _.state.next({
|
|
1916
|
-
name: l,
|
|
1917
|
-
type: e.type,
|
|
1918
|
-
...u ? { values: W(a) } : {}
|
|
1919
|
-
}), M) return O && n.isValid || !g("isValid") || (t.mode === "onBlur" ? E && w() : E || w()), te && _.state.next({
|
|
1920
|
-
name: l,
|
|
1921
|
-
...N ? {} : P
|
|
1922
|
-
});
|
|
1923
|
-
if (!t.resolver && t.validate && await ee({
|
|
1924
|
-
name: l,
|
|
1925
|
-
eventType: e.type
|
|
1926
|
-
}), !E && N && _.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(P) && _.state.next(P));
|
|
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 j({
|
|
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) && I(m._f.deps), ((e, r, i, a) => {
|
|
1946
|
-
let o = K(n.errors, e), s = g("isValid") && q(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 && q(r) ? { isValid: r } : {},
|
|
1951
|
-
errors: n.errors,
|
|
1952
|
-
name: e
|
|
1953
|
-
};
|
|
1954
|
-
_.state.next(t);
|
|
1955
|
-
}
|
|
1956
|
-
})(l, v, o, P));
|
|
1957
|
-
}
|
|
1958
|
-
}, ie = (e, t) => {
|
|
1959
|
-
if (K(n.errors, t) && e.focus) return e.focus(), 1;
|
|
1960
|
-
}, I = 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 = K(i, t);
|
|
1969
|
-
C(t);
|
|
1970
|
-
let a = s.array.has(t) && U(e) && !Object.keys(e).some((e) => !Number.isNaN(Number(e))), o = K(r, t), c = U(o) && Object.keys(o).some((e) => e !== "_f");
|
|
1971
|
-
a ? Mn(n.errors, { [t]: e }, t) : e?.type || e?.message || Array.isArray(e) || U(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
|
-
})(G(e) ? e : l);
|
|
1977
|
-
if (a = Q(i), o = e ? !l.some((e) => K(i, e)) : a, t !== y) return o;
|
|
1978
|
-
} else e ? (o = (await Promise.all(l.map(async (e) => {
|
|
1979
|
-
let t = K(r, e);
|
|
1980
|
-
return await j({
|
|
1981
|
-
fields: t && t._f ? { [e]: t } : t,
|
|
1982
|
-
eventType: an
|
|
1983
|
-
});
|
|
1984
|
-
}))).every(Boolean), (o || n.isValid) && w()) : o = a = await j({
|
|
1985
|
-
fields: r,
|
|
1986
|
-
name: e,
|
|
1987
|
-
eventType: an
|
|
1988
|
-
});
|
|
1989
|
-
if (i.delayError && t.delayError && Z(e)) {
|
|
1990
|
-
let r = K(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, ie, e ? l : s.mount), o;
|
|
2000
|
-
}, ae = (e, t) => {
|
|
2001
|
-
let r = t || n, i = K(r.errors, e);
|
|
2002
|
-
return {
|
|
2003
|
-
invalid: !!i,
|
|
2004
|
-
isDirty: !!K(r.dirtyFields, e),
|
|
2005
|
-
error: i,
|
|
2006
|
-
isValidating: !!K(r.validatingFields, e),
|
|
2007
|
-
isTouched: !!K(r.touchedFields, e)
|
|
2008
|
-
};
|
|
2009
|
-
}, oe = (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
|
-
}, L = (e, t, i) => {
|
|
2018
|
-
C(e);
|
|
2019
|
-
let a = (K(r, e, { _f: {} })._f || {}).ref, { ref: o, message: s, type: c, types: l, ...u } = K(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
|
-
}, se = (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 || dn));
|
|
2037
|
-
})(t, e.formState || m, he, 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
|
-
}, ce = (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: W(a) }), _.state.next({
|
|
2056
|
-
...n,
|
|
2057
|
-
...o.keepDirty ? {} : { isDirty: M() },
|
|
2058
|
-
...o.keepIsValidating ? {} : { isValidating: !Q(n.validatingFields) }
|
|
2059
|
-
}), !o.keepIsValid && w();
|
|
2060
|
-
}, le = ({ disabled: e, name: t }) => {
|
|
2061
|
-
if (q(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
|
-
}, ue = (e, n = {}) => {
|
|
2066
|
-
let a = K(r, e), c = q(n.disabled) || q(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 = K(r, e);
|
|
2077
|
-
for (let e of yn) e in n || delete t._f[e];
|
|
2078
|
-
}
|
|
2079
|
-
return a && !l ? le({
|
|
2080
|
-
disabled: q(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: F,
|
|
2094
|
-
onBlur: F,
|
|
2095
|
-
ref: (c) => {
|
|
2096
|
-
if (c) {
|
|
2097
|
-
s.registerName.add(e), ue(e, n), s.registerName.delete(e), a = K(r, e);
|
|
2098
|
-
let t = G(c.value) && c.querySelectorAll && c.querySelectorAll("input,select,textarea")[0] || c, o = ((e) => Pn(e) || Jt(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(K(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 = K(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
|
-
}, de = () => t.shouldFocusError && !t.shouldUseNativeValidation && jn(r, ie, s.mount), fe = (e, i) => async (o) => {
|
|
2113
|
-
let l, u;
|
|
2114
|
-
o && (o.preventDefault && o.preventDefault(), o.persist && o.persist());
|
|
2115
|
-
let d = W(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 = W(r);
|
|
2120
|
-
} else {
|
|
2121
|
-
let e = y;
|
|
2122
|
-
if (await j({
|
|
2123
|
-
fields: r,
|
|
2124
|
-
eventType: rn
|
|
2125
|
-
}), e !== y) return;
|
|
2126
|
-
$(n.errors, xn);
|
|
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), de(), setTimeout(de);
|
|
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
|
-
}, pe = (e, l = {}) => {
|
|
2146
|
-
y++;
|
|
2147
|
-
let u = e ? W(e) : i, d = W(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 = K(n.dirtyFields, t), r = K(a, t), i = K(p, t);
|
|
2153
|
-
e && !G(r) ? Y(p, t, r) : e || G(i) || re(t, i);
|
|
2154
|
-
}
|
|
2155
|
-
} else {
|
|
2156
|
-
if (en && G(e)) for (let e of s.mount) {
|
|
2157
|
-
let t = K(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) re(e, K(p, e));
|
|
2170
|
-
else r = {};
|
|
2171
|
-
}
|
|
2172
|
-
if (t.shouldUnregister) {
|
|
2173
|
-
if (a = l.keepDefaultValues ? W(i) : {}, l.keepFieldsRef) for (let e of s.mount) Y(a, e, K(p, e));
|
|
2174
|
-
} else a = W(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 ? M() : !(!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
|
-
}, me = (e, n) => pe(J(e) ? e(a) : e, {
|
|
2206
|
-
...t.resetOptions,
|
|
2207
|
-
...n
|
|
2208
|
-
}), he = (e) => {
|
|
2209
|
-
let { name: t, type: r, values: i, ...a } = e;
|
|
2210
|
-
n = {
|
|
2211
|
-
...n,
|
|
2212
|
-
...a
|
|
2213
|
-
};
|
|
2214
|
-
};
|
|
2215
|
-
_.state.subscribe({ next: he });
|
|
2216
|
-
let ge = {
|
|
2217
|
-
control: {
|
|
2218
|
-
register: ue,
|
|
2219
|
-
unregister: ce,
|
|
2220
|
-
getFieldState: ae,
|
|
2221
|
-
handleSubmit: fe,
|
|
2222
|
-
setError: L,
|
|
2223
|
-
_subscribe: se,
|
|
2224
|
-
_runSchema: A,
|
|
2225
|
-
_updateIsValidating: T,
|
|
2226
|
-
_focusError: de,
|
|
2227
|
-
_getWatch: N,
|
|
2228
|
-
_getDirty: M,
|
|
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 = K(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 = K(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 = K(e, t);
|
|
2243
|
-
!Kn(n).length && (n == null || !n.root) && $(e, t);
|
|
2244
|
-
})(n.errors, e);
|
|
2245
|
-
}
|
|
2246
|
-
let d = K(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 = K(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: M(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: le,
|
|
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(K(o.mount ? a : i, e, t.shouldUnregister ? K(i, e, []) : [])),
|
|
2276
|
-
_reset: pe,
|
|
2277
|
-
_resetDefaultValues: () => J(t.defaultValues) && t.defaultValues().then((e) => {
|
|
2278
|
-
me(e, t.resetOptions), _.state.next({ isLoading: !1 });
|
|
2279
|
-
}),
|
|
2280
|
-
_removeUnmounted: () => {
|
|
2281
|
-
for (let e of s.unMount) {
|
|
2282
|
-
let t = K(r, e);
|
|
2283
|
-
t && (t._f.refs ? t._f.refs.every((e) => !er(e)) : !er(t._f.ref)) && ce(e);
|
|
2284
|
-
}
|
|
2285
|
-
s.unMount = /* @__PURE__ */ new Set();
|
|
2286
|
-
},
|
|
2287
|
-
_disableForm: (e) => {
|
|
2288
|
-
q(e) && (_.state.next({ disabled: e }), jn(r, (t, n) => {
|
|
2289
|
-
let i = K(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 === dn;
|
|
2329
|
-
}
|
|
2330
|
-
},
|
|
2331
|
-
subscribe: (e) => (o.mount = !0, h = {
|
|
2332
|
-
...h,
|
|
2333
|
-
...e.formState
|
|
2334
|
-
}, se({
|
|
2335
|
-
...e,
|
|
2336
|
-
formState: {
|
|
2337
|
-
...p,
|
|
2338
|
-
...e.formState
|
|
2339
|
-
}
|
|
2340
|
-
})),
|
|
2341
|
-
trigger: I,
|
|
2342
|
-
register: ue,
|
|
2343
|
-
handleSubmit: fe,
|
|
2344
|
-
watch: (e, t) => {
|
|
2345
|
-
if (J(e)) {
|
|
2346
|
-
u++;
|
|
2347
|
-
let { unsubscribe: n } = _.state.subscribe({ next: (n) => "values" in n && e(n.values || N(void 0, t), n) }), r = !1;
|
|
2348
|
-
return { unsubscribe: () => {
|
|
2349
|
-
r || (r = !0, u--, n());
|
|
2350
|
-
} };
|
|
2351
|
-
}
|
|
2352
|
-
return N(e, t, !0);
|
|
2353
|
-
},
|
|
2354
|
-
setValue: re,
|
|
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) && ne(e, K(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)), G(e) ? r : Z(e) ? K(r, e) : e.map((e) => K(r, e));
|
|
2374
|
-
},
|
|
2375
|
-
getErrors: (e) => G(e) ? { ...n.errors } : Z(e) ? K(n.errors, e) : e.map((e) => K(n.errors, e)),
|
|
2376
|
-
reset: me,
|
|
2377
|
-
resetField: (e, t = {}) => {
|
|
2378
|
-
K(r, e) && ($(n.validatingFields, e), G(t.defaultValue) ? re(e, W(K(i, e))) : (re(e, t.defaultValue), Y(i, e, W(t.defaultValue))), t.keepTouched || $(n.touchedFields, e), t.keepDirty || ($(n.dirtyFields, e), n.isDirty = t.defaultValue ? M(e, W(K(i, e))) : M()), 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 = W(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: oe,
|
|
2394
|
-
unregister: ce,
|
|
2395
|
-
setError: L,
|
|
2396
|
-
setFocus: (e, t = {}) => {
|
|
2397
|
-
let n = K(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: ae
|
|
2406
|
-
};
|
|
2407
|
-
return {
|
|
2408
|
-
...ge,
|
|
2409
|
-
formControl: ge
|
|
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
|
-
...W(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 = W(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 = W(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(bn)), 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] !== dn && (t._proxyFormState[i] = !r || dn), 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
|
-
[ie.Info]: "ValidationInformation",
|
|
2512
|
-
[ie.Warning]: "ValidationWarning",
|
|
2513
|
-
[ie.Error]: "ValidationStop",
|
|
2514
|
-
[ie.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 = w(C((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: S, ...C } = e, w = vr({ shouldUseNativeValidation: !1 }), { handleSubmit: T, formState: E } = w, D = k(null), ee = k(null), M = fe(), N = O(() => {
|
|
2517
|
-
let e = typeof l == "string" ? l : l ? void 0 : br[c];
|
|
2518
|
-
return e ? v(ne, {
|
|
2519
|
-
iconKey: e,
|
|
2520
|
-
size: 32,
|
|
2521
|
-
ariaHidden: !0
|
|
2522
|
-
}) : l ?? null;
|
|
2523
|
-
}, [l, c]), P = se((e) => typeof e == "string" ? e === "Ok" ? M("dialog.ok") : e === "Cancel" ? M("dialog.cancel") : e : typeof e.label == "function" ? e.label() : e.label, [M]), te = k(null), [F, ie] = A(null), I = se(async (e) => {
|
|
2524
|
-
let t = xr(e);
|
|
2525
|
-
if (F !== null || Cr(e)) return;
|
|
2526
|
-
let n = Sr(e, b), r;
|
|
2527
|
-
try {
|
|
2528
|
-
if (ie(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
|
-
ie(null);
|
|
2532
|
-
}
|
|
2533
|
-
}, [
|
|
2534
|
-
d,
|
|
2535
|
-
p,
|
|
2536
|
-
m,
|
|
2537
|
-
b,
|
|
2538
|
-
_,
|
|
2539
|
-
F
|
|
2540
|
-
]), oe = se((e, t) => {
|
|
2541
|
-
setTimeout(() => {
|
|
2542
|
-
I(_);
|
|
2543
|
-
}, 180);
|
|
2544
|
-
}, [I, _]), L = se(() => {
|
|
2545
|
-
d?.(xr(b), !0, !1), u?.(), p?.(null);
|
|
2546
|
-
}, [
|
|
2547
|
-
d,
|
|
2548
|
-
b,
|
|
2549
|
-
u,
|
|
2550
|
-
p
|
|
2551
|
-
]), ce = E && (Object.keys(E.errors).length > 0 || E.disabled || E.isSubmitting), le = se((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 ? L() : t || I(e);
|
|
2558
|
-
}
|
|
2559
|
-
}, s = typeof e == "string" ? void 0 : e.renderButton;
|
|
2560
|
-
if (s) return v(ae, {
|
|
2561
|
-
render: s,
|
|
2562
|
-
props: {
|
|
2563
|
-
buttonProps: o,
|
|
2564
|
-
isDefaultOption: t
|
|
2565
|
-
}
|
|
2566
|
-
}, `action:${r}`);
|
|
2567
|
-
let c = F !== null && Sr(e, F), l = {
|
|
2568
|
-
className: t ? "defaultOption" : "action",
|
|
2569
|
-
variant: t ? "contained" : "outlined",
|
|
2570
|
-
size: "small",
|
|
2571
|
-
disabled: !a && (ce || Cr(e)) || F !== null && !c,
|
|
2572
|
-
color: "primary",
|
|
2573
|
-
...o
|
|
2574
|
-
};
|
|
2575
|
-
if (t || a) {
|
|
2576
|
-
let e = t ? D : ee;
|
|
2577
|
-
l.touchRippleRef = e, l.onPointerDown = (t) => {
|
|
2578
|
-
e.current?.start(t, { center: !1 }), t.stopPropagation(), t.preventDefault();
|
|
2579
|
-
};
|
|
2580
|
-
}
|
|
2581
|
-
return y(n, {
|
|
2582
|
-
...l,
|
|
2583
|
-
children: [v("div", {
|
|
2584
|
-
style: { visibility: c ? "hidden" : void 0 },
|
|
2585
|
-
children: P(e)
|
|
2586
|
-
}), m && !a ? v(i, {
|
|
2587
|
-
size: 16,
|
|
2588
|
-
color: "inherit",
|
|
2589
|
-
style: { opacity: +!!c },
|
|
2590
|
-
sx: {
|
|
2591
|
-
position: "absolute",
|
|
2592
|
-
top: "calc(50% - 8px)",
|
|
2593
|
-
left: "calc(50% - 8px)",
|
|
2594
|
-
zIndex: 1,
|
|
2595
|
-
pointerEvents: "none",
|
|
2596
|
-
transition: "opacity 120ms"
|
|
2597
|
-
}
|
|
2598
|
-
}) : null]
|
|
2599
|
-
}, `action:${r}`);
|
|
2600
|
-
}, [
|
|
2601
|
-
h,
|
|
2602
|
-
_,
|
|
2603
|
-
b,
|
|
2604
|
-
E,
|
|
2605
|
-
P,
|
|
2606
|
-
F
|
|
2607
|
-
]), ue = O(() => {
|
|
2608
|
-
let e = [];
|
|
2609
|
-
for (let t = 0; t < h.length; t++) {
|
|
2610
|
-
let n = h[t], r = _ === void 0 ? t === 0 : Sr(n, _);
|
|
2611
|
-
e.push(le(n, r, t));
|
|
2612
|
-
}
|
|
2613
|
-
return e;
|
|
2614
|
-
}, [
|
|
2615
|
-
h,
|
|
2616
|
-
_,
|
|
2617
|
-
E,
|
|
2618
|
-
M,
|
|
2619
|
-
F
|
|
2620
|
-
]);
|
|
2621
|
-
return v(Ft, {
|
|
2622
|
-
onCancel: L,
|
|
2623
|
-
initialPosition: { y: qt === "touch" ? "15" : "35" },
|
|
2624
|
-
onDone: p,
|
|
2625
|
-
autoFocusSel: g,
|
|
2626
|
-
isModal: !0,
|
|
2627
|
-
ref: r,
|
|
2628
|
-
...C,
|
|
2629
|
-
children: v(Jn, {
|
|
2630
|
-
...w,
|
|
2631
|
-
children: y("form", {
|
|
2632
|
-
ref: te,
|
|
2633
|
-
onSubmit: T(oe),
|
|
2634
|
-
children: [v(o, {
|
|
2635
|
-
dividers: !0,
|
|
2636
|
-
onKeyDown: (e) => {
|
|
2637
|
-
if (e.isDefaultPrevented()) return;
|
|
2638
|
-
e.stopPropagation();
|
|
2639
|
-
let t = null, n = null, r = e.which === re.Escape && b;
|
|
2640
|
-
if (r) {
|
|
2641
|
-
if (F !== null) return;
|
|
2642
|
-
t = b, n = ee;
|
|
2643
|
-
} else {
|
|
2644
|
-
if (ce || F !== null) return;
|
|
2645
|
-
e.which === re.Enter && (t = _ ?? h[0], n = D);
|
|
2646
|
-
}
|
|
2647
|
-
t && (n?.current?.start(e, { center: !1 }), setTimeout(() => {
|
|
2648
|
-
n?.current?.stop(e), r && L();
|
|
2649
|
-
}, 180));
|
|
2650
|
-
},
|
|
2651
|
-
children: y(t, {
|
|
2652
|
-
sx: {
|
|
2653
|
-
display: "flex",
|
|
2654
|
-
flexDirection: "column",
|
|
2655
|
-
whiteSpace: "pre-wrap",
|
|
2656
|
-
rowGap: (e) => e.spacing(N || s ? 1.5 : 0)
|
|
2657
|
-
},
|
|
2658
|
-
children: [y(t, {
|
|
2659
|
-
sx: {
|
|
2660
|
-
display: "flex",
|
|
2661
|
-
flexDirection: "row",
|
|
2662
|
-
alignItems: "flex-start",
|
|
2663
|
-
columnGap: (e) => e.spacing(2)
|
|
2664
|
-
},
|
|
2665
|
-
children: [N ? v(t, {
|
|
2666
|
-
sx: {
|
|
2667
|
-
display: "flex",
|
|
2668
|
-
flex: "none"
|
|
2669
|
-
},
|
|
2670
|
-
children: N
|
|
2671
|
-
}) : null, v(f, {
|
|
2672
|
-
sx: { alignSelf: "center" },
|
|
2673
|
-
children: s
|
|
2674
|
-
})]
|
|
2675
|
-
}), S]
|
|
2676
|
-
})
|
|
2677
|
-
}), v(a, {
|
|
2678
|
-
sx: {
|
|
2679
|
-
paddingTop: (e) => e.spacing(1),
|
|
2680
|
-
paddingBottom: (e) => e.spacing(1),
|
|
2681
|
-
paddingLeft: (e) => e.spacing(1),
|
|
2682
|
-
paddingRight: (e) => e.spacing(1),
|
|
2683
|
-
backgroundColor: (e) => j(e.palette.action.hover, .03)
|
|
2684
|
-
},
|
|
2685
|
-
children: ue
|
|
2686
|
-
})]
|
|
2687
|
-
})
|
|
2688
|
-
})
|
|
2689
|
-
});
|
|
2690
|
-
}));
|
|
2691
|
-
export { Ae as _, Ke as a, Ve as c, Re as d, Le as f, je as g, Me as h, Xe as i, He as l, Pe as m, xr as n, Ge as o, Ne as p, Ft as r, Ue as s, wr as t, Be as u, ke as v, Ee as y };
|