@sheetxl/utils-mui 0.7.8 → 0.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/{r9NfOw9U7QUJ3sMk.cjs → DIUotzYMXRdykNSY.cjs} +2 -2
- package/browser/cjs/DpTJa0u45JAzQWB1.cjs +11 -0
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{BdK_nANHPbXOoKy3.mjs → L_Sbw7bpPtGBreqv.mjs} +185 -182
- package/browser/esm/{_ZZgLPCRySUJRlwk.mjs → bIjdCamqibd-xaLk.mjs} +2 -2
- package/browser/esm/index.mjs +29 -28
- package/node/esm/{DHvOYCVK5KUCv0Ud.mjs → OcHIGuYIqbrgUydD.mjs} +1 -1
- package/node/esm/index.mjs +430 -427
- package/package.json +3 -3
- package/types/index.d.ts +40 -1
- package/browser/cjs/BPxl0jVX4EYr2DVy.cjs +0 -11
package/node/esm/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.7.
|
|
2
|
+
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.7.10
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
7
|
import { jsx as e, jsxs as t, Fragment as o } from "react/jsx-runtime";
|
|
8
|
-
import
|
|
8
|
+
import r, { memo as n, forwardRef as i, useMemo as a, useRef as l, useEffect as s, useState as c, useImperativeHandle as d, useCallback as p, useLayoutEffect as u, useReducer as m } from "react";
|
|
9
9
|
import h from "clsx";
|
|
10
|
-
import { alpha as f, darken as x, lighten as
|
|
11
|
-
import { IconButton as
|
|
10
|
+
import { alpha as f, darken as x, lighten as b } from "@mui/system";
|
|
11
|
+
import { IconButton as g, Divider as y, Box as v, Typography as k, Paper as w, Chip as C, Popper as M, Grow as S, Tooltip as P, ListItemIcon as R, MenuItem as D, Fade as E, Backdrop as T, DialogTitle as O, Button as $, DialogContent as z, DialogActions as I, Input as N, Toolbar as B } from "@mui/material";
|
|
12
12
|
import { ErrorUtils as L, CommonUtils as F } from "@sheetxl/utils";
|
|
13
13
|
import { defaultCreateScrollEdgeButton as A, ScrollbarOrientation as H, DynamicIcon as W, useCallbackRef as K, useFullscreenPortal as V, KeyCodes as q, KeyModifiers as _, ReactUtils as j, useImperativeElement as U, useCommand as Q, CommandButtonType as G, useCommands as X } from "@sheetxl/utils-react";
|
|
14
14
|
import { useTheme as Y, styled as J, createTheme as Z, useThemeProps as ee } from "@mui/material/styles";
|
|
15
15
|
import { deepmerge as te } from "@mui/utils";
|
|
16
16
|
import { detectOverflow as oe } from "@popperjs/core";
|
|
17
|
-
import { mergeRefs as
|
|
18
|
-
import { useIsomorphicLayoutEffect as
|
|
17
|
+
import { mergeRefs as re } from "react-merge-refs";
|
|
18
|
+
import { useIsomorphicLayoutEffect as ne, useMeasure as ie } from "react-use";
|
|
19
19
|
import ae from "tiny-invariant";
|
|
20
20
|
import { useModal as le } from "mui-modal-provider";
|
|
21
21
|
export * from "mui-modal-provider";
|
|
@@ -28,36 +28,36 @@ import { useForm as ue, FormProvider as me } from "react-hook-form";
|
|
|
28
28
|
const he = (e2) => {
|
|
29
29
|
const t2 = { style: { cursor: "pointer" }, ...e2 };
|
|
30
30
|
return A(t2);
|
|
31
|
-
}, fe = (t2, o2,
|
|
32
|
-
const { style: i2, ...a2 } = t2, l2 = e(
|
|
33
|
-
return e(gt, { title: t2.disabled ?
|
|
34
|
-
}, xe = (t2) => fe(t2, H.Horizontal ? e(W, { iconKey: "ArrowLeft", size: "small" }) : e(W, { iconKey: "ArrowUpward", size: "small" }), "Scroll " + (t2.orientation === H.Horizontal ? "Left" : "Up"), `Scroll ${t2.orientation === H.Horizontal ? "left" : "up"}, 'Ctrl+Click' to scroll to the beginning`),
|
|
35
|
-
const { orientation:
|
|
36
|
-
return e(y, { ref: o2, sx: { marginLeft: a2 ? "2px" : void 0, marginRight: a2 ? "2px" : void 0, backgroundColor: "transparent !important", minHeight: a2 ? "1em" : void 0, minWidth: a2 ? void 0 : "1em", borderColor: (e2) => e2.palette.divider, ...
|
|
37
|
-
})), ye = "_traverse-ellipsis_14l1h_1", ve =
|
|
38
|
-
const { sx:
|
|
39
|
-
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, "& .primary": { stroke: (e2) => e2.palette.grey[600], fill: "none" }, ...
|
|
40
|
-
}), ke =
|
|
41
|
-
const { sx:
|
|
42
|
-
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, "& .primary": { fill: (e2) => e2.palette.grey[600] }, "& .secondary": { stroke: (e2) => e2.palette.grey[600], fill: "none", opacity: 0.5 }, ...
|
|
43
|
-
}), we =
|
|
44
|
-
const { sx:
|
|
45
|
-
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, ...
|
|
46
|
-
}), Ce =
|
|
47
|
-
const { sx:
|
|
48
|
-
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, "& .primary": { fill: (e2) => e2.palette.grey[600], stroke: "none" }, ...
|
|
49
|
-
}), Me =
|
|
50
|
-
const { sx:
|
|
51
|
-
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, "& .primary": { stroke: (e2) => e2.palette.grey[600], opacity: 0.5, fill: "none" }, "& .secondary": { fillOpacity: (e2) => e2.palette.grey[600], opacity: 0.8, stroke: (e2) => e2.palette.background.paper }, ...
|
|
52
|
-
}), Se =
|
|
53
|
-
const { sx:
|
|
54
|
-
return t(v, { sx: { width: `${a2}px`, height: `${l2}px`, "& .primary": { backgroundColor: (e2) => e2.palette.grey[600], top: `${(l2 - i2) / 2}px`, width: () => `${i2}px`, height: () => `${i2}px` }, ...
|
|
55
|
-
}), Pe = e(ke, {}), Re =
|
|
56
|
-
const { sx:
|
|
57
|
-
let o3 = t(v, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "8px" }, children: [
|
|
58
|
-
return true === u2 && (o3 = e(w, { elevation: 0, sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", alignSelf: "center", marginBottom: "5%", backgroundColor: (e2) => e2.palette.info.light, color: (e2) => e2.palette.info.contrastText, paddingLeft: (e2) => e2.spacing(2), paddingRight: (e2) => e2.spacing(2), paddingTop: (e2) => e2.spacing(2), paddingBottom: (e2) => e2.spacing(1), rowGap: (e2) => e2.spacing(1), borderRadius: (e2) => `${e2.shape.borderRadius}px`, boxShadow: (e2) => e2.shadows[2], "& .primary": { background: (e2) => `${f(e2.palette.info.contrastText, 0.9)} !important`, boxShadow: (e2) => `0 0 0 1px ${"dark" === e2.palette.mode ? e2.palette.text.secondary : e2.palette.divider}`, boxSizing: "content-box", border: "solid transparent" }, zIndex: 1 }, children: o3 })), e(v, { ref:
|
|
59
|
-
}, [
|
|
60
|
-
return
|
|
31
|
+
}, fe = (t2, o2, r2, n2) => {
|
|
32
|
+
const { style: i2, ...a2 } = t2, l2 = e(g, { component: "div", ...a2, style: { ...i2, padding: "0px" }, sx: { padding: "0" }, color: t2.disabled ? void 0 : "primary", "aria-label": r2, size: "small", children: o2 });
|
|
33
|
+
return e(gt, { title: t2.disabled ? r2 : n2, enterDelay: 800, enterNextDelay: 1600, children: t2.disabled ? e("div", { style: { display: "flex" }, children: l2 }) : l2 });
|
|
34
|
+
}, xe = (t2) => fe(t2, H.Horizontal ? e(W, { iconKey: "ArrowLeft", size: "small" }) : e(W, { iconKey: "ArrowUpward", size: "small" }), "Scroll " + (t2.orientation === H.Horizontal ? "Left" : "Up"), `Scroll ${t2.orientation === H.Horizontal ? "left" : "up"}, 'Ctrl+Click' to scroll to the beginning`), be = (t2) => fe(t2, H.Horizontal ? e(W, { iconKey: "ArrowRight", size: "small" }) : e(W, { iconKey: "ArrowDownward", size: "small" }), "Scroll " + (t2.orientation === H.Horizontal ? "Right" : "Down"), `Scroll ${t2.orientation === H.Horizontal ? "right" : "down"}, 'Ctrl+Click' to scroll to the end`), ge = n(i((t2, o2) => {
|
|
35
|
+
const { orientation: r2 = "vertical", sx: n2, ...i2 } = t2, a2 = "vertical" === r2;
|
|
36
|
+
return e(y, { ref: o2, sx: { marginLeft: a2 ? "2px" : void 0, marginRight: a2 ? "2px" : void 0, backgroundColor: "transparent !important", minHeight: a2 ? "1em" : void 0, minWidth: a2 ? void 0 : "1em", borderColor: (e2) => e2.palette.divider, ...n2 }, orientation: r2, variant: "middle", flexItem: true, ...i2 });
|
|
37
|
+
})), ye = "_traverse-ellipsis_14l1h_1", ve = n((o2) => {
|
|
38
|
+
const { sx: r2, speed: n2 = 2, size: i2 = 70, ...a2 } = o2;
|
|
39
|
+
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, "& .primary": { stroke: (e2) => e2.palette.grey[600], fill: "none" }, ...r2 }, ...a2, children: t("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [e("circle", { className: "primary", strokeWidth: "4", cx: "50", cy: "50", r: "48" }), e("line", { className: "primary", strokeLinecap: "round", strokeWidth: "4", x1: "50", y1: "50", x2: "85", y2: "50.5", children: e("animateTransform", { attributeName: "transform", dur: `${n2}s`, type: "rotate", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" }) }), e("line", { className: "primary", strokeLinecap: "round", strokeWidth: "4", x1: "50", y1: "50", x2: "49.5", y2: "74", children: e("animateTransform", { attributeName: "transform", dur: 7.5 * n2 + "s", type: "rotate", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" }) })] }) });
|
|
40
|
+
}), ke = n((o2) => {
|
|
41
|
+
const { sx: r2, speed: n2 = 1.5, size: i2 = 70, ...a2 } = o2;
|
|
42
|
+
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, "& .primary": { fill: (e2) => e2.palette.grey[600] }, "& .secondary": { stroke: (e2) => e2.palette.grey[600], fill: "none", opacity: 0.5 }, ...r2 }, ...a2, children: t("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [e("circle", { className: "secondary", strokeWidth: "4", cx: "50", cy: "50", r: "21" }), e("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: e("animateTransform", { attributeName: "transform", type: "rotate", dur: 1 * n2 + "s", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" }) })] }) });
|
|
43
|
+
}), we = n((o2) => {
|
|
44
|
+
const { sx: r2, speed: n2 = 1, size: i2 = 70, ...a2 } = o2;
|
|
45
|
+
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, ...r2 }, ...a2, children: t("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [e("circle", { className: "primary", cx: "6", cy: "50", r: "6", children: e("animate", { attributeName: "opacity", dur: `${n2}s`, values: "0;1;0", repeatCount: "indefinite", begin: "0.1" }) }), e("circle", { className: "primary", cx: "26", cy: "50", r: "6", children: e("animate", { attributeName: "opacity", dur: `${n2}s`, values: "0;1;0", repeatCount: "indefinite", begin: "0.2" }) }), e("circle", { className: "primary", cx: "46", cy: "50", r: "6", children: e("animate", { attributeName: "opacity", dur: `${n2}s`, values: "0;1;0", repeatCount: "indefinite", begin: "0.3" }) })] }) });
|
|
46
|
+
}), Ce = n((o2) => {
|
|
47
|
+
const { sx: r2, speed: n2 = 1, size: i2 = 70, ...a2 } = o2;
|
|
48
|
+
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, "& .primary": { fill: (e2) => e2.palette.grey[600], stroke: "none" }, ...r2 }, ...a2, children: t("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [e("circle", { className: "primary", cx: "6", cy: "50", r: "6", children: e("animateTransform", { attributeName: "transform", dur: `${n2}s`, type: "translate", values: "0 15 ; 0 -15; 0 15", repeatCount: "indefinite", begin: "0.1" }) }), e("circle", { className: "primary", cx: "30", cy: "50", r: "6", children: e("animateTransform", { attributeName: "transform", dur: `${n2}s`, type: "translate", values: "0 10 ; 0 -10; 0 10", repeatCount: "indefinite", begin: "0.2" }) }), e("circle", { className: "primary", cx: "54", cy: "50", r: "6", children: e("animateTransform", { attributeName: "transform", dur: `${n2}s`, type: "translate", values: "0 5 ; 0 -5; 0 5", repeatCount: "indefinite", begin: "0.3" }) })] }) });
|
|
49
|
+
}), Me = n((o2) => {
|
|
50
|
+
const { sx: r2, speed: n2 = 2, size: i2 = 70, ...a2 } = o2;
|
|
51
|
+
return e(v, { sx: { width: `${i2}px`, height: `${i2}px`, zIndex: 1, "& .primary": { stroke: (e2) => e2.palette.grey[600], opacity: 0.5, fill: "none" }, "& .secondary": { fillOpacity: (e2) => e2.palette.grey[600], opacity: 0.8, stroke: (e2) => e2.palette.background.paper }, ...r2 }, ...a2, children: t("svg", { x: "0px", y: "0px", viewBox: "0 0 100 100", children: [e("circle", { className: "primary", strokeWidth: "4", cx: "50", cy: "50", r: "44" }), e("circle", { className: "secondary", strokeWidth: "3", cx: "8", cy: "54", r: "6", children: e("animateTransform", { attributeName: "transform", dur: `${n2}s`, type: "rotate", from: "0 50 48", to: "360 50 52", repeatCount: "indefinite" }) })] }) });
|
|
52
|
+
}), Se = n((o2) => {
|
|
53
|
+
const { sx: r2, speed: n2 = 1, size: i2 = 13, width: a2 = 64, height: l2 = 17, ...s2 } = o2;
|
|
54
|
+
return t(v, { sx: { width: `${a2}px`, height: `${l2}px`, "& .primary": { backgroundColor: (e2) => e2.palette.grey[600], top: `${(l2 - i2) / 2}px`, width: () => `${i2}px`, height: () => `${i2}px` }, ...r2 }, className: h(ye, "animated-icon"), ...s2, children: [e("div", { className: "primary" }), e("div", { className: "primary" }), e("div", { className: "primary" }), e("div", { className: "primary" })] });
|
|
55
|
+
}), Pe = e(ke, {}), Re = n(i((o2, r2) => {
|
|
56
|
+
const { sx: n2, style: i2, onMount: c2, onUnmount: d2, transitionDelay: p2 = "1200ms", panel: u2 = false, transparentBackground: m2 = true, icon: h2 = Pe, label: x2, ...b2 } = o2, g2 = a(() => "string" == typeof x2 ? e(k, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em" }, children: x2 }) : x2, [x2]), y2 = l(null), C2 = a(() => {
|
|
57
|
+
let o3 = t(v, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "8px" }, children: [g2, h2] });
|
|
58
|
+
return true === u2 && (o3 = e(w, { elevation: 0, sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", alignSelf: "center", marginBottom: "5%", backgroundColor: (e2) => e2.palette.info.light, color: (e2) => e2.palette.info.contrastText, paddingLeft: (e2) => e2.spacing(2), paddingRight: (e2) => e2.spacing(2), paddingTop: (e2) => e2.spacing(2), paddingBottom: (e2) => e2.spacing(1), rowGap: (e2) => e2.spacing(1), borderRadius: (e2) => `${e2.shape.borderRadius}px`, boxShadow: (e2) => e2.shadows[2], "& .primary": { background: (e2) => `${f(e2.palette.info.contrastText, 0.9)} !important`, boxShadow: (e2) => `0 0 0 1px ${"dark" === e2.palette.mode ? e2.palette.text.secondary : e2.palette.divider}`, boxSizing: "content-box", border: "solid transparent" }, zIndex: 1 }, children: o3 })), e(v, { ref: re([y2, r2]), className: "animatable", sx: { cursor: "wait", boxSizing: "border-box", alignItems: "center", justifyContent: "center", display: "flex", flexDirection: "column", willChange: "opacity", opacity: m2 ? 1e-3 : 1, transitionProperty: "opacity", transitionDelay: p2, 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" }, ...n2, ...i2 }, ...b2, children: t(v, { className: "center", sx: { display: "flex", flex: "1 1 100%", height: "100%", width: "100%", alignItems: "center", justifyContent: "center", boxSizing: "border-box", position: "relative" }, children: [e(v, { className: "backdrop", sx: { opacity: (e2) => m2 ? 1.5 * e2.palette.action.disabledOpacity : void 0, background: (e2) => m2 ? void 0 : e2.palette.background.paper, backdropFilter: "blur(4px)", borderRadius: (e2) => `${e2.shape.borderRadius}px`, zIndex: -1, position: "absolute", width: "100%", height: "100%", boxSizing: "border-box" } }), o3] }) });
|
|
59
|
+
}, [n2, u2]), M2 = l(false), S2 = l(false);
|
|
60
|
+
return ne(() => {
|
|
61
61
|
if (y2.current && !M2.current && !S2.current) {
|
|
62
62
|
if (S2.current = true, y2.current.classList.contains("animatable") && !y2.current.classList.contains("animating")) {
|
|
63
63
|
let e2 = false;
|
|
@@ -83,7 +83,7 @@ const De = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, E
|
|
|
83
83
|
} catch {
|
|
84
84
|
}
|
|
85
85
|
return e2 = (e2 = e2.replace(/^\/+/, "")).replace(/^@?fs[\\/]/, "");
|
|
86
|
-
},
|
|
86
|
+
}, Oe = n(({ error: o2, maxLines: r2 = Number.MAX_SAFE_INTEGER, hideLineNumbers: n2 = false }) => {
|
|
87
87
|
const [i2, a2] = c(null);
|
|
88
88
|
if (!o2?.stack) return null;
|
|
89
89
|
const l2 = L.collectErrorChain(o2).reverse(), s2 = [];
|
|
@@ -91,19 +91,19 @@ const De = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, E
|
|
|
91
91
|
const o3 = (e2.stack || "").split("\n").filter(Boolean).map((e3) => {
|
|
92
92
|
let t3 = e3.match(De);
|
|
93
93
|
if (t3) {
|
|
94
|
-
const [, e4 = "", o4,
|
|
95
|
-
return { line: `at ${e4 ? e4 + " " : ""}${o4}`, location: `${Te(
|
|
94
|
+
const [, e4 = "", o4, r3, n3, i3] = t3;
|
|
95
|
+
return { line: `at ${e4 ? e4 + " " : ""}${o4}`, location: `${Te(r3).split(/[\\/]/).pop()}:${n3}:${i3}` };
|
|
96
96
|
}
|
|
97
97
|
if (t3 = e3.match(Ee), t3) {
|
|
98
|
-
const [, e4 = "", o4,
|
|
99
|
-
return { line: `at ${e4 ? e4 + " " : ""}${a3}`, location: i3 !== a3 ? `${i3}:${
|
|
98
|
+
const [, e4 = "", o4, r3, n3] = t3, i3 = Te(o4), a3 = `${i3.split(/[\\/]/).pop()}:${r3}:${n3}`;
|
|
99
|
+
return { line: `at ${e4 ? e4 + " " : ""}${a3}`, location: i3 !== a3 ? `${i3}:${r3}:${n3}` : void 0 };
|
|
100
100
|
}
|
|
101
101
|
return { line: e3.trim() };
|
|
102
102
|
});
|
|
103
103
|
o3.length && (s2.push({ line: t2 ? `Caused by: ${o3[0].line}` : o3[0].line, isBoundary: true }), s2.push(...o3.slice(1)));
|
|
104
104
|
});
|
|
105
|
-
const d2 =
|
|
106
|
-
return t(v, { sx: { width: "100%", mt: 1 }, children: [t(v, { sx: { display: "flex", alignItems: "center", gap: 1, borderRadius: 1, px: 1, py: 0.5 }, children: [t(k, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", opacity: 0.8 }, children: ["Stack Trace(", l2.length > 1 ? ` (${l2.length} frames)` : "", ")"] }), e(v, { sx: { flex: 1 } }), i2 && e(k, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.8 }, children: i2 }), e(
|
|
105
|
+
const d2 = r2 ? s2.slice(0, r2) : s2, p2 = r2 && s2.length > r2;
|
|
106
|
+
return t(v, { sx: { width: "100%", mt: 1 }, children: [t(v, { sx: { display: "flex", alignItems: "center", gap: 1, borderRadius: 1, px: 1, py: 0.5 }, children: [t(k, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", opacity: 0.8 }, children: ["Stack Trace(", l2.length > 1 ? ` (${l2.length} frames)` : "", ")"] }), e(v, { sx: { flex: 1 } }), i2 && e(k, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.8 }, children: i2 }), e(g, { size: "small", onClick: async () => {
|
|
107
107
|
try {
|
|
108
108
|
let e2 = 0;
|
|
109
109
|
const t2 = s2.map((t3) => {
|
|
@@ -116,41 +116,41 @@ const De = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, E
|
|
|
116
116
|
} catch (e2) {
|
|
117
117
|
a2("Can't copy!"), console.warn("Failed to copy stack trace:", e2);
|
|
118
118
|
}
|
|
119
|
-
}, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Copy stack trace", children: e(W, { iconKey: "ContentCopy", style: { fontSize: "0.875rem" } }) }), e(
|
|
119
|
+
}, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Copy stack trace", children: e(W, { iconKey: "ContentCopy", style: { fontSize: "0.875rem" } }) }), e(g, { size: "small", onClick: () => {
|
|
120
120
|
a2("Logged!"), setTimeout(() => a2(null), 2e3), console.log(o2);
|
|
121
|
-
}, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Log error to console", children: e(W, { iconKey: "BugReport", style: { fontSize: "0.875rem" } }) })] }), t(v, { 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: [d2.map((o3,
|
|
121
|
+
}, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Log error to console", children: e(W, { iconKey: "BugReport", style: { fontSize: "0.875rem" } }) })] }), t(v, { 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: [d2.map((o3, r3) => o3.isBoundary ? e(v, { sx: { py: 1, mt: r3 > 0 ? 1 : 0, mb: 0.5, borderTop: r3 > 0 ? "1px solid rgba(255, 255, 255, 0.1)" : "none" }, children: e(k, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", fontWeight: "bold", color: (e2) => o3.isBoundary ? e2.palette.text.primary : e2.palette.text.secondary, display: "block" }, children: o3.line }) }, `error-${r3}`) : t(v, { sx: { display: "flex", alignItems: "flex-start", gap: 1, py: 0.25, pl: 1, "&:hover": { backgroundColor: "rgba(255, 255, 255, 0.05)" } }, children: [!n2 && e(k, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.5, minWidth: "20px", textAlign: "right", userSelect: "none" }, children: r3 + 1 }), t(v, { sx: { flex: 1, overflow: "hidden" }, children: [e(k, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", color: "inherit" }, children: o3.line }), o3.location && o3.line !== o3.location && e(k, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.6, fontStyle: "italic" }, children: o3.location })] })] }, `stack-${r3}`)), p2 && t(k, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.6, fontStyle: "italic", textAlign: "center", display: "block", mt: 1 }, children: ["... and ", s2.length - r2, " more frames"] })] })] });
|
|
122
122
|
});
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
126
|
-
if (o2 instanceof Error) return t(v, { sx: { display: "flex", flexDirection: "column", maxWidth: "500px", width: "100%" }, children: [e(k, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, mb: 1 }, children: o2.message }), o2.cause ? t(k, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em", mb: 1, opacity: 0.8 }, children: ["Caused by: ", o2.cause instanceof Error ? o2.cause.message : String(o2.cause)] }) : null, !
|
|
123
|
+
Oe.displayName = "StackTrace";
|
|
124
|
+
const $e = (o2, n2 = false, i2 = false) => {
|
|
125
|
+
if (r.isValidElement(o2)) return o2;
|
|
126
|
+
if (o2 instanceof Error) return t(v, { sx: { display: "flex", flexDirection: "column", maxWidth: "500px", width: "100%" }, children: [e(k, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, mb: 1 }, children: o2.message }), o2.cause ? t(k, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em", mb: 1, opacity: 0.8 }, children: ["Caused by: ", o2.cause instanceof Error ? o2.cause.message : String(o2.cause)] }) : null, !n2 && e(Oe, { error: o2, hideLineNumbers: true })] });
|
|
127
127
|
const a2 = "string" === o2 ? o2 : `Unknown Error: ${String(o2)}`;
|
|
128
128
|
return e(k, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em" }, children: a2 });
|
|
129
|
-
}, ze =
|
|
130
|
-
const { sx:
|
|
131
|
-
return a(() => e(v, { ref:
|
|
129
|
+
}, ze = n(i((o2, r2) => {
|
|
130
|
+
const { sx: n2, icon: i2 = e(W, { iconKey: "Error", style: { fontSize: 48 } }), error: l2, hideStackTrace: s2 = false, stackTraceExpanded: c2 = false, ...d2 } = o2, p2 = a(() => $e(l2, s2, c2), [l2, s2, c2]);
|
|
131
|
+
return a(() => e(v, { ref: r2, sx: { boxSizing: "border-box", alignItems: "center", justifyContent: "center", display: "flex", flexDirection: "row", overflow: "hidden", width: "100%", height: "100%", ...n2 }, ...d2, children: t(v, { sx: { display: "flex", flex: "1 1 100%", height: "100%", alignItems: "center", justifyContent: "center", boxSizing: "border-box", position: "relative" }, children: [e(v, { className: "backdrop", sx: { backdropFilter: "blur(4px)", borderRadius: (e2) => `${e2.shape.borderRadius}px`, zIndex: -1, position: "absolute", width: "100%", height: "100%", boxSizing: "border-box" } }), e(w, { elevation: 0, sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", rowGap: "8px", alignSelf: "center", marginBottom: "5%", backgroundColor: (e2) => e2.palette.error.light, color: (e2) => e2.palette.error.contrastText, paddingLeft: (e2) => e2.spacing(2), paddingRight: (e2) => e2.spacing(2), paddingTop: (e2) => e2.spacing(2), paddingBottom: (e2) => e2.spacing(2), borderRadius: (e2) => `${e2.shape.borderRadius}px`, boxShadow: (e2) => e2.shadows[2], "& .primary": { background: (e2) => `${e2.palette.error.contrastText} !important`, border: "solid transparent" }, zIndex: 1 }, children: e(v, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: (e2) => e2.spacing(2), width: "100%", maxWidth: "600px" }, children: t(v, { sx: { display: "flex", flexDirection: "row", alignItems: "flex-start", gap: (e2) => e2.spacing(2) }, children: [i2, p2] }) }) })] }) }), [n2]);
|
|
132
132
|
}));
|
|
133
133
|
ze.displayName = "ErrorPanel";
|
|
134
|
-
const Ie =
|
|
135
|
-
const { chips:
|
|
136
|
-
if (!
|
|
134
|
+
const Ie = n(i((t2, o2) => {
|
|
135
|
+
const { chips: n2, sx: i2, ...a2 } = t2, l2 = r.useMemo(() => {
|
|
136
|
+
if (!n2) return null;
|
|
137
137
|
let t3 = null;
|
|
138
|
-
t3 = Array.isArray(
|
|
138
|
+
t3 = Array.isArray(n2) ? n2 : [n2];
|
|
139
139
|
const o3 = [], i3 = t3.length;
|
|
140
|
-
for (let
|
|
141
|
-
const i4 = t3[
|
|
140
|
+
for (let n3 = 0; n3 < i3; n3++) {
|
|
141
|
+
const i4 = t3[n3];
|
|
142
142
|
let a3 = null;
|
|
143
|
-
"string" == typeof i4 ? a3 = e(C, { label: i4, color: "primary", size: "small", sx: { scale: "0.8" } }, "chip-" +
|
|
143
|
+
"string" == typeof i4 ? a3 = e(C, { label: i4, color: "primary", size: "small", sx: { scale: "0.8" } }, "chip-" + n3) : r.cloneElement(i4, { key: "chip-" + n3 }), o3.push(a3);
|
|
144
144
|
}
|
|
145
145
|
return o3;
|
|
146
|
-
}, [
|
|
146
|
+
}, [n2]);
|
|
147
147
|
return e(v, { ref: o2, sx: { display: "flex", flexDirection: "row", marginLeft: "4px", gap: "2px", ...i2 }, ...a2, children: l2 });
|
|
148
148
|
})), Ne = { name: "maxSize", enabled: true, phase: "main", requiresIfExists: ["offset", "preventOverflow", "flip"], fn: function(e2) {
|
|
149
|
-
var t2 = e2.state, o2 = e2.name,
|
|
149
|
+
var t2 = e2.state, o2 = e2.name, r2 = e2.options, n2 = oe(t2, r2), i2 = t2.modifiersData.preventOverflow || { x: 0, y: 0 }, a2 = i2.x, l2 = i2.y;
|
|
150
150
|
let s2 = t2.rects.popper, c2 = s2.width, d2 = s2.height, p2 = t2.placement.split("-")[0], u2 = "left" === p2 ? "left" : "right", m2 = "top" === p2 ? "top" : "bottom";
|
|
151
|
-
t2.modifiersData[o2] = { width: c2 -
|
|
152
|
-
} }, Be = [0, 2], Le =
|
|
153
|
-
const { sx:
|
|
151
|
+
t2.modifiersData[o2] = { width: c2 - n2[u2] - a2, height: d2 - n2[m2] - l2 };
|
|
152
|
+
} }, Be = [0, 2], Le = n(i((t2, o2) => {
|
|
153
|
+
const { sx: n2, open: i2, children: l2, label: p2, offsets: u2 = Be, anchorEl: m2, anchorPosition: h2, onMount: f2, onOpening: x2, onOpen: b2, onClosing: g2, onClose: y2, resizeOnOverflow: v2 = true, ...k2 } = t2;
|
|
154
154
|
if (Array.isArray(l2)) throw new Error("children can not be an array");
|
|
155
155
|
const w2 = Y(), C2 = { name: "applyMaxSize", enabled: true, phase: "beforeWrite", requires: ["maxSize"], fn({ state: e2 }) {
|
|
156
156
|
const { height: t3 } = e2.modifiersData.maxSize;
|
|
@@ -158,26 +158,26 @@ const Ie = r(i((t2, o2) => {
|
|
|
158
158
|
} }, P2 = a(() => {
|
|
159
159
|
const e2 = [{ name: "offset", options: { offset: u2 } }, { name: "flip", enabled: true, options: { rootBoundary: "document" } }];
|
|
160
160
|
return v2 && e2.unshift(Ne, C2), e2;
|
|
161
|
-
}, [v2, u2]), [R2, D2] = c(false), E2 =
|
|
161
|
+
}, [v2, u2]), [R2, D2] = c(false), E2 = r.useRef(null), T2 = K(() => {
|
|
162
162
|
f2?.(L2.current, E2.current);
|
|
163
|
-
}, [x2]),
|
|
163
|
+
}, [x2]), O2 = K(x2, [x2]), $2 = K(b2, [b2]), z2 = K(g2, [g2]), I2 = K(() => {
|
|
164
164
|
D2(false), y2?.();
|
|
165
|
-
}, [y2]), [N2, B2] = c(false), L2 =
|
|
165
|
+
}, [y2]), [N2, B2] = c(false), L2 = r.useRef(null), A2 = r.useRef(true), H2 = a(() => ({ onFirstUpdate: () => {
|
|
166
166
|
A2.current && (B2(true), T2?.(), A2.current = false);
|
|
167
167
|
} }), [i2, R2]);
|
|
168
168
|
s(() => {
|
|
169
|
-
i2 && N2 ?
|
|
169
|
+
i2 && N2 ? O2?.() : !i2 && R2 && z2?.(), i2 && D2(i2);
|
|
170
170
|
}, [i2, N2]);
|
|
171
171
|
const W2 = a(() => ({ getBoundingClientRect: () => h2 ? new DOMRect(h2?.left || 0, h2?.top || 0, 0, 0) : m2.getBoundingClientRect() }), [h2, m2]);
|
|
172
172
|
d(o2, () => ({ instance: () => E2.current, element: () => L2.current }), []);
|
|
173
|
-
const { getPortalContainer: q2 } = V(), _2 = a(() => ({ zIndex: i2 ? "1300" : "1299", display: "flex", pointerEvents: R2 && i2 ? void 0 : "none", maxWidth: "100%", maxHeight: "100%", ...
|
|
174
|
-
return e(M, { ref: L2, popperRef: E2, container: q2, anchorEl: W2, open: R2, role: void 0, popperOptions: H2, transition: true, sx: _2, placement: "bottom-start", modifiers: P2, ...k2, children: ({ TransitionProps: t3, placement: o3, ...
|
|
175
|
-
const { in:
|
|
173
|
+
const { getPortalContainer: q2 } = V(), _2 = a(() => ({ zIndex: i2 ? "1300" : "1299", display: "flex", pointerEvents: R2 && i2 ? void 0 : "none", maxWidth: "100%", maxHeight: "100%", ...n2 }), [n2, i2, R2]);
|
|
174
|
+
return e(M, { ref: L2, popperRef: E2, container: q2, anchorEl: W2, open: R2, role: void 0, popperOptions: H2, transition: true, sx: _2, placement: "bottom-start", modifiers: P2, ...k2, children: ({ TransitionProps: t3, placement: o3, ...r2 }) => {
|
|
175
|
+
const { in: n3, onEnter: a2, onExited: s2, ...c2 } = t3 ?? {};
|
|
176
176
|
return e(S, { ...c2, in: i2, onEnter: () => {
|
|
177
|
-
a2?.(),
|
|
177
|
+
a2?.(), $2();
|
|
178
178
|
}, onExited: () => {
|
|
179
179
|
s2?.(), I2();
|
|
180
|
-
}, timeout: { enter: w2.transitions.duration.shorter, exit: 0 }, style: { transformOrigin: "bottom-start" === o3 ? "left top" : "center bottom" }, children: "function" == typeof l2 ? l2({ TransitionProps: t3, placement: o3, ...
|
|
180
|
+
}, timeout: { enter: w2.transitions.duration.shorter, exit: 0 }, style: { transformOrigin: "bottom-start" === o3 ? "left top" : "center bottom" }, children: "function" == typeof l2 ? l2({ TransitionProps: t3, placement: o3, ...r2 }) : l2 || F.EmptyArray });
|
|
181
181
|
} });
|
|
182
182
|
}));
|
|
183
183
|
Le.displayName = "ExhibitPopper";
|
|
@@ -188,122 +188,124 @@ const Fe = (e2) => {
|
|
|
188
188
|
if ("dark" !== t2.palette.mode) return;
|
|
189
189
|
const o2 = "dark" === t2.palette.mode ? t2.palette.text.primary : t2.palette.divider;
|
|
190
190
|
return `drop-shadow(0px 0px ${e2}px ${o2})`;
|
|
191
|
-
}, He = (t2) => e(W, { ...t2, iconKey: "ArrowDownOutline" }), We = (t2) => e(W, { ...t2, iconKey: "ArrowRightOutline" }), Ke = J(
|
|
192
|
-
const { sx:
|
|
191
|
+
}, He = (t2) => e(W, { ...t2, iconKey: "ArrowDownOutline" }), We = (t2) => e(W, { ...t2, iconKey: "ArrowRightOutline" }), Ke = J(n(i((t2, o2) => {
|
|
192
|
+
const { sx: r2, size: n2 = "small", activeColor: i2, children: a2, className: l2, ...s2 } = t2;
|
|
193
193
|
let c2 = "1rem", d2 = "1rem";
|
|
194
|
-
return "medium" ===
|
|
194
|
+
return "medium" === n2 ? (c2 = "1.25rem", d2 = "1.25rem") : "large" === n2 && (c2 = "1.5rem", d2 = "1.5rem"), e(v, { ref: o2, className: h("icon", l2), sx: { width: c2, height: d2, ...r2 }, ...s2, children: a2 });
|
|
195
195
|
})))(({ theme: e2 }) => ({ fill: "currentColor", "& .activeColor": { fill: e2.palette.primary.main }, "& .styled.high_contrast": { fill: e2.palette.primary.main }, "& .styled.background": { fill: e2.palette.background.paper }, "& .styled.current_color": { fill: "currentColor" }, "& .styled.secondary": { fill: e2.palette.secondary.main }, "& .styled.secondary_dark": { fill: e2.palette.secondary.dark }, "& .styled.secondary_light": { fill: e2.palette.secondary.light }, "& .styled.info": { fill: e2.palette.info.main }, "& .styled.info.stroked": { stroke: e2.palette.info.main }, "& .styled.info_dark": { fill: e2.palette.info.dark }, "& .styled.info_light": { fill: e2.palette.info.light }, "& .styled.warning": { fill: e2.palette.warning.main }, "& .styled.warning.stroked": { stroke: e2.palette.warning.main }, "& .styled.warning_dark": { fill: e2.palette.warning.dark }, "& .styled.warning_light": { fill: e2.palette.warning.light }, "& .styled.error.info": { fill: e2.palette.error.main }, "& .styled.error.stroked": { stroke: e2.palette.error.main }, "& .styled.error_dark": { fill: e2.palette.error.dark }, "& .styled.error_light": { fill: e2.palette.error.light }, "& .styled.success": { fill: e2.palette.success.main }, "& .styled.success_dark": { fill: e2.palette.success.dark }, "& .styled.success_light": { fill: e2.palette.success.light }, "& .styled.grey": { fill: e2.palette.text.icon ?? e2.palette.action.active } })), Ve = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, qe = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, _e = function(e2, t2 = null) {
|
|
196
196
|
if (!e2) return e2;
|
|
197
|
-
e2 = e2.replace(Ve, function(e3, t3, o3,
|
|
198
|
-
return t3 + t3 + o3 + o3 +
|
|
197
|
+
e2 = e2.replace(Ve, function(e3, t3, o3, r2) {
|
|
198
|
+
return t3 + t3 + o3 + o3 + r2 + r2;
|
|
199
199
|
});
|
|
200
200
|
let o2 = qe.exec(e2);
|
|
201
201
|
return o2 ? null === t2 ? `rgb(${parseInt(o2[1], 16)}, ${parseInt(o2[2], 16)}, ${parseInt(o2[3], 16)})` : `rgb(${parseInt(o2[1], 16)} ${parseInt(o2[2], 16)} ${parseInt(o2[3], 16)} / ${100 * t2}%)` : e2;
|
|
202
202
|
}, je = function(e2, t2 = 0.2, o2 = "light") {
|
|
203
203
|
if (!e2) return e2;
|
|
204
|
-
let
|
|
205
|
-
return t2 < 0 && (
|
|
204
|
+
let r2 = "dark" !== o2;
|
|
205
|
+
return t2 < 0 && (r2 = !r2, t2 *= -1), e2 = _e(e2), r2 ? x(e2, Math.max(0, Math.min(1, 1 * t2))) : b(e2, Math.max(0, Math.min(1, 1.5 * t2)));
|
|
206
206
|
}, Ue = function(e2) {
|
|
207
207
|
let t2 = 0;
|
|
208
208
|
return t2 = e2 < 1 ? 5.11916 * e2 ** 2 : 4.5 * Math.log(e2 + 1) + 2, (t2 / 100).toFixed(2);
|
|
209
209
|
}, Qe = (e2, t2) => {
|
|
210
210
|
let o2 = Z({ palette: { mode: e2 ? "dark" : "light" } });
|
|
211
|
-
const
|
|
212
|
-
let
|
|
211
|
+
const r2 = { "--icon-primary": o2.palette.primary.main, "--icon-secondary": o2.palette.secondary.main, "--icon-secondary-light": o2.palette.secondary.light, "--icon-success": o2.palette.success.main, "--icon-success-light": o2.palette.success.light, "--icon-info": o2.palette.info.main, "--icon-warn": o2.palette.warning.main, "--icon-error": o2.palette.error.main, "--icon-error-light": o2.palette.error.light, "--icon-grey": o2.palette.text.icon ?? o2.palette.action.active, "--icon-shadow": e2 ? o2.palette.text.primary : o2.palette.divider, "--icon-size": "1.25rem", "@media (pointer: coarse)": { "--icon-size": "1.75rem" } };
|
|
212
|
+
let n2 = { typography: {}, palette: { mode: e2 ? "dark" : "light", text: { secondary: e2 ? o2.palette.text.secondary : f(o2.palette.text.secondary, 0.75), icon: e2 ? f(o2.palette.text.secondary, 0.7) : f(o2.palette.text.primary, 0.75) } }, components: { MuiDialogTitle: { styleOverrides: { root: { fontWeight: "normal" } } }, MuiSelect: { defaultProps: { IconComponent: He, 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: { ...r2 } } }, 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() {
|
|
213
213
|
return o2.palette.text.secondary;
|
|
214
214
|
} }, dirty: { fontStyle: "italic", color: function() {
|
|
215
215
|
return o2.palette.text.secondary;
|
|
216
|
-
} } } } } }, i2 =
|
|
217
|
-
t2 && (i2 = te(
|
|
216
|
+
} } } } } }, i2 = n2;
|
|
217
|
+
t2 && (i2 = te(n2, t2));
|
|
218
218
|
return Z(i2);
|
|
219
219
|
};
|
|
220
220
|
function Ge(e2, t2) {
|
|
221
|
-
t2 = te({ track: je(e2.palette.background.paper, 0.05, e2?.palette.mode), thumb: je(e2.palette.background.paper, 0.3, e2?.palette.mode), active: e2.palette.primary.main, corner: e2.palette.background.paper, outline: false }, t2 || {});
|
|
222
|
-
const o2 = { "&::-webkit-scrollbar, & *::-webkit-scrollbar": { backgroundColor: f(t2.track, 0.2), width: "13px", height: "13px" }, "&::-webkit-scrollbar-button": { display: "none" }, "& .scrollbar-button": { fill: t2.thumb, backgroundColor: "transparent", transition: "fill opacity 260ms ease", width: "13px", height: "13px" }, "& .scrollbar-button:hover:not([disabled])": { fill: t2.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: t2.thumb, minHeight: "24px", minWidth: "24px", border: `2px solid ${t2.track}` }, "&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus": { backgroundColor: t2.active, border: t2.outline ? t2.outline : void 0 }, "&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active": { backgroundColor: t2.active, border: t2.outline ? t2.outline : void 0 }, "&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": { backgroundColor: t2.active, border: t2.outline ? t2.outline : void 0 }, "&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": { backgroundColor: t2.corner || t2.thumb } };
|
|
223
|
-
return F.getOS() === F.OSType.Firefox && (o2["* .pseudo-scrollbar"] = { scrollbarColor: `${t2.thumb} transparent` }, o2["* .pseudo-scrollbar:hover:not([disabled])"] = { scrollbarColor: `${t2.active} transparent` }), o2;
|
|
221
|
+
return t2 = te({ track: je(e2.palette.background.paper, 0.05, e2?.palette.mode), thumb: je(e2.palette.background.paper, 0.3, e2?.palette.mode), active: e2.palette.primary.main, corner: e2.palette.background.paper, outline: false }, t2 || {}), { "--scrollbar-track-color": f(t2.track, 0.2), "--scrollbar-thumb-color": t2.thumb, "--scrollbar-button-color": t2.button || t2.thumb, "--scrollbar-active-color": t2.active, "--scrollbar-corner-color": t2.corner || t2.thumb, "--scrollbar-border-color": t2.track, "--scrollbar-width": "13px", "--scrollbar-height": "13px", "--scrollbar-border-radius": "9999px", "--scrollbar-border-width": "2px", "--scrollbar-min-thumb-size": "24px" };
|
|
224
222
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
223
|
+
function Xe(e2, t2) {
|
|
224
|
+
const o2 = Ge(e2, t2), r2 = { ...o2, "& .scrollbar, & .vsb-track, & .vsb-thumb": { ...o2 }, "&::-webkit-scrollbar, & *::-webkit-scrollbar": { backgroundColor: "var(--scrollbar-track-color)", width: "var(--scrollbar-width)", height: "var(--scrollbar-height)" }, "&::-webkit-scrollbar-button": { display: "none" }, "& .scrollbar-button": { fill: "var(--scrollbar-thumb-color)", backgroundColor: "transparent", transition: "fill opacity 260ms ease", width: "var(--scrollbar-width)", height: "var(--scrollbar-height)" }, "& .scrollbar-button:hover:not([disabled])": { fill: "var(--scrollbar-active-color)" }, "& .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: "var(--scrollbar-border-radius)", backgroundColor: "var(--scrollbar-thumb-color)", minHeight: "var(--scrollbar-min-thumb-size)", minWidth: "var(--scrollbar-min-thumb-size)", border: "var(--scrollbar-border-width) solid var(--scrollbar-border-color)" }, "&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus": { backgroundColor: "var(--scrollbar-active-color)", border: t2?.outline ? t2.outline : void 0 }, "&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active": { backgroundColor: "var(--scrollbar-active-color)", border: t2?.outline ? t2.outline : void 0 }, "&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": { backgroundColor: "var(--scrollbar-active-color)", border: t2?.outline ? t2.outline : void 0 }, "&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": { backgroundColor: "var(--scrollbar-corner-color)" } };
|
|
225
|
+
return F.getOS() === F.OSType.Firefox && (r2["* .pseudo-scrollbar"] = { scrollbarColor: "var(--scrollbar-thumb-color) transparent" }, r2["* .pseudo-scrollbar:hover:not([disabled])"] = { scrollbarColor: "var(--scrollbar-active-color) transparent" }), r2;
|
|
226
|
+
}
|
|
227
|
+
const Ye = { Light: "light", Dark: "dark" };
|
|
228
|
+
function Je(e2) {
|
|
229
|
+
const { mode: t2 } = e2 || {}, [o2, r2] = c(() => {
|
|
228
230
|
if ("light" === t2 || "dark" === t2) return { themeMode: t2, source: "prop" };
|
|
229
231
|
if ("undefined" != typeof document) {
|
|
230
|
-
const e3 =
|
|
232
|
+
const e3 = Ze();
|
|
231
233
|
if (e3) return { themeMode: e3, source: "class" };
|
|
232
234
|
}
|
|
233
|
-
return { themeMode:
|
|
235
|
+
return { themeMode: et(), source: "media" };
|
|
234
236
|
});
|
|
235
237
|
return s(() => {
|
|
236
238
|
const e3 = () => {
|
|
237
|
-
if (t2) return void (t2 === o2.themeMode && "prop" === o2.source ||
|
|
238
|
-
const e4 =
|
|
239
|
-
if (e4)
|
|
239
|
+
if (t2) return void (t2 === o2.themeMode && "prop" === o2.source || r2((e5) => ({ ...e5, themeMode: t2, source: "prop" })));
|
|
240
|
+
const e4 = Ze();
|
|
241
|
+
if (e4) r2({ themeMode: e4, source: "class" });
|
|
240
242
|
else {
|
|
241
|
-
const e5 =
|
|
242
|
-
|
|
243
|
+
const e5 = et();
|
|
244
|
+
r2({ themeMode: e5, source: "media" });
|
|
243
245
|
}
|
|
244
|
-
},
|
|
245
|
-
for (const e4 of i2)
|
|
246
|
+
}, n2 = new MutationObserver(e3), i2 = [document.documentElement, document.body].filter(Boolean);
|
|
247
|
+
for (const e4 of i2) n2.observe(e4, { attributes: true, attributeFilter: ["class"] });
|
|
246
248
|
const a2 = window.matchMedia("(prefers-color-scheme: dark)");
|
|
247
249
|
return a2.addEventListener("change", e3), e3(), () => {
|
|
248
|
-
|
|
250
|
+
n2.disconnect(), a2.removeEventListener("change", e3);
|
|
249
251
|
};
|
|
250
252
|
}, [t2]), o2;
|
|
251
253
|
}
|
|
252
|
-
function
|
|
254
|
+
function Ze() {
|
|
253
255
|
if ("undefined" == typeof document) return null;
|
|
254
256
|
const e2 = [...Array.from(document.body.classList), ...document.documentElement ? Array.from(document.documentElement.classList) : []];
|
|
255
257
|
return e2.includes("dark") ? "dark" : e2.includes("light") ? "light" : null;
|
|
256
258
|
}
|
|
257
|
-
function
|
|
259
|
+
function et() {
|
|
258
260
|
return "undefined" == typeof window ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
259
261
|
}
|
|
260
|
-
const
|
|
261
|
-
const { closeFloat: o2, closeFloatAll:
|
|
262
|
+
const tt = { Popup: "popup", Anchor: "anchor" }, ot = { ByPopup: "popupDone", Cancel: "popupCancel", ClickAway: "clickAway" }, rt = { Toolbar: "toolbar", Menuitem: "menuitem" }, nt = (t2) => {
|
|
263
|
+
const { closeFloat: o2, closeFloatAll: r2, floatReference: n2, popupContainer: i2, children: a2, className: l2, sx: s2, ...c2 } = t2;
|
|
262
264
|
return e(v, { className: h("menu", l2), sx: { display: "flex", flexDirection: "column", ...s2 }, ...c2, children: a2 });
|
|
263
|
-
},
|
|
264
|
-
let
|
|
265
|
-
return
|
|
266
|
-
},
|
|
267
|
-
const { open:
|
|
265
|
+
}, it = (t2, o2, r2) => {
|
|
266
|
+
let n2;
|
|
267
|
+
return r2 && (n2 = (n2 ? n2 + " " : "") + "rotate(180deg)"), e(He, { style: { marginLeft: t2 ? void 0 : o2 ? "-0.25rem" : "-3px", marginRight: t2 ? void 0 : o2 ? "-0.25rem" : "-6px", transform: n2 }, color: "inherit" });
|
|
268
|
+
}, at = n(i((t2, o2) => {
|
|
269
|
+
const { open: r2, anchorEl: n2, anchorPosition: i2, label: s2, floatReference: d2, createPopupPanel: p2 = nt, popperProps: u2, onMount: m2, onClosing: h2, onClose: f2, onOpening: x2, onOpen: b2, children: g2, sx: y2, ...v2 } = t2, k2 = K(h2, [h2]), C2 = K(f2, [f2]), M2 = K(x2, [x2]), S2 = K(b2, [b2]), [P2, R2] = c(), D2 = l(null), E2 = K((e2, t3) => {
|
|
268
270
|
R2(e2), m2?.(D2.current, t3);
|
|
269
271
|
}, [m2]), T2 = a(() => {
|
|
270
|
-
const t3 = { popupContainer: P2, floatReference: d2, children:
|
|
271
|
-
return e(w, { elevation: 8, ref: D2, sx: { display: "flex", overflow: "auto", outline: "none", "&.MuiPaper-root": (e2) =>
|
|
272
|
-
}, [p2,
|
|
273
|
-
return e(Le, { ref: o2, anchorEl:
|
|
272
|
+
const t3 = { popupContainer: P2, floatReference: d2, children: g2, ...v2 }, o3 = p2(t3);
|
|
273
|
+
return e(w, { elevation: 8, ref: D2, sx: { display: "flex", overflow: "auto", outline: "none", "&.MuiPaper-root": (e2) => Xe(e2) }, tabIndex: 0, children: o3 });
|
|
274
|
+
}, [p2, g2, P2, d2]);
|
|
275
|
+
return e(Le, { ref: o2, anchorEl: n2, anchorPosition: i2, label: s2, open: r2, onMount: E2, onOpening: M2, onOpen: S2, onClosing: k2, onClose: C2, ...u2, children: T2 });
|
|
274
276
|
}));
|
|
275
|
-
|
|
276
|
-
const
|
|
277
|
-
let
|
|
278
|
-
const
|
|
279
|
-
let
|
|
280
|
-
const
|
|
281
|
-
if (
|
|
277
|
+
at.displayName = "ExhibitFloatPanel";
|
|
278
|
+
const lt = /* @__PURE__ */ new Map();
|
|
279
|
+
let st = null;
|
|
280
|
+
const ct = /* @__PURE__ */ new Map();
|
|
281
|
+
let dt = null;
|
|
282
|
+
const pt = (e2 = null, t2, o2, r2) => {
|
|
283
|
+
if (dt && (dt.fn.clear(), dt = null), 0 === e2) return t2;
|
|
282
284
|
null === e2 && (e2 = 120);
|
|
283
|
-
const
|
|
284
|
-
return
|
|
285
|
-
},
|
|
285
|
+
const n2 = F.debounce(() => t2(), e2);
|
|
286
|
+
return dt = { fn: n2, setReferences: o2, isClose: r2 }, dt.fn;
|
|
287
|
+
}, ut = (e2, t2) => {
|
|
286
288
|
if (null === t2) return;
|
|
287
289
|
e2.add(t2);
|
|
288
|
-
const o2 =
|
|
290
|
+
const o2 = lt.get(t2.key);
|
|
289
291
|
if (!o2) return;
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
},
|
|
292
|
+
const r2 = ct.get(o2);
|
|
293
|
+
r2 && ut(e2, r2);
|
|
294
|
+
}, mt = (e2) => {
|
|
293
295
|
const t2 = /* @__PURE__ */ new Set();
|
|
294
|
-
return
|
|
295
|
-
},
|
|
296
|
-
const { anchor: o2, label:
|
|
296
|
+
return ut(t2, e2), t2;
|
|
297
|
+
}, ht = (t2) => {
|
|
298
|
+
const { anchor: o2, label: n2 = null, parentFloat: i2 = null, onOpen: l2, onClose: d2, popperProps: u2, createPopupPanel: m2 = nt } = t2 ?? {}, h2 = K(l2, [l2]), f2 = K(d2, [d2]), [x2, b2] = c(null), [g2, y2] = c(false), [v2, k2] = c(false), w2 = a(() => null === i2 ? (null === st && (st = { key: { label: "root" }, isRoot: true, parent: null, open: () => null, close: (e2) => null, closeChild: (e2) => null, onChildVisible: () => {
|
|
297
299
|
}, onChildHidden: () => {
|
|
298
|
-
}, closeAll: () => F2(0), floatElement: () => null, anchorElement: () => null }),
|
|
300
|
+
}, closeAll: () => F2(0), floatElement: () => null, anchorElement: () => null }), st) : i2, []), C2 = a(() => ({ label: n2 }), []), M2 = r.useRef(null), S2 = r.useRef(o2);
|
|
299
301
|
s(() => {
|
|
300
302
|
S2.current = o2;
|
|
301
303
|
}, [o2]);
|
|
302
304
|
const P2 = (e2) => {
|
|
303
|
-
const t3 =
|
|
305
|
+
const t3 = lt.get(e2);
|
|
304
306
|
let o3 = null;
|
|
305
307
|
if (t3) {
|
|
306
|
-
const e3 =
|
|
308
|
+
const e3 = ct.get(t3);
|
|
307
309
|
o3 = e3?.close(0);
|
|
308
310
|
}
|
|
309
311
|
return o3;
|
|
@@ -312,47 +314,47 @@ const dt = (e2 = null, t2, o2, n2) => {
|
|
|
312
314
|
const e2 = new Promise((e3, t3) => {
|
|
313
315
|
E2((o3) => ({ resolve: e3, reject: t3 }));
|
|
314
316
|
});
|
|
315
|
-
return R2(),
|
|
317
|
+
return R2(), lt.delete(w2.key), b2(false), e2;
|
|
316
318
|
};
|
|
317
319
|
s(() => {
|
|
318
320
|
D2 && (D2.resolve(), E2(null));
|
|
319
|
-
}, [
|
|
320
|
-
const
|
|
321
|
+
}, [g2, v2, D2]);
|
|
322
|
+
const O2 = p(() => {
|
|
321
323
|
let e2 = w2;
|
|
322
324
|
for (; e2.parent; ) e2 = e2.parent;
|
|
323
325
|
return P2(e2.key);
|
|
324
|
-
}, []),
|
|
326
|
+
}, []), $2 = () => {
|
|
325
327
|
if (x2) return void I2();
|
|
326
328
|
if (w2) {
|
|
327
|
-
const e3 =
|
|
329
|
+
const e3 = ct.get(w2.key);
|
|
328
330
|
e3?.open(0);
|
|
329
331
|
}
|
|
330
|
-
const e2 =
|
|
332
|
+
const e2 = lt.get(w2.key);
|
|
331
333
|
if (e2 && e2 !== C2) {
|
|
332
|
-
const t3 =
|
|
334
|
+
const t3 = ct.get(e2);
|
|
333
335
|
t3?.close(0);
|
|
334
336
|
}
|
|
335
337
|
requestAnimationFrame(() => {
|
|
336
|
-
|
|
338
|
+
lt.set(w2.key, W2.key), b2(true);
|
|
337
339
|
});
|
|
338
|
-
}, [z2, I2] =
|
|
339
|
-
const t3 =
|
|
340
|
-
return t3 &&
|
|
341
|
-
})(W2)), true)(), [R2]), H2 = K(
|
|
340
|
+
}, [z2, I2] = r.useReducer((e2) => e2 + 1, 0), N2 = p((e2) => null === m2 ? null : m2({ closeFloat: F2, closeFloatAll: H2, ...e2 }), [m2]), B2 = null === m2, L2 = K((e2 = 120) => pt(e2, $2, /* @__PURE__ */ new Set([W2]), false)(), [$2]), F2 = K((e2 = 60) => pt(e2, T2, mt(W2), true)(), [T2]), A2 = K((e2 = 360) => pt(e2, R2, mt(((e3) => {
|
|
341
|
+
const t3 = lt.get(e3.key);
|
|
342
|
+
return t3 && ct.get(t3) || null;
|
|
343
|
+
})(W2)), true)(), [R2]), H2 = K(O2, [O2]), W2 = a(() => ({ key: C2, isRoot: false, label: n2, parent: w2, onChildVisible: () => {
|
|
342
344
|
k2(true);
|
|
343
345
|
}, onChildHidden: () => {
|
|
344
346
|
k2(false);
|
|
345
347
|
}, open: L2, close: F2, closeChild: A2, closeAll: H2, floatElement: () => M2.current, anchorElement: () => S2.current }), []);
|
|
346
348
|
s(() => {
|
|
347
|
-
|
|
349
|
+
ct.set(C2, W2);
|
|
348
350
|
}, [W2]), s(() => () => {
|
|
349
|
-
|
|
351
|
+
ct.delete(C2), F2(0);
|
|
350
352
|
}, []), s(() => {
|
|
351
353
|
x2 && !B2 && (y2(true), w2.onChildVisible());
|
|
352
354
|
}, [x2, B2]);
|
|
353
355
|
const V2 = p((e2) => {
|
|
354
356
|
e2.which === q.Escape && (e2.preventDefault(), e2.stopPropagation(), F2(0));
|
|
355
|
-
}, []), _2 =
|
|
357
|
+
}, []), _2 = r.useRef(null), j2 = p(() => {
|
|
356
358
|
const e2 = _2.current, t3 = M2.current;
|
|
357
359
|
e2 && t3 && (requestAnimationFrame(() => {
|
|
358
360
|
(t3.contains(document.activeElement) || document.activeElement === document.body) && e2.focus();
|
|
@@ -368,27 +370,27 @@ const dt = (e2 = null, t2, o2, n2) => {
|
|
|
368
370
|
});
|
|
369
371
|
}, []), [Q2, G2] = c();
|
|
370
372
|
s(() => {
|
|
371
|
-
B2 && (x2 ? h2?.() : false === x2 && f2?.()), G2(
|
|
373
|
+
B2 && (x2 ? h2?.() : false === x2 && f2?.()), G2(g2 ? e(at, { floatReference: W2, open: x2, label: n2, anchorEl: o2, onOpening: () => {
|
|
372
374
|
h2?.(), w2.onChildVisible();
|
|
373
375
|
}, onClosing: j2, onClose: () => {
|
|
374
376
|
y2(false), w2.onChildHidden();
|
|
375
377
|
}, onMount: U2, popperProps: { onKeyDown: V2, onMouseEnter: (e2) => {
|
|
376
|
-
x2 &&
|
|
378
|
+
x2 && dt?.isClose && dt.setReferences.has(W2) && (dt.fn.clear(), dt = null, W2.closeChild());
|
|
377
379
|
}, ...u2 }, createPopupPanel: N2 }) : null);
|
|
378
|
-
}, [
|
|
380
|
+
}, [g2, x2, n2, B2, u2, N2, z2]);
|
|
379
381
|
const X2 = K((e2) => {
|
|
380
|
-
if (0 ===
|
|
382
|
+
if (0 === lt.size) return;
|
|
381
383
|
let t3 = false;
|
|
382
|
-
|
|
383
|
-
const
|
|
384
|
+
lt.forEach((o3) => {
|
|
385
|
+
const r2 = ct.get(o3);
|
|
384
386
|
if (t3) return;
|
|
385
|
-
if (!
|
|
386
|
-
const
|
|
387
|
-
|
|
388
|
-
const i3 =
|
|
387
|
+
if (!r2) return;
|
|
388
|
+
const n3 = r2.floatElement();
|
|
389
|
+
n3?.contains?.(e2.target) && (t3 = true);
|
|
390
|
+
const i3 = r2.anchorElement();
|
|
389
391
|
i3?.contains?.(e2.target) && (t3 = true);
|
|
390
|
-
}), t3 ||
|
|
391
|
-
}, [
|
|
392
|
+
}), t3 || O2();
|
|
393
|
+
}, [O2]);
|
|
392
394
|
return s(() => {
|
|
393
395
|
if (!x2 || !w2.isRoot) return;
|
|
394
396
|
const e2 = (e3) => {
|
|
@@ -398,80 +400,80 @@ const dt = (e2 = null, t2, o2, n2) => {
|
|
|
398
400
|
document.removeEventListener("mousedown", e2), document.removeEventListener("touchstart", e2), document.removeEventListener("focus", e2);
|
|
399
401
|
};
|
|
400
402
|
}, [x2, w2]), { component: Q2, reference: W2 };
|
|
401
|
-
},
|
|
402
|
-
const { nestedChildren:
|
|
403
|
-
if (!
|
|
403
|
+
}, ft = n(i((o2, r2) => {
|
|
404
|
+
const { nestedChildren: n2, variant: i2, disabled: a2 = false, createPopupPanel: l2, ...s2 } = o2, c2 = { disabled: a2, createPopupPanel: K((o3) => {
|
|
405
|
+
if (!n2 || 0 === n2.length) return null;
|
|
404
406
|
const { popupContainer: i3, floatReference: a3, ref: l3, ...s3 } = o3, c3 = [];
|
|
405
|
-
for (let t2 = 0; t2 <
|
|
406
|
-
const o4 =
|
|
407
|
-
o4 && c3.push(e(
|
|
407
|
+
for (let t2 = 0; t2 < n2.length; t2++) {
|
|
408
|
+
const o4 = n2[t2];
|
|
409
|
+
o4 && c3.push(e(ft, { parentFloat: a3, ...s3, ...o4 }, t2));
|
|
408
410
|
}
|
|
409
|
-
return t(v, { ref:
|
|
410
|
-
}, [
|
|
411
|
-
return e(i2 ===
|
|
412
|
-
})),
|
|
413
|
-
const { children: i2, sx: l2, parentFloat: c2, createPopupPanel: d2, popperProps: p2 =
|
|
414
|
-
ae(
|
|
411
|
+
return t(v, { ref: r2, sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: ["Children here", c3, e(Dt, { parentFloat: a3, children: "Close other children" })] });
|
|
412
|
+
}, [n2]), ...s2 };
|
|
413
|
+
return e(i2 === rt.Toolbar ? Tt : $t, { ...c2 });
|
|
414
|
+
})), xt = { placement: "right-start" }, bt = n(i((e2, n2) => {
|
|
415
|
+
const { children: i2, sx: l2, parentFloat: c2, createPopupPanel: d2, popperProps: p2 = xt, label: u2, ...m2 } = e2;
|
|
416
|
+
ae(r.isValidElement(i2), "Must supply a child component to enable a context menu.");
|
|
415
417
|
const h2 = i2, f2 = a(() => ({ ...h2?.props, ...m2, onContextMenu: (e3) => {
|
|
416
|
-
h2?.props?.onContextMenu?.(e3), e3.isDefaultPrevented() || (m2?.onContextMenu?.(e3), e3.isDefaultPrevented() || (
|
|
417
|
-
} }), [m2, h2?.props]), x2 = K(d2, [d2]), [
|
|
418
|
+
h2?.props?.onContextMenu?.(e3), e3.isDefaultPrevented() || (m2?.onContextMenu?.(e3), e3.isDefaultPrevented() || (g2(e3), e3.preventDefault()));
|
|
419
|
+
} }), [m2, h2?.props]), x2 = K(d2, [d2]), [b2, g2] = r.useState(null), { reference: y2, component: v2 } = ht({ label: u2 ?? "contextMenu", popperProps: p2, parentFloat: c2, anchor: { getBoundingClientRect: () => new DOMRect(b2?.clientX || 0, b2?.clientY || 0) }, onClose: () => g2(null), createPopupPanel: x2 });
|
|
418
420
|
return s(() => {
|
|
419
|
-
|
|
420
|
-
}, [
|
|
421
|
+
b2 ? y2.open(0) : y2.close(0);
|
|
422
|
+
}, [b2]), t(o, { children: [r.cloneElement(i2, f2), v2] });
|
|
421
423
|
})), gt = i((t2, o2) => {
|
|
422
|
-
const { slotProps:
|
|
423
|
-
return e(P, { ref: o2, slotProps: { ...
|
|
424
|
+
const { slotProps: r2, ...n2 } = t2, { getPortalContainer: i2 } = V();
|
|
425
|
+
return e(P, { ref: o2, slotProps: { ...r2, popper: { container: i2, ...r2?.popper || {} } }, ...n2 });
|
|
424
426
|
});
|
|
425
427
|
gt.displayName = "SimpleTooltip";
|
|
426
|
-
const
|
|
427
|
-
const { modifier: o2, sx:
|
|
428
|
-
return e(v, { sx: { marginLeft: "1px", marginRight: "1px", borderRadius: "4px", borderStyle: "solid", borderTopWidth: "1px", borderLeftWidth: "1px", borderRightWidth: "1px", borderBottomWidth: "2px", borderTopColor: (e2) => f(e2.palette.background.paper, e2.palette.action.disabledOpacity), borderLeftColor: (e2) => f(e2.palette.background.paper, e2.palette.action.disabledOpacity), borderRightColor: (e2) => f(e2.palette.background.paper, e2.palette.action.disabledOpacity), borderBottomColor: (e2) => f(e2.palette.background.paper, 1 - e2.palette.action.disabledOpacity), backgroundColor: (e2) => f(e2.palette.action.hover, e2.palette.action.disabledOpacity), paddingLeft: "4px", paddingRight: "4px", minHeight: "1.6em", display: "flex", justifyContent: "center", alignItems: "center", boxSizing: "content-box", overflow: "hidden", ...
|
|
429
|
-
}),
|
|
428
|
+
const yt = n((t2) => {
|
|
429
|
+
const { modifier: o2, sx: r2, ...n2 } = t2;
|
|
430
|
+
return e(v, { sx: { marginLeft: "1px", marginRight: "1px", borderRadius: "4px", borderStyle: "solid", borderTopWidth: "1px", borderLeftWidth: "1px", borderRightWidth: "1px", borderBottomWidth: "2px", borderTopColor: (e2) => f(e2.palette.background.paper, e2.palette.action.disabledOpacity), borderLeftColor: (e2) => f(e2.palette.background.paper, e2.palette.action.disabledOpacity), borderRightColor: (e2) => f(e2.palette.background.paper, e2.palette.action.disabledOpacity), borderBottomColor: (e2) => f(e2.palette.background.paper, 1 - e2.palette.action.disabledOpacity), backgroundColor: (e2) => f(e2.palette.action.hover, e2.palette.action.disabledOpacity), paddingLeft: "4px", paddingRight: "4px", minHeight: "1.6em", display: "flex", justifyContent: "center", alignItems: "center", boxSizing: "content-box", overflow: "hidden", ...r2 }, ...n2, children: e(v, { sx: { display: "flex", alignItems: "center", justifyContent: "center", textAlign: "center", "& *": { fontWeight: "500" } }, children: o2 }) });
|
|
431
|
+
}), vt = F.getOS() === F.OSType.MacOS || F.getOS() === F.OSType.IOS ? "Cmd" : "Ctrl", kt = (t2, o2 = false, r2 = null) => {
|
|
430
432
|
if (Array.isArray(t2)) {
|
|
431
|
-
let
|
|
432
|
-
for (let e2 = 0; e2 < i3.length; e2++)
|
|
433
|
-
return e(v, { sx: { display: "flex", alignItems: "center", flexDirection: "column" }, children:
|
|
433
|
+
let n3 = [], i3 = t2;
|
|
434
|
+
for (let e2 = 0; e2 < i3.length; e2++) n3.push(kt(i3[e2], o2, r2 ?? "" + e2));
|
|
435
|
+
return e(v, { sx: { display: "flex", alignItems: "center", flexDirection: "column" }, children: n3 }, r2);
|
|
434
436
|
}
|
|
435
437
|
if (!t2?.key) return null;
|
|
436
|
-
const
|
|
437
|
-
for (let e2 = 0; t2.modifiers && e2 < t2.modifiers.length; e2++)
|
|
438
|
+
const n2 = {};
|
|
439
|
+
for (let e2 = 0; t2.modifiers && e2 < t2.modifiers.length; e2++) n2[t2.modifiers[e2]] = true;
|
|
438
440
|
const i2 = [];
|
|
439
|
-
return
|
|
440
|
-
},
|
|
441
|
-
const { disabled: i2 = false, label: a2, shortcut: l2, chips: d2, description: p2, maxWidth: u2 = 280, useModifierSymbols: m2 = false, children: h2, simple: f2, componentDisabled: x2 = false, sx:
|
|
441
|
+
return n2?.[_.Ctrl] && (i2.push(e(yt, { modifier: o2 ? "^" : e("div", { style: { paddingRight: "1px" }, children: vt }) }, "ctrl")), i2.push("+")), n2?.[_.Alt] && (i2.push(e(yt, { modifier: o2 ? "⌥" : "Alt" }, "alt")), i2.push("+")), n2?.[_.Shift] && (i2.push(e(yt, { modifier: o2 ? "⇧" : e("div", { style: { paddingRight: "1px" }, children: "Shift" }) }, "shift")), i2.push("+")), n2?.[_.Meta] && (i2.push(e(yt, { modifier: o2 ? e("div", { style: { paddingTop: "1px" }, children: "⌘" }) : "Meta" }, "meta")), i2.push("+")), i2.push(e(yt, { modifier: j.toPrettyKeyCode(t2.key) }, "character")), e(v, { sx: { display: "flex", alignItems: "center" }, children: i2 }, r2);
|
|
442
|
+
}, wt = n(i((r2, n2) => {
|
|
443
|
+
const { disabled: i2 = false, label: a2, shortcut: l2, chips: d2, description: p2, maxWidth: u2 = 280, useModifierSymbols: m2 = false, children: h2, simple: f2, componentDisabled: x2 = false, sx: b2, ...g2 } = r2;
|
|
442
444
|
let y2 = null;
|
|
443
|
-
l2 && (y2 =
|
|
445
|
+
l2 && (y2 = kt(l2, m2));
|
|
444
446
|
const [w2, C2] = c(null);
|
|
445
447
|
s(() => {
|
|
446
448
|
Promise.resolve(a2).then((e2) => {
|
|
447
449
|
C2(e2);
|
|
448
450
|
});
|
|
449
451
|
}, [a2]);
|
|
450
|
-
return e(gt, { slotProps: { popper: { sx: { "& .MuiTooltip-tooltip": { marginTop: "0px !important" }, ...
|
|
451
|
-
})),
|
|
452
|
-
const { dense:
|
|
452
|
+
return e(gt, { slotProps: { popper: { sx: { "& .MuiTooltip-tooltip": { marginTop: "0px !important" }, ...b2 }, modifiers: [{ name: "offset", options: { offset: [0, 14] } }] } }, className: "tooltip-wrapper", tabIndex: -1, title: !i2 && w2 ? t(v, { sx: { maxWidth: `${u2}px` }, ref: n2, children: [t(v, { sx: { display: "flex", flexDirection: "row", marginBottom: p2 ? "4px" : "0px" }, children: [e(k, { variant: "subtitle1", component: "div", flex: "1 1 100%", children: w2 }), d2 ? e(Ie, { chips: d2 }) : null, y2 ? e(v, { sx: { marginLeft: "8px" } }, "leadingSpace") : e(o, {}), y2] }), p2 ? e(k, { variant: "caption", sx: { whiteSpace: "pre-line", lineHeight: "1.4" }, children: p2 }) : e(o, {})] }) : "", enterDelay: 260, enterNextDelay: 130, leaveDelay: 230, disableInteractive: true, ...g2, children: e("div", { style: { display: "flex", alignItems: "stretch", justifyContent: "stretch" }, children: h2 }) });
|
|
453
|
+
})), Ct = e(W, {}), Mt = e(W, { iconKey: "Check" }), St = n(i((o2, r2) => {
|
|
454
|
+
const { dense: n2 = true, outlined: i2 = false, disableHover: l2 = false, parentFloat: s2, selected: d2, icon: p2, tooltipProps: u2, children: m2, primary: x2, sx: b2, disabled: y2, className: k2, onFocus: w2, onBlur: C2, ...M2 } = o2, [S2, P2] = c(false), R2 = { marginRight: "0px", padding: n2 ? "2px" : "7px", borderRadius: (e2) => `${e2.shape.borderRadius}px`, color: (e2) => x2 ? void 0 : e2.palette.text.icon ?? e2.palette.action.active, border: (e2) => `solid ${i2 ? e2.palette.divider : "transparent"} 1px`, "& .MuiTouchRipple-child": { borderRadius: (e2) => `${e2.shape.borderRadius}px !important` }, "&.Mui-selected": { backgroundColor: (e2) => f(e2.palette.text.primary, e2.palette.action.selectedOpacity), border: (e2) => `solid ${i2 ? e2.palette.text?.primary : e2.palette.divider} 1px` }, "&.Mui-disabled": { border: (e2) => `solid ${i2 ? e2.palette.divider : "transparent"} 1px` }, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)", opacity: ".8" }, "&.Mui-focusVisible": { outline: "solid transparent 1px", border: "1px solid transparent" }, ...b2 }, D2 = { "&:hover:not(.Mui-disabled, [disabled])": { color: (e2) => e2.palette.text.primary, border: (e2) => `solid ${i2 ? e2.palette.text?.primary : e2.palette.divider} 1px`, "&.Mui-selected": { backgroundColor: (e2) => f(e2.palette.text.primary, e2.palette.action.selectedOpacity + e2.palette.action.hoverOpacity) }, "> .outline-hover": { outline: (e2) => `solid ${i2 ? e2.palette.text?.primary : e2.palette.divider} 1px` }, backgroundColor: null }, "&.Mui-focusVisible": { outline: (e2) => `solid ${e2.palette.primary.main} 1px`, border: (e2) => `1px solid ${e2.palette?.primary?.main}`, zIndex: 1 } };
|
|
453
455
|
let E2 = R2;
|
|
454
456
|
l2 || (E2 = F.mergeContentful(R2, D2));
|
|
455
457
|
const T2 = a(() => {
|
|
456
458
|
let e2 = "function" == typeof p2 ? p2() : p2;
|
|
457
|
-
return null === e2 ? e2 : e2 || (void 0 === d2 ?
|
|
459
|
+
return null === e2 ? e2 : e2 || (void 0 === d2 ? Ct : Mt);
|
|
458
460
|
}, [p2, d2]);
|
|
459
|
-
let
|
|
461
|
+
let O2 = t(g, { component: "div", ref: r2, className: h({ "Mui-focusVisible": S2, "Mui-selected": d2, "Mui-disabled": y2 }, k2), onFocus: (e2) => {
|
|
460
462
|
P2(true), w2?.(e2);
|
|
461
463
|
}, onBlur: (e2) => {
|
|
462
464
|
P2(false), C2?.(e2);
|
|
463
465
|
}, size: "small", TouchRippleProps: { center: false }, sx: E2, edge: "end", ...M2, disabled: y2 || false, children: [T2, m2] });
|
|
464
466
|
if (u2) if (u2.simple && u2.label && !u2.disabled) {
|
|
465
|
-
const { label: t2, description: o3, maxWidth:
|
|
466
|
-
|
|
467
|
-
} else
|
|
468
|
-
return
|
|
469
|
-
})),
|
|
470
|
-
const { icon:
|
|
471
|
-
const t2 = i2?.({ icon:
|
|
467
|
+
const { label: t2, description: o3, maxWidth: r3, shortcut: n3, useModifierSymbols: i3, componentDisabled: a2, simple: l3, chips: s3, ref: c2, ...d3 } = u2;
|
|
468
|
+
O2 = e(gt, { disableInteractive: true, title: t2 ?? "", ...d3, children: e(v, { sx: { display: "flex" }, children: O2 }) });
|
|
469
|
+
} else O2 = e(wt, { children: O2, ...u2 });
|
|
470
|
+
return O2;
|
|
471
|
+
})), Pt = e(W, {}), Rt = (e2) => e2.icon, Dt = n(i((o2, r2) => {
|
|
472
|
+
const { icon: n2 = Pt, renderIcon: i2 = Rt, parentFloat: l2, className: s2, onFocus: d2, selected: p2, onBlur: u2, onMouseOver: m2, onMouseOut: f2, onMouseEnter: x2, disabled: b2, children: g2, sx: y2, tooltipProps: v2, chips: k2, primary: w2, ...C2 } = o2, [M2, S2] = c(false), [P2, E2] = c(false), T2 = a(() => {
|
|
473
|
+
const t2 = i2?.({ icon: n2, disabled: b2, selected: p2 });
|
|
472
474
|
return t2 ? e(R, { className: h({ "Mui-focusVisible": M2, "Mui-hovered": P2 }), sx: { "& .MuiSvgIcon-root": { color: (e2) => w2 ? void 0 : e2.palette.text.icon ?? e2.palette.action.active }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { "& .MuiSvgIcon-root": { color: (e2) => e2.palette.text.primary } } }, children: t2 }) : null;
|
|
473
|
-
}, [i2,
|
|
474
|
-
let
|
|
475
|
+
}, [i2, b2, n2, M2, P2, w2, p2]);
|
|
476
|
+
let O2 = t(D, { ref: r2, disabled: b2, onMouseOver: (e2) => {
|
|
475
477
|
m2?.(e2), e2.isDefaultPrevented() || E2(true);
|
|
476
478
|
}, onMouseOut: (e2) => {
|
|
477
479
|
f2?.(e2), e2.isDefaultPrevented() || E2(false);
|
|
@@ -481,19 +483,19 @@ const bt = r((t2) => {
|
|
|
481
483
|
d2?.(e2), S2(true);
|
|
482
484
|
}, onBlur: (e2) => {
|
|
483
485
|
u2?.(e2), S2(false);
|
|
484
|
-
}, sx: { flex: "1 1 100%", "&.Mui-disabled > .icon path": { filter: "grayscale(65%)" }, "&.Mui-selected": { color: (e2) => e2.palette.text.primary }, color: (e2) => e2.palette.text.secondary, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (e2) => e2.palette.text.primary }, ...y2 }, ...C2, children: [T2,
|
|
485
|
-
return v2 && (
|
|
486
|
-
})),
|
|
487
|
-
const { children:
|
|
488
|
-
return e(o, { children: e(k, { ref:
|
|
489
|
-
})),
|
|
490
|
-
const { dense: i2 = true, outlined: s2 = false, label: d2, selected: p2 = false, onQuickClick: u2, parentFloat: m2, createPopupPanel: x2, popupProps:
|
|
491
|
-
const e2 = (e3, t2, o2,
|
|
492
|
-
const
|
|
493
|
-
return "function" == typeof
|
|
486
|
+
}, sx: { flex: "1 1 100%", "&.Mui-disabled > .icon path": { filter: "grayscale(65%)" }, "&.Mui-selected": { color: (e2) => e2.palette.text.primary }, color: (e2) => e2.palette.text.secondary, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (e2) => e2.palette.text.primary }, ...y2 }, ...C2, children: [T2, g2, k2 ? e(Ie, { chips: k2 }) : null] });
|
|
487
|
+
return v2 && (O2 = e(wt, { children: O2, placement: "right-start", ...v2 })), O2;
|
|
488
|
+
})), Et = n(i((t2, r2) => {
|
|
489
|
+
const { children: n2, sx: i2, primary: a2 = false, variant: l2 = "subtitle1", ...s2 } = t2;
|
|
490
|
+
return e(o, { children: e(k, { ref: r2, variant: l2, component: "div", sx: { userSelect: "none", fontWeight: "500", paddingLeft: "8px", paddingTop: "subtitle1" === l2 ? "2px" : void 0, paddingBottom: "subtitle1" === l2 ? "2px" : void 0, color: (e2) => a2 ? void 0 : e2.palette.text.secondary, ...i2 }, ...s2, children: n2 }) });
|
|
491
|
+
})), Tt = n(i((r2, n2) => {
|
|
492
|
+
const { dense: i2 = true, outlined: s2 = false, label: d2, selected: p2 = false, onQuickClick: u2, parentFloat: m2, createPopupPanel: x2, popupProps: b2, onPopupOpen: y2, onPopupClose: k2, quickButtonProps: w2, createQuickButton: C2, tooltip: M2 = "", createTooltip: S2, icon: P2, disabled: R2, buttonProps: D2 = F.EmptyObject, disableHover: E2, touchRippleRef: T2, primary: O2, children: $2, sx: z2, className: I2, ...N2 } = r2, B2 = Y(), L2 = a(() => {
|
|
493
|
+
const e2 = (e3, t2, o2, r3 = o2) => {
|
|
494
|
+
const n3 = "boolean" == typeof s2 ? null : s2[e3];
|
|
495
|
+
return "function" == typeof n3 ? n3(t2) : n3 || (s2 ? o2 : r3);
|
|
494
496
|
};
|
|
495
497
|
return { outline: { color: (t2) => e2("color", t2, t2.palette.divider, "transparent"), hoverColor: (t2) => e2("hoverColor", t2, t2.palette.text?.primary, t2.palette.divider), focusColor: (t2) => e2("focusColor", t2, t2.palette?.primary?.main) }, active: "dark" === B2.palette.mode ? B2.palette.text.secondary : B2.palette.text.primary, text: B2.palette.text.icon ?? B2.palette.action.active };
|
|
496
|
-
}, [s2, B2]), [A2, H2] = c(false), [W2, V2] = c(false), [_2, j2] = c(false), U2 = l(null), Q2 = l(null), G2 =
|
|
498
|
+
}, [s2, B2]), [A2, H2] = c(false), [W2, V2] = c(false), [_2, j2] = c(false), U2 = l(null), Q2 = l(null), G2 = ht({ anchor: U2.current, label: d2, createPopupPanel: x2, parentFloat: m2, popperProps: b2?.popperProps, onClose: () => {
|
|
497
499
|
H2(false), k2?.();
|
|
498
500
|
}, onOpen: () => {
|
|
499
501
|
H2(true), y2?.();
|
|
@@ -502,59 +504,59 @@ const bt = r((t2) => {
|
|
|
502
504
|
}, [u2, G2]), J2 = K(() => {
|
|
503
505
|
A2 ? G2.reference.close(0) : G2.reference.open(0);
|
|
504
506
|
}, [A2, G2, m2, d2]), Z2 = a(() => {
|
|
505
|
-
const e2 = { "&.bordered": { borderWidth: "1px", borderRadius: "0px", borderTopStyle: "solid", borderBottomStyle: "solid", borderColor: (e3) => L2.outline.color(e3), "&.Mui-focusVisible": { border: (e3) => `1px solid ${L2.outline.focusColor(e3)} !important` }, "&:hover:not(.Mui-disabled, [disabled])": { borderColor: () => E2 ? "transparent" : void 0, backgroundColor: () => E2 ? "transparent" : void 0 }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { borderColor: (e3) => L2.outline.hoverColor(e3) }, "&.Mui-selected:not(.Mui-disabled, [disabled])": { borderColor: (e3) => L2.outline.hoverColor(e3) }, "&.left": { borderTopLeftRadius: (e3) => `${e3.shape.borderRadius}px`, borderBottomLeftRadius: (e3) => `${e3.shape.borderRadius}px`, borderLeftStyle: "solid" }, "&.hard-right": { borderRightStyle: "solid", borderRightWidth: "1px", borderRightColor: (e3) => L2.outline.color(e3) }, "&.right": { borderTopRightRadius: (e3) => `${e3.shape.borderRadius}px`, borderBottomRightRadius: (e3) => `${e3.shape.borderRadius}px`, borderRightStyle: "solid" }, "&.divider": { borderLeftWidth: "0px !important" } }, "& .MuiTouchRipple-child": { borderRadius: (e3) => `${e3.shape.borderRadius}px !important` } }, t2 = { "&.Mui-selected": { backgroundColor: (e3) => f(e3.palette.primary.main, e3.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (e3) => f(e3.palette.primary.main, e3.palette.action.selectedOpacity + e3.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (e3) => f(e3.palette.primary.main, e3.palette.action.selectedOpacity) } } } }, o2 = { maxHeight: "100%", "&.Mui-selected": { backgroundColor: (e3) => f(e3.palette.text.icon ?? e3.palette.action.active, e3.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (e3) => f(e3.palette.text.icon ?? e3.palette.action.active, e3.palette.action.selectedOpacity + e3.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (e3) => f(e3.palette.text.icon ?? e3.palette.action.active, e3.palette.action.selectedOpacity) } } }, "&:hover:not(.Mui-disabled, [disabled])": { color: (e3) => e3.palette.text.primary }, backgroundColor: () => E2 ? "transparent" : void 0, color: (e3) => e3.palette.text.icon, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)", opacity: ".8" }, padding: () => i2 ? "2px 3px" : "7px", marginRight: "0" },
|
|
506
|
-
return { quickButtonStyling:
|
|
507
|
+
const e2 = { "&.bordered": { borderWidth: "1px", borderRadius: "0px", borderTopStyle: "solid", borderBottomStyle: "solid", borderColor: (e3) => L2.outline.color(e3), "&.Mui-focusVisible": { border: (e3) => `1px solid ${L2.outline.focusColor(e3)} !important` }, "&:hover:not(.Mui-disabled, [disabled])": { borderColor: () => E2 ? "transparent" : void 0, backgroundColor: () => E2 ? "transparent" : void 0 }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { borderColor: (e3) => L2.outline.hoverColor(e3) }, "&.Mui-selected:not(.Mui-disabled, [disabled])": { borderColor: (e3) => L2.outline.hoverColor(e3) }, "&.left": { borderTopLeftRadius: (e3) => `${e3.shape.borderRadius}px`, borderBottomLeftRadius: (e3) => `${e3.shape.borderRadius}px`, borderLeftStyle: "solid" }, "&.hard-right": { borderRightStyle: "solid", borderRightWidth: "1px", borderRightColor: (e3) => L2.outline.color(e3) }, "&.right": { borderTopRightRadius: (e3) => `${e3.shape.borderRadius}px`, borderBottomRightRadius: (e3) => `${e3.shape.borderRadius}px`, borderRightStyle: "solid" }, "&.divider": { borderLeftWidth: "0px !important" } }, "& .MuiTouchRipple-child": { borderRadius: (e3) => `${e3.shape.borderRadius}px !important` } }, t2 = { "&.Mui-selected": { backgroundColor: (e3) => f(e3.palette.primary.main, e3.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (e3) => f(e3.palette.primary.main, e3.palette.action.selectedOpacity + e3.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (e3) => f(e3.palette.primary.main, e3.palette.action.selectedOpacity) } } } }, o2 = { maxHeight: "100%", "&.Mui-selected": { backgroundColor: (e3) => f(e3.palette.text.icon ?? e3.palette.action.active, e3.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (e3) => f(e3.palette.text.icon ?? e3.palette.action.active, e3.palette.action.selectedOpacity + e3.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (e3) => f(e3.palette.text.icon ?? e3.palette.action.active, e3.palette.action.selectedOpacity) } } }, "&:hover:not(.Mui-disabled, [disabled])": { color: (e3) => e3.palette.text.primary }, backgroundColor: () => E2 ? "transparent" : void 0, color: (e3) => e3.palette.text.icon, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)", opacity: ".8" }, padding: () => i2 ? "2px 3px" : "7px", marginRight: "0" }, r3 = F.mergeContentful(o2, e2), n3 = F.mergeContentful(r3, t2), a2 = F.mergeContentful(o2, e2);
|
|
508
|
+
return { quickButtonStyling: r3, openQuickButtonStyling: n3, compoundStyling: a2, openCompoundStyling: F.mergeContentful(a2, t2) };
|
|
507
509
|
}, [L2, E2]), ee2 = K((t2) => {
|
|
508
|
-
const { children: o2, ref:
|
|
509
|
-
return e(gt, { ref:
|
|
510
|
-
}, []), te2 = u2 || C2, oe2 = te2 && (w2?.tooltip || w2?.createTooltip),
|
|
511
|
-
const { tooltip: o2, createTooltip:
|
|
512
|
-
let a2 = e(
|
|
513
|
-
return oe2 ? (a2 = (
|
|
514
|
-
},
|
|
510
|
+
const { children: o2, ref: r3, ...n3 } = t2;
|
|
511
|
+
return e(gt, { ref: r3, ...n3, disableInteractive: true, children: o2 });
|
|
512
|
+
}, []), te2 = u2 || C2, oe2 = te2 && (w2?.tooltip || w2?.createTooltip), re2 = (t2) => {
|
|
513
|
+
const { tooltip: o2, createTooltip: r3, sx: n3, ...i3 } = t2;
|
|
514
|
+
let a2 = e(g, { sx: { ...n3 }, component: "div", ...i3 });
|
|
515
|
+
return oe2 ? (a2 = (r3 ?? ee2)({ title: A2 ? "" : o2 ?? M2, children: e("div", { children: a2 }) }, A2), a2) : a2;
|
|
516
|
+
}, ne2 = { onKeyDown: (e2) => {
|
|
515
517
|
e2.keyCode === q.Space ? J2() : e2.keyCode === q.F4 || e2.keyCode === q.Down ? G2.reference.open(0) : e2.keyCode === q.Up && G2.reference.close(0);
|
|
516
518
|
} };
|
|
517
519
|
let ie2 = e(o, {});
|
|
518
520
|
const ae2 = a(() => "function" == typeof P2 ? P2() : P2, [P2]);
|
|
519
521
|
if (te2) {
|
|
520
|
-
let
|
|
521
|
-
const
|
|
522
|
+
let r3 = A2 ? Z2.openQuickButtonStyling : Z2.quickButtonStyling;
|
|
523
|
+
const n3 = (C2 || re2)({ tabIndex: -1, disabled: R2, size: "small", edge: "end", onMouseEnter: () => {
|
|
522
524
|
G2.reference.parent.closeChild();
|
|
523
525
|
}, onMouseDown: (e2) => {
|
|
524
526
|
0 === e2.button && (e2.preventDefault(), X2(e2));
|
|
525
527
|
}, touchRippleRef: T2, children: ae2, ...w2, className: h({ "Mui-focusVisible": W2 || A2, "Mui-selected": p2, "Mui-hovered": _2 || A2, "Mui-disabled": R2, bordered: true, left: true, "hard-right": true }, w2?.className), sx: { ...Z2.quickButtonStyling, height: "100%", ...w2?.sx } });
|
|
526
|
-
let a2 =
|
|
527
|
-
oe2 && (a2 = (S2 ?? ee2)({ title: A2 ? "" : M2, children: a2 }, A2)), ie2 = t(o, { children: [
|
|
528
|
+
let a2 = it(true, i2, A2);
|
|
529
|
+
oe2 && (a2 = (S2 ?? ee2)({ title: A2 ? "" : M2, children: a2 }, A2)), ie2 = t(o, { children: [n3, e(g, { ref: Q2, component: "div", className: h({ "Mui-selected": A2, "Mui-hovered": _2 || A2, "Mui-disabled": R2, "Mui-focusVisible": W2 || A2, bordered: true, right: true, divider: true }), sx: { paddingLeft: (i2 ? 0 : 2) + "px", paddingRight: (i2 ? 0 : 2) + "px", width: () => "calc(var(--icon-size, 1.25em) * 0.8)", ...Z2.quickButtonStyling, ...r3 }, TouchRippleProps: { center: false }, tabIndex: -1, disabled: R2, size: "small", edge: "end", onMouseDown: (e2) => {
|
|
528
530
|
0 === e2.button && (e2.preventDefault(), J2());
|
|
529
531
|
}, children: a2 })] });
|
|
530
532
|
} else {
|
|
531
533
|
let t2 = A2 ? Z2.openCompoundStyling : Z2.compoundStyling;
|
|
532
|
-
ie2 = e(
|
|
534
|
+
ie2 = e(St, { ref: Q2, tabIndex: -1, disabled: R2, size: "small", icon: ae2, className: h({ "Mui-selected": A2 || p2, "Mui-hovered": _2, "Mui-disabled": R2, "Mui-focusVisible": W2 || A2, bordered: true, left: true, right: true }), sx: { ...Z2.quickButtonStyling, ...t2 }, onMouseDown: (e2) => {
|
|
533
535
|
0 === e2.button && (e2.preventDefault(), J2());
|
|
534
|
-
}, children:
|
|
536
|
+
}, children: it(false, i2, A2) });
|
|
535
537
|
}
|
|
536
538
|
const { className: le2, sx: se2, ...ce2 } = D2;
|
|
537
|
-
let de2 = e(v, { onFocus: () => V2(true), onBlur: () => V2(false), onMouseOver: () => j2(true), onMouseOut: () => j2(false), ...
|
|
538
|
-
return oe2 || (de2 = (S2 ?? ee2)({ title: A2 ? "" : M2, children: de2 }, A2)), t(v, { className: h(I2, "popupIconButton"), ref:
|
|
539
|
+
let de2 = e(v, { onFocus: () => V2(true), onBlur: () => V2(false), onMouseOver: () => j2(true), onMouseOut: () => j2(false), ...ne2, "aria-label": "split button", ref: U2, tabIndex: R2 ? void 0 : 0, className: h(le2, "split-button-root", { "Mui-focusVisible": W2 || A2, "Mui-selected": A2 || p2, "Mui-hovered": _2, "Mui-disabled": R2 }), sx: { display: "flex", flex: "1 1 100%", alignItems: "stretch", width: "fit-content", "&:not(.Mui-disabled)": { cursor: "pointer" }, marginLeft: s2 ? "1px" : "0px", marginRight: s2 ? "1px" : "0px", borderRadius: (e2) => `${e2.shape.borderRadius}px`, "&.Mui-focusVisible": { outline: (e2) => `solid ${e2.palette.primary.main} 1px`, zIndex: 2 }, ...se2 }, ...ce2, children: ie2 });
|
|
540
|
+
return oe2 || (de2 = (S2 ?? ee2)({ title: A2 ? "" : M2, children: de2 }, A2)), t(v, { className: h(I2, "popupIconButton"), ref: n2, ...N2, sx: { zIndex: W2 || A2 ? 2 : void 0, display: "flex", alignItems: "center", ...z2 }, children: [de2, G2.component] });
|
|
539
541
|
}));
|
|
540
|
-
|
|
541
|
-
const
|
|
542
|
-
const { selected: i2 = false, label: s2, onQuickClick: d2, parentFloat: u2, createPopupPanel: m2, popupProps: f2 =
|
|
542
|
+
Tt.displayName = "ExhibitPopupIconButton";
|
|
543
|
+
const Ot = {}, $t = n(i((r2, n2) => {
|
|
544
|
+
const { selected: i2 = false, label: s2, onQuickClick: d2, parentFloat: u2, createPopupPanel: m2, popupProps: f2 = Ot, onPopupOpen: x2, onPopupClose: b2, quickButtonProps: g2, createQuickButton: k2, tooltip: w2 = "", createTooltip: C2, icon: M2, disabled: S2, touchRippleRef: P2, primary: R2, children: E2, sx: T2, ...O2 } = r2, [$2, z2] = c(false), [I2, N2] = c(false), [B2, L2] = c(false), [F2, A2] = c(false), H2 = l(null), W2 = l(null), V2 = a(() => {
|
|
543
545
|
if (!f2) return;
|
|
544
546
|
const { popperProps: e2 } = f2;
|
|
545
547
|
return { placement: "right-start", offsets: [-4, -2], ...e2 };
|
|
546
|
-
}, [f2]), q2 =
|
|
547
|
-
z2(false),
|
|
548
|
+
}, [f2]), q2 = ht({ anchor: H2.current, label: s2, createPopupPanel: m2, parentFloat: u2, popperProps: V2, onClose: () => {
|
|
549
|
+
z2(false), b2?.();
|
|
548
550
|
}, onOpen: () => {
|
|
549
551
|
z2(true), x2?.();
|
|
550
552
|
} }), _2 = K((e2) => {
|
|
551
553
|
0 === e2.button && (d2?.(e2), q2.reference.close(0));
|
|
552
554
|
}, [d2]), j2 = e(We, {}), U2 = { "&.Mui-selected": { color: (e2) => e2.palette.text.primary, "& svg * ": { color: (e2) => e2.palette.text.primary } } }, Q2 = p((t2) => {
|
|
553
|
-
const { children: o2, ref:
|
|
554
|
-
return e(gt, { ref:
|
|
555
|
+
const { children: o2, ref: r3, ...n3 } = t2;
|
|
556
|
+
return e(gt, { ref: r3, ...n3, disableInteractive: true, children: o2 });
|
|
555
557
|
}, []), G2 = d2 || k2, X2 = (t2) => {
|
|
556
|
-
const { tooltip: o2, createTooltip:
|
|
557
|
-
return e(
|
|
558
|
+
const { tooltip: o2, createTooltip: r3, ...n3 } = t2;
|
|
559
|
+
return e(Dt, { icon: M2, className: h({ "Mui-hovered": B2 }), sx: { flex: "1 1 100%", ...U2 }, ...n3, children: s2 });
|
|
558
560
|
}, Y2 = { onFocus: () => {
|
|
559
561
|
N2(true);
|
|
560
562
|
}, onBlur: () => N2(false), onMouseOver: () => {
|
|
@@ -568,46 +570,46 @@ const Tt = {}, $t = r(i((n2, r2) => {
|
|
|
568
570
|
} };
|
|
569
571
|
let J2 = e(o, {});
|
|
570
572
|
if (G2) {
|
|
571
|
-
const
|
|
573
|
+
const r3 = (k2 || X2)({ tabIndex: -1, disabled: S2, onMouseEnter: () => {
|
|
572
574
|
q2.reference.parent.closeChild();
|
|
573
575
|
}, onMouseDown: (e2) => {
|
|
574
576
|
0 === e2.button && (e2.preventDefault(), _2(e2));
|
|
575
|
-
}, className: h("quick-left", {},
|
|
576
|
-
J2 = t(o, { children: [
|
|
577
|
+
}, className: h("quick-left", {}, g2?.className), ...g2 });
|
|
578
|
+
J2 = t(o, { children: [r3, e(y, { sx: { ml: "0px", mr: "0px" }, orientation: "vertical", variant: "middle", flexItem: true }), e(D, { ref: W2, className: h({ "Mui-selected": $2, "Mui-hovered": B2 }), sx: { borderTopLeftRadius: "0px", borderBottomLeftRadius: "0px", paddingLeft: "0px", paddingRight: "0px", marginLeft: "0px", color: (e2) => R2 ? void 0 : e2.palette.text.secondary, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (e2) => e2.palette.text.primary }, ...U2 }, tabIndex: -1, disabled: S2, ...Y2, children: e(v, { className: "expand-icon", sx: { flex: "none", display: "flex", border: "1px solid transparent", paddingTop: "1px", paddingBottom: "1px", color: (e2) => R2 ? void 0 : e2.palette.text.icon ?? e2.palette.action.active }, onMouseOver: (e2) => {
|
|
577
579
|
e2.preventDefault(), A2(true);
|
|
578
580
|
}, onMouseLeave: () => {
|
|
579
581
|
A2(false);
|
|
580
582
|
}, onClick: (e2) => {
|
|
581
|
-
e2.preventDefault(),
|
|
583
|
+
e2.preventDefault(), $2 ? q2.reference.close() : q2.reference.open();
|
|
582
584
|
}, children: j2 }) })] });
|
|
583
|
-
} else J2 = t(
|
|
584
|
-
e2.preventDefault(),
|
|
585
|
+
} else J2 = t(Dt, { ref: W2, tabIndex: -1, disabled: S2, icon: M2, className: h({ "Mui-selected": $2 || i2, "Mui-hovered": B2 }), sx: { flex: "1 1 100%", paddingRight: "0px", ...U2 }, onClick: (e2) => {
|
|
586
|
+
e2.preventDefault(), $2 ? q2.reference.close() : q2.reference.open();
|
|
585
587
|
}, ...Y2, children: [e("div", { style: { flex: "1 1 100%" }, children: s2 }), e(v, { className: "expand-icon", sx: { flex: "none", display: "flex", color: (e2) => R2 ? void 0 : e2.palette.text.icon ?? e2.palette.action.active }, children: j2 })] });
|
|
586
|
-
let Z2 = e(v, { "aria-label": "split button", ref: H2, tabIndex: S2 ? void 0 : 0, className: h({ "Mui-disabled": S2, "Mui-selected":
|
|
587
|
-
return G2 && !F2 && (
|
|
588
|
-
})),
|
|
589
|
-
const { onSelectToggle:
|
|
590
|
-
return e(
|
|
588
|
+
let Z2 = e(v, { "aria-label": "split button", ref: H2, tabIndex: S2 ? void 0 : 0, className: h({ "Mui-disabled": S2, "Mui-selected": $2, "Mui-focusVisible": I2 || $2, "Mui-hovered": B2 }), 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%)" }, ...T2 }, ...O2, children: J2 });
|
|
589
|
+
return G2 && !F2 && (g2?.tooltip || g2?.createTooltip) && (Z2 = (g2?.createTooltip ?? Q2)({ title: $2 ? "" : Z2 ?? g2?.tooltip, children: Z2 }, $2)), t(v, { ref: n2, sx: { zIndex: I2 || $2 ? 2 : void 0, display: "flex", " .tooltip-wrapper": { display: "flex", flex: "1 1 100%" } }, children: [Z2, q2.component] });
|
|
590
|
+
})), zt = n(i((t2, o2) => {
|
|
591
|
+
const { onSelectToggle: r2, selected: n2 = false, label: i2, shortcut: a2, tabIndex: l2 = 0, preventFocus: s2 = false, ...c2 } = t2;
|
|
592
|
+
return e(wt, { label: i2, shortcut: a2, children: e(St, { ref: o2, outlined: false, tabIndex: l2, selected: n2, onMouseDown: (e2) => {
|
|
591
593
|
s2 && e2.preventDefault();
|
|
592
594
|
}, onClick: () => {
|
|
593
|
-
|
|
595
|
+
r2?.(!n2);
|
|
594
596
|
}, ...c2 }) });
|
|
595
|
-
})),
|
|
596
|
-
const { children:
|
|
597
|
-
let s2 =
|
|
598
|
-
return null === s2 && (s2 =
|
|
599
|
-
if (
|
|
597
|
+
})), It = e(W, {}), Nt = e(W, { iconKey: "Check" }), Bt = n(i((t2, o2) => {
|
|
598
|
+
const { children: r2, selected: n2 = true, outlined: i2 = true, sx: a2, ...l2 } = t2;
|
|
599
|
+
let s2 = r2;
|
|
600
|
+
return null === s2 && (s2 = It), s2 || (s2 = Nt), e(v, { ref: o2, sx: { ...{ display: "flex", border: (e2) => n2 ? `solid ${i2 ? e2.palette.divider : "transparent"} 1px` : "solid transparent 1px", borderRadius: (e2) => `${e2.shape.borderRadius}px`, backgroundColor: (e2) => {
|
|
601
|
+
if (n2) return f(e2.palette.text.icon ?? e2.palette.action.active, e2.palette.action.selectedOpacity);
|
|
600
602
|
} }, ...a2 }, ...l2, children: s2 });
|
|
601
603
|
}));
|
|
602
|
-
function
|
|
603
|
-
const [t2, o2] = c(() => /* @__PURE__ */ new Map()), { showModal:
|
|
604
|
+
function Lt(e2) {
|
|
605
|
+
const [t2, o2] = c(() => /* @__PURE__ */ new Map()), { showModal: n2, updateModal: i2, destroyModal: a2, hideModal: l2 } = le({ disableAutoDestroy: true });
|
|
604
606
|
return (s2, c2, d2, p2) => new Promise((u2, m2) => {
|
|
605
607
|
const h2 = { ...e2, ...d2, onHide: () => {
|
|
606
608
|
const e3 = t2.get(s2);
|
|
607
609
|
d2?.onHide?.(), o2((e4) => (e4.delete(s2), e4)), l2(e3.id);
|
|
608
610
|
}, onDone: (e3) => {
|
|
609
|
-
const
|
|
610
|
-
o2((e4) => (e4.delete(s2), e4)), d2?.onDone?.(e3),
|
|
611
|
+
const r2 = t2.get(s2);
|
|
612
|
+
o2((e4) => (e4.delete(s2), e4)), d2?.onDone?.(e3), r2 && r2.id && !p2?.disableAutoDestroy && a2(r2.id);
|
|
611
613
|
}, onShown: (e3) => {
|
|
612
614
|
o2((t3) => {
|
|
613
615
|
const o3 = t3.get(s2);
|
|
@@ -616,50 +618,50 @@ function Bt(e2) {
|
|
|
616
618
|
}, open: true }, f2 = t2.get(s2);
|
|
617
619
|
if (f2) return i2(f2.id, h2), void u2(f2.element);
|
|
618
620
|
if (!c2) return void m2("invalid function");
|
|
619
|
-
const x2 =
|
|
620
|
-
o2((e3) => (e3.set(s2, { id:
|
|
621
|
+
const x2 = r.lazy(c2), b2 = n2(x2, h2, { destroyOnClose: !p2?.disableAutoDestroy });
|
|
622
|
+
o2((e3) => (e3.set(s2, { id: b2.id, element: null }), e3));
|
|
621
623
|
});
|
|
622
624
|
}
|
|
623
|
-
const
|
|
624
|
-
const { defaultPosition:
|
|
625
|
+
const Ft = { x: 0, y: 0 }, At = n(i((t2, o2) => {
|
|
626
|
+
const { defaultPosition: r2 = Ft, PaperComponent: n2 = w, onDragStop: i2, rootSel: d2 = ".MuiModal-root", handleSel: p2 = ".draggable-title", titleSize: m2, rootSize: h2, ...f2 } = t2, x2 = l(null), b2 = a(() => m2 && h2 ? { left: 0, top: 0, right: h2.width - m2.width, bottom: h2.height - m2.height } : null, [m2, h2]), [g2, y2] = c(null), [v2, k2] = c(null), [C2, M2] = c(null);
|
|
625
627
|
return u(() => {
|
|
626
|
-
!
|
|
627
|
-
}, [
|
|
628
|
-
|
|
629
|
-
}, [
|
|
628
|
+
!g2 && r2 && y2(r2 ?? Ft);
|
|
629
|
+
}, [r2]), s(() => {
|
|
630
|
+
b2 && g2 && k2({ x: Math.max(0, Math.min(g2.x, b2.right)), y: Math.max(0, Math.min(g2.y, b2.bottom)) });
|
|
631
|
+
}, [g2, b2]), e(de, { nodeRef: x2, handle: p2, cancel: '[class*="MuiDialogContent-root"]', position: v2, bounds: b2 ?? ".MuiModal-root", onStop: i2, onStart: (e2, t3) => {
|
|
630
632
|
const o3 = e2;
|
|
631
633
|
M2({ x: (o3.clientX ?? o3.touches?.[0]?.clientX) - t3.x, y: (o3.clientY ?? o3.touches?.[0]?.clientY) - t3.y });
|
|
632
634
|
}, onDrag: (e2, t3) => {
|
|
633
|
-
const o3 = e2,
|
|
634
|
-
y2({ x:
|
|
635
|
-
}, children: e(
|
|
636
|
-
})),
|
|
637
|
-
const
|
|
635
|
+
const o3 = e2, r3 = o3.clientX ?? o3.touches?.[0]?.clientX, n3 = o3.clientY ?? o3.touches?.[0]?.clientY;
|
|
636
|
+
y2({ x: r3 - C2.x, y: n3 - C2.y });
|
|
637
|
+
}, children: e(n2, { ref: re([x2, o2]), ...f2 }) });
|
|
638
|
+
})), Ht = { x: "50", y: "50" }, Wt = n(i((o2, r2) => {
|
|
639
|
+
const n2 = ee({ props: o2, name: "MuiDialog" }), i2 = Y(), a2 = { enter: 0.66 * i2.transitions.duration.enteringScreen, exit: 0.66 * i2.transitions.duration.leavingScreen }, { title: d2 = "SheetXL", key: p2 = "draggable-window", onCancel: u2, onDone: m2, onShow: x2, onShown: b2, onHide: y2, onClose: k2, open: C2, autoFocusSel: M2, children: S2, transitionDuration: P2 = a2, TransitionProps: R2, slots: D2 = F.EmptyArray, slotProps: $2 = F.EmptyArray, sx: z2, className: I2, onMouseDown: N2, initialPosition: B2 = Ht, isModal: L2 = false, ...A2 } = n2;
|
|
638
640
|
let H2 = D2.transition ?? E;
|
|
639
641
|
const _2 = D2.backdrop ?? T, j2 = D2.paper ?? w;
|
|
640
|
-
let Q2 =
|
|
642
|
+
let Q2 = $2.transition;
|
|
641
643
|
R2 && (Q2 = { ...R2, ...Q2 });
|
|
642
|
-
const G2 =
|
|
644
|
+
const G2 = $2.backdrop, X2 = $2.paper, J2 = l(null), [Z2, te2] = c(null), [oe2, ne2] = c(false), [ae2, le2] = c(false), de2 = l(null), [pe2, ue2] = ie(), me2 = l(null), [he2, fe2] = ie(), xe2 = l(null);
|
|
643
645
|
s(() => {
|
|
644
|
-
Z2 &&
|
|
646
|
+
Z2 && ne2(C2);
|
|
645
647
|
}, [C2, Z2]);
|
|
646
|
-
const
|
|
647
|
-
u2?.(),
|
|
648
|
+
const be2 = K(() => {
|
|
649
|
+
u2?.(), ne2(false);
|
|
648
650
|
}, [u2]);
|
|
649
651
|
s(() => {
|
|
650
652
|
if (0 === ue2.width && 0 === ue2.height || Z2) return;
|
|
651
653
|
const e2 = xe2.current?.getBoundingClientRect(), t2 = ue2.height - e2.height, o3 = ue2.width - e2.width;
|
|
652
|
-
let
|
|
653
|
-
"number" == typeof B2?.x ?
|
|
654
|
+
let r3 = 0.5 * o3, n3 = 0.5 * t2;
|
|
655
|
+
"number" == typeof B2?.x ? r3 = B2.x : "string" == typeof B2?.x && (r3 = o3 * (parseFloat(B2.x) / 100)), "number" == typeof B2?.y ? n3 = B2.y : "string" == typeof B2?.y && (n3 = t2 * (parseFloat(B2.y) / 100)), te2({ x: r3, y: n3 });
|
|
654
656
|
}, [ue2, fe2]);
|
|
655
|
-
const [
|
|
657
|
+
const [ge2, ye2] = c(false), [ve2, ke2] = c(null), [we2, Ce2] = c(null), Me2 = K((e2) => {
|
|
656
658
|
if (ve2) return ve2.focus(e2), true;
|
|
657
659
|
if (M2) {
|
|
658
660
|
const t2 = me2.current?.querySelectorAll?.(M2);
|
|
659
661
|
if (t2 && t2.length > 0) return t2[0]?.focus?.(e2), true;
|
|
660
662
|
}
|
|
661
663
|
return me2.current?.focus?.(e2), false;
|
|
662
|
-
}, [ve2, M2]), Se2 = U(
|
|
664
|
+
}, [ve2, M2]), Se2 = U(r2, () => ({ focus: (e2) => {
|
|
663
665
|
Me2(e2);
|
|
664
666
|
} }), []), Pe2 = { ...Q2, onExited: (e2) => {
|
|
665
667
|
m2?.(null), Q2?.onExited?.(e2);
|
|
@@ -671,98 +673,98 @@ const Lt = { x: 0, y: 0 }, Ft = r(i((t2, o2) => {
|
|
|
671
673
|
}, onEntered: (e2, t2) => {
|
|
672
674
|
x2?.(), Q2?.onEntered?.(e2, t2);
|
|
673
675
|
}, onEntering: (e2, t2) => {
|
|
674
|
-
le2(true),
|
|
676
|
+
le2(true), b2?.(Se2.current);
|
|
675
677
|
} };
|
|
676
678
|
s(() => {
|
|
677
679
|
ae2 && Me2();
|
|
678
680
|
}, [ae2]);
|
|
679
681
|
let Re2 = e(ce, { focusTrapOptions: { escapeDeactivates: false, allowOutsideClick: true, initialFocus: false }, ref: J2, active: ae2, children: e(H2, { in: oe2, timeout: P2, role: "presentation", ...Pe2, children: e(v, { className: "MuiDialog-container", ref: me2, tabIndex: 0, sx: { outline: "none", position: "relative" }, onKeyDown: (e2) => {
|
|
680
|
-
e2.which === q.Escape && (
|
|
681
|
-
}, children: t(
|
|
682
|
+
e2.which === q.Escape && (be2(), de2.current?.start(e2, { center: false }), setTimeout(() => de2.current?.stop(e2), 180)), e2.stopPropagation();
|
|
683
|
+
}, children: t(At, { ref: re([xe2, r2]), className: h({ "Mui-focusVisible": ge2 }, I2, "draggable"), sx: { "& *": (e2) => Xe(e2), pointerEvents: "auto", userSelect: "none", "&:hover:not([disabled]):not(.Mui-focusVisible)": { outline: (e2) => `solid ${f(e2.palette.text?.primary, 0.2)} 1px` }, "&.Mui-focusVisible": { outline: (e2) => `solid ${f(e2.palette.text?.primary, 0.2)} 1px` }, position: "absolute", maxWidth: "100%", ...z2 }, defaultPosition: Z2, titleSize: fe2, rootSize: ue2, PaperComponent: j2, ...A2, ...X2, children: [d2 ? e(O, { className: h({ "Mui-selected": ge2 }, "draggable-title"), sx: { cursor: "move", display: "flex", color: (e2) => e2.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: (e2) => `${e2.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: (e2) => e2.transitions.duration.shortest / 2 + "ms" }, backgroundColor: (e2) => f(e2.palette.action.hover, 0.03) }, ref: he2, children: t(v, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: (e2) => e2.spacing(1), marginLeft: (e2) => e2.spacing(1), marginRight: (e2) => e2.spacing(1) }, children: [e(v, { sx: { flex: "1 1 100%", paddingLeft: (e2) => e2.spacing(1) }, children: d2 }), e(wt, { label: "Close", children: e(g, { "aria-label": "close", sx: { color: (e2) => e2.palette.text.icon ?? e2.palette.action.active }, touchRippleRef: de2, onPointerDown: (e2) => {
|
|
682
684
|
de2.current?.start(e2, { center: false }), e2.stopPropagation(), e2.preventDefault();
|
|
683
|
-
}, onPointerUp:
|
|
685
|
+
}, onPointerUp: be2, children: e(W, { iconKey: "Close" }) }) })] }) }) : null, S2] }) }) }) }), De2 = null;
|
|
684
686
|
L2 && (De2 = e(_2, { ...G2, open: oe2, onMouseDown: (e2) => {
|
|
685
|
-
|
|
687
|
+
be2(), G2?.onMouseDown?.(e2);
|
|
686
688
|
}, onClick: (e2) => {
|
|
687
689
|
k2?.(e2, "backdropClick"), G2?.onClick?.(e2);
|
|
688
690
|
}, sx: { pointerEvents: "auto", ...G2?.sx } }));
|
|
689
691
|
const { getPortalContainer: Ee2 } = V();
|
|
690
|
-
return se(t(v, { className: "MuiModal-root", sx: { position: "fixed", zIndex: "1300", right: "0", bottom: "0", top: "0", left: "0", outline: "0", display: "block", pointerEvents: "none" }, ref:
|
|
691
|
-
|
|
692
|
+
return se(t(v, { className: "MuiModal-root", sx: { position: "fixed", zIndex: "1300", right: "0", bottom: "0", top: "0", left: "0", outline: "0", display: "block", pointerEvents: "none" }, ref: re([Se2, pe2]), onPointerDown: (e2) => {
|
|
693
|
+
ge2 && (e2.target === me2.current || e2.target.tabIndex < 0) && me2.current?.contains(document.activeElement);
|
|
692
694
|
}, onContextMenu: (e2) => {
|
|
693
695
|
e2.isPropagationStopped() || e2.preventDefault();
|
|
694
696
|
}, onFocus: (e2) => {
|
|
695
|
-
!
|
|
697
|
+
!ge2 && (e2.target === me2.current || e2.target.tabIndex < 0) && setTimeout(() => {
|
|
696
698
|
Me2();
|
|
697
699
|
}, 100), J2.current?.focusTrap?.unpause(), ye2(true), me2.current?.contains(e2.target) && e2.target !== me2.current && ke2(e2.target), e2.relatedTarget && !we2 && Ce2(e2.relatedTarget);
|
|
698
700
|
}, onBlur: (e2) => {
|
|
699
701
|
Se2?.current?.contains(e2.relatedTarget) || (Ce2(null), J2.current?.focusTrap?.pause(), ye2(false));
|
|
700
702
|
}, children: [De2, Re2] }), Ee2(), p2 + "");
|
|
701
|
-
})),
|
|
702
|
-
const { description:
|
|
703
|
+
})), Kt = ["Ok", "Cancel"], Vt = n(i((o2, r2) => {
|
|
704
|
+
const { description: n2, icon: i2, onCancel: s2, onOption: c2, onDone: d2, onValidateOption: p2, createOptionsButton: u2, options: m2 = Kt, autoFocusSel: h2 = ".defaultOption", defaultOption: x2 = m2[0], cancelOption: b2 = "Cancel", children: g2, ...y2 } = o2, w2 = ue({ shouldUseNativeValidation: false }), { handleSubmit: C2, formState: M2 } = w2, S2 = l(null), P2 = l(null), R2 = l(null), D2 = K(async (e2) => {
|
|
703
705
|
let t2;
|
|
704
706
|
try {
|
|
705
707
|
if (t2 = await Promise.resolve(p2?.(e2)) ?? true, true !== t2) return;
|
|
706
|
-
await Promise.resolve(c2?.(e2, e2 ===
|
|
708
|
+
await Promise.resolve(c2?.(e2, e2 === b2, e2 === x2)), d2?.(e2);
|
|
707
709
|
} catch (e3) {
|
|
708
710
|
}
|
|
709
|
-
}, [c2, d2, p2,
|
|
711
|
+
}, [c2, d2, p2, b2, x2]), E2 = K((e2, t2) => {
|
|
710
712
|
setTimeout(() => {
|
|
711
713
|
D2(x2);
|
|
712
714
|
}, 180);
|
|
713
715
|
}, [D2]), T2 = K(() => {
|
|
714
|
-
c2?.(
|
|
715
|
-
}, [c2,
|
|
716
|
-
const
|
|
717
|
-
|
|
716
|
+
c2?.(b2, true, false), s2?.(), d2?.(null);
|
|
717
|
+
}, [c2, b2, s2, d2]), O2 = M2 && (Object.keys(M2.errors).length > 0 || M2.disabled || M2.isSubmitted), N2 = K((t2, o3) => {
|
|
718
|
+
const r3 = t2 === b2, n3 = { className: o3 ? "defaultOption" : "action", type: o3 ? "submit" : "button", style: { minWidth: "75px" }, onClick: () => {
|
|
719
|
+
r3 ? T2() : o3 || D2(t2);
|
|
718
720
|
} };
|
|
719
|
-
if (u2) return u2(t2,
|
|
720
|
-
const i3 = { className: o3 ? "defaultOption" : "action", variant: o3 ? "contained" : "outlined", size: "small", disabled: !
|
|
721
|
-
if (o3 ||
|
|
721
|
+
if (u2) return u2(t2, n3, o3);
|
|
722
|
+
const i3 = { className: o3 ? "defaultOption" : "action", variant: o3 ? "contained" : "outlined", size: "small", disabled: !r3 && O2, color: "primary", ...n3 };
|
|
723
|
+
if (o3 || r3) {
|
|
722
724
|
const e2 = o3 ? S2 : P2;
|
|
723
725
|
i3.touchRippleRef = e2, i3.onPointerDown = (t3) => {
|
|
724
726
|
e2.current?.start(t3, { center: false }), t3.stopPropagation(), t3.preventDefault();
|
|
725
727
|
};
|
|
726
728
|
}
|
|
727
|
-
return e(
|
|
728
|
-
}, [m2, x2,
|
|
729
|
+
return e($, { ...i3, children: e("div", { style: { paddingTop: "3px" }, children: t2 }) }, `action:${t2}`);
|
|
730
|
+
}, [m2, x2, b2, u2, M2]), B2 = a(() => {
|
|
729
731
|
const e2 = [];
|
|
730
732
|
for (let t2 = 0; t2 < m2.length; t2++) {
|
|
731
|
-
const o3 = m2[t2],
|
|
732
|
-
e2.push(N2(o3,
|
|
733
|
+
const o3 = m2[t2], r3 = x2 ? o3 === x2 : 0 === t2;
|
|
734
|
+
e2.push(N2(o3, r3));
|
|
733
735
|
}
|
|
734
736
|
return e2;
|
|
735
737
|
}, [m2, x2, M2]);
|
|
736
|
-
return e(
|
|
738
|
+
return e(Wt, { onCancel: T2, initialPosition: { y: "touch" === pe ? "15" : "35" }, onDone: d2, autoFocusSel: h2, isModal: true, ref: r2, ...y2, children: e(me, { ...w2, children: t("form", { ref: R2, onSubmit: C2(E2), children: [e(z, { dividers: true, onKeyDown: (e2) => {
|
|
737
739
|
if (e2.isDefaultPrevented()) return;
|
|
738
740
|
e2.stopPropagation();
|
|
739
741
|
let t2 = null, o3 = null;
|
|
740
|
-
const
|
|
741
|
-
if (
|
|
742
|
+
const r3 = e2.which === q.Escape && b2;
|
|
743
|
+
if (r3) t2 = b2, o3 = P2;
|
|
742
744
|
else {
|
|
743
|
-
if (
|
|
745
|
+
if (O2) return;
|
|
744
746
|
e2.which === q.Enter && (t2 = x2 ?? m2[0], o3 = S2);
|
|
745
747
|
}
|
|
746
748
|
t2 && (o3.current?.start(e2, { center: false }), setTimeout(() => {
|
|
747
|
-
o3.current?.stop(e2),
|
|
749
|
+
o3.current?.stop(e2), r3 && D2(t2);
|
|
748
750
|
}, 180));
|
|
749
|
-
}, children: t(v, { sx: { display: "flex", flexDirection: "column", whiteSpace: "pre-wrap", rowGap: (e2) => e2.spacing(i2 ||
|
|
750
|
-
})),
|
|
751
|
+
}, children: t(v, { sx: { display: "flex", flexDirection: "column", whiteSpace: "pre-wrap", rowGap: (e2) => e2.spacing(i2 || n2 ? 1.5 : 0) }, children: [t(v, { sx: { display: "flex", flexDirection: "column" }, children: [i2, e(k, { children: n2 })] }), g2] }) }), e(I, { sx: { paddingTop: (e2) => e2.spacing(1), paddingBottom: (e2) => e2.spacing(1), paddingLeft: (e2) => e2.spacing(1), paddingRight: (e2) => e2.spacing(1), backgroundColor: (e2) => f(e2.palette.action.hover, 0.03) }, children: B2 })] }) }) });
|
|
752
|
+
})), qt = Object.freeze(Object.defineProperty({ __proto__: null, OptionsDialog: Vt, default: Vt }, Symbol.toStringTag, { value: "Module" })), _t = r.lazy(() => Promise.resolve().then(() => qt)), jt = (e2) => {
|
|
751
753
|
const { showModal: t2 } = le();
|
|
752
|
-
return (o2) => new Promise((
|
|
753
|
-
const
|
|
754
|
-
o2?.onOption?.(e3, e3 === o2.cancelOption, e3 === o2.defaultOption),
|
|
754
|
+
return (o2) => new Promise((r2) => {
|
|
755
|
+
const n2 = t2(_t, { ...e2, ...o2, onOption(e3) {
|
|
756
|
+
o2?.onOption?.(e3, e3 === o2.cancelOption, e3 === o2.defaultOption), r2(e3);
|
|
755
757
|
}, onDone: () => {
|
|
756
|
-
o2?.onDone?.(),
|
|
758
|
+
o2?.onDone?.(), n2.hide();
|
|
757
759
|
} });
|
|
758
760
|
});
|
|
759
|
-
},
|
|
761
|
+
}, Ut = r.lazy(() => import("./OcHIGuYIqbrgUydD.mjs")), Qt = (e2) => {
|
|
760
762
|
const { showModal: t2 } = le();
|
|
761
763
|
return (o2) => {
|
|
762
|
-
const { defaultOption:
|
|
764
|
+
const { defaultOption: r2 = o2.options?.[0], cancelOption: n2 = "Cancel", ...i2 } = o2;
|
|
763
765
|
return new Promise((o3) => {
|
|
764
|
-
const a2 = t2(
|
|
765
|
-
i2?.onOption?.(e3, e3 ===
|
|
766
|
+
const a2 = t2(Ut, { ...e2, defaultOption: r2, cancelOption: n2, onOption(e3) {
|
|
767
|
+
i2?.onOption?.(e3, e3 === n2, e3 === r2), o3({ input: "", option: e3 });
|
|
766
768
|
}, onInputOption(e3, t3) {
|
|
767
769
|
i2?.onInputOption?.(e3, t3), o3({ input: e3, option: t3 });
|
|
768
770
|
}, onDone: () => {
|
|
@@ -770,55 +772,55 @@ const Lt = { x: 0, y: 0 }, Ft = r(i((t2, o2) => {
|
|
|
770
772
|
} });
|
|
771
773
|
});
|
|
772
774
|
};
|
|
773
|
-
},
|
|
774
|
-
const { command:
|
|
775
|
-
return Q(
|
|
776
|
-
})),
|
|
777
|
-
const { command:
|
|
775
|
+
}, Gt = n(i((t2, o2) => {
|
|
776
|
+
const { command: r2, disabled: n2 = false, shortcut: i2, children: a2, ...l2 } = t2;
|
|
777
|
+
return Q(r2), e(wt, { ref: o2, label: void 0 !== n2 ? r2?.label() : "", shortcut: void 0 !== i2 ? i2 : Array.isArray(r2?.shortcut()) ? r2?.shortcut()[0] : r2?.shortcut(), description: r2?.description(), disabled: n2, chips: r2?.tags(), componentDisabled: r2?.disabled(), ...l2, children: e("div", { style: { display: "flex", flex: "1 1 0%" }, children: a2 }) });
|
|
778
|
+
})), Xt = e(W, {}), Yt = n(i((t2, o2) => {
|
|
779
|
+
const { command: r2, commandHook: n2, scope: i2, context: s2, icon: c2, label: d2, disabled: u2 = false, variant: m2 = G.Toolbar, shortcut: h2, commandState: f2, tooltipProps: x2, ...b2 } = t2, g2 = l(null), y2 = l(false), v2 = a(() => {
|
|
778
780
|
const e2 = { onExecute(e3, t3) {
|
|
779
|
-
|
|
781
|
+
n2?.onExecute?.(e3, t3), y2.current || (g2.current?.start({ center: false }), setTimeout(() => g2.current?.stop({}), 180)), y2.current = false;
|
|
780
782
|
}, onError(e3, t3, o3) {
|
|
781
|
-
|
|
783
|
+
n2?.onError(e3, t3, o3);
|
|
782
784
|
} };
|
|
783
|
-
return
|
|
784
|
-
}, [
|
|
785
|
+
return n2?.beforeExecute && (e2.beforeExecute = n2.beforeExecute), e2;
|
|
786
|
+
}, [n2]), k2 = Q(r2, v2), w2 = p((e2) => {
|
|
785
787
|
0 === e2.button && e2.preventDefault();
|
|
786
788
|
}, []), C2 = p((e2) => {
|
|
787
|
-
0 === e2.button &&
|
|
788
|
-
}, [k2,
|
|
789
|
-
e2.keyCode !== q.Enter && e2.keyCode !== q.Space ||
|
|
790
|
-
}, [k2,
|
|
791
|
-
if (c2) return "function" == typeof c2 ? c2(
|
|
792
|
-
let t3 =
|
|
793
|
-
return t3 ? ("string" == typeof t3 && (t3 = e(W, { iconKey: t3 })), t3) : m2 === G.Toolbar ||
|
|
794
|
-
}, [k2, c2]), P2 = a(() => ({ tabIndex: 0, ref: o2, selected:
|
|
789
|
+
0 === e2.button && r2?.execute(f2, n2);
|
|
790
|
+
}, [k2, n2, f2]), M2 = p((e2) => {
|
|
791
|
+
e2.keyCode !== q.Enter && e2.keyCode !== q.Space || r2?.execute(f2, n2);
|
|
792
|
+
}, [k2, n2, f2]), S2 = a(() => {
|
|
793
|
+
if (c2) return "function" == typeof c2 ? c2(r2) : c2;
|
|
794
|
+
let t3 = r2?.icon(s2);
|
|
795
|
+
return t3 ? ("string" == typeof t3 && (t3 = e(W, { iconKey: t3 })), t3) : m2 === G.Toolbar || r2?.state() ? void 0 : Xt;
|
|
796
|
+
}, [k2, c2]), P2 = a(() => ({ tabIndex: 0, ref: o2, selected: r2?.state(), icon: m2 === G.Toolbar ? S2 : e(Bt, { selected: r2?.state() ?? false, children: S2 }), touchRippleRef: g2, disabled: u2 || !r2 || r2.disabled(), onMouseDown: w2, onMouseUp: C2, onKeyDown: M2 }), [k2, n2, u2, S2]);
|
|
795
797
|
let R2;
|
|
796
|
-
return R2 = m2 === G.Menuitem ? e(
|
|
798
|
+
return R2 = m2 === G.Menuitem ? e(Dt, { ...b2, chips: r2?.tags(), ...P2, children: d2 ?? r2?.label(i2, s2) }) : e(St, { ...b2, ...P2 }), d2 || r2?.label() ? ((r2.disabled() || u2) && (R2 = e("div", { children: R2 })), R2 = e(Gt, { command: r2, placement: m2 === G.Toolbar ? "bottom-start" : "right-start", shortcut: h2, ...x2, children: R2 }), R2) : R2;
|
|
797
799
|
}));
|
|
798
|
-
|
|
799
|
-
const
|
|
800
|
-
const { command:
|
|
800
|
+
Yt.displayName = "CommandButton";
|
|
801
|
+
const Jt = e(W, {}), Zt = n(i((o2, r2) => {
|
|
802
|
+
const { command: n2, scope: i2, icon: d2 = Jt, label: p2, variant: u2 = G.Toolbar, disabled: m2 = false, commandHook: h2, ...f2 } = o2, x2 = l(null), b2 = l(false), y2 = a(() => {
|
|
801
803
|
const e2 = { onExecute(e3, t2) {
|
|
802
|
-
h2?.onExecute?.(e3, t2),
|
|
804
|
+
h2?.onExecute?.(e3, t2), b2.current || (x2.current?.start({ center: false }), setTimeout(() => x2.current?.stop({}), 180)), b2.current = false;
|
|
803
805
|
}, onError(e3, t2, o3) {
|
|
804
806
|
h2?.onError(e3, t2, o3);
|
|
805
807
|
} };
|
|
806
808
|
return h2?.beforeExecute && (e2.beforeExecute = h2.beforeExecute), e2;
|
|
807
|
-
}, [h2]), v2 = Q(
|
|
809
|
+
}, [h2]), v2 = Q(n2, y2), k2 = () => n2?.state()?.toString() || "0", [w2, C2] = c(k2), M2 = K(() => {
|
|
808
810
|
const e2 = parseFloat(w2);
|
|
809
|
-
isNaN(e2) ? C2(k2()) : parseFloat(k2()) !== e2 &&
|
|
810
|
-
}, [k2,
|
|
811
|
+
isNaN(e2) ? C2(k2()) : parseFloat(k2()) !== e2 && n2.execute(e2, h2);
|
|
812
|
+
}, [k2, n2, w2, h2]);
|
|
811
813
|
s(() => {
|
|
812
814
|
C2(k2());
|
|
813
|
-
}, [
|
|
815
|
+
}, [n2?.state()]);
|
|
814
816
|
const S2 = a(() => {
|
|
815
|
-
let t2 = "function" == typeof d2 ? d2(
|
|
816
|
-
return t2 && (t2 =
|
|
817
|
-
}, [v2, d2,
|
|
817
|
+
let t2 = "function" == typeof d2 ? d2(n2) : d2;
|
|
818
|
+
return t2 && (t2 = n2?.icon()), "string" == typeof t2 && (t2 = e(W, { iconKey: t2 })), t2;
|
|
819
|
+
}, [v2, d2, n2?.icon]), P2 = a(() => void 0 === p2 ? n2?.label(i2) : "function" == typeof p2 ? p2() : p2, [v2]), R2 = a(() => e(g, { ...f2, sx: { paddingTop: "0px", paddingBottom: "0px" }, component: "div", disableRipple: true, onClick: (e2) => e2.stopPropagation(), onMouseDown: (e2) => {
|
|
818
820
|
0 === e2.button && e2.stopPropagation();
|
|
819
821
|
}, onMouseUp: (e2) => {
|
|
820
822
|
0 === e2.button && e2.stopPropagation();
|
|
821
|
-
}, children: e(N, { inputMode: "numeric", disabled: m2 || !
|
|
823
|
+
}, children: e(N, { inputMode: "numeric", disabled: m2 || !n2 || n2.disabled(), inputProps: { tabIndex: 0, name: `input-${n2.key()}`, autoComplete: "off", type: "number", maxLength: 4 }, sx: { paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (e2) => `${Math.round(e2.typography.fontSize)}px`, width: (e2) => "3.2em", input: { padding: "0 0", textAlign: "center", MozAppearance: "textfield" }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" }, minHeight: "24px" }, value: w2, onFocus: (e2) => {
|
|
822
824
|
e2.target?.select();
|
|
823
825
|
}, onKeyDown: (e2) => {
|
|
824
826
|
if (e2.which === q.Enter) k2() !== w2 && (e2.stopPropagation(), e2.preventDefault(), M2());
|
|
@@ -835,40 +837,40 @@ const Yt = e(W, {}), Jt = r(i((o2, n2) => {
|
|
|
835
837
|
}, onChange: (e2) => {
|
|
836
838
|
if (e2.target.value.length > 4) return e2.stopPropagation(), void e2.preventDefault();
|
|
837
839
|
C2(e2.target.value);
|
|
838
|
-
} }) }), [w2, m2,
|
|
840
|
+
} }) }), [w2, m2, n2]), D2 = { tabIndex: 0, ref: r2, icon: S2, touchRippleRef: x2, disabled: m2 || !n2 || n2.disabled(), onMouseDown: (e2) => {
|
|
839
841
|
0 === e2.button && e2.preventDefault();
|
|
840
842
|
}, onMouseUp: (e2) => {
|
|
841
|
-
0 !== e2.button || e2.isPropagationStopped() || e2.isDefaultPrevented() || e2.isDefaultPrevented() || (e2.preventDefault(),
|
|
843
|
+
0 !== e2.button || e2.isPropagationStopped() || e2.isDefaultPrevented() || e2.isDefaultPrevented() || (e2.preventDefault(), n2?.execute(!n2?.state?.(), y2));
|
|
842
844
|
}, onKeyDown: (e2) => {
|
|
843
|
-
e2.keyCode !== q.Enter && e2.keyCode !== q.Space ||
|
|
845
|
+
e2.keyCode !== q.Enter && e2.keyCode !== q.Space || n2?.execute(!n2?.state?.(), y2);
|
|
844
846
|
} };
|
|
845
847
|
let E2;
|
|
846
|
-
return E2 = u2 === G.Menuitem ? t(
|
|
847
|
-
})),
|
|
848
|
-
const { variant:
|
|
848
|
+
return E2 = u2 === G.Menuitem ? t(Dt, { ...f2, chips: n2?.tags(), ...D2, children: [P2, R2] }) : e(St, { ...f2, ...D2 }), n2?.label() ? ((n2.disabled() || m2) && (E2 = e("div", { children: E2 })), E2 = e(Gt, { command: n2, placement: u2 === G.Toolbar ? "bottom-start" : "right-start", children: E2 }), E2) : E2;
|
|
849
|
+
})), eo = n(i((t2, o2) => {
|
|
850
|
+
const { variant: r2 = G.Toolbar, quickCommand: n2, onQuickClick: i2, commands: s2, commandState: c2, commandHook: d2, disabled: p2, label: u2, icon: m2, createPopupPanel: h2, tooltip: f2, selected: x2, scope: b2, ...g2 } = t2, y2 = l(null), v2 = l(false), k2 = a(() => {
|
|
849
851
|
const e2 = { onExecute(e3, t3) {
|
|
850
852
|
d2?.onExecute?.(e3, t3), v2.current || (y2.current?.start({ center: false }), setTimeout(() => y2.current?.stop({}), 180)), v2.current = false;
|
|
851
853
|
}, onError(e3, t3, o3) {
|
|
852
854
|
d2?.onError(e3, t3, o3);
|
|
853
855
|
} };
|
|
854
856
|
return d2?.beforeExecute && (e2.beforeExecute = d2.beforeExecute), e2;
|
|
855
|
-
}, [d2]), w2 = X(s2, [
|
|
857
|
+
}, [d2]), w2 = X(s2, [n2], null, [n2]), C2 = w2[0], { label: M2, icon: S2 } = a(() => {
|
|
856
858
|
let t3 = null;
|
|
857
|
-
u2 && (t3 = "function" == typeof u2 ? u2(C2) : u2), t3 || (t3 = C2?.label?.(
|
|
859
|
+
u2 && (t3 = "function" == typeof u2 ? u2(C2) : u2), t3 || (t3 = C2?.label?.(b2));
|
|
858
860
|
let o3 = m2;
|
|
859
861
|
return o3 || (o3 = C2?.icon?.()), "string" == typeof o3 ? o3 = e(W, { iconKey: o3 }) : "function" == typeof o3 && (o3 = o3(C2)), { label: t3, icon: o3 };
|
|
860
|
-
}, [w2, u2, m2]), P2 = { disabled: p2, scope:
|
|
861
|
-
(M2 || f2) && (P2.createTooltip = ({ children: t3 }, o3) => e(
|
|
862
|
+
}, [w2, u2, m2]), P2 = { disabled: p2, scope: b2, touchRippleRef: y2, onQuickClick: i2, tooltip: f2, label: M2, icon: S2 };
|
|
863
|
+
(M2 || f2) && (P2.createTooltip = ({ children: t3 }, o3) => e(wt, { label: M2, description: f2, disabled: o3, children: t3 }));
|
|
862
864
|
const R2 = K((e2) => h2?.(e2, s2), [h2, w2]), D2 = K((e2) => C2?.execute(c2, k2), [C2]);
|
|
863
|
-
return C2 ? (P2.quickButtonProps = {}, P2.quickButtonProps.createTooltip = ({ children: t3, placement: o3 },
|
|
864
|
-
}), P2.selected = x2 ?? C2?.state(), P2.createPopupPanel = R2,
|
|
865
|
+
return C2 ? (P2.quickButtonProps = {}, P2.quickButtonProps.createTooltip = ({ children: t3, placement: o3 }, n3) => e(Gt, { command: C2, placement: o3 ?? r2 === G.Toolbar ? "bottom-start" : "right-start", disabled: n3, children: t3 }), P2.disabled = P2.disabled ?? C2?.disabled(), i2 || (P2.onQuickClick = D2)) : n2 && (P2.onQuickClick = () => {
|
|
866
|
+
}), P2.selected = x2 ?? C2?.state(), P2.createPopupPanel = R2, r2 === G.Toolbar ? e(Tt, { ...g2, ...P2, ref: o2 }) : e($t, { ...g2, ...P2, ref: o2 });
|
|
865
867
|
}));
|
|
866
|
-
|
|
867
|
-
const
|
|
868
|
-
const { command:
|
|
869
|
-
return t(v, { sx: { display: "flex", flexDirection: "row", textTransform: "none", alignItems: "center", fontSize: (e2) => e2.typography.subtitle2.fontSize, ...l2 }, ...s2, children: [a2, e(k, { component: "div", sx: { whiteSpace: "nowrap", lineHeight: "1", paddingLeft: (e2) => e2.spacing(0.25), paddingRight: (e2) => e2.spacing(0.25), fontSize: "inherit" }, children:
|
|
870
|
-
},
|
|
871
|
-
const { sx:
|
|
868
|
+
eo.displayName = "CommandPopupButton";
|
|
869
|
+
const to = e(W, { iconKey: "Check" }), oo = (o2) => {
|
|
870
|
+
const { command: r2, label: n2, scope: i2, icon: a2 = to, sx: l2, ...s2 } = o2;
|
|
871
|
+
return t(v, { sx: { display: "flex", flexDirection: "row", textTransform: "none", alignItems: "center", fontSize: (e2) => e2.typography.subtitle2.fontSize, ...l2 }, ...s2, children: [a2, e(k, { component: "div", sx: { whiteSpace: "nowrap", lineHeight: "1", paddingLeft: (e2) => e2.spacing(0.25), paddingRight: (e2) => e2.spacing(0.25), fontSize: "inherit" }, children: r2?.label(i2) || n2 })] });
|
|
872
|
+
}, ro = n(i((t2, o2) => {
|
|
873
|
+
const { sx: r2, commands: n2, commandButtonProps: i2, parentFloat: l2, createToolbarPalette: s2, children: d2, ...u2 } = t2, h2 = U(o2, () => ({}), []), [f2, x2] = c(null), { reference: b2 } = ht({ label: "toolbar", anchor: h2.current, parentFloat: l2, createPopupPanel: null }), g2 = p(() => {
|
|
872
874
|
const e2 = f2;
|
|
873
875
|
e2 && requestAnimationFrame(() => {
|
|
874
876
|
h2.current?.contains(document.activeElement) && e2.focus();
|
|
@@ -876,24 +878,24 @@ const eo = e(W, { iconKey: "Check" }), to = (o2) => {
|
|
|
876
878
|
}, []), y2 = a(() => ({ dense: true, outlined: false }), []), v2 = a(() => {
|
|
877
879
|
const { commandHook: e2, ...t3 } = i2 || {};
|
|
878
880
|
return { commandHook: { beforeExecute: (t4, o3) => {
|
|
879
|
-
const
|
|
880
|
-
return false !==
|
|
881
|
+
const r3 = e2?.beforeExecute?.(t4, o3);
|
|
882
|
+
return false !== r3 && b2.closeAll();
|
|
881
883
|
}, onExecute(t4, o3) {
|
|
882
|
-
e2?.onExecute?.(t4, o3),
|
|
883
|
-
}, onError(t4, o3,
|
|
884
|
-
e2?.onError?.(t4, o3,
|
|
884
|
+
e2?.onExecute?.(t4, o3), g2();
|
|
885
|
+
}, onError(t4, o3, r3) {
|
|
886
|
+
e2?.onError?.(t4, o3, r3);
|
|
885
887
|
} }, ...t3 };
|
|
886
|
-
}, [
|
|
887
|
-
X(
|
|
888
|
+
}, [b2, i2]), k2 = a(() => ({ ...y2, ...v2 }), [y2, v2]), [w2, C2] = m((e2) => e2 + 1, 0);
|
|
889
|
+
X(n2, [], { onChange: () => {
|
|
888
890
|
C2();
|
|
889
891
|
} });
|
|
890
|
-
const M2 = a(() => ({ commands:
|
|
892
|
+
const M2 = a(() => ({ commands: n2, parentFloat: b2, ...v2 }), [w2, k2, b2, i2]);
|
|
891
893
|
let S2 = 0;
|
|
892
894
|
y2.dense || (S2 += 2), y2.outlined && S2++;
|
|
893
895
|
let P2 = 2;
|
|
894
896
|
y2.dense || (P2 = 4);
|
|
895
|
-
const R2 = a(() => s2({ commands:
|
|
896
|
-
return e(B, { variant: "dense", sx: { minHeight: "unset", height: "unset", paddingTop: `${P2}px`, paddingBottom: `${P2}px`, paddingLeft: "6px !important", paddingRight: "6px !important", flex: "1 1 0%", alignItems: "center", userSelect: "none", flexGrow: 1, display: "flex", overflow: "hidden", ...
|
|
897
|
+
const R2 = a(() => s2({ commands: n2, commandButtonProps: k2, commandPopupProps: { commands: n2, ...M2, ...i2 } }), [w2, k2, M2, s2]);
|
|
898
|
+
return e(B, { variant: "dense", sx: { minHeight: "unset", height: "unset", paddingTop: `${P2}px`, paddingBottom: `${P2}px`, paddingLeft: "6px !important", paddingRight: "6px !important", flex: "1 1 0%", alignItems: "center", userSelect: "none", flexGrow: 1, display: "flex", overflow: "hidden", ...r2 }, ref: h2, onFocus: (e2) => {
|
|
897
899
|
e2.relatedTarget && !f2 && x2(e2.relatedTarget);
|
|
898
900
|
}, onBlur: (e2) => {
|
|
899
901
|
f2 && !h2?.current?.contains(e2.relatedTarget) && x2(null);
|
|
@@ -901,25 +903,25 @@ const eo = e(W, { iconKey: "Check" }), to = (o2) => {
|
|
|
901
903
|
f2 && e2.which === q.Escape && f2.focus();
|
|
902
904
|
}, ...u2, children: e("div", { ref: h2, style: { flex: "1 1 100%", display: "flex", flexWrap: "wrap", rowGap: `${P2}px`, columnGap: `${S2}px`, alignItems: "center", maxWidth: "100%" }, children: R2 }) });
|
|
903
905
|
}));
|
|
904
|
-
|
|
906
|
+
ro.displayName = "CommandToolbar";
|
|
905
907
|
const no = (t2) => {
|
|
906
|
-
const { key: o2, ...
|
|
907
|
-
return e(
|
|
908
|
-
},
|
|
909
|
-
const { popupCommandKeys:
|
|
908
|
+
const { key: o2, ...r2 } = t2;
|
|
909
|
+
return e(Yt, { ...r2 }, o2);
|
|
910
|
+
}, io = n(i((t2, o2) => {
|
|
911
|
+
const { popupCommandKeys: r2, renderCommandButton: n2 = no, scope: i2, commands: a2, quickCommand: l2, popupScope: s2 = l2, commandState: c2, commandHook: d2, disabled: u2 = false, ...m2 } = t2, h2 = X(a2, r2 ? [l2, ...r2] : [l2]), f2 = p((t3, o3) => {
|
|
910
912
|
const i3 = { variant: G.Menuitem, commandHook: d2, commandState: c2, scope: s2, disabled: u2 }, a3 = [];
|
|
911
|
-
for (let t4 = 0; t4 <
|
|
912
|
-
const l3 =
|
|
913
|
+
for (let t4 = 0; t4 < r2?.length; t4++) {
|
|
914
|
+
const l3 = r2[t4];
|
|
913
915
|
if (null === l3 || "-" === l3) {
|
|
914
|
-
a3.push(e(
|
|
916
|
+
a3.push(e(ge, { orientation: "horizontal" }, `element-${a3.length}`));
|
|
915
917
|
continue;
|
|
916
918
|
}
|
|
917
|
-
const s3 = o3.getCommand(l3), c3 = { key: `${l3}-${a3.length}`, command: s3, ...i3 }, d3 =
|
|
919
|
+
const s3 = o3.getCommand(l3), c3 = { key: `${l3}-${a3.length}`, command: s3, ...i3 }, d3 = n2(c3);
|
|
918
920
|
d3 && a3.push(d3);
|
|
919
921
|
}
|
|
920
922
|
return nt({ ...t3, children: a3 });
|
|
921
|
-
}, [u2, d2, c2, s2,
|
|
922
|
-
return
|
|
923
|
+
}, [u2, d2, c2, s2, r2, n2]);
|
|
924
|
+
return r2 ? e(eo, { ref: o2, commands: a2, disabled: u2, commandHook: d2, commandState: c2, scope: i2, quickCommand: l2, createPopupPanel: f2, ...m2 }) : n2({ ref: o2, disabled: u2, commandHook: d2, commandState: c2, scope: i2, command: h2[0], ...m2 });
|
|
923
925
|
}));
|
|
924
926
|
export {
|
|
925
927
|
Ce as AnimatedBouncingEllipsisIcon,
|
|
@@ -931,56 +933,57 @@ export {
|
|
|
931
933
|
He as ArrowDownIcon,
|
|
932
934
|
We as ArrowRightIcon,
|
|
933
935
|
Ie as ChipStrip,
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
936
|
+
ot as ClosingReason,
|
|
937
|
+
Yt as CommandButton,
|
|
938
|
+
eo as CommandPopupButton,
|
|
939
|
+
ro as CommandToolbar,
|
|
940
|
+
Gt as CommandTooltip,
|
|
941
|
+
bt as ContextMenu,
|
|
940
942
|
ze as ErrorPanel,
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
943
|
+
ge as ExhibitDivider,
|
|
944
|
+
at as ExhibitFloatPanel,
|
|
945
|
+
St as ExhibitIconButton,
|
|
946
|
+
Et as ExhibitMenuHeader,
|
|
947
|
+
Dt as ExhibitMenuItem,
|
|
948
|
+
zt as ExhibitOptionButton,
|
|
947
949
|
Le as ExhibitPopper,
|
|
948
|
-
|
|
950
|
+
Tt as ExhibitPopupIconButton,
|
|
949
951
|
$t as ExhibitPopupMenuItem,
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
952
|
+
wt as ExhibitTooltip,
|
|
953
|
+
Zt as InputCommandButton,
|
|
954
|
+
Wt as InternalWindow,
|
|
955
|
+
oo as LabelIcon,
|
|
954
956
|
Re as LoadingPanel,
|
|
955
957
|
default2 as ModalProvider,
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
958
|
+
ft as NestingPopupButton,
|
|
959
|
+
Vt as OptionsDialog,
|
|
960
|
+
tt as PopupAutoFocus,
|
|
961
|
+
rt as PopupButtonType,
|
|
962
|
+
Bt as SelectedIcon,
|
|
963
|
+
io as SimpleCommandPopupButton,
|
|
962
964
|
gt as SimpleTooltip,
|
|
963
|
-
|
|
964
|
-
|
|
965
|
+
Oe as StackTrace,
|
|
966
|
+
Ye as ThemeMode,
|
|
965
967
|
Ke as ThemedIcon,
|
|
966
|
-
|
|
968
|
+
it as createDownArrow,
|
|
967
969
|
Qe as createExhibitTheme,
|
|
968
970
|
fe as createScrollButton,
|
|
969
971
|
he as createScrollEdgeButton,
|
|
970
|
-
|
|
972
|
+
be as createScrollEndButton,
|
|
971
973
|
xe as createScrollStartButton,
|
|
972
974
|
Ae as createStrokeShadowFilter,
|
|
973
975
|
nt as defaultCreatePopupPanel,
|
|
974
976
|
je as elevateColor,
|
|
977
|
+
Ge as getScrollbarCssVariables,
|
|
975
978
|
_e as hexToRGB,
|
|
976
979
|
Ue as overlayAlpha,
|
|
977
|
-
|
|
980
|
+
Xe as scrollbarTheming,
|
|
978
981
|
Fe as strokeShadowFilter,
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
982
|
+
kt as toShortcutElements,
|
|
983
|
+
ht as useFloatStack,
|
|
984
|
+
Qt as useInputDialog,
|
|
985
|
+
Lt as useLazyWindow,
|
|
986
|
+
jt as useOptionsDialog,
|
|
987
|
+
Je as useResolvedThemeMode,
|
|
988
|
+
$e as wrapErrorAsComponent
|
|
986
989
|
};
|