@fileverse-dev/dsheet 2.0.33-rtc-c → 2.0.33-rtc-d

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.
@@ -1,7 +1,7 @@
1
1
  var x6 = Object.defineProperty;
2
2
  var S6 = (e, t, n) => t in e ? x6(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var Ae = (e, t, n) => S6(e, typeof t != "symbol" ? t + "" : t, n);
4
- import fn, { useRef as je, useContext as at, useState as Re, useMemo as lt, useEffect as Se, useCallback as Ee, useLayoutEffect as yn, forwardRef as qu, createElement as Zc, useImperativeHandle as E6, createContext as R6 } from "react";
4
+ import fn, { useRef as je, useContext as lt, useState as Re, useMemo as at, useEffect as Se, useCallback as Ee, useLayoutEffect as yn, forwardRef as qu, createElement as Zc, useImperativeHandle as E6, createContext as R6 } from "react";
5
5
  import { g as ha, a as De, b as Ot, r as Ht, d as Xn, s as ma, h as Te, i as Zu, j as oi, l as ht, k as I6, m as pl, n as Ur, o as Xt, p as Zt, q as br, t as Qh, u as Mt, v as Jh, w as mt, x as e0, y as uc, z as Gu, A as t0, B as Cr, C as Po, D as Eo, E as n0, F as o0, G as r0, H as Xu, I as mo, J as Tr, K as j6, L as D6, M as xi, N as Qu, O as jn, P as pa, Q as A6, R as An, S as N6, T as gl, U as Ju, V as s0, W as Nl, X as yr, Y as i0, Z as T6, _ as on, $ as zn, a0 as L6, a1 as l0, a2 as po, a3 as mn, a4 as M6, a5 as _n, a6 as ks, a7 as _s, a8 as Ui, a9 as fc, aa as ur, ab as ga, ac as Gc, ad as a0, ae as rs, af as Tl, ag as O6, ah as Si, ai as H6, aj as ya, ak as Ei, al as zi, am as Vi, an as Tt, ao as xo, ap as rn, aq as oo, ar as fr, as as Bo, at as yd, au as F6, av as wa, aw as Ri, ax as wd, ay as P6, az as c0, aA as Ii, aB as B6, aC as $o, aD as sn, aE as $n, aF as yl, aG as U6, aH as kr, aI as z6, aJ as xn, aK as rr, aL as V6, aM as u0, aN as ef, aO as f0, aP as d0, aQ as h0, aR as m0, aS as p0, aT as g0, aU as y0, aV as tf, aW as ri, aX as cs, aY as w0, aZ as $6, a_ as v0, a$ as dc, b0 as W6, b1 as Y6, b2 as K6, b3 as q6, b4 as Qn, b5 as Gt, b6 as us, b7 as si, b8 as Z6, b9 as fs, ba as Ll, bb as Gn, bc as wr, bd as va, be as Ml, bf as Yr, bg as G6, bh as X6, bi as nf, bj as Fr, bk as Kn, bl as ba, bm as Ca, bn as b0, bo as or, bp as $i, bq as Q6, br as J6, bs as Wo, bt as ka, bu as dn, bv as qt, bw as C0, bx as k0, by as _a, bz as eg, bA as tg, bB as ng, bC as og, bD as rg, bE as _0, bF as x0, bG as Dr, bH as sg, bI as S0, bJ as E0, bK as R0, bL as I0, bM as j0, bN as of, bO as xa, bP as qn, bQ as ig, bR as D0, bS as dr, bT as Uo, bU as hr, bV as mr, bW as wl, bX as lg, bY as A0, bZ as ag, b_ as rf, b$ as N0, c0 as cg, c1 as T0, c2 as L0, c3 as M0, c4 as Xc, c5 as O0, c6 as H0, c7 as ug, c8 as Qc, c9 as F0, ca as Ro, cb as fg, cc as sf, cd as P0, ce as dg, cf as Ol, cg as hg, ch as B0, ci as U0, cj as Mo, ck as z0, cl as V0, cm as ii, cn as Jc, co as lf, cp as af, cq as cf, cr as Zs, cs as $0, ct as W0, cu as Y0, cv as mg, cw as pg, cx as li, cy as ai, cz as K0, cA as eu, c as sr, cB as gg, e as Sa, f as ji, cC as yg, cD as wg, cE as vd, cF as bd, cG as Cd, cH as kd, cI as vg, cJ as bg, cK as _d } from "./executeStringFunction-9cGLblM5.js";
6
6
  import * as Oe from "yjs";
7
7
  import { p as tu, E as Cg, C as xd, a as Sd, D as q0, H as kg, b as _g, T as xg } from "./constants-yStXQJiK.js";
@@ -12404,7 +12404,7 @@ const Xy = (e, t) => {
12404
12404
  workbookContainer: fn.createRef()
12405
12405
  }
12406
12406
  }), zt = ({ width: e = 24, height: t = 24, name: n, style: o }) => /* @__PURE__ */ u.jsx("svg", { width: e, height: t, style: o, "aria-hidden": "true", children: /* @__PURE__ */ u.jsx("use", { xlinkHref: `#${n}` }) }), Jy = (e, t) => {
12407
- const a = je({ lastTime: 0, lastCol: -1 }), { context: i, setContext: l, refs: f } = at(ct), c = je(0), d = je([]), h = je([]), p = je({
12407
+ const a = je({ lastTime: 0, lastCol: -1 }), { context: i, setContext: l, refs: f } = lt(ct), c = je(0), d = je([]), h = je([]), p = je({
12408
12408
  mouseDown: !1,
12409
12409
  startX: 0,
12410
12410
  source: -1,
@@ -12860,13 +12860,13 @@ const Xy = (e, t) => {
12860
12860
  };
12861
12861
  }, e4 = () => {
12862
12862
  var j, O;
12863
- const { context: e, setContext: t, refs: n } = at(ct), o = je(null), r = je(null), [s, a] = Re({
12863
+ const { context: e, setContext: t, refs: n } = lt(ct), o = je(null), r = je(null), [s, a] = Re({
12864
12864
  col: -1,
12865
12865
  col_pre: -1,
12866
12866
  col_index: -1
12867
12867
  }), [i, l] = Re(!1), [f, c] = Re([]), d = je(!0), h = De(e, e.currentSheetId), p = h == null ? null : e.luckysheetfile[h], m = !!((j = e.luckysheet_select_save) != null && j.some(
12868
12868
  (W) => !!(W != null && W.column_select)
12869
- )), g = lt(() => {
12869
+ )), g = at(() => {
12870
12870
  var W, F, L, T, U, M;
12871
12871
  return ((W = p == null ? void 0 : p.frozen) == null ? void 0 : W.type) === "column" || ((F = p == null ? void 0 : p.frozen) == null ? void 0 : F.type) === "rangeColumn" || ((L = p == null ? void 0 : p.frozen) == null ? void 0 : L.type) === "rangeBoth" || ((T = p == null ? void 0 : p.frozen) == null ? void 0 : T.type) === "both" ? Ot(
12872
12872
  ((M = (U = p == null ? void 0 : p.frozen) == null ? void 0 : U.range) == null ? void 0 : M.column_focus) || 0,
@@ -13273,7 +13273,7 @@ const Xy = (e, t) => {
13273
13273
  }
13274
13274
  );
13275
13275
  }, t4 = (e, t) => {
13276
- const a = je({ lastTime: 0, lastRow: -1 }), { context: i, setContext: l, refs: f } = at(ct), c = je(0), d = je([]), h = je([]), p = je({
13276
+ const a = je({ lastTime: 0, lastRow: -1 }), { context: i, setContext: l, refs: f } = lt(ct), c = je(0), d = je([]), h = je([]), p = je({
13277
13277
  mouseDown: !1,
13278
13278
  startY: 0,
13279
13279
  source: -1,
@@ -13722,13 +13722,13 @@ const Xy = (e, t) => {
13722
13722
  };
13723
13723
  }, n4 = () => {
13724
13724
  var O, W;
13725
- const { context: e, setContext: t, settings: n, refs: o } = at(ct), r = je(null), s = je(null), [a, i] = Re({
13725
+ const { context: e, setContext: t, settings: n, refs: o } = lt(ct), r = je(null), s = je(null), [a, i] = Re({
13726
13726
  row: -1,
13727
13727
  row_pre: -1,
13728
13728
  row_index: -1
13729
13729
  }), [l, f] = Re(!1), [c, d] = Re([]), h = De(e, e.currentSheetId), p = h == null ? null : e.luckysheetfile[h], m = !!((O = e.luckysheet_select_save) != null && O.some(
13730
13730
  (F) => !!(F != null && F.row_select)
13731
- )), g = lt(() => {
13731
+ )), g = at(() => {
13732
13732
  var M;
13733
13733
  if (h == null) return null;
13734
13734
  const F = ((M = e.luckysheetfile[h]) == null ? void 0 : M.config) || e.config;
@@ -13744,7 +13744,7 @@ const Xy = (e, t) => {
13744
13744
  e.luckysheetfile,
13745
13745
  e.luckysheet_filter_save,
13746
13746
  e.filter
13747
- ]), w = lt(() => {
13747
+ ]), w = at(() => {
13748
13748
  var F, L, T, U, M, Q;
13749
13749
  return ((F = p == null ? void 0 : p.frozen) == null ? void 0 : F.type) === "row" || ((L = p == null ? void 0 : p.frozen) == null ? void 0 : L.type) === "rangeRow" || ((T = p == null ? void 0 : p.frozen) == null ? void 0 : T.type) === "rangeBoth" || ((U = p == null ? void 0 : p.frozen) == null ? void 0 : U.type) === "both" ? Ht(
13750
13750
  ((Q = (M = p == null ? void 0 : p.frozen) == null ? void 0 : M.range) == null ? void 0 : Q.row_focus) || 0,
@@ -14561,7 +14561,7 @@ If "derivatives": exchange name (e.g., "binance_futures").`,
14561
14561
  const {
14562
14562
  context: r,
14563
14563
  settings: { isAuthorized: s }
14564
- } = at(ct), a = [
14564
+ } = lt(ct), a = [
14565
14565
  "COINGECKO",
14566
14566
  "ETHERSCAN",
14567
14567
  "DEFILLAMA",
@@ -15010,7 +15010,7 @@ If "derivatives": exchange name (e.g., "binance_futures").`,
15010
15010
  );
15011
15011
  }, rp = (e) => {
15012
15012
  var O;
15013
- const { showFormulaHint: t, handleShowFormulaHint: n, commaCount: o, functionName: r } = e, s = je(!1), { context: a } = at(ct), i = on(a) === "fx", l = (O = a.luckysheet_select_save) == null ? void 0 : O[0], { formulaMore: f } = ht(a), c = r ? a.formulaCache.functionlistMap[r] : a.formulaCache.functionlistMap[(a == null ? void 0 : a.functionHint) || ""], [d, h] = Re(""), [p, m] = Re(!0), [g, w] = Re(!1), R = localStorage.getItem("formula-expand") === "true", [C, b] = Re(R);
15013
+ const { showFormulaHint: t, handleShowFormulaHint: n, commaCount: o, functionName: r } = e, s = je(!1), { context: a } = lt(ct), i = on(a) === "fx", l = (O = a.luckysheet_select_save) == null ? void 0 : O[0], { formulaMore: f } = ht(a), c = r ? a.formulaCache.functionlistMap[r] : a.formulaCache.functionlistMap[(a == null ? void 0 : a.functionHint) || ""], [d, h] = Re(""), [p, m] = Re(!0), [g, w] = Re(!1), R = localStorage.getItem("formula-expand") === "true", [C, b] = Re(R);
15014
15014
  Se(() => {
15015
15015
  if (!c) return;
15016
15016
  if (!c.API_KEY) {
@@ -15647,7 +15647,7 @@ const sp = ({
15647
15647
  variant: e = "cell"
15648
15648
  }) => {
15649
15649
  var h;
15650
- const { context: t, refs: n, setContext: o } = at(ct), r = lt(() => {
15650
+ const { context: t, refs: n, setContext: o } = lt(ct), r = at(() => {
15651
15651
  var R, C;
15652
15652
  if (t.luckysheetCellUpdate.length !== 2) return null;
15653
15653
  const [p, m] = t.luckysheetCellUpdate, g = Te(t), w = (R = g == null ? void 0 : g[p]) == null ? void 0 : R[m];
@@ -15656,7 +15656,7 @@ const sp = ({
15656
15656
  t.luckysheetCellUpdate,
15657
15657
  t.currentSheetId,
15658
15658
  t.luckysheetfile
15659
- ]), s = on(t), a = e === "cell" ? s !== "fx" : s === "fx", i = e === "fx" ? n.fxInput.current : n.cellInput.current, l = ((h = i == null ? void 0 : i.innerText) == null ? void 0 : h.trim()) ?? "", f = l.startsWith("="), c = lt(() => {
15659
+ ]), s = on(t), a = e === "cell" ? s !== "fx" : s === "fx", i = e === "fx" ? n.fxInput.current : n.cellInput.current, l = ((h = i == null ? void 0 : i.innerText) == null ? void 0 : h.trim()) ?? "", f = l.startsWith("="), c = at(() => {
15660
15660
  if (!r) return;
15661
15661
  const { r: p, c: m, cell: g } = r, w = Te(t);
15662
15662
  if (!w) return;
@@ -16873,7 +16873,7 @@ function y4(e, t, n) {
16873
16873
  }
16874
16874
  function w4(e, t, n) {
16875
16875
  var C, b, y, _, x;
16876
- const o = (((C = e.luckysheetCellUpdate) == null ? void 0 : C.length) ?? 0) > 0, r = (t == null ? void 0 : t.column_focus) ?? ((b = t == null ? void 0 : t.column) == null ? void 0 : b[0]), s = (t == null ? void 0 : t.row_focus) ?? ((y = t == null ? void 0 : t.row) == null ? void 0 : y[0]), a = lt(() => !o || typeof r != "number" ? null : p4(e.visibledatacolumn, r), [o, r, e.visibledatacolumn]), i = lt(() => {
16876
+ const o = (((C = e.luckysheetCellUpdate) == null ? void 0 : C.length) ?? 0) > 0, r = (t == null ? void 0 : t.column_focus) ?? ((b = t == null ? void 0 : t.column) == null ? void 0 : b[0]), s = (t == null ? void 0 : t.row_focus) ?? ((y = t == null ? void 0 : t.row) == null ? void 0 : y[0]), a = at(() => !o || typeof r != "number" ? null : p4(e.visibledatacolumn, r), [o, r, e.visibledatacolumn]), i = at(() => {
16877
16877
  if (!o || typeof s != "number") return null;
16878
16878
  const E = e.visibledatarow[s], S = s <= 0 ? 0 : e.visibledatarow[s - 1];
16879
16879
  return E == null ? (t == null ? void 0 : t.height) ?? 0 : Math.max(0, E - S - 1);
@@ -16922,7 +16922,7 @@ function w4(e, t, n) {
16922
16922
  return E = requestAnimationFrame(P), () => {
16923
16923
  cancelAnimationFrame(E), w(null);
16924
16924
  };
16925
- }, [m, s, n]), lt(() => {
16925
+ }, [m, s, n]), at(() => {
16926
16926
  if (!o || !t) return null;
16927
16927
  const E = f && c != null ? c : a ?? t.width ?? 0, S = m && g != null ? g : i ?? t.height ?? 0;
16928
16928
  return { width: E, height: S };
@@ -16939,7 +16939,7 @@ function w4(e, t, n) {
16939
16939
  }
16940
16940
  const v4 = () => {
16941
16941
  var be, Me, Ke, st, St, jt, vt, pt, gn, Ut, Wt, Nn, No, vo, vn, qr, Pi, Bi, gd;
16942
- const { context: e, setContext: t, refs: n } = at(ct), o = je(null), r = je(null), s = Gl(e.luckysheetCellUpdate), a = Gl(e.currentSheetId), [i, l] = Re(!1), [f, c] = Re(!1), [d, h] = Re(""), [p, m] = Re(""), [g, w] = Re(!1), R = je(null), [C, b] = Re({ left: 0, top: 0 }), y = (be = e.luckysheet_select_save) == null ? void 0 : be[0], [_, x] = Re(
16942
+ const { context: e, setContext: t, refs: n } = lt(ct), o = je(null), r = je(null), s = Gl(e.luckysheetCellUpdate), a = Gl(e.currentSheetId), [i, l] = Re(!1), [f, c] = Re(!1), [d, h] = Re(""), [p, m] = Re(""), [g, w] = Re(!1), R = je(null), [C, b] = Re({ left: 0, top: 0 }), y = (be = e.luckysheet_select_save) == null ? void 0 : be[0], [_, x] = Re(
16943
16943
  {}
16944
16944
  ), [E, S] = Re(0), [P, Z] = Re(!1), J = localStorage.getItem("formulaMore") === "true", [$, k] = Re(!J), [I, j] = Re(!1), O = je(null), [W, F] = Re(0), [L, T] = Re(!1), U = y == null ? void 0 : y.row_focus, M = y == null ? void 0 : y.column_focus, Q = w4(
16945
16945
  e,
@@ -16999,7 +16999,7 @@ const v4 = () => {
16999
16999
  "text/html"
17000
17000
  ).querySelectorAll("span"), ze = He[He.length - 1];
17001
17001
  return ze == null ? void 0 : ze.innerText;
17002
- }, V = lt(() => {
17002
+ }, V = at(() => {
17003
17003
  var we, Le;
17004
17004
  if (_ && e.luckysheetCellUpdate.length > 0) {
17005
17005
  const He = Te(e);
@@ -17214,7 +17214,7 @@ const v4 = () => {
17214
17214
  [K, se]
17215
17215
  ), Ce = (we) => {
17216
17216
  we.stopPropagation(), we.preventDefault();
17217
- }, ke = lt(() => {
17217
+ }, ke = at(() => {
17218
17218
  var He, ze, $e, wt;
17219
17219
  const we = e.formulaCache.func_selectedrange, Le = e.formulaCache.formulaKeyboardRefSync === !0;
17220
17220
  return we ? [
@@ -18193,7 +18193,7 @@ const v4 = () => {
18193
18193
  }
18194
18194
  );
18195
18195
  }, c1 = ({ axis: e }) => {
18196
- const { context: t, refs: n, setContext: o } = at(ct);
18196
+ const { context: t, refs: n, setContext: o } = lt(ct);
18197
18197
  return Se(() => {
18198
18198
  e === "x" ? n.scrollbarX.current.scrollLeft = t.scrollLeft : n.scrollbarY.current.scrollTop = t.scrollTop;
18199
18199
  }, [e === "x" ? t.scrollLeft : t.scrollTop]), /* @__PURE__ */ u.jsx(
@@ -18231,7 +18231,7 @@ const v4 = () => {
18231
18231
  okLabel: i,
18232
18232
  cancelLabel: l
18233
18233
  }) => {
18234
- const { context: f } = at(ct), { button: c } = ht(f);
18234
+ const { context: f } = lt(ct), { button: c } = ht(f);
18235
18235
  return /* @__PURE__ */ u.jsxs(
18236
18236
  "div",
18237
18237
  {
@@ -18372,7 +18372,7 @@ const v4 = () => {
18372
18372
  n(a);
18373
18373
  }, []), r = Ee(() => {
18374
18374
  n(null);
18375
- }, []), s = lt(
18375
+ }, []), s = at(
18376
18376
  () => ({
18377
18377
  component: null,
18378
18378
  showModal: o,
@@ -18396,7 +18396,7 @@ const v4 = () => {
18396
18396
  ] });
18397
18397
  };
18398
18398
  function Zo() {
18399
- const { showModal: e, hideModal: t } = at($f);
18399
+ const { showModal: e, hideModal: t } = lt($f);
18400
18400
  return {
18401
18401
  showAlert: Ee(
18402
18402
  (o, r = "ok", s = t, a = t) => {
@@ -18416,7 +18416,7 @@ function _4(e, t, n) {
18416
18416
  return s <= 0 || a <= 0 ? null : [{ row: [0, s - 1], column: [0, a - 1] }];
18417
18417
  }
18418
18418
  const x4 = ({ getContainer: e }) => {
18419
- const { context: t, setContext: n, refs: o } = at(ct), { findAndReplace: r } = ht(t), [s, a] = Re(""), [i, l] = Re(""), [f, c] = Re([]), [d, h] = Re(), [p, m] = Re(null), { showAlert: g } = Zo(), w = je(null), R = je(null), C = je(null), b = je(null), [y, _] = Re({ x: 0, y: 0 }), [x, E] = Re(!1), S = je(y);
18419
+ const { context: t, setContext: n, refs: o } = lt(ct), { findAndReplace: r } = ht(t), [s, a] = Re(""), [i, l] = Re(""), [f, c] = Re([]), [d, h] = Re(), [p, m] = Re(null), { showAlert: g } = Zo(), w = je(null), R = je(null), C = je(null), b = je(null), [y, _] = Re({ x: 0, y: 0 }), [x, E] = Re(!1), S = je(y);
18420
18420
  S.current = y;
18421
18421
  const P = je(null), Z = je(!1), J = je(t);
18422
18422
  J.current = t;
@@ -19345,7 +19345,7 @@ const R4 = ({
19345
19345
  position: f,
19346
19346
  applyToSelection: c
19347
19347
  }) => {
19348
- const { context: d, setContext: h, refs: p } = at(ct), m = je(null), g = je(null), w = je(null), [R, C] = Re(f.cellBottom), [b, y] = Re(o), [_, x] = Re(s), [E, S] = Re(r), [P, Z] = Re({}), J = je(/* @__PURE__ */ new Set()), { insertLink: $, linkTypeList: k } = ht(d), I = pm(d, E, _), j = lt(() => a && a.length > 0 ? a : s ? [{ linkType: r, linkAddress: s }] : [], [a, s, r]), O = lt(() => E === "webpage" ? !_.trim() || !I.isValid : E === "sheet" ? !_.trim() : !1, [b, _, E, I.isValid]), W = Ee(
19348
+ const { context: d, setContext: h, refs: p } = lt(ct), m = je(null), g = je(null), w = je(null), [R, C] = Re(f.cellBottom), [b, y] = Re(o), [_, x] = Re(s), [E, S] = Re(r), [P, Z] = Re({}), J = je(/* @__PURE__ */ new Set()), { insertLink: $, linkTypeList: k } = ht(d), I = pm(d, E, _), j = at(() => a && a.length > 0 ? a : s ? [{ linkType: r, linkAddress: s }] : [], [a, s, r]), O = at(() => E === "webpage" ? !_.trim() || !I.isValid : E === "sheet" ? !_.trim() : !1, [b, _, E, I.isValid]), W = Ee(
19349
19349
  (M, Q) => `${M}::${String(Q ?? "").trim().toLowerCase()}`,
19350
19350
  []
19351
19351
  );
@@ -19406,7 +19406,7 @@ const R4 = ({
19406
19406
  E,
19407
19407
  _,
19408
19408
  c
19409
- ]), T = lt(
19409
+ ]), T = at(
19410
19410
  () => ({
19411
19411
  onMouseEnter: () => z.set(p.globalCache, "linkCard.mouseEnter", !0),
19412
19412
  onMouseLeave: () => z.set(p.globalCache, "linkCard.mouseEnter", !1),
@@ -19881,7 +19881,7 @@ const R4 = ({
19881
19881
  getContainer: e
19882
19882
  }) => {
19883
19883
  var R, C, b, y;
19884
- const { context: t, setContext: n, refs: o } = at(ct), {
19884
+ const { context: t, setContext: n, refs: o } = lt(ct), {
19885
19885
  filterOptions: r,
19886
19886
  currentSheetId: s,
19887
19887
  filter: a,
@@ -19990,7 +19990,7 @@ const R4 = ({
19990
19990
  ] });
19991
19991
  }, j4 = () => {
19992
19992
  var r;
19993
- const { context: e, setContext: t, refs: n } = at(ct), o = lt(() => z.find(e.insertedImgs, { id: e.activeImg }), [e.activeImg, e.insertedImgs]);
19993
+ const { context: e, setContext: t, refs: n } = lt(ct), o = at(() => z.find(e.insertedImgs, { id: e.activeImg }), [e.activeImg, e.insertedImgs]);
19994
19994
  return /* @__PURE__ */ u.jsxs("div", { id: "luckysheet-image-showBoxs", children: [
19995
19995
  o && /* @__PURE__ */ u.jsxs(
19996
19996
  "div",
@@ -20209,7 +20209,7 @@ const R4 = ({
20209
20209
  ] });
20210
20210
  }, D4 = () => {
20211
20211
  var d;
20212
- const { context: e, setContext: t, refs: n, settings: o } = at(ct), r = Te(e);
20212
+ const { context: e, setContext: t, refs: n, settings: o } = lt(ct), r = Te(e);
20213
20213
  Se(() => {
20214
20214
  var h;
20215
20215
  if (r) {
@@ -20340,7 +20340,7 @@ const R4 = ({
20340
20340
  return t.length > 0 ? t : [""];
20341
20341
  }, N4 = () => {
20342
20342
  var E, S, P, Z, J, $;
20343
- const { context: e, setContext: t } = at(ct), { dataVerification: n, button: o, findAndReplace: r } = ht(e), [s, a] = Re([""]), [i, l] = Re(
20343
+ const { context: e, setContext: t } = lt(ct), { dataVerification: n, button: o, findAndReplace: r } = ht(e), [s, a] = Re([""]), [i, l] = Re(
20344
20344
  null
20345
20345
  ), f = je(null), [c, d] = Re(null), h = je(null), p = je(""), m = Ee((k, I) => {
20346
20346
  const j = f.current, O = (j == null ? void 0 : j.offsetWidth) ?? 360, W = (j == null ? void 0 : j.offsetHeight) ?? 200, F = 8, L = Math.max(F, window.innerWidth - O - F), T = Math.max(F, window.innerHeight - W - F);
@@ -20615,7 +20615,7 @@ const R4 = ({
20615
20615
  );
20616
20616
  };
20617
20617
  function wo() {
20618
- const { showModal: e, hideModal: t } = at($f);
20618
+ const { showModal: e, hideModal: t } = lt($f);
20619
20619
  return {
20620
20620
  showDialog: Ee(
20621
20621
  (o, r, s, a, i, l = t, f = t) => {
@@ -20650,7 +20650,7 @@ function Ss(e, t, n, o) {
20650
20650
  }, n);
20651
20651
  }
20652
20652
  const T4 = () => {
20653
- const { context: e, setContext: t } = at(ct), n = je(null), [o, r] = Re([]), [s, a] = Re(!1), [i, l] = Re(), [f, c] = Re([]), [d, h] = Re([]), p = Ee(() => {
20653
+ const { context: e, setContext: t } = lt(ct), n = je(null), [o, r] = Re([]), [s, a] = Re(!1), [i, l] = Re(), [f, c] = Re([]), [d, h] = Re([]), p = Ee(() => {
20654
20654
  t((m) => {
20655
20655
  var R, C;
20656
20656
  const g = De(m, m.currentSheetId);
@@ -20783,7 +20783,7 @@ const T4 = () => {
20783
20783
  }
20784
20784
  );
20785
20785
  }, L4 = () => {
20786
- const { context: e, setContext: t, refs: n } = at(ct), o = je(null), r = lt(() => {
20786
+ const { context: e, setContext: t, refs: n } = lt(ct), o = je(null), r = at(() => {
20787
20787
  const s = e.luckysheetfile.find(
20788
20788
  (a) => a.id === e.currentSheetId
20789
20789
  );
@@ -20914,7 +20914,7 @@ const T4 = () => {
20914
20914
  );
20915
20915
  }) });
20916
20916
  }, M4 = () => {
20917
- const { context: e } = at(ct), t = e.hoverErrorBox;
20917
+ const { context: e } = lt(ct), t = e.hoverErrorBox;
20918
20918
  if (!t) return null;
20919
20919
  const { left: n, top: o, title: r, message: s } = t;
20920
20920
  return /* @__PURE__ */ u.jsxs(
@@ -20989,7 +20989,7 @@ function B4(e) {
20989
20989
  }
20990
20990
  const U4 = () => {
20991
20991
  var j, O, W, F, L, T, U, M, Q, X, Y, N, A, H;
20992
- const { context: e, setContext: t, settings: n, refs: o } = at(ct), { info: r, rightclick: s } = ht(e), a = Te(e), i = lt(() => {
20992
+ const { context: e, setContext: t, settings: n, refs: o } = lt(ct), { info: r, rightclick: s } = ht(e), a = Te(e), i = at(() => {
20993
20993
  if (!e.showQuickSearch) return [];
20994
20994
  const D = e.quickSearchHighlight;
20995
20995
  if (!D || D.matches.length === 0) return [];
@@ -21020,7 +21020,7 @@ const U4 = () => {
21020
21020
  o.globalCache.undoList.length,
21021
21021
  o.globalCache.redoList.length,
21022
21022
  a
21023
- ]), l = lt(() => {
21023
+ ]), l = at(() => {
21024
21024
  const D = e.searchRangeScopeHighlight;
21025
21025
  return !(e.showSearch || e.showReplace || e.findReplaceHiddenDuringRangePick) || !D || !D.row || !D.column ? null : Zs(
21026
21026
  e,
@@ -21037,7 +21037,7 @@ const U4 = () => {
21037
21037
  e.visibledatarow,
21038
21038
  e.visibledatacolumn,
21039
21039
  e.currentSheetId
21040
- ]), f = lt(() => {
21040
+ ]), f = at(() => {
21041
21041
  const D = e.conditionalFormatRuleHoverRanges;
21042
21042
  return D != null && D.length ? D.map((v, B) => {
21043
21043
  const q = v.row[0], ne = v.row[1], te = v.column[0], ae = v.column[1];
@@ -21128,7 +21128,7 @@ const U4 = () => {
21128
21128
  t((D) => {
21129
21129
  nf(D);
21130
21130
  });
21131
- }, [t]), E = lt(
21131
+ }, [t]), E = at(
21132
21132
  () => z.debounce(
21133
21133
  (D, v, B, q, ne = !1) => {
21134
21134
  var te;
@@ -21952,7 +21952,7 @@ const U4 = () => {
21952
21952
  }
21953
21953
  );
21954
21954
  }, z4 = (e) => {
21955
- const { context: t, refs: n, setContext: o } = at(ct);
21955
+ const { context: t, refs: n, setContext: o } = lt(ct);
21956
21956
  function r(f, c, d = () => window.devicePixelRatio || 1) {
21957
21957
  let h = 0, p = 0, m = 0;
21958
21958
  const g = 1200;
@@ -22165,7 +22165,7 @@ const U4 = () => {
22165
22165
  }, [t.zoomRatio, t.luckysheetCellUpdate]);
22166
22166
  }, V4 = ({ sheet: e }) => {
22167
22167
  var l, f, c;
22168
- const { data: t } = e, n = je(null), o = je(null), { context: r, setContext: s, refs: a, settings: i } = at(ct);
22168
+ const { data: t } = e, n = je(null), o = je(null), { context: r, setContext: s, refs: a, settings: i } = lt(ct);
22169
22169
  return Se(() => {
22170
22170
  function d() {
22171
22171
  t && s((h) => {
@@ -22816,7 +22816,7 @@ function e7() {
22816
22816
  wp();
22817
22817
  const t7 = () => {
22818
22818
  var C, b, y, _, x, E, S, P, Z, J, $, k, I;
22819
- const { context: e, setContext: t } = at(ct), { showDialog: n, hideDialog: o } = wo(), { dataVerification: r, button: s, generalDialog: a } = ht(e), [i] = Re([
22819
+ const { context: e, setContext: t } = lt(ct), { showDialog: n, hideDialog: o } = wo(), { dataVerification: r, button: s, generalDialog: a } = ht(e), [i] = Re([
22820
22820
  "between",
22821
22821
  "notBetween",
22822
22822
  "equal",
@@ -23341,7 +23341,7 @@ const o7 = (e) => String(e).replace(/[^a-zA-Z0-9-]/g, "-").replace(/-+/g, "-"),
23341
23341
  i || (i = h);
23342
23342
  const m = (R) => {
23343
23343
  c(R);
23344
- }, w = lt(() => (o == null ? void 0 : o.startsWith("align-")) || [
23344
+ }, w = at(() => (o == null ? void 0 : o.startsWith("align-")) || [
23345
23345
  "text-overflow",
23346
23346
  "text-wrap",
23347
23347
  "text-clip",
@@ -23696,10 +23696,10 @@ const bp = ({ context: e }) => {
23696
23696
  var pe, le, me, ge;
23697
23697
  const [t, n] = Re("notEmpty"), [o, r] = Re(!1), s = je(!1), a = je(!1), [i, l] = Re(null), f = je(null), c = je(!0), d = je(!1), [h, p] = Re(
23698
23698
  null
23699
- ), [m, g] = Re(null), [w, R] = Re([]), [C, b] = Re(null), [y, _] = Re(null), [x, E] = Re(null), { setContext: S } = at(ct), { hideDialog: P } = wo(), { conditionformat: Z, button: J, protection: $, generalDialog: k, toolbar: I } = ht(e), [j, O] = Re({
23699
+ ), [m, g] = Re(null), [w, R] = Re([]), [C, b] = Re(null), [y, _] = Re(null), [x, E] = Re(null), { setContext: S } = lt(ct), { hideDialog: P } = wo(), { conditionformat: Z, button: J, protection: $, generalDialog: k, toolbar: I } = ht(e), [j, O] = Re({
23700
23700
  textColor: kl,
23701
23701
  cellColor: _l
23702
- }), [W, F] = Re(!1), [L, T] = Re(!1), [U, M] = Re(!1), [Q, X] = Re(!1), Y = lt(
23702
+ }), [W, F] = Re(!1), [L, T] = Re(!1), [U, M] = Re(!1), [Q, X] = Re(!1), Y = at(
23703
23703
  () => y1(e),
23704
23704
  [e]
23705
23705
  );
@@ -23925,7 +23925,7 @@ const bp = ({ context: e }) => {
23925
23925
  });
23926
23926
  });
23927
23927
  }, [t]);
23928
- const v = (oe) => oe === "occurrenceDate" ? Z.dateIs ?? oe : Z[oe] ?? oe, B = lt(() => {
23928
+ const v = (oe) => oe === "occurrenceDate" ? Z.dateIs ?? oe : Z[oe] ?? oe, B = at(() => {
23929
23929
  const oe = (h ?? "").trim();
23930
23930
  return oe === "" ? !1 : !Ol(e, oe);
23931
23931
  }, [h, e]), q = () => {
@@ -24921,7 +24921,7 @@ const bp = ({ context: e }) => {
24921
24921
  }
24922
24922
  );
24923
24923
  }, Yf = () => {
24924
- const { context: e, setContext: t } = at(ct), { splitText: n, button: o } = ht(e), [r, s] = Re(""), [a, i] = Re(!1), [l, f] = Re([]), c = je(null), { showDialog: d, hideDialog: h } = wo(), p = Ee(() => {
24924
+ const { context: e, setContext: t } = lt(ct), { splitText: n, button: o } = ht(e), [r, s] = Re(""), [a, i] = Re(!1), [l, f] = Re([]), c = je(null), { showDialog: d, hideDialog: h } = wo(), p = Ee(() => {
24925
24925
  h();
24926
24926
  const m = fu(r, e), g = e.luckysheet_select_save[0].row[0], w = e.luckysheet_select_save[0].column[0];
24927
24927
  if (m[0].length === 1)
@@ -25060,7 +25060,7 @@ const bp = ({ context: e }) => {
25060
25060
  ] })
25061
25061
  ] });
25062
25062
  }, u7 = () => {
25063
- const { context: e, setContext: t } = at(ct), { showDialog: n, hideDialog: o } = wo(), { findAndReplace: r, button: s } = ht(e), [a, i] = Re("locationConstant"), [l, f] = Re({
25063
+ const { context: e, setContext: t } = lt(ct), { showDialog: n, hideDialog: o } = wo(), { findAndReplace: r, button: s } = ht(e), [a, i] = Re("locationConstant"), [l, f] = Re({
25064
25064
  locationDate: !0,
25065
25065
  locationDigital: !0,
25066
25066
  locationString: !0,
@@ -25290,7 +25290,7 @@ const bp = ({ context: e }) => {
25290
25290
  height: n = 24,
25291
25291
  content: o
25292
25292
  }) => {
25293
- const r = lt(() => e ? /* @__PURE__ */ u.jsx("svg", { width: t, height: n, children: /* @__PURE__ */ u.jsx("use", { xlinkHref: `#${e}` }) }) : o || /* @__PURE__ */ u.jsx("svg", { width: t, height: t, children: /* @__PURE__ */ u.jsx("use", { xlinkHref: "#default" }) }), [o, n, e, t]);
25293
+ const r = at(() => e ? /* @__PURE__ */ u.jsx("svg", { width: t, height: n, children: /* @__PURE__ */ u.jsx("use", { xlinkHref: `#${e}` }) }) : o || /* @__PURE__ */ u.jsx("svg", { width: t, height: t, children: /* @__PURE__ */ u.jsx("use", { xlinkHref: "#default" }) }), [o, n, e, t]);
25294
25294
  return /* @__PURE__ */ u.jsx(
25295
25295
  "div",
25296
25296
  {
@@ -25350,7 +25350,7 @@ const bp = ({ context: e }) => {
25350
25350
  context: n,
25351
25351
  setContext: o,
25352
25352
  refs: { cellInput: r }
25353
- } = at(ct), [s, a] = Re(2), [i, l] = Re(0), { button: f, format: c, currencyDetail: d, dateFmtList: h } = ht(n), { showDialog: p } = wo(), m = lt(
25353
+ } = lt(ct), [s, a] = Re(2), [i, l] = Re(0), { button: f, format: c, currencyDetail: d, dateFmtList: h } = ht(n), { showDialog: p } = wo(), m = at(
25354
25354
  () => ({
25355
25355
  currency: d,
25356
25356
  date: h,
@@ -25358,7 +25358,7 @@ const bp = ({ context: e }) => {
25358
25358
  // has not been defined
25359
25359
  }),
25360
25360
  [d, h]
25361
- ), g = lt(
25361
+ ), g = at(
25362
25362
  () => m[e],
25363
25363
  [m, e]
25364
25364
  ), w = Ee(() => {
@@ -25816,7 +25816,7 @@ const R1 = [
25816
25816
  initialDecimals: e = 6,
25817
25817
  children: t
25818
25818
  }) => {
25819
- const { setContext: n, context: o } = at(ct), r = lt(() => {
25819
+ const { setContext: n, context: o } = lt(ct), r = at(() => {
25820
25820
  var b, y;
25821
25821
  const h = (b = o.luckysheet_select_save) == null ? void 0 : b[0], p = Te(o);
25822
25822
  if (!h || !p) return null;
@@ -25947,7 +25947,7 @@ function _c(e) {
25947
25947
  t && (f(), e.disabled || i(!0));
25948
25948
  }, [t, f, e.disabled, i]), m = Ee(() => {
25949
25949
  t && c();
25950
- }, [t, c]), g = lt(() => ds(
25950
+ }, [t, c]), g = at(() => ds(
25951
25951
  "hover:color-bg-default-hover h-8 rounded p-2 w-full text-left flex items-center justify-between space-x-2 transition",
25952
25952
  e.disabled ? "opacity-50 cursor-not-allowed" : void 0,
25953
25953
  e.className
@@ -26092,7 +26092,7 @@ function S7({
26092
26092
  );
26093
26093
  }
26094
26094
  const E7 = () => {
26095
- const { context: e, setContext: t, refs: n } = at(ct), [o, r] = Re(!1), [s, a] = Re(
26095
+ const { context: e, setContext: t, refs: n } = lt(ct), [o, r] = Re(!1), [s, a] = Re(
26096
26096
  null
26097
26097
  ), i = Ee(
26098
26098
  (f) => {
@@ -26118,7 +26118,7 @@ const E7 = () => {
26118
26118
  }), r(!1), a(null);
26119
26119
  },
26120
26120
  [e, n.cellInput, n.fxInput, n.globalCache, t]
26121
- ), l = lt(() => {
26121
+ ), l = at(() => {
26122
26122
  const f = ht(e).functionlist || [], c = /* @__PURE__ */ new Map();
26123
26123
  for (const p of f) {
26124
26124
  const m = (p != null && p.n ? String(p.n) : "").trim();
@@ -26430,7 +26430,7 @@ const E7 = () => {
26430
26430
  defaultTextFormat: t,
26431
26431
  toolTipText: n
26432
26432
  }) => {
26433
- const { context: o, setContext: r, refs: s } = at(ct), [a, i] = Re(""), [l, f] = Re(2), [c, d] = Re("USD");
26433
+ const { context: o, setContext: r, refs: s } = lt(ct), [a, i] = Re(""), [l, f] = Re(2), [c, d] = Re("USD");
26434
26434
  let h = t;
26435
26435
  const p = "currency";
26436
26436
  if (e) {
@@ -26663,7 +26663,7 @@ const E7 = () => {
26663
26663
  moreToolbarItems: o
26664
26664
  }) => {
26665
26665
  var V, G, ie, ee;
26666
- const { context: r, setContext: s, refs: a, settings: i, handleUndo: l, handleRedo: f } = at(ct), c = Ee(() => {
26666
+ const { context: r, setContext: s, refs: a, settings: i, handleUndo: l, handleRedo: f } = lt(ct), c = Ee(() => {
26667
26667
  r.luckysheetCellUpdate.length !== 0 && requestAnimationFrame(() => {
26668
26668
  const se = on(r) === "fx" ? a.fxInput.current : a.cellInput.current;
26669
26669
  se == null || se.focus();
@@ -28132,7 +28132,7 @@ const E7 = () => {
28132
28132
  }
28133
28133
  );
28134
28134
  }, D7 = () => {
28135
- const { context: e } = at(ct), t = lt(() => {
28135
+ const { context: e } = lt(ct), t = at(() => {
28136
28136
  const n = z.last(e.luckysheet_select_save);
28137
28137
  if (!(n && n.row_focus != null && n.column_focus != null))
28138
28138
  return "";
@@ -28154,7 +28154,7 @@ const E7 = () => {
28154
28154
  ) });
28155
28155
  }, A7 = () => {
28156
28156
  var q, ne;
28157
- const e = localStorage.getItem("formulaMore") === "true", [t, n] = Re(!1), [o, r] = Re(!e), [s, a] = Re(0), { context: i, setContext: l, refs: f } = at(ct), c = je(null), {
28157
+ const e = localStorage.getItem("formulaMore") === "true", [t, n] = Re(!1), [o, r] = Re(!e), [s, a] = Re(0), { context: i, setContext: l, refs: f } = lt(ct), c = je(null), {
28158
28158
  preTextRef: d,
28159
28159
  resetFormulaHistory: h,
28160
28160
  handleFormulaHistoryUndoRedo: p,
@@ -28593,7 +28593,7 @@ const E7 = () => {
28593
28593
  return ((le = me.textContent) == null ? void 0 : le.toUpperCase()) || null;
28594
28594
  }
28595
28595
  return null;
28596
- }, []), X = cp(f.fxInput.current) ?? i.functionHint ?? Q(), Y = X ? i.formulaCache.functionlistMap[X] : null, N = i.luckysheetCellUpdate.length > 0 && on(i) === "fx", A = lt(() => !(i.allowEdit === !1 || R || !mt(i, i.luckysheet_select_save)), [
28596
+ }, []), X = cp(f.fxInput.current) ?? i.functionHint ?? Q(), Y = X ? i.formulaCache.functionlistMap[X] : null, N = i.luckysheetCellUpdate.length > 0 && on(i) === "fx", A = at(() => !(i.allowEdit === !1 || R || !mt(i, i.luckysheet_select_save)), [
28597
28597
  i.config,
28598
28598
  i.luckysheet_select_save,
28599
28599
  i.luckysheetfile,
@@ -28768,7 +28768,7 @@ const E7 = () => {
28768
28768
  )
28769
28769
  ] });
28770
28770
  }, N7 = 125, T7 = () => {
28771
- const { context: e, setContext: t, refs: n } = at(ct), o = je(e);
28771
+ const { context: e, setContext: t, refs: n } = lt(ct), o = je(e);
28772
28772
  o.current = e;
28773
28773
  const { findAndReplace: r } = ht(e), [s, a] = Re(""), i = je(null), l = je(null), f = je(null), c = je(!1), d = Ee(() => {
28774
28774
  var x;
@@ -29008,7 +29008,7 @@ function Sp(e, {
29008
29008
  }, [e]), r;
29009
29009
  }
29010
29010
  const j1 = (e) => String(e).replace(/[^a-zA-Z0-9-]/g, "-").replace(/-+/g, "-"), F7 = ({ sheet: e, isDropPlaceholder: t }) => {
29011
- const { context: n, setContext: o, refs: r, settings: s } = at(ct), [a, i] = Re(!1), l = je(null), f = je(null), [c, d] = Re(!1), { showAlert: h } = Zo(), p = e.id != null ? j1(String(e.id)) : "placeholder", m = e.name ? j1(e.name) : "";
29011
+ const { context: n, setContext: o, refs: r, settings: s } = lt(ct), [a, i] = Re(!1), l = je(null), f = je(null), [c, d] = Re(!1), { showAlert: h } = Zo(), p = e.id != null ? j1(String(e.id)) : "placeholder", m = e.name ? j1(e.name) : "";
29012
29012
  Se(() => {
29013
29013
  o((b) => {
29014
29014
  const y = n.sheetScrollRecord[b == null ? void 0 : b.currentSheetId];
@@ -29234,7 +29234,7 @@ const j1 = (e) => String(e).replace(/[^a-zA-Z0-9-]/g, "-").replace(/-+/g, "-"),
29234
29234
  value: 4
29235
29235
  }
29236
29236
  ], B7 = () => {
29237
- const { context: e, setContext: t } = at(ct), n = je(null), [o, r] = Re(!1), s = Sp("(max-width: 780px)", { defaultValue: !0 });
29237
+ const { context: e, setContext: t } = lt(ct), n = je(null), [o, r] = Re(!1), s = Sp("(max-width: 780px)", { defaultValue: !0 });
29238
29238
  Ss(n, () => {
29239
29239
  r(!1);
29240
29240
  }, []);
@@ -29327,7 +29327,7 @@ const j1 = (e) => String(e).replace(/[^a-zA-Z0-9-]/g, "-").replace(/-+/g, "-"),
29327
29327
  numberC: "Count Numbers",
29328
29328
  sum: "Sum"
29329
29329
  }, V7 = () => {
29330
- const e = Sp("(max-width: 780px)", { defaultValue: !0 }), { context: t, setContext: n, settings: o, refs: r } = at(ct), s = je(null), a = je(null), i = je(null), [l, f] = Re(!1), [c, d] = Re(!0), [h, p] = Re({
29330
+ const e = Sp("(max-width: 780px)", { defaultValue: !0 }), { context: t, setContext: n, settings: o, refs: r } = lt(ct), s = je(null), a = je(null), i = je(null), [l, f] = Re(!1), [c, d] = Re(!0), [h, p] = Re({
29331
29331
  numberC: 0,
29332
29332
  count: 0,
29333
29333
  sum: 0,
@@ -30032,7 +30032,7 @@ var Ep = { exports: {} };
30032
30032
  })(Ep);
30033
30033
  var $7 = Ep.exports;
30034
30034
  const W7 = /* @__PURE__ */ ha($7), Y7 = () => {
30035
- const { context: e, setContext: t } = at(ct), { showAlert: n } = Zo(), { button: o } = ht(e), { hideDialog: r } = wo(), [s, a] = Re("number"), [i, l] = Re(100), f = (c) => {
30035
+ const { context: e, setContext: t } = lt(ct), { showAlert: n } = Zo(), { button: o } = ht(e), { hideDialog: r } = wo(), [s, a] = Re("number"), [i, l] = Re(100), f = (c) => {
30036
30036
  const d = Te(e);
30037
30037
  let h = 100;
30038
30038
  if (d)
@@ -30133,7 +30133,7 @@ const W7 = /* @__PURE__ */ ha($7), Y7 = () => {
30133
30133
  ] })
30134
30134
  ] });
30135
30135
  }, K7 = () => {
30136
- const { context: e, setContext: t } = at(ct), { showAlert: n } = Zo(), { button: o } = ht(e), { hideDialog: r } = wo(), [s, a] = Re("number"), [i, l] = Re(19), f = (c) => {
30136
+ const { context: e, setContext: t } = lt(ct), { showAlert: n } = Zo(), { button: o } = ht(e), { hideDialog: r } = wo(), [s, a] = Re("number"), [i, l] = Re(19), f = (c) => {
30137
30137
  const d = Te(e), h = e.defaultrowlen || 19;
30138
30138
  let p = h;
30139
30139
  if (!(d != null && d[c])) return p;
@@ -30252,7 +30252,7 @@ const W7 = /* @__PURE__ */ ha($7), Y7 = () => {
30252
30252
  );
30253
30253
  }, q7 = () => {
30254
30254
  var L;
30255
- const { showDialog: e } = wo(), t = je(null), { context: n, setContext: o, settings: r, refs: s } = at(ct), { contextMenu: a } = n, { showAlert: i } = Zo(), { rightclick: l, drag: f, generalDialog: c, info: d, splitText: h } = ht(n), [p, m] = Re(""), g = Ee(
30255
+ const { showDialog: e } = wo(), t = je(null), { context: n, setContext: o, settings: r, refs: s } = lt(ct), { contextMenu: a } = n, { showAlert: i } = Zo(), { rightclick: l, drag: f, generalDialog: c, info: d, splitText: h } = ht(n), [p, m] = Re(""), g = Ee(
30256
30256
  (T) => {
30257
30257
  var H;
30258
30258
  const U = (H = n.luckysheet_select_save) == null ? void 0 : H[0];
@@ -34013,7 +34013,7 @@ const W7 = /* @__PURE__ */ ha($7), Y7 = () => {
34013
34013
  ] })
34014
34014
  }
34015
34015
  ), X7 = ({ triggerParentUpdate: e }) => {
34016
- const { context: t, setContext: n } = at(ct), [o, r] = Re(
34016
+ const { context: t, setContext: n } = lt(ct), [o, r] = Re(
34017
34017
  t.luckysheetfile[De(t, t.currentSheetId)].color
34018
34018
  );
34019
34019
  return Se(() => {
@@ -34046,7 +34046,7 @@ const W7 = /* @__PURE__ */ ha($7), Y7 = () => {
34046
34046
  ] });
34047
34047
  }, Q7 = () => {
34048
34048
  var E;
34049
- const { context: e, setContext: t, settings: n } = at(ct), { x: o, y: r, sheet: s, onRename: a } = e.sheetTabContextMenu, { sheetconfig: i } = ht(e), [l, f] = Re({ x: -1, y: -1 }), [c, d] = Re(!1), [h, p] = Re(!1), { showAlert: m, hideAlert: g } = Zo(), w = je(null), R = Ee(() => {
34049
+ const { context: e, setContext: t, settings: n } = lt(ct), { x: o, y: r, sheet: s, onRename: a } = e.sheetTabContextMenu, { sheetconfig: i } = ht(e), [l, f] = Re({ x: -1, y: -1 }), [c, d] = Re(!1), [h, p] = Re(!1), { showAlert: m, hideAlert: g } = Zo(), w = je(null), R = Ee(() => {
34050
34050
  t((S) => {
34051
34051
  S.sheetTabContextMenu = {};
34052
34052
  });
@@ -34484,7 +34484,7 @@ function J7(e, t, n, o, r, s, a, i, l, f) {
34484
34484
  };
34485
34485
  }
34486
34486
  const D1 = ({ item: e, isChecked: t, onChange: n, isItemVisible: o }) => {
34487
- const r = lt(() => t(e.key), [t, e.key]);
34487
+ const r = at(() => t(e.key), [t, e.key]);
34488
34488
  return o(e) ? /* @__PURE__ */ u.jsxs("div", { className: "select-item", children: [
34489
34489
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
34490
34490
  /* @__PURE__ */ u.jsx(
@@ -34510,7 +34510,7 @@ const D1 = ({ item: e, isChecked: t, onChange: n, isItemVisible: o }) => {
34510
34510
  onChange: s,
34511
34511
  isItemVisible: a
34512
34512
  }) => {
34513
- const [i, l] = Re(n(e.key)), f = lt(() => r(e.key), [r, e.key]);
34513
+ const [i, l] = Re(n(e.key)), f = at(() => r(e.key), [r, e.key]);
34514
34514
  return a(e) ? /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-2", children: [
34515
34515
  /* @__PURE__ */ u.jsxs(
34516
34516
  "div",
@@ -34589,7 +34589,7 @@ const D1 = ({ item: e, isChecked: t, onChange: n, isItemVisible: o }) => {
34589
34589
  a.key
34590
34590
  )) }), t8 = () => {
34591
34591
  var v;
34592
- const { context: e, setContext: t, settings: n, refs: o } = at(ct), r = je(null), s = je(e), a = je(null), i = je(null), { filterContextMenu: l } = e, { startRow: f, startCol: c, endRow: d, endCol: h, col: p } = l || {
34592
+ const { context: e, setContext: t, settings: n, refs: o } = lt(ct), r = je(null), s = je(e), a = je(null), i = je(null), { filterContextMenu: l } = e, { startRow: f, startCol: c, endRow: d, endCol: h, col: p } = l || {
34593
34593
  startRow: null,
34594
34594
  startCol: null,
34595
34595
  endRow: null,
@@ -34602,7 +34602,7 @@ const D1 = ({ item: e, isChecked: t, onChange: n, isItemVisible: o }) => {
34602
34602
  valueRowMap: {},
34603
34603
  visibleRows: [],
34604
34604
  flattenValues: []
34605
- }), [R, C] = Re([]), [b, y] = Re([]), _ = je({}), x = je([]), [E, S] = Re([]), [P, Z] = Re(""), J = Ee((B) => String(B ?? "").toLocaleLowerCase(), []), $ = lt(() => new Set(E.map((B) => J(B))), [J, E]), k = lt(() => {
34605
+ }), [R, C] = Re([]), [b, y] = Re([]), _ = je({}), x = je([]), [E, S] = Re([]), [P, Z] = Re(""), J = Ee((B) => String(B ?? "").toLocaleLowerCase(), []), $ = at(() => new Set(E.map((B) => J(B))), [J, E]), k = at(() => {
34606
34606
  const B = /* @__PURE__ */ new Map();
34607
34607
  for (const q of g.values) {
34608
34608
  const ne = J(q.text), te = B.get(ne);
@@ -34632,7 +34632,7 @@ const D1 = ({ item: e, isChecked: t, onChange: n, isItemVisible: o }) => {
34632
34632
  return q ?? (_.current[B] = !0, !0);
34633
34633
  }, []), X = Ee((B, q) => {
34634
34634
  _.current[B] = q;
34635
- }, []), Y = lt(
34635
+ }, []), Y = at(
34636
34636
  () => z.debounce((B) => {
34637
34637
  S(
34638
34638
  z.filter(
@@ -34652,7 +34652,7 @@ const D1 = ({ item: e, isChecked: t, onChange: n, isItemVisible: o }) => {
34652
34652
  );
34653
34653
  },
34654
34654
  []
34655
- ), A = lt(
34655
+ ), A = at(
34656
34656
  () => z.debounce(() => {
34657
34657
  U.current || L(!1);
34658
34658
  }, 200),
@@ -35016,7 +35016,7 @@ const D1 = ({ item: e, isChecked: t, onChange: n, isItemVisible: o }) => {
35016
35016
  )
35017
35017
  ] });
35018
35018
  }, n8 = ({ style: e, sheet: t }) => {
35019
- const { context: n, setContext: o } = at(ct), r = Ee(() => {
35019
+ const { context: n, setContext: o } = lt(ct), r = Ee(() => {
35020
35020
  n.allowEdit !== !1 && t && o((s) => {
35021
35021
  nm(s, t.id);
35022
35022
  });
@@ -35044,7 +35044,7 @@ const D1 = ({ item: e, isChecked: t, onChange: n, isItemVisible: o }) => {
35044
35044
  }
35045
35045
  );
35046
35046
  }, o8 = ({ sheet: e, isDropPlaceholder: t }) => {
35047
- const { context: n, setContext: o, refs: r, settings: s } = at(ct), a = je(null);
35047
+ const { context: n, setContext: o, refs: r, settings: s } = lt(ct), a = je(null);
35048
35048
  return Se(() => {
35049
35049
  o((i) => {
35050
35050
  const l = n.sheetScrollRecord[i == null ? void 0 : i.currentSheetId];
@@ -35112,7 +35112,7 @@ const D1 = ({ item: e, isChecked: t, onChange: n, isItemVisible: o }) => {
35112
35112
  e.id
35113
35113
  );
35114
35114
  }, r8 = () => {
35115
- const { context: e, setContext: t } = at(ct), n = je(null), o = Ee(() => {
35115
+ const { context: e, setContext: t } = lt(ct), n = je(null), o = Ee(() => {
35116
35116
  t((r) => {
35117
35117
  r.showSheetList = !1;
35118
35118
  });
@@ -35192,7 +35192,7 @@ const A1 = (e) => {
35192
35192
  }, i8 = fn.forwardRef(
35193
35193
  ({ onOp: e, data: t, isFlvReadOnly: n, ...o }, r) => {
35194
35194
  var Y;
35195
- const s = je({ undoList: [], redoList: [] }), a = je(null), i = je(null), l = je(null), f = je(null), c = je(null), d = je(null), h = je(null), p = lt(
35195
+ const s = je({ undoList: [], redoList: [] }), a = je(null), i = je(null), l = je(null), f = je(null), c = je(null), d = je(null), h = je(null), p = at(
35196
35196
  () => ({
35197
35197
  globalCache: s.current,
35198
35198
  cellInput: a,
@@ -35204,7 +35204,7 @@ const A1 = (e) => {
35204
35204
  workbookContainer: h
35205
35205
  }),
35206
35206
  []
35207
- ), [m, g] = Re(of(p)), [w, R] = Re(null), C = lt(
35207
+ ), [m, g] = Re(of(p)), [w, R] = Re(null), C = at(
35208
35208
  () => z.assign(z.cloneDeep(Mf), o),
35209
35209
  // props expect data, onChage, onOp
35210
35210
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -35546,7 +35546,7 @@ const A1 = (e) => {
35546
35546
  m.luckysheet_select_save,
35547
35547
  C.hooks
35548
35548
  ]);
35549
- const J = lt(
35549
+ const J = at(
35550
35550
  () => ({
35551
35551
  context: m,
35552
35552
  setContext: S,
@@ -35568,7 +35568,7 @@ const A1 = (e) => {
35568
35568
  var N;
35569
35569
  (N = m == null ? void 0 : m.hooks) != null && N.sheetLengthChange && m.hooks.sheetLengthChange();
35570
35570
  }, [m.luckysheetfile.length]);
35571
- const $ = lt(() => {
35571
+ const $ = at(() => {
35572
35572
  var N;
35573
35573
  return (N = m == null ? void 0 : m.luckysheetfile) == null ? void 0 : N.find(
35574
35574
  (A) => A.id === (m == null ? void 0 : m.currentSheetId)
@@ -35590,12 +35590,12 @@ const A1 = (e) => {
35590
35590
  var N;
35591
35591
  (N = m == null ? void 0 : m.hooks) != null && N.afterOrderChanges && m.hooks.afterOrderChanges();
35592
35592
  }, [$ == null ? void 0 : $.order]);
35593
- const k = lt(() => ((m == null ? void 0 : m.luckysheetfile) ?? []).map((N) => `${N.id}:${N.color ?? ""}`).join("|"), [m == null ? void 0 : m.luckysheetfile]);
35593
+ const k = at(() => ((m == null ? void 0 : m.luckysheetfile) ?? []).map((N) => `${N.id}:${N.color ?? ""}`).join("|"), [m == null ? void 0 : m.luckysheetfile]);
35594
35594
  Se(() => {
35595
35595
  var N;
35596
35596
  (N = m == null ? void 0 : m.hooks) != null && N.afterColorChanges && m.hooks.afterColorChanges();
35597
35597
  }, [k]);
35598
- const I = lt(() => ((m == null ? void 0 : m.luckysheetfile) ?? []).map((N) => `${N.id}:${N.hide ?? 0}`).join("|"), [m == null ? void 0 : m.luckysheetfile]);
35598
+ const I = at(() => ((m == null ? void 0 : m.luckysheetfile) ?? []).map((N) => `${N.id}:${N.hide ?? 0}`).join("|"), [m == null ? void 0 : m.luckysheetfile]);
35599
35599
  Se(() => {
35600
35600
  var N;
35601
35601
  (N = m == null ? void 0 : m.hooks) != null && N.afterHideChanges && m.hooks.afterHideChanges();
@@ -46594,7 +46594,9 @@ const X_ = { status: "idle" }, Q_ = (e) => {
46594
46594
  }, [e, t, n]), Se(() => {
46595
46595
  if (!d || !(o != null && o.enabled) || !f.current) return;
46596
46596
  const $ = o;
46597
- x.current($.connection);
46597
+ return x.current($.connection), () => {
46598
+ C();
46599
+ };
46598
46600
  }, [d]), Se(() => {
46599
46601
  if (!b || !d || !(o != null && o.enabled)) return;
46600
46602
  const $ = o.session;
@@ -47920,15 +47922,15 @@ const C6 = R6(void 0), xx = ({
47920
47922
  p,
47921
47923
  k
47922
47924
  );
47923
- lt(() => {
47925
+ at(() => {
47924
47926
  w && (w.current = {
47925
47927
  ...w.current,
47926
47928
  refreshIndexedDB: F
47927
47929
  });
47928
- }, [w]), lt(() => {
47929
- !(h != null && h.current) || !X || (h.current.terminateSession = X);
47930
- }, [h, X]);
47931
- const Y = lt(() => d ? ww(() => {
47930
+ }, [w]), Se(() => {
47931
+ h != null && h.current && X && (h.current.terminateSession = X);
47932
+ });
47933
+ const Y = at(() => d ? ww(() => {
47932
47934
  if (!I.current) return;
47933
47935
  const fe = _o(
47934
47936
  Oe.encodeStateAsUpdate(I.current)
@@ -47978,7 +47980,7 @@ const C6 = R6(void 0), xx = ({
47978
47980
  v && O === "synced" && W.current && _((fe) => fe + 1);
47979
47981
  }, [v, O]);
47980
47982
  const ae = !v || O === "initializing" || O === "syncing" || // In read-only mode, continue showing the loading state if we have no data yet
47981
- f && (!H.current || H.current.length === 0), ye = lt(() => ({
47983
+ f && (!H.current || H.current.length === 0), ye = at(() => ({
47982
47984
  setSelectedTemplate: e,
47983
47985
  setShowSmartContractModal: t,
47984
47986
  getDocumentTitle: n,
@@ -48045,7 +48047,7 @@ const C6 = R6(void 0), xx = ({
48045
48047
  ]);
48046
48048
  return /* @__PURE__ */ u.jsx(C6.Provider, { value: ye, children: r });
48047
48049
  }, da = () => {
48048
- const e = at(C6);
48050
+ const e = lt(C6);
48049
48051
  if (e === void 0)
48050
48052
  throw new Error("useEditor must be used within an EditorProvider");
48051
48053
  return e;
@@ -49441,7 +49443,7 @@ const xr = ({
49441
49443
  }, w.readAsText(h);
49442
49444
  });
49443
49445
  }, Kh = async (e, t, n, o) => {
49444
- const { handleExportToXLSX: r } = await import("./xlsx-export-impl-VvjwINvh.js");
49446
+ const { handleExportToXLSX: r } = await import("./xlsx-export-impl-xisSVXex.js");
49445
49447
  return r(e, t, n, o);
49446
49448
  }, zx = (e) => {
49447
49449
  var n;
@@ -49516,7 +49518,7 @@ const xr = ({
49516
49518
  const [a, i] = Re(!1);
49517
49519
  return { handleXLSXUpload: Ee(
49518
49520
  async (f, c, d) => {
49519
- const { runXlsxFileUpload: h } = await import("./use-xlsx-import-impl-DpIvOYal.js");
49521
+ const { runXlsxFileUpload: h } = await import("./use-xlsx-import-impl-1BP1roqx.js");
49520
49522
  return h(
49521
49523
  {
49522
49524
  sheetEditorRef: e,
@@ -49939,7 +49941,7 @@ const tS = ({
49939
49941
  Se(() => {
49940
49942
  U.current = T;
49941
49943
  }, [T]), Ax(T, E);
49942
- const M = l ?? "onboardingComplete", Q = lt(() => typeof i == "boolean" ? i : eS(M), [i, M]);
49944
+ const M = l ?? "onboardingComplete", Q = at(() => typeof i == "boolean" ? i : eS(M), [i, M]);
49943
49945
  Se(() => {
49944
49946
  k && Fx({
49945
49947
  sheetEditorRef: E,
@@ -49982,7 +49984,7 @@ const tS = ({
49982
49984
  return Ee(
49983
49985
  (ae) => Gh(D, ae),
49984
49986
  [g, H]
49985
- ), lt(() => {
49987
+ ), at(() => {
49986
49988
  const ae = `workbook-${g}-${Z}`, ye = P.current && P.current.length > 0 ? P.current : o ? [] : q0;
49987
49989
  return (
49988
49990
  // @ts-ignore
@@ -50672,29 +50674,30 @@ const tS = ({
50672
50674
  export {
50673
50675
  jS as S,
50674
50676
  DS as T,
50675
- hy as a,
50676
- za as b,
50677
+ h8 as a,
50678
+ hy as b,
50677
50679
  J9 as c,
50678
- Ef as d,
50679
- ql as e,
50680
- qh as f,
50681
- Zh as g,
50680
+ za as d,
50681
+ Ef as e,
50682
+ ql as f,
50683
+ qh as g,
50682
50684
  Yh as h,
50683
50685
  bS as i,
50684
- Kh as j,
50685
- iu as k,
50686
- vm as l,
50686
+ Zh as j,
50687
+ Kh as k,
50688
+ iu as l,
50687
50689
  b6 as m,
50688
- La as n,
50689
- Ar as o,
50690
- Uf as p,
50691
- _m as q,
50692
- xm as r,
50693
- bm as s,
50694
- $l as t,
50695
- kf as u,
50696
- Em as v,
50697
- wn as w,
50698
- Vx as x,
50699
- Oo as y
50690
+ vm as n,
50691
+ La as o,
50692
+ Ar as p,
50693
+ Uf as q,
50694
+ _m as r,
50695
+ xm as s,
50696
+ bm as t,
50697
+ $l as u,
50698
+ kf as v,
50699
+ Em as w,
50700
+ wn as x,
50701
+ Oo as y,
50702
+ Vx as z
50700
50703
  };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as DSheetEditor } from './editor/dsheet-editor';
2
+ export { default as DSheetSkeleton } from './editor/components/skeleton-loader';
2
3
  export { formulaResponseUiSync } from './editor/utils/formula-ui-sync';
3
4
  export { executeStringFunction } from './editor/utils/executeStringFunction';
4
5
  export { FLVURL } from '@fileverse-dev/formulajs';
package/dist/index.es.js CHANGED
@@ -1,45 +1,46 @@
1
- import { S as s, i as l, T as o, a as r, b as t, d as n, h as d, e as h, f as S, g as i, j as c, k as m, l as p, n as C, o as E, p as x, q as F, r as g, s as f, t as L, u as R, v as u, w as T, x as b } from "./index-DoBBaUbE.js";
2
- import { bJ as I, bK as w, bL as V, bP as k, ba as P, e as X, f as _, h as v, a as y, ca as z, ap as M, ch as U } from "./executeStringFunction-9cGLblM5.js";
1
+ import { S as s, a as l, i as o, T as t, b as r, d as n, e as d, h as S, f as h, g as i, j as c, k as m, l as p, n as C, o as E, p as x, q as F, r as g, s as f, t as L, u as R, v as u, w as T, x as b, z as A } from "./index-CZva8Tsd.js";
2
+ import { bJ as w, bK as k, bL as V, bP as z, ba as P, e as X, f as _, h as v, a as y, ca as M, ap as U, ch as j } from "./executeStringFunction-9cGLblM5.js";
3
3
  import { FLVURL as G } from "@fileverse-dev/formulajs";
4
4
  import { E as J, S as K } from "./constants-yStXQJiK.js";
5
5
  export {
6
6
  s as DSheetEditor,
7
+ l as DSheetSkeleton,
7
8
  J as ERROR_MESSAGES_FLAG,
8
9
  G as FLVURL,
9
- l as FortuneCore,
10
+ o as FortuneCore,
10
11
  K as SERVICES_API_KEY,
11
- o as TEMPLATES,
12
+ t as TEMPLATES,
12
13
  r as api,
13
- I as clearColumnsCellsFormat,
14
- t as clearFilter,
15
- w as clearRowsCellsFormat,
14
+ w as clearColumnsCellsFormat,
15
+ n as clearFilter,
16
+ k as clearRowsCellsFormat,
16
17
  V as clearSelectedCellFormat,
17
- n as createFilter,
18
- k as deleteRowCol,
18
+ d as createFilter,
19
+ z as deleteRowCol,
19
20
  P as deleteSelectedCellText,
20
21
  X as executeStringFunction,
21
22
  _ as formulaResponseUiSync,
22
23
  v as getFlowdata,
23
24
  y as getSheetIndex,
24
- d as handleCSVUpload,
25
+ S as handleCSVUpload,
25
26
  h as handleCopy,
26
- S as handleExportToCSV,
27
- i as handleExportToJSON,
28
- c as handleExportToXLSX,
29
- m as handleFreeze,
30
- p as handleHorizontalAlign,
31
- C as handleLink,
32
- E as handleMerge,
33
- x as handlePasteByClick,
34
- F as handleSort,
35
- g as handleTextSize,
36
- f as handleVerticalAlign,
37
- z as insertRowCol,
38
- M as jfrefreshgrid,
39
- U as loadLocale,
40
- L as removeActiveImage,
41
- R as showImgChooser,
42
- u as toolbarItemClickHandler,
43
- T as updateFormat,
44
- b as useXLSXImport
27
+ i as handleExportToCSV,
28
+ c as handleExportToJSON,
29
+ m as handleExportToXLSX,
30
+ p as handleFreeze,
31
+ C as handleHorizontalAlign,
32
+ E as handleLink,
33
+ x as handleMerge,
34
+ F as handlePasteByClick,
35
+ g as handleSort,
36
+ f as handleTextSize,
37
+ L as handleVerticalAlign,
38
+ M as insertRowCol,
39
+ U as jfrefreshgrid,
40
+ j as loadLocale,
41
+ R as removeActiveImage,
42
+ u as showImgChooser,
43
+ T as toolbarItemClickHandler,
44
+ b as updateFormat,
45
+ A as useXLSXImport
45
46
  };
@@ -1,6 +1,6 @@
1
1
  import { g as Ue } from "./executeStringFunction-9cGLblM5.js";
2
2
  import * as qe from "yjs";
3
- import { m as Xe, y as Ze } from "./index-DoBBaUbE.js";
3
+ import { m as Xe, y as Ze } from "./index-CZva8Tsd.js";
4
4
  import { n as Je } from "./xlsx-hyperlink-inline-DzewAypN.js";
5
5
  import { toast as Be } from "@fileverse/ui";
6
6
  var We = { exports: {} };
@@ -3,7 +3,7 @@ import { Workbook as Pt } from "exceljs";
3
3
  import { toast as Ut } from "@fileverse/ui";
4
4
  import { addFortuneImagesToWorksheet as Lt } from "./xlsx-image-utils-Cvg0qxRA.js";
5
5
  import { g as jt, c as xt } from "./executeStringFunction-9cGLblM5.js";
6
- import { c as Ct } from "./index-DoBBaUbE.js";
6
+ import { c as Ct } from "./index-CZva8Tsd.js";
7
7
  import { c as zt, g as Wt } from "./xlsx-hyperlink-inline-DzewAypN.js";
8
8
  const Mt = {
9
9
  1: "thin",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/dsheet",
3
3
  "private": false,
4
4
  "description": "DSheet",
5
- "version": "2.0.33-rtc-c",
5
+ "version": "2.0.33-rtc-d",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {
@@ -109,4 +109,4 @@
109
109
  "typescript": "^5.2.2",
110
110
  "vite": "^5.0.0"
111
111
  }
112
- }
112
+ }