@sheetxl/studio-mui 0.7.7 → 0.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/{BxlQ6aLh5_jUvk9w.cjs → Bt0-HMKtnBRB6IpI.cjs} +10 -10
- package/browser/cjs/{BJ4pZo7s81ynDlzw.cjs → CJW4-NCdaLzNEwgK.cjs} +1 -1
- package/browser/cjs/{j0lD5RrJ86CRlUNT.cjs → D36j1nR6-lEwM7Ht.cjs} +2 -2
- package/browser/cjs/{CJSNNa8ySxzuEmoy.cjs → D9RcTPcL8Gcds6uC.cjs} +2 -2
- package/browser/cjs/{Bpq9GrV7al7xxJ_d.cjs → DPenF_1mYgI8WaQf.cjs} +1 -1
- package/browser/cjs/{DeoOsY5TkIAydt9W.cjs → DQ1bXdi-D0uVKGFA.cjs} +2 -2
- package/browser/cjs/{Cg95aBJ4kuUq7jrz.cjs → Q234HX63V75h22HJ.cjs} +1 -1
- package/browser/cjs/{CUND2W1xMwqPOHwD.cjs → UoOVKSpyeYQ3Z04Y.cjs} +3 -3
- package/browser/cjs/{BCf8BQb2c8ANexW4.cjs → WN5FOSGC22Jy3dxz.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{Dcoq8P2O8-40waHl.cjs → rrppjlxhsrfwBStx.cjs} +2 -2
- package/browser/cjs/{Bf70UQlMT3b0NoOZ.cjs → zFlqPWNVl7CHv7Iw.cjs} +1 -1
- package/browser/esm/{7tCRjNmDM5kf3BFa.mjs → 5Fbp4sZTl6CHhmHk.mjs} +2 -2
- package/browser/esm/{BWxmPJd4f8qZMxaa.mjs → BD3NSZsAOvF6yczu.mjs} +3 -3
- package/browser/esm/{db-2uDA7mYS4QpHj.mjs → BiazW77hCkbuJPiW.mjs} +1 -1
- package/browser/esm/{CzdBzjYgP1i3pkPL.mjs → CUiplQS9rUodJwPi.mjs} +857 -857
- package/browser/esm/{DFppS_p4spncePDm.mjs → CagpAQXgCxrJrdGJ.mjs} +2 -2
- package/browser/esm/{CRDu7VFAa8NGcoHj.mjs → Ci4cqU4bR1IUSqrT.mjs} +1 -1
- package/browser/esm/{nzc1811Pk5-sKDu5.mjs → CoIXNZVIp9Q12qM2.mjs} +1 -1
- package/browser/esm/{BbHGWXif6ytyfyHI.mjs → Cp-QoTwVeQkQClpI.mjs} +1 -1
- package/browser/esm/{BkhHyCmy1MwVFS1b.mjs → D7PjwOCMi075qK5G.mjs} +2 -2
- package/browser/esm/{Cd02kMBZDsozIA98.mjs → Dx4t6SbPV2HSf_ub.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{Bo3cXzeDcP_Q9YvX.mjs → wenu-h35nL2_uEZp.mjs} +2 -2
- package/node/esm/{BVKo3uc0IreLNkkN.mjs → B21Usvp_sTqMHAZ4.mjs} +1 -1
- package/node/esm/{X3qO0PKREgY9FMZU.mjs → BAgtosqQwtrUsOYl.mjs} +1 -1
- package/node/esm/{rOozeXREjiU8jjPd.mjs → CYU-oRRhaNiOTVNa.mjs} +1 -1
- package/node/esm/{BnGsbrQwjcaUFAdt.mjs → Cfzjf7vBs29sO_g3.mjs} +1 -1
- package/node/esm/{BfnEq4EhLf8jJ0Gp.mjs → D1n7HgHfLVQZ0KhP.mjs} +1 -1
- package/node/esm/{CQhaL28vV1X6Xt2N.mjs → D60xUWK_BS-7PMLM.mjs} +1 -1
- package/node/esm/{BgR1PWucIb0Zucr4.mjs → DWhJA7EI9CmoBPDY.mjs} +1 -1
- package/node/esm/{BimlBylqyslj9fNg.mjs → DmdldJQanZCNdfA5.mjs} +1 -1
- package/node/esm/{DB2ryaj4_Y8Lgyy_.mjs → GzNLdpzukdCxYbbC.mjs} +1 -1
- package/node/esm/index.mjs +390 -390
- package/package.json +8 -8
- package/types/index.d.ts +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Color as gt, IColor as yr, ITheme as
|
|
2
|
-
import { StyledStrokePath as
|
|
1
|
+
import { Color as gt, IColor as yr, ITheme as Dl, CommonUtils as Ke, IBorder as we, IFont as Ht, NumberFormat as mt, IFontCollection as Pl, IStyle as ce, ITextFrame as Rl, Table as Vn, IFill as xn, CoordUtils as Ml, ISheet as Ft, LicenseManager as Eo, Workbook as On, TypesUtils as Nl } from "@sheetxl/sdk";
|
|
2
|
+
import { StyledStrokePath as Fl, StaticBorderRenderer as _n, FontUtils as Ol, useModelListener as We, createCellEditStateFromCell as Bl, SheetCellEditor as Al, ScriptEditor as Il, useTaskPaneArea as wa, DefaultTaskPaneRegistry as Un, useDocThemes as Gn, TabStrip as Ll, SheetElement as zl, SheetScrollbar as wr, PictureEditor as Hl, ChartEditor as Wl, EmptyFrame as jl, LogoNoPaddingIcon as $l, TaskPaneArea as Vl, TaskPaneProvider as _l } from "@sheetxl/react";
|
|
3
3
|
import { jsxs as H, Fragment as le, jsx as o } from "react/jsx-runtime";
|
|
4
|
-
import re, { memo as q, forwardRef as X, useMemo as W, useCallback as U, isValidElement as qn, useState as _, useEffect as de, Suspense as Sa, useRef as xe, createElement as Ee, useReducer as tn, version as
|
|
5
|
-
import { Box as B, Typography as Re, IconButton as st, MenuItem as va, Divider as mo, Button as Jo, SvgIcon as ka, Input as Kn, FormControlLabel as Rt, Checkbox as Mt, FormControl as Xn, TextField as Ca, InputAdornment as
|
|
6
|
-
import { CommandButton as O, ExhibitDivider as J, defaultCreatePopupPanel as ge, CommandPopupButton as ve, InputCommandButton as
|
|
7
|
-
import { useCommands as Ie, CommandButtonType as ie, useCallbackRef as Y, ReactUtils as an, KeyCodes as me, DynamicIcon as he, useCommand as jt, useMouseDownAndHoldListener as Cr, useEditMode as ln, useNotifier as sn, NotifierType as wt, useImperativeElement as Ct, SplitPane as Qn, RoundedTab as
|
|
4
|
+
import re, { memo as q, forwardRef as X, useMemo as W, useCallback as U, isValidElement as qn, useState as _, useEffect as de, Suspense as Sa, useRef as xe, createElement as Ee, useReducer as tn, version as Ul, useLayoutEffect as St, useImperativeHandle as Gl, useContext as ql, cloneElement as Kl, Component as Xl } from "react";
|
|
5
|
+
import { Box as B, Typography as Re, IconButton as st, MenuItem as va, Divider as mo, Button as Jo, SvgIcon as ka, Input as Kn, FormControlLabel as Rt, Checkbox as Mt, FormControl as Xn, TextField as Ca, InputAdornment as Yl, Slider as Zl, Paper as no, CircularProgress as Ql, Select as Jl, Tabs as Ta, Tab as Ea, useMediaQuery as Da, Card as es, CardActions as ts, Collapse as os, DialogTitle as ns, CssBaseline as rs } from "@mui/material";
|
|
6
|
+
import { CommandButton as O, ExhibitDivider as J, defaultCreatePopupPanel as ge, CommandPopupButton as ve, InputCommandButton as as, SimpleTooltip as vt, LoadingPanel as Wt, PopupButtonType as tt, ExhibitPopupIconButton as kt, ExhibitPopupMenuItem as Yn, ExhibitMenuItem as ct, createStrokeShadowFilter as Sr, strokeShadowFilter as is, ExhibitTooltip as ot, ExhibitIconButton as ft, CommandTooltip as Zn, SelectedIcon as on, LabelIcon as nn, ExhibitMenuHeader as ro, ContextMenu as Pa, ExhibitOptionButton as ls, hexToRGB as vr, useFloatStack as ao, SimpleCommandPopupButton as lt, elevateColor as rt, CommandToolbar as rn, createScrollEdgeButton as ss, createScrollEndButton as cs, createScrollStartButton as ds, scrollbarTheming as ps, StackTrace as us, useResolvedThemeMode as Ra, ThemeMode as Bn, useModal as ms, useLazyWindow as hs, useOptionsDialog as gs, useInputDialog as fs, AnimatedTraversingEllipsisIcon as bs, ErrorPanel as xs, createExhibitTheme as kr, ModalProvider as ys } from "@sheetxl/utils-mui";
|
|
7
|
+
import { useCommands as Ie, CommandButtonType as ie, useCallbackRef as Y, ReactUtils as an, KeyCodes as me, DynamicIcon as he, useCommand as jt, useMouseDownAndHoldListener as Cr, useEditMode as ln, useNotifier as sn, NotifierType as wt, useImperativeElement as Ct, SplitPane as Qn, RoundedTab as ws, SimpleCommand as He, Command as be, KeyModifiers as fe, CommandGroup as Jn, ToolTipPlacement as ho, ScrollPane as Ss, useUndoManager as vs, DefaultReactNotifier as ks, NotifierProvider as Cs, DefaultDynamicIconService as Ma, UncaughtErrorBoundary as Ts, ReactErrorBoundary as Es } from "@sheetxl/utils-react";
|
|
8
8
|
import { useTheme as Xe, alpha as ye, getOverlayAlpha as Be, ThemeProvider as Na } from "@mui/material/styles";
|
|
9
9
|
import { alpha as Qe } from "@mui/system";
|
|
10
|
-
import Qt, { createPortal as
|
|
11
|
-
import { CommonUtils as to, ChainedError as An, ExpectedError as
|
|
10
|
+
import Qt, { createPortal as Ds } from "react-dom";
|
|
11
|
+
import { CommonUtils as to, ChainedError as An, ErrorUtils as Ps, ExpectedError as Rs, PartialError as Ms, UndoManager as Ns } from "@sheetxl/utils";
|
|
12
12
|
import { IOUtils as Jt } from "@sheetxl/io";
|
|
13
13
|
/**
|
|
14
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
14
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.8
|
|
15
15
|
*
|
|
16
16
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
17
17
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -29,7 +29,7 @@ function Ce() {
|
|
|
29
29
|
for (var n, a, t = 0, e = "", r = arguments.length; t < r; t++) (n = arguments[t]) && (a = Fa(n)) && (e && (e += " "), e += a);
|
|
30
30
|
return e;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
32
|
+
const Fs = q(X((n, a) => {
|
|
33
33
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, parentFloat: c, ...p } = n, i = Ie(t, ["formatAlignLeftToggle", "formatAlignCenterToggle", "formatAlignRightToggle", "formatAlignJustifyToggle", "formatAlignCenterContinuousToggle", "formatAlignFillToggle", "formatAlignDistributedHorizontalToggle"]), s = W(() => {
|
|
34
34
|
for (let g = 0; g < i.length; g++) if (i[g]?.state()) return i[g];
|
|
35
35
|
return i[0];
|
|
@@ -38,11 +38,11 @@ const Ms = q(X((n, a) => {
|
|
|
38
38
|
const g = { ...e };
|
|
39
39
|
return delete g.beforeExecute, g;
|
|
40
40
|
}, [e]), x = U((g, m) => {
|
|
41
|
-
const u = { variant: ie.Menuitem, commandHook: e, scope: r, disabled: l },
|
|
42
|
-
return ge({ ...g, children:
|
|
41
|
+
const u = { variant: ie.Menuitem, commandHook: e, scope: r, disabled: l }, b = H(le, { children: [o(O, { ...u, command: m.getCommand("formatAlignLeftToggle") }), o(O, { ...u, command: m.getCommand("formatAlignCenterToggle") }), o(O, { ...u, command: m.getCommand("formatAlignRightToggle") }), o(O, { ...u, command: m.getCommand("formatAlignJustifyToggle") }), o(J, { orientation: "horizontal" }), o(O, { ...u, command: m.getCommand("formatAlignCenterContinuousToggle") }), o(O, { ...u, command: m.getCommand("formatAlignFillToggle") }), o(O, { ...u, command: m.getCommand("formatAlignDistributedHorizontalToggle") })] }), y = H(B, { sx: { className: Ce("quick-buttons"), display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (h) => h.stopPropagation(), children: [o(O, { command: m.getCommand("formatIndentDecrease"), commandHook: d, scope: r, disabled: l }), o(O, { command: m.getCommand("formatIndentIncrease"), commandHook: d, scope: r, disabled: l })] }), f = H(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...p, children: [y, o(J, { orientation: "horizontal" }), o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: b })] });
|
|
42
|
+
return ge({ ...g, children: f });
|
|
43
43
|
}, [l, e]);
|
|
44
44
|
return o(ve, { ref: a, parentFloat: c, commands: t, commandHook: e, scope: r, createPopupPanel: x, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: s?.key(), icon: s?.icon() ?? "FormatAlignLeft", ...p });
|
|
45
|
-
})),
|
|
45
|
+
})), Os = q(X((n, a) => {
|
|
46
46
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = Ie(t, ["formatAlignTopToggle", "formatAlignMiddleToggle", "formatAlignBottomToggle", "formatAlignJustifyVerticalToggle", "formatAlignDistributedVerticalToggle"]), i = W(() => {
|
|
47
47
|
for (let d = 0; d < p.length; d++) if (p[d]?.state()) return p[d];
|
|
48
48
|
return p[0];
|
|
@@ -51,7 +51,7 @@ const Ms = q(X((n, a) => {
|
|
|
51
51
|
return ge({ ...d, children: m });
|
|
52
52
|
}, [l, e]);
|
|
53
53
|
return o(ve, { ref: a, commands: t, commandHook: e, createPopupPanel: s, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: i?.icon() ?? "TextVerticalBottom", ...c });
|
|
54
|
-
})),
|
|
54
|
+
})), Bs = q(X((n, a) => {
|
|
55
55
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = Ie(t, ["formatTextOverflowVisibleToggle", "formatTextOverflowWrapToggle", "formatTextOverflowClipToggle", "formatTextOverflowShrinkToggle"]), i = W(() => {
|
|
56
56
|
for (let d = 0; d < p.length; d++) if (p[d]?.state()) return p[d];
|
|
57
57
|
return p[0];
|
|
@@ -60,7 +60,7 @@ const Ms = q(X((n, a) => {
|
|
|
60
60
|
return ge({ ...d, children: m });
|
|
61
61
|
}, [l, e, r]);
|
|
62
62
|
return o(ve, { ref: a, commands: t, commandHook: e, scope: r, label: "Text Overflow", tooltip: "Configure how text behaves when it doesn't fit within a cell.", createPopupPanel: s, icon: i?.icon() ?? "TextHorizontalOverflow", ...c });
|
|
63
|
-
})),
|
|
63
|
+
})), As = q(X((n, a) => {
|
|
64
64
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = Ie(t, ["formatTextRotate0", "formatTextRotate315", "formatTextRotate45", "formatTextRotate90", "formatTextRotate270", "formatSubscriptToggle", "formatTextRotateCustom"]), i = W(() => {
|
|
65
65
|
const x = p.length;
|
|
66
66
|
for (let g = 0; g < x; g++) {
|
|
@@ -69,11 +69,11 @@ const Ms = q(X((n, a) => {
|
|
|
69
69
|
}
|
|
70
70
|
return p[1];
|
|
71
71
|
}, [p]), s = U((x, g) => {
|
|
72
|
-
const m = { variant: ie.Menuitem, commandHook: e, scope: r, disabled: l }, u = H(le, { children: [o(O, { ...m, command: g.getCommand("formatTextRotate0") }), o(J, { orientation: "horizontal" }), o(O, { ...m, command: g.getCommand("formatTextRotate315") }), o(O, { ...m, command: g.getCommand("formatTextRotate45") }), o(O, { ...m, command: g.getCommand("formatTextRotate90") }), o(O, { ...m, command: g.getCommand("formatTextRotate270") }), o(J, { orientation: "horizontal" }), o(
|
|
72
|
+
const m = { variant: ie.Menuitem, commandHook: e, scope: r, disabled: l }, u = H(le, { children: [o(O, { ...m, command: g.getCommand("formatTextRotate0") }), o(J, { orientation: "horizontal" }), o(O, { ...m, command: g.getCommand("formatTextRotate315") }), o(O, { ...m, command: g.getCommand("formatTextRotate45") }), o(O, { ...m, command: g.getCommand("formatTextRotate90") }), o(O, { ...m, command: g.getCommand("formatTextRotate270") }), o(J, { orientation: "horizontal" }), o(as, { ...m, command: g.getCommand("formatTextRotateCustom"), label: "Custom" })] });
|
|
73
73
|
return ge({ ...x, children: u });
|
|
74
74
|
}, [l, e, r, t]), d = W(() => (t.getCommand("formatTextRotateCustom")?.state() ?? 0) !== 0, [p]);
|
|
75
75
|
return o(ve, { ref: a, commands: t, commandHook: e, scope: r, selected: d, label: "Text Orientation", tooltip: "Rotate your text diagonally or vertically. This is a great way to label narrow columns.", createPopupPanel: s, quickCommand: d ? "formatTextRotate0" : "formatTextRotate315", icon: i?.icon() ?? "TextRotation315", ...c });
|
|
76
|
-
})),
|
|
76
|
+
})), Is = { Preset: "preset", Custom: "custom" }, Ro = { Start: "start", End: "end" }, yn = {}, Ls = (n, a, t, e) => {
|
|
77
77
|
const r = n + "-" + a + "-" + t + (e ? "-server" : "");
|
|
78
78
|
if (yn[r]) return yn[r];
|
|
79
79
|
const l = ((c, p, i, s) => {
|
|
@@ -84,15 +84,15 @@ const Ms = q(X((n, a) => {
|
|
|
84
84
|
return x ? (x.fillStyle = c, x.fillRect(0, 0, d.width, d.height), x.fillStyle = p, x.fillRect(0, 0, i, i), x.translate(i, i), x.fillRect(0, 0, i, i), d.toDataURL()) : null;
|
|
85
85
|
})(n, a, t, e);
|
|
86
86
|
return yn[r] = l, l;
|
|
87
|
-
},
|
|
88
|
-
const { className: a, style: t = an.EmptyCssProperties, white: e = "transparent", grey: r = "grey", size: l = 8, borderRadius: c, boxShadow: p, renderers: i =
|
|
87
|
+
}, zs = {}, Hs = q((n) => {
|
|
88
|
+
const { className: a, style: t = an.EmptyCssProperties, white: e = "transparent", grey: r = "grey", size: l = 8, borderRadius: c, boxShadow: p, renderers: i = zs, children: s, ...d } = n, x = s, g = W(() => Object.assign({ borderRadius: c, boxShadow: p, position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", background: `url(${Ls(e, r, l, i?.canvas)}) center left` }, t), [e, r, l, i]);
|
|
89
89
|
return qn(s) ? re.cloneElement(s, { ...x.props }) : o("div", { style: g, ...d });
|
|
90
|
-
}),
|
|
91
|
-
const { selectedColor: a, onSelectColor: t, onPreviewColor: e, onClick: r, onKeyDown: l, onMouseOver: c, onMouseLeave: p, onFocus: i, style: s = an.EmptyCssProperties, children: d, alphaWhite: x, alphaGrey: g, darkMode: m, alphaCheckSize: u = 7, ...
|
|
90
|
+
}), Ws = q((n) => {
|
|
91
|
+
const { selectedColor: a, onSelectColor: t, onPreviewColor: e, onClick: r, onKeyDown: l, onMouseOver: c, onMouseLeave: p, onFocus: i, style: s = an.EmptyCssProperties, children: d, alphaWhite: x, alphaGrey: g, darkMode: m, alphaCheckSize: u = 7, ...b } = n;
|
|
92
92
|
if (!a) throw new Error("a selectedColor is required");
|
|
93
93
|
const y = U((C) => {
|
|
94
94
|
r?.(C), C.isDefaultPrevented() || (C.ctrlKey ? e?.(a.toRGBA()) : t?.(a.toRGBA()));
|
|
95
|
-
}, [t, e, r, a]),
|
|
95
|
+
}, [t, e, r, a]), f = U((C) => {
|
|
96
96
|
c?.(C), C.isDefaultPrevented() || e?.(a.toRGBA());
|
|
97
97
|
}, [e, c, a]), h = U((C) => {
|
|
98
98
|
p?.(C), C.isDefaultPrevented();
|
|
@@ -100,17 +100,17 @@ const Ms = q(X((n, a) => {
|
|
|
100
100
|
i?.(C), C.isDefaultPrevented() || e?.(a.toRGBA());
|
|
101
101
|
}, [e, i, a]), v = U((C) => {
|
|
102
102
|
l?.(C), C.isDefaultPrevented() || C.keyCode === me.Enter && t?.(a.toRGBA());
|
|
103
|
-
}, [t, l, a]), S = W(() => a.toRGBA().alpha === 1 ? null : o(
|
|
104
|
-
return H("div", { style: { position: "absolute", height: "100%", width: "100%", top: "0px", left: "0px", cursor: "pointer", outline: "none", ...s }, tabIndex: 0, ...
|
|
103
|
+
}, [t, l, a]), S = W(() => a.toRGBA().alpha === 1 ? null : o(Hs, { size: u, white: x, grey: g, style: { position: "absolute", width: "calc(100% - 1.5px)", height: "calc(100% - 1.5px)", top: "0.75px", left: "0.75px" } }), [x, g, a]);
|
|
104
|
+
return H("div", { style: { position: "absolute", height: "100%", width: "100%", top: "0px", left: "0px", cursor: "pointer", outline: "none", ...s }, tabIndex: 0, ...b, onClick: y, onKeyDown: v, onMouseOver: f, onMouseLeave: h, onFocus: w, children: [S, o("div", { style: { position: "absolute", top: "0px", left: "0px", height: "100%", width: "100%", background: a.toCSS(m) }, children: d })] });
|
|
105
105
|
}), er = q((n) => {
|
|
106
|
-
const { schemeColorLookup: a, selectedColor: t, previewColor: e, colorDef: r, onSelectColorDef: l, onPreviewColorDef: c, swatchProps: p, defaultButtonSize: i = 24, isLarge: s = !1, compareRGB: d = !1, darkMode: x = !1, ...g } = n, m = new gt({ val: r.definition.val, adjs: r.definition.adjs }, (S) => a(S)), u = d ? m.toRGBA().toString() : m.toString(),
|
|
107
|
-
|
|
108
|
-
const h = m.adjust(
|
|
106
|
+
const { schemeColorLookup: a, selectedColor: t, previewColor: e, colorDef: r, onSelectColorDef: l, onPreviewColorDef: c, swatchProps: p, defaultButtonSize: i = 24, isLarge: s = !1, compareRGB: d = !1, darkMode: x = !1, ...g } = n, m = new gt({ val: r.definition.val, adjs: r.definition.adjs }, (S) => a(S)), u = d ? m.toRGBA().toString() : m.toString(), b = t && (d ? t.toRGBA().toString() : t.toString()) === u, y = e && (d ? e.toRGBA().toString() : e.toString()) === u, f = [];
|
|
107
|
+
f.push({ [yr.AdjustmentType.Inv]: !0 }), f.push({ [yr.AdjustmentType.Alpha]: 100 });
|
|
108
|
+
const h = m.adjust(f), w = U(() => {
|
|
109
109
|
l?.(r);
|
|
110
110
|
}, [l, r]), v = U((S) => {
|
|
111
111
|
c?.(S ? r : null);
|
|
112
112
|
}, [c, r]);
|
|
113
|
-
return o(vt, { disableInteractive: !0, PopperProps: { style: { pointerEvents: "none" }, disablePortal: !0, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: !0, options: { boundariesElement: "viewport" } }] } }, title: r.description, placement: "bottom-start", children: o("div", { style: { width: i * (s ? 1.2 : 1) + "px", height: i * (s ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...g, children: H(
|
|
113
|
+
return o(vt, { disableInteractive: !0, PopperProps: { style: { pointerEvents: "none" }, disablePortal: !0, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: !0, options: { boundariesElement: "viewport" } }] } }, title: r.description, placement: "bottom-start", children: o("div", { style: { width: i * (s ? 1.2 : 1) + "px", height: i * (s ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...g, children: H(Ws, { selectedColor: m, title: null, onSelectColor: w, onPreviewColor: v, alphaCheckSize: s ? 9 : void 0, darkMode: x, ...p, children: [o("div", { style: { position: "absolute", width: "100%", height: "100%", top: "0px", left: "0px", pointerEvents: "none", borderColor: h.toRGBA(x).toString(), borderWidth: "2px", borderStyle: "solid", boxSizing: "border-box", opacity: b ? "1" : "0" } }), o("div", { style: { position: "absolute", width: 0.33 * i * (s ? 1.2 : 1) + "px", height: 0.33 * i * (s ? 1.2 : 1) + "px", left: "calc(50% - 0.5px)", top: "calc(50% - 0.5px)", transform: "translate(-50%,-50%)", pointerEvents: "none", background: h.toRGBA(x).toString(), borderRadius: "50%", opacity: y ? "1" : "0" } })] }) }) });
|
|
114
114
|
}), Lo = q((n) => {
|
|
115
115
|
const { title: a, schemeColorLookup: t, colorDefs: e, selectedColor: r, previewColor: l, onSelectColorDef: c, onPreviewColorDef: p, style: i = an.EmptyCssProperties, compareRGB: s = !1, darkMode: d, swatchProps: x, ...g } = n;
|
|
116
116
|
let m;
|
|
@@ -121,7 +121,7 @@ const Ms = q(X((n, a) => {
|
|
|
121
121
|
}
|
|
122
122
|
const u = U((h) => {
|
|
123
123
|
c?.(h);
|
|
124
|
-
}, [c]),
|
|
124
|
+
}, [c]), b = U((h) => {
|
|
125
125
|
p?.(h);
|
|
126
126
|
}, [p]), y = W(() => {
|
|
127
127
|
let h = [];
|
|
@@ -129,14 +129,14 @@ const Ms = q(X((n, a) => {
|
|
|
129
129
|
let v = [], S = m[w];
|
|
130
130
|
for (let D = 0; D < S.length; D++) {
|
|
131
131
|
let T = S[D];
|
|
132
|
-
v.push(o(er, { schemeColorLookup: t, colorDef: T, selectedColor: r, previewColor: l, onSelectColorDef: u, onPreviewColorDef:
|
|
132
|
+
v.push(o(er, { schemeColorLookup: t, colorDef: T, selectedColor: r, previewColor: l, onSelectColorDef: u, onPreviewColorDef: b, swatchProps: x, compareRGB: s, darkMode: d }, w + " " + D));
|
|
133
133
|
}
|
|
134
134
|
let C = o(B, { className: "button-col", sx: { display: "flex", flexDirection: "column", justifyContent: "space-between", boxShadow: (D) => D.shadows[2], borderRadius: "2px", overflow: "hidden" }, children: v }, "" + w);
|
|
135
135
|
h.push(C);
|
|
136
136
|
}
|
|
137
137
|
return h;
|
|
138
|
-
}, [m, r, l, u,
|
|
139
|
-
return H(B, { style: { ...i }, children: [
|
|
138
|
+
}, [m, r, l, u, b]), f = W(() => a ? o(Re, { noWrap: !0, component: "div", sx: { display: "flex", flexShrink: "0", paddingLeft: "6px", paddingBottom: "4px", paddingTop: "0px", userSelect: "none", color: (h) => h.palette.text.secondary }, children: a }) : null, [a]);
|
|
139
|
+
return H(B, { style: { ...i }, children: [f, o(B, { sx: { display: "flex", flexDirection: "row", gap: "6px", marginBottom: "14px", flexWrap: "wrap", justifyContent: "flex-start" }, ...g, children: y })] });
|
|
140
140
|
}), et = (n, a) => ({ description: n, definition: { val: a, adjs: [] } }), Le = (n, a, t, e, r, l) => {
|
|
141
141
|
const c = et(n, a);
|
|
142
142
|
e?.push(c);
|
|
@@ -144,11 +144,11 @@ const Ms = q(X((n, a) => {
|
|
|
144
144
|
r?.set(i, p);
|
|
145
145
|
const s = p.toRGBA().toString();
|
|
146
146
|
l?.set(s, p);
|
|
147
|
-
},
|
|
148
|
-
const { selectedColor: t = null, previewColor: e = n.selectedColor ?? null, recentColors: r, schemeLookup: l, disableAlpha: c = !1, previewDebounceTime: p = 100, initialPanelType: i, defaultButtonSize: s = 24, width: d, onElementLoad: x, onDone: g, onEyeDropStart: m, onEyeDropStop: u, onPreviewColor:
|
|
147
|
+
}, js = re.lazy(() => import("./wenu-h35nL2_uEZp.mjs")), $s = q(X((n, a) => {
|
|
148
|
+
const { selectedColor: t = null, previewColor: e = n.selectedColor ?? null, recentColors: r, schemeLookup: l, disableAlpha: c = !1, previewDebounceTime: p = 100, initialPanelType: i, defaultButtonSize: s = 24, width: d, onElementLoad: x, onDone: g, onEyeDropStart: m, onEyeDropStop: u, onPreviewColor: b, onPreviewColorImmediate: y, onSelectColor: f, autoColor: h, autoColorLabel: w = "Automatic", autoColorPosition: v = Ro.Start, compareRGB: S = !1, darkMode: C = !1, ...D } = n, T = e || t, P = Y(b, [b]), R = Y(y, [y]), k = Y(f, [f]), E = Y(m, [m]), M = Y(u, [u]), [I, N] = _(!1), L = Xe(), F = W(() => l || gt.getDefaultSchemeLookup(), [l]), z = W(() => {
|
|
149
149
|
const G = /* @__PURE__ */ new Map(), se = /* @__PURE__ */ new Map(), Me = [];
|
|
150
150
|
Le("Primary Background", "bg1", F, Me, G, se), Le("Primary Text", "tx1", F, Me, G, se), Le("Secondary Background", "bg2", F, Me, G, se), Le("Secondary Text", "tx2", F, Me, G, se), Le("Accent 1", "accent1", F, Me, G, se), Le("Accent 2", "accent2", F, Me, G, se), Le("Accent 3", "accent3", F, Me, G, se), Le("Accent 4", "accent4", F, Me, G, se), Le("Accent 5", "accent5", F, Me, G, se), Le("Accent 6", "accent6", F, Me, G, se);
|
|
151
|
-
const qe =
|
|
151
|
+
const qe = Dl.buildPalette(Me, F, G, se), De = [];
|
|
152
152
|
if (Le("Dark Red", "C00000", F, De, G, se), Le("Red", "FF0000", F, De, G, se), Le("Orange", "FFC000", F, De, G, se), Le("Yellow", "FFFF00", F, De, G, se), Le("Light Green", "92D050", F, De, G, se), Le("Green", "00B050", F, De, G, se), Le("Light Blue", "00B0F0", F, De, G, se), Le("Blue", "0070C0", F, De, G, se), Le("Dark Blue", "002060", F, De, G, se), c ? Le("Purple Is A Fruit", "7030A0", F, De, G, se) : Le("Transparent", "00000000", F, De, G, se), h) {
|
|
153
153
|
const Ne = h.toString();
|
|
154
154
|
G.set(Ne, h);
|
|
@@ -167,7 +167,7 @@ const Ms = q(X((n, a) => {
|
|
|
167
167
|
Q((G) => !G);
|
|
168
168
|
}, []);
|
|
169
169
|
de(() => {
|
|
170
|
-
if (i) Q(i ===
|
|
170
|
+
if (i) Q(i === Is.Custom);
|
|
171
171
|
else if (t) {
|
|
172
172
|
let G = t.toString(), se = z.mapAllPresets.get(G);
|
|
173
173
|
se || (G = t.toRGBA().toString(), se = z.mapAllPresetsRGB.get(G));
|
|
@@ -220,7 +220,7 @@ const Ms = q(X((n, a) => {
|
|
|
220
220
|
}, children: o(he, { iconKey: "Colorize" }) }), [z, C]), Ve = W(() => {
|
|
221
221
|
if (!ae) return;
|
|
222
222
|
const G = { opacity: ae ? 1 : "0", position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", boxSizing: "border-box" };
|
|
223
|
-
return o(Sa, { fallback: o("div", { style: G, children: o(Wt, {}) }), children: o(
|
|
223
|
+
return o(Sa, { fallback: o("div", { style: G, children: o(Wt, {}) }), children: o(js, { style: G, selectedColor: T ? T.toRGBA().toString() : "transparent", onColorChange: Se, disableAlpha: c }) });
|
|
224
224
|
}, [ae, T]), je = W(() => ({ onClick: Z, alphaGrey: L.palette.text.icon ?? L.palette.action.active }), [Z, L]), ne = W(() => {
|
|
225
225
|
if (!h) return null;
|
|
226
226
|
const G = { description: w, definition: { val: h.getVal(), adjs: h.getAdjustments() } };
|
|
@@ -237,30 +237,30 @@ const Ms = q(X((n, a) => {
|
|
|
237
237
|
oe(K);
|
|
238
238
|
});
|
|
239
239
|
}, children: "Done" })] })] });
|
|
240
|
-
})),
|
|
241
|
-
const { selectedColor: t, quickColor: e, icon: r =
|
|
240
|
+
})), Vs = o(he, { iconKey: "circle.colored" }), Oa = q(X((n, a) => {
|
|
241
|
+
const { selectedColor: t, quickColor: e, icon: r = Vs, tooltip: l, label: c, onPreviewColor: p, onPreviewColorImmediate: i, onSelectColor: s, variant: d = tt.Toolbar, panelProps: x, shouldCloseFloatAll: g = !0, compareRGB: m = !1, darkMode: u = !1, ...b } = n, y = Y(p, [p]), f = Y(i, [i]), h = Y(s, [s]), [w, v] = _(() => {
|
|
242
242
|
}), S = e || w || t || x?.autoColor, C = xe(!1), D = U(() => {
|
|
243
243
|
}, []), T = Y(() => {
|
|
244
244
|
v(t);
|
|
245
245
|
}, [t]), P = Y((z) => {
|
|
246
246
|
C.current || (v(z), y?.(z));
|
|
247
247
|
}, [y]), R = Y((z) => {
|
|
248
|
-
C.current || (v(z),
|
|
249
|
-
}, [
|
|
248
|
+
C.current || (v(z), f?.(z));
|
|
249
|
+
}, [f]), k = Y((z, ae) => {
|
|
250
250
|
C.current || (v(void 0), h?.(z, ae));
|
|
251
251
|
}, [h]), E = W(() => o(B, { className: "color-wrapper", sx: { lineHeight: "0", color: "inherit", "--sxl-color-active": `${S?.toCSS(u) ?? "transparent"}`, "& .activeColor": { fill: `${S?.toCSS(u) ?? "transparent"}` }, "& .style_grey": { fill: (z) => z.palette.text.icon ?? z.palette.action.active } }, children: typeof r == "function" ? r() : r }), [S, r, u]), M = Y((z) => {
|
|
252
252
|
h?.(e, !1);
|
|
253
253
|
}, [h, e]), [I, N] = _(!1), L = U((z) => {
|
|
254
254
|
const { closeFloat: ae, closeFloatAll: Q } = z;
|
|
255
|
-
return o(
|
|
255
|
+
return o($s, { ...x, selectedColor: t, previewColor: w, onDone: g ? Q : ae, onKeyDown: (ue) => {
|
|
256
256
|
ue.which === me.Enter && (g ? Q() : ae());
|
|
257
257
|
}, onPreviewColorImmediate: R, onPreviewColor: P, onSelectColor: k, onEyeDropStart: () => N(!0), onEyeDropStop: () => N(!1), compareRGB: m, darkMode: u });
|
|
258
|
-
}, [t, w, g, S, x?.autoColor, u]), F = { onQuickClick: e ? M : void 0, createPopupPanel: L, popupProps: { popperProps: { resizeOnOverflow: !1 } }, onPopupOpen: T, onPopupClose: D, tooltip: l || c || "Color", label: c, icon: E, ...
|
|
258
|
+
}, [t, w, g, S, x?.autoColor, u]), F = { onQuickClick: e ? M : void 0, createPopupPanel: L, popupProps: { popperProps: { resizeOnOverflow: !1 } }, onPopupOpen: T, onPopupClose: D, tooltip: l || c || "Color", label: c, icon: E, ...b };
|
|
259
259
|
return d === tt.Toolbar ? o(kt, { ref: a, ...F }) : o(Yn, { ref: a, ...F });
|
|
260
260
|
})), Zo = 82, Tr = (n) => {
|
|
261
261
|
const { styleColor: a, length: t = Zo, width: e = 1, dashArray: r = null, sx: l, isDouble: c = !1, isAngled: p = !1, darkMode: i = !1, ...s } = n;
|
|
262
|
-
return o(ka, { sx: { width: `${t}px`, height: `${e}px`, color: "inherit", overflow: "visible", "& .activeColor": { stroke: (d) => `${a ? a.toRGBA(i).toString() : d.palette.text.icon ?? d.palette.action.active}` }, "& .style_grey": { stroke: (d) => d.palette.text.icon ?? d.palette.action.active }, ...l }, height: e, width: t, viewBox: `0 0 ${t} ${e}`, ...s, children: o(
|
|
263
|
-
},
|
|
262
|
+
return o(ka, { sx: { width: `${t}px`, height: `${e}px`, color: "inherit", overflow: "visible", "& .activeColor": { stroke: (d) => `${a ? a.toRGBA(i).toString() : d.palette.text.icon ?? d.palette.action.active}` }, "& .style_grey": { stroke: (d) => d.palette.text.icon ?? d.palette.action.active }, ...l }, height: e, width: t, viewBox: `0 0 ${t} ${e}`, ...s, children: o(Fl, { length: t, width: e, dashArray: r, isDouble: c, isAngled: p, className: "activeColor" }) });
|
|
263
|
+
}, _s = q(X((n, a) => {
|
|
264
264
|
const { variant: t, showLabels: e = !1, disabled: r = !1, createPopupPanel: l, styleColor: c, selectedStyle: p, onSelectStyle: i, showNone: s = !0, darkMode: d, sx: x, ...g } = n, m = Y(i, []), u = U((h) => {
|
|
265
265
|
const { popupContainer: w, floatReference: v, closeFloat: S, ...C } = h, D = [], T = we.BuiltInDefinitionsArray;
|
|
266
266
|
for (let P = 0; P < T.length; P++) {
|
|
@@ -275,14 +275,14 @@ const Ms = q(X((n, a) => {
|
|
|
275
275
|
}, selected: R.style === p, parentFloat: v, children: E }, P));
|
|
276
276
|
}
|
|
277
277
|
return o(B, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: D });
|
|
278
|
-
}, [r, s, c, p, d]),
|
|
278
|
+
}, [r, s, c, p, d]), b = W(() => {
|
|
279
279
|
const h = we.BuiltInDefinitions.get(p);
|
|
280
280
|
let w;
|
|
281
281
|
return w = h.description === "None" ? o(B, { sx: { minWidth: `${Zo}px` }, children: "None" }) : o(Tr, { styleColor: c, length: Zo, width: h.width, dashArray: h.pattern, darkMode: d, isDouble: h.description.toLowerCase().includes("double"), isAngled: h.description.toLowerCase().includes("slant") }), o(B, { className: "border-stroke", sx: { paddingLeft: "12px", marginLeft: "4px", marginRight: "4px", height: "24px", display: "flex", alignItems: "center", "& svg path.activeColor": { filter: Sr() } }, children: w });
|
|
282
|
-
}, [p, c]), y = W(() => we.BuiltInDefinitions.get(p), [p]),
|
|
283
|
-
return t === tt.Toolbar ? o(kt, { ...
|
|
284
|
-
})),
|
|
285
|
-
const { autoColor: t = null, schemeLookup: e, autoStrokeStyle: r = we.StrokeStyle.Thin, disabled: l = !1, darkMode: c = !1, showStylingBefore: p = !0, onSelectBorder: i, onPreviewBorder: s, selectedBorder: d, createTemporaryBorder: x, ...g } = n, m = Y(i, [i]), u = Y(s, [s]), [
|
|
282
|
+
}, [p, c]), y = W(() => we.BuiltInDefinitions.get(p), [p]), f = { disabled: r, icon: b, tooltip: "Border Style: " + y.description, sx: { background: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})`, ...x }, createPopupPanel: u, ...g };
|
|
283
|
+
return t === tt.Toolbar ? o(kt, { ...f }) : o(Yn, { ...f });
|
|
284
|
+
})), Us = q(X((n, a) => {
|
|
285
|
+
const { autoColor: t = null, schemeLookup: e, autoStrokeStyle: r = we.StrokeStyle.Thin, disabled: l = !1, darkMode: c = !1, showStylingBefore: p = !0, onSelectBorder: i, onPreviewBorder: s, selectedBorder: d, createTemporaryBorder: x, ...g } = n, m = Y(i, [i]), u = Y(s, [s]), [b, y] = _(), [f, h] = _(), w = b ?? r, v = f ?? t, S = d || { bottom: { style: r, color: t?.toString() } }, C = Y((E) => {
|
|
286
286
|
const M = {}, I = E ? Object.keys(E) : [];
|
|
287
287
|
let N = !1;
|
|
288
288
|
const L = I.length;
|
|
@@ -293,7 +293,7 @@ const Ms = q(X((n, a) => {
|
|
|
293
293
|
I.length < 6 && (N = !0);
|
|
294
294
|
const F = N ? M.left : null, z = N ? M.top : null, ae = N ? M.right : null, Q = N ? M.bottom : null, ue = N ? M.vertical : null, j = N ? M.horizontal : null;
|
|
295
295
|
let K = "";
|
|
296
|
-
return z || F || (K += "M 3,5 H 5 V 3 H 3 "), z || (K += "M 7,5 H 9 V 3 H 7 "), z || ue || (K += "M 11,5 h 2 V 3 h -2 "), z || (K += "M 15,5 h 2 V 3 h -2 "), z || ae || (K += "M 19,5 h 2 V 3 h -2 "), F || (K += "M 3,9 H 5 V 7 H 3 "), ue || (K += "M 11,9 h 2 V 7 h -2 "), ae || (K += "M 19,9 h 2 V 7 h -2 "), j || F || (K += "M 3,13 H 5 V 11 H 3 "), j || (K += "M 7,13 H 9 V 11 H 7 "), j || ue || (K += "M 11,13 h 2 v -2 h -2 "), j || ae || (K += "M 19,13 h 2 v -2 h -2 "), j || (K += "M 15,13 h 2 v -2 h -2 "), F || (K += "M 3,17 H 5 V 15 H 3 "), ue || (K += "M 11,17 h 2 v -2 h -2 "), ae || (K += "M 19,17 h 2 v -2 h -2 "), Q || F || (K += "M 3,21 H 5 V 19 H 3 "), Q || (K += "M 7,21 H 9 V 19 H 7 "), Q || ue || (K += "M 11,21 h 2 v -2 h -2 "), Q || (K += "M 15,21 h 2 v -2 h -2 "), Q || ae || (K += "M 19,21 h 2 v -2 h -2 "), H(he, { children: [" ", H(B, { className: "border-icon", sx: { width: "var(--icon-size, var(--icon-size-md))", height: "var(--icon-size, var(--icon-size-md))", position: "relative", "& .grid > path": { opacity: "0.8" } }, children: [o("svg", { viewBox: "0 0 24 24", className: "grid", style: { top: "0px", left: "0px", width: "calc(var(--icon-size, var(--icon-size-md)) + 1px)", height: "calc(var(--icon-size, var(--icon-size-md)) + 1px)", position: "absolute" }, children: o("path", { className: "fill", d: K }) }), o(B, { className: "border-container", sx: { position: "absolute", display: "flex", justifyContent: "stretch", alignItems: "stretch", top: "0px", left: "0px", width: "var(--icon-size, var(--icon-size-md))", height: "var(--icon-size, var(--icon-size-md))", padding: "1px 1px", "& svg path": { filter:
|
|
296
|
+
return z || F || (K += "M 3,5 H 5 V 3 H 3 "), z || (K += "M 7,5 H 9 V 3 H 7 "), z || ue || (K += "M 11,5 h 2 V 3 h -2 "), z || (K += "M 15,5 h 2 V 3 h -2 "), z || ae || (K += "M 19,5 h 2 V 3 h -2 "), F || (K += "M 3,9 H 5 V 7 H 3 "), ue || (K += "M 11,9 h 2 V 7 h -2 "), ae || (K += "M 19,9 h 2 V 7 h -2 "), j || F || (K += "M 3,13 H 5 V 11 H 3 "), j || (K += "M 7,13 H 9 V 11 H 7 "), j || ue || (K += "M 11,13 h 2 v -2 h -2 "), j || ae || (K += "M 19,13 h 2 v -2 h -2 "), j || (K += "M 15,13 h 2 v -2 h -2 "), F || (K += "M 3,17 H 5 V 15 H 3 "), ue || (K += "M 11,17 h 2 v -2 h -2 "), ae || (K += "M 19,17 h 2 v -2 h -2 "), Q || F || (K += "M 3,21 H 5 V 19 H 3 "), Q || (K += "M 7,21 H 9 V 19 H 7 "), Q || ue || (K += "M 11,21 h 2 v -2 h -2 "), Q || (K += "M 15,21 h 2 v -2 h -2 "), Q || ae || (K += "M 19,21 h 2 v -2 h -2 "), H(he, { children: [" ", H(B, { className: "border-icon", sx: { width: "var(--icon-size, var(--icon-size-md))", height: "var(--icon-size, var(--icon-size-md))", position: "relative", "& .grid > path": { opacity: "0.8" } }, children: [o("svg", { viewBox: "0 0 24 24", className: "grid", style: { top: "0px", left: "0px", width: "calc(var(--icon-size, var(--icon-size-md)) + 1px)", height: "calc(var(--icon-size, var(--icon-size-md)) + 1px)", position: "absolute" }, children: o("path", { className: "fill", d: K }) }), o(B, { className: "border-container", sx: { position: "absolute", display: "flex", justifyContent: "stretch", alignItems: "stretch", top: "0px", left: "0px", width: "var(--icon-size, var(--icon-size-md))", height: "var(--icon-size, var(--icon-size-md))", padding: "1px 1px", "& svg path": { filter: is } }, children: o(_n, { getBorderAt: (ee, V) => {
|
|
297
297
|
if (!x || I.length === 0) return null;
|
|
298
298
|
const A = ee.rowIndex, Z = ee.colIndex, oe = {};
|
|
299
299
|
return A === 0 ? (oe.top = M.top, oe.bottom = M.horizontal) : (oe.top = M.horizontal, oe.bottom = M.bottom), Z === 0 ? (oe.left = M.left, oe.right = M.vertical) : (oe.left = M.vertical, oe.right = M.right), x?.(oe);
|
|
@@ -321,60 +321,60 @@ const Ms = q(X((n, a) => {
|
|
|
321
321
|
h(z);
|
|
322
322
|
}, onSelectColor: (z, ae) => {
|
|
323
323
|
h(z);
|
|
324
|
-
}, darkMode: c, tooltip: "Border Color", panelProps: { disableAlpha: !0, autoColor: t, schemeLookup: e }, disabled: l || w === we.StrokeStyle.None, parentFloat: I, shouldCloseFloatAll: !1 }), o(
|
|
324
|
+
}, darkMode: c, tooltip: "Border Color", panelProps: { disableAlpha: !0, autoColor: t, schemeLookup: e }, disabled: l || w === we.StrokeStyle.None, parentFloat: I, shouldCloseFloatAll: !1 }), o(_s, { selectedStyle: w, onSelectStyle: y, styleColor: v, darkMode: c, variant: tt.Toolbar, parentFloat: I })] }) });
|
|
325
325
|
return H(B, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, onClick: (z) => z.stopPropagation(), children: [p ? F : L, o(J, { orientation: "horizontal" }), p ? L : F] });
|
|
326
326
|
}, [w, v, t, e, c]), k = W(() => C(S), [S, c]);
|
|
327
327
|
return o(kt, { ref: a, createPopupPanel: R, popupProps: { popperProps: { resizeOnOverflow: !1 } }, createTooltip: ({ children: E }, M) => o(ot, { label: "Borders", description: "Set the borders.", disabled: M, children: E }), onQuickClick: () => {
|
|
328
328
|
m?.(S);
|
|
329
329
|
}, quickButtonProps: { sx: {} }, disabled: l, icon: k, ...g });
|
|
330
|
-
})),
|
|
331
|
-
const { commands: t, command: e, commandHook: r, variant: l = ie.Toolbar, disabled: c = !1, autoColor: p, autoStrokeStyle: i, schemeLookup: s, createTemporaryBorder: d, selectedBorder: x, onSelectBorder: g, darkMode: m, icon: u, label:
|
|
330
|
+
})), Gs = q(X((n, a) => {
|
|
331
|
+
const { commands: t, command: e, commandHook: r, variant: l = ie.Toolbar, disabled: c = !1, autoColor: p, autoStrokeStyle: i, schemeLookup: s, createTemporaryBorder: d, selectedBorder: x, onSelectBorder: g, darkMode: m, icon: u, label: b, ...y } = n, f = Ie(t, ["formatBorder"]), h = e ?? f[0], w = h?.context() ?? null, v = w?.autoColor ?? p, S = w?.autoStyle ?? i, C = x ?? w?.quickBorder, D = m ?? w?.darkMode, T = d ?? w?.createTemporaryBorder, P = s ?? w?.schemeLookup, R = Y((E) => {
|
|
332
332
|
w?.onBorderSelect && w.onBorderSelect(E), g?.(E), h?.execute(E, r);
|
|
333
333
|
}, [h, g, r]), k = U((E, M) => {
|
|
334
334
|
const { children: I, title: N, ...L } = E;
|
|
335
335
|
let F = E.children;
|
|
336
336
|
return (h?.disabled() || c) && (F = o("div", { children: F })), o(Zn, { command: h, placement: l === ie.Toolbar ? "bottom-start" : "right-start", disabled: M, ...L, children: F });
|
|
337
337
|
}, [h, c]);
|
|
338
|
-
return o(
|
|
339
|
-
})),
|
|
338
|
+
return o(Us, { ref: a, autoColor: v, darkMode: D, autoStrokeStyle: S, createTemporaryBorder: T, schemeLookup: P, selectedBorder: C, onSelectBorder: R, createTooltip: k, disabled: c || !h || h.disabled(), ...y });
|
|
339
|
+
})), qs = q(X((n, a) => {
|
|
340
340
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = U((i, s) => {
|
|
341
341
|
const d = { variant: ie.Menuitem, commandHook: e, scope: r, disabled: l }, x = H(le, { children: [o(O, { ...d, command: s.getCommand("mergeToggle") }), o(O, { ...d, command: s.getCommand("mergeHorizontal") }), o(O, { ...d, command: s.getCommand("mergeVertical") }), o(J, { orientation: "horizontal" }), o(O, { ...d, command: s.getCommand("unmerge") })] });
|
|
342
342
|
return ge({ ...i, children: x });
|
|
343
343
|
}, [l, e, r]);
|
|
344
344
|
return o(ve, { ref: a, commands: t, quickCommand: "mergeToggle", commandHook: e, scope: r, tooltip: "Combine or split cells.", createPopupPanel: p, icon: "MergeAll", ...c });
|
|
345
|
-
})),
|
|
345
|
+
})), Ks = q(X((n, a) => {
|
|
346
346
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = U((i, s) => {
|
|
347
347
|
const d = { variant: ie.Menuitem, commandHook: e, scope: r, disabled: l }, x = H(le, { children: [o(O, { ...d, command: s.getCommand("freezeToggle") }), o(O, { ...d, command: s.getCommand("freezeToggleHorizontal") }), o(O, { ...d, command: s.getCommand("freezeToggleVertical") }), o(J, { orientation: "horizontal" }), o(O, { ...d, command: s.getCommand("unfreeze") })] });
|
|
348
348
|
return ge({ ...i, children: x });
|
|
349
349
|
}, [l, e, r]);
|
|
350
350
|
return o(ve, { ref: a, commands: t, commandHook: e, createPopupPanel: p, quickCommand: "freezeToggle", label: "Freeze Panes", tooltip: "Freeze a portion of the sheet to keep it visible while you scroll through the rest of the sheet.\\n\\nUseful for viewing data in other parts of your worksheet without losing your headers or labels.", icon: "Freeze", ...c });
|
|
351
|
-
})),
|
|
351
|
+
})), Xs = q(X((n, a) => {
|
|
352
352
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = U((i, s) => {
|
|
353
353
|
const d = { variant: ie.Menuitem, commandHook: e, scope: r, disabled: l }, x = H(le, { children: [o(O, { ...d, command: s.getCommand("find") }), o(O, { ...d, command: s.getCommand("findReplace") }), o(O, { ...d, command: s.getCommand("goto") })] });
|
|
354
354
|
return ge({ ...i, children: x });
|
|
355
355
|
}, [l, e, r]);
|
|
356
356
|
return o(ve, { ref: a, commands: t, commandHook: e, createPopupPanel: p, label: "Find & Select", tooltip: "Find and replace cells or go to a specific location.", quickCommand: "find", icon: "Find", ...c });
|
|
357
|
-
})),
|
|
358
|
-
const { command: t, commandHook: e, showQuickButtons: r = !!n.commands, commands: l, fontSizes: c =
|
|
357
|
+
})), Ys = q(X((n, a) => {
|
|
358
|
+
const { command: t, commandHook: e, showQuickButtons: r = !!n.commands, commands: l, fontSizes: c = Ol.DefaultFontSizes, disabled: p = !1, parentFloat: i, icon: s, label: d, sx: x, ...g } = n;
|
|
359
359
|
jt(t);
|
|
360
|
-
const m = () => t?.state()?.toString() || "11", [u,
|
|
360
|
+
const m = () => t?.state()?.toString() || "11", [u, b] = _(m), y = Y(() => {
|
|
361
361
|
const T = parseFloat(u);
|
|
362
|
-
isNaN(T) ?
|
|
362
|
+
isNaN(T) ? b(m()) : parseFloat(m()) !== T && t.execute(T, e);
|
|
363
363
|
}, [m, t, u, e]);
|
|
364
364
|
de(() => {
|
|
365
|
-
|
|
365
|
+
b(m());
|
|
366
366
|
}, [t?.state()]);
|
|
367
|
-
const
|
|
367
|
+
const f = W(() => {
|
|
368
368
|
if (!e) return null;
|
|
369
369
|
const T = { ...e };
|
|
370
370
|
return delete T.beforeExecute, T;
|
|
371
|
-
}, [e]), h = Ie(l, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), w = W(() => h ? H(B, { className: Ce("quick-buttons", {}), sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (T) => T.stopPropagation(), children: [o(O, { command: h[0], commandHook:
|
|
371
|
+
}, [e]), h = Ie(l, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), w = W(() => h ? H(B, { className: Ce("quick-buttons", {}), sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (T) => T.stopPropagation(), children: [o(O, { command: h[0], commandHook: f }), o(O, { command: h[1], commandHook: f })] }) : null, [h]), v = Xe(), S = W(() => `${Ht.getSharedMeasurer()("12.3", Math.round(v.typography.fontSize), v.typography.fontFamily).width}px`, [v]), C = U((T) => {
|
|
372
372
|
const { onMouseDown: P, onMouseUp: R, ...k } = T;
|
|
373
373
|
return o(st, { component: "div", ...k, disableRipple: !0, children: o(Kn, { inputMode: "numeric", disabled: p || !t || t.disabled(), inputProps: { name: "font-input", autoComplete: "off", tabIndex: 0, type: "number", maxLength: 4, max: 409, min: 2 }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (E) => `1px solid ${E.palette.text.icon ?? E.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (E) => `1px solid ${E.palette.error.main}` }, "::after": { borderBottom: (E) => `1px solid ${E.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (E) => `${Math.round(E.typography.fontSize)}px`, width: S, color: (E) => E.palette.text.secondary, input: { padding: "0 0", textAlign: "center", height: "1rem", MozAppearance: "textfield", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (E) => E.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (E) => E.palette.text.primary } }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" } }, value: u, onFocus: (E) => {
|
|
374
374
|
E.target?.select();
|
|
375
375
|
}, onKeyDown: (E) => {
|
|
376
376
|
if (E.which === me.Enter) m() !== u && (E.stopPropagation(), E.preventDefault(), y());
|
|
377
|
-
else if (E.which === me.Escape) m() !== u && (
|
|
377
|
+
else if (E.which === me.Escape) m() !== u && (b(m()), setTimeout(() => {
|
|
378
378
|
E.target?.select();
|
|
379
379
|
}, 0), E.stopPropagation(), E.preventDefault());
|
|
380
380
|
else {
|
|
@@ -385,7 +385,7 @@ const Ms = q(X((n, a) => {
|
|
|
385
385
|
y();
|
|
386
386
|
}, onChange: (E) => {
|
|
387
387
|
if (E.target.value.length > 4) return E.stopPropagation(), void E.preventDefault();
|
|
388
|
-
|
|
388
|
+
b(E.target.value);
|
|
389
389
|
} }) });
|
|
390
390
|
}, [u, p, t]), D = U((T) => {
|
|
391
391
|
const P = (M) => {
|
|
@@ -414,13 +414,13 @@ const Ms = q(X((n, a) => {
|
|
|
414
414
|
}, onKeyDown: (i) => {
|
|
415
415
|
i.keyCode !== me.Enter && i.keyCode !== me.Space || r(l.numberFormat);
|
|
416
416
|
}, ...p, children: H(B, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [H(Re, { component: "div", children: [l.formatType, l.formatType === mt.Type.Custom ? "…" : ""] }), o(Re, { variant: "caption", component: "div", sx: { color: (i) => Qe(i.palette.text.primary, 0.6), paddingTop: e && e.length > 0 ? "1px" : void 0, overflow: "hidden", textOverflow: "ellipsis" }, children: e && e.length > 0 ? e : " " })] }) });
|
|
417
|
-
}),
|
|
417
|
+
}), Zs = q(X((n, a) => {
|
|
418
418
|
const { commands: t, commandHook: e, scope: r, sx: l, disabled: c = !1, parentFloat: p, ...i } = n, s = Ie(t, ["formatNumberFormat"])[0], d = s?.state() ? mt.Styles.lookupStyle(s?.state()).formatType : mt.Type.General, x = W(() => {
|
|
419
419
|
if (!e) return null;
|
|
420
|
-
const
|
|
421
|
-
return delete
|
|
422
|
-
}, [e]), g = U((
|
|
423
|
-
const
|
|
420
|
+
const b = { ...e };
|
|
421
|
+
return delete b.beforeExecute, b;
|
|
422
|
+
}, [e]), g = U((b, y) => {
|
|
423
|
+
const f = (R) => {
|
|
424
424
|
e?.beforeExecute?.(s, s?.state()), s.execute(R, e), e?.onExecute?.(s, s?.state());
|
|
425
425
|
}, h = s?.context()(), w = mt.Styles.lookupPrimary(), v = [];
|
|
426
426
|
for (let R = 0; R < w.length; R++) {
|
|
@@ -432,24 +432,24 @@ const Ms = q(X((n, a) => {
|
|
|
432
432
|
}
|
|
433
433
|
k === "" && w[R].formatType === mt.Type.General && (k = "No specific format");
|
|
434
434
|
const E = w[R].formatType === d;
|
|
435
|
-
v.push(o(Er, { selected: E, disabled: c || !s || s.disabled(), formattedValue: k, handleSetFormat:
|
|
435
|
+
v.push(o(Er, { selected: E, disabled: c || !s || s.disabled(), formattedValue: k, handleSetFormat: f, format: w[R] }, w[R].formatType));
|
|
436
436
|
}
|
|
437
437
|
const S = { numberFormat: "", formatType: mt.Type.Custom }, C = d === mt.Type.Custom, D = o(Er, { selected: C, disabled: c || !s || s.disabled(), formattedValue: C ? h.getNumberFormat().displayText : "", handleSetFormat: () => {
|
|
438
438
|
e?.beforeExecute?.(s, s?.state()), y.getCommand("formatNumberDialog")?.execute(s?.state()), e?.onExecute?.(s, s?.state());
|
|
439
439
|
}, format: S, sx: { flex: "0", width: "100%" } }, mt.Type.Custom), T = H(B, { className: "quick-buttons", sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (R) => R.stopPropagation(), children: [o(O, { command: y.getCommand("formatNumberFormatAccountingStyle"), commandHook: x, scope: r }), o(O, { command: y.getCommand("formatNumberFormatPercentStyle"), commandHook: x, scope: r }), o(O, { command: y.getCommand("formatNumberFormatCommaStyle"), commandHook: x, scope: r }), o(O, { command: y.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: x, scope: r }), o(O, { command: y.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: x, scope: r })] }), P = H(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...i, children: [T, o(J, { orientation: "horizontal" }), o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: v }), o(J, { orientation: "horizontal" }), D] });
|
|
440
|
-
return ge({ ...
|
|
440
|
+
return ge({ ...b, children: P });
|
|
441
441
|
}, [s?.context(), s?.state(), e, r]), m = Xe(), u = W(() => {
|
|
442
|
-
const
|
|
443
|
-
return `${Ht.getSharedMeasurer()(
|
|
442
|
+
const b = mt.Type.MediumTime;
|
|
443
|
+
return `${Ht.getSharedMeasurer()(b, Math.round(m.typography.fontSize), m.typography.fontFamily).width}px`;
|
|
444
444
|
}, [m]);
|
|
445
|
-
return o(ve, { ref: a, commands: t, sx: l, outlined: !0, disabled: c, parentFloat: p, createPopupPanel: g, createTooltip: ({ children:
|
|
445
|
+
return o(ve, { ref: a, commands: t, sx: l, outlined: !0, disabled: c, parentFloat: p, createPopupPanel: g, createTooltip: ({ children: b }, y) => o(ot, { label: s?.label(), description: s?.description(), disabled: y, children: b }), icon: o(B, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (b) => `${Math.round(b.typography.fontSize)}px`, color: (b) => b.palette.text.secondary, fontFamily: (b) => b.typography.fontFamily, width: u }, children: o(B, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: d }) }), ...i });
|
|
446
446
|
})), Ba = q(X((n, a) => {
|
|
447
447
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = U((i, s) => {
|
|
448
448
|
const d = { variant: ie.Menuitem, commandHook: e, scope: "clear", disabled: l }, x = H(le, { children: [o(O, { ...d, command: s.getCommand("clearAll") }), o(O, { ...d, command: s.getCommand("clearFormats") }), o(O, { ...d, command: s.getCommand("clearContents") }), o(O, { ...d, command: s.getCommand("clearComments") }), o(O, { ...d, command: s.getCommand("clearHyperlinks") })] });
|
|
449
449
|
return ge({ ...i, children: x });
|
|
450
450
|
}, [l, e, r]);
|
|
451
451
|
return o(ve, { ref: a, commands: t, disabled: l, commandHook: e, scope: r, label: "Clear", tooltip: "Clear everything in the cell, or remove just the formatting or contents.", createPopupPanel: p, icon: "ClearAll", ...c });
|
|
452
|
-
})),
|
|
452
|
+
})), Qs = q(X((n, a) => {
|
|
453
453
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = U((i, s) => {
|
|
454
454
|
const d = { variant: ie.Menuitem, commandHook: e, scope: "fill", disabled: l }, x = H(le, { children: [o(O, { ...d, command: s.getCommand("fillDown") }), o(O, { ...d, command: s.getCommand("fillRight") }), o(O, { ...d, command: s.getCommand("fillUp") }), o(O, { ...d, command: s.getCommand("fillLeft") })] });
|
|
455
455
|
return ge({ ...i, children: x });
|
|
@@ -457,40 +457,40 @@ const Ms = q(X((n, a) => {
|
|
|
457
457
|
return o(ve, { ref: a, commands: t, disabled: l, commandHook: e, label: "Fill", tooltip: "Fill the selected cells with the value from one of the corners.", createPopupPanel: p, icon: "FillDown", ...c });
|
|
458
458
|
})), Aa = q(X((n, a) => {
|
|
459
459
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, disableSheet: c = !1, preferSingleMenu: p = !0, showQuickButton: i = !0, variant: s = ie.Toolbar, ...d } = n, x = Ie(t, ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns"]), { singleCommand: g, allDisabled: m } = W(() => {
|
|
460
|
-
let
|
|
461
|
-
for (let
|
|
462
|
-
return { singleCommand:
|
|
463
|
-
}, [x]), u = U((
|
|
464
|
-
let
|
|
460
|
+
let b = null, y = 0;
|
|
461
|
+
for (let f = 0; f < x.length; f++) x[f] && !x[f]?.disabled() && (p && s === ie.Menuitem && (b = y === 0 ? x[f] : null), y++);
|
|
462
|
+
return { singleCommand: b, allDisabled: y === 0 };
|
|
463
|
+
}, [x]), u = U((b, y) => {
|
|
464
|
+
let f = null;
|
|
465
465
|
const h = { variant: ie.Menuitem, commandHook: e, scope: "insertCells", disabled: l };
|
|
466
|
-
c || (
|
|
467
|
-
const w = H(le, { children: [o(O, { ...h, command: x[0] }), o(O, { ...h, command: x[1] }), o(J, { orientation: "horizontal" }), o(O, { ...h, command: x[2] }), o(O, { ...h, command: x[3] }),
|
|
468
|
-
return ge({ ...
|
|
466
|
+
c || (f = H(le, { children: [o(J, { orientation: "horizontal" }), o(O, { ...h, command: y.getCommand("addSheet") })] }));
|
|
467
|
+
const w = H(le, { children: [o(O, { ...h, command: x[0] }), o(O, { ...h, command: x[1] }), o(J, { orientation: "horizontal" }), o(O, { ...h, command: x[2] }), o(O, { ...h, command: x[3] }), f] });
|
|
468
|
+
return ge({ ...b, children: w });
|
|
469
469
|
}, [l, x, e, r]);
|
|
470
470
|
return g ? o(O, { ref: a, variant: s, commandHook: e, disabled: l, command: g, ...d }) : o(ve, { ref: a, variant: s, quickCommand: "insertCells", commands: t, commandHook: e, scope: r, disabled: l || m, tooltip: H(le, { children: [o("span", { children: "Insert new cells, rows or columns to your workbook." }), o("br", {}), o("span", { children: "To insert multiple rows or columns at a time, select multiple rows or columns in the sheet and click Insert." })] }), createPopupPanel: u, ...d });
|
|
471
471
|
})), Ia = q(X((n, a) => {
|
|
472
472
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, disableSheet: c = !1, preferSingleMenu: p = !0, showQuickButton: i = !0, variant: s = ie.Toolbar, ...d } = n, x = Ie(t, ["deleteCellsShiftUp", "deleteCellsShiftLeft", "deleteRows", "deleteColumns"]), { singleCommand: g, allDisabled: m } = W(() => {
|
|
473
|
-
let
|
|
474
|
-
for (let
|
|
475
|
-
return { singleCommand:
|
|
476
|
-
}, [x]), u = U((
|
|
477
|
-
const
|
|
473
|
+
let b = null, y = 0;
|
|
474
|
+
for (let f = 0; f < x.length; f++) x[f] && !x[f]?.disabled() && (p && s === ie.Menuitem && (b = y === 0 ? x[f] : null), y++);
|
|
475
|
+
return { singleCommand: b, allDisabled: y === 0 };
|
|
476
|
+
}, [x]), u = U((b, y) => {
|
|
477
|
+
const f = { variant: ie.Menuitem, commandHook: e, scope: "deleteCells", disabled: l };
|
|
478
478
|
let h = null;
|
|
479
|
-
c || (h = H(le, { children: [o(J, { orientation: "horizontal" }), o(O, { ...
|
|
480
|
-
const w = H(le, { children: [o(O, { ...
|
|
481
|
-
return ge({ ...
|
|
479
|
+
c || (h = H(le, { children: [o(J, { orientation: "horizontal" }), o(O, { ...f, command: y.getCommand("deleteSheet") })] }));
|
|
480
|
+
const w = H(le, { children: [o(O, { ...f, command: y.getCommand("deleteCellsShiftUp") }), o(O, { ...f, command: y.getCommand("deleteCellsShiftLeft") }), o(J, { orientation: "horizontal" }), o(O, { ...f, command: y.getCommand("deleteRows") }), o(O, { ...f, command: y.getCommand("deleteColumns") }), h] });
|
|
481
|
+
return ge({ ...b, children: w });
|
|
482
482
|
}, [l, e, r]);
|
|
483
483
|
return g ? o(O, { ref: a, variant: s, commandHook: e, disabled: l, command: g, ...d }) : o(ve, { ref: a, variant: s, quickCommand: "deleteCells", commands: t, commandHook: e, scope: r, disabled: l || m, tooltip: H(le, { children: [o("span", { children: "Delete cells, rows, columns or sheets from your workbook." }), o("br", {}), o("span", { children: "To delete multiple rows or columns at a time, select multiple rows or columns in the sheet and click Delete." })] }), createPopupPanel: u, ...d });
|
|
484
484
|
})), No = q(X((n, a) => {
|
|
485
|
-
const { command: t, commandHook: e, onSelectColor: r, disabled: l = !1, variant: c = ie.Toolbar, quickColor: p, panelProps: i, isSplit: s = !1, darkMode: d, icon: x, ...g } = n, { autoColor: m, schemeLookup: u, recentColors:
|
|
485
|
+
const { command: t, commandHook: e, onSelectColor: r, disabled: l = !1, variant: c = ie.Toolbar, quickColor: p, panelProps: i, isSplit: s = !1, darkMode: d, icon: x, ...g } = n, { autoColor: m, schemeLookup: u, recentColors: b, ...y } = i;
|
|
486
486
|
if (g.selectedColor) throw new Error("Command selectedColor will be used. Do not try to provide one as a direct argument");
|
|
487
487
|
jt(t);
|
|
488
|
-
const
|
|
489
|
-
let h = p ??
|
|
488
|
+
const f = t?.context();
|
|
489
|
+
let h = p ?? f?.quickColor;
|
|
490
490
|
s && !h && (h = new gt("transparent"));
|
|
491
|
-
const w = m ??
|
|
492
|
-
R && k &&
|
|
493
|
-
}, [t, r, e,
|
|
491
|
+
const w = m ?? f?.autoColor, v = u ?? f?.schemeLookup, S = b ?? f?.recentColors, C = d ?? f?.darkMode, D = W(() => ({ autoColor: w, schemeLookup: v, recentColors: S, darkMode: C, ...y }), [w, v, S, C]), T = Y((R, k) => {
|
|
492
|
+
R && k && f?.addRecentColor && f.addRecentColor(R), f?.onColorSelect && f.onColorSelect(R), r?.(R, k), t?.execute(R, e);
|
|
493
|
+
}, [t, r, e, f]), P = U((R, k) => {
|
|
494
494
|
const { children: E, title: M, ...I } = R;
|
|
495
495
|
let N = R.children;
|
|
496
496
|
return (t?.disabled() || l) && (N = o("div", { children: N })), o(Zn, { command: t, placement: c === ie.Toolbar ? "bottom-start" : "right-start", disabled: k, ...I, children: N });
|
|
@@ -498,7 +498,7 @@ const Ms = q(X((n, a) => {
|
|
|
498
498
|
return o(Oa, { ref: a, panelProps: D, icon: x, quickColor: h, selectedColor: t?.state(), onSelectColor: T, variant: c === ie.Menuitem ? tt.Menuitem : tt.Toolbar, createTooltip: P, label: t?.label(), disabled: l || !t || t.disabled(), compareRGB: !0, darkMode: C, ...g });
|
|
499
499
|
}));
|
|
500
500
|
No.displayName = "ColorCommandButton";
|
|
501
|
-
const
|
|
501
|
+
const Js = q(X((n, a) => {
|
|
502
502
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, parentFloat: c, ...p } = n, i = Ie(t, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), s = U((d, x) => {
|
|
503
503
|
const g = { variant: ie.Menuitem, parentFloat: d.floatReference, commandHook: e, scope: r, disabled: l }, m = H(le, { children: [o(O, { ...g, command: x.getCommand("gridlinesToggle") }), o(No, { ...g, command: x.getCommand("sheetViewFormatGridlinesColor"), icon: o(he, { iconKey: "stroke.colored" }), panelProps: { disableAlpha: !0 } }), o(J, { orientation: "horizontal" }), o(O, { ...g, command: x.getCommand("sheetViewToggleGridlinesColumns") }), o(O, { ...g, command: x.getCommand("sheetViewToggleGridlinesRows") })] });
|
|
504
504
|
return ge({ ...d, children: m });
|
|
@@ -510,7 +510,7 @@ const Zs = q(X((n, a) => {
|
|
|
510
510
|
return ge({ ...i, children: g });
|
|
511
511
|
}, [l, e, r]);
|
|
512
512
|
return o(ve, { ref: a, commands: t, commandHook: e, scope: r, disabled: l, label: "Sort", tooltip: H(le, { children: [o("span", { children: "Organize your data so it's easier to analyze." }), o("br", {}), o("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: p, icon: "SortIncrease", ...c });
|
|
513
|
-
})),
|
|
513
|
+
})), tp = q(X((n, a) => {
|
|
514
514
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = U((i, s) => {
|
|
515
515
|
const d = { variant: ie.Menuitem, commandHook: e, scope: "sort", disabled: l }, x = H(le, { children: [o(O, { ...d, scope: "filter", command: s.getCommand("autoFilterToggle") }), o(O, { ...d, scope: "filter", command: s.getCommand("autoFilterClear") }), o(O, { ...d, scope: "filter", command: s.getCommand("autoFilterReapply") })] });
|
|
516
516
|
return ge({ ...i, children: x });
|
|
@@ -519,9 +519,9 @@ const Zs = q(X((n, a) => {
|
|
|
519
519
|
})), za = q(X((n, a) => {
|
|
520
520
|
const { quickCommand: t, icon: e, isRedo: r = !1, nestRedo: l = !0, undoManager: c, scope: p, sx: i, disabled: s, commands: d, ...x } = n, g = [t];
|
|
521
521
|
!r && l && g.push("redo");
|
|
522
|
-
const m = Ie(d, g), u = m[0],
|
|
523
|
-
let
|
|
524
|
-
s || (
|
|
522
|
+
const m = Ie(d, g), u = m[0], b = m[1], y = c ?? u?.context?.()?.undoManager;
|
|
523
|
+
let f = s;
|
|
524
|
+
s || (f = !u || u.disabled(), b && !b.disabled() && (f = !1));
|
|
525
525
|
const [h, w] = _(0), v = U((S, C) => {
|
|
526
526
|
let D = h === 0 ? "Cancel" : `${u.label()} ${h} Action${h === 1 ? "" : "s"}`, T = !1;
|
|
527
527
|
y || (T = !0), T || (T = l ? !y.hasRedo() && !y.hasUndo() : !y.hasRedo());
|
|
@@ -540,7 +540,7 @@ const Zs = q(X((n, a) => {
|
|
|
540
540
|
const k = r ? y?.getRedoDescriptions() : y?.getUndoDescriptions(), E = [];
|
|
541
541
|
for (let N = 0; N < k.length; N++) {
|
|
542
542
|
const L = k[N];
|
|
543
|
-
E.push(o(ct, { sx: { maxWidth: "360px", display: "flex" }, disabled:
|
|
543
|
+
E.push(o(ct, { sx: { maxWidth: "360px", display: "flex" }, disabled: f, selected: N < h, icon: o(he, {}), onMouseEnter: () => {
|
|
544
544
|
w(N + 1);
|
|
545
545
|
}, onMouseDown: (F) => {
|
|
546
546
|
F.button === 0 && F.preventDefault();
|
|
@@ -561,35 +561,35 @@ const Zs = q(X((n, a) => {
|
|
|
561
561
|
w(0);
|
|
562
562
|
}, children: [M, o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: E }), o(J, { orientation: "horizontal" }), R] });
|
|
563
563
|
return ge({ ...S, children: I });
|
|
564
|
-
}, [u?.context(), u?.state(), p, y, h,
|
|
565
|
-
return o(ve, { ref: a, commands: d, quickCommand: t, scope: p, disabled:
|
|
566
|
-
})), oo =
|
|
564
|
+
}, [u?.context(), u?.state(), p, y, h, f]);
|
|
565
|
+
return o(ve, { ref: a, commands: d, quickCommand: t, scope: p, disabled: f, label: u?.label() ?? (r ? "Redo" : "Undo"), tooltip: o(le, { children: o("span", { children: `${u?.label() ?? "No"} last actions.` }) }), createPopupPanel: v, icon: e ?? (r ? "Redo" : "Undo"), selected: !1, ...x });
|
|
566
|
+
})), oo = Pl.getFontList(), Ha = /* @__PURE__ */ new Map();
|
|
567
567
|
for (let n = 0; n < oo.length; n++) Ha.set(oo[n].fontRef.getFamily(), oo[n]);
|
|
568
|
-
const
|
|
568
|
+
const ec = q(X((n, a) => {
|
|
569
569
|
const { command: t, commandHook: e, sx: r, disabled: l = !1, parentFloat: c, icon: p, label: i, ...s } = n;
|
|
570
570
|
jt(t);
|
|
571
571
|
const d = t?.state(), x = Xe(), g = W(() => `${Ht.getSharedMeasurer()("Times New Roman", Math.round(x.typography.fontSize), x.typography.fontFamily).width}px`, [x]), m = U((u) => {
|
|
572
|
-
const
|
|
572
|
+
const b = (w) => {
|
|
573
573
|
t?.execute(w, e);
|
|
574
574
|
}, y = [];
|
|
575
575
|
for (let w = 0; w < oo.length; w++) y.push({ key: oo[w].fontRef.getFamily(), description: oo[w].fontRef.getFamily() });
|
|
576
576
|
Ha.get(d) || y.unshift({ key: d, description: d });
|
|
577
|
-
const
|
|
577
|
+
const f = [];
|
|
578
578
|
for (let w = 0; w < y.length; w++) {
|
|
579
579
|
const v = y[w].key === d;
|
|
580
|
-
|
|
581
|
-
S.button === 0 &&
|
|
580
|
+
f.push(o(ct, { sx: { display: "flex", paddingTop: "4px", paddingBottom: "4px" }, selected: v, disabled: l || !t || t.disabled(), icon: v ? o(on, {}) : void 0, onMouseUp: (S) => {
|
|
581
|
+
S.button === 0 && b(y[w].key);
|
|
582
582
|
}, onMouseDown: (S) => {
|
|
583
583
|
S.button === 0 && S.preventDefault();
|
|
584
584
|
}, onKeyDown: (S) => {
|
|
585
|
-
S.keyCode !== me.Enter && S.keyCode !== me.Space ||
|
|
585
|
+
S.keyCode !== me.Enter && S.keyCode !== me.Space || b(y[w].key);
|
|
586
586
|
}, children: o(B, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: o(Re, { component: "div", sx: { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", fontFamily: () => y[w]?.key }, children: y[w].description }) }) }, w + "" + y[w].key));
|
|
587
587
|
}
|
|
588
|
-
const h = o(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ...s, children: o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children:
|
|
588
|
+
const h = o(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ...s, children: o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: f }) });
|
|
589
589
|
return ge({ ...u, children: h });
|
|
590
590
|
}, [l, t?.state()]);
|
|
591
|
-
return o(kt, { ref: a, sx: { ...r }, outlined: !0, disabled: l, parentFloat: c, createPopupPanel: m, createTooltip: ({ children: u },
|
|
592
|
-
})),
|
|
591
|
+
return o(kt, { ref: a, sx: { ...r }, outlined: !0, disabled: l, parentFloat: c, createPopupPanel: m, createTooltip: ({ children: u }, b) => o(ot, { label: t?.label(), description: t?.description(), disabled: b, children: u }), icon: o(B, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (u) => `${Math.round(u.typography.fontSize)}px`, fontFamily: (u) => u.typography.fontFamily, color: (u) => u.palette.text.secondary, width: g }, children: o(B, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: d }) }), ...s });
|
|
592
|
+
})), tc = q(X((n, a) => {
|
|
593
593
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = Ie(t, ["formatStrikeThroughToggle", "formatSuperscriptToggle", "formatSubscriptToggle"]), i = W(() => {
|
|
594
594
|
for (let d = 0; d < p.length; d++) if (p[d]?.state()) return p[d];
|
|
595
595
|
return p[0];
|
|
@@ -598,7 +598,7 @@ const Qs = q(X((n, a) => {
|
|
|
598
598
|
return ge({ ...d, children: m });
|
|
599
599
|
}, [l, e, r]);
|
|
600
600
|
return o(ve, { ref: a, quickCommand: i?.key(), commands: t, commandHook: e, createPopupPanel: s, label: "Text Effects", tooltip: "Style your text to differentiate it.", icon: i?.icon() ?? "TextStrike", ...c });
|
|
601
|
-
})),
|
|
601
|
+
})), oc = q(X((n, a) => {
|
|
602
602
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = Ie(t, ["formatUnderlinedToggle", "formatUnderlinedDoubleToggle", "formatUnderlinedAccountingToggle", "formatUnderlinedAccountingDoubleToggle"]), i = W(() => {
|
|
603
603
|
for (let d = 0; d < p.length; d++) if (p[d]?.state()) return p[d];
|
|
604
604
|
return p[0];
|
|
@@ -613,41 +613,41 @@ const Qs = q(X((n, a) => {
|
|
|
613
613
|
return c && (m.push(Ee(O, { ...g, command: x.getCommand("paste"), key: "paste" })), m.push(o(J, { orientation: "horizontal" }, "paste-div"))), m.push(Ee(O, { ...g, command: x.getCommand("pasteValues"), key: "pasteValues" })), m.push(Ee(O, { ...g, command: x.getCommand("pasteFormats"), key: "pasteFormats" })), m.push(Ee(O, { ...g, command: x.getCommand("pasteFormulas"), key: "pasteFormulas" })), m.push(Ee(O, { ...g, command: x.getCommand("pasteTranspose"), key: "pasteTranspose" })), m.push(Ee(O, { ...g, command: x.getCommand("pasteLinks"), key: "pasteLinks" })), ge({ ...d, children: m });
|
|
614
614
|
}, [p, r, l, c]);
|
|
615
615
|
return o(ve, { ref: a, commands: e, commandHook: r, scope: l, createPopupPanel: s, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", icon: "paste", ...i });
|
|
616
|
-
})),
|
|
616
|
+
})), nc = q(X((n, a) => {
|
|
617
617
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, parentFloat: c, ...p } = n, i = Ie(t, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), s = U((d, x) => {
|
|
618
618
|
const g = { variant: ie.Menuitem, parentFloat: d.floatReference, commandHook: e, scope: r, disabled: l }, m = H(le, { children: [o(O, { ...g, command: x.getCommand("sheetViewToggleShowHeadings") }), o(O, { ...g, command: x.getCommand("sheetViewToggleShowHeadingsNumeric") }), o(J, { orientation: "horizontal" }), o(O, { ...g, command: x.getCommand("sheetViewToggleShowHeadingColumns") }), o(O, { ...g, command: x.getCommand("sheetViewToggleShowHeadingRows") })] });
|
|
619
619
|
return ge({ ...d, children: m });
|
|
620
620
|
}, [l, e, r]);
|
|
621
621
|
return o(ve, { ref: a, parentFloat: c, quickCommand: i[0]?.key(), commands: t, commandHook: e, createPopupPanel: s, label: "Headings", tooltip: "Configure how the column and rows headings in the sheet are displayed.", icon: o(nn, { command: i[0], scope: "view" }), ...p });
|
|
622
|
-
})),
|
|
622
|
+
})), rc = q(X((n, a) => {
|
|
623
623
|
const { commands: t, commandHook: e, scope: r = "view", disabled: l = !1, ...c } = n, p = U((i) => {
|
|
624
624
|
const s = { variant: ie.Menuitem, parentFloat: i.floatReference, commandHook: e, scope: r, disabled: l }, d = H(le, { children: [o(O, { ...s, command: t.getCommand("workbookViewToggleShowFormulaBar") }), o(O, { ...s, command: t.getCommand("workbookViewToggleShowTabs") }), o(O, { ...s, command: t.getCommand("workbookViewToggleShowStatusBar") }), o(J, { orientation: "horizontal" }), o(O, { ...s, command: t.getCommand("workbookViewToggleShowHorizontalScrollBar") }), o(O, { ...s, command: t.getCommand("workbookViewToggleShowVerticalScrollBar") })] });
|
|
625
625
|
return ge({ ...i, children: d });
|
|
626
626
|
}, [l, t, e, r]);
|
|
627
627
|
return o(ve, { ref: a, commands: t, disabled: l, commandHook: e, scope: r, label: "Workbook View", tooltip: "Options to configure how the workbook is displayed.", createPopupPanel: p, icon: o(nn, { icon: null, label: "Workbook View" }), ...c });
|
|
628
628
|
})), ja = q(X((n, a) => {
|
|
629
|
-
const { value: t, cellStyle: e, styles: r, createTemporaryCell: l, bodyStyle: c, sx: p, borderProps: i, disabled: s, ...d } = n, x = W(() => l({ value: t, style: e }), [t, e, l]), g = W(() => x.getStyle(), [x, c]), m = W(() => g.getFill().toCSS(c?.darkMode ?? !1), [g]), u = g.getInsets(),
|
|
630
|
-
return o(B, { ref: a, sx: { width: "100px", height: "100%", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: c?.fill, filter: s ? "grayscale(0.4) opacity(0.8);" : "none", "& .fill": { flex: "1 1 100%", overflow: "hidden", ...m }, "& .text": { flex: "1 1 100%", ...
|
|
631
|
-
})),
|
|
629
|
+
const { value: t, cellStyle: e, styles: r, createTemporaryCell: l, bodyStyle: c, sx: p, borderProps: i, disabled: s, ...d } = n, x = W(() => l({ value: t, style: e }), [t, e, l]), g = W(() => x.getStyle(), [x, c]), m = W(() => g.getFill().toCSS(c?.darkMode ?? !1), [g]), u = g.getInsets(), b = g.getFont(), y = U(() => g.getBorder(), [g]);
|
|
630
|
+
return o(B, { ref: a, sx: { width: "100px", height: "100%", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: c?.fill, filter: s ? "grayscale(0.4) opacity(0.8);" : "none", "& .fill": { flex: "1 1 100%", overflow: "hidden", ...m }, "& .text": { flex: "1 1 100%", ...b.toCSS(c?.darkMode ?? !1, 1), boxSizing: "border-box", padding: `${u.top}px ${u.right}px ${u.bottom}px ${u.left}px`, margin: "0px", outline: "none", resize: "none", overflow: "hidden", textOverflow: "ellipsis", verticalAlign: "baseline", textDecoration: b.toCSS().textDecoration, textAlign: Rl.toCSSHorizontalTextAlign(x.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...p }, ...d, children: o(_n, { getBorderAt: y, darkMode: c?.darkMode ?? !1, rowCount: 1, columnCount: 1, style: { height: "100%", width: "100%", ...i?.style }, ...i, children: o(B, { className: "fill", sx: { paddingLeft: "4px", paddingRight: "4px", marginLeft: "-1px", marginTop: "-1px", marginRight: "-2px", marginBottom: "-2px", display: "flex", alignItems: "center" }, children: o(B, { className: "text", children: t }) }) }) });
|
|
631
|
+
})), ac = q((n) => {
|
|
632
632
|
const { styles: a, namedStyle: t, selectedNamed: e, hasContextMenu: r = !0, bodyStyle: l, onSelectNamed: c, createTemporaryCell: p, parentFloat: i, commands: s, disabled: d, commandHook: x, ...g } = n, m = U((y) => {
|
|
633
|
-
const
|
|
633
|
+
const f = { variant: ie.Menuitem, commandHook: x, context: "cellStyle" }, h = H(le, { children: [o(O, { ...f, style: { fontWeight: 550 }, command: s.getCommand("formatCellStyle"), commandState: t, disabled: d }), o(J, { orientation: "horizontal" }), o(O, { ...f, command: s.getCommand("modifyCellStyle"), commandState: { named: t } }), o(O, { ...f, command: s.getCommand("deleteCellStyle"), commandState: t, disabled: d || t?.getName() === ce.BuiltInName.Normal })] });
|
|
634
634
|
return ge({ ...y, children: o(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: h }) }) });
|
|
635
635
|
}, []), u = t?.getName() === e?.getName();
|
|
636
|
-
let
|
|
636
|
+
let b = o(ft, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (y) => `solid ${u ? y.palette.primary.dark : "transparent"} 1px` }, tooltipProps: { label: t.getName(), placement: "bottom-start" }, disabled: d, icon: null, onClick: () => {
|
|
637
637
|
c?.(t);
|
|
638
638
|
}, ...g, children: o(ja, { value: t.getName(), cellStyle: { named: t.getName() }, styles: a, createTemporaryCell: p, bodyStyle: l }) }, t.getName());
|
|
639
|
-
return r && (
|
|
640
|
-
}),
|
|
639
|
+
return r && (b = o(Pa, { label: t.getName(), parentFloat: i, createPopupPanel: m, children: b })), b;
|
|
640
|
+
}), ic = q(X((n, a) => {
|
|
641
641
|
const { commands: t, command: e, commandHook: r, selectedNamed: l, onSelectNamed: c, disabled: p = !1, bodyStyle: i, usePreviewIcon: s = !0, ...d } = n;
|
|
642
642
|
jt(e);
|
|
643
|
-
const x = e?.context(), g = x?.styles, m = l ?? x?.named(), u = i ?? x?.bodyStyle(),
|
|
643
|
+
const x = e?.context(), g = x?.styles, m = l ?? x?.named(), u = i ?? x?.bodyStyle(), b = Y((v) => {
|
|
644
644
|
c?.(v), e?.execute(v, r);
|
|
645
645
|
}, [e, c, r]), y = U((v, S) => {
|
|
646
|
-
const C = { onSelectNamed:
|
|
646
|
+
const C = { onSelectNamed: b, styles: g(), parentFloat: v.floatReference }, D = g().getCustomNamed(), T = /* @__PURE__ */ new Map(), P = [];
|
|
647
647
|
for (let F = 0; F < D.length; F++) T.set(D[F].getName(), D[F]), g().getNamed(D[F].getName()).getBuiltInID() === null && P.push(D[F].getName());
|
|
648
648
|
const R = (F) => {
|
|
649
649
|
let z = T.get(F);
|
|
650
|
-
return z || (z = g().getNamed(F)), !z || z.isHidden() ? null : o(
|
|
650
|
+
return z || (z = g().getNamed(F)), !z || z.isHidden() ? null : o(ac, { namedStyle: z, selectedNamed: m, bodyStyle: x.bodyStyle(), createTemporaryCell: x.createTemporaryCell, commands: t, commandHook: r, ...C }, F);
|
|
651
651
|
}, k = (F, z, ae = !0) => {
|
|
652
652
|
const Q = [];
|
|
653
653
|
for (let ue = 0; ue < z.length; ue++) {
|
|
@@ -668,23 +668,23 @@ const Qs = q(X((n, a) => {
|
|
|
668
668
|
var N, L;
|
|
669
669
|
return I.push(E("Accent 1", [ce.BuiltInName.Accent1_20, ce.BuiltInName.Accent1_40, ce.BuiltInName.Accent1_60, ce.BuiltInName.Accent1])), I.push(E("Accent 2", [ce.BuiltInName.Accent2_20, ce.BuiltInName.Accent2_40, ce.BuiltInName.Accent2_60, ce.BuiltInName.Accent2])), I.push(E("Accent 3", [ce.BuiltInName.Accent3_20, ce.BuiltInName.Accent3_40, ce.BuiltInName.Accent3_60, ce.BuiltInName.Accent3])), I.push(E("Accent 4", [ce.BuiltInName.Accent4_20, ce.BuiltInName.Accent4_40, ce.BuiltInName.Accent4_60, ce.BuiltInName.Accent4])), I.push(E("Accent 5", [ce.BuiltInName.Accent5_20, ce.BuiltInName.Accent5_40, ce.BuiltInName.Accent5_60, ce.BuiltInName.Accent5])), I.push(E("Accent 6", [ce.BuiltInName.Accent6_20, ce.BuiltInName.Accent6_40, ce.BuiltInName.Accent6_60, ce.BuiltInName.Accent6])), M.push((N = "Themed Cell Styles", L = I, H(B, { children: [o(J, { orientation: "horizontal" }), o(ro, { children: N }, N + "-header"), o(B, { sx: { display: "flex", gap: "2px", flexWrap: "wrap", alignItems: "start", flexDirection: "row" }, children: L }, N + "-presets")] }, N))), M.push(k("Number Format", [ce.BuiltInName.Comma, ce.BuiltInName.Comma0, ce.BuiltInName.Currency, ce.BuiltInName.Currency0, ce.BuiltInName.Percent])), H(B, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (F) => `${F.shape.borderRadius}px`, paddingBottom: (F) => `${F.shape.borderRadius}px` }, children: [o(B, { onContextMenu: () => {
|
|
670
670
|
}, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: M }), o(J, { orientation: "horizontal" }), o(O, { variant: ie.Menuitem, commandState: m, command: S.getCommand("newCellStyle"), context: "styles", commandHook: r, disabled: p })] });
|
|
671
|
-
}, [m, g?.().getTheme(), u]),
|
|
671
|
+
}, [m, g?.().getTheme(), u]), f = Y((v) => {
|
|
672
672
|
const S = 18 / Ht.getDeviceScale(), C = x?.createTemporaryCell(v);
|
|
673
673
|
return C.getStyle().getFont().getSize() <= S ? C : C.createTemporaryCell({ style: { font: { size: S } } });
|
|
674
|
-
}, [x?.createTemporaryCell]), h = p || !e || e.disabled(), w = W(() => x && s ? o(ja, { value: m?.getName() ?? "Custom", cellStyle: m ? { named: m.getName() } : void 0, styles: x.styles(), createTemporaryCell:
|
|
674
|
+
}, [x?.createTemporaryCell]), h = p || !e || e.disabled(), w = W(() => x && s ? o(ja, { value: m?.getName() ?? "Custom", cellStyle: m ? { named: m.getName() } : void 0, styles: x.styles(), createTemporaryCell: f, bodyStyle: x.bodyStyle(), className: "outline-hover", disabled: h, sx: { marginRight: "4px", borderRadius: "2px", minHeight: "calc(100% - 2px)", overflow: "hidden", outline: (v) => `1px solid ${v.palette.action.hover}` }, borderProps: { style: { height: "calc(100% - 2px)", width: "calc(100% - 1px)" } } }) : e?.icon(), [m, u, h, e]);
|
|
675
675
|
return o(ve, { ref: a, createPopupPanel: y, outlined: s, commands: t, createTooltip: ({ children: v }, S) => o(ot, { label: e?.label(), description: e?.description(), disabled: S, children: v }), selected: !1, disabled: h, label: e?.label(), icon: w, ...d });
|
|
676
|
-
})), $a = "_sheetxl-reset_11z3j_1",
|
|
677
|
-
const { styles: t, table: e, tableStyle: r = e?.getStyle() ?? t.getDefaultTableStyle(), bodyStyle: l, sx: c, disabled: p, className: i, forceThinBorder: s, cellHeight: d =
|
|
676
|
+
})), $a = "_sheetxl-reset_11z3j_1", lc = 10, Va = q(X((n, a) => {
|
|
677
|
+
const { styles: t, table: e, tableStyle: r = e?.getStyle() ?? t.getDefaultTableStyle(), bodyStyle: l, sx: c, disabled: p, className: i, forceThinBorder: s, cellHeight: d = lc, isLive: x = !1, ...g } = n, m = Math.ceil(1.3 * d), [u, b] = tn((v) => v + 1, 0);
|
|
678
678
|
de(() => {
|
|
679
679
|
if (x && e) return e.addListeners({ onAnyChange: () => {
|
|
680
|
-
|
|
680
|
+
b();
|
|
681
681
|
} });
|
|
682
682
|
}, [e, x]);
|
|
683
683
|
const y = W(() => {
|
|
684
684
|
let v = e?.toJSON() ?? {};
|
|
685
685
|
const S = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
|
|
686
686
|
return v && (v.styleOptions = { ...v.styleOptions, name: r.getName() }), v.ref = S, new Vn({ initialAnchor: S, json: v, styles: t });
|
|
687
|
-
}, [u, e, r, t]),
|
|
687
|
+
}, [u, e, r, t]), f = W(() => {
|
|
688
688
|
const v = [];
|
|
689
689
|
for (let S = 0; S < 5; S++) for (let C = 0; C < 5; C++) {
|
|
690
690
|
const D = y.getStyleAt({ colIndex: C, rowIndex: S });
|
|
@@ -700,64 +700,64 @@ const Qs = q(X((n, a) => {
|
|
|
700
700
|
for (let C = 0; C < 5; C++) {
|
|
701
701
|
const D = [];
|
|
702
702
|
for (let T = 0; T < 5; T++) {
|
|
703
|
-
const P =
|
|
703
|
+
const P = f[5 * C + T];
|
|
704
704
|
D.push(v(C, T, P));
|
|
705
705
|
}
|
|
706
706
|
S.push(o("tr", { children: D }, C));
|
|
707
707
|
}
|
|
708
708
|
return S;
|
|
709
|
-
}, [y, r, l]), w = U((v, S) =>
|
|
709
|
+
}, [y, r, l]), w = U((v, S) => f[S].getBorder() ?? null, [f]);
|
|
710
710
|
return o(B, { ref: a, className: "table-format-preview", sx: { background: l?.fill, filter: p ? "grayscale(0.4) opacity(0.8);" : "none", "& .styled-element": { position: "absolute" }, ...c }, ...g, children: o(_n, { getBorderAt: w, rowCount: 5, columnCount: 5, forceThinBorder: s, width: 5 * (m - 1) + 1, height: 5 * (d - 1) + 1, darkMode: l?.darkMode ?? !1, style: { pointerEvents: "none" }, children: o("table", { className: Ce(i, "sheetxl-table-preview", $a), style: { borderCollapse: "collapse", width: 5 * (m - 1) + 1, height: 5 * (d - 1) + 1 }, children: o("tbody", { children: h }) }) }) });
|
|
711
711
|
})), go = (n, a, t, e, r) => {
|
|
712
712
|
n.beginPath(), n.moveTo(a + 0.5, t + 0.5), n.lineTo(e + 0.5, r + 0.5), n.stroke();
|
|
713
|
-
},
|
|
713
|
+
}, sc = q(X((n, a) => {
|
|
714
714
|
const { table: t, tableStyle: e, styles: r, bodyStyle: l, disabled: c, style: p, className: i, canvas: s, ...d } = n, x = W(() => {
|
|
715
|
-
const u = t.toJSON(),
|
|
716
|
-
return u.styleOptions = { ...u.styleOptions, name: e.getName() }, u.ref =
|
|
715
|
+
const u = t.toJSON(), b = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
|
|
716
|
+
return u.styleOptions = { ...u.styleOptions, name: e.getName() }, u.ref = b, new Vn({ initialAnchor: b, json: u, styles: r });
|
|
717
717
|
}, [t, e, r]), g = W(() => {
|
|
718
718
|
const u = [];
|
|
719
|
-
for (let
|
|
720
|
-
const
|
|
721
|
-
u.push(
|
|
719
|
+
for (let b = 0; b < 5; b++) for (let y = 0; y < 5; y++) {
|
|
720
|
+
const f = x.getStyleAt({ colIndex: y, rowIndex: b });
|
|
721
|
+
u.push(f);
|
|
722
722
|
}
|
|
723
723
|
return u;
|
|
724
724
|
}, [x]), m = W(() => {
|
|
725
725
|
let u = s;
|
|
726
726
|
if (s || (u = document.createElement("canvas")), !u) return null;
|
|
727
727
|
u.width !== 61 && (u.width = 61), u.height !== 46 && (u.height = 46);
|
|
728
|
-
const
|
|
729
|
-
if (!
|
|
730
|
-
const y = 12,
|
|
728
|
+
const b = u.getContext("2d", { alpha: !1 });
|
|
729
|
+
if (!b) return null;
|
|
730
|
+
const y = 12, f = l?.darkMode ?? !1;
|
|
731
731
|
for (let h = 0; h < 5; h++) for (let w = 0; w < 5; w++) {
|
|
732
732
|
const v = g[5 * h + w].getFill();
|
|
733
733
|
let S = l?.fill;
|
|
734
|
-
v.getType() === xn.Type.Solid ? S = v.getColor().toCSS(
|
|
734
|
+
v.getType() === xn.Type.Solid ? S = v.getColor().toCSS(f, !1) : v.getType() === xn.Type.Gradient ? S = v.getStops[0]?.color.toCSS(f, !1) : v.getType() === xn.Type.Pattern && (S = v.getForeground().toCSS(f, !1)), b.fillStyle = S;
|
|
735
735
|
const C = w * y, D = 9 * h;
|
|
736
|
-
|
|
736
|
+
b.fillRect(C, D, 13, 10);
|
|
737
737
|
}
|
|
738
|
-
|
|
738
|
+
b.lineWidth = 1;
|
|
739
739
|
for (let h = 0; h < 5; h++) for (let w = 0; w < 5; w++) {
|
|
740
740
|
const v = g[5 * h + w], S = w * y, C = 9 * h, D = v.getBorder();
|
|
741
741
|
if (!D.isEmpty()) {
|
|
742
742
|
const R = D.getLeft();
|
|
743
|
-
R.isNone() || (
|
|
743
|
+
R.isNone() || (b.strokeStyle = R.getColor().toCSS(f, !1), go(b, S, C, S, C + 9));
|
|
744
744
|
const k = D.getTop();
|
|
745
|
-
k.isNone() || (
|
|
745
|
+
k.isNone() || (b.strokeStyle = k.getColor().toCSS(f, !1), go(b, S, C, S + y, 9 * h));
|
|
746
746
|
const E = D.getRight();
|
|
747
|
-
E.isNone() || (
|
|
747
|
+
E.isNone() || (b.strokeStyle = E.getColor().toCSS(f, !1), go(b, S + y, C, S + y, C + 9));
|
|
748
748
|
const M = D.getBottom();
|
|
749
|
-
M.isNone() || (
|
|
749
|
+
M.isNone() || (b.strokeStyle = M.getColor().toCSS(f, !1), go(b, S, C + 9, S + y, C + 9));
|
|
750
750
|
}
|
|
751
|
-
|
|
751
|
+
b.strokeStyle = v.getFont().getFill().toCSS(f, !1);
|
|
752
752
|
const T = 4, P = 2.5;
|
|
753
|
-
go(
|
|
753
|
+
go(b, w * y + P, 9 * h + T, w * y + P + 7, 9 * h + T);
|
|
754
754
|
}
|
|
755
755
|
return `url(${u.toDataURL()})`;
|
|
756
756
|
}, [s, x, e, l]);
|
|
757
757
|
return o("div", { ref: a, className: Ce("table-style-preview", i), style: { backgroundImage: m, width: 61, height: 46, ...p }, ...d });
|
|
758
|
-
})),
|
|
758
|
+
})), cc = "_table-style-options-container_1kfn2_1", dc = "_table-style-options_1kfn2_1", pc = q(X((n, a) => {
|
|
759
759
|
const { styleOptions: t, onStyleOptionsChange: e, showHeaderRow: r, onShowHeaderRowChange: l, showTotalRow: c, onShowTotalRowChange: p, showFilterButton: i, onShowFilterButtonChange: s, sx: d, className: x, disabled: g, ...m } = n;
|
|
760
|
-
return o("div", { className:
|
|
760
|
+
return o("div", { className: cc, children: H(B, { sx: { pt: 1, pb: 1, "& .MuiFormControlLabel-root": { marginLeft: (u) => `${u.spacing(2)}`, marginRight: (u) => `${u.spacing(2)}` }, "& .MuiCheckbox-root": { padding: (u) => `${u.spacing(0.5)}` }, ...d }, ...m, ref: a, className: Ce(x, dc), children: [l && o(Rt, { control: o(Mt, { checked: r ?? !1, indeterminate: r == null, onChange: () => l(!r), disabled: g || r == null }), label: "Header Row", labelPlacement: "end" }), p && o(Rt, { control: o(Mt, { checked: c ?? !1, indeterminate: c == null, onChange: () => p(!c), disabled: g || c == null }), label: "Total Row", labelPlacement: "end" }), o(Rt, { control: o(Mt, { checked: t?.showRowStripes ?? !1, indeterminate: !t, disabled: g || !t, onChange: () => {
|
|
761
761
|
e?.({ ...t, showRowStripes: !t?.showRowStripes });
|
|
762
762
|
} }), label: "Banded Rows", labelPlacement: "end" }), o(Rt, { control: o(Mt, { checked: t?.showFirstColumn ?? !1, indeterminate: !t, disabled: g || !t, onChange: () => {
|
|
763
763
|
e?.({ ...t, showFirstColumn: !t?.showFirstColumn });
|
|
@@ -771,7 +771,7 @@ function wn(n, a) {
|
|
|
771
771
|
if (typeof n == "function") return n(a);
|
|
772
772
|
n && (n.current = a);
|
|
773
773
|
}
|
|
774
|
-
var $t = parseInt(
|
|
774
|
+
var $t = parseInt(Ul.split(".")[0], 10) >= 19 ? function(n) {
|
|
775
775
|
return (a) => {
|
|
776
776
|
const t = [];
|
|
777
777
|
for (const e of n) {
|
|
@@ -786,34 +786,34 @@ var $t = parseInt(_l.split(".")[0], 10) >= 19 ? function(n) {
|
|
|
786
786
|
return (a) => {
|
|
787
787
|
for (const t of n) wn(t, a);
|
|
788
788
|
};
|
|
789
|
-
},
|
|
789
|
+
}, uc = function() {
|
|
790
790
|
}, _a = typeof window < "u", Do = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
791
|
-
function
|
|
791
|
+
function op(n) {
|
|
792
792
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
793
793
|
}
|
|
794
|
-
var
|
|
794
|
+
var mc = _a ? St : de, Dr = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
|
|
795
795
|
const zt = _a && window.ResizeObserver !== void 0 ? function() {
|
|
796
796
|
var n = _(null), a = n[0], t = n[1], e = _(Dr), r = e[0], l = e[1], c = W(function() {
|
|
797
797
|
return new window.ResizeObserver(function(p) {
|
|
798
798
|
if (p[0]) {
|
|
799
|
-
var i = p[0].contentRect, s = i.x, d = i.y, x = i.width, g = i.height, m = i.top, u = i.left,
|
|
800
|
-
l({ x: s, y: d, width: x, height: g, top: m, left: u, bottom:
|
|
799
|
+
var i = p[0].contentRect, s = i.x, d = i.y, x = i.width, g = i.height, m = i.top, u = i.left, b = i.bottom, y = i.right;
|
|
800
|
+
l({ x: s, y: d, width: x, height: g, top: m, left: u, bottom: b, right: y });
|
|
801
801
|
}
|
|
802
802
|
});
|
|
803
803
|
}, []);
|
|
804
|
-
return
|
|
804
|
+
return mc(function() {
|
|
805
805
|
if (a) return c.observe(a), function() {
|
|
806
806
|
c.disconnect();
|
|
807
807
|
};
|
|
808
808
|
}, [a]), [t, r];
|
|
809
809
|
} : function() {
|
|
810
|
-
return [
|
|
811
|
-
},
|
|
810
|
+
return [uc, Dr];
|
|
811
|
+
}, hc = "_range-row_akhf4_1", gc = "_action-row_akhf4_15", Ua = re.createContext(null);
|
|
812
812
|
Ua.displayName = "HookFormContext";
|
|
813
813
|
const Ga = () => re.useContext(Ua);
|
|
814
814
|
typeof window < "u" ? re.useLayoutEffect : re.useEffect;
|
|
815
815
|
const qa = q(X((n, a) => {
|
|
816
|
-
const { disabled: t, style: e, className: r, sx: l, defaultInput: c, value: p, formName: i, formOptions: s, onChangeInput: d, onValidate: x, onKeyDown: g, ...m } = n, u = Ga(),
|
|
816
|
+
const { disabled: t, style: e, className: r, sx: l, defaultInput: c, value: p, formName: i, formOptions: s, onChangeInput: d, onValidate: x, onKeyDown: g, ...m } = n, u = Ga(), b = i && u ? u.register(i, s) : null, [y, f] = _(""), [h, w] = _(""), [v, S] = _(p);
|
|
817
817
|
de(() => {
|
|
818
818
|
S(p), w("");
|
|
819
819
|
}, [p]);
|
|
@@ -828,19 +828,19 @@ const qa = q(X((n, a) => {
|
|
|
828
828
|
}, [p, x, d]), D = Y(async (k) => {
|
|
829
829
|
k.keyCode === me.Escape && y !== p && (C(y), u?.setValue(i, y), u?.clearErrors(i), k.stopPropagation()), g?.(k);
|
|
830
830
|
}, [g, y, p, u]), T = Y((k) => {
|
|
831
|
-
|
|
831
|
+
f(k.target.value ?? "");
|
|
832
832
|
}, []), P = Y((k) => {
|
|
833
|
-
|
|
833
|
+
f(""), b?.onBlur(k);
|
|
834
834
|
}, []), R = U((k) => {
|
|
835
|
-
C(k.target.value),
|
|
836
|
-
}, [
|
|
837
|
-
return o(Xn, { sx: { paddingTop: (k) => k.spacing(1.5), minWidth: 135, width: "100%", ...l }, size: "small", ref: a, className: Ce("named-input", r), ...m, children: o(Ca, { label: "Name", placeholder: c, onFocus: T, onBlur: P, inputRef:
|
|
835
|
+
C(k.target.value), b?.onChange(k);
|
|
836
|
+
}, [b]);
|
|
837
|
+
return o(Xn, { sx: { paddingTop: (k) => k.spacing(1.5), minWidth: 135, width: "100%", ...l }, size: "small", ref: a, className: Ce("named-input", r), ...m, children: o(Ca, { label: "Name", placeholder: c, onFocus: T, onBlur: P, inputRef: b?.ref, disabled: t, error: !!h, helperText: h || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (k) => k.spacing(0.5) } }, slotProps: { inputLabel: { shrink: !0 }, htmlInput: { className: "autoFocus", name: i, spellCheck: !1, autoComplete: "off", readOnly: t, sx: { paddingTop: (k) => k.spacing(1.25), paddingBottom: (k) => k.spacing(0.75), backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})` } } }, value: v ?? "", onChange: R, onKeyDownCapture: D, onContextMenu: (k) => {
|
|
838
838
|
k.stopPropagation();
|
|
839
839
|
} }) });
|
|
840
840
|
}));
|
|
841
841
|
qa.displayName = "NamedInput";
|
|
842
842
|
const zo = (n) => n === null ? "" : n.toString(), Ka = q(X((n, a) => {
|
|
843
|
-
const { formName: t, formOptions: e, disabled: r, style: l, className: c, sx: p, onKeyDown: i, value: s, onChangeInput: d, resolvedAddress: x, ...g } = n, m = Ga(), u = t && m ? m.register(t, e) : null, [
|
|
843
|
+
const { formName: t, formOptions: e, disabled: r, style: l, className: c, sx: p, onKeyDown: i, value: s, onChangeInput: d, resolvedAddress: x, ...g } = n, m = Ga(), u = t && m ? m.register(t, e) : null, [b, y] = _(""), [f, h] = _(!1), [w, v] = _(() => zo(s));
|
|
844
844
|
de(() => {
|
|
845
845
|
v(zo(s)), y(""), t && m && m.clearErrors(t), h(!1);
|
|
846
846
|
}, [s]);
|
|
@@ -855,26 +855,26 @@ const zo = (n) => n === null ? "" : n.toString(), Ka = q(X((n, a) => {
|
|
|
855
855
|
}
|
|
856
856
|
t && m && (M ? m.setError(t, { message: M }) : m.clearErrors(t)), y(M), h(!0);
|
|
857
857
|
}, [w, d, t, m]), C = Y(async (E) => {
|
|
858
|
-
if (
|
|
858
|
+
if (f && E.keyCode === me.Escape) {
|
|
859
859
|
const M = zo(s);
|
|
860
860
|
v(M), y(""), h(!1), E.stopPropagation();
|
|
861
861
|
}
|
|
862
862
|
i?.(E);
|
|
863
|
-
}, [s, d, i,
|
|
863
|
+
}, [s, d, i, f]), D = Y((E) => {
|
|
864
864
|
u?.onBlur(E);
|
|
865
865
|
}, [u]), T = U((E) => {
|
|
866
866
|
S(E.target.value), u?.onChange(E);
|
|
867
|
-
}, [u]), [P, R] = _(!1), k = W(() => o(
|
|
867
|
+
}, [u]), [P, R] = _(!1), k = W(() => o(Yl, { tabIndex: -1, sx: { display: "flex", position: "relative", flex: "0" }, position: "end", children: o(ls, { disabled: !0, selected: P, onSelectToggle: (E) => {
|
|
868
868
|
R(E);
|
|
869
869
|
}, label: "Select Range", icon: o(he, { iconKey: "SelectRangeMode" }) }) }), [P]);
|
|
870
|
-
return o(Xn, { sx: { paddingTop: (E) => E.spacing(1.5), minWidth: 135, width: "100%", ...p }, size: "small", ref: a, className: Ce("range-input", c), ...g, children: o(Ca, { label: "Range", placeholder: "Enter Range", onBlur: D, disabled: r, error: !!
|
|
870
|
+
return o(Xn, { sx: { paddingTop: (E) => E.spacing(1.5), minWidth: 135, width: "100%", ...p }, size: "small", ref: a, className: Ce("range-input", c), ...g, children: o(Ca, { label: "Range", placeholder: "Enter Range", onBlur: D, disabled: r, error: !!b, inputRef: u?.ref, helperText: b || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (E) => E.spacing(0.5) } }, slotProps: { input: { endAdornment: k }, inputLabel: { shrink: !0 }, htmlInput: { spellCheck: !1, autoComplete: "off", readOnly: r, name: t, sx: { paddingTop: (E) => E.spacing(1.25), paddingBottom: (E) => E.spacing(0.75) } } }, value: w ?? "", onChange: T, onKeyDownCapture: C, onContextMenu: (E) => {
|
|
871
871
|
E.stopPropagation();
|
|
872
872
|
} }) });
|
|
873
873
|
}));
|
|
874
874
|
Ka.displayName = "RangeInput";
|
|
875
875
|
const Ze = [];
|
|
876
876
|
Ze.push(et("Primary Background", "bg1")), Ze.push(et("Primary Text", "tx1")), Ze.push(et("Secondary Background", "bg2")), Ze.push(et("Secondary Text", "tx2")), Ze.push(et("Accent 1", "accent1")), Ze.push(et("Accent 2", "accent2")), Ze.push(et("Accent 3", "accent3")), Ze.push(et("Accent 4", "accent4")), Ze.push(et("Accent 5", "accent5")), Ze.push(et("Accent 6", "accent6"));
|
|
877
|
-
const
|
|
877
|
+
const fc = (n) => {
|
|
878
878
|
const { docTheme: a, onSelectTheme: t, darkMode: e, isSelected: r, outlined: l, sx: c, ...p } = n, i = Xe(), s = W(() => {
|
|
879
879
|
let d = [];
|
|
880
880
|
for (let x = 0; x < Ze.length; x++) {
|
|
@@ -885,29 +885,29 @@ const hc = (n) => {
|
|
|
885
885
|
}, [a, i]);
|
|
886
886
|
return o(ft, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (d) => `solid ${r ? d.palette.text.primary : "transparent"} 1px`, "&:hover:not([disabled])": { border: (d) => `solid ${d.palette.text.primary} 1px !important` } }, icon: null, ...p, children: H(B, { sx: { border: (d) => `solid ${d.palette.divider} 1px`, minWidth: "200px", borderRadius: "2px", padding: "4px 4px", textAlign: "left", display: "flex", gap: "4px", flexDirection: "column", alignItems: "stretch", color: (d) => r ? d.palette.text.primary : void 0, "&:hover:not([disabled])": { color: (d) => d.palette.text.primary } }, children: [o(B, { sx: {}, children: a.getName() }), H(B, { sx: { paddingTop: "6px", paddingLeft: "12px", paddingRight: "12px", display: "flex", flexDirection: "column", alignItems: "stretch" }, children: [s, o(B, { sx: { flex: "1 1 100%", textOverflow: "ellipsis", overflow: "hidden", marginTop: "2px", whiteSpace: "pre", fontFamily: () => a.getFontScheme().getMajorFont() }, children: o(vt, { disableInteractive: !0, slotProps: { popper: { style: { pointerEvents: "none" }, disablePortal: !0, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: !0, options: { boundariesElement: "viewport" } }] } } }, title: o("div", { style: { textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "pre" }, children: `The font used for the body.
|
|
887
887
|
The heading font is '${a.getFontScheme().getMajorFont()}'.` }), placement: "bottom-start", children: o("div", { children: a.getFontScheme().getMinorFont() }) }) })] })] }) });
|
|
888
|
-
},
|
|
888
|
+
}, bc = q(X((n, a) => {
|
|
889
889
|
const { themes: t, selectedTheme: e, onSelectTheme: r, sx: l, disabled: c = !1, darkMode: p, ...i } = n, s = W(() => {
|
|
890
890
|
const d = t?.getItems({ selected: e }) ?? [], x = [];
|
|
891
891
|
if (d.length === 0) return o(ro, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "6px", paddingBottom: "6px" }, children: "No themes" });
|
|
892
892
|
const g = d.length;
|
|
893
893
|
for (let m = 0; m < g; m++) {
|
|
894
|
-
const u = d[m],
|
|
895
|
-
y && y.isCustom() !== u.isCustom() && x.push(o(J, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${m}`)), x.push(o(
|
|
896
|
-
|
|
897
|
-
}, onMouseUp: (
|
|
898
|
-
|
|
899
|
-
}, onKeyDown: (
|
|
900
|
-
|
|
894
|
+
const u = d[m], b = e && u?.getName() === e.getName(), y = d[m + 1];
|
|
895
|
+
y && y.isCustom() !== u.isCustom() && x.push(o(J, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${m}`)), x.push(o(fc, { docTheme: u, onSelectTheme: () => r(u), isSelected: b, disabled: c, darkMode: p, onMouseDown: (f) => {
|
|
896
|
+
f.button === 0 && f.preventDefault();
|
|
897
|
+
}, onMouseUp: (f) => {
|
|
898
|
+
f.button === 0 && r(u);
|
|
899
|
+
}, onKeyDown: (f) => {
|
|
900
|
+
f.keyCode !== me.Enter && f.keyCode !== me.Space || r(u);
|
|
901
901
|
} }, u.getName()));
|
|
902
902
|
}
|
|
903
903
|
return x;
|
|
904
904
|
}, [e, r, p]);
|
|
905
905
|
return o(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ref: a, ...i, children: H(B, { sx: { display: "flex", flexDirection: "column", overflow: "hidden" }, children: [o(ro, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "4px", paddingBottom: "2px" }, children: "Themes" }), o(J, {}), o(B, { sx: { flex: "1 1 100%", overflow: "auto", padding: "6px 16px" }, children: s })] }) });
|
|
906
|
-
})),
|
|
907
|
-
const { themes: t, selectedTheme: e, onSelectTheme: r, icon: l, tooltip: c, label: p, variant: i = tt.Toolbar, darkMode: s, panelProps: d, ...x } = n, g = l || o(he, { iconKey: "Theme2" }), m = U((
|
|
908
|
-
const { closeFloatAll: y } =
|
|
909
|
-
return o(
|
|
910
|
-
|
|
906
|
+
})), xc = q(X((n, a) => {
|
|
907
|
+
const { themes: t, selectedTheme: e, onSelectTheme: r, icon: l, tooltip: c, label: p, variant: i = tt.Toolbar, darkMode: s, panelProps: d, ...x } = n, g = l || o(he, { iconKey: "Theme2" }), m = U((b) => {
|
|
908
|
+
const { closeFloatAll: y } = b;
|
|
909
|
+
return o(bc, { ...d, themes: t, selectedTheme: e, onSelectTheme: r, darkMode: s, onKeyDown: (f) => {
|
|
910
|
+
f.which === me.Enter && y();
|
|
911
911
|
} });
|
|
912
912
|
}, [t, e, r, d, s]), u = { createPopupPanel: m, tooltip: c || p || "Theme", label: p, icon: g, ...x };
|
|
913
913
|
return i === tt.Toolbar ? o(kt, { ref: a, ...u }) : o(Yn, { ref: a, ...u });
|
|
@@ -928,25 +928,25 @@ The heading font is '${a.getFontScheme().getMajorFont()}'.` }), placement: "bott
|
|
|
928
928
|
}, [t]), m = (D) => {
|
|
929
929
|
let T = D;
|
|
930
930
|
return D < 100 ? T = 10 / 9 * (D - 10) : D > 100 && (T = (D + 200) / 3), T;
|
|
931
|
-
}, u = m(p), [
|
|
932
|
-
const D =
|
|
931
|
+
}, u = m(p), [b, y] = _(null), f = xe(null), h = U(() => {
|
|
932
|
+
const D = b;
|
|
933
933
|
D && requestAnimationFrame(() => {
|
|
934
|
-
|
|
934
|
+
f.current?.contains(document.activeElement) && D.focus();
|
|
935
935
|
});
|
|
936
936
|
}, []), w = Cr(() => {
|
|
937
937
|
g(m(Ke.findNextStep(t.getView().getZoomScale(), !1, 10)));
|
|
938
938
|
}), v = Cr(() => g(m(Ke.findNextStep(t.getView().getZoomScale(), !0, 10)))), S = Xe(), C = W(() => `${Ht.getSharedMeasurer()("100%", Math.round(S.typography.fontSize), S.typography.fontFamily).width}px`, [S]);
|
|
939
939
|
return H(B, { ref: a, className: Ce(e), sx: { padding: "0px 0px", display: "flex", alignItems: "center", color: (D) => D.palette.text.secondary, ...l }, onFocus: (D) => {
|
|
940
|
-
D.relatedTarget && !
|
|
940
|
+
D.relatedTarget && !b && y(D.relatedTarget);
|
|
941
941
|
}, onBlur: (D) => {
|
|
942
|
-
|
|
942
|
+
b && !f?.current?.contains(D.relatedTarget) && y(null);
|
|
943
943
|
}, onMouseDown: (D) => {
|
|
944
944
|
D.button === 0 && D.preventDefault();
|
|
945
945
|
}, onMouseUp: (D) => {
|
|
946
946
|
D.button === 0 && h();
|
|
947
947
|
}, ...c, children: [o(vt, { disableInteractive: !0, title: "Zoom Out", children: o(st, { sx: { padding: "0", "&:hover:not([disabled])": { color: (D) => D.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (D) => {
|
|
948
948
|
D.button !== 0 ? D.preventDefault() : w(D);
|
|
949
|
-
}, children: o(he, { iconKey: "Remove" }) }) }), o(
|
|
949
|
+
}, children: o(he, { iconKey: "Remove" }) }) }), o(Zl, { ref: f, sx: { flex: "1 1 100%", padding: "6px 0px !important", marginRight: "2px", marginLeft: "2px", "& .MuiSlider-thumb": { height: 14, width: 6, borderRadius: 0.75, "&.Mui-focusVisible": { boxShadow: (D) => `0px 0px 0px 3px ${vr(D.palette.primary.main, 0.16)}` }, "&:focus, &:hover, &.Mui-active": { boxShadow: (D) => `0px 0px 0px 2px ${vr(D.palette.primary.main, 0.16)}` } }, "& .MuiSlider-mark": { width: "1px", height: "8px" }, "& .MuiSlider-markActive": { backgroundColor: "currentColor" }, "& .MuiSlider-thumb:not(.MuiSlider-active)": { transition: s ? "left 260ms ease-in" : "none" } }, valueLabelDisplay: "auto", size: "small", track: !1, min: 0, step: 1, value: u, max: 200, marks: [{ value: 100 }], onAnimationEnd: () => d(!1), onWheel: (D) => {
|
|
950
950
|
g(m(Ke.findNextStep(t.getView().getZoomScale(), D.deltaY < 0, 10)));
|
|
951
951
|
}, onKeyDown: (D) => {
|
|
952
952
|
D.which === me.Down || D.which === me.Right ? (g(m(Ke.findNextStep(t.getView().getZoomScale(), !0, 10))), D.preventDefault()) : D.which === me.Up || D.which === me.Left ? (g(m(Ke.findNextStep(t.getView().getZoomScale(), !1, 10))), D.preventDefault()) : D.which !== me.Enter && D.which !== me.Escape || h();
|
|
@@ -961,7 +961,7 @@ The heading font is '${a.getFontScheme().getMajorFont()}'.` }), placement: "bott
|
|
|
961
961
|
Xa.displayName = "SheetZoomScale";
|
|
962
962
|
const Ya = q(X((n, a) => {
|
|
963
963
|
const { sx: t, sheet: e, gridStyle: r, children: l, childrenEnd: c, ...p } = n;
|
|
964
|
-
|
|
964
|
+
Gl(a, () => ({}));
|
|
965
965
|
const i = xe(null);
|
|
966
966
|
de(() => {
|
|
967
967
|
const m = (u) => u.preventDefault();
|
|
@@ -977,13 +977,13 @@ const Ya = q(X((n, a) => {
|
|
|
977
977
|
}));
|
|
978
978
|
Ya.displayName = "StatusBar";
|
|
979
979
|
var Pr, Rr, Sn, Mr, Nr, Ho = { exports: {} }, fo = {}, bo = { exports: {} }, Fr = {}, Or = { exports: {} };
|
|
980
|
-
function
|
|
980
|
+
function yc() {
|
|
981
981
|
return Rr ? Pr : (Rr = 1, Pr = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
982
982
|
}
|
|
983
|
-
function
|
|
983
|
+
function wc() {
|
|
984
984
|
if (Mr) return Sn;
|
|
985
985
|
Mr = 1;
|
|
986
|
-
var n =
|
|
986
|
+
var n = yc();
|
|
987
987
|
function a() {
|
|
988
988
|
}
|
|
989
989
|
function t() {
|
|
@@ -1004,7 +1004,7 @@ function xc() {
|
|
|
1004
1004
|
}, Sn;
|
|
1005
1005
|
}
|
|
1006
1006
|
function cn() {
|
|
1007
|
-
return Nr || (Nr = 1, Or.exports =
|
|
1007
|
+
return Nr || (Nr = 1, Or.exports = wc()()), Or.exports;
|
|
1008
1008
|
}
|
|
1009
1009
|
var Br, Wo = { exports: {} }, Ar, ze = {}, xt = {};
|
|
1010
1010
|
function dn() {
|
|
@@ -1083,13 +1083,13 @@ function tr() {
|
|
|
1083
1083
|
if (typeof WeakMap == "function") var d = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap();
|
|
1084
1084
|
return (function(g, m) {
|
|
1085
1085
|
if (!m && g && g.__esModule) return g;
|
|
1086
|
-
var u,
|
|
1086
|
+
var u, b, y = { __proto__: null, default: g };
|
|
1087
1087
|
if (g === null || typeof g != "object" && typeof g != "function") return y;
|
|
1088
1088
|
if (u = m ? x : d) {
|
|
1089
1089
|
if (u.has(g)) return u.get(g);
|
|
1090
1090
|
u.set(g, y);
|
|
1091
1091
|
}
|
|
1092
|
-
for (const
|
|
1092
|
+
for (const f in g) f !== "default" && {}.hasOwnProperty.call(g, f) && ((b = (u = Object.defineProperty) && Object.getOwnPropertyDescriptor(g, f)) && (b.get || b.set) ? u(y, f, b) : y[f] = g[f]);
|
|
1093
1093
|
return y;
|
|
1094
1094
|
})(i, s);
|
|
1095
1095
|
})((function() {
|
|
@@ -1108,8 +1108,8 @@ function tr() {
|
|
|
1108
1108
|
}
|
|
1109
1109
|
function d(x, g) {
|
|
1110
1110
|
return g ? `${g}${(function(m) {
|
|
1111
|
-
let u = "",
|
|
1112
|
-
for (let y = 0; y < m.length; y++)
|
|
1111
|
+
let u = "", b = !0;
|
|
1112
|
+
for (let y = 0; y < m.length; y++) b ? (u += m[y].toUpperCase(), b = !1) : m[y] === "-" ? b = !0 : u += m[y];
|
|
1113
1113
|
return u;
|
|
1114
1114
|
})(x)}` : x;
|
|
1115
1115
|
}
|
|
@@ -1193,29 +1193,29 @@ function Qa() {
|
|
|
1193
1193
|
return Hr || (Hr = 1, Object.defineProperty(jo, "__esModule", { value: !0 }), jo.default = function() {
|
|
1194
1194
|
}), jo;
|
|
1195
1195
|
}
|
|
1196
|
-
function
|
|
1196
|
+
function Sc() {
|
|
1197
1197
|
if (Wr) return xo;
|
|
1198
1198
|
Wr = 1, Object.defineProperty(xo, "__esModule", { value: !0 }), xo.default = void 0;
|
|
1199
1199
|
var n = (function(m, u) {
|
|
1200
|
-
if (typeof WeakMap == "function") var
|
|
1201
|
-
return (function(
|
|
1202
|
-
if (!h &&
|
|
1203
|
-
var w, v, S = { __proto__: null, default:
|
|
1204
|
-
if (
|
|
1205
|
-
if (w = h ? y :
|
|
1206
|
-
if (w.has(
|
|
1207
|
-
w.set(
|
|
1200
|
+
if (typeof WeakMap == "function") var b = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap();
|
|
1201
|
+
return (function(f, h) {
|
|
1202
|
+
if (!h && f && f.__esModule) return f;
|
|
1203
|
+
var w, v, S = { __proto__: null, default: f };
|
|
1204
|
+
if (f === null || typeof f != "object" && typeof f != "function") return S;
|
|
1205
|
+
if (w = h ? y : b) {
|
|
1206
|
+
if (w.has(f)) return w.get(f);
|
|
1207
|
+
w.set(f, S);
|
|
1208
1208
|
}
|
|
1209
|
-
for (const C in
|
|
1209
|
+
for (const C in f) C !== "default" && {}.hasOwnProperty.call(f, C) && ((v = (w = Object.defineProperty) && Object.getOwnPropertyDescriptor(f, C)) && (v.get || v.set) ? w(S, C, v) : S[C] = f[C]);
|
|
1210
1210
|
return S;
|
|
1211
1211
|
})(m, u);
|
|
1212
1212
|
})(re), a = p(cn()), t = p(Qt), e = tr(), r = Za(), l = dn(), c = p(Qa());
|
|
1213
1213
|
function p(m) {
|
|
1214
1214
|
return m && m.__esModule ? m : { default: m };
|
|
1215
1215
|
}
|
|
1216
|
-
function i(m, u,
|
|
1216
|
+
function i(m, u, b) {
|
|
1217
1217
|
return (u = (function(y) {
|
|
1218
|
-
var
|
|
1218
|
+
var f = (function(h, w) {
|
|
1219
1219
|
if (typeof h != "object" || !h) return h;
|
|
1220
1220
|
var v = h[Symbol.toPrimitive];
|
|
1221
1221
|
if (v !== void 0) {
|
|
@@ -1225,8 +1225,8 @@ function yc() {
|
|
|
1225
1225
|
}
|
|
1226
1226
|
return (w === "string" ? String : Number)(h);
|
|
1227
1227
|
})(y, "string");
|
|
1228
|
-
return typeof
|
|
1229
|
-
})(u)) in m ? Object.defineProperty(m, u, { value:
|
|
1228
|
+
return typeof f == "symbol" ? f : f + "";
|
|
1229
|
+
})(u)) in m ? Object.defineProperty(m, u, { value: b, enumerable: !0, configurable: !0, writable: !0 }) : m[u] = b, m;
|
|
1230
1230
|
}
|
|
1231
1231
|
const s = { start: "touchstart", move: "touchmove", stop: "touchend" }, d = { start: "mousedown", move: "mousemove", stop: "mouseup" };
|
|
1232
1232
|
let x = d, g = class extends n.Component {
|
|
@@ -1235,26 +1235,26 @@ function yc() {
|
|
|
1235
1235
|
if (this.props.onMouseDown(m), !this.props.allowAnyClick && typeof m.button == "number" && m.button !== 0) return !1;
|
|
1236
1236
|
const u = this.findDOMNode();
|
|
1237
1237
|
if (!u || !u.ownerDocument || !u.ownerDocument.body) throw new Error("<DraggableCore> not mounted on DragStart!");
|
|
1238
|
-
const { ownerDocument:
|
|
1239
|
-
if (this.props.disabled || !(m.target instanceof
|
|
1238
|
+
const { ownerDocument: b } = u;
|
|
1239
|
+
if (this.props.disabled || !(m.target instanceof b.defaultView.Node) || this.props.handle && !(0, e.matchesSelectorAndParentsTo)(m.target, this.props.handle, u) || this.props.cancel && (0, e.matchesSelectorAndParentsTo)(m.target, this.props.cancel, u)) return;
|
|
1240
1240
|
m.type !== "touchstart" || this.props.allowMobileScroll || m.preventDefault();
|
|
1241
1241
|
const y = (0, e.getTouchIdentifier)(m);
|
|
1242
1242
|
this.touchIdentifier = y;
|
|
1243
|
-
const
|
|
1244
|
-
if (
|
|
1245
|
-
const { x: h, y: w } =
|
|
1246
|
-
(0, c.default)("DraggableCore: handleDragStart: %j", v), (0, c.default)("calling", this.props.onStart), this.props.onStart(m, v) !== !1 && this.mounted !== !1 && (this.props.enableUserSelectHack && (0, e.addUserSelectStyles)(
|
|
1243
|
+
const f = (0, r.getControlPosition)(m, y, this);
|
|
1244
|
+
if (f == null) return;
|
|
1245
|
+
const { x: h, y: w } = f, v = (0, r.createCoreData)(this, h, w);
|
|
1246
|
+
(0, c.default)("DraggableCore: handleDragStart: %j", v), (0, c.default)("calling", this.props.onStart), this.props.onStart(m, v) !== !1 && this.mounted !== !1 && (this.props.enableUserSelectHack && (0, e.addUserSelectStyles)(b), this.dragging = !0, this.lastX = h, this.lastY = w, (0, e.addEvent)(b, x.move, this.handleDrag), (0, e.addEvent)(b, x.stop, this.handleDragStop));
|
|
1247
1247
|
}), i(this, "handleDrag", (m) => {
|
|
1248
1248
|
const u = (0, r.getControlPosition)(m, this.touchIdentifier, this);
|
|
1249
1249
|
if (u == null) return;
|
|
1250
|
-
let { x:
|
|
1250
|
+
let { x: b, y } = u;
|
|
1251
1251
|
if (Array.isArray(this.props.grid)) {
|
|
1252
|
-
let h =
|
|
1252
|
+
let h = b - this.lastX, w = y - this.lastY;
|
|
1253
1253
|
if ([h, w] = (0, r.snapToGrid)(this.props.grid, h, w), !h && !w) return;
|
|
1254
|
-
|
|
1254
|
+
b = this.lastX + h, y = this.lastY + w;
|
|
1255
1255
|
}
|
|
1256
|
-
const
|
|
1257
|
-
if ((0, c.default)("DraggableCore: handleDrag: %j",
|
|
1256
|
+
const f = (0, r.createCoreData)(this, b, y);
|
|
1257
|
+
if ((0, c.default)("DraggableCore: handleDrag: %j", f), this.props.onDrag(m, f) !== !1 && this.mounted !== !1) this.lastX = b, this.lastY = y;
|
|
1258
1258
|
else try {
|
|
1259
1259
|
this.handleDragStop(new MouseEvent("mouseup"));
|
|
1260
1260
|
} catch {
|
|
@@ -1265,15 +1265,15 @@ function yc() {
|
|
|
1265
1265
|
if (!this.dragging) return;
|
|
1266
1266
|
const u = (0, r.getControlPosition)(m, this.touchIdentifier, this);
|
|
1267
1267
|
if (u == null) return;
|
|
1268
|
-
let { x:
|
|
1268
|
+
let { x: b, y } = u;
|
|
1269
1269
|
if (Array.isArray(this.props.grid)) {
|
|
1270
|
-
let w =
|
|
1271
|
-
[w, v] = (0, r.snapToGrid)(this.props.grid, w, v),
|
|
1270
|
+
let w = b - this.lastX || 0, v = y - this.lastY || 0;
|
|
1271
|
+
[w, v] = (0, r.snapToGrid)(this.props.grid, w, v), b = this.lastX + w, y = this.lastY + v;
|
|
1272
1272
|
}
|
|
1273
|
-
const
|
|
1274
|
-
if (this.props.onStop(m,
|
|
1273
|
+
const f = (0, r.createCoreData)(this, b, y);
|
|
1274
|
+
if (this.props.onStop(m, f) === !1 || this.mounted === !1) return !1;
|
|
1275
1275
|
const h = this.findDOMNode();
|
|
1276
|
-
h && this.props.enableUserSelectHack && (0, e.scheduleRemoveUserSelectStyles)(h.ownerDocument), (0, c.default)("DraggableCore: handleDragStop: %j",
|
|
1276
|
+
h && this.props.enableUserSelectHack && (0, e.scheduleRemoveUserSelectStyles)(h.ownerDocument), (0, c.default)("DraggableCore: handleDragStop: %j", f), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, h && ((0, c.default)("DraggableCore: Removing handlers"), (0, e.removeEvent)(h.ownerDocument, x.move, this.handleDrag), (0, e.removeEvent)(h.ownerDocument, x.stop, this.handleDragStop));
|
|
1277
1277
|
}), i(this, "onMouseDown", (m) => (x = d, this.handleDragStart(m))), i(this, "onMouseUp", (m) => (x = d, this.handleDragStop(m))), i(this, "onTouchStart", (m) => (x = s, this.handleDragStart(m))), i(this, "onTouchEnd", (m) => (x = s, this.handleDragStop(m)));
|
|
1278
1278
|
}
|
|
1279
1279
|
componentDidMount() {
|
|
@@ -1304,55 +1304,55 @@ function yc() {
|
|
|
1304
1304
|
}, onMouseDown: function() {
|
|
1305
1305
|
}, scale: 1 }), xo;
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1307
|
+
function vc() {
|
|
1308
1308
|
return jr || (jr = 1, (function(n) {
|
|
1309
1309
|
Object.defineProperty(n, "__esModule", { value: !0 }), Object.defineProperty(n, "DraggableCore", { enumerable: !0, get: function() {
|
|
1310
1310
|
return i.default;
|
|
1311
1311
|
} }), n.default = void 0;
|
|
1312
|
-
var a = (function(u,
|
|
1313
|
-
if (typeof WeakMap == "function") var y = /* @__PURE__ */ new WeakMap(),
|
|
1312
|
+
var a = (function(u, b) {
|
|
1313
|
+
if (typeof WeakMap == "function") var y = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap();
|
|
1314
1314
|
return (function(h, w) {
|
|
1315
1315
|
if (!w && h && h.__esModule) return h;
|
|
1316
1316
|
var v, S, C = { __proto__: null, default: h };
|
|
1317
1317
|
if (h === null || typeof h != "object" && typeof h != "function") return C;
|
|
1318
|
-
if (v = w ?
|
|
1318
|
+
if (v = w ? f : y) {
|
|
1319
1319
|
if (v.has(h)) return v.get(h);
|
|
1320
1320
|
v.set(h, C);
|
|
1321
1321
|
}
|
|
1322
1322
|
for (const D in h) D !== "default" && {}.hasOwnProperty.call(h, D) && ((S = (v = Object.defineProperty) && Object.getOwnPropertyDescriptor(h, D)) && (S.get || S.set) ? v(C, D, S) : C[D] = h[D]);
|
|
1323
1323
|
return C;
|
|
1324
|
-
})(u,
|
|
1324
|
+
})(u, b);
|
|
1325
1325
|
})(re), t = d(cn()), e = d(Qt), r = (function() {
|
|
1326
1326
|
if (Br) return Wo.exports;
|
|
1327
1327
|
function u(y) {
|
|
1328
|
-
var
|
|
1328
|
+
var f, h, w = "";
|
|
1329
1329
|
if (typeof y == "string" || typeof y == "number") w += y;
|
|
1330
1330
|
else if (typeof y == "object") if (Array.isArray(y)) {
|
|
1331
1331
|
var v = y.length;
|
|
1332
|
-
for (
|
|
1332
|
+
for (f = 0; f < v; f++) y[f] && (h = u(y[f])) && (w && (w += " "), w += h);
|
|
1333
1333
|
} else for (h in y) y[h] && (w && (w += " "), w += h);
|
|
1334
1334
|
return w;
|
|
1335
1335
|
}
|
|
1336
|
-
function
|
|
1337
|
-
for (var y,
|
|
1336
|
+
function b() {
|
|
1337
|
+
for (var y, f, h = 0, w = "", v = arguments.length; h < v; h++) (y = arguments[h]) && (f = u(y)) && (w && (w += " "), w += f);
|
|
1338
1338
|
return w;
|
|
1339
1339
|
}
|
|
1340
|
-
return Br = 1, Wo.exports =
|
|
1341
|
-
})(), l = tr(), c = Za(), p = dn(), i = d(
|
|
1340
|
+
return Br = 1, Wo.exports = b, Wo.exports.clsx = b, Wo.exports;
|
|
1341
|
+
})(), l = tr(), c = Za(), p = dn(), i = d(Sc()), s = d(Qa());
|
|
1342
1342
|
function d(u) {
|
|
1343
1343
|
return u && u.__esModule ? u : { default: u };
|
|
1344
1344
|
}
|
|
1345
1345
|
function x() {
|
|
1346
1346
|
return x = Object.assign ? Object.assign.bind() : function(u) {
|
|
1347
|
-
for (var
|
|
1348
|
-
var y = arguments[
|
|
1349
|
-
for (var
|
|
1347
|
+
for (var b = 1; b < arguments.length; b++) {
|
|
1348
|
+
var y = arguments[b];
|
|
1349
|
+
for (var f in y) ({}).hasOwnProperty.call(y, f) && (u[f] = y[f]);
|
|
1350
1350
|
}
|
|
1351
1351
|
return u;
|
|
1352
1352
|
}, x.apply(null, arguments);
|
|
1353
1353
|
}
|
|
1354
|
-
function g(u,
|
|
1355
|
-
return (
|
|
1354
|
+
function g(u, b, y) {
|
|
1355
|
+
return (b = (function(f) {
|
|
1356
1356
|
var h = (function(w, v) {
|
|
1357
1357
|
if (typeof w != "object" || !w) return w;
|
|
1358
1358
|
var S = w[Symbol.toPrimitive];
|
|
@@ -1362,23 +1362,23 @@ function wc() {
|
|
|
1362
1362
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1363
1363
|
}
|
|
1364
1364
|
return (v === "string" ? String : Number)(w);
|
|
1365
|
-
})(
|
|
1365
|
+
})(f, "string");
|
|
1366
1366
|
return typeof h == "symbol" ? h : h + "";
|
|
1367
|
-
})(
|
|
1367
|
+
})(b)) in u ? Object.defineProperty(u, b, { value: y, enumerable: !0, configurable: !0, writable: !0 }) : u[b] = y, u;
|
|
1368
1368
|
}
|
|
1369
1369
|
class m extends a.Component {
|
|
1370
|
-
static getDerivedStateFromProps(
|
|
1371
|
-
let { position:
|
|
1372
|
-
return !
|
|
1370
|
+
static getDerivedStateFromProps(b, y) {
|
|
1371
|
+
let { position: f } = b, { prevPropsPosition: h } = y;
|
|
1372
|
+
return !f || h && f.x === h.x && f.y === h.y ? null : ((0, s.default)("Draggable: getDerivedStateFromProps %j", { position: f, prevPropsPosition: h }), { x: f.x, y: f.y, prevPropsPosition: { ...f } });
|
|
1373
1373
|
}
|
|
1374
|
-
constructor(
|
|
1375
|
-
super(
|
|
1376
|
-
if ((0, s.default)("Draggable: onDragStart: %j",
|
|
1374
|
+
constructor(b) {
|
|
1375
|
+
super(b), g(this, "onDragStart", (y, f) => {
|
|
1376
|
+
if ((0, s.default)("Draggable: onDragStart: %j", f), this.props.onStart(y, (0, c.createDraggableData)(this, f)) === !1) return !1;
|
|
1377
1377
|
this.setState({ dragging: !0, dragged: !0 });
|
|
1378
|
-
}), g(this, "onDrag", (y,
|
|
1378
|
+
}), g(this, "onDrag", (y, f) => {
|
|
1379
1379
|
if (!this.state.dragging) return !1;
|
|
1380
|
-
(0, s.default)("Draggable: onDrag: %j",
|
|
1381
|
-
const h = (0, c.createDraggableData)(this,
|
|
1380
|
+
(0, s.default)("Draggable: onDrag: %j", f);
|
|
1381
|
+
const h = (0, c.createDraggableData)(this, f), w = { x: h.x, y: h.y, slackX: 0, slackY: 0 };
|
|
1382
1382
|
if (this.props.bounds) {
|
|
1383
1383
|
const { x: v, y: S } = w;
|
|
1384
1384
|
w.x += this.state.slackX, w.y += this.state.slackY;
|
|
@@ -1387,16 +1387,16 @@ function wc() {
|
|
|
1387
1387
|
}
|
|
1388
1388
|
if (this.props.onDrag(y, h) === !1) return !1;
|
|
1389
1389
|
this.setState(w);
|
|
1390
|
-
}), g(this, "onDragStop", (y,
|
|
1391
|
-
if (!this.state.dragging || this.props.onStop(y, (0, c.createDraggableData)(this,
|
|
1392
|
-
(0, s.default)("Draggable: onDragStop: %j",
|
|
1390
|
+
}), g(this, "onDragStop", (y, f) => {
|
|
1391
|
+
if (!this.state.dragging || this.props.onStop(y, (0, c.createDraggableData)(this, f)) === !1) return !1;
|
|
1392
|
+
(0, s.default)("Draggable: onDragStop: %j", f);
|
|
1393
1393
|
const h = { dragging: !1, slackX: 0, slackY: 0 };
|
|
1394
1394
|
if (this.props.position) {
|
|
1395
1395
|
const { x: w, y: v } = this.props.position;
|
|
1396
1396
|
h.x = w, h.y = v;
|
|
1397
1397
|
}
|
|
1398
1398
|
this.setState(h);
|
|
1399
|
-
}), this.state = { dragging: !1, dragged: !1, x:
|
|
1399
|
+
}), this.state = { dragging: !1, dragged: !1, x: b.position ? b.position.x : b.defaultPosition.x, y: b.position ? b.position.y : b.defaultPosition.y, prevPropsPosition: { ...b.position }, slackX: 0, slackY: 0, isElementSVG: !1 }, !b.position || b.onDrag || b.onStop || console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
|
|
1400
1400
|
}
|
|
1401
1401
|
componentDidMount() {
|
|
1402
1402
|
window.SVGElement !== void 0 && this.findDOMNode() instanceof window.SVGElement && this.setState({ isElementSVG: !0 });
|
|
@@ -1408,12 +1408,12 @@ function wc() {
|
|
|
1408
1408
|
return this.props?.nodeRef?.current ?? e.default.findDOMNode(this);
|
|
1409
1409
|
}
|
|
1410
1410
|
render() {
|
|
1411
|
-
const { axis:
|
|
1411
|
+
const { axis: b, bounds: y, children: f, defaultPosition: h, defaultClassName: w, defaultClassNameDragging: v, defaultClassNameDragged: S, position: C, positionOffset: D, scale: T, ...P } = this.props;
|
|
1412
1412
|
let R = {}, k = null;
|
|
1413
1413
|
const E = !C || this.state.dragging, M = C || h, I = { x: (0, c.canDragX)(this) && E ? this.state.x : M.x, y: (0, c.canDragY)(this) && E ? this.state.y : M.y };
|
|
1414
1414
|
this.state.isElementSVG ? k = (0, l.createSVGTransform)(I, D) : R = (0, l.createCSSTransform)(I, D);
|
|
1415
|
-
const N = (0, r.clsx)(
|
|
1416
|
-
return a.createElement(i.default, x({}, P, { onStart: this.onDragStart, onDrag: this.onDrag, onStop: this.onDragStop }), a.cloneElement(a.Children.only(
|
|
1415
|
+
const N = (0, r.clsx)(f.props.className || "", w, { [v]: this.state.dragging, [S]: this.state.dragged });
|
|
1416
|
+
return a.createElement(i.default, x({}, P, { onStart: this.onDragStart, onDrag: this.onDrag, onStop: this.onDragStop }), a.cloneElement(a.Children.only(f), { className: N, style: { ...f.props.style, ...R }, transform: k }));
|
|
1417
1417
|
}
|
|
1418
1418
|
}
|
|
1419
1419
|
n.default = m, g(m, "displayName", "Draggable"), g(m, "propTypes", { ...i.default.propTypes, axis: t.default.oneOf(["both", "x", "y", "none"]), bounds: t.default.oneOfType([t.default.shape({ left: t.default.number, right: t.default.number, top: t.default.number, bottom: t.default.number }), t.default.string, t.default.oneOf([!1])]), defaultClassName: t.default.string, defaultClassNameDragging: t.default.string, defaultClassNameDragged: t.default.string, defaultPosition: t.default.shape({ x: t.default.number, y: t.default.number }), positionOffset: t.default.shape({ x: t.default.oneOfType([t.default.number, t.default.string]), y: t.default.oneOfType([t.default.number, t.default.string]) }), position: t.default.shape({ x: t.default.number, y: t.default.number }), className: p.dontSetMe, style: p.dontSetMe, transform: p.dontSetMe }), g(m, "defaultProps", { ...i.default.defaultProps, axis: "both", bounds: !1, defaultClassName: "react-draggable", defaultClassNameDragging: "react-draggable-dragging", defaultClassNameDragged: "react-draggable-dragged", defaultPosition: { x: 0, y: 0 }, scale: 1 });
|
|
@@ -1422,11 +1422,11 @@ function wc() {
|
|
|
1422
1422
|
function Ja() {
|
|
1423
1423
|
if ($r) return bo.exports;
|
|
1424
1424
|
$r = 1;
|
|
1425
|
-
const { default: n, DraggableCore: a } =
|
|
1425
|
+
const { default: n, DraggableCore: a } = vc();
|
|
1426
1426
|
return bo.exports = n, bo.exports.default = n, bo.exports.DraggableCore = a, bo.exports;
|
|
1427
1427
|
}
|
|
1428
1428
|
var Vr, $o = {};
|
|
1429
|
-
function
|
|
1429
|
+
function kc() {
|
|
1430
1430
|
if (Vr) return $o;
|
|
1431
1431
|
Vr = 1, $o.__esModule = !0, $o.cloneElement = function(l, c) {
|
|
1432
1432
|
return c.style && l.props.style && (c.style = e(e({}, l.props.style), c.style)), c.className && l.props.className && (c.className = l.props.className + " " + c.className), a.default.cloneElement(l, c);
|
|
@@ -1495,25 +1495,25 @@ function ti() {
|
|
|
1495
1495
|
if (g === null || typeof g != "object" && typeof g != "function") return { default: g };
|
|
1496
1496
|
var u = l(m);
|
|
1497
1497
|
if (u && u.has(g)) return u.get(g);
|
|
1498
|
-
var
|
|
1499
|
-
for (var
|
|
1500
|
-
var h = y ? Object.getOwnPropertyDescriptor(g,
|
|
1501
|
-
h && (h.get || h.set) ? Object.defineProperty(
|
|
1498
|
+
var b = {}, y = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
1499
|
+
for (var f in g) if (f !== "default" && Object.prototype.hasOwnProperty.call(g, f)) {
|
|
1500
|
+
var h = y ? Object.getOwnPropertyDescriptor(g, f) : null;
|
|
1501
|
+
h && (h.get || h.set) ? Object.defineProperty(b, f, h) : b[f] = g[f];
|
|
1502
1502
|
}
|
|
1503
|
-
return
|
|
1504
|
-
})(re), a = Ja(), t =
|
|
1503
|
+
return b.default = g, u && u.set(g, b), b;
|
|
1504
|
+
})(re), a = Ja(), t = kc(), e = ei(), r = ["children", "className", "draggableOpts", "width", "height", "handle", "handleSize", "lockAspectRatio", "axis", "minConstraints", "maxConstraints", "onResize", "onResizeStop", "onResizeStart", "resizeHandles", "transformScale"];
|
|
1505
1505
|
function l(g) {
|
|
1506
1506
|
if (typeof WeakMap != "function") return null;
|
|
1507
1507
|
var m = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap();
|
|
1508
|
-
return (l = function(
|
|
1509
|
-
return
|
|
1508
|
+
return (l = function(b) {
|
|
1509
|
+
return b ? u : m;
|
|
1510
1510
|
})(g);
|
|
1511
1511
|
}
|
|
1512
1512
|
function c() {
|
|
1513
1513
|
return c = Object.assign ? Object.assign.bind() : function(g) {
|
|
1514
1514
|
for (var m = 1; m < arguments.length; m++) {
|
|
1515
1515
|
var u = arguments[m];
|
|
1516
|
-
for (var
|
|
1516
|
+
for (var b in u) Object.prototype.hasOwnProperty.call(u, b) && (g[b] = u[b]);
|
|
1517
1517
|
}
|
|
1518
1518
|
return g;
|
|
1519
1519
|
}, c.apply(this, arguments);
|
|
@@ -1521,88 +1521,88 @@ function ti() {
|
|
|
1521
1521
|
function p(g, m) {
|
|
1522
1522
|
var u = Object.keys(g);
|
|
1523
1523
|
if (Object.getOwnPropertySymbols) {
|
|
1524
|
-
var
|
|
1525
|
-
m && (
|
|
1524
|
+
var b = Object.getOwnPropertySymbols(g);
|
|
1525
|
+
m && (b = b.filter(function(y) {
|
|
1526
1526
|
return Object.getOwnPropertyDescriptor(g, y).enumerable;
|
|
1527
|
-
})), u.push.apply(u,
|
|
1527
|
+
})), u.push.apply(u, b);
|
|
1528
1528
|
}
|
|
1529
1529
|
return u;
|
|
1530
1530
|
}
|
|
1531
1531
|
function i(g) {
|
|
1532
1532
|
for (var m = 1; m < arguments.length; m++) {
|
|
1533
1533
|
var u = arguments[m] != null ? arguments[m] : {};
|
|
1534
|
-
m % 2 ? p(Object(u), !0).forEach(function(
|
|
1535
|
-
s(g,
|
|
1536
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(g, Object.getOwnPropertyDescriptors(u)) : p(Object(u)).forEach(function(
|
|
1537
|
-
Object.defineProperty(g,
|
|
1534
|
+
m % 2 ? p(Object(u), !0).forEach(function(b) {
|
|
1535
|
+
s(g, b, u[b]);
|
|
1536
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(g, Object.getOwnPropertyDescriptors(u)) : p(Object(u)).forEach(function(b) {
|
|
1537
|
+
Object.defineProperty(g, b, Object.getOwnPropertyDescriptor(u, b));
|
|
1538
1538
|
});
|
|
1539
1539
|
}
|
|
1540
1540
|
return g;
|
|
1541
1541
|
}
|
|
1542
1542
|
function s(g, m, u) {
|
|
1543
|
-
return (m = (function(
|
|
1544
|
-
var y = (function(
|
|
1545
|
-
if (typeof
|
|
1546
|
-
var w =
|
|
1543
|
+
return (m = (function(b) {
|
|
1544
|
+
var y = (function(f, h) {
|
|
1545
|
+
if (typeof f != "object" || f === null) return f;
|
|
1546
|
+
var w = f[Symbol.toPrimitive];
|
|
1547
1547
|
if (w !== void 0) {
|
|
1548
|
-
var v = w.call(
|
|
1548
|
+
var v = w.call(f, h);
|
|
1549
1549
|
if (typeof v != "object") return v;
|
|
1550
1550
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1551
1551
|
}
|
|
1552
|
-
return (h === "string" ? String : Number)(
|
|
1553
|
-
})(
|
|
1552
|
+
return (h === "string" ? String : Number)(f);
|
|
1553
|
+
})(b, "string");
|
|
1554
1554
|
return typeof y == "symbol" ? y : String(y);
|
|
1555
1555
|
})(m)) in g ? Object.defineProperty(g, m, { value: u, enumerable: !0, configurable: !0, writable: !0 }) : g[m] = u, g;
|
|
1556
1556
|
}
|
|
1557
1557
|
function d(g, m) {
|
|
1558
|
-
return d = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(u,
|
|
1559
|
-
return u.__proto__ =
|
|
1558
|
+
return d = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(u, b) {
|
|
1559
|
+
return u.__proto__ = b, u;
|
|
1560
1560
|
}, d(g, m);
|
|
1561
1561
|
}
|
|
1562
1562
|
var x = (function(g) {
|
|
1563
1563
|
var m, u;
|
|
1564
|
-
function
|
|
1565
|
-
for (var
|
|
1566
|
-
return (
|
|
1564
|
+
function b() {
|
|
1565
|
+
for (var f, h = arguments.length, w = new Array(h), v = 0; v < h; v++) w[v] = arguments[v];
|
|
1566
|
+
return (f = g.call.apply(g, [this].concat(w)) || this).handleRefs = {}, f.lastHandleRect = null, f.slack = null, f;
|
|
1567
1567
|
}
|
|
1568
|
-
u = g, (m =
|
|
1569
|
-
var y =
|
|
1568
|
+
u = g, (m = b).prototype = Object.create(u.prototype), m.prototype.constructor = m, d(m, u);
|
|
1569
|
+
var y = b.prototype;
|
|
1570
1570
|
return y.componentWillUnmount = function() {
|
|
1571
1571
|
this.resetData();
|
|
1572
1572
|
}, y.resetData = function() {
|
|
1573
1573
|
this.lastHandleRect = this.slack = null;
|
|
1574
|
-
}, y.runConstraints = function(
|
|
1574
|
+
}, y.runConstraints = function(f, h) {
|
|
1575
1575
|
var w = this.props, v = w.minConstraints, S = w.maxConstraints, C = w.lockAspectRatio;
|
|
1576
|
-
if (!v && !S && !C) return [
|
|
1576
|
+
if (!v && !S && !C) return [f, h];
|
|
1577
1577
|
if (C) {
|
|
1578
|
-
var D = this.props.width / this.props.height, T =
|
|
1579
|
-
Math.abs(T) > Math.abs(P * D) ? h =
|
|
1578
|
+
var D = this.props.width / this.props.height, T = f - this.props.width, P = h - this.props.height;
|
|
1579
|
+
Math.abs(T) > Math.abs(P * D) ? h = f / D : f = h * D;
|
|
1580
1580
|
}
|
|
1581
|
-
var R =
|
|
1582
|
-
return
|
|
1583
|
-
}, y.resizeHandler = function(
|
|
1581
|
+
var R = f, k = h, E = this.slack || [0, 0], M = E[0], I = E[1];
|
|
1582
|
+
return f += M, h += I, v && (f = Math.max(v[0], f), h = Math.max(v[1], h)), S && (f = Math.min(S[0], f), h = Math.min(S[1], h)), this.slack = [M + (R - f), I + (k - h)], [f, h];
|
|
1583
|
+
}, y.resizeHandler = function(f, h) {
|
|
1584
1584
|
var w = this;
|
|
1585
1585
|
return function(v, S) {
|
|
1586
1586
|
var C = S.node, D = S.deltaX, T = S.deltaY;
|
|
1587
|
-
|
|
1587
|
+
f === "onResizeStart" && w.resetData();
|
|
1588
1588
|
var P = (w.props.axis === "both" || w.props.axis === "x") && h !== "n" && h !== "s", R = (w.props.axis === "both" || w.props.axis === "y") && h !== "e" && h !== "w";
|
|
1589
1589
|
if (P || R) {
|
|
1590
1590
|
var k = h[0], E = h[h.length - 1], M = C.getBoundingClientRect();
|
|
1591
1591
|
w.lastHandleRect != null && (E === "w" && (D += M.left - w.lastHandleRect.left), k === "n" && (T += M.top - w.lastHandleRect.top)), w.lastHandleRect = M, E === "w" && (D = -D), k === "n" && (T = -T);
|
|
1592
1592
|
var I = w.props.width + (P ? D / w.props.transformScale : 0), N = w.props.height + (R ? T / w.props.transformScale : 0), L = w.runConstraints(I, N);
|
|
1593
1593
|
I = L[0], N = L[1];
|
|
1594
|
-
var F = I !== w.props.width || N !== w.props.height, z = typeof w.props[
|
|
1595
|
-
z && !(
|
|
1594
|
+
var F = I !== w.props.width || N !== w.props.height, z = typeof w.props[f] == "function" ? w.props[f] : null;
|
|
1595
|
+
z && !(f === "onResize" && !F) && (v.persist == null || v.persist(), z(v, { node: C, size: { width: I, height: N }, handle: h })), f === "onResizeStop" && w.resetData();
|
|
1596
1596
|
}
|
|
1597
1597
|
};
|
|
1598
|
-
}, y.renderResizeHandle = function(
|
|
1598
|
+
}, y.renderResizeHandle = function(f, h) {
|
|
1599
1599
|
var w = this.props.handle;
|
|
1600
|
-
if (!w) return n.createElement("span", { className: "react-resizable-handle react-resizable-handle-" +
|
|
1601
|
-
if (typeof w == "function") return w(
|
|
1602
|
-
var v = i({ ref: h }, typeof w.type == "string" ? {} : { handleAxis:
|
|
1600
|
+
if (!w) return n.createElement("span", { className: "react-resizable-handle react-resizable-handle-" + f, ref: h });
|
|
1601
|
+
if (typeof w == "function") return w(f, h);
|
|
1602
|
+
var v = i({ ref: h }, typeof w.type == "string" ? {} : { handleAxis: f });
|
|
1603
1603
|
return n.cloneElement(w, v);
|
|
1604
1604
|
}, y.render = function() {
|
|
1605
|
-
var
|
|
1605
|
+
var f = this, h = this.props, w = h.children, v = h.className, S = h.draggableOpts;
|
|
1606
1606
|
h.width, h.height, h.handle, h.handleSize, h.lockAspectRatio, h.axis, h.minConstraints, h.maxConstraints, h.onResize, h.onResizeStop, h.onResizeStart;
|
|
1607
1607
|
var C = h.resizeHandles;
|
|
1608
1608
|
h.transformScale;
|
|
@@ -1613,72 +1613,72 @@ function ti() {
|
|
|
1613
1613
|
return E;
|
|
1614
1614
|
})(h, r);
|
|
1615
1615
|
return (0, t.cloneElement)(w, i(i({}, D), {}, { className: (v ? v + " " : "") + "react-resizable", children: [].concat(w.props.children, C.map(function(T) {
|
|
1616
|
-
var P, R = (P =
|
|
1617
|
-
return n.createElement(a.DraggableCore, c({}, S, { nodeRef: R, key: "resizableHandle-" + T, onStop:
|
|
1616
|
+
var P, R = (P = f.handleRefs[T]) != null ? P : f.handleRefs[T] = n.createRef();
|
|
1617
|
+
return n.createElement(a.DraggableCore, c({}, S, { nodeRef: R, key: "resizableHandle-" + T, onStop: f.resizeHandler("onResizeStop", T), onStart: f.resizeHandler("onResizeStart", T), onDrag: f.resizeHandler("onResize", T) }), f.renderResizeHandle(T, R));
|
|
1618
1618
|
})) }));
|
|
1619
|
-
},
|
|
1619
|
+
}, b;
|
|
1620
1620
|
})(n.Component);
|
|
1621
1621
|
return fo.default = x, x.propTypes = e.resizableProps, x.defaultProps = { axis: "both", handleSize: [20, 20], lockAspectRatio: !1, minConstraints: [20, 20], maxConstraints: [1 / 0, 1 / 0], resizeHandles: ["se"], transformScale: 1 }, fo;
|
|
1622
1622
|
}
|
|
1623
1623
|
var Gr, qr, wo = {};
|
|
1624
|
-
function
|
|
1624
|
+
function Cc() {
|
|
1625
1625
|
if (Gr) return wo;
|
|
1626
1626
|
Gr = 1, wo.__esModule = !0, wo.default = void 0;
|
|
1627
1627
|
var n = (function(m, u) {
|
|
1628
1628
|
if (m && m.__esModule) return m;
|
|
1629
1629
|
if (m === null || typeof m != "object" && typeof m != "function") return { default: m };
|
|
1630
|
-
var
|
|
1631
|
-
if (
|
|
1632
|
-
var y = {},
|
|
1630
|
+
var b = c(u);
|
|
1631
|
+
if (b && b.has(m)) return b.get(m);
|
|
1632
|
+
var y = {}, f = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
1633
1633
|
for (var h in m) if (h !== "default" && Object.prototype.hasOwnProperty.call(m, h)) {
|
|
1634
|
-
var w =
|
|
1634
|
+
var w = f ? Object.getOwnPropertyDescriptor(m, h) : null;
|
|
1635
1635
|
w && (w.get || w.set) ? Object.defineProperty(y, h, w) : y[h] = m[h];
|
|
1636
1636
|
}
|
|
1637
|
-
return y.default = m,
|
|
1637
|
+
return y.default = m, b && b.set(m, y), y;
|
|
1638
1638
|
})(re), a = l(cn()), t = l(ti()), e = ei(), r = ["handle", "handleSize", "onResize", "onResizeStart", "onResizeStop", "draggableOpts", "minConstraints", "maxConstraints", "lockAspectRatio", "axis", "width", "height", "resizeHandles", "style", "transformScale"];
|
|
1639
1639
|
function l(m) {
|
|
1640
1640
|
return m && m.__esModule ? m : { default: m };
|
|
1641
1641
|
}
|
|
1642
1642
|
function c(m) {
|
|
1643
1643
|
if (typeof WeakMap != "function") return null;
|
|
1644
|
-
var u = /* @__PURE__ */ new WeakMap(),
|
|
1644
|
+
var u = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap();
|
|
1645
1645
|
return (c = function(y) {
|
|
1646
|
-
return y ?
|
|
1646
|
+
return y ? b : u;
|
|
1647
1647
|
})(m);
|
|
1648
1648
|
}
|
|
1649
1649
|
function p() {
|
|
1650
1650
|
return p = Object.assign ? Object.assign.bind() : function(m) {
|
|
1651
1651
|
for (var u = 1; u < arguments.length; u++) {
|
|
1652
|
-
var
|
|
1653
|
-
for (var y in
|
|
1652
|
+
var b = arguments[u];
|
|
1653
|
+
for (var y in b) Object.prototype.hasOwnProperty.call(b, y) && (m[y] = b[y]);
|
|
1654
1654
|
}
|
|
1655
1655
|
return m;
|
|
1656
1656
|
}, p.apply(this, arguments);
|
|
1657
1657
|
}
|
|
1658
1658
|
function i(m, u) {
|
|
1659
|
-
var
|
|
1659
|
+
var b = Object.keys(m);
|
|
1660
1660
|
if (Object.getOwnPropertySymbols) {
|
|
1661
1661
|
var y = Object.getOwnPropertySymbols(m);
|
|
1662
|
-
u && (y = y.filter(function(
|
|
1663
|
-
return Object.getOwnPropertyDescriptor(m,
|
|
1664
|
-
})),
|
|
1662
|
+
u && (y = y.filter(function(f) {
|
|
1663
|
+
return Object.getOwnPropertyDescriptor(m, f).enumerable;
|
|
1664
|
+
})), b.push.apply(b, y);
|
|
1665
1665
|
}
|
|
1666
|
-
return
|
|
1666
|
+
return b;
|
|
1667
1667
|
}
|
|
1668
1668
|
function s(m) {
|
|
1669
1669
|
for (var u = 1; u < arguments.length; u++) {
|
|
1670
|
-
var
|
|
1671
|
-
u % 2 ? i(Object(
|
|
1672
|
-
d(m, y,
|
|
1673
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(m, Object.getOwnPropertyDescriptors(
|
|
1674
|
-
Object.defineProperty(m, y, Object.getOwnPropertyDescriptor(
|
|
1670
|
+
var b = arguments[u] != null ? arguments[u] : {};
|
|
1671
|
+
u % 2 ? i(Object(b), !0).forEach(function(y) {
|
|
1672
|
+
d(m, y, b[y]);
|
|
1673
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(m, Object.getOwnPropertyDescriptors(b)) : i(Object(b)).forEach(function(y) {
|
|
1674
|
+
Object.defineProperty(m, y, Object.getOwnPropertyDescriptor(b, y));
|
|
1675
1675
|
});
|
|
1676
1676
|
}
|
|
1677
1677
|
return m;
|
|
1678
1678
|
}
|
|
1679
|
-
function d(m, u,
|
|
1679
|
+
function d(m, u, b) {
|
|
1680
1680
|
return (u = (function(y) {
|
|
1681
|
-
var
|
|
1681
|
+
var f = (function(h, w) {
|
|
1682
1682
|
if (typeof h != "object" || h === null) return h;
|
|
1683
1683
|
var v = h[Symbol.toPrimitive];
|
|
1684
1684
|
if (v !== void 0) {
|
|
@@ -1688,48 +1688,48 @@ function vc() {
|
|
|
1688
1688
|
}
|
|
1689
1689
|
return (w === "string" ? String : Number)(h);
|
|
1690
1690
|
})(y, "string");
|
|
1691
|
-
return typeof
|
|
1692
|
-
})(u)) in m ? Object.defineProperty(m, u, { value:
|
|
1691
|
+
return typeof f == "symbol" ? f : String(f);
|
|
1692
|
+
})(u)) in m ? Object.defineProperty(m, u, { value: b, enumerable: !0, configurable: !0, writable: !0 }) : m[u] = b, m;
|
|
1693
1693
|
}
|
|
1694
1694
|
function x(m, u) {
|
|
1695
|
-
return x = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(
|
|
1696
|
-
return
|
|
1695
|
+
return x = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(b, y) {
|
|
1696
|
+
return b.__proto__ = y, b;
|
|
1697
1697
|
}, x(m, u);
|
|
1698
1698
|
}
|
|
1699
1699
|
var g = (function(m) {
|
|
1700
|
-
var u,
|
|
1700
|
+
var u, b;
|
|
1701
1701
|
function y() {
|
|
1702
|
-
for (var
|
|
1703
|
-
return (
|
|
1702
|
+
for (var f, h = arguments.length, w = new Array(h), v = 0; v < h; v++) w[v] = arguments[v];
|
|
1703
|
+
return (f = m.call.apply(m, [this].concat(w)) || this).state = { width: f.props.width, height: f.props.height, propsWidth: f.props.width, propsHeight: f.props.height }, f.onResize = function(S, C) {
|
|
1704
1704
|
var D = C.size;
|
|
1705
|
-
|
|
1706
|
-
return
|
|
1707
|
-
})) :
|
|
1708
|
-
},
|
|
1705
|
+
f.props.onResize ? (S.persist == null || S.persist(), f.setState(D, function() {
|
|
1706
|
+
return f.props.onResize && f.props.onResize(S, C);
|
|
1707
|
+
})) : f.setState(D);
|
|
1708
|
+
}, f;
|
|
1709
1709
|
}
|
|
1710
|
-
return
|
|
1711
|
-
return h.propsWidth !==
|
|
1710
|
+
return b = m, (u = y).prototype = Object.create(b.prototype), u.prototype.constructor = u, x(u, b), y.getDerivedStateFromProps = function(f, h) {
|
|
1711
|
+
return h.propsWidth !== f.width || h.propsHeight !== f.height ? { width: f.width, height: f.height, propsWidth: f.width, propsHeight: f.height } : null;
|
|
1712
1712
|
}, y.prototype.render = function() {
|
|
1713
|
-
var
|
|
1714
|
-
|
|
1715
|
-
var v =
|
|
1716
|
-
|
|
1717
|
-
var k =
|
|
1713
|
+
var f = this.props, h = f.handle, w = f.handleSize;
|
|
1714
|
+
f.onResize;
|
|
1715
|
+
var v = f.onResizeStart, S = f.onResizeStop, C = f.draggableOpts, D = f.minConstraints, T = f.maxConstraints, P = f.lockAspectRatio, R = f.axis;
|
|
1716
|
+
f.width, f.height;
|
|
1717
|
+
var k = f.resizeHandles, E = f.style, M = f.transformScale, I = (function(N, L) {
|
|
1718
1718
|
if (N == null) return {};
|
|
1719
1719
|
var F, z, ae = {}, Q = Object.keys(N);
|
|
1720
1720
|
for (z = 0; z < Q.length; z++) F = Q[z], L.indexOf(F) >= 0 || (ae[F] = N[F]);
|
|
1721
1721
|
return ae;
|
|
1722
|
-
})(
|
|
1722
|
+
})(f, r);
|
|
1723
1723
|
return n.createElement(t.default, { axis: R, draggableOpts: C, handle: h, handleSize: w, height: this.state.height, lockAspectRatio: P, maxConstraints: T, minConstraints: D, onResizeStart: v, onResize: this.onResize, onResizeStop: S, resizeHandles: k, transformScale: M, width: this.state.width }, n.createElement("div", p({}, I, { style: s(s({}, E), {}, { width: this.state.width + "px", height: this.state.height + "px" }) })));
|
|
1724
1724
|
}, y;
|
|
1725
1725
|
})(n.Component);
|
|
1726
1726
|
return wo.default = g, g.propTypes = s(s({}, e.resizableProps), {}, { children: a.default.element }), wo;
|
|
1727
1727
|
}
|
|
1728
|
-
var
|
|
1728
|
+
var Tc = (qr || (qr = 1, Ho.exports = function() {
|
|
1729
1729
|
throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable");
|
|
1730
|
-
}, Ho.exports.Resizable = ti().default, Ho.exports.ResizableBox =
|
|
1730
|
+
}, Ho.exports.Resizable = ti().default, Ho.exports.ResizableBox = Cc().default), Ho.exports);
|
|
1731
1731
|
const oi = q(X((n, a) => {
|
|
1732
|
-
const { disabled: t, names: e, workbook: r, restoreFocus: l, readonly: c = !1, disabled: p = !1, commandPopupButtonProps: i, sx: s, ...d } = n, x = sn(), [g, m] = _(null), [u,
|
|
1732
|
+
const { disabled: t, names: e, workbook: r, restoreFocus: l, readonly: c = !1, disabled: p = !1, commandPopupButtonProps: i, sx: s, ...d } = n, x = sn(), [g, m] = _(null), [u, b] = _(() => r.getSelectedRanges().getCoords()), [y, f] = _(!1), { reference: h } = ao({ parentFloat: i?.parentFloat }), [w, v] = _(() => c || !r.getProtection().isStructureAllowed()), S = () => g?.text ?? "", [C, D] = _(S), T = Y(() => {
|
|
1733
1733
|
if (h?.closeAll(), !C) {
|
|
1734
1734
|
const V = S();
|
|
1735
1735
|
return D(S()), V;
|
|
@@ -1793,9 +1793,9 @@ const oi = q(X((n, a) => {
|
|
|
1793
1793
|
} });
|
|
1794
1794
|
const [I, N] = _(null), L = Y(Ke.debounce(P, I ? 320 : 0), []);
|
|
1795
1795
|
We(E.getSelection(), { onChange: () => {
|
|
1796
|
-
|
|
1796
|
+
b((j) => {
|
|
1797
1797
|
const K = r.getSelectedRanges().getCoords();
|
|
1798
|
-
return
|
|
1798
|
+
return Ml.isEqualRangesArrays(K, j) ? j : K;
|
|
1799
1799
|
});
|
|
1800
1800
|
}, onAdjustingChange: (j) => {
|
|
1801
1801
|
N(j.getAdjusting());
|
|
@@ -1834,7 +1834,7 @@ const oi = q(X((n, a) => {
|
|
|
1834
1834
|
}
|
|
1835
1835
|
}, [e, x, r]), Q = U((j) => {
|
|
1836
1836
|
setTimeout(() => {
|
|
1837
|
-
|
|
1837
|
+
f(!0);
|
|
1838
1838
|
}, 0);
|
|
1839
1839
|
const K = { variant: ie.Menuitem, parentFloat: j.floatReference, commandHook: { ...i?.commandHook, beforeExecute: (Se, Fe) => (h?.closeAll(), i?.commandHook?.beforeExecute?.(Se, Fe)) }, scope: i?.scope, commands: i?.commands };
|
|
1840
1840
|
let ee = e.getItems({ scope: r?.getSelectedSheet().getName() });
|
|
@@ -1851,21 +1851,21 @@ const oi = q(X((n, a) => {
|
|
|
1851
1851
|
}, [r, R, e, g, w]), ue = Ct(a, () => ({ focus(j) {
|
|
1852
1852
|
F.current?.focus(j);
|
|
1853
1853
|
} }), []);
|
|
1854
|
-
return o(B, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...s }, ref: $t([ue, a]), ...d, children: o(kt, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%" }, ...s }, buttonProps: { sx: { backgroundColor: (j) => j.palette.background.paper, backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})` } }, tabIndex: -1, outlined: { color: (j) => t ? j.palette.action.disabled : ye(j.palette.divider, 0.2) }, parentFloat: h, createPopupPanel: Q, onPopupOpen: () =>
|
|
1854
|
+
return o(B, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...s }, ref: $t([ue, a]), ...d, children: o(kt, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%" }, ...s }, buttonProps: { sx: { backgroundColor: (j) => j.palette.background.paper, backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})` } }, tabIndex: -1, outlined: { color: (j) => t ? j.palette.action.disabled : ye(j.palette.divider, 0.2) }, parentFloat: h, createPopupPanel: Q, onPopupOpen: () => f(!0), onPopupClose: () => f(!1), createTooltip: ({ children: j }, K) => o(ot, { title: K || y ? "" : "Name Box", disabled: K, leaveDelay: 0, sx: { opacity: K || y ? 0 : 1 }, children: j }), createQuickButton: z }) });
|
|
1855
1855
|
}));
|
|
1856
1856
|
oi.displayName = "NamedCollectionEditor";
|
|
1857
|
-
const
|
|
1858
|
-
const { sx: t, workbook: e, sheetElement: r, gridStyle: l, showNamedCollectionEditor: c = !0, NamedCollectionEditorProps: p, renderNamedCollectionEditor: i =
|
|
1857
|
+
const Ec = (n, a) => o(oi, { ref: a, ...n }), ni = q(X((n, a) => {
|
|
1858
|
+
const { sx: t, workbook: e, sheetElement: r, gridStyle: l, showNamedCollectionEditor: c = !0, NamedCollectionEditorProps: p, renderNamedCollectionEditor: i = Ec, disabled: s, commands: d, ...x } = n, [g, m] = _(e?.getSelectedSheet());
|
|
1859
1859
|
We(e, { onSheetsChange: (A) => {
|
|
1860
1860
|
m(A?.getSelectedSheet());
|
|
1861
1861
|
}, onViewChange(A) {
|
|
1862
1862
|
m(A?.getSelectedSheet());
|
|
1863
1863
|
} });
|
|
1864
|
-
const [u,
|
|
1864
|
+
const [u, b] = _(g.getSelection().getCoords().cell), y = g.getRange(u).getCell(), f = s || !y.isEditAllowed(), h = xe(null), w = W(() => ({ fontSize: 11 }), []);
|
|
1865
1865
|
We(g.getSelection(), { onChange: () => {
|
|
1866
|
-
|
|
1866
|
+
b(g.getSelection().getCoords().cell);
|
|
1867
1867
|
} }), We(g, { onProtectionChange() {
|
|
1868
|
-
|
|
1868
|
+
b(g.getSelection().getCoords().cell);
|
|
1869
1869
|
} });
|
|
1870
1870
|
const v = h.current?.getLineHeight() ?? 20, [S, C] = _(v), [D, T] = _(5), [P, R] = _(1), k = Y((A, { size: Z }) => {
|
|
1871
1871
|
A.preventDefault(), A.stopPropagation();
|
|
@@ -1879,9 +1879,9 @@ const Cc = (n, a) => o(oi, { ref: a, ...n }), ni = q(X((n, a) => {
|
|
|
1879
1879
|
I?.key === "edit" && (N = I.args?.stateAndCoords);
|
|
1880
1880
|
const L = W(() => {
|
|
1881
1881
|
let A = N?.editState;
|
|
1882
|
-
return A || (A =
|
|
1882
|
+
return A || (A = Bl(() => g.getRange(u).getCell())), o(B, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", gap: 4 }, children: o(Al, { ref: h, activeCoords: u, sheet: g, onFocus: () => {
|
|
1883
1883
|
r?.startEdit({ autoFocus: !1, editMode: !0, cell: u });
|
|
1884
|
-
}, defaultTextStyle: w, useRichStyling: !1, disabled:
|
|
1884
|
+
}, defaultTextStyle: w, useRichStyling: !1, disabled: f, onChangeEdit: (Z) => {
|
|
1885
1885
|
if (Z.dirty !== void 0) {
|
|
1886
1886
|
const oe = { sheet: g, coords: u, editState: Z };
|
|
1887
1887
|
M.setMode((Ae) => ({ ...Ae, args: { ...Ae?.args, stateAndCoords: oe } }));
|
|
@@ -1891,19 +1891,19 @@ const Cc = (n, a) => o(oi, { ref: a, ...n }), ni = q(X((n, a) => {
|
|
|
1891
1891
|
}, onSubmitEdit: () => {
|
|
1892
1892
|
r?.submitEdit(), r?.focus();
|
|
1893
1893
|
}, linesVisible: P }) });
|
|
1894
|
-
}, [g, N, u, P, r]), F = xe(null), z = W(() => c ? i({ names: e.getNames(), workbook: e, ...p }, F) : null, [i, p, c, g, e,
|
|
1894
|
+
}, [g, N, u, P, r]), F = xe(null), z = W(() => c ? i({ names: e.getNames(), workbook: e, ...p }, F) : null, [i, p, c, g, e, f]), ae = W(() => H(no, { elevation: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 0, backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})`, border: (A) => `solid ${f ? A.palette.action.disabled : ye(A.palette.divider, 0.2)} 1px` }, children: [o(ft, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, color: "warning", "aria-label": "cancel-formula-edit", icon: o(he, { iconKey: "CloseError" }), tooltipProps: { label: "Cancel", simple: !0 }, disabled: f || N === null, onMouseDown: (A) => {
|
|
1895
1895
|
A.button === 0 && A.preventDefault();
|
|
1896
1896
|
}, onClick: () => {
|
|
1897
1897
|
r.cancelEdit();
|
|
1898
|
-
} }), o(ft, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, color: "primary", "aria-label": "commit-formula-edit", icon: o(he, { iconKey: "CheckSuccess" }), tooltipProps: { label: "Enter", simple: !0 }, disabled:
|
|
1898
|
+
} }), o(ft, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, color: "primary", "aria-label": "commit-formula-edit", icon: o(he, { iconKey: "CheckSuccess" }), tooltipProps: { label: "Enter", simple: !0 }, disabled: f || N === null, onMouseDown: (A) => {
|
|
1899
1899
|
A.button === 0 && A.preventDefault();
|
|
1900
1900
|
}, onClick: () => {
|
|
1901
1901
|
r.submitEdit();
|
|
1902
1902
|
} }), o(ft, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, disabled: !0, "aria-label": "commit-formula-function", icon: o(he, { iconKey: "Function", style: { transform: "scale(0.85)" } }), tooltipProps: { label: "Insert Function", simple: !0 }, onMouseDown: (A) => {
|
|
1903
1903
|
A.button === 0 && A.preventDefault();
|
|
1904
|
-
} })] }), [
|
|
1904
|
+
} })] }), [f, N]), Q = Xe(), [ue, j] = _(!1), K = W(() => H(B, { className: "formula-bar", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (A) => A.spacing(0.5), alignItems: "start" }, children: [ae, H(no, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (A) => A.typography.fontFamily, fontSize: 11 * Ht.getDeviceScale(), alignItems: "stretch", paddingTop: "2px", paddingBottom: "2px", boxShadow: "none", borderRadius: (A) => `${A.shape.borderRadius}px`, backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})`, border: (A) => `solid ${f ? A.palette.action.disabled : ye(A.palette.divider, 0.2)} 1px`, "& textarea": { color: (A) => f ? `${A.palette.text.disabled} !important` : A.palette.text.primary }, "& .react-resizable-handle": { width: "100%", height: "8px", backgroundColor: "transparent", boxSizing: "content-box", zIndex: 1e3 }, "& .react-resizable-handle-s": { position: "absolute", bottom: "-10px", cursor: "s-resize" } }, onFocus: () => j(!0), onBlur: () => j(!1), onMouseDown: (A) => {
|
|
1905
1905
|
A.target?.classList.contains("react-resizable-handle") && A.preventDefault();
|
|
1906
|
-
}, children: [o(B, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative",
|
|
1906
|
+
}, children: [o(B, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignItems: "center", marginTop: "-1px", paddingLeft: (A) => A.spacing(1), paddingRight: (A) => A.spacing(1) }, children: o(Tc.ResizableBox, { height: S, draggableOpts: { grid: [v, v] }, minConstraints: [v, v], maxConstraints: [15 * v, 15 * v], onResize: E, onResizeStop: k, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: L }) }), o(ft, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, "aria-label": "toggle-expand-formula-edit", icon: o(he, { iconKey: P > 1 ? "ExpandLess" : "ExpandMore" }), tooltipProps: { label: (P > 1 ? "Collapse" : "Expand") + " Formula Bar", simple: !0 }, onMouseDown: (A) => {
|
|
1907
1907
|
A.button === 0 && A.preventDefault();
|
|
1908
1908
|
}, onClick: () => {
|
|
1909
1909
|
const A = P > 1 ? 1 : D;
|
|
@@ -1920,13 +1920,13 @@ const ri = q(X((n, a) => {
|
|
|
1920
1920
|
return o(B, { ref: a, sx: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...l }, ...p, children: x });
|
|
1921
1921
|
}));
|
|
1922
1922
|
ri.displayName = "FilterColumnMenu";
|
|
1923
|
-
const
|
|
1923
|
+
const Dc = q(X((n, a) => {
|
|
1924
1924
|
const { children: t, className: e, disabled: r, style: l, filter: c, ...p } = n, i = Ct(a, () => ({ isFilters: () => !0 }), []);
|
|
1925
1925
|
return o("div", { ref: i, className: Ce("filters", e), style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", gap: "8px", ...l }, ...p, children: H("div", { style: { flex: "1 1 100%", display: "flex", minHeight: "100px", minWidth: "220px", alignItems: "center", border: "grey solid 1px", padding: "4px 4px", overflow: "hidden", flexDirection: "column", justifyContent: "space-evenly", marginTop: "4px", marginBottom: "4px", marginLeft: "16px", marginRight: "16px" }, children: [o("div", { children: c.getName() }), o("div", { children: "Filter Widget" })] }) });
|
|
1926
1926
|
}));
|
|
1927
|
-
|
|
1927
|
+
Dc.displayName = "Filters";
|
|
1928
1928
|
const ai = q(X((n, a) => {
|
|
1929
|
-
const { children: t, sheet: e, style: r, className: l, value: c, index: p, editing: i, editable: s, disabled: d, selectedIndex: x, dragging: g, borderColor: m, borderWidth: u, activeColor:
|
|
1929
|
+
const { children: t, sheet: e, style: r, className: l, value: c, index: p, editing: i, editable: s, disabled: d, selectedIndex: x, dragging: g, borderColor: m, borderWidth: u, activeColor: b, background: y = "white", tabRadius: f = 4, gridTheme: h, ...w } = n, [v, S] = _(() => !!e && e.getProtection().isLocked()), [C, D] = _(() => e ? e.getTabColor() : null);
|
|
1930
1930
|
We(e, { onProtectionChange: () => {
|
|
1931
1931
|
S(e.getProtection().isLocked());
|
|
1932
1932
|
}, onTabColorChange: () => {
|
|
@@ -1943,7 +1943,7 @@ const ai = q(X((n, a) => {
|
|
|
1943
1943
|
let E = null;
|
|
1944
1944
|
typeof m == "string" ? E = m : m?.toCSS && (E = m.toCSS());
|
|
1945
1945
|
const M = P ? o(B, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (I) => I.palette.primary.main } }) : null;
|
|
1946
|
-
return o(Na, { theme: P ? h ?? T : T, children: o(B, { ref: a, className: Ce(l), sx: { ...r, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: P ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: g ? "grabbing" : void 0 }, ...w, children: o(
|
|
1946
|
+
return o(Na, { theme: P ? h ?? T : T, children: o(B, { ref: a, className: Ce(l), sx: { ...r, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: P ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: g ? "grabbing" : void 0 }, ...w, children: o(ws, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: f, strokeColor: P ? E : "transparent", children: o(Jo, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: P ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: g ? "grabbing" : void 0, color: P ? "primary" : k || "text.secondary", backgroundColor: P ? y : "transparent", "&:hover:not([disabled])": { backgroundColor: P ? y : "transparent" }, "& input": { color: (I) => `${I.palette.text.primary}`, textAlign: "center", fontWeight: "500" }, marginTop: "0px", minWidth: "unset" }, disabled: d, disableRipple: i, component: "div", children: H(le, { children: [R, H(B, { sx: { zIndex: "1", display: "flex", flexDirection: "row", alignItems: "center" }, children: [H(B, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "1px", lineHeight: "1", marginTop: P ? void 0 : "1px" }, children: [t, M] }), v ? o(he, { iconKey: "Lock", style: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : o(B, { sx: { minHeight: "22px" } })] })] }) }, c + ":" + p) }) }) });
|
|
1947
1947
|
}));
|
|
1948
1948
|
ai.displayName = "SheetTab";
|
|
1949
1949
|
const ii = q(X((n, a) => {
|
|
@@ -1951,17 +1951,17 @@ const ii = q(X((n, a) => {
|
|
|
1951
1951
|
We(t, { onProtectionChange: (h) => {
|
|
1952
1952
|
m(h?.getProtection());
|
|
1953
1953
|
} });
|
|
1954
|
-
const u = W(() => ({}), []),
|
|
1954
|
+
const u = W(() => ({}), []), b = W(() => ({ commandHook: { beforeExecute: (h, w) => p.closeAll(), onExecute() {
|
|
1955
1955
|
}, onError() {
|
|
1956
1956
|
console.log("onError");
|
|
1957
|
-
} }, scope: l, commandState: e, disabled: c || e === void 0, parentFloat: p }), [c, p]), y = W(() => ({ ...u, ...
|
|
1957
|
+
} }, scope: l, commandState: e, disabled: c || e === void 0, parentFloat: p }), [c, p]), y = W(() => ({ ...u, ...b }), [u, b]), f = H(le, { children: [o(O, { command: r.getCommand("addSheet"), commandState: e, ...y, variant: ie.Menuitem }), o(O, { command: r.getCommand("deleteSheet"), ...y, variant: ie.Menuitem }), H(ct, { onMouseDown: (h) => {
|
|
1958
1958
|
h.button === 0 && h.preventDefault();
|
|
1959
1959
|
}, onMouseUp: () => {
|
|
1960
1960
|
Promise.resolve(p.closeAll()).then(() => {
|
|
1961
1961
|
d?.startEdit(e);
|
|
1962
1962
|
});
|
|
1963
1963
|
}, disabled: c || !g.isStructureAllowed(), parentFloat: p, children: ["Rename", l !== "sheet" ? " Sheet" : ""] }), o(O, { command: r.getCommand("duplicateSheet"), ...y, variant: ie.Menuitem }), o(O, { command: r?.getCommand("protectionSheetToggle"), ...y, variant: ie.Menuitem }), o(No, { variant: ie.Menuitem, command: r.getCommand("formatSheetTabColor"), icon: o(he, { iconKey: "stroke.colored" }), panelProps: { disableAlpha: !0, autoColorLabel: "No Tab Color", autoColorPosition: Ro.End }, parentFloat: p }), o(J, { orientation: "horizontal" }), o(O, { command: r.getCommand("hideSheet"), ...y, variant: ie.Menuitem })] });
|
|
1964
|
-
return o(B, { ref: a, className: Ce("menu", s), sx: { ...i }, ...x, children:
|
|
1964
|
+
return o(B, { ref: a, className: Ce("menu", s), sx: { ...i }, ...x, children: f });
|
|
1965
1965
|
}));
|
|
1966
1966
|
ii.displayName = "SheetTabMenu";
|
|
1967
1967
|
const li = q(X((n, a) => {
|
|
@@ -1972,11 +1972,11 @@ const li = q(X((n, a) => {
|
|
|
1972
1972
|
x(m?.getProtection());
|
|
1973
1973
|
} });
|
|
1974
1974
|
const g = W(() => {
|
|
1975
|
-
const m = [], u = t.getSheets().getItems({ visibility: Ft.Visibility.Hidden }),
|
|
1975
|
+
const m = [], u = t.getSheets().getItems({ visibility: Ft.Visibility.Hidden }), b = t.getSelectedSheet();
|
|
1976
1976
|
for (let y = 0; y < u.length; y++) {
|
|
1977
|
-
const
|
|
1977
|
+
const f = u[y], h = f.getVisibility();
|
|
1978
1978
|
if (h === Ft.Visibility.VeryHidden) continue;
|
|
1979
|
-
const w =
|
|
1979
|
+
const w = b === f, v = f.getProtection().isLocked(), S = f.getTabColor(), C = e?.body.fill ?? "transparent";
|
|
1980
1980
|
let D = null, T = null, P = C;
|
|
1981
1981
|
S && (P = S.toCSS(), w || (T = S.toBlackOrWhite().toCSS()), D = o(B, { sx: { position: "absolute", display: "flex", flexDirection: "column", top: "4px", left: "40px", right: "8px", bottom: "4px", background: w ? P : "transparent", borderRadius: "4px", border: `solid 1px ${e.header.edgeStrokeFill}` }, children: o(B, { sx: { flex: "1 1 100%", boxSizing: "content-box", opacity: w || h === Ft.Visibility.Hidden ? "50%" : "100%", border: (k) => w ? `${C} solid 1.5px` : `${k.palette.divider} solid 1px`, background: w && S ? `linear-gradient(0deg, ${P} 0%, ${C})` : P, borderRadius: "4px" } }) }));
|
|
1982
1982
|
let R = null;
|
|
@@ -1986,12 +1986,12 @@ const li = q(X((n, a) => {
|
|
|
1986
1986
|
}, borderLeft: (k) => `${w ? k.palette.primary.main : "transparent"} solid 2px`, paddingLeft: "4px", fontWeight: w ? "700" : "400", "&:hover": { fontWeight: "700" } }, icon: w ? o(on, {}) : void 0, onMouseDown: (k) => k.preventDefault(), onMouseUp: () => {
|
|
1987
1987
|
Promise.resolve(r.closeAll()).then(() => {
|
|
1988
1988
|
try {
|
|
1989
|
-
|
|
1989
|
+
f.select();
|
|
1990
1990
|
} catch (k) {
|
|
1991
1991
|
console.error(k);
|
|
1992
1992
|
}
|
|
1993
1993
|
});
|
|
1994
|
-
}, children: H(le, { children: [D, H(B, { sx: { paddingRight: "0px", paddingLeft: "4px", display: "flex", flexDirection: "row", flex: "1 1 100%", overflow: "hidden", alignItems: "center", zIndex: 2 }, children: [H(B, { className: "sheet-name", sx: { display: "flex", flexDirection: "column", paddingLeft: "8px", paddingRight: "8px", alignItems: "center" }, children: [
|
|
1994
|
+
}, children: H(le, { children: [D, H(B, { sx: { paddingRight: "0px", paddingLeft: "4px", display: "flex", flexDirection: "row", flex: "1 1 100%", overflow: "hidden", alignItems: "center", zIndex: 2 }, children: [H(B, { className: "sheet-name", sx: { display: "flex", flexDirection: "column", paddingLeft: "8px", paddingRight: "8px", alignItems: "center" }, children: [f.getName(), o(B, { sx: { height: "0px", opacity: "0", fontWeight: "700" }, children: f.getName() })] }), R] })] }) }, "" + y));
|
|
1995
1995
|
}
|
|
1996
1996
|
return m;
|
|
1997
1997
|
}, [t, d, i, r, e]);
|
|
@@ -2025,7 +2025,7 @@ Try
|
|
|
2025
2025
|
t instanceof DOMException || console.error(t);
|
|
2026
2026
|
}
|
|
2027
2027
|
}
|
|
2028
|
-
},
|
|
2028
|
+
}, np = (n) => {
|
|
2029
2029
|
si = n;
|
|
2030
2030
|
};
|
|
2031
2031
|
function In() {
|
|
@@ -2216,7 +2216,7 @@ const kn = 0.12, Zr = (n, a) => {
|
|
|
2216
2216
|
const c = a ?? n, p = c.palette.mode === "dark";
|
|
2217
2217
|
return t.selection = { fill: c.palette?.primary?.main ? Qe(c.palette?.primary?.main, 0.1) : void 0, strokeFill: c.palette?.primary?.main }, t.selectionInactive = { ...t.selection, fill: c.palette?.divider ? Qe(c.palette?.divider, 0.05) : void 0, strokeFill: "transparent" }, t.selectionRemove = { ...t.selection, fill: Qe(c.palette.warning.light, 0.05), strokeFill: c.palette.warning.dark }, a && (t.body = e(a)), t.colorShadow = Qe(c.palette.action.active, 0.5), t.colorGrey = c.palette.action.active, t.filterDarkInvert = p ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", t;
|
|
2218
2218
|
}, Fo = q(X((n, a) => {
|
|
2219
|
-
const { children: t, sx: e, parentFloat: r, ...l } = n, c = Ct(a, () => ({}), []), [p, i] = zt(), s = xe(null), d = xe(null), [x, g] = re.useReducer((S) => S + 1, 0), [m, u] = _(null), [
|
|
2219
|
+
const { children: t, sx: e, parentFloat: r, ...l } = n, c = Ct(a, () => ({}), []), [p, i] = zt(), s = xe(null), d = xe(null), [x, g] = re.useReducer((S) => S + 1, 0), [m, u] = _(null), [b, y] = _(null), [f, h] = _(null), { reference: w } = ao({ parentFloat: r, label: "overflow" });
|
|
2220
2220
|
St(() => {
|
|
2221
2221
|
d.current = { refs: [] };
|
|
2222
2222
|
const S = [], C = re.Children.toArray(t);
|
|
@@ -2259,9 +2259,9 @@ const kn = 0.12, Zr = (n, a) => {
|
|
|
2259
2259
|
y(T.length > 0 ? T : null), h(P.length > 0 ? P : null);
|
|
2260
2260
|
}, [t, m, i, w, x]);
|
|
2261
2261
|
const v = Y((S) => {
|
|
2262
|
-
const C = [], D =
|
|
2262
|
+
const C = [], D = f.length;
|
|
2263
2263
|
for (let P = 0; P < D; P++) {
|
|
2264
|
-
const R = re.Children.toArray(
|
|
2264
|
+
const R = re.Children.toArray(f[P])[0];
|
|
2265
2265
|
re.Children.toArray(R.props.children?.props?.children ?? R.props.children).forEach((k, E) => {
|
|
2266
2266
|
const M = k, I = { ...M.props, key: `overflow-${P}-${E}${M.key ?? ""}` };
|
|
2267
2267
|
I.parentFloat && S && (I.parentFloat = S.floatReference);
|
|
@@ -2271,9 +2271,9 @@ const kn = 0.12, Zr = (n, a) => {
|
|
|
2271
2271
|
}
|
|
2272
2272
|
const T = o(B, { className: "overflow-palette-popup-panel", sx: { display: "flex", flexDirection: "row", flexWrap: "wrap", rowGap: (P) => P.spacing(0.25), paddingTop: (P) => P.spacing(0.5), paddingBottom: (P) => P.spacing(0.5), paddingLeft: (P) => P.spacing(1), paddingRight: (P) => P.spacing(1), overflow: "hidden" }, children: C });
|
|
2273
2273
|
return ge({ ...S, children: T });
|
|
2274
|
-
}, [
|
|
2275
|
-
return H(B, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...e }, ref: $t([c, p, a]), ...l, children: [o(B, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%", alignItems: "center" }, children:
|
|
2276
|
-
})), mi = "https://unpkg.com/@sheetxl/scripting-templates/dist",
|
|
2274
|
+
}, [f]);
|
|
2275
|
+
return H(B, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...e }, ref: $t([c, p, a]), ...l, children: [o(B, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%", alignItems: "center" }, children: b ?? m }), o(B, { className: "overflow-palette-popup-button", sx: { display: f !== null && f.length === 0 ? "none" : "flex", flex: "1 1 0" }, children: o(kt, { createPopupPanel: v, ref: s, parentFloat: w, createTooltip: ({ children: S }, C) => o(ot, { label: "More", description: "More toolbar options…", disabled: C, children: S }), icon: o(he, { iconKey: "MoreHorizontal" }) }) })] });
|
|
2276
|
+
})), mi = "https://unpkg.com/@sheetxl/scripting-templates/dist", Pc = (n) => {
|
|
2277
2277
|
if (n.metadata?.name) return n.metadata.name;
|
|
2278
2278
|
let a = (n.path.split("/").pop() || "").replace(/\.[^/.]+$/, "");
|
|
2279
2279
|
return n.metadata?.icon === "formula" ? a.toUpperCase() : (a = a.replace(/([a-z])([A-Z])/g, "$1 $2"), a.replace(/[-_]/g, " ").trim().split(/\s+/).map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join(" "));
|
|
@@ -2294,14 +2294,14 @@ const kn = 0.12, Zr = (n, a) => {
|
|
|
2294
2294
|
if (!i.ok) throw new Error(`Failed to fetch file at '${c.path}': ${i.statusText}`);
|
|
2295
2295
|
const s = await i.text();
|
|
2296
2296
|
let d = c.metadata;
|
|
2297
|
-
return d?.title || (d = { title:
|
|
2297
|
+
return d?.title || (d = { title: Pc(c), ...d }), { path: c.path, content: s, metadata: d };
|
|
2298
2298
|
} catch (p) {
|
|
2299
2299
|
console.error(p.message);
|
|
2300
2300
|
}
|
|
2301
2301
|
return null;
|
|
2302
2302
|
});
|
|
2303
2303
|
return (await Promise.all(l)).filter((c) => c !== null);
|
|
2304
|
-
}, Cn = { marginRight: "4px" }, Tn = "1em",
|
|
2304
|
+
}, Cn = { marginRight: "4px" }, Tn = "1em", Rc = q((n) => {
|
|
2305
2305
|
const { disabled: a, snippet: t, description: e, handleInsert: r, sx: l, ...c } = n;
|
|
2306
2306
|
let p;
|
|
2307
2307
|
const i = t.metadata?.icon;
|
|
@@ -2312,70 +2312,70 @@ const kn = 0.12, Zr = (n, a) => {
|
|
|
2312
2312
|
}, onKeyDown: (s) => {
|
|
2313
2313
|
s.keyCode !== me.Enter && s.keyCode !== me.Space || r(t);
|
|
2314
2314
|
}, ...c, children: H(B, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [o(Re, { component: "div", children: t.metadata?.title ?? t.path }), o(Re, { variant: "caption", component: "div", sx: { color: (s) => Qe(s.palette.text.secondary ?? s.palette.text.primary, 0.6), overflow: "hidden", textOverflow: "ellipsis" }, children: t.metadata?.summary })] }) });
|
|
2315
|
-
}),
|
|
2315
|
+
}), Mc = q(X((n, a) => {
|
|
2316
2316
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, scriptPath: c = mi, ...p } = n, [i, s] = _([]), [d, x] = _(!0), g = Ie(t, ["executeSelectedScript"]), m = g[0]?.context?.();
|
|
2317
2317
|
de(() => {
|
|
2318
2318
|
(async () => {
|
|
2319
2319
|
try {
|
|
2320
|
-
const
|
|
2321
|
-
s(
|
|
2320
|
+
const b = await hi(c);
|
|
2321
|
+
s(b);
|
|
2322
2322
|
} catch {
|
|
2323
2323
|
} finally {
|
|
2324
2324
|
x(!1);
|
|
2325
2325
|
}
|
|
2326
2326
|
})();
|
|
2327
2327
|
}, [c]);
|
|
2328
|
-
const u = U((
|
|
2328
|
+
const u = U((b, y) => {
|
|
2329
2329
|
if (d) return o("div", { children: "Loading..." });
|
|
2330
|
-
const
|
|
2331
|
-
m.getEditor()?.insertSnippet(S.content),
|
|
2330
|
+
const f = { variant: ie.Menuitem, commandHook: e, scope: "scripts", disabled: l }, h = (S) => {
|
|
2331
|
+
m.getEditor()?.insertSnippet(S.content), b.closeFloat();
|
|
2332
2332
|
}, w = [];
|
|
2333
2333
|
for (let S = 0; S < i.length; S++) {
|
|
2334
2334
|
const C = i[S];
|
|
2335
|
-
C && w.push(o(
|
|
2335
|
+
C && w.push(o(Rc, { handleInsert: h, snippet: C }, C.path));
|
|
2336
2336
|
}
|
|
2337
|
-
const v = H(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [w.length > 0 ? H(le, { children: [o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: w }), o(J, { orientation: "horizontal" })] }) : null, Ee(O, { ...
|
|
2338
|
-
return ge({ ...
|
|
2337
|
+
const v = H(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [w.length > 0 ? H(le, { children: [o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: w }), o(J, { orientation: "horizontal" })] }) : null, Ee(O, { ...f, key: "help", command: t.getCommand("help") })] });
|
|
2338
|
+
return ge({ ...b, children: v });
|
|
2339
2339
|
}, [l, e, r, d, m]);
|
|
2340
2340
|
return o(ve, { ref: a, commands: t, disabled: l, commandHook: e, scope: r, label: "Insert Script", tooltip: "Inserts a script from a set of templates.", createPopupPanel: u, icon: "ScriptNew", ...p });
|
|
2341
2341
|
})), gi = q(X((n, a) => {
|
|
2342
2342
|
const { commands: t, parentFloat: e, commandButtonProps: r, ...l } = n, c = Y((p) => {
|
|
2343
2343
|
const { commandButtonProps: i, commandPopupProps: s } = p;
|
|
2344
|
-
return o(le, { children: H("div", { style: { display: "flex", flex: "1 1 100%" }, children: [o("div", { children: o(Fo, { parentFloat: e, style: {}, children: o(O, { ...i, command: t?.getCommand("saveScripts") }) }) }), o("div", { style: { flex: "1 1 100%" } }), o("div", { children: o(Fo, { parentFloat: e, style: {}, children: o(
|
|
2344
|
+
return o(le, { children: H("div", { style: { display: "flex", flex: "1 1 100%" }, children: [o("div", { children: o(Fo, { parentFloat: e, style: {}, children: o(O, { ...i, command: t?.getCommand("saveScripts") }) }) }), o("div", { style: { flex: "1 1 100%" } }), o("div", { children: o(Fo, { parentFloat: e, style: {}, children: o(Mc, { ...i, commands: t }) }) })] }) });
|
|
2345
2345
|
}, [t]);
|
|
2346
2346
|
return o(rn, { ref: a, commands: t, parentFloat: e, commandButtonProps: r, createToolbarPalette: c, ...l });
|
|
2347
2347
|
}));
|
|
2348
2348
|
gi.displayName = "ScriptEditorToolbar";
|
|
2349
2349
|
const fi = q(X((n, a) => {
|
|
2350
|
-
const { scriptPath: t = mi, onScriptSelect: e, sx: r = an.EmptyCssProperties, className: l, buttonMinWidth: c = 210, buttonMinHeight: p = 80, gap: i = 12, ...s } = n, [d, x] = _([]), [g, m] = _(!0), [u,
|
|
2350
|
+
const { scriptPath: t = mi, onScriptSelect: e, sx: r = an.EmptyCssProperties, className: l, buttonMinWidth: c = 210, buttonMinHeight: p = 80, gap: i = 12, ...s } = n, [d, x] = _([]), [g, m] = _(!0), [u, b] = _(null);
|
|
2351
2351
|
if (de(() => {
|
|
2352
2352
|
(async () => {
|
|
2353
2353
|
const h = [{ path: null, metadata: { title: "Blank Template...", summary: "Start with an empty script." }, content: "" }];
|
|
2354
2354
|
try {
|
|
2355
|
-
m(!0),
|
|
2355
|
+
m(!0), b(null);
|
|
2356
2356
|
const w = await hi(t);
|
|
2357
2357
|
for (let v = 0; v < w.length; v++) {
|
|
2358
2358
|
const S = w[v];
|
|
2359
2359
|
S && h.push(S);
|
|
2360
2360
|
}
|
|
2361
2361
|
} catch (w) {
|
|
2362
|
-
|
|
2362
|
+
b(w instanceof Error ? w.message : "Failed to load scripts"), w instanceof An || console.error("Error loading scripts:", w);
|
|
2363
2363
|
} finally {
|
|
2364
2364
|
x(h), m(!1);
|
|
2365
2365
|
}
|
|
2366
2366
|
})();
|
|
2367
|
-
}, [t]), g) return o(B, { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", className: Ce(l, "script-select"), sx: { background: (h) => h.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})`, ...r }, ...s, children: o(
|
|
2367
|
+
}, [t]), g) return o(B, { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", className: Ce(l, "script-select"), sx: { background: (h) => h.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})`, ...r }, ...s, children: o(Ql, {}) });
|
|
2368
2368
|
let y = null;
|
|
2369
2369
|
u && (y = H(B, { display: "flex", justifyContent: "center", alignItems: "center", className: Ce(l, "script-select", "error-results"), sx: { background: (h) => h.palette.error.light, flex: "0", zIndex: 1e3, flexDirection: "column", padding: (h) => h.spacing(1), border: (h) => `1px solid ${h.palette.error.main}`, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})` }, ...s, children: [o(Re, { color: "error", variant: "h6", component: "div", gutterBottom: !0, children: "Error loading Templates" }), o(Re, { color: "error", component: "div", children: u })] }));
|
|
2370
|
-
const
|
|
2370
|
+
const f = (h) => {
|
|
2371
2371
|
const w = h.metadata?.icon;
|
|
2372
2372
|
return w === "macro" ? o(he, { iconKey: "ScriptMacro", size: "1em" }) : w === "formula" ? o(he, { iconKey: "ScriptFormula", size: "1em" }) : w === "autostart" ? o(he, { iconKey: "ScriptAutoStart", size: "1em" }) : null;
|
|
2373
2373
|
};
|
|
2374
|
-
return H(B, { ref: a, className: Ce(l, "script-select"), sx: { background: (h) => h.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})`, ...r }, ...s, children: [H(B, { p: 3, className: "script-select-content", sx: { overflow: "auto", flex: "1 1 auto" }, children: [o(Re, { variant: "h6", gutterBottom: !0, children: "Script Template" }), o(Re, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: !0, children: "Choose from a template to provide a starting point to automate tasks or create user defined functions." }), o(Re, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: !0, children: "Templates provide a foundation to customize and meet your specific needs." }), o(B, { sx: { display: "grid", gridTemplateColumns: `repeat(auto-fill, minmax(${c}px, 1fr))`, gap: `${i}px`, padding: 2, paddingLeft: "0px", paddingRight: "0px" }, children: d.map((h, w) => H(Jo, { variant: "outlined", sx: { minWidth: c, minHeight: p, display: "flex", flexDirection: "column", justifyContent: "flex-start", alignItems: "flex-start", textAlign: "left", padding: 2, textTransform: "none", overflow: "hidden", ...w === 0 && { borderStyle: "dashed", marginBottom: "8px" }, ...w === 1 && { gridColumn: "1" } }, onClick: () => e?.(h), children: [H(B, { sx: { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", width: "100%", marginBottom: 0.5 }, children: [o(Re, { variant: "subtitle2", component: "div", children: h.metadata?.title || h.path.split("/").pop()?.replace(/\.\w+$/, "") || "Untitled" }),
|
|
2374
|
+
return H(B, { ref: a, className: Ce(l, "script-select"), sx: { background: (h) => h.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})`, ...r }, ...s, children: [H(B, { p: 3, className: "script-select-content", sx: { overflow: "auto", flex: "1 1 auto" }, children: [o(Re, { variant: "h6", gutterBottom: !0, children: "Script Template" }), o(Re, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: !0, children: "Choose from a template to provide a starting point to automate tasks or create user defined functions." }), o(Re, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: !0, children: "Templates provide a foundation to customize and meet your specific needs." }), o(B, { sx: { display: "grid", gridTemplateColumns: `repeat(auto-fill, minmax(${c}px, 1fr))`, gap: `${i}px`, padding: 2, paddingLeft: "0px", paddingRight: "0px" }, children: d.map((h, w) => H(Jo, { variant: "outlined", sx: { minWidth: c, minHeight: p, display: "flex", flexDirection: "column", justifyContent: "flex-start", alignItems: "flex-start", textAlign: "left", padding: 2, textTransform: "none", overflow: "hidden", ...w === 0 && { borderStyle: "dashed", marginBottom: "8px" }, ...w === 1 && { gridColumn: "1" } }, onClick: () => e?.(h), children: [H(B, { sx: { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", width: "100%", marginBottom: 0.5 }, children: [o(Re, { variant: "subtitle2", component: "div", children: h.metadata?.title || h.path.split("/").pop()?.replace(/\.\w+$/, "") || "Untitled" }), f(h)] }), h.metadata?.summary && o(Re, { variant: "body2", component: "div", color: "text.secondary", sx: { overflow: "hidden", display: "flex", flexDirection: "column", textOverflow: "ellipsis", alignItems: "flex-start" }, children: h.metadata.summary })] }, `${h.path}-${w}`)) })] }), y] });
|
|
2375
2375
|
}));
|
|
2376
2376
|
fi.displayName = "TemplateSelectPanel";
|
|
2377
2377
|
const bi = q(X((n, a) => {
|
|
2378
|
-
const { className: t, sx: e, editorProps: r, commands: l, readOnly: c = !1, frame: p, autoFocusSel: i, autoFocus: s = !0, scripts: d, ...x } = n, g = Xe(), [m, u] = _(!1),
|
|
2378
|
+
const { className: t, sx: e, editorProps: r, commands: l, readOnly: c = !1, frame: p, autoFocusSel: i, autoFocus: s = !0, scripts: d, ...x } = n, g = Xe(), [m, u] = _(!1), b = xe(!1), [y, f] = _({ message: "Loading", cursor: "", dirty: !1 }), [h, w] = _(null);
|
|
2379
2379
|
de(() => {
|
|
2380
2380
|
let L = !1;
|
|
2381
2381
|
return w(null), (async function() {
|
|
@@ -2388,7 +2388,7 @@ const bi = q(X((n, a) => {
|
|
|
2388
2388
|
};
|
|
2389
2389
|
}, [d]);
|
|
2390
2390
|
const v = U((L) => {
|
|
2391
|
-
|
|
2391
|
+
f((F) => ({ ...F, ...L }));
|
|
2392
2392
|
}, []), S = xe(null), [C, D] = _(null), T = xe(null), P = Y((L) => {
|
|
2393
2393
|
if (C) return C.focus(L), !0;
|
|
2394
2394
|
if (i) {
|
|
@@ -2396,7 +2396,7 @@ const bi = q(X((n, a) => {
|
|
|
2396
2396
|
if (F && F.length > 0) return F[0]?.focus?.(L), !0;
|
|
2397
2397
|
}
|
|
2398
2398
|
return S.current?.focus?.(L), !1;
|
|
2399
|
-
}, [C, i, s]), R = W(() => o(Wt, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: !1 }), []), k = W(() => o(no, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, marginLeft: (L) => L.spacing(0.5), marginRight: (L) => L.spacing(0.5), marginTop: (L) => L.spacing(1), marginBottom: (L) => L.spacing(1) }, children: o(gi, { commands: l }) }), [g, l]), E = W(() => o(B, { className: Ce("script-status-panel", "status-panel"), sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", margin: 0, borderTop: `solid 1px ${g.palette.divider}` }, children: H("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [o(Re, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "1 1 100%", color: (L) => L.palette.text.secondary }, variant: "caption", children: y.message }), o(Re, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", color: (L) => L.palette.text.secondary }, variant: "caption", children: y.dirty ? "Unsaved" : "" }), o(Re, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", marginLeft: "8px", minWidth: "90px", display: "flex", justifyContent: "end", color: (L) => L.palette.text.secondary }, variant: "caption", children: y.cursor })] }) }), [y]), M = W(() => H(B, { className: Ce("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [k, o(B, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: o(
|
|
2399
|
+
}, [C, i, s]), R = W(() => o(Wt, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: !1 }), []), k = W(() => o(no, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, marginLeft: (L) => L.spacing(0.5), marginRight: (L) => L.spacing(0.5), marginTop: (L) => L.spacing(1), marginBottom: (L) => L.spacing(1) }, children: o(gi, { commands: l }) }), [g, l]), E = W(() => o(B, { className: Ce("script-status-panel", "status-panel"), sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", margin: 0, borderTop: `solid 1px ${g.palette.divider}` }, children: H("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [o(Re, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "1 1 100%", color: (L) => L.palette.text.secondary }, variant: "caption", children: y.message }), o(Re, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", color: (L) => L.palette.text.secondary }, variant: "caption", children: y.dirty ? "Unsaved" : "" }), o(Re, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", marginLeft: "8px", minWidth: "90px", display: "flex", justifyContent: "end", color: (L) => L.palette.text.secondary }, variant: "caption", children: y.cursor })] }) }), [y]), M = W(() => H(B, { className: Ce("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [k, o(B, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: o(Il, { ref: S, loadingPanel: R, readOnly: c, frame: p, autoFocus: s, commands: l, onStatusChange: v, darkMode: g.palette.mode === "dark", ...r }) }), E] }), [g, l, k, E, m, R, c, r, s, i, p, v]), I = W(() => {
|
|
2400
2400
|
let L;
|
|
2401
2401
|
return h === null ? null : (h.source === null && (L = o(fi, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (F) => {
|
|
2402
2402
|
S.current?.getEditor()?.insertSnippet(F.content), w({ source: F.content ?? "" });
|
|
@@ -2407,13 +2407,13 @@ const bi = q(X((n, a) => {
|
|
|
2407
2407
|
P(L);
|
|
2408
2408
|
} }), []);
|
|
2409
2409
|
return o(B, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...e }, ref: N, ...x, onFocus: (L) => {
|
|
2410
|
-
u(!0),
|
|
2410
|
+
u(!0), b.current = !0, N.current?.contains(L.target) && L.target !== N.current && D(L.target), L.relatedTarget && !T.current && (T.current = L.relatedTarget), x?.onFocus?.(L);
|
|
2411
2411
|
}, onBlur: (L) => {
|
|
2412
|
-
N?.current?.contains(L.relatedTarget) || N?.current === L.relatedTarget || (T.current = null,
|
|
2412
|
+
N?.current?.contains(L.relatedTarget) || N?.current === L.relatedTarget || (T.current = null, b.current = !1, u(!1)), x?.onBlur?.(L);
|
|
2413
2413
|
}, children: I });
|
|
2414
2414
|
}));
|
|
2415
2415
|
bi.displayName = "ScriptWorkspace";
|
|
2416
|
-
const
|
|
2416
|
+
const Nc = (n, a) => {
|
|
2417
2417
|
const { model: t, commands: e, entryKey: r, frame: l, ...c } = n;
|
|
2418
2418
|
return o(bi, { ref: a, readOnly: !1, commands: e, frame: l, scripts: t?.getScripts(), ...c });
|
|
2419
2419
|
}, xi = q(X((n, a) => {
|
|
@@ -2422,14 +2422,14 @@ const Rc = (n, a) => {
|
|
|
2422
2422
|
const u = s?.getScripts();
|
|
2423
2423
|
u && (async () => {
|
|
2424
2424
|
i(!0);
|
|
2425
|
-
const
|
|
2426
|
-
c(
|
|
2425
|
+
const b = await u.searchFunctions({ type: "macro" });
|
|
2426
|
+
c(b), i(!1);
|
|
2427
2427
|
})();
|
|
2428
2428
|
}, []);
|
|
2429
2429
|
const d = { variant: ie.Menuitem, parentFloat: n.floatReference, scope: "scripts", shortcut: null }, x = [], g = l.length;
|
|
2430
2430
|
for (let u = 0; u < g; u++) {
|
|
2431
|
-
const
|
|
2432
|
-
x.push(o(O, { ...d, command: t.getCommand("executeScript"), commandState: { declaration:
|
|
2431
|
+
const b = l[u];
|
|
2432
|
+
x.push(o(O, { ...d, command: t.getCommand("executeScript"), commandState: { declaration: b }, tooltipProps: { description: `Execute ${b.getName() ?? "macro"}` }, icon: o(he, { iconKey: "ScriptMacro" }), label: b.getName() ?? `Script '${b.getName()}'` }, `macro-${b.getName()}-${u}`));
|
|
2433
2433
|
}
|
|
2434
2434
|
const m = H(B, { ref: a, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [x.length > 0 ? H(le, { children: [o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: x }), o(J, { orientation: "horizontal" })] }) : null, Ee(O, { ...d, key: "show-editor", command: t.getCommand("showScriptEditor") })] });
|
|
2435
2435
|
return ge({ ...e, children: m });
|
|
@@ -2441,58 +2441,58 @@ const yi = q(X((n, a) => {
|
|
|
2441
2441
|
return ge({ ...d, children: g });
|
|
2442
2442
|
}, [l, i, e, r]);
|
|
2443
2443
|
return o(ve, { ref: a, commands: t, commandHook: e, createPopupPanel: s, selected: t.getCommand(p).state(), label: "Macros", tooltip: "Run or manage macros.", quickCommand: p, ...c });
|
|
2444
|
-
})),
|
|
2444
|
+
})), Fc = (n) => o(O, { ...n }), wi = q(X((n, a) => {
|
|
2445
2445
|
const { commands: t, parentFloat: e, commandButtonProps: r, ...l } = n, [c, p] = _(!1), i = Ie(t, ["executeScript", "showScriptEditor"]), s = i[0]?.context?.();
|
|
2446
2446
|
de(() => {
|
|
2447
2447
|
const g = s?.getScripts();
|
|
2448
2448
|
if (!g) return;
|
|
2449
2449
|
const m = i[1], u = async () => {
|
|
2450
2450
|
if (!m) return;
|
|
2451
|
-
let
|
|
2451
|
+
let f = !1;
|
|
2452
2452
|
if (!m.state()) {
|
|
2453
2453
|
const h = await g.searchFunctions({ type: "macro" }), w = h?.length ?? 0;
|
|
2454
|
-
for (let v = 0; h && !
|
|
2454
|
+
for (let v = 0; h && !f && v < w; v++) f = !0;
|
|
2455
2455
|
}
|
|
2456
|
-
p(
|
|
2456
|
+
p(f || !!m.state());
|
|
2457
2457
|
};
|
|
2458
2458
|
u();
|
|
2459
|
-
const
|
|
2459
|
+
const b = m.addPropertyListener(() => {
|
|
2460
2460
|
u();
|
|
2461
2461
|
}), y = g.addListeners({ onChange: () => {
|
|
2462
2462
|
u();
|
|
2463
2463
|
} });
|
|
2464
2464
|
return () => {
|
|
2465
|
-
y(),
|
|
2465
|
+
y(), b();
|
|
2466
2466
|
};
|
|
2467
2467
|
}, [s]);
|
|
2468
2468
|
const d = wa(), x = U((g) => {
|
|
2469
|
-
const { commandButtonProps: m, commandPopupProps: u } = g,
|
|
2469
|
+
const { commandButtonProps: m, commandPopupProps: u } = g, b = Un.findContributions("ribbon/home");
|
|
2470
2470
|
let y;
|
|
2471
|
-
const
|
|
2472
|
-
if (
|
|
2471
|
+
const f = b.length;
|
|
2472
|
+
if (f > 0) {
|
|
2473
2473
|
y = [];
|
|
2474
|
-
for (let D = 0; D <
|
|
2475
|
-
const T =
|
|
2474
|
+
for (let D = 0; D < f; D++) {
|
|
2475
|
+
const T = b[D], P = T.createCommand?.(d);
|
|
2476
2476
|
if (!P) continue;
|
|
2477
|
-
const R = { command: P, ...u }, k = (T.createCommandButton ??
|
|
2477
|
+
const R = { command: P, ...u }, k = (T.createCommandButton ?? Fc)(R);
|
|
2478
2478
|
y.push(k);
|
|
2479
2479
|
}
|
|
2480
2480
|
}
|
|
2481
|
-
const h = o(No, { ...u, command: t.getCommand("formatFontColor"), icon: o(he, { iconKey: "text.colored" }), isSplit: !0, panelProps: { disableAlpha: !0 } }), w = o(No, { ...u, command: t.getCommand("formatFillColor"), icon: o(he, { iconKey: "fill.colored" }), isSplit: !0, panelProps: { disableAlpha: !0, autoColorLabel: "No Fill", autoColorPosition: Ro.End } }), v = t.getCommand("undo") ? o(le, { children: o(za, { ...u, quickCommand: "undo" }) }) : null, S = t.getCommand("find") ? o(le, { children: o(
|
|
2481
|
+
const h = o(No, { ...u, command: t.getCommand("formatFontColor"), icon: o(he, { iconKey: "text.colored" }), isSplit: !0, panelProps: { disableAlpha: !0 } }), w = o(No, { ...u, command: t.getCommand("formatFillColor"), icon: o(he, { iconKey: "fill.colored" }), isSplit: !0, panelProps: { disableAlpha: !0, autoColorLabel: "No Fill", autoColorPosition: Ro.End } }), v = t.getCommand("undo") ? o(le, { children: o(za, { ...u, quickCommand: "undo" }) }) : null, S = t.getCommand("find") ? o(le, { children: o(Xs, { ...u }) }) : null;
|
|
2482
2482
|
let C = null;
|
|
2483
|
-
return c && (C = H(le, { children: [o(J, {}), o(yi, { ...u })] })), H(Fo, { parentFloat: e, children: [v, null, v ? o(J, {}) : null, o(Wa, { ...u, command: t.getCommand("paste") }), o(O, { ...m, command: t.getCommand("formatPainterToggle") }), o(or, { ...m, command: t.getCommand("copy") }), o(J, {}), o(
|
|
2483
|
+
return c && (C = H(le, { children: [o(J, {}), o(yi, { ...u })] })), H(Fo, { parentFloat: e, children: [v, null, v ? o(J, {}) : null, o(Wa, { ...u, command: t.getCommand("paste") }), o(O, { ...m, command: t.getCommand("formatPainterToggle") }), o(or, { ...m, command: t.getCommand("copy") }), o(J, {}), o(ec, { ...u, command: t.getCommand("formatFontFamily") }), o(Ys, { ...u, command: t.getCommand("formatFontSize") }), o(O, { ...m, command: t.getCommand("formatBoldToggle") }), o(O, { ...m, command: t.getCommand("formatItalicToggle") }), o(oc, { ...u }), o(tc, { ...u }), o(Gs, { ...u }), w, h, o(J, {}), o(Fs, { ...u }), o(Os, { ...u }), o(As, { ...u }), o(Bs, { ...u }), o(qs, { ...u }), o(J, {}), o(Zs, { ...u }), o(ic, { command: t.getCommand("formatCellStyle"), ...u }), o(Ni, { command: t.getCommand("formatTableStyle"), ...u }), o(J, {}), o(Aa, { ...u }), o(Ia, { ...u }), o(J, {}), o(Fi, { ...u }), o(Qs, { ...u }), o(Ba, { ...u }), o(La, { ...u }), S, C, y] });
|
|
2484
2484
|
}, [t, i, c, d]);
|
|
2485
2485
|
return o(rn, { ref: a, commands: t, parentFloat: e, commandButtonProps: r, createToolbarPalette: x, ...l });
|
|
2486
2486
|
}));
|
|
2487
2487
|
wi.displayName = "HomeToolbar";
|
|
2488
2488
|
const Si = q(X((n, a) => {
|
|
2489
2489
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, preferSingleMenu: c = !0, showQuickButton: p = !0, variant: i = ie.Toolbar, ...s } = n, d = Ie(t, ["insertImageFromFile", "insertImageFromURL"]), { singleMenuCommand: x, allDisabled: g } = W(() => {
|
|
2490
|
-
let u = null,
|
|
2491
|
-
for (let y = 0; y < d.length; y++) d[y] && !d[y]?.disabled() && (c && i === ie.Menuitem && (u =
|
|
2492
|
-
return { singleMenuCommand: u, allDisabled:
|
|
2493
|
-
}, [d]), m = U((u,
|
|
2494
|
-
const y = { variant: ie.Menuitem, commandHook: e, scope: "insertImage", disabled: l },
|
|
2495
|
-
return ge({ ...u, children:
|
|
2490
|
+
let u = null, b = 0;
|
|
2491
|
+
for (let y = 0; y < d.length; y++) d[y] && !d[y]?.disabled() && (c && i === ie.Menuitem && (u = b === 0 ? d[y] : null), b++);
|
|
2492
|
+
return { singleMenuCommand: u, allDisabled: b === 0 };
|
|
2493
|
+
}, [d]), m = U((u, b) => {
|
|
2494
|
+
const y = { variant: ie.Menuitem, commandHook: e, scope: "insertImage", disabled: l }, f = H(le, { children: [o(O, { ...y, command: b.getCommand("insertImageFromFile") }), o(O, { ...y, command: b.getCommand("insertImageFromURL") })] });
|
|
2495
|
+
return ge({ ...u, children: f });
|
|
2496
2496
|
}, [l, e, r]);
|
|
2497
2497
|
return x ? o(O, { ref: a, variant: i, commandHook: e, disabled: l, command: x, ...s }) : o(ve, { ref: a, variant: i, quickCommand: "insertImageFromFile", commands: t, commandHook: e, scope: r, disabled: l || g, tooltip: "Insert a picture from the web to complement your data.", createPopupPanel: m, icon: "InsertImage", ...s });
|
|
2498
2498
|
})), vi = q(X((n, a) => {
|
|
@@ -2506,26 +2506,26 @@ vi.displayName = "InsertToolbar";
|
|
|
2506
2506
|
const ki = q(X((n, a) => {
|
|
2507
2507
|
const { commands: t, parentFloat: e, commandButtonProps: r, ...l } = n, c = Y((p) => {
|
|
2508
2508
|
const { commandButtonProps: i, commandPopupProps: s } = p;
|
|
2509
|
-
return H(Fo, { parentFloat: e, children: [o(
|
|
2509
|
+
return H(Fo, { parentFloat: e, children: [o(Ks, { ...s }), o(O, { ...i, command: t.getCommand("protectionSheetToggle") }), o(J, {}), o(Js, { ...s }), o(nc, { ...s }), o(J, {}), o(O, { ...i, command: t.getCommand("sheetViewToggleFormulaView"), scope: "view" }), o(O, { ...i, command: t.getCommand("sheetViewToggleShowZeros"), scope: "view" }), o(J, {}), o(rc, { ...s }), o(td, { command: t.getCommand("selectTheme"), ...s }), o(J, {}), o(yi, { ...s, scope: "view" }), o(J, {}), o(O, { ...i, command: t.getCommand("fullScreenToggle"), scope: "view" })] });
|
|
2510
2510
|
}, [t]);
|
|
2511
2511
|
return o(rn, { ref: a, commands: t, parentFloat: e, commandButtonProps: r, createToolbarPalette: c, ...l });
|
|
2512
2512
|
}));
|
|
2513
2513
|
ki.displayName = "ViewToolbar";
|
|
2514
|
-
const Ci = (n) => o(Ti, { ...n }),
|
|
2514
|
+
const Ci = (n) => o(Ti, { ...n }), Oc = q((n) => {
|
|
2515
2515
|
const { sx: a, ...t } = n;
|
|
2516
2516
|
return H(B, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (e) => `${ye(e.palette.primary.main, 0.35)} solid 2px` } }, children: [o(Ea, { disableRipple: !0, onMouseDown: (e) => {
|
|
2517
2517
|
e.button === 0 && e.preventDefault();
|
|
2518
2518
|
}, sx: { textTransform: "none", flex: "1 1 100%", fontWeight: (e) => e.typography.fontWeightRegular, padding: "2px 6px", minHeight: "0px", minWidth: "0px", marginRight: (e) => e.spacing(0.5), "&.Mui-selected": {}, "&.Mui-focusVisible": {}, ...a }, ...t }), o(B, { className: "indicator", sx: { width: "90%", borderRadius: "4px", minWidth: "4px", position: "absolute", bottom: "0", alignSelf: "center", display: "flex" } })] });
|
|
2519
|
-
}),
|
|
2519
|
+
}), Bc = q((n) => {
|
|
2520
2520
|
const { toolbars: a, value: t, onToolbarChange: e, sx: r, ...l } = n, c = W(() => {
|
|
2521
2521
|
const p = [];
|
|
2522
|
-
for (let i = 0; i < a.length; i++) p.push(o(
|
|
2522
|
+
for (let i = 0; i < a.length; i++) p.push(o(Oc, { label: a[i].label }, a[i].label));
|
|
2523
2523
|
return p;
|
|
2524
2524
|
}, [a]);
|
|
2525
2525
|
return o(Ta, { value: t, onChange: (p, i) => {
|
|
2526
2526
|
e?.(i);
|
|
2527
2527
|
}, variant: "scrollable", scrollButtons: !1, sx: { paddingLeft: (p) => p.spacing(1.5), paddingRight: (p) => p.spacing(1.5), paddingTop: (p) => p.spacing(0), paddingBottom: (p) => p.spacing(0), minHeight: "26px", alignItems: "center", "& .MuiTabs-indicator": { display: "flex", justifyContent: "center", backgroundColor: "transparent" }, "& .MuiTabs-indicatorSpan": { width: "90%", borderRadius: "4px", minWidth: "4px", backgroundColor: (p) => p.palette.primary.main }, "& .MuiTab-root": { marginRight: "0px" }, ...r }, slotProps: { indicator: { children: o("span", { className: "MuiTabs-indicatorSpan" }) } }, ...l, children: c });
|
|
2528
|
-
}),
|
|
2528
|
+
}), Ac = q((n) => {
|
|
2529
2529
|
const { toolbars: a, value: t, onToolbarChange: e, selectProps: r, ...l } = n, c = U((i) => {
|
|
2530
2530
|
e?.(i.target.value);
|
|
2531
2531
|
}, [e]), p = W(() => {
|
|
@@ -2538,7 +2538,7 @@ const Ci = (n) => o(Ti, { ...n }), Nc = q((n) => {
|
|
|
2538
2538
|
}
|
|
2539
2539
|
return i;
|
|
2540
2540
|
}, [a, t]);
|
|
2541
|
-
return o(Xn, { sx: { minWidth: "125px", maxWidth: "125px", "& .MuiInputBase-root": { paddingLeft: "0px", paddingRight: "0px" }, "& .MuiSelect-select": { paddingTop: (i) => i.spacing(0.5), paddingBottom: (i) => i.spacing(0.5), paddingLeft: (i) => i.spacing(2), color: (i) => i.palette.primary.main }, "& .MuiSelect-icon": { fill: (i) => i.palette.text.icon ?? i.palette.action.active, "&:hover:not(.Mui-disabled)": { color: (i) => i.palette.text.icon ?? i.palette.action.active } }, ...r }, size: "small", children: o(
|
|
2541
|
+
return o(Xn, { sx: { minWidth: "125px", maxWidth: "125px", "& .MuiInputBase-root": { paddingLeft: "0px", paddingRight: "0px" }, "& .MuiSelect-select": { paddingTop: (i) => i.spacing(0.5), paddingBottom: (i) => i.spacing(0.5), paddingLeft: (i) => i.spacing(2), color: (i) => i.palette.primary.main }, "& .MuiSelect-icon": { fill: (i) => i.palette.text.icon ?? i.palette.action.active, "&:hover:not(.Mui-disabled)": { color: (i) => i.palette.text.icon ?? i.palette.action.active } }, ...r }, size: "small", children: o(Jl, { value: t, onChange: c, variant: "outlined", sx: { backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})` }, ...l, children: p }) });
|
|
2542
2542
|
}), Ti = q(X((n, a) => {
|
|
2543
2543
|
const { commands: t, selectWrapper: e, selectProps: r = {}, renderCompact: l = !1, paletteWrapper: c, toolbarsProps: p, paletteProps: i = {}, workbook: s, sx: d, ...x } = n, g = W(() => {
|
|
2544
2544
|
const S = [], { ref: C, ...D } = p?.Home || {};
|
|
@@ -2551,10 +2551,10 @@ const Ci = (n) => o(Ti, { ...n }), Nc = q((n) => {
|
|
|
2551
2551
|
const S = [];
|
|
2552
2552
|
for (let C = 0; C < g.length; C++) S.push(re.cloneElement(g[C].component, { ...g[C].component.props, key: g[C].key ?? g[C].label }));
|
|
2553
2553
|
return S;
|
|
2554
|
-
}, [g]), [u,
|
|
2555
|
-
|
|
2556
|
-
},
|
|
2557
|
-
return H(B, { ref: a, className: "toolbarWrappers", sx: { display: "flex", flexDirection: "column", paddingTop: (S) => S.spacing(0.5), "*": { userSelect: "none" }, ...d }, ...x, children: [e ? e(
|
|
2554
|
+
}, [g]), [u, b] = _(0), y = (S) => {
|
|
2555
|
+
b(S);
|
|
2556
|
+
}, f = W(() => o(l ? Ac : Bc, { toolbars: g, value: u, onToolbarChange: y, sx: r }), [g, u, r, l]), { sx: h, ...w } = i, v = o(no, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, borderRadius: "8px", backgroundImage: `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})`, marginLeft: (S) => S.spacing(1), marginRight: (S) => S.spacing(1), marginTop: (S) => S.spacing(0.5), marginBottom: (S) => S.spacing(0.5), ...h }, ...w, children: m[u] });
|
|
2557
|
+
return H(B, { ref: a, className: "toolbarWrappers", sx: { display: "flex", flexDirection: "column", paddingTop: (S) => S.spacing(0.5), "*": { userSelect: "none" }, ...d }, ...x, children: [e ? e(f) : f, c ? c(v) : v] });
|
|
2558
2558
|
}));
|
|
2559
2559
|
var Qr, Jr;
|
|
2560
2560
|
Ti.displayName = "WorkbookToolbars", (function() {
|
|
@@ -2564,59 +2564,59 @@ Ti.displayName = "WorkbookToolbars", (function() {
|
|
|
2564
2564
|
return p.Date.now();
|
|
2565
2565
|
};
|
|
2566
2566
|
function g(u) {
|
|
2567
|
-
var
|
|
2568
|
-
return !!u && (
|
|
2567
|
+
var b = typeof u;
|
|
2568
|
+
return !!u && (b == "object" || b == "function");
|
|
2569
2569
|
}
|
|
2570
2570
|
function m(u) {
|
|
2571
2571
|
if (typeof u == "number") return u;
|
|
2572
|
-
if ((function(
|
|
2573
|
-
return typeof
|
|
2572
|
+
if ((function(f) {
|
|
2573
|
+
return typeof f == "symbol" || /* @__PURE__ */ (function(h) {
|
|
2574
2574
|
return !!h && typeof h == "object";
|
|
2575
|
-
})(
|
|
2575
|
+
})(f) && i.call(f) == "[object Symbol]";
|
|
2576
2576
|
})(u)) return NaN;
|
|
2577
2577
|
if (g(u)) {
|
|
2578
|
-
var
|
|
2579
|
-
u = g(
|
|
2578
|
+
var b = typeof u.valueOf == "function" ? u.valueOf() : u;
|
|
2579
|
+
u = g(b) ? b + "" : b;
|
|
2580
2580
|
}
|
|
2581
2581
|
if (typeof u != "string") return u === 0 ? u : +u;
|
|
2582
2582
|
u = u.replace(n, "");
|
|
2583
2583
|
var y = t.test(u);
|
|
2584
2584
|
return y || e.test(u) ? r(u.slice(2), y ? 2 : 8) : a.test(u) ? NaN : +u;
|
|
2585
2585
|
}
|
|
2586
|
-
Qr = function(u,
|
|
2587
|
-
var
|
|
2586
|
+
Qr = function(u, b, y) {
|
|
2587
|
+
var f, h, w, v, S, C, D = 0, T = !1, P = !1, R = !0;
|
|
2588
2588
|
if (typeof u != "function") throw new TypeError("Expected a function");
|
|
2589
2589
|
function k(L) {
|
|
2590
|
-
var F =
|
|
2591
|
-
return
|
|
2590
|
+
var F = f, z = h;
|
|
2591
|
+
return f = h = void 0, D = L, v = u.apply(z, F);
|
|
2592
2592
|
}
|
|
2593
2593
|
function E(L) {
|
|
2594
2594
|
var F = L - C;
|
|
2595
|
-
return C === void 0 || F >=
|
|
2595
|
+
return C === void 0 || F >= b || F < 0 || P && L - D >= w;
|
|
2596
2596
|
}
|
|
2597
2597
|
function M() {
|
|
2598
2598
|
var L = x();
|
|
2599
2599
|
if (E(L)) return I(L);
|
|
2600
2600
|
S = setTimeout(M, (function(F) {
|
|
2601
|
-
var z =
|
|
2601
|
+
var z = b - (F - C);
|
|
2602
2602
|
return P ? d(z, w - (F - D)) : z;
|
|
2603
2603
|
})(L));
|
|
2604
2604
|
}
|
|
2605
2605
|
function I(L) {
|
|
2606
|
-
return S = void 0, R &&
|
|
2606
|
+
return S = void 0, R && f ? k(L) : (f = h = void 0, v);
|
|
2607
2607
|
}
|
|
2608
2608
|
function N() {
|
|
2609
2609
|
var L = x(), F = E(L);
|
|
2610
|
-
if (
|
|
2610
|
+
if (f = arguments, h = this, C = L, F) {
|
|
2611
2611
|
if (S === void 0) return (function(z) {
|
|
2612
|
-
return D = z, S = setTimeout(M,
|
|
2612
|
+
return D = z, S = setTimeout(M, b), T ? k(z) : v;
|
|
2613
2613
|
})(C);
|
|
2614
|
-
if (P) return S = setTimeout(M,
|
|
2614
|
+
if (P) return S = setTimeout(M, b), k(C);
|
|
2615
2615
|
}
|
|
2616
|
-
return S === void 0 && (S = setTimeout(M,
|
|
2616
|
+
return S === void 0 && (S = setTimeout(M, b)), v;
|
|
2617
2617
|
}
|
|
2618
|
-
return
|
|
2619
|
-
S !== void 0 && clearTimeout(S), D = 0,
|
|
2618
|
+
return b = m(b) || 0, g(y) && (T = !!y.leading, w = (P = "maxWait" in y) ? s(m(y.maxWait) || 0, b) : w, R = "trailing" in y ? !!y.trailing : R), N.cancel = function() {
|
|
2619
|
+
S !== void 0 && clearTimeout(S), D = 0, f = C = h = S = void 0;
|
|
2620
2620
|
}, N.flush = function() {
|
|
2621
2621
|
return S === void 0 ? v : I(x());
|
|
2622
2622
|
}, N;
|
|
@@ -2653,25 +2653,25 @@ ta || (ta = 1, oa.exports = (function() {
|
|
|
2653
2653
|
};
|
|
2654
2654
|
return En.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : p, En;
|
|
2655
2655
|
})()), oa.exports;
|
|
2656
|
-
var na, ra, So = { exports: {} }, Zt = { exports: {} },
|
|
2656
|
+
var na, ra, So = { exports: {} }, Zt = { exports: {} }, Ic = Zt.exports;
|
|
2657
2657
|
(function() {
|
|
2658
2658
|
if (ra) return So.exports;
|
|
2659
2659
|
ra = 1;
|
|
2660
2660
|
for (var n = (na || (na = 1, function() {
|
|
2661
|
-
var x, g, m, u,
|
|
2661
|
+
var x, g, m, u, b, y;
|
|
2662
2662
|
typeof performance < "u" && performance !== null && performance.now ? Zt.exports = function() {
|
|
2663
2663
|
return performance.now();
|
|
2664
2664
|
} : typeof process < "u" && process !== null && process.hrtime ? (Zt.exports = function() {
|
|
2665
|
-
return (x() -
|
|
2665
|
+
return (x() - b) / 1e6;
|
|
2666
2666
|
}, g = process.hrtime, u = (x = function() {
|
|
2667
|
-
var
|
|
2668
|
-
return 1e9 * (
|
|
2669
|
-
})(), y = 1e9 * process.uptime(),
|
|
2667
|
+
var f;
|
|
2668
|
+
return 1e9 * (f = g())[0] + f[1];
|
|
2669
|
+
})(), y = 1e9 * process.uptime(), b = u - y) : Date.now ? (Zt.exports = function() {
|
|
2670
2670
|
return Date.now() - m;
|
|
2671
2671
|
}, m = Date.now()) : (Zt.exports = function() {
|
|
2672
2672
|
return (/* @__PURE__ */ new Date()).getTime() - m;
|
|
2673
2673
|
}, m = (/* @__PURE__ */ new Date()).getTime());
|
|
2674
|
-
}.call(
|
|
2674
|
+
}.call(Ic)), Zt.exports), a = typeof window > "u" ? Do : window, t = ["moz", "webkit"], e = "AnimationFrame", r = a["request" + e], l = a["cancel" + e] || a["cancelRequest" + e], c = 0; !r && c < t.length; c++) r = a[t[c] + "Request" + e], l = a[t[c] + "Cancel" + e] || a[t[c] + "CancelRequest" + e];
|
|
2675
2675
|
if (!r || !l) {
|
|
2676
2676
|
var p = 0, i = 0, s = [], d = 1e3 / 60;
|
|
2677
2677
|
r = function(x) {
|
|
@@ -2680,8 +2680,8 @@ var na, ra, So = { exports: {} }, Zt = { exports: {} }, Bc = Zt.exports;
|
|
|
2680
2680
|
p = m + g, setTimeout(function() {
|
|
2681
2681
|
var u = s.slice(0);
|
|
2682
2682
|
s.length = 0;
|
|
2683
|
-
for (var
|
|
2684
|
-
u[
|
|
2683
|
+
for (var b = 0; b < u.length; b++) if (!u[b].cancelled) try {
|
|
2684
|
+
u[b].callback(p);
|
|
2685
2685
|
} catch (y) {
|
|
2686
2686
|
setTimeout(function() {
|
|
2687
2687
|
throw y;
|
|
@@ -2734,21 +2734,21 @@ var it = { DOM_UNAVAILABLE_ERROR: "DOM is unavailable server-side. Please use th
|
|
|
2734
2734
|
const t = this.getEventName(n);
|
|
2735
2735
|
t && document.removeEventListener(t, a);
|
|
2736
2736
|
} };
|
|
2737
|
-
const
|
|
2738
|
-
const { workbook: a, workbookElement: t, target: e, commands: r, darkMode: l, onNewWorkbook: c =
|
|
2737
|
+
const Lc = (n) => {
|
|
2738
|
+
const { workbook: a, workbookElement: t, target: e, commands: r, darkMode: l, onNewWorkbook: c = zc } = n, p = sn(), [i, s] = _(a?.getSelectedSheet()), [d, x] = _(a?.getSheets().getItems()), g = Y(c, [c]), m = wa(), u = W(() => [new He("activateTask", e, { label: "Activate Task", description: "Activate Task Pane.", shortcut: { key: "F6" } }), new He("workbookStatistics", e, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [fe.Ctrl, fe.Shift] } }), new He("workbookStatistics", e, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [fe.Ctrl, fe.Shift] } }), new He("showFormat", e, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [fe.Ctrl, fe.Shift] } }), new be("newCellStyle", e, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later.", icon: "NewPresetStyles" }), new be("deleteCellStyle", e, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new be("modifyCellStyle", e, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new He("find", e, { label: "Find", description: "Open the Find window.", icon: "Find", shortcut: [{ key: "F", modifiers: [fe.Ctrl] }, { key: "F5", modifiers: [fe.Shift] }] }), new He("findReplace", e, { label: "Find & Replace", description: "Open the Find & Replace window.", icon: "FindReplace", shortcut: [{ key: "H", modifiers: [fe.Ctrl] }, { key: "H", modifiers: [fe.Ctrl, fe.Alt] }] }), new He("goto", e, { label: "Go To", description: "Open the 'Go To' window.", icon: "Goto", shortcut: [{ key: "G", modifiers: [fe.Ctrl] }] }), new He("workbookViewToggleExpandFormulaBar", e, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [fe.Ctrl, fe.Shift] } }), new He("workbookViewToggleShowFormulaBar", e, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new He("workbookViewToggleShowTabs", e, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new He("workbookViewToggleShowStatusBar", e, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new He("workbookViewToggleShowHorizontalScrollBar", e, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new He("workbookViewToggleShowVerticalScrollBar", e, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new be("hideSheet", e, { label: "Hide Sheet", scopedLabels: { sheet: "Hide" }, description: "Hide the sheet from appearing in the tabs. This keeps the data but de-clutters the tabs.", icon: "VisibilityOff" }), new be("deleteSheet", e, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new be("addSheet", e, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [fe.Shift] }, { key: "F1", modifiers: [fe.Alt, fe.Shift] }] }), new be("duplicateSheet", e, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new be("nextSheet", e, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [fe.Ctrl] }] }), new be("previousSheet", e, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [fe.Ctrl] }] }), new be("selectNextSheet", e, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [fe.Ctrl, fe.Shift] }] }), new be("selectPreviousSheet", e, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [fe.Ctrl, fe.Shift] }] }), new be("selectTheme", e, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new be("selectNamed", e, { label: (k) => k?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (k) => k?.getName() ?? "Select" }, description: "Select the item." }), new be("addNamedReference", e, { label: "Define Named Reference", scopedLabels: { namedItem: "Define Name…" }, description: "Add a new named reference. Names can be used as a substitute for cell references.", icon: "NamedRangeInsert" }), new be("editNamedReference", e, { label: "Edit Named Reference…", scopedLabels: { namedItem: "Edit…" }, description: "Add a new named reference. Names can be used as a substitute for cell references.", icon: "NamedRangeEdit" }), new be("deleteNamedReference", e, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference.", icon: "NamedRangeRemove" }), new He("activeNameBox", e, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [fe.Alt] } }), new He("createNamedReferenceFromSelection", e, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [fe.Ctrl, fe.Shift] } }), new He("activeNameManager", e, { label: "Activate Name Manager", description: `Create, edit, delete, and find all the names used in the workbook.
|
|
2739
2739
|
|
|
2740
|
-
Names can be used as a substitute for cell references.`, shortcut: { key: "F3", modifiers: [fe.Ctrl] } }), new be("fullScreenToggle", e, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" }, icon: "FullScreen" }), new be("showScriptEditor", e, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", icon: "ScriptRun", shortcut: [{ key: "F11", modifiers: [fe.Alt] }] }), new be("executeScript", e, { label: "Run Script", description: "Run the selected or last executed script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new be("executeSelectedScript", e, { label: "Run Script", description: "Run the selected script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new be("saveScripts", e, { label: "Save Script", description: "Save the current scripts.", icon: "ScriptSave" }), new be("maximumWorkbookToggle", e, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [fe.Ctrl] } }), new be("spellCheck", e, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new be("calculateAll", e, { label: "Calculate Now", description: "Recalculate all formulas.", icon: "Calculate", shortcut: { key: "F9" } }), new He("closeWorkbook", e, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [fe.Ctrl] } }), new He("newWorkbook", e, { label: "New Workbook", description: "Create a new workbook in another tab.", icon: "FileNew" })], []),
|
|
2740
|
+
Names can be used as a substitute for cell references.`, shortcut: { key: "F3", modifiers: [fe.Ctrl] } }), new be("fullScreenToggle", e, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" }, icon: "FullScreen" }), new be("showScriptEditor", e, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", icon: "ScriptRun", shortcut: [{ key: "F11", modifiers: [fe.Alt] }] }), new be("executeScript", e, { label: "Run Script", description: "Run the selected or last executed script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new be("executeSelectedScript", e, { label: "Run Script", description: "Run the selected script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new be("saveScripts", e, { label: "Save Script", description: "Save the current scripts.", icon: "ScriptSave" }), new be("maximumWorkbookToggle", e, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [fe.Ctrl] } }), new be("spellCheck", e, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new be("calculateAll", e, { label: "Calculate Now", description: "Recalculate all formulas.", icon: "Calculate", shortcut: { key: "F9" } }), new He("closeWorkbook", e, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [fe.Ctrl] } }), new He("newWorkbook", e, { label: "New Workbook", description: "Create a new workbook in another tab.", icon: "FileNew" })], []), b = W(() => {
|
|
2741
2741
|
let k = null;
|
|
2742
2742
|
return k = r ? r.createChildGroup(e, "workbook", !1) : new Jn(e, "workbook"), k.addCommands(u, !0), k;
|
|
2743
|
-
}, [r, u]), y = ln(),
|
|
2743
|
+
}, [r, u]), y = ln(), f = re.useRef(null), h = Y(() => {
|
|
2744
2744
|
let k, E = null;
|
|
2745
|
-
const M =
|
|
2745
|
+
const M = b.getCommand("executeScript");
|
|
2746
2746
|
if (M.update({ disabled: !1, context: { getScripts: () => a.getScripts() } }), !M) return;
|
|
2747
|
-
const I =
|
|
2747
|
+
const I = b.getCommand("showScriptEditor");
|
|
2748
2748
|
I.updateCallback(function(F = !0) {
|
|
2749
2749
|
E ? E.close() : m.activateTaskPane("scriptEditor", {});
|
|
2750
2750
|
});
|
|
2751
|
-
const N =
|
|
2751
|
+
const N = b.getCommand("executeSelectedScript");
|
|
2752
2752
|
if (!N) return;
|
|
2753
2753
|
const L = { saveSource: async (F) => {
|
|
2754
2754
|
let z = null, ae = null;
|
|
@@ -2762,7 +2762,7 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
2762
2762
|
}, addContainerListener: (F) => (w.current = F, () => {
|
|
2763
2763
|
w.current = null;
|
|
2764
2764
|
}), setSelectedFunction: (F) => {
|
|
2765
|
-
k = F ??
|
|
2765
|
+
k = F ?? f.current ?? null, Promise.resolve(k).then((z) => {
|
|
2766
2766
|
N.update({ disabled: z === null });
|
|
2767
2767
|
});
|
|
2768
2768
|
}, quickInsertFunction: (F) => {
|
|
@@ -2778,7 +2778,7 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
2778
2778
|
return null;
|
|
2779
2779
|
}, getScripts: () => a.getScripts() };
|
|
2780
2780
|
N.update({ context: L });
|
|
2781
|
-
}, [
|
|
2781
|
+
}, [b, a, t, p]), w = re.useRef(null);
|
|
2782
2782
|
We(a, { onBeforeSave: async () => {
|
|
2783
2783
|
await w.current?.onBeforeSave();
|
|
2784
2784
|
}, onProtectionChange: () => {
|
|
@@ -2791,7 +2791,7 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
2791
2791
|
s(k?.getSelectedSheet());
|
|
2792
2792
|
}, onProtectionChange: (k) => {
|
|
2793
2793
|
const E = { disabled: !k.getProtection().isStructureAllowed() };
|
|
2794
|
-
|
|
2794
|
+
b.getCommand("hideSheet").update(E), b.getCommand("deleteSheet").update(E), b.getCommand("addSheet").update(E), b.getCommand("duplicateSheet").update(E), b.getCommand("selectTheme").update(E), b.getCommand("addNamedReference").update(E), b.getCommand("editNamedReference").update(E), b.getCommand("deleteNamedReference").update(E);
|
|
2795
2795
|
}, onScriptsChange: (k) => {
|
|
2796
2796
|
h();
|
|
2797
2797
|
} });
|
|
@@ -2810,7 +2810,7 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
2810
2810
|
}), [V, A]), { isFullscreenAvailable: L, fullscreenElement: z, isFullscreenEnabled: Q, enableFullscreen: j, disableFullscreen: K, toggleFullscreen: ee };
|
|
2811
2811
|
})({ target: { current: t ?? document.body } }), D = Gn();
|
|
2812
2812
|
de(() => {
|
|
2813
|
-
|
|
2813
|
+
b.getCommand("selectTheme").update({ state: () => a.getTheme(), context: () => ({ theme: a.getTheme(), themes: D, darkMode: l }) });
|
|
2814
2814
|
}, [a?.getTheme(), l]);
|
|
2815
2815
|
const T = Y(async function(k, E) {
|
|
2816
2816
|
let M = null;
|
|
@@ -2820,13 +2820,13 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
2820
2820
|
(await I.searchFunctions({ name: N })).length > 0 && (M = N);
|
|
2821
2821
|
}
|
|
2822
2822
|
if (M) try {
|
|
2823
|
-
await I.executeMacro(M),
|
|
2823
|
+
await I.executeMacro(M), f.current = Promise.resolve({ source: null, name: M });
|
|
2824
2824
|
} catch (N) {
|
|
2825
2825
|
return void p.showError(N);
|
|
2826
2826
|
}
|
|
2827
2827
|
}, [a, p]);
|
|
2828
2828
|
de(() => {
|
|
2829
|
-
|
|
2829
|
+
b.getCommand("newCellStyle").updateCallback((k) => {
|
|
2830
2830
|
p.showInputOptions({ initialValue: (() => {
|
|
2831
2831
|
let E = 0;
|
|
2832
2832
|
for (; ; ) {
|
|
@@ -2837,7 +2837,7 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
2837
2837
|
} catch {
|
|
2838
2838
|
}
|
|
2839
2839
|
}
|
|
2840
|
-
})(), title:
|
|
2840
|
+
})(), title: b.getCommand("newCellStyle")?.label("cellStyle"), description: "Enter a name for the new cell style.", inputLabel: "Style Name", inputProps: { style: { minWidth: "300px" } }, options: ["Ok", "Cancel"], defaultOption: "Ok", onValidateInputOption: async (E, M) => {
|
|
2841
2841
|
let I = null;
|
|
2842
2842
|
try {
|
|
2843
2843
|
a.getStyles().validateStyleName(E, !1);
|
|
@@ -2852,36 +2852,36 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
2852
2852
|
const N = a.getStyles().setNamed({ name: E, style: I.getCell().getStyle() });
|
|
2853
2853
|
I.getStyle().update({ named: N.getName() });
|
|
2854
2854
|
});
|
|
2855
|
-
}),
|
|
2855
|
+
}), b.getCommand("deleteCellStyle").updateCallback((k) => {
|
|
2856
2856
|
k.delete();
|
|
2857
|
-
}),
|
|
2857
|
+
}), b.getCommand("modifyCellStyle").updateCallback(({ named: k }) => {
|
|
2858
2858
|
const E = a.getSelectedSheet().getSelectedRange();
|
|
2859
2859
|
a.getStyles().setNamed({ name: k.getName(), style: E.getCell().getStyle() });
|
|
2860
|
-
}),
|
|
2860
|
+
}), b.getCommand("hideSheet").updateCallback((k) => {
|
|
2861
2861
|
a.getSheetAt(k).setVisibility(Ft.Visibility.Hidden);
|
|
2862
|
-
}),
|
|
2862
|
+
}), b.getCommand("deleteSheet").updateCallback(async (k) => {
|
|
2863
2863
|
a.getSheetAt(k ?? a.getSelectedSheetIndex())?.delete();
|
|
2864
|
-
}),
|
|
2864
|
+
}), b.getCommand("addSheet").updateCallback((k) => {
|
|
2865
2865
|
a.getSheets().add({ index: k, autoSelect: !0 });
|
|
2866
|
-
}),
|
|
2866
|
+
}), b.getCommand("duplicateSheet").updateCallback(async (k) => {
|
|
2867
2867
|
(await a.getSheetAt(k ?? a.getSelectedSheetIndex())?.duplicate())?.select();
|
|
2868
|
-
}),
|
|
2868
|
+
}), b.getCommand("nextSheet").updateCallback((k) => {
|
|
2869
2869
|
a.getNextSheet(k ?? a.getSelectedSheetIndex()).select();
|
|
2870
|
-
}),
|
|
2870
|
+
}), b.getCommand("previousSheet").updateCallback((k) => {
|
|
2871
2871
|
a.getPreviousSheet(k ?? a.getSelectedSheetIndex()).select();
|
|
2872
|
-
}),
|
|
2872
|
+
}), b.getCommand("selectNextSheet").updateCallback((k) => {
|
|
2873
2873
|
a.getNextSheet(k ?? a.getSelectedSheetIndex()).select();
|
|
2874
|
-
}),
|
|
2874
|
+
}), b.getCommand("selectPreviousSheet").updateCallback((k) => {
|
|
2875
2875
|
a.getPreviousSheet(k ?? a.getSelectedSheetIndex()).select();
|
|
2876
|
-
}),
|
|
2876
|
+
}), b.getCommand("selectTheme").updateCallback((k) => {
|
|
2877
2877
|
a.setTheme(k);
|
|
2878
|
-
}),
|
|
2878
|
+
}), b.getCommand("calculateAll").updateCallback(() => {
|
|
2879
2879
|
a.getSelectedSheet().getEntireRange().calculate(!0);
|
|
2880
|
-
}),
|
|
2880
|
+
}), b.getCommand("closeWorkbook").updateCallback(async () => {
|
|
2881
2881
|
await p.showOptions({ title: "Confirm", description: "This will close the current workbook tab. Do you want to continue?", options: ["Close", "Cancel"], defaultOption: "Close" }) === "Close" && window.close();
|
|
2882
|
-
}),
|
|
2882
|
+
}), b.getCommand("newWorkbook").updateCallback(() => {
|
|
2883
2883
|
g?.();
|
|
2884
|
-
}),
|
|
2884
|
+
}), b.getCommand("executeScript").updateCallback(T), b.getCommand("executeSelectedScript").updateCallback(T);
|
|
2885
2885
|
}, [a, p]);
|
|
2886
2886
|
const P = Y(async (k) => {
|
|
2887
2887
|
let E = 0, M = null, I = "Find & Replace";
|
|
@@ -2923,24 +2923,24 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
2923
2923
|
return de(() => {
|
|
2924
2924
|
const k = (E = !1) => {
|
|
2925
2925
|
const M = a.getSelectedCell(), I = { onFindOrReplace: P, onKeyDown: (N) => {
|
|
2926
|
-
|
|
2926
|
+
b.findCommandByEvent(N) !== b.getCommand("find") && b.findCommandByEvent(N) !== b.getCommand("findReplace") || N.preventDefault();
|
|
2927
2927
|
}, findOptions: { text: "" }, findText: M.toTextUnformatted(!0) };
|
|
2928
2928
|
I.replace = E, p.showWindow?.("find", I, { disableAutoDestroy: !0 });
|
|
2929
2929
|
};
|
|
2930
|
-
|
|
2930
|
+
b.getCommand("find")?.update({ disabled: !p.showWindow }).updateCallback(() => {
|
|
2931
2931
|
k();
|
|
2932
|
-
}),
|
|
2932
|
+
}), b.getCommand("findReplace")?.update({ disabled: !p.showWindow }).updateCallback(() => {
|
|
2933
2933
|
k(!0);
|
|
2934
|
-
}),
|
|
2934
|
+
}), b.getCommand("activateTask")?.update({ disabled: !p }).updateCallback(() => {
|
|
2935
2935
|
const E = { onInputOption: async (M) => {
|
|
2936
2936
|
try {
|
|
2937
2937
|
m.activateTaskPane(M);
|
|
2938
2938
|
} catch (I) {
|
|
2939
2939
|
p.showError(I.message);
|
|
2940
2940
|
}
|
|
2941
|
-
}, title:
|
|
2941
|
+
}, title: b.getCommand("activateTask")?.label(), inputLabel: "Task Name", options: ["Activate"] };
|
|
2942
2942
|
p.showInputOptions(E);
|
|
2943
|
-
}),
|
|
2943
|
+
}), b.getCommand("goto")?.update({ disabled: !p }).updateCallback(() => {
|
|
2944
2944
|
const E = { onInputOption: async (M) => {
|
|
2945
2945
|
try {
|
|
2946
2946
|
await a.getRanges(M).select();
|
|
@@ -2948,48 +2948,48 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
2948
2948
|
p.showMessage(I.message, { type: wt.Error });
|
|
2949
2949
|
}
|
|
2950
2950
|
}, onKeyDown: (M) => {
|
|
2951
|
-
|
|
2952
|
-
}, title:
|
|
2951
|
+
b.findCommandByEvent(M) === b.getCommand("goto") && M.preventDefault();
|
|
2952
|
+
}, title: b.getCommand("goto")?.label(), inputLabel: "Location", options: ["Go To"] };
|
|
2953
2953
|
p.showInputOptions(E);
|
|
2954
|
-
}),
|
|
2954
|
+
}), b.getCommand("selectNamed")?.update({ disabled: !p }).updateCallback(async (E) => {
|
|
2955
2955
|
if (E) try {
|
|
2956
2956
|
await E.select();
|
|
2957
2957
|
} catch (M) {
|
|
2958
2958
|
p.showError(M);
|
|
2959
2959
|
}
|
|
2960
|
-
}),
|
|
2960
|
+
}), b.getCommand("addNamedReference")?.updateCallback(async function(E) {
|
|
2961
2961
|
R(null);
|
|
2962
|
-
}),
|
|
2962
|
+
}), b.getCommand("editNamedReference")?.updateCallback(async function(E) {
|
|
2963
2963
|
R(E);
|
|
2964
|
-
}),
|
|
2964
|
+
}), b.getCommand("deleteNamedReference")?.updateCallback(async function(E) {
|
|
2965
2965
|
E?.delete?.();
|
|
2966
|
-
}),
|
|
2966
|
+
}), b.getCommand("activeNameBox")?.updateCallback(async function() {
|
|
2967
2967
|
t?.getFormulaBarElement()?.getNamedCollectionEditorElement()?.focus();
|
|
2968
2968
|
});
|
|
2969
2969
|
}, [t, a, p]), We(a?.getView(), { onViewChange: (k) => {
|
|
2970
|
-
|
|
2970
|
+
b.getCommand("workbookViewToggleShowFormulaBar").update({ state: k.isShowFormulaBar() }).updateCallback(() => {
|
|
2971
2971
|
k.setShowFormulaBar(!k.isShowFormulaBar());
|
|
2972
|
-
}),
|
|
2972
|
+
}), b.getCommand("workbookViewToggleShowTabs").update({ state: k.isShowTabs() }).updateCallback(() => {
|
|
2973
2973
|
k.setShowTabs(!k.isShowTabs());
|
|
2974
|
-
}),
|
|
2974
|
+
}), b.getCommand("workbookViewToggleShowStatusBar").update({ state: k.isShowStatusBar() }).updateCallback(() => {
|
|
2975
2975
|
k.setShowStatusBar(!k.isShowStatusBar());
|
|
2976
|
-
}),
|
|
2976
|
+
}), b.getCommand("workbookViewToggleShowHorizontalScrollBar").update({ state: k.isShowHorizontalScrollbar() }).updateCallback(() => {
|
|
2977
2977
|
k.setShowHorizontalScrollbar(!k.isShowHorizontalScrollbar());
|
|
2978
|
-
}),
|
|
2978
|
+
}), b.getCommand("workbookViewToggleShowVerticalScrollBar").update({ state: k.isShowVerticalScrollbar() }).updateCallback(() => {
|
|
2979
2979
|
k.setShowVerticalScrollbar(!k.isShowVerticalScrollbar());
|
|
2980
2980
|
});
|
|
2981
2981
|
} }), de(() => {
|
|
2982
|
-
|
|
2982
|
+
b.getCommand("fullScreenToggle").update({ state: S, disabled: !v, icon: S ? "FullScreenOff" : "FullScreen" }).updateCallback(() => {
|
|
2983
2983
|
C();
|
|
2984
2984
|
});
|
|
2985
2985
|
}, [S, v]), de(() => {
|
|
2986
2986
|
const k = a.getProtection().isStructureAllowed();
|
|
2987
|
-
|
|
2988
|
-
}, [d, i]),
|
|
2989
|
-
},
|
|
2987
|
+
b.getCommand("hideSheet").update({ disabled: d.length <= 1 || !k }), b.getCommand("deleteSheet").update({ disabled: d.length <= 1 || !k });
|
|
2988
|
+
}, [d, i]), b;
|
|
2989
|
+
}, zc = () => {
|
|
2990
2990
|
window.open(window.origin.toString(), "sheetxl-" + Ke.uuidV4(), "popup=true");
|
|
2991
|
-
},
|
|
2992
|
-
const { workbook: t, commands: e, onBeforeUserChange: r, onUserChange: l, disabled: c = !1, readOnly: p = !1, contextMenuProps: i, renderContextMenu: s =
|
|
2991
|
+
}, Hc = "_sheetxl-theme_4opcr_2", Wc = "_sheetxl-workbook_g5t6x_5", jc = (n) => o(ii, { ...n }), $c = (n) => o(li, { ...n }), Vc = (n) => o(ai, { ...n }), Ei = q(X((n, a) => {
|
|
2992
|
+
const { workbook: t, commands: e, onBeforeUserChange: r, onUserChange: l, disabled: c = !1, readOnly: p = !1, contextMenuProps: i, renderContextMenu: s = jc, sheetsAllProps: d, renderSheetsAll: x = $c, sheetTabProps: g, renderSheetTab: m, background: u = "transparent", className: b, sx: y, borderWidth: f, borderColor: h, gridTheme: w, gridStyle: v, ...S } = n, [C, D] = _(t?.getSelectedSheetIndex()), [T, P] = _(t?.getSheets().getItems()), [R, k] = _(t?.getProtection());
|
|
2993
2993
|
We(t, { onViewChange(ne) {
|
|
2994
2994
|
D(ne?.getSelectedSheetIndex());
|
|
2995
2995
|
}, onSheetsChange: (ne) => {
|
|
@@ -3029,13 +3029,13 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
3029
3029
|
G = t?.getSheetAt(ne.index);
|
|
3030
3030
|
} catch {
|
|
3031
3031
|
}
|
|
3032
|
-
return G ? (m ??
|
|
3032
|
+
return G ? (m ?? Vc)({ sheet: G, gridTheme: w, onContextMenu: (se) => {
|
|
3033
3033
|
I(ne.index), Fe(se, ne.index);
|
|
3034
3034
|
}, ...ne, ...g }) : null;
|
|
3035
3035
|
}, [m, g, t, w]), je = W(() => E ? null : o(vt, { disableInteractive: !0, title: "New sheet", children: o(st, { disabled: c, component: "div", sx: { padding: "0", "&:hover:not([disabled])": { color: (ne) => ne.palette.primary.main }, color: (ne) => ne.palette.text.icon ?? ne.palette.action.active, "& svg": { width: "18px", height: "18px" } }, "aria-label": "addTab", size: "small", onMouseDown: (ne) => {
|
|
3036
3036
|
ne.button === 0 && ne.preventDefault();
|
|
3037
3037
|
}, onClick: () => F(), children: o(he, { iconKey: "AddCircle" }) }) }), [c, E, F]);
|
|
3038
|
-
return H(B, { ref: a, className: Ce(
|
|
3038
|
+
return H(B, { ref: a, className: Ce(b), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...y }, ...S, children: [o(Ll, { ref: V, selectedTabIndex: C, tabNames: M, onSelectedTabIndexChange: I, onTabNameChange: N, onTabMove: L, background: u, borderColor: h, borderWidth: f, activeColor: null, disabled: c, disableDrag: E, createScrollStartButton: ds, createScrollEndButton: cs, createScrollEdgeButton: ss, createTabButton: Ve, createTabDivider: (ne) => {
|
|
3039
3039
|
const { key: G, ...se } = ne;
|
|
3040
3040
|
return o(J, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (Me) => ye(Me.palette.divider, 0.25) }, ...se }, G);
|
|
3041
3041
|
}, editLabelProps: { readOnly: E, maxLength: 31, styleHover: { fontWeight: "700" }, onKeyPress: (ne) => {
|
|
@@ -3046,11 +3046,11 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
3046
3046
|
ne.button === 0 && ne.preventDefault();
|
|
3047
3047
|
}, onClick: () => {
|
|
3048
3048
|
Q ? K.close(0) : K.open(0);
|
|
3049
|
-
}, icon: o(he, { iconKey: "Menu" }) }) }) }), o("div", { style: { borderTop: `solid ${h} ${
|
|
3049
|
+
}, icon: o(he, { iconKey: "Menu" }) }) }) }), o("div", { style: { borderTop: `solid ${h} ${f}px`, minWidth: "4px" } }), o("div", { style: { borderTop: `solid ${h} ${f}px`, flex: "none", display: "flex", alignItems: "center" }, children: je }), o("div", { style: { borderTop: `solid ${h} ${f}px`, flex: 1, minWidth: "24px" } }), Se, ee] });
|
|
3050
3050
|
}));
|
|
3051
3051
|
Ei.displayName = "WorkbookStrip";
|
|
3052
3052
|
const Di = q(X((n, a) => {
|
|
3053
|
-
const { workbook: t, commands: e, disabled: r, sx: l, floatReference: c, className: p, ...i } = n, [s, d] = tn((E) => E + 1, 0), [x, g] = _(t.getSelectedSheet()), [m, u] = _(x.getSelectedRanges()), [
|
|
3053
|
+
const { workbook: t, commands: e, disabled: r, sx: l, floatReference: c, className: p, ...i } = n, [s, d] = tn((E) => E + 1, 0), [x, g] = _(t.getSelectedSheet()), [m, u] = _(x.getSelectedRanges()), [b, y] = _(x.getSelectedCell());
|
|
3054
3054
|
We(t, { onSheetsChange() {
|
|
3055
3055
|
g(t.getSelectedSheet());
|
|
3056
3056
|
} }), We(x.getSelection(), { onChange() {
|
|
@@ -3058,20 +3058,20 @@ const Di = q(X((n, a) => {
|
|
|
3058
3058
|
} }), Ie(e, [], { onChange: () => {
|
|
3059
3059
|
d();
|
|
3060
3060
|
} });
|
|
3061
|
-
const
|
|
3061
|
+
const f = W(() => ({}), []), h = W(() => ({ commandHook: { beforeExecute: (E, M) => c.closeAll(), onExecute() {
|
|
3062
3062
|
}, onError() {
|
|
3063
3063
|
console.log("onError");
|
|
3064
|
-
} }, disabled: r, scope: "contextMenu", parentFloat: c }), [r, c]), w = W(() => ({ ...
|
|
3064
|
+
} }, disabled: r, scope: "contextMenu", parentFloat: c }), [r, c]), w = W(() => ({ ...f, ...h, variant: ie.Menuitem }), [f, h]), v = W(() => ({ commands: e, variant: ie.Menuitem, parentFloat: c, ...h }), [e, h, c]), S = [];
|
|
3065
3065
|
let C = m.isEntireRows(), D = m.isEntireColumns();
|
|
3066
3066
|
m && (C && (S.push(o(J, { orientation: "horizontal" }, "context:" + S.length)), S.push(Ee(O, { command: e.getCommand("hideColumns"), ...w, key: "context:" + S.length })), S.push(Ee(O, { command: e.getCommand("unhideColumns"), ...w, key: "context:" + S.length }))), D && (S.push(o(J, { orientation: "horizontal" }, "context:" + S.length)), S.push(Ee(O, { command: e.getCommand("hideRows"), ...w, key: "context:" + S.length })), S.push(Ee(O, { command: e.getCommand("unhideRows"), ...w, key: "context:" + S.length }))), (C || D) && S.push(o(J, { orientation: "horizontal" }, "context:" + S.length)), C && S.push(Ee(O, { command: e.getCommand("autoFitColumns"), ...w, key: "context:" + S.length })), D && S.push(Ee(O, { command: e.getCommand("autoFitRows"), ...w, key: "context:" + S.length })));
|
|
3067
3067
|
const T = [], P = e.getCommand("formatTableStyle"), R = P?.context()?.table();
|
|
3068
3068
|
if (jt(P), !C && !D) {
|
|
3069
|
-
if (T.push(o(J, { orientation: "horizontal" }, "contextBefore:" + T.length)),
|
|
3069
|
+
if (T.push(o(J, { orientation: "horizontal" }, "contextBefore:" + T.length)), b?.getHyperlink()) T.push(Ee(lt, { ...v, popupCommandKeys: ["updateHyperlink", "deleteHyperlink"], popupScope: "hyperlink", key: "contextBefore:action" + T.length, quickCommand: "openHyperlink" }));
|
|
3070
3070
|
else {
|
|
3071
3071
|
const E = e.getCommand("updateHyperlink");
|
|
3072
3072
|
T.push(Ee(O, { command: E, ...w, key: "contextBefore:" + T.length }));
|
|
3073
3073
|
}
|
|
3074
|
-
if (
|
|
3074
|
+
if (b?.getComments()) T.push(Ee(lt, { ...v, popupCommandKeys: ["deleteComments"], key: "contextBefore:action" + T.length, quickCommand: "updateComments" }));
|
|
3075
3075
|
else {
|
|
3076
3076
|
const E = e.getCommand("updateComments");
|
|
3077
3077
|
T.push(Ee(O, { command: E, ...w, key: "contextBefore:" + T.length }));
|
|
@@ -3099,8 +3099,8 @@ const or = q(X((n, a) => {
|
|
|
3099
3099
|
return o(B, { ref: a, sx: { paddingTop: "4px", paddingBottom: "4px", ...l }, ...p, children: g });
|
|
3100
3100
|
}));
|
|
3101
3101
|
Pi.displayName = "MovableContextMenu";
|
|
3102
|
-
const
|
|
3103
|
-
const { workbook: t, createWorkbookOptions: e, onNewWorkbook: r, onElementLoad: l, autoFocus: c = !1, sx: p, style: i, className: s, onFocus: d, onBlur: x, onKeyDown: g, onRepeatCommandChange: m, commands: u, showFormulaBar:
|
|
3102
|
+
const _c = (n) => o(Pi, { ...n }), Uc = (n) => o(Di, { ...n }), Gc = (n) => o(ri, { ...n }), qc = (n, a) => o(ni, { ref: a, ...n }), Kc = (n) => o(Wt, { ...n }), Xc = (n, a) => o(zl, { ref: a, ...n }), Yc = (n) => o(Ya, { ...n }), Zc = (n) => o(Ei, { ...n }), Qc = { fireOnModelChange: !1 }, aa = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, Ri = q(X((n, a) => {
|
|
3103
|
+
const { workbook: t, createWorkbookOptions: e, onNewWorkbook: r, onElementLoad: l, autoFocus: c = !1, sx: p, style: i, className: s, onFocus: d, onBlur: x, onKeyDown: g, onRepeatCommandChange: m, commands: u, showFormulaBar: b, formulaBarProps: y, renderFormulaBar: f = qc, showTabs: h, tabsProps: w, renderTabs: v = Zc, showStatusBar: S, statusBarProps: C, renderStatusBar: D = Yc, toolbarProps: T, renderToolbar: P = Ci, contextMenuSx: R, renderContextMenu: k = Uc, renderFilterMenu: E = Gc, renderMovableMenu: M = _c, renderLoadingPanel: I = Kc, loadingPanelProps: N, sheetProps: L, renderSheet: F = Xc, mainWrapper: z, showHorizontalScrollbar: ae, showVerticalScrollbar: Q, gridTheme: ue, headersTheme: j, enableDarkImages: K, ...ee } = n, V = Xe(), A = Gn(), Z = W(() => {
|
|
3104
3104
|
const $ = { theme: A.getDefaultTheme(), ...e };
|
|
3105
3105
|
return t ?? new On($);
|
|
3106
3106
|
}, [t]), oe = xe(null), [Ae, Se] = _(!1), Fe = xe(null), Ve = W(() => o(B, { className: "sheetxl-viewport", sx: { width: "100%", height: "100%", boxSizing: "border-box", position: "absolute", pointerEvents: "none !important", "& > :first-of-type": { position: "relative" } }, ref: Fe }), []), [je, ne] = _(!1), [G, se] = _(!1), Me = U(() => {
|
|
@@ -3126,22 +3126,22 @@ const $c = (n) => o(Pi, { ...n }), Vc = (n) => o(Di, { ...n }), _c = (n) => o(ri
|
|
|
3126
3126
|
oe.current.getSheet() !== pe ? oe.current.getGridElement()?.onViewChangeOnce(() => {
|
|
3127
3127
|
oe.current.getSheet() !== pe && Te(!1), Te(!0);
|
|
3128
3128
|
}) : Te(!0);
|
|
3129
|
-
}) },
|
|
3130
|
-
const [
|
|
3129
|
+
}) }, Qc);
|
|
3130
|
+
const [Qi, io] = tn(($) => $ + 1, 0), _t = Z?.getView();
|
|
3131
3131
|
We(_t, { onViewChange: ($) => {
|
|
3132
3132
|
io();
|
|
3133
3133
|
} });
|
|
3134
|
-
const lo = ue ?? V, _e = W(() => Zr(V, lo), [V, lo]), ir = j ?? V,
|
|
3134
|
+
const lo = ue ?? V, _e = W(() => Zr(V, lo), [V, lo]), ir = j ?? V, Ji = W(() => Zr(V, ir), [V, ir]), [lr, el] = _(null);
|
|
3135
3135
|
U(() => {
|
|
3136
3136
|
oe.current.focus();
|
|
3137
3137
|
}, []);
|
|
3138
|
-
const Oe =
|
|
3138
|
+
const Oe = Lc({ workbook: Z, workbookElement: De.current, target: () => oe.current, commands: u, darkMode: _e.body.darkMode, onNewWorkbook: r }), so = xe(null), [un, sr] = _(!1), [cr, dr] = _(null), [pr, tl] = _(ho.Top), [co, ol] = _(Nl.EmptyBounds), mn = U(() => {
|
|
3139
3139
|
sr(!1), dr(null);
|
|
3140
3140
|
}, []), po = U(($, pe, Te = ho.Top) => {
|
|
3141
|
-
|
|
3141
|
+
ol($), tl(Te), dr(pe), so.current !== null && setTimeout(() => {
|
|
3142
3142
|
so.current !== null && so.current.update();
|
|
3143
3143
|
}, 160), sr(!0);
|
|
3144
|
-
}, []), [
|
|
3144
|
+
}, []), [$d, ur] = _("sheet"), Et = h ?? _t?.isShowTabs(), Dt = ae ?? _t?.isShowHorizontalScrollbar(), nl = b ?? _t?.isShowFormulaBar(), Ao = S ?? _t?.isShowStatusBar(), mr = Q ?? _t?.isShowVerticalScrollbar(), Ut = _e?.header?.edgeStrokeFill || "rgb(171,171,171)", rl = W(() => Ao ? D({ sheet: Ne, gridStyle: _e, ...C }) : null, [D, C, Ao, _e, Ne]), al = W(() => P({ commands: Oe, workbook: De.current, ...T }), [Oe, P, T, V]), [il, { width: hn }] = zt(), bt = hn === 0 || hn > 560, gn = W(() => {
|
|
3145
3145
|
if (!Et) return null;
|
|
3146
3146
|
let $ = v({ background: _e.body.fill, borderWidth: 1, borderColor: Ut, gridTheme: lo, gridStyle: _e, onBeforeUserChange: Ye, onUserChange: dt, workbook: Z, commands: Oe, sheetTabProps: {}, ...w });
|
|
3147
3147
|
return bt || ($ = o("div", { style: { flex: "none", display: "flex" }, children: $ })), $;
|
|
@@ -3159,11 +3159,11 @@ const $c = (n) => o(Pi, { ...n }), Vc = (n) => o(Di, { ...n }), _c = (n) => o(ri
|
|
|
3159
3159
|
Te = Ue;
|
|
3160
3160
|
}
|
|
3161
3161
|
return o(B, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: Te });
|
|
3162
|
-
}, [Ne, Ye, Z, _e, lo, Oe, Et, Dt, Ao, bt]), [Je, uo] = re.useState(null),
|
|
3162
|
+
}, [Ne, Ye, Z, _e, lo, Oe, Et, Dt, Ao, bt]), [Je, uo] = re.useState(null), ll = W(() => ({ placement: "right-start", ...Je?.popperProps }), [Je?.popperProps]), { reference: gr, component: sl } = ao({ label: "contextMenu", popperProps: ll, anchor: Je?.anchor ?? { getBoundingClientRect: () => new DOMRect(Je?.clientX || 0, Je?.clientY || 0) }, onClose: () => uo(null), createPopupPanel: Je?.createPopupPanel });
|
|
3163
3163
|
de(() => {
|
|
3164
3164
|
Je ? gr.open(0) : gr.close(0);
|
|
3165
3165
|
}, [Je]);
|
|
3166
|
-
const
|
|
3166
|
+
const cl = Y(($, pe) => {
|
|
3167
3167
|
if ($?.isDefaultPrevented()) return !0;
|
|
3168
3168
|
$.preventDefault(), Je && Je.anchor === $.currentTarget ? uo(null) : uo({ anchor: $.currentTarget, popperProps: { offsets: [-4, 2] }, createPopupPanel: (Te) => {
|
|
3169
3169
|
const { floatReference: Ge } = Te;
|
|
@@ -3175,7 +3175,7 @@ const $c = (n) => o(Pi, { ...n }), Vc = (n) => o(Di, { ...n }), _c = (n) => o(ri
|
|
|
3175
3175
|
const { floatReference: Te } = pe;
|
|
3176
3176
|
return k({ commands: Oe, workbook: Z, floatReference: Te, sx: { ...R } });
|
|
3177
3177
|
} });
|
|
3178
|
-
}, [k, R, Oe, Z]),
|
|
3178
|
+
}, [k, R, Oe, Z]), dl = Y(($, pe) => {
|
|
3179
3179
|
if ($?.isDefaultPrevented()) return !0;
|
|
3180
3180
|
$.preventDefault(), uo({ clientX: $.clientX, clientY: $.clientY, createPopupPanel: (Te) => {
|
|
3181
3181
|
const { floatReference: Ge } = Te;
|
|
@@ -3196,15 +3196,15 @@ const $c = (n) => o(Pi, { ...n }), Vc = (n) => o(Di, { ...n }), _c = (n) => o(ri
|
|
|
3196
3196
|
});
|
|
3197
3197
|
});
|
|
3198
3198
|
}, [Ne]);
|
|
3199
|
-
const
|
|
3199
|
+
const pl = Y(($) => {
|
|
3200
3200
|
Oe?.dispatchToFocusedCommand($);
|
|
3201
|
-
}, [Oe]),
|
|
3201
|
+
}, [Oe]), ul = Y(() => {
|
|
3202
3202
|
Kr(De.current);
|
|
3203
|
-
}, [Z, De.current]),
|
|
3203
|
+
}, [Z, De.current]), ml = U(() => {
|
|
3204
3204
|
ur("sheet");
|
|
3205
|
-
}, []),
|
|
3205
|
+
}, []), hl = U(() => {
|
|
3206
3206
|
ur("formulaBar");
|
|
3207
|
-
}, []),
|
|
3207
|
+
}, []), gl = Y(($) => {
|
|
3208
3208
|
const pe = Ke.getOS() === Ke.OSType.Firefox;
|
|
3209
3209
|
return o(wr, { style: { borderLeft: "3px solid transparent", borderRight: "0px solid transparent", borderTop: (pe ? 3 : 0) + "px solid transparent", borderBottom: (pe ? 3 : 0) + "px solid transparent", width: pe ? "13px" : void 0 }, ...$, sheet: Ne, endGap: 700, showCustomScrollButtons: !pe, onShowTooltip: (Te) => {
|
|
3210
3210
|
po(Te.anchor, Te.display, ho.Left);
|
|
@@ -3215,7 +3215,7 @@ const $c = (n) => o(Pi, { ...n }), Vc = (n) => o(Di, { ...n }), _c = (n) => o(ri
|
|
|
3215
3215
|
}, []);
|
|
3216
3216
|
const [Io, fn] = re.useState(null), bn = U(($) => {
|
|
3217
3217
|
Oe?.getCommand("openWorkbook") && ($.type === "dragenter" || $.type === "dragover" ? $.dataTransfer?.types.includes("Files") ? $.dataTransfer.files[0]?.type?.startsWith("image/") || $.dataTransfer.items[0]?.type?.startsWith("image/") || $.dataTransfer.types.length === 1 && fn("Drop to open") : ($.dataTransfer?.types.includes("text/html") || $.dataTransfer?.types.includes("text/plain"), $.dataTransfer.effectAllowed = "none", $.dataTransfer.dropEffect = "none") : $.type === "dragleave" && fn(null), $.preventDefault());
|
|
3218
|
-
}, [Oe]),
|
|
3218
|
+
}, [Oe]), fl = Y(($) => {
|
|
3219
3219
|
if (Oe?.getCommand("openWorkbook") && ($.preventDefault(), $.stopPropagation(), fn(null), $.dataTransfer.files && $.dataTransfer.files.length > 0)) {
|
|
3220
3220
|
const pe = $.dataTransfer.files[0];
|
|
3221
3221
|
if (!pe) return;
|
|
@@ -3227,81 +3227,81 @@ const $c = (n) => o(Pi, { ...n }), Vc = (n) => o(Di, { ...n }), _c = (n) => o(ri
|
|
|
3227
3227
|
Oe?.getCommand("insertImageFromFile")?.execute({ file: pe, options: { bounds: { x: Ue.x, y: Ue.y } }, goto: { range: { ...$e } } });
|
|
3228
3228
|
} else Oe?.getCommand("openWorkbook")?.execute(pe);
|
|
3229
3229
|
}
|
|
3230
|
-
}, [Oe, Io]),
|
|
3230
|
+
}, [Oe, Io]), bl = W(() => Io ? o(B, { sx: { position: "absolute", width: "100%", height: "100%", boxSizing: "border-box", pointerEvents: "none", display: "flex", justifyContent: "center", alignItems: "center", background: ($) => $.palette.divider, color: ($) => $.palette.primary.dark }, children: o(Re, { variant: "h4", children: Io }) }) : null, [Io]), br = xe(null), xl = W(() => o(Hn, { in: !G, nodeRef: br, timeout: 500, classNames: "animating", unmountOnExit: !0, children: o(B, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", pointerEvents: G ? "none" : p?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: I({ ref: br, transitionDelay: "0", transparentBackground: !1, sx: { opacity: G ? 0 : p?.opacity, pointerEvents: G ? "none" : p?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ...N } }) }) }), [G, I, N]), yl = W(() => f({ sx: { marginTop: ($) => $.spacing(0.25), marginLeft: ($) => $.spacing(1), marginRight: ($) => $.spacing(1) }, workbook: Z, sheetElement: oe.current, gridStyle: _e, onFocus: hl, ...y, NamedCollectionEditorProps: { restoreFocus: ($) => oe.current.focus($), ...y?.NamedCollectionEditorProps, commandPopupButtonProps: { commands: Oe, ...y?.NamedCollectionEditorProps?.commandPopupButtonProps } } }, qe), [f, y, Z, _e, Oe, G]), wl = U(($) => {
|
|
3231
3231
|
const { movable: pe, ...Te } = $, Ge = { movable: pe, onContextMenuCapture: (Pt) => {
|
|
3232
|
-
|
|
3232
|
+
dl(Pt, pe);
|
|
3233
3233
|
}, ...Te }, Ue = pe.getContent().getType();
|
|
3234
3234
|
let $e = null;
|
|
3235
|
-
if (Ue === "picture") return o(
|
|
3235
|
+
if (Ue === "picture") return o(Hl, { loadingPanel: o(Wt, { transitionDelay: "100", style: { position: "absolute" }, sx: { border: (Pt) => `solid 1px ${Pt.palette.action.active}` } }), picture: pe.getContent(), description: pe.getDescription() ?? pe?.getName(), ...Ge });
|
|
3236
3236
|
if (Ue === "chart") {
|
|
3237
3237
|
const Pt = { ...Ge, chart: pe.getContent() };
|
|
3238
|
-
return o(
|
|
3238
|
+
return o(Wl, { ...Pt });
|
|
3239
3239
|
}
|
|
3240
3240
|
if ($e = `Float of type '${Ue}'.`, typeof $e == "string") {
|
|
3241
3241
|
const Pt = { ...Ge, description: $e };
|
|
3242
|
-
$e = o(
|
|
3242
|
+
$e = o(jl, { ...Pt });
|
|
3243
3243
|
}
|
|
3244
3244
|
return o("div", { style: { position: "absolute", clipPath: "inset(0px)", display: "flex", alignItems: "stretch", justifyContent: "stretch", pointerEvents: "all" }, children: $e }, pe.getUUID());
|
|
3245
|
-
}, []), xr = W(() => F({ style: aa, onFocus:
|
|
3246
|
-
|
|
3245
|
+
}, []), xr = W(() => F({ style: aa, onFocus: ml, gridStyle: _e, headersStyle: Ji, sheet: Ne, commands: Oe, onSheetContextMenu: fr, onViewportChange: ($) => {
|
|
3246
|
+
el($);
|
|
3247
3247
|
}, showScrollbars: !1, viewportComponent: Ve, onRepeatCommandChange: m, onElementLoad: Me, onShowColumnTooltip: ($) => {
|
|
3248
3248
|
po($.anchor, $.display, ho.Top);
|
|
3249
3249
|
}, onShowRowTooltip: ($) => {
|
|
3250
3250
|
po($.anchor, $.display, ho.Right);
|
|
3251
3251
|
}, onShowTooltip: ($) => {
|
|
3252
3252
|
po({ x: $.anchor.x, y: $.anchor.y, width: 0, height: 0 }, $.display, $.placement);
|
|
3253
|
-
}, onCloseTooltip: () => mn(), renderMovable:
|
|
3254
|
-
L?.cellRenderProps?.onFilterButtonMouseDown($, pe),
|
|
3255
|
-
}, ...L?.cellRenderProps } }, oe), [Oe, L, Ne, _e, m]),
|
|
3256
|
-
let $ = o(
|
|
3253
|
+
}, onCloseTooltip: () => mn(), renderMovable: wl, ...L, cellRenderProps: { onFilterButtonMouseDown: ($, pe) => {
|
|
3254
|
+
L?.cellRenderProps?.onFilterButtonMouseDown($, pe), cl($, pe);
|
|
3255
|
+
}, ...L?.cellRenderProps } }, oe), [Oe, L, Ne, _e, m]), Sl = W(() => {
|
|
3256
|
+
let $ = o(Ss, { ref: il, style: aa, viewport: lr, touchElement: oe.current?.getGridElement()?.stage, onScrollViewport: (pe) => {
|
|
3257
3257
|
oe.current?.getGridElement()?.scrollTo(pe);
|
|
3258
|
-
}, showHorizontalScrollbar: Dt || Et, showVerticalScrollbar: mr, createHorizontalScrollbar: hr, createVerticalScrollbar:
|
|
3258
|
+
}, showHorizontalScrollbar: Dt || Et, showVerticalScrollbar: mr, createHorizontalScrollbar: hr, createVerticalScrollbar: gl, children: xr });
|
|
3259
3259
|
return bt || hn === 0 || ($ = H(le, { children: [$, gn] })), z ? z($) : $;
|
|
3260
|
-
}, [Dt, Et, hr, mr, lr, bt, xr, gn, V, z]),
|
|
3261
|
-
return H(no, { className: Ce("sheetxl-workbook",
|
|
3262
|
-
Se(!0),
|
|
3260
|
+
}, [Dt, Et, hr, mr, lr, bt, xr, gn, V, z]), vl = W(() => o(vt, { arrow: !0, disableInteractive: !0, open: un, title: o(Re, { variant: "subtitle2", component: "div", children: cr }), placement: pr, slotProps: { transition: { timeout: { exit: 0 } }, popper: { popperRef: so, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: un ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(co.x, co.y, co.width, co.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] } }, children: o(B, {}) }), [un, cr, pr, co, so]), kl = W(() => ({ boxSizing: "border-box", background: ($) => $.palette.mode !== "dark" ? _e.header.fill : $.palette.background.paper, "& *": { ...ps(V), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${Ut} 1px` }, ...p }), [p, _e]), Cl = W(() => o(B, { sx: { marginBottom: ($) => $.spacing(0.75) } }), []), Tl = W(() => ({ flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: G ? void 0 : 0, "--sxl-app-color-high-contrast": V.palette.primary.main, "--sxl-app-color-primary": V.palette.primary.main, "--sxl-app-color-primary-dark": V.palette.primary.dark, "--sxl-app-color-primary-light": V.palette.primary.light, "--sxl-app-color-info": V.palette.info.main, "--sxl-app-color-info-dark": V.palette.info.dark, "--sxl-app-color-info-light": V.palette.info.light, "--sxl-app-color-secondary": V.palette.secondary.main, "--sxl-app-color-secondary-dark": V.palette.secondary.dark, "--sxl-app-color-secondary-light": V.palette.secondary.light, "--sxl-app-color-success": V.palette.success.main, "--sxl-app-color-success-dark": V.palette.success.dark, "--sxl-app-color-success-light": V.palette.success.light, "--sxl-app-color-warning": V.palette.warning.main, "--sxl-app-color-warning-dark": V.palette.warning.dark, "--sxl-app-color-warning-light": V.palette.warning.light, "--sxl-app-color-error": V.palette.error.main, "--sxl-app-color-error-dark": V.palette.error.dark, "--sxl-app-color-error-light": V.palette.error.light, "--sxl-app-color-text": V.palette.text.primary, "--sxl-app-color-text-secondary": V.palette.text.secondary, "--sxl-app-color-text-disabled": V.palette.text.disabled, "--sxl-app-color-background": V.palette.background.paper, "--sxl-app-color-button-surface": V.palette.grey[600], "--sxl-app-color-shadow": V.palette.action.focus, "--sxl-app-color-grey": V.palette.grey[500], "--sxl-app-filter-dark-invert": _e.body.darkMode && K ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": _e.body.darkMode ? `linear-gradient(${ye("#fff", Be(5))}, ${ye("#fff", Be(5))})` : void 0 }), [_e, V, G]), El = W(() => Ce($a), []);
|
|
3261
|
+
return H(no, { className: Ce("sheetxl-workbook", Wc, { "Mui-focusVisible": Ae }, Hc, s), sx: kl, style: i, square: !1, ...ee, ref: De, onFocus: ($) => {
|
|
3262
|
+
Se(!0), ul(), d?.($);
|
|
3263
3263
|
}, onBlur: ($) => {
|
|
3264
3264
|
Se(!1), x?.($);
|
|
3265
3265
|
}, onKeyDown: ($) => {
|
|
3266
|
-
|
|
3266
|
+
pl($), g?.($);
|
|
3267
3267
|
}, onDragStart: ($) => {
|
|
3268
3268
|
if ($.target.src) {
|
|
3269
3269
|
const pe = new Image();
|
|
3270
3270
|
pe.src = $.target.src, $.dataTransfer.setDragImage(pe, 1, 1);
|
|
3271
3271
|
}
|
|
3272
|
-
}, onDragEnter: bn, onDragLeave: bn, onDragOver: bn, onDrop:
|
|
3272
|
+
}, onDragEnter: bn, onDragLeave: bn, onDragOver: bn, onDrop: fl, children: [H("div", { className: El, style: Tl, children: [al, nl ? yl : null, Cl, Sl, rl, vl, sl, bl] }), xl] });
|
|
3273
3273
|
}));
|
|
3274
3274
|
Ri.displayName = "WorkbookElement";
|
|
3275
|
-
const
|
|
3276
|
-
const { sx: t, workbook: e, title: r = "", placeHolder: l = "Untitled", onTitleChange: c, readOnly: p = !1, hidden: i, ...s } = n, [d, x] = _(!1), [g, m] = _(!1), [u,
|
|
3275
|
+
const Jc = (n = !1, a = !1) => a ? null : { "& input:not(:focus):not(:hover)": { color: (t) => t.palette.text.secondary }, backgroundColor: (t) => ye(t.palette.background.paper, 0.6), borderRadius: (t) => `${t.shape.borderRadius}px`, border: (t) => `solid ${n ? t.palette.divider : "transparent"} 1px`, "&.Mui-disabled": { border: (t) => `solid ${n ? t.palette.divider : "transparent"} 1px` }, "&:focus-within:not([disabled])": { backgroundColor: (t) => t.palette.background.paper }, "&:hover:not([disabled])": { border: (t) => `solid ${n ? t.palette.text?.primary : t.palette.divider} 1px`, backgroundColor: null }, "&.Mui-focusVisible": { outline: (t) => `solid ${t.palette.primary.main} 1px !important`, border: (t) => `1px solid ${t.palette?.primary?.main} !important` } }, Mi = q(X((n, a) => {
|
|
3276
|
+
const { sx: t, workbook: e, title: r = "", placeHolder: l = "Untitled", onTitleChange: c, readOnly: p = !1, hidden: i, ...s } = n, [d, x] = _(!1), [g, m] = _(!1), [u, b] = _(r ?? ""), [y, f] = _(""), [h, { width: w }] = zt(), [v, { width: S }] = zt(), [C, D] = _(!1), T = xe(null), P = xe(null), R = Ct(a, () => ({ requestWorkbookTitle: (k = null, E) => {
|
|
3277
3277
|
P.current = { onAccept: k, requestReason: E?.requestReason }, E?.selectAll && T.current?.select(), T.current?.focus(E);
|
|
3278
3278
|
}, focus: (k) => {
|
|
3279
3279
|
T.current?.focus(k);
|
|
3280
3280
|
} }), []);
|
|
3281
3281
|
return St(() => {
|
|
3282
|
-
D(r !== u),
|
|
3282
|
+
D(r !== u), f(r), b(r);
|
|
3283
3283
|
}, [r]), de(() => {
|
|
3284
3284
|
C && w !== 0 && to.debounce(() => {
|
|
3285
3285
|
D(!1);
|
|
3286
3286
|
}, 300)();
|
|
3287
3287
|
}, [C, w]), de(() => {
|
|
3288
3288
|
m(u && !Jt.isValidWindowsFilename(u));
|
|
3289
|
-
}, [u]), i ? null : o(B, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: C ? "0" : "1", transition: C ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: $t([R, v, a]), ...s, children: o(ot, { label: P.current?.requestReason ?? "Workbook Name", children: H(B, { className: Ce({ "Mui-focusVisible": d }), sx: { visibility: w === 0 ? "hidden" : "visible", display: "block", maxWidth: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", paddingLeft: "12px", paddingRight: "12px", marginLeft: "2px", marginRight: "2px", paddingTop: "2px", paddingBottom: "1px", ...
|
|
3289
|
+
}, [u]), i ? null : o(B, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: C ? "0" : "1", transition: C ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: $t([R, v, a]), ...s, children: o(ot, { label: P.current?.requestReason ?? "Workbook Name", children: H(B, { className: Ce({ "Mui-focusVisible": d }), sx: { visibility: w === 0 ? "hidden" : "visible", display: "block", maxWidth: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", paddingLeft: "12px", paddingRight: "12px", marginLeft: "2px", marginRight: "2px", paddingTop: "2px", paddingBottom: "1px", ...Jc(!0, p), ...t }, children: [p ? o(Re, { variant: "subtitle1", component: "div", sx: { whiteSpace: "nowrap", fontStyle: u !== y ? "italic" : void 0, userSelect: "none", textOverflow: "ellipsis", lineHeight: "1.4375em", border: "transparent 1px solid", color: (k) => g ? k.palette.error.dark : void 0 }, children: r ?? l }) : o(Kn, { sx: { width: `${Math.min(w + 3, Math.max(S, R.current?.getBoundingClientRect()?.width))}px`, overflow: "hidden", whiteSpace: "nowrap", fontWeight: "600", maxWidth: "100%", border: "none", padding: "0px", margin: "0px", color: (k) => g ? k.palette.error.dark : void 0, fontStyle: u !== y ? "italic" : void 0, "& input": { paddingTop: "0px", paddingBottom: "0px", textOverflow: "ellipsis" } }, disableUnderline: !0, fullWidth: !1, multiline: !1, readOnly: p, spellCheck: !1, placeholder: l, onFocus: (k) => {
|
|
3290
3290
|
x(!0), k.target?.select();
|
|
3291
3291
|
}, inputProps: { name: "input-workbook-title", autoComplete: "off", ref: T }, onBlur: () => {
|
|
3292
|
-
x(!1), g ?
|
|
3292
|
+
x(!1), g ? b(y) : (u !== y && (c?.(u), u && P.current?.onAccept?.(u, "blur")), P.current = null);
|
|
3293
3293
|
}, onChange: (k) => {
|
|
3294
3294
|
if (k.target.value.length > Jt.MAX_WORKBOOK_NAME_SIZE) return k.stopPropagation(), void k.preventDefault();
|
|
3295
|
-
|
|
3295
|
+
b(k.target.value);
|
|
3296
3296
|
}, onKeyDown: (k) => {
|
|
3297
|
-
(Jt.WINDOW_FILENAME_CHAR_RESERVED_REGEX.test(k.key) || k.target?.value.length > Jt.MAX_WORKBOOK_NAME_SIZE) && k.preventDefault(), k.which === me.Enter || k.which === me.Tab ? (g ?
|
|
3297
|
+
(Jt.WINDOW_FILENAME_CHAR_RESERVED_REGEX.test(k.key) || k.target?.value.length > Jt.MAX_WORKBOOK_NAME_SIZE) && k.preventDefault(), k.which === me.Enter || k.which === me.Tab ? (g ? b(y) : (c?.(u), u && (P.current?.onAccept?.(u, "keydown"), P.current = null)), k.stopPropagation(), k.preventDefault(), e?.focus()) : k.which === me.Escape && (u === y ? e?.focus() : (b(y), setTimeout(() => {
|
|
3298
3298
|
k.target?.select();
|
|
3299
3299
|
}, 0)), P.current = null, k.stopPropagation(), k.preventDefault());
|
|
3300
3300
|
}, value: u }), o(B, { ref: h, sx: { position: "absolute", visibility: "hidden", top: "-9999px", fontWeight: "600 !important", whiteSpace: "pre", fontStyle: u !== y ? "italic" : void 0, fontFamily: (k) => k.typography.fontFamily, letterSpacing: "0.00938em" }, children: u || l })] }) }) });
|
|
3301
3301
|
}));
|
|
3302
3302
|
Mi.displayName = "WorkbookTitle";
|
|
3303
|
-
const
|
|
3304
|
-
const { title: t, commands: e, className: r, ...l } = n, c = sn(), [p, i] = _(!1), [s, d] = _(!1), x = xe(null), [g, m] = tn((T) => T + 1, 0), [u, { width:
|
|
3303
|
+
const rp = q(X((n, a) => {
|
|
3304
|
+
const { title: t, commands: e, className: r, ...l } = n, c = sn(), [p, i] = _(!1), [s, d] = _(!1), x = xe(null), [g, m] = tn((T) => T + 1, 0), [u, { width: b }] = zt(), y = Ie(e, ["editTable"])[0].context(), f = y.table(), [h, w] = _(() => f ? y.getNames().getRanges(f.getRange()) : null), v = W(() => f?.getName() ?? "", [f]);
|
|
3305
3305
|
We(y.table(), { onAnchorCoordsChange(T) {
|
|
3306
3306
|
w(y.getNames().getRanges(T.getRange()));
|
|
3307
3307
|
}, onProtectedChange(T) {
|
|
@@ -3315,58 +3315,58 @@ const np = q(X((n, a) => {
|
|
|
3315
3315
|
let D = null;
|
|
3316
3316
|
return y.table() || (D = o(Re, { component: "div", style: { top: "0", left: "0", width: "100%", height: "100%", display: "flex", alignItems: "center", justifyItems: "center", justifyContent: "center" }, children: "No table selected" })), o(no, { square: !0, onFocus: () => i(!0), onBlur: (T) => {
|
|
3317
3317
|
x?.current?.contains(T.relatedTarget) || i(!1);
|
|
3318
|
-
}, ref: $t([x, u, a]), sx: { display: "flex", flexDirection: "column", flex: "1 1 auto", width: "100%", height: "100%", overflow: "auto", paddingLeft: (T) => T.spacing(1.5), paddingRight: (T) => T.spacing(1.5), paddingTop: (T) => T.spacing(1.5), paddingBottom: (T) => T.spacing(1.5), boxSizing: "border-box" }, className: Ce("sxl-table-details-panel", r, { "sxl-has-focus": p }), ...l, children: D || H(B, { sx: { display: "flex", flex: "1 1 auto", flexDirection: "column", transition: "opacity 60ms", opacity: y.table() ? 1 : 0 }, children: [o(B, { sx: { containerType: "inline-size", display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingTop: (T) => T.spacing(2), paddingLeft: (T) => T.spacing(2), paddingRight: (T) => T.spacing(2) }, children: H(B, { className:
|
|
3319
|
-
|
|
3320
|
-
}, disabled:
|
|
3318
|
+
}, ref: $t([x, u, a]), sx: { display: "flex", flexDirection: "column", flex: "1 1 auto", width: "100%", height: "100%", overflow: "auto", paddingLeft: (T) => T.spacing(1.5), paddingRight: (T) => T.spacing(1.5), paddingTop: (T) => T.spacing(1.5), paddingBottom: (T) => T.spacing(1.5), boxSizing: "border-box" }, className: Ce("sxl-table-details-panel", r, { "sxl-has-focus": p }), ...l, children: D || H(B, { sx: { display: "flex", flex: "1 1 auto", flexDirection: "column", transition: "opacity 60ms", opacity: y.table() ? 1 : 0 }, children: [o(B, { sx: { containerType: "inline-size", display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingTop: (T) => T.spacing(2), paddingLeft: (T) => T.spacing(2), paddingRight: (T) => T.spacing(2) }, children: H(B, { className: hc, children: [o(qa, { formName: "name", defaultInput: v, value: f?.getName() ?? "No table", onChangeInput: S, onValidate: (T) => {
|
|
3319
|
+
f && f.getName().toLowerCase() === T.toLowerCase() || y?.getNames().validateName(T);
|
|
3320
|
+
}, disabled: f?.isProtected() ?? !0, onFocus: (T) => {
|
|
3321
3321
|
s || T.target?.select(), d(!0);
|
|
3322
|
-
} }), o(Ka, { formName: "range", value: h, onChangeInput: C, resolvedAddress: y.getNames().getRanges.bind(y.getNames()), disabled:
|
|
3322
|
+
} }), o(Ka, { formName: "range", value: h, onChangeInput: C, resolvedAddress: y.getNames().getRanges.bind(y.getNames()), disabled: f?.isProtected() ?? !0, onFocus: (T) => {
|
|
3323
3323
|
s || T.target?.select(), d(!0);
|
|
3324
|
-
} })] }) }), H(B, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", containerType: "inline-size", gap: (T) => T.spacing(0.5), marginTop: (T) => T.spacing(1) }, children: [o(J, { orientation: "horizontal", sx: { marginTop: (T) => T.spacing(1.5), marginBottom: (T) => T.spacing(0.75) } }), o(
|
|
3325
|
-
|
|
3326
|
-
}, showHeaderRow:
|
|
3324
|
+
} })] }) }), H(B, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", containerType: "inline-size", gap: (T) => T.spacing(0.5), marginTop: (T) => T.spacing(1) }, children: [o(J, { orientation: "horizontal", sx: { marginTop: (T) => T.spacing(1.5), marginBottom: (T) => T.spacing(0.75) } }), o(pc, { disabled: f?.isProtected(), styleOptions: f?.getStyleOptions() ?? null, onStyleOptionsChange: (T) => {
|
|
3325
|
+
f.updateStyleOptions(T);
|
|
3326
|
+
}, showHeaderRow: f?.getShowHeaders(), onShowHeaderRowChange: (T) => {
|
|
3327
3327
|
try {
|
|
3328
|
-
|
|
3328
|
+
f.setShowHeaders(T);
|
|
3329
3329
|
} catch (P) {
|
|
3330
3330
|
c.showError(P);
|
|
3331
3331
|
}
|
|
3332
|
-
}, showTotalRow:
|
|
3332
|
+
}, showTotalRow: f?.getShowTotals(), onShowTotalRowChange: (T) => {
|
|
3333
3333
|
try {
|
|
3334
|
-
|
|
3334
|
+
f.setShowTotals(T);
|
|
3335
3335
|
} catch (P) {
|
|
3336
3336
|
c.showError(P);
|
|
3337
3337
|
}
|
|
3338
|
-
}, showFilterButton:
|
|
3338
|
+
}, showFilterButton: f?.getFilter() ? f.getShowFilterButton() : null, onShowFilterButtonChange: (T) => {
|
|
3339
3339
|
try {
|
|
3340
|
-
|
|
3340
|
+
f.setShowFilterButton(T);
|
|
3341
3341
|
} catch (P) {
|
|
3342
3342
|
c.showError(P);
|
|
3343
3343
|
}
|
|
3344
|
-
} }), o(J, { orientation: "horizontal", sx: { marginTop: (T) => T.spacing(1.5), marginBottom: (T) => T.spacing(0.75) } }), o(B, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", justifyContent: "start", flexDirection: "column", marginTop: (T) => T.spacing(2), marginBottom: (T) => T.spacing(1) }, children: H("div", { style: { display: "flex", alignItems: "start", gap: "2px" }, children: [o(Va, { table:
|
|
3345
|
-
})),
|
|
3346
|
-
const { table: a, tableStyle: t, selectedTableStyleName: e, onSelectTableStyleName: r, styles: l, hasContextMenu: c = !0, bodyStyle: p, parentFloat: i, commands: s, disabled: d, commandHook: x, useCanvasPreview: g = !0, canvas: m, ...u } = n,
|
|
3344
|
+
} }), o(J, { orientation: "horizontal", sx: { marginTop: (T) => T.spacing(1.5), marginBottom: (T) => T.spacing(0.75) } }), o(B, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", justifyContent: "start", flexDirection: "column", marginTop: (T) => T.spacing(2), marginBottom: (T) => T.spacing(1) }, children: H("div", { style: { display: "flex", alignItems: "start", gap: "2px" }, children: [o(Va, { table: f, styles: y.styles(), bodyStyle: y.bodyStyle(), cellHeight: 30, isLive: !0 }), o(Ni, { command: e.getCommand("formatTableStyle"), commands: e, disabledQuickKey: !0 })] }) }), o(J, { orientation: "horizontal" }), H(B, { className: gc, children: [o(O, { variant: ie.Menuitem, command: e.getCommand("convertTableToRange"), commandState: f }), o(O, { variant: ie.Menuitem, commandState: f, command: e.getCommand("deleteTable") })] })] })] }) });
|
|
3345
|
+
})), ed = q((n) => {
|
|
3346
|
+
const { table: a, tableStyle: t, selectedTableStyleName: e, onSelectTableStyleName: r, styles: l, hasContextMenu: c = !0, bodyStyle: p, parentFloat: i, commands: s, disabled: d, commandHook: x, useCanvasPreview: g = !0, canvas: m, ...u } = n, b = U((w) => {
|
|
3347
3347
|
const v = { variant: ie.Menuitem, commandHook: x, context: "table" }, S = H(le, { children: [o(O, { ...v, command: s.getCommand("formatTableStyleClearCellStyles"), commandState: t, disabled: d }), o(O, { ...v, style: { fontWeight: 550 }, command: s.getCommand("formatTableStyle"), commandState: { name: t.getName() }, disabled: d }), o(J, { orientation: "horizontal" }), o(O, { ...v, command: s.getCommand("setDefaultTableStyle"), commandState: t.getName(), disabled: d }), o(J, { orientation: "horizontal" }), o(O, { ...v, command: s.getCommand("deleteTableStyle"), commandState: t?.getName(), disabled: d || !t || t.isBuiltIn() })] });
|
|
3348
3348
|
return ge({ ...w, children: o(B, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: S }) }) });
|
|
3349
|
-
}, [s]), y = t?.getName() === e,
|
|
3349
|
+
}, [s]), y = t?.getName() === e, f = W(() => {
|
|
3350
3350
|
const w = { table: a, tableStyle: t, styles: l, bodyStyle: p };
|
|
3351
|
-
return g ? o(
|
|
3351
|
+
return g ? o(sc, { canvas: m, ...w }) : o(Va, { ...w });
|
|
3352
3352
|
}, [a, t, l, p]);
|
|
3353
3353
|
let h = o(ft, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (w) => `solid ${y ? w.palette.primary.dark : "transparent"} 1px` }, tooltipProps: { label: t.getName() ?? "None", placement: "bottom-start" }, disabled: d, icon: null, onClick: () => {
|
|
3354
3354
|
r?.(t?.getName());
|
|
3355
|
-
}, ...u, children:
|
|
3356
|
-
return c && (h = o(Pa, { label: a.getStyleOptions().name, parentFloat: i, createPopupPanel:
|
|
3355
|
+
}, ...u, children: f }, t.getName());
|
|
3356
|
+
return c && (h = o(Pa, { label: a.getStyleOptions().name, parentFloat: i, createPopupPanel: b, children: h })), h;
|
|
3357
3357
|
}), Ni = q(X((n, a) => {
|
|
3358
3358
|
const { commands: t, command: e, commandHook: r, selectedTable: l, onSelectTableStyleName: c, disabled: p = !1, bodyStyle: i, disabledQuickKey: s = !1, usePreviewIcon: d = !1, ...x } = n;
|
|
3359
3359
|
jt(e);
|
|
3360
3360
|
const g = e?.context(), m = g?.styles, u = l ?? g?.table?.();
|
|
3361
|
-
let
|
|
3362
|
-
u && (
|
|
3361
|
+
let b = "insertTable";
|
|
3362
|
+
u && (b = "editTable");
|
|
3363
3363
|
const y = W(() => ((R, k) => {
|
|
3364
3364
|
const E = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
|
|
3365
3365
|
return new Vn({ initialAnchor: E, styles: k, json: { name: "PreviewTable", ref: E, description: "PreviewTable", headerRowCount: 1, totalsRowCount: 0, styleOptions: R } });
|
|
3366
|
-
})(u?.getStyleOptions(), m?.()), [m?.().getDefaultTableStyle(), u?.getStyleOptions()]),
|
|
3366
|
+
})(u?.getStyleOptions(), m?.()), [m?.().getDefaultTableStyle(), u?.getStyleOptions()]), f = u ?? y, [h, w] = _(f);
|
|
3367
3367
|
de(() => {
|
|
3368
|
-
w(
|
|
3369
|
-
}, [
|
|
3368
|
+
w(f);
|
|
3369
|
+
}, [f]);
|
|
3370
3370
|
const v = i ?? g?.bodyStyle(), S = Y((R) => {
|
|
3371
3371
|
c?.(R), e?.execute({ name: R }, r);
|
|
3372
3372
|
}, [e, c, r]), C = xe(null), D = U((R, k) => {
|
|
@@ -3374,7 +3374,7 @@ const np = q(X((n, a) => {
|
|
|
3374
3374
|
C.current || (C.current = document.createElement("canvas"));
|
|
3375
3375
|
const M = (j) => {
|
|
3376
3376
|
const K = m().getTableStyle(j);
|
|
3377
|
-
return K ? o(
|
|
3377
|
+
return K ? o(ed, { table: h, tableStyle: K, selectedTableStyleName: h.getStyleOptions().name, bodyStyle: g.bodyStyle(), commands: k, commandHook: r, canvas: C.current, ...E }, j) : null;
|
|
3378
3378
|
}, I = (j, K, ee = !0) => {
|
|
3379
3379
|
const V = [];
|
|
3380
3380
|
for (let A = 0; A < K.length; A++) {
|
|
@@ -3403,38 +3403,38 @@ const np = q(X((n, a) => {
|
|
|
3403
3403
|
}, [m, m?.().getTheme(), v, h]), T = p || !e || e.disabled(), P = W(() => {
|
|
3404
3404
|
if (!g || !d) return e?.icon();
|
|
3405
3405
|
}, [h, v, T, e]);
|
|
3406
|
-
return o(ve, { ref: a, quickCommand: s ? void 0 :
|
|
3407
|
-
})),
|
|
3406
|
+
return o(ve, { ref: a, quickCommand: s ? void 0 : b, createPopupPanel: D, commands: t, label: e?.label(), commandState: u, commandHook: r, selected: u !== null, createTooltip: ({ children: R }, k) => o(ot, { label: e?.label(), description: e?.description(), disabled: k, children: R }), disabled: T, icon: P, ...x });
|
|
3407
|
+
})), td = q(X((n, a) => {
|
|
3408
3408
|
const { command: t, commandHook: e, selectedTheme: r, onSelectTheme: l, disabled: c = !1, darkMode: p, label: i, icon: s, variant: d, ...x } = n;
|
|
3409
3409
|
jt(t);
|
|
3410
|
-
const g = t?.context()?.themes, m = r || t?.context()?.theme, u = p ?? t?.context()?.darkMode,
|
|
3410
|
+
const g = t?.context()?.themes, m = r || t?.context()?.theme, u = p ?? t?.context()?.darkMode, b = c || t?.disabled(), y = Y((h) => {
|
|
3411
3411
|
l?.(h), t?.execute(h, e);
|
|
3412
|
-
}, [l, e]),
|
|
3412
|
+
}, [l, e]), f = U((h, w) => {
|
|
3413
3413
|
const { children: v, title: S, ...C } = h;
|
|
3414
3414
|
let D = h.children;
|
|
3415
|
-
return (
|
|
3416
|
-
}, [t,
|
|
3417
|
-
return o(
|
|
3418
|
-
})),
|
|
3415
|
+
return (b || w) && (D = o("div", { children: D })), o(Zn, { command: t, placement: d === ie.Toolbar ? "bottom-start" : "right-start", disabled: b || w, ...C, children: D });
|
|
3416
|
+
}, [t, b]);
|
|
3417
|
+
return o(xc, { ref: a, themes: g, selectedTheme: m, onSelectTheme: y, variant: d === ie.Menuitem ? tt.Menuitem : tt.Toolbar, createTooltip: f, disabled: b, darkMode: u, ...x });
|
|
3418
|
+
})), od = q(X((n, a) => {
|
|
3419
3419
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, ...c } = n, p = Ie(t, ["themeMode"])[0], i = Y((m, u) => {
|
|
3420
|
-
const
|
|
3420
|
+
const b = { variant: ie.Menuitem, commandHook: e, scope: "appearance", disabled: l }, y = H(le, { children: [o(O, { ...b, command: p }), o(O, { ...b, command: u.getCommand("defaultThemeMode") }), o(J, { orientation: "horizontal" }), o(O, { ...b, command: u.getCommand("enableDarkGrid") }), o(O, { ...b, command: u.getCommand("enableDarkImages") })] });
|
|
3421
3421
|
return ge({ ...m, children: y });
|
|
3422
3422
|
}, [l, p, e, r]), s = p?.state(), d = Da("(prefers-color-scheme: dark)"), x = s === "dark" || s === null && d, g = p?.state() !== null;
|
|
3423
3423
|
return o(ve, { ref: a, quickCommand: "themeMode", commands: t, commandHook: e, createPopupPanel: i, label: "Appearance", tooltip: "Change the light/dark mode to match your viewing preference. This does not affect the view for others.", onQuickClick: () => {
|
|
3424
3424
|
p?.execute(x ? "light" : "dark", e);
|
|
3425
3425
|
}, selected: g, ...c });
|
|
3426
|
-
})),
|
|
3426
|
+
})), nd = q(X((n, a) => {
|
|
3427
3427
|
const { commands: t, commandHook: e, scope: r, disabled: l = !1, sx: c, ...p } = n, i = U((s, d) => {
|
|
3428
3428
|
const x = { variant: ie.Menuitem, scope: "help", commandHook: { ...e, beforeExecute: (m, u) => e?.beforeExecute?.(m, u) !== !1 && s.floatReference.closeAll() }, disabled: l }, g = H(le, { children: [o(O, { ...x, command: d.getCommand("showKeyboardShortcuts") }), o(J, { orientation: "horizontal" }), o(O, { ...x, command: d.getCommand("gotoUrlGithub") }), o(O, { ...x, command: d.getCommand("gotoUrlDiscord") }), o(O, { ...x, command: d.getCommand("gotoUrlDocumentation") }), o(O, { ...x, command: d.getCommand("gotoUrlIssue") })] });
|
|
3429
3429
|
return ge({ ...s, children: g });
|
|
3430
3430
|
}, [l, e]);
|
|
3431
3431
|
return o(ve, { ref: a, sx: c, commands: t, disabled: l, commandHook: e, scope: r, label: "Help", tooltip: "Help, feedback, and keyboard shortcuts.", createPopupPanel: i, icon: o(he, { iconKey: "Help", style: { transform: "scale(0.75)" } }), ...p });
|
|
3432
|
-
})),
|
|
3432
|
+
})), Fi = q(X((n, a) => {
|
|
3433
3433
|
const { ...t } = n;
|
|
3434
3434
|
return o(lt, { ref: a, ...t, popupCommandKeys: ["insertFunctionSum", "insertFunctionAverage", "insertFunctionCount", "insertFunctionMax", "insertFunctionMin", null, "insertFunction"], quickCommand: "insertFunctionSum", popupScope: "insertFunction", label: "Quick Function", tooltip: "More functions." });
|
|
3435
3435
|
}));
|
|
3436
|
-
|
|
3437
|
-
const Dn = new Map([{ key: "financial", label: "Financial", icon: "FormulaFinancial" }, { key: "logical", label: "Logical", icon: "FormulaLogical" }, { key: "text", label: "Text", icon: "FormulaText" }, { key: "dateTime", label: "Date & Time", icon: "FormulaDateTime" }, { key: "lookupReference", label: "Lookup & Reference", icon: "FormulaLookupReference" }, { key: "mathTrig", label: "Math & Trig", icon: "FormulaMathTrig" }, { key: "statDist", label: "Statistical", icon: "FormulaStatistical" }, { key: "engineering", label: "Engineering", icon: "FormulaEngineering" }, { key: "information", label: "Information", icon: "FormulaInformation" }, { key: "cube", label: "Cube", icon: "FormulaCube" }, { key: "database", label: "Database", icon: "FormulaDatabase" }, { key: "web", label: "Web", icon: "FormulaWeb" }, { key: "custom", label: "Custom", icon: "FormulaCustom" }].map((n) => [n.key, n])),
|
|
3436
|
+
Fi.displayName = "InsertFunctionSumCommandPopupButton";
|
|
3437
|
+
const Dn = new Map([{ key: "financial", label: "Financial", icon: "FormulaFinancial" }, { key: "logical", label: "Logical", icon: "FormulaLogical" }, { key: "text", label: "Text", icon: "FormulaText" }, { key: "dateTime", label: "Date & Time", icon: "FormulaDateTime" }, { key: "lookupReference", label: "Lookup & Reference", icon: "FormulaLookupReference" }, { key: "mathTrig", label: "Math & Trig", icon: "FormulaMathTrig" }, { key: "statDist", label: "Statistical", icon: "FormulaStatistical" }, { key: "engineering", label: "Engineering", icon: "FormulaEngineering" }, { key: "information", label: "Information", icon: "FormulaInformation" }, { key: "cube", label: "Cube", icon: "FormulaCube" }, { key: "database", label: "Database", icon: "FormulaDatabase" }, { key: "web", label: "Web", icon: "FormulaWeb" }, { key: "custom", label: "Custom", icon: "FormulaCustom" }].map((n) => [n.key, n])), rd = q((n) => {
|
|
3438
3438
|
const { command: a, formulaFunction: t, commandHook: e, disabled: r = !1, parentFloat: l, handleInsert: c, icon: p, label: i, sx: s, ...d } = n, x = new Promise((g) => {
|
|
3439
3439
|
t.getDescriptor().then((m) => {
|
|
3440
3440
|
g(m.getSummary());
|
|
@@ -3447,70 +3447,70 @@ const Dn = new Map([{ key: "financial", label: "Financial", icon: "FormulaFinanc
|
|
|
3447
3447
|
}, onKeyDown: (g) => {
|
|
3448
3448
|
g.keyCode === me.Enter || (g.keyCode, me.Space);
|
|
3449
3449
|
}, ...d, children: o(B, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: o(Re, { component: "div", children: t.getName() }) }) });
|
|
3450
|
-
}),
|
|
3450
|
+
}), ad = q(X((n, a) => {
|
|
3451
3451
|
const { category: t, commands: e, commandHook: r, scope: l, sx: c, disabled: p = !1, parentFloat: i, ...s } = n, d = Ie(e, ["insertFunction"])[0], x = U((m, u) => {
|
|
3452
|
-
const
|
|
3453
|
-
if (!
|
|
3454
|
-
const y = { commandHook: r, ...m },
|
|
3455
|
-
return ge({ ...m, children:
|
|
3452
|
+
const b = Dn.get(t);
|
|
3453
|
+
if (!b) return console.warn("invalidate category", t), null;
|
|
3454
|
+
const y = { commandHook: r, ...m }, f = o(id, { category: b.label, ...y, commands: u });
|
|
3455
|
+
return ge({ ...m, children: f });
|
|
3456
3456
|
}, [t, d, r, l]), g = Dn.get(t);
|
|
3457
3457
|
return o(ve, { ref: a, commands: e, commandHook: r, createPopupPanel: x, label: g.label, tooltip: "Insert Function", icon: Dn.get(t)?.icon ?? "FormulaGroup", ...s });
|
|
3458
3458
|
}));
|
|
3459
|
-
|
|
3460
|
-
const
|
|
3459
|
+
ad.displayName = "InsertFunctionCommandPopupButton";
|
|
3460
|
+
const id = q(X((n, a) => {
|
|
3461
3461
|
const { commands: t, category: e, commandHook: r, ...l } = n, c = Ie(t, ["insertFunction"]), [p, i] = _([]), [s, d] = _(!1);
|
|
3462
3462
|
de(() => {
|
|
3463
3463
|
(async () => {
|
|
3464
3464
|
d(!0);
|
|
3465
|
-
const
|
|
3465
|
+
const b = c[0]?.context(), y = await b.searchByCategory(e);
|
|
3466
3466
|
i(y), d(!1);
|
|
3467
3467
|
})();
|
|
3468
3468
|
}, []);
|
|
3469
|
-
const x = p.length, g = new Array(x), m = t.getCommand("insertFunction"), u = (
|
|
3470
|
-
r?.beforeExecute?.(m, m?.state()), m.execute(
|
|
3469
|
+
const x = p.length, g = new Array(x), m = t.getCommand("insertFunction"), u = (b) => {
|
|
3470
|
+
r?.beforeExecute?.(m, m?.state()), m.execute(b), r?.onExecute?.(m, m?.state());
|
|
3471
3471
|
};
|
|
3472
|
-
for (let
|
|
3473
|
-
const y = p[
|
|
3474
|
-
g[
|
|
3472
|
+
for (let b = 0; b < x; b++) {
|
|
3473
|
+
const y = p[b];
|
|
3474
|
+
g[b] = o(rd, { command: m, formulaFunction: y, handleInsert: u }, `formula-${y.getName()}-${b}`);
|
|
3475
3475
|
}
|
|
3476
3476
|
return ge({ ...l, children: o(B, { ref: a, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: x > 0 ? o(le, { children: o(B, { sx: { overflow: "auto", flex: "1 1 100%" }, children: g }) }) : null }) });
|
|
3477
|
-
})),
|
|
3477
|
+
})), ld = q(X((n, a) => {
|
|
3478
3478
|
const { sx: t, style: e, className: r, licenseKey: l, renderLoadingPanel: c, ...p } = n;
|
|
3479
3479
|
l && Eo.setLicenseKey(l);
|
|
3480
3480
|
const i = W(() => {
|
|
3481
3481
|
const d = { transitionDelay: "160ms", transparentBackground: !0 };
|
|
3482
3482
|
return o(B, { sx: t, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "center", justifyContent: "center", ...e }, children: c?.(d) ?? o(Wt, { ...d }) });
|
|
3483
|
-
}, [t, e, c]), s = W(() => re.lazy(async () => await Promise.resolve().then(() =>
|
|
3483
|
+
}, [t, e, c]), s = W(() => re.lazy(async () => await Promise.resolve().then(() => jd)), []);
|
|
3484
3484
|
return o(le, { children: o(Sa, { fallback: i, children: o(s, { ...p, className: r, renderLoadingPanel: c, sx: t, style: e, ref: a }) }) });
|
|
3485
3485
|
}));
|
|
3486
|
-
function
|
|
3486
|
+
function Oi(n) {
|
|
3487
3487
|
var a, t, e = "";
|
|
3488
3488
|
if (typeof n == "string" || typeof n == "number") e += n;
|
|
3489
|
-
else if (typeof n == "object") if (Array.isArray(n)) for (a = 0; a < n.length; a++) n[a] && (t =
|
|
3489
|
+
else if (typeof n == "object") if (Array.isArray(n)) for (a = 0; a < n.length; a++) n[a] && (t = Oi(n[a])) && (e && (e += " "), e += t);
|
|
3490
3490
|
else for (a in n) n[a] && (e && (e += " "), e += a);
|
|
3491
3491
|
return e;
|
|
3492
3492
|
}
|
|
3493
3493
|
function Vt() {
|
|
3494
|
-
for (var n, a, t = 0, e = ""; t < arguments.length; ) (n = arguments[t++]) && (a =
|
|
3494
|
+
for (var n, a, t = 0, e = ""; t < arguments.length; ) (n = arguments[t++]) && (a = Oi(n)) && (e && (e += " "), e += a);
|
|
3495
3495
|
return e;
|
|
3496
3496
|
}
|
|
3497
|
-
|
|
3498
|
-
let
|
|
3497
|
+
ld.displayName = "Studio";
|
|
3498
|
+
let sd = { data: "" }, cd = (n) => typeof window == "object" ? ((n ? n.querySelector("#_goober") : window._goober) || Object.assign((n || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : n || sd, dd = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, pd = /\/\*[^]*?\*\/| +/g, ia = /\n+/g, It = (n, a) => {
|
|
3499
3499
|
let t = "", e = "", r = "";
|
|
3500
3500
|
for (let l in n) {
|
|
3501
3501
|
let c = n[l];
|
|
3502
3502
|
l[0] == "@" ? l[1] == "i" ? t = l + " " + c + ";" : e += l[1] == "f" ? It(c, l) : l + "{" + It(c, l[1] == "k" ? "" : a) + "}" : typeof c == "object" ? e += It(c, a ? a.replace(/([^,])+/g, (p) => l.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g, (i) => /&/.test(i) ? i.replace(/&/g, p) : p ? p + " " + i : i)) : l) : c != null && (l = /^--/.test(l) ? l : l.replace(/[A-Z]/g, "-$&").toLowerCase(), r += It.p ? It.p(l, c) : l + ":" + c + ";");
|
|
3503
3503
|
}
|
|
3504
3504
|
return t + (a && r ? a + "{" + r + "}" : r) + e;
|
|
3505
|
-
}, pt = {},
|
|
3505
|
+
}, pt = {}, Bi = (n) => {
|
|
3506
3506
|
if (typeof n == "object") {
|
|
3507
3507
|
let a = "";
|
|
3508
|
-
for (let t in n) a += t +
|
|
3508
|
+
for (let t in n) a += t + Bi(n[t]);
|
|
3509
3509
|
return a;
|
|
3510
3510
|
}
|
|
3511
3511
|
return n;
|
|
3512
|
-
},
|
|
3513
|
-
let l =
|
|
3512
|
+
}, ud = (n, a, t, e, r) => {
|
|
3513
|
+
let l = Bi(n), c = pt[l] || (pt[l] = ((i) => {
|
|
3514
3514
|
let s = 0, d = 11;
|
|
3515
3515
|
for (; s < i.length; ) d = 101 * d + i.charCodeAt(s++) >>> 0;
|
|
3516
3516
|
return "go" + d;
|
|
@@ -3518,7 +3518,7 @@ let ld = { data: "" }, sd = (n) => typeof window == "object" ? ((n ? n.querySele
|
|
|
3518
3518
|
if (!pt[c]) {
|
|
3519
3519
|
let i = l !== n ? n : ((s) => {
|
|
3520
3520
|
let d, x, g = [{}];
|
|
3521
|
-
for (; d =
|
|
3521
|
+
for (; d = dd.exec(s.replace(pd, "")); ) d[4] ? g.shift() : d[3] ? (x = d[3].replace(ia, " ").trim(), g.unshift(g[0][x] = g[0][x] || {})) : g[0][d[1]] = d[2].replace(ia, " ").trim();
|
|
3522
3522
|
return g[0];
|
|
3523
3523
|
})(n);
|
|
3524
3524
|
pt[c] = It(r ? { ["@keyframes " + c]: i } : i, t ? "" : "." + c);
|
|
@@ -3530,16 +3530,16 @@ let ld = { data: "" }, sd = (n) => typeof window == "object" ? ((n ? n.querySele
|
|
|
3530
3530
|
};
|
|
3531
3531
|
function Wn(n) {
|
|
3532
3532
|
let a = this || {}, t = n.call ? n(a.p) : n;
|
|
3533
|
-
return
|
|
3533
|
+
return ud(t.unshift ? t.raw ? ((e, r, l) => e.reduce((c, p, i) => {
|
|
3534
3534
|
let s = r[i];
|
|
3535
3535
|
if (s && s.call) {
|
|
3536
3536
|
let d = s(l), x = d && d.props && d.props.className || /^go/.test(d) && d;
|
|
3537
3537
|
s = x ? "." + x : d && typeof d == "object" ? d.props ? "" : It(d, "") : d === !1 ? "" : d;
|
|
3538
3538
|
}
|
|
3539
3539
|
return c + p + (s ?? "");
|
|
3540
|
-
}, ""))(t, [].slice.call(arguments, 1), a.p) : t.reduce((e, r) => Object.assign(e, r && r.call ? r(a.p) : r), {}) : t,
|
|
3540
|
+
}, ""))(t, [].slice.call(arguments, 1), a.p) : t.reduce((e, r) => Object.assign(e, r && r.call ? r(a.p) : r), {}) : t, cd(a.target), a.g, a.o, a.k);
|
|
3541
3541
|
}
|
|
3542
|
-
function
|
|
3542
|
+
function Ai(n, a, t) {
|
|
3543
3543
|
return a && (function(e, r) {
|
|
3544
3544
|
for (var l = 0; l < r.length; l++) {
|
|
3545
3545
|
var c = r[l];
|
|
@@ -3556,7 +3556,7 @@ function Pe() {
|
|
|
3556
3556
|
return n;
|
|
3557
3557
|
}, Pe.apply(this, arguments);
|
|
3558
3558
|
}
|
|
3559
|
-
function
|
|
3559
|
+
function Ii(n, a) {
|
|
3560
3560
|
n.prototype = Object.create(a.prototype), n.prototype.constructor = n, n.__proto__ = a;
|
|
3561
3561
|
}
|
|
3562
3562
|
function Oo(n, a) {
|
|
@@ -3572,7 +3572,7 @@ function la(n) {
|
|
|
3572
3572
|
Wn.bind({ g: 1 }), Wn.bind({ k: 1 });
|
|
3573
3573
|
var sa = function() {
|
|
3574
3574
|
return "";
|
|
3575
|
-
},
|
|
3575
|
+
}, Li = re.createContext({ enqueueSnackbar: sa, closeSnackbar: sa }), Pn = "@media (max-width:599.95px)", Qo = "@media (min-width:600px)", ca = function(n) {
|
|
3576
3576
|
return n.charAt(0).toUpperCase() + n.slice(1);
|
|
3577
3577
|
}, nr = function(n) {
|
|
3578
3578
|
return "" + ca(n.vertical) + ca(n.horizontal);
|
|
@@ -3585,7 +3585,7 @@ var sa = function() {
|
|
|
3585
3585
|
var l, c = e.appear;
|
|
3586
3586
|
return r.appearStatus = null, e.in ? c ? (l = qt, r.appearStatus = Kt) : l = vo : l = e.unmountOnExit || e.mountOnEnter ? Uo : qt, r.state = { status: l }, r.nextCallback = null, r;
|
|
3587
3587
|
}
|
|
3588
|
-
|
|
3588
|
+
Ii(a, n), a.getDerivedStateFromProps = function(e, r) {
|
|
3589
3589
|
return e.in && r.status === Uo ? { status: qt } : null;
|
|
3590
3590
|
};
|
|
3591
3591
|
var t = a.prototype;
|
|
@@ -3647,7 +3647,7 @@ var sa = function() {
|
|
|
3647
3647
|
if (e === Uo) return null;
|
|
3648
3648
|
var r = this.props;
|
|
3649
3649
|
return (0, r.children)(e, Oo(r, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]));
|
|
3650
|
-
},
|
|
3650
|
+
}, Ai(a, [{ key: "node", get: function() {
|
|
3651
3651
|
var e, r = (e = this.props.nodeRef) === null || e === void 0 ? void 0 : e.current;
|
|
3652
3652
|
if (!r) throw new Error("notistack - Custom snackbar is not refForwarding");
|
|
3653
3653
|
return r;
|
|
@@ -3670,20 +3670,20 @@ function en(n) {
|
|
|
3670
3670
|
return { duration: typeof a == "object" ? a[r] || 0 : a, easing: e.transitionTimingFunction, delay: e.transitionDelay };
|
|
3671
3671
|
}
|
|
3672
3672
|
rr.defaultProps = { in: !1, mountOnEnter: !1, unmountOnExit: !1, appear: !1, enter: !0, exit: !0, onEnter: Xt, onEntering: Xt, onEntered: Xt, onExit: Xt, onExiting: Xt, onExited: Xt };
|
|
3673
|
-
var
|
|
3673
|
+
var md = "cubic-bezier(0.4, 0, 0.2, 1)", hd = "cubic-bezier(0.0, 0, 0.2, 1)", gd = "cubic-bezier(0.4, 0, 0.6, 1)", zi = function(n) {
|
|
3674
3674
|
n.scrollTop = n.scrollTop;
|
|
3675
3675
|
}, ua = function(n) {
|
|
3676
3676
|
return Math.round(n) + "ms";
|
|
3677
3677
|
};
|
|
3678
3678
|
function eo(n, a) {
|
|
3679
3679
|
n === void 0 && (n = ["all"]);
|
|
3680
|
-
var t = a || {}, e = t.duration, r = e === void 0 ? 300 : e, l = t.easing, c = l === void 0 ?
|
|
3680
|
+
var t = a || {}, e = t.duration, r = e === void 0 ? 300 : e, l = t.easing, c = l === void 0 ? md : l, p = t.delay, i = p === void 0 ? 0 : p;
|
|
3681
3681
|
return (Array.isArray(n) ? n : [n]).map(function(s) {
|
|
3682
3682
|
var d = typeof r == "string" ? r : ua(r), x = typeof i == "string" ? i : ua(i);
|
|
3683
3683
|
return s + " " + d + " " + c + " " + x;
|
|
3684
3684
|
}).join(",");
|
|
3685
3685
|
}
|
|
3686
|
-
function
|
|
3686
|
+
function Hi(n) {
|
|
3687
3687
|
var a = (function(t) {
|
|
3688
3688
|
return t && t.ownerDocument || document;
|
|
3689
3689
|
})(n);
|
|
@@ -3692,7 +3692,7 @@ function zi(n) {
|
|
|
3692
3692
|
function Go(n, a) {
|
|
3693
3693
|
if (a) {
|
|
3694
3694
|
var t = (function(e, r) {
|
|
3695
|
-
var l, c = r.getBoundingClientRect(), p =
|
|
3695
|
+
var l, c = r.getBoundingClientRect(), p = Hi(r);
|
|
3696
3696
|
if (r.fakeTransform) l = r.fakeTransform;
|
|
3697
3697
|
else {
|
|
3698
3698
|
var i = p.getComputedStyle(r);
|
|
@@ -3717,8 +3717,8 @@ function Go(n, a) {
|
|
|
3717
3717
|
t && (a.style.webkitTransform = t, a.style.transform = t);
|
|
3718
3718
|
}
|
|
3719
3719
|
}
|
|
3720
|
-
var
|
|
3721
|
-
var t = n.children, e = n.direction, r = e === void 0 ? "down" : e, l = n.in, c = n.style, p = n.timeout, i = p === void 0 ? 0 : p, s = n.onEnter, d = n.onEntered, x = n.onExit, g = n.onExited, m = Oo(n, ["children", "direction", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited"]), u = xe(null),
|
|
3720
|
+
var Wi = X(function(n, a) {
|
|
3721
|
+
var t = n.children, e = n.direction, r = e === void 0 ? "down" : e, l = n.in, c = n.style, p = n.timeout, i = p === void 0 ? 0 : p, s = n.onEnter, d = n.onEntered, x = n.onExit, g = n.onExited, m = Oo(n, ["children", "direction", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited"]), u = xe(null), b = jn(t.ref, u), y = jn(b, a), f = U(function() {
|
|
3722
3722
|
u.current && Go(r, u.current);
|
|
3723
3723
|
}, [r]);
|
|
3724
3724
|
return de(function() {
|
|
@@ -3736,43 +3736,43 @@ var Hi = X(function(n, a) {
|
|
|
3736
3736
|
}, D;
|
|
3737
3737
|
})(function() {
|
|
3738
3738
|
u.current && Go(r, u.current);
|
|
3739
|
-
}), w =
|
|
3739
|
+
}), w = Hi(u.current);
|
|
3740
3740
|
return w.addEventListener("resize", h), function() {
|
|
3741
3741
|
h.clear(), w.removeEventListener("resize", h);
|
|
3742
3742
|
};
|
|
3743
3743
|
}
|
|
3744
3744
|
}, [r, l]), de(function() {
|
|
3745
|
-
l ||
|
|
3746
|
-
}, [l,
|
|
3747
|
-
Go(r, h),
|
|
3745
|
+
l || f();
|
|
3746
|
+
}, [l, f]), Ee(rr, Object.assign({ appear: !0, nodeRef: u, onEnter: function(h, w) {
|
|
3747
|
+
Go(r, h), zi(h), s && s(h, w);
|
|
3748
3748
|
}, onEntered: d, onEntering: function(h) {
|
|
3749
|
-
var w = c?.transitionTimingFunction ||
|
|
3749
|
+
var w = c?.transitionTimingFunction || hd, v = en({ timeout: i, mode: "enter", style: Pe({}, c, { transitionTimingFunction: w }) });
|
|
3750
3750
|
h.style.webkitTransition = eo("-webkit-transform", v), h.style.transition = eo("transform", v), h.style.webkitTransform = "none", h.style.transform = "none";
|
|
3751
3751
|
}, onExit: function(h) {
|
|
3752
|
-
var w = c?.transitionTimingFunction ||
|
|
3752
|
+
var w = c?.transitionTimingFunction || gd, v = en({ timeout: i, mode: "exit", style: Pe({}, c, { transitionTimingFunction: w }) });
|
|
3753
3753
|
h.style.webkitTransition = eo("-webkit-transform", v), h.style.transition = eo("transform", v), Go(r, h), x && x(h);
|
|
3754
3754
|
}, onExited: function(h) {
|
|
3755
3755
|
h.style.webkitTransition = "", h.style.transition = "", g && g(h);
|
|
3756
3756
|
}, in: l, timeout: i }, m), function(h, w) {
|
|
3757
|
-
return
|
|
3757
|
+
return Kl(t, Pe({ ref: y, style: Pe({ visibility: h !== "exited" || l ? void 0 : "hidden" }, c, {}, t.props.style) }, w));
|
|
3758
3758
|
});
|
|
3759
3759
|
});
|
|
3760
|
-
|
|
3760
|
+
Wi.displayName = "Slide";
|
|
3761
3761
|
var pn = function(n) {
|
|
3762
3762
|
return re.createElement("svg", Object.assign({ viewBox: "0 0 24 24", focusable: "false", style: { fontSize: 20, marginInlineEnd: 8, userSelect: "none", width: "1em", height: "1em", display: "inline-block", fill: "currentColor", flexShrink: 0 } }, n));
|
|
3763
|
-
},
|
|
3763
|
+
}, fd = function() {
|
|
3764
3764
|
return re.createElement(pn, null, re.createElement("path", { d: `M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41
|
|
3765
3765
|
10.59L10 14.17L17.59 6.58L19 8L10 17Z` }));
|
|
3766
|
-
}, fd = function() {
|
|
3767
|
-
return re.createElement(pn, null, re.createElement("path", { d: "M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z" }));
|
|
3768
3766
|
}, bd = function() {
|
|
3767
|
+
return re.createElement(pn, null, re.createElement("path", { d: "M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z" }));
|
|
3768
|
+
}, xd = function() {
|
|
3769
3769
|
return re.createElement(pn, null, re.createElement("path", { d: `M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,
|
|
3770
3770
|
6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
|
|
3771
3771
|
13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z` }));
|
|
3772
|
-
},
|
|
3772
|
+
}, yd = function() {
|
|
3773
3773
|
return re.createElement(pn, null, re.createElement("path", { d: `M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
|
|
3774
3774
|
0 22,12A10,10 0 0,0 12,2Z` }));
|
|
3775
|
-
}, At = { maxSnack: 3, persist: !1, hideIconVariant: !1, disableWindowBlurListener: !1, variant: "default", autoHideDuration: 5e3, iconVariant: { default: void 0, success: re.createElement(
|
|
3775
|
+
}, At = { maxSnack: 3, persist: !1, hideIconVariant: !1, disableWindowBlurListener: !1, variant: "default", autoHideDuration: 5e3, iconVariant: { default: void 0, success: re.createElement(fd, null), warning: re.createElement(bd, null), error: re.createElement(xd, null), info: re.createElement(yd, null) }, anchorOrigin: { vertical: "bottom", horizontal: "left" }, TransitionComponent: Wi, transitionDuration: { enter: 225, exit: 195 } }, wd = function(n, a) {
|
|
3776
3776
|
return function(t, e) {
|
|
3777
3777
|
return e === void 0 && (e = !1), e ? Pe({}, At[t], {}, a[t], {}, n[t]) : t === "autoHideDuration" ? (r = n.autoHideDuration, l = a.autoHideDuration, (c = function(p) {
|
|
3778
3778
|
return typeof p == "number" || p === null;
|
|
@@ -3793,9 +3793,9 @@ function Bo(n) {
|
|
|
3793
3793
|
return Pe({}, a, ((e = {})[r] = Wn(l), e));
|
|
3794
3794
|
}, {});
|
|
3795
3795
|
}
|
|
3796
|
-
var
|
|
3796
|
+
var Sd = "notistack-SnackbarContainer", vd = "notistack-Snackbar", ji = "notistack-CollapseWrapper", kd = "notistack-MuiContent", Cd = function(n) {
|
|
3797
3797
|
return "notistack-MuiContent-" + n;
|
|
3798
|
-
}, ma = Bo({ root: { height: 0 }, entered: { height: "auto" } }), Rn = "0px",
|
|
3798
|
+
}, ma = Bo({ root: { height: 0 }, entered: { height: "auto" } }), Rn = "0px", $i = X(function(n, a) {
|
|
3799
3799
|
var t = n.children, e = n.in, r = n.onExited, l = xe(null), c = xe(null), p = jn(a, c), i = function() {
|
|
3800
3800
|
return l.current ? l.current.clientHeight : 0;
|
|
3801
3801
|
};
|
|
@@ -3809,17 +3809,17 @@ var wd = "notistack-SnackbarContainer", Sd = "notistack-Snackbar", Wi = "notista
|
|
|
3809
3809
|
}, onExit: function(s) {
|
|
3810
3810
|
s.style.height = i() + "px";
|
|
3811
3811
|
}, onExited: r, onExiting: function(s) {
|
|
3812
|
-
|
|
3812
|
+
zi(s);
|
|
3813
3813
|
var d = en({ timeout: 175, mode: "exit" }), x = d.duration, g = d.easing;
|
|
3814
3814
|
s.style.transitionDuration = typeof x == "string" ? x : x + "ms", s.style.height = Rn, s.style.transitionTimingFunction = g || "";
|
|
3815
3815
|
}, nodeRef: c, timeout: 175 }, function(s, d) {
|
|
3816
|
-
return Ee("div", Object.assign({ ref: p, className: Vt(ma.root, s === "entered" && ma.entered), style: Pe({ pointerEvents: "all", overflow: "hidden", minHeight: Rn, transition: eo("height") }, s === "entered" && { overflow: "visible" }, {}, s === "exited" && !e && { visibility: "hidden" }) }, d), Ee("div", { ref: l, className:
|
|
3816
|
+
return Ee("div", Object.assign({ ref: p, className: Vt(ma.root, s === "entered" && ma.entered), style: Pe({ pointerEvents: "all", overflow: "hidden", minHeight: Rn, transition: eo("height") }, s === "entered" && { overflow: "visible" }, {}, s === "exited" && !e && { visibility: "hidden" }) }, d), Ee("div", { ref: l, className: ji, style: { display: "flex", width: "100%" } }, t));
|
|
3817
3817
|
});
|
|
3818
3818
|
});
|
|
3819
|
-
|
|
3820
|
-
var ha = { right: "left", left: "right", bottom: "up", top: "down" },
|
|
3819
|
+
$i.displayName = "Collapse";
|
|
3820
|
+
var ha = { right: "left", left: "right", bottom: "up", top: "down" }, Td = function(n) {
|
|
3821
3821
|
return "anchorOrigin" + nr(n);
|
|
3822
|
-
},
|
|
3822
|
+
}, Ed = function() {
|
|
3823
3823
|
};
|
|
3824
3824
|
function Mo(n, a) {
|
|
3825
3825
|
return n.reduce(function(t, e) {
|
|
@@ -3828,57 +3828,57 @@ function Mo(n, a) {
|
|
|
3828
3828
|
var p = [].concat(l);
|
|
3829
3829
|
a && p.indexOf(a) === -1 && p.push(a), t.apply(this, p), e.apply(this, p);
|
|
3830
3830
|
};
|
|
3831
|
-
},
|
|
3831
|
+
}, Ed);
|
|
3832
3832
|
}
|
|
3833
|
-
var
|
|
3833
|
+
var Dd = typeof window < "u" ? St : de;
|
|
3834
3834
|
function ga(n) {
|
|
3835
3835
|
var a = xe(n);
|
|
3836
|
-
return
|
|
3836
|
+
return Dd(function() {
|
|
3837
3837
|
a.current = n;
|
|
3838
3838
|
}), U(function() {
|
|
3839
3839
|
return a.current.apply(void 0, arguments);
|
|
3840
3840
|
}, []);
|
|
3841
3841
|
}
|
|
3842
|
-
var Mn,
|
|
3842
|
+
var Mn, Vi = X(function(n, a) {
|
|
3843
3843
|
var t = n.children, e = n.className, r = n.autoHideDuration, l = n.disableWindowBlurListener, c = l !== void 0 && l, p = n.onClose, i = n.id, s = n.open, d = n.SnackbarProps, x = d === void 0 ? {} : d, g = xe(), m = ga(function() {
|
|
3844
3844
|
p && p.apply(void 0, arguments);
|
|
3845
|
-
}), u = ga(function(
|
|
3846
|
-
p &&
|
|
3845
|
+
}), u = ga(function(f) {
|
|
3846
|
+
p && f != null && (g.current && clearTimeout(g.current), g.current = setTimeout(function() {
|
|
3847
3847
|
m(null, "timeout", i);
|
|
3848
|
-
},
|
|
3848
|
+
}, f));
|
|
3849
3849
|
});
|
|
3850
3850
|
de(function() {
|
|
3851
3851
|
return s && u(r), function() {
|
|
3852
3852
|
g.current && clearTimeout(g.current);
|
|
3853
3853
|
};
|
|
3854
3854
|
}, [s, r, u]);
|
|
3855
|
-
var
|
|
3855
|
+
var b = function() {
|
|
3856
3856
|
g.current && clearTimeout(g.current);
|
|
3857
3857
|
}, y = U(function() {
|
|
3858
3858
|
r != null && u(0.5 * r);
|
|
3859
3859
|
}, [r, u]);
|
|
3860
3860
|
return de(function() {
|
|
3861
|
-
if (!c && s) return window.addEventListener("focus", y), window.addEventListener("blur",
|
|
3862
|
-
window.removeEventListener("focus", y), window.removeEventListener("blur",
|
|
3861
|
+
if (!c && s) return window.addEventListener("focus", y), window.addEventListener("blur", b), function() {
|
|
3862
|
+
window.removeEventListener("focus", y), window.removeEventListener("blur", b);
|
|
3863
3863
|
};
|
|
3864
|
-
}, [c, y, s]), Ee("div", Object.assign({ ref: a }, x, { className: Vt(
|
|
3865
|
-
x.onMouseEnter && x.onMouseEnter(
|
|
3866
|
-
}, onMouseLeave: function(
|
|
3867
|
-
x.onMouseLeave && x.onMouseLeave(
|
|
3864
|
+
}, [c, y, s]), Ee("div", Object.assign({ ref: a }, x, { className: Vt(vd, e), onMouseEnter: function(f) {
|
|
3865
|
+
x.onMouseEnter && x.onMouseEnter(f), b();
|
|
3866
|
+
}, onMouseLeave: function(f) {
|
|
3867
|
+
x.onMouseLeave && x.onMouseLeave(f), y();
|
|
3868
3868
|
} }), t);
|
|
3869
3869
|
});
|
|
3870
|
-
|
|
3871
|
-
var
|
|
3870
|
+
Vi.displayName = "Snackbar";
|
|
3871
|
+
var Pd = Bo({ root: (Mn = { display: "flex", flexWrap: "wrap", flexGrow: 1 }, Mn[Qo] = { flexGrow: "initial", minWidth: "288px" }, Mn) }), ar = X(function(n, a) {
|
|
3872
3872
|
var t = n.className, e = Oo(n, ["className"]);
|
|
3873
|
-
return re.createElement("div", Object.assign({ ref: a, className: Vt(
|
|
3873
|
+
return re.createElement("div", Object.assign({ ref: a, className: Vt(Pd.root, t) }, e));
|
|
3874
3874
|
});
|
|
3875
3875
|
ar.displayName = "SnackbarContent";
|
|
3876
|
-
var ko = Bo({ root: { backgroundColor: "#313131", fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em", color: "#fff", alignItems: "center", padding: "6px 16px", borderRadius: "4px", boxShadow: "0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)" }, lessPadding: { paddingLeft: "20px" }, default: { backgroundColor: "#313131" }, success: { backgroundColor: "#43a047" }, error: { backgroundColor: "#d32f2f" }, warning: { backgroundColor: "#ff9800" }, info: { backgroundColor: "#2196f3" }, message: { display: "flex", alignItems: "center", padding: "8px 0" }, action: { display: "flex", alignItems: "center", marginLeft: "auto", paddingLeft: "16px", marginRight: "-8px" } }), fa = "notistack-snackbar",
|
|
3876
|
+
var ko = Bo({ root: { backgroundColor: "#313131", fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em", color: "#fff", alignItems: "center", padding: "6px 16px", borderRadius: "4px", boxShadow: "0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)" }, lessPadding: { paddingLeft: "20px" }, default: { backgroundColor: "#313131" }, success: { backgroundColor: "#43a047" }, error: { backgroundColor: "#d32f2f" }, warning: { backgroundColor: "#ff9800" }, info: { backgroundColor: "#2196f3" }, message: { display: "flex", alignItems: "center", padding: "8px 0" }, action: { display: "flex", alignItems: "center", marginLeft: "auto", paddingLeft: "16px", marginRight: "-8px" } }), fa = "notistack-snackbar", _i = X(function(n, a) {
|
|
3877
3877
|
var t = n.id, e = n.message, r = n.action, l = n.iconVariant, c = n.variant, p = n.hideIconVariant, i = n.style, s = n.className, d = l[c], x = r;
|
|
3878
|
-
return typeof x == "function" && (x = x(t)), re.createElement(ar, { ref: a, role: "alert", "aria-describedby": fa, style: i, className: Vt(
|
|
3878
|
+
return typeof x == "function" && (x = x(t)), re.createElement(ar, { ref: a, role: "alert", "aria-describedby": fa, style: i, className: Vt(kd, Cd(c), ko.root, ko[c], s, !p && d && ko.lessPadding) }, re.createElement("div", { id: fa, className: ko.message }, p ? null : d, e), x && re.createElement("div", { className: ko.action }, x));
|
|
3879
3879
|
});
|
|
3880
|
-
|
|
3881
|
-
var Co, Nn, qo, Ko, Fn,
|
|
3880
|
+
_i.displayName = "MaterialDesignContent";
|
|
3881
|
+
var Co, Nn, qo, Ko, Fn, Rd = q(_i), Md = Bo({ wrappedRoot: { width: "100%", position: "relative", transform: "translateX(0)", top: 0, right: 0, bottom: 0, left: 0, minWidth: "288px" } }), Nd = function(n) {
|
|
3882
3882
|
var a = xe(), t = _(!0), e = t[0], r = t[1], l = Mo([n.snack.onClose, n.onClose]), c = U(function() {
|
|
3883
3883
|
a.current = setTimeout(function() {
|
|
3884
3884
|
r(function(T) {
|
|
@@ -3891,7 +3891,7 @@ var Co, Nn, qo, Ko, Fn, Pd = q(Vi), Rd = Bo({ wrappedRoot: { width: "100%", posi
|
|
|
3891
3891
|
a.current && clearTimeout(a.current);
|
|
3892
3892
|
};
|
|
3893
3893
|
}, []);
|
|
3894
|
-
var p, i = n.snack, s = n.classes, d = n.Component, x = d === void 0 ?
|
|
3894
|
+
var p, i = n.snack, s = n.classes, d = n.Component, x = d === void 0 ? Rd : d, g = W(function() {
|
|
3895
3895
|
return (function(T) {
|
|
3896
3896
|
T === void 0 && (T = {});
|
|
3897
3897
|
var P = { containerRoot: !0, containerAnchorOriginTopCenter: !0, containerAnchorOriginBottomCenter: !0, containerAnchorOriginTopRight: !0, containerAnchorOriginBottomRight: !0, containerAnchorOriginTopLeft: !0, containerAnchorOriginBottomLeft: !0 };
|
|
@@ -3902,34 +3902,34 @@ var Co, Nn, qo, Ko, Fn, Pd = q(Vi), Rd = Bo({ wrappedRoot: { width: "100%", posi
|
|
|
3902
3902
|
return Pe({}, R, ((E = {})[k] = T[k], E));
|
|
3903
3903
|
}, {});
|
|
3904
3904
|
})(s);
|
|
3905
|
-
}, [s]), m = i.open, u = i.SnackbarProps,
|
|
3905
|
+
}, [s]), m = i.open, u = i.SnackbarProps, b = i.TransitionComponent, y = i.TransitionProps, f = i.transitionDuration, h = i.disableWindowBlurListener, w = i.content, v = Oo(i, ["open", "SnackbarProps", "TransitionComponent", "TransitionProps", "transitionDuration", "disableWindowBlurListener", "content", "entered", "requestClose", "onEnter", "onEntered", "onExit", "onExited"]), S = Pe({ direction: (p = v.anchorOrigin, p.horizontal !== "center" ? ha[p.horizontal] : ha[p.vertical]), timeout: f }, y), C = w;
|
|
3906
3906
|
typeof C == "function" && (C = C(v.id, v.message));
|
|
3907
3907
|
var D = ["onEnter", "onEntered", "onExit", "onExited"].reduce(function(T, P) {
|
|
3908
3908
|
var R;
|
|
3909
3909
|
return Pe({}, T, ((R = {})[P] = Mo([n.snack[P], n[P]], v.id), R));
|
|
3910
3910
|
}, {});
|
|
3911
|
-
return re.createElement(
|
|
3911
|
+
return re.createElement($i, { in: e, onExited: D.onExited }, re.createElement(Vi, { open: m, id: v.id, disableWindowBlurListener: h, autoHideDuration: v.autoHideDuration, className: Vt(Md.wrappedRoot, g.root, g[Td(v.anchorOrigin)]), SnackbarProps: u, onClose: l }, re.createElement(b, Object.assign({}, S, { appear: !0, in: m, onExit: D.onExit, onExited: c, onEnter: D.onEnter, onEntered: Mo([D.onEntered, function() {
|
|
3912
3912
|
n.snack.requestClose && l(null, "instructed", n.snack.id);
|
|
3913
3913
|
}], v.id) }), C || re.createElement(x, Object.assign({}, v)))));
|
|
3914
|
-
}, To = { default: 20 }, Xo = { default: 6, dense: 2 }, ba = "." +
|
|
3915
|
-
var a = n.classes, t = a === void 0 ? {} : a, e = n.anchorOrigin, r = n.dense, l = n.children, c = Vt(
|
|
3914
|
+
}, To = { default: 20 }, Xo = { default: 6, dense: 2 }, ba = "." + ji, Yo = Bo({ root: (Co = { boxSizing: "border-box", display: "flex", maxHeight: "100%", position: "fixed", zIndex: 1400, height: "auto", width: "auto", transition: eo(["top", "right", "bottom", "left", "max-width"], { duration: 300, easing: "ease" }), pointerEvents: "none" }, Co[ba] = { padding: Xo.default + "px 0px", transition: "padding 300ms ease 0ms" }, Co.maxWidth = "calc(100% - " + 2 * To.default + "px)", Co[Pn] = { width: "100%", maxWidth: "calc(100% - 32px)" }, Co), rootDense: (Nn = {}, Nn[ba] = { padding: Xo.dense + "px 0px" }, Nn), top: { top: To.default - Xo.default + "px", flexDirection: "column" }, bottom: { bottom: To.default - Xo.default + "px", flexDirection: "column-reverse" }, left: (qo = { left: To.default + "px" }, qo[Qo] = { alignItems: "flex-start" }, qo[Pn] = { left: "16px" }, qo), right: (Ko = { right: To.default + "px" }, Ko[Qo] = { alignItems: "flex-end" }, Ko[Pn] = { right: "16px" }, Ko), center: (Fn = { left: "50%", transform: "translateX(-50%)" }, Fn[Qo] = { alignItems: "center" }, Fn) }), Fd = q(function(n) {
|
|
3915
|
+
var a = n.classes, t = a === void 0 ? {} : a, e = n.anchorOrigin, r = n.dense, l = n.children, c = Vt(Sd, Yo[e.vertical], Yo[e.horizontal], Yo.root, t.containerRoot, t["containerAnchorOrigin" + nr(e)], r && Yo.rootDense);
|
|
3916
3916
|
return re.createElement("div", { className: c }, l);
|
|
3917
3917
|
}), xa = function(n) {
|
|
3918
3918
|
return !(typeof n == "string" || qn(n));
|
|
3919
|
-
},
|
|
3919
|
+
}, Od = (function(n) {
|
|
3920
3920
|
function a(t) {
|
|
3921
3921
|
var e;
|
|
3922
3922
|
return (e = n.call(this, t) || this).enqueueSnackbar = function(r, l) {
|
|
3923
3923
|
if (l === void 0 && (l = {}), r == null) throw new Error("enqueueSnackbar called with invalid argument");
|
|
3924
|
-
var c = xa(r) ? r : l, p = xa(r) ? r.message : r, i = c.key, s = c.preventDuplicate, d = Oo(c, ["key", "preventDuplicate"]), x = _o(i), g = x ? i : (/* @__PURE__ */ new Date()).getTime() + Math.random(), m =
|
|
3925
|
-
return u.persist && (u.autoHideDuration = void 0), e.setState(function(
|
|
3924
|
+
var c = xa(r) ? r : l, p = xa(r) ? r.message : r, i = c.key, s = c.preventDuplicate, d = Oo(c, ["key", "preventDuplicate"]), x = _o(i), g = x ? i : (/* @__PURE__ */ new Date()).getTime() + Math.random(), m = wd(d, e.props), u = Pe({ id: g }, d, { message: p, open: !0, entered: !1, requestClose: !1, persist: m("persist"), action: m("action"), content: m("content"), variant: m("variant"), anchorOrigin: m("anchorOrigin"), disableWindowBlurListener: m("disableWindowBlurListener"), autoHideDuration: m("autoHideDuration"), hideIconVariant: m("hideIconVariant"), TransitionComponent: m("TransitionComponent"), transitionDuration: m("transitionDuration"), TransitionProps: m("TransitionProps", !0), iconVariant: m("iconVariant", !0), style: m("style", !0), SnackbarProps: m("SnackbarProps", !0), className: Vt(e.props.className, d.className) });
|
|
3925
|
+
return u.persist && (u.autoHideDuration = void 0), e.setState(function(b) {
|
|
3926
3926
|
if (s === void 0 && e.props.preventDuplicate || s) {
|
|
3927
3927
|
var y = function(w) {
|
|
3928
3928
|
return x ? w.id === g : w.message === p;
|
|
3929
|
-
},
|
|
3930
|
-
if (
|
|
3929
|
+
}, f = b.queue.findIndex(y) > -1, h = b.snacks.findIndex(y) > -1;
|
|
3930
|
+
if (f || h) return b;
|
|
3931
3931
|
}
|
|
3932
|
-
return e.handleDisplaySnack(Pe({},
|
|
3932
|
+
return e.handleDisplaySnack(Pe({}, b, { queue: [].concat(b.queue, [u]) }));
|
|
3933
3933
|
}), g;
|
|
3934
3934
|
}, e.handleDisplaySnack = function(r) {
|
|
3935
3935
|
return r.snacks.length >= e.maxSnack ? e.handleDismissOldest(r) : e.processQueue(r);
|
|
@@ -3981,26 +3981,26 @@ var Co, Nn, qo, Ko, Fn, Pd = q(Vi), Rd = Bo({ wrappedRoot: { width: "100%", posi
|
|
|
3981
3981
|
});
|
|
3982
3982
|
}, e.enqueueSnackbar, e.closeSnackbar, e.state = { snacks: [], queue: [], contextValue: { enqueueSnackbar: e.enqueueSnackbar.bind(la(e)), closeSnackbar: e.closeSnackbar.bind(la(e)) } }, e;
|
|
3983
3983
|
}
|
|
3984
|
-
return
|
|
3985
|
-
var t = this, e = this.state.contextValue, r = this.props, l = r.domRoot, c = r.children, p = r.dense, i = p !== void 0 && p, s = r.Components, d = s === void 0 ? {} : s, x = r.classes, g = this.state.snacks.reduce(function(u,
|
|
3986
|
-
var y,
|
|
3987
|
-
return Pe({}, u, ((y = {})[
|
|
3984
|
+
return Ii(a, n), a.prototype.render = function() {
|
|
3985
|
+
var t = this, e = this.state.contextValue, r = this.props, l = r.domRoot, c = r.children, p = r.dense, i = p !== void 0 && p, s = r.Components, d = s === void 0 ? {} : s, x = r.classes, g = this.state.snacks.reduce(function(u, b) {
|
|
3986
|
+
var y, f = nr(b.anchorOrigin), h = u[f] || [];
|
|
3987
|
+
return Pe({}, u, ((y = {})[f] = [].concat(h, [b]), y));
|
|
3988
3988
|
}, {}), m = Object.keys(g).map(function(u) {
|
|
3989
|
-
var
|
|
3990
|
-
return re.createElement(
|
|
3991
|
-
return re.createElement(
|
|
3989
|
+
var b = g[u], y = b[0];
|
|
3990
|
+
return re.createElement(Fd, { key: u, dense: i, anchorOrigin: y.anchorOrigin, classes: x }, b.map(function(f) {
|
|
3991
|
+
return re.createElement(Nd, { key: f.id, snack: f, classes: x, Component: d[f.variant], onClose: t.handleCloseSnack, onEnter: t.props.onEnter, onExit: t.props.onExit, onExited: Mo([t.handleExitedSnack, t.props.onExited], f.id), onEntered: Mo([t.handleEnteredSnack, t.props.onEntered], f.id) });
|
|
3992
3992
|
}));
|
|
3993
3993
|
});
|
|
3994
|
-
return re.createElement(
|
|
3995
|
-
},
|
|
3994
|
+
return re.createElement(Li.Provider, { value: e }, c, l ? Ds(m, l) : m);
|
|
3995
|
+
}, Ai(a, [{ key: "maxSnack", get: function() {
|
|
3996
3996
|
return this.props.maxSnack || At.maxSnack;
|
|
3997
3997
|
} }]), a;
|
|
3998
|
-
})(
|
|
3999
|
-
return
|
|
3998
|
+
})(Xl), Ui = function() {
|
|
3999
|
+
return ql(Li);
|
|
4000
4000
|
};
|
|
4001
|
-
const
|
|
4002
|
-
class
|
|
4003
|
-
constructor(a =
|
|
4001
|
+
const Bd = [{ key: "SheetXL", description: "SheetXL", mimeType: ".sxl", exts: ["sxl"], handler: null, isDefault: !0 }, { key: "CSV", description: "Comma Delimited", mimeType: "text/csv", exts: ["csv"], handler: null }, { key: "Excel", description: "Excel Workbook", mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", exts: ["xlsx", "xls", "xlsm"], handler: null }], Ad = [{ key: "SheetXL", mimeType: "application/vnd.sheetxl.sheet", description: "SheetXL", ext: "sxl", handler: null, isDefault: !0 }, { key: "CSV", mimeType: "text/csv", description: "Comma Delimited", ext: "csv", handler: null }, { key: "Excel", mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", description: "Excel Workbook", ext: "xlsx", tags: ["SheetJS Pro"], handler: null }];
|
|
4002
|
+
class Id {
|
|
4003
|
+
constructor(a = Bd, t = Ad) {
|
|
4004
4004
|
this._readFormatType = [], this._writeFormatType = [], this._readFormatType = Object.freeze([...a]), this._writeFormatType = Object.freeze([...t]);
|
|
4005
4005
|
}
|
|
4006
4006
|
getReadFormats() {
|
|
@@ -4041,24 +4041,24 @@ class Ad {
|
|
|
4041
4041
|
}
|
|
4042
4042
|
}
|
|
4043
4043
|
}
|
|
4044
|
-
const Lt = new
|
|
4045
|
-
const { id: t, message: e, iconVariant: r, error: l, hideIconVariant: c, ...p } = n, { closeSnackbar: i } =
|
|
4046
|
-
x((
|
|
4047
|
-
}, []),
|
|
4044
|
+
const Lt = new Id(), ut = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, Gi = q(X((n, a) => {
|
|
4045
|
+
const { id: t, message: e, iconVariant: r, error: l, hideIconVariant: c, ...p } = n, { closeSnackbar: i } = Ui(), s = Xe(), [d, x] = _(!1), g = Ps.collectErrorChain(l, !0)?.[0]?.error, m = g && !(g instanceof Rs), u = U(() => {
|
|
4046
|
+
x((f) => !f);
|
|
4047
|
+
}, []), b = U(() => {
|
|
4048
4048
|
i(t);
|
|
4049
4049
|
}, [t, i]);
|
|
4050
|
-
let
|
|
4051
|
-
return !
|
|
4052
|
-
});
|
|
4053
|
-
|
|
4054
|
-
const
|
|
4050
|
+
let y = g?.message;
|
|
4051
|
+
return !y && qn(e) && (y = e), y || typeof e != "string" || (y = e), y || (y = `Unknown Error: ${e}`), o(ar, { ref: a, className: Ce(ut.root, "error-snackbar"), children: H(es, { className: ut.card, style: { backgroundColor: s.palette.error.dark, border: `1px solid ${s.palette.error.dark}` }, children: [H(ts, { className: ut.actionRoot, children: [c ? null : r?.error, o(Re, { variant: "body2", component: "div", className: ut.typography, children: y }), o("div", { style: { flex: "1 1 auto" } }), H("div", { className: ut.icons, children: [m ? o(st, { "aria-label": "Show more", size: "small", className: Ce(ut.expand, { [ut.expandOpen]: d }), onClick: u, children: o(he, { iconKey: "ExpandMore" }) }) : null, o(st, { size: "small", className: ut.expand, onClick: b, children: o(he, { iconKey: "Close", style: { transform: "scale(0.8)" } }) })] })] }), m ? o(os, { in: d, timeout: "auto", children: o("div", { className: ut.stackTraceContainer, style: { backgroundColor: s.palette.error.light, borderTop: `1px solid ${s.palette.error.main}` }, children: o(us, { error: l, hideLineNumbers: !0 }) }) }) : null] }) });
|
|
4052
|
+
}));
|
|
4053
|
+
Gi.displayName = "ToastError";
|
|
4054
|
+
const qi = q(X((n, a) => {
|
|
4055
4055
|
const { commands: t, commandHook: e, scope: r = "workbook", disabled: l = !1, ...c } = n, p = Y((s) => {
|
|
4056
4056
|
const d = { variant: ie.Menuitem, parentFloat: s.floatReference, commandHook: e, scope: r, disabled: l }, x = H(le, { children: [o(O, { ...d, command: t.getCommand("newWorkbook") }), o(J, { orientation: "horizontal" }), o(O, { ...d, command: t.getCommand("openWorkbook") }), o(ve, { ...d, commands: t, quickCommand: "saveWorkbook", createPopupPanel: (g) => {
|
|
4057
4057
|
const m = { ...d, parentFloat: g.floatReference, scope: "saveWorkbook" }, u = [];
|
|
4058
|
-
return Lt.getWriteFormats().forEach((
|
|
4059
|
-
if (
|
|
4060
|
-
const y =
|
|
4061
|
-
|
|
4058
|
+
return Lt.getWriteFormats().forEach((b) => {
|
|
4059
|
+
if (b.isDefault) return;
|
|
4060
|
+
const y = b.key, f = t.getCommand(`saveWorkbookAs${y}`);
|
|
4061
|
+
f ? u.push(Ee(O, { ...m, key: y, command: f })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${y}'`);
|
|
4062
4062
|
}), ge({ ...g, children: u, onClick: () => {
|
|
4063
4063
|
g.closeFloatAll();
|
|
4064
4064
|
} });
|
|
@@ -4069,23 +4069,23 @@ const Gi = q(X((n, a) => {
|
|
|
4069
4069
|
}, [l, t, e, r]), i = "File";
|
|
4070
4070
|
return o(ve, { commands: t, disabled: l, commandHook: e, scope: r, label: i, tooltip: "Options for saving and loading the workbook.", sx: { paddingBottom: "0px", "& button": { paddingTop: "0px", paddingBottom: "0px", height: (s) => `calc(1.25rem + ${s.spacing(2)}px)` } }, ...c, createPopupPanel: p, icon: o(nn, { className: "label", icon: null, label: i }) });
|
|
4071
4071
|
}));
|
|
4072
|
-
|
|
4073
|
-
const
|
|
4072
|
+
qi.displayName = "StandaloneFileCommandButton";
|
|
4073
|
+
const Ld = o(ot, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: o(B, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: o($l, { onClick: () => {
|
|
4074
4074
|
window?.open("https://www.sheetxl.com", "_blank");
|
|
4075
|
-
}, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }),
|
|
4076
|
-
const { commands: t, workbook: e, logo: r =
|
|
4075
|
+
}, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), Ki = q(X((n, a) => {
|
|
4076
|
+
const { commands: t, workbook: e, logo: r = Ld, mainElement: l, showFileMenu: c = !0, showAppearanceMenu: p = !0, ...i } = n, { reference: s } = ao(), [d, { width: x }] = zt(), g = x < 530, m = c ? o(qi, { commands: t, commandHook: { beforeExecute() {
|
|
4077
4077
|
s?.closeAll();
|
|
4078
|
-
}, onError(
|
|
4079
|
-
} } }) : null, u = p ? o(
|
|
4078
|
+
}, onError(f, h, w) {
|
|
4079
|
+
} } }) : null, u = p ? o(od, { commands: t, commandHook: { beforeExecute() {
|
|
4080
4080
|
s?.closeAll();
|
|
4081
|
-
}, onError(
|
|
4082
|
-
} } }) : null,
|
|
4083
|
-
return o(B, { ref: $t([y, d, a]), ...i, children: Ci({ commands: t, renderCompact: g, workbook: e, selectWrapper: (
|
|
4081
|
+
}, onError(f, h, w) {
|
|
4082
|
+
} } }) : null, b = W(() => ({ paddingLeft: (f) => f.spacing(1), paddingRight: (f) => f.spacing(1) }), []), y = xe(null);
|
|
4083
|
+
return o(B, { ref: $t([y, d, a]), ...i, children: Ci({ commands: t, renderCompact: g, workbook: e, selectWrapper: (f) => H(B, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (h) => h.spacing(1), paddingLeft: (h) => h.spacing(1), paddingRight: (h) => h.spacing(1) }, children: [H(B, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (h) => h.spacing(0.5) }, children: [r, H(B, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (h) => h.spacing(0.25) }, children: [m, f] })] }), o(B, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: l }), o(B, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: g && !u ? "0 0 auto" : "1 1 100%" }, children: u })] }), selectProps: b, toolbarsProps: { Home: { sx: {} } } }) });
|
|
4084
4084
|
}));
|
|
4085
|
-
|
|
4086
|
-
const
|
|
4087
|
-
const { workbook: a, setWorkbook: t, refWorkbookTitle: e, titleWorkbook: r, setWorkbookTitle: l, titlePlaceHolder: c, children: p, undoManager: i, commands: s, importExportDisabled: d, themeOptions: x } = n, g = ((
|
|
4088
|
-
const { workbook: y, setWorkbook:
|
|
4085
|
+
Ki.displayName = "StudioToolbar";
|
|
4086
|
+
const Xi = q((n) => {
|
|
4087
|
+
const { workbook: a, setWorkbook: t, refWorkbookTitle: e, titleWorkbook: r, setWorkbookTitle: l, titlePlaceHolder: c, children: p, undoManager: i, commands: s, importExportDisabled: d, themeOptions: x } = n, g = ((b) => {
|
|
4088
|
+
const { workbook: y, setWorkbook: f, importExportDisabled: h, workbookTitle: w = "export", setWorkbookTitle: v, requestWorkbookTitle: S, themeOptions: C, undoManager: D, commands: T, onExecute: P } = b, R = sn(), k = Y(C?.onModeChange, [C?.onModeChange]), E = Y(C?.onEnabledDarkGridChange, [C?.onEnabledDarkGridChange]), M = Y(C?.onEnabledDarkImagesChange, [C?.onEnabledDarkImagesChange]), I = Y(async (j = null, K = null) => {
|
|
4089
4089
|
const ee = [];
|
|
4090
4090
|
let V, A = null, Z = null;
|
|
4091
4091
|
if (typeof j == "string" ? Z = j : A = j, V = A ? j : await to.openFileDialog(Z ?? Lt.getAllReadFormatTypeAsString().join(",")), !V) return null;
|
|
@@ -4131,7 +4131,7 @@ const Ki = q((n) => {
|
|
|
4131
4131
|
if (!Ve) return void R.showMessage("The file appears to be blank.");
|
|
4132
4132
|
Ve = Ve.getUnion(Fe), await y.getSheets().add({ name: Se, autoSelect: !0 }).getRange(Fe).copyFrom(Ve);
|
|
4133
4133
|
}, `Import CSV '${Z}'`);
|
|
4134
|
-
} else y?.close(), v?.(Z),
|
|
4134
|
+
} else y?.close(), v?.(Z), f(oe);
|
|
4135
4135
|
} catch (A) {
|
|
4136
4136
|
R.showError(A);
|
|
4137
4137
|
}
|
|
@@ -4159,7 +4159,7 @@ const Ki = q((n) => {
|
|
|
4159
4159
|
let j = null;
|
|
4160
4160
|
return j = T ? T.createChildGroup(L, "standaloneWorkbook", !1) : new Jn(L, "standaloneWorkbook"), j.addCommands(F, !0), j;
|
|
4161
4161
|
}, [T, F]);
|
|
4162
|
-
|
|
4162
|
+
vs({ manager: D, commands: z });
|
|
4163
4163
|
const ae = Da("(prefers-color-scheme: dark)"), { themeMode: Q } = Ra();
|
|
4164
4164
|
de(() => {
|
|
4165
4165
|
if (!C || !z) return;
|
|
@@ -4174,10 +4174,10 @@ const Ki = q((n) => {
|
|
|
4174
4174
|
M(!C.enableDarkImages);
|
|
4175
4175
|
});
|
|
4176
4176
|
}, [Q, C, F]);
|
|
4177
|
-
const { showModal: ue } =
|
|
4177
|
+
const { showModal: ue } = ms();
|
|
4178
4178
|
return de(() => {
|
|
4179
4179
|
const j = () => new Promise((K, ee) => {
|
|
4180
|
-
const V = re.lazy(() => import("./
|
|
4180
|
+
const V = re.lazy(() => import("./BD3NSZsAOvF6yczu.mjs")), A = ue(V, { title: "Shortcut Keys Reference", commands: z, onDone: () => {
|
|
4181
4181
|
A.hide();
|
|
4182
4182
|
}, slotProps: { transition: { onExited: () => {
|
|
4183
4183
|
K(!0);
|
|
@@ -4185,24 +4185,24 @@ const Ki = q((n) => {
|
|
|
4185
4185
|
});
|
|
4186
4186
|
z.getCommand("showKeyboardShortcuts").updateCallback(() => j()), z.getCommand("help").updateCallback(() => j());
|
|
4187
4187
|
}, [F, z]), z;
|
|
4188
|
-
})({ workbook: a, setWorkbook: t, importExportDisabled: d, workbookTitle: r, setWorkbookTitle: l, commands: s, requestWorkbookTitle: (
|
|
4189
|
-
e.current ? e.current.requestWorkbookTitle((
|
|
4190
|
-
y(
|
|
4191
|
-
}, { selectAll: !0, requestReason:
|
|
4188
|
+
})({ workbook: a, setWorkbook: t, importExportDisabled: d, workbookTitle: r, setWorkbookTitle: l, commands: s, requestWorkbookTitle: (b) => new Promise((y) => {
|
|
4189
|
+
e.current ? e.current.requestWorkbookTitle((f, h) => {
|
|
4190
|
+
y(f);
|
|
4191
|
+
}, { selectAll: !0, requestReason: b }) : y(c);
|
|
4192
4192
|
}), themeOptions: x, undoManager: i, onExecute: U(() => {
|
|
4193
|
-
}, []) }), m = W(() => o(
|
|
4193
|
+
}, []) }), m = W(() => o(nd, { commands: g, disableHover: !0, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [g]), u = { commands: g };
|
|
4194
4194
|
return a && (u.statusBarProps = { childrenEnd: m }), p ? re.cloneElement(p, u) : null;
|
|
4195
4195
|
});
|
|
4196
|
-
|
|
4197
|
-
const
|
|
4198
|
-
const { children: a } = n, t =
|
|
4196
|
+
Xi.displayName = "CommandsWrapper";
|
|
4197
|
+
const Yi = q((n) => {
|
|
4198
|
+
const { children: a } = n, t = Ui(), e = t ? t.enqueueSnackbar : () => {
|
|
4199
4199
|
}, r = t ? t.closeSnackbar : () => {
|
|
4200
4200
|
}, [l, c] = _({ isMounted: !1, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), p = U(() => {
|
|
4201
|
-
c((
|
|
4201
|
+
c((f) => ({ ...f, isMounted: !0 }));
|
|
4202
4202
|
}, []), i = U(() => {
|
|
4203
|
-
c((
|
|
4204
|
-
}, []), s = {}, d =
|
|
4205
|
-
const
|
|
4203
|
+
c((f) => ({ ...f, isMounted: !1 }));
|
|
4204
|
+
}, []), s = {}, d = hs(s), x = gs(s), g = fs(s), m = xe(/* @__PURE__ */ new Set()), u = W(() => {
|
|
4205
|
+
const f = (v, S) => {
|
|
4206
4206
|
if (S?.onceKey) {
|
|
4207
4207
|
if (m.current.has(S.onceKey)) return;
|
|
4208
4208
|
const D = new Set(m.current);
|
|
@@ -4210,7 +4210,7 @@ const Xi = q((n) => {
|
|
|
4210
4210
|
}
|
|
4211
4211
|
const C = { variant: S?.type ?? wt.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: S?.preventDuplicate, persist: S?.persist ?? S?.type === wt.Error, action: (D) => o(st, { onClick: () => r(D), children: o(he, { iconKey: "Cancel" }) }) };
|
|
4212
4212
|
S?.enqueueProps && Object.assign(C, S.enqueueProps), v || console.log("message is 'null'", S), e(v ?? "Alert", C);
|
|
4213
|
-
}, h = { showMessage:
|
|
4213
|
+
}, h = { showMessage: f, showBusy: (v, S) => {
|
|
4214
4214
|
let C = null;
|
|
4215
4215
|
const D = new Promise((T) => {
|
|
4216
4216
|
C = T;
|
|
@@ -4223,17 +4223,17 @@ const Xi = q((n) => {
|
|
|
4223
4223
|
const D = { ...S, onKeyDown: (T) => {
|
|
4224
4224
|
T.isDefaultPrevented() || T.isPropagationStopped() || S?.onKeyDown?.(T);
|
|
4225
4225
|
} };
|
|
4226
|
-
return d(v, { sort: () => import("./
|
|
4226
|
+
return d(v, { sort: () => import("./Cp-QoTwVeQkQClpI.mjs"), numberFormat: () => import("./Dx4t6SbPV2HSf_ub.mjs"), hyperlink: () => import("./Ci4cqU4bR1IUSqrT.mjs"), comments: () => import("./CoIXNZVIp9Q12qM2.mjs"), find: () => import("./CagpAQXgCxrJrdGJ.mjs"), tableNew: () => import("./5Fbp4sZTl6CHhmHk.mjs"), namedDetails: () => import("./D7PjwOCMi075qK5G.mjs") }[v], D, C);
|
|
4227
4227
|
}, showOptions: x, showInputOptions: g, showError: (v) => {
|
|
4228
4228
|
let S, C = wt.Error, D = "Unknown Error";
|
|
4229
|
-
typeof v == "string" ? D = v : v instanceof Error && (S = v, v.message && (D = v.message)), v instanceof
|
|
4230
|
-
} }, w = new
|
|
4229
|
+
typeof v == "string" ? D = v : v instanceof Error && (S = v, v.message && (D = v.message)), v instanceof Ms && (C = wt.Info), f(D, { type: C, enqueueProps: { error: S } });
|
|
4230
|
+
} }, w = new ks();
|
|
4231
4231
|
return w.setOverrides(h), w;
|
|
4232
4232
|
}, []);
|
|
4233
4233
|
de(() => {
|
|
4234
|
-
l.starting.size <= 0 || !l.isMounted || c((
|
|
4235
|
-
const h = new Map(
|
|
4236
|
-
return
|
|
4234
|
+
l.starting.size <= 0 || !l.isMounted || c((f) => {
|
|
4235
|
+
const h = new Map(f.running);
|
|
4236
|
+
return f.starting.forEach((w, v) => {
|
|
4237
4237
|
const S = () => {
|
|
4238
4238
|
c((C) => {
|
|
4239
4239
|
const D = new Map(C.running);
|
|
@@ -4241,52 +4241,52 @@ const Xi = q((n) => {
|
|
|
4241
4241
|
});
|
|
4242
4242
|
};
|
|
4243
4243
|
h.set(v, S), w(S);
|
|
4244
|
-
}), { ...
|
|
4244
|
+
}), { ...f, starting: /* @__PURE__ */ new Map(), running: h };
|
|
4245
4245
|
});
|
|
4246
4246
|
}, [l]);
|
|
4247
|
-
const [
|
|
4247
|
+
const [b, y] = _(null);
|
|
4248
4248
|
return de(() => {
|
|
4249
|
-
l.starting.size !== 0 || l.running.size !== 0 ? y(o(Wt, { icon: o(
|
|
4250
|
-
}, [l.starting, l.running]), H(
|
|
4249
|
+
l.starting.size !== 0 || l.running.size !== 0 ? y(o(Wt, { icon: o(bs, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: !0, label: l.label, onMount: p, onUnmount: i, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : y(null);
|
|
4250
|
+
}, [l.starting, l.running]), H(Cs, { notifier: u, children: [b, a] });
|
|
4251
4251
|
});
|
|
4252
|
-
|
|
4253
|
-
const
|
|
4254
|
-
const { children: t, title: e, taskPanes: r, onSelect: l, selected: c, registry: p = Un, style: i, iconsOnly: s, className: d, ...x } = n, g = W(() => r.map((
|
|
4255
|
-
const y = p.getRegisteredTaskPane(
|
|
4252
|
+
Yi.displayName = "SnackbarWrapper";
|
|
4253
|
+
const zd = q(X((n, a) => {
|
|
4254
|
+
const { children: t, title: e, taskPanes: r, onSelect: l, selected: c, registry: p = Un, style: i, iconsOnly: s, className: d, ...x } = n, g = W(() => r.map((b) => {
|
|
4255
|
+
const y = p.getRegisteredTaskPane(b);
|
|
4256
4256
|
if (!y) return null;
|
|
4257
|
-
let
|
|
4258
|
-
|
|
4259
|
-
const h =
|
|
4260
|
-
return o(Ea, { value:
|
|
4257
|
+
let f = y.getIcon?.();
|
|
4258
|
+
f && (typeof f == "string" && (f = o(he, { iconKey: f })), f = o("span", { style: { display: "inline-block", transform: "rotate(90deg)", transformOrigin: "center" }, children: f }));
|
|
4259
|
+
const h = b === c;
|
|
4260
|
+
return o(Ea, { value: b, label: o(vt, { disableInteractive: !0, title: y.getTitle() ?? "", placement: "left-start", children: H(B, { sx: { padding: "0px 0px", writingMode: "vertical-rl", textOrientation: "mixed", display: "flex", alignItems: "center", justifyContent: "space-between", minWidth: "0px", color: (w) => w.palette.text.secondary }, children: [f && o(B, { sx: { display: "inline-block", transformOrigin: "center", color: (w) => w.palette.text.secondary }, children: f }), s && f ? null : o(Re, { component: "div", textTransform: "none", sx: { padding: "4px 0px", color: (w) => h ? w.palette.primary.main : w.palette.text.secondary }, children: y.getTitle() })] }) }), sx: { padding: "4px 4px", minWidth: "0px", minHeight: "0px", borderRadius: "4px" }, className: Ce("taskpane-strip-item", { "Mui-selected": h }), onClick: () => n.onSelect(b) }, b);
|
|
4261
4261
|
}), [r, c, l, p]), m = Ct(a, () => ({ isTaskPaneStrip: () => !0 }), []), u = W(() => Ce("taskpane-strip", d), [d]);
|
|
4262
|
-
return o(B, { ref: m, className: u, sx: { paddingLeft: "2px", paddingTop: "4px", ...i }, ...x, children: o(Ta, { orientation: "vertical", variant: "scrollable", value: c, onChange: (
|
|
4262
|
+
return o(B, { ref: m, className: u, sx: { paddingLeft: "2px", paddingTop: "4px", ...i }, ...x, children: o(Ta, { orientation: "vertical", variant: "scrollable", value: c, onChange: (b, y) => {
|
|
4263
4263
|
l(y);
|
|
4264
4264
|
}, slotProps: { list: { sx: { gap: "2px" } }, indicator: { sx: { left: "0px", right: "unset" } } }, children: g }) });
|
|
4265
|
-
})),
|
|
4265
|
+
})), Hd = (n, a) => o(zd, { ref: a, ...n }), Wd = re.forwardRef((n, a) => {
|
|
4266
4266
|
const { commands: t, model: e, ...r } = n, l = Xe(), c = `solid ${ye(l.palette.divider, 0.2)} 1px`, p = `${l.shape.borderRadius ?? 4}px`, i = `${l.spacing?.(0.5) ?? 4}px`, s = xe(null);
|
|
4267
|
-
return o(
|
|
4268
|
-
const { title: g, icon: m, onClose: u, readOnly:
|
|
4269
|
-
return o(
|
|
4267
|
+
return o(Vl, { model: e, ref: a, frameProps: { style: { border: c, borderRadius: p, marginBottom: i } }, alwaysShowStrip: !0, renderTaskPanelTitle: (d, x) => {
|
|
4268
|
+
const { title: g, icon: m, onClose: u, readOnly: b, focused: y, ...f } = d;
|
|
4269
|
+
return o(ns, { className: Ce({ "Mui-selected": y }), sx: { display: "flex", flex: "1 1 %0", color: (h) => h.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: (h) => `${h.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: (h) => h.transitions.duration.shortest / 2 + "ms" }, backgroundColor: (h) => ye(h.palette.action.hover, 0.03), borderBottom: (h) => `solid ${ye(h.palette.divider, 0.2)} 1px` }, ...f, children: H(B, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: (h) => h.spacing(0.25), marginBottom: (h) => h.spacing(0.25), marginLeft: (h) => h.spacing(1), marginRight: (h) => h.spacing(1) }, children: [o(B, { sx: { flex: "1 1 100%", paddingLeft: (h) => h.spacing(1) }, children: g }), o(ot, { label: "Close", children: o(st, { "aria-label": "close", sx: { color: (h) => h.palette.text.icon ?? h.palette.action.active }, touchRippleRef: s, onPointerDown: (h) => {
|
|
4270
4270
|
s.current?.start(h, { center: !1 }), h.stopPropagation(), h.preventDefault();
|
|
4271
4271
|
}, onPointerUp: () => {
|
|
4272
4272
|
u();
|
|
4273
4273
|
}, children: o(he, { iconKey: "Close" }) }) })] }) });
|
|
4274
|
-
}, renderTaskPaneStrip:
|
|
4274
|
+
}, renderTaskPaneStrip: Hd, ...n, onOpen: () => {
|
|
4275
4275
|
n?.onOpen?.();
|
|
4276
4276
|
}, onClose: () => {
|
|
4277
4277
|
n?.onClose?.();
|
|
4278
4278
|
}, commands: t, ...r });
|
|
4279
|
-
}), ya = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" },
|
|
4279
|
+
}), ya = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, Zi = q(X((n, a) => {
|
|
4280
4280
|
const { mainElement: t, sidebarElement: e, className: r, style: l, ...c } = n, p = Xe(), [i, { width: s }] = zt(), d = s > 530 || s === 0, x = xe(null);
|
|
4281
4281
|
let g = null, m = 4, u = 13;
|
|
4282
4282
|
return d ? g = "m 3.6261898,11.36243 c 0,0.88365 -0.71627,1.59991 -1.59991,1.59991 -0.8836498,0 -1.60004965,-0.71626 -1.60004965,-1.59991 0,-0.88365 0.71639985,-1.6000508 1.60004965,-1.6000508 0.88364,0 1.59991,0.7164008 1.59991,1.6000508 m 0,-4.881294 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 -0.8836498,0 -1.60004965,-0.7164 -1.60004965,-1.60004 0,-0.88365 0.71639985,-1.60005 1.60004965,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-4.881226 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 1.14263,3.19996 0.42623015,2.48356 0.42623015,1.59991 0.42623015,0.71626 1.14263,0 2.0262798,0 c 0.88364,0 1.59991,0.71626 1.59991,1.59991" : (g = "M 1.59991,3.62619 C 0.71626,3.62619 0,2.90992 0,2.02628 0,1.1426301 0.71626,0.42623015 1.59991,0.42623015 c 0.88365,0 1.6000508,0.71639995 1.6000508,1.60004985 0,0.88364 -0.7164008,1.59991 -1.6000508,1.59991 m 4.881294,0 c -0.88364,0 -1.60004,-0.71627 -1.60004,-1.59991 0,-0.8836499 0.7164,-1.60004985 1.60004,-1.60004985 0.88365,0 1.60005,0.71639995 1.60005,1.60004985 0,0.88364 -0.7164,1.59991 -1.60005,1.59991 m 4.881226,0 c -0.88365,0 -1.60005,-0.71627 -1.60005,-1.59991 0,-0.8836499 0.7164,-1.60004985 1.60005,-1.60004985 0.88365,0 1.59991,0.71639995 1.59991,1.60004985 0,0.88364 -0.71626,1.59991 -1.59991,1.59991", m = 13, u = 4), o(Qn, { ref: $t([x, i, a]), className: r, style: l ? { ...ya, ...l } : ya, ...c, fixedPane: "after", position: "40%", minAfter: d ? "280px" : "120px", splitDirection: d ? "row" : "column", resizerProps: { className: "styled-resizer", style: { minWidth: d ? "6px" : void 0, minHeight: d ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${m}' height='${u}' viewBox='0 0 ${m} ${u}' version='1.1' fill='${p.palette.text.icon ?? p.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${g}' /%3E%3C/svg%3E%0A")`, maskRepeat: "no-repeat", maskPosition: d ? "left center" : "top center" } }, elementBefore: t, paneBeforeProps: { style: { flexDirection: "column", marginRight: e ? void 0 : "6px" } }, elementAfter: e, paneAfterProps: { style: { marginLeft: d ? "0px" : "4px", marginRight: d ? "8px" : "4px" } } });
|
|
4283
4283
|
}));
|
|
4284
|
-
|
|
4285
|
-
Ma.register("plugin-scripts", { icons: {} }), Un.registerTaskPane({ key: "scriptEditor", getTitle: () => "Script (Typescript)", getIcon: () => "ScriptRun", renderTaskPane:
|
|
4284
|
+
Zi.displayName = "StudioSplitPane";
|
|
4285
|
+
Ma.register("plugin-scripts", { icons: {} }), Un.registerTaskPane({ key: "scriptEditor", getTitle: () => "Script (Typescript)", getIcon: () => "ScriptRun", renderTaskPane: Nc }, !0);
|
|
4286
4286
|
const $n = q(X((n, a) => {
|
|
4287
|
-
const { className: t, sx: e, style: r, onElementLoad: l, onError: c, undoManager: p, errorPanel: i =
|
|
4287
|
+
const { className: t, sx: e, style: r, onElementLoad: l, onError: c, undoManager: p, errorPanel: i = xs, onKeyDown: s, workbook: d, createWorkbookOptions: x, onWorkbookChange: g, logo: m, importExportDisabled: u = !1, themeOptions: b, autoFocus: y = !1, commands: f, title: h, onTitleChange: w, titleProps: v, renderLoadingPanel: S, ...C } = n, D = xe(null), T = Y(g, [g]), P = Y(w ?? v?.onTitleChange, [w ?? v?.onTitleChange]), R = v?.placeHolder ?? "Untitled", k = b?.mode, { themeMode: E, source: M } = Ra({ mode: k }), I = W(() => ({ ...b, light: kr(!1, to.deepMerge(b?.theme ?? {}, b?.light ?? {})), dark: kr(!0, to.deepMerge(b?.theme ?? {}, b?.dark ?? {})) }), [b]), N = E === Bn.Dark, [L, F] = _(null);
|
|
4288
4288
|
de(() => {
|
|
4289
|
-
F(p ?? new
|
|
4289
|
+
F(p ?? new Ns());
|
|
4290
4290
|
}, [p]);
|
|
4291
4291
|
const [z, ae] = _(null), [Q, ue] = _(null), j = Gn();
|
|
4292
4292
|
St(() => {
|
|
@@ -4330,8 +4330,8 @@ const $n = q(X((n, a) => {
|
|
|
4330
4330
|
const [oe, Ae] = _(null), Se = W(() => {
|
|
4331
4331
|
const te = () => ({ contains: (ke) => !0, focus() {
|
|
4332
4332
|
} });
|
|
4333
|
-
return
|
|
4334
|
-
}, [
|
|
4333
|
+
return f ? f.createChildGroup(te, "application", !1) : new Jn(te, "application");
|
|
4334
|
+
}, [f]), Fe = Y(async (te) => {
|
|
4335
4335
|
Ae(te.source.getViewportElement()), ee(te), Se.activate("sheet"), await Ma.prefetch(), l?.(te);
|
|
4336
4336
|
}, [Se]);
|
|
4337
4337
|
de(() => {
|
|
@@ -4341,7 +4341,7 @@ const $n = q(X((n, a) => {
|
|
|
4341
4341
|
let ke = null;
|
|
4342
4342
|
return v?.hidden || (ke = o(Mi, { ...v, style: { maxWidth: "100%", ...v?.style }, workbook: D.current, ref: Ve, title: A, placeHolder: R, onTitleChange: (Tt) => {
|
|
4343
4343
|
Z(Tt);
|
|
4344
|
-
} })), o(
|
|
4344
|
+
} })), o(Ki, { ...te, logo: m, mainElement: ke, showFileMenu: !u, showAppearanceMenu: !!(I?.onEnabledDarkGridChange || I?.onEnabledDarkImagesChange || I?.onModeChange) });
|
|
4345
4345
|
}, [m, A, v, I, u, Se]);
|
|
4346
4346
|
de(() => {
|
|
4347
4347
|
const te = (ke) => ke.preventDefault();
|
|
@@ -4352,7 +4352,7 @@ const $n = q(X((n, a) => {
|
|
|
4352
4352
|
const ne = W(() => {
|
|
4353
4353
|
const te = { transparentBackground: !0 };
|
|
4354
4354
|
return o(B, { sx: e, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...r }, children: S?.(te) ?? o(Wt, { ...te }) });
|
|
4355
|
-
}, [e, r, S]), G = U(({ error: te }) => (c?.(te), o(i, { sx: e, style: r, error: te ?? "Unable to display empty workbook." })), [e, r, c]), se = W(() => ({ ...e, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-SnackbarContainer > div": { maxWidth: "100%" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-Snackbar > .error-snackbar .MuiTypography-root": { color: (te) => te.palette.getContrastText(te.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiCardActions-root": { color: (te) => te.palette.getContrastText(te.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiButtonBase-root": { color: (te) => te.palette.getContrastText(te.palette.error.main) }, "& .notistack-MuiContent *": { fontFamily: (te) => te.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [e]), [Me, qe] = _(null), De = U((te, ke) => o(
|
|
4355
|
+
}, [e, r, S]), G = U(({ error: te }) => (c?.(te), o(i, { sx: e, style: r, error: te ?? "Unable to display empty workbook." })), [e, r, c]), se = W(() => ({ ...e, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-SnackbarContainer > div": { maxWidth: "100%" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-Snackbar > .error-snackbar .MuiTypography-root": { color: (te) => te.palette.getContrastText(te.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiCardActions-root": { color: (te) => te.palette.getContrastText(te.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiButtonBase-root": { color: (te) => te.palette.getContrastText(te.palette.error.main) }, "& .notistack-MuiContent *": { fontFamily: (te) => te.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [e]), [Me, qe] = _(null), De = U((te, ke) => o(Wd, { ref: ke, model: Q, commands: Se, ...te }), [Se, Q]), nt = U((te) => o(Zi, { mainElement: te, sidebarElement: Me }), [Me]), Ye = $t([D, a]), dt = W(() => {
|
|
4356
4356
|
if (!z) return ne;
|
|
4357
4357
|
if (z.error || !z.workbook) return G({ error: z.error });
|
|
4358
4358
|
let te = null, ke = null, Tt = !1;
|
|
@@ -4360,96 +4360,96 @@ const $n = q(X((n, a) => {
|
|
|
4360
4360
|
s?.(io);
|
|
4361
4361
|
}, renderLoadingPanel: S, gridTheme: ke, headersTheme: te, enableDarkImages: Tt, mainWrapper: nt, className: Ce(t), onContextMenu: (io) => io.preventDefault(), ...C }, "WorkbookElement");
|
|
4362
4362
|
}, [z, A, L, ne, S, I, C, je, se, nt]);
|
|
4363
|
-
let Ne = o(
|
|
4363
|
+
let Ne = o(Od, { maxSnack: 3, domRoot: oe, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (te, ke, Tt) => {
|
|
4364
4364
|
D.current?.focus();
|
|
4365
|
-
}, Components: { error:
|
|
4365
|
+
}, Components: { error: Gi }, iconVariant: { success: o(ka, { style: { marginRight: "8px" }, children: o("path", { d: "M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z" }) }), error: o(he, { iconKey: "ErrorAlert", style: { marginRight: "8px" } }) }, children: o(_l, { createArea: De, onUpdateArea: (te) => {
|
|
4366
4366
|
qe(te);
|
|
4367
|
-
}, children: o(
|
|
4368
|
-
return I && (Ne = H(Na, { theme: N ? I.dark : I.light, children: [I.cssBaseline ? o(
|
|
4367
|
+
}, children: o(ys, { children: o(Yi, { children: o(Ts, { children: o(Es, { children: o(Xi, { workbook: z?.workbook, setWorkbook: ue, importExportDisabled: u, titlePlaceHolder: R, titleWorkbook: A, setWorkbookTitle: Z, refWorkbookTitle: Ve, commands: Se, undoManager: L, themeOptions: I, children: dt }) }) }) }) }) }) });
|
|
4368
|
+
return I && (Ne = H(Na, { theme: N ? I.dark : I.light, children: [I.cssBaseline ? o(rs, {}) : null, Ne] })), Ne;
|
|
4369
4369
|
}));
|
|
4370
4370
|
$n.displayName = "EagerStudio";
|
|
4371
|
-
const
|
|
4371
|
+
const jd = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio: $n, default: $n }, Symbol.toStringTag, { value: "Module" }));
|
|
4372
4372
|
export {
|
|
4373
4373
|
er as $,
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4374
|
+
od as A,
|
|
4375
|
+
Gs as B,
|
|
4376
|
+
Hs as C,
|
|
4377
4377
|
Ia as D,
|
|
4378
4378
|
Si as E,
|
|
4379
|
-
|
|
4379
|
+
Ks as F,
|
|
4380
4380
|
or as G,
|
|
4381
|
-
|
|
4381
|
+
Fs as H,
|
|
4382
4382
|
Aa as I,
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4383
|
+
Fi as J,
|
|
4384
|
+
ad as K,
|
|
4385
|
+
Us as L,
|
|
4386
|
+
qs as M,
|
|
4387
4387
|
qa as N,
|
|
4388
4388
|
Tr as O,
|
|
4389
4389
|
Wa as P,
|
|
4390
|
-
|
|
4390
|
+
_s as Q,
|
|
4391
4391
|
Ka as R,
|
|
4392
|
-
|
|
4393
|
-
|
|
4392
|
+
ld as S,
|
|
4393
|
+
Bs as T,
|
|
4394
4394
|
za as U,
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4395
|
+
Os as V,
|
|
4396
|
+
rc as W,
|
|
4397
|
+
Is as X,
|
|
4398
4398
|
Ro as Y,
|
|
4399
|
-
|
|
4399
|
+
$s as Z,
|
|
4400
4400
|
Ln as _,
|
|
4401
4401
|
Vt as a,
|
|
4402
4402
|
Oa as a0,
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4403
|
+
fc as a1,
|
|
4404
|
+
bc as a2,
|
|
4405
|
+
xc as a3,
|
|
4406
4406
|
Ya as a4,
|
|
4407
4407
|
Xa as a5,
|
|
4408
4408
|
ni as a6,
|
|
4409
4409
|
oi as a7,
|
|
4410
4410
|
ri as a8,
|
|
4411
|
-
|
|
4411
|
+
Dc as a9,
|
|
4412
4412
|
Va as aa,
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4413
|
+
sc as ab,
|
|
4414
|
+
pc as ac,
|
|
4415
|
+
rp as ad,
|
|
4416
4416
|
ai as ae,
|
|
4417
4417
|
ii as af,
|
|
4418
4418
|
li as ag,
|
|
4419
|
-
|
|
4419
|
+
np as ah,
|
|
4420
4420
|
Ri as ai,
|
|
4421
4421
|
Mi as aj,
|
|
4422
4422
|
Di as ak,
|
|
4423
4423
|
Ei as al,
|
|
4424
|
-
|
|
4425
|
-
|
|
4424
|
+
Lc as am,
|
|
4425
|
+
zc as an,
|
|
4426
4426
|
Zr as ao,
|
|
4427
4427
|
$n as ap,
|
|
4428
|
-
|
|
4428
|
+
Id as aq,
|
|
4429
4429
|
Lt as ar,
|
|
4430
4430
|
In as b,
|
|
4431
4431
|
Do as c,
|
|
4432
4432
|
ci as d,
|
|
4433
4433
|
Ce as e,
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4434
|
+
As as f,
|
|
4435
|
+
op as g,
|
|
4436
|
+
Xs as h,
|
|
4437
|
+
Ys as i,
|
|
4438
|
+
Zs as j,
|
|
4439
4439
|
Ba as k,
|
|
4440
|
-
|
|
4441
|
-
|
|
4440
|
+
Qs as l,
|
|
4441
|
+
Js as m,
|
|
4442
4442
|
La as n,
|
|
4443
|
-
|
|
4443
|
+
tp as o,
|
|
4444
4444
|
No as p,
|
|
4445
|
-
|
|
4445
|
+
ec as q,
|
|
4446
4446
|
cn as r,
|
|
4447
|
-
|
|
4448
|
-
|
|
4447
|
+
tc as s,
|
|
4448
|
+
oc as t,
|
|
4449
4449
|
zt as u,
|
|
4450
|
-
|
|
4451
|
-
|
|
4450
|
+
nc as v,
|
|
4451
|
+
ic as w,
|
|
4452
4452
|
Ni as x,
|
|
4453
|
-
|
|
4454
|
-
|
|
4453
|
+
td as y,
|
|
4454
|
+
nd as z
|
|
4455
4455
|
};
|