@sheetxl/utils-mui 0.7.21 → 0.7.23-beta.2
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/CMDyOaq_TZmhbR3R.cjs +1 -0
- package/browser/cjs/GeHQP4M_1ydWv9v4.cjs +3 -0
- package/browser/cjs/index.cjs +4 -7
- package/browser/esm/CNIMtMKGuDo4psnZ.mjs +96 -0
- package/browser/esm/D0mXROj4on9piZY1.mjs +2544 -0
- package/browser/esm/index.mjs +2688 -72
- package/licenses/dependencies.txt +60 -198
- package/node/esm/C2bOUbQGN6BujoBn.mjs +97 -0
- package/node/esm/index.mjs +3354 -981
- package/package.json +12 -14
- package/resources/contents.json +18 -0
- package/resources/locales/contents.json +16 -0
- package/resources/locales/de/ui.msg.json +22 -0
- package/resources/locales/en/ui.msg.json +22 -0
- package/types/index.d.ts +2 -1069
- package/types/src/button/ButtonContent.d.ts +17 -0
- package/types/src/button/ButtonContent.d.ts.map +1 -0
- package/types/src/button/ExhibitIconButton.d.ts +31 -0
- package/types/src/button/ExhibitIconButton.d.ts.map +1 -0
- package/types/src/button/ExhibitMenuHeader.d.ts +15 -0
- package/types/src/button/ExhibitMenuHeader.d.ts.map +1 -0
- package/types/src/button/ExhibitMenuItem.d.ts +24 -0
- package/types/src/button/ExhibitMenuItem.d.ts.map +1 -0
- package/types/src/button/ExhibitOptionButton.d.ts +16 -0
- package/types/src/button/ExhibitOptionButton.d.ts.map +1 -0
- package/types/src/button/ExhibitPopupIconButton.d.ts +18 -0
- package/types/src/button/ExhibitPopupIconButton.d.ts.map +1 -0
- package/types/src/button/ExhibitPopupMenuItem.d.ts +8 -0
- package/types/src/button/ExhibitPopupMenuItem.d.ts.map +1 -0
- package/types/src/button/ExhibitTooltip.d.ts +26 -0
- package/types/src/button/ExhibitTooltip.d.ts.map +1 -0
- package/types/src/button/OverflowPalette.d.ts +29 -0
- package/types/src/button/OverflowPalette.d.ts.map +1 -0
- package/types/src/button/SelectedIcon.d.ts +18 -0
- package/types/src/button/SelectedIcon.d.ts.map +1 -0
- package/types/src/button/index.d.ts +11 -0
- package/types/src/button/index.d.ts.map +1 -0
- package/types/src/command/CommandButton.d.ts +4 -0
- package/types/src/command/CommandButton.d.ts.map +1 -0
- package/types/src/command/CommandGroup.d.ts +71 -0
- package/types/src/command/CommandGroup.d.ts.map +1 -0
- package/types/src/command/CommandPopupButton.d.ts +34 -0
- package/types/src/command/CommandPopupButton.d.ts.map +1 -0
- package/types/src/command/CommandToolbar.d.ts +51 -0
- package/types/src/command/CommandToolbar.d.ts.map +1 -0
- package/types/src/command/CommandTooltip.d.ts +22 -0
- package/types/src/command/CommandTooltip.d.ts.map +1 -0
- package/types/src/command/InputCommandButton.d.ts +20 -0
- package/types/src/command/InputCommandButton.d.ts.map +1 -0
- package/types/src/command/ToggleGroupButton.d.ts +33 -0
- package/types/src/command/ToggleGroupButton.d.ts.map +1 -0
- package/types/src/command/index.d.ts +8 -0
- package/types/src/command/index.d.ts.map +1 -0
- package/types/src/command/useManagedRipple.d.ts +23 -0
- package/types/src/command/useManagedRipple.d.ts.map +1 -0
- package/types/src/components/AnimatedLoadingPanel.d.ts +45 -0
- package/types/src/components/AnimatedLoadingPanel.d.ts.map +1 -0
- package/types/src/components/ChipStrip.d.ts +9 -0
- package/types/src/components/ChipStrip.d.ts.map +1 -0
- package/types/src/components/ContextMenu.d.ts +32 -0
- package/types/src/components/ContextMenu.d.ts.map +1 -0
- package/types/src/components/ExhibitDivider.d.ts +6 -0
- package/types/src/components/ExhibitDivider.d.ts.map +1 -0
- package/types/src/components/NestingPopupButton.d.ts +11 -0
- package/types/src/components/NestingPopupButton.d.ts.map +1 -0
- package/types/src/components/ScrollButtons.d.ts +7 -0
- package/types/src/components/ScrollButtons.d.ts.map +1 -0
- package/types/src/components/SimpleTooltip.d.ts +15 -0
- package/types/src/components/SimpleTooltip.d.ts.map +1 -0
- package/types/src/components/StackTrace.d.ts +20 -0
- package/types/src/components/StackTrace.d.ts.map +1 -0
- package/types/src/components/StackTraceErrorPanel.d.ts +28 -0
- package/types/src/components/StackTraceErrorPanel.d.ts.map +1 -0
- package/types/src/components/index.d.ts +10 -0
- package/types/src/components/index.d.ts.map +1 -0
- package/types/src/dialog/InputDialog.d.ts +8 -0
- package/types/src/dialog/InputDialog.d.ts.map +1 -0
- package/types/src/dialog/InternalWindow.d.ts +142 -0
- package/types/src/dialog/InternalWindow.d.ts.map +1 -0
- package/types/src/dialog/OptionsDialog.d.ts +19 -0
- package/types/src/dialog/OptionsDialog.d.ts.map +1 -0
- package/types/src/dialog/index.d.ts +10 -0
- package/types/src/dialog/index.d.ts.map +1 -0
- package/types/src/dialog/useInputDialog.d.ts +6 -0
- package/types/src/dialog/useInputDialog.d.ts.map +1 -0
- package/types/src/dialog/useLazyWindow.d.ts +14 -0
- package/types/src/dialog/useLazyWindow.d.ts.map +1 -0
- package/types/src/dialog/useOptionsDialog.d.ts +8 -0
- package/types/src/dialog/useOptionsDialog.d.ts.map +1 -0
- package/types/src/float/ExhibitFloatPanel.d.ts +22 -0
- package/types/src/float/ExhibitFloatPanel.d.ts.map +1 -0
- package/types/src/float/ExhibitFloatProvider.d.ts +17 -0
- package/types/src/float/ExhibitFloatProvider.d.ts.map +1 -0
- package/types/src/float/ExhibitPopup.d.ts +97 -0
- package/types/src/float/ExhibitPopup.d.ts.map +1 -0
- package/types/src/float/index.d.ts +4 -0
- package/types/src/float/index.d.ts.map +1 -0
- package/types/src/index.d.ts +8 -0
- package/types/src/index.d.ts.map +1 -0
- package/types/src/locales/index.d.ts +3 -0
- package/types/src/locales/index.d.ts.map +1 -0
- package/types/src/theme/ExhibitTheme.d.ts +71 -0
- package/types/src/theme/ExhibitTheme.d.ts.map +1 -0
- package/types/src/theme/IconSupport.d.ts +11 -0
- package/types/src/theme/IconSupport.d.ts.map +1 -0
- package/types/src/theme/ScrollbarTheming.d.ts +12 -0
- package/types/src/theme/ScrollbarTheming.d.ts.map +1 -0
- package/types/src/theme/index.d.ts +4 -0
- package/types/src/theme/index.d.ts.map +1 -0
- package/browser/cjs/Ai0ovAjYzGfMAB7q.cjs +0 -6
- package/browser/cjs/L-4HMtCOn7QHkDi2.cjs +0 -11
- package/browser/esm/BqMhjTIvQt09x92t.mjs +0 -2891
- package/browser/esm/CMpdAXnJ5EbLrOu2.mjs +0 -44
- package/node/assets/style.css +0 -1
- package/node/esm/ojE1YgJ2zWQ8Q_AP.mjs +0 -45
package/node/esm/index.mjs
CHANGED
|
@@ -1,998 +1,3371 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import
|
|
2
|
+
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.7.23-beta.2
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { Backdrop as e, Box as t, Button as r, Chip as o, CircularProgress as n, DialogActions as i, DialogContent as a, DialogTitle as l, Divider as s, Fade as c, IconButton as d, Input as p, LinearProgress as u, ListItemButton as m, ListItemIcon as h, Paper as f, Toolbar as g, Tooltip as x, Typography as b, Unstable_TrapFocus as y, createTheme as v, useTheme as k, useThemeProps as w } from "@mui/material";
|
|
8
|
+
import { Fragment as C, jsx as M, jsxs as S } from "react/jsx-runtime";
|
|
9
|
+
import { Children as T, Fragment as P, cloneElement as R, forwardRef as D, isValidElement as $, lazy as I, memo as B, useCallback as z, useEffect as N, useId as L, useLayoutEffect as O, useMemo as E, useReducer as F, useRef as K, useState as A } from "react";
|
|
10
|
+
import W from "clsx";
|
|
11
|
+
import { alpha as H, darken as V, lighten as q } from "@mui/system";
|
|
12
|
+
import { CommonUtils as j, ErrorUtils as Q } from "@sheetxl/utils";
|
|
13
|
+
import { Command as U, CommandButtonType as G, CommandFocusProvider as X, DynamicIcon as Y, FloatPopper as _, FloatProvider as J, FloatStackProvider as Z, KeyCodes as ee, KeyModifiers as te, ReactUtils as re, ScrollbarOrientation as oe, defaultCreateScrollEdgeButton as ne, floatThemeScopeProps as ie, getScrollbarCssVariables as ae, useCallbackRef as le, useCommandButtonRegistry as se, useCommands as ce, useFloat as de, useFloatStack as pe, useFloatSurface as ue, useFullscreenPortal as me, useImperativeElement as he, useTranslator as fe } from "@sheetxl/utils-react";
|
|
14
|
+
import { mergeRefs as ge } from "react-merge-refs";
|
|
15
|
+
import { useIsomorphicLayoutEffect as xe, useMeasure as be } from "react-use";
|
|
16
|
+
import { deepmerge as ye } from "@mui/utils";
|
|
17
|
+
import ve from "tiny-invariant";
|
|
18
|
+
import ke, { useModal as we } from "mui-modal-provider";
|
|
19
|
+
import { createPortal as Ce } from "react-dom";
|
|
20
|
+
import Me from "react-draggable";
|
|
21
|
+
import { primaryInput as Se } from "detect-it";
|
|
22
|
+
import { FormProvider as Te, useForm as Pe } from "react-hook-form";
|
|
23
|
+
import Re from "@mui/material/ButtonBase/TouchRipple";
|
|
21
24
|
export * from "mui-modal-provider";
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
25
|
+
var De = {
|
|
26
|
+
whiteSpace: "nowrap",
|
|
27
|
+
textTransform: "none",
|
|
28
|
+
lineHeight: 1,
|
|
29
|
+
fontSize: (e) => e.typography.subtitle2.fontSize,
|
|
30
|
+
paddingLeft: (e) => e.spacing(.25),
|
|
31
|
+
paddingRight: (e) => e.spacing(.25)
|
|
32
|
+
};
|
|
33
|
+
function $e(e, r) {
|
|
34
|
+
const o = null != r && !1 !== r && "" !== r ? M(b, {
|
|
35
|
+
component: "div",
|
|
36
|
+
sx: De,
|
|
37
|
+
children: r
|
|
38
|
+
}) : null;
|
|
39
|
+
return e && o ? S(t, {
|
|
40
|
+
sx: {
|
|
41
|
+
display: "flex",
|
|
42
|
+
alignItems: "center"
|
|
43
|
+
},
|
|
44
|
+
children: [e, o]
|
|
45
|
+
}) : e ?? o ?? void 0;
|
|
46
|
+
}
|
|
47
|
+
var Ie = ({ isHorizontal: e, isBefore: t }) => {
|
|
48
|
+
const r = fe();
|
|
49
|
+
return M(C, t ? { children: r(e ? "scroll.edgeLeft" : "scroll.edgeTop") } : { children: r(e ? "scroll.edgeRight" : "scroll.edgeBottom") });
|
|
50
|
+
}, Be = (e) => {
|
|
51
|
+
let t = ne({
|
|
52
|
+
style: { cursor: "pointer" },
|
|
53
|
+
...e
|
|
54
|
+
});
|
|
55
|
+
if (void 0 !== e.isBefore && !e.disabled) t = M(St, {
|
|
56
|
+
title: M(Ie, {
|
|
57
|
+
isHorizontal: e.orientation === oe.Horizontal,
|
|
58
|
+
isBefore: e.isBefore
|
|
59
|
+
}),
|
|
60
|
+
enterDelay: 800,
|
|
61
|
+
enterNextDelay: 1600,
|
|
62
|
+
children: e.disabled ? M("div", {
|
|
63
|
+
style: { display: "flex" },
|
|
64
|
+
children: t
|
|
65
|
+
}) : t
|
|
66
|
+
});
|
|
67
|
+
return t;
|
|
68
|
+
}, ze = (e, t, r, o) => {
|
|
69
|
+
const { style: n, ...i } = e, a = M(d, {
|
|
70
|
+
component: "div",
|
|
71
|
+
...i,
|
|
72
|
+
style: {
|
|
73
|
+
...n,
|
|
74
|
+
padding: "0px"
|
|
75
|
+
},
|
|
76
|
+
sx: { padding: "0" },
|
|
77
|
+
color: e.disabled ? void 0 : "primary",
|
|
78
|
+
"aria-label": r,
|
|
79
|
+
size: "small",
|
|
80
|
+
children: t
|
|
81
|
+
});
|
|
82
|
+
return M(St, {
|
|
83
|
+
title: e.disabled ? r : o,
|
|
84
|
+
enterDelay: 800,
|
|
85
|
+
enterNextDelay: 1600,
|
|
86
|
+
children: e.disabled ? M("div", {
|
|
87
|
+
style: { display: "flex" },
|
|
88
|
+
children: a
|
|
89
|
+
}) : a
|
|
90
|
+
});
|
|
91
|
+
}, Ne = (e) => ze(e, oe.Horizontal ? M(Y, {
|
|
92
|
+
iconKey: "ArrowLeft",
|
|
93
|
+
size: "small"
|
|
94
|
+
}) : M(Y, {
|
|
95
|
+
iconKey: "ArrowUpward",
|
|
96
|
+
size: "small"
|
|
97
|
+
}), "Scroll " + (e.orientation === oe.Horizontal ? "Left" : "Up"), `Scroll ${e.orientation === oe.Horizontal ? "left" : "up"}, 'Ctrl+Click' to scroll to the beginning`), Le = (e) => ze(e, oe.Horizontal ? M(Y, {
|
|
98
|
+
iconKey: "ArrowRight",
|
|
99
|
+
size: "small"
|
|
100
|
+
}) : M(Y, {
|
|
101
|
+
iconKey: "ArrowDownward",
|
|
102
|
+
size: "small"
|
|
103
|
+
}), "Scroll " + (e.orientation === oe.Horizontal ? "Right" : "Down"), `Scroll ${e.orientation === oe.Horizontal ? "right" : "down"}, 'Ctrl+Click' to scroll to the end`), Oe = B(D((e, t) => {
|
|
104
|
+
const { orientation: r = "vertical", sx: o, ...n } = e, i = "vertical" === r;
|
|
105
|
+
return M(s, {
|
|
106
|
+
ref: t,
|
|
107
|
+
sx: {
|
|
108
|
+
marginLeft: i ? "2px" : void 0,
|
|
109
|
+
marginRight: i ? "2px" : void 0,
|
|
110
|
+
backgroundColor: "transparent !important",
|
|
111
|
+
minHeight: i ? "1em" : void 0,
|
|
112
|
+
minWidth: i ? void 0 : "1em",
|
|
113
|
+
borderColor: (e) => e.palette.divider,
|
|
114
|
+
...o
|
|
115
|
+
},
|
|
116
|
+
orientation: r,
|
|
117
|
+
variant: "middle",
|
|
118
|
+
flexItem: !0,
|
|
119
|
+
...n
|
|
120
|
+
});
|
|
121
|
+
})), Ee = "_traverse-ellipsis_14l1h_1", Fe = B((e) => {
|
|
122
|
+
const { sx: r, speed: o = 2, size: n = 70, ...i } = e;
|
|
123
|
+
return M(t, {
|
|
124
|
+
sx: {
|
|
125
|
+
width: `${n}px`,
|
|
126
|
+
height: `${n}px`,
|
|
127
|
+
zIndex: 1,
|
|
128
|
+
"& .primary": {
|
|
129
|
+
stroke: (e) => e.palette.grey[600],
|
|
130
|
+
fill: "none"
|
|
131
|
+
},
|
|
132
|
+
...r
|
|
133
|
+
},
|
|
134
|
+
...i,
|
|
135
|
+
children: S("svg", {
|
|
136
|
+
x: "0px",
|
|
137
|
+
y: "0px",
|
|
138
|
+
viewBox: "0 0 100 100",
|
|
139
|
+
children: [
|
|
140
|
+
M("circle", {
|
|
141
|
+
className: "primary",
|
|
142
|
+
strokeWidth: "4",
|
|
143
|
+
cx: "50",
|
|
144
|
+
cy: "50",
|
|
145
|
+
r: "48"
|
|
146
|
+
}),
|
|
147
|
+
M("line", {
|
|
148
|
+
className: "primary",
|
|
149
|
+
strokeLinecap: "round",
|
|
150
|
+
strokeWidth: "4",
|
|
151
|
+
x1: "50",
|
|
152
|
+
y1: "50",
|
|
153
|
+
x2: "85",
|
|
154
|
+
y2: "50.5",
|
|
155
|
+
children: M("animateTransform", {
|
|
156
|
+
attributeName: "transform",
|
|
157
|
+
dur: `${o}s`,
|
|
158
|
+
type: "rotate",
|
|
159
|
+
from: "0 50 50",
|
|
160
|
+
to: "360 50 50",
|
|
161
|
+
repeatCount: "indefinite"
|
|
162
|
+
})
|
|
163
|
+
}),
|
|
164
|
+
M("line", {
|
|
165
|
+
className: "primary",
|
|
166
|
+
strokeLinecap: "round",
|
|
167
|
+
strokeWidth: "4",
|
|
168
|
+
x1: "50",
|
|
169
|
+
y1: "50",
|
|
170
|
+
x2: "49.5",
|
|
171
|
+
y2: "74",
|
|
172
|
+
children: M("animateTransform", {
|
|
173
|
+
attributeName: "transform",
|
|
174
|
+
dur: 7.5 * o + "s",
|
|
175
|
+
type: "rotate",
|
|
176
|
+
from: "0 50 50",
|
|
177
|
+
to: "360 50 50",
|
|
178
|
+
repeatCount: "indefinite"
|
|
179
|
+
})
|
|
180
|
+
})
|
|
181
|
+
]
|
|
182
|
+
})
|
|
183
|
+
});
|
|
184
|
+
}), Ke = B((e) => {
|
|
185
|
+
const { sx: r, speed: o = 1.5, size: n = 70, ...i } = e;
|
|
186
|
+
return M(t, {
|
|
187
|
+
sx: {
|
|
188
|
+
width: `${n}px`,
|
|
189
|
+
height: `${n}px`,
|
|
190
|
+
zIndex: 1,
|
|
191
|
+
"& .primary": { fill: (e) => e.palette.grey[600] },
|
|
192
|
+
"& .secondary": {
|
|
193
|
+
stroke: (e) => e.palette.grey[600],
|
|
194
|
+
fill: "none",
|
|
195
|
+
opacity: .5
|
|
196
|
+
},
|
|
197
|
+
...r
|
|
198
|
+
},
|
|
199
|
+
...i,
|
|
200
|
+
children: S("svg", {
|
|
201
|
+
x: "0px",
|
|
202
|
+
y: "0px",
|
|
203
|
+
viewBox: "0 0 100 100",
|
|
204
|
+
children: [M("circle", {
|
|
205
|
+
className: "secondary",
|
|
206
|
+
strokeWidth: "4",
|
|
207
|
+
cx: "50",
|
|
208
|
+
cy: "50",
|
|
209
|
+
r: "21"
|
|
210
|
+
}), M("path", {
|
|
211
|
+
className: "primary",
|
|
212
|
+
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",
|
|
213
|
+
children: M("animateTransform", {
|
|
214
|
+
attributeName: "transform",
|
|
215
|
+
type: "rotate",
|
|
216
|
+
dur: 1 * o + "s",
|
|
217
|
+
from: "0 50 50",
|
|
218
|
+
to: "360 50 50",
|
|
219
|
+
repeatCount: "indefinite"
|
|
220
|
+
})
|
|
221
|
+
})]
|
|
222
|
+
})
|
|
223
|
+
});
|
|
224
|
+
}), Ae = B((e) => {
|
|
225
|
+
const { sx: r, speed: o = 1, size: n = 70, ...i } = e;
|
|
226
|
+
return M(t, {
|
|
227
|
+
sx: {
|
|
228
|
+
width: `${n}px`,
|
|
229
|
+
height: `${n}px`,
|
|
230
|
+
zIndex: 1,
|
|
231
|
+
...r
|
|
232
|
+
},
|
|
233
|
+
...i,
|
|
234
|
+
children: S("svg", {
|
|
235
|
+
x: "0px",
|
|
236
|
+
y: "0px",
|
|
237
|
+
viewBox: "0 0 100 100",
|
|
238
|
+
children: [
|
|
239
|
+
M("circle", {
|
|
240
|
+
className: "primary",
|
|
241
|
+
cx: "6",
|
|
242
|
+
cy: "50",
|
|
243
|
+
r: "6",
|
|
244
|
+
children: M("animate", {
|
|
245
|
+
attributeName: "opacity",
|
|
246
|
+
dur: `${o}s`,
|
|
247
|
+
values: "0;1;0",
|
|
248
|
+
repeatCount: "indefinite",
|
|
249
|
+
begin: "0.1"
|
|
250
|
+
})
|
|
251
|
+
}),
|
|
252
|
+
M("circle", {
|
|
253
|
+
className: "primary",
|
|
254
|
+
cx: "26",
|
|
255
|
+
cy: "50",
|
|
256
|
+
r: "6",
|
|
257
|
+
children: M("animate", {
|
|
258
|
+
attributeName: "opacity",
|
|
259
|
+
dur: `${o}s`,
|
|
260
|
+
values: "0;1;0",
|
|
261
|
+
repeatCount: "indefinite",
|
|
262
|
+
begin: "0.2"
|
|
263
|
+
})
|
|
264
|
+
}),
|
|
265
|
+
M("circle", {
|
|
266
|
+
className: "primary",
|
|
267
|
+
cx: "46",
|
|
268
|
+
cy: "50",
|
|
269
|
+
r: "6",
|
|
270
|
+
children: M("animate", {
|
|
271
|
+
attributeName: "opacity",
|
|
272
|
+
dur: `${o}s`,
|
|
273
|
+
values: "0;1;0",
|
|
274
|
+
repeatCount: "indefinite",
|
|
275
|
+
begin: "0.3"
|
|
276
|
+
})
|
|
277
|
+
})
|
|
278
|
+
]
|
|
279
|
+
})
|
|
280
|
+
});
|
|
281
|
+
}), We = B((e) => {
|
|
282
|
+
const { sx: r, speed: o = 1, size: n = 70, ...i } = e;
|
|
283
|
+
return M(t, {
|
|
284
|
+
sx: {
|
|
285
|
+
width: `${n}px`,
|
|
286
|
+
height: `${n}px`,
|
|
287
|
+
zIndex: 1,
|
|
288
|
+
"& .primary": {
|
|
289
|
+
fill: (e) => e.palette.grey[600],
|
|
290
|
+
stroke: "none"
|
|
291
|
+
},
|
|
292
|
+
...r
|
|
293
|
+
},
|
|
294
|
+
...i,
|
|
295
|
+
children: S("svg", {
|
|
296
|
+
x: "0px",
|
|
297
|
+
y: "0px",
|
|
298
|
+
viewBox: "0 0 100 100",
|
|
299
|
+
children: [
|
|
300
|
+
M("circle", {
|
|
301
|
+
className: "primary",
|
|
302
|
+
cx: "6",
|
|
303
|
+
cy: "50",
|
|
304
|
+
r: "6",
|
|
305
|
+
children: M("animateTransform", {
|
|
306
|
+
attributeName: "transform",
|
|
307
|
+
dur: `${o}s`,
|
|
308
|
+
type: "translate",
|
|
309
|
+
values: "0 15 ; 0 -15; 0 15",
|
|
310
|
+
repeatCount: "indefinite",
|
|
311
|
+
begin: "0.1"
|
|
312
|
+
})
|
|
313
|
+
}),
|
|
314
|
+
M("circle", {
|
|
315
|
+
className: "primary",
|
|
316
|
+
cx: "30",
|
|
317
|
+
cy: "50",
|
|
318
|
+
r: "6",
|
|
319
|
+
children: M("animateTransform", {
|
|
320
|
+
attributeName: "transform",
|
|
321
|
+
dur: `${o}s`,
|
|
322
|
+
type: "translate",
|
|
323
|
+
values: "0 10 ; 0 -10; 0 10",
|
|
324
|
+
repeatCount: "indefinite",
|
|
325
|
+
begin: "0.2"
|
|
326
|
+
})
|
|
327
|
+
}),
|
|
328
|
+
M("circle", {
|
|
329
|
+
className: "primary",
|
|
330
|
+
cx: "54",
|
|
331
|
+
cy: "50",
|
|
332
|
+
r: "6",
|
|
333
|
+
children: M("animateTransform", {
|
|
334
|
+
attributeName: "transform",
|
|
335
|
+
dur: `${o}s`,
|
|
336
|
+
type: "translate",
|
|
337
|
+
values: "0 5 ; 0 -5; 0 5",
|
|
338
|
+
repeatCount: "indefinite",
|
|
339
|
+
begin: "0.3"
|
|
340
|
+
})
|
|
341
|
+
})
|
|
342
|
+
]
|
|
343
|
+
})
|
|
344
|
+
});
|
|
345
|
+
}), He = B((e) => {
|
|
346
|
+
const { sx: r, speed: o = 2, size: n = 70, ...i } = e;
|
|
347
|
+
return M(t, {
|
|
348
|
+
sx: {
|
|
349
|
+
width: `${n}px`,
|
|
350
|
+
height: `${n}px`,
|
|
351
|
+
zIndex: 1,
|
|
352
|
+
"& .primary": {
|
|
353
|
+
stroke: (e) => e.palette.grey[600],
|
|
354
|
+
opacity: .5,
|
|
355
|
+
fill: "none"
|
|
356
|
+
},
|
|
357
|
+
"& .secondary": {
|
|
358
|
+
fillOpacity: (e) => e.palette.grey[600],
|
|
359
|
+
opacity: .8,
|
|
360
|
+
stroke: (e) => e.palette.background.paper
|
|
361
|
+
},
|
|
362
|
+
...r
|
|
363
|
+
},
|
|
364
|
+
...i,
|
|
365
|
+
children: S("svg", {
|
|
366
|
+
x: "0px",
|
|
367
|
+
y: "0px",
|
|
368
|
+
viewBox: "0 0 100 100",
|
|
369
|
+
children: [M("circle", {
|
|
370
|
+
className: "primary",
|
|
371
|
+
strokeWidth: "4",
|
|
372
|
+
cx: "50",
|
|
373
|
+
cy: "50",
|
|
374
|
+
r: "44"
|
|
375
|
+
}), M("circle", {
|
|
376
|
+
className: "secondary",
|
|
377
|
+
strokeWidth: "3",
|
|
378
|
+
cx: "8",
|
|
379
|
+
cy: "54",
|
|
380
|
+
r: "6",
|
|
381
|
+
children: M("animateTransform", {
|
|
382
|
+
attributeName: "transform",
|
|
383
|
+
dur: `${o}s`,
|
|
384
|
+
type: "rotate",
|
|
385
|
+
from: "0 50 48",
|
|
386
|
+
to: "360 50 52",
|
|
387
|
+
repeatCount: "indefinite"
|
|
388
|
+
})
|
|
389
|
+
})]
|
|
390
|
+
})
|
|
391
|
+
});
|
|
392
|
+
}), Ve = B((e) => {
|
|
393
|
+
const { sx: r, speed: o = 1, size: n = 13, width: i = 64, height: a = 17, ...l } = e;
|
|
394
|
+
return S(t, {
|
|
395
|
+
sx: {
|
|
396
|
+
width: `${i}px`,
|
|
397
|
+
height: `${a}px`,
|
|
398
|
+
"& .primary": {
|
|
399
|
+
backgroundColor: (e) => e.palette.grey[600],
|
|
400
|
+
top: `${(a - n) / 2}px`,
|
|
401
|
+
width: () => `${n}px`,
|
|
402
|
+
height: () => `${n}px`
|
|
403
|
+
},
|
|
404
|
+
...r
|
|
405
|
+
},
|
|
406
|
+
className: W(Ee, "animated-icon"),
|
|
407
|
+
...l,
|
|
408
|
+
children: [
|
|
409
|
+
M("div", { className: "primary" }),
|
|
410
|
+
M("div", { className: "primary" }),
|
|
411
|
+
M("div", { className: "primary" }),
|
|
412
|
+
M("div", { className: "primary" })
|
|
413
|
+
]
|
|
414
|
+
});
|
|
415
|
+
}), qe = M(Ke, {}), je = B(D((e, r) => {
|
|
416
|
+
const { sx: o, style: n, onMount: i, onUnmount: a, transitionDelay: l = "1200ms", panel: s = !1, transparentBackground: c = !0, icon: d = qe, label: p, progress: m = null, ...h } = e, g = E(() => "string" == typeof p ? M(b, {
|
|
417
|
+
variant: "caption",
|
|
418
|
+
component: "div",
|
|
419
|
+
sx: {
|
|
420
|
+
fontSize: "0.875rem",
|
|
421
|
+
lineHeight: 1.43,
|
|
422
|
+
letterSpacing: "0.01071em"
|
|
423
|
+
},
|
|
424
|
+
children: p
|
|
425
|
+
}) : p, [p]), x = E(() => {
|
|
426
|
+
if ("number" != typeof m) return d;
|
|
427
|
+
const e = Math.max(0, Math.min(100, Math.round(100 * m)));
|
|
428
|
+
return M(t, {
|
|
429
|
+
sx: {
|
|
430
|
+
display: "flex",
|
|
431
|
+
alignItems: "center",
|
|
432
|
+
width: "180px"
|
|
433
|
+
},
|
|
434
|
+
children: M(u, {
|
|
435
|
+
variant: "determinate",
|
|
436
|
+
value: e,
|
|
437
|
+
color: "inherit",
|
|
438
|
+
sx: {
|
|
439
|
+
width: "100%",
|
|
440
|
+
borderRadius: "2px",
|
|
441
|
+
"@keyframes sxlProgressPulse": {
|
|
442
|
+
"0%, 100%": { opacity: 1 },
|
|
443
|
+
"50%": { opacity: .25 }
|
|
444
|
+
},
|
|
445
|
+
"& .MuiLinearProgress-bar": {
|
|
446
|
+
transition: "transform 0.5s linear",
|
|
447
|
+
...e >= 100 && {
|
|
448
|
+
willChange: "opacity",
|
|
449
|
+
animation: "sxlProgressPulse 1s ease-in-out infinite"
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
})
|
|
454
|
+
});
|
|
455
|
+
}, [m, d]), y = K(null), v = E(() => {
|
|
456
|
+
let e = S(t, {
|
|
457
|
+
sx: {
|
|
458
|
+
display: "flex",
|
|
459
|
+
flexDirection: "column",
|
|
460
|
+
alignItems: "center",
|
|
461
|
+
rowGap: "8px"
|
|
462
|
+
},
|
|
463
|
+
children: [g, x]
|
|
464
|
+
});
|
|
465
|
+
return !0 === s && (e = M(f, {
|
|
466
|
+
elevation: 0,
|
|
467
|
+
sx: {
|
|
468
|
+
display: "flex",
|
|
469
|
+
flexDirection: "column",
|
|
470
|
+
justifyContent: "center",
|
|
471
|
+
alignItems: "center",
|
|
472
|
+
alignSelf: "center",
|
|
473
|
+
marginBottom: "5%",
|
|
474
|
+
backgroundColor: (e) => e.palette.info.light,
|
|
475
|
+
color: (e) => e.palette.info.contrastText,
|
|
476
|
+
paddingLeft: (e) => e.spacing(2),
|
|
477
|
+
paddingRight: (e) => e.spacing(2),
|
|
478
|
+
paddingTop: (e) => e.spacing(2),
|
|
479
|
+
paddingBottom: (e) => e.spacing(1),
|
|
480
|
+
rowGap: (e) => e.spacing(1),
|
|
481
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
482
|
+
boxShadow: (e) => e.shadows[2],
|
|
483
|
+
"& .primary": {
|
|
484
|
+
background: (e) => `${H(e.palette.info.contrastText, .9)} !important`,
|
|
485
|
+
boxShadow: (e) => `0 0 0 1px ${"dark" === e.palette.mode ? e.palette.text.secondary : e.palette.divider}`,
|
|
486
|
+
boxSizing: "content-box",
|
|
487
|
+
border: "solid transparent"
|
|
488
|
+
},
|
|
489
|
+
zIndex: 1
|
|
490
|
+
},
|
|
491
|
+
children: e
|
|
492
|
+
})), M(t, {
|
|
493
|
+
...h,
|
|
494
|
+
ref: ge([y, r]),
|
|
495
|
+
className: "animatable",
|
|
496
|
+
sx: {
|
|
497
|
+
cursor: "wait",
|
|
498
|
+
boxSizing: "border-box",
|
|
499
|
+
alignItems: "center",
|
|
500
|
+
justifyContent: "center",
|
|
501
|
+
display: "flex",
|
|
502
|
+
flexDirection: "column",
|
|
503
|
+
willChange: "opacity",
|
|
504
|
+
opacity: c ? .001 : 1,
|
|
505
|
+
transitionProperty: "opacity",
|
|
506
|
+
transitionDelay: l,
|
|
507
|
+
transitionDuration: "320ms",
|
|
508
|
+
transitionTimingFunction: "ease-in",
|
|
509
|
+
overflow: "hidden",
|
|
510
|
+
outline: "none",
|
|
511
|
+
width: "100%",
|
|
512
|
+
height: "100%",
|
|
513
|
+
minWidth: 0,
|
|
514
|
+
minHeight: 0,
|
|
515
|
+
zIndex: 99999,
|
|
516
|
+
"&.animating": { opacity: 1 },
|
|
517
|
+
"&.animating-exit": {
|
|
518
|
+
opacity: 0,
|
|
519
|
+
transition: "opacity 210ms"
|
|
520
|
+
},
|
|
521
|
+
...o,
|
|
522
|
+
...n
|
|
523
|
+
},
|
|
524
|
+
children: S(t, {
|
|
525
|
+
className: "center",
|
|
526
|
+
sx: {
|
|
527
|
+
display: "flex",
|
|
528
|
+
flex: "1 1 100%",
|
|
529
|
+
height: "100%",
|
|
530
|
+
width: "100%",
|
|
531
|
+
alignItems: "center",
|
|
532
|
+
justifyContent: "center",
|
|
533
|
+
boxSizing: "border-box",
|
|
534
|
+
position: "relative"
|
|
535
|
+
},
|
|
536
|
+
children: [M(t, {
|
|
537
|
+
className: "backdrop",
|
|
538
|
+
sx: {
|
|
539
|
+
opacity: (e) => c ? 1.5 * e.palette.action.disabledOpacity : void 0,
|
|
540
|
+
background: (e) => c ? void 0 : e.palette.background.paper,
|
|
541
|
+
backdropFilter: "blur(4px)",
|
|
542
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
543
|
+
zIndex: -1,
|
|
544
|
+
position: "absolute",
|
|
545
|
+
width: "100%",
|
|
546
|
+
height: "100%",
|
|
547
|
+
boxSizing: "border-box"
|
|
548
|
+
}
|
|
549
|
+
}), e]
|
|
550
|
+
})
|
|
551
|
+
});
|
|
552
|
+
}, [
|
|
553
|
+
o,
|
|
554
|
+
s,
|
|
555
|
+
g,
|
|
556
|
+
x
|
|
557
|
+
]), k = K(!1), w = K(!1);
|
|
558
|
+
return xe(() => {
|
|
559
|
+
if (y.current && !k.current && !w.current) {
|
|
560
|
+
if (w.current = !0, y.current.classList.contains("animatable") && !y.current.classList.contains("animating")) {
|
|
561
|
+
let e = !1;
|
|
562
|
+
const t = () => {
|
|
563
|
+
w.current && (k.current = !0, w.current = !1, e = !0, i?.());
|
|
564
|
+
};
|
|
565
|
+
y.current && y.current.addEventListener("transitionrun", t, {
|
|
566
|
+
once: !0,
|
|
567
|
+
capture: !0,
|
|
568
|
+
passive: !0
|
|
569
|
+
}), w.current && y.current && (window.getComputedStyle(y.current, null).opacity, y.current.classList.add("animating")), setTimeout(() => {
|
|
570
|
+
!e && w.current && y.current && (y.current?.removeEventListener("transitionrun", t), t());
|
|
571
|
+
}, 100);
|
|
572
|
+
} else k.current = !0, w.current = !1, i?.();
|
|
573
|
+
return () => {};
|
|
574
|
+
}
|
|
575
|
+
}, [y.current]), N(() => () => {
|
|
576
|
+
k.current && (y.current?.classList.remove("animating"), k.current = !1, w.current = !1, a?.());
|
|
577
|
+
}, []), v;
|
|
77
578
|
}));
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
579
|
+
je.displayName = "AnimatedLoadingPanel";
|
|
580
|
+
var Qe = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, Ue = /^\s*at\s+(?:(async|new|await)\s+)?(.+?):(\d+):(\d+)\s*$/, Ge = (e) => {
|
|
581
|
+
if (!e) return "";
|
|
582
|
+
try {
|
|
583
|
+
e = new URL(e).pathname;
|
|
584
|
+
} catch {}
|
|
585
|
+
return e = (e = e.replace(/^\/+/, "")).replace(/^@?fs[\\/]/, "");
|
|
586
|
+
}, Xe = B(({ error: e, maxLines: r = Number.MAX_SAFE_INTEGER, hideLineNumbers: o = !1 }) => {
|
|
587
|
+
const n = fe(), [i, a] = A(null);
|
|
588
|
+
if (!e?.stack) return null;
|
|
589
|
+
const l = Q.collectErrorChain(e).reverse(), s = [];
|
|
590
|
+
l.forEach(({ error: e }, t) => {
|
|
591
|
+
const r = (e.stack || "").split("\n").filter(Boolean).map((e) => {
|
|
592
|
+
let t = e.match(Qe);
|
|
593
|
+
if (t) {
|
|
594
|
+
const [, e = "", r, o, n, i] = t;
|
|
595
|
+
return {
|
|
596
|
+
line: `at ${e ? e + " " : ""}${r}`,
|
|
597
|
+
location: `${Ge(o).split(/[\\/]/).pop()}:${n}:${i}`
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
if (t = e.match(Ue), t) {
|
|
601
|
+
const [, e = "", r, o, n] = t, i = Ge(r), a = `${i.split(/[\\/]/).pop()}:${o}:${n}`;
|
|
602
|
+
return {
|
|
603
|
+
line: `at ${e ? e + " " : ""}${a}`,
|
|
604
|
+
location: i !== a ? `${i}:${o}:${n}` : void 0
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
return { line: e.trim() };
|
|
608
|
+
});
|
|
609
|
+
r.length && (s.push({
|
|
610
|
+
line: t ? `Caused by: ${r[0].line}` : r[0].line,
|
|
611
|
+
isBoundary: !0
|
|
612
|
+
}), s.push(...r.slice(1)));
|
|
613
|
+
});
|
|
614
|
+
const c = r ? s.slice(0, r) : s, p = r && s.length > r;
|
|
615
|
+
return S(t, {
|
|
616
|
+
sx: {
|
|
617
|
+
width: "100%",
|
|
618
|
+
mt: 1
|
|
619
|
+
},
|
|
620
|
+
children: [S(t, {
|
|
621
|
+
sx: {
|
|
622
|
+
display: "flex",
|
|
623
|
+
alignItems: "center",
|
|
624
|
+
gap: 1,
|
|
625
|
+
borderRadius: 1,
|
|
626
|
+
px: 1,
|
|
627
|
+
py: .5
|
|
628
|
+
},
|
|
629
|
+
children: [
|
|
630
|
+
M(b, {
|
|
631
|
+
variant: "caption",
|
|
632
|
+
component: "div",
|
|
633
|
+
sx: {
|
|
634
|
+
fontSize: "0.75rem",
|
|
635
|
+
opacity: .8
|
|
636
|
+
},
|
|
637
|
+
children: l.length > 1 ? n("stackTrace.headingFrames", { count: l.length }) : n("stackTrace.heading")
|
|
638
|
+
}),
|
|
639
|
+
M(t, { sx: { flex: 1 } }),
|
|
640
|
+
i && M(b, {
|
|
641
|
+
variant: "caption",
|
|
642
|
+
component: "div",
|
|
643
|
+
sx: {
|
|
644
|
+
fontSize: "0.625rem",
|
|
645
|
+
opacity: .8
|
|
646
|
+
},
|
|
647
|
+
children: i
|
|
648
|
+
}),
|
|
649
|
+
M(d, {
|
|
650
|
+
size: "small",
|
|
651
|
+
onClick: async () => {
|
|
652
|
+
try {
|
|
653
|
+
let e = 0;
|
|
654
|
+
const t = s.map((t) => {
|
|
655
|
+
if (t.isBoundary) return e = 0, t.line;
|
|
656
|
+
e++;
|
|
657
|
+
let r = t.location && t.line !== t.location ? `${t.line} (${t.location})` : t.line;
|
|
658
|
+
return e >= 1 && (r = ` ${r}`), r;
|
|
659
|
+
}).join("\n");
|
|
660
|
+
await navigator.clipboard.writeText(t), a("Copied!"), setTimeout(() => a(null), 2e3);
|
|
661
|
+
} catch (e) {
|
|
662
|
+
a("Can't copy!"), console.warn("Failed to copy stack trace:", e);
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
sx: {
|
|
666
|
+
color: "inherit",
|
|
667
|
+
opacity: .7,
|
|
668
|
+
"&:hover": { opacity: 1 }
|
|
669
|
+
},
|
|
670
|
+
title: n("stackTrace.copy"),
|
|
671
|
+
children: M(Y, {
|
|
672
|
+
iconKey: "ContentCopy",
|
|
673
|
+
style: { fontSize: "0.875rem" }
|
|
674
|
+
})
|
|
675
|
+
}),
|
|
676
|
+
M(d, {
|
|
677
|
+
size: "small",
|
|
678
|
+
onClick: () => {
|
|
679
|
+
a("Logged!"), setTimeout(() => a(null), 2e3), console.warn(e);
|
|
680
|
+
},
|
|
681
|
+
sx: {
|
|
682
|
+
color: "inherit",
|
|
683
|
+
opacity: .7,
|
|
684
|
+
"&:hover": { opacity: 1 }
|
|
685
|
+
},
|
|
686
|
+
title: n("stackTrace.log"),
|
|
687
|
+
children: M(Y, {
|
|
688
|
+
iconKey: "BugReport",
|
|
689
|
+
style: { fontSize: "0.875rem" }
|
|
690
|
+
})
|
|
691
|
+
})
|
|
692
|
+
]
|
|
693
|
+
}), S(t, {
|
|
694
|
+
sx: {
|
|
695
|
+
mt: 1,
|
|
696
|
+
backgroundColor: "rgba(0, 0, 0, 0.2)",
|
|
697
|
+
borderRadius: 1,
|
|
698
|
+
p: 1,
|
|
699
|
+
maxHeight: "300px",
|
|
700
|
+
overflow: "auto",
|
|
701
|
+
fontFamily: "monospace",
|
|
702
|
+
fontSize: "0.75rem",
|
|
703
|
+
lineHeight: 1.4
|
|
704
|
+
},
|
|
705
|
+
children: [c.map((e, r) => e.isBoundary ? M(t, {
|
|
706
|
+
sx: {
|
|
707
|
+
py: 1,
|
|
708
|
+
mt: r > 0 ? 1 : 0,
|
|
709
|
+
mb: .5,
|
|
710
|
+
borderTop: r > 0 ? "1px solid rgba(255, 255, 255, 0.1)" : "none"
|
|
711
|
+
},
|
|
712
|
+
children: M(b, {
|
|
713
|
+
variant: "caption",
|
|
714
|
+
component: "div",
|
|
715
|
+
sx: {
|
|
716
|
+
fontSize: "0.75rem",
|
|
717
|
+
fontWeight: "bold",
|
|
718
|
+
color: (t) => e.isBoundary ? t.palette.text.primary : t.palette.text.secondary,
|
|
719
|
+
display: "block"
|
|
720
|
+
},
|
|
721
|
+
children: e.line
|
|
722
|
+
})
|
|
723
|
+
}, `error-${r}`) : S(t, {
|
|
724
|
+
sx: {
|
|
725
|
+
display: "flex",
|
|
726
|
+
alignItems: "flex-start",
|
|
727
|
+
gap: 1,
|
|
728
|
+
py: .25,
|
|
729
|
+
pl: 1,
|
|
730
|
+
"&:hover": { backgroundColor: "rgba(255, 255, 255, 0.05)" }
|
|
731
|
+
},
|
|
732
|
+
children: [!o && M(b, {
|
|
733
|
+
variant: "caption",
|
|
734
|
+
component: "div",
|
|
735
|
+
sx: {
|
|
736
|
+
fontSize: "0.625rem",
|
|
737
|
+
opacity: .5,
|
|
738
|
+
minWidth: "20px",
|
|
739
|
+
textAlign: "right",
|
|
740
|
+
userSelect: "none"
|
|
741
|
+
},
|
|
742
|
+
children: r + 1
|
|
743
|
+
}), S(t, {
|
|
744
|
+
sx: {
|
|
745
|
+
flex: 1,
|
|
746
|
+
overflow: "hidden"
|
|
747
|
+
},
|
|
748
|
+
children: [M(b, {
|
|
749
|
+
variant: "caption",
|
|
750
|
+
component: "div",
|
|
751
|
+
sx: {
|
|
752
|
+
fontSize: "0.75rem",
|
|
753
|
+
whiteSpace: "nowrap",
|
|
754
|
+
overflow: "hidden",
|
|
755
|
+
textOverflow: "ellipsis",
|
|
756
|
+
color: "inherit"
|
|
757
|
+
},
|
|
758
|
+
children: e.line
|
|
759
|
+
}), e.location && e.line !== e.location && M(b, {
|
|
760
|
+
variant: "caption",
|
|
761
|
+
component: "div",
|
|
762
|
+
sx: {
|
|
763
|
+
fontSize: "0.625rem",
|
|
764
|
+
opacity: .6,
|
|
765
|
+
fontStyle: "italic"
|
|
766
|
+
},
|
|
767
|
+
children: e.location
|
|
768
|
+
})]
|
|
769
|
+
})]
|
|
770
|
+
}, `stack-${r}`)), p && M(b, {
|
|
771
|
+
variant: "caption",
|
|
772
|
+
component: "div",
|
|
773
|
+
sx: {
|
|
774
|
+
fontSize: "0.625rem",
|
|
775
|
+
opacity: .6,
|
|
776
|
+
fontStyle: "italic",
|
|
777
|
+
textAlign: "center",
|
|
778
|
+
display: "block",
|
|
779
|
+
mt: 1
|
|
780
|
+
},
|
|
781
|
+
children: n("stackTrace.moreFrames", { count: s.length - r })
|
|
782
|
+
})]
|
|
783
|
+
})]
|
|
784
|
+
});
|
|
122
785
|
});
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
786
|
+
Xe.displayName = "StackTrace";
|
|
787
|
+
var Ye = B(D((e, r) => {
|
|
788
|
+
const { sx: o, icon: n = M(Y, {
|
|
789
|
+
iconKey: "Error",
|
|
790
|
+
style: { fontSize: 48 }
|
|
791
|
+
}), error: i, hideStackTrace: a = !1, stackTraceExpanded: l = !1, fullscreen: s = !1, ...c } = e, d = fe(), p = E(() => _e(i, a, l, s, d), [
|
|
792
|
+
i,
|
|
793
|
+
a,
|
|
794
|
+
l,
|
|
795
|
+
s,
|
|
796
|
+
d
|
|
797
|
+
]);
|
|
798
|
+
return E(() => M(t, {
|
|
799
|
+
ref: r,
|
|
800
|
+
sx: {
|
|
801
|
+
boxSizing: "border-box",
|
|
802
|
+
alignItems: "center",
|
|
803
|
+
justifyContent: "center",
|
|
804
|
+
display: "flex",
|
|
805
|
+
flexDirection: "row",
|
|
806
|
+
overflow: "hidden",
|
|
807
|
+
width: "100%",
|
|
808
|
+
height: "100%",
|
|
809
|
+
...o
|
|
810
|
+
},
|
|
811
|
+
...c,
|
|
812
|
+
children: S(t, {
|
|
813
|
+
sx: {
|
|
814
|
+
display: "flex",
|
|
815
|
+
flex: "1 1 100%",
|
|
816
|
+
height: "100%",
|
|
817
|
+
alignItems: "center",
|
|
818
|
+
justifyContent: "center",
|
|
819
|
+
boxSizing: "border-box",
|
|
820
|
+
position: "relative"
|
|
821
|
+
},
|
|
822
|
+
children: [M(t, {
|
|
823
|
+
className: "backdrop",
|
|
824
|
+
sx: {
|
|
825
|
+
backdropFilter: "blur(4px)",
|
|
826
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
827
|
+
zIndex: -1,
|
|
828
|
+
position: "absolute",
|
|
829
|
+
width: "100%",
|
|
830
|
+
height: "100%",
|
|
831
|
+
boxSizing: "border-box"
|
|
832
|
+
}
|
|
833
|
+
}), M(f, {
|
|
834
|
+
elevation: 0,
|
|
835
|
+
sx: {
|
|
836
|
+
display: "flex",
|
|
837
|
+
flexDirection: "column",
|
|
838
|
+
justifyContent: "center",
|
|
839
|
+
alignItems: "center",
|
|
840
|
+
rowGap: "8px",
|
|
841
|
+
alignSelf: "center",
|
|
842
|
+
marginBottom: "5%",
|
|
843
|
+
backgroundColor: (e) => e.palette.background.paper,
|
|
844
|
+
color: (e) => e.palette.text.primary,
|
|
845
|
+
border: (e) => `1px solid ${e.palette.divider}`,
|
|
846
|
+
padding: (e) => e.spacing(3),
|
|
847
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
848
|
+
boxShadow: (e) => e.shadows[3],
|
|
849
|
+
zIndex: 1
|
|
850
|
+
},
|
|
851
|
+
children: M(t, {
|
|
852
|
+
sx: {
|
|
853
|
+
display: "flex",
|
|
854
|
+
flexDirection: "column",
|
|
855
|
+
alignItems: "center",
|
|
856
|
+
gap: (e) => e.spacing(2),
|
|
857
|
+
width: "100%",
|
|
858
|
+
maxWidth: s ? void 0 : "600px"
|
|
859
|
+
},
|
|
860
|
+
children: S(t, {
|
|
861
|
+
sx: {
|
|
862
|
+
display: "flex",
|
|
863
|
+
flexDirection: "row",
|
|
864
|
+
alignItems: "flex-start",
|
|
865
|
+
gap: (e) => e.spacing(2)
|
|
866
|
+
},
|
|
867
|
+
children: [M(t, {
|
|
868
|
+
sx: {
|
|
869
|
+
display: "flex",
|
|
870
|
+
color: (e) => e.palette.error.main
|
|
871
|
+
},
|
|
872
|
+
children: "string" == typeof n ? M(Y, {
|
|
873
|
+
iconKey: n,
|
|
874
|
+
style: { fontSize: 48 }
|
|
875
|
+
}) : n
|
|
876
|
+
}), p]
|
|
877
|
+
})
|
|
878
|
+
})
|
|
879
|
+
})]
|
|
880
|
+
})
|
|
881
|
+
}), [
|
|
882
|
+
o,
|
|
883
|
+
n,
|
|
884
|
+
p
|
|
885
|
+
]);
|
|
182
886
|
}));
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
},
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
},
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
887
|
+
Ye.displayName = "StackTraceErrorPanel";
|
|
888
|
+
var _e = (e, r = !1, o = !1, n = !1, i = (e) => e) => $(e) ? e : e instanceof Error ? S(t, {
|
|
889
|
+
sx: {
|
|
890
|
+
display: "flex",
|
|
891
|
+
flexDirection: "column",
|
|
892
|
+
minWidth: n ? "70vw" : "300px",
|
|
893
|
+
maxWidth: n ? void 0 : "500px",
|
|
894
|
+
width: "100%"
|
|
895
|
+
},
|
|
896
|
+
children: [
|
|
897
|
+
M(b, {
|
|
898
|
+
variant: "caption",
|
|
899
|
+
component: "div",
|
|
900
|
+
sx: {
|
|
901
|
+
fontSize: "0.875rem",
|
|
902
|
+
lineHeight: 1.43,
|
|
903
|
+
mb: 1
|
|
904
|
+
},
|
|
905
|
+
children: e.message
|
|
906
|
+
}),
|
|
907
|
+
e.cause ? M(b, {
|
|
908
|
+
variant: "caption",
|
|
909
|
+
component: "div",
|
|
910
|
+
sx: {
|
|
911
|
+
fontSize: "0.875rem",
|
|
912
|
+
lineHeight: 1.43,
|
|
913
|
+
letterSpacing: "0.01071em",
|
|
914
|
+
mb: 1,
|
|
915
|
+
opacity: .8
|
|
916
|
+
},
|
|
917
|
+
children: i("stackTrace.causedBy", { cause: e.cause instanceof Error ? e.cause.message : String(e.cause) })
|
|
918
|
+
}) : null,
|
|
919
|
+
!r && M(Xe, {
|
|
920
|
+
error: e,
|
|
921
|
+
hideLineNumbers: !0
|
|
922
|
+
})
|
|
923
|
+
]
|
|
924
|
+
}) : M(b, {
|
|
925
|
+
variant: "caption",
|
|
926
|
+
component: "div",
|
|
927
|
+
sx: {
|
|
928
|
+
fontSize: "0.875rem",
|
|
929
|
+
lineHeight: 1.43,
|
|
930
|
+
letterSpacing: "0.01071em"
|
|
931
|
+
},
|
|
932
|
+
children: "string" === e ? e : `Unknown Error: ${String(e)}`
|
|
933
|
+
}), Je = B(D((e, r) => {
|
|
934
|
+
const { chips: n, sx: i, ...a } = e, l = E(() => {
|
|
935
|
+
if (!n) return null;
|
|
936
|
+
const e = Array.isArray(n) ? n : [n], t = [], r = e.length;
|
|
937
|
+
for (let n = 0; n < r; n++) {
|
|
938
|
+
const r = e[n];
|
|
939
|
+
let i = null;
|
|
940
|
+
"string" == typeof r ? i = M(o, {
|
|
941
|
+
label: r,
|
|
942
|
+
color: "primary",
|
|
943
|
+
size: "small",
|
|
944
|
+
sx: { scale: "0.8" }
|
|
945
|
+
}, "chip-" + n) : R(r, { key: "chip-" + n }), t.push(i);
|
|
946
|
+
}
|
|
947
|
+
return t;
|
|
948
|
+
}, [n]);
|
|
949
|
+
return M(t, {
|
|
950
|
+
ref: r,
|
|
951
|
+
sx: {
|
|
952
|
+
display: "flex",
|
|
953
|
+
flexDirection: "row",
|
|
954
|
+
marginLeft: "4px",
|
|
955
|
+
gap: "2px",
|
|
956
|
+
...i
|
|
957
|
+
},
|
|
958
|
+
...a,
|
|
959
|
+
children: l
|
|
960
|
+
});
|
|
961
|
+
})), Ze = (e) => {
|
|
962
|
+
if ("dark" === e.palette.mode) return `drop-shadow(0px 0px 1px ${"dark" === e.palette.mode ? e.palette.text.primary : e.palette.divider})`;
|
|
963
|
+
}, et = (e = 1) => (t) => {
|
|
964
|
+
if ("dark" === t.palette.mode) return `drop-shadow(0px 0px ${e}px ${"dark" === t.palette.mode ? t.palette.text.primary : t.palette.divider})`;
|
|
965
|
+
}, tt = (e) => M(Y, {
|
|
966
|
+
...e,
|
|
967
|
+
iconKey: "ArrowDownOutline"
|
|
968
|
+
}), rt = (e) => M(Y, {
|
|
969
|
+
...e,
|
|
970
|
+
iconKey: "ArrowRightOutline"
|
|
971
|
+
}), ot = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, nt = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, it = function(e, t = null) {
|
|
972
|
+
if (!e) return e;
|
|
973
|
+
e = e.replace(ot, function(e, t, r, o) {
|
|
974
|
+
return t + t + r + r + o + o;
|
|
975
|
+
});
|
|
976
|
+
let r = nt.exec(e);
|
|
977
|
+
return r ? null === t ? `rgb(${parseInt(r[1], 16)}, ${parseInt(r[2], 16)}, ${parseInt(r[3], 16)})` : `rgb(${parseInt(r[1], 16)} ${parseInt(r[2], 16)} ${parseInt(r[3], 16)} / ${100 * t}%)` : e;
|
|
978
|
+
}, at = function(e, t = .2, r = "light") {
|
|
979
|
+
if (!e) return e;
|
|
980
|
+
let o = "dark" !== r;
|
|
981
|
+
t < 0 && (o = !o, t *= -1), e = it(e);
|
|
982
|
+
try {
|
|
983
|
+
return o ? V(e, Math.max(0, Math.min(1, 1 * t))) : q(e, Math.max(0, Math.min(1, 1.5 * t)));
|
|
984
|
+
} catch {
|
|
985
|
+
return e;
|
|
986
|
+
}
|
|
987
|
+
}, lt = function(e) {
|
|
988
|
+
let t = 0;
|
|
989
|
+
return t = e < 1 ? 5.11916 * e ** 2 : 4.5 * Math.log(e + 1) + 2, Number((t / 100).toFixed(2));
|
|
990
|
+
}, st = (e) => (t) => {
|
|
991
|
+
if ("dark" !== t.palette.mode) return "var(--sxl-surface-raised, none)";
|
|
992
|
+
const r = H("#fff", lt(e));
|
|
993
|
+
return `var(--sxl-surface-raised, linear-gradient(${r}, ${r}))`;
|
|
994
|
+
}, ct = st(2), dt = st(8), pt = (e, t) => {
|
|
995
|
+
let r = v({ palette: { mode: e ? "dark" : "light" } });
|
|
996
|
+
const o = {
|
|
997
|
+
"--icon-shadow": e ? r.palette.text.primary : r.palette.divider,
|
|
998
|
+
"--icon-size": "1.25rem",
|
|
999
|
+
"@media (pointer: coarse)": { "--icon-size": "1.75rem" }
|
|
1000
|
+
};
|
|
1001
|
+
let n = {
|
|
1002
|
+
typography: {},
|
|
1003
|
+
palette: {
|
|
1004
|
+
mode: e ? "dark" : "light",
|
|
1005
|
+
text: {
|
|
1006
|
+
secondary: e ? r.palette.text.secondary : H(r.palette.text.secondary, .75),
|
|
1007
|
+
icon: e ? H(r.palette.text.secondary, .7) : H(r.palette.text.primary, .75)
|
|
1008
|
+
}
|
|
1009
|
+
},
|
|
1010
|
+
components: {
|
|
1011
|
+
MuiDialogTitle: { styleOverrides: { root: { fontWeight: "normal" } } },
|
|
1012
|
+
MuiSelect: {
|
|
1013
|
+
defaultProps: {
|
|
1014
|
+
IconComponent: tt,
|
|
1015
|
+
MenuProps: { container: () => document.fullscreenElement }
|
|
1016
|
+
},
|
|
1017
|
+
styleOverrides: { icon: { top: "unset" } }
|
|
1018
|
+
},
|
|
1019
|
+
MuiListItemIcon: { styleOverrides: { root: {
|
|
1020
|
+
minWidth: "0px !important",
|
|
1021
|
+
overflow: "hidden",
|
|
1022
|
+
marginLeft: "0px",
|
|
1023
|
+
marginRight: "6px",
|
|
1024
|
+
padding: "1px 1px",
|
|
1025
|
+
border: "solid transparent 1px",
|
|
1026
|
+
color: "unset"
|
|
1027
|
+
} } },
|
|
1028
|
+
MuiMenuItem: { styleOverrides: { root: {
|
|
1029
|
+
paddingTop: "2px",
|
|
1030
|
+
paddingBottom: "2px",
|
|
1031
|
+
marginLeft: "4px",
|
|
1032
|
+
marginRight: "4px",
|
|
1033
|
+
paddingLeft: "6px",
|
|
1034
|
+
paddingRight: "18px",
|
|
1035
|
+
borderRadius: "4px",
|
|
1036
|
+
fontSize: "0.875em",
|
|
1037
|
+
"@media (pointer: coarse)": { fontSize: "1em" },
|
|
1038
|
+
"&.Mui-selected": {}
|
|
1039
|
+
} } },
|
|
1040
|
+
MuiMenu: {
|
|
1041
|
+
defaultProps: { container: () => document.fullscreenElement },
|
|
1042
|
+
styleOverrides: { root: {
|
|
1043
|
+
paddingTop: "2px",
|
|
1044
|
+
paddingBottom: "2px",
|
|
1045
|
+
marginLeft: "4px",
|
|
1046
|
+
marginRight: "4px",
|
|
1047
|
+
paddingLeft: "6px",
|
|
1048
|
+
paddingRight: "18px",
|
|
1049
|
+
borderRadius: "4px",
|
|
1050
|
+
fontSize: "0.875em",
|
|
1051
|
+
"@media (pointer: coarse)": { fontSize: "1em" },
|
|
1052
|
+
"&.Mui-selected": {}
|
|
1053
|
+
} }
|
|
1054
|
+
},
|
|
1055
|
+
MuiToolbar: { styleOverrides: { root: {
|
|
1056
|
+
paddingTop: "4px",
|
|
1057
|
+
paddingBottom: "4px",
|
|
1058
|
+
"@media (min-width: 600px)": {
|
|
1059
|
+
paddingTop: "4px",
|
|
1060
|
+
paddingBottom: "4px"
|
|
1061
|
+
}
|
|
1062
|
+
} } },
|
|
1063
|
+
MuiDivider: { styleOverrides: { root: {
|
|
1064
|
+
marginTop: "4px !important",
|
|
1065
|
+
marginBottom: "4px !important",
|
|
1066
|
+
marginLeft: "0px",
|
|
1067
|
+
marginRight: "0px"
|
|
1068
|
+
} } },
|
|
1069
|
+
MuiInputBase: { styleOverrides: { root: {} } },
|
|
1070
|
+
MuiPaper: { styleOverrides: { root: {
|
|
1071
|
+
...o,
|
|
1072
|
+
backgroundImage: "var(--sxl-surface-raised, var(--Paper-overlay))"
|
|
1073
|
+
} } },
|
|
1074
|
+
MuiPopover: { styleOverrides: { paper: {
|
|
1075
|
+
backgroundColor: `var(--sxl-color-elevated, var(--sxl-color-base-100, ${r.palette.background.paper}))`,
|
|
1076
|
+
border: "1px solid var(--sxl-color-elevated-border, transparent)"
|
|
1077
|
+
} } },
|
|
1078
|
+
MuiPopper: { styleOverrides: { root: { "& .menu": {
|
|
1079
|
+
marginTop: "4px",
|
|
1080
|
+
marginBottom: "4px",
|
|
1081
|
+
borderRadius: "4px"
|
|
1082
|
+
} } } },
|
|
1083
|
+
SmartInputField: { styleOverrides: {
|
|
1084
|
+
automatic: {
|
|
1085
|
+
transition: "opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
1086
|
+
color: function() {
|
|
1087
|
+
return r.palette.text.secondary;
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
1090
|
+
dirty: {
|
|
1091
|
+
fontStyle: "italic",
|
|
1092
|
+
color: function() {
|
|
1093
|
+
return r.palette.text.secondary;
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
} }
|
|
1097
|
+
}
|
|
1098
|
+
}, i = n;
|
|
1099
|
+
return t && (i = ye(n, t)), v(i);
|
|
219
1100
|
};
|
|
220
|
-
function
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
return { themeMode: et(), source: "media" };
|
|
236
|
-
});
|
|
237
|
-
return s(() => {
|
|
238
|
-
const e3 = () => {
|
|
239
|
-
if (t2) return void (t2 === o2.themeMode && "prop" === o2.source || n2((e5) => ({ ...e5, themeMode: t2, source: "prop" })));
|
|
240
|
-
const e4 = Ze();
|
|
241
|
-
if (e4) n2({ themeMode: e4, source: "class" });
|
|
242
|
-
else {
|
|
243
|
-
const e5 = et();
|
|
244
|
-
n2({ themeMode: e5, source: "media" });
|
|
245
|
-
}
|
|
246
|
-
}, r2 = new MutationObserver(e3), i2 = [document.documentElement, document.body].filter(Boolean);
|
|
247
|
-
for (const e4 of i2) r2.observe(e4, { attributes: true, attributeFilter: ["class"] });
|
|
248
|
-
const a2 = window.matchMedia("(prefers-color-scheme: dark)");
|
|
249
|
-
return a2.addEventListener("change", e3), e3(), () => {
|
|
250
|
-
r2.disconnect(), a2.removeEventListener("change", e3);
|
|
251
|
-
};
|
|
252
|
-
}, [t2]), o2;
|
|
253
|
-
}
|
|
254
|
-
function Ze() {
|
|
255
|
-
if ("undefined" == typeof document) return null;
|
|
256
|
-
const e2 = [...Array.from(document.body.classList), ...document.documentElement ? Array.from(document.documentElement.classList) : []];
|
|
257
|
-
return e2.includes("dark") ? "dark" : e2.includes("light") ? "light" : null;
|
|
1101
|
+
function ut(e, t) {
|
|
1102
|
+
return t = ye({
|
|
1103
|
+
track: at(e.palette.background.paper, .05, e?.palette.mode),
|
|
1104
|
+
thumb: at(e.palette.background.paper, .3, e?.palette.mode),
|
|
1105
|
+
active: e.palette.primary.main,
|
|
1106
|
+
corner: e.palette.background.paper,
|
|
1107
|
+
outline: !1
|
|
1108
|
+
}, t || {}), ae({
|
|
1109
|
+
track: H(t.track, .2),
|
|
1110
|
+
thumb: t.thumb,
|
|
1111
|
+
button: t.button,
|
|
1112
|
+
active: t.active,
|
|
1113
|
+
corner: t.corner || t.thumb,
|
|
1114
|
+
border: t.track
|
|
1115
|
+
});
|
|
258
1116
|
}
|
|
259
|
-
function
|
|
260
|
-
|
|
1117
|
+
function mt(e, t) {
|
|
1118
|
+
const r = ut(e, t), o = {
|
|
1119
|
+
...r,
|
|
1120
|
+
"& .scrollbar, & .vsb-track, & .vsb-thumb": { ...r },
|
|
1121
|
+
"&::-webkit-scrollbar, & *::-webkit-scrollbar": {
|
|
1122
|
+
backgroundColor: "var(--scrollbar-track-color)",
|
|
1123
|
+
width: "var(--scrollbar-width)",
|
|
1124
|
+
height: "var(--scrollbar-height)"
|
|
1125
|
+
},
|
|
1126
|
+
"&::-webkit-scrollbar-button": { display: "none" },
|
|
1127
|
+
"& .scrollbar-button": {
|
|
1128
|
+
fill: "var(--scrollbar-thumb-color)",
|
|
1129
|
+
backgroundColor: "transparent",
|
|
1130
|
+
transition: "fill opacity 260ms ease",
|
|
1131
|
+
width: "var(--scrollbar-width)",
|
|
1132
|
+
height: "var(--scrollbar-height)"
|
|
1133
|
+
},
|
|
1134
|
+
"& .scrollbar-button:hover:not([disabled])": { fill: "var(--scrollbar-active-color)" },
|
|
1135
|
+
"& .scrollbar-button:disabled": { opacity: .8 },
|
|
1136
|
+
"&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {},
|
|
1137
|
+
"&::-webkit-scrollbar-track-piece, & *::-webkit-scrollbar-track-piece": {},
|
|
1138
|
+
"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": {
|
|
1139
|
+
borderRadius: "var(--scrollbar-border-radius)",
|
|
1140
|
+
backgroundColor: "var(--scrollbar-thumb-color)",
|
|
1141
|
+
minHeight: "var(--scrollbar-min-thumb-size)",
|
|
1142
|
+
minWidth: "var(--scrollbar-min-thumb-size)",
|
|
1143
|
+
border: "var(--scrollbar-border-width) solid var(--scrollbar-border-color)"
|
|
1144
|
+
},
|
|
1145
|
+
"&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus": {
|
|
1146
|
+
backgroundColor: "var(--scrollbar-active-color)",
|
|
1147
|
+
border: t?.outline ? t.outline : void 0
|
|
1148
|
+
},
|
|
1149
|
+
"&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active": {
|
|
1150
|
+
backgroundColor: "var(--scrollbar-active-color)",
|
|
1151
|
+
border: t?.outline ? t.outline : void 0
|
|
1152
|
+
},
|
|
1153
|
+
"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": {
|
|
1154
|
+
backgroundColor: "var(--scrollbar-active-color)",
|
|
1155
|
+
border: t?.outline ? t.outline : void 0
|
|
1156
|
+
},
|
|
1157
|
+
"&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": { backgroundColor: "var(--scrollbar-corner-color)" }
|
|
1158
|
+
};
|
|
1159
|
+
return j.getPlatform() === j.OSType.Firefox && (o["* .pseudo-scrollbar"] = { scrollbarColor: "var(--scrollbar-thumb-color) transparent" }, o["* .pseudo-scrollbar:hover:not([disabled])"] = { scrollbarColor: "var(--scrollbar-active-color) transparent" }), o;
|
|
261
1160
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
},
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
1161
|
+
var ht = {
|
|
1162
|
+
Popup: "popup",
|
|
1163
|
+
Anchor: "anchor"
|
|
1164
|
+
}, ft = {
|
|
1165
|
+
ByPopup: "popupDone",
|
|
1166
|
+
Cancel: "popupCancel",
|
|
1167
|
+
ClickAway: "clickAway"
|
|
1168
|
+
}, gt = {
|
|
1169
|
+
Toolbar: "toolbar",
|
|
1170
|
+
Menuitem: "menuitem"
|
|
1171
|
+
}, xt = (e) => {
|
|
1172
|
+
const { closeFloat: r, closeFloatAll: o, floatReference: n, popupContainer: i, children: a, className: l, sx: s, ...c } = e;
|
|
1173
|
+
return M(t, {
|
|
1174
|
+
className: W("menu", l),
|
|
1175
|
+
sx: {
|
|
1176
|
+
display: "flex",
|
|
1177
|
+
flexDirection: "column",
|
|
1178
|
+
paddingTop: (e) => `${e.shape.borderRadius}px`,
|
|
1179
|
+
paddingBottom: (e) => `${e.shape.borderRadius}px`,
|
|
1180
|
+
...s
|
|
1181
|
+
},
|
|
1182
|
+
...c,
|
|
1183
|
+
children: a
|
|
1184
|
+
});
|
|
1185
|
+
}, bt = (e, t, r) => {
|
|
1186
|
+
let o = "";
|
|
1187
|
+
return r && (o = (o ? o + " " : "") + "rotate(180deg)"), M(tt, {
|
|
1188
|
+
style: {
|
|
1189
|
+
marginLeft: e ? void 0 : t ? "-0.25rem" : "-3px",
|
|
1190
|
+
marginRight: e ? void 0 : t ? "-0.25rem" : "-6px",
|
|
1191
|
+
transform: o
|
|
1192
|
+
},
|
|
1193
|
+
color: "inherit"
|
|
1194
|
+
});
|
|
1195
|
+
}, yt = B(D((e, t) => {
|
|
1196
|
+
const { open: r, anchorEl: o, anchorPosition: n, label: i, floatReference: a, createPopupPanel: l = xt, propsPopper: s, onMount: c, onClosing: d, onClose: p, onOpening: u, onOpen: m, children: h, sx: g, ...x } = e, b = le(d ?? (() => {}), [d]), y = le(p ?? (() => {}), [p]), v = le(u ?? (() => {}), [u]), k = le(m ?? (() => {}), [m]), [w, C] = A(), S = K(null), T = le((e, t) => {
|
|
1197
|
+
C(e), c?.(S.current, t);
|
|
1198
|
+
}, [c]), P = E(() => {
|
|
1199
|
+
const e = {
|
|
1200
|
+
popupContainer: w,
|
|
1201
|
+
floatReference: a,
|
|
1202
|
+
children: h,
|
|
1203
|
+
...x
|
|
1204
|
+
}, t = l(e);
|
|
1205
|
+
return M(f, {
|
|
1206
|
+
elevation: 8,
|
|
1207
|
+
ref: S,
|
|
1208
|
+
sx: {
|
|
1209
|
+
display: "flex",
|
|
1210
|
+
overflowX: "hidden",
|
|
1211
|
+
overflowY: "auto",
|
|
1212
|
+
outline: "none",
|
|
1213
|
+
backgroundColor: "var(--sxl-color-elevated, var(--sxl-color-base-100, #fff))",
|
|
1214
|
+
border: "1px solid var(--sxl-color-elevated-border, transparent)",
|
|
1215
|
+
"&.MuiPaper-root": (e) => mt(e)
|
|
1216
|
+
},
|
|
1217
|
+
tabIndex: 0,
|
|
1218
|
+
children: t
|
|
1219
|
+
});
|
|
1220
|
+
}, [
|
|
1221
|
+
l,
|
|
1222
|
+
h,
|
|
1223
|
+
w,
|
|
1224
|
+
a
|
|
1225
|
+
]);
|
|
1226
|
+
return M(_, {
|
|
1227
|
+
ref: t,
|
|
1228
|
+
anchorEl: o,
|
|
1229
|
+
anchorPosition: n,
|
|
1230
|
+
label: i,
|
|
1231
|
+
open: r,
|
|
1232
|
+
onMount: T,
|
|
1233
|
+
onOpening: v,
|
|
1234
|
+
onOpen: k,
|
|
1235
|
+
onClosing: b,
|
|
1236
|
+
onClose: y,
|
|
1237
|
+
...s,
|
|
1238
|
+
children: P
|
|
1239
|
+
});
|
|
276
1240
|
}));
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
k2(false);
|
|
347
|
-
}, open: L2, close: F2, closeChild: A2, closeAll: H2, floatElement: () => M2.current, anchorElement: () => S2.current }), []);
|
|
348
|
-
s(() => {
|
|
349
|
-
ct.set(C2, W2);
|
|
350
|
-
}, [W2]), s(() => () => {
|
|
351
|
-
ct.delete(C2), F2(0);
|
|
352
|
-
}, []), s(() => {
|
|
353
|
-
x2 && !B2 && (y2(true), w2.onChildVisible());
|
|
354
|
-
}, [x2, B2]);
|
|
355
|
-
const V2 = p((e2) => {
|
|
356
|
-
e2.which === j.Escape && (e2.preventDefault(), e2.stopPropagation(), F2(0));
|
|
357
|
-
}, []), _2 = n.useRef(null), q2 = p(() => {
|
|
358
|
-
const e2 = _2.current, t3 = M2.current;
|
|
359
|
-
e2 && t3 && (requestAnimationFrame(() => {
|
|
360
|
-
(t3.contains(document.activeElement) || document.activeElement === document.body) && e2.focus();
|
|
361
|
-
}), _2.current = null), f2?.();
|
|
362
|
-
}, []), Q2 = p((e2) => {
|
|
363
|
-
M2.current = e2;
|
|
364
|
-
e2.addEventListener("focus", (e3) => {
|
|
365
|
-
_2.current = e3.relatedTarget;
|
|
366
|
-
}, { once: true, passive: true });
|
|
367
|
-
const t3 = document.activeElement;
|
|
368
|
-
requestAnimationFrame(() => {
|
|
369
|
-
t3 === document.activeElement && e2.focus();
|
|
370
|
-
});
|
|
371
|
-
}, []), [U2, G2] = c();
|
|
372
|
-
s(() => {
|
|
373
|
-
B2 && (x2 ? h2?.() : false === x2 && f2?.()), G2(g2 ? e(at, { floatReference: W2, open: x2, label: r2, anchorEl: o2, onOpening: () => {
|
|
374
|
-
h2?.(), w2.onChildVisible();
|
|
375
|
-
}, onClosing: q2, onClose: () => {
|
|
376
|
-
y2(false), w2.onChildHidden();
|
|
377
|
-
}, onMount: Q2, propsPopper: { onKeyDown: V2, onMouseEnter: (e2) => {
|
|
378
|
-
x2 && dt?.isClose && dt.setReferences.has(W2) && (dt.fn.clear(), dt = null, W2.closeChild());
|
|
379
|
-
}, ...u2 }, createPopupPanel: N2 }) : null);
|
|
380
|
-
}, [g2, x2, r2, B2, u2, N2, O2]);
|
|
381
|
-
const X2 = K((e2) => {
|
|
382
|
-
if (0 === lt.size) return;
|
|
383
|
-
let t3 = false;
|
|
384
|
-
lt.forEach((o3) => {
|
|
385
|
-
const n2 = ct.get(o3);
|
|
386
|
-
if (t3) return;
|
|
387
|
-
if (!n2) return;
|
|
388
|
-
const r3 = n2.floatElement();
|
|
389
|
-
r3?.contains?.(e2.target) && (t3 = true);
|
|
390
|
-
const i3 = n2.anchorElement();
|
|
391
|
-
i3?.contains?.(e2.target) && (t3 = true);
|
|
392
|
-
}), t3 || z2();
|
|
393
|
-
}, [z2]);
|
|
394
|
-
return s(() => {
|
|
395
|
-
if (!x2 || !w2.isRoot) return;
|
|
396
|
-
const e2 = (e3) => {
|
|
397
|
-
X2(e3);
|
|
398
|
-
};
|
|
399
|
-
return document.addEventListener("mousedown", e2), document.addEventListener("touchstart", e2), document.addEventListener("focus", e2), () => {
|
|
400
|
-
document.removeEventListener("mousedown", e2), document.removeEventListener("touchstart", e2), document.removeEventListener("focus", e2);
|
|
401
|
-
};
|
|
402
|
-
}, [x2, w2]), { component: U2, reference: W2 };
|
|
403
|
-
}, ft = r(i((o2, n2) => {
|
|
404
|
-
const { nestedChildren: r2, variant: i2, disabled: a2 = false, createPopupPanel: l2, ...s2 } = o2, c2 = { disabled: a2, createPopupPanel: K((o3) => {
|
|
405
|
-
if (!r2 || 0 === r2.length) return null;
|
|
406
|
-
const { popupContainer: i3, floatReference: a3, ref: l3, ...s3 } = o3, c3 = [];
|
|
407
|
-
for (let t2 = 0; t2 < r2.length; t2++) {
|
|
408
|
-
const o4 = r2[t2];
|
|
409
|
-
o4 && c3.push(e(ft, { parentFloat: a3, ...s3, ...o4 }, t2));
|
|
410
|
-
}
|
|
411
|
-
return t(v, { ref: n2, sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: ["Children here", c3, e(Dt, { parentFloat: a3, children: "Close other children" })] });
|
|
412
|
-
}, [r2]), ...s2 };
|
|
413
|
-
return e(i2 === nt.Toolbar ? Tt : $t, { ...c2 });
|
|
414
|
-
})), xt = { placement: "right-start" }, bt = r(i((e2, r2) => {
|
|
415
|
-
const { children: i2, sx: l2, parentFloat: c2, createPopupPanel: d2, propsPopper: p2 = xt, label: u2, ...m2 } = e2;
|
|
416
|
-
ae(n.isValidElement(i2), "Must supply a child component to enable a context menu.");
|
|
417
|
-
const h2 = i2, f2 = a(() => ({ ...h2?.props, ...m2, onContextMenu: (e3) => {
|
|
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] = n.useState(null), { reference: y2, component: v2 } = ht({ label: u2 ?? "contextMenu", propsPopper: p2, parentFloat: c2, anchor: { getBoundingClientRect: () => new DOMRect(b2?.clientX || 0, b2?.clientY || 0) }, onClose: () => g2(null), createPopupPanel: x2 });
|
|
420
|
-
return s(() => {
|
|
421
|
-
b2 ? y2.open(0) : y2.close(0);
|
|
422
|
-
}, [b2]), t(o, { children: [n.cloneElement(i2, f2), v2] });
|
|
423
|
-
})), gt = i((t2, o2) => {
|
|
424
|
-
const { slotProps: n2, ...r2 } = t2, { getPortalContainer: i2 } = V();
|
|
425
|
-
return e(R, { ref: o2, slotProps: { ...n2, popper: { container: i2, ...n2?.popper || {} } }, ...r2 });
|
|
1241
|
+
yt.displayName = "ExhibitFloatPanel";
|
|
1242
|
+
var vt = (e) => M(yt, { ...e }), kt = (e) => M(J, {
|
|
1243
|
+
renderFloatPanel: vt,
|
|
1244
|
+
createPopupPanel: xt,
|
|
1245
|
+
...e
|
|
1246
|
+
}), wt = B(D((e, r) => {
|
|
1247
|
+
const { nestedChildren: o, variant: n, disabled: i, createPopupPanel: a, ...l } = e, s = {
|
|
1248
|
+
disabled: i,
|
|
1249
|
+
createPopupPanel: le((e) => {
|
|
1250
|
+
if (!o || 0 === o.length) return M(C, {});
|
|
1251
|
+
const { popupContainer: n, floatReference: i, ref: a, ...l } = e, s = [];
|
|
1252
|
+
for (let e = 0; e < o.length; e++) {
|
|
1253
|
+
const t = o[e];
|
|
1254
|
+
t && s.push(M(wt, {
|
|
1255
|
+
...l,
|
|
1256
|
+
...t
|
|
1257
|
+
}, e));
|
|
1258
|
+
}
|
|
1259
|
+
return S(t, {
|
|
1260
|
+
ref: r,
|
|
1261
|
+
sx: {
|
|
1262
|
+
display: "flex",
|
|
1263
|
+
flexDirection: "column",
|
|
1264
|
+
paddingTop: "4px",
|
|
1265
|
+
paddingBottom: "4px"
|
|
1266
|
+
},
|
|
1267
|
+
children: [
|
|
1268
|
+
"Children here",
|
|
1269
|
+
s,
|
|
1270
|
+
M(Nt, { children: "Close other children" })
|
|
1271
|
+
]
|
|
1272
|
+
});
|
|
1273
|
+
}, [o]),
|
|
1274
|
+
...l
|
|
1275
|
+
};
|
|
1276
|
+
return M(n === gt.Toolbar ? Ot : Kt, { ...s });
|
|
1277
|
+
})), Ct = { placement: "right-start" }, Mt = B(D((e, t) => {
|
|
1278
|
+
const { children: r, sx: o, parentFloat: n, createPopupPanel: i, propsPopper: a = Ct, label: l, ...s } = e;
|
|
1279
|
+
ve($(r), "Must supply a child component to enable a context menu.");
|
|
1280
|
+
const c = r, d = E(() => ({
|
|
1281
|
+
...c?.props,
|
|
1282
|
+
...s,
|
|
1283
|
+
onContextMenu: (e) => {
|
|
1284
|
+
c?.props?.onContextMenu?.(e), e.isDefaultPrevented() || (s?.onContextMenu?.(e), e.isDefaultPrevented() || (m(e), e.preventDefault()));
|
|
1285
|
+
}
|
|
1286
|
+
}), [s, c?.props]), p = le(i ?? (() => {}), [i]), [u, m] = A(null), { reference: h, component: f } = pe({
|
|
1287
|
+
label: l ?? "contextMenu",
|
|
1288
|
+
propsPopper: a,
|
|
1289
|
+
parentFloat: n,
|
|
1290
|
+
anchor: { getBoundingClientRect: () => new DOMRect(u?.clientX || 0, u?.clientY || 0) },
|
|
1291
|
+
onClose: () => m(null),
|
|
1292
|
+
createPopupPanel: p
|
|
1293
|
+
});
|
|
1294
|
+
return N(() => {
|
|
1295
|
+
u ? h.open(0) : h.close(0);
|
|
1296
|
+
}, [u]), S(C, { children: [R(r, d), f] });
|
|
1297
|
+
})), St = D((e, t) => {
|
|
1298
|
+
const { slotProps: r, ...o } = e, { getPortalContainer: n, isFullscreen: i } = me();
|
|
1299
|
+
return M(x, {
|
|
1300
|
+
ref: t,
|
|
1301
|
+
slotProps: {
|
|
1302
|
+
...r,
|
|
1303
|
+
popper: {
|
|
1304
|
+
container: i ? n : void 0,
|
|
1305
|
+
...r?.popper || {}
|
|
1306
|
+
}
|
|
1307
|
+
},
|
|
1308
|
+
...o
|
|
1309
|
+
});
|
|
426
1310
|
});
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
1311
|
+
St.displayName = "SimpleTooltip";
|
|
1312
|
+
var Tt = B((e) => {
|
|
1313
|
+
const { modifier: r, sx: o, ...n } = e;
|
|
1314
|
+
return M(t, {
|
|
1315
|
+
sx: {
|
|
1316
|
+
marginLeft: "1px",
|
|
1317
|
+
marginRight: "1px",
|
|
1318
|
+
borderRadius: "4px",
|
|
1319
|
+
borderStyle: "solid",
|
|
1320
|
+
borderTopWidth: "1px",
|
|
1321
|
+
borderLeftWidth: "1px",
|
|
1322
|
+
borderRightWidth: "1px",
|
|
1323
|
+
borderBottomWidth: "2px",
|
|
1324
|
+
borderTopColor: (e) => H(e.palette.background.paper, e.palette.action.disabledOpacity),
|
|
1325
|
+
borderLeftColor: (e) => H(e.palette.background.paper, e.palette.action.disabledOpacity),
|
|
1326
|
+
borderRightColor: (e) => H(e.palette.background.paper, e.palette.action.disabledOpacity),
|
|
1327
|
+
borderBottomColor: (e) => H(e.palette.background.paper, 1 - e.palette.action.disabledOpacity),
|
|
1328
|
+
backgroundColor: (e) => H(e.palette.action.hover, e.palette.action.disabledOpacity),
|
|
1329
|
+
paddingLeft: "4px",
|
|
1330
|
+
paddingRight: "4px",
|
|
1331
|
+
minHeight: "1.6em",
|
|
1332
|
+
display: "flex",
|
|
1333
|
+
justifyContent: "center",
|
|
1334
|
+
alignItems: "center",
|
|
1335
|
+
boxSizing: "content-box",
|
|
1336
|
+
overflow: "hidden",
|
|
1337
|
+
...o
|
|
1338
|
+
},
|
|
1339
|
+
...n,
|
|
1340
|
+
children: M(t, {
|
|
1341
|
+
sx: {
|
|
1342
|
+
display: "flex",
|
|
1343
|
+
alignItems: "center",
|
|
1344
|
+
justifyContent: "center",
|
|
1345
|
+
textAlign: "center",
|
|
1346
|
+
"& *": { fontWeight: "500" }
|
|
1347
|
+
},
|
|
1348
|
+
children: r
|
|
1349
|
+
})
|
|
1350
|
+
});
|
|
1351
|
+
}), Pt = (e, r, o = !1, n = null) => {
|
|
1352
|
+
if (Array.isArray(e)) {
|
|
1353
|
+
let i = [], a = e;
|
|
1354
|
+
for (let e = 0; e < a.length; e++) i.push(Pt(a[e], r, o, n ?? "" + e));
|
|
1355
|
+
return M(t, {
|
|
1356
|
+
sx: {
|
|
1357
|
+
display: "flex",
|
|
1358
|
+
alignItems: "center",
|
|
1359
|
+
flexDirection: "column"
|
|
1360
|
+
},
|
|
1361
|
+
children: i
|
|
1362
|
+
}, n);
|
|
1363
|
+
}
|
|
1364
|
+
if (!e?.key) return null;
|
|
1365
|
+
const i = {};
|
|
1366
|
+
for (let t = 0; e.modifiers && t < e.modifiers.length; t++) i[e.modifiers[t]] = !0;
|
|
1367
|
+
const a = [], l = j.getPlatform() === j.OSType.MacOS || j.getPlatform() === j.OSType.IOS ? r("shortcut.modifier.cmd") : r("shortcut.modifier.ctrl");
|
|
1368
|
+
return i?.[te.Ctrl] && (a.push(M(Tt, { modifier: o ? "^" : M("div", {
|
|
1369
|
+
style: { paddingRight: "1px" },
|
|
1370
|
+
children: l
|
|
1371
|
+
}) }, "ctrl")), a.push("+")), i?.[te.Alt] && (a.push(M(Tt, { modifier: o ? "⌥" : r("shortcut.modifier.alt") }, "alt")), a.push("+")), i?.[te.Shift] && (a.push(M(Tt, { modifier: o ? "⇧" : M("div", {
|
|
1372
|
+
style: { paddingRight: "1px" },
|
|
1373
|
+
children: r("shortcut.modifier.shift")
|
|
1374
|
+
}) }, "shift")), a.push("+")), i?.[te.Meta] && (a.push(M(Tt, { modifier: o ? M("div", {
|
|
1375
|
+
style: { paddingTop: "1px" },
|
|
1376
|
+
children: "⌘"
|
|
1377
|
+
}) : r("shortcut.modifier.meta") }, "meta")), a.push("+")), a.push(M(Tt, { modifier: re.toPrettyKeyCode(e.key) }, "character")), M(t, {
|
|
1378
|
+
sx: {
|
|
1379
|
+
display: "flex",
|
|
1380
|
+
alignItems: "center"
|
|
1381
|
+
},
|
|
1382
|
+
children: a
|
|
1383
|
+
}, n);
|
|
1384
|
+
}, Rt = B(D((e, r) => {
|
|
1385
|
+
const { disabled: o = !1, label: n, shortcut: i, chips: a, description: l, maxWidth: s = 280, useModifierSymbols: c = !1, children: d, simple: p, componentDisabled: u = !1, sx: m, ...h } = e, f = fe();
|
|
1386
|
+
let g = null;
|
|
1387
|
+
i && (g = Pt(i, f, c));
|
|
1388
|
+
const [x, y] = A(null);
|
|
1389
|
+
N(() => {
|
|
1390
|
+
Promise.resolve(n).then((e) => {
|
|
1391
|
+
y(e);
|
|
1392
|
+
});
|
|
1393
|
+
}, [n]);
|
|
1394
|
+
return M(St, {
|
|
1395
|
+
slotProps: { popper: {
|
|
1396
|
+
sx: {
|
|
1397
|
+
"& .MuiTooltip-tooltip": { marginTop: "0px !important" },
|
|
1398
|
+
...m
|
|
1399
|
+
},
|
|
1400
|
+
modifiers: [{
|
|
1401
|
+
name: "offset",
|
|
1402
|
+
options: { offset: [0, 14] }
|
|
1403
|
+
}]
|
|
1404
|
+
} },
|
|
1405
|
+
className: "tooltip-wrapper",
|
|
1406
|
+
tabIndex: -1,
|
|
1407
|
+
title: !o && x ? S(t, {
|
|
1408
|
+
sx: { maxWidth: `${s}px` },
|
|
1409
|
+
ref: r,
|
|
1410
|
+
children: [S(t, {
|
|
1411
|
+
sx: {
|
|
1412
|
+
display: "flex",
|
|
1413
|
+
flexDirection: "row",
|
|
1414
|
+
marginBottom: l ? "4px" : "0px"
|
|
1415
|
+
},
|
|
1416
|
+
children: [
|
|
1417
|
+
M(b, {
|
|
1418
|
+
variant: "subtitle1",
|
|
1419
|
+
component: "div",
|
|
1420
|
+
sx: { flex: "1 1 100%" },
|
|
1421
|
+
children: x
|
|
1422
|
+
}),
|
|
1423
|
+
a ? M(Je, { chips: a }) : null,
|
|
1424
|
+
g ? M(t, { sx: { marginLeft: "8px" } }, "leadingSpace") : M(C, {}),
|
|
1425
|
+
g
|
|
1426
|
+
]
|
|
1427
|
+
}), l ? M(b, {
|
|
1428
|
+
variant: "caption",
|
|
1429
|
+
sx: {
|
|
1430
|
+
whiteSpace: "pre-line",
|
|
1431
|
+
lineHeight: "1.4"
|
|
1432
|
+
},
|
|
1433
|
+
children: l
|
|
1434
|
+
}) : M(C, {})]
|
|
1435
|
+
}) : "",
|
|
1436
|
+
enterDelay: 260,
|
|
1437
|
+
enterNextDelay: 130,
|
|
1438
|
+
leaveDelay: 230,
|
|
1439
|
+
disableInteractive: !0,
|
|
1440
|
+
...h,
|
|
1441
|
+
children: M("div", {
|
|
1442
|
+
style: {
|
|
1443
|
+
display: "flex",
|
|
1444
|
+
alignItems: "stretch",
|
|
1445
|
+
justifyContent: "stretch"
|
|
1446
|
+
},
|
|
1447
|
+
children: d
|
|
1448
|
+
})
|
|
1449
|
+
});
|
|
1450
|
+
})), Dt = M(Y, {}), $t = M(Y, { iconKey: "Check" }), It = B(D((e, r) => {
|
|
1451
|
+
const { dense: o = !0, outlined: n = !1, disableHover: i = !1, selected: a, icon: l, propsTooltip: s, children: c, primary: p, sx: u, disabled: m, className: h, onFocus: f, onBlur: g, ...x } = e, [b, y] = A(!1), v = {
|
|
1452
|
+
marginRight: "0px",
|
|
1453
|
+
padding: o ? "2px" : "7px",
|
|
1454
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
1455
|
+
color: (e) => p ? void 0 : e.palette.text.icon ?? e.palette.action.active,
|
|
1456
|
+
border: (e) => `solid ${n ? e.palette.divider : "transparent"} 1px`,
|
|
1457
|
+
"& .MuiTouchRipple-child": { borderRadius: (e) => `${e.shape.borderRadius}px !important` },
|
|
1458
|
+
"&.Mui-selected": {
|
|
1459
|
+
backgroundColor: (e) => H(e.palette.text.primary, e.palette.action.selectedOpacity),
|
|
1460
|
+
border: (e) => `solid ${n ? e.palette.text?.primary : e.palette.divider} 1px`
|
|
1461
|
+
},
|
|
1462
|
+
"&.Mui-disabled": { border: (e) => `solid ${n ? e.palette.divider : "transparent"} 1px` },
|
|
1463
|
+
"&.Mui-disabled > .icon path": {
|
|
1464
|
+
filter: "grayscale(65%)",
|
|
1465
|
+
opacity: ".8"
|
|
1466
|
+
},
|
|
1467
|
+
"&.Mui-focusVisible": {
|
|
1468
|
+
outline: "solid transparent 1px",
|
|
1469
|
+
border: "1px solid transparent"
|
|
1470
|
+
},
|
|
1471
|
+
...u
|
|
1472
|
+
}, k = {
|
|
1473
|
+
"&:hover:not(.Mui-disabled, [disabled])": {
|
|
1474
|
+
color: (e) => e.palette.text.primary,
|
|
1475
|
+
border: (e) => `solid ${n ? e.palette.text?.primary : e.palette.divider} 1px`,
|
|
1476
|
+
"&.Mui-selected": { backgroundColor: (e) => H(e.palette.text.primary, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity) },
|
|
1477
|
+
"> .outline-hover": { outline: (e) => `solid ${n ? e.palette.text?.primary : e.palette.divider} 1px` },
|
|
1478
|
+
backgroundColor: null
|
|
1479
|
+
},
|
|
1480
|
+
"&.Mui-focusVisible": {
|
|
1481
|
+
outline: (e) => `solid ${e.palette.primary.main} 1px`,
|
|
1482
|
+
border: (e) => `1px solid ${e.palette?.primary?.main}`,
|
|
1483
|
+
zIndex: 1
|
|
1484
|
+
}
|
|
1485
|
+
};
|
|
1486
|
+
let w = v;
|
|
1487
|
+
i || (w = j.mergeContentful(v, k));
|
|
1488
|
+
const C = E(() => {
|
|
1489
|
+
let e = "function" == typeof l ? l() : l;
|
|
1490
|
+
return null === e ? e : e || (void 0 === a ? Dt : $t);
|
|
1491
|
+
}, [l, a]);
|
|
1492
|
+
let T = S(d, {
|
|
1493
|
+
component: "div",
|
|
1494
|
+
ref: r,
|
|
1495
|
+
className: W({
|
|
1496
|
+
"Mui-focusVisible": b,
|
|
1497
|
+
"Mui-selected": a,
|
|
1498
|
+
"Mui-disabled": m
|
|
1499
|
+
}, h),
|
|
1500
|
+
onFocus: (e) => {
|
|
1501
|
+
y(!0), f?.(e);
|
|
1502
|
+
},
|
|
1503
|
+
onBlur: (e) => {
|
|
1504
|
+
y(!1), g?.(e);
|
|
1505
|
+
},
|
|
1506
|
+
size: "small",
|
|
1507
|
+
TouchRippleProps: { center: !1 },
|
|
1508
|
+
sx: w,
|
|
1509
|
+
edge: "end",
|
|
1510
|
+
...x,
|
|
1511
|
+
disabled: m || !1,
|
|
1512
|
+
children: [C, c]
|
|
1513
|
+
});
|
|
1514
|
+
if (s) if (s.simple && s.label && !s.disabled) {
|
|
1515
|
+
const { label: e, description: r, maxWidth: o, shortcut: n, useModifierSymbols: i, componentDisabled: a, simple: l, chips: c, ref: d, ...p } = s;
|
|
1516
|
+
T = M(St, {
|
|
1517
|
+
disableInteractive: !0,
|
|
1518
|
+
title: e ?? "",
|
|
1519
|
+
...p,
|
|
1520
|
+
children: M(t, {
|
|
1521
|
+
sx: { display: "flex" },
|
|
1522
|
+
children: T
|
|
1523
|
+
})
|
|
1524
|
+
});
|
|
1525
|
+
} else T = M(Rt, {
|
|
1526
|
+
children: T,
|
|
1527
|
+
...s
|
|
1528
|
+
});
|
|
1529
|
+
return T;
|
|
1530
|
+
})), Bt = M(Y, {}), zt = (e) => e.icon, Nt = B(D((e, t) => {
|
|
1531
|
+
const { icon: r = Bt, renderIcon: o = zt, className: n, onFocus: i, selected: a, onBlur: l, onMouseOver: s, onMouseOut: c, onMouseEnter: d, disabled: p, children: u, sx: f, propsTooltip: g, chips: x, primary: b, ...y } = e, v = de(), [k, w] = A(!1), [C, T] = A(!1), P = E(() => {
|
|
1532
|
+
const e = o?.({
|
|
1533
|
+
icon: r,
|
|
1534
|
+
disabled: p,
|
|
1535
|
+
selected: a
|
|
1536
|
+
});
|
|
1537
|
+
return e ? M(h, {
|
|
1538
|
+
className: W({
|
|
1539
|
+
"Mui-focusVisible": k,
|
|
1540
|
+
"Mui-hovered": C
|
|
1541
|
+
}),
|
|
1542
|
+
sx: {
|
|
1543
|
+
"& .MuiSvgIcon-root": { color: (e) => b ? void 0 : e.palette.text.icon ?? e.palette.action.active },
|
|
1544
|
+
"&.Mui-hovered:not(.Mui-disabled, [disabled])": { "& .MuiSvgIcon-root": { color: (e) => e.palette.text.primary } }
|
|
1545
|
+
},
|
|
1546
|
+
children: e
|
|
1547
|
+
}) : null;
|
|
1548
|
+
}, [
|
|
1549
|
+
o,
|
|
1550
|
+
p,
|
|
1551
|
+
r,
|
|
1552
|
+
k,
|
|
1553
|
+
C,
|
|
1554
|
+
b,
|
|
1555
|
+
a
|
|
1556
|
+
]);
|
|
1557
|
+
let R = S(m, {
|
|
1558
|
+
ref: t,
|
|
1559
|
+
role: "menuitem",
|
|
1560
|
+
disabled: p,
|
|
1561
|
+
onMouseOver: (e) => {
|
|
1562
|
+
s?.(e), e.isDefaultPrevented() || T(!0);
|
|
1563
|
+
},
|
|
1564
|
+
onMouseOut: (e) => {
|
|
1565
|
+
c?.(e), e.isDefaultPrevented() || T(!1);
|
|
1566
|
+
},
|
|
1567
|
+
onMouseEnter: (e) => {
|
|
1568
|
+
d?.(e), e.isDefaultPrevented() || v?.closeChild();
|
|
1569
|
+
},
|
|
1570
|
+
TouchRippleProps: { center: !1 },
|
|
1571
|
+
className: W({
|
|
1572
|
+
"Mui-focusVisible": k,
|
|
1573
|
+
"Mui-hovered": C
|
|
1574
|
+
}, n),
|
|
1575
|
+
onFocus: (e) => {
|
|
1576
|
+
i?.(e), w(!0);
|
|
1577
|
+
},
|
|
1578
|
+
onBlur: (e) => {
|
|
1579
|
+
l?.(e), w(!1);
|
|
1580
|
+
},
|
|
1581
|
+
sx: {
|
|
1582
|
+
flex: "1 1 100%",
|
|
1583
|
+
fontFamily: (e) => e.typography.fontFamily,
|
|
1584
|
+
fontWeight: 400,
|
|
1585
|
+
lineHeight: 1.5,
|
|
1586
|
+
paddingTop: "2px",
|
|
1587
|
+
paddingBottom: "2px",
|
|
1588
|
+
marginLeft: "4px",
|
|
1589
|
+
marginRight: "4px",
|
|
1590
|
+
paddingLeft: "6px",
|
|
1591
|
+
paddingRight: "18px",
|
|
1592
|
+
borderRadius: "4px",
|
|
1593
|
+
fontSize: "0.875em",
|
|
1594
|
+
"@media (pointer: coarse)": { fontSize: "1em" },
|
|
1595
|
+
"&.Mui-disabled > .icon path": { filter: "grayscale(65%)" },
|
|
1596
|
+
"&.Mui-selected": { color: (e) => e.palette.text.primary },
|
|
1597
|
+
color: (e) => e.palette.text.secondary,
|
|
1598
|
+
"&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (e) => e.palette.text.primary },
|
|
1599
|
+
...f
|
|
1600
|
+
},
|
|
1601
|
+
...y,
|
|
1602
|
+
children: [
|
|
1603
|
+
P,
|
|
1604
|
+
u,
|
|
1605
|
+
x ? M(Je, { chips: x }) : null
|
|
1606
|
+
]
|
|
1607
|
+
});
|
|
1608
|
+
return g && (R = M(Rt, {
|
|
1609
|
+
children: R,
|
|
1610
|
+
placement: "right-start",
|
|
1611
|
+
...g
|
|
1612
|
+
})), R;
|
|
1613
|
+
})), Lt = B(D((e, t) => {
|
|
1614
|
+
const { children: r, sx: o, primary: n = !1, variant: i = "subtitle1", ...a } = e;
|
|
1615
|
+
return M(C, { children: M(b, {
|
|
1616
|
+
ref: t,
|
|
1617
|
+
variant: i,
|
|
1618
|
+
component: "div",
|
|
1619
|
+
sx: {
|
|
1620
|
+
userSelect: "none",
|
|
1621
|
+
fontWeight: "500",
|
|
1622
|
+
paddingLeft: "8px",
|
|
1623
|
+
paddingTop: "subtitle1" === i ? "2px" : void 0,
|
|
1624
|
+
paddingBottom: "subtitle1" === i ? "2px" : void 0,
|
|
1625
|
+
color: (e) => n ? void 0 : e.palette.text.secondary,
|
|
1626
|
+
...o
|
|
1627
|
+
},
|
|
1628
|
+
...a,
|
|
1629
|
+
children: r
|
|
1630
|
+
}) });
|
|
1631
|
+
})), Ot = B(D((e, r) => {
|
|
1632
|
+
const { dense: o = !0, outlined: n = !1, label: i, showLabel: a = !1, selected: l = !1, onQuickClick: s, parentFloat: c, createPopupPanel: p, propsPopup: u, onPopupOpen: m, onPopupClose: h, propsQuickButton: f, renderQuickButton: g, tooltip: x = "", createTooltip: b, icon: y, disabled: v, propsButton: w = j.EmptyObject, disableHover: T, ripple: P, primary: R, children: D, sx: $, className: I, ...B } = e, z = k(), N = E(() => {
|
|
1633
|
+
const e = (e, t, r, o = r) => {
|
|
1634
|
+
const i = "boolean" == typeof n ? null : n[e];
|
|
1635
|
+
return "function" == typeof i ? i(t) : i || (n ? r : o);
|
|
1636
|
+
};
|
|
1637
|
+
return {
|
|
1638
|
+
outline: {
|
|
1639
|
+
color: (t) => e("color", t, t.palette.divider, "transparent"),
|
|
1640
|
+
hoverColor: (t) => e("hoverColor", t, t.palette.text?.primary, t.palette.divider),
|
|
1641
|
+
focusColor: (t) => e("focusColor", t, t.palette?.primary?.main)
|
|
1642
|
+
},
|
|
1643
|
+
active: "dark" === z.palette.mode ? z.palette.text.secondary : z.palette.text.primary,
|
|
1644
|
+
text: z.palette.text.icon ?? z.palette.action.active
|
|
1645
|
+
};
|
|
1646
|
+
}, [n, z]), [L, O] = A(!1), [F, V] = A(!1), [q, Q] = A(!1), U = K(null), G = K(null), X = pe({
|
|
1647
|
+
anchor: U.current,
|
|
1648
|
+
label: i,
|
|
1649
|
+
createPopupPanel: p,
|
|
1650
|
+
parentFloat: c,
|
|
1651
|
+
propsPopper: u?.propsPopper,
|
|
1652
|
+
onClose: () => {
|
|
1653
|
+
O(!1), h?.();
|
|
1654
|
+
},
|
|
1655
|
+
onOpen: () => {
|
|
1656
|
+
O(!0), m?.();
|
|
1657
|
+
}
|
|
1658
|
+
}), Y = le((e) => {
|
|
1659
|
+
s?.(e), X.reference.close(0);
|
|
1660
|
+
}, [s, X]), _ = le(() => {
|
|
1661
|
+
L ? X.reference.close(0) : X.reference.open(0);
|
|
1662
|
+
}, [
|
|
1663
|
+
L,
|
|
1664
|
+
X,
|
|
1665
|
+
c,
|
|
1666
|
+
i
|
|
1667
|
+
]), J = E(() => {
|
|
1668
|
+
const e = {
|
|
1669
|
+
"&.bordered": {
|
|
1670
|
+
borderWidth: "1px",
|
|
1671
|
+
borderRadius: "0px",
|
|
1672
|
+
borderTopStyle: "solid",
|
|
1673
|
+
borderBottomStyle: "solid",
|
|
1674
|
+
borderColor: (e) => N.outline.color(e),
|
|
1675
|
+
"&.Mui-focusVisible": { border: (e) => `1px solid ${N.outline.focusColor(e)} !important` },
|
|
1676
|
+
"&:hover:not(.Mui-disabled, [disabled])": {
|
|
1677
|
+
borderColor: () => T ? "transparent" : void 0,
|
|
1678
|
+
backgroundColor: () => T ? "transparent" : void 0
|
|
1679
|
+
},
|
|
1680
|
+
"&.Mui-hovered:not(.Mui-disabled, [disabled])": { borderColor: (e) => N.outline.hoverColor(e) },
|
|
1681
|
+
"&.Mui-selected:not(.Mui-disabled, [disabled])": { borderColor: (e) => N.outline.hoverColor(e) },
|
|
1682
|
+
"&.left": {
|
|
1683
|
+
borderTopLeftRadius: (e) => `${e.shape.borderRadius}px`,
|
|
1684
|
+
borderBottomLeftRadius: (e) => `${e.shape.borderRadius}px`,
|
|
1685
|
+
borderLeftStyle: "solid"
|
|
1686
|
+
},
|
|
1687
|
+
"&.hard-right": {
|
|
1688
|
+
borderRightStyle: "solid",
|
|
1689
|
+
borderRightWidth: "1px",
|
|
1690
|
+
borderRightColor: (e) => N.outline.color(e)
|
|
1691
|
+
},
|
|
1692
|
+
"&.right": {
|
|
1693
|
+
borderTopRightRadius: (e) => `${e.shape.borderRadius}px`,
|
|
1694
|
+
borderBottomRightRadius: (e) => `${e.shape.borderRadius}px`,
|
|
1695
|
+
borderRightStyle: "solid"
|
|
1696
|
+
},
|
|
1697
|
+
"&.divider": { borderLeftWidth: "0px !important" }
|
|
1698
|
+
},
|
|
1699
|
+
"& .MuiTouchRipple-child": { borderRadius: (e) => `${e.shape.borderRadius}px !important` }
|
|
1700
|
+
}, t = { "&.Mui-selected": {
|
|
1701
|
+
backgroundColor: (e) => H(e.palette.primary.main, e.palette.action.selectedOpacity),
|
|
1702
|
+
"&:hover:not(.Mui-disabled)": {
|
|
1703
|
+
backgroundColor: (e) => H(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
|
|
1704
|
+
"@media (hover: none)": { backgroundColor: (e) => H(e.palette.primary.main, e.palette.action.selectedOpacity) }
|
|
1705
|
+
}
|
|
1706
|
+
} }, r = {
|
|
1707
|
+
maxHeight: "100%",
|
|
1708
|
+
"&.Mui-selected": {
|
|
1709
|
+
backgroundColor: (e) => H(e.palette.text.icon ?? e.palette.action.active, e.palette.action.selectedOpacity),
|
|
1710
|
+
"&:hover:not(.Mui-disabled)": {
|
|
1711
|
+
backgroundColor: (e) => H(e.palette.text.icon ?? e.palette.action.active, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
|
|
1712
|
+
"@media (hover: none)": { backgroundColor: (e) => H(e.palette.text.icon ?? e.palette.action.active, e.palette.action.selectedOpacity) }
|
|
1713
|
+
}
|
|
1714
|
+
},
|
|
1715
|
+
"&:hover:not(.Mui-disabled, [disabled])": { color: (e) => e.palette.text.primary },
|
|
1716
|
+
backgroundColor: () => T ? "transparent" : void 0,
|
|
1717
|
+
color: (e) => e.palette.text.icon,
|
|
1718
|
+
"&.Mui-disabled > .icon path": {
|
|
1719
|
+
filter: "grayscale(65%)",
|
|
1720
|
+
opacity: ".8"
|
|
1721
|
+
},
|
|
1722
|
+
padding: () => o ? "2px 3px" : "7px",
|
|
1723
|
+
marginRight: "0"
|
|
1724
|
+
}, n = j.mergeContentful(r, e), i = j.mergeContentful(n, t), a = j.mergeContentful(r, e);
|
|
1725
|
+
return {
|
|
1726
|
+
quickButtonStyling: n,
|
|
1727
|
+
openQuickButtonStyling: i,
|
|
1728
|
+
compoundStyling: a,
|
|
1729
|
+
openCompoundStyling: j.mergeContentful(a, t)
|
|
1730
|
+
};
|
|
1731
|
+
}, [N, T]), Z = le((e) => {
|
|
1732
|
+
const { children: t, ref: r, ...o } = e;
|
|
1733
|
+
return M(St, {
|
|
1734
|
+
ref: r,
|
|
1735
|
+
...o,
|
|
1736
|
+
disableInteractive: !0,
|
|
1737
|
+
children: t
|
|
1738
|
+
});
|
|
1739
|
+
}, []), te = s || g, re = te && (f?.tooltip || f?.createTooltip), oe = (e) => {
|
|
1740
|
+
const { tooltip: t, createTooltip: r, sx: o, ...n } = e;
|
|
1741
|
+
let i = M(d, {
|
|
1742
|
+
sx: { ...o },
|
|
1743
|
+
component: "div",
|
|
1744
|
+
...n
|
|
1745
|
+
});
|
|
1746
|
+
return re ? (i = (r ?? Z)({
|
|
1747
|
+
title: L ? "" : t ?? x,
|
|
1748
|
+
children: M("div", { children: i })
|
|
1749
|
+
}, L), i) : i;
|
|
1750
|
+
}, ne = { onKeyDown: (e) => {
|
|
1751
|
+
e.keyCode === ee.Space ? _() : e.keyCode === ee.F4 || e.keyCode === ee.Down ? X.reference.open(0) : e.keyCode === ee.Up && X.reference.close(0);
|
|
1752
|
+
} };
|
|
1753
|
+
let ie = M(C, {});
|
|
1754
|
+
const ae = E(() => $e(("function" == typeof y ? y() : y) ?? (te ? Et : null), a ? i : null), [
|
|
1755
|
+
y,
|
|
1756
|
+
i,
|
|
1757
|
+
a,
|
|
1758
|
+
te
|
|
1759
|
+
]);
|
|
1760
|
+
if (te) {
|
|
1761
|
+
let e = L ? J.openQuickButtonStyling : J.quickButtonStyling;
|
|
1762
|
+
const t = (g || oe)({
|
|
1763
|
+
tabIndex: -1,
|
|
1764
|
+
disabled: v,
|
|
1765
|
+
size: "small",
|
|
1766
|
+
edge: "end",
|
|
1767
|
+
onMouseEnter: () => {
|
|
1768
|
+
X.reference.parent?.closeChild();
|
|
1769
|
+
},
|
|
1770
|
+
onMouseDown: (e) => {
|
|
1771
|
+
0 === e.button && (e.preventDefault(), Y(e));
|
|
1772
|
+
},
|
|
1773
|
+
disableRipple: !!P,
|
|
1774
|
+
children: S(C, { children: [ae, P] }),
|
|
1775
|
+
...f,
|
|
1776
|
+
className: W({
|
|
1777
|
+
"Mui-focusVisible": F || L,
|
|
1778
|
+
"Mui-selected": l,
|
|
1779
|
+
"Mui-hovered": q || L,
|
|
1780
|
+
"Mui-disabled": v,
|
|
1781
|
+
bordered: !0,
|
|
1782
|
+
left: !0,
|
|
1783
|
+
"hard-right": !0
|
|
1784
|
+
}, f?.className),
|
|
1785
|
+
sx: {
|
|
1786
|
+
...J.quickButtonStyling,
|
|
1787
|
+
height: "100%",
|
|
1788
|
+
...f?.sx
|
|
1789
|
+
}
|
|
1790
|
+
});
|
|
1791
|
+
let r = bt(!0, o, L);
|
|
1792
|
+
re && (r = (b ?? Z)({
|
|
1793
|
+
title: L ? "" : x,
|
|
1794
|
+
children: r
|
|
1795
|
+
}, L)), ie = S(C, { children: [t, M(d, {
|
|
1796
|
+
ref: G,
|
|
1797
|
+
component: "div",
|
|
1798
|
+
className: W({
|
|
1799
|
+
"Mui-selected": L,
|
|
1800
|
+
"Mui-hovered": q || L,
|
|
1801
|
+
"Mui-disabled": v,
|
|
1802
|
+
"Mui-focusVisible": F || L,
|
|
1803
|
+
bordered: !0,
|
|
1804
|
+
right: !0,
|
|
1805
|
+
divider: !0
|
|
1806
|
+
}),
|
|
1807
|
+
sx: {
|
|
1808
|
+
paddingLeft: (o ? 0 : 2) + "px",
|
|
1809
|
+
paddingRight: (o ? 0 : 2) + "px",
|
|
1810
|
+
width: () => "calc(var(--icon-size, 1.25em) * 0.8)",
|
|
1811
|
+
...J.quickButtonStyling,
|
|
1812
|
+
...e
|
|
1813
|
+
},
|
|
1814
|
+
TouchRippleProps: { center: !1 },
|
|
1815
|
+
tabIndex: -1,
|
|
1816
|
+
disabled: v,
|
|
1817
|
+
size: "small",
|
|
1818
|
+
edge: "end",
|
|
1819
|
+
onMouseDown: (e) => {
|
|
1820
|
+
0 === e.button && (e.preventDefault(), _());
|
|
1821
|
+
},
|
|
1822
|
+
children: r
|
|
1823
|
+
})] });
|
|
1824
|
+
} else {
|
|
1825
|
+
let e = L ? J.openCompoundStyling : J.compoundStyling;
|
|
1826
|
+
ie = M(It, {
|
|
1827
|
+
ref: G,
|
|
1828
|
+
tabIndex: -1,
|
|
1829
|
+
disabled: v,
|
|
1830
|
+
size: "small",
|
|
1831
|
+
icon: ae,
|
|
1832
|
+
className: W({
|
|
1833
|
+
"Mui-selected": L || l,
|
|
1834
|
+
"Mui-hovered": q,
|
|
1835
|
+
"Mui-disabled": v,
|
|
1836
|
+
"Mui-focusVisible": F || L,
|
|
1837
|
+
bordered: !0,
|
|
1838
|
+
left: !0,
|
|
1839
|
+
right: !0
|
|
1840
|
+
}),
|
|
1841
|
+
sx: {
|
|
1842
|
+
...J.quickButtonStyling,
|
|
1843
|
+
...e
|
|
1844
|
+
},
|
|
1845
|
+
onMouseDown: (e) => {
|
|
1846
|
+
0 === e.button && (e.preventDefault(), _());
|
|
1847
|
+
},
|
|
1848
|
+
children: bt(!1, o, L)
|
|
1849
|
+
});
|
|
1850
|
+
}
|
|
1851
|
+
const { className: se, sx: ce, ...de } = w;
|
|
1852
|
+
let ue = M(t, {
|
|
1853
|
+
onFocus: () => V(!0),
|
|
1854
|
+
onBlur: () => V(!1),
|
|
1855
|
+
onMouseOver: () => Q(!0),
|
|
1856
|
+
onMouseOut: () => Q(!1),
|
|
1857
|
+
...ne,
|
|
1858
|
+
"aria-label": "split button",
|
|
1859
|
+
ref: U,
|
|
1860
|
+
tabIndex: v ? void 0 : 0,
|
|
1861
|
+
className: W(se, "split-button-root", {
|
|
1862
|
+
"Mui-focusVisible": F || L,
|
|
1863
|
+
"Mui-selected": L || l,
|
|
1864
|
+
"Mui-hovered": q,
|
|
1865
|
+
"Mui-disabled": v
|
|
1866
|
+
}),
|
|
1867
|
+
sx: {
|
|
1868
|
+
display: "flex",
|
|
1869
|
+
flex: "1 1 100%",
|
|
1870
|
+
alignItems: "stretch",
|
|
1871
|
+
width: "fit-content",
|
|
1872
|
+
"&:not(.Mui-disabled)": { cursor: "pointer" },
|
|
1873
|
+
marginLeft: n ? "1px" : "0px",
|
|
1874
|
+
marginRight: n ? "1px" : "0px",
|
|
1875
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
1876
|
+
"&.Mui-focusVisible": {
|
|
1877
|
+
outline: (e) => `solid ${e.palette.primary.main} 1px`,
|
|
1878
|
+
zIndex: 2
|
|
1879
|
+
},
|
|
1880
|
+
...ce
|
|
1881
|
+
},
|
|
1882
|
+
...de,
|
|
1883
|
+
children: ie
|
|
1884
|
+
});
|
|
1885
|
+
return re || (ue = (b ?? Z)({
|
|
1886
|
+
title: L ? "" : x,
|
|
1887
|
+
children: ue
|
|
1888
|
+
}, L)), S(t, {
|
|
1889
|
+
className: W(I, "popupIconButton"),
|
|
1890
|
+
ref: r,
|
|
1891
|
+
...B,
|
|
1892
|
+
sx: {
|
|
1893
|
+
zIndex: F || L ? 2 : void 0,
|
|
1894
|
+
display: "flex",
|
|
1895
|
+
alignItems: "center",
|
|
1896
|
+
...$
|
|
1897
|
+
},
|
|
1898
|
+
children: [ue, X.component]
|
|
1899
|
+
});
|
|
541
1900
|
}));
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
1901
|
+
Ot.displayName = "ExhibitPopupIconButton";
|
|
1902
|
+
var Et = M(Y, { iconKey: "Check" }), Ft = {}, Kt = B(D((e, r) => {
|
|
1903
|
+
const { selected: o = !1, label: n, showLabel: i, onQuickClick: a, parentFloat: l, createPopupPanel: c, propsPopup: d = Ft, onPopupOpen: p, onPopupClose: u, propsQuickButton: h, renderQuickButton: f, tooltip: g = "", createTooltip: x, icon: b, disabled: y, ripple: v, primary: k, children: w, sx: T, ...P } = e, [R, D] = A(!1), [$, I] = A(!1), [B, N] = A(!1), [L, O] = A(!1), F = K(null), H = K(null), V = E(() => {
|
|
1904
|
+
if (!d) return;
|
|
1905
|
+
const { propsPopper: e } = d;
|
|
1906
|
+
return {
|
|
1907
|
+
placement: "right-start",
|
|
1908
|
+
offsets: [-4, -2],
|
|
1909
|
+
...e
|
|
1910
|
+
};
|
|
1911
|
+
}, [d]), q = pe({
|
|
1912
|
+
anchor: F.current,
|
|
1913
|
+
label: n,
|
|
1914
|
+
createPopupPanel: c,
|
|
1915
|
+
parentFloat: l,
|
|
1916
|
+
propsPopper: V,
|
|
1917
|
+
onClose: () => {
|
|
1918
|
+
D(!1), u?.();
|
|
1919
|
+
},
|
|
1920
|
+
onOpen: () => {
|
|
1921
|
+
D(!0), p?.();
|
|
1922
|
+
}
|
|
1923
|
+
}), j = le((e) => {
|
|
1924
|
+
0 === e.button && (a?.(e), q.reference.close(0));
|
|
1925
|
+
}, [a]), Q = M(rt, {}), U = { "&.Mui-selected": {
|
|
1926
|
+
color: (e) => e.palette.text.primary,
|
|
1927
|
+
"& svg * ": { color: (e) => e.palette.text.primary }
|
|
1928
|
+
} }, G = z((e) => {
|
|
1929
|
+
const { children: t, ref: r, ...o } = e;
|
|
1930
|
+
return M(St, {
|
|
1931
|
+
ref: r,
|
|
1932
|
+
...o,
|
|
1933
|
+
disableInteractive: !0,
|
|
1934
|
+
children: t
|
|
1935
|
+
});
|
|
1936
|
+
}, []), X = a || f, Y = (e) => {
|
|
1937
|
+
const { tooltip: t, createTooltip: r, ...o } = e;
|
|
1938
|
+
return S(Nt, {
|
|
1939
|
+
icon: b,
|
|
1940
|
+
disableRipple: !!v,
|
|
1941
|
+
className: W({ "Mui-hovered": B }),
|
|
1942
|
+
sx: {
|
|
1943
|
+
flex: "1 1 100%",
|
|
1944
|
+
...U
|
|
1945
|
+
},
|
|
1946
|
+
...o,
|
|
1947
|
+
children: [n, v]
|
|
1948
|
+
});
|
|
1949
|
+
}, _ = {
|
|
1950
|
+
onFocus: () => {
|
|
1951
|
+
I(!0);
|
|
1952
|
+
},
|
|
1953
|
+
onBlur: () => I(!1),
|
|
1954
|
+
onMouseOver: () => {
|
|
1955
|
+
N(!0);
|
|
1956
|
+
},
|
|
1957
|
+
onMouseLeave: () => {
|
|
1958
|
+
N(!1);
|
|
1959
|
+
},
|
|
1960
|
+
onMouseEnter: (e) => {
|
|
1961
|
+
e.preventDefault(), q.reference.open();
|
|
1962
|
+
},
|
|
1963
|
+
onMouseDown: (e) => {
|
|
1964
|
+
0 === e.button && e.preventDefault();
|
|
1965
|
+
}
|
|
1966
|
+
};
|
|
1967
|
+
let J = M(C, {});
|
|
1968
|
+
if (X) {
|
|
1969
|
+
const e = {
|
|
1970
|
+
tabIndex: -1,
|
|
1971
|
+
disabled: y,
|
|
1972
|
+
onMouseEnter: () => {
|
|
1973
|
+
q.reference.parent?.closeChild();
|
|
1974
|
+
},
|
|
1975
|
+
onMouseDown: (e) => {
|
|
1976
|
+
0 === e.button && (e.preventDefault(), j(e));
|
|
1977
|
+
},
|
|
1978
|
+
className: W("quick-left", {}, h?.className),
|
|
1979
|
+
...h
|
|
1980
|
+
};
|
|
1981
|
+
J = S(C, { children: [
|
|
1982
|
+
(f || Y)(e),
|
|
1983
|
+
M(s, {
|
|
1984
|
+
sx: {
|
|
1985
|
+
ml: "0px",
|
|
1986
|
+
mr: "0px"
|
|
1987
|
+
},
|
|
1988
|
+
orientation: "vertical",
|
|
1989
|
+
variant: "middle",
|
|
1990
|
+
flexItem: !0
|
|
1991
|
+
}),
|
|
1992
|
+
M(m, {
|
|
1993
|
+
ref: H,
|
|
1994
|
+
className: W({
|
|
1995
|
+
"Mui-selected": R,
|
|
1996
|
+
"Mui-hovered": B
|
|
1997
|
+
}),
|
|
1998
|
+
sx: {
|
|
1999
|
+
borderTopLeftRadius: "0px",
|
|
2000
|
+
borderBottomLeftRadius: "0px",
|
|
2001
|
+
borderTopRightRadius: "4px",
|
|
2002
|
+
borderBottomRightRadius: "4px",
|
|
2003
|
+
padding: "0",
|
|
2004
|
+
paddingTop: "2px",
|
|
2005
|
+
paddingBottom: "2px",
|
|
2006
|
+
marginLeft: "0px",
|
|
2007
|
+
marginRight: "6px",
|
|
2008
|
+
color: (e) => k ? void 0 : e.palette.text.secondary,
|
|
2009
|
+
"&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (e) => e.palette.text.primary },
|
|
2010
|
+
...U
|
|
2011
|
+
},
|
|
2012
|
+
tabIndex: -1,
|
|
2013
|
+
disabled: y,
|
|
2014
|
+
..._,
|
|
2015
|
+
children: M(t, {
|
|
2016
|
+
className: "expand-icon",
|
|
2017
|
+
sx: {
|
|
2018
|
+
flex: "none",
|
|
2019
|
+
display: "flex",
|
|
2020
|
+
border: "1px solid transparent",
|
|
2021
|
+
paddingTop: "1px",
|
|
2022
|
+
paddingBottom: "1px",
|
|
2023
|
+
color: (e) => k ? void 0 : e.palette.text.icon ?? e.palette.action.active
|
|
2024
|
+
},
|
|
2025
|
+
onMouseOver: (e) => {
|
|
2026
|
+
e.preventDefault(), O(!0);
|
|
2027
|
+
},
|
|
2028
|
+
onMouseLeave: () => {
|
|
2029
|
+
O(!1);
|
|
2030
|
+
},
|
|
2031
|
+
onClick: (e) => {
|
|
2032
|
+
e.preventDefault(), R ? q.reference.close() : q.reference.open();
|
|
2033
|
+
},
|
|
2034
|
+
children: Q
|
|
2035
|
+
})
|
|
2036
|
+
})
|
|
2037
|
+
] });
|
|
2038
|
+
} else J = S(Nt, {
|
|
2039
|
+
ref: H,
|
|
2040
|
+
tabIndex: -1,
|
|
2041
|
+
disabled: y,
|
|
2042
|
+
icon: b,
|
|
2043
|
+
className: W({
|
|
2044
|
+
"Mui-selected": R || o,
|
|
2045
|
+
"Mui-hovered": B
|
|
2046
|
+
}),
|
|
2047
|
+
sx: {
|
|
2048
|
+
flex: "1 1 100%",
|
|
2049
|
+
paddingRight: "0px",
|
|
2050
|
+
...U
|
|
2051
|
+
},
|
|
2052
|
+
onClick: (e) => {
|
|
2053
|
+
e.preventDefault(), R ? q.reference.close() : q.reference.open();
|
|
2054
|
+
},
|
|
2055
|
+
..._,
|
|
2056
|
+
children: [M("div", {
|
|
2057
|
+
style: { flex: "1 1 100%" },
|
|
2058
|
+
children: n
|
|
2059
|
+
}), M(t, {
|
|
2060
|
+
className: "expand-icon",
|
|
2061
|
+
sx: {
|
|
2062
|
+
flex: "none",
|
|
2063
|
+
display: "flex",
|
|
2064
|
+
color: (e) => k ? void 0 : e.palette.text.icon ?? e.palette.action.active
|
|
2065
|
+
},
|
|
2066
|
+
children: Q
|
|
2067
|
+
})]
|
|
2068
|
+
});
|
|
2069
|
+
let Z = M(t, {
|
|
2070
|
+
"aria-label": "split button",
|
|
2071
|
+
ref: F,
|
|
2072
|
+
tabIndex: y ? void 0 : 0,
|
|
2073
|
+
className: W({
|
|
2074
|
+
"Mui-disabled": y,
|
|
2075
|
+
"Mui-selected": R,
|
|
2076
|
+
"Mui-focusVisible": $ || R,
|
|
2077
|
+
"Mui-hovered": B
|
|
2078
|
+
}),
|
|
2079
|
+
sx: {
|
|
2080
|
+
display: "flex",
|
|
2081
|
+
flex: "1 1 100%",
|
|
2082
|
+
alignItems: "center",
|
|
2083
|
+
width: "fit-content",
|
|
2084
|
+
"& .quick-left": {
|
|
2085
|
+
borderTopRightRadius: "0px",
|
|
2086
|
+
borderBottomRightRadius: "0px",
|
|
2087
|
+
marginRight: "-1px"
|
|
2088
|
+
},
|
|
2089
|
+
"&.Mui-disabled > .icon path": { filter: "grayscale(65%)" },
|
|
2090
|
+
...T
|
|
2091
|
+
},
|
|
2092
|
+
...P,
|
|
2093
|
+
children: J
|
|
2094
|
+
});
|
|
2095
|
+
return X && !L && (h?.tooltip || h?.createTooltip) && (Z = (h?.createTooltip ?? G)({
|
|
2096
|
+
title: R ? "" : Z ?? h?.tooltip,
|
|
2097
|
+
children: Z
|
|
2098
|
+
}, R)), S(t, {
|
|
2099
|
+
ref: r,
|
|
2100
|
+
sx: {
|
|
2101
|
+
zIndex: $ || R ? 2 : void 0,
|
|
2102
|
+
display: "flex",
|
|
2103
|
+
" .tooltip-wrapper": {
|
|
2104
|
+
display: "flex",
|
|
2105
|
+
flex: "1 1 100%"
|
|
2106
|
+
}
|
|
2107
|
+
},
|
|
2108
|
+
children: [Z, q.component]
|
|
2109
|
+
});
|
|
2110
|
+
})), At = B(D((e, t) => {
|
|
2111
|
+
const { onSelectToggle: r, selected: o = !1, label: n, shortcut: i, tabIndex: a = 0, preventFocus: l = !1, ...s } = e;
|
|
2112
|
+
return M(Rt, {
|
|
2113
|
+
label: n,
|
|
2114
|
+
shortcut: i,
|
|
2115
|
+
children: M(It, {
|
|
2116
|
+
ref: t,
|
|
2117
|
+
outlined: !1,
|
|
2118
|
+
tabIndex: a,
|
|
2119
|
+
selected: o,
|
|
2120
|
+
onMouseDown: (e) => {
|
|
2121
|
+
l && e.preventDefault();
|
|
2122
|
+
},
|
|
2123
|
+
onClick: () => {
|
|
2124
|
+
r?.(!o);
|
|
2125
|
+
},
|
|
2126
|
+
...s
|
|
2127
|
+
})
|
|
2128
|
+
});
|
|
2129
|
+
})), Wt = M(Y, {}), Ht = M(Y, { iconKey: "Check" }), Vt = B(D((e, r) => {
|
|
2130
|
+
const { children: o, selected: n = !0, outlined: i = !0, sx: a, ...l } = e, s = E(() => ({
|
|
2131
|
+
display: "flex",
|
|
2132
|
+
border: (e) => n ? `solid ${i ? e.palette.divider : "transparent"} 1px` : "solid transparent 1px",
|
|
2133
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
2134
|
+
backgroundColor: (e) => {
|
|
2135
|
+
if (n) return H(e.palette.text.icon ?? e.palette.action.active, e.palette.action.selectedOpacity);
|
|
2136
|
+
},
|
|
2137
|
+
...a
|
|
2138
|
+
}), [a]);
|
|
2139
|
+
let c = o;
|
|
2140
|
+
return null === c && (c = Wt), c || (c = Ht), M(t, {
|
|
2141
|
+
ref: r,
|
|
2142
|
+
sx: s,
|
|
2143
|
+
...l,
|
|
2144
|
+
children: c
|
|
2145
|
+
});
|
|
2146
|
+
})), qt = {
|
|
2147
|
+
"dialog.cancel": "Cancel",
|
|
2148
|
+
"dialog.ok": "Ok",
|
|
2149
|
+
"overflow.more": "More",
|
|
2150
|
+
"overflow.moreDescription": "More toolbar options…",
|
|
2151
|
+
"scroll.edgeBottom": " Bottom: ''Ctrl+Click'' to scroll to the end",
|
|
2152
|
+
"scroll.edgeLeft": " Left: ''Ctrl+Click'' to scroll to the beginning",
|
|
2153
|
+
"scroll.edgeRight": " Right: ''Ctrl+Click'' to scroll to the end",
|
|
2154
|
+
"scroll.edgeTop": " Top: ''Ctrl+Click'' to scroll to the beginning",
|
|
2155
|
+
"shortcut.modifier.alt": "Alt",
|
|
2156
|
+
"shortcut.modifier.cmd": "Cmd",
|
|
2157
|
+
"shortcut.modifier.ctrl": "Ctrl",
|
|
2158
|
+
"shortcut.modifier.meta": "Meta",
|
|
2159
|
+
"shortcut.modifier.shift": "Shift",
|
|
2160
|
+
"stackTrace.causedBy": "Caused by: {cause}",
|
|
2161
|
+
"stackTrace.copy": "Copy stack trace",
|
|
2162
|
+
"stackTrace.heading": "Stack Trace",
|
|
2163
|
+
"stackTrace.headingFrames": "Stack Trace ({count} frames)",
|
|
2164
|
+
"stackTrace.log": "Log error to console",
|
|
2165
|
+
"stackTrace.moreFrames": "... and {count} more frames",
|
|
2166
|
+
"window.close": "Close"
|
|
2167
|
+
}, { DefaultCommandCatalogService: jt } = U, Qt = !1;
|
|
2168
|
+
function Ut() {
|
|
2169
|
+
Qt || (Qt = !0, jt.registerFromManifest("@sheetxl/utils-mui", import.meta.url, { messages: qt }));
|
|
2170
|
+
}
|
|
2171
|
+
Ut();
|
|
2172
|
+
var Gt = B(D((e, r) => {
|
|
2173
|
+
const { children: o, sx: n, ...i } = e, a = fe(), l = he(r, () => ({}), []), [s, c] = be(), d = K(null), p = K(null), [u, m] = F((e) => e + 1, 0), [h, f] = A(null), [g, x] = A(null), [b, y] = A(null), v = K(null), k = K(/* @__PURE__ */ new Map()), w = z(() => {
|
|
2174
|
+
k.current.clear(), x(null), y(null), m();
|
|
2175
|
+
}, []);
|
|
2176
|
+
O(() => {
|
|
2177
|
+
p.current = { refs: [] };
|
|
2178
|
+
const e = [], r = T.toArray(o);
|
|
2179
|
+
let n = 0;
|
|
2180
|
+
r.forEach((o, i) => {
|
|
2181
|
+
e.push(M(t, {
|
|
2182
|
+
sx: { display: "flex" },
|
|
2183
|
+
ref: (e) => {
|
|
2184
|
+
n++, n === r.length && m();
|
|
2185
|
+
const t = { current: null };
|
|
2186
|
+
t.current = e, p.current.refs[i] = t;
|
|
2187
|
+
},
|
|
2188
|
+
children: o
|
|
2189
|
+
}, i));
|
|
2190
|
+
}), f(e);
|
|
2191
|
+
}, [o, c]), O(() => {
|
|
2192
|
+
if (!h) return;
|
|
2193
|
+
const e = p.current?.refs ?? [], t = e.length;
|
|
2194
|
+
if (!l.current || 0 === t) return x(null), void y(null);
|
|
2195
|
+
const r = l.current?.getBoundingClientRect(), o = [], n = [], i = () => {
|
|
2196
|
+
let r = v.current;
|
|
2197
|
+
r ? r.disconnect() : r = v.current = new ResizeObserver((e) => {
|
|
2198
|
+
for (let t = 0; t < e.length; t++) {
|
|
2199
|
+
const r = e[t].target;
|
|
2200
|
+
if (!r.isConnected) continue;
|
|
2201
|
+
const o = k.current.get(r);
|
|
2202
|
+
if (void 0 !== o && Math.abs(r.getBoundingClientRect().width - o) > .5) return void w();
|
|
2203
|
+
}
|
|
2204
|
+
}), k.current.clear();
|
|
2205
|
+
for (let o = 0; o < t; o++) {
|
|
2206
|
+
const t = e[o]?.current;
|
|
2207
|
+
t && (k.current.set(t, t.getBoundingClientRect().width), r.observe(t));
|
|
2208
|
+
}
|
|
2209
|
+
};
|
|
2210
|
+
let a = 0, s = !1;
|
|
2211
|
+
for (let o = 0; !s && o < t; o++) {
|
|
2212
|
+
const t = e[o];
|
|
2213
|
+
if (!t) continue;
|
|
2214
|
+
if (!t.current) {
|
|
2215
|
+
s = !0;
|
|
2216
|
+
continue;
|
|
2217
|
+
}
|
|
2218
|
+
const n = t.current.getBoundingClientRect();
|
|
2219
|
+
a += n?.width, a > r.width && (s = !0);
|
|
2220
|
+
}
|
|
2221
|
+
if (!s) return i(), x(null), void y([]);
|
|
2222
|
+
const c = d.current?.getBoundingClientRect();
|
|
2223
|
+
a = 0;
|
|
2224
|
+
for (let i = 0; i < t; i++) {
|
|
2225
|
+
const t = e[i];
|
|
2226
|
+
let l = !1;
|
|
2227
|
+
if (t.current) {
|
|
2228
|
+
const e = t.current.getBoundingClientRect();
|
|
2229
|
+
a += e?.width, a < r.width - (c?.width ?? 0) && (l = !0);
|
|
2230
|
+
}
|
|
2231
|
+
l ? o.push(h[i]) : n.push(h[i]);
|
|
2232
|
+
}
|
|
2233
|
+
i(), x(o.length > 0 ? o : null), y(n.length > 0 ? n : null);
|
|
2234
|
+
}, [
|
|
2235
|
+
o,
|
|
2236
|
+
h,
|
|
2237
|
+
c,
|
|
2238
|
+
u
|
|
2239
|
+
]), O(() => () => {
|
|
2240
|
+
v.current?.disconnect(), v.current = null;
|
|
2241
|
+
}, []);
|
|
2242
|
+
const C = z((e) => {
|
|
2243
|
+
const r = [], o = b?.length ?? 0;
|
|
2244
|
+
for (let e = 0; e < o; e++) {
|
|
2245
|
+
const t = T.toArray(b[e])[0];
|
|
2246
|
+
T.toArray(t.props.children?.props?.children ?? t.props.children).forEach((t, o) => {
|
|
2247
|
+
const n = t, i = R(n, {
|
|
2248
|
+
...n.props,
|
|
2249
|
+
key: `overflow-${e}-${o}${n.key ?? ""}`
|
|
2250
|
+
});
|
|
2251
|
+
r.push(i);
|
|
2252
|
+
});
|
|
2253
|
+
}
|
|
2254
|
+
return xt({
|
|
2255
|
+
...e,
|
|
2256
|
+
children: M(t, {
|
|
2257
|
+
className: "overflow-palette-popup-panel",
|
|
2258
|
+
sx: {
|
|
2259
|
+
display: "flex",
|
|
2260
|
+
flexDirection: "row",
|
|
2261
|
+
flexWrap: "wrap",
|
|
2262
|
+
rowGap: (e) => e.spacing(.25),
|
|
2263
|
+
paddingTop: (e) => e.spacing(.5),
|
|
2264
|
+
paddingBottom: (e) => e.spacing(.5),
|
|
2265
|
+
paddingLeft: (e) => e.spacing(1),
|
|
2266
|
+
paddingRight: (e) => e.spacing(1),
|
|
2267
|
+
overflow: "hidden"
|
|
2268
|
+
},
|
|
2269
|
+
children: r
|
|
2270
|
+
})
|
|
2271
|
+
});
|
|
2272
|
+
}, [b]);
|
|
2273
|
+
return S(t, {
|
|
2274
|
+
className: "overflow-palette",
|
|
2275
|
+
sx: {
|
|
2276
|
+
display: "flex",
|
|
2277
|
+
flexDirection: "row",
|
|
2278
|
+
flex: "1 1 100%",
|
|
2279
|
+
width: "100%",
|
|
2280
|
+
maxWidth: "100%",
|
|
2281
|
+
...n
|
|
2282
|
+
},
|
|
2283
|
+
ref: ge([
|
|
2284
|
+
l,
|
|
2285
|
+
s,
|
|
2286
|
+
r
|
|
2287
|
+
]),
|
|
2288
|
+
...i,
|
|
2289
|
+
children: [M(t, {
|
|
2290
|
+
sx: {
|
|
2291
|
+
flexDirection: "row",
|
|
2292
|
+
display: "flex",
|
|
2293
|
+
maxWidth: "100%",
|
|
2294
|
+
flex: "1 1 100%",
|
|
2295
|
+
alignItems: "center"
|
|
2296
|
+
},
|
|
2297
|
+
children: g ?? h
|
|
2298
|
+
}), M(t, {
|
|
2299
|
+
className: "overflow-palette-popup-button",
|
|
2300
|
+
sx: {
|
|
2301
|
+
display: null !== b && 0 === b.length ? "none" : "flex",
|
|
2302
|
+
flex: "1 1 0"
|
|
2303
|
+
},
|
|
2304
|
+
children: M(Ot, {
|
|
2305
|
+
createPopupPanel: C,
|
|
2306
|
+
ref: d,
|
|
2307
|
+
createTooltip: ({ children: e }, t) => M(Rt, {
|
|
2308
|
+
label: a("overflow.more"),
|
|
2309
|
+
description: a("overflow.moreDescription"),
|
|
2310
|
+
disabled: t,
|
|
2311
|
+
children: e
|
|
2312
|
+
}),
|
|
2313
|
+
icon: M(Y, { iconKey: "MoreHorizontal" })
|
|
2314
|
+
})
|
|
2315
|
+
})]
|
|
2316
|
+
});
|
|
603
2317
|
}));
|
|
604
|
-
function
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
2318
|
+
function Xt(e) {
|
|
2319
|
+
const [t, r] = A(() => /* @__PURE__ */ new Map()), o = K(null);
|
|
2320
|
+
null === o.current && (o.current = /* @__PURE__ */ new Map());
|
|
2321
|
+
const { showModal: n, updateModal: i, destroyModal: a, hideModal: l } = we({ disableAutoDestroy: !0 });
|
|
2322
|
+
return (s, c, d, p) => new Promise((u, m) => {
|
|
2323
|
+
let h = !1;
|
|
2324
|
+
void 0 !== d?.disableAutoDestroy && (h = d.disableAutoDestroy, delete (d = { ...d }).disableAutoDestroy);
|
|
2325
|
+
let f = !1;
|
|
2326
|
+
if (void 0 !== d?.prewarm && (f = d.prewarm, delete (d = { ...d }).prewarm, f && (h = !0)), f && t.get(s)) return void u(t.get(s).element);
|
|
2327
|
+
const g = {
|
|
2328
|
+
...e,
|
|
2329
|
+
...d,
|
|
2330
|
+
...p,
|
|
2331
|
+
onHide: () => {
|
|
2332
|
+
if (p?.onHide?.(), h) return;
|
|
2333
|
+
const e = t.get(s);
|
|
2334
|
+
r((e) => (e.delete(s), e)), e?.id && l(e.id);
|
|
2335
|
+
},
|
|
2336
|
+
onDone: (e) => {
|
|
2337
|
+
if (p?.onDone?.(e), h) return;
|
|
2338
|
+
const o = t.get(s);
|
|
2339
|
+
r((e) => (e.delete(s), e)), o?.id && a(o.id);
|
|
2340
|
+
},
|
|
2341
|
+
onShown: (e) => {
|
|
2342
|
+
r((t) => {
|
|
2343
|
+
const r = t.get(s);
|
|
2344
|
+
return r && t.set(s, {
|
|
2345
|
+
...r,
|
|
2346
|
+
element: e ?? r.element
|
|
2347
|
+
}), t;
|
|
2348
|
+
}), u(e);
|
|
2349
|
+
},
|
|
2350
|
+
disableAutoDestroy: h,
|
|
2351
|
+
revealToken: 0,
|
|
2352
|
+
startHidden: f,
|
|
2353
|
+
open: !0
|
|
2354
|
+
}, x = t.get(s);
|
|
2355
|
+
if (x) {
|
|
2356
|
+
const e = (x.revealToken ?? 0) + 1;
|
|
2357
|
+
i(x.id, {
|
|
2358
|
+
...g,
|
|
2359
|
+
revealToken: e
|
|
2360
|
+
}), r((t) => {
|
|
2361
|
+
const r = t.get(s);
|
|
2362
|
+
return r && t.set(s, {
|
|
2363
|
+
...r,
|
|
2364
|
+
revealToken: e
|
|
2365
|
+
}), t;
|
|
2366
|
+
}), u(x.element);
|
|
2367
|
+
return;
|
|
2368
|
+
}
|
|
2369
|
+
if (!c) return void m(`Invalid function for window '${s}'`);
|
|
2370
|
+
let b = o.current.get(s);
|
|
2371
|
+
b || (b = I(c), o.current.set(s, b));
|
|
2372
|
+
const y = n(b, g, { destroyOnClose: !h });
|
|
2373
|
+
r((e) => (e.set(s, {
|
|
2374
|
+
id: y.id,
|
|
2375
|
+
element: null,
|
|
2376
|
+
revealToken: 0
|
|
2377
|
+
}), e)), f && u(null);
|
|
2378
|
+
});
|
|
2379
|
+
}
|
|
2380
|
+
Ut();
|
|
2381
|
+
var Yt = {
|
|
2382
|
+
x: 0,
|
|
2383
|
+
y: 0
|
|
2384
|
+
}, _t = B(D((e, t) => {
|
|
2385
|
+
const { defaultPosition: r = Yt, PaperComponent: o = f, onDragStop: n, rootSel: i = ".MuiModal-root", handleSel: a = ".draggable-title", titleSize: l, rootSize: s, ...c } = e, d = K(null), p = E(() => l?.width && l?.height && s?.width && s?.height ? {
|
|
2386
|
+
left: 0,
|
|
2387
|
+
top: 0,
|
|
2388
|
+
right: s.width - l.width,
|
|
2389
|
+
bottom: s.height - l.height
|
|
2390
|
+
} : null, [l, s]), [u, m] = A(null), [h, g] = A(null), x = u ?? r ?? null;
|
|
2391
|
+
return M(Me, {
|
|
2392
|
+
nodeRef: d,
|
|
2393
|
+
handle: a,
|
|
2394
|
+
cancel: "[class*=\"MuiDialogContent-root\"]",
|
|
2395
|
+
position: E(() => x && p ? {
|
|
2396
|
+
x: Math.max(0, Math.min(x.x, p.right)),
|
|
2397
|
+
y: Math.max(0, Math.min(x.y, p.bottom))
|
|
2398
|
+
} : x, [x, p]) ?? void 0,
|
|
2399
|
+
bounds: p ?? ".MuiModal-root",
|
|
2400
|
+
enableUserSelectHack: !1,
|
|
2401
|
+
onStop: n,
|
|
2402
|
+
onStart: (e, t) => {
|
|
2403
|
+
const r = e;
|
|
2404
|
+
g({
|
|
2405
|
+
x: (r.clientX ?? r.touches?.[0]?.clientX) - t.x,
|
|
2406
|
+
y: (r.clientY ?? r.touches?.[0]?.clientY) - t.y
|
|
2407
|
+
});
|
|
2408
|
+
},
|
|
2409
|
+
onDrag: (e, t) => {
|
|
2410
|
+
const r = e;
|
|
2411
|
+
if (!h) return;
|
|
2412
|
+
const o = r.clientX ?? r.touches?.[0]?.clientX, n = r.clientY ?? r.touches?.[0]?.clientY;
|
|
2413
|
+
m({
|
|
2414
|
+
x: o - h.x,
|
|
2415
|
+
y: n - h.y
|
|
2416
|
+
});
|
|
2417
|
+
},
|
|
2418
|
+
children: M(o, {
|
|
2419
|
+
ref: ge([d, t]),
|
|
2420
|
+
...c
|
|
2421
|
+
})
|
|
2422
|
+
});
|
|
2423
|
+
})), Jt = {
|
|
2424
|
+
x: "50",
|
|
2425
|
+
y: "50"
|
|
2426
|
+
}, Zt = B(D((r, o) => {
|
|
2427
|
+
const n = w({
|
|
2428
|
+
props: r,
|
|
2429
|
+
name: "MuiDialog"
|
|
2430
|
+
}), i = k(), a = fe(), s = {
|
|
2431
|
+
enter: .66 * i.transitions.duration.enteringScreen,
|
|
2432
|
+
exit: .66 * i.transitions.duration.leavingScreen
|
|
2433
|
+
}, { title: p = "SheetXL", onCancel: u, onDone: m, onShow: h, onShown: g, onHide: x, onClose: b, open: v, autoFocusSel: C, children: T, transitionDuration: P = s, TransitionProps: R, slots: D = j.EmptyArray, slotProps: $ = j.EmptyArray, sx: I, className: B, onMouseDown: z, initialPosition: E = Jt, isModal: F = !1, suspendModal: V = !1, restoreFocus: q = !0, disableAutoDestroy: Q = !1, revealToken: U, startHidden: G = !1, ...X } = n;
|
|
2434
|
+
let _ = D.transition ?? c;
|
|
2435
|
+
const J = D.backdrop ?? e, Z = D.paper ?? f;
|
|
2436
|
+
let te = $.transition;
|
|
2437
|
+
R && (te = {
|
|
2438
|
+
...R,
|
|
2439
|
+
...te
|
|
2440
|
+
});
|
|
2441
|
+
const re = $.backdrop, oe = $.paper, [ne, ae] = A(null), [se, ce] = A(!1), [de, pe] = A(!1), xe = K(null), [ye, ve] = be(), ke = K(null), we = K(null), [Me, Se] = be(), Te = K(null), Pe = L();
|
|
2442
|
+
O(() => {
|
|
2443
|
+
ne && !G && ce(!!v);
|
|
2444
|
+
}, [
|
|
2445
|
+
v,
|
|
2446
|
+
ne,
|
|
2447
|
+
G
|
|
2448
|
+
]);
|
|
2449
|
+
const Re = le(() => {
|
|
2450
|
+
u?.(), ce(!1);
|
|
2451
|
+
}, [u]);
|
|
2452
|
+
O(() => {
|
|
2453
|
+
if (ne) return;
|
|
2454
|
+
const e = ke.current, t = Te.current;
|
|
2455
|
+
if (!e || !t) return;
|
|
2456
|
+
const r = e.getBoundingClientRect(), o = t.getBoundingClientRect();
|
|
2457
|
+
if (0 === r.width && 0 === r.height || 0 === o.width && 0 === o.height) return;
|
|
2458
|
+
const n = r.height - o.height, i = r.width - o.width;
|
|
2459
|
+
let a = .5 * i, l = .5 * n;
|
|
2460
|
+
"number" == typeof E?.x ? a = E.x : "string" == typeof E?.x && (a = i * (parseFloat(E.x) / 100)), "number" == typeof E?.y ? l = E.y : "string" == typeof E?.y && (l = n * (parseFloat(E.y) / 100)), ae({
|
|
2461
|
+
x: a,
|
|
2462
|
+
y: l
|
|
2463
|
+
});
|
|
2464
|
+
});
|
|
2465
|
+
const [De, $e] = A(!1), [Ie, Be] = A(null), [ze, Ne] = A(null), Le = le((e) => {
|
|
2466
|
+
if (Ie) return Ie.focus(e), !0;
|
|
2467
|
+
if (C) {
|
|
2468
|
+
const t = we.current?.querySelectorAll?.(C);
|
|
2469
|
+
if (t && t.length > 0) return t[0]?.focus?.(e), !0;
|
|
2470
|
+
}
|
|
2471
|
+
return we.current?.focus?.(e), !1;
|
|
2472
|
+
}, [Ie, C]), Oe = he(o, () => ({ focus: (e) => {
|
|
2473
|
+
Le(e);
|
|
2474
|
+
} }), []), Ee = K(U);
|
|
2475
|
+
N(() => {
|
|
2476
|
+
U !== Ee.current && (Ee.current = U, ce(!0));
|
|
2477
|
+
}, [U]);
|
|
2478
|
+
const Fe = {
|
|
2479
|
+
...te,
|
|
2480
|
+
onExited: (e) => {
|
|
2481
|
+
m?.(null), Q || te?.onExited?.(e);
|
|
2482
|
+
},
|
|
2483
|
+
onExit: (e) => {
|
|
2484
|
+
const t = ze, r = "function" == typeof q ? q() : q;
|
|
2485
|
+
t && !1 !== r && requestAnimationFrame(() => {
|
|
2486
|
+
Oe.current?.contains(document.activeElement) && t.focus();
|
|
2487
|
+
}), x?.(), pe(!1), te?.onExit?.(e);
|
|
2488
|
+
},
|
|
2489
|
+
onEntered: (e, t) => {
|
|
2490
|
+
h?.(), te?.onEntered?.(e, t);
|
|
2491
|
+
},
|
|
2492
|
+
onEntering: (e, t) => {
|
|
2493
|
+
pe(!0), g?.(Oe.current);
|
|
2494
|
+
}
|
|
2495
|
+
};
|
|
2496
|
+
N(() => {
|
|
2497
|
+
de && Le();
|
|
2498
|
+
}, [de]);
|
|
2499
|
+
let Ke = M(y, {
|
|
2500
|
+
open: de,
|
|
2501
|
+
disableAutoFocus: !0,
|
|
2502
|
+
disableEnforceFocus: !De,
|
|
2503
|
+
disableRestoreFocus: !0 !== q,
|
|
2504
|
+
children: M(_, {
|
|
2505
|
+
in: se,
|
|
2506
|
+
timeout: P,
|
|
2507
|
+
role: "presentation",
|
|
2508
|
+
...Fe,
|
|
2509
|
+
children: M(t, {
|
|
2510
|
+
className: "MuiDialog-container",
|
|
2511
|
+
ref: we,
|
|
2512
|
+
tabIndex: 0,
|
|
2513
|
+
sx: {
|
|
2514
|
+
outline: "none",
|
|
2515
|
+
position: "relative"
|
|
2516
|
+
},
|
|
2517
|
+
onKeyDown: (e) => {
|
|
2518
|
+
e.which === ee.Escape && (Re(), xe.current?.start(e, { center: !1 }), setTimeout(() => xe.current?.stop(e), 180)), e.stopPropagation();
|
|
2519
|
+
},
|
|
2520
|
+
children: S(_t, {
|
|
2521
|
+
ref: ge([Te, o]),
|
|
2522
|
+
className: W({ "Mui-focusVisible": De }, B, "draggable"),
|
|
2523
|
+
sx: {
|
|
2524
|
+
"& *": (e) => mt(e),
|
|
2525
|
+
pointerEvents: "auto",
|
|
2526
|
+
userSelect: "none",
|
|
2527
|
+
backgroundColor: "var(--sxl-color-elevated, var(--sxl-color-base-100))",
|
|
2528
|
+
border: "1px solid var(--sxl-color-elevated-border, transparent)",
|
|
2529
|
+
"&:hover:not([disabled]):not(.Mui-focusVisible)": { outline: (e) => `solid ${H(e.palette.text?.primary, .2)} 1px` },
|
|
2530
|
+
"&.Mui-focusVisible": { outline: (e) => `solid ${H(e.palette.text?.primary, .2)} 1px` },
|
|
2531
|
+
position: "absolute",
|
|
2532
|
+
maxWidth: "100%",
|
|
2533
|
+
...I
|
|
2534
|
+
},
|
|
2535
|
+
defaultPosition: ne,
|
|
2536
|
+
titleSize: Se,
|
|
2537
|
+
rootSize: ve,
|
|
2538
|
+
PaperComponent: Z,
|
|
2539
|
+
...X,
|
|
2540
|
+
...oe,
|
|
2541
|
+
children: [p ? M(l, {
|
|
2542
|
+
className: W({ "Mui-selected": De }, "draggable-title"),
|
|
2543
|
+
sx: {
|
|
2544
|
+
cursor: "move",
|
|
2545
|
+
display: "flex",
|
|
2546
|
+
color: (e) => e.palette.text.secondary,
|
|
2547
|
+
boxSizing: "border-box",
|
|
2548
|
+
padding: "0 0",
|
|
2549
|
+
transitionProperty: "opacity",
|
|
2550
|
+
transitionDuration: (e) => `${e.transitions.duration.shortest}ms`,
|
|
2551
|
+
opacity: .7,
|
|
2552
|
+
"&.Mui-selected": {
|
|
2553
|
+
opacity: 1,
|
|
2554
|
+
transitionDuration: (e) => e.transitions.duration.shortest / 2 + "ms"
|
|
2555
|
+
},
|
|
2556
|
+
backgroundColor: (e) => H(e.palette.action.hover, .03)
|
|
2557
|
+
},
|
|
2558
|
+
ref: Me,
|
|
2559
|
+
children: S(t, {
|
|
2560
|
+
sx: {
|
|
2561
|
+
display: "flex",
|
|
2562
|
+
flex: "1 1 10%",
|
|
2563
|
+
flexDirection: "row",
|
|
2564
|
+
alignItems: "center",
|
|
2565
|
+
marginTop: (e) => e.spacing(1),
|
|
2566
|
+
marginLeft: (e) => e.spacing(1),
|
|
2567
|
+
marginRight: (e) => e.spacing(1)
|
|
2568
|
+
},
|
|
2569
|
+
children: [M(t, {
|
|
2570
|
+
sx: {
|
|
2571
|
+
flex: "1 1 100%",
|
|
2572
|
+
paddingLeft: (e) => e.spacing(1)
|
|
2573
|
+
},
|
|
2574
|
+
children: p
|
|
2575
|
+
}), M(Rt, {
|
|
2576
|
+
label: a("window.close"),
|
|
2577
|
+
children: M(d, {
|
|
2578
|
+
"aria-label": "close",
|
|
2579
|
+
sx: { color: (e) => e.palette.text.icon ?? e.palette.action.active },
|
|
2580
|
+
touchRippleRef: xe,
|
|
2581
|
+
onPointerDown: (e) => {
|
|
2582
|
+
xe.current?.start(e, { center: !1 }), e.stopPropagation(), e.preventDefault();
|
|
2583
|
+
},
|
|
2584
|
+
onPointerUp: Re,
|
|
2585
|
+
children: M(Y, { iconKey: "Close" })
|
|
2586
|
+
})
|
|
2587
|
+
})]
|
|
2588
|
+
})
|
|
2589
|
+
}) : null, T]
|
|
2590
|
+
})
|
|
2591
|
+
})
|
|
2592
|
+
})
|
|
2593
|
+
}), Ae = null;
|
|
2594
|
+
F && !V && (Ae = M(J, {
|
|
2595
|
+
...re,
|
|
2596
|
+
open: se,
|
|
2597
|
+
onMouseDown: (e) => {
|
|
2598
|
+
Re(), re?.onMouseDown?.(e);
|
|
2599
|
+
},
|
|
2600
|
+
onClick: (e) => {
|
|
2601
|
+
b?.(e, "backdropClick"), re?.onClick?.(e);
|
|
2602
|
+
},
|
|
2603
|
+
sx: {
|
|
2604
|
+
pointerEvents: "auto",
|
|
2605
|
+
...re?.sx
|
|
2606
|
+
}
|
|
2607
|
+
}));
|
|
2608
|
+
const { getPortalContainer: We } = me(), { className: He, attrs: Ve } = ie(ue()?.themeScope);
|
|
2609
|
+
return Ce(S(t, {
|
|
2610
|
+
className: W("MuiModal-root", He),
|
|
2611
|
+
...Ve,
|
|
2612
|
+
sx: {
|
|
2613
|
+
position: "fixed",
|
|
2614
|
+
zIndex: "1300",
|
|
2615
|
+
right: "0",
|
|
2616
|
+
bottom: "0",
|
|
2617
|
+
top: "0",
|
|
2618
|
+
left: "0",
|
|
2619
|
+
outline: "0",
|
|
2620
|
+
display: "block",
|
|
2621
|
+
pointerEvents: "none"
|
|
2622
|
+
},
|
|
2623
|
+
ref: ge([
|
|
2624
|
+
Oe,
|
|
2625
|
+
ye,
|
|
2626
|
+
ke
|
|
2627
|
+
]),
|
|
2628
|
+
onPointerDown: (e) => {
|
|
2629
|
+
De && (e.target === we.current || e.target.tabIndex < 0) && we.current?.contains(document.activeElement);
|
|
2630
|
+
},
|
|
2631
|
+
onContextMenu: (e) => {
|
|
2632
|
+
e.isPropagationStopped() || e.preventDefault();
|
|
2633
|
+
},
|
|
2634
|
+
onFocus: (e) => {
|
|
2635
|
+
!De && (e.target === we.current || e.target.tabIndex < 0) && setTimeout(() => {
|
|
2636
|
+
Le();
|
|
2637
|
+
}, 100), $e(!0), we.current?.contains(e.target) && e.target !== we.current && Be(e.target), e.relatedTarget && !ze && Ne(e.relatedTarget);
|
|
2638
|
+
},
|
|
2639
|
+
onBlur: (e) => {
|
|
2640
|
+
Oe?.current?.contains(e.relatedTarget) || (Ne(null), $e(!1));
|
|
2641
|
+
},
|
|
2642
|
+
children: [Ae, Ke]
|
|
2643
|
+
}), We(), Pe);
|
|
2644
|
+
})), er = ["Ok", "Cancel"], tr = (e) => "string" == typeof e ? e : e.id ?? e, rr = (e, t) => void 0 !== t && tr(e) === tr(t), or = (e) => "string" != typeof e && ("function" == typeof e.disabled ? e.disabled() : !0 === e.disabled), nr = B(D((e, o) => {
|
|
2645
|
+
const { description: l, icon: s, onCancel: c, onOption: d, onDone: p, onValidateOption: u, options: m = er, autoFocusSel: h = ".defaultOption", defaultOption: f = m[0], cancelOption: g = "Cancel", autoFocus: x, children: y, ...v } = e, k = Pe({ shouldUseNativeValidation: !1 }), { handleSubmit: w, formState: C } = k, T = K(null), R = K(null), D = fe(), $ = le((e) => "string" != typeof e ? "function" == typeof e.label ? e.label() : e.label : "Ok" === e ? D("dialog.ok") : "Cancel" === e ? D("dialog.cancel") : e, [D]), I = K(null), [B, z] = A(null), N = le(async (e) => {
|
|
2646
|
+
const t = tr(e);
|
|
2647
|
+
if (null !== B) return;
|
|
2648
|
+
if (or(e)) return;
|
|
2649
|
+
const r = rr(e, g);
|
|
2650
|
+
let o;
|
|
2651
|
+
try {
|
|
2652
|
+
if (z(t), o = !!r || (await Promise.resolve(u?.(t)) ?? !0), !0 !== o) return;
|
|
2653
|
+
await Promise.resolve(d?.(t, r, rr(e, f))), p?.(t);
|
|
2654
|
+
} catch (e) {} finally {
|
|
2655
|
+
z(null);
|
|
2656
|
+
}
|
|
2657
|
+
}, [
|
|
2658
|
+
d,
|
|
2659
|
+
p,
|
|
2660
|
+
u,
|
|
2661
|
+
g,
|
|
2662
|
+
f,
|
|
2663
|
+
B
|
|
2664
|
+
]), L = le((e, t) => {
|
|
2665
|
+
setTimeout(() => {
|
|
2666
|
+
N(f);
|
|
2667
|
+
}, 180);
|
|
2668
|
+
}, [N, f]), O = le(() => {
|
|
2669
|
+
d?.(tr(g), !0, !1), c?.(), p?.(null);
|
|
2670
|
+
}, [
|
|
2671
|
+
d,
|
|
2672
|
+
g,
|
|
2673
|
+
c,
|
|
2674
|
+
p
|
|
2675
|
+
]), F = C && (Object.keys(C.errors).length > 0 || C.disabled || C.isSubmitting), W = le((e, t, o) => {
|
|
2676
|
+
const i = rr(e, g), a = {
|
|
2677
|
+
className: t ? "defaultOption" : "action",
|
|
2678
|
+
type: t ? "submit" : "button",
|
|
2679
|
+
style: { minWidth: "75px" },
|
|
2680
|
+
onClick: () => {
|
|
2681
|
+
i ? O() : t || N(e);
|
|
2682
|
+
}
|
|
2683
|
+
}, l = "string" != typeof e ? e.renderButton : void 0;
|
|
2684
|
+
if (l) return M(P, { children: l(a, t) }, `action:${o}`);
|
|
2685
|
+
const s = null !== B && rr(e, B), c = {
|
|
2686
|
+
className: t ? "defaultOption" : "action",
|
|
2687
|
+
variant: t ? "contained" : "outlined",
|
|
2688
|
+
size: "small",
|
|
2689
|
+
disabled: !i && (F || or(e)) || null !== B && !s,
|
|
2690
|
+
color: "primary",
|
|
2691
|
+
...a
|
|
2692
|
+
};
|
|
2693
|
+
if (t || i) {
|
|
2694
|
+
const e = t ? T : R;
|
|
2695
|
+
c.touchRippleRef = e, c.onPointerDown = (t) => {
|
|
2696
|
+
e.current?.start(t, { center: !1 }), t.stopPropagation(), t.preventDefault();
|
|
2697
|
+
};
|
|
2698
|
+
}
|
|
2699
|
+
return S(r, {
|
|
2700
|
+
...c,
|
|
2701
|
+
children: [M("div", {
|
|
2702
|
+
style: { visibility: s ? "hidden" : void 0 },
|
|
2703
|
+
children: $(e)
|
|
2704
|
+
}), u && !i ? M(n, {
|
|
2705
|
+
size: 16,
|
|
2706
|
+
color: "inherit",
|
|
2707
|
+
style: { opacity: s ? 1 : 0 },
|
|
2708
|
+
sx: {
|
|
2709
|
+
position: "absolute",
|
|
2710
|
+
top: "calc(50% - 8px)",
|
|
2711
|
+
left: "calc(50% - 8px)",
|
|
2712
|
+
zIndex: 1,
|
|
2713
|
+
pointerEvents: "none",
|
|
2714
|
+
transition: "opacity 120ms"
|
|
2715
|
+
}
|
|
2716
|
+
}) : null]
|
|
2717
|
+
}, `action:${o}`);
|
|
2718
|
+
}, [
|
|
2719
|
+
m,
|
|
2720
|
+
f,
|
|
2721
|
+
g,
|
|
2722
|
+
C,
|
|
2723
|
+
$,
|
|
2724
|
+
B
|
|
2725
|
+
]), V = E(() => {
|
|
2726
|
+
const e = [];
|
|
2727
|
+
for (let t = 0; t < m.length; t++) {
|
|
2728
|
+
const r = m[t], o = void 0 !== f ? rr(r, f) : 0 === t;
|
|
2729
|
+
e.push(W(r, o, t));
|
|
2730
|
+
}
|
|
2731
|
+
return e;
|
|
2732
|
+
}, [
|
|
2733
|
+
m,
|
|
2734
|
+
f,
|
|
2735
|
+
C,
|
|
2736
|
+
D,
|
|
2737
|
+
B
|
|
2738
|
+
]);
|
|
2739
|
+
return M(Zt, {
|
|
2740
|
+
onCancel: O,
|
|
2741
|
+
initialPosition: { y: "touch" === Se ? "15" : "35" },
|
|
2742
|
+
onDone: p,
|
|
2743
|
+
autoFocusSel: h,
|
|
2744
|
+
isModal: !0,
|
|
2745
|
+
ref: o,
|
|
2746
|
+
...v,
|
|
2747
|
+
children: M(Te, {
|
|
2748
|
+
...k,
|
|
2749
|
+
children: S("form", {
|
|
2750
|
+
ref: I,
|
|
2751
|
+
onSubmit: w(L),
|
|
2752
|
+
children: [M(a, {
|
|
2753
|
+
dividers: !0,
|
|
2754
|
+
onKeyDown: (e) => {
|
|
2755
|
+
if (e.isDefaultPrevented()) return;
|
|
2756
|
+
e.stopPropagation();
|
|
2757
|
+
let t = null, r = null;
|
|
2758
|
+
const o = e.which === ee.Escape && g;
|
|
2759
|
+
if (o) {
|
|
2760
|
+
if (null !== B) return;
|
|
2761
|
+
t = g, r = R;
|
|
2762
|
+
} else {
|
|
2763
|
+
if (F || null !== B) return;
|
|
2764
|
+
e.which === ee.Enter && (t = f ?? m[0], r = T);
|
|
2765
|
+
}
|
|
2766
|
+
t && (r?.current?.start(e, { center: !1 }), setTimeout(() => {
|
|
2767
|
+
r?.current?.stop(e), o && O();
|
|
2768
|
+
}, 180));
|
|
2769
|
+
},
|
|
2770
|
+
children: S(t, {
|
|
2771
|
+
sx: {
|
|
2772
|
+
display: "flex",
|
|
2773
|
+
flexDirection: "column",
|
|
2774
|
+
whiteSpace: "pre-wrap",
|
|
2775
|
+
rowGap: (e) => e.spacing(s || l ? 1.5 : 0)
|
|
2776
|
+
},
|
|
2777
|
+
children: [S(t, {
|
|
2778
|
+
sx: {
|
|
2779
|
+
display: "flex",
|
|
2780
|
+
flexDirection: "column"
|
|
2781
|
+
},
|
|
2782
|
+
children: [s, M(b, { children: l })]
|
|
2783
|
+
}), y]
|
|
2784
|
+
})
|
|
2785
|
+
}), M(i, {
|
|
2786
|
+
sx: {
|
|
2787
|
+
paddingTop: (e) => e.spacing(1),
|
|
2788
|
+
paddingBottom: (e) => e.spacing(1),
|
|
2789
|
+
paddingLeft: (e) => e.spacing(1),
|
|
2790
|
+
paddingRight: (e) => e.spacing(1),
|
|
2791
|
+
backgroundColor: (e) => H(e.palette.action.hover, .03)
|
|
2792
|
+
},
|
|
2793
|
+
children: V
|
|
2794
|
+
})]
|
|
2795
|
+
})
|
|
2796
|
+
})
|
|
2797
|
+
});
|
|
2798
|
+
})), ir = (e) => {
|
|
2799
|
+
const { showModal: t } = we();
|
|
2800
|
+
return (r) => new Promise((o) => {
|
|
2801
|
+
const n = t(nr, {
|
|
2802
|
+
...e,
|
|
2803
|
+
...r,
|
|
2804
|
+
onOption(e, t, n) {
|
|
2805
|
+
r?.onOption?.(e, t, n), o(e);
|
|
2806
|
+
},
|
|
2807
|
+
onDone: () => {
|
|
2808
|
+
r?.onDone?.(), n.hide();
|
|
2809
|
+
}
|
|
2810
|
+
});
|
|
2811
|
+
});
|
|
2812
|
+
}, ar = I(() => import("./C2bOUbQGN6BujoBn.mjs")), lr = (e) => {
|
|
2813
|
+
const { showModal: t } = we();
|
|
2814
|
+
return (r) => {
|
|
2815
|
+
const { defaultOption: o = r.options?.[0], cancelOption: n = "Cancel", ...i } = r;
|
|
2816
|
+
return new Promise((r) => {
|
|
2817
|
+
const a = t(ar, {
|
|
2818
|
+
...e,
|
|
2819
|
+
defaultOption: o,
|
|
2820
|
+
cancelOption: n,
|
|
2821
|
+
...i,
|
|
2822
|
+
onOption(e, t, o) {
|
|
2823
|
+
i?.onOption?.(e, t, o), r({
|
|
2824
|
+
input: "",
|
|
2825
|
+
option: e
|
|
2826
|
+
});
|
|
2827
|
+
},
|
|
2828
|
+
onInput(e, t) {
|
|
2829
|
+
i?.onInput?.(e, t), r({
|
|
2830
|
+
input: e,
|
|
2831
|
+
option: t
|
|
2832
|
+
});
|
|
2833
|
+
},
|
|
2834
|
+
onDone: () => {
|
|
2835
|
+
i?.onDone?.(), a.hide();
|
|
2836
|
+
}
|
|
2837
|
+
});
|
|
2838
|
+
});
|
|
2839
|
+
};
|
|
2840
|
+
}, sr = B(D((e, t) => {
|
|
2841
|
+
const { commandKey: r, command: o, disabled: n, shortcut: i, children: a, ...l } = e, [s] = ce(r ?? []), c = o ?? s, d = c?.getShortcut();
|
|
2842
|
+
return M(Rt, {
|
|
2843
|
+
ref: t,
|
|
2844
|
+
label: void 0 !== n ? c?.getLabel() : "",
|
|
2845
|
+
shortcut: void 0 !== i ? i : Array.isArray(d) ? d[0] : d,
|
|
2846
|
+
description: c?.getDescription(),
|
|
2847
|
+
disabled: n,
|
|
2848
|
+
componentDisabled: c?.disabled(),
|
|
2849
|
+
...l,
|
|
2850
|
+
children: M("div", {
|
|
2851
|
+
style: {
|
|
2852
|
+
display: "flex",
|
|
2853
|
+
flex: "1 1 0%"
|
|
2854
|
+
},
|
|
2855
|
+
children: a
|
|
2856
|
+
})
|
|
2857
|
+
});
|
|
2858
|
+
})), cr = Re;
|
|
2859
|
+
function dr() {
|
|
2860
|
+
const e = K(null);
|
|
2861
|
+
return {
|
|
2862
|
+
ripple: E(() => M(cr, {
|
|
2863
|
+
ref: e,
|
|
2864
|
+
center: !1
|
|
2865
|
+
}), []),
|
|
2866
|
+
trigger: z(() => {
|
|
2867
|
+
e.current?.start(void 0, { center: !0 }), setTimeout(() => e.current?.stop(), 180);
|
|
2868
|
+
}, [])
|
|
2869
|
+
};
|
|
626
2870
|
}
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
})),
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
t2 && requestAnimationFrame(() => {
|
|
673
|
-
Se2.current?.contains(document.activeElement) && t2.focus();
|
|
674
|
-
}), y2?.(), le2(false), U2?.onExit?.(e2);
|
|
675
|
-
}, onEntered: (e2, t2) => {
|
|
676
|
-
x2?.(), U2?.onEntered?.(e2, t2);
|
|
677
|
-
}, onEntering: (e2, t2) => {
|
|
678
|
-
le2(true), b2?.(Se2.current);
|
|
679
|
-
} };
|
|
680
|
-
s(() => {
|
|
681
|
-
ae2 && Me2();
|
|
682
|
-
}, [ae2]);
|
|
683
|
-
let Pe2 = e(ce, { focusTrapOptions: { escapeDeactivates: false, allowOutsideClick: true, initialFocus: false }, ref: J2, active: ae2, children: e(H2, { in: oe2, timeout: R2, role: "presentation", ...Re2, children: e(v, { className: "MuiDialog-container", ref: me2, tabIndex: 0, sx: { outline: "none", position: "relative" }, onKeyDown: (e2) => {
|
|
684
|
-
e2.which === j.Escape && (be2(), de2.current?.start(e2, { center: false }), setTimeout(() => de2.current?.stop(e2), 180)), e2.stopPropagation();
|
|
685
|
-
}, children: t(At, { ref: ne([xe2, n2]), 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%", ...O2 }, defaultPosition: Z2, titleSize: fe2, rootSize: ue2, PaperComponent: q2, ...A2, ...X2, children: [d2 ? e(z, { 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) => {
|
|
686
|
-
de2.current?.start(e2, { center: false }), e2.stopPropagation(), e2.preventDefault();
|
|
687
|
-
}, onPointerUp: be2, children: e(W, { iconKey: "Close" }) }) })] }) }) : null, S2] }) }) }) }), De2 = null;
|
|
688
|
-
L2 && (De2 = e(_2, { ...G2, open: oe2, onMouseDown: (e2) => {
|
|
689
|
-
be2(), G2?.onMouseDown?.(e2);
|
|
690
|
-
}, onClick: (e2) => {
|
|
691
|
-
k2?.(e2, "backdropClick"), G2?.onClick?.(e2);
|
|
692
|
-
}, sx: { pointerEvents: "auto", ...G2?.sx } }));
|
|
693
|
-
const { getPortalContainer: Ee2 } = V();
|
|
694
|
-
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: ne([Se2, pe2]), onPointerDown: (e2) => {
|
|
695
|
-
ge2 && (e2.target === me2.current || e2.target.tabIndex < 0) && me2.current?.contains(document.activeElement);
|
|
696
|
-
}, onContextMenu: (e2) => {
|
|
697
|
-
e2.isPropagationStopped() || e2.preventDefault();
|
|
698
|
-
}, onFocus: (e2) => {
|
|
699
|
-
!ge2 && (e2.target === me2.current || e2.target.tabIndex < 0) && setTimeout(() => {
|
|
700
|
-
Me2();
|
|
701
|
-
}, 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);
|
|
702
|
-
}, onBlur: (e2) => {
|
|
703
|
-
Se2?.current?.contains(e2.relatedTarget) || (Ce2(null), J2.current?.focusTrap?.pause(), ye2(false));
|
|
704
|
-
}, children: [De2, Pe2] }), Ee2(), p2 + "");
|
|
705
|
-
})), Kt = ["Ok", "Cancel"], Vt = r(i((o2, n2) => {
|
|
706
|
-
const { description: r2, 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", autoFocus: g2, children: y2, ...w2 } = o2, C2 = ue({ shouldUseNativeValidation: false }), { handleSubmit: M2, formState: S2 } = C2, R2 = l(null), P2 = l(null), D2 = l(null), E2 = K(async (e2) => {
|
|
707
|
-
let t2;
|
|
708
|
-
try {
|
|
709
|
-
if (t2 = await Promise.resolve(p2?.(e2)) ?? true, true !== t2) return;
|
|
710
|
-
await Promise.resolve(c2?.(e2, e2 === b2, e2 === x2)), d2?.(e2);
|
|
711
|
-
} catch (e3) {
|
|
712
|
-
}
|
|
713
|
-
}, [c2, d2, p2, b2, x2]), T2 = K((e2, t2) => {
|
|
714
|
-
setTimeout(() => {
|
|
715
|
-
E2(x2);
|
|
716
|
-
}, 180);
|
|
717
|
-
}, [E2]), z2 = K(() => {
|
|
718
|
-
c2?.(b2, true, false), s2?.(), d2?.(null);
|
|
719
|
-
}, [c2, b2, s2, d2]), N2 = S2 && (Object.keys(S2.errors).length > 0 || S2.disabled || S2.isSubmitted), B2 = K((t2, o3) => {
|
|
720
|
-
const n3 = t2 === b2, r3 = { className: o3 ? "defaultOption" : "action", type: o3 ? "submit" : "button", style: { minWidth: "75px" }, onClick: () => {
|
|
721
|
-
n3 ? z2() : o3 || E2(t2);
|
|
722
|
-
} };
|
|
723
|
-
if (u2) return u2(t2, r3, o3);
|
|
724
|
-
const i3 = { className: o3 ? "defaultOption" : "action", variant: o3 ? "contained" : "outlined", size: "small", disabled: !n3 && N2, color: "primary", ...r3 };
|
|
725
|
-
if (o3 || n3) {
|
|
726
|
-
const e2 = o3 ? R2 : P2;
|
|
727
|
-
i3.touchRippleRef = e2, i3.onPointerDown = (t3) => {
|
|
728
|
-
e2.current?.start(t3, { center: false }), t3.stopPropagation(), t3.preventDefault();
|
|
729
|
-
};
|
|
730
|
-
}
|
|
731
|
-
return e($, { ...i3, children: e("div", { style: { paddingTop: "3px" }, children: t2 }) }, `action:${t2}`);
|
|
732
|
-
}, [m2, x2, b2, u2, S2]), L2 = a(() => {
|
|
733
|
-
const e2 = [];
|
|
734
|
-
for (let t2 = 0; t2 < m2.length; t2++) {
|
|
735
|
-
const o3 = m2[t2], n3 = x2 ? o3 === x2 : 0 === t2;
|
|
736
|
-
e2.push(B2(o3, n3));
|
|
737
|
-
}
|
|
738
|
-
return e2;
|
|
739
|
-
}, [m2, x2, S2]);
|
|
740
|
-
return e(Wt, { onCancel: z2, initialPosition: { y: "touch" === pe ? "15" : "35" }, onDone: d2, autoFocusSel: h2, isModal: true, ref: n2, ...w2, children: e(me, { ...C2, children: t("form", { ref: D2, onSubmit: M2(T2), children: [e(O, { dividers: true, onKeyDown: (e2) => {
|
|
741
|
-
if (e2.isDefaultPrevented()) return;
|
|
742
|
-
e2.stopPropagation();
|
|
743
|
-
let t2 = null, o3 = null;
|
|
744
|
-
const n3 = e2.which === j.Escape && b2;
|
|
745
|
-
if (n3) t2 = b2, o3 = P2;
|
|
746
|
-
else {
|
|
747
|
-
if (N2) return;
|
|
748
|
-
e2.which === j.Enter && (t2 = x2 ?? m2[0], o3 = R2);
|
|
749
|
-
}
|
|
750
|
-
t2 && (o3.current?.start(e2, { center: false }), setTimeout(() => {
|
|
751
|
-
o3.current?.stop(e2), n3 && E2(t2);
|
|
752
|
-
}, 180));
|
|
753
|
-
}, children: t(v, { sx: { display: "flex", flexDirection: "column", whiteSpace: "pre-wrap", rowGap: (e2) => e2.spacing(i2 || r2 ? 1.5 : 0) }, children: [t(v, { sx: { display: "flex", flexDirection: "column" }, children: [i2, e(k, { children: r2 })] }), y2] }) }), 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: L2 })] }) }) });
|
|
754
|
-
})), jt = Object.freeze(Object.defineProperty({ __proto__: null, OptionsDialog: Vt, default: Vt }, Symbol.toStringTag, { value: "Module" })), _t = n.lazy(() => Promise.resolve().then(() => jt)), qt = (e2) => {
|
|
755
|
-
const { showModal: t2 } = le();
|
|
756
|
-
return (o2) => new Promise((n2) => {
|
|
757
|
-
const r2 = t2(_t, { ...e2, ...o2, onOption(e3) {
|
|
758
|
-
o2?.onOption?.(e3, e3 === o2.cancelOption, e3 === o2.defaultOption), n2(e3);
|
|
759
|
-
}, onDone: () => {
|
|
760
|
-
o2?.onDone?.(), r2.hide();
|
|
761
|
-
} });
|
|
762
|
-
});
|
|
763
|
-
}, Qt = n.lazy(() => import("./ojE1YgJ2zWQ8Q_AP.mjs")), Ut = (e2) => {
|
|
764
|
-
const { showModal: t2 } = le();
|
|
765
|
-
return (o2) => {
|
|
766
|
-
const { defaultOption: n2 = o2.options?.[0], cancelOption: r2 = "Cancel", ...i2 } = o2;
|
|
767
|
-
return new Promise((o3) => {
|
|
768
|
-
const a2 = t2(Qt, { ...e2, defaultOption: n2, cancelOption: r2, ...i2, onOption(e3) {
|
|
769
|
-
i2?.onOption?.(e3, e3 === r2, e3 === n2), o3({ input: "", option: e3 });
|
|
770
|
-
}, onInput(e3, t3) {
|
|
771
|
-
i2?.onInput?.(e3, t3), o3({ input: e3, option: t3 });
|
|
772
|
-
}, onDone: () => {
|
|
773
|
-
i2?.onDone?.(), a2.hide();
|
|
774
|
-
} });
|
|
775
|
-
});
|
|
776
|
-
};
|
|
777
|
-
}, Gt = r(i((t2, o2) => {
|
|
778
|
-
const { command: n2, disabled: r2 = false, shortcut: i2, children: a2, ...l2 } = t2;
|
|
779
|
-
return U(n2), e(wt, { ref: o2, label: void 0 !== r2 ? n2?.label() : "", shortcut: void 0 !== i2 ? i2 : Array.isArray(n2?.shortcut()) ? n2?.shortcut()[0] : n2?.shortcut(), description: n2?.description(), disabled: r2, chips: n2?.tags(), componentDisabled: n2?.disabled(), ...l2, children: e("div", { style: { display: "flex", flex: "1 1 0%" }, children: a2 }) });
|
|
780
|
-
})), Xt = e(W, {}), Yt = r(i((t2, o2) => {
|
|
781
|
-
const { command: n2, commandHook: r2, scope: i2, context: s2, icon: c2, label: d2, disabled: u2 = false, variant: m2 = G.Toolbar, shortcut: h2, commandState: f2, propsTooltip: x2, ...b2 } = t2, g2 = l(null), y2 = l(false), v2 = a(() => {
|
|
782
|
-
const e2 = { onExecute(e3, t3) {
|
|
783
|
-
r2?.onExecute?.(e3, t3), y2.current || (g2.current?.start({ center: false }), setTimeout(() => g2.current?.stop({}), 180)), y2.current = false;
|
|
784
|
-
}, onError(e3, t3, o3) {
|
|
785
|
-
r2?.onError(e3, t3, o3);
|
|
786
|
-
} };
|
|
787
|
-
return r2?.beforeExecute && (e2.beforeExecute = r2.beforeExecute), e2;
|
|
788
|
-
}, [r2]), k2 = U(n2, v2), w2 = p((e2) => {
|
|
789
|
-
0 === e2.button && e2.preventDefault();
|
|
790
|
-
}, []), C2 = p((e2) => {
|
|
791
|
-
0 === e2.button && n2?.execute(f2, r2);
|
|
792
|
-
}, [k2, r2, f2]), M2 = p((e2) => {
|
|
793
|
-
e2.keyCode !== j.Enter && e2.keyCode !== j.Space || n2?.execute(f2, r2);
|
|
794
|
-
}, [k2, r2, f2]), S2 = a(() => {
|
|
795
|
-
if (c2) return "function" == typeof c2 ? c2(n2) : c2;
|
|
796
|
-
let t3 = n2?.icon(s2);
|
|
797
|
-
return t3 ? ("string" == typeof t3 && (t3 = e(W, { iconKey: t3 })), t3) : m2 === G.Toolbar || n2?.state() ? void 0 : Xt;
|
|
798
|
-
}, [k2, c2]), R2 = a(() => ({ tabIndex: 0, ref: o2, selected: n2?.state(), icon: m2 === G.Toolbar ? S2 : e(Bt, { selected: n2?.state() ?? false, children: S2 }), touchRippleRef: g2, disabled: u2 || !n2 || n2.disabled(), onMouseDown: w2, onMouseUp: C2, onKeyDown: M2 }), [k2, r2, u2, S2]);
|
|
799
|
-
let P2;
|
|
800
|
-
return P2 = m2 === G.Menuitem ? e(Dt, { ...b2, chips: n2?.tags(), ...R2, children: d2 ?? n2?.label(i2, s2) }) : e(St, { ...b2, ...R2 }), d2 || n2?.label() ? ((n2.disabled() || u2) && (P2 = e("div", { children: P2 })), P2 = e(Gt, { command: n2, placement: m2 === G.Toolbar ? "bottom-start" : "right-start", shortcut: h2, ...x2, children: P2 }), P2) : P2;
|
|
2871
|
+
var pr = M(Y, {}), ur = B(D((e, t) => {
|
|
2872
|
+
const { commandKey: r, command: o, groupKey: n, icon: i, label: a, showLabel: l = !1, disabled: s, variant: c = G.Toolbar, shortcut: d, commandState: p, propsTooltip: u, ...m } = e, { ripple: h, trigger: f } = dr(), g = E(() => ({ onExecute() {
|
|
2873
|
+
f();
|
|
2874
|
+
} }), [f]), [x] = ce(r ?? [], g), b = o ?? x, y = z((e) => {
|
|
2875
|
+
0 === e.button && e.preventDefault();
|
|
2876
|
+
}, []), v = z(async (e) => {
|
|
2877
|
+
0 === e.button && b && await b.execute(p);
|
|
2878
|
+
}, [b, p]), k = z((e) => {
|
|
2879
|
+
e.keyCode !== ee.Enter && e.keyCode !== ee.Space || b?.execute(p);
|
|
2880
|
+
}, [b, p]), w = E(() => {
|
|
2881
|
+
if (null === i) return pr;
|
|
2882
|
+
let e;
|
|
2883
|
+
return e = "function" == typeof i ? b ? i(b) : void 0 : i, e || (e = b?.getIcon(n)), e ? ("string" == typeof e && (e = M(Y, { iconKey: e })), e) : c === G.Toolbar || b?.getState() ? void 0 : pr;
|
|
2884
|
+
}, [b?.getIcon(n), i]), C = s ?? (!b || b.disabled()), T = b?.getState(), P = {
|
|
2885
|
+
tabIndex: 0,
|
|
2886
|
+
ref: t,
|
|
2887
|
+
selected: !!T,
|
|
2888
|
+
icon: c === G.Toolbar ? l ? $e(w, a ?? b?.getLabel(n)) : w : M(Vt, {
|
|
2889
|
+
selected: T ?? !1,
|
|
2890
|
+
children: w
|
|
2891
|
+
}),
|
|
2892
|
+
disableRipple: !0,
|
|
2893
|
+
disabled: C,
|
|
2894
|
+
onMouseDown: y,
|
|
2895
|
+
onMouseUp: v,
|
|
2896
|
+
onKeyDown: k
|
|
2897
|
+
};
|
|
2898
|
+
let R;
|
|
2899
|
+
return R = c === G.Menuitem ? S(Nt, {
|
|
2900
|
+
...m,
|
|
2901
|
+
...P,
|
|
2902
|
+
children: [a ?? b?.getLabel(n), h]
|
|
2903
|
+
}) : M(It, {
|
|
2904
|
+
...m,
|
|
2905
|
+
...P,
|
|
2906
|
+
children: h
|
|
2907
|
+
}), a || b?.getLabel() ? (C && (R = M("div", { children: R })), R = M(sr, {
|
|
2908
|
+
commandKey: r,
|
|
2909
|
+
command: o,
|
|
2910
|
+
disabled: C,
|
|
2911
|
+
placement: c === G.Toolbar ? "bottom-start" : "right-start",
|
|
2912
|
+
shortcut: d,
|
|
2913
|
+
...u,
|
|
2914
|
+
children: R
|
|
2915
|
+
}), R) : R;
|
|
801
2916
|
}));
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
2917
|
+
ur.displayName = "CommandButton";
|
|
2918
|
+
var mr = M(Y, {}), hr = B(D((e, t) => {
|
|
2919
|
+
const { commandKey: r, groupKey: o, icon: n, commandState: i, label: a, variant: l = G.Toolbar, disabled: s, parseInput: c, inputProps: u, inputRef: m, ...h } = e, { ripple: f, trigger: g } = dr(), x = E(() => ({ onExecute() {
|
|
2920
|
+
g();
|
|
2921
|
+
} }), [g]), b = ce(r ?? [], x)[0], y = () => b?.getState()?.toString() || "", [v, k] = A(""), w = K(y()), C = le(() => {
|
|
2922
|
+
let e = v;
|
|
2923
|
+
if (c) try {
|
|
2924
|
+
e = c(v);
|
|
2925
|
+
} catch (e) {
|
|
2926
|
+
k(y());
|
|
2927
|
+
return;
|
|
2928
|
+
}
|
|
2929
|
+
w.current !== v ? (w.current = v, b?.execute(e)) : k(y());
|
|
2930
|
+
}, [
|
|
2931
|
+
y,
|
|
2932
|
+
b,
|
|
2933
|
+
v,
|
|
2934
|
+
c
|
|
2935
|
+
]);
|
|
2936
|
+
N(() => {
|
|
2937
|
+
k(y());
|
|
2938
|
+
}, [b?.getState()]);
|
|
2939
|
+
const T = E(() => {
|
|
2940
|
+
if (null === n) return mr;
|
|
2941
|
+
let e;
|
|
2942
|
+
return e = "function" == typeof n ? b ? n(b) : void 0 : n, e || (e = b?.getIcon()), e ? ("string" == typeof e && (e = M(Y, { iconKey: e })), e) : l === G.Toolbar || b?.getState() ? void 0 : mr;
|
|
2943
|
+
}, [b?.getIcon(), n]), P = E(() => void 0 === a ? b?.getLabel(o) : "function" == typeof a ? a() : a, [a, b?.getLabel(o)]), R = s ?? (!b || b.disabled()), D = E(() => M(d, {
|
|
2944
|
+
...h,
|
|
2945
|
+
sx: {
|
|
2946
|
+
paddingTop: "0px",
|
|
2947
|
+
paddingBottom: "0px"
|
|
2948
|
+
},
|
|
2949
|
+
component: "div",
|
|
2950
|
+
disableRipple: !0,
|
|
2951
|
+
onClick: (e) => e.stopPropagation(),
|
|
2952
|
+
onMouseDown: (e) => {
|
|
2953
|
+
0 === e.button && e.stopPropagation();
|
|
2954
|
+
},
|
|
2955
|
+
onMouseUp: (e) => {
|
|
2956
|
+
0 === e.button && e.stopPropagation();
|
|
2957
|
+
},
|
|
2958
|
+
children: M(p, {
|
|
2959
|
+
disabled: R,
|
|
2960
|
+
inputRef: m,
|
|
2961
|
+
inputProps: {
|
|
2962
|
+
tabIndex: 0,
|
|
2963
|
+
name: `input-${b?.getKey()}`,
|
|
2964
|
+
autoComplete: "off",
|
|
2965
|
+
...u
|
|
2966
|
+
},
|
|
2967
|
+
sx: {
|
|
2968
|
+
paddingTop: "0px",
|
|
2969
|
+
paddingBottom: "0px",
|
|
2970
|
+
paddingLeft: "0px",
|
|
2971
|
+
paddingRight: "0px",
|
|
2972
|
+
fontSize: (e) => `${Math.round(e.typography.fontSize)}px`,
|
|
2973
|
+
width: (e) => "3.2em",
|
|
2974
|
+
input: {
|
|
2975
|
+
padding: "0 0",
|
|
2976
|
+
textAlign: "center",
|
|
2977
|
+
MozAppearance: "textfield"
|
|
2978
|
+
},
|
|
2979
|
+
"input::-webkit-inner-spin-button": {
|
|
2980
|
+
WebkitAppearance: "none",
|
|
2981
|
+
margin: "0"
|
|
2982
|
+
},
|
|
2983
|
+
minHeight: "24px"
|
|
2984
|
+
},
|
|
2985
|
+
value: v,
|
|
2986
|
+
onFocus: (e) => {
|
|
2987
|
+
e.target?.select();
|
|
2988
|
+
},
|
|
2989
|
+
onKeyDown: (e) => {
|
|
2990
|
+
if (e.which === ee.Enter) y() !== v && (e.stopPropagation(), e.preventDefault(), C());
|
|
2991
|
+
else if (e.which === ee.Escape) y() !== v && (k(y()), setTimeout(() => {
|
|
2992
|
+
e.target?.select();
|
|
2993
|
+
}, 0), e.stopPropagation(), e.preventDefault());
|
|
2994
|
+
else {
|
|
2995
|
+
if (e.key.match("[-]")) return e.stopPropagation(), void e.preventDefault();
|
|
2996
|
+
if (e.key.match("[0-9.]") && (v + e.key).length > 4) return e.stopPropagation(), void e.preventDefault();
|
|
2997
|
+
if (e.which === ee.Space) return void e.preventDefault();
|
|
2998
|
+
}
|
|
2999
|
+
},
|
|
3000
|
+
onBlur: () => {
|
|
3001
|
+
C();
|
|
3002
|
+
},
|
|
3003
|
+
onChange: (e) => {
|
|
3004
|
+
if (e.target.value.length > 4) return e.stopPropagation(), void e.preventDefault();
|
|
3005
|
+
k(e.target.value);
|
|
3006
|
+
}
|
|
3007
|
+
})
|
|
3008
|
+
}), [
|
|
3009
|
+
v,
|
|
3010
|
+
R,
|
|
3011
|
+
u,
|
|
3012
|
+
m
|
|
3013
|
+
]), $ = {
|
|
3014
|
+
tabIndex: 0,
|
|
3015
|
+
ref: t,
|
|
3016
|
+
icon: T,
|
|
3017
|
+
disableRipple: !0,
|
|
3018
|
+
disabled: s || !b || b.disabled(),
|
|
3019
|
+
onMouseDown: (e) => {
|
|
3020
|
+
0 === e.button && e.preventDefault();
|
|
3021
|
+
},
|
|
3022
|
+
onMouseUp: (e) => {
|
|
3023
|
+
0 !== e.button || e.isPropagationStopped() || e.isDefaultPrevented() || e.isDefaultPrevented() || (e.preventDefault(), C());
|
|
3024
|
+
},
|
|
3025
|
+
onKeyDown: (e) => {
|
|
3026
|
+
e.keyCode !== ee.Enter && e.keyCode !== ee.Tab || C();
|
|
3027
|
+
}
|
|
3028
|
+
};
|
|
3029
|
+
let I;
|
|
3030
|
+
return I = l === G.Menuitem ? S(Nt, {
|
|
3031
|
+
...h,
|
|
3032
|
+
...$,
|
|
3033
|
+
children: [
|
|
3034
|
+
P,
|
|
3035
|
+
D,
|
|
3036
|
+
f
|
|
3037
|
+
]
|
|
3038
|
+
}) : M(It, {
|
|
3039
|
+
...h,
|
|
3040
|
+
...$,
|
|
3041
|
+
children: f
|
|
3042
|
+
}), b?.getLabel() ? ((b.disabled() || s) && (I = M("div", { children: I })), I = M(sr, {
|
|
3043
|
+
commandKey: r,
|
|
3044
|
+
placement: l === G.Toolbar ? "bottom-start" : "right-start",
|
|
3045
|
+
children: I
|
|
3046
|
+
}), I) : I;
|
|
3047
|
+
})), fr = B(D((e, t) => {
|
|
3048
|
+
const { variant: r = G.Toolbar, quickCommand: o, onQuickClick: n, commandState: i, disabled: a, label: l, icon: s, createPopupPanel: c, tooltip: d, selected: p, groupKey: u, ...m } = e, { ripple: h, trigger: f } = dr(), g = E(() => ({ onExecute() {
|
|
3049
|
+
f();
|
|
3050
|
+
} }), [f]), [x] = ce(o ?? [], g), { label: b, icon: y } = E(() => {
|
|
3051
|
+
let e = null;
|
|
3052
|
+
l && (e = "function" == typeof l ? x ? l(x) : null : l), e || (e = x?.getLabel?.(u));
|
|
3053
|
+
let t = s;
|
|
3054
|
+
return t || (t = x?.getIcon?.(u)), "string" == typeof t ? t = M(Y, { iconKey: t }) : "function" == typeof t && (t = x ? t(x) : void 0), {
|
|
3055
|
+
label: e,
|
|
3056
|
+
icon: t
|
|
3057
|
+
};
|
|
3058
|
+
}, [
|
|
3059
|
+
x,
|
|
3060
|
+
l,
|
|
3061
|
+
s
|
|
3062
|
+
]), v = {
|
|
3063
|
+
disabled: a || !(x || !o),
|
|
3064
|
+
ripple: h,
|
|
3065
|
+
onQuickClick: n,
|
|
3066
|
+
tooltip: d,
|
|
3067
|
+
label: b,
|
|
3068
|
+
icon: y
|
|
3069
|
+
};
|
|
3070
|
+
(b || d) && (v.createTooltip = ({ children: e }, t) => M(Rt, {
|
|
3071
|
+
label: b,
|
|
3072
|
+
description: d,
|
|
3073
|
+
disabled: t,
|
|
3074
|
+
children: e
|
|
3075
|
+
}));
|
|
3076
|
+
const k = le((e) => c?.(e), [c]), w = le((e) => x?.execute(i), [x]);
|
|
3077
|
+
return x ? (v.propsQuickButton = {}, v.propsQuickButton.createTooltip = ({ children: e, placement: t }, n) => M(sr, {
|
|
3078
|
+
commandKey: o,
|
|
3079
|
+
placement: t ?? r === G.Toolbar ? "bottom-start" : "right-start",
|
|
3080
|
+
disabled: n,
|
|
3081
|
+
children: e
|
|
3082
|
+
}), v.disabled = v.disabled ?? x?.disabled(), n || (v.onQuickClick = w)) : o && (v.onQuickClick = () => {}), v.selected = p ?? x?.getState(), v.createPopupPanel = k, r === G.Toolbar ? M(Ot, {
|
|
3083
|
+
...m,
|
|
3084
|
+
...v,
|
|
3085
|
+
ref: t
|
|
3086
|
+
}) : M(Kt, {
|
|
3087
|
+
...m,
|
|
3088
|
+
...v,
|
|
3089
|
+
ref: t
|
|
3090
|
+
});
|
|
869
3091
|
}));
|
|
870
|
-
|
|
871
|
-
const
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
3092
|
+
function gr(e, t = {}) {
|
|
3093
|
+
const { variant: r, dividerOrientation: o = "vertical", groupKey: n, commandState: i, propsCommandButton: a, propsCommandPopup: l, registry: s } = t, c = { ...a };
|
|
3094
|
+
void 0 !== r && (c.variant = r);
|
|
3095
|
+
const d = { ...l };
|
|
3096
|
+
void 0 !== r && (d.variant = r);
|
|
3097
|
+
const p = (e, t, r) => {
|
|
3098
|
+
const o = {
|
|
3099
|
+
...c,
|
|
3100
|
+
groupKey: n,
|
|
3101
|
+
commandKey: e,
|
|
3102
|
+
commandState: void 0 !== t ? t : i,
|
|
3103
|
+
label: r?.getLabel?.(n),
|
|
3104
|
+
icon: r?.getIcon?.(n),
|
|
3105
|
+
showLabel: r?.showLabel
|
|
3106
|
+
};
|
|
3107
|
+
return (r?.render ? r.render(o, n) : M(ur, { ...o })) ?? null;
|
|
3108
|
+
}, u = (e) => {
|
|
3109
|
+
const t = "string" == typeof e ? e : e.key, r = "string" == typeof e ? void 0 : e;
|
|
3110
|
+
if (!t) return ((e) => Array.isArray(e.members) ? e.render ? e.render({ ...d }, void 0) ?? null : M(xr, {
|
|
3111
|
+
...d,
|
|
3112
|
+
members: e.members,
|
|
3113
|
+
icon: e.getIcon?.(),
|
|
3114
|
+
label: e.getLabel?.(),
|
|
3115
|
+
tooltip: e.getDescription?.()
|
|
3116
|
+
}) : (e.render ? e.render({ ...d }, n) : null) ?? null)(e);
|
|
3117
|
+
const o = s?.get(t) ?? null;
|
|
3118
|
+
return o ? ((e, t, r) => {
|
|
3119
|
+
if (Array.isArray(e.members)) return e.render ? e.render({ ...d }, t) ?? null : M(xr, {
|
|
3120
|
+
...d,
|
|
3121
|
+
groupKey: t,
|
|
3122
|
+
icon: r?.getIcon?.(t),
|
|
3123
|
+
label: r?.getLabel?.(t),
|
|
3124
|
+
showLabel: r?.showLabel
|
|
3125
|
+
});
|
|
3126
|
+
if (e.render) return e.render({ ...d }, n) ?? null;
|
|
3127
|
+
const o = r ? {
|
|
3128
|
+
...e,
|
|
3129
|
+
...r
|
|
3130
|
+
} : e;
|
|
3131
|
+
return p(e.defaultKey ?? t, o.state, o);
|
|
3132
|
+
})(o, t, r) : p(t, r?.state, r);
|
|
3133
|
+
}, m = [];
|
|
3134
|
+
let h = 0, f = !1, g = !1;
|
|
3135
|
+
const x = e ?? [];
|
|
3136
|
+
for (let e = 0; e < x.length; e++) {
|
|
3137
|
+
const t = x[e];
|
|
3138
|
+
if (!t || "-" === t) {
|
|
3139
|
+
g && (f = !0);
|
|
3140
|
+
continue;
|
|
3141
|
+
}
|
|
3142
|
+
const r = u(t);
|
|
3143
|
+
r && (f && (m.push(M(Oe, { orientation: o }, "member-" + h++)), f = !1), m.push(R(r, { key: "member-" + h++ })), g = !0);
|
|
3144
|
+
}
|
|
3145
|
+
return m;
|
|
3146
|
+
}
|
|
3147
|
+
fr.displayName = "CommandPopupButton";
|
|
3148
|
+
var xr = B(D((e, t) => {
|
|
3149
|
+
const { groupKey: r, members: o, registry: n, quickCommand: i, icon: a, label: l, showLabel: s, tooltip: c, commandState: d, disabled: p, ...u } = e, m = se(), h = n ?? m, f = !o && r ? h.get(r) : null, g = f && Array.isArray(f.members) ? f : null, x = E(() => o ?? (r ? h.resolveMembers(r) : null) ?? null, [
|
|
3150
|
+
o,
|
|
3151
|
+
r,
|
|
3152
|
+
h
|
|
3153
|
+
]), b = r, y = i ?? g?.defaultKey, v = a ?? g?.getIcon?.(b), k = l ?? g?.getLabel?.(b), w = s ?? g?.showLabel, C = c ?? g?.getDescription?.(b), S = E(() => {
|
|
3154
|
+
const e = [], t = x ?? [];
|
|
3155
|
+
for (let r = 0; r < t.length; r++) {
|
|
3156
|
+
const o = t[r];
|
|
3157
|
+
o && "-" !== o && ("string" == typeof o ? e.push(o) : o.key && e.push(o.key));
|
|
3158
|
+
}
|
|
3159
|
+
return e;
|
|
3160
|
+
}, [x]), T = ce(y ? [y, ...S] : S), P = E(() => {
|
|
3161
|
+
for (let e = 0; e < T.length; e++) {
|
|
3162
|
+
const t = T[e];
|
|
3163
|
+
if (t && !t.disabled()) return !1;
|
|
3164
|
+
}
|
|
3165
|
+
return !0;
|
|
3166
|
+
}, [T]), R = z((e) => {
|
|
3167
|
+
const t = {};
|
|
3168
|
+
void 0 !== p && (t.disabled = p);
|
|
3169
|
+
const r = gr(x, {
|
|
3170
|
+
variant: G.Menuitem,
|
|
3171
|
+
dividerOrientation: "horizontal",
|
|
3172
|
+
groupKey: b,
|
|
3173
|
+
commandState: d,
|
|
3174
|
+
propsCommandButton: t,
|
|
3175
|
+
propsCommandPopup: t,
|
|
3176
|
+
registry: h
|
|
3177
|
+
});
|
|
3178
|
+
return xt({
|
|
3179
|
+
...e,
|
|
3180
|
+
children: r
|
|
3181
|
+
});
|
|
3182
|
+
}, [
|
|
3183
|
+
x,
|
|
3184
|
+
h,
|
|
3185
|
+
b,
|
|
3186
|
+
d,
|
|
3187
|
+
p
|
|
3188
|
+
]);
|
|
3189
|
+
return x ? M(fr, {
|
|
3190
|
+
ref: t,
|
|
3191
|
+
quickCommand: y,
|
|
3192
|
+
icon: v,
|
|
3193
|
+
label: k,
|
|
3194
|
+
showLabel: w,
|
|
3195
|
+
tooltip: C,
|
|
3196
|
+
commandState: d,
|
|
3197
|
+
disabled: p ?? P,
|
|
3198
|
+
createPopupPanel: R,
|
|
3199
|
+
...u
|
|
3200
|
+
}) : null;
|
|
907
3201
|
}));
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
3202
|
+
xr.displayName = "CommandGroup";
|
|
3203
|
+
var br = M(Y, { iconKey: "Check" }), yr = (e) => {
|
|
3204
|
+
const { commandKey: r, label: o, groupKey: n, icon: i, sx: a, ...l } = e, [s] = ce(r ?? []), c = E(() => {
|
|
3205
|
+
if (void 0 !== i) return i;
|
|
3206
|
+
let e = s?.getIcon(n);
|
|
3207
|
+
return e ? ("string" == typeof e && (e = M(Y, { iconKey: e })), e) : br;
|
|
3208
|
+
}, [
|
|
3209
|
+
i,
|
|
3210
|
+
n,
|
|
3211
|
+
s
|
|
3212
|
+
]);
|
|
3213
|
+
return S(t, {
|
|
3214
|
+
sx: {
|
|
3215
|
+
display: "flex",
|
|
3216
|
+
flexDirection: "row",
|
|
3217
|
+
textTransform: "none",
|
|
3218
|
+
alignItems: "center",
|
|
3219
|
+
fontSize: (e) => e.typography.subtitle2.fontSize,
|
|
3220
|
+
...a
|
|
3221
|
+
},
|
|
3222
|
+
...l,
|
|
3223
|
+
children: [c, M(b, {
|
|
3224
|
+
component: "div",
|
|
3225
|
+
sx: {
|
|
3226
|
+
whiteSpace: "nowrap",
|
|
3227
|
+
lineHeight: "1",
|
|
3228
|
+
paddingLeft: (e) => e.spacing(.25),
|
|
3229
|
+
paddingRight: (e) => e.spacing(.25),
|
|
3230
|
+
fontSize: "inherit"
|
|
3231
|
+
},
|
|
3232
|
+
children: o ?? s?.getLabel(n)
|
|
3233
|
+
})]
|
|
3234
|
+
});
|
|
3235
|
+
}, vr = B(D((e, t) => {
|
|
3236
|
+
const { sx: r, propsCommandButton: o, parentFloat: n, groupKey: i, members: a, registry: l, renderToolbarPalette: s, children: c, ...d } = e, p = se(), u = l ?? p, m = E(() => a ?? (i ? u.resolveMembers(i) : null) ?? null, [
|
|
3237
|
+
a,
|
|
3238
|
+
i,
|
|
3239
|
+
u,
|
|
3240
|
+
u.getVersion()
|
|
3241
|
+
]), h = he(t, () => ({}), []), [f, x] = A(null), { reference: b } = pe({
|
|
3242
|
+
label: "toolbar",
|
|
3243
|
+
anchor: h.current,
|
|
3244
|
+
parentFloat: n,
|
|
3245
|
+
createPopupPanel: null
|
|
3246
|
+
}), y = le(() => {
|
|
3247
|
+
const e = f;
|
|
3248
|
+
e && requestAnimationFrame(() => {
|
|
3249
|
+
h.current?.contains(document.activeElement) && e.focus();
|
|
3250
|
+
});
|
|
3251
|
+
}, [f]), v = E(() => ({
|
|
3252
|
+
dense: !0,
|
|
3253
|
+
outlined: !1
|
|
3254
|
+
}), []), k = E(() => ({ ...o || {} }), [o]), w = E(() => ({
|
|
3255
|
+
...v,
|
|
3256
|
+
...k
|
|
3257
|
+
}), [v, k]), C = E(() => ({ ...k }), [w, o]);
|
|
3258
|
+
let S = 0;
|
|
3259
|
+
v.dense || (S += 2), v.outlined && S++;
|
|
3260
|
+
let T = 2;
|
|
3261
|
+
v.dense || (T = 4);
|
|
3262
|
+
const P = E(() => {
|
|
3263
|
+
const e = {
|
|
3264
|
+
propsCommandButton: w,
|
|
3265
|
+
propsCommandPopup: {
|
|
3266
|
+
...C,
|
|
3267
|
+
...o
|
|
3268
|
+
}
|
|
3269
|
+
};
|
|
3270
|
+
return s ? s(e) : m ? M(Gt, { children: gr(m, {
|
|
3271
|
+
dividerOrientation: "vertical",
|
|
3272
|
+
groupKey: i,
|
|
3273
|
+
propsCommandButton: e.propsCommandButton,
|
|
3274
|
+
propsCommandPopup: e.propsCommandPopup,
|
|
3275
|
+
registry: u
|
|
3276
|
+
}) }) : null;
|
|
3277
|
+
}, [
|
|
3278
|
+
w,
|
|
3279
|
+
C,
|
|
3280
|
+
o,
|
|
3281
|
+
s,
|
|
3282
|
+
m,
|
|
3283
|
+
i,
|
|
3284
|
+
u
|
|
3285
|
+
]);
|
|
3286
|
+
return M(g, {
|
|
3287
|
+
variant: "dense",
|
|
3288
|
+
sx: {
|
|
3289
|
+
minHeight: "unset",
|
|
3290
|
+
height: "unset",
|
|
3291
|
+
paddingTop: `${T}px`,
|
|
3292
|
+
paddingBottom: `${T}px`,
|
|
3293
|
+
paddingLeft: "6px !important",
|
|
3294
|
+
paddingRight: "6px !important",
|
|
3295
|
+
flex: "1 1 0%",
|
|
3296
|
+
alignItems: "center",
|
|
3297
|
+
userSelect: "none",
|
|
3298
|
+
flexGrow: 1,
|
|
3299
|
+
display: "flex",
|
|
3300
|
+
overflow: "hidden",
|
|
3301
|
+
...r
|
|
3302
|
+
},
|
|
3303
|
+
ref: h,
|
|
3304
|
+
onFocus: (e) => {
|
|
3305
|
+
e.relatedTarget && !f && x(e.relatedTarget);
|
|
3306
|
+
},
|
|
3307
|
+
onBlur: (e) => {
|
|
3308
|
+
f && !h?.current?.contains(e.relatedTarget) && x(null);
|
|
3309
|
+
},
|
|
3310
|
+
onKeyDown: (e) => {
|
|
3311
|
+
f && e.which === ee.Escape && f.focus();
|
|
3312
|
+
},
|
|
3313
|
+
...d,
|
|
3314
|
+
children: M("div", {
|
|
3315
|
+
ref: h,
|
|
3316
|
+
style: {
|
|
3317
|
+
flex: "1 1 100%",
|
|
3318
|
+
display: "flex",
|
|
3319
|
+
flexWrap: "wrap",
|
|
3320
|
+
rowGap: `${T}px`,
|
|
3321
|
+
columnGap: `${S}px`,
|
|
3322
|
+
alignItems: "center",
|
|
3323
|
+
maxWidth: "100%"
|
|
3324
|
+
},
|
|
3325
|
+
children: M(Z, {
|
|
3326
|
+
value: b,
|
|
3327
|
+
children: M(X, {
|
|
3328
|
+
value: y,
|
|
3329
|
+
children: P
|
|
3330
|
+
})
|
|
3331
|
+
})
|
|
3332
|
+
})
|
|
3333
|
+
});
|
|
935
3334
|
}));
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
gt as SimpleTooltip,
|
|
974
|
-
ze as StackTrace,
|
|
975
|
-
$e as StackTraceErrorPanel,
|
|
976
|
-
Ye as ThemeMode,
|
|
977
|
-
Ke as ThemedIcon,
|
|
978
|
-
it as createDownArrow,
|
|
979
|
-
Ue as createExhibitTheme,
|
|
980
|
-
fe as createScrollButton,
|
|
981
|
-
Ae as createStrokeShadowFilter,
|
|
982
|
-
rt as defaultCreatePopupPanel,
|
|
983
|
-
qe as elevateColor,
|
|
984
|
-
Ge as getScrollbarCssVariables,
|
|
985
|
-
_e as hexToRGB,
|
|
986
|
-
Qe as overlayAlpha,
|
|
987
|
-
he as renderScrollButtonEdge,
|
|
988
|
-
be as renderScrollButtonEnd,
|
|
989
|
-
xe as renderScrollButtonStart,
|
|
990
|
-
Xe as scrollbarTheming,
|
|
991
|
-
Fe as strokeShadowFilter,
|
|
992
|
-
kt as toShortcutElements,
|
|
993
|
-
ht as useFloatStack,
|
|
994
|
-
Ut as useInputDialog,
|
|
995
|
-
Lt as useLazyWindow,
|
|
996
|
-
qt as useOptionsDialog,
|
|
997
|
-
Je as useResolvedThemeMode
|
|
998
|
-
};
|
|
3335
|
+
vr.displayName = "CommandToolbar";
|
|
3336
|
+
var kr = B(D((e, t) => {
|
|
3337
|
+
const { groupKey: r, members: o, registry: n, projectAs: i = "quick", defaultIcon: a, ...l } = e, s = se(), c = n ?? s, d = E(() => o ?? (r ? c.resolveMembers(r) : null) ?? null, [
|
|
3338
|
+
o,
|
|
3339
|
+
r,
|
|
3340
|
+
c
|
|
3341
|
+
]), p = E(() => {
|
|
3342
|
+
const e = [], t = d ?? [];
|
|
3343
|
+
for (let r = 0; r < t.length; r++) {
|
|
3344
|
+
const o = t[r];
|
|
3345
|
+
o && "-" !== o && ("string" == typeof o ? e.push(o) : o.key && e.push(o.key));
|
|
3346
|
+
}
|
|
3347
|
+
return e;
|
|
3348
|
+
}, [d]), u = ce(p);
|
|
3349
|
+
let m = null, h = null;
|
|
3350
|
+
for (let e = 0; !m && e < u.length; e++) {
|
|
3351
|
+
const t = u[e];
|
|
3352
|
+
t && !t.disabled() && t.getState() && (m = p[e], h = t.getIcon());
|
|
3353
|
+
}
|
|
3354
|
+
const f = "icon" === i ? {
|
|
3355
|
+
icon: h ?? a,
|
|
3356
|
+
quickCommand: void 0
|
|
3357
|
+
} : {
|
|
3358
|
+
quickCommand: m ?? p[0],
|
|
3359
|
+
icon: void 0
|
|
3360
|
+
};
|
|
3361
|
+
return M(xr, {
|
|
3362
|
+
ref: t,
|
|
3363
|
+
groupKey: r,
|
|
3364
|
+
members: o,
|
|
3365
|
+
registry: c,
|
|
3366
|
+
...l,
|
|
3367
|
+
...f
|
|
3368
|
+
});
|
|
3369
|
+
}));
|
|
3370
|
+
kr.displayName = "ToggleGroupButton";
|
|
3371
|
+
export { We as AnimatedBouncingEllipsisIcon, Ke as AnimatedCircleIcon, Fe as AnimatedClockIcon, Ae as AnimatedFadingEllipsisIcon, je as AnimatedLoadingPanel, He as AnimatedOrbitIcon, Ve as AnimatedTraversingEllipsisIcon, tt as ArrowDownIcon, rt as ArrowRightIcon, Je as ChipStrip, ft as ClosingReason, ur as CommandButton, xr as CommandGroup, fr as CommandPopupButton, vr as CommandToolbar, sr as CommandTooltip, Mt as ContextMenu, Oe as ExhibitDivider, yt as ExhibitFloatPanel, kt as ExhibitFloatProvider, It as ExhibitIconButton, Lt as ExhibitMenuHeader, Nt as ExhibitMenuItem, At as ExhibitOptionButton, Ot as ExhibitPopupIconButton, Kt as ExhibitPopupMenuItem, Rt as ExhibitTooltip, hr as InputCommandButton, Zt as InternalWindow, yr as LabelIcon, ke as ModalProvider, wt as NestingPopupButton, nr as OptionsDialog, Gt as OverflowPalette, ht as PopupAutoFocus, gt as PopupButtonType, Vt as SelectedIcon, St as SimpleTooltip, Xe as StackTrace, Ye as StackTraceErrorPanel, kr as ToggleGroupButton, De as buttonLabelSx, $e as composeButtonContent, bt as createDownArrow, pt as createExhibitTheme, ze as createScrollButton, et as createStrokeShadowFilter, xt as defaultCreatePopupPanel, at as elevateColor, dt as elevatedSurface, ut as getScrollbarCssVariables, it as hexToRGB, tr as optionIdentity, lt as overlayAlpha, ct as raisedSurface, st as raisedSurfaceAt, Ut as registerUtilsMuiLocales, gr as renderMembers, Be as renderScrollButtonEdge, Le as renderScrollButtonEnd, Ne as renderScrollButtonStart, mt as scrollbarTheming, Ze as strokeShadowFilter, Pt as toShortcutElements, lr as useInputDialog, Xt as useLazyWindow, ir as useOptionsDialog };
|