@sheetxl/studio-mui 0.4.22 → 0.5.1

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.
Files changed (40) hide show
  1. package/browser/cjs/{BfnxiVEhzO5reOYH.cjs → B7ZqxL7HCcF4W64E.cjs} +2 -2
  2. package/browser/cjs/{Bil3fXnJ3lk7aGF5.cjs → BSchsQWqHadL8uiG.cjs} +2 -2
  3. package/browser/cjs/{BY09bxecVOSMwQA3.cjs → BSk234vVHlO9t-0j.cjs} +1 -1
  4. package/browser/cjs/{2d2J6QkipnGWfI99.cjs → Bi2ewauCdH2w14hW.cjs} +2 -2
  5. package/browser/cjs/{B_nvuo0kEXu5G0Gf.cjs → C6Qc9lLh9egNbs0t.cjs} +1 -1
  6. package/browser/cjs/{DC70SHoaPVkOUEHx.cjs → Ck0B-kjPAw2A9KVg.cjs} +1 -1
  7. package/browser/cjs/{DRUx3PLS_NrkJ6Yw.cjs → DBcDkQQ3AzkP7U-g.cjs} +3 -3
  8. package/browser/cjs/{D2Cp7gwb6bRupSZY.cjs → DGcWWDQoWTessrP9.cjs} +2 -2
  9. package/browser/cjs/{BzbKSVugPof6dqQI.cjs → DZXSHPXJywU0QDaX.cjs} +1 -1
  10. package/browser/cjs/{BYJI3FMxQ-z5UGsU.cjs → DkpiQeq_B6niQX_F.cjs} +1 -1
  11. package/browser/cjs/Dptdk7e9jdSVPSlW.cjs +20 -0
  12. package/browser/cjs/{CU0utErelA1oX0n8.cjs → DwKLyvJr6BNyEpRJ.cjs} +2 -2
  13. package/browser/cjs/index.cjs +2 -2
  14. package/browser/esm/{-AR3L_VjwMbtQVbL.mjs → B07osQ30jqhbDbZd.mjs} +2 -2
  15. package/browser/esm/{DXRFs7VZM4IShMju.mjs → B1z2_AMWCsfpJHbb.mjs} +2 -2
  16. package/browser/esm/{DEbllEGmvtLkCug_.mjs → BZX8sIMfMsI3HTX8.mjs} +3 -3
  17. package/browser/esm/{EMqbYi0X_krk5yOL.mjs → BdX-JA-__aDsnq7S.mjs} +1 -1
  18. package/browser/esm/{BXNl9EEQzO53Hoh5.mjs → Bk-eJX2kHnvnG28L.mjs} +2 -2
  19. package/browser/esm/{BqnVpwK0Q2fKGA2S.mjs → C3cb5A2fg-21I_jY.mjs} +1 -1
  20. package/browser/esm/{D4rFOqwrrtVMpgbc.mjs → C89QUgwXHQc2dJ3l.mjs} +1 -1
  21. package/browser/esm/{DeGATuYv4-5bhQcD.mjs → CBKfWBsXKJNQ1vnx.mjs} +1 -1
  22. package/browser/esm/{-0XEuwqNVFTlDKEX.mjs → CKP6l57oywzoCW26.mjs} +2 -2
  23. package/browser/esm/{fWsCG2WBM3kCpC5p.mjs → D3Q0yYY719Kq6-E0.mjs} +2 -2
  24. package/browser/esm/{pARZF2O230qNvxWd.mjs → Dhvid6hJKp8mH3mM.mjs} +1 -1
  25. package/browser/esm/{BLhZj1SgWlsmeviw.mjs → hSy4nt2e1JaglBGF.mjs} +2211 -2247
  26. package/browser/esm/index.mjs +36 -38
  27. package/node/esm/{DRt8kMDuCJn53CIE.mjs → 2ivPcTvenc9052Au.mjs} +1 -1
  28. package/node/esm/{CE_I2ijQF8MeexHD.mjs → BhrCUSzh6UYuYooH.mjs} +1 -1
  29. package/node/esm/{BzBHqe1ThbCP-l_d.mjs → BzI2nfBkzMD7nh3R.mjs} +1 -1
  30. package/node/esm/{0JTY0jNrXiIiOqWY.mjs → C1WgCk3bWrblj2tf.mjs} +1 -1
  31. package/node/esm/{CuomeW-4DDc1ywFW.mjs → C2yYkXDnvboLxKsV.mjs} +1 -1
  32. package/node/esm/{Do7y7aKPA48-93AV.mjs → CCjx6xhgYbFOq1KK.mjs} +1 -1
  33. package/node/esm/{DgHCTCARk1Gv_msN.mjs → D_iq-nakEihGXnfs.mjs} +1 -1
  34. package/node/esm/{Bu58psaOsDy_zPOJ.mjs → DuTuCOWVEZrVzH3R.mjs} +1 -1
  35. package/node/esm/{X11ONmg6R1Y6hfue.mjs → IXbZFmdmVOCo2beQ.mjs} +1 -1
  36. package/node/esm/{BqQ6JNhQ1K321g9U.mjs → WjtiXN--XGZjB3uh.mjs} +1 -1
  37. package/node/esm/index.mjs +928 -964
  38. package/package.json +8 -8
  39. package/types/index.d.ts +1 -82
  40. package/browser/cjs/CWp8_mrz0htdOXMM.cjs +0 -20
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.22
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.5.1
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -7,67 +7,67 @@
7
7
  import { Color as e, IColor as t, ITheme as o, CommonUtils as n, IBorder as r, IFont as a, NumberFormat as l, IFontCollection as i, IStyle as s, ITextFrame as d, Table as c, IFill as m, CoordUtils as p, ISheet as u, LicenseManager as g, Workbook as h, TypesUtils as f } from "@sheetxl/sdk";
8
8
  import { LicenseManager } from "@sheetxl/sdk";
9
9
  import { jsx as x, jsxs as b, Fragment as y } from "react/jsx-runtime";
10
- import w, { memo as k, forwardRef as S, useMemo as C, useCallback as v, isValidElement as T, useState as D, useEffect as M, Suspense as R, useRef as P, createElement as B, useReducer as F, useImperativeHandle as N, useLayoutEffect as E } from "react";
11
- import { Box as A, Typography as I, IconButton as L, MenuItem as H, Divider as z, Button as W, SvgIcon as $, Input as O, FormControlLabel as V, Checkbox as G, useMediaQuery as U, FormControl as j, TextField as _, InputAdornment as q, Slider as K, Paper as X, CircularProgress as Z, DialogTitle as J, Select as Y, Tabs as Q, Tab as ee, Card as te, CardActions as oe, Collapse as ne, CssBaseline as re } from "@mui/material";
12
- import { themeIcon as ae, CommandButton as le, ExhibitDivider as ie, FormatIndentDecreaseIcon as se, FormatIndentIncreaseIcon as de, defaultCreatePopupPanel as ce, CommandPopupButton as me, TextVerticalTopIcon as pe, TextVerticalCenterIcon as ue, TextVerticalBottomIcon as ge, TextHorizontalOverflowIcon as he, TextHorizontalWrapIcon as fe, TextHorizontalClipIcon as xe, TextHorizontalShrinkIcon as be, TextRotation315Icon as ye, TextRotation45Icon as we, TextRotation90Icon as ke, TextRotation2702Icon as Se, TextRotationCustomIcon as Ce, TextRotation0Icon as ve, InputCommandButton as Te, SimpleTooltip as De, LoadingPanel as Me, PopupButtonType as Re, ExhibitPopupIconButton as Pe, ExhibitPopupMenuItem as Be, ColorizedCircleIcon as Fe, ExhibitMenuItem as Ne, createStrokeShadowFilter as Ee, strokeShadowFilter as Ae, ColorizedStrokeIcon as Ie, ExhibitTooltip as Le, ExhibitIconButton as He, CommandTooltip as ze, MergeAllIcon as We, MergeHorizontalIcon as $e, MergeVerticalIcon as Oe, MergeUnMergeIcon as Ve, FreezeBothIcon as Ge, FreezeRowsIcon as Ue, FreezeColumnsIcon as je, FreezeIcon as _e, FindIcon as qe, FindReplaceIcon as Ke, GotoIcon as Xe, TextSizeIncreaseIcon as Ze, TextSizeDecreaseIcon as Je, SelectedIcon as Ye, CurrencyDollarIcon as Qe, PercentIcon as et, CommaIcon as tt, IncreaseDecimalIcon2 as ot, DecreaseDecimalIcon2 as nt, ClearAllIcon as rt, ClearFormatsIcon as at, ClearContentsIcon as lt, FillDownIcon as it, InsertCells as st, InsertRowIcon as dt, InsertColumn2Icon as ct, BlankIcon as mt, RemoveCellsIcon as pt, RemoveRowIcon as ut, RemoveColumn2Icon as gt, LabelIcon as ht, SortIncreaseIcon as ft, SortDecreaseIcon as xt, SortCustomIcon as bt, FilterToggleIcon as yt, FilterClearIcon as wt, FilterReapplyIcon as kt, RedoIcon as St, UndoIcon as Ct, TextStrikeIcon as vt, TextSuperscriptIcon as Tt, TextSubscriptIcon as Dt, TextUnderlineIcon as Mt, TextUnderlineDoubleIcon as Rt, TextUnderlineAccountingIcon as Pt, TextUnderlineAccountingDoubleIcon as Bt, PasteIcon as Ft, PasteValuesIcon as Nt, PasteFormatsIcon as Et, PasteFormulasIcon as At, PasteTransposeIcon as It, PasteLinksIcon as Lt, NewPresetStylesIcon as Ht, PresetStylesIcon as zt, ExhibitMenuHeader as Wt, ContextMenu as $t, Theme2Icon as Ot, SystemDefaultDarkMode as Vt, SystemDefaultLightMode as Gt, GithubIcon as Ut, DiscordIcon as jt, DocumentationIcon as _t, TicketIcon as qt, HelpIcon as Kt, InsertImageIcon as Xt, WalkingCopyIcon as Zt, SimpleCommandPopupButton as Jt, FunctionThinIcon as Yt, FunctionSumIcon as Qt, ExhibitOptionButton as eo, SelectRangeModeIcon as to, hexToRGB as oo, useFloatStack as no, CellSelectionIcon as ro, CellSelectionRemoveIcon as ao, CellSelectionEditIcon as lo, InsertTableIcon as io, CellSelectionInsertIcon as so, CloseErrorIcon as co, CheckSuccessIcon as mo, FunctionIcon as po, VisibilityOffIcon as uo, elevateColor as go, ThemedIcon as ho, ScriptNewIcon as fo, ScriptFormulaIcon as xo, ScriptMacroIcon as bo, ScriptSaveIcon as yo, CommandToolbar as wo, CodeIcon as ko, ScriptRunIcon as So, ColorizedTextIcon as Co, ColorizedFillIcon as vo, FormatPaintIcon as To, TextBoldIcon as Do, TextItalicIcon as Mo, InsertHyperlinkIcon as Ro, InsertCommentIcon as Po, FullScreenOffIcon as Bo, FullScreenIcon as Fo, createScrollEdgeButton as No, createScrollEndButton as Eo, createScrollStartButton as Ao, HideColumnIcon as Io, ShowColumnIcon as Lo, HideRowIcon as Ho, ShowRowIcon as zo, ColumnsResizeAutoIcon as Wo, RowsResizeAutoIcon as $o, CutIcon as Oo, DrawAspectIcon as Vo, DrawAlignLeftIcon as Go, DrawResizeIcon as Uo, DrawAlignDistributeVertIcon as jo, DrawAlignDistributeHorzIcon as _o, DrawAlignBottomIcon as qo, DrawAlignMiddleIcon as Ko, DrawAlignTopIcon as Xo, DrawAlignRightIcon as Zo, DrawAlignCenterIcon as Jo, DrawMoveBackwardIcon as Yo, DrawToBackIcon as Qo, DrawMoveForwardIcon as en, DrawToFrontIcon as tn, scrollbarTheming as on, StackTrace as nn, FileNewIcon as rn, FileOpenIcon as an, FileDownloadAsCSVIcon as ln, FileDownloadAsExcelIcon as sn, FileDownloadAsSheetIcon as dn, useModal as cn, useLazyWindow as mn, useOptionsDialog as pn, useInputDialog as un, AnimatedTraversingEllipsisIcon as gn, ErrorPanel as hn, createExhibitTheme as fn, ModalProvider as xn, ErrorAlertIcon as bn } from "@sheetxl/utils-mui";
13
- import yn from "clsx";
14
- import { FormatAlignLeft as wn, FormatAlignCenter as kn, FormatAlignRight as Sn, FormatAlignJustify as Cn, Colorize as vn, DarkMode as Tn, LightMode as Dn, Keyboard as Mn, Remove as Rn, Add as Pn, ExpandLess as Bn, ExpandMore as Fn, Lock as Nn, MoreHoriz as En, WebhookOutlined as An, Close as In, AddCircleOutline as Ln, Menu as Hn, CancelOutlined as zn } from "@mui/icons-material";
15
- import { useCommands as Wn, CommandButtonType as $n, useCallbackRef as On, ReactUtils as Vn, KeyCodes as Gn, useCommand as Un, useEditMode as jn, useMouseDownAndHoldListener as _n, NotificationType as qn, useImperativeElement as Kn, SplitPane as Xn, RoundedTab as Zn, SimpleCommand as Jn, Command as Yn, KeyModifiers as Qn, CommandGroup as er, ToolTipPlacement as tr, ScrollPane as or, useUndoManager as nr } from "@sheetxl/utils-react";
16
- import { useTheme as rr, alpha as ar, getOverlayAlpha as lr, ThemeProvider as ir } from "@mui/material/styles";
17
- import { StyledStrokePath as sr, StaticBorderRenderer as dr, FontUtils as cr, useModelListener as mr, createCellEditStateFromCell as pr, SheetCellEditor as ur, ScriptEditor as gr, TabStrip as hr, useDocThemes as fr, SheetScrollbar as xr, PictureEditor as br, ChartEditor as yr, SheetElement as wr, EmptyFrame as kr, LogoNoPaddingIcon as Sr } from "@sheetxl/react";
18
- import { alpha as Cr } from "@mui/system";
19
- import { useFormContext as vr } from "react-hook-form";
20
- import { ResizableBox as Tr } from "react-resizable";
21
- import { mergeRefs as Dr } from "react-merge-refs";
22
- import { CommonUtils as Mr, ChainedError as Rr, PartialError as Pr, UndoManager as Br } from "@sheetxl/utils";
23
- import { useMeasure as Fr } from "react-use";
24
- import { CSSTransition as Nr } from "react-transition-group";
25
- import { useFullscreen as Er } from "rooks";
26
- import { IOUtils as Ar } from "@sheetxl/io";
27
- import { ErrorBoundary as Ir } from "react-error-boundary";
28
- import { useSnackbar as Lr, SnackbarContent as Hr, SnackbarProvider as zr } from "notistack";
29
- const Wr = k(S((e2, t2) => {
30
- const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, parentFloat: l2, ...i2 } = e2, s2 = Wn(o2, ["formatAlignLeftToggle", "formatAlignCenterToggle", "formatAlignRightToggle", "formatAlignJustifyToggle", "formatAlignCenterContinuousToggle", "formatAlignFillToggle", "formatAlignDistributedHorizontalToggle"]), d2 = C(() => {
10
+ import w, { memo as S, forwardRef as k, useMemo as C, useCallback as v, isValidElement as T, useState as D, useEffect as R, Suspense as P, useRef as M, createElement as B, useReducer as F, useImperativeHandle as N, useLayoutEffect as A } from "react";
11
+ import { Box as E, Typography as I, IconButton as L, MenuItem as H, Divider as z, Button as W, SvgIcon as $, Input as O, FormControlLabel as V, Checkbox as G, useMediaQuery as U, FormControl as j, TextField as _, InputAdornment as q, Slider as K, Paper as X, CircularProgress as Z, DialogTitle as J, Select as Y, Tabs as Q, Tab as ee, Card as te, CardActions as oe, Collapse as ne, CssBaseline as re } from "@mui/material";
12
+ import { themeIcon as ae, CommandButton as le, ExhibitDivider as ie, FormatIndentDecreaseIcon as se, FormatIndentIncreaseIcon as de, defaultCreatePopupPanel as ce, CommandPopupButton as me, TextVerticalTopIcon as pe, TextVerticalCenterIcon as ue, TextVerticalBottomIcon as ge, TextHorizontalOverflowIcon as he, TextHorizontalWrapIcon as fe, TextHorizontalClipIcon as xe, TextHorizontalShrinkIcon as be, TextRotation315Icon as ye, TextRotation45Icon as we, TextRotation90Icon as Se, TextRotation2702Icon as ke, TextRotationCustomIcon as Ce, TextRotation0Icon as ve, InputCommandButton as Te, SimpleTooltip as De, LoadingPanel as Re, PopupButtonType as Pe, ExhibitPopupIconButton as Me, ExhibitPopupMenuItem as Be, ColorizedCircleIcon as Fe, ExhibitMenuItem as Ne, createStrokeShadowFilter as Ae, strokeShadowFilter as Ee, ColorizedStrokeIcon as Ie, ExhibitTooltip as Le, ExhibitIconButton as He, CommandTooltip as ze, MergeAllIcon as We, MergeHorizontalIcon as $e, MergeVerticalIcon as Oe, MergeUnMergeIcon as Ve, FreezeBothIcon as Ge, FreezeRowsIcon as Ue, FreezeColumnsIcon as je, FreezeIcon as _e, FindIcon as qe, FindReplaceIcon as Ke, GotoIcon as Xe, TextSizeIncreaseIcon as Ze, TextSizeDecreaseIcon as Je, SelectedIcon as Ye, CurrencyDollarIcon as Qe, PercentIcon as et, CommaIcon as tt, IncreaseDecimalIcon2 as ot, DecreaseDecimalIcon2 as nt, ClearAllIcon as rt, ClearFormatsIcon as at, ClearContentsIcon as lt, FillDownIcon as it, InsertCells as st, InsertRowIcon as dt, InsertColumn2Icon as ct, BlankIcon as mt, RemoveCellsIcon as pt, RemoveRowIcon as ut, RemoveColumn2Icon as gt, LabelIcon as ht, SortIncreaseIcon as ft, SortDecreaseIcon as xt, SortCustomIcon as bt, FilterToggleIcon as yt, FilterClearIcon as wt, FilterReapplyIcon as St, RedoIcon as kt, UndoIcon as Ct, TextStrikeIcon as vt, TextSuperscriptIcon as Tt, TextSubscriptIcon as Dt, TextUnderlineIcon as Rt, TextUnderlineDoubleIcon as Pt, TextUnderlineAccountingIcon as Mt, TextUnderlineAccountingDoubleIcon as Bt, PasteIcon as Ft, PasteValuesIcon as Nt, PasteFormatsIcon as At, PasteFormulasIcon as Et, PasteTransposeIcon as It, PasteLinksIcon as Lt, NewPresetStylesIcon as Ht, PresetStylesIcon as zt, ExhibitMenuHeader as Wt, ContextMenu as $t, Theme2Icon as Ot, SystemDefaultDarkMode as Vt, SystemDefaultLightMode as Gt, GithubIcon as Ut, DiscordIcon as jt, DocumentationIcon as _t, TicketIcon as qt, HelpIcon as Kt, InsertImageIcon as Xt, WalkingCopyIcon as Zt, SimpleCommandPopupButton as Jt, FunctionThinIcon as Yt, FunctionSumIcon as Qt, ExhibitOptionButton as eo, SelectRangeModeIcon as to, hexToRGB as oo, useFloatStack as no, CellSelectionIcon as ro, CellSelectionRemoveIcon as ao, CellSelectionEditIcon as lo, InsertTableIcon as io, CellSelectionInsertIcon as so, CloseErrorIcon as co, CheckSuccessIcon as mo, FunctionIcon as po, VisibilityOffIcon as uo, elevateColor as go, ThemedIcon as ho, ScriptNewIcon as fo, ScriptFormulaIcon as xo, ScriptMacroIcon as bo, ScriptSaveIcon as yo, CommandToolbar as wo, CodeIcon as So, ScriptRunIcon as ko, ColorizedTextIcon as Co, ColorizedFillIcon as vo, FormatPaintIcon as To, TextBoldIcon as Do, TextItalicIcon as Ro, InsertHyperlinkIcon as Po, InsertCommentIcon as Mo, FullScreenOffIcon as Bo, FullScreenIcon as Fo, createScrollEdgeButton as No, createScrollEndButton as Ao, createScrollStartButton as Eo, HideColumnIcon as Io, ShowColumnIcon as Lo, HideRowIcon as Ho, ShowRowIcon as zo, ColumnsResizeAutoIcon as Wo, RowsResizeAutoIcon as $o, CutIcon as Oo, DrawAspectIcon as Vo, DrawAlignLeftIcon as Go, DrawResizeIcon as Uo, DrawAlignDistributeVertIcon as jo, DrawAlignDistributeHorzIcon as _o, DrawAlignBottomIcon as qo, DrawAlignMiddleIcon as Ko, DrawAlignTopIcon as Xo, DrawAlignRightIcon as Zo, DrawAlignCenterIcon as Jo, DrawMoveBackwardIcon as Yo, DrawToBackIcon as Qo, DrawMoveForwardIcon as en, DrawToFrontIcon as tn, scrollbarTheming as on, StackTrace as nn, FileNewIcon as rn, FileOpenIcon as an, FileDownloadAsCSVIcon as ln, FileDownloadAsExcelIcon as sn, FileDownloadAsSheetIcon as dn, useResolvedThemeMode as cn, ThemeMode as mn, useModal as pn, useLazyWindow as un, useOptionsDialog as gn, useInputDialog as hn, AnimatedTraversingEllipsisIcon as fn, ErrorPanel as xn, createExhibitTheme as bn, ModalProvider as yn, ErrorAlertIcon as wn } from "@sheetxl/utils-mui";
13
+ import Sn from "clsx";
14
+ import { FormatAlignLeft as kn, FormatAlignCenter as Cn, FormatAlignRight as vn, FormatAlignJustify as Tn, Colorize as Dn, DarkMode as Rn, LightMode as Pn, Keyboard as Mn, Remove as Bn, Add as Fn, ExpandLess as Nn, ExpandMore as An, Lock as En, MoreHoriz as In, WebhookOutlined as Ln, Close as Hn, AddCircleOutline as zn, Menu as Wn, CancelOutlined as $n } from "@mui/icons-material";
15
+ import { useCommands as On, CommandButtonType as Vn, useCallbackRef as Gn, ReactUtils as Un, KeyCodes as jn, useCommand as _n, useEditMode as qn, useMouseDownAndHoldListener as Kn, NotificationType as Xn, useImperativeElement as Zn, SplitPane as Jn, RoundedTab as Yn, SimpleCommand as Qn, Command as er, KeyModifiers as tr, CommandGroup as or, ToolTipPlacement as nr, ScrollPane as rr, useUndoManager as ar } from "@sheetxl/utils-react";
16
+ import { useTheme as lr, alpha as ir, getOverlayAlpha as sr, ThemeProvider as dr } from "@mui/material/styles";
17
+ import { StyledStrokePath as cr, StaticBorderRenderer as mr, FontUtils as pr, useModelListener as ur, createCellEditStateFromCell as gr, SheetCellEditor as hr, ScriptEditor as fr, TabStrip as xr, useDocThemes as br, SheetScrollbar as yr, PictureEditor as wr, ChartEditor as Sr, SheetElement as kr, EmptyFrame as Cr, LogoNoPaddingIcon as vr } from "@sheetxl/react";
18
+ import { alpha as Tr } from "@mui/system";
19
+ import { useFormContext as Dr } from "react-hook-form";
20
+ import { ResizableBox as Rr } from "react-resizable";
21
+ import { mergeRefs as Pr } from "react-merge-refs";
22
+ import { CommonUtils as Mr, ChainedError as Br, PartialError as Fr, UndoManager as Nr } from "@sheetxl/utils";
23
+ import { useMeasure as Ar } from "react-use";
24
+ import { CSSTransition as Er } from "react-transition-group";
25
+ import { useFullscreen as Ir } from "rooks";
26
+ import { IOUtils as Lr } from "@sheetxl/io";
27
+ import { ErrorBoundary as Hr } from "react-error-boundary";
28
+ import { useSnackbar as zr, SnackbarContent as Wr, SnackbarProvider as $r } from "notistack";
29
+ const Or = S(k((e2, t2) => {
30
+ const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, parentFloat: l2, ...i2 } = e2, s2 = On(o2, ["formatAlignLeftToggle", "formatAlignCenterToggle", "formatAlignRightToggle", "formatAlignJustifyToggle", "formatAlignCenterContinuousToggle", "formatAlignFillToggle", "formatAlignDistributedHorizontalToggle"]), d2 = C(() => {
31
31
  for (let e3 = 0; e3 < s2.length; e3++) if (s2[e3]?.state()) return s2[e3].key();
32
32
  return s2[0]?.key();
33
33
  }, [s2]), c2 = C(() => {
34
34
  const e3 = /* @__PURE__ */ new Map();
35
- return e3.set("formatAlignLeftToggle", ae(x(wn, {}))), e3.set("formatAlignCenterToggle", ae(x(kn, {}))), e3.set("formatAlignRightToggle", ae(x(Sn, {}))), e3.set("formatAlignJustifyToggle", ae(x(Cn, {}))), e3.set("formatAlignCenterContinuousToggle", ae(x(kn, {}))), e3.set("formatAlignFillToggle", ae(x(Cn, {}))), e3.set("formatAlignDistributedHorizontalToggle", ae(x(Cn, {}))), e3;
35
+ return e3.set("formatAlignLeftToggle", ae(x(kn, {}))), e3.set("formatAlignCenterToggle", ae(x(Cn, {}))), e3.set("formatAlignRightToggle", ae(x(vn, {}))), e3.set("formatAlignJustifyToggle", ae(x(Tn, {}))), e3.set("formatAlignCenterContinuousToggle", ae(x(Cn, {}))), e3.set("formatAlignFillToggle", ae(x(Tn, {}))), e3.set("formatAlignDistributedHorizontalToggle", ae(x(Tn, {}))), e3;
36
36
  }, []), m2 = C(() => {
37
37
  if (!n2) return null;
38
38
  const e3 = { ...n2 };
39
39
  return delete e3.beforeExecute, e3;
40
40
  }, [n2]), p2 = v((e3, t3) => {
41
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatAlignLeftToggle"), icon: c2.get("formatAlignLeftToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignCenterToggle"), icon: c2.get("formatAlignCenterToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignRightToggle"), icon: c2.get("formatAlignRightToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignJustifyToggle"), icon: c2.get("formatAlignJustifyToggle") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatAlignCenterContinuousToggle"), icon: c2.get("formatAlignCenterContinuousToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignFillToggle"), icon: c2.get("formatAlignFillToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignDistributedHorizontalToggle"), icon: c2.get("formatAlignDistributedHorizontalToggle") })] }), s3 = b(A, { sx: { className: yn("quick-buttons"), display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [x(le, { command: t3.getCommand("formatIndentDecrease"), commandHook: m2, scope: r2, disabled: a2, icon: ae(x(se, {})) }), x(le, { command: t3.getCommand("formatIndentIncrease"), commandHook: m2, scope: r2, disabled: a2, icon: ae(x(de, {})) })] }), d3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...i2, children: [s3, x(ie, { orientation: "horizontal" }), x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: l3 })] });
41
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatAlignLeftToggle"), icon: c2.get("formatAlignLeftToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignCenterToggle"), icon: c2.get("formatAlignCenterToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignRightToggle"), icon: c2.get("formatAlignRightToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignJustifyToggle"), icon: c2.get("formatAlignJustifyToggle") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatAlignCenterContinuousToggle"), icon: c2.get("formatAlignCenterContinuousToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignFillToggle"), icon: c2.get("formatAlignFillToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignDistributedHorizontalToggle"), icon: c2.get("formatAlignDistributedHorizontalToggle") })] }), s3 = b(E, { sx: { className: Sn("quick-buttons"), display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [x(le, { command: t3.getCommand("formatIndentDecrease"), commandHook: m2, scope: r2, disabled: a2, icon: ae(x(se, {})) }), x(le, { command: t3.getCommand("formatIndentIncrease"), commandHook: m2, scope: r2, disabled: a2, icon: ae(x(de, {})) })] }), d3 = b(E, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...i2, children: [s3, x(ie, { orientation: "horizontal" }), x(E, { sx: { overflow: "auto", flex: "1 1 100%" }, children: l3 })] });
42
42
  return ce({ ...e3, children: d3 });
43
43
  }, [a2, n2]);
44
- return x(me, { ref: t2, parentFloat: l2, commands: o2, commandHook: n2, scope: r2, createPopupPanel: p2, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: d2, icon: c2.get(d2) ?? x(wn, {}), ...i2 });
45
- })), $r = k(S((e2, t2) => {
46
- const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = Wn(o2, ["formatAlignTopToggle", "formatAlignMiddleToggle", "formatAlignBottomToggle", "formatAlignJustifyVerticalToggle", "formatAlignDistributedVerticalToggle"]), s2 = C(() => {
44
+ return x(me, { ref: t2, parentFloat: l2, commands: o2, commandHook: n2, scope: r2, createPopupPanel: p2, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: d2, icon: c2.get(d2) ?? x(kn, {}), ...i2 });
45
+ })), Vr = S(k((e2, t2) => {
46
+ const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = On(o2, ["formatAlignTopToggle", "formatAlignMiddleToggle", "formatAlignBottomToggle", "formatAlignJustifyVerticalToggle", "formatAlignDistributedVerticalToggle"]), s2 = C(() => {
47
47
  for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3].key();
48
48
  return i2[0]?.key();
49
49
  }, [i2]), d2 = C(() => {
50
50
  const e3 = /* @__PURE__ */ new Map();
51
- return e3.set("formatAlignTopToggle", ae(x(pe, {}))), e3.set("formatAlignMiddleToggle", ae(x(ue, {}))), e3.set("formatAlignBottomToggle", ae(x(ge, {}))), e3.set("formatAlignJustifyVerticalToggle", ae(x(Cn, {}))), e3.set("formatAlignDistributedVerticalToggle", ae(x(Cn, {}))), e3;
51
+ return e3.set("formatAlignTopToggle", ae(x(pe, {}))), e3.set("formatAlignMiddleToggle", ae(x(ue, {}))), e3.set("formatAlignBottomToggle", ae(x(ge, {}))), e3.set("formatAlignJustifyVerticalToggle", ae(x(Tn, {}))), e3.set("formatAlignDistributedVerticalToggle", ae(x(Tn, {}))), e3;
52
52
  }, []), c2 = v((e3, t3) => {
53
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatAlignTopToggle"), icon: d2.get("formatAlignTopToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignMiddleToggle"), icon: d2.get("formatAlignMiddleToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignBottomToggle"), icon: d2.get("formatAlignBottomToggle") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatAlignJustifyVerticalToggle"), icon: d2.get("formatAlignJustifyVerticalToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignDistributedVerticalToggle"), icon: d2.get("formatAlignDistributedVerticalToggle") })] });
53
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatAlignTopToggle"), icon: d2.get("formatAlignTopToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignMiddleToggle"), icon: d2.get("formatAlignMiddleToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignBottomToggle"), icon: d2.get("formatAlignBottomToggle") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatAlignJustifyVerticalToggle"), icon: d2.get("formatAlignJustifyVerticalToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignDistributedVerticalToggle"), icon: d2.get("formatAlignDistributedVerticalToggle") })] });
54
54
  return ce({ ...e3, children: l3 });
55
55
  }, [a2, n2, d2]);
56
56
  return x(me, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: c2, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: d2.get(s2) ?? ae(x(ge, {})), ...l2 });
57
- })), Or = k(S((e2, t2) => {
58
- const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = Wn(o2, ["formatTextOverflowVisibleToggle", "formatTextOverflowWrapToggle", "formatTextOverflowClipToggle", "formatTextOverflowShrinkToggle"]), s2 = C(() => {
57
+ })), Gr = S(k((e2, t2) => {
58
+ const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = On(o2, ["formatTextOverflowVisibleToggle", "formatTextOverflowWrapToggle", "formatTextOverflowClipToggle", "formatTextOverflowShrinkToggle"]), s2 = C(() => {
59
59
  for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3].key();
60
60
  return i2[0]?.key();
61
61
  }, [i2]), d2 = C(() => {
62
62
  const e3 = /* @__PURE__ */ new Map();
63
63
  return e3.set("formatTextOverflowVisibleToggle", ae(x(he, {}))), e3.set("formatTextOverflowWrapToggle", ae(x(fe, {}))), e3.set("formatTextOverflowClipToggle", ae(x(xe, {}))), e3.set("formatTextOverflowShrinkToggle", ae(x(be, {}))), e3;
64
- }, []), c2 = On((e3, t3) => {
65
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatTextOverflowVisibleToggle"), icon: d2.get("formatTextOverflowVisibleToggle") }), x(le, { ...o3, command: t3.getCommand("formatTextOverflowWrapToggle"), icon: d2.get("formatTextOverflowWrapToggle") }), x(le, { ...o3, command: t3.getCommand("formatTextOverflowClipToggle"), icon: d2.get("formatTextOverflowClipToggle") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatTextOverflowShrinkToggle"), icon: d2.get("formatTextOverflowShrinkToggle") })] });
64
+ }, []), c2 = Gn((e3, t3) => {
65
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatTextOverflowVisibleToggle"), icon: d2.get("formatTextOverflowVisibleToggle") }), x(le, { ...o3, command: t3.getCommand("formatTextOverflowWrapToggle"), icon: d2.get("formatTextOverflowWrapToggle") }), x(le, { ...o3, command: t3.getCommand("formatTextOverflowClipToggle"), icon: d2.get("formatTextOverflowClipToggle") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatTextOverflowShrinkToggle"), icon: d2.get("formatTextOverflowShrinkToggle") })] });
66
66
  return ce({ ...e3, children: l3 });
67
67
  }, [a2, n2, r2]);
68
68
  return x(me, { ref: t2, commands: o2, commandHook: n2, scope: r2, label: "Text Overflow", tooltip: "Configure how text behaves when it doesn't fit within a cell.", createPopupPanel: c2, icon: d2.get(s2) ?? ae(x(he, {})), ...l2 });
69
- })), Vr = k(S((e2, t2) => {
70
- const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = Wn(o2, ["formatTextRotate0", "formatTextRotate315", "formatTextRotate45", "formatTextRotate90", "formatTextRotate270", "formatSubscriptToggle", "formatTextRotateCustom"]), s2 = C(() => {
69
+ })), Ur = S(k((e2, t2) => {
70
+ const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = On(o2, ["formatTextRotate0", "formatTextRotate315", "formatTextRotate45", "formatTextRotate90", "formatTextRotate270", "formatSubscriptToggle", "formatTextRotateCustom"]), s2 = C(() => {
71
71
  const e3 = i2.length;
72
72
  for (let t3 = 0; t3 < e3; t3++) {
73
73
  const e4 = i2[t3];
@@ -76,15 +76,15 @@ const Wr = k(S((e2, t2) => {
76
76
  return i2[1]?.key();
77
77
  }, [i2]), d2 = C(() => {
78
78
  const e3 = /* @__PURE__ */ new Map();
79
- return e3.set("formatTextRotate0", ae(x(ye, {}))), e3.set("formatTextRotate315", ae(x(ye, {}))), e3.set("formatTextRotate45", ae(x(we, {}))), e3.set("formatTextRotate90", ae(x(ke, {}))), e3.set("formatTextRotate270", ae(x(Se, {}))), e3.set("formatTextRotateCustom", ae(x(Ce, {}))), e3;
79
+ return e3.set("formatTextRotate0", ae(x(ye, {}))), e3.set("formatTextRotate315", ae(x(ye, {}))), e3.set("formatTextRotate45", ae(x(we, {}))), e3.set("formatTextRotate90", ae(x(Se, {}))), e3.set("formatTextRotate270", ae(x(ke, {}))), e3.set("formatTextRotateCustom", ae(x(Ce, {}))), e3;
80
80
  }, []), c2 = v((e3, t3) => {
81
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatTextRotate0"), icon: ae(x(ve, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatTextRotate315"), icon: ae(x(ye, {})) }), x(le, { ...o3, command: t3.getCommand("formatTextRotate45"), icon: ae(x(we, {})) }), x(le, { ...o3, command: t3.getCommand("formatTextRotate90"), icon: ae(x(ke, {})) }), x(le, { ...o3, command: t3.getCommand("formatTextRotate270"), icon: ae(x(Se, {})) }), x(ie, { orientation: "horizontal" }), x(Te, { ...o3, command: t3.getCommand("formatTextRotateCustom"), icon: ae(x(Ce, {})), label: "Custom" })] });
81
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatTextRotate0"), icon: ae(x(ve, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatTextRotate315"), icon: ae(x(ye, {})) }), x(le, { ...o3, command: t3.getCommand("formatTextRotate45"), icon: ae(x(we, {})) }), x(le, { ...o3, command: t3.getCommand("formatTextRotate90"), icon: ae(x(Se, {})) }), x(le, { ...o3, command: t3.getCommand("formatTextRotate270"), icon: ae(x(ke, {})) }), x(ie, { orientation: "horizontal" }), x(Te, { ...o3, command: t3.getCommand("formatTextRotateCustom"), icon: ae(x(Ce, {})), label: "Custom" })] });
82
82
  return ce({ ...e3, children: l3 });
83
83
  }, [a2, n2, r2, o2]), m2 = C(() => 0 !== (o2.getCommand("formatTextRotateCustom")?.state() ?? 0), [i2]);
84
84
  return x(me, { ref: t2, commands: o2, commandHook: n2, scope: r2, selected: m2, label: "Text Orientation", tooltip: "Rotate your text diagonally or vertically. This is a great way to label narrow columns.", createPopupPanel: c2, quickCommand: m2 ? "formatTextRotate0" : "formatTextRotate315", icon: ae(d2.get(s2) ?? x(ye, {})), ...l2 });
85
- })), Gr = { Preset: "preset", Custom: "custom" }, Ur = { Start: "start", End: "end" }, jr = {}, _r = (e2, t2, o2, n2) => {
85
+ })), jr = { Preset: "preset", Custom: "custom" }, _r = { Start: "start", End: "end" }, qr = {}, Kr = (e2, t2, o2, n2) => {
86
86
  const r2 = e2 + "-" + t2 + "-" + o2 + (n2 ? "-server" : "");
87
- if (jr[r2]) return jr[r2];
87
+ if (qr[r2]) return qr[r2];
88
88
  const a2 = ((e3, t3, o3, n3) => {
89
89
  if ("undefined" == typeof document && !n3) return null;
90
90
  const r3 = n3 ? new n3() : document.createElement("canvas");
@@ -92,12 +92,12 @@ const Wr = k(S((e2, t2) => {
92
92
  const a3 = r3.getContext("2d");
93
93
  return a3 ? (a3.fillStyle = e3, a3.fillRect(0, 0, r3.width, r3.height), a3.fillStyle = t3, a3.fillRect(0, 0, o3, o3), a3.translate(o3, o3), a3.fillRect(0, 0, o3, o3), r3.toDataURL()) : null;
94
94
  })(e2, t2, o2, n2);
95
- return jr[r2] = a2, a2;
96
- }, qr = {}, Kr = k((e2) => {
97
- const { className: t2, style: o2 = Vn.EmptyCssProperties, white: n2 = "transparent", grey: r2 = "grey", size: a2 = 8, borderRadius: l2, boxShadow: i2, renderers: s2 = qr, children: d2, ...c2 } = e2, m2 = d2, p2 = C(() => Object.assign({ borderRadius: l2, boxShadow: i2, position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", background: `url(${_r(n2, r2, a2, s2?.canvas)}) center left` }, o2), [n2, r2, a2, s2]);
95
+ return qr[r2] = a2, a2;
96
+ }, Xr = {}, Zr = S((e2) => {
97
+ const { className: t2, style: o2 = Un.EmptyCssProperties, white: n2 = "transparent", grey: r2 = "grey", size: a2 = 8, borderRadius: l2, boxShadow: i2, renderers: s2 = Xr, children: d2, ...c2 } = e2, m2 = d2, p2 = C(() => Object.assign({ borderRadius: l2, boxShadow: i2, position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", background: `url(${Kr(n2, r2, a2, s2?.canvas)}) center left` }, o2), [n2, r2, a2, s2]);
98
98
  return T(d2) ? w.cloneElement(d2, { ...m2.props }) : x("div", { style: p2, ...c2 });
99
- }), Xr = k((e2) => {
100
- const { selectedColor: t2, onSelectColor: o2, onPreviewColor: n2, onClick: r2, onKeyDown: a2, onMouseOver: l2, onMouseLeave: i2, onFocus: s2, style: d2 = Vn.EmptyCssProperties, children: c2, alphaWhite: m2, alphaGrey: p2, darkMode: u2, alphaCheckSize: g2 = 7, ...h2 } = e2;
99
+ }), Jr = S((e2) => {
100
+ const { selectedColor: t2, onSelectColor: o2, onPreviewColor: n2, onClick: r2, onKeyDown: a2, onMouseOver: l2, onMouseLeave: i2, onFocus: s2, style: d2 = Un.EmptyCssProperties, children: c2, alphaWhite: m2, alphaGrey: p2, darkMode: u2, alphaCheckSize: g2 = 7, ...h2 } = e2;
101
101
  if (!t2) throw new Error("a selectedColor is required");
102
102
  const f2 = v((e3) => {
103
103
  r2?.(e3), e3.isDefaultPrevented() || (e3.ctrlKey ? n2?.(t2.toRGBA()) : o2?.(t2.toRGBA()));
@@ -105,23 +105,23 @@ const Wr = k(S((e2, t2) => {
105
105
  l2?.(e3), e3.isDefaultPrevented() || n2?.(t2.toRGBA());
106
106
  }, [n2, l2, t2]), w2 = v((e3) => {
107
107
  i2?.(e3), e3.isDefaultPrevented();
108
- }, [n2, i2]), k2 = v((e3) => {
108
+ }, [n2, i2]), S2 = v((e3) => {
109
109
  s2?.(e3), e3.isDefaultPrevented() || n2?.(t2.toRGBA());
110
- }, [n2, s2, t2]), S2 = v((e3) => {
111
- a2?.(e3), e3.isDefaultPrevented() || e3.keyCode === Gn.Enter && o2?.(t2.toRGBA());
112
- }, [o2, a2, t2]), T2 = C(() => 1 === t2.toRGBA().alpha ? null : x(Kr, { size: g2, white: m2, grey: p2, style: { position: "absolute", width: "calc(100% - 1.5px)", height: "calc(100% - 1.5px)", top: "0.75px", left: "0.75px" } }), [m2, p2, t2]);
113
- return b("div", { style: { position: "absolute", height: "100%", width: "100%", top: "0px", left: "0px", cursor: "pointer", outline: "none", ...d2 }, tabIndex: 0, ...h2, onClick: f2, onKeyDown: S2, onMouseOver: y2, onMouseLeave: w2, onFocus: k2, children: [T2, x("div", { style: { position: "absolute", top: "0px", left: "0px", height: "100%", width: "100%", background: t2.toCSS(u2) }, children: c2 })] });
114
- }), Zr = k((o2) => {
115
- const { schemeColorLookup: n2, selectedColor: r2, previewColor: a2, colorDef: l2, onSelectColorDef: i2, onPreviewColorDef: s2, swatchProps: d2, defaultButtonSize: c2 = 24, isLarge: m2 = false, compareRGB: p2 = false, darkMode: u2 = false, ...g2 } = o2, h2 = new e({ val: l2.definition.val, adjs: l2.definition.adjs }, (e2) => n2(e2)), f2 = p2 ? h2.toRGBA().toString() : h2.toString(), y2 = r2 && (p2 ? r2.toRGBA().toString() : r2.toString()) === f2, w2 = a2 && (p2 ? a2.toRGBA().toString() : a2.toString()) === f2, k2 = [];
116
- k2.push({ [t.AdjustmentType.Inv]: true }), k2.push({ [t.AdjustmentType.Alpha]: 100 });
117
- const S2 = h2.adjust(k2), C2 = v(() => {
110
+ }, [n2, s2, t2]), k2 = v((e3) => {
111
+ a2?.(e3), e3.isDefaultPrevented() || e3.keyCode === jn.Enter && o2?.(t2.toRGBA());
112
+ }, [o2, a2, t2]), T2 = C(() => 1 === t2.toRGBA().alpha ? null : x(Zr, { size: g2, white: m2, grey: p2, style: { position: "absolute", width: "calc(100% - 1.5px)", height: "calc(100% - 1.5px)", top: "0.75px", left: "0.75px" } }), [m2, p2, t2]);
113
+ return b("div", { style: { position: "absolute", height: "100%", width: "100%", top: "0px", left: "0px", cursor: "pointer", outline: "none", ...d2 }, tabIndex: 0, ...h2, onClick: f2, onKeyDown: k2, onMouseOver: y2, onMouseLeave: w2, onFocus: S2, children: [T2, x("div", { style: { position: "absolute", top: "0px", left: "0px", height: "100%", width: "100%", background: t2.toCSS(u2) }, children: c2 })] });
114
+ }), Yr = S((o2) => {
115
+ const { schemeColorLookup: n2, selectedColor: r2, previewColor: a2, colorDef: l2, onSelectColorDef: i2, onPreviewColorDef: s2, swatchProps: d2, defaultButtonSize: c2 = 24, isLarge: m2 = false, compareRGB: p2 = false, darkMode: u2 = false, ...g2 } = o2, h2 = new e({ val: l2.definition.val, adjs: l2.definition.adjs }, (e2) => n2(e2)), f2 = p2 ? h2.toRGBA().toString() : h2.toString(), y2 = r2 && (p2 ? r2.toRGBA().toString() : r2.toString()) === f2, w2 = a2 && (p2 ? a2.toRGBA().toString() : a2.toString()) === f2, S2 = [];
116
+ S2.push({ [t.AdjustmentType.Inv]: true }), S2.push({ [t.AdjustmentType.Alpha]: 100 });
117
+ const k2 = h2.adjust(S2), C2 = v(() => {
118
118
  i2?.(l2);
119
119
  }, [i2, l2]), T2 = v((e2) => {
120
120
  s2?.(e2 ? l2 : null);
121
121
  }, [s2, l2]);
122
- return x(De, { disableInteractive: true, PopperProps: { style: { pointerEvents: "none" }, disablePortal: true, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: true, options: { boundariesElement: "viewport" } }] } }, title: l2.description, placement: "bottom-start", children: x("div", { style: { width: c2 * (m2 ? 1.2 : 1) + "px", height: c2 * (m2 ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...g2, children: b(Xr, { selectedColor: h2, title: null, onSelectColor: C2, onPreviewColor: T2, alphaCheckSize: m2 ? 9 : void 0, darkMode: u2, ...d2, children: [x("div", { style: { position: "absolute", width: "100%", height: "100%", top: "0px", left: "0px", pointerEvents: "none", borderColor: S2.toRGBA(u2).toString(), borderWidth: "2px", borderStyle: "solid", boxSizing: "border-box", opacity: y2 ? "1" : "0" } }), x("div", { style: { position: "absolute", width: 0.33 * c2 * (m2 ? 1.2 : 1) + "px", height: 0.33 * c2 * (m2 ? 1.2 : 1) + "px", left: "calc(50% - 0.5px)", top: "calc(50% - 0.5px)", transform: "translate(-50%,-50%)", pointerEvents: "none", background: S2.toRGBA(u2).toString(), borderRadius: "50%", opacity: w2 ? "1" : "0" } })] }) }) });
123
- }), Jr = k((e2) => {
124
- const { title: t2, schemeColorLookup: o2, colorDefs: n2, selectedColor: r2, previewColor: a2, onSelectColorDef: l2, onPreviewColorDef: i2, style: s2 = Vn.EmptyCssProperties, compareRGB: d2 = false, darkMode: c2, swatchProps: m2, ...p2 } = e2;
122
+ return x(De, { disableInteractive: true, PopperProps: { style: { pointerEvents: "none" }, disablePortal: true, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: true, options: { boundariesElement: "viewport" } }] } }, title: l2.description, placement: "bottom-start", children: x("div", { style: { width: c2 * (m2 ? 1.2 : 1) + "px", height: c2 * (m2 ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...g2, children: b(Jr, { selectedColor: h2, title: null, onSelectColor: C2, onPreviewColor: T2, alphaCheckSize: m2 ? 9 : void 0, darkMode: u2, ...d2, children: [x("div", { style: { position: "absolute", width: "100%", height: "100%", top: "0px", left: "0px", pointerEvents: "none", borderColor: k2.toRGBA(u2).toString(), borderWidth: "2px", borderStyle: "solid", boxSizing: "border-box", opacity: y2 ? "1" : "0" } }), x("div", { style: { position: "absolute", width: 0.33 * c2 * (m2 ? 1.2 : 1) + "px", height: 0.33 * c2 * (m2 ? 1.2 : 1) + "px", left: "calc(50% - 0.5px)", top: "calc(50% - 0.5px)", transform: "translate(-50%,-50%)", pointerEvents: "none", background: k2.toRGBA(u2).toString(), borderRadius: "50%", opacity: w2 ? "1" : "0" } })] }) }) });
123
+ }), Qr = S((e2) => {
124
+ const { title: t2, schemeColorLookup: o2, colorDefs: n2, selectedColor: r2, previewColor: a2, onSelectColorDef: l2, onPreviewColorDef: i2, style: s2 = Un.EmptyCssProperties, compareRGB: d2 = false, darkMode: c2, swatchProps: m2, ...p2 } = e2;
125
125
  let u2;
126
126
  if (Array.isArray(n2[0])) u2 = n2;
127
127
  else {
@@ -138,29 +138,29 @@ const Wr = k(S((e2, t2) => {
138
138
  let n3 = [], l3 = u2[t3];
139
139
  for (let e4 = 0; e4 < l3.length; e4++) {
140
140
  let i4 = l3[e4];
141
- n3.push(x(Zr, { schemeColorLookup: o2, colorDef: i4, selectedColor: r2, previewColor: a2, onSelectColorDef: g2, onPreviewColorDef: h2, swatchProps: m2, compareRGB: d2, darkMode: c2 }, t3 + " " + e4));
141
+ n3.push(x(Yr, { schemeColorLookup: o2, colorDef: i4, selectedColor: r2, previewColor: a2, onSelectColorDef: g2, onPreviewColorDef: h2, swatchProps: m2, compareRGB: d2, darkMode: c2 }, t3 + " " + e4));
142
142
  }
143
- let i3 = x(A, { className: "button-col", sx: { display: "flex", flexDirection: "column", justifyContent: "space-between", boxShadow: (e4) => e4.shadows[2], borderRadius: "2px", overflow: "hidden" }, children: n3 }, "" + t3);
143
+ let i3 = x(E, { className: "button-col", sx: { display: "flex", flexDirection: "column", justifyContent: "space-between", boxShadow: (e4) => e4.shadows[2], borderRadius: "2px", overflow: "hidden" }, children: n3 }, "" + t3);
144
144
  e3.push(i3);
145
145
  }
146
146
  return e3;
147
147
  }, [u2, r2, a2, g2, h2]), y2 = C(() => t2 ? x(I, { noWrap: true, component: "div", sx: { display: "flex", flexShrink: "0", paddingLeft: "6px", paddingBottom: "4px", paddingTop: "0px", userSelect: "none", color: (e3) => e3.palette.text.secondary }, children: t2 }) : null, [t2]);
148
- return b(A, { style: { ...s2 }, children: [y2, x(A, { sx: { display: "flex", flexDirection: "row", gap: "6px", marginBottom: "14px", flexWrap: "wrap", justifyContent: "flex-start" }, ...p2, children: f2 })] });
149
- }), Yr = (e2, t2) => ({ description: e2, definition: { val: t2, adjs: [] } }), Qr = (t2, o2, n2, r2, a2, l2) => {
150
- const i2 = Yr(t2, o2);
148
+ return b(E, { style: { ...s2 }, children: [y2, x(E, { sx: { display: "flex", flexDirection: "row", gap: "6px", marginBottom: "14px", flexWrap: "wrap", justifyContent: "flex-start" }, ...p2, children: f2 })] });
149
+ }), ea = (e2, t2) => ({ description: e2, definition: { val: t2, adjs: [] } }), ta = (t2, o2, n2, r2, a2, l2) => {
150
+ const i2 = ea(t2, o2);
151
151
  r2?.push(i2);
152
152
  const s2 = new e({ val: i2.definition.val, adjs: i2.definition.adjs }, n2), d2 = s2.toString();
153
153
  a2?.set(d2, s2);
154
154
  const c2 = s2.toRGBA().toString();
155
155
  l2?.set(c2, s2);
156
- }, ea = w.lazy(() => import("./Do7y7aKPA48-93AV.mjs")), ta = k(S((t2, r2) => {
157
- const { selectedColor: a2 = null, previewColor: l2 = t2.selectedColor ?? null, recentColors: i2, schemeLookup: s2, disableAlpha: d2 = false, previewDebounceTime: c2 = 100, initialPanelType: m2, defaultButtonSize: p2 = 24, width: u2, onElementLoad: g2, onDone: h2, onEyeDropStart: f2, onEyeDropStop: w2, onPreviewColor: k2, onPreviewColorImmediate: S2, onSelectColor: T2, autoColor: P2, autoColorLabel: B2 = "Automatic", autoColorPosition: F2 = Ur.Start, compareRGB: N2 = false, darkMode: E2 = false, ...$2 } = t2, O2 = l2 || a2, V2 = On(k2, [k2]), G2 = On(S2, [S2]), U2 = On(T2, [T2]), j2 = On(f2, [f2]), _2 = On(w2, [w2]), [q2, K2] = D(false), X2 = rr(), Z2 = C(() => s2 || e.getDefaultSchemeLookup(), [s2]), J2 = C(() => {
156
+ }, oa = w.lazy(() => import("./CCjx6xhgYbFOq1KK.mjs")), na = S(k((t2, r2) => {
157
+ const { selectedColor: a2 = null, previewColor: l2 = t2.selectedColor ?? null, recentColors: i2, schemeLookup: s2, disableAlpha: d2 = false, previewDebounceTime: c2 = 100, initialPanelType: m2, defaultButtonSize: p2 = 24, width: u2, onElementLoad: g2, onDone: h2, onEyeDropStart: f2, onEyeDropStop: w2, onPreviewColor: S2, onPreviewColorImmediate: k2, onSelectColor: T2, autoColor: M2, autoColorLabel: B2 = "Automatic", autoColorPosition: F2 = _r.Start, compareRGB: N2 = false, darkMode: A2 = false, ...$2 } = t2, O2 = l2 || a2, V2 = Gn(S2, [S2]), G2 = Gn(k2, [k2]), U2 = Gn(T2, [T2]), j2 = Gn(f2, [f2]), _2 = Gn(w2, [w2]), [q2, K2] = D(false), X2 = lr(), Z2 = C(() => s2 || e.getDefaultSchemeLookup(), [s2]), J2 = C(() => {
158
158
  const e2 = /* @__PURE__ */ new Map(), t3 = /* @__PURE__ */ new Map(), n2 = [];
159
- Qr("Primary Background", "bg1", Z2, n2, e2, t3), Qr("Primary Text", "tx1", Z2, n2, e2, t3), Qr("Secondary Background", "bg2", Z2, n2, e2, t3), Qr("Secondary Text", "tx2", Z2, n2, e2, t3), Qr("Accent 1", "accent1", Z2, n2, e2, t3), Qr("Accent 2", "accent2", Z2, n2, e2, t3), Qr("Accent 3", "accent3", Z2, n2, e2, t3), Qr("Accent 4", "accent4", Z2, n2, e2, t3), Qr("Accent 5", "accent5", Z2, n2, e2, t3), Qr("Accent 6", "accent6", Z2, n2, e2, t3);
159
+ ta("Primary Background", "bg1", Z2, n2, e2, t3), ta("Primary Text", "tx1", Z2, n2, e2, t3), ta("Secondary Background", "bg2", Z2, n2, e2, t3), ta("Secondary Text", "tx2", Z2, n2, e2, t3), ta("Accent 1", "accent1", Z2, n2, e2, t3), ta("Accent 2", "accent2", Z2, n2, e2, t3), ta("Accent 3", "accent3", Z2, n2, e2, t3), ta("Accent 4", "accent4", Z2, n2, e2, t3), ta("Accent 5", "accent5", Z2, n2, e2, t3), ta("Accent 6", "accent6", Z2, n2, e2, t3);
160
160
  const r3 = o.buildPalette(n2, Z2, e2, t3), a3 = [];
161
- if (Qr("Dark Red", "C00000", Z2, a3, e2, t3), Qr("Red", "FF0000", Z2, a3, e2, t3), Qr("Orange", "FFC000", Z2, a3, e2, t3), Qr("Yellow", "FFFF00", Z2, a3, e2, t3), Qr("Light Green", "92D050", Z2, a3, e2, t3), Qr("Green", "00B050", Z2, a3, e2, t3), Qr("Light Blue", "00B0F0", Z2, a3, e2, t3), Qr("Blue", "0070C0", Z2, a3, e2, t3), Qr("Dark Blue", "002060", Z2, a3, e2, t3), d2 ? Qr("Purple Is A Fruit", "7030A0", Z2, a3, e2, t3) : Qr("Transparent", "00000000", Z2, a3, e2, t3), P2) {
162
- const t4 = P2.toString();
163
- e2.set(t4, P2);
161
+ if (ta("Dark Red", "C00000", Z2, a3, e2, t3), ta("Red", "FF0000", Z2, a3, e2, t3), ta("Orange", "FFC000", Z2, a3, e2, t3), ta("Yellow", "FFFF00", Z2, a3, e2, t3), ta("Light Green", "92D050", Z2, a3, e2, t3), ta("Green", "00B050", Z2, a3, e2, t3), ta("Light Blue", "00B0F0", Z2, a3, e2, t3), ta("Blue", "0070C0", Z2, a3, e2, t3), ta("Dark Blue", "002060", Z2, a3, e2, t3), d2 ? ta("Purple Is A Fruit", "7030A0", Z2, a3, e2, t3) : ta("Transparent", "00000000", Z2, a3, e2, t3), M2) {
162
+ const t4 = M2.toString();
163
+ e2.set(t4, M2);
164
164
  }
165
165
  const l3 = /* @__PURE__ */ new Map(), s3 = "function" == typeof i2 ? i2() : i2, c3 = [];
166
166
  for (let e3 = 0; s3 && e3 < s3.length; e3++) {
@@ -168,15 +168,15 @@ const Wr = k(S((e2, t2) => {
168
168
  l3.set(t4, s3[e3]), c3.push({ description: "Recent " + (e3 + 1), definition: { val: s3[e3].toString() } });
169
169
  }
170
170
  return { primaryColors: n2, modifiedPresets: r3, standardColors: a3, recentColorsLimited: c3, mapAllPresets: e2, mapAllPresetsRGB: t3, mapRecent: l3 };
171
- }, [Z2, i2, d2, P2]);
172
- M(() => {
171
+ }, [Z2, i2, d2, M2]);
172
+ R(() => {
173
173
  g2?.();
174
174
  }, []);
175
175
  const [Y2, Q2] = D(false), ee2 = v(() => {
176
176
  Q2((e2) => !e2);
177
177
  }, []);
178
- M(() => {
179
- if (m2) Q2(m2 === Gr.Custom);
178
+ R(() => {
179
+ if (m2) Q2(m2 === jr.Custom);
180
180
  else if (a2) {
181
181
  let e2 = a2.toString(), t3 = J2.mapAllPresets.get(e2);
182
182
  t3 || (e2 = a2.toRGBA().toString(), t3 = J2.mapAllPresetsRGB.get(e2));
@@ -187,28 +187,28 @@ const Wr = k(S((e2, t2) => {
187
187
  const te2 = v(n.debounce((e2) => {
188
188
  V2?.(e2);
189
189
  }, c2), [V2, c2]), [oe2, ne2] = D();
190
- M(() => {
190
+ R(() => {
191
191
  ne2(l2 || a2);
192
192
  }, [l2, a2]);
193
- const re2 = On((e2) => {
193
+ const re2 = Gn((e2) => {
194
194
  G2 && (G2(e2), te2(e2));
195
- }, [G2]), ae2 = On((t3) => {
195
+ }, [G2]), ae2 = Gn((t3) => {
196
196
  re2(t3 ? new e({ val: t3.definition.val, adjs: t3.definition.adjs }, Z2) : null);
197
197
  }, [Z2]), le2 = v((e2) => {
198
198
  e2.ctrlKey && Q2(true);
199
- }, []), ie2 = On((e2) => {
199
+ }, []), ie2 = Gn((e2) => {
200
200
  let t3 = false;
201
201
  if (e2) {
202
202
  const o2 = e2.toString();
203
203
  t3 = !J2.mapAllPresets.has(o2);
204
204
  }
205
205
  U2?.(e2, t3);
206
- }, [U2, J2]), se2 = On((t3) => {
206
+ }, [U2, J2]), se2 = Gn((t3) => {
207
207
  const o2 = t3 ? new e({ val: t3.definition.val, adjs: t3.definition.adjs }, Z2) : null;
208
208
  Promise.resolve(h2?.()).then(() => {
209
209
  ie2(o2);
210
210
  });
211
- }, [Z2, h2]), de2 = On((t3) => {
211
+ }, [Z2, h2]), de2 = Gn((t3) => {
212
212
  re2(t3 ? new e(t3, Z2) : null);
213
213
  }, [Z2]), ce2 = C(() => {
214
214
  if (void 0 === window.EyeDropper) return x(y, {});
@@ -228,85 +228,85 @@ const Wr = k(S((e2, t2) => {
228
228
  }).catch((e2) => {
229
229
  K2(false), "AbortError" !== e2?.name && console.error(e2);
230
230
  });
231
- }, children: x(vn, {}) });
232
- }, [J2, E2]), me2 = C(() => {
231
+ }, children: x(Dn, {}) });
232
+ }, [J2, A2]), me2 = C(() => {
233
233
  if (!Y2) return;
234
234
  const e2 = { opacity: Y2 ? 1 : "0", position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", boxSizing: "border-box" };
235
- return x(R, { fallback: x("div", { style: e2, children: x(Me, {}) }), children: x(ea, { style: e2, selectedColor: O2 ? O2.toRGBA().toString() : "transparent", onColorChange: de2, disableAlpha: d2 }) });
235
+ return x(P, { fallback: x("div", { style: e2, children: x(Re, {}) }), children: x(oa, { style: e2, selectedColor: O2 ? O2.toRGBA().toString() : "transparent", onColorChange: de2, disableAlpha: d2 }) });
236
236
  }, [Y2, O2]), pe2 = C(() => ({ onClick: le2, alphaGrey: X2.palette.text.icon ?? X2.palette.action.active }), [le2, X2]), ue2 = C(() => {
237
- if (!P2) return null;
238
- const e2 = { description: B2, definition: { val: P2.getVal(), adjs: P2.getAdjustments() } };
237
+ if (!M2) return null;
238
+ const e2 = { description: B2, definition: { val: M2.getVal(), adjs: M2.getAdjustments() } };
239
239
  return x(y, { children: b(H, { sx: { display: "flex", color: (e3) => e3.palette.text.secondary }, onMouseOver: () => {
240
240
  ae2(null);
241
241
  }, onClick: () => {
242
242
  se2(null);
243
- }, children: [x(A, { sx: { flex: "none", boxShadow: (e3) => e3.shadows[2], borderRadius: (e3) => e3.spacing(0.5), overflow: "hidden" }, children: x(Zr, { schemeColorLookup: Z2, colorDef: e2, selectedColor: null === a2 ? P2 : a2, previewColor: null === l2 ? P2 : l2, defaultButtonSize: p2, isLarge: true, darkMode: E2, compareRGB: N2, swatchProps: pe2 }) }), x(I, { noWrap: true, component: "div", style: { display: "flex", flex: "1 1 100%", marginLeft: "8px", userSelect: "none" }, children: B2 })] }) });
244
- }, [P2, B2, Z2, a2, l2]);
245
- return b(A, { ref: r2, sx: { width: u2, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...$2, children: [b("div", { style: { position: "relative", display: "flex" }, children: [b("div", { style: { opacity: Y2 ? "0" : 1 }, children: [ue2 && F2 === Ur.Start ? b(y, { children: [ue2, x(z, { light: true, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, x(Jr, { title: "Theme Colors", schemeColorLookup: Z2, colorDefs: J2.primaryColors, selectedColor: a2, previewColor: void 0 === l2 ? a2 : l2, swatchProps: pe2, onPreviewColorDef: ae2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 }), x(Jr, { schemeColorLookup: Z2, colorDefs: J2.modifiedPresets, selectedColor: a2, previewColor: void 0 === l2 ? a2 : l2, swatchProps: pe2, onPreviewColorDef: ae2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 }), x(z, { light: true, style: { marginBottom: "10px" } }), x(Jr, { title: "Standard Colors", schemeColorLookup: Z2, colorDefs: J2.standardColors, selectedColor: a2, previewColor: void 0 === l2 ? a2 : l2, swatchProps: pe2, onPreviewColorDef: ae2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 }), b("div", { style: { opacity: 0 === J2.recentColorsLimited.length ? "0" : void 0, display: 0 === J2.recentColorsLimited.length ? "none" : void 0 }, children: [x(z, { light: true, style: { marginBottom: "10px" } }), x(Jr, { title: "Recent Colors", schemeColorLookup: Z2, colorDefs: J2.recentColorsLimited, selectedColor: a2, previewColor: void 0 === l2 ? a2 : l2, swatchProps: pe2, onPreviewColorDef: ae2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 })] }), ue2 && F2 === Ur.End ? b(y, { children: [x(z, { light: true, sx: { marginTop: "2px", marginBottom: "2px" } }), ue2, x("div", { style: { marginBottom: "2px" } })] }) : null] }), me2] }), x(z, { light: true, style: { marginBottom: "10px" } }), b("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-around", gap: "8px", paddingLeft: "2px", paddingRight: "2px" }, children: [ce2, x("div", { style: { flex: "1 1 100%", background: "pink" } }), x(W, { style: { minWidth: "75px", maxWidth: "75px" }, value: "check", variant: "outlined", size: "small", onClick: () => {
243
+ }, children: [x(E, { sx: { flex: "none", boxShadow: (e3) => e3.shadows[2], borderRadius: (e3) => e3.spacing(0.5), overflow: "hidden" }, children: x(Yr, { schemeColorLookup: Z2, colorDef: e2, selectedColor: null === a2 ? M2 : a2, previewColor: null === l2 ? M2 : l2, defaultButtonSize: p2, isLarge: true, darkMode: A2, compareRGB: N2, swatchProps: pe2 }) }), x(I, { noWrap: true, component: "div", style: { display: "flex", flex: "1 1 100%", marginLeft: "8px", userSelect: "none" }, children: B2 })] }) });
244
+ }, [M2, B2, Z2, a2, l2]);
245
+ return b(E, { ref: r2, sx: { width: u2, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...$2, children: [b("div", { style: { position: "relative", display: "flex" }, children: [b("div", { style: { opacity: Y2 ? "0" : 1 }, children: [ue2 && F2 === _r.Start ? b(y, { children: [ue2, x(z, { light: true, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, x(Qr, { title: "Theme Colors", schemeColorLookup: Z2, colorDefs: J2.primaryColors, selectedColor: a2, previewColor: void 0 === l2 ? a2 : l2, swatchProps: pe2, onPreviewColorDef: ae2, onSelectColorDef: se2, compareRGB: N2, darkMode: A2 }), x(Qr, { schemeColorLookup: Z2, colorDefs: J2.modifiedPresets, selectedColor: a2, previewColor: void 0 === l2 ? a2 : l2, swatchProps: pe2, onPreviewColorDef: ae2, onSelectColorDef: se2, compareRGB: N2, darkMode: A2 }), x(z, { light: true, style: { marginBottom: "10px" } }), x(Qr, { title: "Standard Colors", schemeColorLookup: Z2, colorDefs: J2.standardColors, selectedColor: a2, previewColor: void 0 === l2 ? a2 : l2, swatchProps: pe2, onPreviewColorDef: ae2, onSelectColorDef: se2, compareRGB: N2, darkMode: A2 }), b("div", { style: { opacity: 0 === J2.recentColorsLimited.length ? "0" : void 0, display: 0 === J2.recentColorsLimited.length ? "none" : void 0 }, children: [x(z, { light: true, style: { marginBottom: "10px" } }), x(Qr, { title: "Recent Colors", schemeColorLookup: Z2, colorDefs: J2.recentColorsLimited, selectedColor: a2, previewColor: void 0 === l2 ? a2 : l2, swatchProps: pe2, onPreviewColorDef: ae2, onSelectColorDef: se2, compareRGB: N2, darkMode: A2 })] }), ue2 && F2 === _r.End ? b(y, { children: [x(z, { light: true, sx: { marginTop: "2px", marginBottom: "2px" } }), ue2, x("div", { style: { marginBottom: "2px" } })] }) : null] }), me2] }), x(z, { light: true, style: { marginBottom: "10px" } }), b("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-around", gap: "8px", paddingLeft: "2px", paddingRight: "2px" }, children: [ce2, x("div", { style: { flex: "1 1 100%", background: "pink" } }), x(W, { style: { minWidth: "75px", maxWidth: "75px" }, value: "check", variant: "outlined", size: "small", onClick: () => {
246
246
  ee2();
247
247
  }, children: x("div", Y2 ? { children: "Preset" } : { children: "Custom" }) }), x(W, { variant: "contained", size: "small", style: { minWidth: "75px" }, onClick: () => {
248
248
  Promise.resolve(h2?.()).then(() => {
249
249
  ie2(oe2);
250
250
  });
251
251
  }, children: "Done" })] })] });
252
- })), oa = x(Fe, {}), na = k(S((e2, t2) => {
253
- const { selectedColor: o2, quickColor: n2, icon: r2 = oa, tooltip: a2, label: l2, onPreviewColor: i2, onPreviewColorImmediate: s2, onSelectColor: d2, variant: c2 = Re.Toolbar, panelProps: m2, shouldCloseFloatAll: p2 = true, compareRGB: u2 = false, darkMode: g2 = false, ...h2 } = e2, f2 = On(i2, [i2]), b2 = On(s2, [s2]), y2 = On(d2, [d2]), [w2, k2] = D(() => {
254
- }), S2 = n2 || (w2 || o2) || m2?.autoColor, T2 = P(false), M2 = v(() => {
255
- }, []), R2 = On(() => {
256
- k2(o2);
257
- }, [o2]), B2 = On((e3) => {
258
- T2.current || (k2(e3), f2?.(e3));
259
- }, [f2]), F2 = On((e3) => {
260
- T2.current || (k2(e3), b2?.(e3));
261
- }, [b2]), N2 = On((e3, t3) => {
262
- T2.current || (k2(void 0), y2?.(e3, t3));
263
- }, [y2]), E2 = C(() => x(A, { sx: { width: "24px", height: "24px", color: "inherit", "--sxl-color-active": `${S2?.toCSS(g2) ?? "transparent"}`, "& .activeColor": { fill: `${S2?.toCSS(g2) ?? "transparent"}` }, "& .style_grey": { fill: (e3) => e3.palette.text.icon ?? e3.palette.action.active } }, children: "function" == typeof r2 ? r2() : r2 }), [S2, r2, g2]), I2 = On((e3) => {
252
+ })), ra = x(Fe, {}), aa = S(k((e2, t2) => {
253
+ const { selectedColor: o2, quickColor: n2, icon: r2 = ra, tooltip: a2, label: l2, onPreviewColor: i2, onPreviewColorImmediate: s2, onSelectColor: d2, variant: c2 = Pe.Toolbar, panelProps: m2, shouldCloseFloatAll: p2 = true, compareRGB: u2 = false, darkMode: g2 = false, ...h2 } = e2, f2 = Gn(i2, [i2]), b2 = Gn(s2, [s2]), y2 = Gn(d2, [d2]), [w2, S2] = D(() => {
254
+ }), k2 = n2 || (w2 || o2) || m2?.autoColor, T2 = M(false), R2 = v(() => {
255
+ }, []), P2 = Gn(() => {
256
+ S2(o2);
257
+ }, [o2]), B2 = Gn((e3) => {
258
+ T2.current || (S2(e3), f2?.(e3));
259
+ }, [f2]), F2 = Gn((e3) => {
260
+ T2.current || (S2(e3), b2?.(e3));
261
+ }, [b2]), N2 = Gn((e3, t3) => {
262
+ T2.current || (S2(void 0), y2?.(e3, t3));
263
+ }, [y2]), A2 = C(() => x(E, { sx: { width: "24px", height: "24px", color: "inherit", "--sxl-color-active": `${k2?.toCSS(g2) ?? "transparent"}`, "& .activeColor": { fill: `${k2?.toCSS(g2) ?? "transparent"}` }, "& .style_grey": { fill: (e3) => e3.palette.text.icon ?? e3.palette.action.active } }, children: "function" == typeof r2 ? r2() : r2 }), [k2, r2, g2]), I2 = Gn((e3) => {
264
264
  y2?.(n2, false);
265
265
  }, [y2, n2]), [L2, H2] = D(false), z2 = v((e3) => {
266
266
  const { closeFloat: t3, closeFloatAll: n3 } = e3;
267
- return x(ta, { ...m2, selectedColor: o2, previewColor: w2, onDone: p2 ? n3 : t3, onKeyDown: (e4) => {
268
- e4.which === Gn.Enter && (p2 ? n3() : t3());
267
+ return x(na, { ...m2, selectedColor: o2, previewColor: w2, onDone: p2 ? n3 : t3, onKeyDown: (e4) => {
268
+ e4.which === jn.Enter && (p2 ? n3() : t3());
269
269
  }, onPreviewColorImmediate: F2, onPreviewColor: B2, onSelectColor: N2, onEyeDropStart: () => H2(true), onEyeDropStop: () => H2(false), compareRGB: u2, darkMode: g2 });
270
- }, [o2, w2, p2, S2, m2?.autoColor, g2]), W2 = { onQuickClick: n2 ? I2 : void 0, createPopupPanel: z2, popupProps: { popperProps: { resizeOnOverflow: false } }, onPopupOpen: R2, onPopupClose: M2, tooltip: a2 || l2 || "Color", label: l2, icon: E2, ...h2 };
271
- return c2 === Re.Toolbar ? x(Pe, { ref: t2, ...W2 }) : x(Be, { ref: t2, ...W2 });
272
- })), ra = 82, aa = (e2) => {
273
- const { styleColor: t2, length: o2 = ra, width: n2 = 1, dashArray: r2 = null, sx: a2, isDouble: l2 = false, isAngled: i2 = false, darkMode: s2 = false, ...d2 } = e2;
274
- return x($, { sx: { width: `${o2}px`, height: `${n2}px`, color: "inherit", overflow: "visible", "& .activeColor": { stroke: (e3) => `${t2 ? t2.toRGBA(s2).toString() : e3.palette.text.icon ?? e3.palette.action.active}` }, "& .style_grey": { stroke: (e3) => e3.palette.text.icon ?? e3.palette.action.active }, ...a2 }, height: n2, width: o2, viewBox: `0 0 ${o2} ${n2}`, ...d2, children: x(sr, { length: o2, width: n2, dashArray: r2, isDouble: l2, isAngled: i2, className: "activeColor" }) });
275
- }, la = k(S((e2, t2) => {
276
- const { variant: o2, showLabels: n2 = false, disabled: a2 = false, createPopupPanel: l2, styleColor: i2, selectedStyle: s2, onSelectStyle: d2, showNone: c2 = true, darkMode: m2, sx: p2, ...u2 } = e2, g2 = On(d2, []), h2 = v((e3) => {
270
+ }, [o2, w2, p2, k2, m2?.autoColor, g2]), W2 = { onQuickClick: n2 ? I2 : void 0, createPopupPanel: z2, popupProps: { popperProps: { resizeOnOverflow: false } }, onPopupOpen: P2, onPopupClose: R2, tooltip: a2 || l2 || "Color", label: l2, icon: A2, ...h2 };
271
+ return c2 === Pe.Toolbar ? x(Me, { ref: t2, ...W2 }) : x(Be, { ref: t2, ...W2 });
272
+ })), la = 82, ia = (e2) => {
273
+ const { styleColor: t2, length: o2 = la, width: n2 = 1, dashArray: r2 = null, sx: a2, isDouble: l2 = false, isAngled: i2 = false, darkMode: s2 = false, ...d2 } = e2;
274
+ return x($, { sx: { width: `${o2}px`, height: `${n2}px`, color: "inherit", overflow: "visible", "& .activeColor": { stroke: (e3) => `${t2 ? t2.toRGBA(s2).toString() : e3.palette.text.icon ?? e3.palette.action.active}` }, "& .style_grey": { stroke: (e3) => e3.palette.text.icon ?? e3.palette.action.active }, ...a2 }, height: n2, width: o2, viewBox: `0 0 ${o2} ${n2}`, ...d2, children: x(cr, { length: o2, width: n2, dashArray: r2, isDouble: l2, isAngled: i2, className: "activeColor" }) });
275
+ }, sa = S(k((e2, t2) => {
276
+ const { variant: o2, showLabels: n2 = false, disabled: a2 = false, createPopupPanel: l2, styleColor: i2, selectedStyle: s2, onSelectStyle: d2, showNone: c2 = true, darkMode: m2, sx: p2, ...u2 } = e2, g2 = Gn(d2, []), h2 = v((e3) => {
277
277
  const { popupContainer: t3, floatReference: o3, closeFloat: l3, ...d3 } = e3, p3 = [], u3 = r.BuiltInDefinitionsArray;
278
278
  for (let e4 = 0; e4 < u3.length; e4++) {
279
279
  const t4 = u3[e4];
280
280
  if ("None" === t4.description && !c2) continue;
281
- const r2 = x(aa, { styleColor: i2, length: ra, width: t4.width, darkMode: m2, dashArray: t4.pattern, isDouble: t4.description.toLowerCase().includes("double"), isAngled: t4.description.toLowerCase().includes("slant") });
281
+ const r2 = x(ia, { styleColor: i2, length: la, width: t4.width, darkMode: m2, dashArray: t4.pattern, isDouble: t4.description.toLowerCase().includes("double"), isAngled: t4.description.toLowerCase().includes("slant") });
282
282
  let d4 = null;
283
- d4 = n2 ? b(y, { children: [x(A, { sx: { marginRight: "6px" }, children: t4.description }), b(A, { sx: { marginLeft: "6px", marginRight: "6px", display: "flex", alignItems: "center", flex: "1 1 100%" }, children: [x("div", { style: { flex: "1 1 100%" } }), r2] })] }) : "None" === t4.description ? "None" : r2, p3.push(x(Ne, { className: "border-stroke", tabIndex: 0, sx: { height: "28px", "& svg path.activeColor": { filter: Ee(4) }, paddingLeft: "16px", background: `linear-gradient(${ar("#fff", lr(5))}, ${ar("#fff", lr(5))})` }, tooltipProps: { description: n2 ? "" : t4.description }, icon: null, disabled: a2, onMouseDown: (e5) => e5.preventDefault(), onMouseUp: () => {
283
+ d4 = n2 ? b(y, { children: [x(E, { sx: { marginRight: "6px" }, children: t4.description }), b(E, { sx: { marginLeft: "6px", marginRight: "6px", display: "flex", alignItems: "center", flex: "1 1 100%" }, children: [x("div", { style: { flex: "1 1 100%" } }), r2] })] }) : "None" === t4.description ? "None" : r2, p3.push(x(Ne, { className: "border-stroke", tabIndex: 0, sx: { height: "28px", "& svg path.activeColor": { filter: Ae(4) }, paddingLeft: "16px", background: `linear-gradient(${ir("#fff", sr(5))}, ${ir("#fff", sr(5))})` }, tooltipProps: { description: n2 ? "" : t4.description }, icon: null, disabled: a2, onMouseDown: (e5) => e5.preventDefault(), onMouseUp: () => {
284
284
  l3(), g2(t4.style);
285
285
  }, onKeyDown: (e5) => {
286
- e5.which === Gn.Enter && l3();
286
+ e5.which === jn.Enter && l3();
287
287
  }, selected: t4.style === s2, parentFloat: o3, children: d4 }, e4));
288
288
  }
289
- return x(A, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: p3 });
289
+ return x(E, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: p3 });
290
290
  }, [a2, c2, i2, s2, m2]), f2 = C(() => {
291
291
  const e3 = r.BuiltInDefinitions.get(s2);
292
292
  let t3;
293
- return t3 = "None" === e3.description ? x(A, { sx: { minWidth: `${ra}px` }, children: "None" }) : x(aa, { styleColor: i2, length: ra, width: e3.width, dashArray: e3.pattern, darkMode: m2, isDouble: e3.description.toLowerCase().includes("double"), isAngled: e3.description.toLowerCase().includes("slant") }), x(A, { className: "border-stroke", sx: { paddingLeft: "12px", marginLeft: "4px", marginRight: "4px", height: "24px", display: "flex", alignItems: "center", "& svg path.activeColor": { filter: Ee() } }, children: t3 });
294
- }, [s2, i2]), w2 = C(() => r.BuiltInDefinitions.get(s2), [s2]), k2 = { disabled: a2, icon: f2, tooltip: "Border Style: " + w2.description, sx: { background: `linear-gradient(${ar("#fff", lr(5))}, ${ar("#fff", lr(5))})`, ...p2 }, createPopupPanel: h2, ...u2 };
295
- return o2 === Re.Toolbar ? x(Pe, { ...k2 }) : x(Be, { ...k2 });
296
- })), ia = k(S((t2, o2) => {
297
- const { autoColor: n2 = null, schemeLookup: a2, autoStrokeStyle: l2 = r.StrokeStyle.Thin, disabled: i2 = false, darkMode: s2 = false, showStylingBefore: d2 = true, onSelectBorder: c2, onPreviewBorder: m2, selectedBorder: p2, createTemporaryBorder: u2, ...g2 } = t2, h2 = On(c2, [c2]), f2 = On(m2, [m2]), [w2, k2] = D(), [S2, T2] = D(), M2 = w2 ?? l2, R2 = S2 ?? n2, P2 = p2 || { bottom: { style: l2, color: n2?.toString() } }, B2 = On((e2) => {
293
+ return t3 = "None" === e3.description ? x(E, { sx: { minWidth: `${la}px` }, children: "None" }) : x(ia, { styleColor: i2, length: la, width: e3.width, dashArray: e3.pattern, darkMode: m2, isDouble: e3.description.toLowerCase().includes("double"), isAngled: e3.description.toLowerCase().includes("slant") }), x(E, { className: "border-stroke", sx: { paddingLeft: "12px", marginLeft: "4px", marginRight: "4px", height: "24px", display: "flex", alignItems: "center", "& svg path.activeColor": { filter: Ae() } }, children: t3 });
294
+ }, [s2, i2]), w2 = C(() => r.BuiltInDefinitions.get(s2), [s2]), S2 = { disabled: a2, icon: f2, tooltip: "Border Style: " + w2.description, sx: { background: `linear-gradient(${ir("#fff", sr(5))}, ${ir("#fff", sr(5))})`, ...p2 }, createPopupPanel: h2, ...u2 };
295
+ return o2 === Pe.Toolbar ? x(Me, { ...S2 }) : x(Be, { ...S2 });
296
+ })), da = S(k((t2, o2) => {
297
+ const { autoColor: n2 = null, schemeLookup: a2, autoStrokeStyle: l2 = r.StrokeStyle.Thin, disabled: i2 = false, darkMode: s2 = false, showStylingBefore: d2 = true, onSelectBorder: c2, onPreviewBorder: m2, selectedBorder: p2, createTemporaryBorder: u2, ...g2 } = t2, h2 = Gn(c2, [c2]), f2 = Gn(m2, [m2]), [w2, S2] = D(), [k2, T2] = D(), R2 = w2 ?? l2, P2 = k2 ?? n2, M2 = p2 || { bottom: { style: l2, color: n2?.toString() } }, B2 = Gn((e2) => {
298
298
  const t3 = {}, o3 = e2 ? Object.keys(e2) : [];
299
299
  let n3 = false;
300
300
  for (let a4 = 0; a4 < o3.length; a4++) e2[o3[a4]]?.style && (t3[o3[a4]] = { style: e2[o3[a4]].style, color: e2[o3[a4]].color }, n3 || t3[o3[a4]].style === r.StrokeStyle.None || (n3 = true));
301
301
  o3.length < 6 && (n3 = true);
302
302
  const a3 = n3 ? t3.left : null, l3 = n3 ? t3.top : null, i3 = n3 ? t3.right : null, d3 = n3 ? t3.bottom : null, c3 = n3 ? t3.vertical : null, m3 = n3 ? t3.horizontal : null;
303
303
  let p3 = "";
304
- return l3 || a3 || (p3 += "M 3,5 H 5 V 3 H 3 "), l3 || (p3 += "M 7,5 H 9 V 3 H 7 "), l3 || c3 || (p3 += "M 11,5 h 2 V 3 h -2 "), l3 || (p3 += "M 15,5 h 2 V 3 h -2 "), l3 || i3 || (p3 += "M 19,5 h 2 V 3 h -2 "), a3 || (p3 += "M 3,9 H 5 V 7 H 3 "), c3 || (p3 += "M 11,9 h 2 V 7 h -2 "), i3 || (p3 += "M 19,9 h 2 V 7 h -2 "), m3 || a3 || (p3 += "M 3,13 H 5 V 11 H 3 "), m3 || (p3 += "M 7,13 H 9 V 11 H 7 "), m3 || c3 || (p3 += "M 11,13 h 2 v -2 h -2 "), m3 || i3 || (p3 += "M 19,13 h 2 v -2 h -2 "), m3 || (p3 += "M 15,13 h 2 v -2 h -2 "), a3 || (p3 += "M 3,17 H 5 V 15 H 3 "), c3 || (p3 += "M 11,17 h 2 v -2 h -2 "), i3 || (p3 += "M 19,17 h 2 v -2 h -2 "), d3 || a3 || (p3 += "M 3,21 H 5 V 19 H 3 "), d3 || (p3 += "M 7,21 H 9 V 19 H 7 "), d3 || c3 || (p3 += "M 11,21 h 2 v -2 h -2 "), d3 || (p3 += "M 15,21 h 2 v -2 h -2 "), d3 || i3 || (p3 += "M 19,21 h 2 v -2 h -2 "), b("div", { style: { width: "24px", height: "24px", position: "relative" }, children: [x($, { sx: { position: "absolute", top: "0px", left: "0px", "& path": { opacity: "0.8", transform: "translate(-0.5px, -0.5px)" } }, children: x("path", { d: p3 }) }), x(A, { sx: { width: "24px", height: "24px", display: "flex", alignItems: "center", justifyContent: "center", position: "absolute", top: "-1px", left: "-1px", "& svg path": { filter: Ae } }, children: x(dr, { getBorderAt: (e3, n4) => {
304
+ return l3 || a3 || (p3 += "M 3,5 H 5 V 3 H 3 "), l3 || (p3 += "M 7,5 H 9 V 3 H 7 "), l3 || c3 || (p3 += "M 11,5 h 2 V 3 h -2 "), l3 || (p3 += "M 15,5 h 2 V 3 h -2 "), l3 || i3 || (p3 += "M 19,5 h 2 V 3 h -2 "), a3 || (p3 += "M 3,9 H 5 V 7 H 3 "), c3 || (p3 += "M 11,9 h 2 V 7 h -2 "), i3 || (p3 += "M 19,9 h 2 V 7 h -2 "), m3 || a3 || (p3 += "M 3,13 H 5 V 11 H 3 "), m3 || (p3 += "M 7,13 H 9 V 11 H 7 "), m3 || c3 || (p3 += "M 11,13 h 2 v -2 h -2 "), m3 || i3 || (p3 += "M 19,13 h 2 v -2 h -2 "), m3 || (p3 += "M 15,13 h 2 v -2 h -2 "), a3 || (p3 += "M 3,17 H 5 V 15 H 3 "), c3 || (p3 += "M 11,17 h 2 v -2 h -2 "), i3 || (p3 += "M 19,17 h 2 v -2 h -2 "), d3 || a3 || (p3 += "M 3,21 H 5 V 19 H 3 "), d3 || (p3 += "M 7,21 H 9 V 19 H 7 "), d3 || c3 || (p3 += "M 11,21 h 2 v -2 h -2 "), d3 || (p3 += "M 15,21 h 2 v -2 h -2 "), d3 || i3 || (p3 += "M 19,21 h 2 v -2 h -2 "), b("div", { style: { width: "24px", height: "24px", position: "relative" }, children: [x($, { sx: { position: "absolute", top: "0px", left: "0px", "& path": { opacity: "0.8", transform: "translate(-0.5px, -0.5px)" } }, children: x("path", { d: p3 }) }), x(E, { sx: { width: "24px", height: "24px", display: "flex", alignItems: "center", justifyContent: "center", position: "absolute", top: "-1px", left: "-1px", "& svg path": { filter: Ee } }, children: x(mr, { getBorderAt: (e3, n4) => {
305
305
  if (!u2 || 0 === o3.length) return null;
306
306
  const r2 = e3.rowIndex, a4 = e3.colIndex, l4 = {};
307
307
  return 0 === r2 ? (l4.top = t3.top, l4.bottom = t3.horizontal) : (l4.top = t3.horizontal, l4.bottom = t3.bottom), 0 === a4 ? (l4.left = t3.left, l4.right = t3.vertical) : (l4.left = t3.vertical, l4.right = t3.right), u2?.(l4);
308
308
  }, width: 18, height: 18, darkMode: s2, style: { top: "0px", left: "0px", width: "18px", height: "18px", minWidth: "18px", minHeight: "18px", position: "relative" } }) })] });
309
- }, [R2, M2, s2]), F2 = v((e2, t3, o3) => {
309
+ }, [P2, R2, s2]), F2 = v((e2, t3, o3) => {
310
310
  let n3 = null;
311
311
  if (e2 && e2.length > 0) {
312
312
  let r2 = null;
@@ -316,78 +316,78 @@ const Wr = k(S((e2, t2) => {
316
316
  return n3;
317
317
  }, []), N2 = v((e2) => {
318
318
  h2?.(e2);
319
- }, []), E2 = v((e2) => {
319
+ }, []), A2 = v((e2) => {
320
320
  f2?.(e2);
321
321
  }, []), I2 = v((t3) => {
322
322
  const { closeFloatAll: o3, floatReference: l3 } = t3, c3 = (e2, t4, n3 = "bottom", a3 = false) => {
323
- const l4 = F2(e2, R2 ?? null, a3 ? r.StrokeStyle.None : M2 ?? null), i3 = a3 ? F2([], R2 ?? null, M2 ?? null) : l4;
324
- return x(He, { icon: B2(i3), sx: { background: `linear-gradient(${ar("#fff", lr(5))}, ${ar("#fff", lr(5))})` }, tooltipProps: { label: t4, simple: true, placement: n3 }, onClick: () => {
325
- o3(), E2(l4), N2(l4);
323
+ const l4 = F2(e2, P2 ?? null, a3 ? r.StrokeStyle.None : R2 ?? null), i3 = a3 ? F2([], P2 ?? null, R2 ?? null) : l4;
324
+ return x(He, { icon: B2(i3), sx: { background: `linear-gradient(${ir("#fff", sr(5))}, ${ir("#fff", sr(5))})` }, tooltipProps: { label: t4, simple: true, placement: n3 }, onClick: () => {
325
+ o3(), A2(l4), N2(l4);
326
326
  } });
327
- }, m3 = b(y, { children: [b(A, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [c3([r.Edge.Left, r.Edge.Top, r.Edge.Right, r.Edge.Bottom, r.Edge.Horizontal, r.Edge.Vertical], "All Borders", "top"), c3([r.Edge.Horizontal, r.Edge.Vertical], "Inner Borders", "top"), c3([r.Edge.Horizontal], "Inside Horizontal Borders", "top"), c3([r.Edge.Vertical], "Inside Vertical Borders", "top"), c3([r.Edge.Left, r.Edge.Top, r.Edge.Right, r.Edge.Bottom], "Outside Borders", "top")] }), b(A, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [c3([r.Edge.Left], "Left Borders"), c3([r.Edge.Top], "Top Borders"), c3([r.Edge.Right], "Right Borders"), c3([r.Edge.Bottom], "Bottom Borders"), c3([r.Edge.Left, r.Edge.Top, r.Edge.Right, r.Edge.Bottom, r.Edge.Horizontal, r.Edge.Vertical, r.Edge.DiagonalUp, r.Edge.DiagonalDown], "No Borders", "bottom", true)] })] }), p3 = x(y, { children: b(A, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [x(na, { variant: Re.Toolbar, icon: x(Ie, {}), selectedColor: M2 === r.StrokeStyle.None ? new e("transparent") : R2, onPreviewColor: (e2) => {
327
+ }, m3 = b(y, { children: [b(E, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [c3([r.Edge.Left, r.Edge.Top, r.Edge.Right, r.Edge.Bottom, r.Edge.Horizontal, r.Edge.Vertical], "All Borders", "top"), c3([r.Edge.Horizontal, r.Edge.Vertical], "Inner Borders", "top"), c3([r.Edge.Horizontal], "Inside Horizontal Borders", "top"), c3([r.Edge.Vertical], "Inside Vertical Borders", "top"), c3([r.Edge.Left, r.Edge.Top, r.Edge.Right, r.Edge.Bottom], "Outside Borders", "top")] }), b(E, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [c3([r.Edge.Left], "Left Borders"), c3([r.Edge.Top], "Top Borders"), c3([r.Edge.Right], "Right Borders"), c3([r.Edge.Bottom], "Bottom Borders"), c3([r.Edge.Left, r.Edge.Top, r.Edge.Right, r.Edge.Bottom, r.Edge.Horizontal, r.Edge.Vertical, r.Edge.DiagonalUp, r.Edge.DiagonalDown], "No Borders", "bottom", true)] })] }), p3 = x(y, { children: b(E, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [x(aa, { variant: Pe.Toolbar, icon: x(Ie, {}), selectedColor: R2 === r.StrokeStyle.None ? new e("transparent") : P2, onPreviewColor: (e2) => {
328
328
  T2(e2);
329
329
  }, onSelectColor: (e2, t4) => {
330
330
  T2(e2);
331
- }, darkMode: s2, tooltip: "Border Color", panelProps: { disableAlpha: true, autoColor: n2, schemeLookup: a2 }, disabled: i2 || M2 === r.StrokeStyle.None, parentFloat: l3, shouldCloseFloatAll: false }), x(la, { selectedStyle: M2, onSelectStyle: k2, styleColor: R2, darkMode: s2, variant: Re.Toolbar, parentFloat: l3 })] }) });
332
- return b(A, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, onClick: (e2) => e2.stopPropagation(), children: [d2 ? p3 : m3, x(ie, { orientation: "horizontal" }), d2 ? m3 : p3] });
333
- }, [M2, R2, n2, a2, s2]), L2 = C(() => B2(P2), [P2, s2]);
334
- return x(Pe, { ref: o2, createPopupPanel: I2, popupProps: { popperProps: { resizeOnOverflow: false } }, createTooltip: ({ children: e2 }, t3) => x(Le, { label: "Borders", description: "Set the borders.", disabled: t3, children: e2 }), onQuickClick: () => {
335
- h2?.(P2);
331
+ }, darkMode: s2, tooltip: "Border Color", panelProps: { disableAlpha: true, autoColor: n2, schemeLookup: a2 }, disabled: i2 || R2 === r.StrokeStyle.None, parentFloat: l3, shouldCloseFloatAll: false }), x(sa, { selectedStyle: R2, onSelectStyle: S2, styleColor: P2, darkMode: s2, variant: Pe.Toolbar, parentFloat: l3 })] }) });
332
+ return b(E, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, onClick: (e2) => e2.stopPropagation(), children: [d2 ? p3 : m3, x(ie, { orientation: "horizontal" }), d2 ? m3 : p3] });
333
+ }, [R2, P2, n2, a2, s2]), L2 = C(() => B2(M2), [M2, s2]);
334
+ return x(Me, { ref: o2, createPopupPanel: I2, popupProps: { popperProps: { resizeOnOverflow: false } }, createTooltip: ({ children: e2 }, t3) => x(Le, { label: "Borders", description: "Set the borders.", disabled: t3, children: e2 }), onQuickClick: () => {
335
+ h2?.(M2);
336
336
  }, quickButtonProps: { sx: {} }, disabled: i2, icon: L2, ...g2 });
337
- })), sa = k(S((e2, t2) => {
338
- const { commands: o2, command: n2, commandHook: r2, variant: a2 = $n.Toolbar, disabled: l2 = false, autoColor: i2, autoStrokeStyle: s2, schemeLookup: d2, createTemporaryBorder: c2, selectedBorder: m2, onSelectBorder: p2, darkMode: u2, icon: g2, label: h2, ...f2 } = e2, b2 = Wn(o2, ["formatBorder"]), y2 = n2 ?? b2[0], w2 = y2?.context() ?? null, k2 = w2?.autoColor ?? i2, S2 = w2?.autoStyle ?? s2, C2 = m2 ?? w2?.quickBorder, T2 = u2 ?? w2?.darkMode, D2 = c2 ?? w2?.createTemporaryBorder, M2 = d2 ?? w2?.schemeLookup, R2 = On((e3) => {
337
+ })), ca = S(k((e2, t2) => {
338
+ const { commands: o2, command: n2, commandHook: r2, variant: a2 = Vn.Toolbar, disabled: l2 = false, autoColor: i2, autoStrokeStyle: s2, schemeLookup: d2, createTemporaryBorder: c2, selectedBorder: m2, onSelectBorder: p2, darkMode: u2, icon: g2, label: h2, ...f2 } = e2, b2 = On(o2, ["formatBorder"]), y2 = n2 ?? b2[0], w2 = y2?.context() ?? null, S2 = w2?.autoColor ?? i2, k2 = w2?.autoStyle ?? s2, C2 = m2 ?? w2?.quickBorder, T2 = u2 ?? w2?.darkMode, D2 = c2 ?? w2?.createTemporaryBorder, R2 = d2 ?? w2?.schemeLookup, P2 = Gn((e3) => {
339
339
  w2?.onBorderSelect && w2.onBorderSelect(e3), p2?.(e3), y2?.execute(e3, r2);
340
- }, [y2, p2, r2]), P2 = v((e3, t3) => {
340
+ }, [y2, p2, r2]), M2 = v((e3, t3) => {
341
341
  const { children: o3, title: n3, ...r3 } = e3;
342
342
  let i3 = e3.children;
343
- return (y2?.disabled() || l2) && (i3 = x("div", { children: i3 })), x(ze, { command: y2, placement: a2 === $n.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...r3, children: i3 });
343
+ return (y2?.disabled() || l2) && (i3 = x("div", { children: i3 })), x(ze, { command: y2, placement: a2 === Vn.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...r3, children: i3 });
344
344
  }, [y2, l2]);
345
- return x(ia, { ref: t2, autoColor: k2, darkMode: T2, autoStrokeStyle: S2, createTemporaryBorder: D2, schemeLookup: M2, selectedBorder: C2, onSelectBorder: R2, createTooltip: P2, disabled: l2 || !y2 || y2.disabled(), ...f2 });
346
- })), da = k(S((e2, t2) => {
345
+ return x(da, { ref: t2, autoColor: S2, darkMode: T2, autoStrokeStyle: k2, createTemporaryBorder: D2, schemeLookup: R2, selectedBorder: C2, onSelectBorder: P2, createTooltip: M2, disabled: l2 || !y2 || y2.disabled(), ...f2 });
346
+ })), ma = S(k((e2, t2) => {
347
347
  const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
348
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("mergeToggle"), icon: ae(x(We, {})) }), x(le, { ...o3, command: t3.getCommand("mergeHorizontal"), icon: ae(x($e, {})) }), x(le, { ...o3, command: t3.getCommand("mergeVertical"), icon: ae(x(Oe, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("unmerge"), icon: ae(x(Ve, {})) })] });
348
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("mergeToggle"), icon: ae(x(We, {})) }), x(le, { ...o3, command: t3.getCommand("mergeHorizontal"), icon: ae(x($e, {})) }), x(le, { ...o3, command: t3.getCommand("mergeVertical"), icon: ae(x(Oe, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("unmerge"), icon: ae(x(Ve, {})) })] });
349
349
  return ce({ ...e3, children: l3 });
350
350
  }, [a2, n2, r2]);
351
351
  return x(me, { ref: t2, commands: o2, quickCommand: "mergeToggle", commandHook: n2, scope: r2, tooltip: "Combine or split cells.", createPopupPanel: i2, icon: ae(x(We, {})), ...l2 });
352
- })), ca = k(S((e2, t2) => {
352
+ })), pa = S(k((e2, t2) => {
353
353
  const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
354
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("freezeToggle"), icon: ae(x(Ge, {})) }), x(le, { ...o3, command: t3.getCommand("freezeToggleHorizontal"), icon: ae(x(Ue, {})) }), x(le, { ...o3, command: t3.getCommand("freezeToggleVertical"), icon: ae(x(je, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("unfreeze"), icon: x(Ve, {}) })] });
354
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("freezeToggle"), icon: ae(x(Ge, {})) }), x(le, { ...o3, command: t3.getCommand("freezeToggleHorizontal"), icon: ae(x(Ue, {})) }), x(le, { ...o3, command: t3.getCommand("freezeToggleVertical"), icon: ae(x(je, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("unfreeze"), icon: x(Ve, {}) })] });
355
355
  return ce({ ...e3, children: l3 });
356
356
  }, [a2, n2, r2]);
357
357
  return x(me, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: i2, 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: x(_e, {}), ...l2 });
358
- })), ma = k(S((e2, t2) => {
358
+ })), ua = S(k((e2, t2) => {
359
359
  const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
360
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("find"), icon: ae(x(qe, {})) }), x(le, { ...o3, command: t3.getCommand("findReplace"), icon: ae(x(Ke, {})) }), x(le, { ...o3, command: t3.getCommand("goto"), icon: ae(x(Xe, {})) })] });
360
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("find"), icon: ae(x(qe, {})) }), x(le, { ...o3, command: t3.getCommand("findReplace"), icon: ae(x(Ke, {})) }), x(le, { ...o3, command: t3.getCommand("goto"), icon: ae(x(Xe, {})) })] });
361
361
  return ce({ ...e3, children: l3 });
362
362
  }, [a2, n2, r2]);
363
363
  return x(me, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: i2, label: "Find & Select", tooltip: "Find and replace cells or go to a specific location.", quickCommand: "find", icon: ae(x(qe, {})), ...l2 });
364
- })), pa = k(S((e2, t2) => {
365
- const { command: o2, commandHook: n2, showQuickButtons: r2 = !!e2.commands, commands: l2, fontSizes: i2 = cr.DefaultFontSizes, disabled: s2 = false, parentFloat: d2, icon: c2, label: m2, sx: p2, ...u2 } = e2;
366
- Un(o2);
367
- const g2 = () => o2?.state()?.toString() || "11", [h2, f2] = D(g2), y2 = On(() => {
364
+ })), ga = S(k((e2, t2) => {
365
+ const { command: o2, commandHook: n2, showQuickButtons: r2 = !!e2.commands, commands: l2, fontSizes: i2 = pr.DefaultFontSizes, disabled: s2 = false, parentFloat: d2, icon: c2, label: m2, sx: p2, ...u2 } = e2;
366
+ _n(o2);
367
+ const g2 = () => o2?.state()?.toString() || "11", [h2, f2] = D(g2), y2 = Gn(() => {
368
368
  const e3 = parseFloat(h2);
369
369
  isNaN(e3) ? f2(g2()) : parseFloat(g2()) !== e3 && o2.execute(e3, n2);
370
370
  }, [g2, o2, h2, n2]);
371
- M(() => {
371
+ R(() => {
372
372
  f2(g2());
373
373
  }, [o2?.state()]);
374
374
  const w2 = C(() => {
375
375
  if (!n2) return null;
376
376
  const e3 = { ...n2 };
377
377
  return delete e3.beforeExecute, e3;
378
- }, [n2]), k2 = Wn(l2, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), S2 = C(() => k2 ? b(A, { className: yn("quick-buttons", {}), sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e3) => e3.stopPropagation(), children: [x(le, { command: k2[0], commandHook: w2, icon: ae(x(Ze, {})) }), x(le, { command: k2[1], icon: ae(x(Je, {})) })] }) : null, [k2]), T2 = rr(), R2 = C(() => `${a.getSharedMeasurer()("12.3", Math.round(T2.typography.fontSize), T2.typography.fontFamily).width}px`, [T2]), P2 = v((e3) => {
378
+ }, [n2]), S2 = On(l2, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), k2 = C(() => S2 ? b(E, { className: Sn("quick-buttons", {}), sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e3) => e3.stopPropagation(), children: [x(le, { command: S2[0], commandHook: w2, icon: ae(x(Ze, {})) }), x(le, { command: S2[1], icon: ae(x(Je, {})) })] }) : null, [S2]), T2 = lr(), P2 = C(() => `${a.getSharedMeasurer()("12.3", Math.round(T2.typography.fontSize), T2.typography.fontFamily).width}px`, [T2]), M2 = v((e3) => {
379
379
  const { onMouseDown: t3, onMouseUp: n3, ...r3 } = e3;
380
- return x(L, { component: "div", ...r3, disableRipple: true, children: x(O, { inputMode: "numeric", disabled: s2 || !o2 || o2.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: (e4) => `1px solid ${e4.palette.text.icon ?? e4.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.error.main}` }, "::after": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (e4) => `${Math.round(e4.typography.fontSize)}px`, width: R2, color: (e4) => e4.palette.text.secondary, input: { padding: "0 0", textAlign: "center", MozAppearance: "textfield", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary } }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" }, minHeight: "24px" }, value: h2, onFocus: (e4) => {
380
+ return x(L, { component: "div", ...r3, disableRipple: true, children: x(O, { inputMode: "numeric", disabled: s2 || !o2 || o2.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: (e4) => `1px solid ${e4.palette.text.icon ?? e4.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.error.main}` }, "::after": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (e4) => `${Math.round(e4.typography.fontSize)}px`, width: P2, color: (e4) => e4.palette.text.secondary, input: { padding: "0 0", textAlign: "center", MozAppearance: "textfield", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary } }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" }, minHeight: "24px" }, value: h2, onFocus: (e4) => {
381
381
  e4.target?.select();
382
382
  }, onKeyDown: (e4) => {
383
- if (e4.which === Gn.Enter) g2() !== h2 && (e4.stopPropagation(), e4.preventDefault(), y2());
384
- else if (e4.which === Gn.Escape) g2() !== h2 && (f2(g2()), setTimeout(() => {
383
+ if (e4.which === jn.Enter) g2() !== h2 && (e4.stopPropagation(), e4.preventDefault(), y2());
384
+ else if (e4.which === jn.Escape) g2() !== h2 && (f2(g2()), setTimeout(() => {
385
385
  e4.target?.select();
386
386
  }, 0), e4.stopPropagation(), e4.preventDefault());
387
387
  else {
388
388
  if (e4.key.match("[-]")) return e4.stopPropagation(), void e4.preventDefault();
389
389
  if (e4.key.match("[0-9.]") && (h2 + e4.key).length > 4) return e4.stopPropagation(), void e4.preventDefault();
390
- if (e4.which === Gn.Space) return void e4.preventDefault();
390
+ if (e4.which === jn.Space) return void e4.preventDefault();
391
391
  }
392
392
  }, onBlur: () => {
393
393
  y2();
@@ -406,24 +406,24 @@ const Wr = k(S((e2, t2) => {
406
406
  }, onMouseUp: (o3) => {
407
407
  0 === o3.button && t3(i2[e4]);
408
408
  }, onKeyDown: (o3) => {
409
- o3.keyCode !== Gn.Enter && o3.keyCode !== Gn.Space || t3(i2[e4]);
410
- }, sx: { paddingTop: "4px", paddingBottom: "4px" }, children: x(A, { sx: { display: "flex", flex: "1 1 100%", justifyContent: "end" }, children: i2[e4] }) }, "fontSize-" + e4));
409
+ o3.keyCode !== jn.Enter && o3.keyCode !== jn.Space || t3(i2[e4]);
410
+ }, sx: { paddingTop: "4px", paddingBottom: "4px" }, children: x(E, { sx: { display: "flex", flex: "1 1 100%", justifyContent: "end" }, children: i2[e4] }) }, "fontSize-" + e4));
411
411
  }
412
- const l3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...u2, children: [S2, x(ie, { orientation: "horizontal" }), x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: a2 })] });
412
+ const l3 = b(E, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...u2, children: [k2, x(ie, { orientation: "horizontal" }), x(E, { sx: { overflow: "auto", flex: "1 1 100%" }, children: a2 })] });
413
413
  return ce({ ...e3, children: l3 });
414
414
  }, [s2, o2?.state(), n2]);
415
- return x(Pe, { ref: t2, sx: { ...p2 }, tabIndex: -1, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: B2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: o2?.label(), description: o2?.description(), disabled: t3 || o2?.disabled(), children: e3 }), createQuickButton: P2, ...u2 });
416
- })), ua = k((e2) => {
415
+ return x(Me, { ref: t2, sx: { ...p2 }, tabIndex: -1, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: B2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: o2?.label(), description: o2?.description(), disabled: t3 || o2?.disabled(), children: e3 }), createQuickButton: M2, ...u2 });
416
+ })), ha = S((e2) => {
417
417
  const { selected: t2, disabled: o2, formattedValue: n2, handleSetFormat: r2, format: a2, sx: i2, ...s2 } = e2;
418
418
  return x(Ne, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...i2 }, disabled: o2, selected: t2, icon: t2 ? x(Ye, {}) : void 0, onMouseDown: (e3) => {
419
419
  0 === e3.button && e3.preventDefault();
420
420
  }, onMouseUp: (e3) => {
421
421
  0 === e3.button && r2(a2.numberFormat);
422
422
  }, onKeyDown: (e3) => {
423
- e3.keyCode !== Gn.Enter && e3.keyCode !== Gn.Space || r2(a2.numberFormat);
424
- }, ...s2, children: b(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [b(I, { component: "div", children: [a2.formatType, a2.formatType === l.Type.Custom ? "…" : ""] }), x(I, { variant: "caption", component: "div", sx: { color: (e3) => Cr(e3.palette.text.primary, 0.6), paddingTop: n2 && n2.length > 0 ? "1px" : void 0, overflow: "hidden", textOverflow: "ellipsis" }, children: n2 && n2.length > 0 ? n2 : " " })] }) });
425
- }), ga = k(S((e2, t2) => {
426
- const { commands: o2, commandHook: n2, scope: r2, sx: i2, disabled: s2 = false, parentFloat: d2, ...c2 } = e2, m2 = Wn(o2, ["formatNumberFormat"])[0], p2 = m2?.state() ? l.Styles.lookupStyle(m2?.state()).formatType : l.Type.General, u2 = C(() => {
423
+ e3.keyCode !== jn.Enter && e3.keyCode !== jn.Space || r2(a2.numberFormat);
424
+ }, ...s2, children: b(E, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [b(I, { component: "div", children: [a2.formatType, a2.formatType === l.Type.Custom ? "…" : ""] }), x(I, { variant: "caption", component: "div", sx: { color: (e3) => Tr(e3.palette.text.primary, 0.6), paddingTop: n2 && n2.length > 0 ? "1px" : void 0, overflow: "hidden", textOverflow: "ellipsis" }, children: n2 && n2.length > 0 ? n2 : " " })] }) });
425
+ }), fa = S(k((e2, t2) => {
426
+ const { commands: o2, commandHook: n2, scope: r2, sx: i2, disabled: s2 = false, parentFloat: d2, ...c2 } = e2, m2 = On(o2, ["formatNumberFormat"])[0], p2 = m2?.state() ? l.Styles.lookupStyle(m2?.state()).formatType : l.Type.General, u2 = C(() => {
427
427
  if (!n2) return null;
428
428
  const e3 = { ...n2 };
429
429
  return delete e3.beforeExecute, e3;
@@ -440,154 +440,154 @@ const Wr = k(S((e2, t2) => {
440
440
  }
441
441
  "" === t4 && i3[e4].formatType === l.Type.General && (t4 = "No specific format");
442
442
  const n3 = i3[e4].formatType === p2;
443
- d3.push(x(ua, { selected: n3, disabled: s2 || !m2 || m2.disabled(), formattedValue: t4, handleSetFormat: o3, format: i3[e4] }, i3[e4].formatType));
443
+ d3.push(x(ha, { selected: n3, disabled: s2 || !m2 || m2.disabled(), formattedValue: t4, handleSetFormat: o3, format: i3[e4] }, i3[e4].formatType));
444
444
  }
445
- const g3 = { numberFormat: "", formatType: l.Type.Custom }, h3 = p2 === l.Type.Custom, f3 = x(ua, { selected: h3, disabled: s2 || !m2 || m2.disabled(), formattedValue: h3 ? a2.getNumberFormat().displayText : "", handleSetFormat: () => {
445
+ const g3 = { numberFormat: "", formatType: l.Type.Custom }, h3 = p2 === l.Type.Custom, f3 = x(ha, { selected: h3, disabled: s2 || !m2 || m2.disabled(), formattedValue: h3 ? a2.getNumberFormat().displayText : "", handleSetFormat: () => {
446
446
  n2?.beforeExecute?.(m2, m2?.state()), t3.getCommand("formatNumberDialog")?.execute(m2?.state()), n2?.onExecute?.(m2, m2?.state());
447
- }, format: g3, sx: { flex: "0", width: "100%" } }, l.Type.Custom), y2 = b(A, { className: "quick-buttons", sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [x(le, { command: t3.getCommand("formatNumberFormatAccountingStyle"), commandHook: u2, scope: r2, icon: x(Qe, {}) }), x(le, { command: t3.getCommand("formatNumberFormatPercentStyle"), commandHook: u2, scope: r2, icon: x(et, {}) }), x(le, { command: t3.getCommand("formatNumberFormatCommaStyle"), commandHook: u2, scope: r2, icon: x(tt, {}) }), x(le, { command: t3.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: u2, scope: r2, icon: ae(x(ot, {})) }), x(le, { command: t3.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: u2, scope: r2, icon: ae(x(nt, {})) })] }), w2 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...c2, children: [y2, x(ie, { orientation: "horizontal" }), x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), x(ie, { orientation: "horizontal" }), f3] });
447
+ }, format: g3, sx: { flex: "0", width: "100%" } }, l.Type.Custom), y2 = b(E, { className: "quick-buttons", sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [x(le, { command: t3.getCommand("formatNumberFormatAccountingStyle"), commandHook: u2, scope: r2, icon: x(Qe, {}) }), x(le, { command: t3.getCommand("formatNumberFormatPercentStyle"), commandHook: u2, scope: r2, icon: x(et, {}) }), x(le, { command: t3.getCommand("formatNumberFormatCommaStyle"), commandHook: u2, scope: r2, icon: x(tt, {}) }), x(le, { command: t3.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: u2, scope: r2, icon: ae(x(ot, {})) }), x(le, { command: t3.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: u2, scope: r2, icon: ae(x(nt, {})) })] }), w2 = b(E, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...c2, children: [y2, x(ie, { orientation: "horizontal" }), x(E, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), x(ie, { orientation: "horizontal" }), f3] });
448
448
  return ce({ ...e3, children: w2 });
449
- }, [m2?.context(), m2?.state(), n2, r2]), h2 = rr(), f2 = C(() => {
449
+ }, [m2?.context(), m2?.state(), n2, r2]), h2 = lr(), f2 = C(() => {
450
450
  const e3 = l.Type.MediumTime;
451
451
  return `${a.getSharedMeasurer()(e3, Math.round(h2.typography.fontSize), h2.typography.fontFamily).width}px`;
452
452
  }, [h2]);
453
- return x(me, { ref: t2, commands: o2, sx: i2, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: m2?.label(), description: m2?.description(), disabled: t3, children: e3 }), icon: x(A, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (e3) => `${Math.round(e3.typography.fontSize)}px`, color: (e3) => e3.palette.text.secondary, fontFamily: (e3) => e3.typography.fontFamily, width: f2 }, children: x(A, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: p2 }) }), ...c2 });
454
- })), ha = k(S((e2, t2) => {
453
+ return x(me, { ref: t2, commands: o2, sx: i2, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: m2?.label(), description: m2?.description(), disabled: t3, children: e3 }), icon: x(E, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (e3) => `${Math.round(e3.typography.fontSize)}px`, color: (e3) => e3.palette.text.secondary, fontFamily: (e3) => e3.typography.fontFamily, width: f2 }, children: x(E, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: p2 }) }), ...c2 });
454
+ })), xa = S(k((e2, t2) => {
455
455
  const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
456
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: "clear", disabled: a2 }, r3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("clearAll"), icon: x(rt, {}) }), x(le, { ...o3, command: t3.getCommand("clearFormats"), icon: ae(x(at, {})) }), x(le, { ...o3, command: t3.getCommand("clearContents"), icon: ae(x(lt, {})) }), x(le, { ...o3, command: t3.getCommand("clearComments") }), x(le, { ...o3, command: t3.getCommand("clearHyperlinks") })] });
456
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: "clear", disabled: a2 }, r3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("clearAll"), icon: x(rt, {}) }), x(le, { ...o3, command: t3.getCommand("clearFormats"), icon: ae(x(at, {})) }), x(le, { ...o3, command: t3.getCommand("clearContents"), icon: ae(x(lt, {})) }), x(le, { ...o3, command: t3.getCommand("clearComments") }), x(le, { ...o3, command: t3.getCommand("clearHyperlinks") })] });
457
457
  return ce({ ...e3, children: r3 });
458
458
  }, [a2, n2, r2]);
459
459
  return x(me, { ref: t2, commands: o2, disabled: a2, commandHook: n2, scope: r2, label: "Clear", tooltip: "Clear everything in the cell, or remove just the formatting or contents.", createPopupPanel: i2, icon: x(rt, {}), ...l2 });
460
- })), fa = k(S((e2, t2) => {
460
+ })), ba = S(k((e2, t2) => {
461
461
  const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
462
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: "fill", disabled: a2 }, r3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("fillDown"), icon: ae(x(it, {})) }), x(le, { ...o3, command: t3.getCommand("fillRight"), icon: ae(x(it, { sx: { transform: "rotate(270deg)" } })) }), x(le, { ...o3, command: t3.getCommand("fillUp"), icon: ae(x(it, { sx: { transform: "rotate(180deg)" } })) }), x(le, { ...o3, command: t3.getCommand("fillLeft"), icon: ae(x(it, { sx: { transform: "rotate(90deg)" } })) })] });
462
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: "fill", disabled: a2 }, r3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("fillDown"), icon: ae(x(it, {})) }), x(le, { ...o3, command: t3.getCommand("fillRight"), icon: ae(x(it, { sx: { transform: "rotate(270deg)" } })) }), x(le, { ...o3, command: t3.getCommand("fillUp"), icon: ae(x(it, { sx: { transform: "rotate(180deg)" } })) }), x(le, { ...o3, command: t3.getCommand("fillLeft"), icon: ae(x(it, { sx: { transform: "rotate(90deg)" } })) })] });
463
463
  return ce({ ...e3, children: r3 });
464
464
  }, [a2, n2, r2]);
465
465
  return x(me, { ref: t2, commands: o2, disabled: a2, commandHook: n2, label: "Fill", tooltip: "Fill the selected cells with the value from one of the corners.", createPopupPanel: i2, icon: ae(x(it, {})), ...l2 });
466
- })), xa = k(S((e2, t2) => {
467
- const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = $n.Toolbar, ...c2 } = e2, m2 = ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns"], p2 = Wn(o2, m2), { singleCommand: u2, allDisabled: g2 } = C(() => {
466
+ })), ya = S(k((e2, t2) => {
467
+ const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = Vn.Toolbar, ...c2 } = e2, m2 = ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns"], p2 = On(o2, m2), { singleCommand: u2, allDisabled: g2 } = C(() => {
468
468
  let e3 = null, t3 = 0;
469
- for (let o3 = 0; o3 < p2.length; o3++) p2[o3] && !p2[o3]?.disabled() && (i2 && d2 === $n.Menuitem && (e3 = 0 === t3 ? p2[o3] : null), t3++);
469
+ for (let o3 = 0; o3 < p2.length; o3++) p2[o3] && !p2[o3]?.disabled() && (i2 && d2 === Vn.Menuitem && (e3 = 0 === t3 ? p2[o3] : null), t3++);
470
470
  return { singleCommand: e3, allDisabled: 0 === t3 };
471
471
  }, [p2]), h2 = C(() => {
472
472
  const e3 = /* @__PURE__ */ new Map();
473
473
  return e3.set("insertCellsShiftDown", ae(x(st, {}))), e3.set("insertCellsShiftRight", ae(x(st, { sx: { transform: "rotate(270deg)" } }))), e3.set("insertRows", ae(x(dt, {}))), e3.set("insertColumns", ae(x(ct, {}))), e3;
474
474
  }, []), f2 = v((e3, t3) => {
475
475
  let o3 = null;
476
- const r3 = { variant: $n.Menuitem, commandHook: n2, scope: "insertCells", disabled: a2 };
476
+ const r3 = { variant: Vn.Menuitem, commandHook: n2, scope: "insertCells", disabled: a2 };
477
477
  l2 || (o3 = b(y, { children: [x(ie, { orientation: "horizontal" }), x(le, { ...r3, command: t3.getCommand("addSheet"), icon: ae(x(mt, {})) })] }));
478
478
  const i3 = b(y, { children: [x(le, { ...r3, command: p2[0], icon: h2.get(m2[0]) }), x(le, { ...r3, command: p2[1], icon: h2.get(m2[1]) }), x(ie, { orientation: "horizontal" }), x(le, { ...r3, command: p2[2], icon: h2.get(m2[2]) }), x(le, { ...r3, command: p2[3], icon: h2.get(m2[3]) }), o3] });
479
479
  return ce({ ...e3, children: i3 });
480
480
  }, [a2, p2, n2, r2, h2]);
481
481
  return u2 ? x(le, { ref: t2, variant: d2, commandHook: n2, disabled: a2, command: u2, icon: h2.get(u2.key()), ...c2 }) : x(me, { ref: t2, variant: d2, quickCommand: "insertCells", commands: o2, commandHook: n2, scope: r2, disabled: a2 || g2, tooltip: b(y, { children: [x("span", { children: "Insert new cells, rows or columns to your workbook." }), x("br", {}), x("span", { children: "To insert multiple rows or columns at a time, select multiple rows or columns in the sheet and click Insert." })] }), createPopupPanel: f2, icon: ae(x(ct, {})), ...c2 });
482
- })), ba = k(S((e2, t2) => {
483
- const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = $n.Toolbar, ...c2 } = e2, m2 = Wn(o2, ["deleteCellsShiftUp", "deleteCellsShiftLeft", "deleteRows", "deleteColumns"]), { singleCommand: p2, allDisabled: u2 } = C(() => {
482
+ })), wa = S(k((e2, t2) => {
483
+ const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = Vn.Toolbar, ...c2 } = e2, m2 = On(o2, ["deleteCellsShiftUp", "deleteCellsShiftLeft", "deleteRows", "deleteColumns"]), { singleCommand: p2, allDisabled: u2 } = C(() => {
484
484
  let e3 = null, t3 = 0;
485
- for (let o3 = 0; o3 < m2.length; o3++) m2[o3] && !m2[o3]?.disabled() && (i2 && d2 === $n.Menuitem && (e3 = 0 === t3 ? m2[o3] : null), t3++);
485
+ for (let o3 = 0; o3 < m2.length; o3++) m2[o3] && !m2[o3]?.disabled() && (i2 && d2 === Vn.Menuitem && (e3 = 0 === t3 ? m2[o3] : null), t3++);
486
486
  return { singleCommand: e3, allDisabled: 0 === t3 };
487
487
  }, [m2]), g2 = C(() => {
488
488
  const e3 = /* @__PURE__ */ new Map();
489
489
  return e3.set("deleteCellsShiftUp", ae(x(pt, { sx: { transform: "rotate(0deg)" } }))), e3.set("deleteCellsShiftLeft", ae(x(pt, { sx: { transform: "rotate(270deg)" } }))), e3.set("deleteRows", ae(x(ut, {}))), e3.set("deleteColumns", ae(x(gt, {}))), e3;
490
490
  }, []), h2 = v((e3, t3) => {
491
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: "deleteCells", disabled: a2 };
491
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: "deleteCells", disabled: a2 };
492
492
  let r3 = null;
493
493
  l2 || (r3 = b(y, { children: [x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("deleteSheet"), icon: ae(x(mt, {})) })] }));
494
494
  const i3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("deleteCellsShiftUp"), icon: g2.get("deleteCellsShiftUp") }), x(le, { ...o3, command: t3.getCommand("deleteCellsShiftLeft"), icon: g2.get("deleteCellsShiftLeft") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("deleteRows"), icon: g2.get("deleteRows") }), x(le, { ...o3, command: t3.getCommand("deleteColumns"), icon: g2.get("deleteColumns") }), r3] });
495
495
  return ce({ ...e3, children: i3 });
496
496
  }, [a2, n2, r2, g2]);
497
497
  return p2 ? x(le, { ref: t2, variant: d2, commandHook: n2, disabled: a2, command: p2, icon: g2.get(p2.key()), ...c2 }) : x(me, { ref: t2, variant: d2, quickCommand: "deleteCells", commands: o2, commandHook: n2, scope: r2, disabled: a2 || u2, tooltip: b(y, { children: [x("span", { children: "Delete cells, rows, columns or sheets from your workbook." }), x("br", {}), x("span", { children: "To delete multiple rows or columns at a time, select multiple rows or columns in the sheet and click Delete." })] }), createPopupPanel: h2, icon: ae(x(gt, {})), ...c2 });
498
- })), ya = k(S((t2, o2) => {
499
- const { command: n2, commandHook: r2, onSelectColor: a2, disabled: l2 = false, variant: i2 = $n.Toolbar, quickColor: s2, panelProps: d2, isSplit: c2 = false, darkMode: m2, icon: p2, ...u2 } = t2, { autoColor: g2, schemeLookup: h2, recentColors: f2, ...b2 } = d2;
498
+ })), Sa = S(k((t2, o2) => {
499
+ const { command: n2, commandHook: r2, onSelectColor: a2, disabled: l2 = false, variant: i2 = Vn.Toolbar, quickColor: s2, panelProps: d2, isSplit: c2 = false, darkMode: m2, icon: p2, ...u2 } = t2, { autoColor: g2, schemeLookup: h2, recentColors: f2, ...b2 } = d2;
500
500
  if (u2.selectedColor) throw new Error("Command selectedColor will be used. Do not try to provide one as a direct argument");
501
- Un(n2);
501
+ _n(n2);
502
502
  const y2 = n2?.context();
503
503
  let w2 = s2 ?? y2?.quickColor;
504
504
  c2 && !w2 && (w2 = new e("transparent"));
505
- const k2 = g2 ?? y2?.autoColor, S2 = h2 ?? y2?.schemeLookup, T2 = f2 ?? y2?.recentColors, D2 = m2 ?? y2?.darkMode, M2 = C(() => ({ autoColor: k2, schemeLookup: S2, recentColors: T2, darkMode: D2, ...b2 }), [k2, S2, T2, D2]), R2 = On((e2, t3) => {
505
+ const S2 = g2 ?? y2?.autoColor, k2 = h2 ?? y2?.schemeLookup, T2 = f2 ?? y2?.recentColors, D2 = m2 ?? y2?.darkMode, R2 = C(() => ({ autoColor: S2, schemeLookup: k2, recentColors: T2, darkMode: D2, ...b2 }), [S2, k2, T2, D2]), P2 = Gn((e2, t3) => {
506
506
  e2 && t3 && y2?.addRecentColor && y2.addRecentColor(e2), y2?.onColorSelect && y2.onColorSelect(e2), a2?.(e2, t3), n2?.execute(e2, r2);
507
- }, [n2, a2, r2, y2]), P2 = v((e2, t3) => {
507
+ }, [n2, a2, r2, y2]), M2 = v((e2, t3) => {
508
508
  const { children: o3, title: r3, ...a3 } = e2;
509
509
  let s3 = e2.children;
510
- return (n2?.disabled() || l2) && (s3 = x("div", { children: s3 })), x(ze, { command: n2, placement: i2 === $n.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...a3, children: s3 });
510
+ return (n2?.disabled() || l2) && (s3 = x("div", { children: s3 })), x(ze, { command: n2, placement: i2 === Vn.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...a3, children: s3 });
511
511
  }, [n2, l2]);
512
- return x(na, { ref: o2, panelProps: M2, icon: p2, quickColor: w2, selectedColor: n2?.state(), onSelectColor: R2, variant: i2 === $n.Menuitem ? Re.Menuitem : Re.Toolbar, createTooltip: P2, label: n2?.label(), disabled: l2 || !n2 || n2.disabled(), compareRGB: true, darkMode: D2, ...u2 });
512
+ return x(aa, { ref: o2, panelProps: R2, icon: p2, quickColor: w2, selectedColor: n2?.state(), onSelectColor: P2, variant: i2 === Vn.Menuitem ? Pe.Menuitem : Pe.Toolbar, createTooltip: M2, label: n2?.label(), disabled: l2 || !n2 || n2.disabled(), compareRGB: true, darkMode: D2, ...u2 });
513
513
  }));
514
- ya.displayName = "ColorCommandButton";
515
- const wa = k(S((e2, t2) => {
516
- const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, parentFloat: l2, ...i2 } = e2, s2 = Wn(o2, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), d2 = v((e3, t3) => {
517
- const o3 = { variant: $n.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("gridlinesToggle") }), x(ya, { ...o3, command: t3.getCommand("sheetViewFormatGridlinesColor"), icon: x(Ie, {}), panelProps: { disableAlpha: true } }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesColumns") }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesRows") })] });
514
+ Sa.displayName = "ColorCommandButton";
515
+ const ka = S(k((e2, t2) => {
516
+ const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, parentFloat: l2, ...i2 } = e2, s2 = On(o2, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), d2 = v((e3, t3) => {
517
+ const o3 = { variant: Vn.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("gridlinesToggle") }), x(Sa, { ...o3, command: t3.getCommand("sheetViewFormatGridlinesColor"), icon: x(Ie, {}), panelProps: { disableAlpha: true } }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesColumns") }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesRows") })] });
518
518
  return ce({ ...e3, children: l3 });
519
519
  }, [a2, n2]);
520
520
  return x(me, { ref: t2, parentFloat: l2, quickCommand: s2[0]?.key(), commands: o2, commandHook: n2, createPopupPanel: d2, label: "Gridlines", tooltip: "Configure how the lines between rows and columns in the sheet are displayed.", icon: x(ht, { command: s2[0], scope: "view" }), ...i2 });
521
- })), ka = k(S((e2, t2) => {
521
+ })), Ca = S(k((e2, t2) => {
522
522
  const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
523
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: "sort", disabled: a2 }, r3 = t3.getCommand("sortCustom"), l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("sortAscending"), icon: ae(x(ft, {})) }), x(le, { ...o3, command: t3.getCommand("sortDescending"), icon: ae(x(xt, {})) }), r3 ? x(le, { ...o3, command: r3, icon: ae(x(bt, {})) }) : null, x(ie, { orientation: "horizontal" }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle"), icon: ae(x(yt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear"), icon: ae(x(wt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply"), icon: ae(x(kt, {})) })] });
523
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: "sort", disabled: a2 }, r3 = t3.getCommand("sortCustom"), l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("sortAscending"), icon: ae(x(ft, {})) }), x(le, { ...o3, command: t3.getCommand("sortDescending"), icon: ae(x(xt, {})) }), r3 ? x(le, { ...o3, command: r3, icon: ae(x(bt, {})) }) : null, x(ie, { orientation: "horizontal" }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle"), icon: ae(x(yt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear"), icon: ae(x(wt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply"), icon: ae(x(St, {})) })] });
524
524
  return ce({ ...e3, children: l3 });
525
525
  }, [a2, n2, r2]);
526
526
  return x(me, { ref: t2, commands: o2, commandHook: n2, scope: r2, disabled: a2, label: "Sort", tooltip: b(y, { children: [x("span", { children: "Organize your data so it's easier to analyze." }), x("br", {}), x("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: i2, icon: ae(x(ft, {})), ...l2 });
527
- })), Sa = k(S((e2, t2) => {
527
+ })), va = S(k((e2, t2) => {
528
528
  const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
529
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: "sort", disabled: a2 }, r3 = b(y, { children: [x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle"), icon: ae(x(yt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear"), icon: ae(x(wt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply"), icon: ae(x(kt, {})) })] });
529
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: "sort", disabled: a2 }, r3 = b(y, { children: [x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle"), icon: ae(x(yt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear"), icon: ae(x(wt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply"), icon: ae(x(St, {})) })] });
530
530
  return ce({ ...e3, children: r3 });
531
531
  }, [a2, n2, r2]);
532
532
  return x(me, { ref: t2, commands: o2, commandHook: n2, scope: r2, disabled: a2, label: "Filter", tooltip: b(y, { children: [x("span", { children: "Organize your data so it's easier to analyze." }), x("br", {}), x("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: i2, icon: ae(x(yt, {})), ...l2 });
533
- })), Ca = k(S((e2, t2) => {
533
+ })), Ta = S(k((e2, t2) => {
534
534
  const { quickCommand: o2, icon: n2, isRedo: r2 = false, nestRedo: a2 = true, undoManager: l2, scope: i2, sx: s2, disabled: d2, commands: c2, ...m2 } = e2, p2 = [o2];
535
535
  !r2 && a2 && p2.push("redo");
536
- const u2 = Wn(c2, p2), g2 = u2[0], h2 = u2[1], f2 = l2 ?? g2?.context?.()?.undoManager;
536
+ const u2 = On(c2, p2), g2 = u2[0], h2 = u2[1], f2 = l2 ?? g2?.context?.()?.undoManager;
537
537
  let w2 = d2;
538
538
  d2 || (w2 = !g2 || g2.disabled(), h2 && !h2.disabled() && (w2 = false));
539
- const [k2, S2] = D(0), C2 = v((e3, t3) => {
540
- let o3 = 0 === k2 ? "Cancel" : `${g2.label()} ${k2} Action${1 === k2 ? "" : "s"}`, n3 = false;
539
+ const [S2, k2] = D(0), C2 = v((e3, t3) => {
540
+ let o3 = 0 === S2 ? "Cancel" : `${g2.label()} ${S2} Action${1 === S2 ? "" : "s"}`, n3 = false;
541
541
  f2 || (n3 = true), n3 || (n3 = a2 ? !f2.hasRedo() && !f2.hasUndo() : !f2.hasRedo());
542
542
  const l3 = (e4) => {
543
543
  g2.execute(e4);
544
544
  }, i3 = x(Ne, { sx: { display: "flex", flex: "none", alignItems: "center", justifyContent: "center", padding: n3 ? void 0 : "0 0", minWidth: "180px" }, icon: null, onMouseEnter: () => {
545
- S2(0);
545
+ k2(0);
546
546
  }, onMouseDown: (e4) => {
547
547
  0 === e4.button && e4.preventDefault();
548
548
  }, onMouseUp: (e4) => {
549
- 0 === e4.button && l3(k2);
549
+ 0 === e4.button && l3(S2);
550
550
  }, onKeyDown: (e4) => {
551
- e4.isDefaultPrevented() || e4.keyCode !== Gn.Enter && e4.keyCode !== Gn.Space || l3(k2);
551
+ e4.isDefaultPrevented() || e4.keyCode !== jn.Enter && e4.keyCode !== jn.Space || l3(S2);
552
552
  }, children: x(I, { component: "div", variant: "caption", sx: { fontSize: "0.875rem", letterSpacing: "0.01071em" }, children: o3 }) });
553
553
  if (n3) return i3;
554
554
  const s3 = r2 ? f2?.getRedoDescriptions() : f2?.getUndoDescriptions(), d3 = [];
555
555
  for (let e4 = 0; e4 < s3.length; e4++) {
556
556
  const t4 = s3[e4];
557
- d3.push(x(Ne, { sx: { maxWidth: "360px", display: "flex" }, icon: x(mt, {}), disabled: w2, selected: e4 < k2, onMouseEnter: () => {
558
- S2(e4 + 1);
557
+ d3.push(x(Ne, { sx: { maxWidth: "360px", display: "flex" }, icon: x(mt, {}), disabled: w2, selected: e4 < S2, onMouseEnter: () => {
558
+ k2(e4 + 1);
559
559
  }, onMouseDown: (e5) => {
560
560
  0 === e5.button && e5.preventDefault();
561
561
  }, onMouseUp: (t5) => {
562
562
  0 === t5.button && l3(e4 + 1);
563
563
  }, onKeyDown: (t5) => {
564
- t5.isDefaultPrevented() || t5.keyCode !== Gn.Enter && t5.keyCode !== Gn.Space || l3(e4 + 1);
565
- }, children: b(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", alignItems: "center", overflow: "hidden" }, children: [x(I, { component: "div", children: t4 }), x(mt, {})] }) }, `action:${e4}`));
564
+ t5.isDefaultPrevented() || t5.keyCode !== jn.Enter && t5.keyCode !== jn.Space || l3(e4 + 1);
565
+ }, children: b(E, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", alignItems: "center", overflow: "hidden" }, children: [x(I, { component: "div", children: t4 }), x(mt, {})] }) }, `action:${e4}`));
566
566
  }
567
567
  let c3 = null;
568
568
  if (!r2 && a2) {
569
- const o4 = { scope: "undo", commands: t3, variant: $n.Menuitem, parentFloat: e3.floatReference };
570
- c3 = [], c3.push(x(Ca, { ...o4, quickCommand: "redo", isRedo: true }, "nested:redo")), f2.hasRedo() && f2.hasUndo() && c3.push(x(ie, { orientation: "horizontal" }, "action:redo-div"));
569
+ const o4 = { scope: "undo", commands: t3, variant: Vn.Menuitem, parentFloat: e3.floatReference };
570
+ c3 = [], c3.push(x(Ta, { ...o4, quickCommand: "redo", isRedo: true }, "nested:redo")), f2.hasRedo() && f2.hasUndo() && c3.push(x(ie, { orientation: "horizontal" }, "action:redo-div"));
571
571
  }
572
- const m3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, onClick: () => {
572
+ const m3 = b(E, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, onClick: () => {
573
573
  e3.closeFloatAll();
574
574
  }, onMouseLeave: () => {
575
- S2(0);
576
- }, children: [c3, x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), x(ie, { orientation: "horizontal" }), i3] });
575
+ k2(0);
576
+ }, children: [c3, x(E, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), x(ie, { orientation: "horizontal" }), i3] });
577
577
  return ce({ ...e3, children: m3 });
578
- }, [g2?.context(), g2?.state(), i2, f2, k2, w2]);
579
- return x(me, { ref: t2, commands: c2, quickCommand: o2, scope: i2, disabled: w2, label: g2?.label() ?? (r2 ? "Redo" : "Undo"), tooltip: x(y, { children: x("span", { children: `${g2?.label() ?? "No"} last actions.` }) }), createPopupPanel: C2, icon: n2 ?? ae(x(r2 ? St : Ct, {})), selected: false, ...m2 });
580
- })), va = i.getFontList(), Ta = /* @__PURE__ */ new Map();
581
- for (let e2 = 0; e2 < va.length; e2++) Ta.set(va[e2].fontRef.getFamily(), va[e2]);
582
- const Da = k(S((e2, t2) => {
578
+ }, [g2?.context(), g2?.state(), i2, f2, S2, w2]);
579
+ return x(me, { ref: t2, commands: c2, quickCommand: o2, scope: i2, disabled: w2, label: g2?.label() ?? (r2 ? "Redo" : "Undo"), tooltip: x(y, { children: x("span", { children: `${g2?.label() ?? "No"} last actions.` }) }), createPopupPanel: C2, icon: n2 ?? ae(x(r2 ? kt : Ct, {})), selected: false, ...m2 });
580
+ })), Da = i.getFontList(), Ra = /* @__PURE__ */ new Map();
581
+ for (let e2 = 0; e2 < Da.length; e2++) Ra.set(Da[e2].fontRef.getFamily(), Da[e2]);
582
+ const Pa = S(k((e2, t2) => {
583
583
  const { command: o2, commandHook: n2, sx: r2, disabled: l2 = false, parentFloat: i2, icon: s2, label: d2, ...c2 } = e2;
584
- Un(o2);
585
- const m2 = o2?.state(), p2 = rr(), u2 = C(() => `${a.getSharedMeasurer()("Times New Roman", Math.round(p2.typography.fontSize), p2.typography.fontFamily).width}px`, [p2]), g2 = v((e3) => {
584
+ _n(o2);
585
+ const m2 = o2?.state(), p2 = lr(), u2 = C(() => `${a.getSharedMeasurer()("Times New Roman", Math.round(p2.typography.fontSize), p2.typography.fontFamily).width}px`, [p2]), g2 = v((e3) => {
586
586
  const t3 = (e4) => {
587
587
  o2?.execute(e4, n2);
588
588
  }, r3 = [];
589
- for (let e4 = 0; e4 < va.length; e4++) r3.push({ key: va[e4].fontRef.getFamily(), description: va[e4].fontRef.getFamily() });
590
- Ta.get(m2) || r3.unshift({ key: m2, description: m2 });
589
+ for (let e4 = 0; e4 < Da.length; e4++) r3.push({ key: Da[e4].fontRef.getFamily(), description: Da[e4].fontRef.getFamily() });
590
+ Ra.get(m2) || r3.unshift({ key: m2, description: m2 });
591
591
  const a2 = [];
592
592
  for (let e4 = 0; e4 < r3.length; e4++) {
593
593
  const n3 = r3[e4].key === m2;
@@ -596,106 +596,106 @@ const Da = k(S((e2, t2) => {
596
596
  }, onMouseDown: (e5) => {
597
597
  0 === e5.button && e5.preventDefault();
598
598
  }, onKeyDown: (o3) => {
599
- o3.keyCode !== Gn.Enter && o3.keyCode !== Gn.Space || t3(r3[e4].key);
600
- }, children: x(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: x(I, { component: "div", sx: { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", fontFamily: () => r3[e4]?.key }, children: r3[e4].description }) }) }, e4 + "" + r3[e4].key));
599
+ o3.keyCode !== jn.Enter && o3.keyCode !== jn.Space || t3(r3[e4].key);
600
+ }, children: x(E, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: x(I, { component: "div", sx: { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", fontFamily: () => r3[e4]?.key }, children: r3[e4].description }) }) }, e4 + "" + r3[e4].key));
601
601
  }
602
- const i3 = x(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ...c2, children: x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: a2 }) });
602
+ const i3 = x(E, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ...c2, children: x(E, { sx: { overflow: "auto", flex: "1 1 100%" }, children: a2 }) });
603
603
  return ce({ ...e3, children: i3 });
604
604
  }, [l2, o2?.state()]);
605
- return x(Pe, { ref: t2, sx: { ...r2 }, outlined: true, disabled: l2, parentFloat: i2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: o2?.label(), description: o2?.description(), disabled: t3, children: e3 }), icon: x(A, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (e3) => `${Math.round(e3.typography.fontSize)}px`, fontFamily: (e3) => e3.typography.fontFamily, color: (e3) => e3.palette.text.secondary, width: u2 }, children: x(A, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: m2 }) }), ...c2 });
606
- })), Ma = k(S((e2, t2) => {
607
- const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = Wn(o2, ["formatStrikeThroughToggle", "formatSuperscriptToggle", "formatSubscriptToggle"]), s2 = C(() => {
605
+ return x(Me, { ref: t2, sx: { ...r2 }, outlined: true, disabled: l2, parentFloat: i2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: o2?.label(), description: o2?.description(), disabled: t3, children: e3 }), icon: x(E, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (e3) => `${Math.round(e3.typography.fontSize)}px`, fontFamily: (e3) => e3.typography.fontFamily, color: (e3) => e3.palette.text.secondary, width: u2 }, children: x(E, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: m2 }) }), ...c2 });
606
+ })), Ma = S(k((e2, t2) => {
607
+ const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = On(o2, ["formatStrikeThroughToggle", "formatSuperscriptToggle", "formatSubscriptToggle"]), s2 = C(() => {
608
608
  for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3].key();
609
609
  return i2[0]?.key();
610
610
  }, [i2]), d2 = C(() => {
611
611
  const e3 = /* @__PURE__ */ new Map();
612
612
  return e3.set("formatStrikeThroughToggle", ae(x(vt, {}))), e3.set("formatSuperscriptToggle", ae(x(Tt, {}))), e3.set("formatSubscriptToggle", ae(x(Dt, {}))), e3;
613
613
  }, []), c2 = v((e3, t3) => {
614
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: "textEffects", disabled: a2 }, r3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatStrikeThroughToggle"), icon: d2.get("formatStrikeThroughToggle") }), x(le, { ...o3, command: t3.getCommand("formatSuperscriptToggle"), icon: d2.get("formatSuperscriptToggle") }), x(le, { ...o3, command: t3.getCommand("formatSubscriptToggle"), icon: d2.get("formatSubscriptToggle") })] });
614
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: "textEffects", disabled: a2 }, r3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatStrikeThroughToggle"), icon: d2.get("formatStrikeThroughToggle") }), x(le, { ...o3, command: t3.getCommand("formatSuperscriptToggle"), icon: d2.get("formatSuperscriptToggle") }), x(le, { ...o3, command: t3.getCommand("formatSubscriptToggle"), icon: d2.get("formatSubscriptToggle") })] });
615
615
  return ce({ ...e3, children: r3 });
616
616
  }, [a2, n2, r2]);
617
617
  return x(me, { ref: t2, quickCommand: s2, commands: o2, commandHook: n2, createPopupPanel: c2, label: "Text Effects", tooltip: "Style your text to differentiate it.", icon: d2.get(s2) ?? ae(x(vt, {})), ...l2 });
618
- })), Ra = k(S((e2, t2) => {
619
- const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = Wn(o2, ["formatUnderlinedToggle", "formatUnderlinedDoubleToggle", "formatUnderlinedAccountingToggle", "formatUnderlinedAccountingDoubleToggle"]), s2 = C(() => {
618
+ })), Ba = S(k((e2, t2) => {
619
+ const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = On(o2, ["formatUnderlinedToggle", "formatUnderlinedDoubleToggle", "formatUnderlinedAccountingToggle", "formatUnderlinedAccountingDoubleToggle"]), s2 = C(() => {
620
620
  for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3].key();
621
621
  return i2[0]?.key();
622
622
  }, [i2]), d2 = C(() => {
623
623
  const e3 = /* @__PURE__ */ new Map();
624
- return e3.set("formatUnderlinedToggle", ae(x(Mt, {}))), e3.set("formatUnderlinedDoubleToggle", ae(x(Rt, {}))), e3.set("formatUnderlinedAccountingToggle", ae(x(Pt, {}))), e3.set("formatUnderlinedAccountingDoubleToggle", ae(x(Bt, {}))), e3;
624
+ return e3.set("formatUnderlinedToggle", ae(x(Rt, {}))), e3.set("formatUnderlinedDoubleToggle", ae(x(Pt, {}))), e3.set("formatUnderlinedAccountingToggle", ae(x(Mt, {}))), e3.set("formatUnderlinedAccountingDoubleToggle", ae(x(Bt, {}))), e3;
625
625
  }, []), c2 = v((e3, t3) => {
626
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: "underline", disabled: a2 }, r3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatUnderlinedToggle"), icon: ae(x(Mt, {})) }), x(le, { ...o3, command: t3.getCommand("formatUnderlinedDoubleToggle"), icon: ae(x(Rt, {})) }), x(le, { ...o3, command: t3.getCommand("formatUnderlinedAccountingToggle"), commandHook: n2, icon: ae(x(Pt, {})) }), x(le, { ...o3, command: t3.getCommand("formatUnderlinedAccountingDoubleToggle"), icon: ae(x(Bt, {})) })] });
626
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: "underline", disabled: a2 }, r3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatUnderlinedToggle"), icon: ae(x(Rt, {})) }), x(le, { ...o3, command: t3.getCommand("formatUnderlinedDoubleToggle"), icon: ae(x(Pt, {})) }), x(le, { ...o3, command: t3.getCommand("formatUnderlinedAccountingToggle"), commandHook: n2, icon: ae(x(Mt, {})) }), x(le, { ...o3, command: t3.getCommand("formatUnderlinedAccountingDoubleToggle"), icon: ae(x(Bt, {})) })] });
627
627
  return ce({ ...e3, children: r3 });
628
628
  }, [a2, n2, r2]);
629
- return x(me, { ref: t2, quickCommand: s2, commands: o2, commandHook: n2, label: "Underline", tooltip: "All underline stylings.", createPopupPanel: c2, icon: d2.get(s2) ?? ae(x(Mt, {})), ...l2 });
630
- })), Pa = k(S((e2, t2) => {
631
- const { command: o2, commands: n2, commandHook: r2, scope: a2, includePasteAllInPopup: l2 = true, disabled: i2 = false, ...s2 } = e2, d2 = On((e3, t3) => {
632
- const o3 = { variant: $n.Menuitem, commandHook: r2, scope: "paste", disabled: i2 }, n3 = [];
633
- return l2 && (n3.push(B(le, { ...o3, command: t3.getCommand("paste"), key: "paste", icon: x(Ft, {}) })), n3.push(x(ie, { orientation: "horizontal" }, "paste-div"))), n3.push(B(le, { ...o3, command: t3.getCommand("pasteValues"), key: "pasteValues", icon: ae(x(Nt, {})) })), n3.push(B(le, { ...o3, command: t3.getCommand("pasteFormats"), key: "pasteFormats", icon: ae(x(Et, {})) })), n3.push(B(le, { ...o3, command: t3.getCommand("pasteFormulas"), key: "pasteFormulas", icon: ae(x(At, {})) })), n3.push(B(le, { ...o3, command: t3.getCommand("pasteTranspose"), key: "pasteTranspose", icon: ae(x(It, {})) })), n3.push(B(le, { ...o3, command: t3.getCommand("pasteLinks"), key: "pasteLinks", icon: ae(x(Lt, {})) })), ce({ ...e3, children: n3 });
629
+ return x(me, { ref: t2, quickCommand: s2, commands: o2, commandHook: n2, label: "Underline", tooltip: "All underline stylings.", createPopupPanel: c2, icon: d2.get(s2) ?? ae(x(Rt, {})), ...l2 });
630
+ })), Fa = S(k((e2, t2) => {
631
+ const { command: o2, commands: n2, commandHook: r2, scope: a2, includePasteAllInPopup: l2 = true, disabled: i2 = false, ...s2 } = e2, d2 = Gn((e3, t3) => {
632
+ const o3 = { variant: Vn.Menuitem, commandHook: r2, scope: "paste", disabled: i2 }, n3 = [];
633
+ return l2 && (n3.push(B(le, { ...o3, command: t3.getCommand("paste"), key: "paste", icon: x(Ft, {}) })), n3.push(x(ie, { orientation: "horizontal" }, "paste-div"))), n3.push(B(le, { ...o3, command: t3.getCommand("pasteValues"), key: "pasteValues", icon: ae(x(Nt, {})) })), n3.push(B(le, { ...o3, command: t3.getCommand("pasteFormats"), key: "pasteFormats", icon: ae(x(At, {})) })), n3.push(B(le, { ...o3, command: t3.getCommand("pasteFormulas"), key: "pasteFormulas", icon: ae(x(Et, {})) })), n3.push(B(le, { ...o3, command: t3.getCommand("pasteTranspose"), key: "pasteTranspose", icon: ae(x(It, {})) })), n3.push(B(le, { ...o3, command: t3.getCommand("pasteLinks"), key: "pasteLinks", icon: ae(x(Lt, {})) })), ce({ ...e3, children: n3 });
634
634
  }, [i2, r2, a2, l2]);
635
635
  return x(me, { ref: t2, commands: n2, commandHook: r2, scope: a2, createPopupPanel: d2, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", icon: x(Ft, {}), ...s2 });
636
- })), Ba = k(S((e2, t2) => {
637
- const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, parentFloat: l2, ...i2 } = e2, s2 = Wn(o2, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), d2 = v((e3, t3) => {
638
- const o3 = { variant: $n.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadings") }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingsNumeric") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingColumns") }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingRows") })] });
636
+ })), Na = S(k((e2, t2) => {
637
+ const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, parentFloat: l2, ...i2 } = e2, s2 = On(o2, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), d2 = v((e3, t3) => {
638
+ const o3 = { variant: Vn.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadings") }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingsNumeric") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingColumns") }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingRows") })] });
639
639
  return ce({ ...e3, children: l3 });
640
640
  }, [a2, n2, r2]);
641
641
  return x(me, { ref: t2, parentFloat: l2, quickCommand: s2[0]?.key(), commands: o2, commandHook: n2, createPopupPanel: d2, label: "Headings", tooltip: "Configure how the column and rows headings in the sheet are displayed.", icon: x(ht, { command: s2[0], scope: "view" }), ...i2 });
642
- })), Fa = k(S((e2, t2) => {
642
+ })), Aa = S(k((e2, t2) => {
643
643
  const { commands: o2, commandHook: n2, scope: r2 = "view", disabled: a2 = false, ...l2 } = e2, i2 = v((e3) => {
644
- const t3 = { variant: $n.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowFormulaBar") }), x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowTabs") }), x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowStatusBar") }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowHorizontalScrollBar") }), x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowVerticalScrollBar") })] });
644
+ const t3 = { variant: Vn.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowFormulaBar") }), x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowTabs") }), x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowStatusBar") }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowHorizontalScrollBar") }), x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowVerticalScrollBar") })] });
645
645
  return ce({ ...e3, children: l3 });
646
646
  }, [a2, o2, n2, r2]);
647
647
  return x(me, { ref: t2, commands: o2, disabled: a2, commandHook: n2, scope: r2, label: "Workbook View", tooltip: "Options to configure how the workbook is displayed.", createPopupPanel: i2, icon: x(ht, { icon: null, label: "Workbook View" }), ...l2 });
648
- })), Na = k(S((e2, t2) => {
648
+ })), Ea = S(k((e2, t2) => {
649
649
  const { value: o2, cellStyle: n2, styles: r2, createTemporaryCell: a2, bodyStyle: l2, sx: i2, borderProps: s2, disabled: c2, ...m2 } = e2, p2 = C(() => a2({ value: o2, style: n2 }), [o2, n2, a2]), u2 = C(() => p2.getStyle(), [p2, l2]), g2 = C(() => u2.getFill().toCSS(l2?.darkMode ?? false), [u2]), h2 = u2.getInsets(), f2 = u2.getFont(), b2 = v(() => u2.getBorder(), [u2]);
650
- return x(A, { ref: t2, sx: { width: "100px", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: l2?.fill, filter: c2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .fill": { flex: "1 1 100%", overflow: "hidden", ...g2 }, "& .text": { flex: "1 1 100%", ...f2.toCSS(l2?.darkMode ?? false, 1), boxSizing: "border-box", padding: `${h2.top}px ${h2.right}px ${h2.bottom}px ${h2.left}px`, margin: "0px", outline: "none", resize: "none", overflow: "hidden", textOverflow: "ellipsis", verticalAlign: "baseline", textDecoration: f2.toCSS().textDecoration, textAlign: d.toCSSHorizontalTextAlign(p2.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...i2 }, ...m2, children: x(dr, { getBorderAt: b2, darkMode: l2?.darkMode ?? false, rowCount: 1, columnCount: 1, style: { display: "flex", flex: "1 1 100%", width: "100%", maxWidth: "100%", justifyContent: "start", alignItems: "stretch", ...s2?.style }, ...s2, children: x(A, { className: "fill", sx: { paddingLeft: "4px", paddingRight: "4px", marginLeft: "-1px", marginTop: "-1px", marginRight: "-1px", marginBottom: "-1px", overflow: "hidden", display: "flex", alignItems: "center" }, children: x(A, { className: "text", children: o2 }) }) }) });
651
- })), Ea = k((e2) => {
650
+ return x(E, { ref: t2, sx: { width: "100px", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: l2?.fill, filter: c2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .fill": { flex: "1 1 100%", overflow: "hidden", ...g2 }, "& .text": { flex: "1 1 100%", ...f2.toCSS(l2?.darkMode ?? false, 1), boxSizing: "border-box", padding: `${h2.top}px ${h2.right}px ${h2.bottom}px ${h2.left}px`, margin: "0px", outline: "none", resize: "none", overflow: "hidden", textOverflow: "ellipsis", verticalAlign: "baseline", textDecoration: f2.toCSS().textDecoration, textAlign: d.toCSSHorizontalTextAlign(p2.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...i2 }, ...m2, children: x(mr, { getBorderAt: b2, darkMode: l2?.darkMode ?? false, rowCount: 1, columnCount: 1, style: { display: "flex", flex: "1 1 100%", width: "100%", maxWidth: "100%", justifyContent: "start", alignItems: "stretch", ...s2?.style }, ...s2, children: x(E, { className: "fill", sx: { paddingLeft: "4px", paddingRight: "4px", marginLeft: "-1px", marginTop: "-1px", marginRight: "-1px", marginBottom: "-1px", overflow: "hidden", display: "flex", alignItems: "center" }, children: x(E, { className: "text", children: o2 }) }) }) });
651
+ })), Ia = S((e2) => {
652
652
  const { styles: t2, namedStyle: o2, selectedNamed: n2, hasContextMenu: r2 = true, bodyStyle: a2, onSelectNamed: l2, createTemporaryCell: i2, parentFloat: d2, commands: c2, disabled: m2, commandHook: p2, ...u2 } = e2, g2 = v((e3) => {
653
- const t3 = { variant: $n.Menuitem, commandHook: p2, context: "cellStyle" }, n3 = b(y, { children: [x(le, { ...t3, sx: { fontWeight: 550 }, command: c2.getCommand("formatCellStyle"), commandState: o2, disabled: m2, icon: ae(x(zt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: c2.getCommand("modifyCellStyle"), commandState: { named: o2 } }), x(le, { ...t3, command: c2.getCommand("deleteCellStyle"), commandState: o2, disabled: m2 || o2?.getName() === s.BuiltInName.Normal })] });
654
- return ce({ ...e3, children: x(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
653
+ const t3 = { variant: Vn.Menuitem, commandHook: p2, context: "cellStyle" }, n3 = b(y, { children: [x(le, { ...t3, sx: { fontWeight: 550 }, command: c2.getCommand("formatCellStyle"), commandState: o2, disabled: m2, icon: ae(x(zt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: c2.getCommand("modifyCellStyle"), commandState: { named: o2 } }), x(le, { ...t3, command: c2.getCommand("deleteCellStyle"), commandState: o2, disabled: m2 || o2?.getName() === s.BuiltInName.Normal })] });
654
+ return ce({ ...e3, children: x(E, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: x(E, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
655
655
  }, []), h2 = o2?.getName() === n2?.getName();
656
656
  let f2 = x(He, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${h2 ? e3.palette.primary.dark : "transparent"} 1px` }, tooltipProps: { label: o2.getName(), placement: "bottom-start" }, disabled: m2, icon: null, onClick: () => {
657
657
  l2?.(o2);
658
- }, ...u2, children: x(Na, { value: o2.getName(), cellStyle: { named: o2.getName() }, styles: t2, createTemporaryCell: i2, bodyStyle: a2 }) }, o2.getName());
658
+ }, ...u2, children: x(Ea, { value: o2.getName(), cellStyle: { named: o2.getName() }, styles: t2, createTemporaryCell: i2, bodyStyle: a2 }) }, o2.getName());
659
659
  return r2 && (f2 = x($t, { label: o2.getName(), parentFloat: d2, createPopupPanel: g2, children: f2 })), f2;
660
- }), Aa = k(S((e2, t2) => {
660
+ }), La = S(k((e2, t2) => {
661
661
  const { commands: o2, command: n2, commandHook: r2, selectedNamed: l2, onSelectNamed: i2, disabled: d2 = false, bodyStyle: c2, usePreviewIcon: m2 = true, ...p2 } = e2;
662
- Un(n2);
663
- const u2 = n2?.context(), g2 = u2?.styles, h2 = l2 ?? u2?.named(), f2 = c2 ?? u2?.bodyStyle(), y2 = On((e3) => {
662
+ _n(n2);
663
+ const u2 = n2?.context(), g2 = u2?.styles, h2 = l2 ?? u2?.named(), f2 = c2 ?? u2?.bodyStyle(), y2 = Gn((e3) => {
664
664
  i2?.(e3), n2?.execute(e3, r2);
665
665
  }, [n2, i2, r2]), w2 = v((e3, t3) => {
666
666
  const n3 = { onSelectNamed: y2, styles: g2(), parentFloat: e3.floatReference }, a2 = g2().getCustomNamed(), l3 = /* @__PURE__ */ new Map(), i3 = [];
667
667
  for (let e4 = 0; e4 < a2.length; e4++) l3.set(a2[e4].getName(), a2[e4]), null === g2().getNamed(a2[e4].getName()).getBuiltInID() && i3.push(a2[e4].getName());
668
668
  const c3 = (e4) => {
669
669
  let t4 = l3.get(e4);
670
- return t4 || (t4 = g2().getNamed(e4)), !t4 || t4.isHidden() ? null : x(Ea, { namedStyle: t4, selectedNamed: h2, bodyStyle: u2.bodyStyle(), createTemporaryCell: u2.createTemporaryCell, commands: o2, commandHook: r2, ...n3 }, e4);
670
+ return t4 || (t4 = g2().getNamed(e4)), !t4 || t4.isHidden() ? null : x(Ia, { namedStyle: t4, selectedNamed: h2, bodyStyle: u2.bodyStyle(), createTemporaryCell: u2.createTemporaryCell, commands: o2, commandHook: r2, ...n3 }, e4);
671
671
  }, m3 = (e4, t4, o3 = true) => {
672
672
  const n4 = [];
673
673
  for (let e5 = 0; e5 < t4.length; e5++) {
674
674
  const o4 = c3(t4[e5]);
675
675
  o4 && n4.push(o4);
676
676
  }
677
- return 0 === n4.length ? null : b(A, { children: [o3 ? x(ie, { orientation: "horizontal" }) : null, x(Wt, { children: e4 }, e4 + "-header"), x(A, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "646px", maxWidth: "100%" }, children: n4 }, e4 + "-presets")] }, e4);
677
+ return 0 === n4.length ? null : b(E, { children: [o3 ? x(ie, { orientation: "horizontal" }) : null, x(Wt, { children: e4 }, e4 + "-header"), x(E, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "646px", maxWidth: "100%" }, children: n4 }, e4 + "-presets")] }, e4);
678
678
  }, p3 = (e4, t4) => {
679
679
  const o3 = [];
680
680
  for (let e5 = 0; e5 < t4.length; e5++) {
681
681
  const n4 = c3(t4[e5]);
682
682
  n4 && o3.push(n4);
683
683
  }
684
- return 0 === o3.length ? null : x(A, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", flexDirection: "column", flex: "0 0 0%" }, children: o3 }, e4 + "-presets");
684
+ return 0 === o3.length ? null : x(E, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", flexDirection: "column", flex: "0 0 0%" }, children: o3 }, e4 + "-presets");
685
685
  }, f3 = [];
686
686
  f3.push(m3("Custom", i3, false)), f3.push(m3("Good, Bad and Neutral", [s.BuiltInName.Normal, s.BuiltInName.Bad, s.BuiltInName.Good, s.BuiltInName.Neutral], i3.length > 0)), f3.push(m3("Data and Model", [s.BuiltInName.Calculation, s.BuiltInName.CheckCell, s.BuiltInName.ExplanatoryText, s.BuiltInName.FollowedHyperlink, s.BuiltInName.Hyperlink, s.BuiltInName.Input, s.BuiltInName.LinkedCell, s.BuiltInName.Note, s.BuiltInName.Output, s.BuiltInName.WarningText])), f3.push(m3("Titles and Headings", [s.BuiltInName.Heading1, s.BuiltInName.Heading2, s.BuiltInName.Heading3, s.BuiltInName.Heading4, s.BuiltInName.Title, s.BuiltInName.Total]));
687
687
  let w3 = [];
688
- var k3, S3;
689
- return w3.push(p3("Accent 1", [s.BuiltInName.Accent1_20, s.BuiltInName.Accent1_40, s.BuiltInName.Accent1_60, s.BuiltInName.Accent1])), w3.push(p3("Accent 2", [s.BuiltInName.Accent2_20, s.BuiltInName.Accent2_40, s.BuiltInName.Accent2_60, s.BuiltInName.Accent2])), w3.push(p3("Accent 3", [s.BuiltInName.Accent3_20, s.BuiltInName.Accent3_40, s.BuiltInName.Accent3_60, s.BuiltInName.Accent3])), w3.push(p3("Accent 4", [s.BuiltInName.Accent4_20, s.BuiltInName.Accent4_40, s.BuiltInName.Accent4_60, s.BuiltInName.Accent4])), w3.push(p3("Accent 5", [s.BuiltInName.Accent5_20, s.BuiltInName.Accent5_40, s.BuiltInName.Accent5_60, s.BuiltInName.Accent5])), w3.push(p3("Accent 6", [s.BuiltInName.Accent6_20, s.BuiltInName.Accent6_40, s.BuiltInName.Accent6_60, s.BuiltInName.Accent6])), f3.push((k3 = "Themed Cell Styles", S3 = w3, b(A, { children: [x(ie, { orientation: "horizontal" }), x(Wt, { children: k3 }, k3 + "-header"), x(A, { sx: { display: "flex", gap: "2px", flexWrap: "wrap", alignItems: "start", flexDirection: "row" }, children: S3 }, k3 + "-presets")] }, k3))), f3.push(m3("Number Format", [s.BuiltInName.Comma, s.BuiltInName.Comma0, s.BuiltInName.Currency, s.BuiltInName.Currency0, s.BuiltInName.Percent])), b(A, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (e4) => `${e4.shape.borderRadius}px`, paddingBottom: (e4) => `${e4.shape.borderRadius}px` }, children: [x(A, { onContextMenu: () => {
690
- }, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: f3 }), x(ie, { orientation: "horizontal" }), x(le, { variant: $n.Menuitem, commandState: h2, command: t3.getCommand("newCellStyle"), context: "styles", commandHook: r2, disabled: d2, icon: ae(x(Ht, {})) })] });
691
- }, [h2, g2?.().getTheme(), f2]), k2 = On((e3) => {
688
+ var S3, k3;
689
+ return w3.push(p3("Accent 1", [s.BuiltInName.Accent1_20, s.BuiltInName.Accent1_40, s.BuiltInName.Accent1_60, s.BuiltInName.Accent1])), w3.push(p3("Accent 2", [s.BuiltInName.Accent2_20, s.BuiltInName.Accent2_40, s.BuiltInName.Accent2_60, s.BuiltInName.Accent2])), w3.push(p3("Accent 3", [s.BuiltInName.Accent3_20, s.BuiltInName.Accent3_40, s.BuiltInName.Accent3_60, s.BuiltInName.Accent3])), w3.push(p3("Accent 4", [s.BuiltInName.Accent4_20, s.BuiltInName.Accent4_40, s.BuiltInName.Accent4_60, s.BuiltInName.Accent4])), w3.push(p3("Accent 5", [s.BuiltInName.Accent5_20, s.BuiltInName.Accent5_40, s.BuiltInName.Accent5_60, s.BuiltInName.Accent5])), w3.push(p3("Accent 6", [s.BuiltInName.Accent6_20, s.BuiltInName.Accent6_40, s.BuiltInName.Accent6_60, s.BuiltInName.Accent6])), f3.push((S3 = "Themed Cell Styles", k3 = w3, b(E, { children: [x(ie, { orientation: "horizontal" }), x(Wt, { children: S3 }, S3 + "-header"), x(E, { sx: { display: "flex", gap: "2px", flexWrap: "wrap", alignItems: "start", flexDirection: "row" }, children: k3 }, S3 + "-presets")] }, S3))), f3.push(m3("Number Format", [s.BuiltInName.Comma, s.BuiltInName.Comma0, s.BuiltInName.Currency, s.BuiltInName.Currency0, s.BuiltInName.Percent])), b(E, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (e4) => `${e4.shape.borderRadius}px`, paddingBottom: (e4) => `${e4.shape.borderRadius}px` }, children: [x(E, { onContextMenu: () => {
690
+ }, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: f3 }), x(ie, { orientation: "horizontal" }), x(le, { variant: Vn.Menuitem, commandState: h2, command: t3.getCommand("newCellStyle"), context: "styles", commandHook: r2, disabled: d2, icon: ae(x(Ht, {})) })] });
691
+ }, [h2, g2?.().getTheme(), f2]), S2 = Gn((e3) => {
692
692
  const t3 = 18 / a.getDeviceScale(), o3 = u2?.createTemporaryCell(e3);
693
693
  return o3.getStyle().getFont().getSize() <= t3 ? o3 : o3.createTemporaryCell({ style: { font: { size: t3 } } });
694
- }, [u2?.createTemporaryCell]), S2 = d2 || !n2 || n2.disabled(), T2 = C(() => u2 && m2 ? x(Na, { value: h2?.getName() ?? "Custom", cellStyle: h2 ? { named: h2.getName() } : void 0, styles: u2.styles(), createTemporaryCell: k2, bodyStyle: u2.bodyStyle(), className: "outline-hover", disabled: S2, sx: { maxHeight: "24px", height: "24px", marginRight: "2px", outline: (e3) => `1px solid ${e3.palette.action.hover}` }, borderProps: {} }) : ae(x(zt, {})), [h2, f2, S2]);
695
- return x(me, { ref: t2, createPopupPanel: w2, outlined: m2, commands: o2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), selected: false, disabled: S2, label: n2?.label(), icon: T2, ...p2 });
696
- })), Ia = "_sheetxl-reset_ods65_1", La = 10, Ha = k(S((e2, t2) => {
697
- const { styles: o2, table: n2, tableStyle: r2 = n2?.getStyle() ?? o2.getDefaultTableStyle(), bodyStyle: a2, sx: l2, disabled: i2, className: s2, forceThinBorder: d2, cellHeight: m2 = La, isLive: p2 = false, ...u2 } = e2, g2 = Math.ceil(1.3 * m2), [h2, f2] = F((e3) => e3 + 1, 0);
698
- M(() => {
694
+ }, [u2?.createTemporaryCell]), k2 = d2 || !n2 || n2.disabled(), T2 = C(() => u2 && m2 ? x(Ea, { value: h2?.getName() ?? "Custom", cellStyle: h2 ? { named: h2.getName() } : void 0, styles: u2.styles(), createTemporaryCell: S2, bodyStyle: u2.bodyStyle(), className: "outline-hover", disabled: k2, sx: { maxHeight: "24px", height: "24px", marginRight: "2px", outline: (e3) => `1px solid ${e3.palette.action.hover}` }, borderProps: {} }) : ae(x(zt, {})), [h2, f2, k2]);
695
+ return x(me, { ref: t2, createPopupPanel: w2, outlined: m2, commands: o2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), selected: false, disabled: k2, label: n2?.label(), icon: T2, ...p2 });
696
+ })), Ha = "_sheetxl-reset_ods65_1", za = 10, Wa = S(k((e2, t2) => {
697
+ const { styles: o2, table: n2, tableStyle: r2 = n2?.getStyle() ?? o2.getDefaultTableStyle(), bodyStyle: a2, sx: l2, disabled: i2, className: s2, forceThinBorder: d2, cellHeight: m2 = za, isLive: p2 = false, ...u2 } = e2, g2 = Math.ceil(1.3 * m2), [h2, f2] = F((e3) => e3 + 1, 0);
698
+ R(() => {
699
699
  if (p2 && n2) return n2.addListeners({ onAnyChange: () => {
700
700
  f2();
701
701
  } });
@@ -726,11 +726,11 @@ const Da = k(S((e2, t2) => {
726
726
  t3.push(x("tr", { children: n3 }, o3));
727
727
  }
728
728
  return t3;
729
- }, [b2, r2, a2]), k2 = v((e3, t3) => y2[t3].getBorder() ?? null, [y2]);
730
- return x(A, { ref: t2, className: "table-format-preview", sx: { background: a2?.fill, filter: i2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .styled-element": { position: "absolute" }, ...l2 }, ...u2, children: x(dr, { getBorderAt: k2, rowCount: 5, columnCount: 5, forceThinBorder: d2, width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1, darkMode: a2?.darkMode ?? false, style: { pointerEvents: "none" }, children: x("table", { className: yn(s2, "sheetxl-table-preview", Ia), style: { borderCollapse: "collapse", width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1 }, children: x("tbody", { children: w2 }) }) }) });
731
- })), za = (e2, t2, o2, n2, r2) => {
729
+ }, [b2, r2, a2]), S2 = v((e3, t3) => y2[t3].getBorder() ?? null, [y2]);
730
+ return x(E, { ref: t2, className: "table-format-preview", sx: { background: a2?.fill, filter: i2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .styled-element": { position: "absolute" }, ...l2 }, ...u2, children: x(mr, { getBorderAt: S2, rowCount: 5, columnCount: 5, forceThinBorder: d2, width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1, darkMode: a2?.darkMode ?? false, style: { pointerEvents: "none" }, children: x("table", { className: Sn(s2, "sheetxl-table-preview", Ha), style: { borderCollapse: "collapse", width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1 }, children: x("tbody", { children: w2 }) }) }) });
731
+ })), $a = (e2, t2, o2, n2, r2) => {
732
732
  e2.beginPath(), e2.moveTo(t2 + 0.5, o2 + 0.5), e2.lineTo(n2 + 0.5, r2 + 0.5), e2.stroke();
733
- }, Wa = k(S((e2, t2) => {
733
+ }, Oa = S(k((e2, t2) => {
734
734
  const { table: o2, tableStyle: n2, styles: r2, bodyStyle: a2, disabled: l2, style: i2, className: s2, canvas: d2, ...p2 } = e2, u2 = C(() => {
735
735
  const e3 = o2.toJSON(), t3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
736
736
  return e3.styleOptions = { ...e3.styleOptions, name: n2.getName() }, e3.ref = t3, new c({ initialAnchor: t3, json: e3, styles: r2 });
@@ -760,24 +760,24 @@ const Da = k(S((e2, t2) => {
760
760
  const a3 = g2[5 * e4 + r3], l3 = r3 * o3, i3 = 9 * e4, s3 = a3.getBorder();
761
761
  if (!s3.isEmpty()) {
762
762
  const r4 = s3.getLeft();
763
- r4.isNone() || (t3.strokeStyle = r4.getColor().toCSS(n3, false), za(t3, l3, i3, l3, i3 + 9));
763
+ r4.isNone() || (t3.strokeStyle = r4.getColor().toCSS(n3, false), $a(t3, l3, i3, l3, i3 + 9));
764
764
  const a4 = s3.getTop();
765
- a4.isNone() || (t3.strokeStyle = a4.getColor().toCSS(n3, false), za(t3, l3, i3, l3 + o3, 9 * e4));
765
+ a4.isNone() || (t3.strokeStyle = a4.getColor().toCSS(n3, false), $a(t3, l3, i3, l3 + o3, 9 * e4));
766
766
  const d4 = s3.getRight();
767
- d4.isNone() || (t3.strokeStyle = d4.getColor().toCSS(n3, false), za(t3, l3 + o3, i3, l3 + o3, i3 + 9));
767
+ d4.isNone() || (t3.strokeStyle = d4.getColor().toCSS(n3, false), $a(t3, l3 + o3, i3, l3 + o3, i3 + 9));
768
768
  const c3 = s3.getBottom();
769
- c3.isNone() || (t3.strokeStyle = c3.getColor().toCSS(n3, false), za(t3, l3, i3 + 9, l3 + o3, i3 + 9));
769
+ c3.isNone() || (t3.strokeStyle = c3.getColor().toCSS(n3, false), $a(t3, l3, i3 + 9, l3 + o3, i3 + 9));
770
770
  }
771
771
  t3.strokeStyle = a3.getFont().getFill().toCSS(n3, false);
772
772
  const d3 = 4, c2 = 2.5;
773
- za(t3, r3 * o3 + c2, 9 * e4 + d3, r3 * o3 + c2 + 7, 9 * e4 + d3);
773
+ $a(t3, r3 * o3 + c2, 9 * e4 + d3, r3 * o3 + c2 + 7, 9 * e4 + d3);
774
774
  }
775
775
  return `url(${e3.toDataURL()})`;
776
776
  }, [d2, u2, n2, a2]);
777
- return x("div", { ref: t2, className: yn("table-style-preview", s2), style: { backgroundImage: h2, width: 61, height: 46, ...i2 }, ...p2 });
778
- })), $a = k(S((e2, t2) => {
777
+ return x("div", { ref: t2, className: Sn("table-style-preview", s2), style: { backgroundImage: h2, width: 61, height: 46, ...i2 }, ...p2 });
778
+ })), Va = S(k((e2, t2) => {
779
779
  const { styleOptions: o2, onStyleOptionsChange: n2, showHeaderRow: r2, onShowHeaderRowChange: a2, showTotalRow: l2, onShowTotalRowChange: i2, showFilterButton: s2, onShowFilterButtonChange: d2, sx: c2, disabled: m2, ...p2 } = e2;
780
- return b(A, { sx: { display: "flex", flexDirection: "column", flexWrap: "wrap", userSelect: "none", pt: 1, pb: 1, "& .MuiFormControlLabel-root": { marginLeft: (e3) => `${e3.spacing(2)}`, marginRight: (e3) => `${e3.spacing(2)}` }, "& .MuiCheckbox-root": { padding: (e3) => `${e3.spacing(0.5)}` }, ...c2 }, ...p2, ref: t2, children: [a2 && x(V, { control: x(G, { checked: r2 ?? false, indeterminate: null == r2, onChange: () => a2(!r2), disabled: m2 || null == r2 }), label: "Header Row", labelPlacement: "end" }), i2 && x(V, { control: x(G, { checked: l2 ?? false, indeterminate: null == l2, onChange: () => i2(!l2), disabled: m2 || null == l2 }), label: "Total Row", labelPlacement: "end" }), x(V, { control: x(G, { checked: o2?.showRowStripes ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
780
+ return b(E, { sx: { display: "flex", flexDirection: "column", flexWrap: "wrap", userSelect: "none", pt: 1, pb: 1, "& .MuiFormControlLabel-root": { marginLeft: (e3) => `${e3.spacing(2)}`, marginRight: (e3) => `${e3.spacing(2)}` }, "& .MuiCheckbox-root": { padding: (e3) => `${e3.spacing(0.5)}` }, ...c2 }, ...p2, ref: t2, children: [a2 && x(V, { control: x(G, { checked: r2 ?? false, indeterminate: null == r2, onChange: () => a2(!r2), disabled: m2 || null == r2 }), label: "Header Row", labelPlacement: "end" }), i2 && x(V, { control: x(G, { checked: l2 ?? false, indeterminate: null == l2, onChange: () => i2(!l2), disabled: m2 || null == l2 }), label: "Total Row", labelPlacement: "end" }), x(V, { control: x(G, { checked: o2?.showRowStripes ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
781
781
  n2?.({ ...o2, showRowStripes: !o2?.showRowStripes });
782
782
  } }), label: "Banded Rows", labelPlacement: "end" }), x(V, { control: x(G, { checked: o2?.showFirstColumn ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
783
783
  n2?.({ ...o2, showFirstColumn: !o2?.showFirstColumn });
@@ -786,46 +786,46 @@ const Da = k(S((e2, t2) => {
786
786
  } }), label: "Last Column", labelPlacement: "end" }), x(V, { control: x(G, { checked: o2?.showColumnStripes ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
787
787
  n2?.({ ...o2, showColumnStripes: !o2?.showColumnStripes });
788
788
  } }), label: "Banded Columns", labelPlacement: "end" }), d2 && x(V, { control: x(G, { checked: s2 ?? false, indeterminate: null == s2, disabled: m2 || !o2 || null == s2, onChange: () => d2(!s2) }), label: "Filter Button", labelPlacement: "end" })] });
789
- })), Oa = k((e2) => {
789
+ })), Ga = S((e2) => {
790
790
  const { table: t2, tableStyle: o2, selectedTableStyleName: n2, onSelectTableStyleName: r2, styles: a2, hasContextMenu: l2 = true, bodyStyle: i2, parentFloat: s2, commands: d2, disabled: c2, commandHook: m2, useCanvasPreview: p2 = true, canvas: u2, ...g2 } = e2, h2 = v((e3) => {
791
- const t3 = { variant: $n.Menuitem, commandHook: m2, context: "table" }, n3 = b(y, { children: [x(le, { ...t3, command: d2.getCommand("formatTableStyleClearCellStyles"), commandState: o2, disabled: c2, icon: ae(x(zt, {})) }), x(le, { ...t3, sx: { fontWeight: 550 }, command: d2.getCommand("formatTableStyle"), commandState: { name: o2.getName() }, disabled: c2, icon: ae(x(zt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: d2.getCommand("setDefaultTableStyle"), commandState: o2.getName(), disabled: c2 }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: d2.getCommand("deleteTableStyle"), commandState: o2?.getName(), disabled: c2 || !o2 || o2.isBuiltIn() })] });
792
- return ce({ ...e3, children: x(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
791
+ const t3 = { variant: Vn.Menuitem, commandHook: m2, context: "table" }, n3 = b(y, { children: [x(le, { ...t3, command: d2.getCommand("formatTableStyleClearCellStyles"), commandState: o2, disabled: c2, icon: ae(x(zt, {})) }), x(le, { ...t3, sx: { fontWeight: 550 }, command: d2.getCommand("formatTableStyle"), commandState: { name: o2.getName() }, disabled: c2, icon: ae(x(zt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: d2.getCommand("setDefaultTableStyle"), commandState: o2.getName(), disabled: c2 }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: d2.getCommand("deleteTableStyle"), commandState: o2?.getName(), disabled: c2 || !o2 || o2.isBuiltIn() })] });
792
+ return ce({ ...e3, children: x(E, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: x(E, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
793
793
  }, [d2]), f2 = o2?.getName() === n2, w2 = C(() => {
794
794
  const e3 = { table: t2, tableStyle: o2, styles: a2, bodyStyle: i2 };
795
- return p2 ? x(Wa, { canvas: u2, ...e3 }) : x(Ha, { ...e3 });
795
+ return p2 ? x(Oa, { canvas: u2, ...e3 }) : x(Wa, { ...e3 });
796
796
  }, [t2, o2, a2, i2]);
797
- let k2 = x(He, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${f2 ? e3.palette.primary.dark : "transparent"} 1px` }, tooltipProps: { label: o2.getName() ?? "None", placement: "bottom-start" }, disabled: c2, icon: null, onClick: () => {
797
+ let S2 = x(He, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${f2 ? e3.palette.primary.dark : "transparent"} 1px` }, tooltipProps: { label: o2.getName() ?? "None", placement: "bottom-start" }, disabled: c2, icon: null, onClick: () => {
798
798
  r2?.(o2?.getName());
799
799
  }, ...g2, children: w2 }, o2.getName());
800
- return l2 && (k2 = x($t, { label: t2.getStyleOptions().name, parentFloat: s2, createPopupPanel: h2, children: k2 })), k2;
801
- }), Va = k(S((e2, t2) => {
800
+ return l2 && (S2 = x($t, { label: t2.getStyleOptions().name, parentFloat: s2, createPopupPanel: h2, children: S2 })), S2;
801
+ }), Ua = S(k((e2, t2) => {
802
802
  const { commands: o2, command: n2, commandHook: r2, selectedTable: a2, onSelectTableStyleName: l2, disabled: i2 = false, bodyStyle: s2, usePreviewIcon: d2 = false, ...m2 } = e2;
803
- Un(n2);
803
+ _n(n2);
804
804
  const p2 = n2?.context(), u2 = p2?.styles, g2 = a2 ?? p2?.table?.();
805
805
  let h2 = "insertTable";
806
806
  g2 && (h2 = "editTable");
807
807
  const f2 = C(() => ((e3, t3) => {
808
808
  const o3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
809
809
  return new c({ initialAnchor: o3, styles: t3, json: { name: "PreviewTable", ref: o3, description: "PreviewTable", headerRowCount: 1, totalsRowCount: 0, styleOptions: e3 } });
810
- })(g2?.getStyleOptions(), u2?.()), [u2?.().getDefaultTableStyle(), g2?.getStyleOptions()]), w2 = g2 ?? f2, [k2, S2] = D(w2);
811
- M(() => {
812
- S2(w2);
810
+ })(g2?.getStyleOptions(), u2?.()), [u2?.().getDefaultTableStyle(), g2?.getStyleOptions()]), w2 = g2 ?? f2, [S2, k2] = D(w2);
811
+ R(() => {
812
+ k2(w2);
813
813
  }, [w2]);
814
- const T2 = s2 ?? p2?.bodyStyle(), R2 = On((e3) => {
814
+ const T2 = s2 ?? p2?.bodyStyle(), P2 = Gn((e3) => {
815
815
  l2?.(e3), n2?.execute({ name: e3 }, r2);
816
- }, [n2, l2, r2]), B2 = P(null), F2 = v((e3, t3) => {
817
- const o3 = { onSelectTableStyleName: R2, styles: u2(), parentFloat: e3.floatReference };
816
+ }, [n2, l2, r2]), B2 = M(null), F2 = v((e3, t3) => {
817
+ const o3 = { onSelectTableStyleName: P2, styles: u2(), parentFloat: e3.floatReference };
818
818
  B2.current || (B2.current = document.createElement("canvas"));
819
819
  const n3 = (e4) => {
820
820
  const n4 = u2().getTableStyle(e4);
821
- return n4 ? x(Oa, { table: k2, tableStyle: n4, selectedTableStyleName: k2.getStyleOptions().name, bodyStyle: p2.bodyStyle(), commands: t3, commandHook: r2, canvas: B2.current, ...o3 }, e4) : null;
821
+ return n4 ? x(Ga, { table: S2, tableStyle: n4, selectedTableStyleName: S2.getStyleOptions().name, bodyStyle: p2.bodyStyle(), commands: t3, commandHook: r2, canvas: B2.current, ...o3 }, e4) : null;
822
822
  }, a3 = (e4, t4, o4 = true) => {
823
823
  const r3 = [];
824
824
  for (let e5 = 0; e5 < t4.length; e5++) {
825
825
  const o5 = n3(t4[e5]);
826
826
  o5 && r3.push(o5);
827
827
  }
828
- return 0 === r3.length ? null : b(A, { children: [o4 ? x(ie, { orientation: "horizontal" }) : null, x(Wt, { children: e4 }, e4 + "-header"), x(A, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "481px", maxWidth: "100%" }, children: r3 }, e4 + "-presets")] }, e4);
828
+ return 0 === r3.length ? null : b(E, { children: [o4 ? x(ie, { orientation: "horizontal" }) : null, x(Wt, { children: e4 }, e4 + "-header"), x(E, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "481px", maxWidth: "100%" }, children: r3 }, e4 + "-presets")] }, e4);
829
829
  }, l3 = [], s3 = u2().getCustomTableStyles(), d3 = [];
830
830
  if (s3.length > 0) {
831
831
  for (let e4 = 0; e4 < s3.length; e4++) s3[e4].isShownInTableStyles() && d3.push(s3[e4].getName());
@@ -842,95 +842,96 @@ const Da = k(S((e2, t2) => {
842
842
  for (let e4 = 0; e4 < 11; e4++) h3.push("TableStyleDark" + (e4 + 1));
843
843
  l3.push(a3("Dark", h3));
844
844
  let f3 = null;
845
- return g2 && (f3 = b(y, { children: [x(ie, { orientation: "horizontal" }), x(le, { variant: $n.Menuitem, command: t3.getCommand("formatTableStyleClearTableStyle"), commandHook: r2, disabled: i2, icon: ae(x(at, {})) })] })), b(A, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (e4) => `${e4.shape.borderRadius}px`, paddingBottom: (e4) => `${e4.shape.borderRadius}px` }, children: [x(A, { onContextMenu: () => {
845
+ return g2 && (f3 = b(y, { children: [x(ie, { orientation: "horizontal" }), x(le, { variant: Vn.Menuitem, command: t3.getCommand("formatTableStyleClearTableStyle"), commandHook: r2, disabled: i2, icon: ae(x(at, {})) })] })), b(E, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (e4) => `${e4.shape.borderRadius}px`, paddingBottom: (e4) => `${e4.shape.borderRadius}px` }, children: [x(E, { onContextMenu: () => {
846
846
  }, sx: { display: "flex", flexDirection: "column", padding: "6px 16px" }, children: l3 }), f3] });
847
- }, [u2, u2?.().getTheme(), T2, k2]), N2 = i2 || !n2 || n2.disabled(), E2 = C(() => {
847
+ }, [u2, u2?.().getTheme(), T2, S2]), N2 = i2 || !n2 || n2.disabled(), A2 = C(() => {
848
848
  if (!p2 || !d2) return ae(x(zt, {}));
849
- }, [k2, T2, N2]);
850
- return x(me, { ref: t2, quickCommand: h2, createPopupPanel: F2, commands: o2, label: n2?.label(), commandState: g2, commandHook: r2, selected: null !== g2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), disabled: N2, icon: E2, ...m2 });
851
- })), Ga = [];
852
- Ga.push(Yr("Primary Background", "bg1")), Ga.push(Yr("Primary Text", "tx1")), Ga.push(Yr("Secondary Background", "bg2")), Ga.push(Yr("Secondary Text", "tx2")), Ga.push(Yr("Accent 1", "accent1")), Ga.push(Yr("Accent 2", "accent2")), Ga.push(Yr("Accent 3", "accent3")), Ga.push(Yr("Accent 4", "accent4")), Ga.push(Yr("Accent 5", "accent5")), Ga.push(Yr("Accent 6", "accent6"));
853
- const Ua = (e2) => {
854
- const { docTheme: t2, onSelectTheme: o2, darkMode: n2, isSelected: r2, outlined: a2, sx: l2, ...i2 } = e2, s2 = rr(), d2 = C(() => {
849
+ }, [S2, T2, N2]);
850
+ return x(me, { ref: t2, quickCommand: h2, createPopupPanel: F2, commands: o2, label: n2?.label(), commandState: g2, commandHook: r2, selected: null !== g2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), disabled: N2, icon: A2, ...m2 });
851
+ })), ja = [];
852
+ ja.push(ea("Primary Background", "bg1")), ja.push(ea("Primary Text", "tx1")), ja.push(ea("Secondary Background", "bg2")), ja.push(ea("Secondary Text", "tx2")), ja.push(ea("Accent 1", "accent1")), ja.push(ea("Accent 2", "accent2")), ja.push(ea("Accent 3", "accent3")), ja.push(ea("Accent 4", "accent4")), ja.push(ea("Accent 5", "accent5")), ja.push(ea("Accent 6", "accent6"));
853
+ const _a = (e2) => {
854
+ const { docTheme: t2, onSelectTheme: o2, darkMode: n2, isSelected: r2, outlined: a2, sx: l2, ...i2 } = e2, s2 = lr(), d2 = C(() => {
855
855
  let e3 = [];
856
- for (let o3 = 0; o3 < Ga.length; o3++) {
857
- const r3 = Ga[o3];
858
- e3.push(x(Zr, { schemeColorLookup: t2.schemeLookup(), colorDef: r3, darkMode: n2, selectedColor: null }, o3 + "-colorDef"));
856
+ for (let o3 = 0; o3 < ja.length; o3++) {
857
+ const r3 = ja[o3];
858
+ e3.push(x(Yr, { schemeColorLookup: t2.schemeLookup(), colorDef: r3, darkMode: n2, selectedColor: null }, o3 + "-colorDef"));
859
859
  }
860
- return x(A, { sx: { display: "flex", flexDirection: "row", flex: "none" }, children: x(A, { sx: { display: "flex", boxShadow: (e4) => e4.shadows[2] }, children: e3 }) });
860
+ return x(E, { sx: { display: "flex", flexDirection: "row", flex: "none" }, children: x(E, { sx: { display: "flex", boxShadow: (e4) => e4.shadows[2] }, children: e3 }) });
861
861
  }, [t2, s2]);
862
- return x(He, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${r2 ? e3.palette.text.primary : "transparent"} 1px`, "&:hover:not([disabled])": { border: (e3) => `solid ${e3.palette.text.primary} 1px !important` } }, icon: null, ...i2, children: b(A, { sx: { border: (e3) => `solid ${e3.palette.divider} 1px`, minWidth: "200px", borderRadius: "2px", padding: "4px 4px", textAlign: "left", display: "flex", gap: "4px", flexDirection: "column", alignItems: "stretch", color: (e3) => r2 ? e3.palette.text.primary : void 0, "&:hover:not([disabled])": { color: (e3) => e3.palette.text.primary } }, children: [x(A, { sx: {}, children: t2.getName() }), b(A, { sx: { paddingTop: "6px", paddingLeft: "12px", paddingRight: "12px", display: "flex", flexDirection: "column", alignItems: "stretch" }, children: [d2, x(A, { sx: { flex: "1 1 100%", textOverflow: "ellipsis", overflow: "hidden", marginTop: "2px", whiteSpace: "pre", fontFamily: () => t2.getFontScheme().getMajorFont() }, children: x(De, { disableInteractive: true, PopperProps: { style: { pointerEvents: "none" }, disablePortal: true, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: true, options: { boundariesElement: "viewport" } }] } }, title: x("div", { style: { textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "pre" }, children: `The font used for the body.
862
+ return x(He, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${r2 ? e3.palette.text.primary : "transparent"} 1px`, "&:hover:not([disabled])": { border: (e3) => `solid ${e3.palette.text.primary} 1px !important` } }, icon: null, ...i2, children: b(E, { sx: { border: (e3) => `solid ${e3.palette.divider} 1px`, minWidth: "200px", borderRadius: "2px", padding: "4px 4px", textAlign: "left", display: "flex", gap: "4px", flexDirection: "column", alignItems: "stretch", color: (e3) => r2 ? e3.palette.text.primary : void 0, "&:hover:not([disabled])": { color: (e3) => e3.palette.text.primary } }, children: [x(E, { sx: {}, children: t2.getName() }), b(E, { sx: { paddingTop: "6px", paddingLeft: "12px", paddingRight: "12px", display: "flex", flexDirection: "column", alignItems: "stretch" }, children: [d2, x(E, { sx: { flex: "1 1 100%", textOverflow: "ellipsis", overflow: "hidden", marginTop: "2px", whiteSpace: "pre", fontFamily: () => t2.getFontScheme().getMajorFont() }, children: x(De, { disableInteractive: true, PopperProps: { style: { pointerEvents: "none" }, disablePortal: true, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: true, options: { boundariesElement: "viewport" } }] } }, title: x("div", { style: { textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "pre" }, children: `The font used for the body.
863
863
  The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bottom-start", children: x("div", { children: t2.getFontScheme().getMinorFont() }) }) })] })] }) });
864
- }, ja = k(S((e2, t2) => {
864
+ }, qa = S(k((e2, t2) => {
865
865
  const { themes: o2, selectedTheme: n2, onSelectTheme: r2, sx: a2, disabled: l2 = false, darkMode: i2, ...s2 } = e2, d2 = C(() => {
866
- const e3 = o2?.search({ selected: n2 }) ?? [], t3 = [];
866
+ const e3 = o2?.getItems({ selected: n2 }) ?? [], t3 = [];
867
867
  if (0 === e3.length) return x(Wt, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "6px", paddingBottom: "6px" }, children: "No themes" });
868
- for (let o3 = 0; o3 < e3.length; o3++) {
869
- const a3 = e3[o3], s3 = n2 && a3?.getName() === n2.getName(), d3 = e3[o3 + 1];
870
- d3 && d3.isCustom() !== a3.isCustom() && t3.push(x(ie, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${o3}`)), t3.push(x(Ua, { docTheme: a3, onSelectTheme: () => r2(a3), isSelected: s3, disabled: l2, darkMode: i2, onMouseDown: (e4) => {
868
+ const a3 = e3.length;
869
+ for (let o3 = 0; o3 < a3; o3++) {
870
+ const a4 = e3[o3], s3 = n2 && a4?.getName() === n2.getName(), d3 = e3[o3 + 1];
871
+ d3 && d3.isCustom() !== a4.isCustom() && t3.push(x(ie, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${o3}`)), t3.push(x(_a, { docTheme: a4, onSelectTheme: () => r2(a4), isSelected: s3, disabled: l2, darkMode: i2, onMouseDown: (e4) => {
871
872
  0 === e4.button && e4.preventDefault();
872
873
  }, onMouseUp: (e4) => {
873
- 0 === e4.button && r2(a3);
874
+ 0 === e4.button && r2(a4);
874
875
  }, onKeyDown: (e4) => {
875
- e4.keyCode !== Gn.Enter && e4.keyCode !== Gn.Space || r2(a3);
876
- } }, a3.getName()));
876
+ e4.keyCode !== jn.Enter && e4.keyCode !== jn.Space || r2(a4);
877
+ } }, a4.getName()));
877
878
  }
878
879
  return t3;
879
880
  }, [n2, r2, i2]);
880
- return x(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ref: t2, ...s2, children: b(A, { sx: { display: "flex", flexDirection: "column", overflow: "hidden" }, children: [x(Wt, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "4px", paddingBottom: "2px" }, children: "Themes" }), x(ie, {}), x(A, { sx: { flex: "1 1 100%", overflow: "auto", padding: "6px 16px" }, children: d2 })] }) });
881
- })), _a = k(S((e2, t2) => {
882
- const { themes: o2, selectedTheme: n2, onSelectTheme: r2, icon: a2, tooltip: l2, label: i2, variant: s2 = Re.Toolbar, darkMode: d2, panelProps: c2, ...m2 } = e2, p2 = a2 || ae(x(Ot, {})), u2 = { createPopupPanel: v((e3) => {
881
+ return x(E, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ref: t2, ...s2, children: b(E, { sx: { display: "flex", flexDirection: "column", overflow: "hidden" }, children: [x(Wt, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "4px", paddingBottom: "2px" }, children: "Themes" }), x(ie, {}), x(E, { sx: { flex: "1 1 100%", overflow: "auto", padding: "6px 16px" }, children: d2 })] }) });
882
+ })), Ka = S(k((e2, t2) => {
883
+ const { themes: o2, selectedTheme: n2, onSelectTheme: r2, icon: a2, tooltip: l2, label: i2, variant: s2 = Pe.Toolbar, darkMode: d2, panelProps: c2, ...m2 } = e2, p2 = a2 || ae(x(Ot, {})), u2 = { createPopupPanel: v((e3) => {
883
884
  const { closeFloatAll: t3 } = e3;
884
- return x(ja, { ...c2, themes: o2, selectedTheme: n2, onSelectTheme: r2, darkMode: d2, onKeyDown: (e4) => {
885
- e4.which === Gn.Enter && t3();
885
+ return x(qa, { ...c2, themes: o2, selectedTheme: n2, onSelectTheme: r2, darkMode: d2, onKeyDown: (e4) => {
886
+ e4.which === jn.Enter && t3();
886
887
  } });
887
888
  }, [o2, n2, r2, c2, d2]), tooltip: l2 || i2 || "Theme", label: i2, icon: p2, ...m2 };
888
- return s2 === Re.Toolbar ? x(Pe, { ref: t2, ...u2 }) : x(Be, { ref: t2, ...u2 });
889
- })), qa = k(S((e2, t2) => {
889
+ return s2 === Pe.Toolbar ? x(Me, { ref: t2, ...u2 }) : x(Be, { ref: t2, ...u2 });
890
+ })), Xa = S(k((e2, t2) => {
890
891
  const { command: o2, commandHook: n2, selectedTheme: r2, onSelectTheme: a2, disabled: l2 = false, darkMode: i2, label: s2, icon: d2, variant: c2, ...m2 } = e2;
891
- Un(o2);
892
- const p2 = o2?.context()?.themes, u2 = r2 || o2?.context()?.theme, g2 = i2 ?? o2?.context()?.darkMode, h2 = l2 || o2?.disabled(), f2 = On((e3) => {
892
+ _n(o2);
893
+ const p2 = o2?.context()?.themes, u2 = r2 || o2?.context()?.theme, g2 = i2 ?? o2?.context()?.darkMode, h2 = l2 || o2?.disabled(), f2 = Gn((e3) => {
893
894
  a2?.(e3), o2?.execute(e3, n2);
894
895
  }, [a2, n2]), b2 = v((e3, t3) => {
895
896
  const { children: n3, title: r3, ...a3 } = e3;
896
897
  let l3 = e3.children;
897
- return (h2 || t3) && (l3 = x("div", { children: l3 })), x(ze, { command: o2, placement: c2 === $n.Toolbar ? "bottom-start" : "right-start", disabled: h2 || t3, ...a3, children: l3 });
898
+ return (h2 || t3) && (l3 = x("div", { children: l3 })), x(ze, { command: o2, placement: c2 === Vn.Toolbar ? "bottom-start" : "right-start", disabled: h2 || t3, ...a3, children: l3 });
898
899
  }, [o2, h2]);
899
- return x(_a, { ref: t2, themes: p2, selectedTheme: u2, onSelectTheme: f2, variant: c2 === $n.Menuitem ? Re.Menuitem : Re.Toolbar, createTooltip: b2, disabled: h2, darkMode: g2, icon: ae(x(Ot, {})), ...m2 });
900
- })), Ka = k(S((e2, t2) => {
901
- const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = Wn(o2, ["themeMode"])[0], s2 = i2?.state(), d2 = null !== i2?.state(), c2 = U("(prefers-color-scheme: dark)"), m2 = "dark" === s2 || null === s2 && c2, p2 = On((e3, t3) => {
902
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: "appearance", disabled: a2 }, r3 = b(y, { children: [x(le, { ...o3, command: i2, icon: ae(x(m2 ? Tn : Dn, {})) }), x(le, { ...o3, command: t3.getCommand("defaultThemeMode"), icon: ae(x(c2 ? Vt : Gt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("enableDarkGrid") }), x(le, { ...o3, command: t3.getCommand("enableDarkImages") })] });
900
+ return x(Ka, { ref: t2, themes: p2, selectedTheme: u2, onSelectTheme: f2, variant: c2 === Vn.Menuitem ? Pe.Menuitem : Pe.Toolbar, createTooltip: b2, disabled: h2, darkMode: g2, icon: ae(x(Ot, {})), ...m2 });
901
+ })), Za = S(k((e2, t2) => {
902
+ const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = On(o2, ["themeMode"])[0], s2 = i2?.state(), d2 = null !== i2?.state(), c2 = U("(prefers-color-scheme: dark)"), m2 = "dark" === s2 || null === s2 && c2, p2 = Gn((e3, t3) => {
903
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: "appearance", disabled: a2 }, r3 = b(y, { children: [x(le, { ...o3, command: i2, icon: ae(x(m2 ? Rn : Pn, {})) }), x(le, { ...o3, command: t3.getCommand("defaultThemeMode"), icon: ae(x(c2 ? Vt : Gt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("enableDarkGrid") }), x(le, { ...o3, command: t3.getCommand("enableDarkImages") })] });
903
904
  return ce({ ...e3, children: r3 });
904
905
  }, [a2, i2, n2, r2, c2, s2, d2]);
905
906
  return x(me, { ref: t2, quickCommand: "themeMode", commands: o2, commandHook: n2, createPopupPanel: p2, label: "Appearance", tooltip: "Change the light/dark mode to match your viewing preference. This does not affect the view for others.", onQuickClick: () => {
906
907
  i2?.execute(m2 ? "light" : "dark", n2);
907
- }, selected: d2, icon: ae(x(m2 ? Tn : Dn, {})), ...l2 });
908
- })), Xa = k(S((e2, t2) => {
908
+ }, selected: d2, icon: ae(x(m2 ? Rn : Pn, {})), ...l2 });
909
+ })), Ja = S(k((e2, t2) => {
909
910
  const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, sx: l2, ...i2 } = e2, s2 = v((e3, t3) => {
910
- const o3 = { variant: $n.Menuitem, scope: "help", commandHook: { ...n2, beforeExecute: (t4, o4) => {
911
+ const o3 = { variant: Vn.Menuitem, scope: "help", commandHook: { ...n2, beforeExecute: (t4, o4) => {
911
912
  const r4 = n2?.beforeExecute?.(t4, o4);
912
913
  return false !== r4 && e3.floatReference.closeAll();
913
914
  } }, disabled: a2 }, r3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("showKeyboardShortcuts"), icon: ae(x(Mn, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("gotoUrlGithub"), icon: ae(x(Ut, {})) }), x(le, { ...o3, command: t3.getCommand("gotoUrlDiscord"), icon: ae(x(jt, {})) }), x(le, { ...o3, command: t3.getCommand("gotoUrlDocumentation"), icon: ae(x(_t, {})) }), x(le, { ...o3, command: t3.getCommand("gotoUrlIssue"), icon: ae(x(qt, {})) })] });
914
915
  return ce({ ...e3, children: r3 });
915
916
  }, [a2, n2]);
916
917
  return x(me, { ref: t2, sx: l2, commands: o2, disabled: a2, commandHook: n2, scope: r2, label: "Help", tooltip: "Help, feedback, and keyboard shortcuts.", createPopupPanel: s2, icon: ae(x(Kt, { sx: { transform: "scale(0.75)" } })), ...i2 });
917
- })), Za = k(S((e2, t2) => {
918
- const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, preferSingleMenu: l2 = true, showQuickButton: i2 = true, variant: s2 = $n.Toolbar, ...d2 } = e2, c2 = Wn(o2, ["insertImageFromFile", "insertImageFromURL"]), { singleMenuCommand: m2, allDisabled: p2 } = C(() => {
918
+ })), Ya = S(k((e2, t2) => {
919
+ const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, preferSingleMenu: l2 = true, showQuickButton: i2 = true, variant: s2 = Vn.Toolbar, ...d2 } = e2, c2 = On(o2, ["insertImageFromFile", "insertImageFromURL"]), { singleMenuCommand: m2, allDisabled: p2 } = C(() => {
919
920
  let e3 = null, t3 = 0;
920
- for (let o3 = 0; o3 < c2.length; o3++) c2[o3] && !c2[o3]?.disabled() && (l2 && s2 === $n.Menuitem && (e3 = 0 === t3 ? c2[o3] : null), t3++);
921
+ for (let o3 = 0; o3 < c2.length; o3++) c2[o3] && !c2[o3]?.disabled() && (l2 && s2 === Vn.Menuitem && (e3 = 0 === t3 ? c2[o3] : null), t3++);
921
922
  return { singleMenuCommand: e3, allDisabled: 0 === t3 };
922
923
  }, [c2]), u2 = v((e3, t3) => {
923
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: "insertImage", disabled: a2 }, r3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("insertImageFromFile"), icon: ae(x(Xt, {})) }), x(le, { ...o3, command: t3.getCommand("insertImageFromURL"), icon: ae(x(Xt, {})) })] });
924
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: "insertImage", disabled: a2 }, r3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("insertImageFromFile"), icon: ae(x(Xt, {})) }), x(le, { ...o3, command: t3.getCommand("insertImageFromURL"), icon: ae(x(Xt, {})) })] });
924
925
  return ce({ ...e3, children: r3 });
925
926
  }, [a2, n2, r2]);
926
927
  return m2 ? x(le, { ref: t2, variant: s2, commandHook: n2, disabled: a2, command: m2, icon: ae(x(Xt, {})), ...d2 }) : x(me, { ref: t2, variant: s2, quickCommand: "insertImageFromFile", commands: o2, commandHook: n2, scope: r2, disabled: a2 || p2, tooltip: "Insert a picture from the web to complement your data.", createPopupPanel: u2, icon: ae(x(Xt, {})), ...d2 });
927
- })), Ja = k(S((e2, t2) => {
928
- const { command: o2, ...n2 } = e2, r2 = jn(), [a2, l2] = D(false), [i2, s2] = D("info");
929
- return M(() => {
928
+ })), Qa = S(k((e2, t2) => {
929
+ const { command: o2, ...n2 } = e2, r2 = qn(), [a2, l2] = D(false), [i2, s2] = D("info");
930
+ return R(() => {
930
931
  const e3 = r2.getMode();
931
932
  l2("copy" === e3?.key || "cut" === e3?.key), s2("cut" === e3?.key ? "warning" : "info");
932
933
  }, [r2]), x(le, { ref: t2, command: o2, icon: ae(x(Zt, { isWalking: a2, themedType: i2 })), ...n2 });
933
- })), Ya = k(S((e2, t2) => {
934
+ })), el = S(k((e2, t2) => {
934
935
  const { ...o2 } = e2;
935
936
  return x(Jt, { ref: t2, ...o2, popupCommandKeys: ["quickFormulaSum", "quickFormulaAverage", "quickFormulaCount", "quickFormulaMax", "quickFormulaMin", null, "insertFunction"], quickCommand: "quickFormulaSum", popupScope: "quickFormula", label: "Quick Formulas", tooltip: "More quick functions.", icon: (e3) => {
936
937
  const t3 = e3?.key();
@@ -943,150 +944,150 @@ The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bot
943
944
  return null;
944
945
  }
945
946
  } });
946
- })), Qa = k(S((e2, t2) => {
947
- const { disabled: o2, style: n2, className: r2, sx: a2, defaultInput: l2, value: i2, formName: s2, formOptions: d2, onChangeInput: c2, onValidate: m2, onKeyDown: p2, ...u2 } = e2, g2 = vr(), h2 = s2 && g2 ? g2.register(s2, d2) : null, [f2, b2] = D(""), [y2, w2] = D(""), [k2, S2] = D(i2);
948
- M(() => {
949
- S2(i2), w2("");
947
+ })), tl = S(k((e2, t2) => {
948
+ const { disabled: o2, style: n2, className: r2, sx: a2, defaultInput: l2, value: i2, formName: s2, formOptions: d2, onChangeInput: c2, onValidate: m2, onKeyDown: p2, ...u2 } = e2, g2 = Dr(), h2 = s2 && g2 ? g2.register(s2, d2) : null, [f2, b2] = D(""), [y2, w2] = D(""), [S2, k2] = D(i2);
949
+ R(() => {
950
+ k2(i2), w2("");
950
951
  }, [i2]);
951
- const C2 = On((e3) => {
952
+ const C2 = Gn((e3) => {
952
953
  let t3 = "";
953
954
  try {
954
- S2(e3), m2?.(e3), c2?.(e3);
955
+ k2(e3), m2?.(e3), c2?.(e3);
955
956
  } catch (e4) {
956
957
  t3 = e4.message ?? "Invalid Name";
957
958
  }
958
959
  s2 && g2 && (t3 ? g2.setError(s2, { message: t3 }) : g2.clearErrors(s2)), w2(t3);
959
- }, [i2, m2, c2]), T2 = On(async (e3) => {
960
- e3.keyCode === Gn.Escape && f2 !== i2 && (C2(f2), g2?.setValue(s2, f2), g2?.clearErrors(s2), e3.stopPropagation()), p2?.(e3);
961
- }, [p2, f2, i2, g2]), R2 = On((e3) => {
960
+ }, [i2, m2, c2]), T2 = Gn(async (e3) => {
961
+ e3.keyCode === jn.Escape && f2 !== i2 && (C2(f2), g2?.setValue(s2, f2), g2?.clearErrors(s2), e3.stopPropagation()), p2?.(e3);
962
+ }, [p2, f2, i2, g2]), P2 = Gn((e3) => {
962
963
  b2(e3.target.value ?? "");
963
- }, []), P2 = On((e3) => {
964
+ }, []), M2 = Gn((e3) => {
964
965
  b2(""), h2?.onBlur(e3);
965
966
  }, []), B2 = v((e3) => {
966
967
  C2(e3.target.value), h2?.onChange(e3);
967
968
  }, [h2]);
968
- return x(j, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...a2 }, size: "small", ref: t2, className: yn("named-input", r2), ...u2, children: x(_, { label: "Name", placeholder: l2, onFocus: R2, onBlur: P2, inputRef: h2?.ref, disabled: o2, error: !!y2, helperText: y2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { className: "autoFocus", name: s2, spellCheck: false, autoComplete: "off", readOnly: o2, sx: { paddingTop: (e3) => e3.spacing(1.25), paddingBottom: (e3) => e3.spacing(0.75), backgroundImage: `linear-gradient(${ar("#fff", lr(5))}, ${ar("#fff", lr(5))})` } } }, value: k2 ?? "", onChange: B2, onKeyDownCapture: T2, onContextMenu: (e3) => {
969
+ return x(j, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...a2 }, size: "small", ref: t2, className: Sn("named-input", r2), ...u2, children: x(_, { label: "Name", placeholder: l2, onFocus: P2, onBlur: M2, inputRef: h2?.ref, disabled: o2, error: !!y2, helperText: y2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { className: "autoFocus", name: s2, spellCheck: false, autoComplete: "off", readOnly: o2, sx: { paddingTop: (e3) => e3.spacing(1.25), paddingBottom: (e3) => e3.spacing(0.75), backgroundImage: `linear-gradient(${ir("#fff", sr(5))}, ${ir("#fff", sr(5))})` } } }, value: S2 ?? "", onChange: B2, onKeyDownCapture: T2, onContextMenu: (e3) => {
969
970
  e3.stopPropagation();
970
971
  } }) });
971
972
  }));
972
- Qa.displayName = "NamedInput";
973
- const el = (e2) => null === e2 ? "" : e2.toString(), tl = k(S((e2, t2) => {
974
- const { formName: o2, formOptions: n2, disabled: r2, style: a2, className: l2, sx: i2, onKeyDown: s2, value: d2, onChangeInput: c2, resolvedAddress: m2, ...p2 } = e2, u2 = vr(), g2 = o2 && u2 ? u2.register(o2, n2) : null, [h2, f2] = D(""), [b2, y2] = D(false), [w2, k2] = D(() => el(d2));
975
- M(() => {
976
- k2(el(d2)), f2(""), o2 && u2 && u2.clearErrors(o2), y2(false);
973
+ tl.displayName = "NamedInput";
974
+ const ol = (e2) => null === e2 ? "" : e2.toString(), nl = S(k((e2, t2) => {
975
+ const { formName: o2, formOptions: n2, disabled: r2, style: a2, className: l2, sx: i2, onKeyDown: s2, value: d2, onChangeInput: c2, resolvedAddress: m2, ...p2 } = e2, u2 = Dr(), g2 = o2 && u2 ? u2.register(o2, n2) : null, [h2, f2] = D(""), [b2, y2] = D(false), [w2, S2] = D(() => ol(d2));
976
+ R(() => {
977
+ S2(ol(d2)), f2(""), o2 && u2 && u2.clearErrors(o2), y2(false);
977
978
  }, [d2]);
978
- const S2 = On((e3) => {
979
+ const k2 = Gn((e3) => {
979
980
  let t3 = "";
980
981
  try {
981
- k2(e3);
982
- const t4 = el(d2), o3 = m2(e3);
982
+ S2(e3);
983
+ const t4 = ol(d2), o3 = m2(e3);
983
984
  o3.toString() !== t4 && c2?.(o3);
984
985
  } catch (e4) {
985
986
  t3 = "Invalid Range";
986
987
  }
987
988
  o2 && u2 && (t3 ? u2.setError(o2, { message: t3 }) : u2.clearErrors(o2)), f2(t3), y2(true);
988
- }, [w2, c2, o2, u2]), T2 = On(async (e3) => {
989
- if (b2 && e3.keyCode === Gn.Escape) {
990
- const t3 = el(d2);
991
- k2(t3), f2(""), y2(false), e3.stopPropagation();
989
+ }, [w2, c2, o2, u2]), T2 = Gn(async (e3) => {
990
+ if (b2 && e3.keyCode === jn.Escape) {
991
+ const t3 = ol(d2);
992
+ S2(t3), f2(""), y2(false), e3.stopPropagation();
992
993
  }
993
994
  s2?.(e3);
994
- }, [d2, c2, s2, b2]), R2 = On((e3) => {
995
+ }, [d2, c2, s2, b2]), P2 = Gn((e3) => {
995
996
  g2?.onBlur(e3);
996
- }, [g2]), P2 = v((e3) => {
997
- S2(e3.target.value), g2?.onChange(e3);
997
+ }, [g2]), M2 = v((e3) => {
998
+ k2(e3.target.value), g2?.onChange(e3);
998
999
  }, [g2]), [B2, F2] = D(false), N2 = C(() => x(q, { tabIndex: -1, sx: { display: "flex", position: "relative", flex: "0" }, position: "end", children: x(eo, { disabled: true, selected: B2, onSelectToggle: (e3) => {
999
1000
  F2(e3);
1000
1001
  }, label: "Select Range", icon: ae(x(to, {})) }) }), [B2]);
1001
- return x(j, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...i2 }, size: "small", ref: t2, className: yn("range-input", l2), ...p2, children: x(_, { label: "Range", placeholder: "Enter Range", onBlur: R2, disabled: r2, error: !!h2, inputRef: g2?.ref, helperText: h2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { spellCheck: false, autoComplete: "off", readOnly: r2, name: o2, sx: { paddingTop: (e3) => e3.spacing(1.25), paddingBottom: (e3) => e3.spacing(0.75) } }, sx: { backgroundImage: `linear-gradient(${ar("#fff", lr(5))}, ${ar("#fff", lr(5))})` }, endAdornment: N2 }, value: w2 ?? "", onChange: P2, onKeyDownCapture: T2, onContextMenu: (e3) => {
1002
+ return x(j, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...i2 }, size: "small", ref: t2, className: Sn("range-input", l2), ...p2, children: x(_, { label: "Range", placeholder: "Enter Range", onBlur: P2, disabled: r2, error: !!h2, inputRef: g2?.ref, helperText: h2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { spellCheck: false, autoComplete: "off", readOnly: r2, name: o2, sx: { paddingTop: (e3) => e3.spacing(1.25), paddingBottom: (e3) => e3.spacing(0.75) } }, sx: { backgroundImage: `linear-gradient(${ir("#fff", sr(5))}, ${ir("#fff", sr(5))})` }, endAdornment: N2 }, value: w2 ?? "", onChange: M2, onKeyDownCapture: T2, onContextMenu: (e3) => {
1002
1003
  e3.stopPropagation();
1003
1004
  } }) });
1004
1005
  }));
1005
- tl.displayName = "RangeInput";
1006
- const ol = k(S((e2, t2) => {
1007
- const { sheet: o2, className: r2, debounceDelay: l2 = 220, sx: i2, ...s2 } = e2, [d2, c2] = D(() => o2.getView().getZoomScale()), [m2, p2] = D(null), u2 = P(0);
1008
- mr(o2, { onViewChange: () => {
1006
+ nl.displayName = "RangeInput";
1007
+ const rl = S(k((e2, t2) => {
1008
+ const { sheet: o2, className: r2, debounceDelay: l2 = 220, sx: i2, ...s2 } = e2, [d2, c2] = D(() => o2.getView().getZoomScale()), [m2, p2] = D(null), u2 = M(0);
1009
+ ur(o2, { onViewChange: () => {
1009
1010
  p2(true), 0 === u2.current && c2(o2.getView().getZoomScale());
1010
- } }), M(() => {
1011
+ } }), R(() => {
1011
1012
  u2.current = 0, p2(false), c2(o2.getView().getZoomScale());
1012
- }, [o2]), M(() => {
1013
+ }, [o2]), R(() => {
1013
1014
  0 !== u2.current && n.debounce(() => {
1014
1015
  d2 === u2.current && (u2.current = 0, o2.getView().update({ zoomScale: d2 }));
1015
1016
  }, l2)();
1016
1017
  }, [d2, l2]);
1017
- const g2 = On((e3) => {
1018
+ const g2 = Gn((e3) => {
1018
1019
  let t3 = e3;
1019
1020
  e3 < 100 ? t3 = Math.round(e3 / (10 / 9) + 10) : e3 > 100 && (t3 = Math.round(3 * e3 - 200)), u2.current = t3, p2(true), c2(t3);
1020
1021
  }, [o2]), h2 = (e3) => {
1021
1022
  let t3 = e3;
1022
1023
  return e3 < 100 ? t3 = 10 / 9 * (e3 - 10) : e3 > 100 && (t3 = (e3 + 200) / 3), t3;
1023
- }, f2 = h2(d2), [y2, w2] = D(null), k2 = P(null), S2 = v(() => {
1024
+ }, f2 = h2(d2), [y2, w2] = D(null), S2 = M(null), k2 = v(() => {
1024
1025
  const e3 = y2;
1025
1026
  e3 && requestAnimationFrame(() => {
1026
- k2.current?.contains(document.activeElement) && e3.focus();
1027
+ S2.current?.contains(document.activeElement) && e3.focus();
1027
1028
  });
1028
- }, []), T2 = _n(() => {
1029
+ }, []), T2 = Kn(() => {
1029
1030
  g2(h2(n.findNextStep(o2.getView().getZoomScale(), false, 10)));
1030
- }), R2 = _n(() => g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10)))), B2 = rr(), F2 = C(() => `${a.getSharedMeasurer()("100%", Math.round(B2.typography.fontSize), B2.typography.fontFamily).width}px`, [B2]);
1031
- return b(A, { ref: t2, className: yn(r2), sx: { padding: "0px 0px", display: "flex", alignItems: "center", color: (e3) => e3.palette.text.secondary, ...i2 }, onFocus: (e3) => {
1031
+ }), P2 = Kn(() => g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10)))), B2 = lr(), F2 = C(() => `${a.getSharedMeasurer()("100%", Math.round(B2.typography.fontSize), B2.typography.fontFamily).width}px`, [B2]);
1032
+ return b(E, { ref: t2, className: Sn(r2), sx: { padding: "0px 0px", display: "flex", alignItems: "center", color: (e3) => e3.palette.text.secondary, ...i2 }, onFocus: (e3) => {
1032
1033
  e3.relatedTarget && !y2 && w2(e3.relatedTarget);
1033
1034
  }, onBlur: (e3) => {
1034
- y2 && !k2?.current?.contains(e3.relatedTarget) && w2(null);
1035
+ y2 && !S2?.current?.contains(e3.relatedTarget) && w2(null);
1035
1036
  }, onMouseDown: (e3) => {
1036
1037
  0 === e3.button && e3.preventDefault();
1037
1038
  }, onMouseUp: (e3) => {
1038
- 0 === e3.button && S2();
1039
+ 0 === e3.button && k2();
1039
1040
  }, ...s2, children: [x(De, { disableInteractive: true, title: "Zoom Out", children: x(L, { sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (e3) => {
1040
1041
  0 !== e3.button ? e3.preventDefault() : T2(e3);
1041
- }, children: x(Rn, {}) }) }), x(K, { ref: k2, 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: (e3) => `0px 0px 0px 3px ${oo(e3.palette.primary.main, 0.16)}` }, "&:focus, &:hover, &.Mui-active": { boxShadow: (e3) => `0px 0px 0px 2px ${oo(e3.palette.primary.main, 0.16)}` } }, "& .MuiSlider-mark": { width: "1px", height: "8px" }, "& .MuiSlider-markActive": { backgroundColor: "currentColor" }, "& .MuiSlider-thumb:not(.MuiSlider-active)": { transition: m2 ? "left 260ms ease-in" : "none" } }, valueLabelDisplay: "auto", size: "small", track: false, min: 0, step: 1, value: f2, max: 200, marks: [{ value: 100 }], onAnimationEnd: () => p2(false), onWheel: (e3) => {
1042
+ }, children: x(Bn, {}) }) }), x(K, { ref: S2, 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: (e3) => `0px 0px 0px 3px ${oo(e3.palette.primary.main, 0.16)}` }, "&:focus, &:hover, &.Mui-active": { boxShadow: (e3) => `0px 0px 0px 2px ${oo(e3.palette.primary.main, 0.16)}` } }, "& .MuiSlider-mark": { width: "1px", height: "8px" }, "& .MuiSlider-markActive": { backgroundColor: "currentColor" }, "& .MuiSlider-thumb:not(.MuiSlider-active)": { transition: m2 ? "left 260ms ease-in" : "none" } }, valueLabelDisplay: "auto", size: "small", track: false, min: 0, step: 1, value: f2, max: 200, marks: [{ value: 100 }], onAnimationEnd: () => p2(false), onWheel: (e3) => {
1042
1043
  g2(h2(n.findNextStep(o2.getView().getZoomScale(), e3.deltaY < 0, 10)));
1043
1044
  }, onKeyDown: (e3) => {
1044
- e3.which === Gn.Down || e3.which === Gn.Right ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10))), e3.preventDefault()) : e3.which === Gn.Up || e3.which === Gn.Left ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), false, 10))), e3.preventDefault()) : e3.which !== Gn.Enter && e3.which !== Gn.Escape || S2();
1045
+ e3.which === jn.Down || e3.which === jn.Right ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10))), e3.preventDefault()) : e3.which === jn.Up || e3.which === jn.Left ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), false, 10))), e3.preventDefault()) : e3.which !== jn.Enter && e3.which !== jn.Escape || k2();
1045
1046
  }, onChange: (e3, t3) => {
1046
1047
  Math.abs(t3 - 100) < 3 ? g2(100) : g2(t3);
1047
1048
  }, valueLabelFormat: (e3, t3) => `Zoom: ${Math.round(d2)}%` }), x(De, { disableInteractive: true, title: "Zoom In", children: x(L, { sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (e3) => {
1048
- 0 !== e3.button ? e3.preventDefault() : R2(e3);
1049
- }, children: x(Pn, {}) }) }), b(A, { sx: { display: "flex", flexDirection: "row" }, children: [x(A, { sx: { minWidth: "8px" } }), x(I, { noWrap: true, component: "div", onClick: () => {
1049
+ 0 !== e3.button ? e3.preventDefault() : P2(e3);
1050
+ }, children: x(Fn, {}) }) }), b(E, { sx: { display: "flex", flexDirection: "row" }, children: [x(E, { sx: { minWidth: "8px" } }), x(I, { noWrap: true, component: "div", onClick: () => {
1050
1051
  g2(100);
1051
1052
  }, sx: { cursor: "pointer", display: "flex", flex: "1 1 100%", fontSize: "0.70rem", marginLeft: "2px", marginRight: "2px", userSelect: "none", justifyContent: "center", width: F2 }, children: x("div", { children: Math.round(d2) + "%" }) })] })] });
1052
1053
  }));
1053
- ol.displayName = "SheetZoomScale";
1054
- const nl = k(S((e2, t2) => {
1054
+ rl.displayName = "SheetZoomScale";
1055
+ const al = S(k((e2, t2) => {
1055
1056
  const { sx: o2, sheet: n2, gridStyle: r2, children: a2, childrenEnd: l2, ...i2 } = e2;
1056
1057
  N(t2, () => ({}));
1057
- const s2 = P(null);
1058
- M(() => {
1058
+ const s2 = M(null);
1059
+ R(() => {
1059
1060
  const e3 = (e4) => e4.preventDefault();
1060
1061
  return s2.current?.addEventListener("wheel", e3, { passive: false }), () => {
1061
1062
  s2.current?.removeEventListener("wheel", e3);
1062
1063
  };
1063
1064
  }, []);
1064
- const d2 = jn(), c2 = C(() => {
1065
+ const d2 = qn(), c2 = C(() => {
1065
1066
  const e3 = d2.getMode();
1066
1067
  return e3?.description ? e3.description : "Ready";
1067
1068
  }, [d2]), [m2, p2] = D(false);
1068
- return b(A, { ref: s2, sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", overflow: m2 ? "visible" : "hidden", boxShadow: `0px -1px 0px ${r2.header.edgeStrokeFill}`, ...o2 }, onMouseOver: () => p2(true), onMouseLeave: () => p2(false), ...i2, children: [a2, x("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "end", overflow: "hidden" }, children: x(I, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: c2 }) }), l2 ? x(A, { sx: { display: "flex", alignItems: "center" }, children: l2 }) : null, x(ie, { style: { marginTop: "6px", marginBottom: "6px" } }), x(ol, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: n2 })] });
1069
+ return b(E, { ref: s2, sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", overflow: m2 ? "visible" : "hidden", boxShadow: `0px -1px 0px ${r2.header.edgeStrokeFill}`, ...o2 }, onMouseOver: () => p2(true), onMouseLeave: () => p2(false), ...i2, children: [a2, x("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "end", overflow: "hidden" }, children: x(I, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: c2 }) }), l2 ? x(E, { sx: { display: "flex", alignItems: "center" }, children: l2 }) : null, x(ie, { style: { marginTop: "6px", marginBottom: "6px" } }), x(rl, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: n2 })] });
1069
1070
  }));
1070
- nl.displayName = "StatusBar";
1071
- const rl = k(S((e2, t2) => {
1072
- const { disabled: o2, names: r2, workbook: l2, restoreFocus: i2, readonly: s2 = false, disabled: d2 = false, commandPopupButtonProps: c2, sx: m2, notifier: u2, ...g2 } = e2, [h2, f2] = D(null), [w2, k2] = D(() => l2.getSelectedRanges().getCoords()), [S2, C2] = D(false), { reference: T2 } = no({ parentFloat: c2?.parentFloat }), [R2, F2] = D(() => s2 || !l2.getProtection().isStructureAllowed()), N2 = () => h2?.text ?? "", [E2, I2] = D(N2), H2 = On(() => {
1073
- if (T2?.closeAll(), !E2) {
1071
+ al.displayName = "StatusBar";
1072
+ const ll = S(k((e2, t2) => {
1073
+ const { disabled: o2, names: r2, workbook: l2, restoreFocus: i2, readonly: s2 = false, disabled: d2 = false, commandPopupButtonProps: c2, sx: m2, notifier: u2, ...g2 } = e2, [h2, f2] = D(null), [w2, S2] = D(() => l2.getSelectedRanges().getCoords()), [k2, C2] = D(false), { reference: T2 } = no({ parentFloat: c2?.parentFloat }), [P2, F2] = D(() => s2 || !l2.getProtection().isStructureAllowed()), N2 = () => h2?.text ?? "", [A2, I2] = D(N2), H2 = Gn(() => {
1074
+ if (T2?.closeAll(), !A2) {
1074
1075
  const e4 = N2();
1075
1076
  return I2(N2()), e4;
1076
1077
  }
1077
- if (N2() === E2) return E2;
1078
- const e3 = E2.trim().toLowerCase();
1079
- if ("r" === e3 || "c" === e3) return E2;
1078
+ if (N2() === A2) return A2;
1079
+ const e3 = A2.trim().toLowerCase();
1080
+ if ("r" === e3 || "c" === e3) return A2;
1080
1081
  try {
1081
- const e4 = l2.getRanges(E2);
1082
+ const e4 = l2.getRanges(A2);
1082
1083
  if (e4) return e4.toString();
1083
1084
  } catch (e4) {
1084
1085
  }
1085
- const t3 = r2.getByName(E2);
1086
- if (t3 && t3.getRanges()) return E2;
1086
+ const t3 = r2.getByName(A2);
1087
+ if (t3 && t3.getRanges()) return A2;
1087
1088
  let o3 = null;
1088
1089
  try {
1089
- const e4 = l2.getRanges(E2), t4 = e4.getCoords().map((e5) => ({ $colEnd: true, $rowEnd: true, $colStart: true, $rowStart: true, ...e5 }));
1090
+ const e4 = l2.getRanges(A2), t4 = e4.getCoords().map((e5) => ({ $colEnd: true, $rowEnd: true, $colStart: true, $rowStart: true, ...e5 }));
1090
1091
  o3 = l2.getRanges(t4);
1091
1092
  } catch (e4) {
1092
1093
  }
@@ -1095,13 +1096,13 @@ const rl = k(S((e2, t2) => {
1095
1096
  o3 = l2.getRanges(e4);
1096
1097
  }
1097
1098
  try {
1098
- let e4 = r2.getByName(E2);
1099
- R2 || e4 || (e4 = r2.addReference(E2, o3)), e4 && f2({ text: e4.getName() });
1099
+ let e4 = r2.getByName(A2);
1100
+ P2 || e4 || (e4 = r2.addReference(A2, o3)), e4 && f2({ text: e4.getName() });
1100
1101
  } catch (e4) {
1101
- I2(N2()), u2.showMessage?.(e4.message, { type: qn.Error });
1102
+ I2(N2()), u2.showMessage?.(e4.message, { type: Xn.Error });
1102
1103
  }
1103
1104
  return null;
1104
- }, [E2, r2, T2, R2]), z2 = On(() => {
1105
+ }, [A2, r2, T2, P2]), z2 = Gn(() => {
1105
1106
  if (l2.isClosed()) return;
1106
1107
  const e3 = [];
1107
1108
  for (let t4 = 0; t4 < w2.length; t4++) {
@@ -1115,31 +1116,31 @@ const rl = k(S((e2, t2) => {
1115
1116
  }
1116
1117
  let o3 = null;
1117
1118
  o3 = t3?.length > 0 ? t3[0].getName() : l2.getSelectedSheet().getSelectedRange().toString(), f2({ text: o3 });
1118
- }, [l2, w2]), [W2, $2] = D(() => r2?.search() ?? null);
1119
- mr(r2, { onCollectionChange(e3) {
1120
- $2(r2.search()), z2();
1119
+ }, [l2, w2]), [W2, $2] = D(() => r2?.getItems() ?? null);
1120
+ ur(r2, { onCollectionChange(e3) {
1121
+ $2(r2.getItems()), z2();
1121
1122
  }, onClose(e3) {
1122
1123
  $2([]);
1123
- } }), M(() => {
1124
+ } }), R(() => {
1124
1125
  I2(N2());
1125
1126
  }, [h2, w2]);
1126
1127
  const [V2, G2] = D(l2?.getSelectedSheet());
1127
- mr(l2, { onProtectionChange: (e3) => {
1128
+ ur(l2, { onProtectionChange: (e3) => {
1128
1129
  F2(s2 || !e3.getProtection().isStructureAllowed());
1129
1130
  }, onSheetsChange: (e3) => {
1130
1131
  G2(e3?.getSelectedSheet());
1131
1132
  }, onViewChange(e3) {
1132
1133
  G2(e3?.getSelectedSheet());
1133
1134
  } });
1134
- const [U2, j2] = D(null), _2 = On(n.debounce(z2, U2 ? 320 : 0), []);
1135
- mr(V2.getSelection(), { onChange: () => {
1136
- k2((e3) => {
1135
+ const [U2, j2] = D(null), _2 = Gn(n.debounce(z2, U2 ? 320 : 0), []);
1136
+ ur(V2.getSelection(), { onChange: () => {
1137
+ S2((e3) => {
1137
1138
  const t3 = l2.getSelectedRanges().getCoords();
1138
1139
  return p.isEqualRangesArrays(t3, e3) ? e3 : t3;
1139
1140
  });
1140
1141
  }, onAdjustingChange: (e3) => {
1141
1142
  j2(e3.getAdjusting());
1142
- } }), M(() => {
1143
+ } }), R(() => {
1143
1144
  if (U2) {
1144
1145
  const e3 = l2.getSelectedRange(), t3 = e3.getRowCount(), o3 = e3.getColumnCount();
1145
1146
  let n2 = `${t3}R x ${o3}C`;
@@ -1147,39 +1148,39 @@ const rl = k(S((e2, t2) => {
1147
1148
  }
1148
1149
  f2({ text: l2.getSelectedSheet().getSelectedRange().toString() }), _2();
1149
1150
  }, [w2, l2, U2]);
1150
- const q2 = P(null), K2 = v((e3) => {
1151
+ const q2 = M(null), K2 = v((e3) => {
1151
1152
  const { onMouseDown: t3, onMouseUp: o3, ...n2 } = e3;
1152
- return x(L, { ...n2, sx: { ...n2?.sx, display: "flex", flex: "1 1 100%" }, disableRipple: true, children: x(O, { inputMode: "text", inputProps: { tabIndex: 0, name: "input-named-range", maxLength: 255, className: "input", autoFocus: false, spellCheck: false, autoComplete: "off", ref: q2 }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.text.icon ?? e4.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, "::after": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", fontSize: 11 * a.getDeviceScale(), fontStyle: h2?.fontStyle, paddingLeft: (e4) => e4.spacing(0.75), paddingRight: (e4) => e4.spacing(0.75), boxShadow: "none", flex: "1", color: (e4) => e4.palette.text.secondary, input: { padding: "0", textAlign: "left", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary } } }, value: E2, onFocus: (e4) => {
1153
+ return x(L, { ...n2, sx: { ...n2?.sx, display: "flex", flex: "1 1 100%" }, disableRipple: true, children: x(O, { inputMode: "text", inputProps: { tabIndex: 0, name: "input-named-range", maxLength: 255, className: "input", autoFocus: false, spellCheck: false, autoComplete: "off", ref: q2 }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.text.icon ?? e4.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, "::after": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", fontSize: 11 * a.getDeviceScale(), fontStyle: h2?.fontStyle, paddingLeft: (e4) => e4.spacing(0.75), paddingRight: (e4) => e4.spacing(0.75), boxShadow: "none", flex: "1", color: (e4) => e4.palette.text.secondary, input: { padding: "0", textAlign: "left", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary } } }, value: A2, onFocus: (e4) => {
1153
1154
  e4.target?.select();
1154
1155
  }, onKeyDown: (e4) => {
1155
- if (e4.which === Gn.Enter || e4.which === Gn.Tab) {
1156
- let t4 = E2;
1157
- N2() !== E2 && (e4.stopPropagation(), e4.preventDefault(), t4 = H2()), t4 ? X2(t4) : i2?.();
1158
- } else if (e4.which === Gn.Escape) N2() !== E2 ? (I2(N2()), setTimeout(() => {
1156
+ if (e4.which === jn.Enter || e4.which === jn.Tab) {
1157
+ let t4 = A2;
1158
+ N2() !== A2 && (e4.stopPropagation(), e4.preventDefault(), t4 = H2()), t4 ? X2(t4) : i2?.();
1159
+ } else if (e4.which === jn.Escape) N2() !== A2 ? (I2(N2()), setTimeout(() => {
1159
1160
  e4.target?.select();
1160
1161
  }, 0), e4.stopPropagation(), e4.preventDefault()) : i2?.();
1161
- else if (e4.which === Gn.Space) return void e4.stopPropagation();
1162
+ else if (e4.which === jn.Space) return void e4.stopPropagation();
1162
1163
  }, onBlur: () => {
1163
1164
  I2(N2());
1164
1165
  }, onChange: (e4) => {
1165
1166
  I2(e4.target.value);
1166
1167
  } }) });
1167
- }, [E2, h2]), X2 = On(async (e3) => {
1168
+ }, [A2, h2]), X2 = Gn(async (e3) => {
1168
1169
  try {
1169
1170
  T2?.closeAll();
1170
1171
  const t3 = r2.lookupByRanges(e3)?.[0];
1171
1172
  t3 && await t3?.select(), await l2.getRanges(e3)?.select();
1172
1173
  } catch (e4) {
1173
- u2.showMessage?.(e4.message, { type: qn.Error });
1174
+ u2.showMessage?.(e4.message, { type: Xn.Error });
1174
1175
  }
1175
1176
  }, [r2, u2, l2]), Z2 = v((e3) => {
1176
1177
  setTimeout(() => {
1177
1178
  C2(true);
1178
1179
  }, 0);
1179
- const t3 = { variant: $n.Menuitem, parentFloat: e3.floatReference, commandHook: { ...c2?.commandHook, beforeExecute: (e4, t4) => (T2?.closeAll(), c2?.commandHook?.beforeExecute?.(e4, t4)) }, scope: c2?.scope, commands: c2?.commands };
1180
- let o3 = r2.search({ scope: l2?.getSelectedSheet().getName() });
1180
+ const t3 = { variant: Vn.Menuitem, parentFloat: e3.floatReference, commandHook: { ...c2?.commandHook, beforeExecute: (e4, t4) => (T2?.closeAll(), c2?.commandHook?.beforeExecute?.(e4, t4)) }, scope: c2?.scope, commands: c2?.commands };
1181
+ let o3 = r2.getItems({ scope: l2?.getSelectedSheet().getName() });
1181
1182
  o3 = o3.sort((e4, t4) => e4.getType() === t4.getType() ? e4.getName().localeCompare(t4.getName()) : "range" === e4.getType() ? -1 : 1);
1182
- const n2 = R2 ? null : ["editNamedReference", "deleteNamedReference"], a2 = R2 ? null : ["editTable", null, "convertTableToRange", "deleteTable"], i3 = [], s3 = o3.length;
1183
+ const n2 = P2 ? null : ["editNamedReference", "deleteNamedReference"], a2 = P2 ? null : ["editTable", null, "convertTableToRange", "deleteTable"], i3 = [], s3 = o3.length;
1183
1184
  for (let e4 = 0; e4 < s3; e4++) {
1184
1185
  const r3 = o3[e4], l3 = r3.getRanges();
1185
1186
  if (!l3 || r3.isHidden()) continue;
@@ -1198,42 +1199,42 @@ const rl = k(S((e2, t2) => {
1198
1199
  return ae(x(io, {}));
1199
1200
  } }));
1200
1201
  }
1201
- const m3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...g2, children: [R2 ? null : x(le, { ...t3, scope: "namedItem", command: c2?.commands.getCommand("addNamedReference"), icon: ae(x(so, {})) }), i3 && i3.length > 0 ? b(y, { children: [R2 ? null : x(ie, { orientation: "horizontal" }), x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 })] }) : null] });
1202
+ const m3 = b(E, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...g2, children: [P2 ? null : x(le, { ...t3, scope: "namedItem", command: c2?.commands.getCommand("addNamedReference"), icon: ae(x(so, {})) }), i3 && i3.length > 0 ? b(y, { children: [P2 ? null : x(ie, { orientation: "horizontal" }), x(E, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 })] }) : null] });
1202
1203
  return ce({ ...e3, children: m3 });
1203
- }, [l2, W2, r2, h2, R2]), J2 = Kn(t2, () => ({ focus(e3) {
1204
+ }, [l2, W2, r2, h2, P2]), J2 = Zn(t2, () => ({ focus(e3) {
1204
1205
  q2.current?.focus(e3);
1205
1206
  } }), []);
1206
- return x(A, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...m2 }, ref: Dr([J2, t2]), ...g2, children: x(Pe, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%", height: "27px" }, ...m2 }, buttonProps: { sx: { backgroundColor: (e3) => e3.palette.background.paper, backgroundImage: `linear-gradient(${ar("#fff", lr(5))}, ${ar("#fff", lr(5))})` } }, tabIndex: -1, outlined: { color: (e3) => o2 ? e3.palette.action.disabled : ar(e3.palette.divider, 0.2) }, parentFloat: T2, createPopupPanel: Z2, onPopupOpen: () => C2(true), onPopupClose: () => C2(false), createTooltip: ({ children: e3 }, t3) => x(Le, { title: t3 || S2 ? "" : "Name Box", disabled: t3, leaveDelay: 0, sx: { opacity: t3 || S2 ? 0 : 1 }, children: e3 }), createQuickButton: K2 }) });
1207
+ return x(E, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...m2 }, ref: Pr([J2, t2]), ...g2, children: x(Me, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%", height: "27px" }, ...m2 }, buttonProps: { sx: { backgroundColor: (e3) => e3.palette.background.paper, backgroundImage: `linear-gradient(${ir("#fff", sr(5))}, ${ir("#fff", sr(5))})` } }, tabIndex: -1, outlined: { color: (e3) => o2 ? e3.palette.action.disabled : ir(e3.palette.divider, 0.2) }, parentFloat: T2, createPopupPanel: Z2, onPopupOpen: () => C2(true), onPopupClose: () => C2(false), createTooltip: ({ children: e3 }, t3) => x(Le, { title: t3 || k2 ? "" : "Name Box", disabled: t3, leaveDelay: 0, sx: { opacity: t3 || k2 ? 0 : 1 }, children: e3 }), createQuickButton: K2 }) });
1207
1208
  }));
1208
- rl.displayName = "NamedCollectionEditor";
1209
- const al = (e2, t2) => x(rl, { ref: t2, ...e2 }), ll = k(S((e2, t2) => {
1210
- const { sx: o2, workbook: n2, sheetElement: r2, gridStyle: l2, showNamedCollectionEditor: i2 = true, NamedCollectionEditorProps: s2, renderNamedCollectionEditor: d2 = al, disabled: c2, commands: m2, ...p2 } = e2, [u2, g2] = D(n2?.getSelectedSheet());
1211
- mr(n2, { onSheetsChange: (e3) => {
1209
+ ll.displayName = "NamedCollectionEditor";
1210
+ const il = (e2, t2) => x(ll, { ref: t2, ...e2 }), sl = S(k((e2, t2) => {
1211
+ const { sx: o2, workbook: n2, sheetElement: r2, gridStyle: l2, showNamedCollectionEditor: i2 = true, NamedCollectionEditorProps: s2, renderNamedCollectionEditor: d2 = il, disabled: c2, commands: m2, ...p2 } = e2, [u2, g2] = D(n2?.getSelectedSheet());
1212
+ ur(n2, { onSheetsChange: (e3) => {
1212
1213
  g2(e3?.getSelectedSheet());
1213
1214
  }, onViewChange(e3) {
1214
1215
  g2(e3?.getSelectedSheet());
1215
1216
  } });
1216
- const [h2, f2] = D(u2.getSelection().getCoords().cell), w2 = u2.getRange(h2).getCell(), k2 = c2 || !w2.isEditAllowed(), S2 = P(null), v2 = C(() => ({ fontSize: 11 }), []);
1217
- mr(u2.getSelection(), { onChange: () => {
1217
+ const [h2, f2] = D(u2.getSelection().getCoords().cell), w2 = u2.getRange(h2).getCell(), S2 = c2 || !w2.isEditAllowed(), k2 = M(null), v2 = C(() => ({ fontSize: 11 }), []);
1218
+ ur(u2.getSelection(), { onChange: () => {
1218
1219
  f2(u2.getSelection().getCoords().cell);
1219
- } }), mr(u2, { onProtectionChange() {
1220
+ } }), ur(u2, { onProtectionChange() {
1220
1221
  f2(u2.getSelection().getCoords().cell);
1221
1222
  } });
1222
- const T2 = S2.current?.getLineHeight() ?? 20, [M2, R2] = D(T2), [B2, F2] = D(5), [N2, E2] = D(1), I2 = On((e3, { size: t3 }) => {
1223
+ const T2 = k2.current?.getLineHeight() ?? 20, [R2, P2] = D(T2), [B2, F2] = D(5), [N2, A2] = D(1), I2 = Gn((e3, { size: t3 }) => {
1223
1224
  e3.preventDefault(), e3.stopPropagation();
1224
1225
  const o3 = Math.floor(t3.height / T2);
1225
- R2(o3 * T2 + 1), o3 > 1 && F2(o3);
1226
- }, [T2]), L2 = On((e3, { size: t3 }) => {
1226
+ P2(o3 * T2 + 1), o3 > 1 && F2(o3);
1227
+ }, [T2]), L2 = Gn((e3, { size: t3 }) => {
1227
1228
  const o3 = Math.floor(t3.height / T2);
1228
- E2(o3);
1229
- }, [T2]), H2 = jn(), z2 = H2.getMode();
1229
+ A2(o3);
1230
+ }, [T2]), H2 = qn(), z2 = H2.getMode();
1230
1231
  let W2 = null;
1231
1232
  "edit" === z2?.key && (W2 = z2.args?.stateAndCoords);
1232
1233
  const $2 = C(() => {
1233
1234
  let e3 = W2?.editState;
1234
- return e3 || (e3 = pr(() => u2.getRange(h2).getCell())), x(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", gap: 4 }, children: x(ur, { ref: S2, activeCoords: h2, sheet: u2, onFocus: () => {
1235
+ return e3 || (e3 = gr(() => u2.getRange(h2).getCell())), x(E, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", gap: 4 }, children: x(hr, { ref: k2, activeCoords: h2, sheet: u2, onFocus: () => {
1235
1236
  r2?.startEdit({ autoFocus: false, editMode: true, cell: h2 });
1236
- }, defaultTextStyle: v2, useRichStyling: false, disabled: k2, onChangeEdit: (e4) => {
1237
+ }, defaultTextStyle: v2, useRichStyling: false, disabled: S2, onChangeEdit: (e4) => {
1237
1238
  if (void 0 !== e4.dirty) {
1238
1239
  const t3 = { sheet: u2, coords: h2, editState: e4 };
1239
1240
  H2.setMode((e5) => ({ ...e5, args: { ...e5?.args, stateAndCoords: t3 } }));
@@ -1243,98 +1244,98 @@ const al = (e2, t2) => x(rl, { ref: t2, ...e2 }), ll = k(S((e2, t2) => {
1243
1244
  }, onSubmitEdit: () => {
1244
1245
  r2?.submitEdit(), r2?.focus();
1245
1246
  }, linesVisible: N2 }) });
1246
- }, [u2, W2, h2, N2, r2]), O2 = P(null), V2 = C(() => i2 ? d2({ names: n2.getNames(), workbook: n2, ...s2 }, O2) : null, [d2, s2, i2, u2, n2, k2]), G2 = C(() => b(X, { elevation: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 0, backgroundImage: `linear-gradient(${ar("#fff", lr(5))}, ${ar("#fff", lr(5))})`, border: (e3) => `solid ${k2 ? e3.palette.action.disabled : ar(e3.palette.divider, 0.2)} 1px` }, children: [x(He, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, color: "warning", "aria-label": "cancel-formula-edit", icon: ae(x(co, {})), tooltipProps: { label: "Cancel", simple: true }, disabled: k2 || null === W2, onMouseDown: (e3) => {
1247
+ }, [u2, W2, h2, N2, r2]), O2 = M(null), V2 = C(() => i2 ? d2({ names: n2.getNames(), workbook: n2, ...s2 }, O2) : null, [d2, s2, i2, u2, n2, S2]), G2 = C(() => b(X, { elevation: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 0, backgroundImage: `linear-gradient(${ir("#fff", sr(5))}, ${ir("#fff", sr(5))})`, border: (e3) => `solid ${S2 ? e3.palette.action.disabled : ir(e3.palette.divider, 0.2)} 1px` }, children: [x(He, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, color: "warning", "aria-label": "cancel-formula-edit", icon: ae(x(co, {})), tooltipProps: { label: "Cancel", simple: true }, disabled: S2 || null === W2, onMouseDown: (e3) => {
1247
1248
  0 === e3.button && e3.preventDefault();
1248
1249
  }, onClick: () => {
1249
1250
  r2.cancelEdit();
1250
- } }), x(He, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, color: "primary", "aria-label": "commit-formula-edit", icon: ae(x(mo, {})), tooltipProps: { label: "Enter", simple: true }, disabled: k2 || null === W2, onMouseDown: (e3) => {
1251
+ } }), x(He, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, color: "primary", "aria-label": "commit-formula-edit", icon: ae(x(mo, {})), tooltipProps: { label: "Enter", simple: true }, disabled: S2 || null === W2, onMouseDown: (e3) => {
1251
1252
  0 === e3.button && e3.preventDefault();
1252
1253
  }, onClick: () => {
1253
1254
  r2.submitEdit();
1254
1255
  } }), x(He, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, disabled: true, "aria-label": "commit-formula-function", icon: ae(x(po, { sx: { transform: "scale(0.85)" } })), tooltipProps: { label: "Insert Function", simple: true }, onMouseDown: (e3) => {
1255
1256
  0 === e3.button && e3.preventDefault();
1256
- } })] }), [k2, W2]), U2 = rr(), [j2, _2] = D(false), q2 = C(() => b(A, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (e3) => e3.spacing(0.5), alignItems: "start" }, children: [G2, b(X, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (e3) => e3.typography.fontFamily, fontSize: 11 * a.getDeviceScale(), "& .editor-placement": { top: "2px !important" }, boxShadow: "none", borderRadius: (e3) => `${e3.shape.borderRadius}px`, backgroundImage: `linear-gradient(${ar("#fff", lr(5))}, ${ar("#fff", lr(5))})`, border: (e3) => `solid ${k2 ? e3.palette.action.disabled : ar(e3.palette.divider, 0.2)} 1px`, "& textarea": { color: (e3) => k2 ? `${e3.palette.text.disabled} !important` : e3.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: () => _2(true), onBlur: () => _2(false), onMouseDown: (e3) => {
1257
+ } })] }), [S2, W2]), U2 = lr(), [j2, _2] = D(false), q2 = C(() => b(E, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (e3) => e3.spacing(0.5), alignItems: "start" }, children: [G2, b(X, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (e3) => e3.typography.fontFamily, fontSize: 11 * a.getDeviceScale(), "& .editor-placement": { top: "2px !important" }, boxShadow: "none", borderRadius: (e3) => `${e3.shape.borderRadius}px`, backgroundImage: `linear-gradient(${ir("#fff", sr(5))}, ${ir("#fff", sr(5))})`, border: (e3) => `solid ${S2 ? e3.palette.action.disabled : ir(e3.palette.divider, 0.2)} 1px`, "& textarea": { color: (e3) => S2 ? `${e3.palette.text.disabled} !important` : e3.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: () => _2(true), onBlur: () => _2(false), onMouseDown: (e3) => {
1257
1258
  e3.target?.classList.contains("react-resizable-handle") && e3.preventDefault();
1258
- }, children: [x(A, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignSelf: "baseline", paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }, children: x(Tr, { height: M2, draggableOpts: { grid: [T2, T2] }, minConstraints: [T2, T2], maxConstraints: [15 * T2, 15 * T2], onResize: L2, onResizeStop: I2, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: $2 }) }), x(He, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, "aria-label": "toggle-expand-formula-edit", icon: ae(x(N2 > 1 ? Bn : Fn, {})), tooltipProps: { label: (N2 > 1 ? "Collapse" : "Expand") + " Formula Bar", simple: true }, onMouseDown: (e3) => {
1259
+ }, children: [x(E, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignSelf: "baseline", paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }, children: x(Rr, { height: R2, draggableOpts: { grid: [T2, T2] }, minConstraints: [T2, T2], maxConstraints: [15 * T2, 15 * T2], onResize: L2, onResizeStop: I2, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: $2 }) }), x(He, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, "aria-label": "toggle-expand-formula-edit", icon: ae(x(N2 > 1 ? Nn : An, {})), tooltipProps: { label: (N2 > 1 ? "Collapse" : "Expand") + " Formula Bar", simple: true }, onMouseDown: (e3) => {
1259
1260
  0 === e3.button && e3.preventDefault();
1260
1261
  }, onClick: () => {
1261
1262
  const e3 = N2 > 1 ? 1 : B2;
1262
- R2(e3 * T2 + 1), E2(e3);
1263
- } }), x(A, { sx: { position: "absolute", width: "100%", height: "2px", bottom: "0", willChange: "opacity", transition: "opacity 60ms ease-in", opacity: j2 ? 1 : 0, borderBottomWidth: "2px", borderBottomStyle: "solid", borderBottomColor: (e3) => e3.palette.primary.main, borderRadius: (e3) => `${e3.shape.borderRadius}px` } })] })] }), [G2, $2, j2, N2, T2]), K2 = C(() => V2 || q2 ? !V2 && q2 ? q2 : V2 && !q2 ? V2 : x(y, { children: x(Xn, { fixedPane: "before", minBefore: "165px", minAfter: "200px", paneBeforeProps: { style: { alignItems: "flex-start" } }, paneAfterProps: { style: { overflow: "visible" } }, resizerProps: { style: { backgroundImage: `url("data:image/svg+xml,%3Csvg width='6' height='13' viewBox='0 0 6 13' version='1.1' fill='${U2.palette.text.icon ?? U2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='m 4.5961932,11.36243 c 0,0.88365 -0.71627,1.59991 -1.59991,1.59991 -0.88365,0 -1.60005,-0.71626 -1.60005,-1.59991 0,-0.88365 0.7164,-1.6000508 1.60005,-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.88365,0 -1.60005,-0.7164 -1.60005,-1.60004 0,-0.88365 0.7164,-1.60005 1.60005,-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 -0.88365,0 -1.60005,-0.7164 -1.60005,-1.60005 0,-0.88365 0.7164,-1.59991 1.60005,-1.59991 0.88364,0 1.59991,0.71626 1.59991,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center 6.5px", minWidth: "18px" } }, elementBefore: V2, elementAfter: q2 }) }) : null, [V2, q2]), Z2 = Kn(t2, () => ({ isFormulaBarElement: () => true, getNamedCollectionEditorElement: () => O2.current }), []);
1264
- return x(A, { sx: { display: "flex", flexDirection: "row", gap: (e3) => e3.spacing(0.5), ...o2 }, ref: Z2, ...p2, children: K2 });
1263
+ P2(e3 * T2 + 1), A2(e3);
1264
+ } }), x(E, { sx: { position: "absolute", width: "100%", height: "2px", bottom: "0", willChange: "opacity", transition: "opacity 60ms ease-in", opacity: j2 ? 1 : 0, borderBottomWidth: "2px", borderBottomStyle: "solid", borderBottomColor: (e3) => e3.palette.primary.main, borderRadius: (e3) => `${e3.shape.borderRadius}px` } })] })] }), [G2, $2, j2, N2, T2]), K2 = C(() => V2 || q2 ? !V2 && q2 ? q2 : V2 && !q2 ? V2 : x(y, { children: x(Jn, { fixedPane: "before", minBefore: "165px", minAfter: "200px", paneBeforeProps: { style: { alignItems: "flex-start" } }, paneAfterProps: { style: { overflow: "visible" } }, resizerProps: { style: { backgroundImage: `url("data:image/svg+xml,%3Csvg width='6' height='13' viewBox='0 0 6 13' version='1.1' fill='${U2.palette.text.icon ?? U2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='m 4.5961932,11.36243 c 0,0.88365 -0.71627,1.59991 -1.59991,1.59991 -0.88365,0 -1.60005,-0.71626 -1.60005,-1.59991 0,-0.88365 0.7164,-1.6000508 1.60005,-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.88365,0 -1.60005,-0.7164 -1.60005,-1.60004 0,-0.88365 0.7164,-1.60005 1.60005,-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 -0.88365,0 -1.60005,-0.7164 -1.60005,-1.60005 0,-0.88365 0.7164,-1.59991 1.60005,-1.59991 0.88364,0 1.59991,0.71626 1.59991,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center 6.5px", minWidth: "18px" } }, elementBefore: V2, elementAfter: q2 }) }) : null, [V2, q2]), Z2 = Zn(t2, () => ({ isFormulaBarElement: () => true, getNamedCollectionEditorElement: () => O2.current }), []);
1265
+ return x(E, { sx: { display: "flex", flexDirection: "row", gap: (e3) => e3.spacing(0.5), ...o2 }, ref: Z2, ...p2, children: K2 });
1265
1266
  }));
1266
- ll.displayName = "FormulaBar";
1267
- const il = k(S((e2, t2) => {
1267
+ sl.displayName = "FormulaBar";
1268
+ const dl = S(k((e2, t2) => {
1268
1269
  const { filter: o2, commands: n2, disabled: r2, sx: a2, floatReference: l2, ...i2 } = e2, s2 = C(() => ({}), []), d2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
1269
1270
  }, onError() {
1270
1271
  console.log("onError");
1271
- } }, disabled: r2, parentFloat: l2 }), [r2, l2]), c2 = C(() => ({ ...s2, ...d2, variant: $n.Menuitem }), [s2, d2]), m2 = b(y, { children: [x(le, { ...c2, command: n2.getCommand("sortAscending"), icon: ae(x(ft, {})) }), x(le, { ...c2, command: n2.getCommand("sortDescending"), icon: ae(x(xt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...c2, command: n2.getCommand("autoFilterClear"), icon: ae(x(wt, {})) }), []] });
1272
- return x(A, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...a2 }, ...i2, children: m2 });
1272
+ } }, disabled: r2, parentFloat: l2 }), [r2, l2]), c2 = C(() => ({ ...s2, ...d2, variant: Vn.Menuitem }), [s2, d2]), m2 = b(y, { children: [x(le, { ...c2, command: n2.getCommand("sortAscending"), icon: ae(x(ft, {})) }), x(le, { ...c2, command: n2.getCommand("sortDescending"), icon: ae(x(xt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...c2, command: n2.getCommand("autoFilterClear"), icon: ae(x(wt, {})) }), []] });
1273
+ return x(E, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...a2 }, ...i2, children: m2 });
1273
1274
  }));
1274
- il.displayName = "FilterColumnMenu";
1275
- const sl = k(S((e2, t2) => {
1276
- const { children: o2, className: n2, disabled: r2, style: a2, filter: l2, ...i2 } = e2, s2 = Kn(t2, () => ({ isFilters: () => true }), []);
1277
- return x("div", { ref: s2, className: yn("filters", n2), style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", gap: "8px", ...a2 }, ...i2, children: b("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: [x("div", { children: l2.getName() }), x("div", { children: "Filter Widget" })] }) });
1275
+ dl.displayName = "FilterColumnMenu";
1276
+ const cl = S(k((e2, t2) => {
1277
+ const { children: o2, className: n2, disabled: r2, style: a2, filter: l2, ...i2 } = e2, s2 = Zn(t2, () => ({ isFilters: () => true }), []);
1278
+ return x("div", { ref: s2, className: Sn("filters", n2), style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", gap: "8px", ...a2 }, ...i2, children: b("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: [x("div", { children: l2.getName() }), x("div", { children: "Filter Widget" })] }) });
1278
1279
  }));
1279
- sl.displayName = "Filters";
1280
- const dl = k(S((e2, t2) => {
1281
- const { children: o2, sheet: n2, style: r2, className: a2, value: l2, index: i2, editing: s2, editable: d2, disabled: c2, selectedIndex: m2, dragging: p2, borderColor: u2, borderWidth: g2, activeColor: h2, background: f2 = "white", tabRadius: w2 = 4, gridTheme: k2, ...S2 } = e2, [C2, v2] = D(() => !!n2 && n2.getProtection().isLocked()), [T2, M2] = D(() => n2 ? n2.getTabColor() : null);
1282
- mr(n2, { onProtectionChange: () => {
1280
+ cl.displayName = "Filters";
1281
+ const ml = S(k((e2, t2) => {
1282
+ const { children: o2, sheet: n2, style: r2, className: a2, value: l2, index: i2, editing: s2, editable: d2, disabled: c2, selectedIndex: m2, dragging: p2, borderColor: u2, borderWidth: g2, activeColor: h2, background: f2 = "white", tabRadius: w2 = 4, gridTheme: S2, ...k2 } = e2, [C2, v2] = D(() => !!n2 && n2.getProtection().isLocked()), [T2, R2] = D(() => n2 ? n2.getTabColor() : null);
1283
+ ur(n2, { onProtectionChange: () => {
1283
1284
  v2(n2.getProtection().isLocked());
1284
1285
  }, onTabColorChange: () => {
1285
- M2(n2.getTabColor());
1286
+ R2(n2.getTabColor());
1286
1287
  }, onStyleChange: () => {
1287
- M2(n2.getTabColor());
1288
+ R2(n2.getTabColor());
1288
1289
  } });
1289
- const R2 = rr(), P2 = m2 === i2;
1290
+ const P2 = lr(), M2 = m2 === i2;
1290
1291
  let B2 = null, F2 = null;
1291
1292
  if (T2 || p2) {
1292
1293
  let e3 = f2;
1293
- T2 ? (F2 = T2.toBlackOrWhite().toCSS(), e3 = T2?.toCSS()) : P2 || (e3 = R2.palette.background.paper), B2 = x(A, { sx: { position: "absolute", boxSizing: "border-box", top: "3px", left: "4px", right: "4.5px", bottom: "1.5px", opacity: P2 ? "50%" : "100%", borderRadius: "4px", border: (e4) => P2 ? `${f2} solid 1px` : `${e4.palette.divider} solid 1px`, background: P2 && T2 ? `linear-gradient(0deg, ${e3} 0%, transparent)` : e3 } });
1294
+ T2 ? (F2 = T2.toBlackOrWhite().toCSS(), e3 = T2?.toCSS()) : M2 || (e3 = P2.palette.background.paper), B2 = x(E, { sx: { position: "absolute", boxSizing: "border-box", top: "3px", left: "4px", right: "4.5px", bottom: "1.5px", opacity: M2 ? "50%" : "100%", borderRadius: "4px", border: (e4) => M2 ? `${f2} solid 1px` : `${e4.palette.divider} solid 1px`, background: M2 && T2 ? `linear-gradient(0deg, ${e3} 0%, transparent)` : e3 } });
1294
1295
  }
1295
1296
  let N2 = null;
1296
1297
  "string" == typeof u2 ? N2 = u2 : u2?.toCSS && (N2 = u2.toCSS());
1297
- const E2 = P2 ? x(A, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (e3) => e3.palette.primary.main } }) : null;
1298
- return x(ir, { theme: P2 ? k2 ?? R2 : R2, children: x(A, { ref: t2, className: yn(a2), sx: { ...r2, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: P2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: p2 ? "grabbing" : void 0 }, ...S2, children: x(Zn, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: w2, strokeColor: P2 ? N2 : "transparent", children: x(W, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: P2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: p2 ? "grabbing" : void 0, color: P2 ? "primary" : F2 || "text.secondary", backgroundColor: P2 ? f2 : "transparent", "&:hover:not([disabled])": { backgroundColor: P2 ? f2 : "transparent" }, "& input": { color: (e3) => `${e3.palette.text.primary}`, textAlign: "center", fontWeight: "500" }, marginTop: "0px", minWidth: "unset" }, disabled: c2, disableRipple: s2, component: "div", children: b(y, { children: [B2, b(A, { sx: { zIndex: "1", display: "flex", flexDirection: "row", alignItems: "center" }, children: [b(A, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "1px", lineHeight: "1", marginTop: P2 ? void 0 : "1px" }, children: [o2, E2] }), C2 ? x(Nn, { sx: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : x(A, { sx: { minHeight: "22px" } })] })] }) }, l2 + ":" + i2) }) }) });
1298
+ const A2 = M2 ? x(E, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (e3) => e3.palette.primary.main } }) : null;
1299
+ return x(dr, { theme: M2 ? S2 ?? P2 : P2, children: x(E, { ref: t2, className: Sn(a2), sx: { ...r2, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: M2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: p2 ? "grabbing" : void 0 }, ...k2, children: x(Yn, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: w2, strokeColor: M2 ? N2 : "transparent", children: x(W, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: M2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: p2 ? "grabbing" : void 0, color: M2 ? "primary" : F2 || "text.secondary", backgroundColor: M2 ? f2 : "transparent", "&:hover:not([disabled])": { backgroundColor: M2 ? f2 : "transparent" }, "& input": { color: (e3) => `${e3.palette.text.primary}`, textAlign: "center", fontWeight: "500" }, marginTop: "0px", minWidth: "unset" }, disabled: c2, disableRipple: s2, component: "div", children: b(y, { children: [B2, b(E, { sx: { zIndex: "1", display: "flex", flexDirection: "row", alignItems: "center" }, children: [b(E, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "1px", lineHeight: "1", marginTop: M2 ? void 0 : "1px" }, children: [o2, A2] }), C2 ? x(En, { sx: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : x(E, { sx: { minHeight: "22px" } })] })] }) }, l2 + ":" + i2) }) }) });
1299
1300
  }));
1300
- dl.displayName = "SheetTab";
1301
- const cl = k(S((e2, t2) => {
1301
+ ml.displayName = "SheetTab";
1302
+ const pl = S(k((e2, t2) => {
1302
1303
  const { workbook: o2, index: n2, commands: r2, scope: a2 = "sheet", disabled: l2, floatReference: i2, sx: s2, className: d2, tabStripRef: c2, ...m2 } = e2, [p2, u2] = D(o2?.getProtection());
1303
- mr(o2, { onProtectionChange: (e3) => {
1304
+ ur(o2, { onProtectionChange: (e3) => {
1304
1305
  u2(e3?.getProtection());
1305
1306
  } });
1306
1307
  const g2 = C(() => ({}), []), h2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => i2.closeAll(), onExecute() {
1307
1308
  }, onError() {
1308
1309
  console.log("onError");
1309
- } }, scope: a2, commandState: n2, disabled: l2 || void 0 === n2, parentFloat: i2 }), [l2, i2]), f2 = C(() => ({ ...g2, ...h2 }), [g2, h2]), w2 = b(y, { children: [x(le, { command: r2.getCommand("addSheet"), commandState: n2, ...f2, variant: $n.Menuitem }), x(le, { command: r2.getCommand("deleteSheet"), ...f2, variant: $n.Menuitem }), b(Ne, { onMouseDown: (e3) => {
1310
+ } }, scope: a2, commandState: n2, disabled: l2 || void 0 === n2, parentFloat: i2 }), [l2, i2]), f2 = C(() => ({ ...g2, ...h2 }), [g2, h2]), w2 = b(y, { children: [x(le, { command: r2.getCommand("addSheet"), commandState: n2, ...f2, variant: Vn.Menuitem }), x(le, { command: r2.getCommand("deleteSheet"), ...f2, variant: Vn.Menuitem }), b(Ne, { onMouseDown: (e3) => {
1310
1311
  0 === e3.button && e3.preventDefault();
1311
1312
  }, onMouseUp: () => {
1312
1313
  Promise.resolve(i2.closeAll()).then(() => {
1313
1314
  c2?.startEdit(n2);
1314
1315
  });
1315
- }, disabled: l2 || !p2.isStructureAllowed(), parentFloat: i2, children: ["Rename", "sheet" !== a2 ? " Sheet" : ""] }), x(le, { command: r2.getCommand("duplicateSheet"), ...f2, variant: $n.Menuitem }), x(le, { command: r2?.getCommand("protectionSheetToggle"), ...f2, variant: $n.Menuitem, icon: x(Nn, {}) }), x(ya, { variant: $n.Menuitem, command: r2.getCommand("formatSheetTabColor"), icon: x(Ie, {}), panelProps: { disableAlpha: true, autoColorLabel: "No Tab Color", autoColorPosition: Ur.End }, parentFloat: i2 }), x(ie, { orientation: "horizontal" }), x(le, { command: r2.getCommand("hideSheet"), ...f2, variant: $n.Menuitem, icon: ae(x(uo, {})) })] });
1316
- return x(A, { ref: t2, className: yn("menu", d2), sx: { ...s2 }, ...m2, children: w2 });
1316
+ }, disabled: l2 || !p2.isStructureAllowed(), parentFloat: i2, children: ["Rename", "sheet" !== a2 ? " Sheet" : ""] }), x(le, { command: r2.getCommand("duplicateSheet"), ...f2, variant: Vn.Menuitem }), x(le, { command: r2?.getCommand("protectionSheetToggle"), ...f2, variant: Vn.Menuitem, icon: x(En, {}) }), x(Sa, { variant: Vn.Menuitem, command: r2.getCommand("formatSheetTabColor"), icon: x(Ie, {}), panelProps: { disableAlpha: true, autoColorLabel: "No Tab Color", autoColorPosition: _r.End }, parentFloat: i2 }), x(ie, { orientation: "horizontal" }), x(le, { command: r2.getCommand("hideSheet"), ...f2, variant: Vn.Menuitem, icon: ae(x(uo, {})) })] });
1317
+ return x(E, { ref: t2, className: Sn("menu", d2), sx: { ...s2 }, ...m2, children: w2 });
1317
1318
  }));
1318
- cl.displayName = "SheetTabMenu";
1319
- const ml = k(S((e2, t2) => {
1320
- const { workbook: o2, gridStyle: n2, floatReference: r2, closeFloatAll: a2, className: l2, ...i2 } = e2, [s2, d2] = D(o2?.getSheets().search()), [c2, m2] = D(o2?.getProtection());
1321
- mr(o2, { onSheetsChange: (e3) => {
1322
- d2(e3.getSheets().search());
1319
+ pl.displayName = "SheetTabMenu";
1320
+ const ul = S(k((e2, t2) => {
1321
+ const { workbook: o2, gridStyle: n2, floatReference: r2, closeFloatAll: a2, className: l2, ...i2 } = e2, [s2, d2] = D(o2?.getSheets().getItems()), [c2, m2] = D(o2?.getProtection());
1322
+ ur(o2, { onSheetsChange: (e3) => {
1323
+ d2(e3.getSheets().getItems());
1323
1324
  }, onProtectionChange: (e3) => {
1324
1325
  m2(e3?.getProtection());
1325
1326
  } });
1326
1327
  const p2 = C(() => {
1327
- const e3 = [], t3 = o2.getSheets().search({ visibility: u.Visibility.Hidden }), a3 = o2.getSelectedSheet();
1328
+ const e3 = [], t3 = o2.getSheets().getItems({ visibility: u.Visibility.Hidden }), a3 = o2.getSelectedSheet();
1328
1329
  for (let o3 = 0; o3 < t3.length; o3++) {
1329
1330
  const l3 = t3[o3], i3 = l3.getVisibility();
1330
1331
  if (i3 === u.Visibility.VeryHidden) continue;
1331
1332
  const s3 = a3 === l3, d3 = l3.getProtection().isLocked(), m3 = l3.getTabColor(), p3 = n2?.body.fill ?? "transparent";
1332
1333
  let g2 = null, h2 = null, f2 = p3;
1333
- m3 && (f2 = m3.toCSS(), s3 || (h2 = m3.toBlackOrWhite().toCSS()), g2 = x(A, { sx: { position: "absolute", display: "flex", flexDirection: "column", top: "4px", left: "40px", right: "8px", bottom: "4px", background: s3 ? f2 : "transparent", borderRadius: "4px", border: `solid 1px ${n2.header.edgeStrokeFill}` }, children: x(A, { sx: { flex: "1 1 100%", boxSizing: "content-box", opacity: s3 || i3 === u.Visibility.Hidden ? "50%" : "100%", border: (e4) => s3 ? `${p3} solid 1.5px` : `${e4.palette.divider} solid 1px`, background: s3 && m3 ? `linear-gradient(0deg, ${f2} 0%, ${p3})` : f2, borderRadius: "4px" } }) }));
1334
+ m3 && (f2 = m3.toCSS(), s3 || (h2 = m3.toBlackOrWhite().toCSS()), g2 = x(E, { sx: { position: "absolute", display: "flex", flexDirection: "column", top: "4px", left: "40px", right: "8px", bottom: "4px", background: s3 ? f2 : "transparent", borderRadius: "4px", border: `solid 1px ${n2.header.edgeStrokeFill}` }, children: x(E, { sx: { flex: "1 1 100%", boxSizing: "content-box", opacity: s3 || i3 === u.Visibility.Hidden ? "50%" : "100%", border: (e4) => s3 ? `${p3} solid 1.5px` : `${e4.palette.divider} solid 1px`, background: s3 && m3 ? `linear-gradient(0deg, ${f2} 0%, ${p3})` : f2, borderRadius: "4px" } }) }));
1334
1335
  let w2 = null;
1335
- d3 && (w2 = x(Nn, { color: "secondary" })), i3 !== u.Visibility.Visible && (w2 = ae(x(uo, { style: { opacity: c2.isStructureAllowed() ? 1 : 0.7 }, color: "secondary" }))), w2 && (w2 = x(A, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", ml: "16px", "& *": { lineHeight: "1em", fontSize: "1.3em" } }, children: w2 })), e3.push(x(Ne, { disabled: !c2.isStructureAllowed() && i3 === u.Visibility.Hidden, sx: { color: (e4) => {
1336
+ d3 && (w2 = x(En, { color: "secondary" })), i3 !== u.Visibility.Visible && (w2 = ae(x(uo, { style: { opacity: c2.isStructureAllowed() ? 1 : 0.7 }, color: "secondary" }))), w2 && (w2 = x(E, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", ml: "16px", "& *": { lineHeight: "1em", fontSize: "1.3em" } }, children: w2 })), e3.push(x(Ne, { disabled: !c2.isStructureAllowed() && i3 === u.Visibility.Hidden, sx: { color: (e4) => {
1336
1337
  let t4 = s3 ? e4.palette.primary.main : e4.palette.text.secondary;
1337
- return h2 && (t4 = h2), i3 === u.Visibility.Hidden && (t4 = Cr(t4, e4.palette.action.disabledOpacity)), t4;
1338
+ return h2 && (t4 = h2), i3 === u.Visibility.Hidden && (t4 = Tr(t4, e4.palette.action.disabledOpacity)), t4;
1338
1339
  }, borderLeft: (e4) => `${s3 ? e4.palette.primary.main : "transparent"} solid 2px`, paddingLeft: "4px", fontWeight: s3 ? "700" : "400", "&:hover": { fontWeight: "700" } }, icon: s3 ? x(Ye, {}) : void 0, onMouseDown: (e4) => e4.preventDefault(), onMouseUp: () => {
1339
1340
  Promise.resolve(r2.closeAll()).then(() => {
1340
1341
  try {
@@ -1343,31 +1344,31 @@ const ml = k(S((e2, t2) => {
1343
1344
  console.error(e4);
1344
1345
  }
1345
1346
  });
1346
- }, children: b(y, { children: [g2, b(A, { sx: { paddingRight: "0px", paddingLeft: "4px", display: "flex", flexDirection: "row", flex: "1 1 100%", overflow: "hidden", alignItems: "center", zIndex: 2 }, children: [b(A, { className: "sheet-name", sx: { display: "flex", flexDirection: "column", paddingLeft: "8px", paddingRight: "8px", alignItems: "center" }, children: [l3.getName(), x(A, { sx: { height: "0px", opacity: "0", fontWeight: "700" }, children: l3.getName() })] }), w2] })] }) }, "" + o3));
1347
+ }, children: b(y, { children: [g2, b(E, { sx: { paddingRight: "0px", paddingLeft: "4px", display: "flex", flexDirection: "row", flex: "1 1 100%", overflow: "hidden", alignItems: "center", zIndex: 2 }, children: [b(E, { className: "sheet-name", sx: { display: "flex", flexDirection: "column", paddingLeft: "8px", paddingRight: "8px", alignItems: "center" }, children: [l3.getName(), x(E, { sx: { height: "0px", opacity: "0", fontWeight: "700" }, children: l3.getName() })] }), w2] })] }) }, "" + o3));
1347
1348
  }
1348
1349
  return e3;
1349
1350
  }, [o2, c2, s2, r2, n2]);
1350
- return x(A, { ref: t2, className: yn("menu", l2), ...i2, children: p2 });
1351
+ return x(E, { ref: t2, className: Sn("menu", l2), ...i2, children: p2 });
1351
1352
  }));
1352
- ml.displayName = "SheetsAllMenu";
1353
- let pl = false, ul = false;
1354
- let gl = null;
1355
- const hl = async (e2) => {
1353
+ ul.displayName = "SheetsAllMenu";
1354
+ let gl = false, hl = false;
1355
+ let fl = null;
1356
+ const xl = async (e2) => {
1356
1357
  const t2 = await g.getDetails();
1357
- if (ul || t2.isEval()) {
1358
+ if (hl || t2.isEval()) {
1358
1359
  try {
1359
1360
  const e3 = top ?? window;
1360
- e3.SheetXL || (e3.SheetXL = Object.freeze({ getSelectedWorkbook: () => gl?.getWorkbook(), getSelectedSheet: () => gl?.getWorkbook().getSelectedSheet(), getSelectedRange: () => gl?.getWorkbook().getSelectedRange(), getRange: (e4) => gl?.getWorkbook().getRange(e4), getSelectedWorkbookElement: () => gl, getLicenseManager: () => g, moreExamples: () => {
1361
+ e3.SheetXL || (e3.SheetXL = Object.freeze({ getSelectedWorkbook: () => fl?.getWorkbook(), getSelectedSheet: () => fl?.getWorkbook().getSelectedSheet(), getSelectedRange: () => fl?.getWorkbook().getSelectedRange(), getRange: (e4) => fl?.getWorkbook().getRange(e4), getSelectedWorkbookElement: () => fl, getLicenseManager: () => g, moreExamples: () => {
1361
1362
  const e4 = { "SheetXL.getRange('Sheet1!e5:f6').setValues([[110, 220], [210, 220]])": { Summary: "Set an array of values." }, "SheetXL.getRange('a1:e5').setValue(100)": { Summary: "Set a single repeating value to a range." }, "SheetXL.getRange('Sheet1!e5:f6').getValues()": { Summary: "Get the values as a 2d array (see forEach)." }, "SheetXL.getSelectedRange().setValue(new Date())": { Summary: "Set current date/time using Javascript Date." }, "SheetXL.getSelectedRange().setValue('10/23/95')": { Summary: "Set current date/time using string." }, "SheetXL.getSelectedSheet().getUsedRange().getValues()": { Summary: "Get all of the values in a sheet." }, "SheetXL.getSelectedRange().updateStyle({ fill: 'accent4' })": { Summary: "Set fill to theme color 4." }, "SheetXL.getRange('E:L').updateStyle({ fill: 'accent1 lumMod 90 lumOff 40' })": { Summary: "Set some columns to a modified theme color." }, "SheetXL.getRange('e5:f10').updateStyle({ style: { border: 'double blue' }})": { Summary: "Set border." }, "SheetXL.getCell().getStyle().fill.toCSS()": { Summary: "Get the fill style as css for the selected cell." }, "SheetXL.getRange('a1:a3').autoFill('a1:a7')": { Summary: "Autofill down." }, "SheetXL.getRange('e7:i9').merge({ orientation: 'rows' })": { Summary: "Merge cells horizontally." }, "SheetXL.getSelectedRange().sort({ ascending: false, hasHeader: false })": { Summary: "Sort selected cells ascending with a header." }, "SheetXL.getSelectedRange().clear('all')": { Summary: "Clear the current range a different way." }, "SheetXL.getSelectedSheet().getTables().add('b2:e9')": { Summary: "Create a 4x8 table at b2 for current sheet." }, "SheetXL.getRange('a1:c3').copyFrom('e1:g3')": { Summary: "Copy cells." }, "SheetXL.getRange('c:t').getColumnHeaders().setSize(30)": { Summary: "Set the size of columns to 30 pixels." }, "SheetXL.getRange('2:3').delete()": { Summary: "Remove rows 2 and 3 and shift up." }, "SheetXL.getSelectedSheet().getMovables().addImage('https://www.sheetxl.com/logo-text.svg')": { Summary: "Add an image." }, "SheetXL.getSelectedSheet().getMovables().addImage('https://www.sheetxl.com/logo-text.svg', { bounds: { height: 100 } })": { Summary: "Add an image of height 100." }, "SheetXL.getSelectedRange().doBatch(() => { SheetXL.getSelectedRange().setValue(1.50).updateStyle({ numberFormat: '0%' }).autoFit(); }, 'Enter 150%')": { Summary: "Set value to 100 and numberformat to 0% as a single." }, "SheetXL.getSelectedRange().doBatch(() => { SheetXL.getSelectedRange().setValue('Remind Me Later').updateStyle({ namedStyle: 'Note'}).autoFit(); }, 'Set Reminder')": { Summary: "Set a value and style to Note style and autofit text." }, "SheetXL.getSelectedWorkbook().getNames().addReference('Small_Range', 'A2:E5');": { Summary: "Add a named range." }, "SheetXL.getSelectedWorkbook().getRange('a1:e5').addListener((e) => { console.log('got an update for:', e.getSource().toString()) })": { Summary: "Listen for updates at a range." } };
1362
1363
  console.table(e4);
1363
1364
  } }));
1364
1365
  } catch (e3) {
1365
- e3 instanceof DOMException || console.error(e3), pl = true;
1366
+ e3 instanceof DOMException || console.error(e3), gl = true;
1366
1367
  }
1367
- if (gl !== e2 && (gl = e2, !pl)) try {
1368
- pl = true;
1368
+ if (fl !== e2 && (fl = e2, !gl)) try {
1369
+ gl = true;
1369
1370
  (top ?? window).SheetXL && (await g._validate(true), g.wasPrinted() && (() => {
1370
- Mr.consoleWithNoSource("%cTip: You can access the API directly in the console.\nTry\n%c>%c SheetXL.getRange('b2:c3').setValues([[42, 'Hello Word'], [new Date(), true]]) %c\n>%c SheetXL.moreExamples()", "color:#ffa726;", "font-family:monospace;color:#1976d2;font-size:12px;", "font-family:monospace;", "font-family:monospace;color:#1976d2;font-size:12px;", "font-family:monospace;"), pl = true;
1371
+ Mr.consoleWithNoSource("%cTip: You can access the API directly in the console.\nTry\n%c>%c SheetXL.getRange('b2:c3').setValues([[42, 'Hello Word'], [new Date(), true]]) %c\n>%c SheetXL.moreExamples()", "color:#ffa726;", "font-family:monospace;color:#1976d2;font-size:12px;", "font-family:monospace;", "font-family:monospace;color:#1976d2;font-size:12px;", "font-family:monospace;"), gl = true;
1371
1372
  const e3 = document.getElementById("openEditorLink");
1372
1373
  e3 && e3.addEventListener("click", (e4) => {
1373
1374
  e4.preventDefault(), console.log("openScriptEditor called from console");
@@ -1377,70 +1378,35 @@ const hl = async (e2) => {
1377
1378
  e3 instanceof DOMException || console.error(e3);
1378
1379
  }
1379
1380
  }
1380
- }, fl = (e2) => {
1381
- ul = e2;
1382
- }, xl = { Light: "light", Dark: "dark" }, bl = 0.12, yl = (e2, t2) => {
1381
+ }, bl = (e2) => {
1382
+ hl = e2;
1383
+ }, yl = 0.12, wl = (e2, t2) => {
1383
1384
  const o2 = {}, n2 = (e3) => {
1384
1385
  const t3 = e3.palette?.background.default ?? "rgba(255,255,255,1)";
1385
- return { text: { fontFamily: e3.typography?.fontFamily ?? "Calibri", fontSize: e3.typography?.fontSize ?? 8.25, fontWeight: e3.typography?.fontWeightRegular ?? "400", fill: "dark" === e3.palette.mode ? e3.palette?.text?.secondary : e3.palette?.text?.primary }, fill: t3, strokeFill: go(t3, bl, e3.palette?.mode), darkMode: "dark" === e3.palette.mode };
1386
+ return { text: { fontFamily: e3.typography?.fontFamily ?? "Calibri", fontSize: e3.typography?.fontSize ?? 8.25, fontWeight: e3.typography?.fontWeightRegular ?? "400", fill: "dark" === e3.palette.mode ? e3.palette?.text?.secondary : e3.palette?.text?.primary }, fill: t3, strokeFill: go(t3, yl, e3.palette?.mode), darkMode: "dark" === e3.palette.mode };
1386
1387
  }, r2 = n2(t2);
1387
- o2.body = n2(e2), o2.header = { ...o2.body, strokeFill: go(o2.body.fill, bl, e2.palette?.mode), fill: t2 && "dark" === e2.palette.mode && t2.palette.mode !== e2.palette.mode ? o2.body.fill : go(o2.body.fill, 0.055, e2.palette?.mode), edgeStrokeFill: "dark" === e2.palette.mode ? o2.body.strokeFill : go(o2.body.fill, 0.328, e2.palette?.mode) }, o2.headerHover = (t3) => ({ ...o2.header, strokeFill: go(t3?.fill ?? o2.body.fill, 0.22, e2.palette?.mode), fill: go(t3?.fill ?? o2.header.fill, 0.065, e2.palette?.mode), text: { ...t3?.text, fontWeight: e2.typography?.fontWeightBold } });
1388
+ o2.body = n2(e2), o2.header = { ...o2.body, strokeFill: go(o2.body.fill, yl, e2.palette?.mode), fill: t2 && "dark" === e2.palette.mode && t2.palette.mode !== e2.palette.mode ? o2.body.fill : go(o2.body.fill, 0.055, e2.palette?.mode), edgeStrokeFill: "dark" === e2.palette.mode ? o2.body.strokeFill : go(o2.body.fill, 0.328, e2.palette?.mode) }, o2.headerHover = (t3) => ({ ...o2.header, strokeFill: go(t3?.fill ?? o2.body.fill, 0.22, e2.palette?.mode), fill: go(t3?.fill ?? o2.header.fill, 0.065, e2.palette?.mode), text: { ...t3?.text, fontWeight: e2.typography?.fontWeightBold } });
1388
1389
  const a2 = go("dark" !== e2.palette.mode ? e2.palette.primary.light : e2.palette.primary.main, 0.055, e2.palette?.mode);
1389
- o2.headerSelect = { ...o2.header, strokeFill: e2.palette.primary.main, fill: Cr(a2, 0.2), text: { ...o2.header.text, fill: e2.palette.primary.main }, dividerStrokeFill: Cr(a2, 0.7) }, o2.headerSelectAll = { ...o2.headerSelect, fill: Cr(a2, 0.9), text: { ...o2.headerSelect.text, fill: e2.palette.primary.contrastText }, edgeStrokeFill: o2.headerSelect.strokeFill }, o2.buttonSurface = { ...r2, strokeFill: go(r2.fill, bl, t2.palette?.mode), fill: t2 && "dark" === t2.palette.mode && t2.palette.mode !== e2.palette.mode ? r2.fill : go(r2.fill, 0.055, t2.palette?.mode), edgeStrokeFill: "dark" === t2.palette.mode ? r2.strokeFill : go(r2.fill, 0.328, t2.palette?.mode) }, o2.headerSelection = { fill: e2.palette?.primary?.main ? Cr(e2.palette?.primary?.main, 0.1) : void 0, strokeFill: e2.palette?.primary?.main }, o2.headerSelectionInactive = { ...o2.headerSelection, fill: e2.palette?.divider ? Cr(e2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" };
1390
+ o2.headerSelect = { ...o2.header, strokeFill: e2.palette.primary.main, fill: Tr(a2, 0.2), text: { ...o2.header.text, fill: e2.palette.primary.main }, dividerStrokeFill: Tr(a2, 0.7) }, o2.headerSelectAll = { ...o2.headerSelect, fill: Tr(a2, 0.9), text: { ...o2.headerSelect.text, fill: e2.palette.primary.contrastText }, edgeStrokeFill: o2.headerSelect.strokeFill }, o2.buttonSurface = { ...r2, strokeFill: go(r2.fill, yl, t2.palette?.mode), fill: t2 && "dark" === t2.palette.mode && t2.palette.mode !== e2.palette.mode ? r2.fill : go(r2.fill, 0.055, t2.palette?.mode), edgeStrokeFill: "dark" === t2.palette.mode ? r2.strokeFill : go(r2.fill, 0.328, t2.palette?.mode) }, o2.headerSelection = { fill: e2.palette?.primary?.main ? Tr(e2.palette?.primary?.main, 0.1) : void 0, strokeFill: e2.palette?.primary?.main }, o2.headerSelectionInactive = { ...o2.headerSelection, fill: e2.palette?.divider ? Tr(e2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" };
1390
1391
  const l2 = t2 ?? e2, i2 = "dark" === l2.palette.mode;
1391
- return o2.selection = { fill: l2.palette?.primary?.main ? Cr(l2.palette?.primary?.main, 0.1) : void 0, strokeFill: l2.palette?.primary?.main }, o2.selectionInactive = { ...o2.selection, fill: l2.palette?.divider ? Cr(l2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" }, o2.selectionRemove = { ...o2.selection, fill: Cr(l2.palette.warning.light, 0.05), strokeFill: l2.palette.warning.dark }, t2 && (o2.body = n2(t2)), o2.colorShadow = Cr(l2.palette.action.active, 0.5), o2.colorGrey = l2.palette.action.active, o2.filterDarkInvert = i2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", o2;
1392
- };
1393
- function wl(e2) {
1394
- const { mode: t2 } = e2 || {}, [o2, n2] = D(() => {
1395
- if ("light" === t2 || "dark" === t2) return { themeMode: t2, source: "prop" };
1396
- if ("undefined" != typeof document) {
1397
- const e3 = kl();
1398
- if (e3) return { themeMode: e3, source: "class" };
1399
- }
1400
- return { themeMode: Sl(), source: "media" };
1401
- });
1402
- return M(() => {
1403
- const e3 = () => {
1404
- if (t2) return void (t2 === o2.themeMode && "prop" === o2.source || n2((e5) => ({ ...e5, themeMode: t2, source: "prop" })));
1405
- const e4 = kl();
1406
- if (e4) n2({ themeMode: e4, source: "class" });
1407
- else {
1408
- const e5 = Sl();
1409
- n2({ themeMode: e5, source: "media" });
1410
- }
1411
- }, r2 = new MutationObserver(e3), a2 = [document.documentElement, document.body].filter(Boolean);
1412
- for (const e4 of a2) r2.observe(e4, { attributes: true, attributeFilter: ["class"] });
1413
- const l2 = window.matchMedia("(prefers-color-scheme: dark)");
1414
- return l2.addEventListener("change", e3), e3(), () => {
1415
- r2.disconnect(), l2.removeEventListener("change", e3);
1416
- };
1417
- }, [t2]), o2;
1418
- }
1419
- function kl() {
1420
- if ("undefined" == typeof document) return null;
1421
- const e2 = [...Array.from(document.body.classList), ...document.documentElement ? Array.from(document.documentElement.classList) : []];
1422
- return e2.includes("dark") ? "dark" : e2.includes("light") ? "light" : null;
1423
- }
1424
- function Sl() {
1425
- return "undefined" == typeof window ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
1426
- }
1427
- const Cl = k(S((e2, t2) => {
1428
- const { children: o2, sx: n2, parentFloat: r2, ...a2 } = e2, l2 = Kn(t2, () => ({}), []), [i2, s2] = Fr(), d2 = P(null), c2 = P(null), [m2, p2] = w.useReducer((e3) => e3 + 1, 0), [u2, g2] = D(null), [h2, f2] = D(null), [y2, k2] = D(null), { reference: S2 } = no({ parentFloat: r2, label: "overflow" });
1429
- E(() => {
1392
+ return o2.selection = { fill: l2.palette?.primary?.main ? Tr(l2.palette?.primary?.main, 0.1) : void 0, strokeFill: l2.palette?.primary?.main }, o2.selectionInactive = { ...o2.selection, fill: l2.palette?.divider ? Tr(l2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" }, o2.selectionRemove = { ...o2.selection, fill: Tr(l2.palette.warning.light, 0.05), strokeFill: l2.palette.warning.dark }, t2 && (o2.body = n2(t2)), o2.colorShadow = Tr(l2.palette.action.active, 0.5), o2.colorGrey = l2.palette.action.active, o2.filterDarkInvert = i2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", o2;
1393
+ }, Sl = S(k((e2, t2) => {
1394
+ const { children: o2, sx: n2, parentFloat: r2, ...a2 } = e2, l2 = Zn(t2, () => ({}), []), [i2, s2] = Ar(), d2 = M(null), c2 = M(null), [m2, p2] = w.useReducer((e3) => e3 + 1, 0), [u2, g2] = D(null), [h2, f2] = D(null), [y2, S2] = D(null), { reference: k2 } = no({ parentFloat: r2, label: "overflow" });
1395
+ A(() => {
1430
1396
  c2.current = { refs: [] };
1431
1397
  const e3 = [], t3 = w.Children.toArray(o2);
1432
1398
  let n3 = 0;
1433
1399
  t3.forEach((o3, r3) => {
1434
- e3.push(x(A, { sx: { display: "flex" }, ref: (e4) => {
1400
+ e3.push(x(E, { sx: { display: "flex" }, ref: (e4) => {
1435
1401
  n3++, n3 === t3.length && p2();
1436
1402
  const o4 = { current: null };
1437
1403
  o4.current = e4, c2.current.refs[r3] = o4;
1438
1404
  }, children: o3 }, r3));
1439
1405
  }), g2(e3);
1440
- }, [o2, s2]), E(() => {
1406
+ }, [o2, s2]), A(() => {
1441
1407
  if (!u2) return;
1442
1408
  const e3 = c2.current.refs;
1443
- if (!l2.current || !e3 || 0 === e3.length) return f2(null), void k2(null);
1409
+ if (!l2.current || !e3 || 0 === e3.length) return f2(null), void S2(null);
1444
1410
  const t3 = l2.current?.getBoundingClientRect(), o3 = [], n3 = [];
1445
1411
  let r3 = 0, a3 = false;
1446
1412
  for (let o4 = 0; !a3 && o4 < e3.length; o4++) {
@@ -1453,7 +1419,7 @@ const Cl = k(S((e2, t2) => {
1453
1419
  const l3 = n4.current.getBoundingClientRect();
1454
1420
  r3 += l3?.width, r3 > t3.width && (a3 = true);
1455
1421
  }
1456
- if (!a3) return f2(null), void k2([]);
1422
+ if (!a3) return f2(null), void S2([]);
1457
1423
  const i3 = d2.current?.getBoundingClientRect();
1458
1424
  r3 = 0;
1459
1425
  for (let a4 = 0; a4 < e3.length; a4++) {
@@ -1465,9 +1431,9 @@ const Cl = k(S((e2, t2) => {
1465
1431
  }
1466
1432
  s3 ? o3.push(u2[a4]) : n3.push(u2[a4]);
1467
1433
  }
1468
- f2(o3.length > 0 ? o3 : null), k2(n3.length > 0 ? n3 : null);
1469
- }, [o2, u2, s2, S2, m2]);
1470
- const C2 = On((e3) => {
1434
+ f2(o3.length > 0 ? o3 : null), S2(n3.length > 0 ? n3 : null);
1435
+ }, [o2, u2, s2, k2, m2]);
1436
+ const C2 = Gn((e3) => {
1471
1437
  const t3 = [];
1472
1438
  for (let o4 = 0; o4 < y2.length; o4++) {
1473
1439
  let n3 = w.Children.toArray(y2[o4]);
@@ -1478,21 +1444,21 @@ const Cl = k(S((e2, t2) => {
1478
1444
  const i3 = w.cloneElement(a3, l3);
1479
1445
  t3.push(i3);
1480
1446
  }
1481
- const o3 = x(A, { className: "overflow-palette-popup-panel", sx: { display: "flex", flexDirection: "row", flexWrap: "wrap", paddingTop: (e4) => e4.spacing(0.5), paddingBottom: (e4) => e4.spacing(0.5), paddingLeft: (e4) => e4.spacing(1), paddingRight: (e4) => e4.spacing(1), overflow: "hidden" }, children: t3 });
1447
+ const o3 = x(E, { className: "overflow-palette-popup-panel", sx: { display: "flex", flexDirection: "row", flexWrap: "wrap", rowGap: (e4) => e4.spacing(0.25), paddingTop: (e4) => e4.spacing(0.5), paddingBottom: (e4) => e4.spacing(0.5), paddingLeft: (e4) => e4.spacing(1), paddingRight: (e4) => e4.spacing(1), overflow: "hidden" }, children: t3 });
1482
1448
  return ce({ ...e3, children: o3 });
1483
1449
  }, [y2]);
1484
- return b(A, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...n2 }, ref: Dr([l2, i2, t2]), ...a2, children: [x(A, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%" }, children: h2 ?? u2 }), x(A, { sx: { display: null !== y2 && 0 === y2.length ? "none" : "flex", flex: "1 1 0" }, children: x(Pe, { createPopupPanel: C2, ref: d2, parentFloat: S2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: "More", description: "More toolbar options…", disabled: t3, children: e3 }), icon: x(ho, { children: x(En, {}) }) }) })] });
1485
- })), vl = "https://unpkg.com/@sheetxl/scripting-templates/dist", Tl = (e2) => {
1450
+ return b(E, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...n2 }, ref: Pr([l2, i2, t2]), ...a2, children: [x(E, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%" }, children: h2 ?? u2 }), x(E, { sx: { display: null !== y2 && 0 === y2.length ? "none" : "flex", flex: "1 1 0" }, children: x(Me, { createPopupPanel: C2, ref: d2, parentFloat: k2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: "More", description: "More toolbar options…", disabled: t3, children: e3 }), icon: x(ho, { children: x(In, {}) }) }) })] });
1451
+ })), kl = "https://unpkg.com/@sheetxl/scripting-templates/dist", Cl = (e2) => {
1486
1452
  if (e2.metadata?.name) return e2.metadata.name;
1487
1453
  let t2 = (e2.path.split("/").pop() || "").replace(/\.[^/.]+$/, "");
1488
1454
  if ("formula" === e2.metadata?.icon) return t2.toUpperCase();
1489
1455
  t2 = t2.replace(/([a-z])([A-Z])/g, "$1 $2");
1490
1456
  return t2.replace(/[-_]/g, " ").trim().split(/\s+/).map((e3) => e3.charAt(0).toUpperCase() + e3.slice(1)).join(" ");
1491
- }, Dl = async (e2) => {
1492
- const t2 = Ar.relativePath(e2, "./manifest.json"), o2 = await fetch(t2);
1493
- if (!o2.ok) throw new Rr(`Failed to retrieve directory at '${e2}': ${o2.statusText}`);
1457
+ }, vl = async (e2) => {
1458
+ const t2 = Lr.relativePath(e2, "./manifest.json"), o2 = await fetch(t2);
1459
+ if (!o2.ok) throw new Br(`Failed to retrieve directory at '${e2}': ${o2.statusText}`);
1494
1460
  const n2 = await o2.text();
1495
- if (n2.trim().toLowerCase().startsWith("<!doctype html") || n2.trim().toLowerCase().startsWith("<html")) throw new Rr(`Failed to retrieve directory at '${e2}'`);
1461
+ if (n2.trim().toLowerCase().startsWith("<!doctype html") || n2.trim().toLowerCase().startsWith("<html")) throw new Br(`Failed to retrieve directory at '${e2}'`);
1496
1462
  let r2;
1497
1463
  try {
1498
1464
  r2 = JSON.parse(n2);
@@ -1501,11 +1467,11 @@ const Cl = k(S((e2, t2) => {
1501
1467
  }
1502
1468
  const a2 = r2.map(async (t3) => {
1503
1469
  try {
1504
- const o3 = Ar.relativePath(e2, t3.path), n3 = await fetch(o3);
1470
+ const o3 = Lr.relativePath(e2, t3.path), n3 = await fetch(o3);
1505
1471
  if (!n3.ok) throw new Error(`Failed to fetch file at '${t3.path}': ${n3.statusText}`);
1506
1472
  const r3 = await n3.text();
1507
1473
  let a3 = t3.metadata;
1508
- a3?.title || (a3 = { title: Tl(t3), ...a3 });
1474
+ a3?.title || (a3 = { title: Cl(t3), ...a3 });
1509
1475
  return { path: t3.path, content: r3, metadata: a3 };
1510
1476
  } catch (e3) {
1511
1477
  console.error(e3.message);
@@ -1513,22 +1479,22 @@ const Cl = k(S((e2, t2) => {
1513
1479
  return null;
1514
1480
  });
1515
1481
  return (await Promise.all(a2)).filter((e3) => null !== e3);
1516
- }, Ml = { fontSize: "0.8rem", marginRight: "4px" }, Rl = k((e2) => {
1482
+ }, Tl = { fontSize: "0.8rem", marginRight: "4px" }, Dl = S((e2) => {
1517
1483
  const { disabled: t2, snippet: o2, description: n2, handleInsert: r2, sx: a2, ...l2 } = e2;
1518
1484
  let i2;
1519
- return i2 = "formula" === o2.metadata?.icon ? x(xo, { sx: Ml }) : "macro" === o2.metadata?.icon ? x(bo, { sx: Ml }) : x(An, { sx: Ml }), x(Ne, { sx: { maxWidth: "460px", display: "flex", "*": { lineHeight: "1.2" }, ...a2 }, disabled: t2, icon: i2, onMouseDown: (e3) => {
1485
+ return i2 = "formula" === o2.metadata?.icon ? x(xo, { sx: Tl }) : "macro" === o2.metadata?.icon ? x(bo, { sx: Tl }) : x(Ln, { sx: Tl }), x(Ne, { sx: { maxWidth: "460px", display: "flex", "*": { lineHeight: "1.2" }, ...a2 }, disabled: t2, icon: i2, onMouseDown: (e3) => {
1520
1486
  0 === e3.button && e3.preventDefault();
1521
1487
  }, onMouseUp: (e3) => {
1522
1488
  0 === e3.button && r2(o2);
1523
1489
  }, onKeyDown: (e3) => {
1524
- e3.keyCode !== Gn.Enter && e3.keyCode !== Gn.Space || r2(o2);
1525
- }, ...l2, children: b(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [x(I, { component: "div", children: o2.metadata?.title ?? o2.path }), x(I, { variant: "caption", component: "div", sx: { color: (e3) => Cr(e3.palette.text.secondary ?? e3.palette.text.primary, 0.6), overflow: "hidden", textOverflow: "ellipsis" }, children: o2.metadata?.summary })] }) });
1526
- }), Pl = k(S((e2, t2) => {
1527
- const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, scriptPath: l2 = vl, ...i2 } = e2, [s2, d2] = D([]), [c2, m2] = D(true), p2 = Wn(o2, ["executeSelectedScript"]), u2 = p2[0]?.context?.();
1528
- M(() => {
1490
+ e3.keyCode !== jn.Enter && e3.keyCode !== jn.Space || r2(o2);
1491
+ }, ...l2, children: b(E, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [x(I, { component: "div", children: o2.metadata?.title ?? o2.path }), x(I, { variant: "caption", component: "div", sx: { color: (e3) => Tr(e3.palette.text.secondary ?? e3.palette.text.primary, 0.6), overflow: "hidden", textOverflow: "ellipsis" }, children: o2.metadata?.summary })] }) });
1492
+ }), Rl = S(k((e2, t2) => {
1493
+ const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, scriptPath: l2 = kl, ...i2 } = e2, [s2, d2] = D([]), [c2, m2] = D(true), p2 = On(o2, ["executeSelectedScript"]), u2 = p2[0]?.context?.();
1494
+ R(() => {
1529
1495
  (async () => {
1530
1496
  try {
1531
- const e3 = await Dl(l2);
1497
+ const e3 = await vl(l2);
1532
1498
  d2(e3);
1533
1499
  } catch (e3) {
1534
1500
  } finally {
@@ -1538,152 +1504,152 @@ const Cl = k(S((e2, t2) => {
1538
1504
  }, [l2]);
1539
1505
  const g2 = v((e3, t3) => {
1540
1506
  if (c2) return x("div", { children: "Loading..." });
1541
- const r3 = { variant: $n.Menuitem, commandHook: n2, scope: "scripts", disabled: a2 }, l3 = (t4) => {
1507
+ const r3 = { variant: Vn.Menuitem, commandHook: n2, scope: "scripts", disabled: a2 }, l3 = (t4) => {
1542
1508
  u2.getEditor()?.insertSnippet(t4.content), e3.closeFloat();
1543
1509
  }, i3 = [];
1544
1510
  for (let e4 = 0; e4 < s2.length; e4++) {
1545
1511
  const t4 = s2[e4];
1546
- t4 && i3.push(x(Rl, { handleInsert: l3, snippet: t4 }, t4.path));
1512
+ t4 && i3.push(x(Dl, { handleInsert: l3, snippet: t4 }, t4.path));
1547
1513
  }
1548
- const d3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [i3.length > 0 ? b(y, { children: [x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 }), x(ie, { orientation: "horizontal" })] }) : null, B(le, { ...r3, key: "help", command: o2.getCommand("help"), icon: ae(x(_t, {})) })] });
1514
+ const d3 = b(E, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [i3.length > 0 ? b(y, { children: [x(E, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 }), x(ie, { orientation: "horizontal" })] }) : null, B(le, { ...r3, key: "help", command: o2.getCommand("help"), icon: ae(x(_t, {})) })] });
1549
1515
  return ce({ ...e3, children: d3 });
1550
1516
  }, [a2, n2, r2, c2, u2]);
1551
1517
  return x(me, { ref: t2, commands: o2, disabled: a2, commandHook: n2, scope: r2, label: "Insert Script", tooltip: "Inserts a script from a set of templates.", createPopupPanel: g2, icon: ae(x(fo, {})), ...i2 });
1552
- })), Bl = k(S((e2, t2) => {
1553
- const { commands: o2, parentFloat: n2, commandButtonProps: r2, ...a2 } = e2, l2 = On((e3) => {
1518
+ })), Pl = S(k((e2, t2) => {
1519
+ const { commands: o2, parentFloat: n2, commandButtonProps: r2, ...a2 } = e2, l2 = Gn((e3) => {
1554
1520
  const { commandButtonProps: t3, commandPopupProps: r3 } = e3;
1555
- return x(y, { children: b("div", { style: { display: "flex", flex: "1 1 100%" }, children: [x("div", { children: x(Cl, { parentFloat: n2, style: {}, children: x(le, { ...t3, command: o2.getCommand("saveScripts"), icon: ae(x(yo, {})) }) }) }), x("div", { style: { flex: "1 1 100%" } }), x("div", { children: x(Cl, { parentFloat: n2, style: {}, children: x(Pl, { ...t3, commands: o2 }) }) })] }) });
1521
+ return x(y, { children: b("div", { style: { display: "flex", flex: "1 1 100%" }, children: [x("div", { children: x(Sl, { parentFloat: n2, style: {}, children: x(le, { ...t3, command: o2.getCommand("saveScripts"), icon: ae(x(yo, {})) }) }) }), x("div", { style: { flex: "1 1 100%" } }), x("div", { children: x(Sl, { parentFloat: n2, style: {}, children: x(Rl, { ...t3, commands: o2 }) }) })] }) });
1556
1522
  }, [o2]);
1557
1523
  return x(wo, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: r2, createToolbarPalette: l2, ...a2 });
1558
1524
  }));
1559
- Bl.displayName = "ScriptEditorToolbar";
1560
- const Fl = { fontSize: "1rem" }, Nl = k(S((e2, t2) => {
1561
- const { scriptPath: o2 = vl, onScriptSelect: n2, sx: r2 = Vn.EmptyCssProperties, className: a2, buttonMinWidth: l2 = 210, buttonMinHeight: i2 = 80, gap: s2 = 12, ...d2 } = e2, [c2, m2] = D([]), [p2, u2] = D(true), [g2, h2] = D(null);
1562
- if (M(() => {
1525
+ Pl.displayName = "ScriptEditorToolbar";
1526
+ const Ml = { fontSize: "1rem" }, Bl = S(k((e2, t2) => {
1527
+ const { scriptPath: o2 = kl, onScriptSelect: n2, sx: r2 = Un.EmptyCssProperties, className: a2, buttonMinWidth: l2 = 210, buttonMinHeight: i2 = 80, gap: s2 = 12, ...d2 } = e2, [c2, m2] = D([]), [p2, u2] = D(true), [g2, h2] = D(null);
1528
+ if (R(() => {
1563
1529
  (async () => {
1564
1530
  const e3 = [{ path: null, metadata: { title: "Blank Template...", summary: "Start with an empty script." }, content: "" }];
1565
1531
  try {
1566
1532
  u2(true), h2(null);
1567
- const t3 = await Dl(o2);
1533
+ const t3 = await vl(o2);
1568
1534
  for (let o3 = 0; o3 < t3.length; o3++) {
1569
1535
  const n3 = t3[o3];
1570
1536
  n3 && e3.push(n3);
1571
1537
  }
1572
1538
  } catch (e4) {
1573
- h2(e4 instanceof Error ? e4.message : "Failed to load scripts"), e4 instanceof Rr || console.error("Error loading scripts:", e4);
1539
+ h2(e4 instanceof Error ? e4.message : "Failed to load scripts"), e4 instanceof Br || console.error("Error loading scripts:", e4);
1574
1540
  } finally {
1575
1541
  m2(e3), u2(false);
1576
1542
  }
1577
1543
  })();
1578
- }, [o2]), p2) return x(A, { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", className: yn(a2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${ar("#fff", lr(5))}, ${ar("#fff", lr(5))})`, ...r2 }, ...d2, children: x(Z, {}) });
1544
+ }, [o2]), p2) return x(E, { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", className: Sn(a2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${ir("#fff", sr(5))}, ${ir("#fff", sr(5))})`, ...r2 }, ...d2, children: x(Z, {}) });
1579
1545
  let f2 = null;
1580
- g2 && (f2 = b(A, { display: "flex", justifyContent: "center", alignItems: "center", className: yn(a2, "script-select", "error-results"), sx: { background: (e3) => e3.palette.error.light, flex: "0", zIndex: 1e3, flexDirection: "column", padding: (e3) => e3.spacing(1), border: (e3) => `1px solid ${e3.palette.error.main}`, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, backgroundImage: `linear-gradient(${ar("#fff", lr(5))}, ${ar("#fff", lr(5))})` }, ...d2, children: [x(I, { color: "error", variant: "h6", component: "div", gutterBottom: true, children: "Error loading Templates" }), x(I, { color: "error", component: "div", children: g2 })] }));
1546
+ g2 && (f2 = b(E, { display: "flex", justifyContent: "center", alignItems: "center", className: Sn(a2, "script-select", "error-results"), sx: { background: (e3) => e3.palette.error.light, flex: "0", zIndex: 1e3, flexDirection: "column", padding: (e3) => e3.spacing(1), border: (e3) => `1px solid ${e3.palette.error.main}`, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, backgroundImage: `linear-gradient(${ir("#fff", sr(5))}, ${ir("#fff", sr(5))})` }, ...d2, children: [x(I, { color: "error", variant: "h6", component: "div", gutterBottom: true, children: "Error loading Templates" }), x(I, { color: "error", component: "div", children: g2 })] }));
1581
1547
  const y2 = (e3) => {
1582
1548
  const t3 = e3.metadata?.icon;
1583
- return "macro" === t3 ? x(bo, { sx: Fl }) : "formula" === t3 ? x(xo, { sx: Fl }) : "autostart" === t3 ? x(An, { sx: Fl }) : null;
1549
+ return "macro" === t3 ? x(bo, { sx: Ml }) : "formula" === t3 ? x(xo, { sx: Ml }) : "autostart" === t3 ? x(Ln, { sx: Ml }) : null;
1584
1550
  };
1585
- return b(A, { ref: t2, className: yn(a2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${ar("#fff", lr(5))}, ${ar("#fff", lr(5))})`, ...r2 }, ...d2, children: [b(A, { p: 3, className: "script-select-content", sx: { overflow: "auto", flex: "1 1 auto" }, children: [x(I, { variant: "h6", gutterBottom: true, children: "Script Template" }), x(I, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: true, children: "Choose from a template to provide a starting point to automate tasks or create user defined functions." }), x(I, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: true, children: "Templates provide a foundation to customize and meet your specific needs." }), x(A, { sx: { display: "grid", gridTemplateColumns: `repeat(auto-fill, minmax(${l2}px, 1fr))`, gap: `${s2}px`, padding: 2, paddingLeft: "0px", paddingRight: "0px" }, children: c2.map((e3, t3) => b(W, { variant: "outlined", sx: { minWidth: l2, minHeight: i2, display: "flex", flexDirection: "column", justifyContent: "flex-start", alignItems: "flex-start", textAlign: "left", padding: 2, textTransform: "none", overflow: "hidden", ...0 === t3 && { borderStyle: "dashed", marginBottom: "8px" }, ...1 === t3 && { gridColumn: "1" } }, onClick: () => n2?.(e3), children: [b(A, { sx: { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", width: "100%", marginBottom: 0.5 }, children: [x(I, { variant: "subtitle2", component: "div", children: e3.metadata?.title || e3.path.split("/").pop()?.replace(/\.\w+$/, "") || "Untitled" }), y2(e3)] }), e3.metadata?.summary && x(I, { variant: "body2", component: "div", color: "text.secondary", sx: { overflow: "hidden", display: "flex", flexDirection: "column", textOverflow: "ellipsis", alignItems: "flex-start" }, children: e3.metadata.summary })] }, `${e3.path}-${t3}`)) })] }), f2] });
1551
+ return b(E, { ref: t2, className: Sn(a2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${ir("#fff", sr(5))}, ${ir("#fff", sr(5))})`, ...r2 }, ...d2, children: [b(E, { p: 3, className: "script-select-content", sx: { overflow: "auto", flex: "1 1 auto" }, children: [x(I, { variant: "h6", gutterBottom: true, children: "Script Template" }), x(I, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: true, children: "Choose from a template to provide a starting point to automate tasks or create user defined functions." }), x(I, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: true, children: "Templates provide a foundation to customize and meet your specific needs." }), x(E, { sx: { display: "grid", gridTemplateColumns: `repeat(auto-fill, minmax(${l2}px, 1fr))`, gap: `${s2}px`, padding: 2, paddingLeft: "0px", paddingRight: "0px" }, children: c2.map((e3, t3) => b(W, { variant: "outlined", sx: { minWidth: l2, minHeight: i2, display: "flex", flexDirection: "column", justifyContent: "flex-start", alignItems: "flex-start", textAlign: "left", padding: 2, textTransform: "none", overflow: "hidden", ...0 === t3 && { borderStyle: "dashed", marginBottom: "8px" }, ...1 === t3 && { gridColumn: "1" } }, onClick: () => n2?.(e3), children: [b(E, { sx: { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", width: "100%", marginBottom: 0.5 }, children: [x(I, { variant: "subtitle2", component: "div", children: e3.metadata?.title || e3.path.split("/").pop()?.replace(/\.\w+$/, "") || "Untitled" }), y2(e3)] }), e3.metadata?.summary && x(I, { variant: "body2", component: "div", color: "text.secondary", sx: { overflow: "hidden", display: "flex", flexDirection: "column", textOverflow: "ellipsis", alignItems: "flex-start" }, children: e3.metadata.summary })] }, `${e3.path}-${t3}`)) })] }), f2] });
1586
1552
  }));
1587
- Nl.displayName = "TemplateSelectPanel";
1588
- const El = k(S((e2, t2) => {
1589
- const { className: o2, sx: n2, editorProps: r2, commands: a2, readOnly: l2 = false, onClose: i2, autoFocusSel: s2, autoFocus: d2 = true, scripts: c2, ...m2 } = e2, p2 = rr(), [u2, g2] = D(false), h2 = P(false), [f2, y2] = D({ message: "Loading", cursor: "", dirty: false }), [w2, k2] = D(null);
1590
- M(() => {
1553
+ Bl.displayName = "TemplateSelectPanel";
1554
+ const Fl = S(k((e2, t2) => {
1555
+ const { className: o2, sx: n2, editorProps: r2, commands: a2, readOnly: l2 = false, onClose: i2, autoFocusSel: s2, autoFocus: d2 = true, scripts: c2, ...m2 } = e2, p2 = lr(), [u2, g2] = D(false), h2 = M(false), [f2, y2] = D({ message: "Loading", cursor: "", dirty: false }), [w2, S2] = D(null);
1556
+ R(() => {
1591
1557
  let e3 = false;
1592
- return k2(null), async function() {
1558
+ return S2(null), async function() {
1593
1559
  if (c2 && (await c2.start(), !e3)) {
1594
- const e4 = c2.getModules().search()[0]?.getSource();
1595
- k2({ source: e4 || null });
1560
+ const e4 = c2.getModules().getItems()[0]?.getSource();
1561
+ S2({ source: e4 || null });
1596
1562
  }
1597
1563
  }(), () => {
1598
1564
  e3 = true;
1599
1565
  };
1600
1566
  }, [c2]);
1601
- const S2 = v((e3) => {
1567
+ const k2 = v((e3) => {
1602
1568
  y2((t3) => ({ ...t3, ...e3 }));
1603
- }, []), T2 = P(null), R2 = P(null), [B2, F2] = D(null), N2 = P(null), E2 = On((e3) => {
1569
+ }, []), T2 = M(null), P2 = M(null), [B2, F2] = D(null), N2 = M(null), A2 = Gn((e3) => {
1604
1570
  if (B2) return B2.focus(e3), true;
1605
1571
  if (s2) {
1606
- const t3 = R2.current?.querySelectorAll?.(s2);
1572
+ const t3 = P2.current?.querySelectorAll?.(s2);
1607
1573
  if (t3 && t3.length > 0) return t3[0]?.focus?.(e3), true;
1608
1574
  }
1609
- return R2.current?.focus?.(e3), false;
1610
- }, [B2, s2, d2]), H2 = C(() => x(Me, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: false }), []), z2 = C(() => x(X, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, backgroundImage: `linear-gradient(${ar("#fff", lr(5))}, ${ar("#fff", lr(5))})`, marginLeft: (e3) => e3.spacing(0.5), marginRight: (e3) => e3.spacing(0.5), marginTop: (e3) => e3.spacing(1), marginBottom: (e3) => e3.spacing(1) }, children: x(Bl, { commands: a2 }) }), [p2, a2]), W2 = C(() => x(A, { className: yn("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 ${p2.palette.divider}` }, children: b("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [x(I, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "1 1 100%", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.message }), x(I, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.dirty ? "Unsaved" : "" }), x(I, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", marginLeft: "8px", minWidth: "90px", display: "flex", justifyContent: "end", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.cursor })] }) }), [f2]), $2 = C(() => b(A, { className: yn("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [z2, x(A, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: x(gr, { ref: R2, loadingPanel: H2, readOnly: l2, onClose: i2, autoFocus: d2, commands: a2, onStatusChange: S2, darkMode: "dark" === p2.palette.mode, ...r2 }) }), W2] }), [p2, a2, z2, W2, u2, H2, l2, r2, d2, s2, i2, S2]), O2 = C(() => x(J, { className: yn({ "Mui-selected": h2.current }), sx: { display: "flex", color: (e3) => e3.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: (e3) => `${e3.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: (e3) => e3.transitions.duration.shortest / 2 + "ms" }, backgroundColor: (e3) => ar(e3.palette.action.hover, 0.03), borderBottom: (e3) => `solid ${ar(e3.palette.divider, 0.2)} 1px` }, onPointerDown: (e3) => {
1611
- e3.isDefaultPrevented() || (e3.preventDefault(), E2());
1612
- }, children: b(A, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: (e3) => e3.spacing(0.25), marginBottom: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, children: [x(A, { sx: { flex: "1 1 100%", paddingLeft: (e3) => e3.spacing(1) }, children: "Script (Typescript)" }), x(Le, { label: "Close", children: x(L, { "aria-label": "close", sx: { color: (e3) => e3.palette.text.icon ?? e3.palette.action.active }, touchRippleRef: T2, onPointerDown: (e3) => {
1575
+ return P2.current?.focus?.(e3), false;
1576
+ }, [B2, s2, d2]), H2 = C(() => x(Re, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: false }), []), z2 = C(() => x(X, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, backgroundImage: `linear-gradient(${ir("#fff", sr(5))}, ${ir("#fff", sr(5))})`, marginLeft: (e3) => e3.spacing(0.5), marginRight: (e3) => e3.spacing(0.5), marginTop: (e3) => e3.spacing(1), marginBottom: (e3) => e3.spacing(1) }, children: x(Pl, { commands: a2 }) }), [p2, a2]), W2 = C(() => x(E, { className: Sn("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 ${p2.palette.divider}` }, children: b("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [x(I, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "1 1 100%", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.message }), x(I, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.dirty ? "Unsaved" : "" }), x(I, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", marginLeft: "8px", minWidth: "90px", display: "flex", justifyContent: "end", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.cursor })] }) }), [f2]), $2 = C(() => b(E, { className: Sn("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [z2, x(E, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: x(fr, { ref: P2, loadingPanel: H2, readOnly: l2, onClose: i2, autoFocus: d2, commands: a2, onStatusChange: k2, darkMode: "dark" === p2.palette.mode, ...r2 }) }), W2] }), [p2, a2, z2, W2, u2, H2, l2, r2, d2, s2, i2, k2]), O2 = C(() => x(J, { className: Sn({ "Mui-selected": h2.current }), sx: { display: "flex", color: (e3) => e3.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: (e3) => `${e3.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: (e3) => e3.transitions.duration.shortest / 2 + "ms" }, backgroundColor: (e3) => ir(e3.palette.action.hover, 0.03), borderBottom: (e3) => `solid ${ir(e3.palette.divider, 0.2)} 1px` }, onPointerDown: (e3) => {
1577
+ e3.isDefaultPrevented() || (e3.preventDefault(), A2());
1578
+ }, children: b(E, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: (e3) => e3.spacing(0.25), marginBottom: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, children: [x(E, { sx: { flex: "1 1 100%", paddingLeft: (e3) => e3.spacing(1) }, children: "Script (Typescript)" }), x(Le, { label: "Close", children: x(L, { "aria-label": "close", sx: { color: (e3) => e3.palette.text.icon ?? e3.palette.action.active }, touchRippleRef: T2, onPointerDown: (e3) => {
1613
1579
  T2.current?.start(e3, { center: false }), e3.stopPropagation(), e3.preventDefault();
1614
1580
  }, onPointerUp: () => {
1615
- R2.current?.close();
1616
- }, children: x(In, {}) }) })] }) }), [p2, u2]), V2 = C(() => {
1581
+ P2.current?.close();
1582
+ }, children: x(Hn, {}) }) })] }) }), [p2, u2]), V2 = C(() => {
1617
1583
  let e3;
1618
- return null === w2 ? null : (null === w2.source && (e3 = x(Nl, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (e4) => {
1619
- R2.current?.getEditor().insertSnippet(e4.content), k2({ source: e4.content ?? "" });
1620
- } })), b(A, { tabIndex: 0, className: yn("script-workspace", o2), sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", alignItems: "stretch", userSelect: "none", flexGrow: 0, outline: "none", backgroundImage: `linear-gradient(${ar("#fff", lr(5))}, ${ar("#fff", lr(5))})` }, onPointerDown: (e4) => {
1621
- e4.isDefaultPrevented() || R2.current?.focus();
1622
- }, children: [O2, b(A, { sx: { flex: "1 1 100%", position: "relative", display: "flex" }, children: [$2, e3] })] }));
1623
- }, [z2, $2, o2, w2]), G2 = Kn(t2, () => ({ isScriptWorkspaceElement: () => true, focus: (e3) => {
1624
- E2(e3);
1584
+ return null === w2 ? null : (null === w2.source && (e3 = x(Bl, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (e4) => {
1585
+ P2.current?.getEditor().insertSnippet(e4.content), S2({ source: e4.content ?? "" });
1586
+ } })), b(E, { tabIndex: 0, className: Sn("script-workspace", o2), sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", alignItems: "stretch", userSelect: "none", flexGrow: 0, outline: "none", backgroundImage: `linear-gradient(${ir("#fff", sr(5))}, ${ir("#fff", sr(5))})` }, onPointerDown: (e4) => {
1587
+ e4.isDefaultPrevented() || P2.current?.focus();
1588
+ }, children: [O2, b(E, { sx: { flex: "1 1 100%", position: "relative", display: "flex" }, children: [$2, e3] })] }));
1589
+ }, [z2, $2, o2, w2]), G2 = Zn(t2, () => ({ isScriptWorkspaceElement: () => true, focus: (e3) => {
1590
+ A2(e3);
1625
1591
  } }), []);
1626
- return x(A, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...n2 }, ref: G2, ...m2, onFocus: (e3) => {
1592
+ return x(E, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...n2 }, ref: G2, ...m2, onFocus: (e3) => {
1627
1593
  g2(true), h2.current = true, G2.current?.contains(e3.target) && e3.target !== G2.current && F2(e3.target), e3.relatedTarget && !N2.current && (N2.current = e3.relatedTarget), m2?.onFocus?.(e3);
1628
1594
  }, onBlur: (e3) => {
1629
1595
  G2?.current?.contains(e3.relatedTarget) || G2?.current === e3.relatedTarget || (N2.current = null, h2.current = false, g2(false)), m2?.onBlur?.(e3);
1630
1596
  }, children: V2 });
1631
1597
  }));
1632
- El.displayName = "ScriptWorkspace";
1633
- const Al = k(S((e2, t2) => {
1634
- const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = Wn(o2, ["executeScript"])[0].context();
1635
- Wn(o2, ["showScriptEditor"]);
1598
+ Fl.displayName = "ScriptWorkspace";
1599
+ const Nl = S(k((e2, t2) => {
1600
+ const { commands: o2, commandHook: n2, scope: r2, disabled: a2 = false, ...l2 } = e2, i2 = On(o2, ["executeScript"])[0].context();
1601
+ On(o2, ["showScriptEditor"]);
1636
1602
  const s2 = v((e3, t3) => {
1637
- const o3 = { variant: $n.Menuitem, commandHook: n2, scope: "scripts", disabled: a2, shortcut: null }, r3 = i2?.getScripts(), l3 = r3?.searchFunction({ type: "macro" }), s3 = [];
1603
+ const o3 = { variant: Vn.Menuitem, commandHook: n2, scope: "scripts", disabled: a2, shortcut: null }, r3 = i2?.getScripts(), l3 = r3?.searchFunction({ type: "macro" }), s3 = [];
1638
1604
  if (l3) for (let e4 = 0; e4 < l3.length; e4++) {
1639
1605
  const n3 = l3[e4];
1640
1606
  s3.push(x(le, { ...o3, command: t3.getCommand("executeScript"), commandState: { declaration: n3 }, tooltipProps: { description: `Execute ${n3.getName() ?? "script"}` }, icon: ae(x(bo, {})), label: n3.getName() ?? `Script '${n3.getName()}'` }, `script-${n3.getName()}-${e4}`));
1641
1607
  }
1642
- const d2 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [s3.length > 0 ? b(y, { children: [x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: s3 }), x(ie, { orientation: "horizontal" })] }) : null, B(le, { ...o3, key: "show-editor", command: t3.getCommand("showScriptEditor"), icon: ae(x(ko, {})) })] });
1608
+ const d2 = b(E, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [s3.length > 0 ? b(y, { children: [x(E, { sx: { overflow: "auto", flex: "1 1 100%" }, children: s3 }), x(ie, { orientation: "horizontal" })] }) : null, B(le, { ...o3, key: "show-editor", command: t3.getCommand("showScriptEditor"), icon: ae(x(So, {})) })] });
1643
1609
  return ce({ ...e3, children: d2 });
1644
1610
  }, [a2, i2, n2, r2]);
1645
- return x(me, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: s2, selected: o2.getCommand("showScriptEditor").state(), label: "Macros", tooltip: "Run or manage macros.", quickCommand: "showScriptEditor", icon: ae(x(So, {})), ...l2 });
1646
- })), Il = k(S((e2, t2) => {
1647
- const { commands: o2, parentFloat: n2, commandButtonProps: r2, ...a2 } = e2, l2 = Wn(o2, ["executeScript", "showScriptEditor"]), i2 = l2[0]?.context?.(), s2 = v((e3) => {
1648
- const { commandButtonProps: t3, commandPopupProps: r3 } = e3, a3 = x(ya, { ...r3, command: o2.getCommand("formatFontColor"), icon: x(Co, {}), isSplit: true, panelProps: { disableAlpha: true } }), s3 = x(ya, { ...r3, command: o2.getCommand("formatFillColor"), icon: x(vo, {}), isSplit: true, panelProps: { disableAlpha: true, autoColorLabel: "No Fill", autoColorPosition: Ur.End } }), d2 = o2.getCommand("undo") ? x(y, { children: x(Ca, { ...r3, quickCommand: "undo" }) }) : null, c2 = o2.getCommand("find") ? x(y, { children: x(ma, { ...r3 }) }) : null;
1611
+ return x(me, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: s2, selected: o2.getCommand("showScriptEditor").state(), label: "Macros", tooltip: "Run or manage macros.", quickCommand: "showScriptEditor", icon: ae(x(ko, {})), ...l2 });
1612
+ })), Al = S(k((e2, t2) => {
1613
+ const { commands: o2, parentFloat: n2, commandButtonProps: r2, ...a2 } = e2, l2 = On(o2, ["executeScript", "showScriptEditor"]), i2 = l2[0]?.context?.(), s2 = v((e3) => {
1614
+ const { commandButtonProps: t3, commandPopupProps: r3 } = e3, a3 = x(Sa, { ...r3, command: o2.getCommand("formatFontColor"), icon: x(Co, {}), isSplit: true, panelProps: { disableAlpha: true } }), s3 = x(Sa, { ...r3, command: o2.getCommand("formatFillColor"), icon: x(vo, {}), isSplit: true, panelProps: { disableAlpha: true, autoColorLabel: "No Fill", autoColorPosition: _r.End } }), d2 = o2.getCommand("undo") ? x(y, { children: x(Ta, { ...r3, quickCommand: "undo" }) }) : null, c2 = o2.getCommand("find") ? x(y, { children: x(ua, { ...r3 }) }) : null;
1649
1615
  let m2 = null;
1650
1616
  const p2 = i2?.getScripts();
1651
1617
  if (l2[1]?.state?.() || p2) {
1652
1618
  let e4 = l2[1]?.state?.();
1653
1619
  const t4 = p2?.searchFunction({ type: "macro" });
1654
1620
  for (let o3 = 0; t4 && !e4 && o3 < t4?.length; o3++) e4 = true;
1655
- e4 && (m2 = b(y, { children: [x(ie, {}), x(Al, { ...r3 })] }));
1621
+ e4 && (m2 = b(y, { children: [x(ie, {}), x(Nl, { ...r3 })] }));
1656
1622
  }
1657
- return b(Cl, { parentFloat: n2, children: [d2, null, d2 ? x(ie, {}) : null, x(Pa, { ...r3, command: o2.getCommand("paste") }), x(le, { ...t3, command: o2.getCommand("formatPainterToggle"), icon: ae(x(To, {})) }), x(Ja, { ...t3, command: o2.getCommand("copy") }), x(ie, {}), x(Da, { ...r3, command: o2.getCommand("formatFontFamily") }), x(pa, { ...r3, command: o2.getCommand("formatFontSize") }), x(le, { ...t3, command: o2.getCommand("formatBoldToggle"), icon: x(Do, {}) }), x(le, { ...t3, command: o2.getCommand("formatItalicToggle"), icon: x(Mo, {}) }), x(Ra, { ...r3 }), x(Ma, { ...r3 }), a3, x(ie, {}), s3, x(sa, { ...r3 }), x(da, { ...r3 }), x(ie, {}), x(Wr, { ...r3 }), x($r, { ...r3 }), x(Or, { ...r3 }), x(Vr, { ...r3 }), x(ie, {}), x(ga, { ...r3 }), x(Aa, { command: o2.getCommand("formatCellStyle"), ...r3 }), x(Va, { command: o2.getCommand("formatTableStyle"), ...r3 }), x(ie, {}), x(xa, { ...r3 }), x(ba, { ...r3 }), x(ie, {}), x(fa, { ...r3 }), null, x(ha, { ...r3 }), x(ka, { ...r3 }), c2, m2] });
1623
+ return b(Sl, { parentFloat: n2, children: [d2, null, d2 ? x(ie, {}) : null, x(Fa, { ...r3, command: o2.getCommand("paste") }), x(le, { ...t3, command: o2.getCommand("formatPainterToggle"), icon: ae(x(To, {})) }), x(Qa, { ...t3, command: o2.getCommand("copy") }), x(ie, {}), x(Pa, { ...r3, command: o2.getCommand("formatFontFamily") }), x(ga, { ...r3, command: o2.getCommand("formatFontSize") }), x(le, { ...t3, command: o2.getCommand("formatBoldToggle"), icon: x(Do, {}) }), x(le, { ...t3, command: o2.getCommand("formatItalicToggle"), icon: x(Ro, {}) }), x(Ba, { ...r3 }), x(Ma, { ...r3 }), a3, x(ie, {}), s3, x(ca, { ...r3 }), x(ma, { ...r3 }), x(ie, {}), x(Or, { ...r3 }), x(Vr, { ...r3 }), x(Gr, { ...r3 }), x(Ur, { ...r3 }), x(ie, {}), x(fa, { ...r3 }), x(La, { command: o2.getCommand("formatCellStyle"), ...r3 }), x(Ua, { command: o2.getCommand("formatTableStyle"), ...r3 }), x(ie, {}), x(ya, { ...r3 }), x(wa, { ...r3 }), x(ie, {}), x(ba, { ...r3 }), null, x(xa, { ...r3 }), x(Ca, { ...r3 }), c2, m2] });
1658
1624
  }, [o2, l2]);
1659
1625
  return x(wo, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: r2, createToolbarPalette: s2, ...a2 });
1660
- })), Ll = k(S((e2, t2) => {
1661
- const { commands: o2, parentFloat: n2, commandButtonProps: r2, ...a2 } = e2, l2 = On((e3) => {
1626
+ })), El = S(k((e2, t2) => {
1627
+ const { commands: o2, parentFloat: n2, commandButtonProps: r2, ...a2 } = e2, l2 = Gn((e3) => {
1662
1628
  const { commandButtonProps: t3, commandPopupProps: r3 } = e3;
1663
- return b(Cl, { parentFloat: n2, children: [null, x(le, { ...t3, command: o2.getCommand("updateHyperlink"), icon: ae(x(Ro, {})) }), x(le, { ...t3, command: o2.getCommand("updateComments"), icon: ae(x(Po, {})) }), x(Za, { ...r3 }), x(le, { ...t3, command: o2.getCommand("insertTable"), icon: ae(x(io, {})) })] });
1629
+ return b(Sl, { parentFloat: n2, children: [null, x(le, { ...t3, command: o2.getCommand("updateHyperlink"), icon: ae(x(Po, {})) }), x(le, { ...t3, command: o2.getCommand("updateComments"), icon: ae(x(Mo, {})) }), x(Ya, { ...r3 }), x(le, { ...t3, command: o2.getCommand("insertTable"), icon: ae(x(io, {})) })] });
1664
1630
  }, [o2]);
1665
1631
  return x(wo, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: r2, createToolbarPalette: l2, ...a2 });
1666
- })), Hl = k(S((e2, t2) => {
1667
- const { commands: o2, parentFloat: n2, commandButtonProps: r2, ...a2 } = e2, l2 = On((e3) => {
1632
+ })), Il = S(k((e2, t2) => {
1633
+ const { commands: o2, parentFloat: n2, commandButtonProps: r2, ...a2 } = e2, l2 = Gn((e3) => {
1668
1634
  const { commandButtonProps: t3, commandPopupProps: r3 } = e3;
1669
- return b(Cl, { parentFloat: n2, children: [x(ca, { ...r3 }), x(le, { ...t3, command: o2.getCommand("protectionSheetToggle"), icon: x(Nn, { color: "secondary" }) }), x(ie, {}), x(wa, { ...r3 }), x(Ba, { ...r3 }), x(ie, {}), x(le, { ...t3, command: o2.getCommand("sheetViewToggleFormulaView"), scope: "view", icon: x(ht, { command: o2.getCommand("sheetViewToggleFormulaView"), scope: "view" }) }), x(le, { ...t3, command: o2.getCommand("sheetViewToggleShowZeros"), scope: "view", icon: x(ht, { command: o2.getCommand("sheetViewToggleShowZeros"), scope: "view" }) }), x(ie, {}), x(Fa, { ...r3 }), x(qa, { command: o2.getCommand("selectTheme"), ...r3 }), x(ie, {}), x(Al, { ...r3, scope: "view" }), x(ie, {}), x(le, { ...t3, command: o2.getCommand("fullScreenToggle"), scope: "view", icon: () => ae(o2.getCommand("fullScreenToggle").state() ? x(Bo, {}) : x(Fo, {})) })] });
1635
+ return b(Sl, { parentFloat: n2, children: [x(pa, { ...r3 }), x(le, { ...t3, command: o2.getCommand("protectionSheetToggle"), icon: x(En, { color: "secondary" }) }), x(ie, {}), x(ka, { ...r3 }), x(Na, { ...r3 }), x(ie, {}), x(le, { ...t3, command: o2.getCommand("sheetViewToggleFormulaView"), scope: "view", icon: x(ht, { command: o2.getCommand("sheetViewToggleFormulaView"), scope: "view" }) }), x(le, { ...t3, command: o2.getCommand("sheetViewToggleShowZeros"), scope: "view", icon: x(ht, { command: o2.getCommand("sheetViewToggleShowZeros"), scope: "view" }) }), x(ie, {}), x(Aa, { ...r3 }), x(Xa, { command: o2.getCommand("selectTheme"), ...r3 }), x(ie, {}), x(Nl, { ...r3, scope: "view" }), x(ie, {}), x(le, { ...t3, command: o2.getCommand("fullScreenToggle"), scope: "view", icon: () => ae(o2.getCommand("fullScreenToggle").state() ? x(Bo, {}) : x(Fo, {})) })] });
1670
1636
  }, [o2]);
1671
1637
  return x(wo, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: r2, createToolbarPalette: l2, ...a2 });
1672
- })), zl = (e2) => x(Vl, { ...e2 }), Wl = k((e2) => {
1638
+ })), Ll = (e2) => x($l, { ...e2 }), Hl = S((e2) => {
1673
1639
  const { sx: t2, ...o2 } = e2;
1674
- return b(A, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (e3) => `${ar(e3.palette.primary.main, 0.35)} solid 2px` } }, children: [x(ee, { disableRipple: true, onMouseDown: (e3) => {
1640
+ return b(E, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (e3) => `${ir(e3.palette.primary.main, 0.35)} solid 2px` } }, children: [x(ee, { disableRipple: true, onMouseDown: (e3) => {
1675
1641
  0 === e3.button && e3.preventDefault();
1676
- }, sx: { textTransform: "none", flex: "1 1 100%", fontWeight: (e3) => e3.typography.fontWeightRegular, padding: "2px 6px", minHeight: "0px", minWidth: "0px", marginRight: (e3) => e3.spacing(0.5), "&.Mui-selected": {}, "&.Mui-focusVisible": {}, ...t2 }, ...o2 }), x(A, { className: "indicator", sx: { width: "90%", borderRadius: "4px", minWidth: "4px", position: "absolute", bottom: "0", alignSelf: "center", display: "flex" } })] });
1677
- }), $l = k((e2) => {
1642
+ }, sx: { textTransform: "none", flex: "1 1 100%", fontWeight: (e3) => e3.typography.fontWeightRegular, padding: "2px 6px", minHeight: "0px", minWidth: "0px", marginRight: (e3) => e3.spacing(0.5), "&.Mui-selected": {}, "&.Mui-focusVisible": {}, ...t2 }, ...o2 }), x(E, { className: "indicator", sx: { width: "90%", borderRadius: "4px", minWidth: "4px", position: "absolute", bottom: "0", alignSelf: "center", display: "flex" } })] });
1643
+ }), zl = S((e2) => {
1678
1644
  const { toolbars: t2, value: o2, onToolbarChange: n2, sx: r2, ...a2 } = e2, l2 = C(() => {
1679
1645
  const e3 = [];
1680
- for (let o3 = 0; o3 < t2.length; o3++) e3.push(x(Wl, { label: t2[o3].label }, t2[o3].label));
1646
+ for (let o3 = 0; o3 < t2.length; o3++) e3.push(x(Hl, { label: t2[o3].label }, t2[o3].label));
1681
1647
  return e3;
1682
1648
  }, [t2]);
1683
1649
  return x(Q, { value: o2, onChange: (e3, t3) => {
1684
1650
  n2?.(t3);
1685
1651
  }, variant: "scrollable", scrollButtons: false, sx: { paddingLeft: (e3) => e3.spacing(1.5), paddingRight: (e3) => e3.spacing(1.5), paddingTop: (e3) => e3.spacing(0), paddingBottom: (e3) => e3.spacing(0), minHeight: "26px", alignItems: "center", "& .MuiTabs-indicator": { display: "flex", justifyContent: "center", backgroundColor: "transparent" }, "& .MuiTabs-indicatorSpan": { width: "90%", borderRadius: "4px", minWidth: "4px", backgroundColor: (e3) => e3.palette.primary.main }, "& .MuiTab-root": { marginRight: "0px" }, ...r2 }, TabIndicatorProps: { children: x("span", { className: "MuiTabs-indicatorSpan" }) }, ...a2, children: l2 });
1686
- }), Ol = k((e2) => {
1652
+ }), Wl = S((e2) => {
1687
1653
  const { toolbars: t2, value: o2, onToolbarChange: n2, selectProps: r2, ...a2 } = e2, l2 = v((e3) => {
1688
1654
  n2?.(e3.target.value);
1689
1655
  }, [n2]), i2 = C(() => {
@@ -1696,29 +1662,29 @@ const Al = k(S((e2, t2) => {
1696
1662
  }
1697
1663
  return e3;
1698
1664
  }, [t2, o2]);
1699
- return x(j, { sx: { minWidth: "125px", maxWidth: "125px", "& .MuiInputBase-root": { paddingLeft: "0px", paddingRight: "0px" }, "& .MuiSelect-select": { paddingTop: (e3) => e3.spacing(0.5), paddingBottom: (e3) => e3.spacing(0.5), paddingLeft: (e3) => e3.spacing(2), color: (e3) => e3.palette.primary.main }, "& .MuiSelect-icon": { fill: (e3) => e3.palette.text.icon ?? e3.palette.action.active, "&:hover:not(.Mui-disabled)": { color: (e3) => e3.palette.text.icon ?? e3.palette.action.active } }, ...r2 }, size: "small", children: x(Y, { value: o2, onChange: l2, variant: "outlined", sx: { backgroundImage: `linear-gradient(${ar("#fff", lr(5))}, ${ar("#fff", lr(5))})` }, ...a2, children: i2 }) });
1700
- }), Vl = k(S((e2, t2) => {
1665
+ return x(j, { sx: { minWidth: "125px", maxWidth: "125px", "& .MuiInputBase-root": { paddingLeft: "0px", paddingRight: "0px" }, "& .MuiSelect-select": { paddingTop: (e3) => e3.spacing(0.5), paddingBottom: (e3) => e3.spacing(0.5), paddingLeft: (e3) => e3.spacing(2), color: (e3) => e3.palette.primary.main }, "& .MuiSelect-icon": { fill: (e3) => e3.palette.text.icon ?? e3.palette.action.active, "&:hover:not(.Mui-disabled)": { color: (e3) => e3.palette.text.icon ?? e3.palette.action.active } }, ...r2 }, size: "small", children: x(Y, { value: o2, onChange: l2, variant: "outlined", sx: { backgroundImage: `linear-gradient(${ir("#fff", sr(5))}, ${ir("#fff", sr(5))})` }, ...a2, children: i2 }) });
1666
+ }), $l = S(k((e2, t2) => {
1701
1667
  const { commands: o2, selectWrapper: n2, selectProps: r2 = {}, renderCompact: a2 = false, paletteWrapper: l2, toolbarsProps: i2, paletteProps: s2 = {}, workbook: d2, sx: c2, ...m2 } = e2, p2 = C(() => {
1702
1668
  const e3 = [], { ref: t3, ...n3 } = i2?.Home || {};
1703
- e3.push({ label: "Home", component: x(Il, { commands: o2, ...n3 }) });
1669
+ e3.push({ label: "Home", component: x(Al, { commands: o2, ...n3 }) });
1704
1670
  const { ref: r3, ...a3 } = i2?.Insert || {};
1705
- e3.push({ label: "Insert", component: x(Ll, { commands: o2, ...a3 }) });
1671
+ e3.push({ label: "Insert", component: x(El, { commands: o2, ...a3 }) });
1706
1672
  const { ref: l3, ...s3 } = i2?.View || {};
1707
- return e3.push({ label: "View", component: x(Hl, { commands: o2, ...s3 }) }), e3;
1673
+ return e3.push({ label: "View", component: x(Il, { commands: o2, ...s3 }) }), e3;
1708
1674
  }, [o2]), u2 = C(() => {
1709
1675
  const e3 = [];
1710
1676
  for (let t3 = 0; t3 < p2.length; t3++) e3.push(w.cloneElement(p2[t3].component, { ...p2[t3].component.props, key: p2[t3].key ?? p2[t3].label }));
1711
1677
  return e3;
1712
1678
  }, [p2]), [g2, h2] = D(0), f2 = (e3) => {
1713
1679
  h2(e3);
1714
- }, y2 = C(() => x(a2 ? Ol : $l, { toolbars: p2, value: g2, onToolbarChange: f2, sx: r2 }), [p2, g2, r2, a2]), { sx: k2, ...S2 } = s2, v2 = x(X, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, backgroundImage: `linear-gradient(${ar("#fff", lr(5))}, ${ar("#fff", lr(5))})`, marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1), marginTop: (e3) => e3.spacing(0.5), marginBottom: (e3) => e3.spacing(0.5), ...k2 }, ...S2, children: u2[g2] });
1715
- return b(A, { ref: t2, className: "toolbarWrappers", sx: { display: "flex", flexDirection: "column", paddingTop: (e3) => e3.spacing(0.5), "*": { userSelect: "none" }, ...c2 }, ...m2, children: [n2 ? n2(y2) : y2, l2 ? l2(v2) : v2] });
1716
- })), Gl = (e2) => x(cl, { ...e2 }), Ul = (e2) => x(ml, { ...e2 }), jl = (e2) => x(dl, { ...e2 }), _l = k(S((e2, t2) => {
1717
- const { workbook: o2, commands: n2, onBeforeUserChange: r2, onUserChange: a2, disabled: l2 = false, readOnly: i2 = false, contextMenuProps: s2, renderContextMenu: d2 = Gl, sheetsAllProps: c2, renderSheetsAll: m2 = Ul, sheetTabProps: p2, renderSheetTab: u2, background: g2 = "transparent", className: h2, notifier: f2, sx: y2, borderWidth: w2, borderColor: k2, gridTheme: S2, gridStyle: T2, ...R2 } = e2, [B2, F2] = D(o2?.getSelectedSheetIndex()), [N2, E2] = D(o2?.getSheets().search()), [I2, H2] = D(o2?.getProtection());
1718
- mr(o2, { onViewChange(e3) {
1680
+ }, y2 = C(() => x(a2 ? Wl : zl, { toolbars: p2, value: g2, onToolbarChange: f2, sx: r2 }), [p2, g2, r2, a2]), { sx: S2, ...k2 } = s2, v2 = x(X, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, backgroundImage: `linear-gradient(${ir("#fff", sr(5))}, ${ir("#fff", sr(5))})`, marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1), marginTop: (e3) => e3.spacing(0.5), marginBottom: (e3) => e3.spacing(0.5), ...S2 }, ...k2, children: u2[g2] });
1681
+ return b(E, { ref: t2, className: "toolbarWrappers", sx: { display: "flex", flexDirection: "column", paddingTop: (e3) => e3.spacing(0.5), "*": { userSelect: "none" }, ...c2 }, ...m2, children: [n2 ? n2(y2) : y2, l2 ? l2(v2) : v2] });
1682
+ })), Ol = (e2) => x(pl, { ...e2 }), Vl = (e2) => x(ul, { ...e2 }), Gl = (e2) => x(ml, { ...e2 }), Ul = S(k((e2, t2) => {
1683
+ const { workbook: o2, commands: n2, onBeforeUserChange: r2, onUserChange: a2, disabled: l2 = false, readOnly: i2 = false, contextMenuProps: s2, renderContextMenu: d2 = Ol, sheetsAllProps: c2, renderSheetsAll: m2 = Vl, sheetTabProps: p2, renderSheetTab: u2, background: g2 = "transparent", className: h2, notifier: f2, sx: y2, borderWidth: w2, borderColor: S2, gridTheme: k2, gridStyle: T2, ...P2 } = e2, [B2, F2] = D(o2?.getSelectedSheetIndex()), [N2, A2] = D(o2?.getSheets().getItems()), [I2, H2] = D(o2?.getProtection());
1684
+ ur(o2, { onViewChange(e3) {
1719
1685
  F2(e3?.getSelectedSheetIndex());
1720
1686
  }, onSheetsChange: (e3) => {
1721
- E2(e3.getSheets().search());
1687
+ A2(e3.getSheets().getItems());
1722
1688
  }, onProtectionChange: (e3) => {
1723
1689
  H2(e3?.getProtection());
1724
1690
  } });
@@ -1732,38 +1698,38 @@ const Al = k(S((e2, t2) => {
1732
1698
  o2.getSheetAt(e3).setName(t3), a2?.(e3);
1733
1699
  }, [o2, a2]), V2 = v((e3, t3) => {
1734
1700
  o2.getSheetAt(e3).setPosition(t3), a2?.(t3);
1735
- }, [o2, a2]), G2 = On(() => {
1701
+ }, [o2, a2]), G2 = Gn(() => {
1736
1702
  if (false === r2?.(B2)) return;
1737
1703
  const e3 = B2 + 1;
1738
1704
  o2.getSheets().add({ name: void 0, autoSelect: true }), a2?.(e3);
1739
- }, [o2, r2, a2, B2]), U2 = C(() => ({ placement: "top-start" }), []), j2 = P(null), [_2, q2] = D(false), K2 = v((e3) => {
1705
+ }, [o2, r2, a2, B2]), U2 = C(() => ({ placement: "top-start" }), []), j2 = M(null), [_2, q2] = D(false), K2 = v((e3) => {
1740
1706
  const { closeFloatAll: t3, floatReference: n3 } = e3;
1741
1707
  return m2({ workbook: o2, gridStyle: T2, floatReference: n3, closeFloatAll: t3, ...c2 });
1742
- }, [m2, c2, l2, o2, T2]), { reference: X2, component: Z2 } = no({ label: "allSheet", popperProps: U2, anchor: j2.current, onOpen: () => q2(true), onClose: () => q2(false), createPopupPanel: K2 }), J2 = P(null), [Y2, Q2] = D(null), ee2 = v((e3) => {
1708
+ }, [m2, c2, l2, o2, T2]), { reference: X2, component: Z2 } = no({ label: "allSheet", popperProps: U2, anchor: j2.current, onOpen: () => q2(true), onClose: () => q2(false), createPopupPanel: K2 }), J2 = M(null), [Y2, Q2] = D(null), ee2 = v((e3) => {
1743
1709
  const { floatReference: t3 } = e3;
1744
1710
  return d2?.({ workbook: o2, index: Y2?.index, tabStripRef: J2.current, commands: n2, disabled: l2, floatReference: t3, ...s2 });
1745
1711
  }, [d2, s2, l2, o2, n2, Y2]), { reference: te2, component: oe2 } = no({ label: "sheetTab", popperProps: U2, anchor: { getBoundingClientRect: () => new DOMRect(Y2?.left || 0, Y2?.top || 0, 0, 0) }, onClose: () => Q2(null), createPopupPanel: ee2 });
1746
- M(() => {
1712
+ R(() => {
1747
1713
  Y2 ? te2.open(0) : te2.close(0);
1748
1714
  }, [Y2]);
1749
1715
  const ne2 = v((e3, t3) => {
1750
1716
  e3.preventDefault(), Q2({ left: e3.clientX - 2, top: e3.clientY - 4, index: t3 });
1751
- }, []), re2 = On((e3) => {
1717
+ }, []), re2 = Gn((e3) => {
1752
1718
  let t3;
1753
1719
  try {
1754
1720
  t3 = o2?.getSheetAt(e3.index);
1755
1721
  } catch (e4) {
1756
1722
  }
1757
1723
  if (!t3) return null;
1758
- return (u2 ?? jl)({ sheet: t3, gridTheme: S2, onContextMenu: (t4) => {
1724
+ return (u2 ?? Gl)({ sheet: t3, gridTheme: k2, onContextMenu: (t4) => {
1759
1725
  $2(e3.index), ne2(t4, e3.index);
1760
1726
  }, ...e3, ...p2 });
1761
- }, [u2, p2, o2, S2]), ae2 = C(() => z2 ? null : x(De, { disableInteractive: true, title: "New sheet", children: x(L, { disabled: l2, component: "div", sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, color: (e3) => e3.palette.text.icon ?? e3.palette.action.active, "& svg": { width: "18px", height: "18px" } }, "aria-label": "addTab", size: "small", onMouseDown: (e3) => {
1727
+ }, [u2, p2, o2, k2]), ae2 = C(() => z2 ? null : x(De, { disableInteractive: true, title: "New sheet", children: x(L, { disabled: l2, component: "div", sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, color: (e3) => e3.palette.text.icon ?? e3.palette.action.active, "& svg": { width: "18px", height: "18px" } }, "aria-label": "addTab", size: "small", onMouseDown: (e3) => {
1762
1728
  0 === e3.button && e3.preventDefault();
1763
- }, onClick: () => G2(), children: x(Ln, {}) }) }), [l2, z2, G2]);
1764
- return b(A, { ref: t2, className: yn(h2), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...y2 }, ...R2, children: [x(hr, { ref: J2, selectedTabIndex: B2, tabNames: W2, onSelectedTabIndexChange: $2, onTabNameChange: O2, onTabMove: V2, background: g2, borderColor: k2, borderWidth: w2, activeColor: null, disabled: l2, disableDrag: z2, createScrollStartButton: Ao, createScrollEndButton: Eo, createScrollEdgeButton: No, createTabButton: re2, createTabDivider: (e3) => {
1729
+ }, onClick: () => G2(), children: x(zn, {}) }) }), [l2, z2, G2]);
1730
+ return b(E, { ref: t2, className: Sn(h2), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...y2 }, ...P2, children: [x(xr, { ref: J2, selectedTabIndex: B2, tabNames: W2, onSelectedTabIndexChange: $2, onTabNameChange: O2, onTabMove: V2, background: g2, borderColor: S2, borderWidth: w2, activeColor: null, disabled: l2, disableDrag: z2, createScrollStartButton: Eo, createScrollEndButton: Ao, createScrollEdgeButton: No, createTabButton: re2, createTabDivider: (e3) => {
1765
1731
  const { key: t3, ...o3 } = e3;
1766
- return x(ie, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (e4) => ar(e4.palette.divider, 0.25) }, ...o3 }, t3);
1732
+ return x(ie, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (e4) => ir(e4.palette.divider, 0.25) }, ...o3 }, t3);
1767
1733
  }, editLabelProps: { readOnly: z2, maxLength: 31, styleHover: { fontWeight: "700" }, onKeyPress: (e3) => {
1768
1734
  o2.isValidSheetNameCharacter(e3.key) || e3.preventDefault();
1769
1735
  }, onCancel: () => {
@@ -1772,52 +1738,52 @@ const Al = k(S((e2, t2) => {
1772
1738
  0 === e3.button && e3.preventDefault();
1773
1739
  }, onClick: () => {
1774
1740
  _2 ? X2.close(0) : X2.open(0);
1775
- }, icon: x(Hn, {}) }) }) }), x("div", { style: { borderTop: `solid ${k2} ${w2}px`, minWidth: "4px" } }), x("div", { style: { borderTop: `solid ${k2} ${w2}px`, flex: "none", display: "flex", alignItems: "center" }, children: ae2 }), x("div", { style: { borderTop: `solid ${k2} ${w2}px`, flex: 1, minWidth: "24px" } }), oe2, Z2] });
1741
+ }, icon: x(Wn, {}) }) }) }), x("div", { style: { borderTop: `solid ${S2} ${w2}px`, minWidth: "4px" } }), x("div", { style: { borderTop: `solid ${S2} ${w2}px`, flex: "none", display: "flex", alignItems: "center" }, children: ae2 }), x("div", { style: { borderTop: `solid ${S2} ${w2}px`, flex: 1, minWidth: "24px" } }), oe2, Z2] });
1776
1742
  }));
1777
- _l.displayName = "WorkbookStrip";
1778
- const ql = k(S((e2, t2) => {
1743
+ Ul.displayName = "WorkbookStrip";
1744
+ const jl = S(k((e2, t2) => {
1779
1745
  const { workbook: o2, commands: n2, disabled: r2, sx: a2, floatReference: l2, className: i2, ...s2 } = e2, [d2, c2] = F((e3) => e3 + 1, 0), [m2, p2] = D(o2.getSelectedSheet()), [u2, g2] = D(m2.getSelectedRanges()), [h2, f2] = D(m2.getSelectedCell());
1780
- mr(o2, { onSheetsChange() {
1746
+ ur(o2, { onSheetsChange() {
1781
1747
  p2(o2.getSelectedSheet());
1782
- } }), mr(m2.getSelection(), { onChange() {
1748
+ } }), ur(m2.getSelection(), { onChange() {
1783
1749
  g2(m2.getSelectedRanges()), f2(m2.getSelectedCell());
1784
- } }), Wn(n2, [], { onChange: () => {
1750
+ } }), On(n2, [], { onChange: () => {
1785
1751
  c2();
1786
1752
  } });
1787
- const w2 = C(() => ({}), []), k2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
1753
+ const w2 = C(() => ({}), []), S2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
1788
1754
  }, onError() {
1789
1755
  console.log("onError");
1790
- } }, disabled: r2, scope: "contextMenu", parentFloat: l2 }), [r2, l2]), S2 = C(() => ({ ...w2, ...k2, variant: $n.Menuitem }), [w2, k2]), v2 = C(() => ({ commands: n2, variant: $n.Menuitem, parentFloat: l2, ...k2 }), [n2, k2, l2]), T2 = [];
1791
- let M2 = u2.isEntireRows(), R2 = u2.isEntireColumns();
1792
- u2 && (M2 && (T2.push(x(ie, { orientation: "horizontal" }, "context:" + T2.length)), T2.push(B(le, { command: n2.getCommand("hideColumns"), ...S2, icon: ae(x(Io, {})), key: "context:" + T2.length })), T2.push(B(le, { command: n2.getCommand("unhideColumns"), ...S2, icon: ae(x(Lo, {})), key: "context:" + T2.length }))), R2 && (T2.push(x(ie, { orientation: "horizontal" }, "context:" + T2.length)), T2.push(B(le, { command: n2.getCommand("hideRows"), ...S2, icon: ae(x(Ho, {})), key: "context:" + T2.length })), T2.push(B(le, { command: n2.getCommand("unhideRows"), ...S2, icon: ae(x(zo, {})), key: "context:" + T2.length }))), (M2 || R2) && T2.push(x(ie, { orientation: "horizontal" }, "context:" + T2.length)), M2 && T2.push(B(le, { command: n2.getCommand("autoFitColumns"), ...S2, icon: ae(x(Wo, {})), key: "context:" + T2.length })), R2 && T2.push(B(le, { command: n2.getCommand("autoFitRows"), ...S2, icon: ae(x($o, {})), key: "context:" + T2.length })));
1793
- const P2 = [], N2 = n2.getCommand("formatTableStyle"), E2 = N2?.context()?.table();
1794
- if (Un(N2), !M2 && !R2) {
1795
- if (P2.push(x(ie, { orientation: "horizontal" }, "contextBefore:" + P2.length)), h2?.getHyperlink()) P2.push(B(Jt, { ...v2, popupCommandKeys: ["updateHyperlink", "deleteHyperlink"], popupScope: "hyperlink", key: "contextBefore:action" + P2.length, quickCommand: "openHyperlink", icon: (e3) => "openHyperlink" === e3.key() ? ae(x(Ro, {})) : null }));
1756
+ } }, disabled: r2, scope: "contextMenu", parentFloat: l2 }), [r2, l2]), k2 = C(() => ({ ...w2, ...S2, variant: Vn.Menuitem }), [w2, S2]), v2 = C(() => ({ commands: n2, variant: Vn.Menuitem, parentFloat: l2, ...S2 }), [n2, S2, l2]), T2 = [];
1757
+ let R2 = u2.isEntireRows(), P2 = u2.isEntireColumns();
1758
+ u2 && (R2 && (T2.push(x(ie, { orientation: "horizontal" }, "context:" + T2.length)), T2.push(B(le, { command: n2.getCommand("hideColumns"), ...k2, icon: ae(x(Io, {})), key: "context:" + T2.length })), T2.push(B(le, { command: n2.getCommand("unhideColumns"), ...k2, icon: ae(x(Lo, {})), key: "context:" + T2.length }))), P2 && (T2.push(x(ie, { orientation: "horizontal" }, "context:" + T2.length)), T2.push(B(le, { command: n2.getCommand("hideRows"), ...k2, icon: ae(x(Ho, {})), key: "context:" + T2.length })), T2.push(B(le, { command: n2.getCommand("unhideRows"), ...k2, icon: ae(x(zo, {})), key: "context:" + T2.length }))), (R2 || P2) && T2.push(x(ie, { orientation: "horizontal" }, "context:" + T2.length)), R2 && T2.push(B(le, { command: n2.getCommand("autoFitColumns"), ...k2, icon: ae(x(Wo, {})), key: "context:" + T2.length })), P2 && T2.push(B(le, { command: n2.getCommand("autoFitRows"), ...k2, icon: ae(x($o, {})), key: "context:" + T2.length })));
1759
+ const M2 = [], N2 = n2.getCommand("formatTableStyle"), A2 = N2?.context()?.table();
1760
+ if (_n(N2), !R2 && !P2) {
1761
+ if (M2.push(x(ie, { orientation: "horizontal" }, "contextBefore:" + M2.length)), h2?.getHyperlink()) M2.push(B(Jt, { ...v2, popupCommandKeys: ["updateHyperlink", "deleteHyperlink"], popupScope: "hyperlink", key: "contextBefore:action" + M2.length, quickCommand: "openHyperlink", icon: (e3) => "openHyperlink" === e3.key() ? ae(x(Po, {})) : null }));
1796
1762
  else {
1797
1763
  const e3 = n2.getCommand("updateHyperlink");
1798
- P2.push(B(le, { command: e3, ...S2, icon: ae(x(Ro, {})), key: "contextBefore:" + P2.length }));
1764
+ M2.push(B(le, { command: e3, ...k2, icon: ae(x(Po, {})), key: "contextBefore:" + M2.length }));
1799
1765
  }
1800
- if (h2?.getComments()) P2.push(B(Jt, { ...v2, popupCommandKeys: ["deleteComments"], key: "contextBefore:action" + P2.length, quickCommand: "updateComments", icon: (e3) => "updateComments" === e3.key() ? ae(x(Po, {})) : null }));
1766
+ if (h2?.getComments()) M2.push(B(Jt, { ...v2, popupCommandKeys: ["deleteComments"], key: "contextBefore:action" + M2.length, quickCommand: "updateComments", icon: (e3) => "updateComments" === e3.key() ? ae(x(Mo, {})) : null }));
1801
1767
  else {
1802
1768
  const e3 = n2.getCommand("updateComments");
1803
- P2.push(B(le, { command: e3, ...S2, icon: ae(x(Po, {})), key: "contextBefore:" + P2.length }));
1769
+ M2.push(B(le, { command: e3, ...k2, icon: ae(x(Mo, {})), key: "contextBefore:" + M2.length }));
1804
1770
  }
1805
- E2 ? P2.push(B(Jt, { ...v2, variant: $n.Menuitem, key: "contextBefore:" + P2.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: E2, quickCommand: "editTable", icon: (e3) => {
1771
+ A2 ? M2.push(B(Jt, { ...v2, variant: Vn.Menuitem, key: "contextBefore:" + M2.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: A2, quickCommand: "editTable", icon: (e3) => {
1806
1772
  e3.key();
1807
1773
  return ae(x(io, {}));
1808
- } })) : P2.push(B(le, { command: n2.getCommand("insertTable"), ...S2, icon: ae(x(io, {})), key: "context:" + T2.length })), P2.push(B(Za, { ...v2, key: "contextBefore:" + P2.length }));
1774
+ } })) : M2.push(B(le, { command: n2.getCommand("insertTable"), ...k2, icon: ae(x(io, {})), key: "context:" + T2.length })), M2.push(B(Ya, { ...v2, key: "contextBefore:" + M2.length }));
1809
1775
  }
1810
- const I2 = b(y, { children: [x(le, { command: n2.getCommand("cut"), ...S2, icon: x(Oo, {}) }), x(Ja, { command: n2.getCommand("copy"), ...S2 }), x(Pa, { command: n2.getCommand("paste"), ...v2, includePasteAllInPopup: false }), x(ie, { orientation: "horizontal" }), x(ka, { ...v2 }), x(ie, { orientation: "horizontal" }), x(xa, { commands: n2, ...v2, disableSheet: true }), x(ba, { commands: n2, ...v2, disableSheet: true }), x(ha, { ...v2 }), P2, T2] });
1811
- return x(A, { ref: t2, className: yn("menu", i2), sx: { ...a2 }, ...s2, children: I2 });
1776
+ const I2 = b(y, { children: [x(le, { command: n2.getCommand("cut"), ...k2, icon: x(Oo, {}) }), x(Qa, { command: n2.getCommand("copy"), ...k2 }), x(Fa, { command: n2.getCommand("paste"), ...v2, includePasteAllInPopup: false }), x(ie, { orientation: "horizontal" }), x(Ca, { ...v2 }), x(ie, { orientation: "horizontal" }), x(ya, { commands: n2, ...v2, disableSheet: true }), x(wa, { commands: n2, ...v2, disableSheet: true }), x(xa, { ...v2 }), M2, T2] });
1777
+ return x(E, { ref: t2, className: Sn("menu", i2), sx: { ...a2 }, ...s2, children: I2 });
1812
1778
  }));
1813
- ql.displayName = "WorkbookContextMenu";
1814
- const Kl = (e2) => {
1815
- const { workbook: t2, workbookElement: o2, notifier: n2, commandTarget: r2, commands: a2, darkMode: l2, onShowSidebar: i2, onNewWorkbook: s2 = Xl } = e2, [d2, c2] = D(t2?.getSelectedSheet()), [m2, p2] = D(t2?.getSheets().search()), g2 = On(i2, [i2]), h2 = On(s2, [s2]), f2 = C(() => [new Jn("workbookStatistics", r2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Qn.Ctrl, Qn.Shift] } }), new Jn("showFormat", r2, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [Qn.Ctrl, Qn.Shift] } }), new Yn("newCellStyle", r2, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later." }), new Yn("deleteCellStyle", r2, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new Yn("modifyCellStyle", r2, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new Jn("find", r2, { label: "Find", description: "Open the Find window.", shortcut: [{ key: "F", modifiers: [Qn.Ctrl] }, { key: "F5", modifiers: [Qn.Shift] }] }), new Jn("findReplace", r2, { label: "Find & Replace", description: "Open the Find & Replace window.", shortcut: [{ key: "H", modifiers: [Qn.Ctrl] }, { key: "H", modifiers: [Qn.Ctrl, Qn.Alt] }] }), new Jn("goto", r2, { label: "Go To", description: "Open the 'Go To' window.", shortcut: [{ key: "G", modifiers: [Qn.Ctrl] }] }), new Jn("workbookViewToggleExpandFormulaBar", r2, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [Qn.Ctrl, Qn.Shift] } }), new Jn("workbookViewToggleShowFormulaBar", r2, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new Jn("workbookViewToggleShowTabs", r2, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new Jn("workbookViewToggleShowStatusBar", r2, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new Jn("workbookViewToggleShowHorizontalScrollBar", r2, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new Jn("workbookViewToggleShowVerticalScrollBar", r2, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new Yn("hideSheet", r2, { label: "Hide Sheet", scopedLabels: { sheet: "Hide" }, description: "Hide the sheet from appearing in the tabs. This keeps the data but de-clutters the tabs." }), new Yn("deleteSheet", r2, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new Yn("addSheet", r2, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [Qn.Shift] }, { key: "F1", modifiers: [Qn.Alt, Qn.Shift] }] }), new Yn("duplicateSheet", r2, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new Yn("nextSheet", r2, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Qn.Ctrl] }] }), new Yn("previousSheet", r2, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Qn.Ctrl] }] }), new Yn("selectNextSheet", r2, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Qn.Ctrl, Qn.Shift] }] }), new Yn("selectPreviousSheet", r2, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Qn.Ctrl, Qn.Shift] }] }), new Yn("selectTheme", r2, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new Yn("selectNamed", r2, { label: (e3) => e3?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (e3) => e3?.getName() ?? "Select" }, description: "Select the item." }), new Yn("addNamedReference", r2, { label: "Define Named Reference", scopedLabels: { namedItem: "Define Name…" }, description: "Add a new named reference. Names can be used as a substitute for cell references." }), new Yn("editNamedReference", r2, { label: "Edit Named Reference…", scopedLabels: { namedItem: "Edit…" }, description: "Add a new named reference. Names can be used as a substitute for cell references." }), new Yn("deleteNamedReference", r2, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference." }), new Jn("activeNameBox", r2, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [Qn.Alt] } }), new Jn("createNamedReferenceFromSelection", r2, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [Qn.Ctrl, Qn.Shift] } }), new Jn("activeNameManager", r2, { label: "Activate Name Manager", description: "Create, edit, delete, and find all the names used in the workbook.\n\nNames can be used as a substitute for cell references.", shortcut: { key: "F3", modifiers: [Qn.Ctrl] } }), new Yn("fullScreenToggle", r2, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" } }), new Yn("showScriptEditor", r2, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", shortcut: [{ key: "F11", modifiers: [Qn.Alt] }] }, function(e3 = true) {
1779
+ jl.displayName = "WorkbookContextMenu";
1780
+ const _l = (e2) => {
1781
+ const { workbook: t2, workbookElement: o2, notifier: n2, commandTarget: r2, commands: a2, darkMode: l2, onShowSidebar: i2, onNewWorkbook: s2 = ql } = e2, [d2, c2] = D(t2?.getSelectedSheet()), [m2, p2] = D(t2?.getSheets().getItems()), g2 = Gn(i2, [i2]), h2 = Gn(s2, [s2]), f2 = C(() => [new Qn("workbookStatistics", r2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [tr.Ctrl, tr.Shift] } }), new Qn("showFormat", r2, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [tr.Ctrl, tr.Shift] } }), new er("newCellStyle", r2, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later." }), new er("deleteCellStyle", r2, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new er("modifyCellStyle", r2, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new Qn("find", r2, { label: "Find", description: "Open the Find window.", shortcut: [{ key: "F", modifiers: [tr.Ctrl] }, { key: "F5", modifiers: [tr.Shift] }] }), new Qn("findReplace", r2, { label: "Find & Replace", description: "Open the Find & Replace window.", shortcut: [{ key: "H", modifiers: [tr.Ctrl] }, { key: "H", modifiers: [tr.Ctrl, tr.Alt] }] }), new Qn("goto", r2, { label: "Go To", description: "Open the 'Go To' window.", shortcut: [{ key: "G", modifiers: [tr.Ctrl] }] }), new Qn("workbookViewToggleExpandFormulaBar", r2, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [tr.Ctrl, tr.Shift] } }), new Qn("workbookViewToggleShowFormulaBar", r2, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new Qn("workbookViewToggleShowTabs", r2, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new Qn("workbookViewToggleShowStatusBar", r2, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new Qn("workbookViewToggleShowHorizontalScrollBar", r2, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new Qn("workbookViewToggleShowVerticalScrollBar", r2, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new er("hideSheet", r2, { label: "Hide Sheet", scopedLabels: { sheet: "Hide" }, description: "Hide the sheet from appearing in the tabs. This keeps the data but de-clutters the tabs." }), new er("deleteSheet", r2, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new er("addSheet", r2, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [tr.Shift] }, { key: "F1", modifiers: [tr.Alt, tr.Shift] }] }), new er("duplicateSheet", r2, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new er("nextSheet", r2, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [tr.Ctrl] }] }), new er("previousSheet", r2, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [tr.Ctrl] }] }), new er("selectNextSheet", r2, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [tr.Ctrl, tr.Shift] }] }), new er("selectPreviousSheet", r2, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [tr.Ctrl, tr.Shift] }] }), new er("selectTheme", r2, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new er("selectNamed", r2, { label: (e3) => e3?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (e3) => e3?.getName() ?? "Select" }, description: "Select the item." }), new er("addNamedReference", r2, { label: "Define Named Reference", scopedLabels: { namedItem: "Define Name…" }, description: "Add a new named reference. Names can be used as a substitute for cell references." }), new er("editNamedReference", r2, { label: "Edit Named Reference…", scopedLabels: { namedItem: "Edit…" }, description: "Add a new named reference. Names can be used as a substitute for cell references." }), new er("deleteNamedReference", r2, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference." }), new Qn("activeNameBox", r2, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [tr.Alt] } }), new Qn("createNamedReferenceFromSelection", r2, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [tr.Ctrl, tr.Shift] } }), new Qn("activeNameManager", r2, { label: "Activate Name Manager", description: "Create, edit, delete, and find all the names used in the workbook.\n\nNames can be used as a substitute for cell references.", shortcut: { key: "F3", modifiers: [tr.Ctrl] } }), new er("fullScreenToggle", r2, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" } }), new er("showScriptEditor", r2, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", shortcut: [{ key: "F11", modifiers: [tr.Alt] }] }, function(e3 = true) {
1816
1782
  g2?.();
1817
- }), new Yn("executeScript", r2, { label: "Run Script", description: "Run the selected or last executed script.", shortcut: { key: "F8" } }), new Yn("executeSelectedScript", r2, { label: "Run Script", description: "Run the selected script.", shortcut: { key: "F8" } }), new Yn("saveScripts", r2, { label: "Save Script", description: "Save the current scripts." }), new Yn("maximumWorkbookToggle", r2, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [Qn.Ctrl] } }), new Yn("spellCheck", r2, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new Yn("calculateAll", r2, { label: "Calculate Now", description: "Recalculate all formulas.", shortcut: { key: "F9" } }), new Jn("calculate", r2, { label: "Calculate Sheet", description: "Recalculate the formulas on the current sheet.", shortcut: { key: "=", modifiers: [Qn.Ctrl] } }), new Jn("closeWorkbook", r2, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [Qn.Ctrl] } }), new Jn("newWorkbook", r2, { label: "New Workbook", description: "Create a new workbook in another tab.", shortcut: { key: "N", modifiers: [Qn.Ctrl] } })], []), x2 = C(() => {
1783
+ }), new er("executeScript", r2, { label: "Run Script", description: "Run the selected or last executed script.", shortcut: { key: "F8" } }), new er("executeSelectedScript", r2, { label: "Run Script", description: "Run the selected script.", shortcut: { key: "F8" } }), new er("saveScripts", r2, { label: "Save Script", description: "Save the current scripts." }), new er("maximumWorkbookToggle", r2, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [tr.Ctrl] } }), new er("spellCheck", r2, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new er("calculateAll", r2, { label: "Calculate Now", description: "Recalculate all formulas.", shortcut: { key: "F9" } }), new Qn("calculate", r2, { label: "Calculate Sheet", description: "Recalculate the formulas on the current sheet.", shortcut: { key: "=", modifiers: [tr.Ctrl] } }), new Qn("closeWorkbook", r2, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [tr.Ctrl] } }), new Qn("newWorkbook", r2, { label: "New Workbook", description: "Create a new workbook in another tab.", shortcut: { key: "N", modifiers: [tr.Ctrl] } })], []), x2 = C(() => {
1818
1784
  let e3 = null;
1819
- return e3 = a2 ? a2.createChildGroup(r2, "workbook", false) : new er(r2, "workbook"), e3.addCommands(f2, true), e3;
1820
- }, [a2, f2]), b2 = jn(), y2 = w.useRef(null), k2 = On(() => {
1785
+ return e3 = a2 ? a2.createChildGroup(r2, "workbook", false) : new or(r2, "workbook"), e3.addCommands(f2, true), e3;
1786
+ }, [a2, f2]), b2 = qn(), y2 = w.useRef(null), S2 = Gn(() => {
1821
1787
  let e3, o3 = null;
1822
1788
  const r3 = x2.getCommand("executeScript");
1823
1789
  if (r3.update({ disabled: false, context: { getScripts: () => t2.getScripts() } }), !r3) return;
@@ -1836,8 +1802,8 @@ const Kl = (e2) => {
1836
1802
  r4?.(), console.warn("Unable to compile", e5), n2?.showError?.(e5);
1837
1803
  }
1838
1804
  return o4;
1839
- }, addContainerListener: (e4) => (S2.current = e4, () => {
1840
- S2.current = null;
1805
+ }, addContainerListener: (e4) => (k2.current = e4, () => {
1806
+ k2.current = null;
1841
1807
  }), setSelectedFunction: (t3) => {
1842
1808
  e3 = t3 ?? y2.current ?? null, Promise.resolve(e3).then((e4) => {
1843
1809
  a3.update({ disabled: null === e4 });
@@ -1855,30 +1821,30 @@ const Kl = (e2) => {
1855
1821
  return null;
1856
1822
  }, getScripts: () => t2.getScripts(), isReadOnly: () => false === t2.getProtection().isStructureAllowed() };
1857
1823
  a3.update({ context: l3 });
1858
- }, [x2, t2, o2, n2]), S2 = w.useRef(null);
1859
- mr(t2, { onBeforeSave: async () => {
1860
- await S2.current?.onBeforeSave();
1824
+ }, [x2, t2, o2, n2]), k2 = w.useRef(null);
1825
+ ur(t2, { onBeforeSave: async () => {
1826
+ await k2.current?.onBeforeSave();
1861
1827
  }, onProtectionChange: () => {
1862
- S2.current?.onReadonlyChange();
1828
+ k2.current?.onReadonlyChange();
1863
1829
  }, onLoad: () => {
1864
1830
  (async () => {
1865
- await t2.getCalculation().start(), t2.getScripts().start(), S2.current?.onScriptChange();
1831
+ await t2.getCalculation().start(), t2.getScripts().start(), k2.current?.onScriptChange();
1866
1832
  })();
1867
- } }), mr(t2, { onSheetsChange: (e3) => {
1868
- p2(e3.getSheets().search());
1833
+ } }), ur(t2, { onSheetsChange: (e3) => {
1834
+ p2(e3.getSheets().getItems());
1869
1835
  }, onViewChange(e3) {
1870
1836
  c2(e3?.getSelectedSheet());
1871
1837
  }, onProtectionChange: (e3) => {
1872
1838
  const t3 = { disabled: !e3.getProtection().isStructureAllowed() };
1873
1839
  x2.getCommand("hideSheet").update(t3), x2.getCommand("deleteSheet").update(t3), x2.getCommand("addSheet").update(t3), x2.getCommand("duplicateSheet").update(t3), x2.getCommand("selectTheme").update(t3), x2.getCommand("addNamedReference").update(t3), x2.getCommand("editNamedReference").update(t3), x2.getCommand("deleteNamedReference").update(t3);
1874
1840
  }, onScriptsChange: (e3) => {
1875
- k2();
1841
+ S2();
1876
1842
  } });
1877
- const { isFullscreenAvailable: v2, isFullscreenEnabled: T2, toggleFullscreen: R2 } = Er({ target: { current: o2 ?? document.body } }), P2 = fr();
1878
- M(() => {
1879
- x2.getCommand("selectTheme").update({ state: () => t2.getTheme(), context: () => ({ theme: t2.getTheme(), themes: P2, darkMode: l2 }) });
1843
+ const { isFullscreenAvailable: v2, isFullscreenEnabled: T2, toggleFullscreen: P2 } = Ir({ target: { current: o2 ?? document.body } }), M2 = br();
1844
+ R(() => {
1845
+ x2.getCommand("selectTheme").update({ state: () => t2.getTheme(), context: () => ({ theme: t2.getTheme(), themes: M2, darkMode: l2 }) });
1880
1846
  }, [t2?.getTheme(), l2]);
1881
- const B2 = On(async function(e3, o3) {
1847
+ const B2 = Gn(async function(e3, o3) {
1882
1848
  let r3 = null;
1883
1849
  const a3 = t2.getScripts();
1884
1850
  if (e3?.declaration || e3?.functionName) {
@@ -1892,7 +1858,7 @@ const Kl = (e2) => {
1892
1858
  return void n2?.showError?.(e4);
1893
1859
  }
1894
1860
  }, [t2, n2]);
1895
- M(() => {
1861
+ R(() => {
1896
1862
  x2.getCommand("newCellStyle").updateCallback((e3) => {
1897
1863
  n2?.showInputOptions?.({ initialValue: (() => {
1898
1864
  let e4 = 0;
@@ -1953,7 +1919,7 @@ const Kl = (e2) => {
1953
1919
  h2?.();
1954
1920
  }), x2.getCommand("executeScript").updateCallback(B2), x2.getCommand("executeSelectedScript").updateCallback(B2);
1955
1921
  }, [t2, n2]);
1956
- const F2 = On(async (e3) => {
1922
+ const F2 = Gn(async (e3) => {
1957
1923
  let o3 = 0, r3 = null, a3 = "Find & Replace";
1958
1924
  e3?.replace && !e3?.replaceOptions?.maxCount && (a3 = "Replace All");
1959
1925
  const l3 = await n2?.showBusy?.(a3);
@@ -1973,7 +1939,7 @@ const Kl = (e2) => {
1973
1939
  l3?.(), n2?.showError?.(e4);
1974
1940
  }
1975
1941
  return o3;
1976
- }, [t2, o2]), N2 = On((e3) => {
1942
+ }, [t2, o2]), N2 = Gn((e3) => {
1977
1943
  const o3 = { value: e3, context: { selection: () => {
1978
1944
  const e4 = t2.getSelectedRanges(), o4 = [];
1979
1945
  for (let t3 = 0; t3 < e4.getCount(); t3++) {
@@ -1985,12 +1951,12 @@ const Kl = (e2) => {
1985
1951
  try {
1986
1952
  await e4.select();
1987
1953
  } catch (e5) {
1988
- n2?.showMessage?.(e5.message, { type: qn.Error });
1954
+ n2?.showMessage?.(e5.message, { type: Xn.Error });
1989
1955
  }
1990
1956
  } };
1991
1957
  return n2.showWindow?.("namedDetails", o3);
1992
1958
  }, [n2, t2, o2]);
1993
- return M(() => {
1959
+ return R(() => {
1994
1960
  const e3 = (e4 = false) => {
1995
1961
  const o3 = t2.getSelectedCell(), r3 = { onFindOrReplace: F2, onKeyDown: (e5) => {
1996
1962
  x2.findCommandByEvent(e5) !== x2.getCommand("find") && x2.findCommandByEvent(e5) !== x2.getCommand("findReplace") || e5.preventDefault();
@@ -2006,7 +1972,7 @@ const Kl = (e2) => {
2006
1972
  try {
2007
1973
  await t2.getRanges(e5).select();
2008
1974
  } catch (e6) {
2009
- n2?.showMessage?.(e6.message, { type: qn.Error });
1975
+ n2?.showMessage?.(e6.message, { type: Xn.Error });
2010
1976
  }
2011
1977
  }, onKeyDown: (e5) => {
2012
1978
  x2.findCommandByEvent(e5) === x2.getCommand("goto") && e5.preventDefault();
@@ -2027,7 +1993,7 @@ const Kl = (e2) => {
2027
1993
  }), x2.getCommand("activeNameBox")?.updateCallback(async function() {
2028
1994
  o2?.getFormulaBarElement()?.getNamedCollectionEditorElement()?.focus();
2029
1995
  });
2030
- }, [o2, t2, n2]), mr(t2?.getView(), { onViewChange: (e3) => {
1996
+ }, [o2, t2, n2]), ur(t2?.getView(), { onViewChange: (e3) => {
2031
1997
  x2.getCommand("workbookViewToggleShowFormulaBar").update({ state: e3.isShowFormulaBar() }).updateCallback(() => {
2032
1998
  e3.setShowFormulaBar(!e3.isShowFormulaBar());
2033
1999
  }), x2.getCommand("workbookViewToggleShowTabs").update({ state: e3.isShowTabs() }).updateCallback(() => {
@@ -2039,24 +2005,24 @@ const Kl = (e2) => {
2039
2005
  }), x2.getCommand("workbookViewToggleShowVerticalScrollBar").update({ state: e3.isShowVerticalScrollbar() }).updateCallback(() => {
2040
2006
  e3.setShowVerticalScrollbar(!e3.isShowVerticalScrollbar());
2041
2007
  });
2042
- } }), M(() => {
2008
+ } }), R(() => {
2043
2009
  x2.getCommand("fullScreenToggle").update({ state: T2, disabled: !v2 }).updateCallback(() => {
2044
- R2();
2010
+ P2();
2045
2011
  });
2046
- }, [T2, v2]), M(() => {
2012
+ }, [T2, v2]), R(() => {
2047
2013
  const e3 = t2.getProtection().isStructureAllowed();
2048
2014
  x2.getCommand("hideSheet").update({ disabled: m2.length <= 1 || !e3 }), x2.getCommand("deleteSheet").update({ disabled: m2.length <= 1 || !e3 });
2049
2015
  }, [m2, d2]), x2;
2050
- }, Xl = () => {
2016
+ }, ql = () => {
2051
2017
  window.open(window.origin.toString(), "sheetxl-" + n.uuidV4(), "popup=true");
2052
- }, Zl = k(S((e2, t2) => {
2018
+ }, Kl = S(k((e2, t2) => {
2053
2019
  const { movable: o2, commands: n2, disabled: r2, sx: a2, floatReference: l2, ...i2 } = e2;
2054
- mr(o2, { onAnyChange(e3) {
2020
+ ur(o2, { onAnyChange(e3) {
2055
2021
  } });
2056
2022
  const s2 = C(() => ({}), []), d2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
2057
2023
  }, onError() {
2058
2024
  console.log("onError");
2059
- } }, disabled: r2, parentFloat: l2 }), [r2, l2]), c2 = C(() => ({ variant: $n.Menuitem, ...s2, ...d2 }), [s2, d2]), m2 = C(() => ({ commands: n2, variant: $n.Menuitem, parentFloat: l2, ...d2 }), [n2, d2, l2]), p2 = (e3) => {
2025
+ } }, disabled: r2, parentFloat: l2 }), [r2, l2]), c2 = C(() => ({ variant: Vn.Menuitem, ...s2, ...d2 }), [s2, d2]), m2 = C(() => ({ commands: n2, variant: Vn.Menuitem, parentFloat: l2, ...d2 }), [n2, d2, l2]), p2 = (e3) => {
2060
2026
  const t3 = e3?.key();
2061
2027
  switch (t3) {
2062
2028
  case "moveToFront":
@@ -2092,93 +2058,93 @@ const Kl = (e2) => {
2092
2058
  default:
2093
2059
  return null;
2094
2060
  }
2095
- }, u2 = b(y, { children: [x(Ja, { command: n2.getCommand("copy"), ...c2, variant: $n.Menuitem }), [], x(ie, { orientation: "horizontal" }), x(Jt, { ...m2, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront", icon: p2 }), x(Jt, { ...m2, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack", icon: p2 }), x(ie, { orientation: "horizontal" }), x(le, { ...c2, command: n2.getCommand("toggleLockAspectRatio"), icon: ae(x(Vo, {})) }), x(ie, { orientation: "horizontal" }), x(Jt, { ...m2, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: (e3) => {
2061
+ }, u2 = b(y, { children: [x(Qa, { command: n2.getCommand("copy"), ...c2, variant: Vn.Menuitem }), [], x(ie, { orientation: "horizontal" }), x(Jt, { ...m2, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront", icon: p2 }), x(Jt, { ...m2, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack", icon: p2 }), x(ie, { orientation: "horizontal" }), x(le, { ...c2, command: n2.getCommand("toggleLockAspectRatio"), icon: ae(x(Vo, {})) }), x(ie, { orientation: "horizontal" }), x(Jt, { ...m2, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: (e3) => {
2096
2062
  const t3 = p2(e3);
2097
2063
  return t3 || ae(x(Go, {}));
2098
2064
  }, tooltip: "Quickly change the placement of your drawings." }), x(ie, { orientation: "horizontal" }), x(Jt, { ...m2, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: (e3) => {
2099
2065
  const t3 = p2(e3);
2100
2066
  return t3 || ae(x(Uo, {}));
2101
2067
  }, tooltip: "Determine how the drawing size will adjust as the cell sizes adjust." }), []] });
2102
- return x(A, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", ...a2 }, ...i2, children: u2 });
2068
+ return x(E, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", ...a2 }, ...i2, children: u2 });
2103
2069
  }));
2104
- Zl.displayName = "MovableContextMenu";
2105
- const Jl = "_sheetxl-theme_4opcr_2", Yl = "_sheetxl-workbook_1j3lu_5", Ql = { fireOnModelChange: false }, ei = { flex: "1 1 100%", display: "flex" }, ti = (e2) => x(nl, { ...e2 }), oi = (e2) => x(_l, { ...e2 }), ni = (e2) => x(Zl, { ...e2 }), ri = (e2) => x(ql, { ...e2 }), ai = (e2) => x(il, { ...e2 }), li = (e2, t2) => x(ll, { ref: t2, ...e2 }), ii = (e2) => x(Me, { ...e2 }), si = (e2, t2) => x(wr, { ref: t2, ...e2 }), di = k(S((e2, t2) => {
2106
- const { workbook: o2, createWorkbookOptions: r2, onNewWorkbook: a2, onElementLoad: l2, notifier: i2, autoFocus: s2 = false, sx: d2, style: c2, className: m2, onFocus: p2, onBlur: u2, onKeyDown: g2, onRepeatCommandChange: k2, commands: S2, showFormulaBar: T2, formulaBarProps: R2, renderFormulaBar: B2 = li, showTabs: N2, tabsProps: L2, renderTabs: H2 = oi, showStatusBar: z2, statusBarProps: W2, renderStatusBar: $2 = ti, toolbarProps: O2, renderToolbar: V2 = zl, contextMenuSx: G2, renderContextMenu: U2 = ri, renderFilterMenu: j2 = ai, renderMovableMenu: _2 = ni, renderLoadingPanel: q2 = ii, loadingPanelProps: K2, sheetProps: Z2, renderSheet: J2 = si, showHorizontalScrollbar: Y2, showVerticalScrollbar: Q2, gridTheme: ee2, headersTheme: te2, enableDarkImages: oe2, ...ne2 } = e2, re2 = rr(), ae2 = fr(), le2 = C(() => {
2070
+ Kl.displayName = "MovableContextMenu";
2071
+ const Xl = "_sheetxl-theme_4opcr_2", Zl = "_sheetxl-workbook_1j3lu_5", Jl = { fireOnModelChange: false }, Yl = { flex: "1 1 100%", display: "flex" }, Ql = (e2) => x(al, { ...e2 }), ei = (e2) => x(Ul, { ...e2 }), ti = (e2) => x(Kl, { ...e2 }), oi = (e2) => x(jl, { ...e2 }), ni = (e2) => x(dl, { ...e2 }), ri = (e2, t2) => x(sl, { ref: t2, ...e2 }), ai = (e2) => x(Re, { ...e2 }), li = (e2, t2) => x(kr, { ref: t2, ...e2 }), ii = S(k((e2, t2) => {
2072
+ const { workbook: o2, createWorkbookOptions: r2, onNewWorkbook: a2, onElementLoad: l2, notifier: i2, autoFocus: s2 = false, sx: d2, style: c2, className: m2, onFocus: p2, onBlur: u2, onKeyDown: g2, onRepeatCommandChange: S2, commands: k2, showFormulaBar: T2, formulaBarProps: P2, renderFormulaBar: B2 = ri, showTabs: N2, tabsProps: L2, renderTabs: H2 = ei, showStatusBar: z2, statusBarProps: W2, renderStatusBar: $2 = Ql, toolbarProps: O2, renderToolbar: V2 = Ll, contextMenuSx: G2, renderContextMenu: U2 = oi, renderFilterMenu: j2 = ni, renderMovableMenu: _2 = ti, renderLoadingPanel: q2 = ai, loadingPanelProps: K2, sheetProps: Z2, renderSheet: J2 = li, showHorizontalScrollbar: Y2, showVerticalScrollbar: Q2, gridTheme: ee2, headersTheme: te2, enableDarkImages: oe2, ...ne2 } = e2, re2 = lr(), ae2 = br(), le2 = C(() => {
2107
2073
  const e3 = { theme: ae2.getDefaultTheme(), ...r2 };
2108
2074
  return o2 ?? new h(e3);
2109
- }, [o2]), ie2 = P(null), [se2, de2] = D(false), ce2 = P(null), me2 = C(() => x(A, { className: "sheetxl-viewport", sx: { width: "100%", height: "100%", boxSizing: "border-box", position: "absolute", pointerEvents: "none !important", "& > :first-of-type": { position: "relative" } }, ref: ce2 }), []), [pe2, ue2] = D(false), [ge2, he2] = D(false), fe2 = v(() => {
2075
+ }, [o2]), ie2 = M(null), [se2, de2] = D(false), ce2 = M(null), me2 = C(() => x(E, { className: "sheetxl-viewport", sx: { width: "100%", height: "100%", boxSizing: "border-box", position: "absolute", pointerEvents: "none !important", "& > :first-of-type": { position: "relative" } }, ref: ce2 }), []), [pe2, ue2] = D(false), [ge2, he2] = D(false), fe2 = v(() => {
2110
2076
  ue2(true);
2111
- }, []), xe2 = P(null), be2 = Kn(t2, () => ({ isWorkbookElement: () => true, getWorkbook: () => le2, getSheetElement: () => ie2.current, getViewportElement: () => ce2.current, getFormulaBarElement: () => xe2.current, focus() {
2077
+ }, []), xe2 = M(null), be2 = Zn(t2, () => ({ isWorkbookElement: () => true, getWorkbook: () => le2, getSheetElement: () => ie2.current, getViewportElement: () => ce2.current, getFormulaBarElement: () => xe2.current, focus() {
2112
2078
  ie2 && ie2.current && ie2.current.focus();
2113
- } }), [le2]), ye2 = P(null);
2114
- E(() => {
2079
+ } }), [le2]), ye2 = M(null);
2080
+ A(() => {
2115
2081
  pe2 && be2.current && (he2(true), ye2.current !== l2 && (l2?.({ source: be2.current }), ye2.current = l2));
2116
- }, [pe2, be2.current]), hl(be2.current);
2117
- const we2 = v((e3) => (ie2.current?.submitEdit(), true), []), ke2 = v(() => {
2082
+ }, [pe2, be2.current]), xl(be2.current);
2083
+ const we2 = v((e3) => (ie2.current?.submitEdit(), true), []), Se2 = v(() => {
2118
2084
  requestAnimationFrame(() => {
2119
2085
  ie2?.current?.focus();
2120
2086
  });
2121
- }, []), [Se2, Ce2] = D(le2?.getSelectedSheet()), [ve2, Te2] = D(le2?.getProtection());
2122
- mr(le2, { onSheetsChange: (e3) => {
2087
+ }, []), [ke2, Ce2] = D(le2?.getSelectedSheet()), [ve2, Te2] = D(le2?.getProtection());
2088
+ ur(le2, { onSheetsChange: (e3) => {
2123
2089
  Ce2(e3?.getSelectedSheet());
2124
2090
  }, onViewChange(e3) {
2125
2091
  Ce2(e3?.getSelectedSheet());
2126
2092
  }, onProtectionChange: (e3) => {
2127
2093
  Te2(e3?.getProtection());
2128
- } }), mr(le2, { onRequestSelect: async (e3, t3) => new Promise((e4) => {
2094
+ } }), ur(le2, { onRequestSelect: async (e3, t3) => new Promise((e4) => {
2129
2095
  ie2.current.getSheet() !== t3 ? ie2.current.getGridElement()?.onViewChangeOnce(() => {
2130
2096
  ie2.current.getSheet() !== t3 && e4(false), e4(true);
2131
2097
  }) : e4(true);
2132
- }) }, Ql);
2133
- const [Re2, Pe2] = F((e3) => e3 + 1, 0), Be2 = le2?.getView();
2134
- mr(Be2, { onViewChange: (e3) => {
2135
- Pe2();
2098
+ }) }, Jl);
2099
+ const [Pe2, Me2] = F((e3) => e3 + 1, 0), Be2 = le2?.getView();
2100
+ ur(Be2, { onViewChange: (e3) => {
2101
+ Me2();
2136
2102
  } });
2137
- const Fe2 = ee2 ?? re2, Ne2 = C(() => yl(re2, Fe2), [re2, Fe2]), Ee2 = te2 ?? re2, Ae2 = C(() => yl(re2, Ee2), [re2, Ee2]), [Ie2, Le2] = D(null);
2103
+ const Fe2 = ee2 ?? re2, Ne2 = C(() => wl(re2, Fe2), [re2, Fe2]), Ae2 = te2 ?? re2, Ee2 = C(() => wl(re2, Ae2), [re2, Ae2]), [Ie2, Le2] = D(null);
2138
2104
  v(() => {
2139
2105
  ie2.current.focus();
2140
2106
  }, []);
2141
- const [He2, ze2] = D(false), We2 = P(null), $e2 = Kl({ workbook: le2, workbookElement: be2.current, commandTarget: () => ie2.current, notifier: i2, commands: S2, darkMode: Ne2.body.darkMode, onNewWorkbook: a2, onShowSidebar: () => {
2107
+ const [He2, ze2] = D(false), We2 = M(null), $e2 = _l({ workbook: le2, workbookElement: be2.current, commandTarget: () => ie2.current, notifier: i2, commands: k2, darkMode: Ne2.body.darkMode, onNewWorkbook: a2, onShowSidebar: () => {
2142
2108
  He2 ? We2.current?.focus() : ze2(true);
2143
- } }), Oe2 = P(null), [Ve2, Ge2] = D(false), [Ue2, je2] = D(null), [_e2, qe2] = D(tr.Top), [Ke2, Xe2] = D(f.EmptyBounds), Ze2 = () => {
2109
+ } }), Oe2 = M(null), [Ve2, Ge2] = D(false), [Ue2, je2] = D(null), [_e2, qe2] = D(nr.Top), [Ke2, Xe2] = D(f.EmptyBounds), Ze2 = () => {
2144
2110
  Ge2(false), je2(null);
2145
- }, Je2 = (e3, t3, o3 = tr.Top) => {
2111
+ }, Je2 = (e3, t3, o3 = nr.Top) => {
2146
2112
  Xe2(e3), qe2(o3), je2(t3), null !== Oe2.current && Oe2.current.update(), Ge2(true);
2147
- }, [Ye2, Qe2] = D("sheet"), et2 = N2 ?? Be2?.isShowTabs(), tt2 = Y2 ?? Be2?.isShowHorizontalScrollbar(), ot2 = T2 ?? Be2?.isShowFormulaBar(), nt2 = z2 ?? Be2?.isShowStatusBar(), rt2 = Q2 ?? Be2?.isShowVerticalScrollbar(), at2 = Ne2?.header?.edgeStrokeFill || "rgb(171,171,171)", lt2 = C(() => nt2 ? $2({ sheet: Se2, gridStyle: Ne2, ...W2 }) : null, [$2, W2, nt2, Ne2, Se2]), it2 = C(() => V2({ commands: $e2, workbook: be2.current, ...O2 }), [$e2, V2, O2, re2]), [st2, { width: dt2 }] = Fr(), ct2 = 0 === dt2 || dt2 > 560, mt2 = C(() => {
2113
+ }, [Ye2, Qe2] = D("sheet"), et2 = N2 ?? Be2?.isShowTabs(), tt2 = Y2 ?? Be2?.isShowHorizontalScrollbar(), ot2 = T2 ?? Be2?.isShowFormulaBar(), nt2 = z2 ?? Be2?.isShowStatusBar(), rt2 = Q2 ?? Be2?.isShowVerticalScrollbar(), at2 = Ne2?.header?.edgeStrokeFill || "rgb(171,171,171)", lt2 = C(() => nt2 ? $2({ sheet: ke2, gridStyle: Ne2, ...W2 }) : null, [$2, W2, nt2, Ne2, ke2]), it2 = C(() => V2({ commands: $e2, workbook: be2.current, ...O2 }), [$e2, V2, O2, re2]), [st2, { width: dt2 }] = Ar(), ct2 = 0 === dt2 || dt2 > 560, mt2 = C(() => {
2148
2114
  if (!et2) return null;
2149
- let e3 = H2({ background: Ne2.body.fill, borderWidth: 1, borderColor: at2, gridTheme: Fe2, gridStyle: Ne2, onBeforeUserChange: we2, onUserChange: ke2, workbook: le2, commands: $e2, sheetTabProps: {}, notifier: i2, ...L2 });
2115
+ let e3 = H2({ background: Ne2.body.fill, borderWidth: 1, borderColor: at2, gridTheme: Fe2, gridStyle: Ne2, onBeforeUserChange: we2, onUserChange: Se2, workbook: le2, commands: $e2, sheetTabProps: {}, notifier: i2, ...L2 });
2150
2116
  return ct2 || (e3 = x("div", { style: { flex: "none", display: "flex" }, children: e3 })), e3;
2151
2117
  }, [H2, L2, i2, re2, le2, Fe2, ct2, $e2, et2]), pt2 = v((e3) => {
2152
2118
  const t3 = n.getOS() === n.OSType.Firefox;
2153
2119
  let o3 = null, r3 = null, a3 = null;
2154
- if (tt2 && (r3 = x("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${at2} 1px`, maxWidth: "100%" }, children: x(xr, { style: { alignItems: "center", borderTop: (t3 ? 6 : 3) + "px solid transparent", borderBottom: (ct2 ? 6 : 3) + "px solid transparent", borderLeft: (t3 ? 3 : 0) + "px solid transparent", borderRight: (t3 ? 3 : 0) + "px solid transparent" }, ...e3, endGap: 700, sheet: Se2, showCustomScrollButtons: !t3, onShowTooltip: (e4) => {
2120
+ if (tt2 && (r3 = x("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${at2} 1px`, maxWidth: "100%" }, children: x(yr, { style: { alignItems: "center", borderTop: (t3 ? 6 : 3) + "px solid transparent", borderBottom: (ct2 ? 6 : 3) + "px solid transparent", borderLeft: (t3 ? 3 : 0) + "px solid transparent", borderRight: (t3 ? 3 : 0) + "px solid transparent" }, ...e3, endGap: 700, sheet: ke2, showCustomScrollButtons: !t3, onShowTooltip: (e4) => {
2155
2121
  Je2({ x: e4.anchor.x, y: e4.anchor.y, width: 0, height: 0 }, e4.display, e4.placement);
2156
- }, onCloseTooltip: () => Ze2() }) })), et2 && ct2 && (a3 = mt2), et2 && ct2 && !tt2 && (a3 = b(A, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [a3, x(A, { sx: { borderTop: `solid ${at2} 1px`, flex: "1" } })] })), a3 && tt2) o3 = x(Xn, { position: le2.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: e4 }) => {
2122
+ }, onCloseTooltip: () => Ze2() }) })), et2 && ct2 && (a3 = mt2), et2 && ct2 && !tt2 && (a3 = b(E, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [a3, x(E, { sx: { borderTop: `solid ${at2} 1px`, flex: "1" } })] })), a3 && tt2) o3 = x(Jn, { position: le2.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: e4 }) => {
2157
2123
  le2.getView().setTabRatio(Math.round(10 * e4));
2158
2124
  }, minBefore: "200px", minAfter: "180px", resizerProps: { style: { minWidth: "11px", backgroundImage: `url("data:image/svg+xml,%3Csvg width='6.4' height='12' viewBox='0 0 9.6 16' version='1.1' fill='${re2.palette.text.icon ?? re2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='M 9.60008,14.40009 C 9.60008,15.28374 8.88368,16 8.00003,16 7.11639,16 6.40012,15.28374 6.40012,14.40009 c 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40012 c 0,0.88364 -0.7164,1.60004 -1.60005,1.60004 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60004 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40006 c 0,0.88365 -0.7164,1.60005 -1.60005,1.60005 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60005 C 6.40012,0.71626 7.11639,0 8.00003,0 8.88368,0 9.60008,0.71626 9.60008,1.59991 M 3.19996,14.40009 C 3.19996,15.28374 2.48369,16 1.60005,16 0.7164,16 0,15.28374 0,14.40009 c 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40012 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 C 0.7164,9.60001 0,8.88361 0,7.99997 0,7.11632 0.7164,6.39992 1.60005,6.39992 c 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40006 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 0.7164,3.19996 0,2.48356 0,1.59991 0,0.71626 0.7164,0 1.60005,0 2.48369,0 3.19996,0.71626 3.19996,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center", borderTop: `solid ${at2} 1px`, borderBottom: "solid 3px transparent" } }, elementBefore: a3, elementAfter: r3 });
2159
2125
  else if (tt2) o3 = r3;
2160
2126
  else {
2161
- if (!a3) return x(A, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center", height: "1px", borderTop: nt2 ? null : `solid ${at2} 1px` } });
2127
+ if (!a3) return x(E, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center", height: "1px", borderTop: nt2 ? null : `solid ${at2} 1px` } });
2162
2128
  o3 = a3;
2163
2129
  }
2164
- return x(A, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: o3 });
2165
- }, [Se2, we2, le2, Ne2, Fe2, $e2, et2, tt2, nt2, ct2]), [ut2, gt2] = w.useState(null), ht2 = C(() => ({ placement: "right-start", ...ut2?.popperProps }), [ut2?.popperProps]), { reference: ft2, component: xt2 } = no({ label: "contextMenu", popperProps: ht2, anchor: ut2?.anchor ?? { getBoundingClientRect: () => new DOMRect(ut2?.clientX || 0, ut2?.clientY || 0) }, onClose: () => gt2(null), createPopupPanel: ut2?.createPopupPanel });
2166
- M(() => {
2130
+ return x(E, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: o3 });
2131
+ }, [ke2, we2, le2, Ne2, Fe2, $e2, et2, tt2, nt2, ct2]), [ut2, gt2] = w.useState(null), ht2 = C(() => ({ placement: "right-start", ...ut2?.popperProps }), [ut2?.popperProps]), { reference: ft2, component: xt2 } = no({ label: "contextMenu", popperProps: ht2, anchor: ut2?.anchor ?? { getBoundingClientRect: () => new DOMRect(ut2?.clientX || 0, ut2?.clientY || 0) }, onClose: () => gt2(null), createPopupPanel: ut2?.createPopupPanel });
2132
+ R(() => {
2167
2133
  ut2 ? ft2.open(0) : ft2.close(0);
2168
2134
  }, [ut2]);
2169
- const bt2 = On((e3, t3) => {
2135
+ const bt2 = Gn((e3, t3) => {
2170
2136
  if (e3?.isDefaultPrevented()) return true;
2171
2137
  e3.preventDefault(), ut2 && ut2.anchor === e3.currentTarget ? gt2(null) : gt2({ anchor: e3.currentTarget, popperProps: { offsets: [-4, 2] }, createPopupPanel: (e4) => {
2172
2138
  const { floatReference: o3 } = e4;
2173
2139
  return j2({ filter: t3, commands: $e2, floatReference: o3, sx: { ...G2 } });
2174
2140
  } });
2175
- }, [j2, G2, $e2, le2, ut2]), yt2 = On((e3) => {
2141
+ }, [j2, G2, $e2, le2, ut2]), yt2 = Gn((e3) => {
2176
2142
  if (e3.originalEvent?.isDefaultPrevented()) return true;
2177
2143
  e3.originalEvent?.preventDefault(), gt2({ clientX: e3.clientX, clientY: e3.clientY, createPopupPanel: (e4) => {
2178
2144
  const { floatReference: t3 } = e4;
2179
2145
  return U2({ commands: $e2, workbook: le2, floatReference: t3, sx: { ...G2 } });
2180
2146
  } });
2181
- }, [U2, G2, $e2, le2]), wt2 = On((e3, t3) => {
2147
+ }, [U2, G2, $e2, le2]), wt2 = Gn((e3, t3) => {
2182
2148
  if (e3?.isDefaultPrevented()) return true;
2183
2149
  e3.preventDefault(), gt2({ clientX: e3.clientX, clientY: e3.clientY, createPopupPanel: (e4) => {
2184
2150
  const { floatReference: o3 } = e4;
@@ -2186,40 +2152,40 @@ const Jl = "_sheetxl-theme_4opcr_2", Yl = "_sheetxl-workbook_1j3lu_5", Ql = { fi
2186
2152
  } });
2187
2153
  }, [_2, G2, $e2]);
2188
2154
  C(() => {
2189
- const e3 = [new Jn("openContextMenu", () => ie2.current, { label: "Context Menu", description: "Open the context menu.", shortcut: [{ key: "F10", modifiers: [Qn.Shift] }, { key: "ContextMenu" }] })];
2155
+ const e3 = [new Qn("openContextMenu", () => ie2.current, { label: "Context Menu", description: "Open the context menu.", shortcut: [{ key: "F10", modifiers: [tr.Shift] }, { key: "ContextMenu" }] })];
2190
2156
  $e2.addCommands(e3, true);
2191
- }, [$e2]), M(() => {
2157
+ }, [$e2]), R(() => {
2192
2158
  $e2.getCommand("openContextMenu").updateCallback(() => {
2193
- const e3 = Se2.getSelection().getCoords().cell;
2159
+ const e3 = ke2.getSelection().getCoords().cell;
2194
2160
  ie2.current?.getGridElement()?.scrollCellCoordsIntoView(e3).then((t3) => {
2195
2161
  requestAnimationFrame(() => {
2196
- const o3 = Se2.getView().getZoomScale() / 100, n2 = Se2.getColumnHeaders().findOffset(e3.colIndex + 1) * o3, r3 = Se2.getRowHeaders().findOffset(e3.rowIndex + 1) * o3, a3 = ie2.current?.getGridElement()?.getRelativePointFromClient(0, 0) || { x: 0, y: 0 };
2162
+ const o3 = ke2.getView().getZoomScale() / 100, n2 = ke2.getColumnHeaders().findOffset(e3.colIndex + 1) * o3, r3 = ke2.getRowHeaders().findOffset(e3.rowIndex + 1) * o3, a3 = ie2.current?.getGridElement()?.getRelativePointFromClient(0, 0) || { x: 0, y: 0 };
2197
2163
  yt2({ clientX: n2 - a3.x - t3.left + 6, clientY: r3 - a3.y - t3.top + 6 });
2198
2164
  });
2199
2165
  });
2200
2166
  });
2201
- }, [Se2]);
2202
- const kt2 = On((e3) => {
2167
+ }, [ke2]);
2168
+ const St2 = Gn((e3) => {
2203
2169
  $e2?.dispatchToFocusedCommand(e3);
2204
- }, [$e2]), St2 = On(() => {
2205
- hl(be2.current);
2170
+ }, [$e2]), kt2 = Gn(() => {
2171
+ xl(be2.current);
2206
2172
  }, [le2, be2.current]), Ct2 = v(() => {
2207
2173
  Qe2("sheet");
2208
2174
  }, []), vt2 = v(() => {
2209
2175
  Qe2("formulaBar");
2210
- }, []), Tt2 = On((e3) => {
2176
+ }, []), Tt2 = Gn((e3) => {
2211
2177
  const t3 = n.getOS() === n.OSType.Firefox;
2212
- return x(xr, { style: { borderLeft: "3px solid transparent", borderRight: "0px solid transparent", borderTop: (t3 ? 3 : 0) + "px solid transparent", borderBottom: (t3 ? 3 : 0) + "px solid transparent", width: t3 ? "13px" : void 0 }, ...e3, sheet: Se2, endGap: 700, showCustomScrollButtons: !t3, onShowTooltip: (e4) => {
2213
- Je2(e4.anchor, e4.display, tr.Left);
2178
+ return x(yr, { style: { borderLeft: "3px solid transparent", borderRight: "0px solid transparent", borderTop: (t3 ? 3 : 0) + "px solid transparent", borderBottom: (t3 ? 3 : 0) + "px solid transparent", width: t3 ? "13px" : void 0 }, ...e3, sheet: ke2, endGap: 700, showCustomScrollButtons: !t3, onShowTooltip: (e4) => {
2179
+ Je2(e4.anchor, e4.display, nr.Left);
2214
2180
  }, onCloseTooltip: () => Ze2() });
2215
- }, [Se2]);
2216
- M(() => {
2181
+ }, [ke2]);
2182
+ R(() => {
2217
2183
  s2 && ie2 && ie2.current && ie2.current.focus();
2218
2184
  }, []);
2219
- const [Dt2, Mt2] = w.useState(null), Rt2 = v((e3) => {
2220
- $e2?.getCommand("openWorkbook") && ("dragenter" === e3.type || "dragover" === e3.type ? e3.dataTransfer?.types.includes("Files") ? e3.dataTransfer.files[0]?.type?.startsWith("image/") || e3.dataTransfer.items[0]?.type?.startsWith("image/") || 1 === e3.dataTransfer.types.length && Mt2("Drop to open") : (e3.dataTransfer?.types.includes("text/html") || e3.dataTransfer?.types.includes("text/plain"), e3.dataTransfer.effectAllowed = "none", e3.dataTransfer.dropEffect = "none") : "dragleave" === e3.type && Mt2(null), e3.preventDefault());
2221
- }, [$e2]), Pt2 = On((e3) => {
2222
- if ($e2?.getCommand("openWorkbook") && (e3.preventDefault(), e3.stopPropagation(), Mt2(null), e3.dataTransfer.files && e3.dataTransfer.files.length > 0)) {
2185
+ const [Dt2, Rt2] = w.useState(null), Pt2 = v((e3) => {
2186
+ $e2?.getCommand("openWorkbook") && ("dragenter" === e3.type || "dragover" === e3.type ? e3.dataTransfer?.types.includes("Files") ? e3.dataTransfer.files[0]?.type?.startsWith("image/") || e3.dataTransfer.items[0]?.type?.startsWith("image/") || 1 === e3.dataTransfer.types.length && Rt2("Drop to open") : (e3.dataTransfer?.types.includes("text/html") || e3.dataTransfer?.types.includes("text/plain"), e3.dataTransfer.effectAllowed = "none", e3.dataTransfer.dropEffect = "none") : "dragleave" === e3.type && Rt2(null), e3.preventDefault());
2187
+ }, [$e2]), Mt2 = Gn((e3) => {
2188
+ if ($e2?.getCommand("openWorkbook") && (e3.preventDefault(), e3.stopPropagation(), Rt2(null), e3.dataTransfer.files && e3.dataTransfer.files.length > 0)) {
2223
2189
  const t3 = e3.dataTransfer.files[0];
2224
2190
  if (!t3) return;
2225
2191
  if (t3?.type?.startsWith("image/")) {
@@ -2230,103 +2196,103 @@ const Jl = "_sheetxl-theme_4opcr_2", Yl = "_sheetxl-workbook_1j3lu_5", Ql = { fi
2230
2196
  $e2?.getCommand("insertImageFromFile")?.execute({ file: t3, options: { bounds: { x: r3.x, y: r3.y } }, goto: { range: { ...a3 } } });
2231
2197
  } else $e2?.getCommand("openWorkbook")?.execute(t3);
2232
2198
  }
2233
- }, [$e2, Dt2]), Bt2 = C(() => Dt2 ? x(A, { sx: { position: "absolute", width: "100%", height: "100%", boxSizing: "border-box", pointerEvents: "none", display: "flex", justifyContent: "center", alignItems: "center", background: (e3) => e3.palette.divider, color: (e3) => e3.palette.primary.dark }, children: x(I, { variant: "h4", children: Dt2 }) }) : null, [Dt2]), Ft2 = P(null), Nt2 = C(() => x(Nr, { in: !ge2, nodeRef: Ft2, timeout: 500, classNames: "animating", unmountOnExit: true, children: x(A, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", pointerEvents: ge2 ? "none" : d2?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: q2({ ref: Ft2, transitionDelay: "0", transparentBackground: false, sx: { opacity: ge2 ? 0 : d2?.opacity, pointerEvents: ge2 ? "none" : d2?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ...K2 } }) }) }), [ge2, q2, K2]), Et2 = C(() => B2({ sx: { marginTop: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, workbook: le2, sheetElement: ie2.current, gridStyle: Ne2, onFocus: vt2, ...R2, NamedCollectionEditorProps: { restoreFocus: (e3) => ie2.current.focus(e3), notifier: i2, ...R2?.NamedCollectionEditorProps, commandPopupButtonProps: { commands: $e2, ...R2?.NamedCollectionEditorProps?.commandPopupButtonProps } } }, xe2), [B2, R2, le2, Ne2, $e2, ge2]), At2 = v((e3) => {
2199
+ }, [$e2, Dt2]), Bt2 = C(() => Dt2 ? x(E, { sx: { position: "absolute", width: "100%", height: "100%", boxSizing: "border-box", pointerEvents: "none", display: "flex", justifyContent: "center", alignItems: "center", background: (e3) => e3.palette.divider, color: (e3) => e3.palette.primary.dark }, children: x(I, { variant: "h4", children: Dt2 }) }) : null, [Dt2]), Ft2 = M(null), Nt2 = C(() => x(Er, { in: !ge2, nodeRef: Ft2, timeout: 500, classNames: "animating", unmountOnExit: true, children: x(E, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", pointerEvents: ge2 ? "none" : d2?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: q2({ ref: Ft2, transitionDelay: "0", transparentBackground: false, sx: { opacity: ge2 ? 0 : d2?.opacity, pointerEvents: ge2 ? "none" : d2?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ...K2 } }) }) }), [ge2, q2, K2]), At2 = C(() => B2({ sx: { marginTop: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, workbook: le2, sheetElement: ie2.current, gridStyle: Ne2, onFocus: vt2, ...P2, NamedCollectionEditorProps: { restoreFocus: (e3) => ie2.current.focus(e3), notifier: i2, ...P2?.NamedCollectionEditorProps, commandPopupButtonProps: { commands: $e2, ...P2?.NamedCollectionEditorProps?.commandPopupButtonProps } } }, xe2), [B2, P2, le2, Ne2, $e2, ge2]), Et2 = v((e3) => {
2234
2200
  const { movable: t3, ...o3 } = e3, n2 = { movable: t3, onContextMenuCapture: (e4) => {
2235
2201
  wt2(e4, t3);
2236
2202
  }, ...o3 }, r3 = t3.getContent().getType();
2237
2203
  let a3 = null;
2238
- if ("picture" === r3) return x(br, { loadingPanel: x(Me, { transitionDelay: "100", style: { position: "absolute" }, sx: { border: (e4) => `solid 1px ${e4.palette.action.active}` } }), picture: t3.getContent(), description: t3.getDescription() ?? t3?.getName(), ...n2 });
2204
+ if ("picture" === r3) return x(wr, { loadingPanel: x(Re, { transitionDelay: "100", style: { position: "absolute" }, sx: { border: (e4) => `solid 1px ${e4.palette.action.active}` } }), picture: t3.getContent(), description: t3.getDescription() ?? t3?.getName(), ...n2 });
2239
2205
  if ("chart" === r3) {
2240
2206
  const e4 = { ...n2, chart: t3.getContent() };
2241
- return x(yr, { ...e4 });
2207
+ return x(Sr, { ...e4 });
2242
2208
  }
2243
2209
  if (a3 = `Float of type '${r3}'.`, "string" == typeof a3) {
2244
2210
  const e4 = { ...n2, description: a3 };
2245
- a3 = x(kr, { ...e4 });
2211
+ a3 = x(Cr, { ...e4 });
2246
2212
  }
2247
2213
  return x("div", { style: { position: "absolute", clipPath: "inset(0px)", display: "flex", alignItems: "stretch", justifyContent: "stretch", pointerEvents: "all" }, children: a3 }, t3.getUUID());
2248
- }, []), It2 = C(() => J2({ style: ei, onFocus: Ct2, notifier: i2, gridStyle: Ne2, headersStyle: Ae2, sheet: Se2, commands: $e2, onSheetContextMenu: yt2, onViewportChange: (e3) => {
2214
+ }, []), It2 = C(() => J2({ style: Yl, onFocus: Ct2, notifier: i2, gridStyle: Ne2, headersStyle: Ee2, sheet: ke2, commands: $e2, onSheetContextMenu: yt2, onViewportChange: (e3) => {
2249
2215
  Le2(e3);
2250
- }, showScrollbars: false, viewportComponent: me2, onRepeatCommandChange: k2, onElementLoad: fe2, onShowColumnTooltip: (e3) => {
2251
- Je2(e3.anchor, e3.display, tr.Top);
2216
+ }, showScrollbars: false, viewportComponent: me2, onRepeatCommandChange: S2, onElementLoad: fe2, onShowColumnTooltip: (e3) => {
2217
+ Je2(e3.anchor, e3.display, nr.Top);
2252
2218
  }, onShowRowTooltip: (e3) => {
2253
- Je2(e3.anchor, e3.display, tr.Right);
2219
+ Je2(e3.anchor, e3.display, nr.Right);
2254
2220
  }, onShowTooltip: (e3) => {
2255
2221
  Je2({ x: e3.anchor.x, y: e3.anchor.y, width: 0, height: 0 }, e3.display, e3.placement);
2256
- }, onCloseTooltip: () => Ze2(), renderMovable: At2, ...Z2, cellRenderProps: { onFilterButtonMouseDown: (e3, t3) => {
2222
+ }, onCloseTooltip: () => Ze2(), renderMovable: Et2, ...Z2, cellRenderProps: { onFilterButtonMouseDown: (e3, t3) => {
2257
2223
  Z2?.cellRenderProps?.onFilterButtonMouseDown(e3, t3), bt2(e3, t3);
2258
- }, ...Z2?.cellRenderProps } }, ie2), [J2, $e2, Z2, Se2, Ne2, i2, k2]), Lt2 = C(() => {
2224
+ }, ...Z2?.cellRenderProps } }, ie2), [J2, $e2, Z2, ke2, Ne2, i2, S2]), Lt2 = C(() => {
2259
2225
  if (!He2) return null;
2260
2226
  const e3 = !ve2.isStructureAllowed();
2261
- return x(El, { sx: { marginBottom: (e4) => e4.spacing(0.5), border: (t3) => `solid ${e3 ? t3.palette.action.disabled : ar(t3.palette.divider, 0.2)} 1px`, borderRadius: (e4) => `${e4.shape.borderRadius}px`, overflow: "hidden" }, onClose: () => {
2227
+ return x(Fl, { sx: { marginBottom: (e4) => e4.spacing(0.5), border: (t3) => `solid ${e3 ? t3.palette.action.disabled : ir(t3.palette.divider, 0.2)} 1px`, borderRadius: (e4) => `${e4.shape.borderRadius}px`, overflow: "hidden" }, onClose: () => {
2262
2228
  ze2(false), requestAnimationFrame(() => {
2263
2229
  ie2.current.focus();
2264
2230
  });
2265
2231
  }, readOnly: e3, commands: $e2, ref: We2, scripts: le2.getScripts() });
2266
2232
  }, [He2, $e2, le2, i2, ve2]), Ht2 = C(() => {
2267
- const e3 = x(or, { style: { ...ei, marginRight: Lt2 && ct2 ? "0px" : "6px" }, viewport: Ie2, touchElement: ie2.current?.getGridElement()?.stage, onScrollViewport: (e4) => {
2233
+ const e3 = x(rr, { style: { ...Yl, marginRight: Lt2 && ct2 ? "0px" : "6px" }, viewport: Ie2, touchElement: ie2.current?.getGridElement()?.stage, onScrollViewport: (e4) => {
2268
2234
  ie2.current?.getGridElement()?.scrollTo(e4);
2269
2235
  }, showHorizontalScrollbar: tt2 || et2, showVerticalScrollbar: rt2, createHorizontalScrollbar: pt2, createVerticalScrollbar: Tt2, children: It2 });
2270
2236
  let t3 = e3;
2271
2237
  ct2 || (t3 = b(y, { children: [e3, mt2] }));
2272
2238
  let o3 = null, n2 = 4, r3 = 13;
2273
- return ct2 ? o3 = "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" : (o3 = "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", n2 = 13, r3 = 4), x(Xn, { fixedPane: "after", position: "40%", minAfter: ct2 ? "280px" : "120px", splitDirection: ct2 ? "row" : "column", style: ei, ref: st2, resizerProps: { className: "styled-resizer", style: { minWidth: ct2 ? "6px" : void 0, minHeight: ct2 ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${n2}' height='${r3}' viewBox='0 0 ${n2} ${r3}' version='1.1' fill='${re2.palette.text.icon ?? re2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${o3}' /%3E%3C/svg%3E%0A")`, maskRepeat: "no-repeat", maskPosition: ct2 ? "left center" : "top center" } }, elementBefore: t3, paneBeforeProps: { style: { flexDirection: "column" } }, elementAfter: Lt2, paneAfterProps: { style: { marginLeft: ct2 ? "0px" : "4px", marginRight: ct2 ? "8px" : "4px" } } });
2239
+ return ct2 ? o3 = "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" : (o3 = "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", n2 = 13, r3 = 4), x(Jn, { fixedPane: "after", position: "40%", minAfter: ct2 ? "280px" : "120px", splitDirection: ct2 ? "row" : "column", style: Yl, ref: st2, resizerProps: { className: "styled-resizer", style: { minWidth: ct2 ? "6px" : void 0, minHeight: ct2 ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${n2}' height='${r3}' viewBox='0 0 ${n2} ${r3}' version='1.1' fill='${re2.palette.text.icon ?? re2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${o3}' /%3E%3C/svg%3E%0A")`, maskRepeat: "no-repeat", maskPosition: ct2 ? "left center" : "top center" } }, elementBefore: t3, paneBeforeProps: { style: { flexDirection: "column" } }, elementAfter: Lt2, paneAfterProps: { style: { marginLeft: ct2 ? "0px" : "4px", marginRight: ct2 ? "8px" : "4px" } } });
2274
2240
  }, [tt2, et2, pt2, rt2, Ie2, Lt2, It2, mt2, re2, ct2]), zt2 = C(() => ({ boxSizing: "border-box", background: (e3) => "dark" !== e3.palette.mode ? Ne2.header.fill : e3.palette.background.paper, "& *": { ...on(re2), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${at2} 1px` }, ...d2 }), [d2, Ne2]);
2275
- return b(X, { className: yn("sheetxl-workbook", Yl, { "Mui-focusVisible": se2 }, Jl, m2), sx: zt2, style: c2, square: false, ...ne2, ref: be2, onFocus: (e3) => {
2276
- de2(true), St2(), p2?.(e3);
2241
+ return b(X, { className: Sn("sheetxl-workbook", Zl, { "Mui-focusVisible": se2 }, Xl, m2), sx: zt2, style: c2, square: false, ...ne2, ref: be2, onFocus: (e3) => {
2242
+ de2(true), kt2(), p2?.(e3);
2277
2243
  }, onBlur: (e3) => {
2278
2244
  de2(false), u2?.(e3);
2279
2245
  }, onKeyDown: (e3) => {
2280
- kt2(e3), g2?.(e3);
2246
+ St2(e3), g2?.(e3);
2281
2247
  }, onDragStart: (e3) => {
2282
2248
  if (e3.target.src) {
2283
2249
  const t3 = new Image();
2284
2250
  t3.src = e3.target.src, e3.dataTransfer.setDragImage(t3, 1, 1);
2285
2251
  }
2286
- }, onDragEnter: Rt2, onDragLeave: Rt2, onDragOver: Rt2, onDrop: Pt2, children: [b("div", { className: yn(Ia), style: { flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: ge2 ? void 0 : 0, "--sxl-app-color-high-contrast": re2.palette.primary.main, "--sxl-app-color-primary": re2.palette.primary.main, "--sxl-app-color-primary-dark": re2.palette.primary.dark, "--sxl-app-color-primary-light": re2.palette.primary.light, "--sxl-app-color-info": re2.palette.info.main, "--sxl-app-color-info-dark": re2.palette.info.dark, "--sxl-app-color-info-light": re2.palette.info.light, "--sxl-app-color-secondary": re2.palette.secondary.main, "--sxl-app-color-secondary-dark": re2.palette.secondary.dark, "--sxl-app-color-secondary-light": re2.palette.secondary.light, "--sxl-app-color-success": re2.palette.success.main, "--sxl-app-color-success-dark": re2.palette.success.dark, "--sxl-app-color-success-light": re2.palette.success.light, "--sxl-app-color-warning": re2.palette.warning.main, "--sxl-app-color-warning-dark": re2.palette.warning.dark, "--sxl-app-color-warning-light": re2.palette.warning.light, "--sxl-app-color-error": re2.palette.error.main, "--sxl-app-color-error-dark": re2.palette.error.dark, "--sxl-app-color-error-light": re2.palette.error.light, "--sxl-app-color-text": re2.palette.text.primary, "--sxl-app-color-text-secondary": re2.palette.text.secondary, "--sxl-app-color-text-disabled": re2.palette.text.disabled, "--sxl-app-color-background": re2.palette.background.paper, "--sxl-app-color-button-surface": re2.palette.grey[600], "--sxl-app-color-shadow": re2.palette.action.focus, "--sxl-app-color-grey": re2.palette.grey[500], "--sxl-app-filter-dark-invert": Ne2.body.darkMode && oe2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": Ne2.body.darkMode ? `linear-gradient(${ar("#fff", lr(5))}, ${ar("#fff", lr(5))})` : void 0 }, children: [it2, ot2 ? Et2 : null, x(A, { sx: { marginBottom: (e3) => e3.spacing(0.75) } }), Ht2, lt2, x(De, { arrow: true, disableInteractive: true, open: Ve2, title: x(I, { variant: "subtitle2", component: "div", children: Ue2 }), placement: _e2, TransitionProps: { timeout: { exit: 0 } }, PopperProps: { popperRef: Oe2, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: Ve2 ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(Ke2.x, Ke2.y, Ke2.width, Ke2.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] }, children: x(A, {}) }), xt2, Bt2] }), Nt2] });
2252
+ }, onDragEnter: Pt2, onDragLeave: Pt2, onDragOver: Pt2, onDrop: Mt2, children: [b("div", { className: Sn(Ha), style: { flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: ge2 ? void 0 : 0, "--sxl-app-color-high-contrast": re2.palette.primary.main, "--sxl-app-color-primary": re2.palette.primary.main, "--sxl-app-color-primary-dark": re2.palette.primary.dark, "--sxl-app-color-primary-light": re2.palette.primary.light, "--sxl-app-color-info": re2.palette.info.main, "--sxl-app-color-info-dark": re2.palette.info.dark, "--sxl-app-color-info-light": re2.palette.info.light, "--sxl-app-color-secondary": re2.palette.secondary.main, "--sxl-app-color-secondary-dark": re2.palette.secondary.dark, "--sxl-app-color-secondary-light": re2.palette.secondary.light, "--sxl-app-color-success": re2.palette.success.main, "--sxl-app-color-success-dark": re2.palette.success.dark, "--sxl-app-color-success-light": re2.palette.success.light, "--sxl-app-color-warning": re2.palette.warning.main, "--sxl-app-color-warning-dark": re2.palette.warning.dark, "--sxl-app-color-warning-light": re2.palette.warning.light, "--sxl-app-color-error": re2.palette.error.main, "--sxl-app-color-error-dark": re2.palette.error.dark, "--sxl-app-color-error-light": re2.palette.error.light, "--sxl-app-color-text": re2.palette.text.primary, "--sxl-app-color-text-secondary": re2.palette.text.secondary, "--sxl-app-color-text-disabled": re2.palette.text.disabled, "--sxl-app-color-background": re2.palette.background.paper, "--sxl-app-color-button-surface": re2.palette.grey[600], "--sxl-app-color-shadow": re2.palette.action.focus, "--sxl-app-color-grey": re2.palette.grey[500], "--sxl-app-filter-dark-invert": Ne2.body.darkMode && oe2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": Ne2.body.darkMode ? `linear-gradient(${ir("#fff", sr(5))}, ${ir("#fff", sr(5))})` : void 0 }, children: [it2, ot2 ? At2 : null, x(E, { sx: { marginBottom: (e3) => e3.spacing(0.75) } }), Ht2, lt2, x(De, { arrow: true, disableInteractive: true, open: Ve2, title: x(I, { variant: "subtitle2", component: "div", children: Ue2 }), placement: _e2, TransitionProps: { timeout: { exit: 0 } }, PopperProps: { popperRef: Oe2, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: Ve2 ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(Ke2.x, Ke2.y, Ke2.width, Ke2.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] }, children: x(E, {}) }), xt2, Bt2] }), Nt2] });
2287
2253
  }));
2288
- di.displayName = "WorkbookElement";
2289
- const ci = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:hover)": { color: (e3) => e3.palette.text.secondary }, backgroundColor: (e3) => ar(e3.palette.background.paper, 0.6), borderRadius: (e3) => `${e3.shape.borderRadius}px`, border: (t3) => `solid ${e2 ? t3.palette.divider : "transparent"} 1px`, "&.Mui-disabled": { border: (t3) => `solid ${e2 ? t3.palette.divider : "transparent"} 1px` }, "&:focus-within:not([disabled])": { backgroundColor: (e3) => e3.palette.background.paper }, "&:hover:not([disabled])": { border: (t3) => `solid ${e2 ? t3.palette.text?.primary : t3.palette.divider} 1px`, backgroundColor: null }, "&.Mui-focusVisible": { outline: (e3) => `solid ${e3.palette.primary.main} 1px !important`, border: (e3) => `1px solid ${e3.palette?.primary?.main} !important` } }, mi = k(S((e2, t2) => {
2290
- const { sx: o2, workbook: n2, title: r2 = "", placeHolder: a2 = "Untitled", onTitleChange: l2, readOnly: i2 = false, hidden: s2, ...d2 } = e2, [c2, m2] = D(false), [p2, u2] = D(false), [g2, h2] = D(r2 ?? ""), [f2, y2] = D(""), [w2, { width: k2 }] = Fr(), [S2, { width: C2 }] = Fr(), [v2, T2] = D(false), R2 = P(null), B2 = P(null), F2 = Kn(t2, () => ({ requestWorkbookTitle: (e3 = null, t3) => {
2291
- B2.current = { onAccept: e3, requestReason: t3?.requestReason }, t3?.selectAll && R2.current?.select(), R2.current?.focus(t3);
2254
+ ii.displayName = "WorkbookElement";
2255
+ const si = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:hover)": { color: (e3) => e3.palette.text.secondary }, backgroundColor: (e3) => ir(e3.palette.background.paper, 0.6), borderRadius: (e3) => `${e3.shape.borderRadius}px`, border: (t3) => `solid ${e2 ? t3.palette.divider : "transparent"} 1px`, "&.Mui-disabled": { border: (t3) => `solid ${e2 ? t3.palette.divider : "transparent"} 1px` }, "&:focus-within:not([disabled])": { backgroundColor: (e3) => e3.palette.background.paper }, "&:hover:not([disabled])": { border: (t3) => `solid ${e2 ? t3.palette.text?.primary : t3.palette.divider} 1px`, backgroundColor: null }, "&.Mui-focusVisible": { outline: (e3) => `solid ${e3.palette.primary.main} 1px !important`, border: (e3) => `1px solid ${e3.palette?.primary?.main} !important` } }, di = S(k((e2, t2) => {
2256
+ const { sx: o2, workbook: n2, title: r2 = "", placeHolder: a2 = "Untitled", onTitleChange: l2, readOnly: i2 = false, hidden: s2, ...d2 } = e2, [c2, m2] = D(false), [p2, u2] = D(false), [g2, h2] = D(r2 ?? ""), [f2, y2] = D(""), [w2, { width: S2 }] = Ar(), [k2, { width: C2 }] = Ar(), [v2, T2] = D(false), P2 = M(null), B2 = M(null), F2 = Zn(t2, () => ({ requestWorkbookTitle: (e3 = null, t3) => {
2257
+ B2.current = { onAccept: e3, requestReason: t3?.requestReason }, t3?.selectAll && P2.current?.select(), P2.current?.focus(t3);
2292
2258
  }, focus: (e3) => {
2293
- R2.current?.focus(e3);
2259
+ P2.current?.focus(e3);
2294
2260
  } }), []);
2295
- return E(() => {
2261
+ return A(() => {
2296
2262
  T2(r2 !== g2), y2(r2), h2(r2);
2297
- }, [r2]), M(() => {
2298
- v2 && 0 !== k2 && Mr.debounce(() => {
2263
+ }, [r2]), R(() => {
2264
+ v2 && 0 !== S2 && Mr.debounce(() => {
2299
2265
  T2(false);
2300
2266
  }, 300)();
2301
- }, [v2, k2]), M(() => {
2302
- u2(g2 && !Ar.isValidWindowsFilename(g2));
2303
- }, [g2]), s2 ? null : x(A, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: v2 ? "0" : "1", transition: v2 ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: Dr([F2, S2, t2]), ...d2, children: x(Le, { label: B2.current?.requestReason ?? "Workbook Name", children: b(A, { className: yn({ "Mui-focusVisible": c2 }), sx: { visibility: 0 === k2 ? "hidden" : "visible", display: "block", maxWidth: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", paddingLeft: "12px", paddingRight: "12px", marginLeft: "2px", marginRight: "2px", paddingTop: "2px", paddingBottom: "1px", ...ci(true, i2), ...o2 }, children: [i2 ? x(I, { variant: "subtitle1", component: "div", sx: { whiteSpace: "nowrap", fontStyle: g2 !== f2 ? "italic" : void 0, userSelect: "none", textOverflow: "ellipsis", lineHeight: "1.4375em", border: "transparent 1px solid", color: (e3) => p2 ? e3.palette.error.dark : void 0 }, children: r2 ?? a2 }) : x(O, { sx: { width: `${Math.min(k2 + 3, Math.max(C2, F2.current?.getBoundingClientRect()?.width))}px`, overflow: "hidden", whiteSpace: "nowrap", fontWeight: "600", maxWidth: "100%", border: "none", padding: "0px", margin: "0px", color: (e3) => p2 ? e3.palette.error.dark : void 0, fontStyle: g2 !== f2 ? "italic" : void 0, "& input": { paddingTop: "0px", paddingBottom: "0px", textOverflow: "ellipsis" } }, disableUnderline: true, fullWidth: false, multiline: false, readOnly: i2, spellCheck: false, placeholder: a2, onFocus: (e3) => {
2267
+ }, [v2, S2]), R(() => {
2268
+ u2(g2 && !Lr.isValidWindowsFilename(g2));
2269
+ }, [g2]), s2 ? null : x(E, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: v2 ? "0" : "1", transition: v2 ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: Pr([F2, k2, t2]), ...d2, children: x(Le, { label: B2.current?.requestReason ?? "Workbook Name", children: b(E, { className: Sn({ "Mui-focusVisible": c2 }), sx: { visibility: 0 === S2 ? "hidden" : "visible", display: "block", maxWidth: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", paddingLeft: "12px", paddingRight: "12px", marginLeft: "2px", marginRight: "2px", paddingTop: "2px", paddingBottom: "1px", ...si(true, i2), ...o2 }, children: [i2 ? x(I, { variant: "subtitle1", component: "div", sx: { whiteSpace: "nowrap", fontStyle: g2 !== f2 ? "italic" : void 0, userSelect: "none", textOverflow: "ellipsis", lineHeight: "1.4375em", border: "transparent 1px solid", color: (e3) => p2 ? e3.palette.error.dark : void 0 }, children: r2 ?? a2 }) : x(O, { sx: { width: `${Math.min(S2 + 3, Math.max(C2, F2.current?.getBoundingClientRect()?.width))}px`, overflow: "hidden", whiteSpace: "nowrap", fontWeight: "600", maxWidth: "100%", border: "none", padding: "0px", margin: "0px", color: (e3) => p2 ? e3.palette.error.dark : void 0, fontStyle: g2 !== f2 ? "italic" : void 0, "& input": { paddingTop: "0px", paddingBottom: "0px", textOverflow: "ellipsis" } }, disableUnderline: true, fullWidth: false, multiline: false, readOnly: i2, spellCheck: false, placeholder: a2, onFocus: (e3) => {
2304
2270
  m2(true), e3.target?.select();
2305
- }, inputProps: { name: "input-workbook-title", autoComplete: "off", ref: R2 }, onBlur: () => {
2271
+ }, inputProps: { name: "input-workbook-title", autoComplete: "off", ref: P2 }, onBlur: () => {
2306
2272
  m2(false), p2 ? h2(f2) : (g2 !== f2 && (l2?.(g2), g2 && B2.current?.onAccept?.(g2, "blur")), B2.current = null);
2307
2273
  }, onChange: (e3) => {
2308
- if (e3.target.value.length > Ar.MAX_WORKBOOK_NAME_SIZE) return e3.stopPropagation(), void e3.preventDefault();
2274
+ if (e3.target.value.length > Lr.MAX_WORKBOOK_NAME_SIZE) return e3.stopPropagation(), void e3.preventDefault();
2309
2275
  h2(e3.target.value);
2310
2276
  }, onKeyDown: (e3) => {
2311
- (Ar.WINDOW_FILENAME_CHAR_RESERVED_REGEX.test(e3.key) || e3.target?.value.length > Ar.MAX_WORKBOOK_NAME_SIZE) && e3.preventDefault(), e3.which === Gn.Enter || e3.which === Gn.Tab ? (p2 ? h2(f2) : (l2?.(g2), g2 && (B2.current?.onAccept?.(g2, "keydown"), B2.current = null)), e3.stopPropagation(), e3.preventDefault(), n2?.focus()) : e3.which === Gn.Escape && (g2 === f2 ? n2?.focus() : (h2(f2), setTimeout(() => {
2277
+ (Lr.WINDOW_FILENAME_CHAR_RESERVED_REGEX.test(e3.key) || e3.target?.value.length > Lr.MAX_WORKBOOK_NAME_SIZE) && e3.preventDefault(), e3.which === jn.Enter || e3.which === jn.Tab ? (p2 ? h2(f2) : (l2?.(g2), g2 && (B2.current?.onAccept?.(g2, "keydown"), B2.current = null)), e3.stopPropagation(), e3.preventDefault(), n2?.focus()) : e3.which === jn.Escape && (g2 === f2 ? n2?.focus() : (h2(f2), setTimeout(() => {
2312
2278
  e3.target?.select();
2313
2279
  }, 0)), B2.current = null, e3.stopPropagation(), e3.preventDefault());
2314
- }, value: g2 }), x(A, { ref: w2, sx: { position: "absolute", visibility: "hidden", top: "-9999px", fontWeight: "600 !important", whiteSpace: "pre", fontStyle: g2 !== f2 ? "italic" : void 0, fontFamily: (e3) => e3.typography.fontFamily, letterSpacing: "0.00938em" }, children: g2 || a2 })] }) }) });
2280
+ }, value: g2 }), x(E, { ref: w2, sx: { position: "absolute", visibility: "hidden", top: "-9999px", fontWeight: "600 !important", whiteSpace: "pre", fontStyle: g2 !== f2 ? "italic" : void 0, fontFamily: (e3) => e3.typography.fontFamily, letterSpacing: "0.00938em" }, children: g2 || a2 })] }) }) });
2315
2281
  }));
2316
- mi.displayName = "WorkbookTitle";
2317
- const pi = k(S((e2, t2) => {
2282
+ di.displayName = "WorkbookTitle";
2283
+ const ci = S(k((e2, t2) => {
2318
2284
  const { sx: o2, style: n2, className: r2, licenseKey: a2, renderLoadingPanel: l2, ...i2 } = e2;
2319
2285
  a2 && g.setLicenseKey(a2);
2320
2286
  const s2 = C(() => {
2321
2287
  const e3 = { transitionDelay: "160ms", transparentBackground: true };
2322
- return x(A, { sx: o2, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "center", justifyContent: "center", ...n2 }, children: l2?.(e3) ?? x(Me, { ...e3 }) });
2323
- }, [o2, n2, l2]), d2 = C(() => w.lazy(async () => await Promise.resolve().then(() => vi)), []);
2324
- return x(y, { children: x(R, { fallback: s2, children: x(d2, { ...i2, className: r2, renderLoadingPanel: l2, sx: o2, style: n2, ref: t2 }) }) });
2288
+ return x(E, { sx: o2, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "center", justifyContent: "center", ...n2 }, children: l2?.(e3) ?? x(Re, { ...e3 }) });
2289
+ }, [o2, n2, l2]), d2 = C(() => w.lazy(async () => await Promise.resolve().then(() => ki)), []);
2290
+ return x(y, { children: x(P, { fallback: s2, children: x(d2, { ...i2, className: r2, renderLoadingPanel: l2, sx: o2, style: n2, ref: t2 }) }) });
2325
2291
  }));
2326
- pi.displayName = "Studio";
2327
- const ui = [{ key: "SheetXL", description: "SheetXL", mimeType: ".sxl", exts: ["sxl"], handler: null, isDefault: true }, { 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 }], gi = [{ key: "SheetXL", mimeType: "application/vnd.sheetxl.sheet", description: "SheetXL", ext: "sxl", handler: null, isDefault: true }, { 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 }];
2328
- class hi {
2329
- constructor(e2 = ui, t2 = gi) {
2292
+ ci.displayName = "Studio";
2293
+ const mi = [{ key: "SheetXL", description: "SheetXL", mimeType: ".sxl", exts: ["sxl"], handler: null, isDefault: true }, { 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 }], pi = [{ key: "SheetXL", mimeType: "application/vnd.sheetxl.sheet", description: "SheetXL", ext: "sxl", handler: null, isDefault: true }, { 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 }];
2294
+ class ui {
2295
+ constructor(e2 = mi, t2 = pi) {
2330
2296
  this._readFormatType = [], this._writeFormatType = [], this._readFormatType = Object.freeze([...e2]), this._writeFormatType = Object.freeze([...t2]);
2331
2297
  }
2332
2298
  getReadFormats() {
@@ -2367,21 +2333,21 @@ class hi {
2367
2333
  }
2368
2334
  }
2369
2335
  }
2370
- const fi = new hi(), xi = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, bi = S((e2, t2) => {
2371
- const { id: o2, message: n2, iconVariant: r2, error: a2, hideIconVariant: l2, ...i2 } = e2, { closeSnackbar: s2 } = Lr(), d2 = rr(), [c2, m2] = D(false), p2 = v(() => {
2336
+ const gi = new ui(), hi = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, fi = k((e2, t2) => {
2337
+ const { id: o2, message: n2, iconVariant: r2, error: a2, hideIconVariant: l2, ...i2 } = e2, { closeSnackbar: s2 } = zr(), d2 = lr(), [c2, m2] = D(false), p2 = v(() => {
2372
2338
  m2((e3) => !e3);
2373
2339
  }, []), u2 = v(() => {
2374
2340
  s2(o2);
2375
2341
  }, [o2, s2]);
2376
2342
  let g2 = a2?.message;
2377
- return !g2 && T(n2) && (g2 = n2), g2 || "string" != typeof n2 || (g2 = n2), g2 || (g2 = `Unknown Error: ${n2}`), x(Hr, { ref: t2, className: yn(xi.root, "error-snackbar"), children: b(te, { className: xi.card, style: { backgroundColor: d2.palette.error.dark, border: `1px solid ${d2.palette.error.dark}` }, children: [b(oe, { className: xi.actionRoot, children: [l2 ? null : r2?.error, x(I, { variant: "body2", component: "div", className: xi.typography, style: { color: d2.palette.text.primary }, children: g2 }), x("div", { style: { flex: "1 1 auto" } }), b("div", { className: xi.icons, children: [a2 ? x(L, { "aria-label": "Show more", size: "small", className: yn(xi.expand, { [xi.expandOpen]: c2 }), style: { color: d2.palette.action.active }, onClick: p2, children: x(Fn, {}) }) : null, x(L, { size: "small", className: xi.expand, style: { color: d2.palette.action.active }, onClick: u2, children: x(In, { fontSize: "small" }) })] })] }), a2 ? x(ne, { in: c2, timeout: "auto", unmountOnExit: true, children: x("div", { className: xi.stackTraceContainer, style: { backgroundColor: d2.palette.error.light, borderTop: `1px solid ${d2.palette.error.main}` }, children: x(nn, { error: a2, hideLineNumbers: true }) }) }) : null] }) });
2343
+ return !g2 && T(n2) && (g2 = n2), g2 || "string" != typeof n2 || (g2 = n2), g2 || (g2 = `Unknown Error: ${n2}`), x(Wr, { ref: t2, className: Sn(hi.root, "error-snackbar"), children: b(te, { className: hi.card, style: { backgroundColor: d2.palette.error.dark, border: `1px solid ${d2.palette.error.dark}` }, children: [b(oe, { className: hi.actionRoot, children: [l2 ? null : r2?.error, x(I, { variant: "body2", component: "div", className: hi.typography, style: { color: d2.palette.text.primary }, children: g2 }), x("div", { style: { flex: "1 1 auto" } }), b("div", { className: hi.icons, children: [a2 ? x(L, { "aria-label": "Show more", size: "small", className: Sn(hi.expand, { [hi.expandOpen]: c2 }), style: { color: d2.palette.action.active }, onClick: p2, children: x(An, {}) }) : null, x(L, { size: "small", className: hi.expand, style: { color: d2.palette.action.active }, onClick: u2, children: x(Hn, { fontSize: "small" }) })] })] }), a2 ? x(ne, { in: c2, timeout: "auto", unmountOnExit: true, children: x("div", { className: hi.stackTraceContainer, style: { backgroundColor: d2.palette.error.light, borderTop: `1px solid ${d2.palette.error.main}` }, children: x(nn, { error: a2, hideLineNumbers: true }) }) }) : null] }) });
2378
2344
  });
2379
- bi.displayName = "ToastError";
2380
- const yi = k(S((e2, t2) => {
2381
- const { commands: o2, commandHook: n2, scope: r2 = "workbook", disabled: a2 = false, ...l2 } = e2, i2 = On((e3) => {
2382
- const t3 = { variant: $n.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...t3, command: o2.getCommand("newWorkbook"), icon: ae(x(rn, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: o2.getCommand("openWorkbook"), icon: ae(x(an, {})) }), x(me, { ...t3, commands: o2, quickCommand: "saveWorkbook", icon: ae(x(dn, {})), createPopupPanel: (e4) => {
2345
+ fi.displayName = "ToastError";
2346
+ const xi = S(k((e2, t2) => {
2347
+ const { commands: o2, commandHook: n2, scope: r2 = "workbook", disabled: a2 = false, ...l2 } = e2, i2 = Gn((e3) => {
2348
+ const t3 = { variant: Vn.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: r2, disabled: a2 }, l3 = b(y, { children: [x(le, { ...t3, command: o2.getCommand("newWorkbook"), icon: ae(x(rn, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: o2.getCommand("openWorkbook"), icon: ae(x(an, {})) }), x(me, { ...t3, commands: o2, quickCommand: "saveWorkbook", icon: ae(x(dn, {})), createPopupPanel: (e4) => {
2383
2349
  const n3 = { ...t3, parentFloat: e4.floatReference, scope: "saveWorkbook" }, r3 = [];
2384
- return fi.getWriteFormats().forEach((e5) => {
2350
+ return gi.getWriteFormats().forEach((e5) => {
2385
2351
  if (e5.isDefault) return;
2386
2352
  let t4 = null;
2387
2353
  "CSV" === e5.key ? t4 = ae(x(ln, {})) : "Excel" === e5.key && (t4 = ae(x(sn, {})));
@@ -2397,35 +2363,35 @@ const yi = k(S((e2, t2) => {
2397
2363
  }, [a2, o2, n2, r2]), s2 = "File";
2398
2364
  return x(me, { commands: o2, disabled: a2, commandHook: n2, scope: r2, label: s2, tooltip: "Options for saving and loading the workbook.", sx: { paddingBottom: "0px", "& button": { paddingTop: "0px", paddingBottom: "0px", height: (e3) => `calc(1.25rem + ${e3.spacing(2)}px)` } }, ...l2, createPopupPanel: i2, icon: x(ht, { className: "label", icon: null, label: s2 }) });
2399
2365
  }));
2400
- yi.displayName = "StandaloneFileCommandButton";
2401
- const wi = x(Le, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: x(A, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: x(Sr, { onClick: () => {
2366
+ xi.displayName = "StandaloneFileCommandButton";
2367
+ const bi = x(Le, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: x(E, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: x(vr, { onClick: () => {
2402
2368
  window?.open("https://www.sheetxl.com", "_blank");
2403
- }, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), ki = k(S((e2, t2) => {
2404
- const { commands: o2, workbook: n2, logo: r2 = wi, mainElement: a2, showFileMenu: l2 = true, showAppearanceMenu: i2 = true, ...s2 } = e2, { reference: d2 } = no(), [c2, { width: m2 }] = Fr(), p2 = m2 < 530, u2 = l2 ? x(yi, { commands: o2, commandHook: { beforeExecute() {
2369
+ }, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), yi = S(k((e2, t2) => {
2370
+ const { commands: o2, workbook: n2, logo: r2 = bi, mainElement: a2, showFileMenu: l2 = true, showAppearanceMenu: i2 = true, ...s2 } = e2, { reference: d2 } = no(), [c2, { width: m2 }] = Ar(), p2 = m2 < 530, u2 = l2 ? x(xi, { commands: o2, commandHook: { beforeExecute() {
2405
2371
  d2?.closeAll();
2406
2372
  }, onError(e3, t3, o3) {
2407
- } } }) : null, g2 = i2 ? x(Ka, { commands: o2, commandHook: { beforeExecute() {
2373
+ } } }) : null, g2 = i2 ? x(Za, { commands: o2, commandHook: { beforeExecute() {
2408
2374
  d2?.closeAll();
2409
2375
  }, onError(e3, t3, o3) {
2410
- } } }) : null, h2 = C(() => ({ paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }), []), f2 = P(null);
2411
- return x(A, { ref: Dr([f2, c2, t2]), ...s2, children: zl({ commands: o2, renderCompact: p2, workbook: n2, selectWrapper: (e3) => b(A, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (e4) => e4.spacing(1), paddingLeft: (e4) => e4.spacing(1), paddingRight: (e4) => e4.spacing(1) }, children: [b(A, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (e4) => e4.spacing(0.5) }, children: [r2, b(A, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (e4) => e4.spacing(0.25) }, children: [u2, e3] })] }), x(A, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: a2 }), x(A, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: p2 && !g2 ? "0 0 auto" : "1 1 100%" }, children: g2 })] }), selectProps: h2, toolbarsProps: { Home: { sx: {} } } }) });
2376
+ } } }) : null, h2 = C(() => ({ paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }), []), f2 = M(null);
2377
+ return x(E, { ref: Pr([f2, c2, t2]), ...s2, children: Ll({ commands: o2, renderCompact: p2, workbook: n2, selectWrapper: (e3) => b(E, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (e4) => e4.spacing(1), paddingLeft: (e4) => e4.spacing(1), paddingRight: (e4) => e4.spacing(1) }, children: [b(E, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (e4) => e4.spacing(0.5) }, children: [r2, b(E, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (e4) => e4.spacing(0.25) }, children: [u2, e3] })] }), x(E, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: a2 }), x(E, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: p2 && !g2 ? "0 0 auto" : "1 1 100%" }, children: g2 })] }), selectProps: h2, toolbarsProps: { Home: { sx: {} } } }) });
2412
2378
  }));
2413
- ki.displayName = "StudioToolbar";
2414
- const Si = k(S((e2, t2) => {
2415
- const { workbook: o2, setWorkbook: n2, refWorkbookTitle: r2, titleWorkbook: a2, setWorkbookTitle: l2, titlePlaceHolder: i2, children: s2, undoManager: d2, commands: c2, importExportDisabled: m2, themeOptions: p2 } = e2, u2 = Lr(), g2 = u2 ? u2.enqueueSnackbar : () => {
2379
+ yi.displayName = "StudioToolbar";
2380
+ const wi = S(k((e2, t2) => {
2381
+ const { workbook: o2, setWorkbook: n2, refWorkbookTitle: r2, titleWorkbook: a2, setWorkbookTitle: l2, titlePlaceHolder: i2, children: s2, undoManager: d2, commands: c2, importExportDisabled: m2, themeOptions: p2 } = e2, u2 = zr(), g2 = u2 ? u2.enqueueSnackbar : () => {
2416
2382
  }, h2 = u2 ? u2.closeSnackbar : () => {
2417
- }, [f2, k2] = D({ isMounted: false, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), S2 = v(() => {
2418
- k2((e3) => ({ ...e3, isMounted: true }));
2383
+ }, [f2, S2] = D({ isMounted: false, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), k2 = v(() => {
2384
+ S2((e3) => ({ ...e3, isMounted: true }));
2419
2385
  }, []), T2 = v(() => {
2420
- k2((e3) => ({ ...e3, isMounted: false }));
2421
- }, []), R2 = mn(), B2 = pn(), F2 = un(), N2 = P(/* @__PURE__ */ new Set()), E2 = C(() => {
2386
+ S2((e3) => ({ ...e3, isMounted: false }));
2387
+ }, []), P2 = {}, B2 = un(P2), F2 = gn(P2), N2 = hn(P2), A2 = M(/* @__PURE__ */ new Set()), E2 = C(() => {
2422
2388
  const e3 = (e4, t3) => {
2423
2389
  if (t3?.onceKey) {
2424
- if (N2.current.has(t3.onceKey)) return;
2425
- const e5 = new Set(N2.current);
2426
- e5.add(t3.onceKey), N2.current = e5;
2390
+ if (A2.current.has(t3.onceKey)) return;
2391
+ const e5 = new Set(A2.current);
2392
+ e5.add(t3.onceKey), A2.current = e5;
2427
2393
  }
2428
- const o3 = { variant: t3?.type ?? qn.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: t3?.preventDuplicate, persist: t3?.persist ?? t3?.type === qn.Error, action: (e5) => x(L, { onClick: () => h2(e5), children: x(zn, {}) }) };
2394
+ const o3 = { variant: t3?.type ?? Xn.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: t3?.preventDuplicate, persist: t3?.persist ?? t3?.type === Xn.Error, action: (e5) => x(L, { onClick: () => h2(e5), children: x($n, {}) }) };
2429
2395
  t3?.enqueueProps && Object.assign(o3, t3.enqueueProps), e4 || console.log("message is 'null'", t3), g2(e4 ?? "Alert", o3);
2430
2396
  };
2431
2397
  return { showMessage: e3, showBusy: (e4, t3) => {
@@ -2433,7 +2399,7 @@ const Si = k(S((e2, t2) => {
2433
2399
  const n3 = new Promise((e5) => {
2434
2400
  o3 = e5;
2435
2401
  });
2436
- return k2((t4) => {
2402
+ return S2((t4) => {
2437
2403
  const r3 = new Map(t4.starting);
2438
2404
  r3.set(n3, o3);
2439
2405
  return { ...t4, label: e4, starting: r3 };
@@ -2442,44 +2408,44 @@ const Si = k(S((e2, t2) => {
2442
2408
  const n3 = { ...t3, onKeyDown: (e5) => {
2443
2409
  c2?.dispatchToFocusedCommand(e5), e5.isDefaultPrevented() || e5.isPropagationStopped() || t3?.onKeyDown?.(e5);
2444
2410
  } };
2445
- return R2(e4, { sort: () => import("./CuomeW-4DDc1ywFW.mjs"), numberFormat: () => import("./DgHCTCARk1Gv_msN.mjs"), hyperlink: () => import("./Bu58psaOsDy_zPOJ.mjs"), comments: () => import("./X11ONmg6R1Y6hfue.mjs"), find: () => import("./0JTY0jNrXiIiOqWY.mjs"), tableDetails: () => import("./CE_I2ijQF8MeexHD.mjs"), tableNew: () => import("./BqQ6JNhQ1K321g9U.mjs"), namedDetails: () => import("./DRt8kMDuCJn53CIE.mjs") }[e4], n3, o3);
2446
- }, showOptions: B2, showInputOptions: F2, showError: (t3) => {
2447
- let o3, n3 = qn.Error, r3 = "Unknown Error";
2448
- "string" == typeof t3 ? r3 = t3 : t3 instanceof Error && (o3 = t3, t3.message && (r3 = t3.message)), t3 instanceof Pr && (n3 = qn.Info), e3(r3, { type: n3, enqueueProps: { error: o3 } });
2411
+ return B2(e4, { sort: () => import("./C2yYkXDnvboLxKsV.mjs"), numberFormat: () => import("./D_iq-nakEihGXnfs.mjs"), hyperlink: () => import("./DuTuCOWVEZrVzH3R.mjs"), comments: () => import("./IXbZFmdmVOCo2beQ.mjs"), find: () => import("./C1WgCk3bWrblj2tf.mjs"), tableDetails: () => import("./BhrCUSzh6UYuYooH.mjs"), tableNew: () => import("./WjtiXN--XGZjB3uh.mjs"), namedDetails: () => import("./2ivPcTvenc9052Au.mjs") }[e4], n3, o3);
2412
+ }, showOptions: F2, showInputOptions: N2, showError: (t3) => {
2413
+ let o3, n3 = Xn.Error, r3 = "Unknown Error";
2414
+ "string" == typeof t3 ? r3 = t3 : t3 instanceof Error && (o3 = t3, t3.message && (r3 = t3.message)), t3 instanceof Fr && (n3 = Xn.Info), e3(r3, { type: n3, enqueueProps: { error: o3 } });
2449
2415
  } };
2450
- }, []), A2 = v(() => {
2451
- }, []), I2 = ((e3) => {
2452
- const { workbook: t3, setWorkbook: o3, importExportDisabled: n3, workbookTitle: r3 = "export", setWorkbookTitle: a3, notifier: l3, requestWorkbookTitle: i3, themeOptions: s3, undoManager: d3, commands: c3, onExecute: m3 } = e3, p3 = On(s3?.onModeChange, [s3?.onModeChange]), u3 = On(s3?.onEnabledDarkGridChange, [s3?.onEnabledDarkGridChange]), g3 = On(s3?.onEnabledDarkImagesChange, [s3?.onEnabledDarkImagesChange]), h3 = On(async (e4 = null, t4 = null) => {
2416
+ }, []), I2 = v(() => {
2417
+ }, []), H2 = ((e3) => {
2418
+ const { workbook: t3, setWorkbook: o3, importExportDisabled: n3, workbookTitle: r3 = "export", setWorkbookTitle: a3, notifier: l3, requestWorkbookTitle: i3, themeOptions: s3, undoManager: d3, commands: c3, onExecute: m3 } = e3, p3 = Gn(s3?.onModeChange, [s3?.onModeChange]), u3 = Gn(s3?.onEnabledDarkGridChange, [s3?.onEnabledDarkGridChange]), g3 = Gn(s3?.onEnabledDarkImagesChange, [s3?.onEnabledDarkImagesChange]), h3 = Gn(async (e4 = null, t4 = null) => {
2453
2419
  const o4 = [];
2454
2420
  let n4, r4 = null, a4 = null;
2455
- if ("string" == typeof e4 ? a4 = e4 : r4 = e4, n4 = r4 ? e4 : await Mr.openFileDialog(a4 ?? fi.getAllReadFormatTypeAsString().join(",")), !n4) return null;
2421
+ if ("string" == typeof e4 ? a4 = e4 : r4 = e4, n4 = r4 ? e4 : await Mr.openFileDialog(a4 ?? gi.getAllReadFormatTypeAsString().join(",")), !n4) return null;
2456
2422
  const i4 = { source: n4, createWorkbookOptions: t4, onWarning: (e5) => {
2457
2423
  o4.push(e5);
2458
- } }, s4 = await fi.read(i4, l3);
2424
+ } }, s4 = await gi.read(i4, l3);
2459
2425
  return o4.length > 0 && (l3?.showMessage?.("Some elements were not able to be imported. See console for details."), console.warn("Import warnings:\n" + o4.join("\n"))), s4;
2460
- }, [m3, l3, t3]), f3 = On(async (e4, t4, o4) => {
2426
+ }, [m3, l3, t3]), f3 = Gn(async (e4, t4, o4) => {
2461
2427
  if (!t4 && i3) {
2462
2428
  const t5 = await i3("Enter Workbook name to " + (o4.isDefault ? "Save." : `Export as ${o4.description}.`));
2463
- return null !== t5 && fi.writeFile(t5, e4, { formatType: o4.key });
2429
+ return null !== t5 && gi.writeFile(t5, e4, { formatType: o4.key });
2464
2430
  }
2465
- return fi.writeFile(t4, e4, { formatType: o4.key });
2431
+ return gi.writeFile(t4, e4, { formatType: o4.key });
2466
2432
  }, [l3, t3, i3]), x2 = v(() => ({ contains: (e4) => true, focus() {
2467
2433
  } }), []), b2 = C(() => {
2468
2434
  const e4 = [];
2469
- n3 || (fi.getWriteFormats().forEach((o4) => {
2435
+ n3 || (gi.getWriteFormats().forEach((o4) => {
2470
2436
  const n4 = o4.isDefault, a4 = { label: n4 ? "Save Workbook" : `Save Workbook as ${o4.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${o4.description}` }, tags: o4.tags, description: `Save the workbook to the desktop${n4 ? "" : ` as ${o4.description}`}.` };
2471
- n4 && (a4.shortcut = { key: "S", modifiers: [Qn.Ctrl] }, e4.push(new Yn("saveWorkbookAs", x2, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [Qn.Shift, Qn.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
2437
+ n4 && (a4.shortcut = { key: "S", modifiers: [tr.Ctrl] }, e4.push(new er("saveWorkbookAs", x2, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [tr.Shift, tr.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
2472
2438
  f3(t3, null, o4).catch((e5) => {
2473
2439
  l3?.showError?.(e5);
2474
2440
  });
2475
2441
  })));
2476
2442
  const i5 = n4 ? "saveWorkbook" : `saveWorkbookAs${o4.key}`;
2477
- e4.push(new Yn(i5, x2, a4, (e5) => {
2443
+ e4.push(new er(i5, x2, a4, (e5) => {
2478
2444
  f3(t3, e5 ?? r3, o4).catch((e6) => {
2479
2445
  l3?.showError?.(e6);
2480
2446
  });
2481
2447
  }));
2482
- }), e4.push(new Yn("openWorkbook", x2, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", shortcut: { key: "O", modifiers: [Qn.Ctrl] } }, async (e5 = null) => {
2448
+ }), e4.push(new er("openWorkbook", x2, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", shortcut: { key: "O", modifiers: [tr.Ctrl] } }, async (e5 = null) => {
2483
2449
  const n4 = { date1904: t3.isDate1904(), ...t3.options };
2484
2450
  try {
2485
2451
  const r4 = await h3(e5, n4);
@@ -2497,7 +2463,7 @@ const Si = k(S((e2, t2) => {
2497
2463
  } catch (e6) {
2498
2464
  l3?.showError?.(e6);
2499
2465
  }
2500
- })), e4.push(new Yn("openWorkbookFromUrl", x2, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(e5) {
2466
+ })), e4.push(new er("openWorkbookFromUrl", x2, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(e5) {
2501
2467
  if (!e5) {
2502
2468
  const t4 = await l3?.showInputOptions?.({ title: "Open Workbook from the Web", description: "Enter the web address for the workbook to open.", inputLabel: "Address", initialValue: "https://www.sheetxl.com/examples/features-checklist.xlsx", inputProps: { style: { minWidth: "440px" } }, options: ["Open"] });
2503
2469
  if ("Open" !== t4.option) return;
@@ -2506,28 +2472,28 @@ const Si = k(S((e2, t2) => {
2506
2472
  e5 && console.log("openWorkbookFromUrl", e5);
2507
2473
  })));
2508
2474
  let i4 = [];
2509
- return s3 && (i4 = [new Yn("themeMode", x2, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new Yn("defaultThemeMode", x2, { label: "Use System Light/Dark Mode", scopedLabels: { appearance: "Use System Default" }, description: "Use the system settings to determine styling for light and dark mode." }), new Yn("enableDarkGrid", x2, { label: "Enable Dark Grid", description: "Allow the grid to render in dark mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)." }), new Yn("enableDarkImages", x2, { label: "Enable Dark Images", description: "Allow the images to render in dark mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode." })]), [...e4, ...i4, new Jn("help", x2, { label: "Show Help", description: "Provide Help.", shortcut: { key: "F1" } }, () => {
2510
- }), new Jn("showKeyboardShortcuts", x2, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", shortcut: { key: "/", modifiers: [Qn.Ctrl] } }, () => {
2511
- }), new Yn("gotoUrlGithub", x2, { label: "Github", description: "Download examples, explore source code, and leave a star." }, () => {
2475
+ return s3 && (i4 = [new er("themeMode", x2, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new er("defaultThemeMode", x2, { label: "Use System Light/Dark Mode", scopedLabels: { appearance: "Use System Default" }, description: "Use the system settings to determine styling for light and dark mode." }), new er("enableDarkGrid", x2, { label: "Enable Dark Grid", description: "Allow the grid to render in dark mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)." }), new er("enableDarkImages", x2, { label: "Enable Dark Images", description: "Allow the images to render in dark mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode." })]), [...e4, ...i4, new Qn("help", x2, { label: "Show Help", description: "Provide Help.", shortcut: { key: "F1" } }, () => {
2476
+ }), new Qn("showKeyboardShortcuts", x2, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", shortcut: { key: "/", modifiers: [tr.Ctrl] } }, () => {
2477
+ }), new er("gotoUrlGithub", x2, { label: "Github", description: "Download examples, explore source code, and leave a star." }, () => {
2512
2478
  window?.open("https://github.com/sheetxl/sheetxl");
2513
- }), new Yn("gotoUrlDiscord", x2, { label: "Discord", description: "Join our community on discord." }, () => {
2479
+ }), new er("gotoUrlDiscord", x2, { label: "Discord", description: "Join our community on discord." }, () => {
2514
2480
  window?.open("https://discord.gg/NTKdwUgK9p");
2515
- }), new Yn("gotoUrlDocumentation", x2, { label: "Documentation", description: "Read the documentation." }, () => {
2481
+ }), new er("gotoUrlDocumentation", x2, { label: "Documentation", description: "Read the documentation." }, () => {
2516
2482
  window?.open("https://www.sheetxl.com/docs");
2517
- }), new Yn("gotoUrlIssue", x2, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request." }, () => {
2483
+ }), new er("gotoUrlIssue", x2, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request." }, () => {
2518
2484
  window?.open("https://github.com/sheetxl/sheetxl/issues");
2519
2485
  })];
2520
2486
  }, [t3, r3, l3, n3, s3, c3, d3]), y2 = C(() => {
2521
2487
  let e4 = null;
2522
- return e4 = c3 ? c3.createChildGroup(x2, "standaloneWorkbook", false) : new er(x2, "standaloneWorkbook"), e4.addCommands(b2, true), e4;
2488
+ return e4 = c3 ? c3.createChildGroup(x2, "standaloneWorkbook", false) : new or(x2, "standaloneWorkbook"), e4.addCommands(b2, true), e4;
2523
2489
  }, [c3, b2]);
2524
- nr({ manager: d3, commands: y2, notifier: l3 });
2525
- const { themeMode: k3 } = wl();
2526
- M(() => {
2490
+ ar({ manager: d3, commands: y2, notifier: l3 });
2491
+ const { themeMode: S3 } = cn();
2492
+ R(() => {
2527
2493
  if (!s3 || !y2) return;
2528
- const e4 = "dark" === s3.mode || !s3.mode && "dark" === k3;
2494
+ const e4 = "dark" === s3.mode || !s3.mode && "dark" === S3;
2529
2495
  y2.getCommand("themeMode").update({ state: s3.mode ?? null, label: e4 ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: e4 ? "Dark Mode" : "Light Mode" } }).updateCallback(() => {
2530
- p3(e4 ? xl.Light : xl.Dark);
2496
+ p3(e4 ? mn.Light : mn.Dark);
2531
2497
  }), y2.getCommand("defaultThemeMode").update({ state: !s3.mode }).updateCallback(() => {
2532
2498
  p3(null);
2533
2499
  }), y2.getCommand("enableDarkGrid").update({ state: s3.enableDarkGrid }).updateCallback(() => {
@@ -2535,11 +2501,11 @@ const Si = k(S((e2, t2) => {
2535
2501
  }), y2.getCommand("enableDarkImages").update({ state: s3.enableDarkImages }).updateCallback(() => {
2536
2502
  g3(!s3.enableDarkImages);
2537
2503
  });
2538
- }, [k3, s3, b2]);
2539
- const { showModal: S3 } = cn();
2540
- return M(() => {
2504
+ }, [S3, s3, b2]);
2505
+ const { showModal: k3 } = pn();
2506
+ return R(() => {
2541
2507
  const e4 = () => new Promise((e5, t4) => {
2542
- const o4 = w.lazy(() => import("./BzBHqe1ThbCP-l_d.mjs")), n4 = S3(o4, { title: "Shortcut Keys Reference", commands: y2, onDone: () => {
2508
+ const o4 = w.lazy(() => import("./BzI2nfBkzMD7nh3R.mjs")), n4 = k3(o4, { title: "Shortcut Keys Reference", commands: y2, onDone: () => {
2543
2509
  n4.hide();
2544
2510
  }, TransitionProps: { onExited: () => {
2545
2511
  e5(true);
@@ -2551,13 +2517,13 @@ const Si = k(S((e2, t2) => {
2551
2517
  r2.current ? r2.current.requestWorkbookTitle((e4, o3) => {
2552
2518
  t3(e4);
2553
2519
  }, { selectAll: true, requestReason: e3 }) : t3(i2);
2554
- }), themeOptions: p2, undoManager: d2, notifier: E2, onExecute: A2 });
2555
- M(() => {
2556
- f2.starting.size <= 0 || !f2.isMounted || k2((e3) => {
2520
+ }), themeOptions: p2, undoManager: d2, notifier: E2, onExecute: I2 });
2521
+ R(() => {
2522
+ f2.starting.size <= 0 || !f2.isMounted || S2((e3) => {
2557
2523
  const t3 = new Map(e3.running);
2558
2524
  e3.starting.forEach((e4, o3) => {
2559
2525
  const n3 = () => {
2560
- k2((e5) => {
2526
+ S2((e5) => {
2561
2527
  const t4 = new Map(e5.running);
2562
2528
  t4.delete(o3);
2563
2529
  return { ...e5, running: t4 };
@@ -2568,39 +2534,39 @@ const Si = k(S((e2, t2) => {
2568
2534
  return { ...e3, starting: /* @__PURE__ */ new Map(), running: t3 };
2569
2535
  });
2570
2536
  }, [f2]);
2571
- const [H2, z2] = D(null);
2572
- M(() => {
2573
- 0 !== f2.starting.size || 0 !== f2.running.size ? z2(x(Me, { icon: x(gn, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: true, label: f2.label, onMount: S2, onUnmount: T2, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : z2(null);
2537
+ const [z2, W2] = D(null);
2538
+ R(() => {
2539
+ 0 !== f2.starting.size || 0 !== f2.running.size ? W2(x(Re, { icon: x(fn, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: true, label: f2.label, onMount: k2, onUnmount: T2, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : W2(null);
2574
2540
  }, [f2.starting, f2.running]);
2575
- const W2 = C(() => x(Xa, { commands: I2, disableHover: true, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [I2]), $2 = { notifier: E2, commands: I2 };
2576
- return o2 && ($2.statusBarProps = { childrenEnd: W2 }), b(y, { children: [H2, s2 ? w.cloneElement(s2, $2) : null] });
2541
+ const $2 = C(() => x(Ja, { commands: H2, disableHover: true, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [H2]), O2 = { notifier: E2, commands: H2 };
2542
+ return o2 && (O2.statusBarProps = { childrenEnd: $2 }), b(y, { children: [z2, s2 ? w.cloneElement(s2, O2) : null] });
2577
2543
  }));
2578
- Si.displayName = "SnackbarAndCommandsWrapper";
2579
- const Ci = k(S((e2, t2) => {
2580
- const { className: o2, sx: n2, style: r2, onElementLoad: a2, onError: l2, undoManager: i2, errorPanel: s2 = hn, onKeyDown: d2, workbook: c2, createWorkbookOptions: m2, onWorkbookChange: p2, logo: u2, importExportDisabled: g2 = false, themeOptions: f2, autoFocus: y2 = false, commands: w2, title: k2, onTitleChange: S2, titleProps: T2, renderLoadingPanel: R2, ...B2 } = e2, F2 = P(null), N2 = On(p2, [p2]), I2 = On(S2 ?? T2?.onTitleChange, [S2 ?? T2?.onTitleChange]), L2 = T2?.placeHolder ?? "Untitled", H2 = f2?.mode, { themeMode: z2, source: W2 } = wl({ mode: H2 }), O2 = C(() => ({ ...f2, light: fn(false, Mr.deepMerge(f2?.theme ?? {}, f2?.light ?? {})), dark: fn(true, Mr.deepMerge(f2?.theme ?? {}, f2?.dark ?? {})) }), [f2]), V2 = z2 === xl.Dark, [G2, U2] = D(null);
2581
- M(() => {
2582
- U2(i2 ?? new Br());
2544
+ wi.displayName = "SnackbarAndCommandsWrapper";
2545
+ const Si = S(k((e2, t2) => {
2546
+ const { className: o2, sx: n2, style: r2, onElementLoad: a2, onError: l2, undoManager: i2, errorPanel: s2 = xn, onKeyDown: d2, workbook: c2, createWorkbookOptions: m2, onWorkbookChange: p2, logo: u2, importExportDisabled: g2 = false, themeOptions: f2, autoFocus: y2 = false, commands: w2, title: S2, onTitleChange: k2, titleProps: T2, renderLoadingPanel: P2, ...B2 } = e2, F2 = M(null), N2 = Gn(p2, [p2]), I2 = Gn(k2 ?? T2?.onTitleChange, [k2 ?? T2?.onTitleChange]), L2 = T2?.placeHolder ?? "Untitled", H2 = f2?.mode, { themeMode: z2, source: W2 } = cn({ mode: H2 }), O2 = C(() => ({ ...f2, light: bn(false, Mr.deepMerge(f2?.theme ?? {}, f2?.light ?? {})), dark: bn(true, Mr.deepMerge(f2?.theme ?? {}, f2?.dark ?? {})) }), [f2]), V2 = z2 === mn.Dark, [G2, U2] = D(null);
2547
+ R(() => {
2548
+ U2(i2 ?? new Nr());
2583
2549
  }, [i2]);
2584
- const [j2, _2] = D(null), [q2, K2] = D(null), X2 = fr();
2585
- E(() => {
2550
+ const [j2, _2] = D(null), [q2, K2] = D(null), X2 = br();
2551
+ A(() => {
2586
2552
  if (!c2 || 0 === Object.keys(c2).length && !Mr.isPromiseLike(c2)) {
2587
2553
  const e3 = { theme: X2.getDefaultTheme(), ...m2 };
2588
2554
  K2(new h(e3));
2589
2555
  } else K2(c2);
2590
- }, [c2]), E(() => {
2556
+ }, [c2]), A(() => {
2591
2557
  if (!q2) return;
2592
2558
  if (q2 instanceof h) return _2({ workbook: q2 }), void (c2 !== q2 && N2?.(q2));
2593
2559
  (async () => {
2594
2560
  try {
2595
2561
  let e3, t3 = await Promise.resolve(q2);
2596
- t3 && t3.source && (t3 = await fi.read(t3)), t3.workbook ? (ee2(t3.title), e3 = t3.workbook) : e3 = t3, N2?.(e3), _2({ workbook: e3 });
2562
+ t3 && t3.source && (t3 = await gi.read(t3)), t3.workbook ? (ee2(t3.title), e3 = t3.workbook) : e3 = t3, N2?.(e3), _2({ workbook: e3 });
2597
2563
  } catch (e3) {
2598
2564
  N2?.(null), _2({ error: e3 });
2599
2565
  }
2600
2566
  })();
2601
2567
  }, [q2]);
2602
2568
  const [Z2, J2] = D(null);
2603
- M(() => {
2569
+ R(() => {
2604
2570
  if (!G2 || !j2) return;
2605
2571
  G2.clear();
2606
2572
  const e3 = j2?.workbook?.getTransactions();
@@ -2611,31 +2577,31 @@ const Ci = k(S((e2, t2) => {
2611
2577
  }) }) : console.warn("commit has no description", t3);
2612
2578
  } });
2613
2579
  }, [G2, j2, Z2]);
2614
- const Y2 = On((e3) => {
2580
+ const Y2 = Gn((e3) => {
2615
2581
  e3 ? G2.setRepeatableOperation({ description: e3.label(), repeat: async () => e3.execute() }) : G2.setRepeatableOperation(null);
2616
- }, [G2]), [Q2, ee2] = D(k2 ?? T2?.title ?? "");
2617
- M(() => {
2618
- ee2(k2 ?? T2?.title ?? "");
2619
- }, [k2 ?? T2?.title]), M(() => {
2582
+ }, [G2]), [Q2, ee2] = D(S2 ?? T2?.title ?? "");
2583
+ R(() => {
2584
+ ee2(S2 ?? T2?.title ?? "");
2585
+ }, [S2 ?? T2?.title]), R(() => {
2620
2586
  I2?.(Q2);
2621
2587
  }, [Q2]);
2622
2588
  const [te2, oe2] = D(null), ne2 = C(() => {
2623
2589
  const e3 = () => ({ contains: (e4) => true, focus() {
2624
2590
  } });
2625
- return w2 ? w2.createChildGroup(e3, "application", false) : new er(e3, "application");
2626
- }, [w2]), ae2 = On((e3) => {
2591
+ return w2 ? w2.createChildGroup(e3, "application", false) : new or(e3, "application");
2592
+ }, [w2]), ae2 = Gn((e3) => {
2627
2593
  oe2(e3.source.getViewportElement()), J2(e3), ne2.activate("sheet"), a2?.(e3);
2628
2594
  }, [ne2]);
2629
- M(() => {
2595
+ R(() => {
2630
2596
  Z2 && y2 && Z2.source?.focus("object" == typeof y2 ? y2 : void 0);
2631
2597
  }, [Z2]);
2632
- const le2 = P(null), ie2 = v((e3) => {
2598
+ const le2 = M(null), ie2 = v((e3) => {
2633
2599
  let t3 = null;
2634
- return T2?.hidden || (t3 = x(mi, { ...T2, style: { maxWidth: "100%", ...T2?.style }, workbook: F2.current, ref: le2, title: Q2, placeHolder: L2, onTitleChange: (e4) => {
2600
+ return T2?.hidden || (t3 = x(di, { ...T2, style: { maxWidth: "100%", ...T2?.style }, workbook: F2.current, ref: le2, title: Q2, placeHolder: L2, onTitleChange: (e4) => {
2635
2601
  ee2(e4);
2636
- } })), x(ki, { ...e3, logo: u2, mainElement: t3, showFileMenu: !g2, showAppearanceMenu: !!(O2?.onEnabledDarkGridChange || O2?.onEnabledDarkImagesChange || O2?.onModeChange) });
2602
+ } })), x(yi, { ...e3, logo: u2, mainElement: t3, showFileMenu: !g2, showAppearanceMenu: !!(O2?.onEnabledDarkGridChange || O2?.onEnabledDarkImagesChange || O2?.onModeChange) });
2637
2603
  }, [u2, Q2, T2, O2, g2, ne2]);
2638
- M(() => {
2604
+ R(() => {
2639
2605
  const e3 = (e4) => e4.preventDefault();
2640
2606
  return F2.current?.addEventListener("wheel", e3, { passive: false }), () => {
2641
2607
  F2.current?.removeEventListener("wheel", e3);
@@ -2643,101 +2609,99 @@ const Ci = k(S((e2, t2) => {
2643
2609
  }, []);
2644
2610
  const se2 = C(() => {
2645
2611
  const e3 = { transparentBackground: true };
2646
- return x(A, { sx: n2, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...r2 }, children: R2?.(e3) ?? x(Me, { ...e3 }) });
2647
- }, [n2, r2, R2]), de2 = v(({ error: e3 }) => (l2?.(e3), x(s2, { sx: n2, style: r2, error: e3 ?? "Unable to display empty workbook." })), [n2, r2, l2]), ce2 = C(() => ({ ...n2, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-MuiContent *": { fontFamily: (e3) => e3.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [n2]), me2 = Dr([F2, t2]), pe2 = C(() => {
2612
+ return x(E, { sx: n2, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...r2 }, children: P2?.(e3) ?? x(Re, { ...e3 }) });
2613
+ }, [n2, r2, P2]), de2 = v(({ error: e3 }) => (l2?.(e3), x(s2, { sx: n2, style: r2, error: e3 ?? "Unable to display empty workbook." })), [n2, r2, l2]), ce2 = C(() => ({ ...n2, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-MuiContent *": { fontFamily: (e3) => e3.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [n2]), me2 = Pr([F2, t2]), pe2 = C(() => {
2648
2614
  if (!j2) return se2;
2649
2615
  if (j2.error || !j2.workbook) return de2({ error: j2.error });
2650
2616
  let e3 = null, t3 = null, n3 = false;
2651
- return O2 && (e3 = V2 ? O2.dark : O2.light, t3 = V2 && O2.enableDarkGrid ? O2.dark : O2.light, n3 = O2.enableDarkImages), x(di, { sx: ce2, style: r2, tabIndex: 0, autoFocus: true, workbook: j2.workbook, ref: me2, renderToolbar: ie2, onElementLoad: ae2, onRepeatCommandChange: Y2, onKeyDown: (e4) => {
2617
+ return O2 && (e3 = V2 ? O2.dark : O2.light, t3 = V2 && O2.enableDarkGrid ? O2.dark : O2.light, n3 = O2.enableDarkImages), x(ii, { sx: ce2, style: r2, tabIndex: 0, autoFocus: true, workbook: j2.workbook, ref: me2, renderToolbar: ie2, onElementLoad: ae2, onRepeatCommandChange: Y2, onKeyDown: (e4) => {
2652
2618
  d2?.(e4);
2653
- }, renderLoadingPanel: R2, gridTheme: t3, headersTheme: e3, enableDarkImages: n3, className: yn(o2, "sheetxl-workbook"), onContextMenu: (e4) => e4.preventDefault(), ...B2 }, "WorkbookElement");
2654
- }, [j2, Q2, G2, se2, R2, O2, B2, ie2, ce2]);
2655
- let ue2 = x(Ir, { fallbackRender: de2, children: x(zr, { maxSnack: 3, domRoot: te2, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (e3, t3, o3) => {
2619
+ }, renderLoadingPanel: P2, gridTheme: t3, headersTheme: e3, enableDarkImages: n3, className: Sn(o2, "sheetxl-workbook"), onContextMenu: (e4) => e4.preventDefault(), ...B2 }, "WorkbookElement");
2620
+ }, [j2, Q2, G2, se2, P2, O2, B2, ie2, ce2]);
2621
+ let ue2 = x(Hr, { fallbackRender: de2, children: x($r, { maxSnack: 3, domRoot: te2, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (e3, t3, o3) => {
2656
2622
  F2.current?.focus();
2657
- }, Components: { error: bi }, iconVariant: { success: x($, { style: { marginRight: "8px" }, children: x("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: x(bn, { style: { marginRight: "8px" } }) }, children: x(xn, { children: x(Si, { workbook: j2?.workbook, setWorkbook: K2, importExportDisabled: g2, titlePlaceHolder: L2, titleWorkbook: Q2, setWorkbookTitle: ee2, refWorkbookTitle: le2, commands: ne2, undoManager: G2, themeOptions: O2, children: pe2 }) }) }) });
2658
- return O2 && (ue2 = b(ir, { theme: V2 ? O2.dark : O2.light, children: [O2.cssBaseline ? x(re, {}) : null, ue2] })), ue2;
2623
+ }, Components: { error: fi }, iconVariant: { success: x($, { style: { marginRight: "8px" }, children: x("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: x(wn, { style: { marginRight: "8px" } }) }, children: x(yn, { children: x(wi, { workbook: j2?.workbook, setWorkbook: K2, importExportDisabled: g2, titlePlaceHolder: L2, titleWorkbook: Q2, setWorkbookTitle: ee2, refWorkbookTitle: le2, commands: ne2, undoManager: G2, themeOptions: O2, children: pe2 }) }) }) });
2624
+ return O2 && (ue2 = b(dr, { theme: V2 ? O2.dark : O2.light, children: [O2.cssBaseline ? x(re, {}) : null, ue2] })), ue2;
2659
2625
  }));
2660
- Ci.displayName = "EagerStudio";
2661
- const vi = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio: Ci, default: Ci }, Symbol.toStringTag, { value: "Module" }));
2626
+ Si.displayName = "EagerStudio";
2627
+ const ki = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio: Si, default: Si }, Symbol.toStringTag, { value: "Module" }));
2662
2628
  export {
2663
- Ka as AppearanceCommandButton,
2664
- Ur as AutoColorPosition,
2665
- sa as BorderCommandButton,
2666
- ia as BorderPopupButton,
2667
- la as BorderStyleButton,
2668
- Kr as C,
2669
- ha as ClearCommandButton,
2670
- Zr as ColorButton,
2671
- ya as ColorCommandButton,
2672
- ta as ColorPanel,
2673
- Gr as ColorPanelType,
2674
- na as ColorPopupButton,
2675
- ba as DeleteCellsCommandButton,
2676
- qa as DocThemeCommandButton,
2677
- Ci as EagerStudio,
2678
- fa as FillCommandButton,
2679
- il as FilterColumnMenu,
2680
- Sa as FilterCommandButton,
2681
- sl as Filters,
2682
- ma as FindCommandButton,
2683
- Da as FontFamilyCommandButton,
2684
- pa as FontSizeCommandButton,
2685
- ll as FormulaBar,
2686
- ca as FreezeCommandButton,
2687
- Xa as HelpCommandButton,
2688
- Wr as HorizontalAlignCommandButton,
2689
- xa as InsertCellsCommandButton,
2690
- Za as InsertImageCommandButton,
2691
- Pl as InsertScriptCommandButton,
2629
+ Za as AppearanceCommandButton,
2630
+ _r as AutoColorPosition,
2631
+ ca as BorderCommandButton,
2632
+ da as BorderPopupButton,
2633
+ sa as BorderStyleButton,
2634
+ Zr as C,
2635
+ xa as ClearCommandButton,
2636
+ Yr as ColorButton,
2637
+ Sa as ColorCommandButton,
2638
+ na as ColorPanel,
2639
+ jr as ColorPanelType,
2640
+ aa as ColorPopupButton,
2641
+ wa as DeleteCellsCommandButton,
2642
+ Xa as DocThemeCommandButton,
2643
+ Si as EagerStudio,
2644
+ ba as FillCommandButton,
2645
+ dl as FilterColumnMenu,
2646
+ va as FilterCommandButton,
2647
+ cl as Filters,
2648
+ ua as FindCommandButton,
2649
+ Pa as FontFamilyCommandButton,
2650
+ ga as FontSizeCommandButton,
2651
+ sl as FormulaBar,
2652
+ pa as FreezeCommandButton,
2653
+ Ja as HelpCommandButton,
2654
+ Or as HorizontalAlignCommandButton,
2655
+ ya as InsertCellsCommandButton,
2656
+ Ya as InsertImageCommandButton,
2657
+ Rl as InsertScriptCommandButton,
2692
2658
  LicenseManager,
2693
- da as MergeCommandButton,
2694
- rl as NamedCollectionEditor,
2695
- Qa as NamedInput,
2696
- ga as NumberFormatCommandButton,
2697
- Pa as PasteCommandButton,
2698
- Aa as PresetCellStylesCommandButton,
2699
- Va as PresetTableStylesCommandButton,
2700
- Ya as QuickFormulaSumCommandPopupButton,
2701
- tl as RangeInput,
2702
- Al as RunScriptCommandButton,
2703
- Bl as ScriptEditorToolbar,
2704
- El as ScriptWorkspace,
2705
- dl as SheetTab,
2706
- cl as SheetTabMenu,
2707
- ol as SheetZoomScale,
2708
- ml as SheetsAllMenu,
2709
- ka as SortFilterCommandButton,
2710
- nl as StatusBar,
2711
- pi as Studio,
2712
- aa as StyledStrokeIcon,
2713
- Wa as TableStyleCanvasPreview,
2714
- $a as TableStyleOptionsPanel,
2715
- Ha as TableStylePreview,
2659
+ ma as MergeCommandButton,
2660
+ ll as NamedCollectionEditor,
2661
+ tl as NamedInput,
2662
+ fa as NumberFormatCommandButton,
2663
+ Fa as PasteCommandButton,
2664
+ La as PresetCellStylesCommandButton,
2665
+ Ua as PresetTableStylesCommandButton,
2666
+ el as QuickFormulaSumCommandPopupButton,
2667
+ nl as RangeInput,
2668
+ Nl as RunScriptCommandButton,
2669
+ Pl as ScriptEditorToolbar,
2670
+ Fl as ScriptWorkspace,
2671
+ ml as SheetTab,
2672
+ pl as SheetTabMenu,
2673
+ rl as SheetZoomScale,
2674
+ ul as SheetsAllMenu,
2675
+ Ca as SortFilterCommandButton,
2676
+ al as StatusBar,
2677
+ ci as Studio,
2678
+ ia as StyledStrokeIcon,
2679
+ Oa as TableStyleCanvasPreview,
2680
+ Va as TableStyleOptionsPanel,
2681
+ Wa as TableStylePreview,
2716
2682
  Ma as TextEffectsCommandButton,
2717
- Or as TextOverflowCommandButton,
2718
- Vr as TextRotateCommandButton,
2719
- xl as ThemeMode,
2720
- Ua as ThemeSelectButton,
2721
- ja as ThemeSelectPanel,
2722
- _a as ThemeSelectPopupButton,
2723
- Ra as UnderlineCommandButton,
2724
- Ca as UndoRedoCommandButton,
2725
- $r as VerticalAlignCommandButton,
2726
- wa as ViewGridLinesCommandButton,
2727
- Ba as ViewHeadingsCommandButton,
2728
- Ja as WalkingCopyCommandButton,
2729
- ql as WorkbookContextMenu,
2730
- di as WorkbookElement,
2731
- fi as WorkbookIO,
2732
- _l as WorkbookStrip,
2733
- mi as WorkbookTitle,
2734
- Fa as WorkbookViewCommandButton,
2735
- hi as _WorkbookIO,
2736
- yl as createGridStyleFromMUITheme,
2737
- pi as default,
2738
- Xl as defaultNewWorkbook,
2739
- ii as renderWorkbookLoadingPanel,
2740
- fl as setPrintExamplesOnLoad,
2741
- wl as useResolvedThemeMode,
2742
- Kl as useWorkbookCommands
2683
+ Gr as TextOverflowCommandButton,
2684
+ Ur as TextRotateCommandButton,
2685
+ _a as ThemeSelectButton,
2686
+ qa as ThemeSelectPanel,
2687
+ Ka as ThemeSelectPopupButton,
2688
+ Ba as UnderlineCommandButton,
2689
+ Ta as UndoRedoCommandButton,
2690
+ Vr as VerticalAlignCommandButton,
2691
+ ka as ViewGridLinesCommandButton,
2692
+ Na as ViewHeadingsCommandButton,
2693
+ Qa as WalkingCopyCommandButton,
2694
+ jl as WorkbookContextMenu,
2695
+ ii as WorkbookElement,
2696
+ gi as WorkbookIO,
2697
+ Ul as WorkbookStrip,
2698
+ di as WorkbookTitle,
2699
+ Aa as WorkbookViewCommandButton,
2700
+ ui as _WorkbookIO,
2701
+ wl as createGridStyleFromMUITheme,
2702
+ ci as default,
2703
+ ql as defaultNewWorkbook,
2704
+ ai as renderWorkbookLoadingPanel,
2705
+ bl as setPrintExamplesOnLoad,
2706
+ _l as useWorkbookCommands
2743
2707
  };