@sheetxl/studio-mui 0.6.6 → 0.6.7

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 (45) hide show
  1. package/browser/cjs/{BnzLXJ_f-WnIEHA7.cjs → 0lIBM05Oo-mPaz-z.cjs} +1 -1
  2. package/browser/cjs/5JvwHMk_pfEj4cZH.cjs +42 -0
  3. package/browser/cjs/{BjuWRjBUgXPf4mv5.cjs → BOqCECEhgUXx-4kI.cjs} +2 -2
  4. package/browser/cjs/BaMk9jpFcmdBLRiR.cjs +6 -0
  5. package/browser/cjs/CCynZK017xahlNmi.cjs +18 -0
  6. package/browser/cjs/{CUT6hk38cssRLfxe.cjs → CG7Z-lZAq5czFOc4.cjs} +2 -2
  7. package/browser/cjs/CRAcvjlcqcZK3WEL.cjs +20 -0
  8. package/browser/cjs/{Ubpcm3GwuRfaaW1V.cjs → CtkBZTjdHqYp7xft.cjs} +1 -1
  9. package/browser/cjs/{BN2uLx4xGjk-OlUv.cjs → DmM-DjGh015RZXzh.cjs} +2 -2
  10. package/browser/cjs/{B6xMVH-gFKvv7HTm.cjs → U3YgQ0fN5bvp9-Kq.cjs} +2 -2
  11. package/browser/cjs/{DBqla_PwQUaZTKah.cjs → aiA3IvXgAikOrMwA.cjs} +1 -1
  12. package/browser/cjs/{L3kTnaogdAjKmBcL.cjs → dW-tltmR8b4Fnr8g.cjs} +1 -1
  13. package/browser/cjs/index.cjs +2 -2
  14. package/browser/esm/{BccWI_Pflx_rlXOP.mjs → BxFzIKTovnlqjZa-.mjs} +18 -18
  15. package/browser/esm/{Wo3zv3YCmz4f5NpR.mjs → C1aztXQ58ekuzis6.mjs} +1 -1
  16. package/browser/esm/{CGU0MsHi6xVOM3Wy.mjs → C9vgT92BfuOKSqpB.mjs} +1 -1
  17. package/browser/esm/{ChXhIK3n7tSPyfOU.mjs → COc-f5ehGeQiPNRP.mjs} +183 -183
  18. package/browser/esm/{D1Jl9RDW29udjLaD.mjs → Ck2WRaGuINSXU-Ds.mjs} +2 -2
  19. package/browser/esm/{5Ukv5-SQmOLwdH1V.mjs → DVbgcz-P2Z8D_yei.mjs} +2 -2
  20. package/browser/esm/{CrzQTch0GzxqX1Hh.mjs → Dcag5-NLJslhyfpE.mjs} +2 -2
  21. package/browser/esm/{BWwRv_4Vs3pIJHK-.mjs → DnJZFwOGICYRq_KW.mjs} +1 -1
  22. package/browser/esm/{CyT1_wFdlQtHv48w.mjs → EmQd5txQ_ErHLAeT.mjs} +2 -2
  23. package/browser/esm/MgTnV8wS66lhumxT.mjs +4482 -0
  24. package/browser/esm/{CTfL4NRMBZr5dUNM.mjs → _08whbc3oA7BY_S7.mjs} +1 -1
  25. package/browser/esm/{q95zwalhNRxfwm2I.mjs → he9qd0KA2ONjy_rM.mjs} +88 -88
  26. package/browser/esm/index.mjs +2 -2
  27. package/licenses/dependencies.txt +142 -142
  28. package/node/esm/{C4HcRU0pP7BegG2D.mjs → B5K3cjwd0usYef8w.mjs} +3 -3
  29. package/node/esm/{Dy5ZlGkkqU9eK4Mt.mjs → BAHfO9ALnEUni4Ts.mjs} +1 -1
  30. package/node/esm/{D8uH0zqPI1d50qsx.mjs → BfPfvgdZrUoZvEme.mjs} +1 -1
  31. package/node/esm/{BRsMzfYwnF3y7jL5.mjs → BqPC_rbjZN2Jy_y4.mjs} +1 -1
  32. package/node/esm/{DxhxmNkJB4A7DSHZ.mjs → CHNFCXGADLFVCwYo.mjs} +1 -1
  33. package/node/esm/{CADlYGKEEO7IDDe4.mjs → Cgxo3ZcSke1eBYVG.mjs} +1 -1
  34. package/node/esm/{Nxk8BN00peWJT0Pd.mjs → Ciwkv8DXp86zUjTb.mjs} +1 -1
  35. package/node/esm/{oP0NpP9IIAnwgsOY.mjs → DESr6vZQNH2lHWZ9.mjs} +1 -1
  36. package/node/esm/{CFBxXNyH40J__9j7.mjs → DhN2m_4WFHDBADx-.mjs} +1 -1
  37. package/node/esm/{C9HmzGWmGV2F1-iF.mjs → IID7UVIiXTHvqYHK.mjs} +1 -1
  38. package/node/esm/index.mjs +528 -485
  39. package/package.json +9 -9
  40. package/types/index.d.ts +3 -0
  41. package/browser/cjs/CtRt6b0Z9PqCHSYZ.cjs +0 -18
  42. package/browser/cjs/Dcrkgeqj3YntIuSp.cjs +0 -6
  43. package/browser/cjs/fFQ9XQWBeQc3axmM.cjs +0 -20
  44. package/browser/cjs/miraQ-Yi17yo4jmD.cjs +0 -42
  45. package/browser/esm/C1Z_BXflJEH0VdJS.mjs +0 -4439
@@ -1,18 +1,18 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.6.6
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.6.7
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { Color as e, IColor as t, ITheme as o, CommonUtils as n, IBorder as a, IFont as r, 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";
7
+ import { Color as e, IColor as t, ITheme as o, CommonUtils as n, IBorder as a, IFont as r, NumberFormat as l, IFontCollection as i, IStyle as s, ITextFrame as c, Table as d, 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
10
  import w, { memo as k, forwardRef as S, useMemo as C, useCallback as v, isValidElement as T, useState as D, useEffect as P, Suspense as R, useRef as M, createElement as F, useReducer as B, useImperativeHandle as N, useLayoutEffect as E } from "react";
11
11
  import { Box as A, Typography as I, IconButton as L, MenuItem as H, Divider as W, Button as z, 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 ae } from "@mui/material";
12
- import { themeIcon as re, 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 Pe, PopupButtonType as Re, ExhibitPopupIconButton as Me, ExhibitPopupMenuItem as Fe, ColorizedCircleIcon as Be, ExhibitMenuItem as Ne, createStrokeShadowFilter as Ee, strokeShadowFilter as Ae, ColorizedStrokeIcon as Ie, ExhibitTooltip as Le, ExhibitIconButton as He, CommandTooltip as We, MergeAllIcon as ze, 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 at, ClearFormatsIcon as rt, 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 Pt, TextUnderlineDoubleIcon as Rt, TextUnderlineAccountingIcon as Mt, TextUnderlineAccountingDoubleIcon as Ft, PasteIcon as Bt, PasteValuesIcon as Nt, PasteFormatsIcon as Et, PasteFormulasIcon as At, PasteTransposeIcon as It, PasteLinksIcon as Lt, NewPresetStylesIcon as Ht, PresetStylesIcon as Wt, ExhibitMenuHeader as zt, 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, FormulaGroupIcon as eo, FormulaFinancialIcon as to, FormulaLogicalIcon as oo, FormulaTextIcon as no, FormulaDateTimeIcon as ao, FormulaLookupReferenceIcon as ro, FormulaMathTrigIcon as lo, FormulaStatisticalIcon as io, FormulaEngineeringIcon as so, FormulaInformationIcon as co, FormulaCubeIcon as mo, FormulaDatabaseIcon as po, FormulaWebIcon as uo, FormulaCustomIcon as go, ExhibitOptionButton as ho, SelectRangeModeIcon as fo, hexToRGB as xo, useFloatStack as bo, CellSelectionIcon as yo, CellSelectionRemoveIcon as wo, CellSelectionEditIcon as ko, InsertTableIcon as So, CellSelectionInsertIcon as Co, CloseErrorIcon as vo, CheckSuccessIcon as To, FunctionIcon as Do, VisibilityOffIcon as Po, elevateColor as Ro, ThemedIcon as Mo, ScriptNewIcon as Fo, ScriptFormulaIcon as Bo, ScriptMacroIcon as No, ScriptSaveIcon as Eo, CommandToolbar as Ao, CodeIcon as Io, ScriptRunIcon as Lo, ColorizedTextIcon as Ho, ColorizedFillIcon as Wo, FormatPaintIcon as zo, TextBoldIcon as $o, TextItalicIcon as Oo, InsertHyperlinkIcon as Vo, InsertCommentIcon as Go, FullScreenOffIcon as Uo, FullScreenIcon as jo, createScrollEdgeButton as _o, createScrollEndButton as qo, createScrollStartButton as Ko, HideColumnIcon as Xo, ShowColumnIcon as Zo, HideRowIcon as Jo, ShowRowIcon as Yo, ColumnsResizeAutoIcon as Qo, RowsResizeAutoIcon as en, CutIcon as tn, DrawAspectIcon as on, DrawAlignLeftIcon as nn, DrawResizeIcon as an, DrawAlignDistributeVertIcon as rn, DrawAlignDistributeHorzIcon as ln, DrawAlignBottomIcon as sn, DrawAlignMiddleIcon as dn, DrawAlignTopIcon as cn, DrawAlignRightIcon as mn, DrawAlignCenterIcon as pn, DrawMoveBackwardIcon as un, DrawToBackIcon as gn, DrawMoveForwardIcon as hn, DrawToFrontIcon as fn, scrollbarTheming as xn, StackTrace as bn, FileNewIcon as yn, FileOpenIcon as wn, FileDownloadAsCSVIcon as kn, FileDownloadAsExcelIcon as Sn, FileDownloadAsSheetIcon as Cn, useResolvedThemeMode as vn, ThemeMode as Tn, useModal as Dn, useLazyWindow as Pn, useOptionsDialog as Rn, useInputDialog as Mn, AnimatedTraversingEllipsisIcon as Fn, ErrorPanel as Bn, createExhibitTheme as Nn, ModalProvider as En, ErrorAlertIcon as An } from "@sheetxl/utils-mui";
12
+ import { themeIcon as re, CommandButton as le, ExhibitDivider as ie, FormatIndentDecreaseIcon as se, FormatIndentIncreaseIcon as ce, defaultCreatePopupPanel as de, 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 Pe, PopupButtonType as Re, ExhibitPopupIconButton as Me, ExhibitPopupMenuItem as Fe, ColorizedCircleIcon as Be, ExhibitMenuItem as Ne, createStrokeShadowFilter as Ee, strokeShadowFilter as Ae, ColorizedStrokeIcon as Ie, ExhibitTooltip as Le, ExhibitIconButton as He, CommandTooltip as We, MergeAllIcon as ze, 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 at, ClearFormatsIcon as rt, ClearContentsIcon as lt, FillDownIcon as it, InsertCells as st, InsertRowIcon as ct, InsertColumn2Icon as dt, 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 Pt, TextUnderlineDoubleIcon as Rt, TextUnderlineAccountingIcon as Mt, TextUnderlineAccountingDoubleIcon as Ft, PasteIcon as Bt, PasteValuesIcon as Nt, PasteFormatsIcon as Et, PasteFormulasIcon as At, PasteTransposeIcon as It, PasteLinksIcon as Lt, NewPresetStylesIcon as Ht, PresetStylesIcon as Wt, ExhibitMenuHeader as zt, 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, FormulaGroupIcon as eo, FormulaFinancialIcon as to, FormulaLogicalIcon as oo, FormulaTextIcon as no, FormulaDateTimeIcon as ao, FormulaLookupReferenceIcon as ro, FormulaMathTrigIcon as lo, FormulaStatisticalIcon as io, FormulaEngineeringIcon as so, FormulaInformationIcon as co, FormulaCubeIcon as mo, FormulaDatabaseIcon as po, FormulaWebIcon as uo, FormulaCustomIcon as go, ExhibitOptionButton as ho, SelectRangeModeIcon as fo, hexToRGB as xo, useFloatStack as bo, CellSelectionIcon as yo, CellSelectionRemoveIcon as wo, CellSelectionEditIcon as ko, InsertTableIcon as So, CellSelectionInsertIcon as Co, CloseErrorIcon as vo, CheckSuccessIcon as To, FunctionIcon as Do, VisibilityOffIcon as Po, elevateColor as Ro, ThemedIcon as Mo, ScriptNewIcon as Fo, ScriptFormulaIcon as Bo, ScriptMacroIcon as No, ScriptSaveIcon as Eo, CommandToolbar as Ao, CodeIcon as Io, ScriptRunIcon as Lo, ColorizedTextIcon as Ho, ColorizedFillIcon as Wo, FormatPaintIcon as zo, TextBoldIcon as $o, TextItalicIcon as Oo, InsertHyperlinkIcon as Vo, InsertCommentIcon as Go, FullScreenOffIcon as Uo, FullScreenIcon as jo, createScrollEdgeButton as _o, createScrollEndButton as qo, createScrollStartButton as Ko, HideColumnIcon as Xo, ShowColumnIcon as Zo, HideRowIcon as Jo, ShowRowIcon as Yo, ColumnsResizeAutoIcon as Qo, RowsResizeAutoIcon as en, CutIcon as tn, DrawAspectIcon as on, DrawAlignLeftIcon as nn, DrawResizeIcon as an, DrawAlignDistributeVertIcon as rn, DrawAlignDistributeHorzIcon as ln, DrawAlignBottomIcon as sn, DrawAlignMiddleIcon as cn, DrawAlignTopIcon as dn, DrawAlignRightIcon as mn, DrawAlignCenterIcon as pn, DrawMoveBackwardIcon as un, DrawToBackIcon as gn, DrawMoveForwardIcon as hn, DrawToFrontIcon as fn, scrollbarTheming as xn, StackTrace as bn, FileNewIcon as yn, FileOpenIcon as wn, FileDownloadAsCSVIcon as kn, FileDownloadAsExcelIcon as Sn, FileDownloadAsSheetIcon as Cn, useResolvedThemeMode as vn, ThemeMode as Tn, useModal as Dn, useLazyWindow as Pn, useOptionsDialog as Rn, useInputDialog as Mn, AnimatedTraversingEllipsisIcon as Fn, ErrorPanel as Bn, createExhibitTheme as Nn, ModalProvider as En, ErrorAlertIcon as An } from "@sheetxl/utils-mui";
13
13
  import In from "clsx";
14
14
  import { FormatAlignLeft as Ln, FormatAlignCenter as Hn, FormatAlignRight as Wn, FormatAlignJustify as zn, Colorize as $n, DarkMode as On, LightMode as Vn, Keyboard as Gn, Remove as Un, Add as jn, ExpandLess as _n, ExpandMore as qn, Lock as Kn, MoreHoriz as Xn, WebhookOutlined as Zn, Close as Jn, AddCircleOutline as Yn, Menu as Qn, CancelOutlined as ea } from "@mui/icons-material";
15
- import { useCommands as ta, CommandButtonType as oa, useCallbackRef as na, ReactUtils as aa, KeyCodes as ra, useCommand as la, useEditMode as ia, useMouseDownAndHoldListener as sa, NotificationType as da, useImperativeElement as ca, SplitPane as ma, RoundedTab as pa, SimpleCommand as ua, Command as ga, KeyModifiers as ha, CommandGroup as fa, ToolTipPlacement as xa, ScrollPane as ba, useUndoManager as ya } from "@sheetxl/utils-react";
15
+ import { useCommands as ta, CommandButtonType as oa, useCallbackRef as na, ReactUtils as aa, KeyCodes as ra, useCommand as la, useEditMode as ia, useMouseDownAndHoldListener as sa, NotificationType as ca, useImperativeElement as da, SplitPane as ma, RoundedTab as pa, SimpleCommand as ua, Command as ga, KeyModifiers as ha, CommandGroup as fa, ToolTipPlacement as xa, ScrollPane as ba, useUndoManager as ya } from "@sheetxl/utils-react";
16
16
  import { useTheme as wa, alpha as ka, getOverlayAlpha as Sa, ThemeProvider as Ca } from "@mui/material/styles";
17
17
  import { StyledStrokePath as va, StaticBorderRenderer as Ta, FontUtils as Da, useModelListener as Pa, createCellEditStateFromCell as Ra, SheetCellEditor as Ma, ScriptEditor as Fa, useDocThemes as Ba, TabStrip as Na, SheetElement as Ea, SheetScrollbar as Aa, PictureEditor as Ia, ChartEditor as La, EmptyFrame as Ha, LogoNoPaddingIcon as Wa } from "@sheetxl/react";
18
18
  import { alpha as za } from "@mui/system";
@@ -27,10 +27,10 @@ import { IOUtils as Za } from "@sheetxl/io";
27
27
  import { ErrorBoundary as Ja } from "react-error-boundary";
28
28
  import { useSnackbar as Ya, SnackbarContent as Qa, SnackbarProvider as er } from "notistack";
29
29
  const tr = k(S((e2, t2) => {
30
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = ta(o2, ["formatAlignLeftToggle", "formatAlignCenterToggle", "formatAlignRightToggle", "formatAlignJustifyToggle", "formatAlignCenterContinuousToggle", "formatAlignFillToggle", "formatAlignDistributedHorizontalToggle"]), d2 = C(() => {
30
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = ta(o2, ["formatAlignLeftToggle", "formatAlignCenterToggle", "formatAlignRightToggle", "formatAlignJustifyToggle", "formatAlignCenterContinuousToggle", "formatAlignFillToggle", "formatAlignDistributedHorizontalToggle"]), c2 = 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
- }, [s2]), c2 = C(() => {
33
+ }, [s2]), d2 = C(() => {
34
34
  const e3 = /* @__PURE__ */ new Map();
35
35
  return e3.set("formatAlignLeftToggle", re(x(Ln, {}))), e3.set("formatAlignCenterToggle", re(x(Hn, {}))), e3.set("formatAlignRightToggle", re(x(Wn, {}))), e3.set("formatAlignJustifyToggle", re(x(zn, {}))), e3.set("formatAlignCenterContinuousToggle", re(x(Hn, {}))), e3.set("formatAlignFillToggle", re(x(zn, {}))), e3.set("formatAlignDistributedHorizontalToggle", re(x(zn, {}))), e3;
36
36
  }, []), m2 = C(() => {
@@ -38,34 +38,34 @@ const tr = k(S((e2, t2) => {
38
38
  const e3 = { ...n2 };
39
39
  return delete e3.beforeExecute, e3;
40
40
  }, [n2]), p2 = v((e3, t3) => {
41
- const o3 = { variant: oa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, 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: In("quick-buttons"), display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [x(le, { command: t3.getCommand("formatIndentDecrease"), commandHook: m2, scope: a2, disabled: r2, icon: re(x(se, {})) }), x(le, { command: t3.getCommand("formatIndentIncrease"), commandHook: m2, scope: a2, disabled: r2, icon: re(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 })] });
42
- return ce({ ...e3, children: d3 });
41
+ const o3 = { variant: oa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatAlignLeftToggle"), icon: d2.get("formatAlignLeftToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignCenterToggle"), icon: d2.get("formatAlignCenterToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignRightToggle"), icon: d2.get("formatAlignRightToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignJustifyToggle"), icon: d2.get("formatAlignJustifyToggle") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatAlignCenterContinuousToggle"), icon: d2.get("formatAlignCenterContinuousToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignFillToggle"), icon: d2.get("formatAlignFillToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignDistributedHorizontalToggle"), icon: d2.get("formatAlignDistributedHorizontalToggle") })] }), s3 = b(A, { sx: { className: In("quick-buttons"), display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [x(le, { command: t3.getCommand("formatIndentDecrease"), commandHook: m2, scope: a2, disabled: r2, icon: re(x(se, {})) }), x(le, { command: t3.getCommand("formatIndentIncrease"), commandHook: m2, scope: a2, disabled: r2, icon: re(x(ce, {})) })] }), c3 = 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 })] });
42
+ return de({ ...e3, children: c3 });
43
43
  }, [r2, n2]);
44
- return x(me, { ref: t2, parentFloat: l2, commands: o2, commandHook: n2, scope: a2, 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(Ln, {}), ...i2 });
44
+ return x(me, { ref: t2, parentFloat: l2, commands: o2, commandHook: n2, scope: a2, createPopupPanel: p2, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: c2, icon: d2.get(c2) ?? x(Ln, {}), ...i2 });
45
45
  })), or = k(S((e2, t2) => {
46
46
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ta(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
- }, [i2]), d2 = C(() => {
49
+ }, [i2]), c2 = C(() => {
50
50
  const e3 = /* @__PURE__ */ new Map();
51
51
  return e3.set("formatAlignTopToggle", re(x(pe, {}))), e3.set("formatAlignMiddleToggle", re(x(ue, {}))), e3.set("formatAlignBottomToggle", re(x(ge, {}))), e3.set("formatAlignJustifyVerticalToggle", re(x(zn, {}))), e3.set("formatAlignDistributedVerticalToggle", re(x(zn, {}))), e3;
52
- }, []), c2 = v((e3, t3) => {
53
- const o3 = { variant: oa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, 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
- return ce({ ...e3, children: l3 });
55
- }, [r2, n2, d2]);
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) ?? re(x(ge, {})), ...l2 });
52
+ }, []), d2 = v((e3, t3) => {
53
+ const o3 = { variant: oa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatAlignTopToggle"), icon: c2.get("formatAlignTopToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignMiddleToggle"), icon: c2.get("formatAlignMiddleToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignBottomToggle"), icon: c2.get("formatAlignBottomToggle") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatAlignJustifyVerticalToggle"), icon: c2.get("formatAlignJustifyVerticalToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignDistributedVerticalToggle"), icon: c2.get("formatAlignDistributedVerticalToggle") })] });
54
+ return de({ ...e3, children: l3 });
55
+ }, [r2, n2, c2]);
56
+ return x(me, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: d2, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: c2.get(s2) ?? re(x(ge, {})), ...l2 });
57
57
  })), nr = k(S((e2, t2) => {
58
58
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ta(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
- }, [i2]), d2 = C(() => {
61
+ }, [i2]), c2 = C(() => {
62
62
  const e3 = /* @__PURE__ */ new Map();
63
63
  return e3.set("formatTextOverflowVisibleToggle", re(x(he, {}))), e3.set("formatTextOverflowWrapToggle", re(x(fe, {}))), e3.set("formatTextOverflowClipToggle", re(x(xe, {}))), e3.set("formatTextOverflowShrinkToggle", re(x(be, {}))), e3;
64
- }, []), c2 = na((e3, t3) => {
65
- const o3 = { variant: oa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, 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
- return ce({ ...e3, children: l3 });
64
+ }, []), d2 = na((e3, t3) => {
65
+ const o3 = { variant: oa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatTextOverflowVisibleToggle"), icon: c2.get("formatTextOverflowVisibleToggle") }), x(le, { ...o3, command: t3.getCommand("formatTextOverflowWrapToggle"), icon: c2.get("formatTextOverflowWrapToggle") }), x(le, { ...o3, command: t3.getCommand("formatTextOverflowClipToggle"), icon: c2.get("formatTextOverflowClipToggle") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatTextOverflowShrinkToggle"), icon: c2.get("formatTextOverflowShrinkToggle") })] });
66
+ return de({ ...e3, children: l3 });
67
67
  }, [r2, n2, a2]);
68
- return x(me, { ref: t2, commands: o2, commandHook: n2, scope: a2, label: "Text Overflow", tooltip: "Configure how text behaves when it doesn't fit within a cell.", createPopupPanel: c2, icon: d2.get(s2) ?? re(x(he, {})), ...l2 });
68
+ return x(me, { ref: t2, commands: o2, commandHook: n2, scope: a2, label: "Text Overflow", tooltip: "Configure how text behaves when it doesn't fit within a cell.", createPopupPanel: d2, icon: c2.get(s2) ?? re(x(he, {})), ...l2 });
69
69
  })), ar = k(S((e2, t2) => {
70
70
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ta(o2, ["formatTextRotate0", "formatTextRotate315", "formatTextRotate45", "formatTextRotate90", "formatTextRotate270", "formatSubscriptToggle", "formatTextRotateCustom"]), s2 = C(() => {
71
71
  const e3 = i2.length;
@@ -74,14 +74,14 @@ const tr = k(S((e2, t2) => {
74
74
  if (e4?.state()) return e4.key();
75
75
  }
76
76
  return i2[1]?.key();
77
- }, [i2]), d2 = C(() => {
77
+ }, [i2]), c2 = C(() => {
78
78
  const e3 = /* @__PURE__ */ new Map();
79
79
  return e3.set("formatTextRotate0", re(x(ye, {}))), e3.set("formatTextRotate315", re(x(ye, {}))), e3.set("formatTextRotate45", re(x(we, {}))), e3.set("formatTextRotate90", re(x(ke, {}))), e3.set("formatTextRotate270", re(x(Se, {}))), e3.set("formatTextRotateCustom", re(x(Ce, {}))), e3;
80
- }, []), c2 = v((e3, t3) => {
80
+ }, []), d2 = v((e3, t3) => {
81
81
  const o3 = { variant: oa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatTextRotate0"), icon: re(x(ve, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatTextRotate315"), icon: re(x(ye, {})) }), x(le, { ...o3, command: t3.getCommand("formatTextRotate45"), icon: re(x(we, {})) }), x(le, { ...o3, command: t3.getCommand("formatTextRotate90"), icon: re(x(ke, {})) }), x(le, { ...o3, command: t3.getCommand("formatTextRotate270"), icon: re(x(Se, {})) }), x(ie, { orientation: "horizontal" }), x(Te, { ...o3, command: t3.getCommand("formatTextRotateCustom"), icon: re(x(Ce, {})), label: "Custom" })] });
82
- return ce({ ...e3, children: l3 });
82
+ return de({ ...e3, children: l3 });
83
83
  }, [r2, n2, a2, o2]), m2 = C(() => 0 !== (o2.getCommand("formatTextRotateCustom")?.state() ?? 0), [i2]);
84
- return x(me, { ref: t2, commands: o2, commandHook: n2, scope: a2, 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: re(d2.get(s2) ?? x(ye, {})), ...l2 });
84
+ return x(me, { ref: t2, commands: o2, commandHook: n2, scope: a2, selected: m2, label: "Text Orientation", tooltip: "Rotate your text diagonally or vertically. This is a great way to label narrow columns.", createPopupPanel: d2, quickCommand: m2 ? "formatTextRotate0" : "formatTextRotate315", icon: re(c2.get(s2) ?? x(ye, {})), ...l2 });
85
85
  })), rr = { Preset: "preset", Custom: "custom" }, lr = { Start: "start", End: "end" }, ir = {}, sr = (e2, t2, o2, n2) => {
86
86
  const a2 = e2 + "-" + t2 + "-" + o2 + (n2 ? "-server" : "");
87
87
  if (ir[a2]) return ir[a2];
@@ -93,11 +93,11 @@ const tr = k(S((e2, t2) => {
93
93
  return r3 ? (r3.fillStyle = e3, r3.fillRect(0, 0, a3.width, a3.height), r3.fillStyle = t3, r3.fillRect(0, 0, o3, o3), r3.translate(o3, o3), r3.fillRect(0, 0, o3, o3), a3.toDataURL()) : null;
94
94
  })(e2, t2, o2, n2);
95
95
  return ir[a2] = r2, r2;
96
- }, dr = {}, cr = k((e2) => {
97
- const { className: t2, style: o2 = aa.EmptyCssProperties, white: n2 = "transparent", grey: a2 = "grey", size: r2 = 8, borderRadius: l2, boxShadow: i2, renderers: s2 = dr, 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(${sr(n2, a2, r2, s2?.canvas)}) center left` }, o2), [n2, a2, r2, s2]);
98
- return T(d2) ? w.cloneElement(d2, { ...m2.props }) : x("div", { style: p2, ...c2 });
96
+ }, cr = {}, dr = k((e2) => {
97
+ const { className: t2, style: o2 = aa.EmptyCssProperties, white: n2 = "transparent", grey: a2 = "grey", size: r2 = 8, borderRadius: l2, boxShadow: i2, renderers: s2 = cr, children: c2, ...d2 } = e2, m2 = c2, p2 = C(() => Object.assign({ borderRadius: l2, boxShadow: i2, position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", background: `url(${sr(n2, a2, r2, s2?.canvas)}) center left` }, o2), [n2, a2, r2, s2]);
98
+ return T(c2) ? w.cloneElement(c2, { ...m2.props }) : x("div", { style: p2, ...d2 });
99
99
  }), mr = k((e2) => {
100
- const { selectedColor: t2, onSelectColor: o2, onPreviewColor: n2, onClick: a2, onKeyDown: r2, onMouseOver: l2, onMouseLeave: i2, onFocus: s2, style: d2 = aa.EmptyCssProperties, children: c2, alphaWhite: m2, alphaGrey: p2, darkMode: u2, alphaCheckSize: g2 = 7, ...h2 } = e2;
100
+ const { selectedColor: t2, onSelectColor: o2, onPreviewColor: n2, onClick: a2, onKeyDown: r2, onMouseOver: l2, onMouseLeave: i2, onFocus: s2, style: c2 = aa.EmptyCssProperties, children: d2, 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
  a2?.(e3), e3.isDefaultPrevented() || (e3.ctrlKey ? n2?.(t2.toRGBA()) : o2?.(t2.toRGBA()));
@@ -109,19 +109,19 @@ const tr = k(S((e2, t2) => {
109
109
  s2?.(e3), e3.isDefaultPrevented() || n2?.(t2.toRGBA());
110
110
  }, [n2, s2, t2]), S2 = v((e3) => {
111
111
  r2?.(e3), e3.isDefaultPrevented() || e3.keyCode === ra.Enter && o2?.(t2.toRGBA());
112
- }, [o2, r2, t2]), T2 = C(() => 1 === t2.toRGBA().alpha ? null : x(cr, { 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 })] });
112
+ }, [o2, r2, t2]), T2 = C(() => 1 === t2.toRGBA().alpha ? null : x(dr, { 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", ...c2 }, 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: d2 })] });
114
114
  }), pr = k((o2) => {
115
- const { schemeColorLookup: n2, selectedColor: a2, previewColor: r2, 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 = a2 && (p2 ? a2.toRGBA().toString() : a2.toString()) === f2, w2 = r2 && (p2 ? r2.toRGBA().toString() : r2.toString()) === f2, k2 = [];
115
+ const { schemeColorLookup: n2, selectedColor: a2, previewColor: r2, colorDef: l2, onSelectColorDef: i2, onPreviewColorDef: s2, swatchProps: c2, defaultButtonSize: d2 = 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 = a2 && (p2 ? a2.toRGBA().toString() : a2.toString()) === f2, w2 = r2 && (p2 ? r2.toRGBA().toString() : r2.toString()) === f2, k2 = [];
116
116
  k2.push({ [t.AdjustmentType.Inv]: true }), k2.push({ [t.AdjustmentType.Alpha]: 100 });
117
117
  const S2 = h2.adjust(k2), 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(mr, { 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" } })] }) }) });
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: d2 * (m2 ? 1.2 : 1) + "px", height: d2 * (m2 ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...g2, children: b(mr, { selectedColor: h2, title: null, onSelectColor: C2, onPreviewColor: T2, alphaCheckSize: m2 ? 9 : void 0, darkMode: u2, ...c2, 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 * d2 * (m2 ? 1.2 : 1) + "px", height: 0.33 * d2 * (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
123
  }), ur = k((e2) => {
124
- const { title: t2, schemeColorLookup: o2, colorDefs: n2, selectedColor: a2, previewColor: r2, onSelectColorDef: l2, onPreviewColorDef: i2, style: s2 = aa.EmptyCssProperties, compareRGB: d2 = false, darkMode: c2, swatchProps: m2, ...p2 } = e2;
124
+ const { title: t2, schemeColorLookup: o2, colorDefs: n2, selectedColor: a2, previewColor: r2, onSelectColorDef: l2, onPreviewColorDef: i2, style: s2 = aa.EmptyCssProperties, compareRGB: c2 = false, darkMode: d2, swatchProps: m2, ...p2 } = e2;
125
125
  let u2;
126
126
  if (Array.isArray(n2[0])) u2 = n2;
127
127
  else {
@@ -138,7 +138,7 @@ const tr = 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(pr, { schemeColorLookup: o2, colorDef: i4, selectedColor: a2, previewColor: r2, onSelectColorDef: g2, onPreviewColorDef: h2, swatchProps: m2, compareRGB: d2, darkMode: c2 }, t3 + " " + e4));
141
+ n3.push(x(pr, { schemeColorLookup: o2, colorDef: i4, selectedColor: a2, previewColor: r2, onSelectColorDef: g2, onPreviewColorDef: h2, swatchProps: m2, compareRGB: c2, darkMode: d2 }, t3 + " " + e4));
142
142
  }
143
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);
144
144
  e3.push(i3);
@@ -149,26 +149,26 @@ const tr = k(S((e2, t2) => {
149
149
  }), gr = (e2, t2) => ({ description: e2, definition: { val: t2, adjs: [] } }), hr = (t2, o2, n2, a2, r2, l2) => {
150
150
  const i2 = gr(t2, o2);
151
151
  a2?.push(i2);
152
- const s2 = new e({ val: i2.definition.val, adjs: i2.definition.adjs }, n2), d2 = s2.toString();
153
- r2?.set(d2, s2);
154
- const c2 = s2.toRGBA().toString();
155
- l2?.set(c2, s2);
156
- }, fr = w.lazy(() => import("./C4HcRU0pP7BegG2D.mjs")), xr = k(S((t2, a2) => {
157
- const { selectedColor: r2 = 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: M2, autoColorLabel: F2 = "Automatic", autoColorPosition: B2 = lr.Start, compareRGB: N2 = false, darkMode: E2 = false, ...$2 } = t2, O2 = l2 || r2, V2 = na(k2, [k2]), G2 = na(S2, [S2]), U2 = na(T2, [T2]), j2 = na(f2, [f2]), _2 = na(w2, [w2]), [q2, K2] = D(false), X2 = wa(), Z2 = C(() => s2 || e.getDefaultSchemeLookup(), [s2]), J2 = C(() => {
152
+ const s2 = new e({ val: i2.definition.val, adjs: i2.definition.adjs }, n2), c2 = s2.toString();
153
+ r2?.set(c2, s2);
154
+ const d2 = s2.toRGBA().toString();
155
+ l2?.set(d2, s2);
156
+ }, fr = w.lazy(() => import("./B5K3cjwd0usYef8w.mjs")), xr = k(S((t2, a2) => {
157
+ const { selectedColor: r2 = null, previewColor: l2 = t2.selectedColor ?? null, recentColors: i2, schemeLookup: s2, disableAlpha: c2 = false, previewDebounceTime: d2 = 100, initialPanelType: m2, defaultButtonSize: p2 = 24, width: u2, onElementLoad: g2, onDone: h2, onEyeDropStart: f2, onEyeDropStop: w2, onPreviewColor: k2, onPreviewColorImmediate: S2, onSelectColor: T2, autoColor: M2, autoColorLabel: F2 = "Automatic", autoColorPosition: B2 = lr.Start, compareRGB: N2 = false, darkMode: E2 = false, ...$2 } = t2, O2 = l2 || r2, V2 = na(k2, [k2]), G2 = na(S2, [S2]), U2 = na(T2, [T2]), j2 = na(f2, [f2]), _2 = na(w2, [w2]), [q2, K2] = D(false), X2 = wa(), Z2 = C(() => s2 || e.getDefaultSchemeLookup(), [s2]), J2 = C(() => {
158
158
  const e2 = /* @__PURE__ */ new Map(), t3 = /* @__PURE__ */ new Map(), n2 = [];
159
159
  hr("Primary Background", "bg1", Z2, n2, e2, t3), hr("Primary Text", "tx1", Z2, n2, e2, t3), hr("Secondary Background", "bg2", Z2, n2, e2, t3), hr("Secondary Text", "tx2", Z2, n2, e2, t3), hr("Accent 1", "accent1", Z2, n2, e2, t3), hr("Accent 2", "accent2", Z2, n2, e2, t3), hr("Accent 3", "accent3", Z2, n2, e2, t3), hr("Accent 4", "accent4", Z2, n2, e2, t3), hr("Accent 5", "accent5", Z2, n2, e2, t3), hr("Accent 6", "accent6", Z2, n2, e2, t3);
160
160
  const a3 = o.buildPalette(n2, Z2, e2, t3), r3 = [];
161
- if (hr("Dark Red", "C00000", Z2, r3, e2, t3), hr("Red", "FF0000", Z2, r3, e2, t3), hr("Orange", "FFC000", Z2, r3, e2, t3), hr("Yellow", "FFFF00", Z2, r3, e2, t3), hr("Light Green", "92D050", Z2, r3, e2, t3), hr("Green", "00B050", Z2, r3, e2, t3), hr("Light Blue", "00B0F0", Z2, r3, e2, t3), hr("Blue", "0070C0", Z2, r3, e2, t3), hr("Dark Blue", "002060", Z2, r3, e2, t3), d2 ? hr("Purple Is A Fruit", "7030A0", Z2, r3, e2, t3) : hr("Transparent", "00000000", Z2, r3, e2, t3), M2) {
161
+ if (hr("Dark Red", "C00000", Z2, r3, e2, t3), hr("Red", "FF0000", Z2, r3, e2, t3), hr("Orange", "FFC000", Z2, r3, e2, t3), hr("Yellow", "FFFF00", Z2, r3, e2, t3), hr("Light Green", "92D050", Z2, r3, e2, t3), hr("Green", "00B050", Z2, r3, e2, t3), hr("Light Blue", "00B0F0", Z2, r3, e2, t3), hr("Blue", "0070C0", Z2, r3, e2, t3), hr("Dark Blue", "002060", Z2, r3, e2, t3), c2 ? hr("Purple Is A Fruit", "7030A0", Z2, r3, e2, t3) : hr("Transparent", "00000000", Z2, r3, e2, t3), M2) {
162
162
  const t4 = M2.toString();
163
163
  e2.set(t4, M2);
164
164
  }
165
- const l3 = /* @__PURE__ */ new Map(), s3 = "function" == typeof i2 ? i2() : i2, c3 = [];
165
+ const l3 = /* @__PURE__ */ new Map(), s3 = "function" == typeof i2 ? i2() : i2, d3 = [];
166
166
  for (let e3 = 0; s3 && e3 < s3.length; e3++) {
167
167
  const t4 = s3[e3].toString();
168
- l3.set(t4, s3[e3]), c3.push({ description: "Recent " + (e3 + 1), definition: { val: s3[e3].toString() } });
168
+ l3.set(t4, s3[e3]), d3.push({ description: "Recent " + (e3 + 1), definition: { val: s3[e3].toString() } });
169
169
  }
170
- return { primaryColors: n2, modifiedPresets: a3, standardColors: r3, recentColorsLimited: c3, mapAllPresets: e2, mapAllPresetsRGB: t3, mapRecent: l3 };
171
- }, [Z2, i2, d2, M2]);
170
+ return { primaryColors: n2, modifiedPresets: a3, standardColors: r3, recentColorsLimited: d3, mapAllPresets: e2, mapAllPresetsRGB: t3, mapRecent: l3 };
171
+ }, [Z2, i2, c2, M2]);
172
172
  P(() => {
173
173
  g2?.();
174
174
  }, []);
@@ -186,7 +186,7 @@ const tr = k(S((e2, t2) => {
186
186
  }, [r2, m2]);
187
187
  const te2 = v(n.debounce((e2) => {
188
188
  V2?.(e2);
189
- }, c2), [V2, c2]), [oe2, ne2] = D();
189
+ }, d2), [V2, d2]), [oe2, ne2] = D();
190
190
  P(() => {
191
191
  ne2(l2 || r2);
192
192
  }, [l2, r2]);
@@ -208,9 +208,9 @@ const tr = k(S((e2, t2) => {
208
208
  Promise.resolve(h2?.()).then(() => {
209
209
  ie2(o2);
210
210
  });
211
- }, [Z2, h2]), de2 = na((t3) => {
211
+ }, [Z2, h2]), ce2 = na((t3) => {
212
212
  ae2(t3 ? new e(t3, Z2) : null);
213
- }, [Z2]), ce2 = C(() => {
213
+ }, [Z2]), de2 = C(() => {
214
214
  if (void 0 === window.EyeDropper) return x(y, {});
215
215
  return x(L, { "aria-label": "eye dropper", size: "small", sx: { color: (e2) => e2.palette.text.icon ?? e2.palette.action.active }, onClick: async () => {
216
216
  K2(true), j2?.(), await new EyeDropper().open().then((t3) => {
@@ -232,7 +232,7 @@ const tr = k(S((e2, t2) => {
232
232
  }, [J2, E2]), 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(Pe, {}) }), children: x(fr, { style: e2, selectedColor: O2 ? O2.toRGBA().toString() : "transparent", onColorChange: de2, disableAlpha: d2 }) });
235
+ return x(R, { fallback: x("div", { style: e2, children: x(Pe, {}) }), children: x(fr, { style: e2, selectedColor: O2 ? O2.toRGBA().toString() : "transparent", onColorChange: ce2, disableAlpha: c2 }) });
236
236
  }, [Y2, O2]), pe2 = C(() => ({ onClick: le2, alphaGrey: X2.palette.text.icon ?? X2.palette.action.active }), [le2, X2]), ue2 = C(() => {
237
237
  if (!M2) return null;
238
238
  const e2 = { description: F2, definition: { val: M2.getVal(), adjs: M2.getAdjustments() } };
@@ -242,7 +242,7 @@ const tr = k(S((e2, t2) => {
242
242
  se2(null);
243
243
  }, children: [x(A, { sx: { flex: "none", boxShadow: (e3) => e3.shadows[2], borderRadius: (e3) => e3.spacing(0.5), overflow: "hidden" }, children: x(pr, { schemeColorLookup: Z2, colorDef: e2, selectedColor: null === r2 ? M2 : r2, previewColor: null === l2 ? M2 : 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: F2 })] }) });
244
244
  }, [M2, F2, Z2, r2, l2]);
245
- return b(A, { ref: a2, 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 && B2 === lr.Start ? b(y, { children: [ue2, x(W, { light: true, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, x(ur, { title: "Theme Colors", schemeColorLookup: Z2, colorDefs: J2.primaryColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 }), x(ur, { schemeColorLookup: Z2, colorDefs: J2.modifiedPresets, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 }), x(W, { light: true, style: { marginBottom: "10px" } }), x(ur, { title: "Standard Colors", schemeColorLookup: Z2, colorDefs: J2.standardColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, 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(W, { light: true, style: { marginBottom: "10px" } }), x(ur, { title: "Recent Colors", schemeColorLookup: Z2, colorDefs: J2.recentColorsLimited, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 })] }), ue2 && B2 === lr.End ? b(y, { children: [x(W, { light: true, sx: { marginTop: "2px", marginBottom: "2px" } }), ue2, x("div", { style: { marginBottom: "2px" } })] }) : null] }), me2] }), x(W, { 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(z, { style: { minWidth: "75px", maxWidth: "75px" }, value: "check", variant: "outlined", size: "small", onClick: () => {
245
+ return b(A, { ref: a2, 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 && B2 === lr.Start ? b(y, { children: [ue2, x(W, { light: true, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, x(ur, { title: "Theme Colors", schemeColorLookup: Z2, colorDefs: J2.primaryColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 }), x(ur, { schemeColorLookup: Z2, colorDefs: J2.modifiedPresets, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 }), x(W, { light: true, style: { marginBottom: "10px" } }), x(ur, { title: "Standard Colors", schemeColorLookup: Z2, colorDefs: J2.standardColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, 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(W, { light: true, style: { marginBottom: "10px" } }), x(ur, { title: "Recent Colors", schemeColorLookup: Z2, colorDefs: J2.recentColorsLimited, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 })] }), ue2 && B2 === lr.End ? b(y, { children: [x(W, { light: true, sx: { marginTop: "2px", marginBottom: "2px" } }), ue2, x("div", { style: { marginBottom: "2px" } })] }) : null] }), me2] }), x(W, { light: true, style: { marginBottom: "10px" } }), b("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-around", gap: "8px", paddingLeft: "2px", paddingRight: "2px" }, children: [de2, x("div", { style: { flex: "1 1 100%", background: "pink" } }), x(z, { 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(z, { variant: "contained", size: "small", style: { minWidth: "75px" }, onClick: () => {
248
248
  Promise.resolve(h2?.()).then(() => {
@@ -250,7 +250,7 @@ const tr = k(S((e2, t2) => {
250
250
  });
251
251
  }, children: "Done" })] })] });
252
252
  })), br = x(Be, {}), yr = k(S((e2, t2) => {
253
- const { selectedColor: o2, quickColor: n2, icon: a2 = br, tooltip: r2, 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 = na(i2, [i2]), b2 = na(s2, [s2]), y2 = na(d2, [d2]), [w2, k2] = D(() => {
253
+ const { selectedColor: o2, quickColor: n2, icon: a2 = br, tooltip: r2, label: l2, onPreviewColor: i2, onPreviewColorImmediate: s2, onSelectColor: c2, variant: d2 = Re.Toolbar, panelProps: m2, shouldCloseFloatAll: p2 = true, compareRGB: u2 = false, darkMode: g2 = false, ...h2 } = e2, f2 = na(i2, [i2]), b2 = na(s2, [s2]), y2 = na(c2, [c2]), [w2, k2] = D(() => {
254
254
  }), S2 = n2 || (w2 || o2) || m2?.autoColor, T2 = M(false), P2 = v(() => {
255
255
  }, []), R2 = na(() => {
256
256
  k2(o2);
@@ -268,40 +268,40 @@ const tr = k(S((e2, t2) => {
268
268
  e4.which === ra.Enter && (p2 ? n3() : t3());
269
269
  }, onPreviewColorImmediate: B2, onPreviewColor: F2, onSelectColor: N2, onEyeDropStart: () => H2(true), onEyeDropStop: () => H2(false), compareRGB: u2, darkMode: g2 });
270
270
  }, [o2, w2, p2, S2, m2?.autoColor, g2]), z2 = { onQuickClick: n2 ? I2 : void 0, createPopupPanel: W2, popupProps: { popperProps: { resizeOnOverflow: false } }, onPopupOpen: R2, onPopupClose: P2, tooltip: r2 || l2 || "Color", label: l2, icon: E2, ...h2 };
271
- return c2 === Re.Toolbar ? x(Me, { ref: t2, ...z2 }) : x(Fe, { ref: t2, ...z2 });
271
+ return d2 === Re.Toolbar ? x(Me, { ref: t2, ...z2 }) : x(Fe, { ref: t2, ...z2 });
272
272
  })), wr = 82, kr = (e2) => {
273
- const { styleColor: t2, length: o2 = wr, width: n2 = 1, dashArray: a2 = null, sx: r2, 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 }, ...r2 }, height: n2, width: o2, viewBox: `0 0 ${o2} ${n2}`, ...d2, children: x(va, { length: o2, width: n2, dashArray: a2, isDouble: l2, isAngled: i2, className: "activeColor" }) });
273
+ const { styleColor: t2, length: o2 = wr, width: n2 = 1, dashArray: a2 = null, sx: r2, isDouble: l2 = false, isAngled: i2 = false, darkMode: s2 = false, ...c2 } = 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 }, ...r2 }, height: n2, width: o2, viewBox: `0 0 ${o2} ${n2}`, ...c2, children: x(va, { length: o2, width: n2, dashArray: a2, isDouble: l2, isAngled: i2, className: "activeColor" }) });
275
275
  }, Sr = k(S((e2, t2) => {
276
- const { variant: o2, showLabels: n2 = false, disabled: r2 = false, createPopupPanel: l2, styleColor: i2, selectedStyle: s2, onSelectStyle: d2, showNone: c2 = true, darkMode: m2, sx: p2, ...u2 } = e2, g2 = na(d2, []), h2 = v((e3) => {
277
- const { popupContainer: t3, floatReference: o3, closeFloat: l3, ...d3 } = e3, p3 = [], u3 = a.BuiltInDefinitionsArray;
276
+ const { variant: o2, showLabels: n2 = false, disabled: r2 = false, createPopupPanel: l2, styleColor: i2, selectedStyle: s2, onSelectStyle: c2, showNone: d2 = true, darkMode: m2, sx: p2, ...u2 } = e2, g2 = na(c2, []), h2 = v((e3) => {
277
+ const { popupContainer: t3, floatReference: o3, closeFloat: l3, ...c3 } = e3, p3 = [], u3 = a.BuiltInDefinitionsArray;
278
278
  for (let e4 = 0; e4 < u3.length; e4++) {
279
279
  const t4 = u3[e4];
280
- if ("None" === t4.description && !c2) continue;
280
+ if ("None" === t4.description && !d2) continue;
281
281
  const a2 = x(kr, { styleColor: i2, length: wr, width: t4.width, darkMode: m2, dashArray: t4.pattern, isDouble: t4.description.toLowerCase().includes("double"), isAngled: t4.description.toLowerCase().includes("slant") });
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%" } }), a2] })] }) : "None" === t4.description ? "None" : a2, p3.push(x(Ne, { className: "border-stroke", tabIndex: 0, sx: { height: "28px", "& svg path.activeColor": { filter: Ee(4) }, paddingLeft: "16px", background: `linear-gradient(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(5))})` }, tooltipProps: { description: n2 ? "" : t4.description }, icon: null, disabled: r2, onMouseDown: (e5) => e5.preventDefault(), onMouseUp: () => {
282
+ let c4 = null;
283
+ c4 = 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%" } }), a2] })] }) : "None" === t4.description ? "None" : a2, p3.push(x(Ne, { className: "border-stroke", tabIndex: 0, sx: { height: "28px", "& svg path.activeColor": { filter: Ee(4) }, paddingLeft: "16px", background: `linear-gradient(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(5))})` }, tooltipProps: { description: n2 ? "" : t4.description }, icon: null, disabled: r2, onMouseDown: (e5) => e5.preventDefault(), onMouseUp: () => {
284
284
  l3(), g2(t4.style);
285
285
  }, onKeyDown: (e5) => {
286
286
  e5.which === ra.Enter && l3();
287
- }, selected: t4.style === s2, parentFloat: o3, children: d4 }, e4));
287
+ }, selected: t4.style === s2, parentFloat: o3, children: c4 }, e4));
288
288
  }
289
289
  return x(A, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: p3 });
290
- }, [r2, c2, i2, s2, m2]), f2 = C(() => {
290
+ }, [r2, d2, i2, s2, m2]), f2 = C(() => {
291
291
  const e3 = a.BuiltInDefinitions.get(s2);
292
292
  let t3;
293
293
  return t3 = "None" === e3.description ? x(A, { sx: { minWidth: `${wr}px` }, children: "None" }) : x(kr, { styleColor: i2, length: wr, 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
294
  }, [s2, i2]), w2 = C(() => a.BuiltInDefinitions.get(s2), [s2]), k2 = { disabled: r2, icon: f2, tooltip: "Border Style: " + w2.description, sx: { background: `linear-gradient(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(5))})`, ...p2 }, createPopupPanel: h2, ...u2 };
295
295
  return o2 === Re.Toolbar ? x(Me, { ...k2 }) : x(Fe, { ...k2 });
296
296
  })), Cr = k(S((t2, o2) => {
297
- const { autoColor: n2 = null, schemeLookup: r2, autoStrokeStyle: l2 = a.StrokeStyle.Thin, disabled: i2 = false, darkMode: s2 = false, showStylingBefore: d2 = true, onSelectBorder: c2, onPreviewBorder: m2, selectedBorder: p2, createTemporaryBorder: u2, ...g2 } = t2, h2 = na(c2, [c2]), f2 = na(m2, [m2]), [w2, k2] = D(), [S2, T2] = D(), P2 = w2 ?? l2, R2 = S2 ?? n2, M2 = p2 || { bottom: { style: l2, color: n2?.toString() } }, F2 = na((e2) => {
297
+ const { autoColor: n2 = null, schemeLookup: r2, autoStrokeStyle: l2 = a.StrokeStyle.Thin, disabled: i2 = false, darkMode: s2 = false, showStylingBefore: c2 = true, onSelectBorder: d2, onPreviewBorder: m2, selectedBorder: p2, createTemporaryBorder: u2, ...g2 } = t2, h2 = na(d2, [d2]), f2 = na(m2, [m2]), [w2, k2] = D(), [S2, T2] = D(), P2 = w2 ?? l2, R2 = S2 ?? n2, M2 = p2 || { bottom: { style: l2, color: n2?.toString() } }, F2 = na((e2) => {
298
298
  const t3 = {}, o3 = e2 ? Object.keys(e2) : [];
299
299
  let n3 = false;
300
300
  for (let r4 = 0; r4 < o3.length; r4++) e2[o3[r4]]?.style && (t3[o3[r4]] = { style: e2[o3[r4]].style, color: e2[o3[r4]].color }, n3 || t3[o3[r4]].style === a.StrokeStyle.None || (n3 = true));
301
301
  o3.length < 6 && (n3 = true);
302
- const r3 = 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;
302
+ const r3 = n3 ? t3.left : null, l3 = n3 ? t3.top : null, i3 = n3 ? t3.right : null, c3 = n3 ? t3.bottom : null, d3 = n3 ? t3.vertical : null, m3 = n3 ? t3.horizontal : null;
303
303
  let p3 = "";
304
- return l3 || r3 || (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 "), r3 || (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 || r3 || (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 "), r3 || (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 || r3 || (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(Ta, { getBorderAt: (e3, n4) => {
304
+ return l3 || r3 || (p3 += "M 3,5 H 5 V 3 H 3 "), l3 || (p3 += "M 7,5 H 9 V 3 H 7 "), l3 || d3 || (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 "), r3 || (p3 += "M 3,9 H 5 V 7 H 3 "), d3 || (p3 += "M 11,9 h 2 V 7 h -2 "), i3 || (p3 += "M 19,9 h 2 V 7 h -2 "), m3 || r3 || (p3 += "M 3,13 H 5 V 11 H 3 "), m3 || (p3 += "M 7,13 H 9 V 11 H 7 "), m3 || d3 || (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 "), r3 || (p3 += "M 3,17 H 5 V 15 H 3 "), d3 || (p3 += "M 11,17 h 2 v -2 h -2 "), i3 || (p3 += "M 19,17 h 2 v -2 h -2 "), c3 || r3 || (p3 += "M 3,21 H 5 V 19 H 3 "), c3 || (p3 += "M 7,21 H 9 V 19 H 7 "), c3 || d3 || (p3 += "M 11,21 h 2 v -2 h -2 "), c3 || (p3 += "M 15,21 h 2 v -2 h -2 "), c3 || 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(Ta, { getBorderAt: (e3, n4) => {
305
305
  if (!u2 || 0 === o3.length) return null;
306
306
  const a2 = e3.rowIndex, r4 = e3.colIndex, l4 = {};
307
307
  return 0 === a2 ? (l4.top = t3.top, l4.bottom = t3.horizontal) : (l4.top = t3.horizontal, l4.bottom = t3.bottom), 0 === r4 ? (l4.left = t3.left, l4.right = t3.vertical) : (l4.left = t3.vertical, l4.right = t3.right), u2?.(l4);
@@ -319,23 +319,23 @@ const tr = k(S((e2, t2) => {
319
319
  }, []), E2 = v((e2) => {
320
320
  f2?.(e2);
321
321
  }, []), I2 = v((t3) => {
322
- const { closeFloatAll: o3, floatReference: l3 } = t3, c3 = (e2, t4, n3 = "bottom", r3 = false) => {
322
+ const { closeFloatAll: o3, floatReference: l3 } = t3, d3 = (e2, t4, n3 = "bottom", r3 = false) => {
323
323
  const l4 = B2(e2, R2 ?? null, r3 ? a.StrokeStyle.None : P2 ?? null), i3 = r3 ? B2([], R2 ?? null, P2 ?? null) : l4;
324
324
  return x(He, { icon: F2(i3), sx: { background: `linear-gradient(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(5))})` }, tooltipProps: { label: t4, simple: true, placement: n3 }, onClick: () => {
325
325
  o3(), E2(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([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom, a.Edge.Horizontal, a.Edge.Vertical], "All Borders", "top"), c3([a.Edge.Horizontal, a.Edge.Vertical], "Inner Borders", "top"), c3([a.Edge.Horizontal], "Inside Horizontal Borders", "top"), c3([a.Edge.Vertical], "Inside Vertical Borders", "top"), c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom], "Outside Borders", "top")] }), b(A, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [c3([a.Edge.Left], "Left Borders"), c3([a.Edge.Top], "Top Borders"), c3([a.Edge.Right], "Right Borders"), c3([a.Edge.Bottom], "Bottom Borders"), c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom, a.Edge.Horizontal, a.Edge.Vertical, a.Edge.DiagonalUp, a.Edge.DiagonalDown], "No Borders", "bottom", true)] })] }), p3 = x(y, { children: b(A, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [x(yr, { variant: Re.Toolbar, icon: x(Ie, {}), selectedColor: P2 === a.StrokeStyle.None ? new e("transparent") : R2, onPreviewColor: (e2) => {
327
+ }, m3 = b(y, { children: [b(A, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [d3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom, a.Edge.Horizontal, a.Edge.Vertical], "All Borders", "top"), d3([a.Edge.Horizontal, a.Edge.Vertical], "Inner Borders", "top"), d3([a.Edge.Horizontal], "Inside Horizontal Borders", "top"), d3([a.Edge.Vertical], "Inside Vertical Borders", "top"), d3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom], "Outside Borders", "top")] }), b(A, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [d3([a.Edge.Left], "Left Borders"), d3([a.Edge.Top], "Top Borders"), d3([a.Edge.Right], "Right Borders"), d3([a.Edge.Bottom], "Bottom Borders"), d3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom, a.Edge.Horizontal, a.Edge.Vertical, a.Edge.DiagonalUp, a.Edge.DiagonalDown], "No Borders", "bottom", true)] })] }), p3 = x(y, { children: b(A, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [x(yr, { variant: Re.Toolbar, icon: x(Ie, {}), selectedColor: P2 === a.StrokeStyle.None ? new e("transparent") : R2, onPreviewColor: (e2) => {
328
328
  T2(e2);
329
329
  }, onSelectColor: (e2, t4) => {
330
330
  T2(e2);
331
331
  }, darkMode: s2, tooltip: "Border Color", panelProps: { disableAlpha: true, autoColor: n2, schemeLookup: r2 }, disabled: i2 || P2 === a.StrokeStyle.None, parentFloat: l3, shouldCloseFloatAll: false }), x(Sr, { selectedStyle: P2, 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] });
332
+ return b(A, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, onClick: (e2) => e2.stopPropagation(), children: [c2 ? p3 : m3, x(ie, { orientation: "horizontal" }), c2 ? m3 : p3] });
333
333
  }, [P2, R2, n2, r2, s2]), L2 = C(() => F2(M2), [M2, s2]);
334
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
335
  h2?.(M2);
336
336
  }, quickButtonProps: { sx: {} }, disabled: i2, icon: L2, ...g2 });
337
337
  })), vr = k(S((e2, t2) => {
338
- const { commands: o2, command: n2, commandHook: a2, variant: r2 = oa.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 = ta(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, P2 = d2 ?? w2?.schemeLookup, R2 = na((e3) => {
338
+ const { commands: o2, command: n2, commandHook: a2, variant: r2 = oa.Toolbar, disabled: l2 = false, autoColor: i2, autoStrokeStyle: s2, schemeLookup: c2, createTemporaryBorder: d2, selectedBorder: m2, onSelectBorder: p2, darkMode: u2, icon: g2, label: h2, ...f2 } = e2, b2 = ta(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 = d2 ?? w2?.createTemporaryBorder, P2 = c2 ?? w2?.schemeLookup, R2 = na((e3) => {
339
339
  w2?.onBorderSelect && w2.onBorderSelect(e3), p2?.(e3), y2?.execute(e3, a2);
340
340
  }, [y2, p2, a2]), M2 = v((e3, t3) => {
341
341
  const { children: o3, title: n3, ...a3 } = e3;
@@ -346,23 +346,23 @@ const tr = k(S((e2, t2) => {
346
346
  })), Tr = k(S((e2, t2) => {
347
347
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
348
348
  const o3 = { variant: oa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("mergeToggle"), icon: re(x(ze, {})) }), x(le, { ...o3, command: t3.getCommand("mergeHorizontal"), icon: re(x($e, {})) }), x(le, { ...o3, command: t3.getCommand("mergeVertical"), icon: re(x(Oe, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("unmerge"), icon: re(x(Ve, {})) })] });
349
- return ce({ ...e3, children: l3 });
349
+ return de({ ...e3, children: l3 });
350
350
  }, [r2, n2, a2]);
351
351
  return x(me, { ref: t2, commands: o2, quickCommand: "mergeToggle", commandHook: n2, scope: a2, tooltip: "Combine or split cells.", createPopupPanel: i2, icon: re(x(ze, {})), ...l2 });
352
352
  })), Dr = k(S((e2, t2) => {
353
353
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
354
354
  const o3 = { variant: oa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("freezeToggle"), icon: re(x(Ge, {})) }), x(le, { ...o3, command: t3.getCommand("freezeToggleHorizontal"), icon: re(x(Ue, {})) }), x(le, { ...o3, command: t3.getCommand("freezeToggleVertical"), icon: re(x(je, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("unfreeze"), icon: x(Ve, {}) })] });
355
- return ce({ ...e3, children: l3 });
355
+ return de({ ...e3, children: l3 });
356
356
  }, [r2, n2, a2]);
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
358
  })), Pr = k(S((e2, t2) => {
359
359
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
360
360
  const o3 = { variant: oa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("find"), icon: re(x(qe, {})) }), x(le, { ...o3, command: t3.getCommand("findReplace"), icon: re(x(Ke, {})) }), x(le, { ...o3, command: t3.getCommand("goto"), icon: re(x(Xe, {})) })] });
361
- return ce({ ...e3, children: l3 });
361
+ return de({ ...e3, children: l3 });
362
362
  }, [r2, n2, a2]);
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: re(x(qe, {})), ...l2 });
364
364
  })), Rr = k(S((e2, t2) => {
365
- const { command: o2, commandHook: n2, showQuickButtons: a2 = !!e2.commands, commands: l2, fontSizes: i2 = Da.DefaultFontSizes, disabled: s2 = false, parentFloat: d2, icon: c2, label: m2, sx: p2, ...u2 } = e2;
365
+ const { command: o2, commandHook: n2, showQuickButtons: a2 = !!e2.commands, commands: l2, fontSizes: i2 = Da.DefaultFontSizes, disabled: s2 = false, parentFloat: c2, icon: d2, label: m2, sx: p2, ...u2 } = e2;
366
366
  la(o2);
367
367
  const g2 = () => o2?.state()?.toString() || "11", [h2, f2] = D(g2), y2 = na(() => {
368
368
  const e3 = parseFloat(h2);
@@ -410,9 +410,9 @@ const tr = k(S((e2, t2) => {
410
410
  }, sx: { paddingTop: "4px", paddingBottom: "4px" }, children: x(A, { sx: { display: "flex", flex: "1 1 100%", justifyContent: "end" }, children: i2[e4] }) }, "fontSize-" + e4));
411
411
  }
412
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: r2 })] });
413
- return ce({ ...e3, children: l3 });
413
+ return de({ ...e3, children: l3 });
414
414
  }, [s2, o2?.state(), n2]);
415
- return x(Me, { ref: t2, sx: { ...p2 }, tabIndex: -1, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: F2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: o2?.label(), description: o2?.description(), disabled: t3 || o2?.disabled(), children: e3 }), createQuickButton: M2, ...u2 });
415
+ return x(Me, { ref: t2, sx: { ...p2 }, tabIndex: -1, outlined: true, disabled: s2, parentFloat: c2, createPopupPanel: F2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: o2?.label(), description: o2?.description(), disabled: t3 || o2?.disabled(), children: e3 }), createQuickButton: M2, ...u2 });
416
416
  })), Mr = k((e2) => {
417
417
  const { selected: t2, disabled: o2, formattedValue: n2, handleSetFormat: a2, format: r2, 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) => {
@@ -423,14 +423,14 @@ const tr = k(S((e2, t2) => {
423
423
  e3.keyCode !== ra.Enter && e3.keyCode !== ra.Space || a2(r2.numberFormat);
424
424
  }, ...s2, children: b(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [b(I, { component: "div", children: [r2.formatType, r2.formatType === l.Type.Custom ? "…" : ""] }), x(I, { variant: "caption", component: "div", sx: { color: (e3) => za(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
425
  }), Fr = k(S((e2, t2) => {
426
- const { commands: o2, commandHook: n2, scope: a2, sx: i2, disabled: s2 = false, parentFloat: d2, ...c2 } = e2, m2 = ta(o2, ["formatNumberFormat"])[0], p2 = m2?.state() ? l.Styles.lookupStyle(m2?.state()).formatType : l.Type.General, u2 = C(() => {
426
+ const { commands: o2, commandHook: n2, scope: a2, sx: i2, disabled: s2 = false, parentFloat: c2, ...d2 } = e2, m2 = ta(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;
430
430
  }, [n2]), g2 = v((e3, t3) => {
431
431
  const o3 = (e4) => {
432
432
  n2?.beforeExecute?.(m2, m2?.state()), m2.execute(e4, n2), n2?.onExecute?.(m2, m2?.state());
433
- }, r2 = m2?.context()(), i3 = l.Styles.lookupPrimary(), d3 = [];
433
+ }, r2 = m2?.context()(), i3 = l.Styles.lookupPrimary(), c3 = [];
434
434
  for (let e4 = 0; e4 < i3.length; e4++) {
435
435
  let t4 = "";
436
436
  if (r2 && !r2.isEmpty()) try {
@@ -440,49 +440,49 @@ const tr = 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(Mr, { selected: n3, disabled: s2 || !m2 || m2.disabled(), formattedValue: t4, handleSetFormat: o3, format: i3[e4] }, i3[e4].formatType));
443
+ c3.push(x(Mr, { selected: n3, disabled: s2 || !m2 || m2.disabled(), formattedValue: t4, handleSetFormat: o3, format: i3[e4] }, i3[e4].formatType));
444
444
  }
445
445
  const g3 = { numberFormat: "", formatType: l.Type.Custom }, h3 = p2 === l.Type.Custom, f3 = x(Mr, { selected: h3, disabled: s2 || !m2 || m2.disabled(), formattedValue: h3 ? r2.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: a2, icon: x(Qe, {}) }), x(le, { command: t3.getCommand("formatNumberFormatPercentStyle"), commandHook: u2, scope: a2, icon: x(et, {}) }), x(le, { command: t3.getCommand("formatNumberFormatCommaStyle"), commandHook: u2, scope: a2, icon: x(tt, {}) }), x(le, { command: t3.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: u2, scope: a2, icon: re(x(ot, {})) }), x(le, { command: t3.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: u2, scope: a2, icon: re(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] });
448
- return ce({ ...e3, children: w2 });
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: a2, icon: x(Qe, {}) }), x(le, { command: t3.getCommand("formatNumberFormatPercentStyle"), commandHook: u2, scope: a2, icon: x(et, {}) }), x(le, { command: t3.getCommand("formatNumberFormatCommaStyle"), commandHook: u2, scope: a2, icon: x(tt, {}) }), x(le, { command: t3.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: u2, scope: a2, icon: re(x(ot, {})) }), x(le, { command: t3.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: u2, scope: a2, icon: re(x(nt, {})) })] }), w2 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...d2, children: [y2, x(ie, { orientation: "horizontal" }), x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: c3 }), x(ie, { orientation: "horizontal" }), f3] });
448
+ return de({ ...e3, children: w2 });
449
449
  }, [m2?.context(), m2?.state(), n2, a2]), h2 = wa(), f2 = C(() => {
450
450
  const e3 = l.Type.MediumTime;
451
451
  return `${r.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 });
453
+ return x(me, { ref: t2, commands: o2, sx: i2, outlined: true, disabled: s2, parentFloat: c2, 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 }) }), ...d2 });
454
454
  })), Br = k(S((e2, t2) => {
455
455
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
456
456
  const o3 = { variant: oa.Menuitem, commandHook: n2, scope: "clear", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("clearAll"), icon: x(at, {}) }), x(le, { ...o3, command: t3.getCommand("clearFormats"), icon: re(x(rt, {})) }), x(le, { ...o3, command: t3.getCommand("clearContents"), icon: re(x(lt, {})) }), x(le, { ...o3, command: t3.getCommand("clearComments") }), x(le, { ...o3, command: t3.getCommand("clearHyperlinks") })] });
457
- return ce({ ...e3, children: a3 });
457
+ return de({ ...e3, children: a3 });
458
458
  }, [r2, n2, a2]);
459
459
  return x(me, { ref: t2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Clear", tooltip: "Clear everything in the cell, or remove just the formatting or contents.", createPopupPanel: i2, icon: x(at, {}), ...l2 });
460
460
  })), Nr = k(S((e2, t2) => {
461
461
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
462
462
  const o3 = { variant: oa.Menuitem, commandHook: n2, scope: "fill", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("fillDown"), icon: re(x(it, {})) }), x(le, { ...o3, command: t3.getCommand("fillRight"), icon: re(x(it, { sx: { transform: "rotate(270deg)" } })) }), x(le, { ...o3, command: t3.getCommand("fillUp"), icon: re(x(it, { sx: { transform: "rotate(180deg)" } })) }), x(le, { ...o3, command: t3.getCommand("fillLeft"), icon: re(x(it, { sx: { transform: "rotate(90deg)" } })) })] });
463
- return ce({ ...e3, children: a3 });
463
+ return de({ ...e3, children: a3 });
464
464
  }, [r2, n2, a2]);
465
465
  return x(me, { ref: t2, commands: o2, disabled: r2, commandHook: n2, label: "Fill", tooltip: "Fill the selected cells with the value from one of the corners.", createPopupPanel: i2, icon: re(x(it, {})), ...l2 });
466
466
  })), Er = k(S((e2, t2) => {
467
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = oa.Toolbar, ...c2 } = e2, m2 = ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns"], p2 = ta(o2, m2), { singleCommand: u2, allDisabled: g2 } = C(() => {
467
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: c2 = oa.Toolbar, ...d2 } = e2, m2 = ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns"], p2 = ta(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 === oa.Menuitem && (e3 = 0 === t3 ? p2[o3] : null), t3++);
469
+ for (let o3 = 0; o3 < p2.length; o3++) p2[o3] && !p2[o3]?.disabled() && (i2 && c2 === oa.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
- return e3.set("insertCellsShiftDown", re(x(st, {}))), e3.set("insertCellsShiftRight", re(x(st, { sx: { transform: "rotate(270deg)" } }))), e3.set("insertRows", re(x(dt, {}))), e3.set("insertColumns", re(x(ct, {}))), e3;
473
+ return e3.set("insertCellsShiftDown", re(x(st, {}))), e3.set("insertCellsShiftRight", re(x(st, { sx: { transform: "rotate(270deg)" } }))), e3.set("insertRows", re(x(ct, {}))), e3.set("insertColumns", re(x(dt, {}))), e3;
474
474
  }, []), f2 = v((e3, t3) => {
475
475
  let o3 = null;
476
476
  const a3 = { variant: oa.Menuitem, commandHook: n2, scope: "insertCells", disabled: r2 };
477
477
  l2 || (o3 = b(y, { children: [x(ie, { orientation: "horizontal" }), x(le, { ...a3, command: t3.getCommand("addSheet"), icon: re(x(mt, {})) })] }));
478
478
  const i3 = b(y, { children: [x(le, { ...a3, command: p2[0], icon: h2.get(m2[0]) }), x(le, { ...a3, command: p2[1], icon: h2.get(m2[1]) }), x(ie, { orientation: "horizontal" }), x(le, { ...a3, command: p2[2], icon: h2.get(m2[2]) }), x(le, { ...a3, command: p2[3], icon: h2.get(m2[3]) }), o3] });
479
- return ce({ ...e3, children: i3 });
479
+ return de({ ...e3, children: i3 });
480
480
  }, [r2, p2, n2, a2, h2]);
481
- return u2 ? x(le, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: u2, icon: h2.get(u2.key()), ...c2 }) : x(me, { ref: t2, variant: d2, quickCommand: "insertCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || 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: re(x(ct, {})), ...c2 });
481
+ return u2 ? x(le, { ref: t2, variant: c2, commandHook: n2, disabled: r2, command: u2, icon: h2.get(u2.key()), ...d2 }) : x(me, { ref: t2, variant: c2, quickCommand: "insertCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || 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: re(x(dt, {})), ...d2 });
482
482
  })), Ar = k(S((e2, t2) => {
483
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = oa.Toolbar, ...c2 } = e2, m2 = ta(o2, ["deleteCellsShiftUp", "deleteCellsShiftLeft", "deleteRows", "deleteColumns"]), { singleCommand: p2, allDisabled: u2 } = C(() => {
483
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: c2 = oa.Toolbar, ...d2 } = e2, m2 = ta(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 === oa.Menuitem && (e3 = 0 === t3 ? m2[o3] : null), t3++);
485
+ for (let o3 = 0; o3 < m2.length; o3++) m2[o3] && !m2[o3]?.disabled() && (i2 && c2 === oa.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();
@@ -492,16 +492,16 @@ const tr = k(S((e2, t2) => {
492
492
  let a3 = null;
493
493
  l2 || (a3 = b(y, { children: [x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("deleteSheet"), icon: re(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") }), a3] });
495
- return ce({ ...e3, children: i3 });
495
+ return de({ ...e3, children: i3 });
496
496
  }, [r2, n2, a2, g2]);
497
- return p2 ? x(le, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: p2, icon: g2.get(p2.key()), ...c2 }) : x(me, { ref: t2, variant: d2, quickCommand: "deleteCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || 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: re(x(gt, {})), ...c2 });
497
+ return p2 ? x(le, { ref: t2, variant: c2, commandHook: n2, disabled: r2, command: p2, icon: g2.get(p2.key()), ...d2 }) : x(me, { ref: t2, variant: c2, quickCommand: "deleteCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || 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: re(x(gt, {})), ...d2 });
498
498
  })), Ir = k(S((t2, o2) => {
499
- const { command: n2, commandHook: a2, onSelectColor: r2, disabled: l2 = false, variant: i2 = oa.Toolbar, quickColor: s2, panelProps: d2, isSplit: c2 = false, darkMode: m2, icon: p2, ...u2 } = t2, { autoColor: g2, schemeLookup: h2, recentColors: f2, ...b2 } = d2;
499
+ const { command: n2, commandHook: a2, onSelectColor: r2, disabled: l2 = false, variant: i2 = oa.Toolbar, quickColor: s2, panelProps: c2, isSplit: d2 = false, darkMode: m2, icon: p2, ...u2 } = t2, { autoColor: g2, schemeLookup: h2, recentColors: f2, ...b2 } = c2;
500
500
  if (u2.selectedColor) throw new Error("Command selectedColor will be used. Do not try to provide one as a direct argument");
501
501
  la(n2);
502
502
  const y2 = n2?.context();
503
503
  let w2 = s2 ?? y2?.quickColor;
504
- c2 && !w2 && (w2 = new e("transparent"));
504
+ d2 && !w2 && (w2 = new e("transparent"));
505
505
  const k2 = g2 ?? y2?.autoColor, S2 = h2 ?? y2?.schemeLookup, T2 = f2 ?? y2?.recentColors, D2 = m2 ?? y2?.darkMode, P2 = C(() => ({ autoColor: k2, schemeLookup: S2, recentColors: T2, darkMode: D2, ...b2 }), [k2, S2, T2, D2]), R2 = na((e2, t3) => {
506
506
  e2 && t3 && y2?.addRecentColor && y2.addRecentColor(e2), y2?.onColorSelect && y2.onColorSelect(e2), r2?.(e2, t3), n2?.execute(e2, a2);
507
507
  }, [n2, r2, a2, y2]), M2 = v((e2, t3) => {
@@ -513,29 +513,29 @@ const tr = k(S((e2, t2) => {
513
513
  }));
514
514
  Ir.displayName = "ColorCommandButton";
515
515
  const Lr = k(S((e2, t2) => {
516
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = ta(o2, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), d2 = v((e3, t3) => {
516
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = ta(o2, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), c2 = v((e3, t3) => {
517
517
  const o3 = { variant: oa.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("gridlinesToggle") }), x(Ir, { ...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
- return ce({ ...e3, children: l3 });
518
+ return de({ ...e3, children: l3 });
519
519
  }, [r2, n2]);
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 });
520
+ return x(me, { ref: t2, parentFloat: l2, quickCommand: s2[0]?.key(), commands: o2, commandHook: n2, createPopupPanel: c2, 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
521
  })), Hr = k(S((e2, t2) => {
522
522
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
523
523
  const o3 = { variant: oa.Menuitem, commandHook: n2, scope: "sort", disabled: r2 }, a3 = t3.getCommand("sortCustom"), l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("sortAscending"), icon: re(x(ft, {})) }), x(le, { ...o3, command: t3.getCommand("sortDescending"), icon: re(x(xt, {})) }), a3 ? x(le, { ...o3, command: a3, icon: re(x(bt, {})) }) : null, x(ie, { orientation: "horizontal" }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle"), icon: re(x(yt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear"), icon: re(x(wt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply"), icon: re(x(kt, {})) })] });
524
- return ce({ ...e3, children: l3 });
524
+ return de({ ...e3, children: l3 });
525
525
  }, [r2, n2, a2]);
526
526
  return x(me, { ref: t2, commands: o2, commandHook: n2, scope: a2, disabled: r2, 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: re(x(ft, {})), ...l2 });
527
527
  })), Wr = k(S((e2, t2) => {
528
528
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
529
529
  const o3 = { variant: oa.Menuitem, commandHook: n2, scope: "sort", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle"), icon: re(x(yt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear"), icon: re(x(wt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply"), icon: re(x(kt, {})) })] });
530
- return ce({ ...e3, children: a3 });
530
+ return de({ ...e3, children: a3 });
531
531
  }, [r2, n2, a2]);
532
532
  return x(me, { ref: t2, commands: o2, commandHook: n2, scope: a2, disabled: r2, 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: re(x(yt, {})), ...l2 });
533
533
  })), zr = k(S((e2, t2) => {
534
- const { quickCommand: o2, icon: n2, isRedo: a2 = false, nestRedo: r2 = true, undoManager: l2, scope: i2, sx: s2, disabled: d2, commands: c2, ...m2 } = e2, p2 = [o2];
534
+ const { quickCommand: o2, icon: n2, isRedo: a2 = false, nestRedo: r2 = true, undoManager: l2, scope: i2, sx: s2, disabled: c2, commands: d2, ...m2 } = e2, p2 = [o2];
535
535
  !a2 && r2 && p2.push("redo");
536
- const u2 = ta(c2, p2), g2 = u2[0], h2 = u2[1], f2 = l2 ?? g2?.context?.()?.undoManager;
537
- let w2 = d2;
538
- d2 || (w2 = !g2 || g2.disabled(), h2 && !h2.disabled() && (w2 = false));
536
+ const u2 = ta(d2, p2), g2 = u2[0], h2 = u2[1], f2 = l2 ?? g2?.context?.()?.undoManager;
537
+ let w2 = c2;
538
+ c2 || (w2 = !g2 || g2.disabled(), h2 && !h2.disabled() && (w2 = false));
539
539
  const [k2, S2] = D(0), C2 = v((e3, t3) => {
540
540
  let o3 = 0 === k2 ? "Cancel" : `${g2.label()} ${k2} Action${1 === k2 ? "" : "s"}`, n3 = false;
541
541
  f2 || (n3 = true), n3 || (n3 = r2 ? !f2.hasRedo() && !f2.hasUndo() : !f2.hasRedo());
@@ -551,10 +551,10 @@ const Lr = k(S((e2, t2) => {
551
551
  e4.isDefaultPrevented() || e4.keyCode !== ra.Enter && e4.keyCode !== ra.Space || l3(k2);
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
- const s3 = a2 ? f2?.getRedoDescriptions() : f2?.getUndoDescriptions(), d3 = [];
554
+ const s3 = a2 ? f2?.getRedoDescriptions() : f2?.getUndoDescriptions(), c3 = [];
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: () => {
557
+ c3.push(x(Ne, { sx: { maxWidth: "360px", display: "flex" }, icon: x(mt, {}), disabled: w2, selected: e4 < k2, onMouseEnter: () => {
558
558
  S2(e4 + 1);
559
559
  }, onMouseDown: (e5) => {
560
560
  0 === e5.button && e5.preventDefault();
@@ -564,23 +564,23 @@ const Lr = k(S((e2, t2) => {
564
564
  t5.isDefaultPrevented() || t5.keyCode !== ra.Enter && t5.keyCode !== ra.Space || l3(e4 + 1);
565
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}`));
566
566
  }
567
- let c3 = null;
567
+ let d3 = null;
568
568
  if (!a2 && r2) {
569
569
  const o4 = { scope: "undo", commands: t3, variant: oa.Menuitem, parentFloat: e3.floatReference };
570
- c3 = [], c3.push(x(zr, { ...o4, quickCommand: "redo", isRedo: true }, "nested:redo")), f2.hasRedo() && f2.hasUndo() && c3.push(x(ie, { orientation: "horizontal" }, "action:redo-div"));
570
+ d3 = [], d3.push(x(zr, { ...o4, quickCommand: "redo", isRedo: true }, "nested:redo")), f2.hasRedo() && f2.hasUndo() && d3.push(x(ie, { orientation: "horizontal" }, "action:redo-div"));
571
571
  }
572
572
  const m3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, onClick: () => {
573
573
  e3.closeFloatAll();
574
574
  }, onMouseLeave: () => {
575
575
  S2(0);
576
- }, children: [c3, x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), x(ie, { orientation: "horizontal" }), i3] });
577
- return ce({ ...e3, children: m3 });
576
+ }, children: [d3, x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: c3 }), x(ie, { orientation: "horizontal" }), i3] });
577
+ return de({ ...e3, children: m3 });
578
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() ?? (a2 ? "Redo" : "Undo"), tooltip: x(y, { children: x("span", { children: `${g2?.label() ?? "No"} last actions.` }) }), createPopupPanel: C2, icon: n2 ?? re(x(a2 ? St : Ct, {})), selected: false, ...m2 });
579
+ return x(me, { ref: t2, commands: d2, quickCommand: o2, scope: i2, disabled: w2, label: g2?.label() ?? (a2 ? "Redo" : "Undo"), tooltip: x(y, { children: x("span", { children: `${g2?.label() ?? "No"} last actions.` }) }), createPopupPanel: C2, icon: n2 ?? re(x(a2 ? St : Ct, {})), selected: false, ...m2 });
580
580
  })), $r = i.getFontList(), Or = /* @__PURE__ */ new Map();
581
581
  for (let e2 = 0; e2 < $r.length; e2++) Or.set($r[e2].fontRef.getFamily(), $r[e2]);
582
582
  const Vr = k(S((e2, t2) => {
583
- const { command: o2, commandHook: n2, sx: a2, disabled: l2 = false, parentFloat: i2, icon: s2, label: d2, ...c2 } = e2;
583
+ const { command: o2, commandHook: n2, sx: a2, disabled: l2 = false, parentFloat: i2, icon: s2, label: c2, ...d2 } = e2;
584
584
  la(o2);
585
585
  const m2 = o2?.state(), p2 = wa(), u2 = C(() => `${r.getSharedMeasurer()("Times New Roman", Math.round(p2.typography.fontSize), p2.typography.fontFamily).width}px`, [p2]), g2 = v((e3) => {
586
586
  const t3 = (e4) => {
@@ -599,86 +599,86 @@ const Vr = k(S((e2, t2) => {
599
599
  o3.keyCode !== ra.Enter && o3.keyCode !== ra.Space || t3(a3[e4].key);
600
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: () => a3[e4]?.key }, children: a3[e4].description }) }) }, e4 + "" + a3[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: r2 }) });
603
- return ce({ ...e3, children: i3 });
602
+ const i3 = x(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ...d2, children: x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: r2 }) });
603
+ return de({ ...e3, children: i3 });
604
604
  }, [l2, o2?.state()]);
605
- return x(Me, { ref: t2, sx: { ...a2 }, 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 });
605
+ return x(Me, { ref: t2, sx: { ...a2 }, 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 }) }), ...d2 });
606
606
  })), Gr = k(S((e2, t2) => {
607
607
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ta(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
- }, [i2]), d2 = C(() => {
610
+ }, [i2]), c2 = C(() => {
611
611
  const e3 = /* @__PURE__ */ new Map();
612
612
  return e3.set("formatStrikeThroughToggle", re(x(vt, {}))), e3.set("formatSuperscriptToggle", re(x(Tt, {}))), e3.set("formatSubscriptToggle", re(x(Dt, {}))), e3;
613
- }, []), c2 = v((e3, t3) => {
614
- const o3 = { variant: oa.Menuitem, commandHook: n2, scope: "textEffects", disabled: r2 }, a3 = 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
- return ce({ ...e3, children: a3 });
613
+ }, []), d2 = v((e3, t3) => {
614
+ const o3 = { variant: oa.Menuitem, commandHook: n2, scope: "textEffects", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatStrikeThroughToggle"), icon: c2.get("formatStrikeThroughToggle") }), x(le, { ...o3, command: t3.getCommand("formatSuperscriptToggle"), icon: c2.get("formatSuperscriptToggle") }), x(le, { ...o3, command: t3.getCommand("formatSubscriptToggle"), icon: c2.get("formatSubscriptToggle") })] });
615
+ return de({ ...e3, children: a3 });
616
616
  }, [r2, n2, a2]);
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) ?? re(x(vt, {})), ...l2 });
617
+ return x(me, { ref: t2, quickCommand: s2, commands: o2, commandHook: n2, createPopupPanel: d2, label: "Text Effects", tooltip: "Style your text to differentiate it.", icon: c2.get(s2) ?? re(x(vt, {})), ...l2 });
618
618
  })), Ur = k(S((e2, t2) => {
619
619
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ta(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
- }, [i2]), d2 = C(() => {
622
+ }, [i2]), c2 = C(() => {
623
623
  const e3 = /* @__PURE__ */ new Map();
624
624
  return e3.set("formatUnderlinedToggle", re(x(Pt, {}))), e3.set("formatUnderlinedDoubleToggle", re(x(Rt, {}))), e3.set("formatUnderlinedAccountingToggle", re(x(Mt, {}))), e3.set("formatUnderlinedAccountingDoubleToggle", re(x(Ft, {}))), e3;
625
- }, []), c2 = v((e3, t3) => {
625
+ }, []), d2 = v((e3, t3) => {
626
626
  const o3 = { variant: oa.Menuitem, commandHook: n2, scope: "underline", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatUnderlinedToggle"), icon: re(x(Pt, {})) }), x(le, { ...o3, command: t3.getCommand("formatUnderlinedDoubleToggle"), icon: re(x(Rt, {})) }), x(le, { ...o3, command: t3.getCommand("formatUnderlinedAccountingToggle"), commandHook: n2, icon: re(x(Mt, {})) }), x(le, { ...o3, command: t3.getCommand("formatUnderlinedAccountingDoubleToggle"), icon: re(x(Ft, {})) })] });
627
- return ce({ ...e3, children: a3 });
627
+ return de({ ...e3, children: a3 });
628
628
  }, [r2, n2, a2]);
629
- return x(me, { ref: t2, quickCommand: s2, commands: o2, commandHook: n2, label: "Underline", tooltip: "All underline stylings.", createPopupPanel: c2, icon: d2.get(s2) ?? re(x(Pt, {})), ...l2 });
629
+ return x(me, { ref: t2, quickCommand: s2, commands: o2, commandHook: n2, label: "Underline", tooltip: "All underline stylings.", createPopupPanel: d2, icon: c2.get(s2) ?? re(x(Pt, {})), ...l2 });
630
630
  })), jr = k(S((e2, t2) => {
631
- const { command: o2, commands: n2, commandHook: a2, scope: r2, includePasteAllInPopup: l2 = true, disabled: i2 = false, ...s2 } = e2, d2 = na((e3, t3) => {
631
+ const { command: o2, commands: n2, commandHook: a2, scope: r2, includePasteAllInPopup: l2 = true, disabled: i2 = false, ...s2 } = e2, c2 = na((e3, t3) => {
632
632
  const o3 = { variant: oa.Menuitem, commandHook: a2, scope: "paste", disabled: i2 }, n3 = [];
633
- return l2 && (n3.push(F(le, { ...o3, command: t3.getCommand("paste"), key: "paste", icon: x(Bt, {}) })), n3.push(x(ie, { orientation: "horizontal" }, "paste-div"))), n3.push(F(le, { ...o3, command: t3.getCommand("pasteValues"), key: "pasteValues", icon: re(x(Nt, {})) })), n3.push(F(le, { ...o3, command: t3.getCommand("pasteFormats"), key: "pasteFormats", icon: re(x(Et, {})) })), n3.push(F(le, { ...o3, command: t3.getCommand("pasteFormulas"), key: "pasteFormulas", icon: re(x(At, {})) })), n3.push(F(le, { ...o3, command: t3.getCommand("pasteTranspose"), key: "pasteTranspose", icon: re(x(It, {})) })), n3.push(F(le, { ...o3, command: t3.getCommand("pasteLinks"), key: "pasteLinks", icon: re(x(Lt, {})) })), ce({ ...e3, children: n3 });
633
+ return l2 && (n3.push(F(le, { ...o3, command: t3.getCommand("paste"), key: "paste", icon: x(Bt, {}) })), n3.push(x(ie, { orientation: "horizontal" }, "paste-div"))), n3.push(F(le, { ...o3, command: t3.getCommand("pasteValues"), key: "pasteValues", icon: re(x(Nt, {})) })), n3.push(F(le, { ...o3, command: t3.getCommand("pasteFormats"), key: "pasteFormats", icon: re(x(Et, {})) })), n3.push(F(le, { ...o3, command: t3.getCommand("pasteFormulas"), key: "pasteFormulas", icon: re(x(At, {})) })), n3.push(F(le, { ...o3, command: t3.getCommand("pasteTranspose"), key: "pasteTranspose", icon: re(x(It, {})) })), n3.push(F(le, { ...o3, command: t3.getCommand("pasteLinks"), key: "pasteLinks", icon: re(x(Lt, {})) })), de({ ...e3, children: n3 });
634
634
  }, [i2, a2, r2, l2]);
635
- return x(me, { ref: t2, commands: n2, commandHook: a2, scope: r2, createPopupPanel: d2, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", icon: x(Bt, {}), ...s2 });
635
+ return x(me, { ref: t2, commands: n2, commandHook: a2, scope: r2, createPopupPanel: c2, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", icon: x(Bt, {}), ...s2 });
636
636
  })), _r = k(S((e2, t2) => {
637
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = ta(o2, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), d2 = v((e3, t3) => {
637
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = ta(o2, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), c2 = v((e3, t3) => {
638
638
  const o3 = { variant: oa.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, 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
- return ce({ ...e3, children: l3 });
639
+ return de({ ...e3, children: l3 });
640
640
  }, [r2, n2, a2]);
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 });
641
+ return x(me, { ref: t2, parentFloat: l2, quickCommand: s2[0]?.key(), commands: o2, commandHook: n2, createPopupPanel: c2, 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
642
  })), qr = k(S((e2, t2) => {
643
643
  const { commands: o2, commandHook: n2, scope: a2 = "view", disabled: r2 = false, ...l2 } = e2, i2 = v((e3) => {
644
644
  const t3 = { variant: oa.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, 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
- return ce({ ...e3, children: l3 });
645
+ return de({ ...e3, children: l3 });
646
646
  }, [r2, o2, n2, a2]);
647
647
  return x(me, { ref: t2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Workbook View", tooltip: "Options to configure how the workbook is displayed.", createPopupPanel: i2, icon: x(ht, { icon: null, label: "Workbook View" }), ...l2 });
648
648
  })), Kr = k(S((e2, t2) => {
649
- const { value: o2, cellStyle: n2, styles: a2, createTemporaryCell: r2, bodyStyle: l2, sx: i2, borderProps: s2, disabled: c2, ...m2 } = e2, p2 = C(() => r2({ value: o2, style: n2 }), [o2, n2, r2]), 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(Ta, { 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 }) }) }) });
649
+ const { value: o2, cellStyle: n2, styles: a2, createTemporaryCell: r2, bodyStyle: l2, sx: i2, borderProps: s2, disabled: d2, ...m2 } = e2, p2 = C(() => r2({ value: o2, style: n2 }), [o2, n2, r2]), 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: d2 ? "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: c.toCSSHorizontalTextAlign(p2.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...i2 }, ...m2, children: x(Ta, { 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
651
  })), Xr = k((e2) => {
652
- const { styles: t2, namedStyle: o2, selectedNamed: n2, hasContextMenu: a2 = true, bodyStyle: r2, onSelectNamed: l2, createTemporaryCell: i2, parentFloat: d2, commands: c2, disabled: m2, commandHook: p2, ...u2 } = e2, g2 = v((e3) => {
653
- const t3 = { variant: oa.Menuitem, commandHook: p2, context: "cellStyle" }, n3 = b(y, { children: [x(le, { ...t3, sx: { fontWeight: 550 }, command: c2.getCommand("formatCellStyle"), commandState: o2, disabled: m2, icon: re(x(Wt, {})) }), 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 }) }) });
652
+ const { styles: t2, namedStyle: o2, selectedNamed: n2, hasContextMenu: a2 = true, bodyStyle: r2, onSelectNamed: l2, createTemporaryCell: i2, parentFloat: c2, commands: d2, disabled: m2, commandHook: p2, ...u2 } = e2, g2 = v((e3) => {
653
+ const t3 = { variant: oa.Menuitem, commandHook: p2, context: "cellStyle" }, n3 = b(y, { children: [x(le, { ...t3, sx: { fontWeight: 550 }, command: d2.getCommand("formatCellStyle"), commandState: o2, disabled: m2, icon: re(x(Wt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: d2.getCommand("modifyCellStyle"), commandState: { named: o2 } }), x(le, { ...t3, command: d2.getCommand("deleteCellStyle"), commandState: o2, disabled: m2 || o2?.getName() === s.BuiltInName.Normal })] });
654
+ return de({ ...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 }) }) });
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
658
  }, ...u2, children: x(Kr, { value: o2.getName(), cellStyle: { named: o2.getName() }, styles: t2, createTemporaryCell: i2, bodyStyle: r2 }) }, o2.getName());
659
- return a2 && (f2 = x($t, { label: o2.getName(), parentFloat: d2, createPopupPanel: g2, children: f2 })), f2;
659
+ return a2 && (f2 = x($t, { label: o2.getName(), parentFloat: c2, createPopupPanel: g2, children: f2 })), f2;
660
660
  }), Zr = k(S((e2, t2) => {
661
- const { commands: o2, command: n2, commandHook: a2, selectedNamed: l2, onSelectNamed: i2, disabled: d2 = false, bodyStyle: c2, usePreviewIcon: m2 = true, ...p2 } = e2;
661
+ const { commands: o2, command: n2, commandHook: a2, selectedNamed: l2, onSelectNamed: i2, disabled: c2 = false, bodyStyle: d2, usePreviewIcon: m2 = true, ...p2 } = e2;
662
662
  la(n2);
663
- const u2 = n2?.context(), g2 = u2?.styles, h2 = l2 ?? u2?.named(), f2 = c2 ?? u2?.bodyStyle(), y2 = na((e3) => {
663
+ const u2 = n2?.context(), g2 = u2?.styles, h2 = l2 ?? u2?.named(), f2 = d2 ?? u2?.bodyStyle(), y2 = na((e3) => {
664
664
  i2?.(e3), n2?.execute(e3, a2);
665
665
  }, [n2, i2, a2]), w2 = v((e3, t3) => {
666
666
  const n3 = { onSelectNamed: y2, styles: g2(), parentFloat: e3.floatReference }, r2 = g2().getCustomNamed(), l3 = /* @__PURE__ */ new Map(), i3 = [];
667
667
  for (let e4 = 0; e4 < r2.length; e4++) l3.set(r2[e4].getName(), r2[e4]), null === g2().getNamed(r2[e4].getName()).getBuiltInID() && i3.push(r2[e4].getName());
668
- const c3 = (e4) => {
668
+ const d3 = (e4) => {
669
669
  let t4 = l3.get(e4);
670
670
  return t4 || (t4 = g2().getNamed(e4)), !t4 || t4.isHidden() ? null : x(Xr, { namedStyle: t4, selectedNamed: h2, bodyStyle: u2.bodyStyle(), createTemporaryCell: u2.createTemporaryCell, commands: o2, commandHook: a2, ...n3 }, e4);
671
671
  }, m3 = (e4, t4, o3 = true) => {
672
672
  const n4 = [];
673
673
  for (let e5 = 0; e5 < t4.length; e5++) {
674
- const o4 = c3(t4[e5]);
674
+ const o4 = d3(t4[e5]);
675
675
  o4 && n4.push(o4);
676
676
  }
677
677
  return 0 === n4.length ? null : b(A, { children: [o3 ? x(ie, { orientation: "horizontal" }) : null, x(zt, { children: e4 }, e4 + "-header"), x(A, { 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
- const n4 = c3(t4[e5]);
681
+ const n4 = d3(t4[e5]);
682
682
  n4 && o3.push(n4);
683
683
  }
684
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");
@@ -687,14 +687,14 @@ const Vr = k(S((e2, t2) => {
687
687
  let w3 = [];
688
688
  var k3, S3;
689
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(zt, { 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: oa.Menuitem, commandState: h2, command: t3.getCommand("newCellStyle"), context: "styles", commandHook: a2, disabled: d2, icon: re(x(Ht, {})) })] });
690
+ }, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: f3 }), x(ie, { orientation: "horizontal" }), x(le, { variant: oa.Menuitem, commandState: h2, command: t3.getCommand("newCellStyle"), context: "styles", commandHook: a2, disabled: c2, icon: re(x(Ht, {})) })] });
691
691
  }, [h2, g2?.().getTheme(), f2]), k2 = na((e3) => {
692
692
  const t3 = 18 / r.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(Kr, { 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: {} }) : re(x(Wt, {})), [h2, f2, S2]);
694
+ }, [u2?.createTemporaryCell]), S2 = c2 || !n2 || n2.disabled(), T2 = C(() => u2 && m2 ? x(Kr, { 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: {} }) : re(x(Wt, {})), [h2, f2, S2]);
695
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
696
  })), Jr = "_sheetxl-reset_ods65_1", Yr = 10, Qr = k(S((e2, t2) => {
697
- const { styles: o2, table: n2, tableStyle: a2 = n2?.getStyle() ?? o2.getDefaultTableStyle(), bodyStyle: r2, sx: l2, disabled: i2, className: s2, forceThinBorder: d2, cellHeight: m2 = Yr, isLive: p2 = false, ...u2 } = e2, g2 = Math.ceil(1.3 * m2), [h2, f2] = B((e3) => e3 + 1, 0);
697
+ const { styles: o2, table: n2, tableStyle: a2 = n2?.getStyle() ?? o2.getDefaultTableStyle(), bodyStyle: r2, sx: l2, disabled: i2, className: s2, forceThinBorder: c2, cellHeight: m2 = Yr, isLive: p2 = false, ...u2 } = e2, g2 = Math.ceil(1.3 * m2), [h2, f2] = B((e3) => e3 + 1, 0);
698
698
  P(() => {
699
699
  if (p2 && n2) return n2.addListeners({ onAnyChange: () => {
700
700
  f2();
@@ -703,7 +703,7 @@ const Vr = k(S((e2, t2) => {
703
703
  const b2 = C(() => {
704
704
  let e3 = n2?.toJSON() ?? {};
705
705
  const t3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
706
- return e3 && (e3.styleOptions = { ...e3.styleOptions, name: a2.getName() }), e3.ref = t3, new c({ initialAnchor: t3, json: e3, styles: o2 });
706
+ return e3 && (e3.styleOptions = { ...e3.styleOptions, name: a2.getName() }), e3.ref = t3, new d({ initialAnchor: t3, json: e3, styles: o2 });
707
707
  }, [h2, n2, a2, o2]), y2 = C(() => {
708
708
  const e3 = [];
709
709
  for (let t3 = 0; t3 < 5; t3++) for (let o3 = 0; o3 < 5; o3++) {
@@ -727,13 +727,13 @@ const Vr = k(S((e2, t2) => {
727
727
  }
728
728
  return t3;
729
729
  }, [b2, a2, r2]), k2 = v((e3, t3) => y2[t3].getBorder() ?? null, [y2]);
730
- return x(A, { ref: t2, className: "table-format-preview", sx: { background: r2?.fill, filter: i2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .styled-element": { position: "absolute" }, ...l2 }, ...u2, children: x(Ta, { getBorderAt: k2, rowCount: 5, columnCount: 5, forceThinBorder: d2, width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1, darkMode: r2?.darkMode ?? false, style: { pointerEvents: "none" }, children: x("table", { className: In(s2, "sheetxl-table-preview", Jr), style: { borderCollapse: "collapse", width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1 }, children: x("tbody", { children: w2 }) }) }) });
730
+ return x(A, { ref: t2, className: "table-format-preview", sx: { background: r2?.fill, filter: i2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .styled-element": { position: "absolute" }, ...l2 }, ...u2, children: x(Ta, { getBorderAt: k2, rowCount: 5, columnCount: 5, forceThinBorder: c2, width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1, darkMode: r2?.darkMode ?? false, style: { pointerEvents: "none" }, children: x("table", { className: In(s2, "sheetxl-table-preview", Jr), style: { borderCollapse: "collapse", width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1 }, children: x("tbody", { children: w2 }) }) }) });
731
731
  })), el = (e2, t2, o2, n2, a2) => {
732
732
  e2.beginPath(), e2.moveTo(t2 + 0.5, o2 + 0.5), e2.lineTo(n2 + 0.5, a2 + 0.5), e2.stroke();
733
733
  }, tl = k(S((e2, t2) => {
734
- const { table: o2, tableStyle: n2, styles: a2, bodyStyle: r2, disabled: l2, style: i2, className: s2, canvas: d2, ...p2 } = e2, u2 = C(() => {
734
+ const { table: o2, tableStyle: n2, styles: a2, bodyStyle: r2, disabled: l2, style: i2, className: s2, canvas: c2, ...p2 } = e2, u2 = C(() => {
735
735
  const e3 = o2.toJSON(), t3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
736
- return e3.styleOptions = { ...e3.styleOptions, name: n2.getName() }, e3.ref = t3, new c({ initialAnchor: t3, json: e3, styles: a2 });
736
+ return e3.styleOptions = { ...e3.styleOptions, name: n2.getName() }, e3.ref = t3, new d({ initialAnchor: t3, json: e3, styles: a2 });
737
737
  }, [o2, n2, a2]), g2 = C(() => {
738
738
  const e3 = [];
739
739
  for (let t3 = 0; t3 < 5; t3++) for (let o3 = 0; o3 < 5; o3++) {
@@ -742,8 +742,8 @@ const Vr = k(S((e2, t2) => {
742
742
  }
743
743
  return e3;
744
744
  }, [u2]), h2 = C(() => {
745
- let e3 = d2;
746
- if (d2 || (e3 = document.createElement("canvas")), !e3) return null;
745
+ let e3 = c2;
746
+ if (c2 || (e3 = document.createElement("canvas")), !e3) return null;
747
747
  61 !== e3.width && (e3.width = 61), 46 !== e3.height && (e3.height = 46);
748
748
  const t3 = e3.getContext("2d", { alpha: false });
749
749
  if (!t3) return null;
@@ -752,8 +752,8 @@ const Vr = k(S((e2, t2) => {
752
752
  const l3 = g2[5 * e4 + a3].getFill();
753
753
  let i3 = r2?.fill;
754
754
  l3.getType() === m.Type.Solid ? i3 = l3.getColor().toCSS(n3, false) : l3.getType() === m.Type.Gradient ? i3 = l3.getStops[0]?.color.toCSS(n3, false) : l3.getType() === m.Type.Pattern && (i3 = l3.getForeground().toCSS(n3, false)), t3.fillStyle = i3;
755
- const s3 = a3 * o3, d3 = 9 * e4;
756
- t3.fillRect(s3, d3, 13, 10);
755
+ const s3 = a3 * o3, c3 = 9 * e4;
756
+ t3.fillRect(s3, c3, 13, 10);
757
757
  }
758
758
  t3.lineWidth = 1;
759
759
  for (let e4 = 0; e4 < 5; e4++) for (let a3 = 0; a3 < 5; a3++) {
@@ -763,21 +763,21 @@ const Vr = k(S((e2, t2) => {
763
763
  a4.isNone() || (t3.strokeStyle = a4.getColor().toCSS(n3, false), el(t3, l3, i3, l3, i3 + 9));
764
764
  const r4 = s3.getTop();
765
765
  r4.isNone() || (t3.strokeStyle = r4.getColor().toCSS(n3, false), el(t3, l3, i3, l3 + o3, 9 * e4));
766
- const d4 = s3.getRight();
767
- d4.isNone() || (t3.strokeStyle = d4.getColor().toCSS(n3, false), el(t3, l3 + o3, i3, l3 + o3, i3 + 9));
768
- const c3 = s3.getBottom();
769
- c3.isNone() || (t3.strokeStyle = c3.getColor().toCSS(n3, false), el(t3, l3, i3 + 9, l3 + o3, i3 + 9));
766
+ const c4 = s3.getRight();
767
+ c4.isNone() || (t3.strokeStyle = c4.getColor().toCSS(n3, false), el(t3, l3 + o3, i3, l3 + o3, i3 + 9));
768
+ const d3 = s3.getBottom();
769
+ d3.isNone() || (t3.strokeStyle = d3.getColor().toCSS(n3, false), el(t3, l3, i3 + 9, l3 + o3, i3 + 9));
770
770
  }
771
771
  t3.strokeStyle = r3.getFont().getFill().toCSS(n3, false);
772
- const d3 = 4, c2 = 2.5;
773
- el(t3, a3 * o3 + c2, 9 * e4 + d3, a3 * o3 + c2 + 7, 9 * e4 + d3);
772
+ const c3 = 4, d2 = 2.5;
773
+ el(t3, a3 * o3 + d2, 9 * e4 + c3, a3 * o3 + d2 + 7, 9 * e4 + c3);
774
774
  }
775
775
  return `url(${e3.toDataURL()})`;
776
- }, [d2, u2, n2, r2]);
776
+ }, [c2, u2, n2, r2]);
777
777
  return x("div", { ref: t2, className: In("table-style-preview", s2), style: { backgroundImage: h2, width: 61, height: 46, ...i2 }, ...p2 });
778
778
  })), ol = k(S((e2, t2) => {
779
- const { styleOptions: o2, onStyleOptionsChange: n2, showHeaderRow: a2, onShowHeaderRowChange: r2, 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: [r2 && x(V, { control: x(G, { checked: a2 ?? false, indeterminate: null == a2, onChange: () => r2(!a2), disabled: m2 || null == a2 }), 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: () => {
779
+ const { styleOptions: o2, onStyleOptionsChange: n2, showHeaderRow: a2, onShowHeaderRowChange: r2, showTotalRow: l2, onShowTotalRowChange: i2, showFilterButton: s2, onShowFilterButtonChange: c2, sx: d2, 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)}` }, ...d2 }, ...p2, ref: t2, children: [r2 && x(V, { control: x(G, { checked: a2 ?? false, indeterminate: null == a2, onChange: () => r2(!a2), disabled: m2 || null == a2 }), 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 });
@@ -785,28 +785,28 @@ const Vr = k(S((e2, t2) => {
785
785
  n2?.({ ...o2, showLastColumn: !o2?.showLastColumn });
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
- } }), 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" })] });
788
+ } }), label: "Banded Columns", labelPlacement: "end" }), c2 && x(V, { control: x(G, { checked: s2 ?? false, indeterminate: null == s2, disabled: m2 || !o2 || null == s2, onChange: () => c2(!s2) }), label: "Filter Button", labelPlacement: "end" })] });
789
789
  })), nl = k((e2) => {
790
- const { table: t2, tableStyle: o2, selectedTableStyleName: n2, onSelectTableStyleName: a2, styles: r2, 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: oa.Menuitem, commandHook: m2, context: "table" }, n3 = b(y, { children: [x(le, { ...t3, command: d2.getCommand("formatTableStyleClearCellStyles"), commandState: o2, disabled: c2, icon: re(x(Wt, {})) }), x(le, { ...t3, sx: { fontWeight: 550 }, command: d2.getCommand("formatTableStyle"), commandState: { name: o2.getName() }, disabled: c2, icon: re(x(Wt, {})) }), 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 }) }) });
793
- }, [d2]), f2 = o2?.getName() === n2, w2 = C(() => {
790
+ const { table: t2, tableStyle: o2, selectedTableStyleName: n2, onSelectTableStyleName: a2, styles: r2, hasContextMenu: l2 = true, bodyStyle: i2, parentFloat: s2, commands: c2, disabled: d2, commandHook: m2, useCanvasPreview: p2 = true, canvas: u2, ...g2 } = e2, h2 = v((e3) => {
791
+ const t3 = { variant: oa.Menuitem, commandHook: m2, context: "table" }, n3 = b(y, { children: [x(le, { ...t3, command: c2.getCommand("formatTableStyleClearCellStyles"), commandState: o2, disabled: d2, icon: re(x(Wt, {})) }), x(le, { ...t3, sx: { fontWeight: 550 }, command: c2.getCommand("formatTableStyle"), commandState: { name: o2.getName() }, disabled: d2, icon: re(x(Wt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: c2.getCommand("setDefaultTableStyle"), commandState: o2.getName(), disabled: d2 }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: c2.getCommand("deleteTableStyle"), commandState: o2?.getName(), disabled: d2 || !o2 || o2.isBuiltIn() })] });
792
+ return de({ ...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 }) }) });
793
+ }, [c2]), f2 = o2?.getName() === n2, w2 = C(() => {
794
794
  const e3 = { table: t2, tableStyle: o2, styles: r2, bodyStyle: i2 };
795
795
  return p2 ? x(tl, { canvas: u2, ...e3 }) : x(Qr, { ...e3 });
796
796
  }, [t2, o2, r2, 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 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: d2, icon: null, onClick: () => {
798
798
  a2?.(o2?.getName());
799
799
  }, ...g2, children: w2 }, o2.getName());
800
800
  return l2 && (k2 = x($t, { label: t2.getStyleOptions().name, parentFloat: s2, createPopupPanel: h2, children: k2 })), k2;
801
801
  }), al = k(S((e2, t2) => {
802
- const { commands: o2, command: n2, commandHook: a2, selectedTable: r2, onSelectTableStyleName: l2, disabled: i2 = false, bodyStyle: s2, usePreviewIcon: d2 = false, ...m2 } = e2;
802
+ const { commands: o2, command: n2, commandHook: a2, selectedTable: r2, onSelectTableStyleName: l2, disabled: i2 = false, bodyStyle: s2, usePreviewIcon: c2 = false, ...m2 } = e2;
803
803
  la(n2);
804
804
  const p2 = n2?.context(), u2 = p2?.styles, g2 = r2 ?? 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
- return new c({ initialAnchor: o3, styles: t3, json: { name: "PreviewTable", ref: o3, description: "PreviewTable", headerRowCount: 1, totalsRowCount: 0, styleOptions: e3 } });
809
+ return new d({ initialAnchor: o3, styles: t3, json: { name: "PreviewTable", ref: o3, description: "PreviewTable", headerRowCount: 1, totalsRowCount: 0, styleOptions: e3 } });
810
810
  })(g2?.getStyleOptions(), u2?.()), [u2?.().getDefaultTableStyle(), g2?.getStyleOptions()]), w2 = g2 ?? f2, [k2, S2] = D(w2);
811
811
  P(() => {
812
812
  S2(w2);
@@ -826,15 +826,15 @@ const Vr = k(S((e2, t2) => {
826
826
  o5 && a3.push(o5);
827
827
  }
828
828
  return 0 === a3.length ? null : b(A, { children: [o4 ? x(ie, { orientation: "horizontal" }) : null, x(zt, { children: e4 }, e4 + "-header"), x(A, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "481px", maxWidth: "100%" }, children: a3 }, e4 + "-presets")] }, e4);
829
- }, l3 = [], s3 = u2().getCustomTableStyles(), d3 = [];
829
+ }, l3 = [], s3 = u2().getCustomTableStyles(), c3 = [];
830
830
  if (s3.length > 0) {
831
- for (let e4 = 0; e4 < s3.length; e4++) s3[e4].isShownInTableStyles() && d3.push(s3[e4].getName());
832
- l3.push(r3("Custom", d3, false));
831
+ for (let e4 = 0; e4 < s3.length; e4++) s3[e4].isShownInTableStyles() && c3.push(s3[e4].getName());
832
+ l3.push(r3("Custom", c3, false));
833
833
  }
834
- const c2 = [];
835
- g2 && !g2.getStyleOptions().name && c2.push(null);
836
- for (let e4 = 0; e4 < 21; e4++) c2.push("TableStyleLight" + (e4 + 1));
837
- l3.push(r3("Light", c2, d3.length > 0));
834
+ const d2 = [];
835
+ g2 && !g2.getStyleOptions().name && d2.push(null);
836
+ for (let e4 = 0; e4 < 21; e4++) d2.push("TableStyleLight" + (e4 + 1));
837
+ l3.push(r3("Light", d2, c3.length > 0));
838
838
  const m3 = [];
839
839
  for (let e4 = 0; e4 < 28; e4++) m3.push("TableStyleMedium" + (e4 + 1));
840
840
  l3.push(r3("Medium", m3));
@@ -845,13 +845,13 @@ const Vr = k(S((e2, t2) => {
845
845
  return g2 && (f3 = b(y, { children: [x(ie, { orientation: "horizontal" }), x(le, { variant: oa.Menuitem, command: t3.getCommand("formatTableStyleClearTableStyle"), commandHook: a2, disabled: i2, icon: re(x(rt, {})) })] })), 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: () => {
846
846
  }, sx: { display: "flex", flexDirection: "column", padding: "6px 16px" }, children: l3 }), f3] });
847
847
  }, [u2, u2?.().getTheme(), T2, k2]), N2 = i2 || !n2 || n2.disabled(), E2 = C(() => {
848
- if (!p2 || !d2) return re(x(Wt, {}));
848
+ if (!p2 || !c2) return re(x(Wt, {}));
849
849
  }, [k2, T2, N2]);
850
850
  return x(me, { ref: t2, quickCommand: h2, createPopupPanel: B2, commands: o2, label: n2?.label(), commandState: g2, commandHook: a2, 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
851
  })), rl = [];
852
852
  rl.push(gr("Primary Background", "bg1")), rl.push(gr("Primary Text", "tx1")), rl.push(gr("Secondary Background", "bg2")), rl.push(gr("Secondary Text", "tx2")), rl.push(gr("Accent 1", "accent1")), rl.push(gr("Accent 2", "accent2")), rl.push(gr("Accent 3", "accent3")), rl.push(gr("Accent 4", "accent4")), rl.push(gr("Accent 5", "accent5")), rl.push(gr("Accent 6", "accent6"));
853
853
  const ll = (e2) => {
854
- const { docTheme: t2, onSelectTheme: o2, darkMode: n2, isSelected: a2, outlined: r2, sx: l2, ...i2 } = e2, s2 = wa(), d2 = C(() => {
854
+ const { docTheme: t2, onSelectTheme: o2, darkMode: n2, isSelected: a2, outlined: r2, sx: l2, ...i2 } = e2, s2 = wa(), c2 = C(() => {
855
855
  let e3 = [];
856
856
  for (let o3 = 0; o3 < rl.length; o3++) {
857
857
  const a3 = rl[o3];
@@ -859,16 +859,16 @@ const ll = (e2) => {
859
859
  }
860
860
  return x(A, { sx: { display: "flex", flexDirection: "row", flex: "none" }, children: x(A, { 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 ${a2 ? 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) => a2 ? 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 ${a2 ? 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) => a2 ? 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: [c2, 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.
863
863
  The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bottom-start", children: x("div", { children: t2.getFontScheme().getMinorFont() }) }) })] })] }) });
864
864
  }, il = k(S((e2, t2) => {
865
- const { themes: o2, selectedTheme: n2, onSelectTheme: a2, sx: r2, disabled: l2 = false, darkMode: i2, ...s2 } = e2, d2 = C(() => {
865
+ const { themes: o2, selectedTheme: n2, onSelectTheme: a2, sx: r2, disabled: l2 = false, darkMode: i2, ...s2 } = e2, c2 = C(() => {
866
866
  const e3 = o2?.getItems({ selected: n2 }) ?? [], t3 = [];
867
867
  if (0 === e3.length) return x(zt, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "6px", paddingBottom: "6px" }, children: "No themes" });
868
868
  const r3 = e3.length;
869
869
  for (let o3 = 0; o3 < r3; o3++) {
870
- const r4 = e3[o3], s3 = n2 && r4?.getName() === n2.getName(), d3 = e3[o3 + 1];
871
- d3 && d3.isCustom() !== r4.isCustom() && t3.push(x(ie, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${o3}`)), t3.push(x(ll, { docTheme: r4, onSelectTheme: () => a2(r4), isSelected: s3, disabled: l2, darkMode: i2, onMouseDown: (e4) => {
870
+ const r4 = e3[o3], s3 = n2 && r4?.getName() === n2.getName(), c3 = e3[o3 + 1];
871
+ c3 && c3.isCustom() !== r4.isCustom() && t3.push(x(ie, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${o3}`)), t3.push(x(ll, { docTheme: r4, onSelectTheme: () => a2(r4), isSelected: s3, disabled: l2, darkMode: i2, onMouseDown: (e4) => {
872
872
  0 === e4.button && e4.preventDefault();
873
873
  }, onMouseUp: (e4) => {
874
874
  0 === e4.button && a2(r4);
@@ -878,53 +878,53 @@ The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bot
878
878
  }
879
879
  return t3;
880
880
  }, [n2, a2, i2]);
881
- 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(zt, { 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
+ 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(zt, { 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: c2 })] }) });
882
882
  })), sl = k(S((e2, t2) => {
883
- const { themes: o2, selectedTheme: n2, onSelectTheme: a2, icon: r2, tooltip: l2, label: i2, variant: s2 = Re.Toolbar, darkMode: d2, panelProps: c2, ...m2 } = e2, p2 = r2 || re(x(Ot, {})), u2 = { createPopupPanel: v((e3) => {
883
+ const { themes: o2, selectedTheme: n2, onSelectTheme: a2, icon: r2, tooltip: l2, label: i2, variant: s2 = Re.Toolbar, darkMode: c2, panelProps: d2, ...m2 } = e2, p2 = r2 || re(x(Ot, {})), u2 = { createPopupPanel: v((e3) => {
884
884
  const { closeFloatAll: t3 } = e3;
885
- return x(il, { ...c2, themes: o2, selectedTheme: n2, onSelectTheme: a2, darkMode: d2, onKeyDown: (e4) => {
885
+ return x(il, { ...d2, themes: o2, selectedTheme: n2, onSelectTheme: a2, darkMode: c2, onKeyDown: (e4) => {
886
886
  e4.which === ra.Enter && t3();
887
887
  } });
888
- }, [o2, n2, a2, c2, d2]), tooltip: l2 || i2 || "Theme", label: i2, icon: p2, ...m2 };
888
+ }, [o2, n2, a2, d2, c2]), tooltip: l2 || i2 || "Theme", label: i2, icon: p2, ...m2 };
889
889
  return s2 === Re.Toolbar ? x(Me, { ref: t2, ...u2 }) : x(Fe, { ref: t2, ...u2 });
890
- })), dl = k(S((e2, t2) => {
891
- const { command: o2, commandHook: n2, selectedTheme: a2, onSelectTheme: r2, disabled: l2 = false, darkMode: i2, label: s2, icon: d2, variant: c2, ...m2 } = e2;
890
+ })), cl = k(S((e2, t2) => {
891
+ const { command: o2, commandHook: n2, selectedTheme: a2, onSelectTheme: r2, disabled: l2 = false, darkMode: i2, label: s2, icon: c2, variant: d2, ...m2 } = e2;
892
892
  la(o2);
893
893
  const p2 = o2?.context()?.themes, u2 = a2 || o2?.context()?.theme, g2 = i2 ?? o2?.context()?.darkMode, h2 = l2 || o2?.disabled(), f2 = na((e3) => {
894
894
  r2?.(e3), o2?.execute(e3, n2);
895
895
  }, [r2, n2]), b2 = v((e3, t3) => {
896
896
  const { children: n3, title: a3, ...r3 } = e3;
897
897
  let l3 = e3.children;
898
- return (h2 || t3) && (l3 = x("div", { children: l3 })), x(We, { command: o2, placement: c2 === oa.Toolbar ? "bottom-start" : "right-start", disabled: h2 || t3, ...r3, children: l3 });
898
+ return (h2 || t3) && (l3 = x("div", { children: l3 })), x(We, { command: o2, placement: d2 === oa.Toolbar ? "bottom-start" : "right-start", disabled: h2 || t3, ...r3, children: l3 });
899
899
  }, [o2, h2]);
900
- return x(sl, { ref: t2, themes: p2, selectedTheme: u2, onSelectTheme: f2, variant: c2 === oa.Menuitem ? Re.Menuitem : Re.Toolbar, createTooltip: b2, disabled: h2, darkMode: g2, icon: re(x(Ot, {})), ...m2 });
901
- })), cl = k(S((e2, t2) => {
902
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ta(o2, ["themeMode"])[0], s2 = i2?.state(), d2 = null !== i2?.state(), c2 = U("(prefers-color-scheme: dark)"), m2 = "dark" === s2 || null === s2 && c2, p2 = na((e3, t3) => {
903
- const o3 = { variant: oa.Menuitem, commandHook: n2, scope: "appearance", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: i2, icon: re(x(m2 ? On : Vn, {})) }), x(le, { ...o3, command: t3.getCommand("defaultThemeMode"), icon: re(x(c2 ? Vt : Gt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("enableDarkGrid") }), x(le, { ...o3, command: t3.getCommand("enableDarkImages") })] });
904
- return ce({ ...e3, children: a3 });
905
- }, [r2, i2, n2, a2, c2, s2, d2]);
900
+ return x(sl, { ref: t2, themes: p2, selectedTheme: u2, onSelectTheme: f2, variant: d2 === oa.Menuitem ? Re.Menuitem : Re.Toolbar, createTooltip: b2, disabled: h2, darkMode: g2, icon: re(x(Ot, {})), ...m2 });
901
+ })), dl = k(S((e2, t2) => {
902
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ta(o2, ["themeMode"])[0], s2 = i2?.state(), c2 = null !== i2?.state(), d2 = U("(prefers-color-scheme: dark)"), m2 = "dark" === s2 || null === s2 && d2, p2 = na((e3, t3) => {
903
+ const o3 = { variant: oa.Menuitem, commandHook: n2, scope: "appearance", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: i2, icon: re(x(m2 ? On : Vn, {})) }), x(le, { ...o3, command: t3.getCommand("defaultThemeMode"), icon: re(x(d2 ? Vt : Gt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("enableDarkGrid") }), x(le, { ...o3, command: t3.getCommand("enableDarkImages") })] });
904
+ return de({ ...e3, children: a3 });
905
+ }, [r2, i2, n2, a2, d2, s2, c2]);
906
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: () => {
907
907
  i2?.execute(m2 ? "light" : "dark", n2);
908
- }, selected: d2, icon: re(x(m2 ? On : Vn, {})), ...l2 });
908
+ }, selected: c2, icon: re(x(m2 ? On : Vn, {})), ...l2 });
909
909
  })), ml = k(S((e2, t2) => {
910
910
  const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, sx: l2, ...i2 } = e2, s2 = v((e3, t3) => {
911
911
  const o3 = { variant: oa.Menuitem, scope: "help", commandHook: { ...n2, beforeExecute: (t4, o4) => {
912
912
  const a4 = n2?.beforeExecute?.(t4, o4);
913
913
  return false !== a4 && e3.floatReference.closeAll();
914
914
  } }, disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("showKeyboardShortcuts"), icon: re(x(Gn, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("gotoUrlGithub"), icon: re(x(Ut, {})) }), x(le, { ...o3, command: t3.getCommand("gotoUrlDiscord"), icon: re(x(jt, {})) }), x(le, { ...o3, command: t3.getCommand("gotoUrlDocumentation"), icon: re(x(_t, {})) }), x(le, { ...o3, command: t3.getCommand("gotoUrlIssue"), icon: re(x(qt, {})) })] });
915
- return ce({ ...e3, children: a3 });
915
+ return de({ ...e3, children: a3 });
916
916
  }, [r2, n2]);
917
917
  return x(me, { ref: t2, sx: l2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Help", tooltip: "Help, feedback, and keyboard shortcuts.", createPopupPanel: s2, icon: re(x(Kt, { sx: { transform: "scale(0.75)" } })), ...i2 });
918
918
  })), pl = k(S((e2, t2) => {
919
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, preferSingleMenu: l2 = true, showQuickButton: i2 = true, variant: s2 = oa.Toolbar, ...d2 } = e2, c2 = ta(o2, ["insertImageFromFile", "insertImageFromURL"]), { singleMenuCommand: m2, allDisabled: p2 } = C(() => {
919
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, preferSingleMenu: l2 = true, showQuickButton: i2 = true, variant: s2 = oa.Toolbar, ...c2 } = e2, d2 = ta(o2, ["insertImageFromFile", "insertImageFromURL"]), { singleMenuCommand: m2, allDisabled: p2 } = C(() => {
920
920
  let e3 = null, t3 = 0;
921
- for (let o3 = 0; o3 < c2.length; o3++) c2[o3] && !c2[o3]?.disabled() && (l2 && s2 === oa.Menuitem && (e3 = 0 === t3 ? c2[o3] : null), t3++);
921
+ for (let o3 = 0; o3 < d2.length; o3++) d2[o3] && !d2[o3]?.disabled() && (l2 && s2 === oa.Menuitem && (e3 = 0 === t3 ? d2[o3] : null), t3++);
922
922
  return { singleMenuCommand: e3, allDisabled: 0 === t3 };
923
- }, [c2]), u2 = v((e3, t3) => {
923
+ }, [d2]), u2 = v((e3, t3) => {
924
924
  const o3 = { variant: oa.Menuitem, commandHook: n2, scope: "insertImage", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("insertImageFromFile"), icon: re(x(Xt, {})) }), x(le, { ...o3, command: t3.getCommand("insertImageFromURL"), icon: re(x(Xt, {})) })] });
925
- return ce({ ...e3, children: a3 });
925
+ return de({ ...e3, children: a3 });
926
926
  }, [r2, n2, a2]);
927
- return m2 ? x(le, { ref: t2, variant: s2, commandHook: n2, disabled: r2, command: m2, icon: re(x(Xt, {})), ...d2 }) : x(me, { ref: t2, variant: s2, quickCommand: "insertImageFromFile", commands: o2, commandHook: n2, scope: a2, disabled: r2 || p2, tooltip: "Insert a picture from the web to complement your data.", createPopupPanel: u2, icon: re(x(Xt, {})), ...d2 });
927
+ return m2 ? x(le, { ref: t2, variant: s2, commandHook: n2, disabled: r2, command: m2, icon: re(x(Xt, {})), ...c2 }) : x(me, { ref: t2, variant: s2, quickCommand: "insertImageFromFile", commands: o2, commandHook: n2, scope: a2, disabled: r2 || p2, tooltip: "Insert a picture from the web to complement your data.", createPopupPanel: u2, icon: re(x(Xt, {})), ...c2 });
928
928
  })), ul = k(S((e2, t2) => {
929
929
  const { command: o2, ...n2 } = e2, a2 = ia(), [r2, l2] = D(false), [i2, s2] = D("info");
930
930
  return P(() => {
@@ -946,44 +946,55 @@ The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bot
946
946
  } });
947
947
  }));
948
948
  gl.displayName = "InsertFunctionSumCommandPopupButton";
949
- const hl = new Map([{ key: "financial", label: "Financial", icon: x(to, {}) }, { key: "logical", label: "Logical", icon: x(oo, {}) }, { key: "text", label: "Text", icon: x(no, {}) }, { key: "dateTime", label: "Date & Time", categories: ["date", "time"], icon: x(ao, {}) }, { key: "lookupReference", label: "Lookup & Reference", categories: ["lookup", "reference"], icon: x(ro, {}) }, { key: "mathTrig", label: "Math & Trig", categories: ["math", "trig"], icon: x(lo, {}) }, { key: "statDist", label: "Statistical", categories: ["stat", "dist"], icon: x(io, {}) }, { key: "engineering", label: "Engineering", categories: ["engineering"], icon: x(so, {}) }, { key: "information", label: "Information", categories: ["information"], icon: x(co, {}) }, { key: "cube", label: "Cube", icon: x(mo, {}) }, { key: "database", label: "Database", icon: x(po, {}) }, { key: "web", label: "Web", icon: x(uo, {}) }, { key: "custom", label: "Custom", icon: x(go, {}) }].map((e2) => [e2.key, e2])), fl = k((e2) => {
950
- const { command: t2, formulaFunction: o2, commandHook: n2, disabled: a2 = false, parentFloat: r2, handleInsert: l2, icon: i2, label: s2, sx: d2, ...c2 } = e2;
951
- return x(Ne, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...d2 }, disabled: a2, onMouseDown: (e3) => {
949
+ const hl = new Map([{ key: "financial", label: "Financial", icon: x(to, {}) }, { key: "logical", label: "Logical", icon: x(oo, {}) }, { key: "text", label: "Text", icon: x(no, {}) }, { key: "dateTime", label: "Date & Time", categories: ["date", "time"], icon: x(ao, {}) }, { key: "lookupReference", label: "Lookup & Reference", categories: ["lookup", "reference"], icon: x(ro, {}) }, { key: "mathTrig", label: "Math & Trig", categories: ["math", "trig"], icon: x(lo, {}) }, { key: "statDist", label: "Statistical", categories: ["stat", "dist"], icon: x(io, {}) }, { key: "engineering", label: "Engineering", categories: ["engineering"], icon: x(so, {}) }, { key: "information", label: "Information", categories: ["information"], icon: x(co, {}) }, { key: "cube", label: "Cube", icon: x(mo, {}) }, { key: "database", label: "Database", icon: x(po, {}) }, { key: "web", label: "Web", icon: x(uo, {}) }, { key: "custom", label: "Custom", icon: x(go, {}) }].map((e2) => [e2.key, e2]));
950
+ k((e2) => {
951
+ const { command: t2, formulaFunction: o2, commandHook: n2, disabled: a2 = false, parentFloat: r2, handleInsert: l2, icon: i2, label: s2, sx: c2, ...d2 } = e2;
952
+ return x(Ne, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...c2 }, disabled: a2, onMouseDown: (e3) => {
952
953
  0 === e3.button && e3.preventDefault();
953
954
  }, onMouseUp: (e3) => {
954
955
  0 === e3.button && l2(o2);
955
956
  }, onKeyDown: (e3) => {
956
957
  e3.keyCode === ra.Enter || (e3.keyCode, ra.Space);
957
- }, ...c2, children: x(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: x(I, { component: "div", children: "Formula Function Here" }) }) });
958
- }), xl = k(S((e2, t2) => {
959
- const { category: o2, commands: n2, commandHook: a2, scope: r2, sx: l2, disabled: i2 = false, parentFloat: s2, ...d2 } = e2, c2 = ta(n2, ["insertFunction"])[0], m2 = v((e3, t3) => {
960
- const n3 = (e4) => {
961
- a2?.beforeExecute?.(c2, c2?.state()), c2.execute(e4, a2), a2?.onExecute?.(c2, c2?.state());
962
- }, r3 = c2.context()?.searchByCategory(o2), l3 = [], s3 = r3 ? r3.length : 0;
963
- for (let e4 = 0; e4 < s3; e4++) {
964
- const t4 = r3[e4];
965
- l3.push(x(fl, { formulaFunction: t4, disabled: i2 || !c2 || c2.disabled(), handleSetFormat: n3 }, t4.getName()));
966
- }
967
- const m3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...d2, children: [x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: l3 }), x(ie, { orientation: "horizontal" })] });
968
- return ce({ ...e3, children: m3 });
969
- }, [c2, a2, r2]), p2 = hl.get(o2);
970
- return x(me, { ref: t2, commands: n2, commandHook: a2, createPopupPanel: m2, label: p2.label ?? "Insert Function", tooltip: p2.label, icon: re(hl.get(o2)?.icon ?? x(eo, {})), ...d2 });
958
+ }, ...d2, children: x(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: x(I, { component: "div", children: "Formula Function Here" }) }) });
959
+ });
960
+ const fl = k(S((e2, t2) => {
961
+ const { category: o2, commands: n2, commandHook: a2, scope: r2, sx: l2, disabled: i2 = false, parentFloat: s2, ...c2 } = e2, d2 = ta(n2, ["insertFunction"])[0], m2 = v((e3, t3) => {
962
+ const n3 = x(xl, { category: o2, ...e3, commands: t3 });
963
+ return de({ ...e3, children: n3 });
964
+ }, [o2, d2, a2, r2]), p2 = hl.get(o2);
965
+ return x(me, { ref: t2, commands: n2, commandHook: a2, createPopupPanel: m2, label: p2.label ?? "Insert Function", tooltip: p2.label, icon: re(hl.get(o2)?.icon ?? x(eo, {})), ...c2 });
971
966
  }));
972
- xl.displayName = "InsertFunctionCommandPopupButton";
973
- const bl = k(S((e2, t2) => {
974
- const { disabled: o2, style: n2, className: a2, sx: r2, defaultInput: l2, value: i2, formName: s2, formOptions: d2, onChangeInput: c2, onValidate: m2, onKeyDown: p2, ...u2 } = e2, g2 = $a(), h2 = s2 && g2 ? g2.register(s2, d2) : null, [f2, b2] = D(""), [y2, w2] = D(""), [k2, S2] = D(i2);
967
+ fl.displayName = "InsertFunctionCommandPopupButton";
968
+ const xl = k(S((e2, t2) => {
969
+ const { commands: o2, category: n2, ...a2 } = e2, r2 = ta(o2, ["insertFunction"]), [l2, i2] = D([]), [s2, c2] = D(false);
970
+ P(() => {
971
+ (async () => {
972
+ c2(true);
973
+ const e3 = r2[0]?.context(), t3 = await e3.searchByCategory(n2);
974
+ i2(t3), c2(false);
975
+ })();
976
+ }, []);
977
+ const d2 = { variant: oa.Menuitem, parentFloat: e2.floatReference, scope: "scripts", shortcut: null }, m2 = [], p2 = l2.length;
978
+ for (let e3 = 0; e3 < p2; e3++) {
979
+ const t3 = l2[e3];
980
+ m2.push(x(le, { ...d2, command: o2.getCommand("executeScript"), commandState: { declaration: t3 }, tooltipProps: { description: `Execute ${t3.getName() ?? "macro"}` }, label: t3.getName() ?? `Script '${t3.getName()}'` }, `macro-${t3.getName()}-${e3}`));
981
+ }
982
+ const u2 = b(A, { ref: t2, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [m2.length > 0 ? b(y, { children: [x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: m2 }), x(ie, { orientation: "horizontal" })] }) : null, F(le, { ...d2, key: "show-editor", command: o2.getCommand("showScriptEditor") })] });
983
+ return de({ ...a2, children: u2 });
984
+ })), bl = k(S((e2, t2) => {
985
+ const { disabled: o2, style: n2, className: a2, sx: r2, defaultInput: l2, value: i2, formName: s2, formOptions: c2, onChangeInput: d2, onValidate: m2, onKeyDown: p2, ...u2 } = e2, g2 = $a(), h2 = s2 && g2 ? g2.register(s2, c2) : null, [f2, b2] = D(""), [y2, w2] = D(""), [k2, S2] = D(i2);
975
986
  P(() => {
976
987
  S2(i2), w2("");
977
988
  }, [i2]);
978
989
  const C2 = na((e3) => {
979
990
  let t3 = "";
980
991
  try {
981
- S2(e3), m2?.(e3), c2?.(e3);
992
+ S2(e3), m2?.(e3), d2?.(e3);
982
993
  } catch (e4) {
983
994
  t3 = e4.message ?? "Invalid Name";
984
995
  }
985
996
  s2 && g2 && (t3 ? g2.setError(s2, { message: t3 }) : g2.clearErrors(s2)), w2(t3);
986
- }, [i2, m2, c2]), T2 = na(async (e3) => {
997
+ }, [i2, m2, d2]), T2 = na(async (e3) => {
987
998
  e3.keyCode === ra.Escape && f2 !== i2 && (C2(f2), g2?.setValue(s2, f2), g2?.clearErrors(s2), e3.stopPropagation()), p2?.(e3);
988
999
  }, [p2, f2, i2, g2]), R2 = na((e3) => {
989
1000
  b2(e3.target.value ?? "");
@@ -998,27 +1009,27 @@ const bl = k(S((e2, t2) => {
998
1009
  }));
999
1010
  bl.displayName = "NamedInput";
1000
1011
  const yl = (e2) => null === e2 ? "" : e2.toString(), wl = k(S((e2, t2) => {
1001
- const { formName: o2, formOptions: n2, disabled: a2, style: r2, className: l2, sx: i2, onKeyDown: s2, value: d2, onChangeInput: c2, resolvedAddress: m2, ...p2 } = e2, u2 = $a(), g2 = o2 && u2 ? u2.register(o2, n2) : null, [h2, f2] = D(""), [b2, y2] = D(false), [w2, k2] = D(() => yl(d2));
1012
+ const { formName: o2, formOptions: n2, disabled: a2, style: r2, className: l2, sx: i2, onKeyDown: s2, value: c2, onChangeInput: d2, resolvedAddress: m2, ...p2 } = e2, u2 = $a(), g2 = o2 && u2 ? u2.register(o2, n2) : null, [h2, f2] = D(""), [b2, y2] = D(false), [w2, k2] = D(() => yl(c2));
1002
1013
  P(() => {
1003
- k2(yl(d2)), f2(""), o2 && u2 && u2.clearErrors(o2), y2(false);
1004
- }, [d2]);
1014
+ k2(yl(c2)), f2(""), o2 && u2 && u2.clearErrors(o2), y2(false);
1015
+ }, [c2]);
1005
1016
  const S2 = na((e3) => {
1006
1017
  let t3 = "";
1007
1018
  try {
1008
1019
  k2(e3);
1009
- const t4 = yl(d2), o3 = m2(e3);
1010
- o3.toString() !== t4 && c2?.(o3);
1020
+ const t4 = yl(c2), o3 = m2(e3);
1021
+ o3.toString() !== t4 && d2?.(o3);
1011
1022
  } catch (e4) {
1012
1023
  t3 = "Invalid Range";
1013
1024
  }
1014
1025
  o2 && u2 && (t3 ? u2.setError(o2, { message: t3 }) : u2.clearErrors(o2)), f2(t3), y2(true);
1015
- }, [w2, c2, o2, u2]), T2 = na(async (e3) => {
1026
+ }, [w2, d2, o2, u2]), T2 = na(async (e3) => {
1016
1027
  if (b2 && e3.keyCode === ra.Escape) {
1017
- const t3 = yl(d2);
1028
+ const t3 = yl(c2);
1018
1029
  k2(t3), f2(""), y2(false), e3.stopPropagation();
1019
1030
  }
1020
1031
  s2?.(e3);
1021
- }, [d2, c2, s2, b2]), R2 = na((e3) => {
1032
+ }, [c2, d2, s2, b2]), R2 = na((e3) => {
1022
1033
  g2?.onBlur(e3);
1023
1034
  }, [g2]), M2 = v((e3) => {
1024
1035
  S2(e3.target.value), g2?.onChange(e3);
@@ -1031,23 +1042,23 @@ const yl = (e2) => null === e2 ? "" : e2.toString(), wl = k(S((e2, t2) => {
1031
1042
  }));
1032
1043
  wl.displayName = "RangeInput";
1033
1044
  const kl = k(S((e2, t2) => {
1034
- const { sheet: o2, className: a2, debounceDelay: l2 = 220, sx: i2, ...s2 } = e2, [d2, c2] = D(() => o2.getView().getZoomScale()), [m2, p2] = D(null), u2 = M(0);
1045
+ const { sheet: o2, className: a2, debounceDelay: l2 = 220, sx: i2, ...s2 } = e2, [c2, d2] = D(() => o2.getView().getZoomScale()), [m2, p2] = D(null), u2 = M(0);
1035
1046
  Pa(o2, { onViewChange: () => {
1036
- p2(true), 0 === u2.current && c2(o2.getView().getZoomScale());
1047
+ p2(true), 0 === u2.current && d2(o2.getView().getZoomScale());
1037
1048
  } }), P(() => {
1038
- u2.current = 0, p2(false), c2(o2.getView().getZoomScale());
1049
+ u2.current = 0, p2(false), d2(o2.getView().getZoomScale());
1039
1050
  }, [o2]), P(() => {
1040
1051
  0 !== u2.current && n.debounce(() => {
1041
- d2 === u2.current && (u2.current = 0, o2.getView().update({ zoomScale: d2 }));
1052
+ c2 === u2.current && (u2.current = 0, o2.getView().update({ zoomScale: c2 }));
1042
1053
  }, l2)();
1043
- }, [d2, l2]);
1054
+ }, [c2, l2]);
1044
1055
  const g2 = na((e3) => {
1045
1056
  let t3 = e3;
1046
- e3 < 100 ? t3 = Math.round(e3 / (10 / 9) + 10) : e3 > 100 && (t3 = Math.round(3 * e3 - 200)), u2.current = t3, p2(true), c2(t3);
1057
+ e3 < 100 ? t3 = Math.round(e3 / (10 / 9) + 10) : e3 > 100 && (t3 = Math.round(3 * e3 - 200)), u2.current = t3, p2(true), d2(t3);
1047
1058
  }, [o2]), h2 = (e3) => {
1048
1059
  let t3 = e3;
1049
1060
  return e3 < 100 ? t3 = 10 / 9 * (e3 - 10) : e3 > 100 && (t3 = (e3 + 200) / 3), t3;
1050
- }, f2 = h2(d2), [y2, w2] = D(null), k2 = M(null), S2 = v(() => {
1061
+ }, f2 = h2(c2), [y2, w2] = D(null), k2 = M(null), S2 = v(() => {
1051
1062
  const e3 = y2;
1052
1063
  e3 && requestAnimationFrame(() => {
1053
1064
  k2.current?.contains(document.activeElement) && e3.focus();
@@ -1071,11 +1082,11 @@ const kl = k(S((e2, t2) => {
1071
1082
  e3.which === ra.Down || e3.which === ra.Right ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10))), e3.preventDefault()) : e3.which === ra.Up || e3.which === ra.Left ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), false, 10))), e3.preventDefault()) : e3.which !== ra.Enter && e3.which !== ra.Escape || S2();
1072
1083
  }, onChange: (e3, t3) => {
1073
1084
  Math.abs(t3 - 100) < 3 ? g2(100) : g2(t3);
1074
- }, 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) => {
1085
+ }, valueLabelFormat: (e3, t3) => `Zoom: ${Math.round(c2)}%` }), 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) => {
1075
1086
  0 !== e3.button ? e3.preventDefault() : R2(e3);
1076
1087
  }, children: x(jn, {}) }) }), b(A, { sx: { display: "flex", flexDirection: "row" }, children: [x(A, { sx: { minWidth: "8px" } }), x(I, { noWrap: true, component: "div", onClick: () => {
1077
1088
  g2(100);
1078
- }, sx: { cursor: "pointer", display: "flex", flex: "1 1 100%", fontSize: "0.70rem", marginLeft: "2px", marginRight: "2px", userSelect: "none", justifyContent: "center", width: B2 }, children: x("div", { children: Math.round(d2) + "%" }) })] })] });
1089
+ }, sx: { cursor: "pointer", display: "flex", flex: "1 1 100%", fontSize: "0.70rem", marginLeft: "2px", marginRight: "2px", userSelect: "none", justifyContent: "center", width: B2 }, children: x("div", { children: Math.round(c2) + "%" }) })] })] });
1079
1090
  }));
1080
1091
  kl.displayName = "SheetZoomScale";
1081
1092
  const Sl = k(S((e2, t2) => {
@@ -1088,15 +1099,15 @@ const Sl = k(S((e2, t2) => {
1088
1099
  s2.current?.removeEventListener("wheel", e3);
1089
1100
  };
1090
1101
  }, []);
1091
- const d2 = ia(), c2 = C(() => {
1092
- const e3 = d2.getMode();
1102
+ const c2 = ia(), d2 = C(() => {
1103
+ const e3 = c2.getMode();
1093
1104
  return e3?.description ? e3.description : "Ready";
1094
- }, [d2]), [m2, p2] = D(false);
1095
- 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 ${a2.header.edgeStrokeFill}`, ...o2 }, onMouseOver: () => p2(true), onMouseLeave: () => p2(false), ...i2, children: [r2, 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(kl, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: n2 })] });
1105
+ }, [c2]), [m2, p2] = D(false);
1106
+ 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 ${a2.header.edgeStrokeFill}`, ...o2 }, onMouseOver: () => p2(true), onMouseLeave: () => p2(false), ...i2, children: [r2, 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: d2 }) }), l2 ? x(A, { sx: { display: "flex", alignItems: "center" }, children: l2 }) : null, x(ie, { style: { marginTop: "6px", marginBottom: "6px" } }), x(kl, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: n2 })] });
1096
1107
  }));
1097
1108
  Sl.displayName = "StatusBar";
1098
1109
  const Cl = k(S((e2, t2) => {
1099
- const { disabled: o2, names: a2, 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 } = bo({ parentFloat: c2?.parentFloat }), [R2, B2] = D(() => s2 || !l2.getProtection().isStructureAllowed()), N2 = () => h2?.text ?? "", [E2, I2] = D(N2), H2 = na(() => {
1110
+ const { disabled: o2, names: a2, workbook: l2, restoreFocus: i2, readonly: s2 = false, disabled: c2 = false, commandPopupButtonProps: d2, sx: m2, notifier: u2, ...g2 } = e2, [h2, f2] = D(null), [w2, k2] = D(() => l2.getSelectedRanges().getCoords()), [S2, C2] = D(false), { reference: T2 } = bo({ parentFloat: d2?.parentFloat }), [R2, B2] = D(() => s2 || !l2.getProtection().isStructureAllowed()), N2 = () => h2?.text ?? "", [E2, I2] = D(N2), H2 = na(() => {
1100
1111
  if (T2?.closeAll(), !E2) {
1101
1112
  const e4 = N2();
1102
1113
  return I2(N2()), e4;
@@ -1125,7 +1136,7 @@ const Cl = k(S((e2, t2) => {
1125
1136
  let e4 = a2.getByName(E2);
1126
1137
  R2 || e4 || (e4 = a2.addReference(E2, o3)), e4 && f2({ text: e4.getName() });
1127
1138
  } catch (e4) {
1128
- I2(N2()), u2.showMessage?.(e4.message, { type: da.Error });
1139
+ I2(N2()), u2.showMessage?.(e4.message, { type: ca.Error });
1129
1140
  }
1130
1141
  return null;
1131
1142
  }, [E2, a2, T2, R2]), W2 = na(() => {
@@ -1197,13 +1208,13 @@ const Cl = k(S((e2, t2) => {
1197
1208
  const t3 = a2.lookupByRanges(e3)?.[0];
1198
1209
  t3 && await t3?.select(), await l2.getRanges(e3)?.select();
1199
1210
  } catch (e4) {
1200
- u2.showMessage?.(e4.message, { type: da.Error });
1211
+ u2.showMessage?.(e4.message, { type: ca.Error });
1201
1212
  }
1202
1213
  }, [a2, u2, l2]), Z2 = v((e3) => {
1203
1214
  setTimeout(() => {
1204
1215
  C2(true);
1205
1216
  }, 0);
1206
- const t3 = { variant: oa.Menuitem, parentFloat: e3.floatReference, commandHook: { ...c2?.commandHook, beforeExecute: (e4, t4) => (T2?.closeAll(), c2?.commandHook?.beforeExecute?.(e4, t4)) }, scope: c2?.scope, commands: c2?.commands };
1217
+ const t3 = { variant: oa.Menuitem, parentFloat: e3.floatReference, commandHook: { ...d2?.commandHook, beforeExecute: (e4, t4) => (T2?.closeAll(), d2?.commandHook?.beforeExecute?.(e4, t4)) }, scope: d2?.scope, commands: d2?.commands };
1207
1218
  let o3 = a2.getItems({ scope: l2?.getSelectedSheet().getName() });
1208
1219
  o3 = o3.sort((e4, t4) => e4.getType() === t4.getType() ? e4.getName().localeCompare(t4.getName()) : "range" === e4.getType() ? -1 : 1);
1209
1220
  const n2 = R2 ? null : ["editNamedReference", "deleteNamedReference"], r2 = R2 ? null : ["editTable", null, "convertTableToRange", "deleteTable"], i3 = [], s3 = o3.length;
@@ -1211,7 +1222,7 @@ const Cl = k(S((e2, t2) => {
1211
1222
  const a3 = o3[e4], l3 = a3.getRanges();
1212
1223
  if (!l3 || a3.isHidden()) continue;
1213
1224
  const s4 = a3.getType();
1214
- s4 !== o3[e4 - 1]?.getType() && (e4 > 0 && i3.push(x(ie, { orientation: "horizontal" }, `type-divider-${i3.length}`)), i3.push(x(zt, { variant: "subtitle2", sx: { paddingLeft: "16px" }, children: "reference" === a3.getType() ? "Ranges" : "Tables" }, `type-header-${i3.length}`))), "reference" === s4 ? i3.push(F(Jt, { ...t3, key: "named-" + i3.length, popupCommandKeys: n2, popupScope: "namedItem", scope: "namedItem", commandState: a3, commands: c2?.commands, label: a3.getName(), quickCommand: "selectNamed", disabled: !a3.getRanges() || d2, icon: (e5) => {
1225
+ s4 !== o3[e4 - 1]?.getType() && (e4 > 0 && i3.push(x(ie, { orientation: "horizontal" }, `type-divider-${i3.length}`)), i3.push(x(zt, { variant: "subtitle2", sx: { paddingLeft: "16px" }, children: "reference" === a3.getType() ? "Ranges" : "Tables" }, `type-header-${i3.length}`))), "reference" === s4 ? i3.push(F(Jt, { ...t3, key: "named-" + i3.length, popupCommandKeys: n2, popupScope: "namedItem", scope: "namedItem", commandState: a3, commands: d2?.commands, label: a3.getName(), quickCommand: "selectNamed", disabled: !a3.getRanges() || c2, icon: (e5) => {
1215
1226
  switch (e5.key()) {
1216
1227
  case "editNamedReference":
1217
1228
  return re(x(ko, {}));
@@ -1220,27 +1231,27 @@ const Cl = k(S((e2, t2) => {
1220
1231
  default:
1221
1232
  return re(x(yo, {}));
1222
1233
  }
1223
- } })) : "table" === s4 && i3.push(F(Jt, { ...t3, key: "namedItem-" + i3.length, popupCommandKeys: r2, popupScope: "namedItem", scope: "namedItem", commands: c2?.commands, commandState: a3, label: a3.getName(), quickCommand: "selectNamed", disabled: !l3 || d2, icon: (e5) => {
1234
+ } })) : "table" === s4 && i3.push(F(Jt, { ...t3, key: "namedItem-" + i3.length, popupCommandKeys: r2, popupScope: "namedItem", scope: "namedItem", commands: d2?.commands, commandState: a3, label: a3.getName(), quickCommand: "selectNamed", disabled: !l3 || c2, icon: (e5) => {
1224
1235
  e5.key();
1225
1236
  return re(x(So, {}));
1226
1237
  } }));
1227
1238
  }
1228
- 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: re(x(Co, {})) }), 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] });
1229
- return ce({ ...e3, children: m3 });
1230
- }, [l2, z2, a2, h2, R2]), J2 = ca(t2, () => ({ focus(e3) {
1239
+ 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: d2?.commands.getCommand("addNamedReference"), icon: re(x(Co, {})) }), 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] });
1240
+ return de({ ...e3, children: m3 });
1241
+ }, [l2, z2, a2, h2, R2]), J2 = da(t2, () => ({ focus(e3) {
1231
1242
  q2.current?.focus(e3);
1232
1243
  } }), []);
1233
1244
  return x(A, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...m2 }, ref: Va([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(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(5))})` } }, tabIndex: -1, outlined: { color: (e3) => o2 ? e3.palette.action.disabled : ka(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 }) });
1234
1245
  }));
1235
1246
  Cl.displayName = "NamedCollectionEditor";
1236
1247
  const vl = (e2, t2) => x(Cl, { ref: t2, ...e2 }), Tl = k(S((e2, t2) => {
1237
- const { sx: o2, workbook: n2, sheetElement: a2, gridStyle: l2, showNamedCollectionEditor: i2 = true, NamedCollectionEditorProps: s2, renderNamedCollectionEditor: d2 = vl, disabled: c2, commands: m2, ...p2 } = e2, [u2, g2] = D(n2?.getSelectedSheet());
1248
+ const { sx: o2, workbook: n2, sheetElement: a2, gridStyle: l2, showNamedCollectionEditor: i2 = true, NamedCollectionEditorProps: s2, renderNamedCollectionEditor: c2 = vl, disabled: d2, commands: m2, ...p2 } = e2, [u2, g2] = D(n2?.getSelectedSheet());
1238
1249
  Pa(n2, { onSheetsChange: (e3) => {
1239
1250
  g2(e3?.getSelectedSheet());
1240
1251
  }, onViewChange(e3) {
1241
1252
  g2(e3?.getSelectedSheet());
1242
1253
  } });
1243
- const [h2, f2] = D(u2.getSelection().getCoords().cell), w2 = u2.getRange(h2).getCell(), k2 = c2 || !w2.isEditAllowed(), S2 = M(null), v2 = C(() => ({ fontSize: 11 }), []);
1254
+ const [h2, f2] = D(u2.getSelection().getCoords().cell), w2 = u2.getRange(h2).getCell(), k2 = d2 || !w2.isEditAllowed(), S2 = M(null), v2 = C(() => ({ fontSize: 11 }), []);
1244
1255
  Pa(u2.getSelection(), { onChange: () => {
1245
1256
  f2(u2.getSelection().getCoords().cell);
1246
1257
  } }), Pa(u2, { onProtectionChange() {
@@ -1270,7 +1281,7 @@ const vl = (e2, t2) => x(Cl, { ref: t2, ...e2 }), Tl = k(S((e2, t2) => {
1270
1281
  }, onSubmitEdit: () => {
1271
1282
  a2?.submitEdit(), a2?.focus();
1272
1283
  }, linesVisible: N2 }) });
1273
- }, [u2, z2, h2, N2, a2]), O2 = M(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(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(5))})`, border: (e3) => `solid ${k2 ? e3.palette.action.disabled : ka(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: re(x(vo, {})), tooltipProps: { label: "Cancel", simple: true }, disabled: k2 || null === z2, onMouseDown: (e3) => {
1284
+ }, [u2, z2, h2, N2, a2]), O2 = M(null), V2 = C(() => i2 ? c2({ names: n2.getNames(), workbook: n2, ...s2 }, O2) : null, [c2, s2, i2, u2, n2, k2]), G2 = C(() => b(X, { elevation: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 0, backgroundImage: `linear-gradient(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(5))})`, border: (e3) => `solid ${k2 ? e3.palette.action.disabled : ka(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: re(x(vo, {})), tooltipProps: { label: "Cancel", simple: true }, disabled: k2 || null === z2, onMouseDown: (e3) => {
1274
1285
  0 === e3.button && e3.preventDefault();
1275
1286
  }, onClick: () => {
1276
1287
  a2.cancelEdit();
@@ -1287,25 +1298,25 @@ const vl = (e2, t2) => x(Cl, { ref: t2, ...e2 }), Tl = k(S((e2, t2) => {
1287
1298
  }, onClick: () => {
1288
1299
  const e3 = N2 > 1 ? 1 : F2;
1289
1300
  R2(e3 * T2 + 1), E2(e3);
1290
- } }), 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(ma, { 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 = ca(t2, () => ({ isFormulaBarElement: () => true, getNamedCollectionEditorElement: () => O2.current }), []);
1301
+ } }), 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(ma, { 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 = da(t2, () => ({ isFormulaBarElement: () => true, getNamedCollectionEditorElement: () => O2.current }), []);
1291
1302
  return x(A, { sx: { display: "flex", flexDirection: "row", gap: (e3) => e3.spacing(0.5), ...o2 }, ref: Z2, ...p2, children: K2 });
1292
1303
  }));
1293
1304
  Tl.displayName = "FormulaBar";
1294
1305
  const Dl = k(S((e2, t2) => {
1295
- const { filter: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, ...i2 } = e2, s2 = C(() => ({}), []), d2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
1306
+ const { filter: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, ...i2 } = e2, s2 = C(() => ({}), []), c2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
1296
1307
  }, onError() {
1297
1308
  console.log("onError");
1298
- } }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = C(() => ({ ...s2, ...d2, variant: oa.Menuitem }), [s2, d2]), m2 = b(y, { children: [x(le, { ...c2, command: n2.getCommand("sortAscending"), icon: re(x(ft, {})) }), x(le, { ...c2, command: n2.getCommand("sortDescending"), icon: re(x(xt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...c2, command: n2.getCommand("autoFilterClear"), icon: re(x(wt, {})) }), []] });
1309
+ } }, disabled: a2, parentFloat: l2 }), [a2, l2]), d2 = C(() => ({ ...s2, ...c2, variant: oa.Menuitem }), [s2, c2]), m2 = b(y, { children: [x(le, { ...d2, command: n2.getCommand("sortAscending"), icon: re(x(ft, {})) }), x(le, { ...d2, command: n2.getCommand("sortDescending"), icon: re(x(xt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...d2, command: n2.getCommand("autoFilterClear"), icon: re(x(wt, {})) }), []] });
1299
1310
  return x(A, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...r2 }, ...i2, children: m2 });
1300
1311
  }));
1301
1312
  Dl.displayName = "FilterColumnMenu";
1302
1313
  const Pl = k(S((e2, t2) => {
1303
- const { children: o2, className: n2, disabled: a2, style: r2, filter: l2, ...i2 } = e2, s2 = ca(t2, () => ({ isFilters: () => true }), []);
1314
+ const { children: o2, className: n2, disabled: a2, style: r2, filter: l2, ...i2 } = e2, s2 = da(t2, () => ({ isFilters: () => true }), []);
1304
1315
  return x("div", { ref: s2, className: In("filters", n2), style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", gap: "8px", ...r2 }, ...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" })] }) });
1305
1316
  }));
1306
1317
  Pl.displayName = "Filters";
1307
1318
  const Rl = k(S((e2, t2) => {
1308
- const { children: o2, sheet: n2, style: a2, className: r2, 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, P2] = D(() => n2 ? n2.getTabColor() : null);
1319
+ const { children: o2, sheet: n2, style: a2, className: r2, value: l2, index: i2, editing: s2, editable: c2, disabled: d2, 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, P2] = D(() => n2 ? n2.getTabColor() : null);
1309
1320
  Pa(n2, { onProtectionChange: () => {
1310
1321
  v2(n2.getProtection().isLocked());
1311
1322
  }, onTabColorChange: () => {
@@ -1322,11 +1333,11 @@ const Rl = k(S((e2, t2) => {
1322
1333
  let N2 = null;
1323
1334
  "string" == typeof u2 ? N2 = u2 : u2?.toCSS && (N2 = u2.toCSS());
1324
1335
  const E2 = M2 ? x(A, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (e3) => e3.palette.primary.main } }) : null;
1325
- return x(Ca, { theme: M2 ? k2 ?? R2 : R2, children: x(A, { ref: t2, className: In(r2), sx: { ...a2, 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 }, ...S2, children: x(pa, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: w2, strokeColor: M2 ? N2 : "transparent", children: x(z, { 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" : B2 || "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: [F2, 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: M2 ? void 0 : "1px" }, children: [o2, E2] }), C2 ? x(Kn, { sx: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : x(A, { sx: { minHeight: "22px" } })] })] }) }, l2 + ":" + i2) }) }) });
1336
+ return x(Ca, { theme: M2 ? k2 ?? R2 : R2, children: x(A, { ref: t2, className: In(r2), sx: { ...a2, 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 }, ...S2, children: x(pa, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: w2, strokeColor: M2 ? N2 : "transparent", children: x(z, { 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" : B2 || "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: d2, disableRipple: s2, component: "div", children: b(y, { children: [F2, 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: M2 ? void 0 : "1px" }, children: [o2, E2] }), C2 ? x(Kn, { sx: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : x(A, { sx: { minHeight: "22px" } })] })] }) }, l2 + ":" + i2) }) }) });
1326
1337
  }));
1327
1338
  Rl.displayName = "SheetTab";
1328
1339
  const Ml = k(S((e2, t2) => {
1329
- const { workbook: o2, index: n2, commands: a2, scope: r2 = "sheet", disabled: l2, floatReference: i2, sx: s2, className: d2, tabStripRef: c2, ...m2 } = e2, [p2, u2] = D(o2?.getProtection());
1340
+ const { workbook: o2, index: n2, commands: a2, scope: r2 = "sheet", disabled: l2, floatReference: i2, sx: s2, className: c2, tabStripRef: d2, ...m2 } = e2, [p2, u2] = D(o2?.getProtection());
1330
1341
  Pa(o2, { onProtectionChange: (e3) => {
1331
1342
  u2(e3?.getProtection());
1332
1343
  } });
@@ -1337,16 +1348,16 @@ const Ml = k(S((e2, t2) => {
1337
1348
  0 === e3.button && e3.preventDefault();
1338
1349
  }, onMouseUp: () => {
1339
1350
  Promise.resolve(i2.closeAll()).then(() => {
1340
- c2?.startEdit(n2);
1351
+ d2?.startEdit(n2);
1341
1352
  });
1342
1353
  }, disabled: l2 || !p2.isStructureAllowed(), parentFloat: i2, children: ["Rename", "sheet" !== r2 ? " Sheet" : ""] }), x(le, { command: a2.getCommand("duplicateSheet"), ...f2, variant: oa.Menuitem }), x(le, { command: a2?.getCommand("protectionSheetToggle"), ...f2, variant: oa.Menuitem, icon: x(Kn, {}) }), x(Ir, { variant: oa.Menuitem, command: a2.getCommand("formatSheetTabColor"), icon: x(Ie, {}), panelProps: { disableAlpha: true, autoColorLabel: "No Tab Color", autoColorPosition: lr.End }, parentFloat: i2 }), x(ie, { orientation: "horizontal" }), x(le, { command: a2.getCommand("hideSheet"), ...f2, variant: oa.Menuitem, icon: re(x(Po, {})) })] });
1343
- return x(A, { ref: t2, className: In("menu", d2), sx: { ...s2 }, ...m2, children: w2 });
1354
+ return x(A, { ref: t2, className: In("menu", c2), sx: { ...s2 }, ...m2, children: w2 });
1344
1355
  }));
1345
1356
  Ml.displayName = "SheetTabMenu";
1346
1357
  const Fl = k(S((e2, t2) => {
1347
- const { workbook: o2, gridStyle: n2, floatReference: a2, closeFloatAll: r2, className: l2, ...i2 } = e2, [s2, d2] = D(o2?.getSheets().getItems()), [c2, m2] = D(o2?.getProtection());
1358
+ const { workbook: o2, gridStyle: n2, floatReference: a2, closeFloatAll: r2, className: l2, ...i2 } = e2, [s2, c2] = D(o2?.getSheets().getItems()), [d2, m2] = D(o2?.getProtection());
1348
1359
  Pa(o2, { onSheetsChange: (e3) => {
1349
- d2(e3.getSheets().getItems());
1360
+ c2(e3.getSheets().getItems());
1350
1361
  }, onProtectionChange: (e3) => {
1351
1362
  m2(e3?.getProtection());
1352
1363
  } });
@@ -1355,11 +1366,11 @@ const Fl = k(S((e2, t2) => {
1355
1366
  for (let o3 = 0; o3 < t3.length; o3++) {
1356
1367
  const l3 = t3[o3], i3 = l3.getVisibility();
1357
1368
  if (i3 === u.Visibility.VeryHidden) continue;
1358
- const s3 = r3 === l3, d3 = l3.getProtection().isLocked(), m3 = l3.getTabColor(), p3 = n2?.body.fill ?? "transparent";
1369
+ const s3 = r3 === l3, c3 = l3.getProtection().isLocked(), m3 = l3.getTabColor(), p3 = n2?.body.fill ?? "transparent";
1359
1370
  let g2 = null, h2 = null, f2 = p3;
1360
1371
  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" } }) }));
1361
1372
  let w2 = null;
1362
- d3 && (w2 = x(Kn, { color: "secondary" })), i3 !== u.Visibility.Visible && (w2 = re(x(Po, { 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) => {
1373
+ c3 && (w2 = x(Kn, { color: "secondary" })), i3 !== u.Visibility.Visible && (w2 = re(x(Po, { style: { opacity: d2.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: !d2.isStructureAllowed() && i3 === u.Visibility.Hidden, sx: { color: (e4) => {
1363
1374
  let t4 = s3 ? e4.palette.primary.main : e4.palette.text.secondary;
1364
1375
  return h2 && (t4 = h2), i3 === u.Visibility.Hidden && (t4 = za(t4, e4.palette.action.disabledOpacity)), t4;
1365
1376
  }, 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: () => {
@@ -1373,7 +1384,7 @@ const Fl = k(S((e2, t2) => {
1373
1384
  }, 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));
1374
1385
  }
1375
1386
  return e3;
1376
- }, [o2, c2, s2, a2, n2]);
1387
+ }, [o2, d2, s2, a2, n2]);
1377
1388
  return x(A, { ref: t2, className: In("menu", l2), ...i2, children: p2 });
1378
1389
  }));
1379
1390
  Fl.displayName = "SheetsAllMenu";
@@ -1417,21 +1428,21 @@ const Al = async (e2) => {
1417
1428
  const l2 = t2 ?? e2, i2 = "dark" === l2.palette.mode;
1418
1429
  return o2.selection = { fill: l2.palette?.primary?.main ? za(l2.palette?.primary?.main, 0.1) : void 0, strokeFill: l2.palette?.primary?.main }, o2.selectionInactive = { ...o2.selection, fill: l2.palette?.divider ? za(l2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" }, o2.selectionRemove = { ...o2.selection, fill: za(l2.palette.warning.light, 0.05), strokeFill: l2.palette.warning.dark }, t2 && (o2.body = n2(t2)), o2.colorShadow = za(l2.palette.action.active, 0.5), o2.colorGrey = l2.palette.action.active, o2.filterDarkInvert = i2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", o2;
1419
1430
  }, Wl = k(S((e2, t2) => {
1420
- const { children: o2, sx: n2, parentFloat: a2, ...r2 } = e2, l2 = ca(t2, () => ({}), []), [i2, s2] = qa(), d2 = M(null), c2 = M(null), [m2, p2] = w.useReducer((e3) => e3 + 1, 0), [u2, g2] = D(null), [h2, f2] = D(null), [y2, k2] = D(null), { reference: S2 } = bo({ parentFloat: a2, label: "overflow" });
1431
+ const { children: o2, sx: n2, parentFloat: a2, ...r2 } = e2, l2 = da(t2, () => ({}), []), [i2, s2] = qa(), c2 = M(null), d2 = M(null), [m2, p2] = w.useReducer((e3) => e3 + 1, 0), [u2, g2] = D(null), [h2, f2] = D(null), [y2, k2] = D(null), { reference: S2 } = bo({ parentFloat: a2, label: "overflow" });
1421
1432
  E(() => {
1422
- c2.current = { refs: [] };
1433
+ d2.current = { refs: [] };
1423
1434
  const e3 = [], t3 = w.Children.toArray(o2);
1424
1435
  let n3 = 0;
1425
1436
  t3.forEach((o3, a3) => {
1426
1437
  e3.push(x(A, { sx: { display: "flex" }, ref: (e4) => {
1427
1438
  n3++, n3 === t3.length && p2();
1428
1439
  const o4 = { current: null };
1429
- o4.current = e4, c2.current.refs[a3] = o4;
1440
+ o4.current = e4, d2.current.refs[a3] = o4;
1430
1441
  }, children: o3 }, a3));
1431
1442
  }), g2(e3);
1432
1443
  }, [o2, s2]), E(() => {
1433
1444
  if (!u2) return;
1434
- const e3 = c2.current.refs;
1445
+ const e3 = d2.current.refs;
1435
1446
  if (!l2.current || !e3 || 0 === e3.length) return f2(null), void k2(null);
1436
1447
  const t3 = l2.current?.getBoundingClientRect(), o3 = [], n3 = [];
1437
1448
  let a3 = 0, r3 = false;
@@ -1446,7 +1457,7 @@ const Al = async (e2) => {
1446
1457
  a3 += l3?.width, a3 > t3.width && (r3 = true);
1447
1458
  }
1448
1459
  if (!r3) return f2(null), void k2([]);
1449
- const i3 = d2.current?.getBoundingClientRect();
1460
+ const i3 = c2.current?.getBoundingClientRect();
1450
1461
  a3 = 0;
1451
1462
  for (let r4 = 0; r4 < e3.length; r4++) {
1452
1463
  const l3 = e3[r4];
@@ -1471,9 +1482,9 @@ const Al = async (e2) => {
1471
1482
  t3.push(i3);
1472
1483
  }
1473
1484
  const o3 = x(A, { 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 });
1474
- return ce({ ...e3, children: o3 });
1485
+ return de({ ...e3, children: o3 });
1475
1486
  }, [y2]);
1476
- return b(A, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...n2 }, ref: Va([l2, i2, t2]), ...r2, 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(Me, { createPopupPanel: C2, ref: d2, parentFloat: S2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: "More", description: "More toolbar options…", disabled: t3, children: e3 }), icon: x(Mo, { children: x(Xn, {}) }) }) })] });
1487
+ return b(A, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...n2 }, ref: Va([l2, i2, t2]), ...r2, 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(Me, { createPopupPanel: C2, ref: c2, parentFloat: S2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: "More", description: "More toolbar options…", disabled: t3, children: e3 }), icon: x(Mo, { children: x(Xn, {}) }) }) })] });
1477
1488
  })), zl = "https://unpkg.com/@sheetxl/scripting-templates/dist", $l = (e2) => {
1478
1489
  if (e2.metadata?.name) return e2.metadata.name;
1479
1490
  let t2 = (e2.path.split("/").pop() || "").replace(/\.[^/.]+$/, "");
@@ -1516,12 +1527,12 @@ const Al = async (e2) => {
1516
1527
  e3.keyCode !== ra.Enter && e3.keyCode !== ra.Space || a2(o2);
1517
1528
  }, ...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) => za(e3.palette.text.secondary ?? e3.palette.text.primary, 0.6), overflow: "hidden", textOverflow: "ellipsis" }, children: o2.metadata?.summary })] }) });
1518
1529
  }), Ul = k(S((e2, t2) => {
1519
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, scriptPath: l2 = zl, ...i2 } = e2, [s2, d2] = D([]), [c2, m2] = D(true), p2 = ta(o2, ["executeSelectedScript"]), u2 = p2[0]?.context?.();
1530
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, scriptPath: l2 = zl, ...i2 } = e2, [s2, c2] = D([]), [d2, m2] = D(true), p2 = ta(o2, ["executeSelectedScript"]), u2 = p2[0]?.context?.();
1520
1531
  P(() => {
1521
1532
  (async () => {
1522
1533
  try {
1523
1534
  const e3 = await Ol(l2);
1524
- d2(e3);
1535
+ c2(e3);
1525
1536
  } catch (e3) {
1526
1537
  } finally {
1527
1538
  m2(false);
@@ -1529,7 +1540,7 @@ const Al = async (e2) => {
1529
1540
  })();
1530
1541
  }, [l2]);
1531
1542
  const g2 = v((e3, t3) => {
1532
- if (c2) return x("div", { children: "Loading..." });
1543
+ if (d2) return x("div", { children: "Loading..." });
1533
1544
  const a3 = { variant: oa.Menuitem, commandHook: n2, scope: "scripts", disabled: r2 }, l3 = (t4) => {
1534
1545
  u2.getEditor()?.insertSnippet(t4.content), e3.closeFloat();
1535
1546
  }, i3 = [];
@@ -1537,9 +1548,9 @@ const Al = async (e2) => {
1537
1548
  const t4 = s2[e4];
1538
1549
  t4 && i3.push(x(Gl, { handleInsert: l3, snippet: t4 }, t4.path));
1539
1550
  }
1540
- 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, F(le, { ...a3, key: "help", command: o2.getCommand("help"), icon: re(x(_t, {})) })] });
1541
- return ce({ ...e3, children: d3 });
1542
- }, [r2, n2, a2, c2, u2]);
1551
+ const c3 = 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, F(le, { ...a3, key: "help", command: o2.getCommand("help"), icon: re(x(_t, {})) })] });
1552
+ return de({ ...e3, children: c3 });
1553
+ }, [r2, n2, a2, d2, u2]);
1543
1554
  return x(me, { ref: t2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Insert Script", tooltip: "Inserts a script from a set of templates.", createPopupPanel: g2, icon: re(x(Fo, {})), ...i2 });
1544
1555
  })), jl = k(S((e2, t2) => {
1545
1556
  const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = na((e3) => {
@@ -1550,7 +1561,7 @@ const Al = async (e2) => {
1550
1561
  }));
1551
1562
  jl.displayName = "ScriptEditorToolbar";
1552
1563
  const _l = { fontSize: "1rem" }, ql = k(S((e2, t2) => {
1553
- const { scriptPath: o2 = zl, onScriptSelect: n2, sx: a2 = aa.EmptyCssProperties, className: r2, buttonMinWidth: l2 = 210, buttonMinHeight: i2 = 80, gap: s2 = 12, ...d2 } = e2, [c2, m2] = D([]), [p2, u2] = D(true), [g2, h2] = D(null);
1564
+ const { scriptPath: o2 = zl, onScriptSelect: n2, sx: a2 = aa.EmptyCssProperties, className: r2, buttonMinWidth: l2 = 210, buttonMinHeight: i2 = 80, gap: s2 = 12, ...c2 } = e2, [d2, m2] = D([]), [p2, u2] = D(true), [g2, h2] = D(null);
1554
1565
  if (P(() => {
1555
1566
  (async () => {
1556
1567
  const e3 = [{ path: null, metadata: { title: "Blank Template...", summary: "Start with an empty script." }, content: "" }];
@@ -1567,29 +1578,29 @@ const _l = { fontSize: "1rem" }, ql = k(S((e2, t2) => {
1567
1578
  m2(e3), u2(false);
1568
1579
  }
1569
1580
  })();
1570
- }, [o2]), p2) return x(A, { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", className: In(r2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(5))})`, ...a2 }, ...d2, children: x(Z, {}) });
1581
+ }, [o2]), p2) return x(A, { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", className: In(r2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(5))})`, ...a2 }, ...c2, children: x(Z, {}) });
1571
1582
  let f2 = null;
1572
- g2 && (f2 = b(A, { display: "flex", justifyContent: "center", alignItems: "center", className: In(r2, "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(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(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 })] }));
1583
+ g2 && (f2 = b(A, { display: "flex", justifyContent: "center", alignItems: "center", className: In(r2, "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(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(5))})` }, ...c2, children: [x(I, { color: "error", variant: "h6", component: "div", gutterBottom: true, children: "Error loading Templates" }), x(I, { color: "error", component: "div", children: g2 })] }));
1573
1584
  const y2 = (e3) => {
1574
1585
  const t3 = e3.metadata?.icon;
1575
1586
  return "macro" === t3 ? x(No, { sx: _l }) : "formula" === t3 ? x(Bo, { sx: _l }) : "autostart" === t3 ? x(Zn, { sx: _l }) : null;
1576
1587
  };
1577
- return b(A, { ref: t2, className: In(r2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(5))})`, ...a2 }, ...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(z, { 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] });
1588
+ return b(A, { ref: t2, className: In(r2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(5))})`, ...a2 }, ...c2, 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: d2.map((e3, t3) => b(z, { 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] });
1578
1589
  }));
1579
1590
  ql.displayName = "TemplateSelectPanel";
1580
1591
  const Kl = k(S((e2, t2) => {
1581
- const { className: o2, sx: n2, editorProps: a2, commands: r2, readOnly: l2 = false, onClose: i2, autoFocusSel: s2, autoFocus: d2 = true, scripts: c2, ...m2 } = e2, p2 = wa(), [u2, g2] = D(false), h2 = M(false), [f2, y2] = D({ message: "Loading", cursor: "", dirty: false }), [w2, k2] = D(null);
1592
+ const { className: o2, sx: n2, editorProps: a2, commands: r2, readOnly: l2 = false, onClose: i2, autoFocusSel: s2, autoFocus: c2 = true, scripts: d2, ...m2 } = e2, p2 = wa(), [u2, g2] = D(false), h2 = M(false), [f2, y2] = D({ message: "Loading", cursor: "", dirty: false }), [w2, k2] = D(null);
1582
1593
  P(() => {
1583
1594
  let e3 = false;
1584
- return k2(null), async function() {
1585
- if (c2 && (await c2.start(), !e3)) {
1586
- const e4 = c2.getModules().getItems()[0]?.getSource();
1595
+ return k2(null), (async function() {
1596
+ if (d2 && (await d2.start(), !e3)) {
1597
+ const e4 = d2.getModules().getItems()[0]?.getSource();
1587
1598
  k2({ source: e4 || null });
1588
1599
  }
1589
- }(), () => {
1600
+ })(), () => {
1590
1601
  e3 = true;
1591
1602
  };
1592
- }, [c2]);
1603
+ }, [d2]);
1593
1604
  const S2 = v((e3) => {
1594
1605
  y2((t3) => ({ ...t3, ...e3 }));
1595
1606
  }, []), T2 = M(null), R2 = M(null), [F2, B2] = D(null), N2 = M(null), E2 = na((e3) => {
@@ -1599,7 +1610,7 @@ const Kl = k(S((e2, t2) => {
1599
1610
  if (t3 && t3.length > 0) return t3[0]?.focus?.(e3), true;
1600
1611
  }
1601
1612
  return R2.current?.focus?.(e3), false;
1602
- }, [F2, s2, d2]), H2 = C(() => x(Pe, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: false }), []), W2 = C(() => x(X, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, backgroundImage: `linear-gradient(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(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(jl, { commands: r2 }) }), [p2, r2]), z2 = C(() => x(A, { className: In("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: In("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [W2, x(A, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: x(Fa, { ref: R2, loadingPanel: H2, readOnly: l2, onClose: i2, autoFocus: d2, commands: r2, onStatusChange: S2, darkMode: "dark" === p2.palette.mode, ...a2 }) }), z2] }), [p2, r2, W2, z2, u2, H2, l2, a2, d2, s2, i2, S2]), O2 = C(() => x(J, { className: In({ "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) => ka(e3.palette.action.hover, 0.03), borderBottom: (e3) => `solid ${ka(e3.palette.divider, 0.2)} 1px` }, onPointerDown: (e3) => {
1613
+ }, [F2, s2, c2]), H2 = C(() => x(Pe, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: false }), []), W2 = C(() => x(X, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, backgroundImage: `linear-gradient(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(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(jl, { commands: r2 }) }), [p2, r2]), z2 = C(() => x(A, { className: In("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: In("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [W2, x(A, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: x(Fa, { ref: R2, loadingPanel: H2, readOnly: l2, onClose: i2, autoFocus: c2, commands: r2, onStatusChange: S2, darkMode: "dark" === p2.palette.mode, ...a2 }) }), z2] }), [p2, r2, W2, z2, u2, H2, l2, a2, c2, s2, i2, S2]), O2 = C(() => x(J, { className: In({ "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) => ka(e3.palette.action.hover, 0.03), borderBottom: (e3) => `solid ${ka(e3.palette.divider, 0.2)} 1px` }, onPointerDown: (e3) => {
1603
1614
  e3.isDefaultPrevented() || (e3.preventDefault(), E2());
1604
1615
  }, 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) => {
1605
1616
  T2.current?.start(e3, { center: false }), e3.stopPropagation(), e3.preventDefault();
@@ -1612,7 +1623,7 @@ const Kl = k(S((e2, t2) => {
1612
1623
  } })), b(A, { tabIndex: 0, className: In("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(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(5))})` }, onPointerDown: (e4) => {
1613
1624
  e4.isDefaultPrevented() || R2.current?.focus();
1614
1625
  }, children: [O2, b(A, { sx: { flex: "1 1 100%", position: "relative", display: "flex" }, children: [$2, e3] })] }));
1615
- }, [W2, $2, o2, w2]), G2 = ca(t2, () => ({ isScriptWorkspaceElement: () => true, focus: (e3) => {
1626
+ }, [W2, $2, o2, w2]), G2 = da(t2, () => ({ isScriptWorkspaceElement: () => true, focus: (e3) => {
1616
1627
  E2(e3);
1617
1628
  } }), []);
1618
1629
  return x(A, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...n2 }, ref: G2, ...m2, onFocus: (e3) => {
@@ -1623,65 +1634,95 @@ const Kl = k(S((e2, t2) => {
1623
1634
  }));
1624
1635
  Kl.displayName = "ScriptWorkspace";
1625
1636
  const Xl = k(S((e2, t2) => {
1626
- const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = ta(o2, ["executeScript"])[0].context();
1627
- ta(o2, ["showScriptEditor"]);
1628
- const s2 = v((e3, t3) => {
1629
- const o3 = { variant: oa.Menuitem, commandHook: n2, scope: "scripts", disabled: r2, shortcut: null }, a3 = i2?.getScripts(), l3 = a3?.searchFunction({ type: "macro" }), s3 = [];
1630
- if (l3) for (let e4 = 0; e4 < l3.length; e4++) {
1631
- const n3 = l3[e4];
1632
- s3.push(x(le, { ...o3, command: t3.getCommand("executeScript"), commandState: { declaration: n3 }, tooltipProps: { description: `Execute ${n3.getName() ?? "script"}` }, icon: re(x(No, {})), label: n3.getName() ?? `Script '${n3.getName()}'` }, `script-${n3.getName()}-${e4}`));
1633
- }
1634
- 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, F(le, { ...o3, key: "show-editor", command: t3.getCommand("showScriptEditor"), icon: re(x(Io, {})) })] });
1635
- return ce({ ...e3, children: d2 });
1636
- }, [r2, i2, n2, a2]);
1637
- 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: re(x(Lo, {})), ...l2 });
1638
- })), Zl = k(S((e2, t2) => {
1639
- const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = ta(o2, ["executeScript", "showScriptEditor"]), i2 = l2[0]?.context?.(), s2 = v((e3) => {
1640
- const { commandButtonProps: t3, commandPopupProps: a3 } = e3, r3 = x(Ir, { ...a3, command: o2.getCommand("formatFontColor"), icon: x(Ho, {}), isSplit: true, panelProps: { disableAlpha: true } }), s3 = x(Ir, { ...a3, command: o2.getCommand("formatFillColor"), icon: x(Wo, {}), isSplit: true, panelProps: { disableAlpha: true, autoColorLabel: "No Fill", autoColorPosition: lr.End } }), d2 = o2.getCommand("undo") ? x(y, { children: x(zr, { ...a3, quickCommand: "undo" }) }) : null, c2 = o2.getCommand("find") ? x(y, { children: x(Pr, { ...a3 }) }) : null;
1641
- let m2 = null;
1642
- const p2 = i2?.getScripts();
1643
- if (l2[1]?.state?.() || p2) {
1644
- let e4 = l2[1]?.state?.();
1645
- const t4 = p2?.searchFunction({ type: "macro" });
1646
- for (let o3 = 0; t4 && !e4 && o3 < t4?.length; o3++) e4 = true;
1647
- e4 && (m2 = b(y, { children: [x(ie, {}), x(Xl, { ...a3 })] }));
1648
- }
1649
- return b(Wl, { parentFloat: n2, children: [d2, null, d2 ? x(ie, {}) : null, x(jr, { ...a3, command: o2.getCommand("paste") }), x(le, { ...t3, command: o2.getCommand("formatPainterToggle"), icon: re(x(zo, {})) }), x(ul, { ...t3, command: o2.getCommand("copy") }), x(ie, {}), x(Vr, { ...a3, command: o2.getCommand("formatFontFamily") }), x(Rr, { ...a3, command: o2.getCommand("formatFontSize") }), x(le, { ...t3, command: o2.getCommand("formatBoldToggle"), icon: x($o, {}) }), x(le, { ...t3, command: o2.getCommand("formatItalicToggle"), icon: x(Oo, {}) }), x(Ur, { ...a3 }), x(Gr, { ...a3 }), r3, x(ie, {}), s3, x(vr, { ...a3 }), x(Tr, { ...a3 }), x(ie, {}), x(tr, { ...a3 }), x(or, { ...a3 }), x(nr, { ...a3 }), x(ar, { ...a3 }), x(ie, {}), x(Fr, { ...a3 }), x(Zr, { command: o2.getCommand("formatCellStyle"), ...a3 }), x(al, { command: o2.getCommand("formatTableStyle"), ...a3 }), x(ie, {}), x(Er, { ...a3 }), x(Ar, { ...a3 }), x(ie, {}), x(Nr, { ...a3 }), null, x(Br, { ...a3 }), x(Hr, { ...a3 }), c2, m2] });
1650
- }, [o2, l2]);
1651
- return x(Ao, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: s2, ...r2 });
1637
+ const { commands: o2, ...n2 } = e2, a2 = ta(o2, ["executeScript", "showScriptEditor"]), [r2, l2] = D([]), [i2, s2] = D(false), c2 = a2[0]?.context?.();
1638
+ P(() => {
1639
+ const e3 = c2?.getScripts();
1640
+ if (!e3) return;
1641
+ (async () => {
1642
+ s2(true);
1643
+ const t3 = await e3.searchFunctions({ type: "macro" });
1644
+ l2(t3), s2(false);
1645
+ })();
1646
+ }, []);
1647
+ const d2 = { variant: oa.Menuitem, parentFloat: e2.floatReference, scope: "scripts", shortcut: null }, m2 = [], p2 = r2.length;
1648
+ for (let e3 = 0; e3 < p2; e3++) {
1649
+ const t3 = r2[e3];
1650
+ m2.push(x(le, { ...d2, command: o2.getCommand("executeScript"), commandState: { declaration: t3 }, tooltipProps: { description: `Execute ${t3.getName() ?? "macro"}` }, icon: re(x(No, {})), label: t3.getName() ?? `Script '${t3.getName()}'` }, `macro-${t3.getName()}-${e3}`));
1651
+ }
1652
+ const u2 = b(A, { ref: t2, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [m2.length > 0 ? b(y, { children: [x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: m2 }), x(ie, { orientation: "horizontal" })] }) : null, F(le, { ...d2, key: "show-editor", command: o2.getCommand("showScriptEditor"), icon: re(x(Io, {})) })] });
1653
+ return de({ ...n2, children: u2 });
1654
+ }));
1655
+ Xl.displayName = "RunScriptPopupPanel";
1656
+ const Zl = k(S((e2, t2) => {
1657
+ const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = "showScriptEditor", s2 = ta(o2, ["executeScript", "showScriptEditor"])[0].context(), c2 = v((e3, t3) => {
1658
+ const o3 = x(Xl, { ...e3, commands: t3 });
1659
+ return de({ ...e3, children: o3 });
1660
+ }, [r2, s2, n2, a2]);
1661
+ return x(me, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: c2, selected: o2.getCommand(i2).state(), label: "Macros", tooltip: "Run or manage macros.", quickCommand: i2, icon: re(x(Lo, {})), ...l2 });
1662
+ })), Jl = k(S((e2, t2) => {
1663
+ const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, [l2, i2] = D(false), s2 = ta(o2, ["executeScript", "showScriptEditor"]), c2 = s2[0]?.context?.();
1664
+ P(() => {
1665
+ const e3 = c2?.getScripts();
1666
+ if (!e3) return;
1667
+ const t3 = s2[1], o3 = async () => {
1668
+ if (!t3) return;
1669
+ let o4 = false;
1670
+ if (!!!t3.state()) {
1671
+ const t4 = await e3.searchFunctions({ type: "macro" }), n4 = t4?.length ?? 0;
1672
+ for (let e4 = 0; t4 && !o4 && e4 < n4; e4++) o4 = true;
1673
+ }
1674
+ i2(o4 || !!t3.state());
1675
+ };
1676
+ o3();
1677
+ const n3 = t3.addPropertyListener(() => {
1678
+ o3();
1679
+ }), a3 = e3.addListeners({ onChange: () => {
1680
+ o3();
1681
+ } });
1682
+ return () => {
1683
+ a3(), n3();
1684
+ };
1685
+ }, [c2]);
1686
+ const d2 = v((e3) => {
1687
+ const { commandButtonProps: t3, commandPopupProps: a3 } = e3, r3 = x(Ir, { ...a3, command: o2.getCommand("formatFontColor"), icon: x(Ho, {}), isSplit: true, panelProps: { disableAlpha: true } }), i3 = x(Ir, { ...a3, command: o2.getCommand("formatFillColor"), icon: x(Wo, {}), isSplit: true, panelProps: { disableAlpha: true, autoColorLabel: "No Fill", autoColorPosition: lr.End } }), s3 = o2.getCommand("undo") ? x(y, { children: x(zr, { ...a3, quickCommand: "undo" }) }) : null, c3 = o2.getCommand("find") ? x(y, { children: x(Pr, { ...a3 }) }) : null;
1688
+ let d3 = null;
1689
+ l2 && (d3 = b(y, { children: [x(ie, {}), x(Zl, { ...a3 })] }));
1690
+ return b(Wl, { parentFloat: n2, children: [s3, null, s3 ? x(ie, {}) : null, x(jr, { ...a3, command: o2.getCommand("paste") }), x(le, { ...t3, command: o2.getCommand("formatPainterToggle"), icon: re(x(zo, {})) }), x(ul, { ...t3, command: o2.getCommand("copy") }), x(ie, {}), x(Vr, { ...a3, command: o2.getCommand("formatFontFamily") }), x(Rr, { ...a3, command: o2.getCommand("formatFontSize") }), x(le, { ...t3, command: o2.getCommand("formatBoldToggle"), icon: x($o, {}) }), x(le, { ...t3, command: o2.getCommand("formatItalicToggle"), icon: x(Oo, {}) }), x(Ur, { ...a3 }), x(Gr, { ...a3 }), r3, x(ie, {}), i3, x(vr, { ...a3 }), x(Tr, { ...a3 }), x(ie, {}), x(tr, { ...a3 }), x(or, { ...a3 }), x(nr, { ...a3 }), x(ar, { ...a3 }), x(ie, {}), x(Fr, { ...a3 }), x(Zr, { command: o2.getCommand("formatCellStyle"), ...a3 }), x(al, { command: o2.getCommand("formatTableStyle"), ...a3 }), x(ie, {}), x(Er, { ...a3 }), x(Ar, { ...a3 }), x(ie, {}), x(Nr, { ...a3 }), null, x(Br, { ...a3 }), x(Hr, { ...a3 }), c3, d3] });
1691
+ }, [o2, s2, l2]);
1692
+ return x(Ao, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: d2, ...r2 });
1652
1693
  }));
1653
- Zl.displayName = "HomeToolbar";
1654
- const Jl = k(S((e2, t2) => {
1694
+ Jl.displayName = "HomeToolbar";
1695
+ const Yl = k(S((e2, t2) => {
1655
1696
  const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = na((e3) => {
1656
1697
  const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
1657
1698
  return b(Wl, { parentFloat: n2, children: [null, x(le, { ...t3, command: o2.getCommand("updateHyperlink"), icon: re(x(Vo, {})) }), x(le, { ...t3, command: o2.getCommand("updateComments"), icon: re(x(Go, {})) }), x(pl, { ...a3 }), x(le, { ...t3, command: o2.getCommand("insertTable"), icon: re(x(So, {})) })] });
1658
1699
  }, [o2]);
1659
1700
  return x(Ao, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1660
1701
  }));
1661
- Jl.displayName = "InsertToolbar";
1662
- const Yl = k(S((e2, t2) => {
1702
+ Yl.displayName = "InsertToolbar";
1703
+ const Ql = k(S((e2, t2) => {
1663
1704
  const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = na((e3) => {
1664
1705
  const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
1665
- return b(Wl, { parentFloat: n2, children: [x(Dr, { ...a3 }), x(le, { ...t3, command: o2.getCommand("protectionSheetToggle"), icon: x(Kn, { color: "secondary" }) }), x(ie, {}), x(Lr, { ...a3 }), x(_r, { ...a3 }), 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(qr, { ...a3 }), x(dl, { command: o2.getCommand("selectTheme"), ...a3 }), x(ie, {}), x(Xl, { ...a3, scope: "view" }), x(ie, {}), x(le, { ...t3, command: o2.getCommand("fullScreenToggle"), scope: "view", icon: () => re(o2.getCommand("fullScreenToggle").state() ? x(Uo, {}) : x(jo, {})) })] });
1706
+ return b(Wl, { parentFloat: n2, children: [x(Dr, { ...a3 }), x(le, { ...t3, command: o2.getCommand("protectionSheetToggle"), icon: x(Kn, { color: "secondary" }) }), x(ie, {}), x(Lr, { ...a3 }), x(_r, { ...a3 }), 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(qr, { ...a3 }), x(cl, { command: o2.getCommand("selectTheme"), ...a3 }), x(ie, {}), x(Zl, { ...a3, scope: "view" }), x(ie, {}), x(le, { ...t3, command: o2.getCommand("fullScreenToggle"), scope: "view", icon: () => re(o2.getCommand("fullScreenToggle").state() ? x(Uo, {}) : x(jo, {})) })] });
1666
1707
  }, [o2]);
1667
1708
  return x(Ao, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
1668
1709
  }));
1669
- Yl.displayName = "ViewToolbar";
1670
- const Ql = (e2) => x(ni, { ...e2 }), ei = k((e2) => {
1710
+ Ql.displayName = "ViewToolbar";
1711
+ const ei = (e2) => x(ai, { ...e2 }), ti = k((e2) => {
1671
1712
  const { sx: t2, ...o2 } = e2;
1672
1713
  return b(A, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (e3) => `${ka(e3.palette.primary.main, 0.35)} solid 2px` } }, children: [x(ee, { disableRipple: true, onMouseDown: (e3) => {
1673
1714
  0 === e3.button && e3.preventDefault();
1674
1715
  }, 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" } })] });
1675
- }), ti = k((e2) => {
1716
+ }), oi = k((e2) => {
1676
1717
  const { toolbars: t2, value: o2, onToolbarChange: n2, sx: a2, ...r2 } = e2, l2 = C(() => {
1677
1718
  const e3 = [];
1678
- for (let o3 = 0; o3 < t2.length; o3++) e3.push(x(ei, { label: t2[o3].label }, t2[o3].label));
1719
+ for (let o3 = 0; o3 < t2.length; o3++) e3.push(x(ti, { label: t2[o3].label }, t2[o3].label));
1679
1720
  return e3;
1680
1721
  }, [t2]);
1681
1722
  return x(Q, { value: o2, onChange: (e3, t3) => {
1682
1723
  n2?.(t3);
1683
1724
  }, 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" }, ...a2 }, TabIndicatorProps: { children: x("span", { className: "MuiTabs-indicatorSpan" }) }, ...r2, children: l2 });
1684
- }), oi = k((e2) => {
1725
+ }), ni = k((e2) => {
1685
1726
  const { toolbars: t2, value: o2, onToolbarChange: n2, selectProps: a2, ...r2 } = e2, l2 = v((e3) => {
1686
1727
  n2?.(e3.target.value);
1687
1728
  }, [n2]), i2 = C(() => {
@@ -1695,37 +1736,39 @@ const Ql = (e2) => x(ni, { ...e2 }), ei = k((e2) => {
1695
1736
  return e3;
1696
1737
  }, [t2, o2]);
1697
1738
  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 } }, ...a2 }, size: "small", children: x(Y, { value: o2, onChange: l2, variant: "outlined", sx: { backgroundImage: `linear-gradient(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(5))})` }, ...r2, children: i2 }) });
1698
- }), ni = k(S((e2, t2) => {
1699
- const { commands: o2, selectWrapper: n2, selectProps: a2 = {}, renderCompact: r2 = false, paletteWrapper: l2, toolbarsProps: i2, paletteProps: s2 = {}, workbook: d2, sx: c2, ...m2 } = e2, p2 = C(() => {
1739
+ }), ai = k(S((e2, t2) => {
1740
+ const { commands: o2, selectWrapper: n2, selectProps: a2 = {}, renderCompact: r2 = false, paletteWrapper: l2, toolbarsProps: i2, paletteProps: s2 = {}, workbook: c2, sx: d2, ...m2 } = e2, p2 = C(() => {
1700
1741
  const e3 = [], { ref: t3, ...n3 } = i2?.Home || {};
1701
- e3.push({ label: "Home", component: x(Zl, { commands: o2, ...n3 }) });
1742
+ e3.push({ label: "Home", component: x(Jl, { commands: o2, ...n3 }) });
1702
1743
  const { ref: a3, ...r3 } = i2?.Insert || {};
1703
- e3.push({ label: "Insert", component: x(Jl, { commands: o2, ...r3 }) });
1744
+ e3.push({ label: "Insert", component: x(Yl, { commands: o2, ...r3 }) });
1704
1745
  const { ref: l3, ...s3 } = i2?.View || {};
1705
- return e3.push({ label: "View", component: x(Yl, { commands: o2, ...s3 }) }), e3;
1706
- }, [o2, d2]), u2 = C(() => {
1746
+ return e3.push({ label: "View", component: x(Ql, { commands: o2, ...s3 }) }), e3;
1747
+ }, [o2, c2]), u2 = C(() => {
1707
1748
  const e3 = [];
1708
1749
  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 }));
1709
1750
  return e3;
1710
1751
  }, [p2]), [g2, h2] = D(0), f2 = (e3) => {
1711
1752
  h2(e3);
1712
- }, y2 = C(() => x(r2 ? oi : ti, { toolbars: p2, value: g2, onToolbarChange: f2, sx: a2 }), [p2, g2, a2, r2]), { sx: k2, ...S2 } = s2, v2 = x(X, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, backgroundImage: `linear-gradient(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(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] });
1713
- 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] });
1753
+ }, y2 = C(() => x(r2 ? ni : oi, { toolbars: p2, value: g2, onToolbarChange: f2, sx: a2 }), [p2, g2, a2, r2]), { sx: k2, ...S2 } = s2, v2 = x(X, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, backgroundImage: `linear-gradient(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(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] });
1754
+ return b(A, { ref: t2, className: "toolbarWrappers", sx: { display: "flex", flexDirection: "column", paddingTop: (e3) => e3.spacing(0.5), "*": { userSelect: "none" }, ...d2 }, ...m2, children: [n2 ? n2(y2) : y2, l2 ? l2(v2) : v2] });
1714
1755
  }));
1715
- ni.displayName = "WorkbookToolbars";
1716
- const ai = (e2) => {
1717
- const { workbook: t2, workbookElement: o2, notifier: n2, target: a2, commands: r2, darkMode: l2, onShowSidebar: i2, onNewWorkbook: s2 = ri } = e2, [d2, c2] = D(t2?.getSelectedSheet()), [m2, p2] = D(t2?.getSheets().getItems()), g2 = na(i2, [i2]), h2 = na(s2, [s2]), f2 = C(() => [new ua("workbookStatistics", a2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [ha.Ctrl, ha.Shift] } }), new ua("showFormat", a2, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [ha.Ctrl, ha.Shift] } }), new ga("newCellStyle", a2, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later." }), new ga("deleteCellStyle", a2, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new ga("modifyCellStyle", a2, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new ua("find", a2, { label: "Find", description: "Open the Find window.", shortcut: [{ key: "F", modifiers: [ha.Ctrl] }, { key: "F5", modifiers: [ha.Shift] }] }), new ua("findReplace", a2, { label: "Find & Replace", description: "Open the Find & Replace window.", shortcut: [{ key: "H", modifiers: [ha.Ctrl] }, { key: "H", modifiers: [ha.Ctrl, ha.Alt] }] }), new ua("goto", a2, { label: "Go To", description: "Open the 'Go To' window.", shortcut: [{ key: "G", modifiers: [ha.Ctrl] }] }), new ua("workbookViewToggleExpandFormulaBar", a2, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [ha.Ctrl, ha.Shift] } }), new ua("workbookViewToggleShowFormulaBar", a2, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new ua("workbookViewToggleShowTabs", a2, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new ua("workbookViewToggleShowStatusBar", a2, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new ua("workbookViewToggleShowHorizontalScrollBar", a2, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new ua("workbookViewToggleShowVerticalScrollBar", a2, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new ga("hideSheet", a2, { 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 ga("deleteSheet", a2, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new ga("addSheet", a2, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [ha.Shift] }, { key: "F1", modifiers: [ha.Alt, ha.Shift] }] }), new ga("duplicateSheet", a2, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new ga("nextSheet", a2, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [ha.Ctrl] }] }), new ga("previousSheet", a2, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [ha.Ctrl] }] }), new ga("selectNextSheet", a2, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [ha.Ctrl, ha.Shift] }] }), new ga("selectPreviousSheet", a2, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [ha.Ctrl, ha.Shift] }] }), new ga("selectTheme", a2, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new ga("selectNamed", a2, { label: (e3) => e3?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (e3) => e3?.getName() ?? "Select" }, description: "Select the item." }), new ga("addNamedReference", a2, { 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 ga("editNamedReference", a2, { label: "Edit Named Reference…", scopedLabels: { namedItem: "Edit…" }, description: "Add a new named reference. Names can be used as a substitute for cell references." }), new ga("deleteNamedReference", a2, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference." }), new ua("activeNameBox", a2, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [ha.Alt] } }), new ua("createNamedReferenceFromSelection", a2, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [ha.Ctrl, ha.Shift] } }), new ua("activeNameManager", a2, { 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: [ha.Ctrl] } }), new ga("fullScreenToggle", a2, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" } }), new ga("showScriptEditor", a2, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", shortcut: [{ key: "F11", modifiers: [ha.Alt] }] }, function(e3 = true) {
1718
- g2?.();
1719
- }), new ga("executeScript", a2, { label: "Run Script", description: "Run the selected or last executed script.", shortcut: { key: "F8" } }), new ga("executeSelectedScript", a2, { label: "Run Script", description: "Run the selected script.", shortcut: { key: "F8" } }), new ga("saveScripts", a2, { label: "Save Script", description: "Save the current scripts." }), new ga("maximumWorkbookToggle", a2, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [ha.Ctrl] } }), new ga("spellCheck", a2, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new ga("calculateAll", a2, { label: "Calculate Now", description: "Recalculate all formulas.", shortcut: { key: "F9" } }), new ua("closeWorkbook", a2, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [ha.Ctrl] } }), new ua("newWorkbook", a2, { label: "New Workbook", description: "Create a new workbook in another tab." })], []), x2 = C(() => {
1756
+ ai.displayName = "WorkbookToolbars";
1757
+ const ri = (e2) => {
1758
+ const { workbook: t2, workbookElement: o2, notifier: n2, target: a2, commands: r2, darkMode: l2, onShowSidebar: i2, onNewWorkbook: s2 = li } = e2, [c2, d2] = D(t2?.getSelectedSheet()), [m2, p2] = D(t2?.getSheets().getItems()), g2 = na(i2, [i2]), h2 = na(s2, [s2]), f2 = C(() => [new ua("workbookStatistics", a2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [ha.Ctrl, ha.Shift] } }), new ua("showFormat", a2, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [ha.Ctrl, ha.Shift] } }), new ga("newCellStyle", a2, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later." }), new ga("deleteCellStyle", a2, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new ga("modifyCellStyle", a2, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new ua("find", a2, { label: "Find", description: "Open the Find window.", shortcut: [{ key: "F", modifiers: [ha.Ctrl] }, { key: "F5", modifiers: [ha.Shift] }] }), new ua("findReplace", a2, { label: "Find & Replace", description: "Open the Find & Replace window.", shortcut: [{ key: "H", modifiers: [ha.Ctrl] }, { key: "H", modifiers: [ha.Ctrl, ha.Alt] }] }), new ua("goto", a2, { label: "Go To", description: "Open the 'Go To' window.", shortcut: [{ key: "G", modifiers: [ha.Ctrl] }] }), new ua("workbookViewToggleExpandFormulaBar", a2, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [ha.Ctrl, ha.Shift] } }), new ua("workbookViewToggleShowFormulaBar", a2, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new ua("workbookViewToggleShowTabs", a2, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new ua("workbookViewToggleShowStatusBar", a2, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new ua("workbookViewToggleShowHorizontalScrollBar", a2, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new ua("workbookViewToggleShowVerticalScrollBar", a2, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new ga("hideSheet", a2, { 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 ga("deleteSheet", a2, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new ga("addSheet", a2, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [ha.Shift] }, { key: "F1", modifiers: [ha.Alt, ha.Shift] }] }), new ga("duplicateSheet", a2, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new ga("nextSheet", a2, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [ha.Ctrl] }] }), new ga("previousSheet", a2, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [ha.Ctrl] }] }), new ga("selectNextSheet", a2, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [ha.Ctrl, ha.Shift] }] }), new ga("selectPreviousSheet", a2, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [ha.Ctrl, ha.Shift] }] }), new ga("selectTheme", a2, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new ga("selectNamed", a2, { label: (e3) => e3?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (e3) => e3?.getName() ?? "Select" }, description: "Select the item." }), new ga("addNamedReference", a2, { 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 ga("editNamedReference", a2, { label: "Edit Named Reference…", scopedLabels: { namedItem: "Edit…" }, description: "Add a new named reference. Names can be used as a substitute for cell references." }), new ga("deleteNamedReference", a2, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference." }), new ua("activeNameBox", a2, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [ha.Alt] } }), new ua("createNamedReferenceFromSelection", a2, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [ha.Ctrl, ha.Shift] } }), new ua("activeNameManager", a2, { 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: [ha.Ctrl] } }), new ga("fullScreenToggle", a2, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" } }), new ga("showScriptEditor", a2, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", shortcut: [{ key: "F11", modifiers: [ha.Alt] }] }), new ga("executeScript", a2, { label: "Run Script", description: "Run the selected or last executed script.", shortcut: { key: "F8" } }), new ga("executeSelectedScript", a2, { label: "Run Script", description: "Run the selected script.", shortcut: { key: "F8" } }), new ga("saveScripts", a2, { label: "Save Script", description: "Save the current scripts." }), new ga("maximumWorkbookToggle", a2, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [ha.Ctrl] } }), new ga("spellCheck", a2, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new ga("calculateAll", a2, { label: "Calculate Now", description: "Recalculate all formulas.", shortcut: { key: "F9" } }), new ua("closeWorkbook", a2, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [ha.Ctrl] } }), new ua("newWorkbook", a2, { label: "New Workbook", description: "Create a new workbook in another tab." })], []), x2 = C(() => {
1720
1759
  let e3 = null;
1721
1760
  return e3 = r2 ? r2.createChildGroup(a2, "workbook", false) : new fa(a2, "workbook"), e3.addCommands(f2, true), e3;
1722
1761
  }, [r2, f2]), b2 = ia(), y2 = w.useRef(null), k2 = na(() => {
1723
1762
  let e3, o3 = null;
1724
1763
  const a3 = x2.getCommand("executeScript");
1725
1764
  if (a3.update({ disabled: false, context: { getScripts: () => t2.getScripts() } }), !a3) return;
1726
- const r3 = x2.getCommand("executeSelectedScript");
1727
- if (!r3) return;
1728
- const l3 = { saveSource: async (e4) => {
1765
+ const r3 = x2.getCommand("showScriptEditor");
1766
+ r3.updateCallback(function(e4 = true) {
1767
+ o3 ? o3.close() : g2?.();
1768
+ });
1769
+ const l3 = x2.getCommand("executeSelectedScript");
1770
+ if (!l3) return;
1771
+ const i3 = { saveSource: async (e4) => {
1729
1772
  let o4 = null, a4 = null;
1730
1773
  const r4 = t2.getScripts();
1731
1774
  try {
@@ -1742,21 +1785,21 @@ const ai = (e2) => {
1742
1785
  S2.current = null;
1743
1786
  }), setSelectedFunction: (t3) => {
1744
1787
  e3 = t3 ?? y2.current ?? null, Promise.resolve(e3).then((e4) => {
1745
- r3.update({ disabled: null === e4 });
1788
+ l3.update({ disabled: null === e4 });
1746
1789
  });
1747
1790
  }, quickInsertFunction: (e4) => {
1748
1791
  const t3 = `=${e4.toUpperCase()}(`, o4 = { text: t3 + ")", editMode: true, initialSelection: { start: t3.length, end: t3.length + 0 } };
1749
1792
  b2.setMode((e5) => "edit" === e5?.key ? { ...e5, args: { ...e5.args } } : { key: "edit", args: { stateAndCoords: null, start: o4 } });
1750
1793
  }, getSelectedFunction: () => e3, setEditor: (e4) => {
1751
- o3 = e4 ?? null, x2.getCommand("showScriptEditor")?.update({ state: null !== e4 });
1794
+ o3 = e4 ?? null, r3.update({ state: null !== o3 });
1752
1795
  }, getEditor: () => o3, getRanges: (e4) => {
1753
1796
  try {
1754
1797
  return t2.getRanges(e4);
1755
1798
  } catch (e5) {
1756
1799
  }
1757
1800
  return null;
1758
- }, getScripts: () => t2.getScripts(), isReadOnly: () => false === t2.getProtection().isStructureAllowed() };
1759
- r3.update({ context: l3 });
1801
+ }, getScripts: () => t2.getScripts() };
1802
+ l3.update({ context: i3 });
1760
1803
  }, [x2, t2, o2, n2]), S2 = w.useRef(null);
1761
1804
  Pa(t2, { onBeforeSave: async () => {
1762
1805
  await S2.current?.onBeforeSave();
@@ -1769,7 +1812,7 @@ const ai = (e2) => {
1769
1812
  } }), Pa(t2, { onSheetsChange: (e3) => {
1770
1813
  p2(e3.getSheets().getItems());
1771
1814
  }, onViewChange(e3) {
1772
- c2(e3?.getSelectedSheet());
1815
+ d2(e3?.getSelectedSheet());
1773
1816
  }, onProtectionChange: (e3) => {
1774
1817
  const t3 = { disabled: !e3.getProtection().isStructureAllowed() };
1775
1818
  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);
@@ -1785,7 +1828,7 @@ const ai = (e2) => {
1785
1828
  const r3 = t2.getScripts();
1786
1829
  if (e3?.declaration || e3?.functionName) {
1787
1830
  const t3 = e3.declaration ? e3.declaration.getName() : e3.functionName;
1788
- r3.searchFunction({ name: t3 }).length > 0 && (a3 = t3);
1831
+ (await r3.searchFunctions({ name: t3 })).length > 0 && (a3 = t3);
1789
1832
  }
1790
1833
  if (a3) try {
1791
1834
  await r3.executeMacro(a3);
@@ -1860,8 +1903,8 @@ const ai = (e2) => {
1860
1903
  try {
1861
1904
  const r4 = e3?.scope ?? "sheet";
1862
1905
  let i3 = null;
1863
- const s3 = t2.getSelectedSheet(), d3 = { from: s3.getSelectedCell(), ...e3.findOptions };
1864
- if (i3 = "sheet" === r4 ? t2.getSelectedSheet().find(e3.findText, d3) : t2.find(e3.findText, d3), e3.replace) {
1906
+ const s3 = t2.getSelectedSheet(), c3 = { from: s3.getSelectedCell(), ...e3.findOptions };
1907
+ if (i3 = "sheet" === r4 ? t2.getSelectedSheet().find(e3.findText, c3) : t2.find(e3.findText, c3), e3.replace) {
1865
1908
  const n3 = t2.replace(i3, e3.replaceText, e3.replaceOptions);
1866
1909
  o3 = n3.count, e3.replaceOptions.maxCount && (a3 = n3.last);
1867
1910
  } else {
@@ -1885,7 +1928,7 @@ const ai = (e2) => {
1885
1928
  try {
1886
1929
  await e4.select();
1887
1930
  } catch (e5) {
1888
- n2?.showMessage?.(e5.message, { type: da.Error });
1931
+ n2?.showMessage?.(e5.message, { type: ca.Error });
1889
1932
  }
1890
1933
  } };
1891
1934
  return n2.showWindow?.("namedDetails", o3);
@@ -1906,7 +1949,7 @@ const ai = (e2) => {
1906
1949
  try {
1907
1950
  await t2.getRanges(e5).select();
1908
1951
  } catch (e6) {
1909
- n2?.showMessage?.(e6.message, { type: da.Error });
1952
+ n2?.showMessage?.(e6.message, { type: ca.Error });
1910
1953
  }
1911
1954
  }, onKeyDown: (e5) => {
1912
1955
  x2.findCommandByEvent(e5) === x2.getCommand("goto") && e5.preventDefault();
@@ -1946,11 +1989,11 @@ const ai = (e2) => {
1946
1989
  }, [T2, v2]), P(() => {
1947
1990
  const e3 = t2.getProtection().isStructureAllowed();
1948
1991
  x2.getCommand("hideSheet").update({ disabled: m2.length <= 1 || !e3 }), x2.getCommand("deleteSheet").update({ disabled: m2.length <= 1 || !e3 });
1949
- }, [m2, d2]), x2;
1950
- }, ri = () => {
1992
+ }, [m2, c2]), x2;
1993
+ }, li = () => {
1951
1994
  window.open(window.origin.toString(), "sheetxl-" + n.uuidV4(), "popup=true");
1952
- }, li = "_sheetxl-theme_4opcr_2", ii = "_sheetxl-workbook_1j3lu_5", si = (e2) => x(Ml, { ...e2 }), di = (e2) => x(Fl, { ...e2 }), ci = (e2) => x(Rl, { ...e2 }), mi = k(S((e2, t2) => {
1953
- const { workbook: o2, commands: n2, onBeforeUserChange: a2, onUserChange: r2, disabled: l2 = false, readOnly: i2 = false, contextMenuProps: s2, renderContextMenu: d2 = si, sheetsAllProps: c2, renderSheetsAll: m2 = di, sheetTabProps: p2, renderSheetTab: u2, background: g2 = "transparent", className: h2, notifier: f2, sx: y2, borderWidth: w2, borderColor: k2, gridTheme: S2, gridStyle: T2, ...R2 } = e2, [F2, B2] = D(o2?.getSelectedSheetIndex()), [N2, E2] = D(o2?.getSheets().getItems()), [I2, H2] = D(o2?.getProtection());
1995
+ }, ii = "_sheetxl-theme_4opcr_2", si = "_sheetxl-workbook_1j3lu_5", ci = (e2) => x(Ml, { ...e2 }), di = (e2) => x(Fl, { ...e2 }), mi = (e2) => x(Rl, { ...e2 }), pi = k(S((e2, t2) => {
1996
+ const { workbook: o2, commands: n2, onBeforeUserChange: a2, onUserChange: r2, disabled: l2 = false, readOnly: i2 = false, contextMenuProps: s2, renderContextMenu: c2 = ci, sheetsAllProps: d2, renderSheetsAll: m2 = di, sheetTabProps: p2, renderSheetTab: u2, background: g2 = "transparent", className: h2, notifier: f2, sx: y2, borderWidth: w2, borderColor: k2, gridTheme: S2, gridStyle: T2, ...R2 } = e2, [F2, B2] = D(o2?.getSelectedSheetIndex()), [N2, E2] = D(o2?.getSheets().getItems()), [I2, H2] = D(o2?.getProtection());
1954
1997
  Pa(o2, { onViewChange(e3) {
1955
1998
  B2(e3?.getSelectedSheetIndex());
1956
1999
  }, onSheetsChange: (e3) => {
@@ -1974,11 +2017,11 @@ const ai = (e2) => {
1974
2017
  o2.getSheets().add({ name: void 0, autoSelect: true }), r2?.(e3);
1975
2018
  }, [o2, a2, r2, F2]), U2 = C(() => ({ placement: "top-start" }), []), j2 = M(null), [_2, q2] = D(false), K2 = v((e3) => {
1976
2019
  const { closeFloatAll: t3, floatReference: n3 } = e3;
1977
- return m2({ workbook: o2, gridStyle: T2, floatReference: n3, closeFloatAll: t3, ...c2 });
1978
- }, [m2, c2, l2, o2, T2]), { reference: X2, component: Z2 } = bo({ 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) => {
2020
+ return m2({ workbook: o2, gridStyle: T2, floatReference: n3, closeFloatAll: t3, ...d2 });
2021
+ }, [m2, d2, l2, o2, T2]), { reference: X2, component: Z2 } = bo({ 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) => {
1979
2022
  const { floatReference: t3 } = e3;
1980
- return d2?.({ workbook: o2, index: Y2?.index, tabStripRef: J2.current, commands: n2, disabled: l2, floatReference: t3, ...s2 });
1981
- }, [d2, s2, l2, o2, n2, Y2]), { reference: te2, component: oe2 } = bo({ label: "sheetTab", popperProps: U2, anchor: { getBoundingClientRect: () => new DOMRect(Y2?.left || 0, Y2?.top || 0, 0, 0) }, onClose: () => Q2(null), createPopupPanel: ee2 });
2023
+ return c2?.({ workbook: o2, index: Y2?.index, tabStripRef: J2.current, commands: n2, disabled: l2, floatReference: t3, ...s2 });
2024
+ }, [c2, s2, l2, o2, n2, Y2]), { reference: te2, component: oe2 } = bo({ label: "sheetTab", popperProps: U2, anchor: { getBoundingClientRect: () => new DOMRect(Y2?.left || 0, Y2?.top || 0, 0, 0) }, onClose: () => Q2(null), createPopupPanel: ee2 });
1982
2025
  P(() => {
1983
2026
  Y2 ? te2.open(0) : te2.close(0);
1984
2027
  }, [Y2]);
@@ -1991,7 +2034,7 @@ const ai = (e2) => {
1991
2034
  } catch (e4) {
1992
2035
  }
1993
2036
  if (!t3) return null;
1994
- return (u2 ?? ci)({ sheet: t3, gridTheme: S2, onContextMenu: (t4) => {
2037
+ return (u2 ?? mi)({ sheet: t3, gridTheme: S2, onContextMenu: (t4) => {
1995
2038
  $2(e3.index), ne2(t4, e3.index);
1996
2039
  }, ...e3, ...p2 });
1997
2040
  }, [u2, p2, o2, S2]), re2 = C(() => W2 ? 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) => {
@@ -2010,15 +2053,15 @@ const ai = (e2) => {
2010
2053
  _2 ? X2.close(0) : X2.open(0);
2011
2054
  }, icon: x(Qn, {}) }) }) }), 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: re2 }), x("div", { style: { borderTop: `solid ${k2} ${w2}px`, flex: 1, minWidth: "24px" } }), oe2, Z2] });
2012
2055
  }));
2013
- mi.displayName = "WorkbookStrip";
2014
- const pi = k(S((e2, t2) => {
2015
- const { workbook: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, className: i2, ...s2 } = e2, [d2, c2] = B((e3) => e3 + 1, 0), [m2, p2] = D(o2.getSelectedSheet()), [u2, g2] = D(m2.getSelectedRanges()), [h2, f2] = D(m2.getSelectedCell());
2056
+ pi.displayName = "WorkbookStrip";
2057
+ const ui = k(S((e2, t2) => {
2058
+ const { workbook: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, className: i2, ...s2 } = e2, [c2, d2] = B((e3) => e3 + 1, 0), [m2, p2] = D(o2.getSelectedSheet()), [u2, g2] = D(m2.getSelectedRanges()), [h2, f2] = D(m2.getSelectedCell());
2016
2059
  Pa(o2, { onSheetsChange() {
2017
2060
  p2(o2.getSelectedSheet());
2018
2061
  } }), Pa(m2.getSelection(), { onChange() {
2019
2062
  g2(m2.getSelectedRanges()), f2(m2.getSelectedCell());
2020
2063
  } }), ta(n2, [], { onChange: () => {
2021
- c2();
2064
+ d2();
2022
2065
  } });
2023
2066
  const w2 = C(() => ({}), []), k2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
2024
2067
  }, onError() {
@@ -2046,15 +2089,15 @@ const pi = k(S((e2, t2) => {
2046
2089
  const I2 = b(y, { children: [x(le, { command: n2.getCommand("cut"), ...S2, icon: x(tn, {}) }), x(ul, { command: n2.getCommand("copy"), ...S2 }), x(jr, { command: n2.getCommand("paste"), ...v2, includePasteAllInPopup: false }), x(ie, { orientation: "horizontal" }), x(Hr, { ...v2 }), x(ie, { orientation: "horizontal" }), x(Er, { commands: n2, ...v2, disableSheet: true }), x(Ar, { commands: n2, ...v2, disableSheet: true }), x(Br, { ...v2 }), M2, T2] });
2047
2090
  return x(A, { ref: t2, className: In("menu", i2), sx: { ...r2 }, ...s2, children: I2 });
2048
2091
  }));
2049
- pi.displayName = "WorkbookContextMenu";
2050
- const ui = k(S((e2, t2) => {
2092
+ ui.displayName = "WorkbookContextMenu";
2093
+ const gi = k(S((e2, t2) => {
2051
2094
  const { movable: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, ...i2 } = e2;
2052
2095
  Pa(o2, { onAnyChange(e3) {
2053
2096
  } });
2054
- const s2 = C(() => ({}), []), d2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
2097
+ const s2 = C(() => ({}), []), c2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
2055
2098
  }, onError() {
2056
2099
  console.log("onError");
2057
- } }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = C(() => ({ variant: oa.Menuitem, ...s2, ...d2 }), [s2, d2]), m2 = C(() => ({ commands: n2, variant: oa.Menuitem, parentFloat: l2, ...d2 }), [n2, d2, l2]), p2 = (e3) => {
2100
+ } }, disabled: a2, parentFloat: l2 }), [a2, l2]), d2 = C(() => ({ variant: oa.Menuitem, ...s2, ...c2 }), [s2, c2]), m2 = C(() => ({ commands: n2, variant: oa.Menuitem, parentFloat: l2, ...c2 }), [n2, c2, l2]), p2 = (e3) => {
2058
2101
  const t3 = e3?.key();
2059
2102
  switch (t3) {
2060
2103
  case "moveToFront":
@@ -2074,9 +2117,9 @@ const ui = k(S((e2, t2) => {
2074
2117
  case "formatDrawAlignRight":
2075
2118
  return re(x(mn, {}));
2076
2119
  case "formatDrawAlignTop":
2077
- return re(x(cn, {}));
2078
- case "formatDrawAlignMiddle":
2079
2120
  return re(x(dn, {}));
2121
+ case "formatDrawAlignMiddle":
2122
+ return re(x(cn, {}));
2080
2123
  case "formatDrawAlignBottom":
2081
2124
  return re(x(sn, {}));
2082
2125
  case "formatDrawDistributeHorz":
@@ -2090,7 +2133,7 @@ const ui = k(S((e2, t2) => {
2090
2133
  default:
2091
2134
  return null;
2092
2135
  }
2093
- }, u2 = b(y, { children: [x(ul, { command: n2.getCommand("copy"), ...c2, variant: oa.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: re(x(on, {})) }), x(ie, { orientation: "horizontal" }), x(Jt, { ...m2, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: (e3) => {
2136
+ }, u2 = b(y, { children: [x(ul, { command: n2.getCommand("copy"), ...d2, variant: oa.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, { ...d2, command: n2.getCommand("toggleLockAspectRatio"), icon: re(x(on, {})) }), x(ie, { orientation: "horizontal" }), x(Jt, { ...m2, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: (e3) => {
2094
2137
  const t3 = p2(e3);
2095
2138
  return t3 || re(x(nn, {}));
2096
2139
  }, tooltip: "Quickly change the placement of your drawings." }), x(ie, { orientation: "horizontal" }), x(Jt, { ...m2, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: (e3) => {
@@ -2099,14 +2142,14 @@ const ui = k(S((e2, t2) => {
2099
2142
  }, tooltip: "Determine how the drawing size will adjust as the cell sizes adjust." }), []] });
2100
2143
  return x(A, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", ...r2 }, ...i2, children: u2 });
2101
2144
  }));
2102
- ui.displayName = "MovableContextMenu";
2103
- const gi = (e2) => x(ui, { ...e2 }), hi = (e2) => x(pi, { ...e2 }), fi = (e2) => x(Dl, { ...e2 }), xi = (e2, t2) => x(Tl, { ref: t2, ...e2 }), bi = (e2) => x(Pe, { ...e2 }), yi = (e2, t2) => x(Ea, { ref: t2, ...e2 }), wi = (e2) => x(Sl, { ...e2 }), ki = (e2) => x(mi, { ...e2 }), Si = { fireOnModelChange: false }, Ci = { flex: "1 1 100%", display: "flex" }, vi = k(S((e2, t2) => {
2104
- const { workbook: o2, createWorkbookOptions: a2, onNewWorkbook: r2, 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: F2 = xi, showTabs: N2, tabsProps: L2, renderTabs: H2 = ki, showStatusBar: W2, statusBarProps: z2, renderStatusBar: $2 = wi, toolbarProps: O2, renderToolbar: V2 = Ql, contextMenuSx: G2, renderContextMenu: U2 = hi, renderFilterMenu: j2 = fi, renderMovableMenu: _2 = gi, renderLoadingPanel: q2 = bi, loadingPanelProps: K2, sheetProps: Z2, renderSheet: J2 = yi, showHorizontalScrollbar: Y2, showVerticalScrollbar: Q2, gridTheme: ee2, headersTheme: te2, enableDarkImages: oe2, ...ne2 } = e2, ae2 = wa(), re2 = Ba(), le2 = C(() => {
2145
+ gi.displayName = "MovableContextMenu";
2146
+ const hi = (e2) => x(gi, { ...e2 }), fi = (e2) => x(ui, { ...e2 }), xi = (e2) => x(Dl, { ...e2 }), bi = (e2, t2) => x(Tl, { ref: t2, ...e2 }), yi = (e2) => x(Pe, { ...e2 }), wi = (e2, t2) => x(Ea, { ref: t2, ...e2 }), ki = (e2) => x(Sl, { ...e2 }), Si = (e2) => x(pi, { ...e2 }), Ci = { fireOnModelChange: false }, vi = { flex: "1 1 100%", display: "flex" }, Ti = k(S((e2, t2) => {
2147
+ const { workbook: o2, createWorkbookOptions: a2, onNewWorkbook: r2, onElementLoad: l2, notifier: i2, autoFocus: s2 = false, sx: c2, style: d2, className: m2, onFocus: p2, onBlur: u2, onKeyDown: g2, onRepeatCommandChange: k2, commands: S2, showFormulaBar: T2, formulaBarProps: R2, renderFormulaBar: F2 = bi, showTabs: N2, tabsProps: L2, renderTabs: H2 = Si, showStatusBar: W2, statusBarProps: z2, renderStatusBar: $2 = ki, toolbarProps: O2, renderToolbar: V2 = ei, contextMenuSx: G2, renderContextMenu: U2 = fi, renderFilterMenu: j2 = xi, renderMovableMenu: _2 = hi, renderLoadingPanel: q2 = yi, loadingPanelProps: K2, sheetProps: Z2, renderSheet: J2 = wi, showHorizontalScrollbar: Y2, showVerticalScrollbar: Q2, gridTheme: ee2, headersTheme: te2, enableDarkImages: oe2, ...ne2 } = e2, ae2 = wa(), re2 = Ba(), le2 = C(() => {
2105
2148
  const e3 = { theme: re2.getDefaultTheme(), ...a2 };
2106
2149
  return o2 ?? new h(e3);
2107
- }, [o2]), ie2 = M(null), [se2, de2] = D(false), ce2 = M(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(() => {
2150
+ }, [o2]), ie2 = M(null), [se2, ce2] = D(false), de2 = M(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: de2 }), []), [pe2, ue2] = D(false), [ge2, he2] = D(false), fe2 = v(() => {
2108
2151
  ue2(true);
2109
- }, []), xe2 = M(null), be2 = ca(t2, () => ({ isWorkbookElement: () => true, getWorkbook: () => le2, getSheetElement: () => ie2.current, getViewportElement: () => ce2.current, getFormulaBarElement: () => xe2.current, focus() {
2152
+ }, []), xe2 = M(null), be2 = da(t2, () => ({ isWorkbookElement: () => true, getWorkbook: () => le2, getSheetElement: () => ie2.current, getViewportElement: () => de2.current, getFormulaBarElement: () => xe2.current, focus() {
2110
2153
  ie2 && ie2.current && ie2.current.focus();
2111
2154
  } }), [le2]), ye2 = M(null);
2112
2155
  E(() => {
@@ -2127,7 +2170,7 @@ const gi = (e2) => x(ui, { ...e2 }), hi = (e2) => x(pi, { ...e2 }), fi = (e2) =>
2127
2170
  ie2.current.getSheet() !== t3 ? ie2.current.getGridElement()?.onViewChangeOnce(() => {
2128
2171
  ie2.current.getSheet() !== t3 && e4(false), e4(true);
2129
2172
  }) : e4(true);
2130
- }) }, Si);
2173
+ }) }, Ci);
2131
2174
  const [Re2, Me2] = B((e3) => e3 + 1, 0), Fe2 = le2?.getView();
2132
2175
  Pa(Fe2, { onViewChange: (e3) => {
2133
2176
  Me2();
@@ -2136,22 +2179,22 @@ const gi = (e2) => x(ui, { ...e2 }), hi = (e2) => x(pi, { ...e2 }), fi = (e2) =>
2136
2179
  v(() => {
2137
2180
  ie2.current.focus();
2138
2181
  }, []);
2139
- const [He2, We2] = D(false), ze2 = M(null), $e2 = ai({ workbook: le2, workbookElement: be2.current, target: () => ie2.current, notifier: i2, commands: S2, darkMode: Ne2.body.darkMode, onNewWorkbook: r2, onShowSidebar: () => {
2182
+ const [He2, We2] = D(false), ze2 = M(null), $e2 = ri({ workbook: le2, workbookElement: be2.current, target: () => ie2.current, notifier: i2, commands: S2, darkMode: Ne2.body.darkMode, onNewWorkbook: r2, onShowSidebar: () => {
2140
2183
  He2 ? ze2.current?.focus() : We2(true);
2141
2184
  } }), Oe2 = M(null), [Ve2, Ge2] = D(false), [Ue2, je2] = D(null), [_e2, qe2] = D(xa.Top), [Ke2, Xe2] = D(f.EmptyBounds), Ze2 = () => {
2142
2185
  Ge2(false), je2(null);
2143
2186
  }, Je2 = (e3, t3, o3 = xa.Top) => {
2144
2187
  Xe2(e3), qe2(o3), je2(t3), null !== Oe2.current && Oe2.current.update(), Ge2(true);
2145
- }, [Ye2, Qe2] = D("sheet"), et2 = N2 ?? Fe2?.isShowTabs(), tt2 = Y2 ?? Fe2?.isShowHorizontalScrollbar(), ot2 = T2 ?? Fe2?.isShowFormulaBar(), nt2 = W2 ?? Fe2?.isShowStatusBar(), at2 = Q2 ?? Fe2?.isShowVerticalScrollbar(), rt2 = Ne2?.header?.edgeStrokeFill || "rgb(171,171,171)", lt2 = C(() => nt2 ? $2({ sheet: Se2, gridStyle: Ne2, ...z2 }) : null, [$2, z2, nt2, Ne2, Se2]), it2 = C(() => V2({ commands: $e2, workbook: be2.current, ...O2 }), [$e2, V2, O2, ae2]), [st2, { width: dt2 }] = qa(), ct2 = 0 === dt2 || dt2 > 560, mt2 = C(() => {
2188
+ }, [Ye2, Qe2] = D("sheet"), et2 = N2 ?? Fe2?.isShowTabs(), tt2 = Y2 ?? Fe2?.isShowHorizontalScrollbar(), ot2 = T2 ?? Fe2?.isShowFormulaBar(), nt2 = W2 ?? Fe2?.isShowStatusBar(), at2 = Q2 ?? Fe2?.isShowVerticalScrollbar(), rt2 = Ne2?.header?.edgeStrokeFill || "rgb(171,171,171)", lt2 = C(() => nt2 ? $2({ sheet: Se2, gridStyle: Ne2, ...z2 }) : null, [$2, z2, nt2, Ne2, Se2]), it2 = C(() => V2({ commands: $e2, workbook: be2.current, ...O2 }), [$e2, V2, O2, ae2]), [st2, { width: ct2 }] = qa(), dt2 = 0 === ct2 || ct2 > 560, mt2 = C(() => {
2146
2189
  if (!et2) return null;
2147
2190
  let e3 = H2({ background: Ne2.body.fill, borderWidth: 1, borderColor: rt2, gridTheme: Be2, gridStyle: Ne2, onBeforeUserChange: we2, onUserChange: ke2, workbook: le2, commands: $e2, sheetTabProps: {}, notifier: i2, ...L2 });
2148
- return ct2 || (e3 = x("div", { style: { flex: "none", display: "flex" }, children: e3 })), e3;
2149
- }, [H2, L2, i2, ae2, le2, Be2, ct2, $e2, et2]), pt2 = v((e3) => {
2191
+ return dt2 || (e3 = x("div", { style: { flex: "none", display: "flex" }, children: e3 })), e3;
2192
+ }, [H2, L2, i2, ae2, le2, Be2, dt2, $e2, et2]), pt2 = v((e3) => {
2150
2193
  const t3 = n.getOS() === n.OSType.Firefox;
2151
2194
  let o3 = null, a3 = null, r3 = null;
2152
- if (tt2 && (a3 = x("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${rt2} 1px`, maxWidth: "100%" }, children: x(Aa, { 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) => {
2195
+ if (tt2 && (a3 = x("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${rt2} 1px`, maxWidth: "100%" }, children: x(Aa, { style: { alignItems: "center", borderTop: (t3 ? 6 : 3) + "px solid transparent", borderBottom: (dt2 ? 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) => {
2153
2196
  Je2({ x: e4.anchor.x, y: e4.anchor.y, width: 0, height: 0 }, e4.display, e4.placement);
2154
- }, onCloseTooltip: () => Ze2() }) })), et2 && ct2 && (r3 = mt2), et2 && ct2 && !tt2 && (r3 = b(A, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [r3, x(A, { sx: { borderTop: `solid ${rt2} 1px`, flex: "1" } })] })), r3 && tt2) o3 = x(ma, { position: le2.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: e4 }) => {
2197
+ }, onCloseTooltip: () => Ze2() }) })), et2 && dt2 && (r3 = mt2), et2 && dt2 && !tt2 && (r3 = b(A, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [r3, x(A, { sx: { borderTop: `solid ${rt2} 1px`, flex: "1" } })] })), r3 && tt2) o3 = x(ma, { position: le2.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: e4 }) => {
2155
2198
  le2.getView().setTabRatio(Math.round(10 * e4));
2156
2199
  }, 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='${ae2.palette.text.icon ?? ae2.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 ${rt2} 1px`, borderBottom: "solid 3px transparent" } }, elementBefore: r3, elementAfter: a3 });
2157
2200
  else if (tt2) o3 = a3;
@@ -2160,7 +2203,7 @@ const gi = (e2) => x(ui, { ...e2 }), hi = (e2) => x(pi, { ...e2 }), fi = (e2) =>
2160
2203
  o3 = r3;
2161
2204
  }
2162
2205
  return x(A, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: o3 });
2163
- }, [Se2, we2, le2, Ne2, Be2, $e2, et2, tt2, nt2, ct2]), [ut2, gt2] = w.useState(null), ht2 = C(() => ({ placement: "right-start", ...ut2?.popperProps }), [ut2?.popperProps]), { reference: ft2, component: xt2 } = bo({ label: "contextMenu", popperProps: ht2, anchor: ut2?.anchor ?? { getBoundingClientRect: () => new DOMRect(ut2?.clientX || 0, ut2?.clientY || 0) }, onClose: () => gt2(null), createPopupPanel: ut2?.createPopupPanel });
2206
+ }, [Se2, we2, le2, Ne2, Be2, $e2, et2, tt2, nt2, dt2]), [ut2, gt2] = w.useState(null), ht2 = C(() => ({ placement: "right-start", ...ut2?.popperProps }), [ut2?.popperProps]), { reference: ft2, component: xt2 } = bo({ label: "contextMenu", popperProps: ht2, anchor: ut2?.anchor ?? { getBoundingClientRect: () => new DOMRect(ut2?.clientX || 0, ut2?.clientY || 0) }, onClose: () => gt2(null), createPopupPanel: ut2?.createPopupPanel });
2164
2207
  P(() => {
2165
2208
  ut2 ? ft2.open(0) : ft2.close(0);
2166
2209
  }, [ut2]);
@@ -2228,7 +2271,7 @@ const gi = (e2) => x(ui, { ...e2 }), hi = (e2) => x(pi, { ...e2 }), fi = (e2) =>
2228
2271
  $e2?.getCommand("insertImageFromFile")?.execute({ file: t3, options: { bounds: { x: a3.x, y: a3.y } }, goto: { range: { ...r3 } } });
2229
2272
  } else $e2?.getCommand("openWorkbook")?.execute(t3);
2230
2273
  }
2231
- }, [$e2, Dt2]), Ft2 = 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]), Bt2 = M(null), Nt2 = C(() => x(Ka, { in: !ge2, nodeRef: Bt2, 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: Bt2, 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(() => F2({ 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), [F2, R2, le2, Ne2, $e2, ge2]), At2 = v((e3) => {
2274
+ }, [$e2, Dt2]), Ft2 = 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]), Bt2 = M(null), Nt2 = C(() => x(Ka, { in: !ge2, nodeRef: Bt2, 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" : c2?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: q2({ ref: Bt2, transitionDelay: "0", transparentBackground: false, sx: { opacity: ge2 ? 0 : c2?.opacity, pointerEvents: ge2 ? "none" : c2?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ...K2 } }) }) }), [ge2, q2, K2]), Et2 = C(() => F2({ 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), [F2, R2, le2, Ne2, $e2, ge2]), At2 = v((e3) => {
2232
2275
  const { movable: t3, ...o3 } = e3, n2 = { movable: t3, onContextMenuCapture: (e4) => {
2233
2276
  wt2(e4, t3);
2234
2277
  }, ...o3 }, a3 = t3.getContent().getType();
@@ -2243,7 +2286,7 @@ const gi = (e2) => x(ui, { ...e2 }), hi = (e2) => x(pi, { ...e2 }), fi = (e2) =>
2243
2286
  r3 = x(Ha, { ...e4 });
2244
2287
  }
2245
2288
  return x("div", { style: { position: "absolute", clipPath: "inset(0px)", display: "flex", alignItems: "stretch", justifyContent: "stretch", pointerEvents: "all" }, children: r3 }, t3.getUUID());
2246
- }, []), It2 = C(() => J2({ style: Ci, onFocus: Ct2, notifier: i2, gridStyle: Ne2, headersStyle: Ae2, sheet: Se2, commands: $e2, onSheetContextMenu: yt2, onViewportChange: (e3) => {
2289
+ }, []), It2 = C(() => J2({ style: vi, onFocus: Ct2, notifier: i2, gridStyle: Ne2, headersStyle: Ae2, sheet: Se2, commands: $e2, onSheetContextMenu: yt2, onViewportChange: (e3) => {
2247
2290
  Le2(e3);
2248
2291
  }, showScrollbars: false, viewportComponent: me2, onRepeatCommandChange: k2, onElementLoad: fe2, onShowColumnTooltip: (e3) => {
2249
2292
  Je2(e3.anchor, e3.display, xa.Top);
@@ -2262,18 +2305,18 @@ const gi = (e2) => x(ui, { ...e2 }), hi = (e2) => x(pi, { ...e2 }), fi = (e2) =>
2262
2305
  });
2263
2306
  }, readOnly: e3, commands: $e2, ref: ze2, scripts: le2.getScripts() });
2264
2307
  }, [He2, $e2, le2, i2, ve2]), Ht2 = C(() => {
2265
- const e3 = x(ba, { style: { ...Ci, marginRight: Lt2 && ct2 ? "0px" : "6px" }, viewport: Ie2, touchElement: ie2.current?.getGridElement()?.stage, onScrollViewport: (e4) => {
2308
+ const e3 = x(ba, { style: { ...vi, marginRight: Lt2 && dt2 ? "0px" : "6px" }, viewport: Ie2, touchElement: ie2.current?.getGridElement()?.stage, onScrollViewport: (e4) => {
2266
2309
  ie2.current?.getGridElement()?.scrollTo(e4);
2267
2310
  }, showHorizontalScrollbar: tt2 || et2, showVerticalScrollbar: at2, createHorizontalScrollbar: pt2, createVerticalScrollbar: Tt2, children: It2 });
2268
2311
  let t3 = e3;
2269
- ct2 || (t3 = b(y, { children: [e3, mt2] }));
2312
+ dt2 || (t3 = b(y, { children: [e3, mt2] }));
2270
2313
  let o3 = null, n2 = 4, a3 = 13;
2271
- 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, a3 = 4), x(ma, { fixedPane: "after", position: "40%", minAfter: ct2 ? "280px" : "120px", splitDirection: ct2 ? "row" : "column", style: Ci, 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='${a3}' viewBox='0 0 ${n2} ${a3}' version='1.1' fill='${ae2.palette.text.icon ?? ae2.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" } } });
2272
- }, [tt2, et2, pt2, at2, Ie2, Lt2, It2, mt2, ae2, ct2]), Wt2 = C(() => ({ boxSizing: "border-box", background: (e3) => "dark" !== e3.palette.mode ? Ne2.header.fill : e3.palette.background.paper, "& *": { ...xn(ae2), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${rt2} 1px` }, ...d2 }), [d2, Ne2]);
2273
- return b(X, { className: In("sheetxl-workbook", ii, { "Mui-focusVisible": se2 }, li, m2), sx: Wt2, style: c2, square: false, ...ne2, ref: be2, onFocus: (e3) => {
2274
- de2(true), St2(), p2?.(e3);
2314
+ return dt2 ? 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, a3 = 4), x(ma, { fixedPane: "after", position: "40%", minAfter: dt2 ? "280px" : "120px", splitDirection: dt2 ? "row" : "column", style: vi, ref: st2, resizerProps: { className: "styled-resizer", style: { minWidth: dt2 ? "6px" : void 0, minHeight: dt2 ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${n2}' height='${a3}' viewBox='0 0 ${n2} ${a3}' version='1.1' fill='${ae2.palette.text.icon ?? ae2.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: dt2 ? "left center" : "top center" } }, elementBefore: t3, paneBeforeProps: { style: { flexDirection: "column" } }, elementAfter: Lt2, paneAfterProps: { style: { marginLeft: dt2 ? "0px" : "4px", marginRight: dt2 ? "8px" : "4px" } } });
2315
+ }, [tt2, et2, pt2, at2, Ie2, Lt2, It2, mt2, ae2, dt2]), Wt2 = C(() => ({ boxSizing: "border-box", background: (e3) => "dark" !== e3.palette.mode ? Ne2.header.fill : e3.palette.background.paper, "& *": { ...xn(ae2), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${rt2} 1px` }, ...c2 }), [c2, Ne2]);
2316
+ return b(X, { className: In("sheetxl-workbook", si, { "Mui-focusVisible": se2 }, ii, m2), sx: Wt2, style: d2, square: false, ...ne2, ref: be2, onFocus: (e3) => {
2317
+ ce2(true), St2(), p2?.(e3);
2275
2318
  }, onBlur: (e3) => {
2276
- de2(false), u2?.(e3);
2319
+ ce2(false), u2?.(e3);
2277
2320
  }, onKeyDown: (e3) => {
2278
2321
  kt2(e3), g2?.(e3);
2279
2322
  }, onDragStart: (e3) => {
@@ -2283,9 +2326,9 @@ const gi = (e2) => x(ui, { ...e2 }), hi = (e2) => x(pi, { ...e2 }), fi = (e2) =>
2283
2326
  }
2284
2327
  }, onDragEnter: Rt2, onDragLeave: Rt2, onDragOver: Rt2, onDrop: Mt2, children: [b("div", { className: In(Jr), style: { flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: ge2 ? void 0 : 0, "--sxl-app-color-high-contrast": ae2.palette.primary.main, "--sxl-app-color-primary": ae2.palette.primary.main, "--sxl-app-color-primary-dark": ae2.palette.primary.dark, "--sxl-app-color-primary-light": ae2.palette.primary.light, "--sxl-app-color-info": ae2.palette.info.main, "--sxl-app-color-info-dark": ae2.palette.info.dark, "--sxl-app-color-info-light": ae2.palette.info.light, "--sxl-app-color-secondary": ae2.palette.secondary.main, "--sxl-app-color-secondary-dark": ae2.palette.secondary.dark, "--sxl-app-color-secondary-light": ae2.palette.secondary.light, "--sxl-app-color-success": ae2.palette.success.main, "--sxl-app-color-success-dark": ae2.palette.success.dark, "--sxl-app-color-success-light": ae2.palette.success.light, "--sxl-app-color-warning": ae2.palette.warning.main, "--sxl-app-color-warning-dark": ae2.palette.warning.dark, "--sxl-app-color-warning-light": ae2.palette.warning.light, "--sxl-app-color-error": ae2.palette.error.main, "--sxl-app-color-error-dark": ae2.palette.error.dark, "--sxl-app-color-error-light": ae2.palette.error.light, "--sxl-app-color-text": ae2.palette.text.primary, "--sxl-app-color-text-secondary": ae2.palette.text.secondary, "--sxl-app-color-text-disabled": ae2.palette.text.disabled, "--sxl-app-color-background": ae2.palette.background.paper, "--sxl-app-color-button-surface": ae2.palette.grey[600], "--sxl-app-color-shadow": ae2.palette.action.focus, "--sxl-app-color-grey": ae2.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(${ka("#fff", Sa(5))}, ${ka("#fff", Sa(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, Ft2] }), Nt2] });
2285
2328
  }));
2286
- vi.displayName = "WorkbookElement";
2287
- const Ti = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:hover)": { color: (e3) => e3.palette.text.secondary }, backgroundColor: (e3) => ka(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 = k(S((e2, t2) => {
2288
- const { sx: o2, workbook: n2, title: a2 = "", placeHolder: r2 = "Untitled", onTitleChange: l2, readOnly: i2 = false, hidden: s2, ...d2 } = e2, [c2, m2] = D(false), [p2, u2] = D(false), [g2, h2] = D(a2 ?? ""), [f2, y2] = D(""), [w2, { width: k2 }] = qa(), [S2, { width: C2 }] = qa(), [v2, T2] = D(false), R2 = M(null), F2 = M(null), B2 = ca(t2, () => ({ requestWorkbookTitle: (e3 = null, t3) => {
2329
+ Ti.displayName = "WorkbookElement";
2330
+ const Di = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:hover)": { color: (e3) => e3.palette.text.secondary }, backgroundColor: (e3) => ka(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` } }, Pi = k(S((e2, t2) => {
2331
+ const { sx: o2, workbook: n2, title: a2 = "", placeHolder: r2 = "Untitled", onTitleChange: l2, readOnly: i2 = false, hidden: s2, ...c2 } = e2, [d2, m2] = D(false), [p2, u2] = D(false), [g2, h2] = D(a2 ?? ""), [f2, y2] = D(""), [w2, { width: k2 }] = qa(), [S2, { width: C2 }] = qa(), [v2, T2] = D(false), R2 = M(null), F2 = M(null), B2 = da(t2, () => ({ requestWorkbookTitle: (e3 = null, t3) => {
2289
2332
  F2.current = { onAccept: e3, requestReason: t3?.requestReason }, t3?.selectAll && R2.current?.select(), R2.current?.focus(t3);
2290
2333
  }, focus: (e3) => {
2291
2334
  R2.current?.focus(e3);
@@ -2298,7 +2341,7 @@ const Ti = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:h
2298
2341
  }, 300)();
2299
2342
  }, [v2, k2]), P(() => {
2300
2343
  u2(g2 && !Za.isValidWindowsFilename(g2));
2301
- }, [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: Va([B2, S2, t2]), ...d2, children: x(Le, { label: F2.current?.requestReason ?? "Workbook Name", children: b(A, { className: In({ "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", ...Ti(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: a2 ?? r2 }) : x(O, { sx: { width: `${Math.min(k2 + 3, Math.max(C2, B2.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: r2, onFocus: (e3) => {
2344
+ }, [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: Va([B2, S2, t2]), ...c2, children: x(Le, { label: F2.current?.requestReason ?? "Workbook Name", children: b(A, { className: In({ "Mui-focusVisible": d2 }), 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", ...Di(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: a2 ?? r2 }) : x(O, { sx: { width: `${Math.min(k2 + 3, Math.max(C2, B2.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: r2, onFocus: (e3) => {
2302
2345
  m2(true), e3.target?.select();
2303
2346
  }, inputProps: { name: "input-workbook-title", autoComplete: "off", ref: R2 }, onBlur: () => {
2304
2347
  m2(false), p2 ? h2(f2) : (g2 !== f2 && (l2?.(g2), g2 && F2.current?.onAccept?.(g2, "blur")), F2.current = null);
@@ -2311,20 +2354,20 @@ const Ti = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:h
2311
2354
  }, 0)), F2.current = null, e3.stopPropagation(), e3.preventDefault());
2312
2355
  }, 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 || r2 })] }) }) });
2313
2356
  }));
2314
- Di.displayName = "WorkbookTitle";
2315
- const Pi = k(S((e2, t2) => {
2357
+ Pi.displayName = "WorkbookTitle";
2358
+ const Ri = k(S((e2, t2) => {
2316
2359
  const { sx: o2, style: n2, className: a2, licenseKey: r2, renderLoadingPanel: l2, ...i2 } = e2;
2317
2360
  r2 && g.setLicenseKey(r2);
2318
2361
  const s2 = C(() => {
2319
2362
  const e3 = { transitionDelay: "160ms", transparentBackground: true };
2320
2363
  return x(A, { sx: o2, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "center", justifyContent: "center", ...n2 }, children: l2?.(e3) ?? x(Pe, { ...e3 }) });
2321
- }, [o2, n2, l2]), d2 = C(() => w.lazy(async () => await Promise.resolve().then(() => zi)), []);
2322
- return x(y, { children: x(R, { fallback: s2, children: x(d2, { ...i2, className: a2, renderLoadingPanel: l2, sx: o2, style: n2, ref: t2 }) }) });
2364
+ }, [o2, n2, l2]), c2 = C(() => w.lazy(async () => await Promise.resolve().then(() => $i)), []);
2365
+ return x(y, { children: x(R, { fallback: s2, children: x(c2, { ...i2, className: a2, renderLoadingPanel: l2, sx: o2, style: n2, ref: t2 }) }) });
2323
2366
  }));
2324
- Pi.displayName = "Studio";
2325
- const Ri = [{ 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 }], Mi = [{ 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 }];
2326
- class Fi {
2327
- constructor(e2 = Ri, t2 = Mi) {
2367
+ Ri.displayName = "Studio";
2368
+ 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 }], Fi = [{ 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 }];
2369
+ class Bi {
2370
+ constructor(e2 = Mi, t2 = Fi) {
2328
2371
  this._readFormatType = [], this._writeFormatType = [], this._readFormatType = Object.freeze([...e2]), this._writeFormatType = Object.freeze([...t2]);
2329
2372
  }
2330
2373
  getReadFormats() {
@@ -2365,52 +2408,52 @@ class Fi {
2365
2408
  }
2366
2409
  }
2367
2410
  }
2368
- const Bi = new Fi(), Ni = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, Ei = S((e2, t2) => {
2369
- const { id: o2, message: n2, iconVariant: a2, error: r2, hideIconVariant: l2, ...i2 } = e2, { closeSnackbar: s2 } = Ya(), d2 = wa(), [c2, m2] = D(false), p2 = v(() => {
2411
+ const Ni = new Bi(), Ei = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, Ai = S((e2, t2) => {
2412
+ const { id: o2, message: n2, iconVariant: a2, error: r2, hideIconVariant: l2, ...i2 } = e2, { closeSnackbar: s2 } = Ya(), c2 = wa(), [d2, m2] = D(false), p2 = v(() => {
2370
2413
  m2((e3) => !e3);
2371
2414
  }, []), u2 = v(() => {
2372
2415
  s2(o2);
2373
2416
  }, [o2, s2]);
2374
2417
  let g2 = r2?.message;
2375
- return !g2 && T(n2) && (g2 = n2), g2 || "string" != typeof n2 || (g2 = n2), g2 || (g2 = `Unknown Error: ${n2}`), x(Qa, { ref: t2, className: In(Ni.root, "error-snackbar"), children: b(te, { className: Ni.card, style: { backgroundColor: d2.palette.error.dark, border: `1px solid ${d2.palette.error.dark}` }, children: [b(oe, { className: Ni.actionRoot, children: [l2 ? null : a2?.error, x(I, { variant: "body2", component: "div", className: Ni.typography, style: { color: d2.palette.text.primary }, children: g2 }), x("div", { style: { flex: "1 1 auto" } }), b("div", { className: Ni.icons, children: [r2 ? x(L, { "aria-label": "Show more", size: "small", className: In(Ni.expand, { [Ni.expandOpen]: c2 }), style: { color: d2.palette.action.active }, onClick: p2, children: x(qn, {}) }) : null, x(L, { size: "small", className: Ni.expand, style: { color: d2.palette.action.active }, onClick: u2, children: x(Jn, { fontSize: "small" }) })] })] }), r2 ? x(ne, { in: c2, timeout: "auto", unmountOnExit: true, children: x("div", { className: Ni.stackTraceContainer, style: { backgroundColor: d2.palette.error.light, borderTop: `1px solid ${d2.palette.error.main}` }, children: x(bn, { error: r2, hideLineNumbers: true }) }) }) : null] }) });
2418
+ return !g2 && T(n2) && (g2 = n2), g2 || "string" != typeof n2 || (g2 = n2), g2 || (g2 = `Unknown Error: ${n2}`), x(Qa, { ref: t2, className: In(Ei.root, "error-snackbar"), children: b(te, { className: Ei.card, style: { backgroundColor: c2.palette.error.dark, border: `1px solid ${c2.palette.error.dark}` }, children: [b(oe, { className: Ei.actionRoot, children: [l2 ? null : a2?.error, x(I, { variant: "body2", component: "div", className: Ei.typography, children: g2 }), x("div", { style: { flex: "1 1 auto" } }), b("div", { className: Ei.icons, children: [r2 ? x(L, { "aria-label": "Show more", size: "small", className: In(Ei.expand, { [Ei.expandOpen]: d2 }), onClick: p2, children: x(qn, {}) }) : null, x(L, { size: "small", className: Ei.expand, onClick: u2, children: x(Jn, { fontSize: "small" }) })] })] }), r2 ? x(ne, { in: d2, timeout: "auto", unmountOnExit: true, children: x("div", { className: Ei.stackTraceContainer, style: { backgroundColor: c2.palette.error.light, borderTop: `1px solid ${c2.palette.error.main}` }, children: x(bn, { error: r2, hideLineNumbers: true }) }) }) : null] }) });
2376
2419
  });
2377
- Ei.displayName = "ToastError";
2378
- const Ai = k(S((e2, t2) => {
2420
+ Ai.displayName = "ToastError";
2421
+ const Ii = k(S((e2, t2) => {
2379
2422
  const { commands: o2, commandHook: n2, scope: a2 = "workbook", disabled: r2 = false, ...l2 } = e2, i2 = na((e3) => {
2380
2423
  const t3 = { variant: oa.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...t3, command: o2.getCommand("newWorkbook"), icon: re(x(yn, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: o2.getCommand("openWorkbook"), icon: re(x(wn, {})) }), x(me, { ...t3, commands: o2, quickCommand: "saveWorkbook", icon: re(x(Cn, {})), createPopupPanel: (e4) => {
2381
2424
  const n3 = { ...t3, parentFloat: e4.floatReference, scope: "saveWorkbook" }, a3 = [];
2382
- return Bi.getWriteFormats().forEach((e5) => {
2425
+ return Ni.getWriteFormats().forEach((e5) => {
2383
2426
  if (e5.isDefault) return;
2384
2427
  let t4 = null;
2385
2428
  "CSV" === e5.key ? t4 = re(x(kn, {})) : "Excel" === e5.key && (t4 = re(x(Sn, {})));
2386
2429
  const r3 = o2.getCommand(`saveWorkbookAs${e5.key}`);
2387
2430
  r3 ? a3.push(F(le, { ...n3, key: e5.key, command: r3, icon: t4 })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${e5.key}'`);
2388
- }), ce({ ...e4, children: a3, onClick: () => {
2431
+ }), de({ ...e4, children: a3, onClick: () => {
2389
2432
  e4.closeFloatAll();
2390
2433
  } });
2391
2434
  } })] });
2392
- return ce({ ...e3, children: l3, onClick: (t4) => {
2435
+ return de({ ...e3, children: l3, onClick: (t4) => {
2393
2436
  t4.isDefaultPrevented || e3.closeFloatAll();
2394
2437
  } });
2395
2438
  }, [r2, o2, n2, a2]), s2 = "File";
2396
2439
  return x(me, { commands: o2, disabled: r2, commandHook: n2, scope: a2, 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 }) });
2397
2440
  }));
2398
- Ai.displayName = "StandaloneFileCommandButton";
2399
- const Ii = x(Le, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: x(A, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: x(Wa, { onClick: () => {
2441
+ Ii.displayName = "StandaloneFileCommandButton";
2442
+ const Li = x(Le, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: x(A, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: x(Wa, { onClick: () => {
2400
2443
  window?.open("https://www.sheetxl.com", "_blank");
2401
- }, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), Li = k(S((e2, t2) => {
2402
- const { commands: o2, workbook: n2, logo: a2 = Ii, mainElement: r2, showFileMenu: l2 = true, showAppearanceMenu: i2 = true, ...s2 } = e2, { reference: d2 } = bo(), [c2, { width: m2 }] = qa(), p2 = m2 < 530, u2 = l2 ? x(Ai, { commands: o2, commandHook: { beforeExecute() {
2403
- d2?.closeAll();
2444
+ }, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), Hi = k(S((e2, t2) => {
2445
+ const { commands: o2, workbook: n2, logo: a2 = Li, mainElement: r2, showFileMenu: l2 = true, showAppearanceMenu: i2 = true, ...s2 } = e2, { reference: c2 } = bo(), [d2, { width: m2 }] = qa(), p2 = m2 < 530, u2 = l2 ? x(Ii, { commands: o2, commandHook: { beforeExecute() {
2446
+ c2?.closeAll();
2404
2447
  }, onError(e3, t3, o3) {
2405
- } } }) : null, g2 = i2 ? x(cl, { commands: o2, commandHook: { beforeExecute() {
2406
- d2?.closeAll();
2448
+ } } }) : null, g2 = i2 ? x(dl, { commands: o2, commandHook: { beforeExecute() {
2449
+ c2?.closeAll();
2407
2450
  }, onError(e3, t3, o3) {
2408
2451
  } } }) : null, h2 = C(() => ({ paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }), []), f2 = M(null);
2409
- return x(A, { ref: Va([f2, c2, t2]), ...s2, children: Ql({ 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: [a2, 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: r2 }), 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: {} } } }) });
2452
+ return x(A, { ref: Va([f2, d2, t2]), ...s2, children: ei({ 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: [a2, 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: r2 }), 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: {} } } }) });
2410
2453
  }));
2411
- Li.displayName = "StudioToolbar";
2412
- const Hi = k(S((e2, t2) => {
2413
- const { workbook: o2, setWorkbook: n2, refWorkbookTitle: a2, titleWorkbook: r2, setWorkbookTitle: l2, titlePlaceHolder: i2, children: s2, undoManager: d2, commands: c2, importExportDisabled: m2, themeOptions: p2 } = e2, u2 = Ya(), g2 = u2 ? u2.enqueueSnackbar : () => {
2454
+ Hi.displayName = "StudioToolbar";
2455
+ const Wi = k(S((e2, t2) => {
2456
+ const { workbook: o2, setWorkbook: n2, refWorkbookTitle: a2, titleWorkbook: r2, setWorkbookTitle: l2, titlePlaceHolder: i2, children: s2, undoManager: c2, commands: d2, importExportDisabled: m2, themeOptions: p2 } = e2, u2 = Ya(), g2 = u2 ? u2.enqueueSnackbar : () => {
2414
2457
  }, h2 = u2 ? u2.closeSnackbar : () => {
2415
2458
  }, [f2, k2] = D({ isMounted: false, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), S2 = v(() => {
2416
2459
  k2((e3) => ({ ...e3, isMounted: true }));
@@ -2423,7 +2466,7 @@ const Hi = k(S((e2, t2) => {
2423
2466
  const e5 = new Set(E2.current);
2424
2467
  e5.add(t3.onceKey), E2.current = e5;
2425
2468
  }
2426
- const o3 = { variant: t3?.type ?? da.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: t3?.preventDuplicate, persist: t3?.persist ?? t3?.type === da.Error, action: (e5) => x(L, { onClick: () => h2(e5), children: x(ea, {}) }) };
2469
+ const o3 = { variant: t3?.type ?? ca.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: t3?.preventDuplicate, persist: t3?.persist ?? t3?.type === ca.Error, action: (e5) => x(L, { onClick: () => h2(e5), children: x(ea, {}) }) };
2427
2470
  t3?.enqueueProps && Object.assign(o3, t3.enqueueProps), e4 || console.log("message is 'null'", t3), g2(e4 ?? "Alert", o3);
2428
2471
  };
2429
2472
  return { showMessage: e3, showBusy: (e4, t3) => {
@@ -2438,33 +2481,33 @@ const Hi = k(S((e2, t2) => {
2438
2481
  }), n3;
2439
2482
  }, showWindow: (e4, t3, o3) => {
2440
2483
  const n3 = { ...t3, onKeyDown: (e5) => {
2441
- c2?.dispatchToFocusedCommand(e5), e5.isDefaultPrevented() || e5.isPropagationStopped() || t3?.onKeyDown?.(e5);
2484
+ d2?.dispatchToFocusedCommand(e5), e5.isDefaultPrevented() || e5.isPropagationStopped() || t3?.onKeyDown?.(e5);
2442
2485
  } };
2443
- return F2(e4, { sort: () => import("./Dy5ZlGkkqU9eK4Mt.mjs"), numberFormat: () => import("./D8uH0zqPI1d50qsx.mjs"), hyperlink: () => import("./BRsMzfYwnF3y7jL5.mjs"), comments: () => import("./Nxk8BN00peWJT0Pd.mjs"), find: () => import("./DxhxmNkJB4A7DSHZ.mjs"), tableDetails: () => import("./C9HmzGWmGV2F1-iF.mjs"), tableNew: () => import("./CADlYGKEEO7IDDe4.mjs"), namedDetails: () => import("./oP0NpP9IIAnwgsOY.mjs") }[e4], n3, o3);
2486
+ return F2(e4, { sort: () => import("./BAHfO9ALnEUni4Ts.mjs"), numberFormat: () => import("./BfPfvgdZrUoZvEme.mjs"), hyperlink: () => import("./BqPC_rbjZN2Jy_y4.mjs"), comments: () => import("./Ciwkv8DXp86zUjTb.mjs"), find: () => import("./CHNFCXGADLFVCwYo.mjs"), tableDetails: () => import("./IID7UVIiXTHvqYHK.mjs"), tableNew: () => import("./Cgxo3ZcSke1eBYVG.mjs"), namedDetails: () => import("./DESr6vZQNH2lHWZ9.mjs") }[e4], n3, o3);
2444
2487
  }, showOptions: B2, showInputOptions: N2, showError: (t3) => {
2445
- let o3, n3 = da.Error, a3 = "Unknown Error";
2446
- "string" == typeof t3 ? a3 = t3 : t3 instanceof Error && (o3 = t3, t3.message && (a3 = t3.message)), t3 instanceof ja && (n3 = da.Info), e3(a3, { type: n3, enqueueProps: { error: o3 } });
2488
+ let o3, n3 = ca.Error, a3 = "Unknown Error";
2489
+ "string" == typeof t3 ? a3 = t3 : t3 instanceof Error && (o3 = t3, t3.message && (a3 = t3.message)), t3 instanceof ja && (n3 = ca.Info), e3(a3, { type: n3, enqueueProps: { error: o3 } });
2447
2490
  } };
2448
2491
  }, []), I2 = v(() => {
2449
2492
  }, []), H2 = ((e3) => {
2450
- const { workbook: t3, setWorkbook: o3, importExportDisabled: n3, workbookTitle: a3 = "export", setWorkbookTitle: r3, notifier: l3, requestWorkbookTitle: i3, themeOptions: s3, undoManager: d3, commands: c3, onExecute: m3 } = e3, p3 = na(s3?.onModeChange, [s3?.onModeChange]), u3 = na(s3?.onEnabledDarkGridChange, [s3?.onEnabledDarkGridChange]), g3 = na(s3?.onEnabledDarkImagesChange, [s3?.onEnabledDarkImagesChange]), h3 = na(async (e4 = null, t4 = null) => {
2493
+ const { workbook: t3, setWorkbook: o3, importExportDisabled: n3, workbookTitle: a3 = "export", setWorkbookTitle: r3, notifier: l3, requestWorkbookTitle: i3, themeOptions: s3, undoManager: c3, commands: d3, onExecute: m3 } = e3, p3 = na(s3?.onModeChange, [s3?.onModeChange]), u3 = na(s3?.onEnabledDarkGridChange, [s3?.onEnabledDarkGridChange]), g3 = na(s3?.onEnabledDarkImagesChange, [s3?.onEnabledDarkImagesChange]), h3 = na(async (e4 = null, t4 = null) => {
2451
2494
  const o4 = [];
2452
2495
  let n4, a4 = null, r4 = null;
2453
- if ("string" == typeof e4 ? r4 = e4 : a4 = e4, n4 = a4 ? e4 : await Ga.openFileDialog(r4 ?? Bi.getAllReadFormatTypeAsString().join(",")), !n4) return null;
2496
+ if ("string" == typeof e4 ? r4 = e4 : a4 = e4, n4 = a4 ? e4 : await Ga.openFileDialog(r4 ?? Ni.getAllReadFormatTypeAsString().join(",")), !n4) return null;
2454
2497
  const i4 = { source: n4, createWorkbookOptions: t4, onWarning: (e5) => {
2455
2498
  o4.push(e5);
2456
- } }, s4 = await Bi.read(i4, l3);
2499
+ } }, s4 = await Ni.read(i4, l3);
2457
2500
  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;
2458
2501
  }, [m3, l3, t3]), f3 = na(async (e4, t4, o4) => {
2459
2502
  if (!t4 && i3) {
2460
2503
  const t5 = await i3("Enter Workbook name to " + (o4.isDefault ? "Save." : `Export as ${o4.description}.`));
2461
- return null !== t5 && Bi.writeFile(t5, e4, { formatType: o4.key });
2504
+ return null !== t5 && Ni.writeFile(t5, e4, { formatType: o4.key });
2462
2505
  }
2463
- return Bi.writeFile(t4, e4, { formatType: o4.key });
2506
+ return Ni.writeFile(t4, e4, { formatType: o4.key });
2464
2507
  }, [l3, t3, i3]), x2 = v(() => ({ contains: (e4) => true, focus() {
2465
2508
  } }), []), b2 = C(() => {
2466
2509
  const e4 = [];
2467
- n3 || (Bi.getWriteFormats().forEach((o4) => {
2510
+ n3 || (Ni.getWriteFormats().forEach((o4) => {
2468
2511
  const n4 = o4.isDefault, r4 = { 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}`}.` };
2469
2512
  n4 && (r4.shortcut = { key: "S", modifiers: [ha.Ctrl] }, e4.push(new ga("saveWorkbookAs", x2, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [ha.Shift, ha.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
2470
2513
  f3(t3, null, o4).catch((e5) => {
@@ -2482,11 +2525,11 @@ const Hi = k(S((e2, t2) => {
2482
2525
  try {
2483
2526
  const a4 = await h3(e5, n4);
2484
2527
  if (!a4) return;
2485
- const i5 = a4.title, s4 = a4.workbook, d4 = s4.getSelectedSheet();
2528
+ const i5 = a4.title, s4 = a4.workbook, c4 = s4.getSelectedSheet();
2486
2529
  if ("text/csv" === a4.formatType.mimeType) {
2487
2530
  const e6 = t3.findValidSheetName(i5);
2488
2531
  await t3.doBatch(async () => {
2489
- const o4 = d4.getUsedRange();
2532
+ const o4 = c4.getUsedRange();
2490
2533
  if (!o4) return void l3?.showMessage("The file appears to be blank.");
2491
2534
  const n5 = t3.getSheets().add({ name: e6, autoSelect: true }).getRange({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 });
2492
2535
  await n5.copyFrom(o4);
@@ -2515,11 +2558,11 @@ const Hi = k(S((e2, t2) => {
2515
2558
  }), new ga("gotoUrlIssue", x2, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request." }, () => {
2516
2559
  window?.open("https://github.com/sheetxl/sheetxl/issues");
2517
2560
  })];
2518
- }, [t3, a3, l3, n3, s3, c3, d3]), y2 = C(() => {
2561
+ }, [t3, a3, l3, n3, s3, d3, c3]), y2 = C(() => {
2519
2562
  let e4 = null;
2520
- return e4 = c3 ? c3.createChildGroup(x2, "standaloneWorkbook", false) : new fa(x2, "standaloneWorkbook"), e4.addCommands(b2, true), e4;
2521
- }, [c3, b2]);
2522
- ya({ manager: d3, commands: y2, notifier: l3 });
2563
+ return e4 = d3 ? d3.createChildGroup(x2, "standaloneWorkbook", false) : new fa(x2, "standaloneWorkbook"), e4.addCommands(b2, true), e4;
2564
+ }, [d3, b2]);
2565
+ ya({ manager: c3, commands: y2, notifier: l3 });
2523
2566
  const { themeMode: k3 } = vn();
2524
2567
  P(() => {
2525
2568
  if (!s3 || !y2) return;
@@ -2537,7 +2580,7 @@ const Hi = k(S((e2, t2) => {
2537
2580
  const { showModal: S3 } = Dn();
2538
2581
  return P(() => {
2539
2582
  const e4 = () => new Promise((e5, t4) => {
2540
- const o4 = w.lazy(() => import("./CFBxXNyH40J__9j7.mjs")), n4 = S3(o4, { title: "Shortcut Keys Reference", commands: y2, onDone: () => {
2583
+ const o4 = w.lazy(() => import("./DhN2m_4WFHDBADx-.mjs")), n4 = S3(o4, { title: "Shortcut Keys Reference", commands: y2, onDone: () => {
2541
2584
  n4.hide();
2542
2585
  }, TransitionProps: { onExited: () => {
2543
2586
  e5(true);
@@ -2545,11 +2588,11 @@ const Hi = k(S((e2, t2) => {
2545
2588
  });
2546
2589
  y2.getCommand("showKeyboardShortcuts").updateCallback(() => e4()), y2.getCommand("help").updateCallback(() => e4());
2547
2590
  }, [b2, y2]), y2;
2548
- })({ workbook: o2, setWorkbook: n2, importExportDisabled: m2, workbookTitle: r2, setWorkbookTitle: l2, commands: c2, requestWorkbookTitle: (e3) => new Promise((t3) => {
2591
+ })({ workbook: o2, setWorkbook: n2, importExportDisabled: m2, workbookTitle: r2, setWorkbookTitle: l2, commands: d2, requestWorkbookTitle: (e3) => new Promise((t3) => {
2549
2592
  a2.current ? a2.current.requestWorkbookTitle((e4, o3) => {
2550
2593
  t3(e4);
2551
2594
  }, { selectAll: true, requestReason: e3 }) : t3(i2);
2552
- }), themeOptions: p2, undoManager: d2, notifier: A2, onExecute: I2 });
2595
+ }), themeOptions: p2, undoManager: c2, notifier: A2, onExecute: I2 });
2553
2596
  P(() => {
2554
2597
  f2.starting.size <= 0 || !f2.isMounted || k2((e3) => {
2555
2598
  const t3 = new Map(e3.running);
@@ -2573,25 +2616,25 @@ const Hi = k(S((e2, t2) => {
2573
2616
  const $2 = C(() => x(ml, { commands: H2, disableHover: true, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [H2]), O2 = { notifier: A2, commands: H2 };
2574
2617
  return o2 && (O2.statusBarProps = { childrenEnd: $2 }), b(y, { children: [W2, s2 ? w.cloneElement(s2, O2) : null] });
2575
2618
  }));
2576
- Hi.displayName = "SnackbarAndCommandsWrapper";
2577
- const Wi = k(S((e2, t2) => {
2578
- const { className: o2, sx: n2, style: a2, onElementLoad: r2, onError: l2, undoManager: i2, errorPanel: s2 = Bn, 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, ...F2 } = e2, B2 = M(null), N2 = na(p2, [p2]), I2 = na(S2 ?? T2?.onTitleChange, [S2 ?? T2?.onTitleChange]), L2 = T2?.placeHolder ?? "Untitled", H2 = f2?.mode, { themeMode: W2, source: z2 } = vn({ mode: H2 }), O2 = C(() => ({ ...f2, light: Nn(false, Ga.deepMerge(f2?.theme ?? {}, f2?.light ?? {})), dark: Nn(true, Ga.deepMerge(f2?.theme ?? {}, f2?.dark ?? {})) }), [f2]), V2 = W2 === Tn.Dark, [G2, U2] = D(null);
2619
+ Wi.displayName = "SnackbarAndCommandsWrapper";
2620
+ const zi = k(S((e2, t2) => {
2621
+ const { className: o2, sx: n2, style: a2, onElementLoad: r2, onError: l2, undoManager: i2, errorPanel: s2 = Bn, onKeyDown: c2, workbook: d2, createWorkbookOptions: m2, onWorkbookChange: p2, logo: u2, importExportDisabled: g2 = false, themeOptions: f2, autoFocus: y2 = false, commands: w2, title: k2, onTitleChange: S2, titleProps: T2, renderLoadingPanel: R2, ...F2 } = e2, B2 = M(null), N2 = na(p2, [p2]), I2 = na(S2 ?? T2?.onTitleChange, [S2 ?? T2?.onTitleChange]), L2 = T2?.placeHolder ?? "Untitled", H2 = f2?.mode, { themeMode: W2, source: z2 } = vn({ mode: H2 }), O2 = C(() => ({ ...f2, light: Nn(false, Ga.deepMerge(f2?.theme ?? {}, f2?.light ?? {})), dark: Nn(true, Ga.deepMerge(f2?.theme ?? {}, f2?.dark ?? {})) }), [f2]), V2 = W2 === Tn.Dark, [G2, U2] = D(null);
2579
2622
  P(() => {
2580
2623
  U2(i2 ?? new _a());
2581
2624
  }, [i2]);
2582
2625
  const [j2, _2] = D(null), [q2, K2] = D(null), X2 = Ba();
2583
2626
  E(() => {
2584
- if (!c2 || 0 === Object.keys(c2).length && !Ga.isPromiseLike(c2)) {
2627
+ if (!d2 || 0 === Object.keys(d2).length && !Ga.isPromiseLike(d2)) {
2585
2628
  const e3 = { theme: X2.getDefaultTheme(), ...m2 };
2586
2629
  K2(new h(e3));
2587
- } else K2(c2);
2588
- }, [c2]), E(() => {
2630
+ } else K2(d2);
2631
+ }, [d2]), E(() => {
2589
2632
  if (!q2) return;
2590
- if (q2 instanceof h) return _2({ workbook: q2 }), void (c2 !== q2 && N2?.(q2));
2633
+ if (q2 instanceof h) return _2({ workbook: q2 }), void (d2 !== q2 && N2?.(q2));
2591
2634
  (async () => {
2592
2635
  try {
2593
2636
  let e3, t3 = await Promise.resolve(q2);
2594
- t3 && t3.source && (t3 = await Bi.read(t3)), t3.workbook ? (ee2(t3.title), e3 = t3.workbook) : e3 = t3, N2?.(e3), _2({ workbook: e3 });
2637
+ t3 && t3.source && (t3 = await Ni.read(t3)), t3.workbook ? (ee2(t3.title), e3 = t3.workbook) : e3 = t3, N2?.(e3), _2({ workbook: e3 });
2595
2638
  } catch (e3) {
2596
2639
  N2?.(null), _2({ error: e3 });
2597
2640
  }
@@ -2629,9 +2672,9 @@ const Wi = k(S((e2, t2) => {
2629
2672
  }, [Z2]);
2630
2673
  const le2 = M(null), ie2 = v((e3) => {
2631
2674
  let t3 = null;
2632
- return T2?.hidden || (t3 = x(Di, { ...T2, style: { maxWidth: "100%", ...T2?.style }, workbook: B2.current, ref: le2, title: Q2, placeHolder: L2, onTitleChange: (e4) => {
2675
+ return T2?.hidden || (t3 = x(Pi, { ...T2, style: { maxWidth: "100%", ...T2?.style }, workbook: B2.current, ref: le2, title: Q2, placeHolder: L2, onTitleChange: (e4) => {
2633
2676
  ee2(e4);
2634
- } })), x(Li, { ...e3, logo: u2, mainElement: t3, showFileMenu: !g2, showAppearanceMenu: !!(O2?.onEnabledDarkGridChange || O2?.onEnabledDarkImagesChange || O2?.onModeChange) });
2677
+ } })), x(Hi, { ...e3, logo: u2, mainElement: t3, showFileMenu: !g2, showAppearanceMenu: !!(O2?.onEnabledDarkGridChange || O2?.onEnabledDarkImagesChange || O2?.onModeChange) });
2635
2678
  }, [u2, Q2, T2, O2, g2, ne2]);
2636
2679
  P(() => {
2637
2680
  const e3 = (e4) => e4.preventDefault();
@@ -2642,28 +2685,28 @@ const Wi = k(S((e2, t2) => {
2642
2685
  const se2 = C(() => {
2643
2686
  const e3 = { transparentBackground: true };
2644
2687
  return x(A, { sx: n2, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...a2 }, children: R2?.(e3) ?? x(Pe, { ...e3 }) });
2645
- }, [n2, a2, R2]), de2 = v(({ error: e3 }) => (l2?.(e3), x(s2, { sx: n2, style: a2, error: e3 ?? "Unable to display empty workbook." })), [n2, a2, 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 = Va([B2, t2]), pe2 = C(() => {
2688
+ }, [n2, a2, R2]), ce2 = v(({ error: e3 }) => (l2?.(e3), x(s2, { sx: n2, style: a2, error: e3 ?? "Unable to display empty workbook." })), [n2, a2, l2]), de2 = C(() => ({ ...n2, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-SnackbarContainer > div": { maxWidth: "100%" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-Snackbar > .error-snackbar .MuiTypography-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiCardActions-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiButtonBase-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-MuiContent *": { fontFamily: (e3) => e3.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [n2]), me2 = Va([B2, t2]), pe2 = C(() => {
2646
2689
  if (!j2) return se2;
2647
- if (j2.error || !j2.workbook) return de2({ error: j2.error });
2690
+ if (j2.error || !j2.workbook) return ce2({ error: j2.error });
2648
2691
  let e3 = null, t3 = null, n3 = false;
2649
- return O2 && (e3 = V2 ? O2.dark : O2.light, t3 = V2 && O2.enableDarkGrid ? O2.dark : O2.light, n3 = O2.enableDarkImages), x(vi, { sx: ce2, style: a2, tabIndex: 0, autoFocus: true, workbook: j2.workbook, ref: me2, renderToolbar: ie2, onElementLoad: re2, onRepeatCommandChange: Y2, onKeyDown: (e4) => {
2650
- d2?.(e4);
2692
+ return O2 && (e3 = V2 ? O2.dark : O2.light, t3 = V2 && O2.enableDarkGrid ? O2.dark : O2.light, n3 = O2.enableDarkImages), x(Ti, { sx: de2, style: a2, tabIndex: 0, autoFocus: true, workbook: j2.workbook, ref: me2, renderToolbar: ie2, onElementLoad: re2, onRepeatCommandChange: Y2, onKeyDown: (e4) => {
2693
+ c2?.(e4);
2651
2694
  }, renderLoadingPanel: R2, gridTheme: t3, headersTheme: e3, enableDarkImages: n3, className: In(o2, "sheetxl-workbook"), onContextMenu: (e4) => e4.preventDefault(), ...F2 }, "WorkbookElement");
2652
- }, [j2, Q2, G2, se2, R2, O2, F2, ie2, ce2]);
2653
- let ue2 = x(Ja, { fallbackRender: de2, children: x(er, { maxSnack: 3, domRoot: te2, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (e3, t3, o3) => {
2695
+ }, [j2, Q2, G2, se2, R2, O2, F2, ie2, de2]);
2696
+ let ue2 = x(Ja, { fallbackRender: ce2, children: x(er, { maxSnack: 3, domRoot: te2, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (e3, t3, o3) => {
2654
2697
  B2.current?.focus();
2655
- }, Components: { error: Ei }, 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(An, { style: { marginRight: "8px" } }) }, children: x(En, { children: x(Hi, { workbook: j2?.workbook, setWorkbook: K2, importExportDisabled: g2, titlePlaceHolder: L2, titleWorkbook: Q2, setWorkbookTitle: ee2, refWorkbookTitle: le2, commands: ne2, undoManager: G2, themeOptions: O2, children: pe2 }) }) }) });
2698
+ }, Components: { error: Ai }, 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(An, { style: { marginRight: "8px" } }) }, children: x(En, { 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 }) }) }) });
2656
2699
  return O2 && (ue2 = b(Ca, { theme: V2 ? O2.dark : O2.light, children: [O2.cssBaseline ? x(ae, {}) : null, ue2] })), ue2;
2657
2700
  }));
2658
- Wi.displayName = "EagerStudio";
2659
- const zi = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio: Wi, default: Wi }, Symbol.toStringTag, { value: "Module" }));
2701
+ zi.displayName = "EagerStudio";
2702
+ const $i = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio: zi, default: zi }, Symbol.toStringTag, { value: "Module" }));
2660
2703
  export {
2661
- cl as AppearanceCommandButton,
2704
+ dl as AppearanceCommandButton,
2662
2705
  lr as AutoColorPosition,
2663
2706
  vr as BorderCommandButton,
2664
2707
  Cr as BorderPopupButton,
2665
2708
  Sr as BorderStyleButton,
2666
- cr as C,
2709
+ dr as C,
2667
2710
  Br as ClearCommandButton,
2668
2711
  pr as ColorButton,
2669
2712
  Ir as ColorCommandButton,
@@ -2671,8 +2714,8 @@ export {
2671
2714
  rr as ColorPanelType,
2672
2715
  yr as ColorPopupButton,
2673
2716
  Ar as DeleteCellsCommandButton,
2674
- dl as DocThemeCommandButton,
2675
- Wi as EagerStudio,
2717
+ cl as DocThemeCommandButton,
2718
+ zi as EagerStudio,
2676
2719
  Nr as FillCommandButton,
2677
2720
  Dl as FilterColumnMenu,
2678
2721
  Wr as FilterCommandButton,
@@ -2685,7 +2728,7 @@ export {
2685
2728
  ml as HelpCommandButton,
2686
2729
  tr as HorizontalAlignCommandButton,
2687
2730
  Er as InsertCellsCommandButton,
2688
- xl as InsertFunctionCommandPopupButton,
2731
+ fl as InsertFunctionCommandPopupButton,
2689
2732
  gl as InsertFunctionSumCommandPopupButton,
2690
2733
  pl as InsertImageCommandButton,
2691
2734
  Ul as InsertScriptCommandButton,
@@ -2698,7 +2741,7 @@ export {
2698
2741
  Zr as PresetCellStylesCommandButton,
2699
2742
  al as PresetTableStylesCommandButton,
2700
2743
  wl as RangeInput,
2701
- Xl as RunScriptCommandButton,
2744
+ Zl as RunScriptCommandButton,
2702
2745
  jl as ScriptEditorToolbar,
2703
2746
  Kl as ScriptWorkspace,
2704
2747
  Rl as SheetTab,
@@ -2707,7 +2750,7 @@ export {
2707
2750
  Fl as SheetsAllMenu,
2708
2751
  Hr as SortFilterCommandButton,
2709
2752
  Sl as StatusBar,
2710
- Pi as Studio,
2753
+ Ri as Studio,
2711
2754
  kr as StyledStrokeIcon,
2712
2755
  tl as TableStyleCanvasPreview,
2713
2756
  ol as TableStyleOptionsPanel,
@@ -2724,16 +2767,16 @@ export {
2724
2767
  Lr as ViewGridLinesCommandButton,
2725
2768
  _r as ViewHeadingsCommandButton,
2726
2769
  ul as WalkingCopyCommandButton,
2727
- pi as WorkbookContextMenu,
2728
- vi as WorkbookElement,
2729
- Bi as WorkbookIO,
2730
- mi as WorkbookStrip,
2731
- Di as WorkbookTitle,
2770
+ ui as WorkbookContextMenu,
2771
+ Ti as WorkbookElement,
2772
+ Ni as WorkbookIO,
2773
+ pi as WorkbookStrip,
2774
+ Pi as WorkbookTitle,
2732
2775
  qr as WorkbookViewCommandButton,
2733
- Fi as _WorkbookIO,
2776
+ Bi as _WorkbookIO,
2734
2777
  Hl as createGridStyleFromMUITheme,
2735
- Pi as default,
2736
- ri as defaultNewWorkbook,
2778
+ Ri as default,
2779
+ li as defaultNewWorkbook,
2737
2780
  Il as setPrintExamplesOnLoad,
2738
- ai as useWorkbookCommands
2781
+ ri as useWorkbookCommands
2739
2782
  };