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