@sheetxl/utils-mui 0.7.6 → 0.7.8

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.
@@ -0,0 +1,2879 @@
1
+ import q, { memo as oe, forwardRef as de, version as To, useLayoutEffect as Cr, useEffect as Se, useState as ne, useMemo as Z, useRef as ge, useImperativeHandle as Po, useCallback as _e, createContext as Ro, Suspense as No, Fragment as Fo, useContext as _o, useReducer as Ao } from "react";
2
+ import { jsx as k, jsxs as J, Fragment as Je } from "react/jsx-runtime";
3
+ import { alpha as me, darken as Io, lighten as Vo } from "@mui/system";
4
+ import { IconButton as Ze, Divider as Er, Box as X, Typography as Me, Paper as Et, Chip as Lo, Popper as Bo, Grow as jo, Tooltip as $o, ListItemIcon as zo, MenuItem as Mr, Fade as Wo, Backdrop as Ho, DialogTitle as Uo, Button as Yo, DialogContent as Go, DialogActions as Xo, Input as Ko, Toolbar as qo } from "@mui/material";
5
+ import { ErrorUtils as Qo, CommonUtils as Te } from "@sheetxl/utils";
6
+ import { defaultCreateScrollEdgeButton as Jo, ScrollbarOrientation as at, DynamicIcon as be, useCallbackRef as ae, useFullscreenPortal as ln, KeyCodes as Pe, KeyModifiers as Mt, ReactUtils as Zo, useImperativeElement as Tr, useCommand as cn, CommandButtonType as Ae, useCommands as un } from "@sheetxl/utils-react";
7
+ import { useTheme as dn, styled as ei, createTheme as On, useThemeProps as ti } from "@mui/material/styles";
8
+ import { deepmerge as Pr } from "@mui/utils";
9
+ import Rr, { createPortal as ni } from "react-dom";
10
+ /**
11
+ * @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.7.8
12
+ *
13
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
14
+ * License: The license can be found at https://www.sheetxl.com/license.
15
+ */
16
+ function Nr(e) {
17
+ var r, n, t = "";
18
+ if (typeof e == "string" || typeof e == "number") t += e;
19
+ else if (typeof e == "object") if (Array.isArray(e)) {
20
+ var s = e.length;
21
+ for (r = 0; r < s; r++) e[r] && (n = Nr(e[r])) && (t && (t += " "), t += n);
22
+ } else for (n in e) e[n] && (t && (t += " "), t += n);
23
+ return t;
24
+ }
25
+ function Oe() {
26
+ for (var e, r, n = 0, t = "", s = arguments.length; n < s; n++) (e = arguments[n]) && (r = Nr(e)) && (t && (t += " "), t += r);
27
+ return t;
28
+ }
29
+ const ns = (e) => {
30
+ const r = { style: { cursor: "pointer" }, ...e };
31
+ return Jo(r);
32
+ }, Fr = (e, r, n, t) => {
33
+ const { style: s, ...a } = e, o = k(Ze, { component: "div", ...a, style: { ...s, padding: "0px" }, sx: { padding: "0" }, color: e.disabled ? void 0 : "primary", "aria-label": n, size: "small", children: r });
34
+ return k(dt, { title: e.disabled ? n : t, enterDelay: 800, enterNextDelay: 1600, children: e.disabled ? k("div", { style: { display: "flex" }, children: o }) : o });
35
+ }, rs = (e) => Fr(e, at.Horizontal ? k(be, { iconKey: "ArrowLeft", size: "small" }) : k(be, { iconKey: "ArrowUpward", size: "small" }), "Scroll " + (e.orientation === at.Horizontal ? "Left" : "Up"), `Scroll ${e.orientation === at.Horizontal ? "left" : "up"}, 'Ctrl+Click' to scroll to the beginning`), os = (e) => Fr(e, at.Horizontal ? k(be, { iconKey: "ArrowRight", size: "small" }) : k(be, { iconKey: "ArrowDownward", size: "small" }), "Scroll " + (e.orientation === at.Horizontal ? "Right" : "Down"), `Scroll ${e.orientation === at.Horizontal ? "right" : "down"}, 'Ctrl+Click' to scroll to the end`), ri = oe(de((e, r) => {
36
+ const { orientation: n = "vertical", sx: t, ...s } = e, a = n === "vertical";
37
+ return k(Er, { ref: r, sx: { marginLeft: a ? "2px" : void 0, marginRight: a ? "2px" : void 0, backgroundColor: "transparent !important", minHeight: a ? "1em" : void 0, minWidth: a ? void 0 : "1em", borderColor: (o) => o.palette.divider, ...t }, orientation: n, variant: "middle", flexItem: !0, ...s });
38
+ }));
39
+ function Gt(e, r) {
40
+ if (typeof e == "function") return e(r);
41
+ e && (e.current = r);
42
+ }
43
+ var At = parseInt(To.split(".")[0], 10) >= 19 ? function(e) {
44
+ return (r) => {
45
+ const n = [];
46
+ for (const t of e) {
47
+ const s = Gt(t, r), a = typeof s == "function";
48
+ n.push(a ? s : () => Gt(t, null));
49
+ }
50
+ return () => {
51
+ for (const t of n) t();
52
+ };
53
+ };
54
+ } : function(e) {
55
+ return (r) => {
56
+ for (const n of e) Gt(n, r);
57
+ };
58
+ }, oi = function() {
59
+ }, _r = typeof window < "u";
60
+ function Ar(e) {
61
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
62
+ }
63
+ function Ir(e) {
64
+ if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
65
+ var r = e.default;
66
+ if (typeof r == "function") {
67
+ var n = function t() {
68
+ var s = !1;
69
+ try {
70
+ s = this instanceof t;
71
+ } catch {
72
+ }
73
+ return s ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
74
+ };
75
+ n.prototype = r.prototype;
76
+ } else n = {};
77
+ return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(t) {
78
+ var s = Object.getOwnPropertyDescriptor(e, t);
79
+ Object.defineProperty(n, t, s.get ? s : { enumerable: !0, get: function() {
80
+ return e[t];
81
+ } });
82
+ }), n;
83
+ }
84
+ var Vr = _r ? Cr : Se, Cn = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
85
+ const En = _r && window.ResizeObserver !== void 0 ? function() {
86
+ var e = ne(null), r = e[0], n = e[1], t = ne(Cn), s = t[0], a = t[1], o = Z(function() {
87
+ return new window.ResizeObserver(function(l) {
88
+ if (l[0]) {
89
+ var i = l[0].contentRect, c = i.x, f = i.y, x = i.width, y = i.height, b = i.top, v = i.left, m = i.bottom, h = i.right;
90
+ a({ x: c, y: f, width: x, height: y, top: b, left: v, bottom: m, right: h });
91
+ }
92
+ });
93
+ }, []);
94
+ return Vr(function() {
95
+ if (r) return o.observe(r), function() {
96
+ o.disconnect();
97
+ };
98
+ }, [r]), [n, s];
99
+ } : function() {
100
+ return [oi, Cn];
101
+ }, ii = "_traverse-ellipsis_14l1h_1", is = oe((e) => {
102
+ const { sx: r, speed: n = 2, size: t = 70, ...s } = e;
103
+ return k(X, { sx: { width: `${t}px`, height: `${t}px`, zIndex: 1, "& .primary": { stroke: (a) => a.palette.grey[600], fill: "none" }, ...r }, ...s, children: J("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [k("circle", { className: "primary", strokeWidth: "4", cx: "50", cy: "50", r: "48" }), k("line", { className: "primary", strokeLinecap: "round", strokeWidth: "4", x1: "50", y1: "50", x2: "85", y2: "50.5", children: k("animateTransform", { attributeName: "transform", dur: `${n}s`, type: "rotate", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" }) }), k("line", { className: "primary", strokeLinecap: "round", strokeWidth: "4", x1: "50", y1: "50", x2: "49.5", y2: "74", children: k("animateTransform", { attributeName: "transform", dur: 7.5 * n + "s", type: "rotate", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" }) })] }) });
104
+ }), ai = oe((e) => {
105
+ const { sx: r, speed: n = 1.5, size: t = 70, ...s } = e;
106
+ return k(X, { sx: { width: `${t}px`, height: `${t}px`, zIndex: 1, "& .primary": { fill: (a) => a.palette.grey[600] }, "& .secondary": { stroke: (a) => a.palette.grey[600], fill: "none", opacity: 0.5 }, ...r }, ...s, children: J("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [k("circle", { className: "secondary", strokeWidth: "4", cx: "50", cy: "50", r: "21" }), k("path", { className: "primary", d: "M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50", children: k("animateTransform", { attributeName: "transform", type: "rotate", dur: 1 * n + "s", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" }) })] }) });
107
+ }), as = oe((e) => {
108
+ const { sx: r, speed: n = 1, size: t = 70, ...s } = e;
109
+ return k(X, { sx: { width: `${t}px`, height: `${t}px`, zIndex: 1, ...r }, ...s, children: J("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [k("circle", { className: "primary", cx: "6", cy: "50", r: "6", children: k("animate", { attributeName: "opacity", dur: `${n}s`, values: "0;1;0", repeatCount: "indefinite", begin: "0.1" }) }), k("circle", { className: "primary", cx: "26", cy: "50", r: "6", children: k("animate", { attributeName: "opacity", dur: `${n}s`, values: "0;1;0", repeatCount: "indefinite", begin: "0.2" }) }), k("circle", { className: "primary", cx: "46", cy: "50", r: "6", children: k("animate", { attributeName: "opacity", dur: `${n}s`, values: "0;1;0", repeatCount: "indefinite", begin: "0.3" }) })] }) });
110
+ }), ss = oe((e) => {
111
+ const { sx: r, speed: n = 1, size: t = 70, ...s } = e;
112
+ return k(X, { sx: { width: `${t}px`, height: `${t}px`, zIndex: 1, "& .primary": { fill: (a) => a.palette.grey[600], stroke: "none" }, ...r }, ...s, children: J("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [k("circle", { className: "primary", cx: "6", cy: "50", r: "6", children: k("animateTransform", { attributeName: "transform", dur: `${n}s`, type: "translate", values: "0 15 ; 0 -15; 0 15", repeatCount: "indefinite", begin: "0.1" }) }), k("circle", { className: "primary", cx: "30", cy: "50", r: "6", children: k("animateTransform", { attributeName: "transform", dur: `${n}s`, type: "translate", values: "0 10 ; 0 -10; 0 10", repeatCount: "indefinite", begin: "0.2" }) }), k("circle", { className: "primary", cx: "54", cy: "50", r: "6", children: k("animateTransform", { attributeName: "transform", dur: `${n}s`, type: "translate", values: "0 5 ; 0 -5; 0 5", repeatCount: "indefinite", begin: "0.3" }) })] }) });
113
+ }), ls = oe((e) => {
114
+ const { sx: r, speed: n = 2, size: t = 70, ...s } = e;
115
+ return k(X, { sx: { width: `${t}px`, height: `${t}px`, zIndex: 1, "& .primary": { stroke: (a) => a.palette.grey[600], opacity: 0.5, fill: "none" }, "& .secondary": { fillOpacity: (a) => a.palette.grey[600], opacity: 0.8, stroke: (a) => a.palette.background.paper }, ...r }, ...s, children: J("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [k("circle", { className: "primary", strokeWidth: "4", cx: "50", cy: "50", r: "44" }), k("circle", { className: "secondary", strokeWidth: "3", cx: "8", cy: "54", r: "6", children: k("animateTransform", { attributeName: "transform", dur: `${n}s`, type: "rotate", from: "0 50 48", to: "360 50 52", repeatCount: "indefinite" }) })] }) });
116
+ }), cs = oe((e) => {
117
+ const { sx: r, speed: n = 1, size: t = 13, width: s = 64, height: a = 17, ...o } = e;
118
+ return J(X, { sx: { width: `${s}px`, height: `${a}px`, "& .primary": { backgroundColor: (l) => l.palette.grey[600], top: `${(a - t) / 2}px`, width: () => `${t}px`, height: () => `${t}px` }, ...r }, className: Oe(ii, "animated-icon"), ...o, children: [k("div", { className: "primary" }), k("div", { className: "primary" }), k("div", { className: "primary" }), k("div", { className: "primary" })] });
119
+ }), si = k(ai, {}), li = oe(de((e, r) => {
120
+ const { sx: n, style: t, onMount: s, onUnmount: a, transitionDelay: o = "1200ms", panel: l = !1, transparentBackground: i = !0, icon: c = si, label: f, ...x } = e, y = Z(() => typeof f == "string" ? k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em" }, children: f }) : f, [f]), b = ge(null), v = Z(() => {
121
+ let p = J(X, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "8px" }, children: [y, c] });
122
+ return l === !0 && (p = k(Et, { elevation: 0, sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", alignSelf: "center", marginBottom: "5%", backgroundColor: (u) => u.palette.info.light, color: (u) => u.palette.info.contrastText, paddingLeft: (u) => u.spacing(2), paddingRight: (u) => u.spacing(2), paddingTop: (u) => u.spacing(2), paddingBottom: (u) => u.spacing(1), rowGap: (u) => u.spacing(1), borderRadius: (u) => `${u.shape.borderRadius}px`, boxShadow: (u) => u.shadows[2], "& .primary": { background: (u) => `${me(u.palette.info.contrastText, 0.9)} !important`, boxShadow: (u) => `0 0 0 1px ${u.palette.mode === "dark" ? u.palette.text.secondary : u.palette.divider}`, boxSizing: "content-box", border: "solid transparent" }, zIndex: 1 }, children: p })), k(X, { ref: At([b, r]), className: "animatable", sx: { cursor: "wait", boxSizing: "border-box", alignItems: "center", justifyContent: "center", display: "flex", flexDirection: "column", willChange: "opacity", opacity: i ? 1e-3 : 1, transitionProperty: "opacity", transitionDelay: o, transitionDuration: "320ms", transitionTimingFunction: "ease-in", overflow: "hidden", outline: "none", width: "100%", height: "100%", minWidth: 0, minHeight: 0, zIndex: 99999, "&.animating": { opacity: 1 }, "&.animating-exit": { opacity: 0, transition: "opacity 210ms" }, ...n, ...t }, ...x, children: J(X, { className: "center", sx: { display: "flex", flex: "1 1 100%", height: "100%", width: "100%", alignItems: "center", justifyContent: "center", boxSizing: "border-box", position: "relative" }, children: [k(X, { className: "backdrop", sx: { opacity: (u) => i ? 1.5 * u.palette.action.disabledOpacity : void 0, background: (u) => i ? void 0 : u.palette.background.paper, backdropFilter: "blur(4px)", borderRadius: (u) => `${u.shape.borderRadius}px`, zIndex: -1, position: "absolute", width: "100%", height: "100%", boxSizing: "border-box" } }), p] }) });
123
+ }, [n, l]), m = ge(!1), h = ge(!1);
124
+ return Vr(() => {
125
+ if (b.current && !m.current && !h.current) {
126
+ if (h.current = !0, b.current.classList.contains("animatable") && !b.current.classList.contains("animating")) {
127
+ let p = !1;
128
+ const u = () => {
129
+ h.current && (m.current = !0, h.current = !1, p = !0, s?.());
130
+ };
131
+ b.current && b.current.addEventListener("transitionrun", u, { once: !0, capture: !0, passive: !0 }), h.current && b.current && (window.getComputedStyle(b.current, null).opacity, b.current.classList.add("animating")), setTimeout(() => {
132
+ !p && h.current && b.current && (b.current?.removeEventListener("transitionrun", u), u());
133
+ }, 100);
134
+ } else m.current = !0, h.current = !1, s?.();
135
+ return () => {
136
+ };
137
+ }
138
+ }, [b.current]), Se(() => () => {
139
+ m.current && (b.current?.classList.remove("animating"), m.current = !1, h.current = !1, a?.());
140
+ }, []), v;
141
+ }));
142
+ li.displayName = "LoadingPanel";
143
+ const ci = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, ui = /^\s*at\s+(?:(async|new|await)\s+)?(.+?):(\d+):(\d+)\s*$/, Mn = (e) => {
144
+ if (!e) return "";
145
+ try {
146
+ e = new URL(e).pathname;
147
+ } catch {
148
+ }
149
+ return e = (e = e.replace(/^\/+/, "")).replace(/^@?fs[\\/]/, "");
150
+ }, Lr = oe(({ error: e, maxLines: r = Number.MAX_SAFE_INTEGER, hideLineNumbers: n = !1 }) => {
151
+ const [t, s] = ne(null);
152
+ if (!e?.stack) return null;
153
+ const a = Qo.collectErrorChain(e).reverse(), o = [];
154
+ a.forEach(({ error: c }, f) => {
155
+ const x = (c.stack || "").split(`
156
+ `).filter(Boolean).map((y) => {
157
+ let b = y.match(ci);
158
+ if (b) {
159
+ const [, v = "", m, h, p, u] = b;
160
+ return { line: `at ${v ? v + " " : ""}${m}`, location: `${Mn(h).split(/[\\/]/).pop()}:${p}:${u}` };
161
+ }
162
+ if (b = y.match(ui), b) {
163
+ const [, v = "", m, h, p] = b, u = Mn(m), w = `${u.split(/[\\/]/).pop()}:${h}:${p}`;
164
+ return { line: `at ${v ? v + " " : ""}${w}`, location: u !== w ? `${u}:${h}:${p}` : void 0 };
165
+ }
166
+ return { line: y.trim() };
167
+ });
168
+ x.length && (o.push({ line: f ? `Caused by: ${x[0].line}` : x[0].line, isBoundary: !0 }), o.push(...x.slice(1)));
169
+ });
170
+ const l = r ? o.slice(0, r) : o, i = r && o.length > r;
171
+ return J(X, { sx: { width: "100%", mt: 1 }, children: [J(X, { sx: { display: "flex", alignItems: "center", gap: 1, borderRadius: 1, px: 1, py: 0.5 }, children: [J(Me, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", opacity: 0.8 }, children: ["Stack Trace(", a.length > 1 ? ` (${a.length} frames)` : "", ")"] }), k(X, { sx: { flex: 1 } }), t && k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.8 }, children: t }), k(Ze, { size: "small", onClick: async () => {
172
+ try {
173
+ let c = 0;
174
+ const f = o.map((x) => {
175
+ if (x.isBoundary) return c = 0, x.line;
176
+ c++;
177
+ let y = x.location && x.line !== x.location ? `${x.line} (${x.location})` : x.line;
178
+ return c >= 1 && (y = ` ${y}`), y;
179
+ }).join(`
180
+ `);
181
+ await navigator.clipboard.writeText(f), s("Copied!"), setTimeout(() => s(null), 2e3);
182
+ } catch (c) {
183
+ s("Can't copy!"), console.warn("Failed to copy stack trace:", c);
184
+ }
185
+ }, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Copy stack trace", children: k(be, { iconKey: "ContentCopy", style: { fontSize: "0.875rem" } }) }), k(Ze, { size: "small", onClick: () => {
186
+ s("Logged!"), setTimeout(() => s(null), 2e3), console.log(e);
187
+ }, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Log error to console", children: k(be, { iconKey: "BugReport", style: { fontSize: "0.875rem" } }) })] }), J(X, { sx: { mt: 1, backgroundColor: "rgba(0, 0, 0, 0.2)", borderRadius: 1, p: 1, maxHeight: "300px", overflow: "auto", fontFamily: "monospace", fontSize: "0.75rem", lineHeight: 1.4 }, children: [l.map((c, f) => c.isBoundary ? k(X, { sx: { py: 1, mt: f > 0 ? 1 : 0, mb: 0.5, borderTop: f > 0 ? "1px solid rgba(255, 255, 255, 0.1)" : "none" }, children: k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", fontWeight: "bold", color: (x) => c.isBoundary ? x.palette.text.primary : x.palette.text.secondary, display: "block" }, children: c.line }) }, `error-${f}`) : J(X, { sx: { display: "flex", alignItems: "flex-start", gap: 1, py: 0.25, pl: 1, "&:hover": { backgroundColor: "rgba(255, 255, 255, 0.05)" } }, children: [!n && k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.5, minWidth: "20px", textAlign: "right", userSelect: "none" }, children: f + 1 }), J(X, { sx: { flex: 1, overflow: "hidden" }, children: [k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", color: "inherit" }, children: c.line }), c.location && c.line !== c.location && k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.6, fontStyle: "italic" }, children: c.location })] })] }, `stack-${f}`)), i && J(Me, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.6, fontStyle: "italic", textAlign: "center", display: "block", mt: 1 }, children: ["... and ", o.length - r, " more frames"] })] })] });
188
+ });
189
+ Lr.displayName = "StackTrace";
190
+ const di = (e, r = !1, n = !1) => {
191
+ if (q.isValidElement(e)) return e;
192
+ if (e instanceof Error) return J(X, { sx: { display: "flex", flexDirection: "column", maxWidth: "500px", width: "100%" }, children: [k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, mb: 1 }, children: e.message }), e.cause ? J(Me, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em", mb: 1, opacity: 0.8 }, children: ["Caused by: ", e.cause instanceof Error ? e.cause.message : String(e.cause)] }) : null, !r && k(Lr, { error: e, hideLineNumbers: !0 })] });
193
+ const t = e === "string" ? e : `Unknown Error: ${String(e)}`;
194
+ return k(Me, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em" }, children: t });
195
+ }, pi = oe(de((e, r) => {
196
+ const { sx: n, icon: t = k(be, { iconKey: "Error", style: { fontSize: 48 } }), error: s, hideStackTrace: a = !1, stackTraceExpanded: o = !1, ...l } = e, i = Z(() => di(s, a, o), [s, a, o]);
197
+ return Z(() => k(X, { ref: r, sx: { boxSizing: "border-box", alignItems: "center", justifyContent: "center", display: "flex", flexDirection: "row", overflow: "hidden", width: "100%", height: "100%", ...n }, ...l, children: J(X, { sx: { display: "flex", flex: "1 1 100%", height: "100%", alignItems: "center", justifyContent: "center", boxSizing: "border-box", position: "relative" }, children: [k(X, { className: "backdrop", sx: { backdropFilter: "blur(4px)", borderRadius: (c) => `${c.shape.borderRadius}px`, zIndex: -1, position: "absolute", width: "100%", height: "100%", boxSizing: "border-box" } }), k(Et, { elevation: 0, sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", rowGap: "8px", alignSelf: "center", marginBottom: "5%", backgroundColor: (c) => c.palette.error.light, color: (c) => c.palette.error.contrastText, paddingLeft: (c) => c.spacing(2), paddingRight: (c) => c.spacing(2), paddingTop: (c) => c.spacing(2), paddingBottom: (c) => c.spacing(2), borderRadius: (c) => `${c.shape.borderRadius}px`, boxShadow: (c) => c.shadows[2], "& .primary": { background: (c) => `${c.palette.error.contrastText} !important`, border: "solid transparent" }, zIndex: 1 }, children: k(X, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: (c) => c.spacing(2), width: "100%", maxWidth: "600px" }, children: J(X, { sx: { display: "flex", flexDirection: "row", alignItems: "flex-start", gap: (c) => c.spacing(2) }, children: [t, i] }) }) })] }) }), [n]);
198
+ }));
199
+ pi.displayName = "ErrorPanel";
200
+ const Br = oe(de((e, r) => {
201
+ const { chips: n, sx: t, ...s } = e, a = q.useMemo(() => {
202
+ if (!n) return null;
203
+ let o = null;
204
+ o = Array.isArray(n) ? n : [n];
205
+ const l = [], i = o.length;
206
+ for (let c = 0; c < i; c++) {
207
+ const f = o[c];
208
+ let x = null;
209
+ typeof f == "string" ? x = k(Lo, { label: f, color: "primary", size: "small", sx: { scale: "0.8" } }, "chip-" + c) : q.cloneElement(f, { key: "chip-" + c }), l.push(x);
210
+ }
211
+ return l;
212
+ }, [n]);
213
+ return k(X, { ref: r, sx: { display: "flex", flexDirection: "row", marginLeft: "4px", gap: "2px", ...t }, ...s, children: a });
214
+ }));
215
+ var Zt = "top", Nt = "bottom", en = "right", jr = "left", fi = [Zt, Nt, en, jr], $r = "viewport", ht = "popper";
216
+ function nt(e) {
217
+ return e ? (e.nodeName || "").toLowerCase() : null;
218
+ }
219
+ function We(e) {
220
+ if (e == null) return window;
221
+ if (e.toString() !== "[object Window]") {
222
+ var r = e.ownerDocument;
223
+ return r && r.defaultView || window;
224
+ }
225
+ return e;
226
+ }
227
+ function lt(e) {
228
+ return e instanceof We(e).Element || e instanceof Element;
229
+ }
230
+ function ct(e) {
231
+ return e instanceof We(e).HTMLElement || e instanceof HTMLElement;
232
+ }
233
+ function pn(e) {
234
+ return typeof ShadowRoot < "u" && (e instanceof We(e).ShadowRoot || e instanceof ShadowRoot);
235
+ }
236
+ var wt = Math.max, Tn = Math.min, Pn = Math.round;
237
+ function tn() {
238
+ var e = navigator.userAgentData;
239
+ return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(r) {
240
+ return r.brand + "/" + r.version;
241
+ }).join(" ") : navigator.userAgent;
242
+ }
243
+ function zr() {
244
+ return !/^((?!chrome|android).)*safari/i.test(tn());
245
+ }
246
+ function fn(e, r, n) {
247
+ r === void 0 && (r = !1), n === void 0 && (n = !1);
248
+ var t = e.getBoundingClientRect(), s = 1, a = 1;
249
+ r && ct(e) && (s = e.offsetWidth > 0 && Pn(t.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && Pn(t.height) / e.offsetHeight || 1);
250
+ var o = (lt(e) ? We(e) : window).visualViewport, l = !zr() && n, i = (t.left + (l && o ? o.offsetLeft : 0)) / s, c = (t.top + (l && o ? o.offsetTop : 0)) / a, f = t.width / s, x = t.height / a;
251
+ return { width: f, height: x, top: c, right: i + f, bottom: c + x, left: i, x: i, y: c };
252
+ }
253
+ function Qe(e) {
254
+ return We(e).getComputedStyle(e);
255
+ }
256
+ function hi(e) {
257
+ return ["table", "td", "th"].indexOf(nt(e)) >= 0;
258
+ }
259
+ function st(e) {
260
+ return ((lt(e) ? e.ownerDocument : e.document) || window.document).documentElement;
261
+ }
262
+ function $t(e) {
263
+ return nt(e) === "html" ? e : e.assignedSlot || e.parentNode || (pn(e) ? e.host : null) || st(e);
264
+ }
265
+ function Rn(e) {
266
+ return ct(e) && Qe(e).position !== "fixed" ? e.offsetParent : null;
267
+ }
268
+ function mi(e) {
269
+ for (var r = We(e), n = Rn(e); n && hi(n) && Qe(n).position === "static"; ) n = Rn(n);
270
+ return n && (nt(n) === "html" || nt(n) === "body" && Qe(n).position === "static") ? r : n || (function(t) {
271
+ var s = /firefox/i.test(tn());
272
+ if (/Trident/i.test(tn()) && ct(t) && Qe(t).position === "fixed") return null;
273
+ var a = $t(t);
274
+ for (pn(a) && (a = a.host); ct(a) && ["html", "body"].indexOf(nt(a)) < 0; ) {
275
+ var o = Qe(a);
276
+ if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || s && o.willChange === "filter" || s && o.filter && o.filter !== "none") return a;
277
+ a = a.parentNode;
278
+ }
279
+ return null;
280
+ })(e) || r;
281
+ }
282
+ function Wr(e) {
283
+ var r = We(e);
284
+ return { scrollLeft: r.pageXOffset, scrollTop: r.pageYOffset };
285
+ }
286
+ function Nn(e) {
287
+ return fn(st(e)).left + Wr(e).scrollLeft;
288
+ }
289
+ function Hr(e) {
290
+ var r = Qe(e), n = r.overflow, t = r.overflowX, s = r.overflowY;
291
+ return /auto|scroll|overlay|hidden/.test(n + s + t);
292
+ }
293
+ function Ur(e) {
294
+ return ["html", "body", "#document"].indexOf(nt(e)) >= 0 ? e.ownerDocument.body : ct(e) && Hr(e) ? e : Ur($t(e));
295
+ }
296
+ function Yr(e, r) {
297
+ var n;
298
+ r === void 0 && (r = []);
299
+ var t = Ur(e), s = t === ((n = e.ownerDocument) == null ? void 0 : n.body), a = We(t), o = s ? [a].concat(a.visualViewport || [], Hr(t) ? t : []) : t, l = r.concat(o);
300
+ return s ? l : l.concat(Yr($t(o)));
301
+ }
302
+ function nn(e) {
303
+ return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height });
304
+ }
305
+ function Fn(e, r, n) {
306
+ return r === $r ? nn((function(t, s) {
307
+ var a = We(t), o = st(t), l = a.visualViewport, i = o.clientWidth, c = o.clientHeight, f = 0, x = 0;
308
+ if (l) {
309
+ i = l.width, c = l.height;
310
+ var y = zr();
311
+ (y || !y && s === "fixed") && (f = l.offsetLeft, x = l.offsetTop);
312
+ }
313
+ return { width: i, height: c, x: f + Nn(t), y: x };
314
+ })(e, n)) : lt(r) ? (function(t, s) {
315
+ var a = fn(t, !1, s === "fixed");
316
+ return a.top = a.top + t.clientTop, a.left = a.left + t.clientLeft, a.bottom = a.top + t.clientHeight, a.right = a.left + t.clientWidth, a.width = t.clientWidth, a.height = t.clientHeight, a.x = a.left, a.y = a.top, a;
317
+ })(r, n) : nn((function(t) {
318
+ var s, a = st(t), o = Wr(t), l = (s = t.ownerDocument) == null ? void 0 : s.body, i = wt(a.scrollWidth, a.clientWidth, l ? l.scrollWidth : 0, l ? l.clientWidth : 0), c = wt(a.scrollHeight, a.clientHeight, l ? l.scrollHeight : 0, l ? l.clientHeight : 0), f = -o.scrollLeft + Nn(t), x = -o.scrollTop;
319
+ return Qe(l || a).direction === "rtl" && (f += wt(a.clientWidth, l ? l.clientWidth : 0) - i), { width: i, height: c, x: f, y: x };
320
+ })(st(e)));
321
+ }
322
+ function gi(e) {
323
+ var r = Yr($t(e)), n = ["absolute", "fixed"].indexOf(Qe(e).position) >= 0 && ct(e) ? mi(e) : e;
324
+ return lt(n) ? r.filter(function(t) {
325
+ return lt(t) && (function(s, a) {
326
+ var o = a.getRootNode && a.getRootNode();
327
+ if (s.contains(a)) return !0;
328
+ if (o && pn(o)) {
329
+ var l = a;
330
+ do {
331
+ if (l && s.isSameNode(l)) return !0;
332
+ l = l.parentNode || l.host;
333
+ } while (l);
334
+ }
335
+ return !1;
336
+ })(t, n) && nt(t) !== "body";
337
+ }) : [];
338
+ }
339
+ function yi(e, r) {
340
+ r === void 0 && (r = {});
341
+ var n, t = r, s = t.placement, a = s === void 0 ? e.placement : s, o = t.strategy, l = o === void 0 ? e.strategy : o, i = t.boundary, c = i === void 0 ? "clippingParents" : i, f = t.rootBoundary, x = f === void 0 ? $r : f, y = t.elementContext, b = y === void 0 ? ht : y, v = t.altBoundary, m = v !== void 0 && v, h = t.padding, p = h === void 0 ? 0 : h, u = (function(A) {
342
+ return Object.assign({}, { top: 0, right: 0, bottom: 0, left: 0 }, A);
343
+ })(typeof p != "number" ? p : (n = p, fi.reduce(function(A, V) {
344
+ return A[V] = n, A;
345
+ }, {}))), w = b === ht ? "reference" : ht, E = e.rects.popper, T = e.elements[m ? w : b], L = (function(A, V, B, z) {
346
+ var ie = V === "clippingParents" ? gi(A) : [].concat(V), G = [].concat(ie, [B]), Q = G[0], re = G.reduce(function(se, ee) {
347
+ var le = Fn(A, ee, z);
348
+ return se.top = wt(le.top, se.top), se.right = Tn(le.right, se.right), se.bottom = Tn(le.bottom, se.bottom), se.left = wt(le.left, se.left), se;
349
+ }, Fn(A, Q, z));
350
+ return re.width = re.right - re.left, re.height = re.bottom - re.top, re.x = re.left, re.y = re.top, re;
351
+ })(lt(T) ? T : T.contextElement || st(e.elements.popper), c, x, l), O = fn(e.elements.reference), R = (function(A) {
352
+ var V, B = A.reference, z = A.element, ie = A.placement, G = ie ? (function(ce) {
353
+ return ce.split("-")[0];
354
+ })(ie) : null, Q = ie ? (function(ce) {
355
+ return ce.split("-")[1];
356
+ })(ie) : null, re = B.x + B.width / 2 - z.width / 2, se = B.y + B.height / 2 - z.height / 2;
357
+ switch (G) {
358
+ case Zt:
359
+ V = { x: re, y: B.y - z.height };
360
+ break;
361
+ case Nt:
362
+ V = { x: re, y: B.y + B.height };
363
+ break;
364
+ case en:
365
+ V = { x: B.x + B.width, y: se };
366
+ break;
367
+ case jr:
368
+ V = { x: B.x - z.width, y: se };
369
+ break;
370
+ default:
371
+ V = { x: B.x, y: B.y };
372
+ }
373
+ var ee = G ? (function(ce) {
374
+ return ["top", "bottom"].indexOf(ce) >= 0 ? "x" : "y";
375
+ })(G) : null;
376
+ if (ee != null) {
377
+ var le = ee === "y" ? "height" : "width";
378
+ switch (Q) {
379
+ case "start":
380
+ V[ee] = V[ee] - (B[le] / 2 - z[le] / 2);
381
+ break;
382
+ case "end":
383
+ V[ee] = V[ee] + (B[le] / 2 - z[le] / 2);
384
+ }
385
+ }
386
+ return V;
387
+ })({ reference: O, element: E, placement: a }), S = nn(Object.assign({}, E, R)), D = b === ht ? S : O, P = { top: L.top - D.top + u.top, bottom: D.bottom - L.bottom + u.bottom, left: L.left - D.left + u.left, right: D.right - L.right + u.right }, M = e.modifiersData.offset;
388
+ if (b === ht && M) {
389
+ var I = M[a];
390
+ Object.keys(P).forEach(function(A) {
391
+ var V = [en, Nt].indexOf(A) >= 0 ? 1 : -1, B = [Zt, Nt].indexOf(A) >= 0 ? "y" : "x";
392
+ P[A] += I[B] * V;
393
+ });
394
+ }
395
+ return P;
396
+ }
397
+ const bi = { name: "maxSize", enabled: !0, phase: "main", requiresIfExists: ["offset", "preventOverflow", "flip"], fn: function(e) {
398
+ var r = e.state, n = e.name, t = yi(r, e.options), s = r.modifiersData.preventOverflow || { x: 0, y: 0 }, a = s.x, o = s.y;
399
+ let l = r.rects.popper, i = l.width, c = l.height, f = r.placement.split("-")[0], x = f === "left" ? "left" : "right", y = f === "top" ? "top" : "bottom";
400
+ r.modifiersData[n] = { width: i - t[x] - a, height: c - t[y] - o };
401
+ } }, vi = [0, 2], Gr = oe(de((e, r) => {
402
+ const { sx: n, open: t, children: s, label: a, offsets: o = vi, anchorEl: l, anchorPosition: i, onMount: c, onOpening: f, onOpen: x, onClosing: y, onClose: b, resizeOnOverflow: v = !0, ...m } = e;
403
+ if (Array.isArray(s)) throw new Error("children can not be an array");
404
+ const h = dn(), p = { name: "applyMaxSize", enabled: !0, phase: "beforeWrite", requires: ["maxSize"], fn({ state: G }) {
405
+ const { height: Q } = G.modifiersData.maxSize;
406
+ G.styles.popper.maxHeight = Q - 10 + "px";
407
+ } }, u = Z(() => {
408
+ const G = [{ name: "offset", options: { offset: o } }, { name: "flip", enabled: !0, options: { rootBoundary: "document" } }];
409
+ return v && G.unshift(bi, p), G;
410
+ }, [v, o]), [w, E] = ne(!1), T = q.useRef(null), L = ae(() => {
411
+ c?.(I.current, T.current);
412
+ }, [f]), O = ae(f, [f]), R = ae(x, [x]), S = ae(y, [y]), D = ae(() => {
413
+ E(!1), b?.();
414
+ }, [b]), [P, M] = ne(!1), I = q.useRef(null), A = q.useRef(!0), V = Z(() => ({ onFirstUpdate: () => {
415
+ A.current && (M(!0), L?.(), A.current = !1);
416
+ } }), [t, w]);
417
+ Se(() => {
418
+ t && P ? O?.() : !t && w && S?.(), t && E(t);
419
+ }, [t, P]);
420
+ const B = Z(() => ({ getBoundingClientRect: () => i ? new DOMRect(i?.left || 0, i?.top || 0, 0, 0) : l.getBoundingClientRect() }), [i, l]);
421
+ Po(r, () => ({ instance: () => T.current, element: () => I.current }), []);
422
+ const { getPortalContainer: z } = ln(), ie = Z(() => ({ zIndex: t ? "1300" : "1299", display: "flex", pointerEvents: w && t ? void 0 : "none", maxWidth: "100%", maxHeight: "100%", ...n }), [n, t, w]);
423
+ return k(Bo, { ref: I, popperRef: T, container: z, anchorEl: B, open: w, role: void 0, popperOptions: V, transition: !0, sx: ie, placement: "bottom-start", modifiers: u, ...m, children: ({ TransitionProps: G, placement: Q, ...re }) => {
424
+ const { in: se, onEnter: ee, onExited: le, ...ce } = G ?? {};
425
+ return k(jo, { ...ce, in: t, onEnter: () => {
426
+ ee?.(), R();
427
+ }, onExited: () => {
428
+ le?.(), D();
429
+ }, timeout: { enter: h.transitions.duration.shorter, exit: 0 }, style: { transformOrigin: Q === "bottom-start" ? "left top" : "center bottom" }, children: typeof s == "function" ? s({ TransitionProps: G, placement: Q, ...re }) : s || Te.EmptyArray });
430
+ } });
431
+ }));
432
+ Gr.displayName = "ExhibitPopper";
433
+ const us = (e) => {
434
+ if (e.palette.mode === "dark")
435
+ return `drop-shadow(0px 0px 1px ${e.palette.mode === "dark" ? e.palette.text.primary : e.palette.divider})`;
436
+ }, ds = (e = 1) => (r) => {
437
+ if (r.palette.mode !== "dark") return;
438
+ const n = r.palette.mode === "dark" ? r.palette.text.primary : r.palette.divider;
439
+ return `drop-shadow(0px 0px ${e}px ${n})`;
440
+ }, Xr = (e) => k(be, { ...e, iconKey: "ArrowDownOutline" }), xi = (e) => k(be, { ...e, iconKey: "ArrowRightOutline" }), ps = ei(oe(de((e, r) => {
441
+ const { sx: n, size: t = "small", activeColor: s, children: a, className: o, ...l } = e;
442
+ let i = "1rem", c = "1rem";
443
+ return t === "medium" ? (i = "1.25rem", c = "1.25rem") : t === "large" && (i = "1.5rem", c = "1.5rem"), k(X, { ref: r, className: Oe("icon", o), sx: { width: i, height: c, ...n }, ...l, children: a });
444
+ })))(({ theme: e }) => ({ fill: "currentColor", "& .activeColor": { fill: e.palette.primary.main }, "& .styled.high_contrast": { fill: e.palette.primary.main }, "& .styled.background": { fill: e.palette.background.paper }, "& .styled.current_color": { fill: "currentColor" }, "& .styled.secondary": { fill: e.palette.secondary.main }, "& .styled.secondary_dark": { fill: e.palette.secondary.dark }, "& .styled.secondary_light": { fill: e.palette.secondary.light }, "& .styled.info": { fill: e.palette.info.main }, "& .styled.info.stroked": { stroke: e.palette.info.main }, "& .styled.info_dark": { fill: e.palette.info.dark }, "& .styled.info_light": { fill: e.palette.info.light }, "& .styled.warning": { fill: e.palette.warning.main }, "& .styled.warning.stroked": { stroke: e.palette.warning.main }, "& .styled.warning_dark": { fill: e.palette.warning.dark }, "& .styled.warning_light": { fill: e.palette.warning.light }, "& .styled.error.info": { fill: e.palette.error.main }, "& .styled.error.stroked": { stroke: e.palette.error.main }, "& .styled.error_dark": { fill: e.palette.error.dark }, "& .styled.error_light": { fill: e.palette.error.light }, "& .styled.success": { fill: e.palette.success.main }, "& .styled.success_dark": { fill: e.palette.success.dark }, "& .styled.success_light": { fill: e.palette.success.light }, "& .styled.grey": { fill: e.palette.text.icon ?? e.palette.action.active } })), wi = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, ki = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, Si = function(e, r = null) {
445
+ if (!e) return e;
446
+ e = e.replace(wi, function(t, s, a, o) {
447
+ return s + s + a + a + o + o;
448
+ });
449
+ let n = ki.exec(e);
450
+ return n ? r === 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 * r}%)` : e;
451
+ }, _n = function(e, r = 0.2, n = "light") {
452
+ if (!e) return e;
453
+ let t = n !== "dark";
454
+ return r < 0 && (t = !t, r *= -1), e = Si(e), t ? Io(e, Math.max(0, Math.min(1, 1 * r))) : Vo(e, Math.max(0, Math.min(1, 1.5 * r)));
455
+ }, fs = function(e) {
456
+ let r = 0;
457
+ return r = e < 1 ? 5.11916 * e ** 2 : 4.5 * Math.log(e + 1) + 2, (r / 100).toFixed(2);
458
+ }, hs = (e, r) => {
459
+ let n = On({ palette: { mode: e ? "dark" : "light" } });
460
+ const t = { "--icon-primary": n.palette.primary.main, "--icon-secondary": n.palette.secondary.main, "--icon-secondary-light": n.palette.secondary.light, "--icon-success": n.palette.success.main, "--icon-success-light": n.palette.success.light, "--icon-info": n.palette.info.main, "--icon-warn": n.palette.warning.main, "--icon-error": n.palette.error.main, "--icon-error-light": n.palette.error.light, "--icon-grey": n.palette.text.icon ?? n.palette.action.active, "--icon-shadow": e ? n.palette.text.primary : n.palette.divider, "--icon-size": "1.25rem", "@media (pointer: coarse)": { "--icon-size": "1.75rem" } };
461
+ let s = { typography: {}, palette: { mode: e ? "dark" : "light", text: { secondary: e ? n.palette.text.secondary : me(n.palette.text.secondary, 0.75), icon: e ? me(n.palette.text.secondary, 0.7) : me(n.palette.text.primary, 0.75) } }, components: { MuiDialogTitle: { styleOverrides: { root: { fontWeight: "normal" } } }, MuiSelect: { defaultProps: { IconComponent: Xr, MenuProps: { container: () => document.fullscreenElement ?? void 0 } }, styleOverrides: { iconOutlined: { top: "unset" } } }, MuiListItemIcon: { styleOverrides: { root: { minWidth: "0px !important", overflow: "hidden", marginLeft: "0px", marginRight: "6px", padding: "1px 1px", border: "solid transparent 1px", color: "unset" } } }, MuiMenuItem: { styleOverrides: { root: { paddingTop: "2px", paddingBottom: "2px", marginLeft: "4px", marginRight: "4px", paddingLeft: "6px", paddingRight: "18px", borderRadius: "4px", fontSize: "0.875em", "@media (pointer: coarse)": { fontSize: "1em" }, "&.Mui-selected": {} } } }, MuiMenu: { defaultProps: { container: () => document.fullscreenElement ?? void 0 }, styleOverrides: { root: { paddingTop: "2px", paddingBottom: "2px", marginLeft: "4px", marginRight: "4px", paddingLeft: "6px", paddingRight: "18px", borderRadius: "4px", fontSize: "0.875em", "@media (pointer: coarse)": { fontSize: "1em" }, "&.Mui-selected": {} } } }, MuiToolbar: { styleOverrides: { root: { paddingTop: "4px", paddingBottom: "4px", "@media (min-width: 600px)": { paddingTop: "4px", paddingBottom: "4px" } } } }, MuiDivider: { styleOverrides: { root: { marginTop: "4px !important", marginBottom: "4px !important", marginLeft: "0px", marginRight: "0px" } } }, MuiInputBase: { styleOverrides: { root: {} } }, MuiPaper: { styleOverrides: { root: { ...t } } }, MuiPopper: { styleOverrides: { root: { "& .menu": { marginTop: "4px", marginBottom: "4px", borderRadius: "4px" } } } }, SmartInputField: { styleOverrides: { automatic: { transition: "opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms", color: function() {
462
+ return n.palette.text.secondary;
463
+ } }, dirty: { fontStyle: "italic", color: function() {
464
+ return n.palette.text.secondary;
465
+ } } } } } }, a = s;
466
+ return r && (a = Pr(s, r)), On(a);
467
+ };
468
+ function Kr(e, r) {
469
+ r = Pr({ track: _n(e.palette.background.paper, 0.05, e?.palette.mode), thumb: _n(e.palette.background.paper, 0.3, e?.palette.mode), active: e.palette.primary.main, corner: e.palette.background.paper, outline: !1 }, r || {});
470
+ const n = { "&::-webkit-scrollbar, & *::-webkit-scrollbar": { backgroundColor: me(r.track, 0.2), width: "13px", height: "13px" }, "&::-webkit-scrollbar-button": { display: "none" }, "& .scrollbar-button": { fill: r.thumb, backgroundColor: "transparent", transition: "fill opacity 260ms ease", width: "13px", height: "13px" }, "& .scrollbar-button:hover:not([disabled])": { fill: r.active }, "& .scrollbar-button:disabled": { opacity: 0.8 }, "&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {}, "&::-webkit-scrollbar-track-piece, & *::-webkit-scrollbar-track-piece": {}, "&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": { borderRadius: 8, backgroundColor: r.thumb, minHeight: "24px", minWidth: "24px", border: `2px solid ${r.track}` }, "&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus": { backgroundColor: r.active, border: r.outline ? r.outline : void 0 }, "&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active": { backgroundColor: r.active, border: r.outline ? r.outline : void 0 }, "&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": { backgroundColor: r.active, border: r.outline ? r.outline : void 0 }, "&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": { backgroundColor: r.corner || r.thumb } };
471
+ return Te.getOS() === Te.OSType.Firefox && (n["* .pseudo-scrollbar"] = { scrollbarColor: `${r.thumb} transparent` }, n["* .pseudo-scrollbar:hover:not([disabled])"] = { scrollbarColor: `${r.active} transparent` }), n;
472
+ }
473
+ const ms = { Light: "light", Dark: "dark" };
474
+ function gs(e) {
475
+ const { mode: r } = e || {}, [n, t] = ne(() => {
476
+ if (r === "light" || r === "dark") return { themeMode: r, source: "prop" };
477
+ if (typeof document < "u") {
478
+ const s = An();
479
+ if (s) return { themeMode: s, source: "class" };
480
+ }
481
+ return { themeMode: In(), source: "media" };
482
+ });
483
+ return Se(() => {
484
+ const s = () => {
485
+ if (r) return void (r === n.themeMode && n.source === "prop" || t((c) => ({ ...c, themeMode: r, source: "prop" })));
486
+ const i = An();
487
+ if (i) t({ themeMode: i, source: "class" });
488
+ else {
489
+ const c = In();
490
+ t({ themeMode: c, source: "media" });
491
+ }
492
+ }, a = new MutationObserver(s), o = [document.documentElement, document.body].filter(Boolean);
493
+ for (const i of o) a.observe(i, { attributes: !0, attributeFilter: ["class"] });
494
+ const l = window.matchMedia("(prefers-color-scheme: dark)");
495
+ return l.addEventListener("change", s), s(), () => {
496
+ a.disconnect(), l.removeEventListener("change", s);
497
+ };
498
+ }, [r]), n;
499
+ }
500
+ function An() {
501
+ if (typeof document > "u") return null;
502
+ const e = [...Array.from(document.body.classList), ...document.documentElement ? Array.from(document.documentElement.classList) : []];
503
+ return e.includes("dark") ? "dark" : e.includes("light") ? "light" : null;
504
+ }
505
+ function In() {
506
+ return typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
507
+ }
508
+ const ys = { Popup: "popup", Anchor: "anchor" }, bs = { ByPopup: "popupDone", Cancel: "popupCancel", ClickAway: "clickAway" }, Di = { Toolbar: "toolbar", Menuitem: "menuitem" }, hn = (e) => {
509
+ const { closeFloat: r, closeFloatAll: n, floatReference: t, popupContainer: s, children: a, className: o, sx: l, ...i } = e;
510
+ return k(X, { className: Oe("menu", o), sx: { display: "flex", flexDirection: "column", ...l }, ...i, children: a });
511
+ }, Vn = (e, r, n) => {
512
+ let t;
513
+ return n && (t = (t ? t + " " : "") + "rotate(180deg)"), k(Xr, { style: { marginLeft: e ? void 0 : r ? "-0.25rem" : "-3px", marginRight: e ? void 0 : r ? "-0.25rem" : "-6px", transform: t }, color: "inherit" });
514
+ }, qr = oe(de((e, r) => {
515
+ const { open: n, anchorEl: t, anchorPosition: s, label: a, floatReference: o, createPopupPanel: l = hn, popperProps: i, onMount: c, onClosing: f, onClose: x, onOpening: y, onOpen: b, children: v, sx: m, ...h } = e, p = ae(f, [f]), u = ae(x, [x]), w = ae(y, [y]), E = ae(b, [b]), [T, L] = ne(), O = ge(null), R = ae((D, P) => {
516
+ L(D), c?.(O.current, P);
517
+ }, [c]), S = Z(() => {
518
+ const D = { popupContainer: T, floatReference: o, children: v, ...h }, P = l(D);
519
+ return k(Et, { elevation: 8, ref: O, sx: { display: "flex", overflow: "auto", outline: "none", "&.MuiPaper-root": (M) => Kr(M) }, tabIndex: 0, children: P });
520
+ }, [l, v, T, o]);
521
+ return k(Gr, { ref: r, anchorEl: t, anchorPosition: s, label: a, open: n, onMount: R, onOpening: w, onOpen: E, onClosing: p, onClose: u, ...i, children: S });
522
+ }));
523
+ qr.displayName = "ExhibitFloatPanel";
524
+ const Ge = /* @__PURE__ */ new Map();
525
+ let Xt = null;
526
+ const Xe = /* @__PURE__ */ new Map();
527
+ let ze = null;
528
+ const Kt = (e = null, r, n, t) => (ze && (ze.fn.clear(), ze = null), e === 0 ? r : (e === null && (e = 120), ze = { fn: Te.debounce(() => r(), e), setReferences: n, isClose: t }, ze.fn)), Qr = (e, r) => {
529
+ if (r === null) return;
530
+ e.add(r);
531
+ const n = Ge.get(r.key);
532
+ if (!n) return;
533
+ const t = Xe.get(n);
534
+ t && Qr(e, t);
535
+ }, Ln = (e) => {
536
+ const r = /* @__PURE__ */ new Set();
537
+ return Qr(r, e), r;
538
+ }, zt = (e) => {
539
+ const { anchor: r, label: n = null, parentFloat: t = null, onOpen: s, onClose: a, popperProps: o, createPopupPanel: l = hn } = e ?? {}, i = ae(s, [s]), c = ae(a, [a]), [f, x] = ne(null), [y, b] = ne(!1), [v, m] = ne(!1), h = Z(() => t === null ? (Xt === null && (Xt = { key: { label: "root" }, isRoot: !0, parent: null, open: () => null, close: (g) => null, closeChild: (g) => null, onChildVisible: () => {
540
+ }, onChildHidden: () => {
541
+ }, closeAll: () => B(0), floatElement: () => null, anchorElement: () => null }), Xt) : t, []), p = Z(() => ({ label: n }), []), u = q.useRef(null), w = q.useRef(r);
542
+ Se(() => {
543
+ w.current = r;
544
+ }, [r]);
545
+ const E = (g) => {
546
+ const C = Ge.get(g);
547
+ let F = null;
548
+ return C && (F = Xe.get(C)?.close(0)), F;
549
+ }, T = () => E(G.key), [L, O] = ne(), R = () => {
550
+ if (!f) return void M();
551
+ const g = new Promise((C, F) => {
552
+ O((_) => ({ resolve: C, reject: F }));
553
+ });
554
+ return T(), Ge.delete(h.key), x(!1), g;
555
+ };
556
+ Se(() => {
557
+ L && (L.resolve(), O(null));
558
+ }, [y, v, L]);
559
+ const S = _e(() => {
560
+ let g = h;
561
+ for (; g.parent; ) g = g.parent;
562
+ return E(g.key);
563
+ }, []), D = () => {
564
+ if (f) return void M();
565
+ h && Xe.get(h.key)?.open(0);
566
+ const g = Ge.get(h.key);
567
+ g && g !== p && Xe.get(g)?.close(0), requestAnimationFrame(() => {
568
+ Ge.set(h.key, G.key), x(!0);
569
+ });
570
+ }, [P, M] = q.useReducer((g) => g + 1, 0), I = _e((g) => l === null ? null : l({ closeFloat: B, closeFloatAll: ie, ...g }), [l]), A = l === null, V = ae((g = 120) => Kt(g, D, /* @__PURE__ */ new Set([G]), !1)(), [D]), B = ae((g = 60) => Kt(g, R, Ln(G), !0)(), [R]), z = ae((g = 360) => Kt(g, T, Ln(((C) => {
571
+ const F = Ge.get(C.key);
572
+ return F && Xe.get(F) || null;
573
+ })(G)), !0)(), [T]), ie = ae(S, [S]), G = Z(() => ({ key: p, isRoot: !1, label: n, parent: h, onChildVisible: () => {
574
+ m(!0);
575
+ }, onChildHidden: () => {
576
+ m(!1);
577
+ }, open: V, close: B, closeChild: z, closeAll: ie, floatElement: () => u.current, anchorElement: () => w.current }), []);
578
+ Se(() => {
579
+ Xe.set(p, G);
580
+ }, [G]), Se(() => () => {
581
+ Xe.delete(p), B(0);
582
+ }, []), Se(() => {
583
+ f && !A && (b(!0), h.onChildVisible());
584
+ }, [f, A]);
585
+ const Q = _e((g) => {
586
+ g.which === Pe.Escape && (g.preventDefault(), g.stopPropagation(), B(0));
587
+ }, []), re = q.useRef(null), se = _e(() => {
588
+ const g = re.current, C = u.current;
589
+ g && C && (requestAnimationFrame(() => {
590
+ (C.contains(document.activeElement) || document.activeElement === document.body) && g.focus();
591
+ }), re.current = null), c?.();
592
+ }, []), ee = _e((g) => {
593
+ u.current = g, g.addEventListener("focus", (F) => {
594
+ re.current = F.relatedTarget;
595
+ }, { once: !0, passive: !0 });
596
+ const C = document.activeElement;
597
+ requestAnimationFrame(() => {
598
+ C === document.activeElement && g.focus();
599
+ });
600
+ }, []), [le, ce] = ne();
601
+ Se(() => {
602
+ A && (f ? i?.() : f === !1 && c?.()), ce(y ? k(qr, { floatReference: G, open: f, label: n, anchorEl: r, onOpening: () => {
603
+ i?.(), h.onChildVisible();
604
+ }, onClosing: se, onClose: () => {
605
+ b(!1), h.onChildHidden();
606
+ }, onMount: ee, popperProps: { onKeyDown: Q, onMouseEnter: (g) => {
607
+ f && ze?.isClose && ze.setReferences.has(G) && (ze.fn.clear(), ze = null, G.closeChild());
608
+ }, ...o }, createPopupPanel: I }) : null);
609
+ }, [y, f, n, A, o, I, P]);
610
+ const d = ae((g) => {
611
+ if (Ge.size === 0) return;
612
+ let C = !1;
613
+ Ge.forEach((F) => {
614
+ const _ = Xe.get(F);
615
+ if (C || !_) return;
616
+ _.floatElement()?.contains?.(g.target) && (C = !0), _.anchorElement()?.contains?.(g.target) && (C = !0);
617
+ }), C || S();
618
+ }, [S]);
619
+ return Se(() => {
620
+ if (!f || !h.isRoot) return;
621
+ const g = (C) => {
622
+ d(C);
623
+ };
624
+ return document.addEventListener("mousedown", g), document.addEventListener("touchstart", g), document.addEventListener("focus", g), () => {
625
+ document.removeEventListener("mousedown", g), document.removeEventListener("touchstart", g), document.removeEventListener("focus", g);
626
+ };
627
+ }, [f, h]), { component: le, reference: G };
628
+ }, Oi = oe(de((e, r) => {
629
+ const { nestedChildren: n, variant: t, disabled: s = !1, createPopupPanel: a, ...o } = e, l = { disabled: s, createPopupPanel: ae((i) => {
630
+ if (!n || n.length === 0) return null;
631
+ const { popupContainer: c, floatReference: f, ref: x, ...y } = i, b = [];
632
+ for (let v = 0; v < n.length; v++) {
633
+ const m = n[v];
634
+ m && b.push(k(Oi, { parentFloat: f, ...y, ...m }, v));
635
+ }
636
+ return J(X, { ref: r, sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: ["Children here", b, k(Ot, { parentFloat: f, children: "Close other children" })] });
637
+ }, [n]), ...o };
638
+ return k(t === Di.Toolbar ? mn : Zr, { ...l });
639
+ })), Ci = { placement: "right-start" }, vs = oe(de((e, r) => {
640
+ const { children: n, sx: t, parentFloat: s, createPopupPanel: a, popperProps: o = Ci, label: l, ...i } = e;
641
+ (function(h) {
642
+ if (!h) throw new Error("Invariant failed");
643
+ })(q.isValidElement(n));
644
+ const c = n, f = Z(() => ({ ...c?.props, ...i, onContextMenu: (h) => {
645
+ c?.props?.onContextMenu?.(h), h.isDefaultPrevented() || (i?.onContextMenu?.(h), h.isDefaultPrevented() || (b(h), h.preventDefault()));
646
+ } }), [i, c?.props]), x = ae(a, [a]), [y, b] = q.useState(null), { reference: v, component: m } = zt({ label: l ?? "contextMenu", popperProps: o, parentFloat: s, anchor: { getBoundingClientRect: () => new DOMRect(y?.clientX || 0, y?.clientY || 0) }, onClose: () => b(null), createPopupPanel: x });
647
+ return Se(() => {
648
+ y ? v.open(0) : v.close(0);
649
+ }, [y]), J(Je, { children: [q.cloneElement(n, f), m] });
650
+ })), dt = de((e, r) => {
651
+ const { slotProps: n, ...t } = e, { getPortalContainer: s } = ln();
652
+ return k($o, { ref: r, slotProps: { ...n, popper: { container: s, ...n?.popper || {} } }, ...t });
653
+ });
654
+ dt.displayName = "SimpleTooltip";
655
+ const mt = oe((e) => {
656
+ const { modifier: r, sx: n, ...t } = e;
657
+ return k(X, { sx: { marginLeft: "1px", marginRight: "1px", borderRadius: "4px", borderStyle: "solid", borderTopWidth: "1px", borderLeftWidth: "1px", borderRightWidth: "1px", borderBottomWidth: "2px", borderTopColor: (s) => me(s.palette.background.paper, s.palette.action.disabledOpacity), borderLeftColor: (s) => me(s.palette.background.paper, s.palette.action.disabledOpacity), borderRightColor: (s) => me(s.palette.background.paper, s.palette.action.disabledOpacity), borderBottomColor: (s) => me(s.palette.background.paper, 1 - s.palette.action.disabledOpacity), backgroundColor: (s) => me(s.palette.action.hover, s.palette.action.disabledOpacity), paddingLeft: "4px", paddingRight: "4px", minHeight: "1.6em", display: "flex", justifyContent: "center", alignItems: "center", boxSizing: "content-box", overflow: "hidden", ...n }, ...t, children: k(X, { sx: { display: "flex", alignItems: "center", justifyContent: "center", textAlign: "center", "& *": { fontWeight: "500" } }, children: r }) });
658
+ }), Ei = Te.getOS() === Te.OSType.MacOS || Te.getOS() === Te.OSType.IOS ? "Cmd" : "Ctrl", Jr = (e, r = !1, n = null) => {
659
+ if (Array.isArray(e)) {
660
+ let a = [], o = e;
661
+ for (let l = 0; l < o.length; l++) a.push(Jr(o[l], r, n ?? "" + l));
662
+ return k(X, { sx: { display: "flex", alignItems: "center", flexDirection: "column" }, children: a }, n);
663
+ }
664
+ if (!e?.key) return null;
665
+ const t = {};
666
+ for (let a = 0; e.modifiers && a < e.modifiers.length; a++) t[e.modifiers[a]] = !0;
667
+ const s = [];
668
+ return t?.[Mt.Ctrl] && (s.push(k(mt, { modifier: r ? "^" : k("div", { style: { paddingRight: "1px" }, children: Ei }) }, "ctrl")), s.push("+")), t?.[Mt.Alt] && (s.push(k(mt, { modifier: r ? "⌥" : "Alt" }, "alt")), s.push("+")), t?.[Mt.Shift] && (s.push(k(mt, { modifier: r ? "⇧" : k("div", { style: { paddingRight: "1px" }, children: "Shift" }) }, "shift")), s.push("+")), t?.[Mt.Meta] && (s.push(k(mt, { modifier: r ? k("div", { style: { paddingTop: "1px" }, children: "⌘" }) : "Meta" }, "meta")), s.push("+")), s.push(k(mt, { modifier: Zo.toPrettyKeyCode(e.key) }, "character")), k(X, { sx: { display: "flex", alignItems: "center" }, children: s }, n);
669
+ }, pt = oe(de((e, r) => {
670
+ const { disabled: n = !1, label: t, shortcut: s, chips: a, description: o, maxWidth: l = 280, useModifierSymbols: i = !1, children: c, simple: f, componentDisabled: x = !1, sx: y, ...b } = e;
671
+ let v = null;
672
+ s && (v = Jr(s, i));
673
+ const [m, h] = ne(null);
674
+ return Se(() => {
675
+ Promise.resolve(t).then((p) => {
676
+ h(p);
677
+ });
678
+ }, [t]), k(dt, { slotProps: { popper: { sx: { "& .MuiTooltip-tooltip": { marginTop: "0px !important" }, ...y }, modifiers: [{ name: "offset", options: { offset: [0, 14] } }] } }, className: "tooltip-wrapper", tabIndex: -1, title: !n && m ? J(X, { sx: { maxWidth: `${l}px` }, ref: r, children: [J(X, { sx: { display: "flex", flexDirection: "row", marginBottom: o ? "4px" : "0px" }, children: [k(Me, { variant: "subtitle1", component: "div", flex: "1 1 100%", children: m }), a ? k(Br, { chips: a }) : null, v ? k(X, { sx: { marginLeft: "8px" } }, "leadingSpace") : k(Je, {}), v] }), o ? k(Me, { variant: "caption", sx: { whiteSpace: "pre-line", lineHeight: "1.4" }, children: o }) : k(Je, {})] }) : "", enterDelay: 260, enterNextDelay: 130, leaveDelay: 230, disableInteractive: !0, ...b, children: k("div", { style: { display: "flex", alignItems: "stretch", justifyContent: "stretch" }, children: c }) });
679
+ })), Mi = k(be, {}), Ti = k(be, { iconKey: "Check" }), Wt = oe(de((e, r) => {
680
+ const { dense: n = !0, outlined: t = !1, disableHover: s = !1, parentFloat: a, selected: o, icon: l, tooltipProps: i, children: c, primary: f, sx: x, disabled: y, className: b, onFocus: v, onBlur: m, ...h } = e, [p, u] = ne(!1), w = { marginRight: "0px", padding: n ? "2px" : "7px", borderRadius: (R) => `${R.shape.borderRadius}px`, color: (R) => f ? void 0 : R.palette.text.icon ?? R.palette.action.active, border: (R) => `solid ${t ? R.palette.divider : "transparent"} 1px`, "& .MuiTouchRipple-child": { borderRadius: (R) => `${R.shape.borderRadius}px !important` }, "&.Mui-selected": { backgroundColor: (R) => me(R.palette.text.primary, R.palette.action.selectedOpacity), border: (R) => `solid ${t ? R.palette.text?.primary : R.palette.divider} 1px` }, "&.Mui-disabled": { border: (R) => `solid ${t ? R.palette.divider : "transparent"} 1px` }, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)", opacity: ".8" }, "&.Mui-focusVisible": { outline: "solid transparent 1px", border: "1px solid transparent" }, ...x }, E = { "&:hover:not(.Mui-disabled, [disabled])": { color: (R) => R.palette.text.primary, border: (R) => `solid ${t ? R.palette.text?.primary : R.palette.divider} 1px`, "&.Mui-selected": { backgroundColor: (R) => me(R.palette.text.primary, R.palette.action.selectedOpacity + R.palette.action.hoverOpacity) }, "> .outline-hover": { outline: (R) => `solid ${t ? R.palette.text?.primary : R.palette.divider} 1px` }, backgroundColor: null }, "&.Mui-focusVisible": { outline: (R) => `solid ${R.palette.primary.main} 1px`, border: (R) => `1px solid ${R.palette?.primary?.main}`, zIndex: 1 } };
681
+ let T = w;
682
+ s || (T = Te.mergeContentful(w, E));
683
+ const L = Z(() => {
684
+ let R = typeof l == "function" ? l() : l;
685
+ return R === null ? R : R || (o === void 0 ? Mi : Ti);
686
+ }, [l, o]);
687
+ let O = J(Ze, { component: "div", ref: r, className: Oe({ "Mui-focusVisible": p, "Mui-selected": o, "Mui-disabled": y }, b), onFocus: (R) => {
688
+ u(!0), v?.(R);
689
+ }, onBlur: (R) => {
690
+ u(!1), m?.(R);
691
+ }, size: "small", TouchRippleProps: { center: !1 }, sx: T, edge: "end", ...h, disabled: y || !1, children: [L, c] });
692
+ if (i) if (i.simple && i.label && !i.disabled) {
693
+ const { label: R, description: S, maxWidth: D, shortcut: P, useModifierSymbols: M, componentDisabled: I, simple: A, chips: V, ref: B, ...z } = i;
694
+ O = k(dt, { disableInteractive: !0, title: R ?? "", ...z, children: k(X, { sx: { display: "flex" }, children: O }) });
695
+ } else O = k(pt, { children: O, ...i });
696
+ return O;
697
+ })), Pi = k(be, {}), Ri = (e) => e.icon, Ot = oe(de((e, r) => {
698
+ const { icon: n = Pi, renderIcon: t = Ri, parentFloat: s, className: a, onFocus: o, selected: l, onBlur: i, onMouseOver: c, onMouseOut: f, onMouseEnter: x, disabled: y, children: b, sx: v, tooltipProps: m, chips: h, primary: p, ...u } = e, [w, E] = ne(!1), [T, L] = ne(!1), O = Z(() => {
699
+ const S = t?.({ icon: n, disabled: y, selected: l });
700
+ return S ? k(zo, { className: Oe({ "Mui-focusVisible": w, "Mui-hovered": T }), sx: { "& .MuiSvgIcon-root": { color: (D) => p ? void 0 : D.palette.text.icon ?? D.palette.action.active }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { "& .MuiSvgIcon-root": { color: (D) => D.palette.text.primary } } }, children: S }) : null;
701
+ }, [t, y, n, w, T, p, l]);
702
+ let R = J(Mr, { ref: r, disabled: y, onMouseOver: (S) => {
703
+ c?.(S), S.isDefaultPrevented() || L(!0);
704
+ }, onMouseOut: (S) => {
705
+ f?.(S), S.isDefaultPrevented() || L(!1);
706
+ }, onMouseEnter: (S) => {
707
+ x?.(S), S.isDefaultPrevented() || s?.closeChild();
708
+ }, TouchRippleProps: { center: !1 }, className: Oe({ "Mui-focusVisible": w, "Mui-hovered": T }, a), onFocus: (S) => {
709
+ o?.(S), E(!0);
710
+ }, onBlur: (S) => {
711
+ i?.(S), E(!1);
712
+ }, sx: { flex: "1 1 100%", "&.Mui-disabled > .icon path": { filter: "grayscale(65%)" }, "&.Mui-selected": { color: (S) => S.palette.text.primary }, color: (S) => S.palette.text.secondary, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (S) => S.palette.text.primary }, ...v }, ...u, children: [O, b, h ? k(Br, { chips: h }) : null] });
713
+ return m && (R = k(pt, { children: R, placement: "right-start", ...m })), R;
714
+ })), xs = oe(de((e, r) => {
715
+ const { children: n, sx: t, primary: s = !1, variant: a = "subtitle1", ...o } = e;
716
+ return k(Je, { children: k(Me, { ref: r, variant: a, component: "div", sx: { userSelect: "none", fontWeight: "500", paddingLeft: "8px", paddingTop: a === "subtitle1" ? "2px" : void 0, paddingBottom: a === "subtitle1" ? "2px" : void 0, color: (l) => s ? void 0 : l.palette.text.secondary, ...t }, ...o, children: n }) });
717
+ })), mn = oe(de((e, r) => {
718
+ const { dense: n = !0, outlined: t = !1, label: s, selected: a = !1, onQuickClick: o, parentFloat: l, createPopupPanel: i, popupProps: c, onPopupOpen: f, onPopupClose: x, quickButtonProps: y, createQuickButton: b, tooltip: v = "", createTooltip: m, icon: h, disabled: p, buttonProps: u = Te.EmptyObject, disableHover: w, touchRippleRef: E, primary: T, children: L, sx: O, className: R, ...S } = e, D = dn(), P = Z(() => {
719
+ const K = (te, ue, he, Le = he) => {
720
+ const Ce = typeof t == "boolean" ? null : t[te];
721
+ return typeof Ce == "function" ? Ce(ue) : Ce || (t ? he : Le);
722
+ };
723
+ return { outline: { color: (te) => K("color", te, te.palette.divider, "transparent"), hoverColor: (te) => K("hoverColor", te, te.palette.text?.primary, te.palette.divider), focusColor: (te) => K("focusColor", te, te.palette?.primary?.main) }, active: D.palette.mode === "dark" ? D.palette.text.secondary : D.palette.text.primary, text: D.palette.text.icon ?? D.palette.action.active };
724
+ }, [t, D]), [M, I] = ne(!1), [A, V] = ne(!1), [B, z] = ne(!1), ie = ge(null), G = ge(null), Q = zt({ anchor: ie.current, label: s, createPopupPanel: i, parentFloat: l, popperProps: c?.popperProps, onClose: () => {
725
+ I(!1), x?.();
726
+ }, onOpen: () => {
727
+ I(!0), f?.();
728
+ } }), re = ae((K) => {
729
+ o?.(K), Q.reference.close(0);
730
+ }, [o, Q]), se = ae(() => {
731
+ M ? Q.reference.close(0) : Q.reference.open(0);
732
+ }, [M, Q, l, s]), ee = Z(() => {
733
+ const K = { "&.bordered": { borderWidth: "1px", borderRadius: "0px", borderTopStyle: "solid", borderBottomStyle: "solid", borderColor: (Y) => P.outline.color(Y), "&.Mui-focusVisible": { border: (Y) => `1px solid ${P.outline.focusColor(Y)} !important` }, "&:hover:not(.Mui-disabled, [disabled])": { borderColor: () => w ? "transparent" : void 0, backgroundColor: () => w ? "transparent" : void 0 }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { borderColor: (Y) => P.outline.hoverColor(Y) }, "&.Mui-selected:not(.Mui-disabled, [disabled])": { borderColor: (Y) => P.outline.hoverColor(Y) }, "&.left": { borderTopLeftRadius: (Y) => `${Y.shape.borderRadius}px`, borderBottomLeftRadius: (Y) => `${Y.shape.borderRadius}px`, borderLeftStyle: "solid" }, "&.hard-right": { borderRightStyle: "solid", borderRightWidth: "1px", borderRightColor: (Y) => P.outline.color(Y) }, "&.right": { borderTopRightRadius: (Y) => `${Y.shape.borderRadius}px`, borderBottomRightRadius: (Y) => `${Y.shape.borderRadius}px`, borderRightStyle: "solid" }, "&.divider": { borderLeftWidth: "0px !important" } }, "& .MuiTouchRipple-child": { borderRadius: (Y) => `${Y.shape.borderRadius}px !important` } }, te = { "&.Mui-selected": { backgroundColor: (Y) => me(Y.palette.primary.main, Y.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (Y) => me(Y.palette.primary.main, Y.palette.action.selectedOpacity + Y.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (Y) => me(Y.palette.primary.main, Y.palette.action.selectedOpacity) } } } }, ue = { maxHeight: "100%", "&.Mui-selected": { backgroundColor: (Y) => me(Y.palette.text.icon ?? Y.palette.action.active, Y.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (Y) => me(Y.palette.text.icon ?? Y.palette.action.active, Y.palette.action.selectedOpacity + Y.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (Y) => me(Y.palette.text.icon ?? Y.palette.action.active, Y.palette.action.selectedOpacity) } } }, "&:hover:not(.Mui-disabled, [disabled])": { color: (Y) => Y.palette.text.primary }, backgroundColor: () => w ? "transparent" : void 0, color: (Y) => Y.palette.text.icon, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)", opacity: ".8" }, padding: () => n ? "2px 3px" : "7px", marginRight: "0" }, he = Te.mergeContentful(ue, K), Le = Te.mergeContentful(he, te), Ce = Te.mergeContentful(ue, K);
734
+ return { quickButtonStyling: he, openQuickButtonStyling: Le, compoundStyling: Ce, openCompoundStyling: Te.mergeContentful(Ce, te) };
735
+ }, [P, w]), le = ae((K) => {
736
+ const { children: te, ref: ue, ...he } = K;
737
+ return k(dt, { ref: ue, ...he, disableInteractive: !0, children: te });
738
+ }, []), ce = o || b, d = ce && (y?.tooltip || y?.createTooltip), g = (K) => {
739
+ const { tooltip: te, createTooltip: ue, sx: he, ...Le } = K;
740
+ let Ce = k(Ze, { sx: { ...he }, component: "div", ...Le });
741
+ return d && (Ce = (ue ?? le)({ title: M ? "" : te ?? v, children: k("div", { children: Ce }) }, M)), Ce;
742
+ }, C = { onKeyDown: (K) => {
743
+ K.keyCode === Pe.Space ? se() : K.keyCode === Pe.F4 || K.keyCode === Pe.Down ? Q.reference.open(0) : K.keyCode === Pe.Up && Q.reference.close(0);
744
+ } };
745
+ let F = k(Je, {});
746
+ const _ = Z(() => typeof h == "function" ? h() : h, [h]);
747
+ if (ce) {
748
+ let K = M ? ee.openQuickButtonStyling : ee.quickButtonStyling;
749
+ const te = (b || g)({ tabIndex: -1, disabled: p, size: "small", edge: "end", onMouseEnter: () => {
750
+ Q.reference.parent.closeChild();
751
+ }, onMouseDown: (he) => {
752
+ he.button === 0 && (he.preventDefault(), re(he));
753
+ }, touchRippleRef: E, children: _, ...y, className: Oe({ "Mui-focusVisible": A || M, "Mui-selected": a, "Mui-hovered": B || M, "Mui-disabled": p, bordered: !0, left: !0, "hard-right": !0 }, y?.className), sx: { ...ee.quickButtonStyling, height: "100%", ...y?.sx } });
754
+ let ue = Vn(!0, n, M);
755
+ d && (ue = (m ?? le)({ title: M ? "" : v, children: ue }, M)), F = J(Je, { children: [te, k(Ze, { ref: G, component: "div", className: Oe({ "Mui-selected": M, "Mui-hovered": B || M, "Mui-disabled": p, "Mui-focusVisible": A || M, bordered: !0, right: !0, divider: !0 }), sx: { paddingLeft: (n ? 0 : 2) + "px", paddingRight: (n ? 0 : 2) + "px", width: () => "calc(var(--icon-size, 1.25em) * 0.8)", ...ee.quickButtonStyling, ...K }, TouchRippleProps: { center: !1 }, tabIndex: -1, disabled: p, size: "small", edge: "end", onMouseDown: (he) => {
756
+ he.button === 0 && (he.preventDefault(), se());
757
+ }, children: ue })] });
758
+ } else {
759
+ let K = M ? ee.openCompoundStyling : ee.compoundStyling;
760
+ F = k(Wt, { ref: G, tabIndex: -1, disabled: p, size: "small", icon: _, className: Oe({ "Mui-selected": M || a, "Mui-hovered": B, "Mui-disabled": p, "Mui-focusVisible": A || M, bordered: !0, left: !0, right: !0 }), sx: { ...ee.quickButtonStyling, ...K }, onMouseDown: (te) => {
761
+ te.button === 0 && (te.preventDefault(), se());
762
+ }, children: Vn(!1, n, M) });
763
+ }
764
+ const { className: N, sx: j, ...H } = u;
765
+ let U = k(X, { onFocus: () => V(!0), onBlur: () => V(!1), onMouseOver: () => z(!0), onMouseOut: () => z(!1), ...C, "aria-label": "split button", ref: ie, tabIndex: p ? void 0 : 0, className: Oe(N, "split-button-root", { "Mui-focusVisible": A || M, "Mui-selected": M || a, "Mui-hovered": B, "Mui-disabled": p }), sx: { display: "flex", flex: "1 1 100%", alignItems: "stretch", width: "fit-content", "&:not(.Mui-disabled)": { cursor: "pointer" }, marginLeft: t ? "1px" : "0px", marginRight: t ? "1px" : "0px", borderRadius: (K) => `${K.shape.borderRadius}px`, "&.Mui-focusVisible": { outline: (K) => `solid ${K.palette.primary.main} 1px`, zIndex: 2 }, ...j }, ...H, children: F });
766
+ return d || (U = (m ?? le)({ title: M ? "" : v, children: U }, M)), J(X, { className: Oe(R, "popupIconButton"), ref: r, ...S, sx: { zIndex: A || M ? 2 : void 0, display: "flex", alignItems: "center", ...O }, children: [U, Q.component] });
767
+ }));
768
+ mn.displayName = "ExhibitPopupIconButton";
769
+ const Ni = {}, Zr = oe(de((e, r) => {
770
+ const { selected: n = !1, label: t, onQuickClick: s, parentFloat: a, createPopupPanel: o, popupProps: l = Ni, onPopupOpen: i, onPopupClose: c, quickButtonProps: f, createQuickButton: x, tooltip: y = "", createTooltip: b, icon: v, disabled: m, touchRippleRef: h, primary: p, children: u, sx: w, ...E } = e, [T, L] = ne(!1), [O, R] = ne(!1), [S, D] = ne(!1), [P, M] = ne(!1), I = ge(null), A = ge(null), V = Z(() => {
771
+ if (!l) return;
772
+ const { popperProps: d } = l;
773
+ return { placement: "right-start", offsets: [-4, -2], ...d };
774
+ }, [l]), B = zt({ anchor: I.current, label: t, createPopupPanel: o, parentFloat: a, popperProps: V, onClose: () => {
775
+ L(!1), c?.();
776
+ }, onOpen: () => {
777
+ L(!0), i?.();
778
+ } }), z = ae((d) => {
779
+ d.button === 0 && (s?.(d), B.reference.close(0));
780
+ }, [s]), ie = k(xi, {}), G = { "&.Mui-selected": { color: (d) => d.palette.text.primary, "& svg * ": { color: (d) => d.palette.text.primary } } }, Q = _e((d) => {
781
+ const { children: g, ref: C, ...F } = d;
782
+ return k(dt, { ref: C, ...F, disableInteractive: !0, children: g });
783
+ }, []), re = s || x, se = (d) => {
784
+ const { tooltip: g, createTooltip: C, ...F } = d;
785
+ return k(Ot, { icon: v, className: Oe({ "Mui-hovered": S }), sx: { flex: "1 1 100%", ...G }, ...F, children: t });
786
+ }, ee = { onFocus: () => {
787
+ R(!0);
788
+ }, onBlur: () => R(!1), onMouseOver: () => {
789
+ D(!0);
790
+ }, onMouseLeave: () => {
791
+ D(!1);
792
+ }, onMouseEnter: () => {
793
+ B.reference.open();
794
+ }, onMouseDown: (d) => {
795
+ d.button === 0 && d.preventDefault();
796
+ } };
797
+ let le = k(Je, {});
798
+ if (re) {
799
+ const d = (x || se)({ tabIndex: -1, disabled: m, onMouseEnter: () => {
800
+ B.reference.parent.closeChild();
801
+ }, onMouseDown: (g) => {
802
+ g.button === 0 && (g.preventDefault(), z(g));
803
+ }, className: Oe("quick-left", {}, f?.className), ...f });
804
+ le = J(Je, { children: [d, k(Er, { sx: { ml: "0px", mr: "0px" }, orientation: "vertical", variant: "middle", flexItem: !0 }), k(Mr, { ref: A, className: Oe({ "Mui-selected": T, "Mui-hovered": S }), sx: { borderTopLeftRadius: "0px", borderBottomLeftRadius: "0px", paddingLeft: "0px", paddingRight: "0px", marginLeft: "0px", color: (g) => p ? void 0 : g.palette.text.secondary, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (g) => g.palette.text.primary }, ...G }, tabIndex: -1, disabled: m, ...ee, children: k(X, { className: "expand-icon", sx: { flex: "none", display: "flex", border: "1px solid transparent", paddingTop: "1px", paddingBottom: "1px", color: (g) => p ? void 0 : g.palette.text.icon ?? g.palette.action.active }, onMouseOver: (g) => {
805
+ g.preventDefault(), M(!0);
806
+ }, onMouseLeave: () => {
807
+ M(!1);
808
+ }, onClick: (g) => {
809
+ g.preventDefault(), T ? B.reference.close() : B.reference.open();
810
+ }, children: ie }) })] });
811
+ } else le = J(Ot, { ref: A, tabIndex: -1, disabled: m, icon: v, className: Oe({ "Mui-selected": T || n, "Mui-hovered": S }), sx: { flex: "1 1 100%", paddingRight: "0px", ...G }, onClick: (d) => {
812
+ d.preventDefault(), T ? B.reference.close() : B.reference.open();
813
+ }, ...ee, children: [k("div", { style: { flex: "1 1 100%" }, children: t }), k(X, { className: "expand-icon", sx: { flex: "none", display: "flex", color: (d) => p ? void 0 : d.palette.text.icon ?? d.palette.action.active }, children: ie })] });
814
+ let ce = k(X, { "aria-label": "split button", ref: I, tabIndex: m ? void 0 : 0, className: Oe({ "Mui-disabled": m, "Mui-selected": T, "Mui-focusVisible": O || T, "Mui-hovered": S }), sx: { display: "flex", flex: "1 1 100%", alignItems: "center", width: "fit-content", "& .quick-left": { borderTopRightRadius: "0px", borderBottomRightRadius: "0px", marginRight: "-1px" }, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)" }, ...w }, ...E, children: le });
815
+ return re && !P && (f?.tooltip || f?.createTooltip) && (ce = (f?.createTooltip ?? Q)({ title: T ? "" : ce ?? f?.tooltip, children: ce }, T)), J(X, { ref: r, sx: { zIndex: O || T ? 2 : void 0, display: "flex", " .tooltip-wrapper": { display: "flex", flex: "1 1 100%" } }, children: [ce, B.component] });
816
+ })), ws = oe(de((e, r) => {
817
+ const { onSelectToggle: n, selected: t = !1, label: s, shortcut: a, tabIndex: o = 0, preventFocus: l = !1, ...i } = e;
818
+ return k(pt, { label: s, shortcut: a, children: k(Wt, { ref: r, outlined: !1, tabIndex: o, selected: t, onMouseDown: (c) => {
819
+ l && c.preventDefault();
820
+ }, onClick: () => {
821
+ n?.(!t);
822
+ }, ...i }) });
823
+ })), Fi = k(be, {}), _i = k(be, { iconKey: "Check" }), Ai = oe(de((e, r) => {
824
+ const { children: n, selected: t = !0, outlined: s = !0, sx: a, ...o } = e;
825
+ let l = n;
826
+ return l === null && (l = Fi), l || (l = _i), k(X, { ref: r, sx: { display: "flex", border: (i) => t ? `solid ${s ? i.palette.divider : "transparent"} 1px` : "solid transparent 1px", borderRadius: (i) => `${i.shape.borderRadius}px`, backgroundColor: (i) => {
827
+ if (t) return me(i.palette.text.icon ?? i.palette.action.active, i.palette.action.selectedOpacity);
828
+ }, ...a }, ...o, children: l });
829
+ }));
830
+ function Ee() {
831
+ return Ee = Object.assign ? Object.assign.bind() : function(e) {
832
+ for (var r = 1; r < arguments.length; r++) {
833
+ var n = arguments[r];
834
+ for (var t in n) ({}).hasOwnProperty.call(n, t) && (e[t] = n[t]);
835
+ }
836
+ return e;
837
+ }, Ee.apply(null, arguments);
838
+ }
839
+ function eo(e, r) {
840
+ if (e == null) return {};
841
+ var n = {};
842
+ for (var t in e) if ({}.hasOwnProperty.call(e, t)) {
843
+ if (r.indexOf(t) !== -1) continue;
844
+ n[t] = e[t];
845
+ }
846
+ return n;
847
+ }
848
+ var Ie, Ii = { state: {}, updateModal: function() {
849
+ }, hideModal: function() {
850
+ }, destroyModal: function() {
851
+ }, destroyModalsByRootId: function() {
852
+ }, showModal: function() {
853
+ return { id: "id", hide: function() {
854
+ }, destroy: function() {
855
+ }, update: function() {
856
+ } };
857
+ } }, to = Ro(void 0);
858
+ (function(e) {
859
+ e.SHOW = "SHOW", e.HIDE = "HIDE", e.UPDATE = "UPDATE", e.DESTROY = "DESTROY", e.DESTROY_BY_ROOT_ID = "DESTROY_BY_ROOT_ID", e.UNKNOWN = "UNKNOWN";
860
+ })(Ie || (Ie = {}));
861
+ var Vi = {};
862
+ function Li(e, r) {
863
+ switch (r.type) {
864
+ case Ie.SHOW:
865
+ var n, t = r.payload, s = t.id, a = t.component, o = t.props, l = t.options;
866
+ return Ee({}, e, ((n = {})[s] = { component: a, props: Ee({}, o, { open: !0 }), options: l }, n));
867
+ case Ie.HIDE:
868
+ var i, c = r.payload.id;
869
+ return e[c] ? Ee({}, e, ((i = {})[c] = Ee({}, e[c], { props: Ee({}, e[c].props, { open: !1 }) }), i)) : e;
870
+ case Ie.UPDATE:
871
+ var f, x = r.payload, y = x.id, b = x.props;
872
+ return e[y] ? Ee({}, e, ((f = {})[y] = Ee({}, e[y], { props: Ee({}, e[y].props, b) }), f)) : e;
873
+ case Ie.DESTROY:
874
+ var v = r.payload.id, m = Ee({}, e);
875
+ return delete m[v], m;
876
+ case Ie.DESTROY_BY_ROOT_ID:
877
+ var h = r.payload.rootId;
878
+ return Object.keys(e).filter(function(p) {
879
+ return p.split(".")[0] !== h;
880
+ }).reduce(function(p, u) {
881
+ var w;
882
+ return Ee({}, p, ((w = {})[u] = e[u], w));
883
+ }, {});
884
+ default:
885
+ throw new Error("Unexpected action");
886
+ }
887
+ }
888
+ var qt = "[ERROR]: Modal ID is missing", no = function(e) {
889
+ e === void 0 && (e = 8);
890
+ for (var r = [], n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", t = 0; t < e; t++) r[t] = n.charAt(Math.floor(62 * Math.random()));
891
+ return r.join("");
892
+ }, Bi = ["open"];
893
+ function ks(e) {
894
+ var r = e.children, n = e.legacy, t = n !== void 0 && n, s = e.suspense, a = s === void 0 || s, o = e.fallback, l = o === void 0 ? null : o, i = q.useReducer(Li, Vi), c = i[0], f = i[1], x = q.useCallback(function(p, u) {
895
+ var w = eo(u, Bi);
896
+ p ? f({ type: Ie.UPDATE, payload: { id: p, props: w } }) : console.error(qt);
897
+ }, [f]), y = q.useCallback(function(p) {
898
+ p ? f({ type: Ie.HIDE, payload: { id: p } }) : console.error(qt);
899
+ }, [f]), b = q.useCallback(function(p) {
900
+ p ? f({ type: Ie.DESTROY, payload: { id: p } }) : console.error(qt);
901
+ }, [f]), v = q.useCallback(function(p) {
902
+ p ? f({ type: Ie.DESTROY_BY_ROOT_ID, payload: { rootId: p } }) : console.error("[ERROR]: Modal root ID is missing");
903
+ }, [f]), m = q.useCallback(function(p, u, w) {
904
+ var E = no(8);
905
+ return w && w.rootId && (E = w.rootId + "." + E), f({ type: Ie.SHOW, payload: { id: E, component: p, props: u, options: w } }), { id: E, hide: function() {
906
+ return y(E);
907
+ }, destroy: function() {
908
+ return b(E);
909
+ }, update: function(T) {
910
+ return x(E, T);
911
+ } };
912
+ }, [f, y, b, x]), h = a ? No : Fo;
913
+ return q.createElement(to.Provider, { value: { state: c, updateModal: x, hideModal: y, destroyModal: b, showModal: m, destroyModalsByRootId: v } }, r, q.createElement(h, Object.assign({}, a && { fallback: l }), Object.keys(c).map(function(p) {
914
+ var u = c[p], w = u.component, E = u.props, T = u.options, L = function() {
915
+ var R, S;
916
+ E != null && E.onExited && E.onExited.apply(E, arguments), E != null && (R = E.TransitionProps) != null && R.onExited && (S = E.TransitionProps).onExited.apply(S, arguments), b(p);
917
+ }, O = {};
918
+ return O = t ? { onExited: L } : { TransitionProps: Ee({}, E?.TransitionProps, { onExited: L }) }, q.createElement(w, Object.assign({}, E, { key: p, onClose: function() {
919
+ T && T.hideOnClose && y(p), T && T.destroyOnClose && T.hideOnClose && b(p), E && E.onClose && E.onClose.apply(E, arguments);
920
+ } }, T && !T.destroyOnClose && O));
921
+ })));
922
+ }
923
+ var ro = { enforceProvider: !1 };
924
+ function Ss(e) {
925
+ Object.assign(ro, e);
926
+ }
927
+ function ji() {
928
+ return ro;
929
+ }
930
+ var $i = ["showModal", "destroyModalsByRootId"], Bn = { disableAutoDestroy: !1 };
931
+ function gn(e) {
932
+ e === void 0 && (e = Bn);
933
+ var r = Ee({}, Bn, e).disableAutoDestroy, n = (function() {
934
+ var l = _o(to);
935
+ if (ji().enforceProvider && l === void 0) throw new Error("useModalContext must be used within a ModalProvider");
936
+ return l || Ii;
937
+ })(), t = n.showModal, s = n.destroyModalsByRootId, a = eo(n, $i), o = ge(no(6));
938
+ return Se(function() {
939
+ return function() {
940
+ !r && s && s(o.current);
941
+ };
942
+ }, [r, s]), Ee({ showModal: _e(function(l, i, c) {
943
+ return t(l, i, Ee({ rootId: o.current, hideOnClose: !0 }, c));
944
+ }, [t]), destroyModalsByRootId: s }, a);
945
+ }
946
+ function Ds(e) {
947
+ const [r, n] = ne(() => /* @__PURE__ */ new Map()), { showModal: t, updateModal: s, destroyModal: a, hideModal: o } = gn({ disableAutoDestroy: !0 });
948
+ return (l, i, c, f) => new Promise((x, y) => {
949
+ const b = { ...e, ...c, onHide: () => {
950
+ const p = r.get(l);
951
+ c?.onHide?.(), n((u) => (u.delete(l), u)), o(p.id);
952
+ }, onDone: (p) => {
953
+ const u = r.get(l);
954
+ n((w) => (w.delete(l), w)), c?.onDone?.(p), u && u.id && !f?.disableAutoDestroy && a(u.id);
955
+ }, onShown: (p) => {
956
+ n((u) => {
957
+ const w = u.get(l);
958
+ return u.set(l, { ...w, element: p }), u;
959
+ }), x(p);
960
+ }, open: !0 }, v = r.get(l);
961
+ if (v) return s(v.id, b), void x(v.element);
962
+ if (!i) return void y("invalid function");
963
+ const m = q.lazy(i), h = t(m, b, { destroyOnClose: !f?.disableAutoDestroy });
964
+ n((p) => (p.set(l, { id: h.id, element: null }), p));
965
+ });
966
+ }
967
+ var jn, $n, zn, Wn, Hn, Un = { exports: {} };
968
+ function zi() {
969
+ return $n ? jn : ($n = 1, jn = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
970
+ }
971
+ function Wi() {
972
+ if (Wn) return zn;
973
+ Wn = 1;
974
+ var e = zi();
975
+ function r() {
976
+ }
977
+ function n() {
978
+ }
979
+ return n.resetWarningCache = r, zn = function() {
980
+ function t(o, l, i, c, f, x) {
981
+ if (x !== e) {
982
+ var y = new 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");
983
+ throw y.name = "Invariant Violation", y;
984
+ }
985
+ }
986
+ function s() {
987
+ return t;
988
+ }
989
+ t.isRequired = t;
990
+ var a = { array: t, bigint: t, bool: t, func: t, number: t, object: t, string: t, symbol: t, any: t, arrayOf: s, element: t, elementType: t, instanceOf: s, node: t, objectOf: s, oneOf: s, oneOfType: s, shape: s, exact: s, checkPropTypes: n, resetWarningCache: r };
991
+ return a.PropTypes = a, a;
992
+ };
993
+ }
994
+ function yn() {
995
+ return Hn || (Hn = 1, Un.exports = Wi()()), Un.exports;
996
+ }
997
+ var oo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], It = oo.join(","), io = typeof Element > "u", rt = io ? function() {
998
+ } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Ft = !io && Element.prototype.getRootNode ? function(e) {
999
+ var r;
1000
+ return e == null || (r = e.getRootNode) === null || r === void 0 ? void 0 : r.call(e);
1001
+ } : function(e) {
1002
+ return e?.ownerDocument;
1003
+ }, Vt = function e(r, n) {
1004
+ var t;
1005
+ n === void 0 && (n = !0);
1006
+ var s = r == null || (t = r.getAttribute) === null || t === void 0 ? void 0 : t.call(r, "inert");
1007
+ return s === "" || s === "true" || n && r && e(r.parentNode);
1008
+ }, ao = function(e, r, n) {
1009
+ if (Vt(e)) return [];
1010
+ var t = Array.prototype.slice.apply(e.querySelectorAll(It));
1011
+ return r && rt.call(e, It) && t.unshift(e), t = t.filter(n);
1012
+ }, so = function e(r, n, t) {
1013
+ for (var s = [], a = Array.from(r); a.length; ) {
1014
+ var o = a.shift();
1015
+ if (!Vt(o, !1)) if (o.tagName === "SLOT") {
1016
+ var l = o.assignedElements(), i = e(l.length ? l : o.children, !0, t);
1017
+ t.flatten ? s.push.apply(s, i) : s.push({ scopeParent: o, candidates: i });
1018
+ } else {
1019
+ rt.call(o, It) && t.filter(o) && (n || !r.includes(o)) && s.push(o);
1020
+ var c = o.shadowRoot || typeof t.getShadowRoot == "function" && t.getShadowRoot(o), f = !Vt(c, !1) && (!t.shadowRootFilter || t.shadowRootFilter(o));
1021
+ if (c && f) {
1022
+ var x = e(c === !0 ? o.children : c.children, !0, t);
1023
+ t.flatten ? s.push.apply(s, x) : s.push({ scopeParent: o, candidates: x });
1024
+ } else a.unshift.apply(a, o.children);
1025
+ }
1026
+ }
1027
+ return s;
1028
+ }, lo = function(e) {
1029
+ return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
1030
+ }, Ke = function(e) {
1031
+ if (!e) throw new Error("No node provided");
1032
+ return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || (function(r) {
1033
+ var n, t = r == null || (n = r.getAttribute) === null || n === void 0 ? void 0 : n.call(r, "contenteditable");
1034
+ return t === "" || t === "true";
1035
+ })(e)) && !lo(e) ? 0 : e.tabIndex;
1036
+ }, Hi = function(e, r) {
1037
+ return e.tabIndex === r.tabIndex ? e.documentOrder - r.documentOrder : e.tabIndex - r.tabIndex;
1038
+ }, co = function(e) {
1039
+ return e.tagName === "INPUT";
1040
+ }, Ui = function(e) {
1041
+ return (function(r) {
1042
+ return co(r) && r.type === "radio";
1043
+ })(e) && !(function(r) {
1044
+ if (!r.name) return !0;
1045
+ var n, t = r.form || Ft(r), s = function(o) {
1046
+ return t.querySelectorAll('input[type="radio"][name="' + o + '"]');
1047
+ };
1048
+ if (typeof window < "u" && window.CSS !== void 0 && typeof window.CSS.escape == "function") n = s(window.CSS.escape(r.name));
1049
+ else try {
1050
+ n = s(r.name);
1051
+ } catch (o) {
1052
+ return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", o.message), !1;
1053
+ }
1054
+ var a = (function(o, l) {
1055
+ for (var i = 0; i < o.length; i++) if (o[i].checked && o[i].form === l) return o[i];
1056
+ })(n, r.form);
1057
+ return !a || a === r;
1058
+ })(e);
1059
+ }, Yn = function(e) {
1060
+ var r = e.getBoundingClientRect(), n = r.width, t = r.height;
1061
+ return n === 0 && t === 0;
1062
+ }, Yi = function(e, r) {
1063
+ var n = r.displayCheck, t = r.getShadowRoot;
1064
+ if (getComputedStyle(e).visibility === "hidden") return !0;
1065
+ var s = rt.call(e, "details>summary:first-of-type") ? e.parentElement : e;
1066
+ if (rt.call(s, "details:not([open]) *")) return !0;
1067
+ if (n && n !== "full" && n !== "legacy-full") {
1068
+ if (n === "non-zero-area") return Yn(e);
1069
+ } else {
1070
+ if (typeof t == "function") {
1071
+ for (var a = e; e; ) {
1072
+ var o = e.parentElement, l = Ft(e);
1073
+ if (o && !o.shadowRoot && t(o) === !0) return Yn(e);
1074
+ e = e.assignedSlot ? e.assignedSlot : o || l === e.ownerDocument ? o : l.host;
1075
+ }
1076
+ e = a;
1077
+ }
1078
+ if ((function(i) {
1079
+ var c, f, x, y, b = i && Ft(i), v = (c = b) === null || c === void 0 ? void 0 : c.host, m = !1;
1080
+ if (b && b !== i) for (m = !!((f = v) !== null && f !== void 0 && (x = f.ownerDocument) !== null && x !== void 0 && x.contains(v) || i != null && (y = i.ownerDocument) !== null && y !== void 0 && y.contains(i)); !m && v; ) {
1081
+ var h, p, u;
1082
+ m = !((p = v = (h = b = Ft(v)) === null || h === void 0 ? void 0 : h.host) === null || p === void 0 || (u = p.ownerDocument) === null || u === void 0 || !u.contains(v));
1083
+ }
1084
+ return m;
1085
+ })(e)) return !e.getClientRects().length;
1086
+ if (n !== "legacy-full") return !0;
1087
+ }
1088
+ return !1;
1089
+ }, Lt = function(e, r) {
1090
+ return !(r.disabled || Vt(r) || (function(n) {
1091
+ return co(n) && n.type === "hidden";
1092
+ })(r) || Yi(r, e) || (function(n) {
1093
+ return n.tagName === "DETAILS" && Array.prototype.slice.apply(n.children).some(function(t) {
1094
+ return t.tagName === "SUMMARY";
1095
+ });
1096
+ })(r) || (function(n) {
1097
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName)) for (var t = n.parentElement; t; ) {
1098
+ if (t.tagName === "FIELDSET" && t.disabled) {
1099
+ for (var s = 0; s < t.children.length; s++) {
1100
+ var a = t.children.item(s);
1101
+ if (a.tagName === "LEGEND") return !!rt.call(t, "fieldset[disabled] *") || !a.contains(n);
1102
+ }
1103
+ return !0;
1104
+ }
1105
+ t = t.parentElement;
1106
+ }
1107
+ return !1;
1108
+ })(r));
1109
+ }, rn = function(e, r) {
1110
+ return !(Ui(r) || Ke(r) < 0 || !Lt(e, r));
1111
+ }, Gi = function(e) {
1112
+ var r = parseInt(e.getAttribute("tabindex"), 10);
1113
+ return !!(isNaN(r) || r >= 0);
1114
+ }, Xi = function e(r) {
1115
+ var n = [], t = [];
1116
+ return r.forEach(function(s, a) {
1117
+ var o = !!s.scopeParent, l = o ? s.scopeParent : s, i = (function(f, x) {
1118
+ var y = Ke(f);
1119
+ return y < 0 && x && !lo(f) ? 0 : y;
1120
+ })(l, o), c = o ? e(s.candidates) : l;
1121
+ i === 0 ? o ? n.push.apply(n, c) : n.push(l) : t.push({ documentOrder: a, tabIndex: i, item: s, isScope: o, content: c });
1122
+ }), t.sort(Hi).reduce(function(s, a) {
1123
+ return a.isScope ? s.push.apply(s, a.content) : s.push(a.content), s;
1124
+ }, []).concat(n);
1125
+ }, uo = function(e, r) {
1126
+ var n;
1127
+ return n = (r = r || {}).getShadowRoot ? so([e], r.includeContainer, { filter: rn.bind(null, r), flatten: !1, getShadowRoot: r.getShadowRoot, shadowRootFilter: Gi }) : ao(e, r.includeContainer, rn.bind(null, r)), Xi(n);
1128
+ }, po = function(e, r) {
1129
+ return (r = r || {}).getShadowRoot ? so([e], r.includeContainer, { filter: Lt.bind(null, r), flatten: !0, getShadowRoot: r.getShadowRoot }) : ao(e, r.includeContainer, Lt.bind(null, r));
1130
+ }, et = function(e, r) {
1131
+ if (r = r || {}, !e) throw new Error("No node provided");
1132
+ return rt.call(e, It) !== !1 && rn(r, e);
1133
+ }, Ki = oo.concat("iframe").join(","), _t = function(e, r) {
1134
+ if (r = r || {}, !e) throw new Error("No node provided");
1135
+ return rt.call(e, Ki) !== !1 && Lt(r, e);
1136
+ };
1137
+ const qi = Object.freeze(Object.defineProperty({ __proto__: null, focusable: po, getTabIndex: Ke, isFocusable: _t, isTabbable: et, tabbable: uo }, Symbol.toStringTag, { value: "Module" }));
1138
+ function Qt(e, r) {
1139
+ (r == null || r > e.length) && (r = e.length);
1140
+ for (var n = 0, t = Array(r); n < r; n++) t[n] = e[n];
1141
+ return t;
1142
+ }
1143
+ function Qi(e, r, n) {
1144
+ return (r = (function(t) {
1145
+ var s = (function(a, o) {
1146
+ if (typeof a != "object" || !a) return a;
1147
+ var l = a[Symbol.toPrimitive];
1148
+ if (l !== void 0) {
1149
+ var i = l.call(a, o);
1150
+ if (typeof i != "object") return i;
1151
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1152
+ }
1153
+ return (o === "string" ? String : Number)(a);
1154
+ })(t, "string");
1155
+ return typeof s == "symbol" ? s : s + "";
1156
+ })(r)) in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
1157
+ }
1158
+ function Gn(e, r) {
1159
+ var n = Object.keys(e);
1160
+ if (Object.getOwnPropertySymbols) {
1161
+ var t = Object.getOwnPropertySymbols(e);
1162
+ r && (t = t.filter(function(s) {
1163
+ return Object.getOwnPropertyDescriptor(e, s).enumerable;
1164
+ })), n.push.apply(n, t);
1165
+ }
1166
+ return n;
1167
+ }
1168
+ function Xn(e) {
1169
+ for (var r = 1; r < arguments.length; r++) {
1170
+ var n = arguments[r] != null ? arguments[r] : {};
1171
+ r % 2 ? Gn(Object(n), !0).forEach(function(t) {
1172
+ Qi(e, t, n[t]);
1173
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Gn(Object(n)).forEach(function(t) {
1174
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
1175
+ });
1176
+ }
1177
+ return e;
1178
+ }
1179
+ function Ji(e) {
1180
+ return (function(r) {
1181
+ if (Array.isArray(r)) return Qt(r);
1182
+ })(e) || (function(r) {
1183
+ if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
1184
+ })(e) || (function(r, n) {
1185
+ if (r) {
1186
+ if (typeof r == "string") return Qt(r, n);
1187
+ var t = {}.toString.call(r).slice(8, -1);
1188
+ return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Qt(r, n) : void 0;
1189
+ }
1190
+ })(e) || (function() {
1191
+ throw new TypeError(`Invalid attempt to spread non-iterable instance.
1192
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1193
+ })();
1194
+ }
1195
+ var Zi = function(e, r) {
1196
+ if (e.length > 0) {
1197
+ var n = e[e.length - 1];
1198
+ n !== r && n._setPausedState(!0);
1199
+ }
1200
+ var t = e.indexOf(r);
1201
+ t === -1 || e.splice(t, 1), e.push(r);
1202
+ }, ea = function(e, r) {
1203
+ var n = e.indexOf(r);
1204
+ n !== -1 && e.splice(n, 1), e.length > 0 && !e[e.length - 1]._isManuallyPaused() && e[e.length - 1]._setPausedState(!1);
1205
+ }, kt = function(e) {
1206
+ return e?.key === "Tab" || e?.keyCode === 9;
1207
+ }, ta = function(e) {
1208
+ return kt(e) && !e.shiftKey;
1209
+ }, na = function(e) {
1210
+ return kt(e) && e.shiftKey;
1211
+ }, Kn = function(e) {
1212
+ return setTimeout(e, 0);
1213
+ }, gt = function(e) {
1214
+ for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), t = 1; t < r; t++) n[t - 1] = arguments[t];
1215
+ return typeof e == "function" ? e.apply(void 0, n) : e;
1216
+ }, Tt = function(e) {
1217
+ return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
1218
+ }, ra = [];
1219
+ const oa = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTrap: function(e, r) {
1220
+ var n, t = r?.document || document, s = r?.trapStack || ra, a = Xn({ returnFocusOnDeactivate: !0, escapeDeactivates: !0, delayInitialFocus: !0, isKeyForward: ta, isKeyBackward: na }, r), o = { containers: [], containerGroups: [], tabbableGroups: [], nodeFocusedBeforeActivation: null, mostRecentlyFocusedNode: null, active: !1, paused: !1, manuallyPaused: !1, delayInitialFocusTimer: void 0, recentNavEvent: void 0 }, l = function(S, D, P) {
1221
+ return S && S[D] !== void 0 ? S[D] : a[P || D];
1222
+ }, i = function(S, D) {
1223
+ var P = typeof D?.composedPath == "function" ? D.composedPath() : void 0;
1224
+ return o.containerGroups.findIndex(function(M) {
1225
+ var I = M.container, A = M.tabbableNodes;
1226
+ return I.contains(S) || P?.includes(I) || A.find(function(V) {
1227
+ return V === S;
1228
+ });
1229
+ });
1230
+ }, c = function(S) {
1231
+ var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, P = D.hasFallback, M = P !== void 0 && P, I = D.params, A = I === void 0 ? [] : I, V = a[S];
1232
+ if (typeof V == "function" && (V = V.apply(void 0, Ji(A))), V === !0 && (V = void 0), !V) {
1233
+ if (V === void 0 || V === !1) return V;
1234
+ throw new Error("`".concat(S, "` was specified but was not a node, or did not return a node"));
1235
+ }
1236
+ var B = V;
1237
+ if (typeof V == "string") {
1238
+ try {
1239
+ B = t.querySelector(V);
1240
+ } catch (z) {
1241
+ throw new Error("`".concat(S, '` appears to be an invalid selector; error="').concat(z.message, '"'));
1242
+ }
1243
+ if (!B && !M) throw new Error("`".concat(S, "` as selector refers to no known node"));
1244
+ }
1245
+ return B;
1246
+ }, f = function() {
1247
+ var S = c("initialFocus", { hasFallback: !0 });
1248
+ if (S === !1) return !1;
1249
+ if (S === void 0 || S && !_t(S, a.tabbableOptions)) if (i(t.activeElement) >= 0) S = t.activeElement;
1250
+ else {
1251
+ var D = o.tabbableGroups[0];
1252
+ S = D && D.firstTabbableNode || c("fallbackFocus");
1253
+ }
1254
+ else S === null && (S = c("fallbackFocus"));
1255
+ if (!S) throw new Error("Your focus-trap needs to have at least one focusable element");
1256
+ return S;
1257
+ }, x = function() {
1258
+ if (o.containerGroups = o.containers.map(function(S) {
1259
+ var D = uo(S, a.tabbableOptions), P = po(S, a.tabbableOptions), M = D.length > 0 ? D[0] : void 0, I = D.length > 0 ? D[D.length - 1] : void 0, A = P.find(function(z) {
1260
+ return et(z);
1261
+ }), V = P.slice().reverse().find(function(z) {
1262
+ return et(z);
1263
+ }), B = !!D.find(function(z) {
1264
+ return Ke(z) > 0;
1265
+ });
1266
+ return { container: S, tabbableNodes: D, focusableNodes: P, posTabIndexesFound: B, firstTabbableNode: M, lastTabbableNode: I, firstDomTabbableNode: A, lastDomTabbableNode: V, nextTabbableNode: function(z) {
1267
+ var ie = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], G = D.indexOf(z);
1268
+ return G < 0 ? ie ? P.slice(P.indexOf(z) + 1).find(function(Q) {
1269
+ return et(Q);
1270
+ }) : P.slice(0, P.indexOf(z)).reverse().find(function(Q) {
1271
+ return et(Q);
1272
+ }) : D[G + (ie ? 1 : -1)];
1273
+ } };
1274
+ }), o.tabbableGroups = o.containerGroups.filter(function(S) {
1275
+ return S.tabbableNodes.length > 0;
1276
+ }), o.tabbableGroups.length <= 0 && !c("fallbackFocus")) throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
1277
+ if (o.containerGroups.find(function(S) {
1278
+ return S.posTabIndexesFound;
1279
+ }) && o.containerGroups.length > 1) throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
1280
+ }, y = function(S) {
1281
+ var D = S.activeElement;
1282
+ if (D) return D.shadowRoot && D.shadowRoot.activeElement !== null ? y(D.shadowRoot) : D;
1283
+ }, b = function(S) {
1284
+ S !== !1 && S !== y(document) && (S && S.focus ? (S.focus({ preventScroll: !!a.preventScroll }), o.mostRecentlyFocusedNode = S, (function(D) {
1285
+ return D.tagName && D.tagName.toLowerCase() === "input" && typeof D.select == "function";
1286
+ })(S) && S.select()) : b(f()));
1287
+ }, v = function(S) {
1288
+ var D = c("setReturnFocus", { params: [S] });
1289
+ return D || D !== !1 && S;
1290
+ }, m = function(S) {
1291
+ var D = S.target, P = S.event, M = S.isBackward, I = M !== void 0 && M;
1292
+ D = D || Tt(P), x();
1293
+ var A = null;
1294
+ if (o.tabbableGroups.length > 0) {
1295
+ var V = i(D, P), B = V >= 0 ? o.containerGroups[V] : void 0;
1296
+ if (V < 0) A = I ? o.tabbableGroups[o.tabbableGroups.length - 1].lastTabbableNode : o.tabbableGroups[0].firstTabbableNode;
1297
+ else if (I) {
1298
+ var z = o.tabbableGroups.findIndex(function(ee) {
1299
+ var le = ee.firstTabbableNode;
1300
+ return D === le;
1301
+ });
1302
+ if (z < 0 && (B.container === D || _t(D, a.tabbableOptions) && !et(D, a.tabbableOptions) && !B.nextTabbableNode(D, !1)) && (z = V), z >= 0) {
1303
+ var ie = z === 0 ? o.tabbableGroups.length - 1 : z - 1, G = o.tabbableGroups[ie];
1304
+ A = Ke(D) >= 0 ? G.lastTabbableNode : G.lastDomTabbableNode;
1305
+ } else kt(P) || (A = B.nextTabbableNode(D, !1));
1306
+ } else {
1307
+ var Q = o.tabbableGroups.findIndex(function(ee) {
1308
+ var le = ee.lastTabbableNode;
1309
+ return D === le;
1310
+ });
1311
+ if (Q < 0 && (B.container === D || _t(D, a.tabbableOptions) && !et(D, a.tabbableOptions) && !B.nextTabbableNode(D)) && (Q = V), Q >= 0) {
1312
+ var re = Q === o.tabbableGroups.length - 1 ? 0 : Q + 1, se = o.tabbableGroups[re];
1313
+ A = Ke(D) >= 0 ? se.firstTabbableNode : se.firstDomTabbableNode;
1314
+ } else kt(P) || (A = B.nextTabbableNode(D));
1315
+ }
1316
+ } else A = c("fallbackFocus");
1317
+ return A;
1318
+ }, h = function(S) {
1319
+ var D = Tt(S);
1320
+ i(D, S) >= 0 || (gt(a.clickOutsideDeactivates, S) ? n.deactivate({ returnFocus: a.returnFocusOnDeactivate }) : gt(a.allowOutsideClick, S) || S.preventDefault());
1321
+ }, p = function(S) {
1322
+ var D = Tt(S), P = i(D, S) >= 0;
1323
+ if (P || D instanceof Document) P && (o.mostRecentlyFocusedNode = D);
1324
+ else {
1325
+ var M;
1326
+ S.stopImmediatePropagation();
1327
+ var I = !0;
1328
+ if (o.mostRecentlyFocusedNode) if (Ke(o.mostRecentlyFocusedNode) > 0) {
1329
+ var A = i(o.mostRecentlyFocusedNode), V = o.containerGroups[A].tabbableNodes;
1330
+ if (V.length > 0) {
1331
+ var B = V.findIndex(function(z) {
1332
+ return z === o.mostRecentlyFocusedNode;
1333
+ });
1334
+ B >= 0 && (a.isKeyForward(o.recentNavEvent) ? B + 1 < V.length && (M = V[B + 1], I = !1) : B - 1 >= 0 && (M = V[B - 1], I = !1));
1335
+ }
1336
+ } else o.containerGroups.some(function(z) {
1337
+ return z.tabbableNodes.some(function(ie) {
1338
+ return Ke(ie) > 0;
1339
+ });
1340
+ }) || (I = !1);
1341
+ else I = !1;
1342
+ I && (M = m({ target: o.mostRecentlyFocusedNode, isBackward: a.isKeyBackward(o.recentNavEvent) })), b(M || o.mostRecentlyFocusedNode || f());
1343
+ }
1344
+ o.recentNavEvent = void 0;
1345
+ }, u = function(S) {
1346
+ (a.isKeyForward(S) || a.isKeyBackward(S)) && (function(D) {
1347
+ var P = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
1348
+ o.recentNavEvent = D;
1349
+ var M = m({ event: D, isBackward: P });
1350
+ M && (kt(D) && D.preventDefault(), b(M));
1351
+ })(S, a.isKeyBackward(S));
1352
+ }, w = function(S) {
1353
+ var D;
1354
+ ((D = S) == null ? void 0 : D.key) !== "Escape" && D?.key !== "Esc" && D?.keyCode !== 27 || gt(a.escapeDeactivates, S) === !1 || (S.preventDefault(), n.deactivate());
1355
+ }, E = function(S) {
1356
+ var D = Tt(S);
1357
+ i(D, S) >= 0 || gt(a.clickOutsideDeactivates, S) || gt(a.allowOutsideClick, S) || (S.preventDefault(), S.stopImmediatePropagation());
1358
+ }, T = function() {
1359
+ if (o.active) return Zi(s, n), o.delayInitialFocusTimer = a.delayInitialFocus ? Kn(function() {
1360
+ b(f());
1361
+ }) : b(f()), t.addEventListener("focusin", p, !0), t.addEventListener("mousedown", h, { capture: !0, passive: !1 }), t.addEventListener("touchstart", h, { capture: !0, passive: !1 }), t.addEventListener("click", E, { capture: !0, passive: !1 }), t.addEventListener("keydown", u, { capture: !0, passive: !1 }), t.addEventListener("keydown", w), n;
1362
+ }, L = function() {
1363
+ if (o.active) return t.removeEventListener("focusin", p, !0), t.removeEventListener("mousedown", h, !0), t.removeEventListener("touchstart", h, !0), t.removeEventListener("click", E, !0), t.removeEventListener("keydown", u, !0), t.removeEventListener("keydown", w), n;
1364
+ }, O = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(function(S) {
1365
+ S.some(function(D) {
1366
+ return Array.from(D.removedNodes).some(function(P) {
1367
+ return P === o.mostRecentlyFocusedNode;
1368
+ });
1369
+ }) && b(f());
1370
+ }) : void 0, R = function() {
1371
+ O && (O.disconnect(), o.active && !o.paused && o.containers.map(function(S) {
1372
+ O.observe(S, { subtree: !0, childList: !0 });
1373
+ }));
1374
+ };
1375
+ return n = { get active() {
1376
+ return o.active;
1377
+ }, get paused() {
1378
+ return o.paused;
1379
+ }, activate: function(S) {
1380
+ if (o.active) return this;
1381
+ var D = l(S, "onActivate"), P = l(S, "onPostActivate"), M = l(S, "checkCanFocusTrap");
1382
+ M || x(), o.active = !0, o.paused = !1, o.nodeFocusedBeforeActivation = y(t), D?.();
1383
+ var I = function() {
1384
+ M && x(), T(), R(), P?.();
1385
+ };
1386
+ return M ? (M(o.containers.concat()).then(I, I), this) : (I(), this);
1387
+ }, deactivate: function(S) {
1388
+ if (!o.active) return this;
1389
+ var D = Xn({ onDeactivate: a.onDeactivate, onPostDeactivate: a.onPostDeactivate, checkCanReturnFocus: a.checkCanReturnFocus }, S);
1390
+ clearTimeout(o.delayInitialFocusTimer), o.delayInitialFocusTimer = void 0, L(), o.active = !1, o.paused = !1, R(), ea(s, n);
1391
+ var P = l(D, "onDeactivate"), M = l(D, "onPostDeactivate"), I = l(D, "checkCanReturnFocus"), A = l(D, "returnFocus", "returnFocusOnDeactivate");
1392
+ P?.();
1393
+ var V = function() {
1394
+ Kn(function() {
1395
+ A && b(v(o.nodeFocusedBeforeActivation)), M?.();
1396
+ });
1397
+ };
1398
+ return A && I ? (I(v(o.nodeFocusedBeforeActivation)).then(V, V), this) : (V(), this);
1399
+ }, pause: function(S) {
1400
+ return o.active ? (o.manuallyPaused = !0, this._setPausedState(!0, S)) : this;
1401
+ }, unpause: function(S) {
1402
+ return o.active ? (o.manuallyPaused = !1, s[s.length - 1] !== this ? this : this._setPausedState(!1, S)) : this;
1403
+ }, updateContainerElements: function(S) {
1404
+ var D = [].concat(S).filter(Boolean);
1405
+ return o.containers = D.map(function(P) {
1406
+ return typeof P == "string" ? t.querySelector(P) : P;
1407
+ }), o.active && x(), R(), this;
1408
+ } }, Object.defineProperties(n, { _isManuallyPaused: { value: function() {
1409
+ return o.manuallyPaused;
1410
+ } }, _setPausedState: { value: function(S, D) {
1411
+ if (o.paused === S) return this;
1412
+ if (o.paused = S, S) {
1413
+ var P = l(D, "onPause"), M = l(D, "onPostPause");
1414
+ P?.(), L(), R(), M?.();
1415
+ } else {
1416
+ var I = l(D, "onUnpause"), A = l(D, "onPostUnpause");
1417
+ I?.(), x(), T(), R(), A?.();
1418
+ }
1419
+ return this;
1420
+ } } }), n.updateContainerElements(e), n;
1421
+ } }, Symbol.toStringTag, { value: "Module" })), ia = Ir(oa), aa = Ir(qi);
1422
+ var qn, Qn, sa = (function() {
1423
+ if (Qn) return qn;
1424
+ function e(b) {
1425
+ return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(v) {
1426
+ return typeof v;
1427
+ } : function(v) {
1428
+ return v && typeof Symbol == "function" && v.constructor === Symbol && v !== Symbol.prototype ? "symbol" : typeof v;
1429
+ }, e(b);
1430
+ }
1431
+ function r(b, v, m) {
1432
+ return v && (function(h, p) {
1433
+ for (var u = 0; u < p.length; u++) {
1434
+ var w = p[u];
1435
+ w.enumerable = w.enumerable || !1, w.configurable = !0, "value" in w && (w.writable = !0), Object.defineProperty(h, o(w.key), w);
1436
+ }
1437
+ })(b.prototype, v), Object.defineProperty(b, "prototype", { writable: !1 }), b;
1438
+ }
1439
+ function n(b, v, m) {
1440
+ return v = s(v), (function(h, p) {
1441
+ if (p && (e(p) == "object" || typeof p == "function")) return p;
1442
+ if (p !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
1443
+ return (function(u) {
1444
+ if (u === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1445
+ return u;
1446
+ })(h);
1447
+ })(b, t() ? Reflect.construct(v, m || [], s(b).constructor) : v.apply(b, m));
1448
+ }
1449
+ function t() {
1450
+ try {
1451
+ var b = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1452
+ }));
1453
+ } catch {
1454
+ }
1455
+ return (t = function() {
1456
+ return !!b;
1457
+ })();
1458
+ }
1459
+ function s(b) {
1460
+ return s = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(v) {
1461
+ return v.__proto__ || Object.getPrototypeOf(v);
1462
+ }, s(b);
1463
+ }
1464
+ function a(b, v) {
1465
+ return a = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(m, h) {
1466
+ return m.__proto__ = h, m;
1467
+ }, a(b, v);
1468
+ }
1469
+ function o(b) {
1470
+ var v = (function(m, h) {
1471
+ if (e(m) != "object" || !m) return m;
1472
+ var p = m[Symbol.toPrimitive];
1473
+ if (p !== void 0) {
1474
+ var u = p.call(m, h);
1475
+ if (e(u) != "object") return u;
1476
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1477
+ }
1478
+ return (h === "string" ? String : Number)(m);
1479
+ })(b, "string");
1480
+ return e(v) == "symbol" ? v : v + "";
1481
+ }
1482
+ Qn = 1;
1483
+ var l = q, i = yn(), c = ia.createFocusTrap, f = aa.isFocusable, x = (function(b) {
1484
+ function v(m) {
1485
+ var h;
1486
+ (function(w, E) {
1487
+ if (!(w instanceof E)) throw new TypeError("Cannot call a class as a function");
1488
+ })(this, v), (function(w, E, T) {
1489
+ (E = o(E)) in w ? Object.defineProperty(w, E, { value: T, enumerable: !0, configurable: !0, writable: !0 }) : w[E] = T;
1490
+ })(h = n(this, v, [m]), "getNodeForOption", function(w) {
1491
+ var E, T = (E = this.internalOptions[w]) !== null && E !== void 0 ? E : this.originalOptions[w];
1492
+ if (typeof T == "function") {
1493
+ for (var L = arguments.length, O = new Array(L > 1 ? L - 1 : 0), R = 1; R < L; R++) O[R - 1] = arguments[R];
1494
+ T = T.apply(void 0, O);
1495
+ }
1496
+ if (T === !0 && (T = void 0), !T) {
1497
+ if (T === void 0 || T === !1) return T;
1498
+ throw new Error("`".concat(w, "` was specified but was not a node, or did not return a node"));
1499
+ }
1500
+ var S, D = T;
1501
+ if (typeof T == "string" && !(D = (S = this.getDocument()) === null || S === void 0 ? void 0 : S.querySelector(T))) throw new Error("`".concat(w, "` as selector refers to no known node"));
1502
+ return D;
1503
+ }), h.handleDeactivate = h.handleDeactivate.bind(h), h.handlePostDeactivate = h.handlePostDeactivate.bind(h), h.handleClickOutsideDeactivates = h.handleClickOutsideDeactivates.bind(h), h.internalOptions = { returnFocusOnDeactivate: !1, checkCanReturnFocus: null, onDeactivate: h.handleDeactivate, onPostDeactivate: h.handlePostDeactivate, clickOutsideDeactivates: h.handleClickOutsideDeactivates }, h.originalOptions = { returnFocusOnDeactivate: !0, onDeactivate: null, onPostDeactivate: null, checkCanReturnFocus: null, clickOutsideDeactivates: !1 };
1504
+ var p = m.focusTrapOptions;
1505
+ for (var u in p) Object.prototype.hasOwnProperty.call(p, u) && (u !== "returnFocusOnDeactivate" && u !== "onDeactivate" && u !== "onPostDeactivate" && u !== "checkCanReturnFocus" && u !== "clickOutsideDeactivates" ? h.internalOptions[u] = p[u] : h.originalOptions[u] = p[u]);
1506
+ return h.outsideClick = null, h.focusTrapElements = m.containerElements || [], h.updatePreviousElement(), h;
1507
+ }
1508
+ return (function(m, h) {
1509
+ if (typeof h != "function" && h !== null) throw new TypeError("Super expression must either be null or a function");
1510
+ m.prototype = Object.create(h && h.prototype, { constructor: { value: m, writable: !0, configurable: !0 } }), Object.defineProperty(m, "prototype", { writable: !1 }), h && a(m, h);
1511
+ })(v, b), r(v, [{ key: "getDocument", value: function() {
1512
+ return this.props.focusTrapOptions.document || (typeof document < "u" ? document : void 0);
1513
+ } }, { key: "getReturnFocusNode", value: function() {
1514
+ var m = this.getNodeForOption("setReturnFocus", this.previouslyFocusedElement);
1515
+ return m || m !== !1 && this.previouslyFocusedElement;
1516
+ } }, { key: "updatePreviousElement", value: function() {
1517
+ var m = this.getDocument();
1518
+ m && (this.previouslyFocusedElement = m.activeElement);
1519
+ } }, { key: "deactivateTrap", value: function() {
1520
+ this.focusTrap && this.focusTrap.active && this.focusTrap.deactivate({ returnFocus: !1, checkCanReturnFocus: null, onDeactivate: this.originalOptions.onDeactivate });
1521
+ } }, { key: "handleClickOutsideDeactivates", value: function(m) {
1522
+ var h = typeof this.originalOptions.clickOutsideDeactivates == "function" ? this.originalOptions.clickOutsideDeactivates.call(null, m) : this.originalOptions.clickOutsideDeactivates;
1523
+ return h && (this.outsideClick = { target: m.target, allowDeactivation: h }), h;
1524
+ } }, { key: "handleDeactivate", value: function() {
1525
+ this.originalOptions.onDeactivate && this.originalOptions.onDeactivate.call(null), this.deactivateTrap();
1526
+ } }, { key: "handlePostDeactivate", value: function() {
1527
+ var m = this, h = function() {
1528
+ var p = m.getReturnFocusNode(), u = !(!m.originalOptions.returnFocusOnDeactivate || p == null || !p.focus || m.outsideClick && (!m.outsideClick.allowDeactivation || f(m.outsideClick.target, m.internalOptions.tabbableOptions))), w = m.internalOptions.preventScroll, E = w !== void 0 && w;
1529
+ u && p.focus({ preventScroll: E }), m.originalOptions.onPostDeactivate && m.originalOptions.onPostDeactivate.call(null), m.outsideClick = null;
1530
+ };
1531
+ this.originalOptions.checkCanReturnFocus ? this.originalOptions.checkCanReturnFocus.call(null, this.getReturnFocusNode()).then(h, h) : h();
1532
+ } }, { key: "setupFocusTrap", value: function() {
1533
+ this.focusTrap ? this.props.active && !this.focusTrap.active && (this.focusTrap.activate(), this.props.paused && this.focusTrap.pause()) : this.focusTrapElements.some(Boolean) && (this.focusTrap = this.props._createFocusTrap(this.focusTrapElements, this.internalOptions), this.props.active && this.focusTrap.activate(), this.props.paused && this.focusTrap.pause());
1534
+ } }, { key: "componentDidMount", value: function() {
1535
+ this.props.active && this.setupFocusTrap();
1536
+ } }, { key: "componentDidUpdate", value: function(m) {
1537
+ if (this.focusTrap) {
1538
+ m.containerElements !== this.props.containerElements && this.focusTrap.updateContainerElements(this.props.containerElements);
1539
+ var h = !m.active && this.props.active, p = m.active && !this.props.active, u = !m.paused && this.props.paused, w = m.paused && !this.props.paused;
1540
+ if (h && (this.updatePreviousElement(), this.focusTrap.activate()), p) return void this.deactivateTrap();
1541
+ u && this.focusTrap.pause(), w && this.focusTrap.unpause();
1542
+ } else m.containerElements !== this.props.containerElements && (this.focusTrapElements = this.props.containerElements), this.props.active && (this.updatePreviousElement(), this.setupFocusTrap());
1543
+ } }, { key: "componentWillUnmount", value: function() {
1544
+ this.deactivateTrap();
1545
+ } }, { key: "render", value: function() {
1546
+ var m = this, h = this.props.children ? l.Children.only(this.props.children) : void 0;
1547
+ if (h) {
1548
+ if (h.type && h.type === l.Fragment) throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");
1549
+ return l.cloneElement(h, { ref: function(p) {
1550
+ var u = m.props.containerElements;
1551
+ h && (typeof h.ref == "function" ? h.ref(p) : h.ref && (h.ref.current = p)), m.focusTrapElements = u || [p];
1552
+ } });
1553
+ }
1554
+ return null;
1555
+ } }]);
1556
+ })(l.Component), y = typeof Element > "u" ? Function : Element;
1557
+ return x.propTypes = { active: i.bool, paused: i.bool, focusTrapOptions: i.shape({ document: i.object, onActivate: i.func, onPostActivate: i.func, checkCanFocusTrap: i.func, onPause: i.func, onPostPause: i.func, onUnpause: i.func, onPostUnpause: i.func, onDeactivate: i.func, onPostDeactivate: i.func, checkCanReturnFocus: i.func, initialFocus: i.oneOfType([i.instanceOf(y), i.string, i.bool, i.func]), fallbackFocus: i.oneOfType([i.instanceOf(y), i.string, i.func]), escapeDeactivates: i.oneOfType([i.bool, i.func]), clickOutsideDeactivates: i.oneOfType([i.bool, i.func]), returnFocusOnDeactivate: i.bool, setReturnFocus: i.oneOfType([i.instanceOf(y), i.string, i.bool, i.func]), allowOutsideClick: i.oneOfType([i.bool, i.func]), preventScroll: i.bool, tabbableOptions: i.shape({ displayCheck: i.oneOf(["full", "legacy-full", "non-zero-area", "none"]), getShadowRoot: i.oneOfType([i.bool, i.func]) }), trapStack: i.array, isKeyForward: i.func, isKeyBackward: i.func }), containerElements: i.arrayOf(i.instanceOf(y)), children: i.oneOfType([i.element, i.instanceOf(y)]) }, x.defaultProps = { active: !0, paused: !1, focusTrapOptions: {}, _createFocusTrap: c }, qn = x;
1558
+ })();
1559
+ const la = Ar(sa);
1560
+ var Jn, yt = { exports: {} }, Zn = {}, Pt = { exports: {} }, er, ye = {}, Ue = {};
1561
+ function Ht() {
1562
+ return er || (er = 1, Object.defineProperty(Ue, "__esModule", { value: !0 }), Ue.dontSetMe = function(e, r, n) {
1563
+ if (e[r]) return new Error(`Invalid prop ${r} passed to ${n} - do not set this, set it on the child.`);
1564
+ }, Ue.findInArray = function(e, r) {
1565
+ for (let n = 0, t = e.length; n < t; n++) if (r.apply(r, [e[n], n, e])) return e[n];
1566
+ }, Ue.int = function(e) {
1567
+ return parseInt(e, 10);
1568
+ }, Ue.isFunction = function(e) {
1569
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
1570
+ }, Ue.isNum = function(e) {
1571
+ return typeof e == "number" && !isNaN(e);
1572
+ }), Ue;
1573
+ }
1574
+ var tr, nr, Ye = {};
1575
+ function bn() {
1576
+ if (nr) return ye;
1577
+ nr = 1, Object.defineProperty(ye, "__esModule", { value: !0 }), ye.addClassName = o, ye.addEvent = function(i, c, f, x) {
1578
+ if (!i) return;
1579
+ const y = { capture: !0, ...x };
1580
+ i.addEventListener ? i.addEventListener(c, f, y) : i.attachEvent ? i.attachEvent("on" + c, f) : i["on" + c] = f;
1581
+ }, ye.addUserSelectStyles = function(i) {
1582
+ if (!i) return;
1583
+ let c = i.getElementById("react-draggable-style-el");
1584
+ c || (c = i.createElement("style"), c.type = "text/css", c.id = "react-draggable-style-el", c.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
1585
+ `, c.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
1586
+ `, i.getElementsByTagName("head")[0].appendChild(c)), i.body && o(i.body, "react-draggable-transparent-selection");
1587
+ }, ye.createCSSTransform = function(i, c) {
1588
+ const f = s(i, c, "px");
1589
+ return { [(0, r.browserPrefixToKey)("transform", r.default)]: f };
1590
+ }, ye.createSVGTransform = function(i, c) {
1591
+ return s(i, c, "");
1592
+ }, ye.getTouch = function(i, c) {
1593
+ return i.targetTouches && (0, e.findInArray)(i.targetTouches, (f) => c === f.identifier) || i.changedTouches && (0, e.findInArray)(i.changedTouches, (f) => c === f.identifier);
1594
+ }, ye.getTouchIdentifier = function(i) {
1595
+ if (i.targetTouches && i.targetTouches[0]) return i.targetTouches[0].identifier;
1596
+ if (i.changedTouches && i.changedTouches[0]) return i.changedTouches[0].identifier;
1597
+ }, ye.getTranslation = s, ye.innerHeight = function(i) {
1598
+ let c = i.clientHeight;
1599
+ const f = i.ownerDocument.defaultView.getComputedStyle(i);
1600
+ return c -= (0, e.int)(f.paddingTop), c -= (0, e.int)(f.paddingBottom), c;
1601
+ }, ye.innerWidth = function(i) {
1602
+ let c = i.clientWidth;
1603
+ const f = i.ownerDocument.defaultView.getComputedStyle(i);
1604
+ return c -= (0, e.int)(f.paddingLeft), c -= (0, e.int)(f.paddingRight), c;
1605
+ }, ye.matchesSelector = t, ye.matchesSelectorAndParentsTo = function(i, c, f) {
1606
+ let x = i;
1607
+ do {
1608
+ if (t(x, c)) return !0;
1609
+ if (x === f) return !1;
1610
+ x = x.parentNode;
1611
+ } while (x);
1612
+ return !1;
1613
+ }, ye.offsetXYFromParent = function(i, c, f) {
1614
+ const x = c === c.ownerDocument.body ? { left: 0, top: 0 } : c.getBoundingClientRect(), y = (i.clientX + c.scrollLeft - x.left) / f, b = (i.clientY + c.scrollTop - x.top) / f;
1615
+ return { x: y, y: b };
1616
+ }, ye.outerHeight = function(i) {
1617
+ let c = i.clientHeight;
1618
+ const f = i.ownerDocument.defaultView.getComputedStyle(i);
1619
+ return c += (0, e.int)(f.borderTopWidth), c += (0, e.int)(f.borderBottomWidth), c;
1620
+ }, ye.outerWidth = function(i) {
1621
+ let c = i.clientWidth;
1622
+ const f = i.ownerDocument.defaultView.getComputedStyle(i);
1623
+ return c += (0, e.int)(f.borderLeftWidth), c += (0, e.int)(f.borderRightWidth), c;
1624
+ }, ye.removeClassName = l, ye.removeEvent = function(i, c, f, x) {
1625
+ if (!i) return;
1626
+ const y = { capture: !0, ...x };
1627
+ i.removeEventListener ? i.removeEventListener(c, f, y) : i.detachEvent ? i.detachEvent("on" + c, f) : i["on" + c] = null;
1628
+ }, ye.scheduleRemoveUserSelectStyles = function(i) {
1629
+ window.requestAnimationFrame ? window.requestAnimationFrame(() => {
1630
+ a(i);
1631
+ }) : a(i);
1632
+ };
1633
+ var e = Ht(), r = (function(i, c) {
1634
+ if (typeof WeakMap == "function") var f = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap();
1635
+ return (function(y, b) {
1636
+ if (!b && y && y.__esModule) return y;
1637
+ var v, m, h = { __proto__: null, default: y };
1638
+ if (y === null || typeof y != "object" && typeof y != "function") return h;
1639
+ if (v = b ? x : f) {
1640
+ if (v.has(y)) return v.get(y);
1641
+ v.set(y, h);
1642
+ }
1643
+ for (const p in y) p !== "default" && {}.hasOwnProperty.call(y, p) && ((m = (v = Object.defineProperty) && Object.getOwnPropertyDescriptor(y, p)) && (m.get || m.set) ? v(h, p, m) : h[p] = y[p]);
1644
+ return h;
1645
+ })(i, c);
1646
+ })((function() {
1647
+ if (tr) return Ye;
1648
+ tr = 1, Object.defineProperty(Ye, "__esModule", { value: !0 }), Ye.browserPrefixToKey = f, Ye.browserPrefixToStyle = function(x, y) {
1649
+ return y ? `-${y.toLowerCase()}-${x}` : x;
1650
+ }, Ye.default = void 0, Ye.getPrefix = c;
1651
+ const i = ["Moz", "Webkit", "O", "ms"];
1652
+ function c() {
1653
+ let x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
1654
+ if (typeof window > "u") return "";
1655
+ const y = window.document?.documentElement?.style;
1656
+ if (!y || x in y) return "";
1657
+ for (let b = 0; b < i.length; b++) if (f(x, i[b]) in y) return i[b];
1658
+ return "";
1659
+ }
1660
+ function f(x, y) {
1661
+ return y ? `${y}${(function(b) {
1662
+ let v = "", m = !0;
1663
+ for (let h = 0; h < b.length; h++) m ? (v += b[h].toUpperCase(), m = !1) : b[h] === "-" ? m = !0 : v += b[h];
1664
+ return v;
1665
+ })(x)}` : x;
1666
+ }
1667
+ return Ye.default = c(), Ye;
1668
+ })());
1669
+ let n = "";
1670
+ function t(i, c) {
1671
+ return n || (n = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(f) {
1672
+ return (0, e.isFunction)(i[f]);
1673
+ })), !!(0, e.isFunction)(i[n]) && i[n](c);
1674
+ }
1675
+ function s(i, c, f) {
1676
+ let { x, y } = i, b = `translate(${x}${f},${y}${f})`;
1677
+ return c && (b = `translate(${`${typeof c.x == "string" ? c.x : c.x + f}`}, ${`${typeof c.y == "string" ? c.y : c.y + f}`})` + b), b;
1678
+ }
1679
+ function a(i) {
1680
+ if (i) try {
1681
+ if (i.body && l(i.body, "react-draggable-transparent-selection"), i.selection) i.selection.empty();
1682
+ else {
1683
+ const c = (i.defaultView || window).getSelection();
1684
+ c && c.type !== "Caret" && c.removeAllRanges();
1685
+ }
1686
+ } catch {
1687
+ }
1688
+ }
1689
+ function o(i, c) {
1690
+ i.classList ? i.classList.add(c) : i.className.match(new RegExp(`(?:^|\\s)${c}(?!\\S)`)) || (i.className += ` ${c}`);
1691
+ }
1692
+ function l(i, c) {
1693
+ i.classList ? i.classList.remove(c) : i.className = i.className.replace(new RegExp(`(?:^|\\s)${c}(?!\\S)`, "g"), "");
1694
+ }
1695
+ return ye;
1696
+ }
1697
+ var rr, je = {};
1698
+ function fo() {
1699
+ if (rr) return je;
1700
+ rr = 1, Object.defineProperty(je, "__esModule", { value: !0 }), je.canDragX = function(t) {
1701
+ return t.props.axis === "both" || t.props.axis === "x";
1702
+ }, je.canDragY = function(t) {
1703
+ return t.props.axis === "both" || t.props.axis === "y";
1704
+ }, je.createCoreData = function(t, s, a) {
1705
+ const o = !(0, e.isNum)(t.lastX), l = n(t);
1706
+ return o ? { node: l, deltaX: 0, deltaY: 0, lastX: s, lastY: a, x: s, y: a } : { node: l, deltaX: s - t.lastX, deltaY: a - t.lastY, lastX: t.lastX, lastY: t.lastY, x: s, y: a };
1707
+ }, je.createDraggableData = function(t, s) {
1708
+ const a = t.props.scale;
1709
+ return { node: s.node, x: t.state.x + s.deltaX / a, y: t.state.y + s.deltaY / a, deltaX: s.deltaX / a, deltaY: s.deltaY / a, lastX: t.state.x, lastY: t.state.y };
1710
+ }, je.getBoundPosition = function(t, s, a) {
1711
+ if (!t.props.bounds) return [s, a];
1712
+ let { bounds: o } = t.props;
1713
+ o = typeof o == "string" ? o : (function(i) {
1714
+ return { left: i.left, top: i.top, right: i.right, bottom: i.bottom };
1715
+ })(o);
1716
+ const l = n(t);
1717
+ if (typeof o == "string") {
1718
+ const { ownerDocument: i } = l, c = i.defaultView;
1719
+ let f;
1720
+ if (o === "parent" ? f = l.parentNode : f = l.getRootNode().querySelector(o), !(f instanceof c.HTMLElement)) throw new Error('Bounds selector "' + o + '" could not find an element.');
1721
+ const x = f, y = c.getComputedStyle(l), b = c.getComputedStyle(x);
1722
+ o = { left: -l.offsetLeft + (0, e.int)(b.paddingLeft) + (0, e.int)(y.marginLeft), top: -l.offsetTop + (0, e.int)(b.paddingTop) + (0, e.int)(y.marginTop), right: (0, r.innerWidth)(x) - (0, r.outerWidth)(l) - l.offsetLeft + (0, e.int)(b.paddingRight) - (0, e.int)(y.marginRight), bottom: (0, r.innerHeight)(x) - (0, r.outerHeight)(l) - l.offsetTop + (0, e.int)(b.paddingBottom) - (0, e.int)(y.marginBottom) };
1723
+ }
1724
+ return (0, e.isNum)(o.right) && (s = Math.min(s, o.right)), (0, e.isNum)(o.bottom) && (a = Math.min(a, o.bottom)), (0, e.isNum)(o.left) && (s = Math.max(s, o.left)), (0, e.isNum)(o.top) && (a = Math.max(a, o.top)), [s, a];
1725
+ }, je.getControlPosition = function(t, s, a) {
1726
+ const o = typeof s == "number" ? (0, r.getTouch)(t, s) : null;
1727
+ if (typeof s == "number" && !o) return null;
1728
+ const l = n(a), i = a.props.offsetParent || l.offsetParent || l.ownerDocument.body;
1729
+ return (0, r.offsetXYFromParent)(o || t, i, a.props.scale);
1730
+ }, je.snapToGrid = function(t, s, a) {
1731
+ const o = Math.round(s / t[0]) * t[0], l = Math.round(a / t[1]) * t[1];
1732
+ return [o, l];
1733
+ };
1734
+ var e = Ht(), r = bn();
1735
+ function n(t) {
1736
+ const s = t.findDOMNode();
1737
+ if (!s) throw new Error("<DraggableCore>: Unmounted during event!");
1738
+ return s;
1739
+ }
1740
+ return je;
1741
+ }
1742
+ var or, ir, ar, sr, bt = {}, Rt = {};
1743
+ function ho() {
1744
+ return or || (or = 1, Object.defineProperty(Rt, "__esModule", { value: !0 }), Rt.default = function() {
1745
+ }), Rt;
1746
+ }
1747
+ function ca() {
1748
+ if (ir) return bt;
1749
+ ir = 1, Object.defineProperty(bt, "__esModule", { value: !0 }), bt.default = void 0;
1750
+ var e = (function(b, v) {
1751
+ if (typeof WeakMap == "function") var m = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap();
1752
+ return (function(p, u) {
1753
+ if (!u && p && p.__esModule) return p;
1754
+ var w, E, T = { __proto__: null, default: p };
1755
+ if (p === null || typeof p != "object" && typeof p != "function") return T;
1756
+ if (w = u ? h : m) {
1757
+ if (w.has(p)) return w.get(p);
1758
+ w.set(p, T);
1759
+ }
1760
+ for (const L in p) L !== "default" && {}.hasOwnProperty.call(p, L) && ((E = (w = Object.defineProperty) && Object.getOwnPropertyDescriptor(p, L)) && (E.get || E.set) ? w(T, L, E) : T[L] = p[L]);
1761
+ return T;
1762
+ })(b, v);
1763
+ })(q), r = l(yn()), n = l(Rr), t = bn(), s = fo(), a = Ht(), o = l(ho());
1764
+ function l(b) {
1765
+ return b && b.__esModule ? b : { default: b };
1766
+ }
1767
+ function i(b, v, m) {
1768
+ return (v = (function(h) {
1769
+ var p = (function(u, w) {
1770
+ if (typeof u != "object" || !u) return u;
1771
+ var E = u[Symbol.toPrimitive];
1772
+ if (E !== void 0) {
1773
+ var T = E.call(u, w);
1774
+ if (typeof T != "object") return T;
1775
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1776
+ }
1777
+ return (w === "string" ? String : Number)(u);
1778
+ })(h, "string");
1779
+ return typeof p == "symbol" ? p : p + "";
1780
+ })(v)) in b ? Object.defineProperty(b, v, { value: m, enumerable: !0, configurable: !0, writable: !0 }) : b[v] = m, b;
1781
+ }
1782
+ const c = { start: "touchstart", move: "touchmove", stop: "touchend" }, f = { start: "mousedown", move: "mousemove", stop: "mouseup" };
1783
+ let x = f, y = class extends e.Component {
1784
+ constructor() {
1785
+ super(...arguments), i(this, "dragging", !1), i(this, "lastX", NaN), i(this, "lastY", NaN), i(this, "touchIdentifier", null), i(this, "mounted", !1), i(this, "handleDragStart", (b) => {
1786
+ if (this.props.onMouseDown(b), !this.props.allowAnyClick && typeof b.button == "number" && b.button !== 0) return !1;
1787
+ const v = this.findDOMNode();
1788
+ if (!v || !v.ownerDocument || !v.ownerDocument.body) throw new Error("<DraggableCore> not mounted on DragStart!");
1789
+ const { ownerDocument: m } = v;
1790
+ if (this.props.disabled || !(b.target instanceof m.defaultView.Node) || this.props.handle && !(0, t.matchesSelectorAndParentsTo)(b.target, this.props.handle, v) || this.props.cancel && (0, t.matchesSelectorAndParentsTo)(b.target, this.props.cancel, v)) return;
1791
+ b.type !== "touchstart" || this.props.allowMobileScroll || b.preventDefault();
1792
+ const h = (0, t.getTouchIdentifier)(b);
1793
+ this.touchIdentifier = h;
1794
+ const p = (0, s.getControlPosition)(b, h, this);
1795
+ if (p == null) return;
1796
+ const { x: u, y: w } = p, E = (0, s.createCoreData)(this, u, w);
1797
+ (0, o.default)("DraggableCore: handleDragStart: %j", E), (0, o.default)("calling", this.props.onStart), this.props.onStart(b, E) !== !1 && this.mounted !== !1 && (this.props.enableUserSelectHack && (0, t.addUserSelectStyles)(m), this.dragging = !0, this.lastX = u, this.lastY = w, (0, t.addEvent)(m, x.move, this.handleDrag), (0, t.addEvent)(m, x.stop, this.handleDragStop));
1798
+ }), i(this, "handleDrag", (b) => {
1799
+ const v = (0, s.getControlPosition)(b, this.touchIdentifier, this);
1800
+ if (v == null) return;
1801
+ let { x: m, y: h } = v;
1802
+ if (Array.isArray(this.props.grid)) {
1803
+ let u = m - this.lastX, w = h - this.lastY;
1804
+ if ([u, w] = (0, s.snapToGrid)(this.props.grid, u, w), !u && !w) return;
1805
+ m = this.lastX + u, h = this.lastY + w;
1806
+ }
1807
+ const p = (0, s.createCoreData)(this, m, h);
1808
+ if ((0, o.default)("DraggableCore: handleDrag: %j", p), this.props.onDrag(b, p) !== !1 && this.mounted !== !1) this.lastX = m, this.lastY = h;
1809
+ else try {
1810
+ this.handleDragStop(new MouseEvent("mouseup"));
1811
+ } catch {
1812
+ const w = document.createEvent("MouseEvents");
1813
+ w.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.handleDragStop(w);
1814
+ }
1815
+ }), i(this, "handleDragStop", (b) => {
1816
+ if (!this.dragging) return;
1817
+ const v = (0, s.getControlPosition)(b, this.touchIdentifier, this);
1818
+ if (v == null) return;
1819
+ let { x: m, y: h } = v;
1820
+ if (Array.isArray(this.props.grid)) {
1821
+ let w = m - this.lastX || 0, E = h - this.lastY || 0;
1822
+ [w, E] = (0, s.snapToGrid)(this.props.grid, w, E), m = this.lastX + w, h = this.lastY + E;
1823
+ }
1824
+ const p = (0, s.createCoreData)(this, m, h);
1825
+ if (this.props.onStop(b, p) === !1 || this.mounted === !1) return !1;
1826
+ const u = this.findDOMNode();
1827
+ u && this.props.enableUserSelectHack && (0, t.scheduleRemoveUserSelectStyles)(u.ownerDocument), (0, o.default)("DraggableCore: handleDragStop: %j", p), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, u && ((0, o.default)("DraggableCore: Removing handlers"), (0, t.removeEvent)(u.ownerDocument, x.move, this.handleDrag), (0, t.removeEvent)(u.ownerDocument, x.stop, this.handleDragStop));
1828
+ }), i(this, "onMouseDown", (b) => (x = f, this.handleDragStart(b))), i(this, "onMouseUp", (b) => (x = f, this.handleDragStop(b))), i(this, "onTouchStart", (b) => (x = c, this.handleDragStart(b))), i(this, "onTouchEnd", (b) => (x = c, this.handleDragStop(b)));
1829
+ }
1830
+ componentDidMount() {
1831
+ this.mounted = !0;
1832
+ const b = this.findDOMNode();
1833
+ b && (0, t.addEvent)(b, c.start, this.onTouchStart, { passive: !1 });
1834
+ }
1835
+ componentWillUnmount() {
1836
+ this.mounted = !1;
1837
+ const b = this.findDOMNode();
1838
+ if (b) {
1839
+ const { ownerDocument: v } = b;
1840
+ (0, t.removeEvent)(v, f.move, this.handleDrag), (0, t.removeEvent)(v, c.move, this.handleDrag), (0, t.removeEvent)(v, f.stop, this.handleDragStop), (0, t.removeEvent)(v, c.stop, this.handleDragStop), (0, t.removeEvent)(b, c.start, this.onTouchStart, { passive: !1 }), this.props.enableUserSelectHack && (0, t.scheduleRemoveUserSelectStyles)(v);
1841
+ }
1842
+ }
1843
+ findDOMNode() {
1844
+ return this.props?.nodeRef ? this.props?.nodeRef?.current : n.default.findDOMNode(this);
1845
+ }
1846
+ render() {
1847
+ return e.cloneElement(e.Children.only(this.props.children), { onMouseDown: this.onMouseDown, onMouseUp: this.onMouseUp, onTouchEnd: this.onTouchEnd });
1848
+ }
1849
+ };
1850
+ return bt.default = y, i(y, "displayName", "DraggableCore"), i(y, "propTypes", { allowAnyClick: r.default.bool, allowMobileScroll: r.default.bool, children: r.default.node.isRequired, disabled: r.default.bool, enableUserSelectHack: r.default.bool, offsetParent: function(b, v) {
1851
+ if (b[v] && b[v].nodeType !== 1) throw new Error("Draggable's offsetParent must be a DOM Node.");
1852
+ }, grid: r.default.arrayOf(r.default.number), handle: r.default.string, cancel: r.default.string, nodeRef: r.default.object, onStart: r.default.func, onDrag: r.default.func, onStop: r.default.func, onMouseDown: r.default.func, scale: r.default.number, className: a.dontSetMe, style: a.dontSetMe, transform: a.dontSetMe }), i(y, "defaultProps", { allowAnyClick: !1, allowMobileScroll: !1, disabled: !1, enableUserSelectHack: !0, onStart: function() {
1853
+ }, onDrag: function() {
1854
+ }, onStop: function() {
1855
+ }, onMouseDown: function() {
1856
+ }, scale: 1 }), bt;
1857
+ }
1858
+ function ua() {
1859
+ return ar || (ar = 1, (function(e) {
1860
+ Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "DraggableCore", { enumerable: !0, get: function() {
1861
+ return i.default;
1862
+ } }), e.default = void 0;
1863
+ var r = (function(v, m) {
1864
+ if (typeof WeakMap == "function") var h = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap();
1865
+ return (function(u, w) {
1866
+ if (!w && u && u.__esModule) return u;
1867
+ var E, T, L = { __proto__: null, default: u };
1868
+ if (u === null || typeof u != "object" && typeof u != "function") return L;
1869
+ if (E = w ? p : h) {
1870
+ if (E.has(u)) return E.get(u);
1871
+ E.set(u, L);
1872
+ }
1873
+ for (const O in u) O !== "default" && {}.hasOwnProperty.call(u, O) && ((T = (E = Object.defineProperty) && Object.getOwnPropertyDescriptor(u, O)) && (T.get || T.set) ? E(L, O, T) : L[O] = u[O]);
1874
+ return L;
1875
+ })(v, m);
1876
+ })(q), n = f(yn()), t = f(Rr), s = (function() {
1877
+ if (Jn) return Pt.exports;
1878
+ function v(h) {
1879
+ var p, u, w = "";
1880
+ if (typeof h == "string" || typeof h == "number") w += h;
1881
+ else if (typeof h == "object") if (Array.isArray(h)) {
1882
+ var E = h.length;
1883
+ for (p = 0; p < E; p++) h[p] && (u = v(h[p])) && (w && (w += " "), w += u);
1884
+ } else for (u in h) h[u] && (w && (w += " "), w += u);
1885
+ return w;
1886
+ }
1887
+ function m() {
1888
+ for (var h, p, u = 0, w = "", E = arguments.length; u < E; u++) (h = arguments[u]) && (p = v(h)) && (w && (w += " "), w += p);
1889
+ return w;
1890
+ }
1891
+ return Jn = 1, Pt.exports = m, Pt.exports.clsx = m, Pt.exports;
1892
+ })(), a = bn(), o = fo(), l = Ht(), i = f(ca()), c = f(ho());
1893
+ function f(v) {
1894
+ return v && v.__esModule ? v : { default: v };
1895
+ }
1896
+ function x() {
1897
+ return x = Object.assign ? Object.assign.bind() : function(v) {
1898
+ for (var m = 1; m < arguments.length; m++) {
1899
+ var h = arguments[m];
1900
+ for (var p in h) ({}).hasOwnProperty.call(h, p) && (v[p] = h[p]);
1901
+ }
1902
+ return v;
1903
+ }, x.apply(null, arguments);
1904
+ }
1905
+ function y(v, m, h) {
1906
+ return (m = (function(p) {
1907
+ var u = (function(w, E) {
1908
+ if (typeof w != "object" || !w) return w;
1909
+ var T = w[Symbol.toPrimitive];
1910
+ if (T !== void 0) {
1911
+ var L = T.call(w, E);
1912
+ if (typeof L != "object") return L;
1913
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1914
+ }
1915
+ return (E === "string" ? String : Number)(w);
1916
+ })(p, "string");
1917
+ return typeof u == "symbol" ? u : u + "";
1918
+ })(m)) in v ? Object.defineProperty(v, m, { value: h, enumerable: !0, configurable: !0, writable: !0 }) : v[m] = h, v;
1919
+ }
1920
+ class b extends r.Component {
1921
+ static getDerivedStateFromProps(m, h) {
1922
+ let { position: p } = m, { prevPropsPosition: u } = h;
1923
+ return !p || u && p.x === u.x && p.y === u.y ? null : ((0, c.default)("Draggable: getDerivedStateFromProps %j", { position: p, prevPropsPosition: u }), { x: p.x, y: p.y, prevPropsPosition: { ...p } });
1924
+ }
1925
+ constructor(m) {
1926
+ super(m), y(this, "onDragStart", (h, p) => {
1927
+ if ((0, c.default)("Draggable: onDragStart: %j", p), this.props.onStart(h, (0, o.createDraggableData)(this, p)) === !1) return !1;
1928
+ this.setState({ dragging: !0, dragged: !0 });
1929
+ }), y(this, "onDrag", (h, p) => {
1930
+ if (!this.state.dragging) return !1;
1931
+ (0, c.default)("Draggable: onDrag: %j", p);
1932
+ const u = (0, o.createDraggableData)(this, p), w = { x: u.x, y: u.y, slackX: 0, slackY: 0 };
1933
+ if (this.props.bounds) {
1934
+ const { x: E, y: T } = w;
1935
+ w.x += this.state.slackX, w.y += this.state.slackY;
1936
+ const [L, O] = (0, o.getBoundPosition)(this, w.x, w.y);
1937
+ w.x = L, w.y = O, w.slackX = this.state.slackX + (E - w.x), w.slackY = this.state.slackY + (T - w.y), u.x = w.x, u.y = w.y, u.deltaX = w.x - this.state.x, u.deltaY = w.y - this.state.y;
1938
+ }
1939
+ if (this.props.onDrag(h, u) === !1) return !1;
1940
+ this.setState(w);
1941
+ }), y(this, "onDragStop", (h, p) => {
1942
+ if (!this.state.dragging || this.props.onStop(h, (0, o.createDraggableData)(this, p)) === !1) return !1;
1943
+ (0, c.default)("Draggable: onDragStop: %j", p);
1944
+ const u = { dragging: !1, slackX: 0, slackY: 0 };
1945
+ if (this.props.position) {
1946
+ const { x: w, y: E } = this.props.position;
1947
+ u.x = w, u.y = E;
1948
+ }
1949
+ this.setState(u);
1950
+ }), this.state = { dragging: !1, dragged: !1, x: m.position ? m.position.x : m.defaultPosition.x, y: m.position ? m.position.y : m.defaultPosition.y, prevPropsPosition: { ...m.position }, slackX: 0, slackY: 0, isElementSVG: !1 }, !m.position || m.onDrag || m.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.");
1951
+ }
1952
+ componentDidMount() {
1953
+ window.SVGElement !== void 0 && this.findDOMNode() instanceof window.SVGElement && this.setState({ isElementSVG: !0 });
1954
+ }
1955
+ componentWillUnmount() {
1956
+ this.state.dragging && this.setState({ dragging: !1 });
1957
+ }
1958
+ findDOMNode() {
1959
+ return this.props?.nodeRef?.current ?? t.default.findDOMNode(this);
1960
+ }
1961
+ render() {
1962
+ const { axis: m, bounds: h, children: p, defaultPosition: u, defaultClassName: w, defaultClassNameDragging: E, defaultClassNameDragged: T, position: L, positionOffset: O, scale: R, ...S } = this.props;
1963
+ let D = {}, P = null;
1964
+ const M = !L || this.state.dragging, I = L || u, A = { x: (0, o.canDragX)(this) && M ? this.state.x : I.x, y: (0, o.canDragY)(this) && M ? this.state.y : I.y };
1965
+ this.state.isElementSVG ? P = (0, a.createSVGTransform)(A, O) : D = (0, a.createCSSTransform)(A, O);
1966
+ const V = (0, s.clsx)(p.props.className || "", w, { [E]: this.state.dragging, [T]: this.state.dragged });
1967
+ return r.createElement(i.default, x({}, S, { onStart: this.onDragStart, onDrag: this.onDrag, onStop: this.onDragStop }), r.cloneElement(r.Children.only(p), { className: V, style: { ...p.props.style, ...D }, transform: P }));
1968
+ }
1969
+ }
1970
+ e.default = b, y(b, "displayName", "Draggable"), y(b, "propTypes", { ...i.default.propTypes, axis: n.default.oneOf(["both", "x", "y", "none"]), bounds: n.default.oneOfType([n.default.shape({ left: n.default.number, right: n.default.number, top: n.default.number, bottom: n.default.number }), n.default.string, n.default.oneOf([!1])]), defaultClassName: n.default.string, defaultClassNameDragging: n.default.string, defaultClassNameDragged: n.default.string, defaultPosition: n.default.shape({ x: n.default.number, y: n.default.number }), positionOffset: n.default.shape({ x: n.default.oneOfType([n.default.number, n.default.string]), y: n.default.oneOfType([n.default.number, n.default.string]) }), position: n.default.shape({ x: n.default.number, y: n.default.number }), className: l.dontSetMe, style: l.dontSetMe, transform: l.dontSetMe }), y(b, "defaultProps", { ...i.default.defaultProps, axis: "both", bounds: !1, defaultClassName: "react-draggable", defaultClassNameDragging: "react-draggable-dragging", defaultClassNameDragged: "react-draggable-dragged", defaultPosition: { x: 0, y: 0 }, scale: 1 });
1971
+ })(Zn)), Zn;
1972
+ }
1973
+ var da = (function() {
1974
+ if (sr) return yt.exports;
1975
+ sr = 1;
1976
+ const { default: e, DraggableCore: r } = ua();
1977
+ return yt.exports = e, yt.exports.default = e, yt.exports.DraggableCore = r, yt.exports;
1978
+ })();
1979
+ const pa = Ar(da), lr = { x: 0, y: 0 }, fa = oe(de((e, r) => {
1980
+ const { defaultPosition: n = lr, PaperComponent: t = Et, onDragStop: s, rootSel: a = ".MuiModal-root", handleSel: o = ".draggable-title", titleSize: l, rootSize: i, ...c } = e, f = ge(null), x = Z(() => l && i ? { left: 0, top: 0, right: i.width - l.width, bottom: i.height - l.height } : null, [l, i]), [y, b] = ne(null), [v, m] = ne(null), [h, p] = ne(null);
1981
+ return Cr(() => {
1982
+ !y && n && b(n ?? lr);
1983
+ }, [n]), Se(() => {
1984
+ x && y && m({ x: Math.max(0, Math.min(y.x, x.right)), y: Math.max(0, Math.min(y.y, x.bottom)) });
1985
+ }, [y, x]), k(pa, { nodeRef: f, handle: o, cancel: '[class*="MuiDialogContent-root"]', position: v, bounds: x ?? ".MuiModal-root", onStop: s, onStart: (u, w) => {
1986
+ const E = u;
1987
+ p({ x: (E.clientX ?? E.touches?.[0]?.clientX) - w.x, y: (E.clientY ?? E.touches?.[0]?.clientY) - w.y });
1988
+ }, onDrag: (u, w) => {
1989
+ const E = u, T = E.clientX ?? E.touches?.[0]?.clientX, L = E.clientY ?? E.touches?.[0]?.clientY;
1990
+ b({ x: T - h.x, y: L - h.y });
1991
+ }, children: k(t, { ref: At([f, r]), ...c }) });
1992
+ })), ha = { x: "50", y: "50" }, ma = oe(de((e, r) => {
1993
+ const n = ti({ props: e, name: "MuiDialog" }), t = dn(), s = { enter: 0.66 * t.transitions.duration.enteringScreen, exit: 0.66 * t.transitions.duration.leavingScreen }, { title: a = "SheetXL", key: o = "draggable-window", onCancel: l, onDone: i, onShow: c, onShown: f, onHide: x, onClose: y, open: b, autoFocusSel: v, children: m, transitionDuration: h = s, TransitionProps: p, slots: u = Te.EmptyArray, slotProps: w = Te.EmptyArray, sx: E, className: T, onMouseDown: L, initialPosition: O = ha, isModal: R = !1, ...S } = n;
1994
+ let D = u.transition ?? Wo;
1995
+ const P = u.backdrop ?? Ho, M = u.paper ?? Et;
1996
+ let I = w.transition;
1997
+ p && (I = { ...p, ...I });
1998
+ const A = w.backdrop, V = w.paper, B = ge(null), [z, ie] = ne(null), [G, Q] = ne(!1), [re, se] = ne(!1), ee = ge(null), [le, ce] = En(), d = ge(null), [g, C] = En(), F = ge(null);
1999
+ Se(() => {
2000
+ z && Q(b);
2001
+ }, [b, z]);
2002
+ const _ = ae(() => {
2003
+ l?.(), Q(!1);
2004
+ }, [l]);
2005
+ Se(() => {
2006
+ if (ce.width === 0 && ce.height === 0 || z) return;
2007
+ const $ = F.current?.getBoundingClientRect(), ke = ce.height - $.height, ft = ce.width - $.width;
2008
+ let He = 0.5 * ft, Yt = 0.5 * ke;
2009
+ typeof O?.x == "number" ? He = O.x : typeof O?.x == "string" && (He = ft * (parseFloat(O.x) / 100)), typeof O?.y == "number" ? Yt = O.y : typeof O?.y == "string" && (Yt = ke * (parseFloat(O.y) / 100)), ie({ x: He, y: Yt });
2010
+ }, [ce, C]);
2011
+ const [N, j] = ne(!1), [H, U] = ne(null), [K, te] = ne(null), ue = ae(($) => {
2012
+ if (H) return H.focus($), !0;
2013
+ if (v) {
2014
+ const ke = d.current?.querySelectorAll?.(v);
2015
+ if (ke && ke.length > 0) return ke[0]?.focus?.($), !0;
2016
+ }
2017
+ return d.current?.focus?.($), !1;
2018
+ }, [H, v]), he = Tr(r, () => ({ focus: ($) => {
2019
+ ue($);
2020
+ } }), []), Le = { ...I, onExited: ($) => {
2021
+ i?.(null), I?.onExited?.($);
2022
+ }, onExit: ($) => {
2023
+ const ke = K;
2024
+ ke && requestAnimationFrame(() => {
2025
+ he.current?.contains(document.activeElement) && ke.focus();
2026
+ }), x?.(), se(!1), I?.onExit?.($);
2027
+ }, onEntered: ($, ke) => {
2028
+ c?.(), I?.onEntered?.($, ke);
2029
+ }, onEntering: ($, ke) => {
2030
+ se(!0), f?.(he.current);
2031
+ } };
2032
+ Se(() => {
2033
+ re && ue();
2034
+ }, [re]);
2035
+ let Ce = k(la, { focusTrapOptions: { escapeDeactivates: !1, allowOutsideClick: !0, initialFocus: !1 }, ref: B, active: re, children: k(D, { in: G, timeout: h, role: "presentation", ...Le, children: k(X, { className: "MuiDialog-container", ref: d, tabIndex: 0, sx: { outline: "none", position: "relative" }, onKeyDown: ($) => {
2036
+ $.which === Pe.Escape && (_(), ee.current?.start($, { center: !1 }), setTimeout(() => ee.current?.stop($), 180)), $.stopPropagation();
2037
+ }, children: J(fa, { ref: At([F, r]), className: Oe({ "Mui-focusVisible": N }, T, "draggable"), sx: { "& *": ($) => Kr($), pointerEvents: "auto", userSelect: "none", "&:hover:not([disabled]):not(.Mui-focusVisible)": { outline: ($) => `solid ${me($.palette.text?.primary, 0.2)} 1px` }, "&.Mui-focusVisible": { outline: ($) => `solid ${me($.palette.text?.primary, 0.2)} 1px` }, position: "absolute", maxWidth: "100%", ...E }, defaultPosition: z, titleSize: C, rootSize: ce, PaperComponent: M, ...S, ...V, children: [a ? k(Uo, { className: Oe({ "Mui-selected": N }, "draggable-title"), sx: { cursor: "move", display: "flex", color: ($) => $.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: ($) => `${$.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: ($) => $.transitions.duration.shortest / 2 + "ms" }, backgroundColor: ($) => me($.palette.action.hover, 0.03) }, ref: g, children: J(X, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: ($) => $.spacing(1), marginLeft: ($) => $.spacing(1), marginRight: ($) => $.spacing(1) }, children: [k(X, { sx: { flex: "1 1 100%", paddingLeft: ($) => $.spacing(1) }, children: a }), k(pt, { label: "Close", children: k(Ze, { "aria-label": "close", sx: { color: ($) => $.palette.text.icon ?? $.palette.action.active }, touchRippleRef: ee, onPointerDown: ($) => {
2038
+ ee.current?.start($, { center: !1 }), $.stopPropagation(), $.preventDefault();
2039
+ }, onPointerUp: _, children: k(be, { iconKey: "Close" }) }) })] }) }) : null, m] }) }) }) }), Y = null;
2040
+ R && (Y = k(P, { ...A, open: G, onMouseDown: ($) => {
2041
+ _(), A?.onMouseDown?.($);
2042
+ }, onClick: ($) => {
2043
+ y?.($, "backdropClick"), A?.onClick?.($);
2044
+ }, sx: { pointerEvents: "auto", ...A?.sx } }));
2045
+ const { getPortalContainer: pe } = ln();
2046
+ return ni(J(X, { className: "MuiModal-root", sx: { position: "fixed", zIndex: "1300", right: "0", bottom: "0", top: "0", left: "0", outline: "0", display: "block", pointerEvents: "none" }, ref: At([he, le]), onPointerDown: ($) => {
2047
+ N && ($.target === d.current || $.target.tabIndex < 0) && d.current?.contains(document.activeElement);
2048
+ }, onContextMenu: ($) => {
2049
+ $.isPropagationStopped() || $.preventDefault();
2050
+ }, onFocus: ($) => {
2051
+ !N && ($.target === d.current || $.target.tabIndex < 0) && setTimeout(() => {
2052
+ ue();
2053
+ }, 100), B.current?.focusTrap?.unpause(), j(!0), d.current?.contains($.target) && $.target !== d.current && U($.target), $.relatedTarget && !K && te($.relatedTarget);
2054
+ }, onBlur: ($) => {
2055
+ he?.current?.contains($.relatedTarget) || (te(null), B.current?.focusTrap?.pause(), j(!1));
2056
+ }, children: [Y, Ce] }), pe(), o + "");
2057
+ }));
2058
+ var Ve = typeof window < "u" ? window : { screen: {}, navigator: {} }, ut = (Ve.matchMedia || function() {
2059
+ return { matches: !1 };
2060
+ }).bind(Ve), ga = { get passive() {
2061
+ return !0;
2062
+ } }, cr = function() {
2063
+ };
2064
+ Ve.addEventListener && Ve.addEventListener("p", cr, ga), Ve.removeEventListener && Ve.removeEventListener("p", cr, !1);
2065
+ var vn = "ontouchstart" in Ve, ya = vn || "TouchEvent" in Ve && ut("(any-pointer: coarse)").matches, ur = (Ve.navigator.maxTouchPoints || 0) > 0 || ya, mo = Ve.navigator.userAgent || "", ba = ut("(pointer: coarse)").matches && /iPad|Macintosh/.test(mo) && Math.min(Ve.screen.width || 0, Ve.screen.height || 0) >= 768, go = (ut("(pointer: coarse)").matches || !ut("(pointer: fine)").matches && vn) && !/Windows.*Firefox/.test(mo), va = ut("(any-pointer: fine)").matches || ut("(any-hover: hover)").matches || ba || !vn, dr = !ur || !va && go ? ur ? "touchOnly" : "mouseOnly" : "hybrid", xa = dr === "mouseOnly" ? "mouse" : dr === "touchOnly" || go ? "touch" : "mouse", St = (e) => e.type === "checkbox", tt = (e) => e instanceof Date, Re = (e) => e == null;
2066
+ const yo = (e) => typeof e == "object";
2067
+ var we = (e) => !Re(e) && !Array.isArray(e) && yo(e) && !tt(e), xn = typeof window < "u" && window.HTMLElement !== void 0 && typeof document < "u";
2068
+ function De(e) {
2069
+ let r;
2070
+ const n = Array.isArray(e), t = typeof FileList < "u" && e instanceof FileList;
2071
+ if (e instanceof Date) r = new Date(e);
2072
+ else {
2073
+ if (xn && (e instanceof Blob || t) || !n && !we(e)) return e;
2074
+ if (r = n ? [] : Object.create(Object.getPrototypeOf(e)), n || ((s) => {
2075
+ const a = s.constructor && s.constructor.prototype;
2076
+ return we(a) && a.hasOwnProperty("isPrototypeOf");
2077
+ })(e)) for (const s in e) e.hasOwnProperty(s) && (r[s] = De(e[s]));
2078
+ else r = e;
2079
+ }
2080
+ return r;
2081
+ }
2082
+ var Ut = (e) => /^\w*$/.test(e), xe = (e) => e === void 0, on = (e) => Array.isArray(e) ? e.filter(Boolean) : [], wn = (e) => on(e.replace(/["|']|\]/g, "").split(/\.|\[/)), W = (e, r, n) => {
2083
+ if (!r || !we(e)) return n;
2084
+ const t = (Ut(r) ? [r] : wn(r)).reduce((s, a) => Re(s) ? s : s[a], e);
2085
+ return xe(t) || t === e ? xe(e[r]) ? n : e[r] : t;
2086
+ }, $e = (e) => typeof e == "boolean", fe = (e, r, n) => {
2087
+ let t = -1;
2088
+ const s = Ut(r) ? [r] : wn(r), a = s.length, o = a - 1;
2089
+ for (; ++t < a; ) {
2090
+ const l = s[t];
2091
+ let i = n;
2092
+ if (t !== o) {
2093
+ const c = e[l];
2094
+ i = we(c) || Array.isArray(c) ? c : isNaN(+s[t + 1]) ? {} : [];
2095
+ }
2096
+ if (l === "__proto__" || l === "constructor" || l === "prototype") return;
2097
+ e[l] = i, e = e[l];
2098
+ }
2099
+ };
2100
+ const wa = "blur", ka = "focusout", Sa = "onBlur", bo = "onChange", vo = "onSubmit", Da = "onTouched", Ct = "all", Oa = "max", Ca = "min", Ea = "maxLength", Ma = "minLength", pr = "pattern", fr = "required", Ta = "validate", xo = q.createContext(null);
2101
+ xo.displayName = "HookFormContext";
2102
+ const Pa = (e) => {
2103
+ const { children: r, ...n } = e;
2104
+ return q.createElement(xo.Provider, { value: n }, r);
2105
+ }, Ra = typeof window < "u" ? q.useLayoutEffect : q.useEffect;
2106
+ var Fe = (e) => typeof e == "string", an = (e) => Re(e) || !yo(e);
2107
+ function qe(e, r, n = /* @__PURE__ */ new WeakSet()) {
2108
+ if (an(e) || an(r)) return e === r;
2109
+ if (tt(e) && tt(r)) return e.getTime() === r.getTime();
2110
+ const t = Object.keys(e), s = Object.keys(r);
2111
+ if (t.length !== s.length) return !1;
2112
+ if (n.has(e) || n.has(r)) return !0;
2113
+ n.add(e), n.add(r);
2114
+ for (const a of t) {
2115
+ const o = e[a];
2116
+ if (!s.includes(a)) return !1;
2117
+ if (a !== "ref") {
2118
+ const l = r[a];
2119
+ if (tt(o) && tt(l) || we(o) && we(l) || Array.isArray(o) && Array.isArray(l) ? !qe(o, l, n) : o !== l) return !1;
2120
+ }
2121
+ }
2122
+ return !0;
2123
+ }
2124
+ var Na = (e, r, n, t, s) => r ? { ...n[e], types: { ...n[e] && n[e].types ? n[e].types : {}, [t]: s || !0 } } : {}, xt = (e) => Array.isArray(e) ? e : [e], hr = () => {
2125
+ let e = [];
2126
+ return { get observers() {
2127
+ return e;
2128
+ }, next: (r) => {
2129
+ for (const n of e) n.next && n.next(r);
2130
+ }, subscribe: (r) => (e.push(r), { unsubscribe: () => {
2131
+ e = e.filter((n) => n !== r);
2132
+ } }), unsubscribe: () => {
2133
+ e = [];
2134
+ } };
2135
+ };
2136
+ function wo(e, r) {
2137
+ const n = {};
2138
+ for (const t in e) if (e.hasOwnProperty(t)) {
2139
+ const s = e[t], a = r[t];
2140
+ if (s && we(s) && a) {
2141
+ const o = wo(s, a);
2142
+ we(o) && (n[t] = o);
2143
+ } else e[t] && (n[t] = a);
2144
+ }
2145
+ return n;
2146
+ }
2147
+ var Ne = (e) => we(e) && !Object.keys(e).length, kn = (e) => e.type === "file", Be = (e) => typeof e == "function", Bt = (e) => {
2148
+ if (!xn) return !1;
2149
+ const r = e ? e.ownerDocument : 0;
2150
+ return e instanceof (r && r.defaultView ? r.defaultView.HTMLElement : HTMLElement);
2151
+ }, ko = (e) => e.type === "select-multiple", Sn = (e) => e.type === "radio", Jt = (e) => Bt(e) && e.isConnected;
2152
+ function ve(e, r) {
2153
+ const n = Array.isArray(r) ? r : Ut(r) ? [r] : wn(r), t = n.length === 1 ? e : (function(o, l) {
2154
+ const i = l.slice(0, -1).length;
2155
+ let c = 0;
2156
+ for (; c < i; ) o = xe(o) ? c++ : o[l[c++]];
2157
+ return o;
2158
+ })(e, n), s = n.length - 1, a = n[s];
2159
+ return t && delete t[a], s !== 0 && (we(t) && Ne(t) || Array.isArray(t) && (function(o) {
2160
+ for (const l in o) if (o.hasOwnProperty(l) && !xe(o[l])) return !1;
2161
+ return !0;
2162
+ })(t)) && ve(e, n.slice(0, -1)), e;
2163
+ }
2164
+ function So(e) {
2165
+ return Array.isArray(e) || we(e) && !((r) => {
2166
+ for (const n in r) if (Be(r[n])) return !0;
2167
+ return !1;
2168
+ })(e);
2169
+ }
2170
+ function sn(e, r = {}) {
2171
+ for (const n in e) So(e[n]) ? (r[n] = Array.isArray(e[n]) ? [] : {}, sn(e[n], r[n])) : Re(e[n]) || (r[n] = !0);
2172
+ return r;
2173
+ }
2174
+ function it(e, r, n) {
2175
+ n || (n = sn(r));
2176
+ for (const t in e) So(e[t]) ? xe(r) || an(n[t]) ? n[t] = sn(e[t], Array.isArray(e[t]) ? [] : {}) : it(e[t], Re(r) ? {} : r[t], n[t]) : n[t] = !qe(e[t], r[t]);
2177
+ return n;
2178
+ }
2179
+ const mr = { value: !1, isValid: !1 }, gr = { value: !0, isValid: !0 };
2180
+ var Do = (e) => {
2181
+ if (Array.isArray(e)) {
2182
+ if (e.length > 1) {
2183
+ const r = e.filter((n) => n && n.checked && !n.disabled).map((n) => n.value);
2184
+ return { value: r, isValid: !!r.length };
2185
+ }
2186
+ return e[0].checked && !e[0].disabled ? e[0].attributes && !xe(e[0].attributes.value) ? xe(e[0].value) || e[0].value === "" ? gr : { value: e[0].value, isValid: !0 } : gr : mr;
2187
+ }
2188
+ return mr;
2189
+ }, Oo = (e, { valueAsNumber: r, valueAsDate: n, setValueAs: t }) => xe(e) ? e : r ? e === "" ? NaN : e && +e : n && Fe(e) ? new Date(e) : t ? t(e) : e;
2190
+ const yr = { isValid: !1, value: null };
2191
+ var Co = (e) => Array.isArray(e) ? e.reduce((r, n) => n && n.checked && !n.disabled ? { isValid: !0, value: n.value } : r, yr) : yr;
2192
+ function br(e) {
2193
+ const r = e.ref;
2194
+ return kn(r) ? r.files : Sn(r) ? Co(e.refs).value : ko(r) ? [...r.selectedOptions].map(({ value: n }) => n) : St(r) ? Do(e.refs).value : Oo(xe(r.value) ? e.ref.value : r.value, e);
2195
+ }
2196
+ var jt = (e) => e instanceof RegExp, vt = (e) => xe(e) ? e : jt(e) ? e.source : we(e) ? jt(e.value) ? e.value.source : e.value : e, vr = (e) => ({ isOnSubmit: !e || e === vo, isOnBlur: e === Sa, isOnChange: e === bo, isOnAll: e === Ct, isOnTouch: e === Da });
2197
+ const xr = "AsyncFunction";
2198
+ var Fa = (e) => !!e && !!e.validate && !!(Be(e.validate) && e.validate.constructor.name === xr || we(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === xr)), wr = (e, r, n) => !n && (r.watchAll || r.watch.has(e) || [...r.watch].some((t) => e.startsWith(t) && /^\.\w+/.test(e.slice(t.length))));
2199
+ const Dt = (e, r, n, t) => {
2200
+ for (const s of n || Object.keys(e)) {
2201
+ const a = W(e, s);
2202
+ if (a) {
2203
+ const { _f: o, ...l } = a;
2204
+ if (o) {
2205
+ if (o.refs && o.refs[0] && r(o.refs[0], s) && !t || o.ref && r(o.ref, o.name) && !t) return !0;
2206
+ if (Dt(l, r)) break;
2207
+ } else if (we(l) && Dt(l, r)) break;
2208
+ }
2209
+ }
2210
+ };
2211
+ function kr(e, r, n) {
2212
+ const t = W(e, n);
2213
+ if (t || Ut(n)) return { error: t, name: n };
2214
+ const s = n.split(".");
2215
+ for (; s.length; ) {
2216
+ const a = s.join("."), o = W(r, a), l = W(e, a);
2217
+ if (o && !Array.isArray(o) && n !== a) return { name: n };
2218
+ if (l && l.type) return { name: a, error: l };
2219
+ if (l && l.root && l.root.type) return { name: `${a}.root`, error: l.root };
2220
+ s.pop();
2221
+ }
2222
+ return { name: n };
2223
+ }
2224
+ var _a = (e, r, n) => {
2225
+ const t = xt(W(e, n));
2226
+ return fe(t, "root", r[n]), fe(e, n, t), e;
2227
+ };
2228
+ function Sr(e, r, n = "validate") {
2229
+ if (Fe(e) || Array.isArray(e) && e.every(Fe) || $e(e) && !e) return { type: n, message: Fe(e) ? e : "", ref: r };
2230
+ }
2231
+ var ot = (e) => we(e) && !jt(e) ? e : { value: e, message: "" }, Dr = async (e, r, n, t, s, a) => {
2232
+ const { ref: o, refs: l, required: i, maxLength: c, minLength: f, min: x, max: y, pattern: b, validate: v, name: m, valueAsNumber: h, mount: p } = e._f, u = W(n, m);
2233
+ if (!p || r.has(m)) return {};
2234
+ const w = l ? l[0] : o, E = (M) => {
2235
+ s && w.reportValidity && (w.setCustomValidity($e(M) ? "" : M || ""), w.reportValidity());
2236
+ }, T = {}, L = Sn(o), O = St(o), R = L || O, S = (h || kn(o)) && xe(o.value) && xe(u) || Bt(o) && o.value === "" || u === "" || Array.isArray(u) && !u.length, D = Na.bind(null, m, t, T), P = (M, I, A, V = Ea, B = Ma) => {
2237
+ const z = M ? I : A;
2238
+ T[m] = { type: M ? V : B, message: z, ref: o, ...D(M ? V : B, z) };
2239
+ };
2240
+ if (a ? !Array.isArray(u) || !u.length : i && (!R && (S || Re(u)) || $e(u) && !u || O && !Do(l).isValid || L && !Co(l).isValid)) {
2241
+ const { value: M, message: I } = Fe(i) ? { value: !!i, message: i } : ot(i);
2242
+ if (M && (T[m] = { type: fr, message: I, ref: w, ...D(fr, I) }, !t)) return E(I), T;
2243
+ }
2244
+ if (!(S || Re(x) && Re(y))) {
2245
+ let M, I;
2246
+ const A = ot(y), V = ot(x);
2247
+ if (Re(u) || isNaN(u)) {
2248
+ const B = o.valueAsDate || new Date(u), z = (Q) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + Q), ie = o.type == "time", G = o.type == "week";
2249
+ Fe(A.value) && u && (M = ie ? z(u) > z(A.value) : G ? u > A.value : B > new Date(A.value)), Fe(V.value) && u && (I = ie ? z(u) < z(V.value) : G ? u < V.value : B < new Date(V.value));
2250
+ } else {
2251
+ const B = o.valueAsNumber || u && +u;
2252
+ Re(A.value) || (M = B > A.value), Re(V.value) || (I = B < V.value);
2253
+ }
2254
+ if ((M || I) && (P(!!M, A.message, V.message, Oa, Ca), !t)) return E(T[m].message), T;
2255
+ }
2256
+ if ((c || f) && !S && (Fe(u) || a && Array.isArray(u))) {
2257
+ const M = ot(c), I = ot(f), A = !Re(M.value) && u.length > +M.value, V = !Re(I.value) && u.length < +I.value;
2258
+ if ((A || V) && (P(A, M.message, I.message), !t)) return E(T[m].message), T;
2259
+ }
2260
+ if (b && !S && Fe(u)) {
2261
+ const { value: M, message: I } = ot(b);
2262
+ if (jt(M) && !u.match(M) && (T[m] = { type: pr, message: I, ref: o, ...D(pr, I) }, !t)) return E(I), T;
2263
+ }
2264
+ if (v) {
2265
+ if (Be(v)) {
2266
+ const M = Sr(await v(u, n), w);
2267
+ if (M && (T[m] = { ...M, ...D(Ta, M.message) }, !t)) return E(M.message), T;
2268
+ } else if (we(v)) {
2269
+ let M = {};
2270
+ for (const I in v) {
2271
+ if (!Ne(M) && !t) break;
2272
+ const A = Sr(await v[I](u, n), w, I);
2273
+ A && (M = { ...A, ...D(I, A.message) }, E(A.message), t && (T[m] = M));
2274
+ }
2275
+ if (!Ne(M) && (T[m] = { ref: w, ...M }, !t)) return T;
2276
+ }
2277
+ }
2278
+ return E(!0), T;
2279
+ };
2280
+ const Aa = { mode: vo, reValidateMode: bo, shouldFocusError: !0 };
2281
+ function Ia(e = {}) {
2282
+ let r, n = { ...Aa, ...e }, t = { submitCount: 0, isDirty: !1, isReady: !1, isLoading: Be(n.defaultValues), isValidating: !1, isSubmitted: !1, isSubmitting: !1, isSubmitSuccessful: !1, isValid: !1, touchedFields: {}, dirtyFields: {}, validatingFields: {}, errors: n.errors || {}, disabled: n.disabled || !1 }, s = {}, a = (we(n.defaultValues) || we(n.values)) && De(n.defaultValues || n.values) || {}, o = n.shouldUnregister ? {} : De(a), l = { action: !1, mount: !1, watch: !1 }, i = { mount: /* @__PURE__ */ new Set(), disabled: /* @__PURE__ */ new Set(), unMount: /* @__PURE__ */ new Set(), array: /* @__PURE__ */ new Set(), watch: /* @__PURE__ */ new Set() }, c = 0;
2283
+ const f = { isDirty: !1, dirtyFields: !1, validatingFields: !1, touchedFields: !1, isValidating: !1, isValid: !1, errors: !1 };
2284
+ let x = { ...f };
2285
+ const y = { array: hr(), state: hr() }, b = n.criteriaMode === Ct, v = async (d) => {
2286
+ if (!n.disabled && (f.isValid || x.isValid || d)) {
2287
+ const g = n.resolver ? Ne((await w()).errors) : await E(s, !0);
2288
+ g !== t.isValid && y.state.next({ isValid: g });
2289
+ }
2290
+ }, m = (d, g) => {
2291
+ !n.disabled && (f.isValidating || f.validatingFields || x.isValidating || x.validatingFields) && ((d || Array.from(i.mount)).forEach((C) => {
2292
+ C && (g ? fe(t.validatingFields, C, g) : ve(t.validatingFields, C));
2293
+ }), y.state.next({ validatingFields: t.validatingFields, isValidating: !Ne(t.validatingFields) }));
2294
+ }, h = (d, g, C, F) => {
2295
+ const _ = W(s, d);
2296
+ if (_) {
2297
+ const N = W(o, d, xe(C) ? W(a, d) : C);
2298
+ xe(N) || F && F.defaultChecked || g ? fe(o, d, g ? N : br(_._f)) : O(d, N), l.mount && v();
2299
+ }
2300
+ }, p = (d, g, C, F, _) => {
2301
+ let N = !1, j = !1;
2302
+ const H = { name: d };
2303
+ if (!n.disabled) {
2304
+ if (!C || F) {
2305
+ (f.isDirty || x.isDirty) && (j = t.isDirty, t.isDirty = H.isDirty = T(), N = j !== H.isDirty);
2306
+ const U = qe(W(a, d), g);
2307
+ j = !!W(t.dirtyFields, d), U ? ve(t.dirtyFields, d) : fe(t.dirtyFields, d, !0), H.dirtyFields = t.dirtyFields, N = N || (f.dirtyFields || x.dirtyFields) && j !== !U;
2308
+ }
2309
+ if (C) {
2310
+ const U = W(t.touchedFields, d);
2311
+ U || (fe(t.touchedFields, d, C), H.touchedFields = t.touchedFields, N = N || (f.touchedFields || x.touchedFields) && U !== C);
2312
+ }
2313
+ N && _ && y.state.next(H);
2314
+ }
2315
+ return N ? H : {};
2316
+ }, u = (d, g, C, F) => {
2317
+ const _ = W(t.errors, d), N = (f.isValid || x.isValid) && $e(g) && t.isValid !== g;
2318
+ var j;
2319
+ if (n.delayError && C ? (j = () => ((H, U) => {
2320
+ fe(t.errors, H, U), y.state.next({ errors: t.errors });
2321
+ })(d, C), r = (H) => {
2322
+ clearTimeout(c), c = setTimeout(j, H);
2323
+ }, r(n.delayError)) : (clearTimeout(c), r = null, C ? fe(t.errors, d, C) : ve(t.errors, d)), (C ? !qe(_, C) : _) || !Ne(F) || N) {
2324
+ const H = { ...F, ...N && $e(g) ? { isValid: g } : {}, errors: t.errors, name: d };
2325
+ t = { ...t, ...H }, y.state.next(H);
2326
+ }
2327
+ }, w = async (d) => {
2328
+ m(d, !0);
2329
+ const g = await n.resolver(o, n.context, ((C, F, _, N) => {
2330
+ const j = {};
2331
+ for (const H of C) {
2332
+ const U = W(F, H);
2333
+ U && fe(j, H, U._f);
2334
+ }
2335
+ return { criteriaMode: _, names: [...C], fields: j, shouldUseNativeValidation: N };
2336
+ })(d || i.mount, s, n.criteriaMode, n.shouldUseNativeValidation));
2337
+ return m(d), g;
2338
+ }, E = async (d, g, C = { valid: !0 }) => {
2339
+ for (const F in d) {
2340
+ const _ = d[F];
2341
+ if (_) {
2342
+ const { _f: N, ...j } = _;
2343
+ if (N) {
2344
+ const H = i.array.has(N.name), U = _._f && Fa(_._f);
2345
+ U && f.validatingFields && m([N.name], !0);
2346
+ const K = await Dr(_, i.disabled, o, b, n.shouldUseNativeValidation && !g, H);
2347
+ if (U && f.validatingFields && m([N.name]), K[N.name] && (C.valid = !1, g)) break;
2348
+ !g && (W(K, N.name) ? H ? _a(t.errors, K, N.name) : fe(t.errors, N.name, K[N.name]) : ve(t.errors, N.name));
2349
+ }
2350
+ !Ne(j) && await E(j, g, C);
2351
+ }
2352
+ }
2353
+ return C.valid;
2354
+ }, T = (d, g) => !n.disabled && (d && g && fe(o, d, g), !qe(I(), a)), L = (d, g, C) => ((F, _, N, j, H) => Fe(F) ? (j && _.watch.add(F), W(N, F, H)) : Array.isArray(F) ? F.map((U) => (j && _.watch.add(U), W(N, U))) : (j && (_.watchAll = !0), N))(d, i, { ...l.mount ? o : xe(g) ? a : Fe(d) ? { [d]: g } : g }, C, g), O = (d, g, C = {}) => {
2355
+ const F = W(s, d);
2356
+ let _ = g;
2357
+ if (F) {
2358
+ const N = F._f;
2359
+ N && (!N.disabled && fe(o, d, Oo(g, N)), _ = Bt(N.ref) && Re(g) ? "" : g, ko(N.ref) ? [...N.ref.options].forEach((j) => j.selected = _.includes(j.value)) : N.refs ? St(N.ref) ? N.refs.forEach((j) => {
2360
+ j.defaultChecked && j.disabled || (Array.isArray(_) ? j.checked = !!_.find((H) => H === j.value) : j.checked = _ === j.value || !!_);
2361
+ }) : N.refs.forEach((j) => j.checked = j.value === _) : kn(N.ref) ? N.ref.value = "" : (N.ref.value = _, N.ref.type || y.state.next({ name: d, values: De(o) })));
2362
+ }
2363
+ (C.shouldDirty || C.shouldTouch) && p(d, _, C.shouldTouch, C.shouldDirty, !0), C.shouldValidate && M(d);
2364
+ }, R = (d, g, C) => {
2365
+ for (const F in g) {
2366
+ if (!g.hasOwnProperty(F)) return;
2367
+ const _ = g[F], N = d + "." + F, j = W(s, N);
2368
+ (i.array.has(d) || we(_) || j && !j._f) && !tt(_) ? R(N, _, C) : O(N, _, C);
2369
+ }
2370
+ }, S = (d, g, C = {}) => {
2371
+ const F = W(s, d), _ = i.array.has(d), N = De(g);
2372
+ fe(o, d, N), _ ? (y.array.next({ name: d, values: De(o) }), (f.isDirty || f.dirtyFields || x.isDirty || x.dirtyFields) && C.shouldDirty && y.state.next({ name: d, dirtyFields: it(a, o), isDirty: T(d, N) })) : !F || F._f || Re(N) ? O(d, N, C) : R(d, N, C), wr(d, i) && y.state.next({ ...t, name: d }), y.state.next({ name: l.mount ? d : void 0, values: De(o) });
2373
+ }, D = async (d) => {
2374
+ l.mount = !0;
2375
+ const g = d.target;
2376
+ let C = g.name, F = !0;
2377
+ const _ = W(s, C), N = (U) => {
2378
+ F = Number.isNaN(U) || tt(U) && isNaN(U.getTime()) || qe(U, W(o, C, U));
2379
+ }, j = vr(n.mode), H = vr(n.reValidateMode);
2380
+ if (_) {
2381
+ let U, K;
2382
+ const te = g.type ? br(_._f) : ((pe) => we(pe) && pe.target ? St(pe.target) ? pe.target.checked : pe.target.value : pe)(d), ue = d.type === wa || d.type === ka, he = !((pe) => pe.mount && (pe.required || pe.min || pe.max || pe.maxLength || pe.minLength || pe.pattern || pe.validate))(_._f) && !n.resolver && !W(t.errors, C) && !_._f.deps || ((pe, $, ke, ft, He) => !He.isOnAll && (!ke && He.isOnTouch ? !($ || pe) : (ke ? ft.isOnBlur : He.isOnBlur) ? !pe : !(ke ? ft.isOnChange : He.isOnChange) || pe))(ue, W(t.touchedFields, C), t.isSubmitted, H, j), Le = wr(C, i, ue);
2383
+ fe(o, C, te), ue ? g && g.readOnly || (_._f.onBlur && _._f.onBlur(d), r && r(0)) : _._f.onChange && _._f.onChange(d);
2384
+ const Ce = p(C, te, ue), Y = !Ne(Ce) || Le;
2385
+ if (!ue && y.state.next({ name: C, type: d.type, values: De(o) }), he) return (f.isValid || x.isValid) && (n.mode === "onBlur" ? ue && v() : ue || v()), Y && y.state.next({ name: C, ...Le ? {} : Ce });
2386
+ if (!ue && Le && y.state.next({ ...t }), n.resolver) {
2387
+ const { errors: pe } = await w([C]);
2388
+ if (N(te), F) {
2389
+ const $ = kr(t.errors, s, C), ke = kr(pe, s, $.name || C);
2390
+ U = ke.error, C = ke.name, K = Ne(pe);
2391
+ }
2392
+ } else m([C], !0), U = (await Dr(_, i.disabled, o, b, n.shouldUseNativeValidation))[C], m([C]), N(te), F && (U ? K = !1 : (f.isValid || x.isValid) && (K = await E(s, !0)));
2393
+ F && (_._f.deps && (!Array.isArray(_._f.deps) || _._f.deps.length > 0) && M(_._f.deps), u(C, K, U, Ce));
2394
+ }
2395
+ }, P = (d, g) => {
2396
+ if (W(t.errors, g) && d.focus) return d.focus(), 1;
2397
+ }, M = async (d, g = {}) => {
2398
+ let C, F;
2399
+ const _ = xt(d);
2400
+ if (n.resolver) {
2401
+ const N = await (async (j) => {
2402
+ const { errors: H } = await w(j);
2403
+ if (j) for (const U of j) {
2404
+ const K = W(H, U);
2405
+ K ? fe(t.errors, U, K) : ve(t.errors, U);
2406
+ }
2407
+ else t.errors = H;
2408
+ return H;
2409
+ })(xe(d) ? d : _);
2410
+ C = Ne(N), F = d ? !_.some((j) => W(N, j)) : C;
2411
+ } else d ? (F = (await Promise.all(_.map(async (N) => {
2412
+ const j = W(s, N);
2413
+ return await E(j && j._f ? { [N]: j } : j);
2414
+ }))).every(Boolean), (F || t.isValid) && v()) : F = C = await E(s);
2415
+ return y.state.next({ ...!Fe(d) || (f.isValid || x.isValid) && C !== t.isValid ? {} : { name: d }, ...n.resolver || !d ? { isValid: C } : {}, errors: t.errors }), g.shouldFocus && !F && Dt(s, P, d ? _ : i.mount), F;
2416
+ }, I = (d, g) => {
2417
+ let C = { ...l.mount ? o : a };
2418
+ return g && (C = wo(g.dirtyFields ? t.dirtyFields : t.touchedFields, C)), xe(d) ? C : Fe(d) ? W(C, d) : d.map((F) => W(C, F));
2419
+ }, A = (d, g) => ({ invalid: !!W((g || t).errors, d), isDirty: !!W((g || t).dirtyFields, d), error: W((g || t).errors, d), isValidating: !!W(t.validatingFields, d), isTouched: !!W((g || t).touchedFields, d) }), V = (d, g, C) => {
2420
+ const F = (W(s, d, { _f: {} })._f || {}).ref, _ = W(t.errors, d) || {}, { ref: N, message: j, type: H, ...U } = _;
2421
+ fe(t.errors, d, { ...U, ...g, ref: F }), y.state.next({ name: d, errors: t.errors, isValid: !1 }), C && C.shouldFocus && F && F.focus && F.focus();
2422
+ }, B = (d) => y.state.subscribe({ next: (g) => {
2423
+ var C, F, _;
2424
+ C = d.name, F = g.name, _ = d.exact, C && F && C !== F && !xt(C).some((N) => N && (_ ? N === F : N.startsWith(F) || F.startsWith(N))) || !((N, j, H, U) => {
2425
+ H(N);
2426
+ const { name: K, ...te } = N;
2427
+ return Ne(te) || Object.keys(te).length >= Object.keys(j).length || Object.keys(te).find((ue) => j[ue] === (!U || Ct));
2428
+ })(g, d.formState || f, le, d.reRenderRoot) || d.callback({ values: { ...o }, ...t, ...g, defaultValues: a });
2429
+ } }).unsubscribe, z = (d, g = {}) => {
2430
+ for (const C of d ? xt(d) : i.mount) i.mount.delete(C), i.array.delete(C), g.keepValue || (ve(s, C), ve(o, C)), !g.keepError && ve(t.errors, C), !g.keepDirty && ve(t.dirtyFields, C), !g.keepTouched && ve(t.touchedFields, C), !g.keepIsValidating && ve(t.validatingFields, C), !n.shouldUnregister && !g.keepDefaultValue && ve(a, C);
2431
+ y.state.next({ values: De(o) }), y.state.next({ ...t, ...g.keepDirty ? { isDirty: T() } : {} }), !g.keepIsValid && v();
2432
+ }, ie = ({ disabled: d, name: g }) => {
2433
+ ($e(d) && l.mount || d || i.disabled.has(g)) && (d ? i.disabled.add(g) : i.disabled.delete(g));
2434
+ }, G = (d, g = {}) => {
2435
+ let C = W(s, d);
2436
+ const F = $e(g.disabled) || $e(n.disabled);
2437
+ return fe(s, d, { ...C || {}, _f: { ...C && C._f ? C._f : { ref: { name: d } }, name: d, mount: !0, ...g } }), i.mount.add(d), C ? ie({ disabled: $e(g.disabled) ? g.disabled : n.disabled, name: d }) : h(d, !0, g.value), { ...F ? { disabled: g.disabled || n.disabled } : {}, ...n.progressive ? { required: !!g.required, min: vt(g.min), max: vt(g.max), minLength: vt(g.minLength), maxLength: vt(g.maxLength), pattern: vt(g.pattern) } : {}, name: d, onChange: D, onBlur: D, ref: (_) => {
2438
+ if (_) {
2439
+ G(d, g), C = W(s, d);
2440
+ const N = xe(_.value) && _.querySelectorAll && _.querySelectorAll("input,select,textarea")[0] || _, j = ((U) => Sn(U) || St(U))(N), H = C._f.refs || [];
2441
+ if (j ? H.find((U) => U === N) : N === C._f.ref) return;
2442
+ fe(s, d, { _f: { ...C._f, ...j ? { refs: [...H.filter(Jt), N, ...Array.isArray(W(a, d)) ? [{}] : []], ref: { type: N.type, name: d } } : { ref: N } } }), h(d, !1, void 0, N);
2443
+ } else C = W(s, d, {}), C._f && (C._f.mount = !1), (n.shouldUnregister || g.shouldUnregister) && (!((N, j) => N.has(((H) => H.substring(0, H.search(/\.\d+(\.|$)/)) || H)(j)))(i.array, d) || !l.action) && i.unMount.add(d);
2444
+ } };
2445
+ }, Q = () => n.shouldFocusError && Dt(s, P, i.mount), re = (d, g) => async (C) => {
2446
+ let F;
2447
+ C && (C.preventDefault && C.preventDefault(), C.persist && C.persist());
2448
+ let _ = De(o);
2449
+ if (y.state.next({ isSubmitting: !0 }), n.resolver) {
2450
+ const { errors: N, values: j } = await w();
2451
+ t.errors = N, _ = De(j);
2452
+ } else await E(s);
2453
+ if (i.disabled.size) for (const N of i.disabled) ve(_, N);
2454
+ if (ve(t.errors, "root"), Ne(t.errors)) {
2455
+ y.state.next({ errors: {} });
2456
+ try {
2457
+ await d(_, C);
2458
+ } catch (N) {
2459
+ F = N;
2460
+ }
2461
+ } else g && await g({ ...t.errors }, C), Q(), setTimeout(Q);
2462
+ if (y.state.next({ isSubmitted: !0, isSubmitting: !1, isSubmitSuccessful: Ne(t.errors) && !F, submitCount: t.submitCount + 1, errors: t.errors }), F) throw F;
2463
+ }, se = (d, g = {}) => {
2464
+ const C = d ? De(d) : a, F = De(C), _ = Ne(d), N = _ ? a : F;
2465
+ if (g.keepDefaultValues || (a = C), !g.keepValues) {
2466
+ if (g.keepDirtyValues) {
2467
+ const j = /* @__PURE__ */ new Set([...i.mount, ...Object.keys(it(a, o))]);
2468
+ for (const H of Array.from(j)) W(t.dirtyFields, H) ? fe(N, H, W(o, H)) : S(H, W(N, H));
2469
+ } else {
2470
+ if (xn && xe(d)) for (const j of i.mount) {
2471
+ const H = W(s, j);
2472
+ if (H && H._f) {
2473
+ const U = Array.isArray(H._f.refs) ? H._f.refs[0] : H._f.ref;
2474
+ if (Bt(U)) {
2475
+ const K = U.closest("form");
2476
+ if (K) {
2477
+ K.reset();
2478
+ break;
2479
+ }
2480
+ }
2481
+ }
2482
+ }
2483
+ if (g.keepFieldsRef) for (const j of i.mount) S(j, W(N, j));
2484
+ else s = {};
2485
+ }
2486
+ o = n.shouldUnregister ? g.keepDefaultValues ? De(a) : {} : De(N), y.array.next({ values: { ...N } }), y.state.next({ values: { ...N } });
2487
+ }
2488
+ i = { mount: g.keepDirtyValues ? i.mount : /* @__PURE__ */ new Set(), unMount: /* @__PURE__ */ new Set(), array: /* @__PURE__ */ new Set(), disabled: /* @__PURE__ */ new Set(), watch: /* @__PURE__ */ new Set(), watchAll: !1, focus: "" }, l.mount = !f.isValid || !!g.keepIsValid || !!g.keepDirtyValues, l.watch = !!n.shouldUnregister, y.state.next({ submitCount: g.keepSubmitCount ? t.submitCount : 0, isDirty: !_ && (g.keepDirty ? t.isDirty : !(!g.keepDefaultValues || qe(d, a))), isSubmitted: !!g.keepIsSubmitted && t.isSubmitted, dirtyFields: _ ? {} : g.keepDirtyValues ? g.keepDefaultValues && o ? it(a, o) : t.dirtyFields : g.keepDefaultValues && d ? it(a, d) : g.keepDirty ? t.dirtyFields : {}, touchedFields: g.keepTouched ? t.touchedFields : {}, errors: g.keepErrors ? t.errors : {}, isSubmitSuccessful: !!g.keepIsSubmitSuccessful && t.isSubmitSuccessful, isSubmitting: !1, defaultValues: a });
2489
+ }, ee = (d, g) => se(Be(d) ? d(o) : d, g), le = (d) => {
2490
+ t = { ...t, ...d };
2491
+ }, ce = { control: { register: G, unregister: z, getFieldState: A, handleSubmit: re, setError: V, _subscribe: B, _runSchema: w, _focusError: Q, _getWatch: L, _getDirty: T, _setValid: v, _setFieldArray: (d, g = [], C, F, _ = !0, N = !0) => {
2492
+ if (F && C && !n.disabled) {
2493
+ if (l.action = !0, N && Array.isArray(W(s, d))) {
2494
+ const j = C(W(s, d), F.argA, F.argB);
2495
+ _ && fe(s, d, j);
2496
+ }
2497
+ if (N && Array.isArray(W(t.errors, d))) {
2498
+ const j = C(W(t.errors, d), F.argA, F.argB);
2499
+ _ && fe(t.errors, d, j), ((H, U) => {
2500
+ !on(W(H, U)).length && ve(H, U);
2501
+ })(t.errors, d);
2502
+ }
2503
+ if ((f.touchedFields || x.touchedFields) && N && Array.isArray(W(t.touchedFields, d))) {
2504
+ const j = C(W(t.touchedFields, d), F.argA, F.argB);
2505
+ _ && fe(t.touchedFields, d, j);
2506
+ }
2507
+ (f.dirtyFields || x.dirtyFields) && (t.dirtyFields = it(a, o)), y.state.next({ name: d, isDirty: T(d, g), dirtyFields: t.dirtyFields, errors: t.errors, isValid: t.isValid });
2508
+ } else fe(o, d, g);
2509
+ }, _setDisabledField: ie, _setErrors: (d) => {
2510
+ t.errors = d, y.state.next({ errors: t.errors, isValid: !1 });
2511
+ }, _getFieldArray: (d) => on(W(l.mount ? o : a, d, n.shouldUnregister ? W(a, d, []) : [])), _reset: se, _resetDefaultValues: () => Be(n.defaultValues) && n.defaultValues().then((d) => {
2512
+ ee(d, n.resetOptions), y.state.next({ isLoading: !1 });
2513
+ }), _removeUnmounted: () => {
2514
+ for (const d of i.unMount) {
2515
+ const g = W(s, d);
2516
+ g && (g._f.refs ? g._f.refs.every((C) => !Jt(C)) : !Jt(g._f.ref)) && z(d);
2517
+ }
2518
+ i.unMount = /* @__PURE__ */ new Set();
2519
+ }, _disableForm: (d) => {
2520
+ $e(d) && (y.state.next({ disabled: d }), Dt(s, (g, C) => {
2521
+ const F = W(s, C);
2522
+ F && (g.disabled = F._f.disabled || d, Array.isArray(F._f.refs) && F._f.refs.forEach((_) => {
2523
+ _.disabled = F._f.disabled || d;
2524
+ }));
2525
+ }, 0, !1));
2526
+ }, _subjects: y, _proxyFormState: f, get _fields() {
2527
+ return s;
2528
+ }, get _formValues() {
2529
+ return o;
2530
+ }, get _state() {
2531
+ return l;
2532
+ }, set _state(d) {
2533
+ l = d;
2534
+ }, get _defaultValues() {
2535
+ return a;
2536
+ }, get _names() {
2537
+ return i;
2538
+ }, set _names(d) {
2539
+ i = d;
2540
+ }, get _formState() {
2541
+ return t;
2542
+ }, get _options() {
2543
+ return n;
2544
+ }, set _options(d) {
2545
+ n = { ...n, ...d };
2546
+ } }, subscribe: (d) => (l.mount = !0, x = { ...x, ...d.formState }, B({ ...d, formState: x })), trigger: M, register: G, handleSubmit: re, watch: (d, g) => Be(d) ? y.state.subscribe({ next: (C) => "values" in C && d(L(void 0, g), C) }) : L(d, g, !0), setValue: S, getValues: I, reset: ee, resetField: (d, g = {}) => {
2547
+ W(s, d) && (xe(g.defaultValue) ? S(d, De(W(a, d))) : (S(d, g.defaultValue), fe(a, d, De(g.defaultValue))), g.keepTouched || ve(t.touchedFields, d), g.keepDirty || (ve(t.dirtyFields, d), t.isDirty = g.defaultValue ? T(d, De(W(a, d))) : T()), g.keepError || (ve(t.errors, d), f.isValid && v()), y.state.next({ ...t }));
2548
+ }, clearErrors: (d) => {
2549
+ d && xt(d).forEach((g) => ve(t.errors, g)), y.state.next({ errors: d ? t.errors : {} });
2550
+ }, unregister: z, setError: V, setFocus: (d, g = {}) => {
2551
+ const C = W(s, d), F = C && C._f;
2552
+ if (F) {
2553
+ const _ = F.refs ? F.refs[0] : F.ref;
2554
+ _.focus && (_.focus(), g.shouldSelect && Be(_.select) && _.select());
2555
+ }
2556
+ }, getFieldState: A };
2557
+ return { ...ce, formControl: ce };
2558
+ }
2559
+ function Va(e = {}) {
2560
+ const r = q.useRef(void 0), n = q.useRef(void 0), [t, s] = q.useState({ isDirty: !1, isValidating: !1, isLoading: Be(e.defaultValues), isSubmitted: !1, isSubmitting: !1, isSubmitSuccessful: !1, isValid: !1, submitCount: 0, dirtyFields: {}, touchedFields: {}, validatingFields: {}, errors: e.errors || {}, disabled: e.disabled || !1, isReady: !1, defaultValues: Be(e.defaultValues) ? void 0 : e.defaultValues });
2561
+ if (!r.current) if (e.formControl) r.current = { ...e.formControl, formState: t }, e.defaultValues && !Be(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
2562
+ else {
2563
+ const { formControl: o, ...l } = Ia(e);
2564
+ r.current = { ...l, formState: t };
2565
+ }
2566
+ const a = r.current.control;
2567
+ return a._options = e, Ra(() => {
2568
+ const o = a._subscribe({ formState: a._proxyFormState, callback: () => s({ ...a._formState }), reRenderRoot: !0 });
2569
+ return s((l) => ({ ...l, isReady: !0 })), a._formState.isReady = !0, o;
2570
+ }, [a]), q.useEffect(() => a._disableForm(e.disabled), [a, e.disabled]), q.useEffect(() => {
2571
+ e.mode && (a._options.mode = e.mode), e.reValidateMode && (a._options.reValidateMode = e.reValidateMode);
2572
+ }, [a, e.mode, e.reValidateMode]), q.useEffect(() => {
2573
+ e.errors && (a._setErrors(e.errors), a._focusError());
2574
+ }, [a, e.errors]), q.useEffect(() => {
2575
+ e.shouldUnregister && a._subjects.state.next({ values: a._getWatch() });
2576
+ }, [a, e.shouldUnregister]), q.useEffect(() => {
2577
+ if (a._proxyFormState.isDirty) {
2578
+ const o = a._getDirty();
2579
+ o !== t.isDirty && a._subjects.state.next({ isDirty: o });
2580
+ }
2581
+ }, [a, t.isDirty]), q.useEffect(() => {
2582
+ e.values && !qe(e.values, n.current) ? (a._reset(e.values, { keepFieldsRef: !0, ...a._options.resetOptions }), n.current = e.values, s((o) => ({ ...o }))) : a._resetDefaultValues();
2583
+ }, [a, e.values]), q.useEffect(() => {
2584
+ a._state.mount || (a._setValid(), a._state.mount = !0), a._state.watch && (a._state.watch = !1, a._subjects.state.next({ ...a._formState })), a._removeUnmounted();
2585
+ }), r.current.formState = ((o, l, i, c = !0) => {
2586
+ const f = { defaultValues: l._defaultValues };
2587
+ for (const x in o) Object.defineProperty(f, x, { get: () => {
2588
+ const y = x;
2589
+ return l._proxyFormState[y] !== Ct && (l._proxyFormState[y] = !c || Ct), o[y];
2590
+ } });
2591
+ return f;
2592
+ })(t, a), r.current;
2593
+ }
2594
+ const La = ["Ok", "Cancel"], Or = oe(de((e, r) => {
2595
+ const { description: n, icon: t, onCancel: s, onOption: a, onDone: o, onValidateOption: l, createOptionsButton: i, options: c = La, autoFocusSel: f = ".defaultOption", defaultOption: x = c[0], cancelOption: y = "Cancel", children: b, ...v } = e, m = Va({ shouldUseNativeValidation: !1 }), { handleSubmit: h, formState: p } = m, u = ge(null), w = ge(null), E = ge(null), T = ae(async (P) => {
2596
+ let M;
2597
+ try {
2598
+ if (M = await Promise.resolve(l?.(P)) ?? !0, M !== !0) return;
2599
+ await Promise.resolve(a?.(P, P === y, P === x)), o?.(P);
2600
+ } catch {
2601
+ }
2602
+ }, [a, o, l, y, x]), L = ae((P, M) => {
2603
+ setTimeout(() => {
2604
+ T(x);
2605
+ }, 180);
2606
+ }, [T]), O = ae(() => {
2607
+ a?.(y, !0, !1), s?.(), o?.(null);
2608
+ }, [a, y, s, o]), R = p && (Object.keys(p.errors).length > 0 || p.disabled || p.isSubmitted), S = ae((P, M) => {
2609
+ const I = P === y, A = { className: M ? "defaultOption" : "action", type: M ? "submit" : "button", style: { minWidth: "75px" }, onClick: () => {
2610
+ I ? O() : M || T(P);
2611
+ } };
2612
+ if (i) return i(P, A, M);
2613
+ const V = { className: M ? "defaultOption" : "action", variant: M ? "contained" : "outlined", size: "small", disabled: !I && R, color: "primary", ...A };
2614
+ if (M || I) {
2615
+ const B = M ? u : w;
2616
+ V.touchRippleRef = B, V.onPointerDown = (z) => {
2617
+ B.current?.start(z, { center: !1 }), z.stopPropagation(), z.preventDefault();
2618
+ };
2619
+ }
2620
+ return k(Yo, { ...V, children: k("div", { style: { paddingTop: "3px" }, children: P }) }, `action:${P}`);
2621
+ }, [c, x, y, i, p]), D = Z(() => {
2622
+ const P = [];
2623
+ for (let M = 0; M < c.length; M++) {
2624
+ const I = c[M], A = x ? I === x : M === 0;
2625
+ P.push(S(I, A));
2626
+ }
2627
+ return P;
2628
+ }, [c, x, p]);
2629
+ return k(ma, { onCancel: O, initialPosition: { y: xa === "touch" ? "15" : "35" }, onDone: o, autoFocusSel: f, isModal: !0, ref: r, ...v, children: k(Pa, { ...m, children: J("form", { ref: E, onSubmit: h(L), children: [k(Go, { dividers: !0, onKeyDown: (P) => {
2630
+ if (P.isDefaultPrevented()) return;
2631
+ P.stopPropagation();
2632
+ let M = null, I = null;
2633
+ const A = P.which === Pe.Escape && y;
2634
+ if (A) M = y, I = w;
2635
+ else {
2636
+ if (R) return;
2637
+ P.which === Pe.Enter && (M = x ?? c[0], I = u);
2638
+ }
2639
+ M && (I.current?.start(P, { center: !1 }), setTimeout(() => {
2640
+ I.current?.stop(P), A && T(M);
2641
+ }, 180));
2642
+ }, children: J(X, { sx: { display: "flex", flexDirection: "column", whiteSpace: "pre-wrap", rowGap: (P) => P.spacing(t || n ? 1.5 : 0) }, children: [J(X, { sx: { display: "flex", flexDirection: "column" }, children: [t, k(Me, { children: n })] }), b] }) }), k(Xo, { sx: { paddingTop: (P) => P.spacing(1), paddingBottom: (P) => P.spacing(1), paddingLeft: (P) => P.spacing(1), paddingRight: (P) => P.spacing(1), backgroundColor: (P) => me(P.palette.action.hover, 0.03) }, children: D })] }) }) });
2643
+ })), Ba = Object.freeze(Object.defineProperty({ __proto__: null, OptionsDialog: Or, default: Or }, Symbol.toStringTag, { value: "Module" })), ja = q.lazy(() => Promise.resolve().then(() => Ba)), Os = (e) => {
2644
+ const { showModal: r } = gn();
2645
+ return (n) => new Promise((t) => {
2646
+ const s = r(ja, { ...e, ...n, onOption(a) {
2647
+ n?.onOption?.(a, a === n.cancelOption, a === n.defaultOption), t(a);
2648
+ }, onDone: () => {
2649
+ n?.onDone?.(), s.hide();
2650
+ } });
2651
+ });
2652
+ }, $a = q.lazy(() => import("./_ZZgLPCRySUJRlwk.mjs")), Cs = (e) => {
2653
+ const { showModal: r } = gn();
2654
+ return (n) => {
2655
+ const { defaultOption: t = n.options?.[0], cancelOption: s = "Cancel", ...a } = n;
2656
+ return new Promise((o) => {
2657
+ const l = r($a, { ...e, defaultOption: t, cancelOption: s, onOption(i) {
2658
+ a?.onOption?.(i, i === s, i === t), o({ input: "", option: i });
2659
+ }, onInputOption(i, c) {
2660
+ a?.onInputOption?.(i, c), o({ input: i, option: c });
2661
+ }, onDone: () => {
2662
+ a?.onDone?.(), l.hide();
2663
+ } });
2664
+ });
2665
+ };
2666
+ }, Dn = oe(de((e, r) => {
2667
+ const { command: n, disabled: t = !1, shortcut: s, children: a, ...o } = e;
2668
+ return cn(n), k(pt, { ref: r, label: t !== void 0 ? n?.label() : "", shortcut: s !== void 0 ? s : Array.isArray(n?.shortcut()) ? n?.shortcut()[0] : n?.shortcut(), description: n?.description(), disabled: t, chips: n?.tags(), componentDisabled: n?.disabled(), ...o, children: k("div", { style: { display: "flex", flex: "1 1 0%" }, children: a }) });
2669
+ })), za = k(be, {}), Eo = oe(de((e, r) => {
2670
+ const { command: n, commandHook: t, scope: s, context: a, icon: o, label: l, disabled: i = !1, variant: c = Ae.Toolbar, shortcut: f, commandState: x, tooltipProps: y, ...b } = e, v = ge(null), m = ge(!1), h = Z(() => {
2671
+ const R = { onExecute(S, D) {
2672
+ t?.onExecute?.(S, D), m.current || (v.current?.start({ center: !1 }), setTimeout(() => v.current?.stop({}), 180)), m.current = !1;
2673
+ }, onError(S, D, P) {
2674
+ t?.onError(S, D, P);
2675
+ } };
2676
+ return t?.beforeExecute && (R.beforeExecute = t.beforeExecute), R;
2677
+ }, [t]), p = cn(n, h), u = _e((R) => {
2678
+ R.button === 0 && R.preventDefault();
2679
+ }, []), w = _e((R) => {
2680
+ R.button === 0 && n?.execute(x, t);
2681
+ }, [p, t, x]), E = _e((R) => {
2682
+ R.keyCode !== Pe.Enter && R.keyCode !== Pe.Space || n?.execute(x, t);
2683
+ }, [p, t, x]), T = Z(() => {
2684
+ if (o) return typeof o == "function" ? o(n) : o;
2685
+ let R = n?.icon(a);
2686
+ return R ? (typeof R == "string" && (R = k(be, { iconKey: R })), R) : c === Ae.Toolbar || n?.state() ? void 0 : za;
2687
+ }, [p, o]), L = Z(() => ({ tabIndex: 0, ref: r, selected: n?.state(), icon: c === Ae.Toolbar ? T : k(Ai, { selected: n?.state() ?? !1, children: T }), touchRippleRef: v, disabled: i || !n || n.disabled(), onMouseDown: u, onMouseUp: w, onKeyDown: E }), [p, t, i, T]);
2688
+ let O;
2689
+ return O = c === Ae.Menuitem ? k(Ot, { ...b, chips: n?.tags(), ...L, children: l ?? n?.label(s, a) }) : k(Wt, { ...b, ...L }), (l || n?.label()) && ((n.disabled() || i) && (O = k("div", { children: O })), O = k(Dn, { command: n, placement: c === Ae.Toolbar ? "bottom-start" : "right-start", shortcut: f, ...y, children: O })), O;
2690
+ }));
2691
+ Eo.displayName = "CommandButton";
2692
+ const Wa = k(be, {}), Es = oe(de((e, r) => {
2693
+ const { command: n, scope: t, icon: s = Wa, label: a, variant: o = Ae.Toolbar, disabled: l = !1, commandHook: i, ...c } = e, f = ge(null), x = ge(!1), y = Z(() => {
2694
+ const O = { onExecute(R, S) {
2695
+ i?.onExecute?.(R, S), x.current || (f.current?.start({ center: !1 }), setTimeout(() => f.current?.stop({}), 180)), x.current = !1;
2696
+ }, onError(R, S, D) {
2697
+ i?.onError(R, S, D);
2698
+ } };
2699
+ return i?.beforeExecute && (O.beforeExecute = i.beforeExecute), O;
2700
+ }, [i]), b = cn(n, y), v = () => n?.state()?.toString() || "0", [m, h] = ne(v), p = ae(() => {
2701
+ const O = parseFloat(m);
2702
+ isNaN(O) ? h(v()) : parseFloat(v()) !== O && n.execute(O, i);
2703
+ }, [v, n, m, i]);
2704
+ Se(() => {
2705
+ h(v());
2706
+ }, [n?.state()]);
2707
+ const u = Z(() => {
2708
+ let O = typeof s == "function" ? s(n) : s;
2709
+ return O && (O = n?.icon()), typeof O == "string" && (O = k(be, { iconKey: O })), O;
2710
+ }, [b, s, n?.icon]), w = Z(() => a === void 0 ? n?.label(t) : typeof a == "function" ? a() : a, [b]), E = Z(() => k(Ze, { ...c, sx: { paddingTop: "0px", paddingBottom: "0px" }, component: "div", disableRipple: !0, onClick: (O) => O.stopPropagation(), onMouseDown: (O) => {
2711
+ O.button === 0 && O.stopPropagation();
2712
+ }, onMouseUp: (O) => {
2713
+ O.button === 0 && O.stopPropagation();
2714
+ }, children: k(Ko, { inputMode: "numeric", disabled: l || !n || n.disabled(), inputProps: { tabIndex: 0, name: `input-${n.key()}`, autoComplete: "off", type: "number", maxLength: 4 }, sx: { paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (O) => `${Math.round(O.typography.fontSize)}px`, width: (O) => "3.2em", input: { padding: "0 0", textAlign: "center", MozAppearance: "textfield" }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" }, minHeight: "24px" }, value: m, onFocus: (O) => {
2715
+ O.target?.select();
2716
+ }, onKeyDown: (O) => {
2717
+ if (O.which === Pe.Enter) v() !== m && (O.stopPropagation(), O.preventDefault(), p());
2718
+ else if (O.which === Pe.Escape) v() !== m && (h(v()), setTimeout(() => {
2719
+ O.target?.select();
2720
+ }, 0), O.stopPropagation(), O.preventDefault());
2721
+ else {
2722
+ if (O.key.match("[-]") || O.key.match("[0-9.]") && (m + O.key).length > 4) return O.stopPropagation(), void O.preventDefault();
2723
+ if (O.which === Pe.Space) return void O.preventDefault();
2724
+ }
2725
+ }, onBlur: () => {
2726
+ p();
2727
+ }, onChange: (O) => {
2728
+ if (O.target.value.length > 4) return O.stopPropagation(), void O.preventDefault();
2729
+ h(O.target.value);
2730
+ } }) }), [m, l, n]), T = { tabIndex: 0, ref: r, icon: u, touchRippleRef: f, disabled: l || !n || n.disabled(), onMouseDown: (O) => {
2731
+ O.button === 0 && O.preventDefault();
2732
+ }, onMouseUp: (O) => {
2733
+ O.button !== 0 || O.isPropagationStopped() || O.isDefaultPrevented() || O.isDefaultPrevented() || (O.preventDefault(), n?.execute(!n?.state?.(), y));
2734
+ }, onKeyDown: (O) => {
2735
+ O.keyCode !== Pe.Enter && O.keyCode !== Pe.Space || n?.execute(!n?.state?.(), y);
2736
+ } };
2737
+ let L;
2738
+ return L = o === Ae.Menuitem ? J(Ot, { ...c, chips: n?.tags(), ...T, children: [w, E] }) : k(Wt, { ...c, ...T }), n?.label() && ((n.disabled() || l) && (L = k("div", { children: L })), L = k(Dn, { command: n, placement: o === Ae.Toolbar ? "bottom-start" : "right-start", children: L })), L;
2739
+ })), Mo = oe(de((e, r) => {
2740
+ const { variant: n = Ae.Toolbar, quickCommand: t, onQuickClick: s, commands: a, commandState: o, commandHook: l, disabled: i, label: c, icon: f, createPopupPanel: x, tooltip: y, selected: b, scope: v, ...m } = e, h = ge(null), p = ge(!1), u = Z(() => {
2741
+ const D = { onExecute(P, M) {
2742
+ l?.onExecute?.(P, M), p.current || (h.current?.start({ center: !1 }), setTimeout(() => h.current?.stop({}), 180)), p.current = !1;
2743
+ }, onError(P, M, I) {
2744
+ l?.onError(P, M, I);
2745
+ } };
2746
+ return l?.beforeExecute && (D.beforeExecute = l.beforeExecute), D;
2747
+ }, [l]), w = un(a, [t], null, [t]), E = w[0], { label: T, icon: L } = Z(() => {
2748
+ let D = null;
2749
+ c && (D = typeof c == "function" ? c(E) : c), D || (D = E?.label?.(v));
2750
+ let P = f;
2751
+ return P || (P = E?.icon?.()), typeof P == "string" ? P = k(be, { iconKey: P }) : typeof P == "function" && (P = P(E)), { label: D, icon: P };
2752
+ }, [w, c, f]), O = { disabled: i, scope: v, touchRippleRef: h, onQuickClick: s, tooltip: y, label: T, icon: L };
2753
+ (T || y) && (O.createTooltip = ({ children: D }, P) => k(pt, { label: T, description: y, disabled: P, children: D }));
2754
+ const R = ae((D) => x?.(D, a), [x, w]), S = ae((D) => E?.execute(o, u), [E]);
2755
+ return E ? (O.quickButtonProps = {}, O.quickButtonProps.createTooltip = ({ children: D, placement: P }, M) => k(Dn, { command: E, placement: P ?? n === Ae.Toolbar ? "bottom-start" : "right-start", disabled: M, children: D }), O.disabled = O.disabled ?? E?.disabled(), s || (O.onQuickClick = S)) : t && (O.onQuickClick = () => {
2756
+ }), O.selected = b ?? E?.state(), O.createPopupPanel = R, n === Ae.Toolbar ? k(mn, { ...m, ...O, ref: r }) : k(Zr, { ...m, ...O, ref: r });
2757
+ }));
2758
+ Mo.displayName = "CommandPopupButton";
2759
+ const Ha = k(be, { iconKey: "Check" }), Ms = (e) => {
2760
+ const { command: r, label: n, scope: t, icon: s = Ha, sx: a, ...o } = e;
2761
+ return J(X, { sx: { display: "flex", flexDirection: "row", textTransform: "none", alignItems: "center", fontSize: (l) => l.typography.subtitle2.fontSize, ...a }, ...o, children: [s, k(Me, { component: "div", sx: { whiteSpace: "nowrap", lineHeight: "1", paddingLeft: (l) => l.spacing(0.25), paddingRight: (l) => l.spacing(0.25), fontSize: "inherit" }, children: r?.label(t) || n })] });
2762
+ }, Ua = oe(de((e, r) => {
2763
+ const { sx: n, commands: t, commandButtonProps: s, parentFloat: a, createToolbarPalette: o, children: l, ...i } = e, c = Tr(r, () => ({}), []), [f, x] = ne(null), { reference: y } = zt({ label: "toolbar", anchor: c.current, parentFloat: a, createPopupPanel: null }), b = _e(() => {
2764
+ const O = f;
2765
+ O && requestAnimationFrame(() => {
2766
+ c.current?.contains(document.activeElement) && O.focus();
2767
+ });
2768
+ }, []), v = Z(() => ({ dense: !0, outlined: !1 }), []), m = Z(() => {
2769
+ const { commandHook: O, ...R } = s || {};
2770
+ return { commandHook: { beforeExecute: (S, D) => O?.beforeExecute?.(S, D) !== !1 && y.closeAll(), onExecute(S, D) {
2771
+ O?.onExecute?.(S, D), b();
2772
+ }, onError(S, D, P) {
2773
+ O?.onError?.(S, D, P);
2774
+ } }, ...R };
2775
+ }, [y, s]), h = Z(() => ({ ...v, ...m }), [v, m]), [p, u] = Ao((O) => O + 1, 0);
2776
+ un(t, [], { onChange: () => {
2777
+ u();
2778
+ } });
2779
+ const w = Z(() => ({ commands: t, parentFloat: y, ...m }), [p, h, y, s]);
2780
+ let E = 0;
2781
+ v.dense || (E += 2), v.outlined && E++;
2782
+ let T = 2;
2783
+ v.dense || (T = 4);
2784
+ const L = Z(() => o({ commands: t, commandButtonProps: h, commandPopupProps: { commands: t, ...w, ...s } }), [p, h, w, o]);
2785
+ return k(qo, { variant: "dense", sx: { minHeight: "unset", height: "unset", paddingTop: `${T}px`, paddingBottom: `${T}px`, paddingLeft: "6px !important", paddingRight: "6px !important", flex: "1 1 0%", alignItems: "center", userSelect: "none", flexGrow: 1, display: "flex", overflow: "hidden", ...n }, ref: c, onFocus: (O) => {
2786
+ O.relatedTarget && !f && x(O.relatedTarget);
2787
+ }, onBlur: (O) => {
2788
+ f && !c?.current?.contains(O.relatedTarget) && x(null);
2789
+ }, onKeyDown: (O) => {
2790
+ f && O.which === Pe.Escape && f.focus();
2791
+ }, ...i, children: k("div", { ref: c, style: { flex: "1 1 100%", display: "flex", flexWrap: "wrap", rowGap: `${T}px`, columnGap: `${E}px`, alignItems: "center", maxWidth: "100%" }, children: L }) });
2792
+ }));
2793
+ Ua.displayName = "CommandToolbar";
2794
+ const Ya = (e) => {
2795
+ const { key: r, ...n } = e;
2796
+ return k(Eo, { ...n }, r);
2797
+ }, Ts = oe(de((e, r) => {
2798
+ const { popupCommandKeys: n, renderCommandButton: t = Ya, scope: s, commands: a, quickCommand: o, popupScope: l = o, commandState: i, commandHook: c, disabled: f = !1, ...x } = e, y = un(a, n ? [o, ...n] : [o]), b = _e((v, m) => {
2799
+ const h = { variant: Ae.Menuitem, commandHook: c, commandState: i, scope: l, disabled: f }, p = [];
2800
+ for (let u = 0; u < n?.length; u++) {
2801
+ const w = n[u];
2802
+ if (w === null || w === "-") {
2803
+ p.push(k(ri, { orientation: "horizontal" }, `element-${p.length}`));
2804
+ continue;
2805
+ }
2806
+ const E = m.getCommand(w), T = { key: `${w}-${p.length}`, command: E, ...h }, L = t(T);
2807
+ L && p.push(L);
2808
+ }
2809
+ return hn({ ...v, children: p });
2810
+ }, [f, c, i, l, n, t]);
2811
+ return n ? k(Mo, { ref: r, commands: a, disabled: f, commandHook: c, commandState: i, scope: s, quickCommand: o, createPopupPanel: b, ...x }) : t({ ref: r, disabled: f, commandHook: c, commandState: i, scope: s, command: y[0], ...x });
2812
+ }));
2813
+ export {
2814
+ Di as $,
2815
+ Xr as A,
2816
+ ss as B,
2817
+ ls as C,
2818
+ cs as D,
2819
+ Wt as E,
2820
+ di as F,
2821
+ pi as G,
2822
+ Lr as H,
2823
+ Br as I,
2824
+ vs as J,
2825
+ dt as K,
2826
+ li as L,
2827
+ ks as M,
2828
+ Oi as N,
2829
+ Or as O,
2830
+ Ds as P,
2831
+ ma as Q,
2832
+ Os as R,
2833
+ Ai as S,
2834
+ ps as T,
2835
+ Cs as U,
2836
+ ji as V,
2837
+ Ss as W,
2838
+ gn as X,
2839
+ Gr as Y,
2840
+ ys as Z,
2841
+ bs as _,
2842
+ Ot as a,
2843
+ hn as a0,
2844
+ Vn as a1,
2845
+ zt as a2,
2846
+ qr as a3,
2847
+ Eo as a4,
2848
+ Es as a5,
2849
+ Mo as a6,
2850
+ Dn as a7,
2851
+ Ms as a8,
2852
+ Ua as a9,
2853
+ Ts as aa,
2854
+ xs as b,
2855
+ Oe as c,
2856
+ mn as d,
2857
+ Zr as e,
2858
+ ws as f,
2859
+ pt as g,
2860
+ Si as h,
2861
+ _n as i,
2862
+ hs as j,
2863
+ us as k,
2864
+ ds as l,
2865
+ xi as m,
2866
+ ms as n,
2867
+ fs as o,
2868
+ ns as p,
2869
+ Fr as q,
2870
+ rs as r,
2871
+ Kr as s,
2872
+ Jr as t,
2873
+ gs as u,
2874
+ os as v,
2875
+ ri as w,
2876
+ is as x,
2877
+ ai as y,
2878
+ as as z
2879
+ };