@fileverse-dev/dsheet 2.1.2-dropIn-mri-3 → 2.1.2-dropIn-mri-5

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.
@@ -9,7 +9,7 @@ var Xl = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
9
9
  function Qo(e) {
10
10
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
11
11
  }
12
- function Xf(e) {
12
+ function Kf(e) {
13
13
  if (e.__esModule) return e;
14
14
  var t = e.default;
15
15
  if (typeof t == "function") {
@@ -35,7 +35,7 @@ const Fn = {}, kr = {
35
35
  hi: () => import("./hi-Ca55EZ4A.js"),
36
36
  "zh-TW": () => import("./zh_tw-CINWHD2H.js")
37
37
  };
38
- async function Zf(e) {
38
+ async function Qf(e) {
39
39
  const t = e in kr ? e : e.split("-")[0], r = t in kr ? t : "en";
40
40
  if (Fn[r]) return;
41
41
  const a = await kr[r]();
@@ -13908,7 +13908,7 @@ let ya = "uk";
13908
13908
  function Ls(e) {
13909
13909
  return e === "us" ? "us" : "uk";
13910
13910
  }
13911
- function Kf(e) {
13911
+ function Jf(e) {
13912
13912
  ya = Ls(e);
13913
13913
  }
13914
13914
  function Fs() {
@@ -13942,7 +13942,7 @@ function Hs(e) {
13942
13942
  function Us(e, t) {
13943
13943
  return Hs(e) ? e : il(t);
13944
13944
  }
13945
- function Qf(e) {
13945
+ function ed(e) {
13946
13946
  if (document.createRange)
13947
13947
  if (e.innerHTML !== e.innerText || e.innerHTML === "") {
13948
13948
  e.focus();
@@ -13984,7 +13984,7 @@ function ta(e) {
13984
13984
  `).replace(/\r/g, `
13985
13985
  `);
13986
13986
  }
13987
- function Jf(e) {
13987
+ function td(e) {
13988
13988
  const t = window.getSelection();
13989
13989
  if (!t || t.rangeCount === 0) return null;
13990
13990
  const r = t.focusNode;
@@ -13992,7 +13992,7 @@ function Jf(e) {
13992
13992
  const a = document.createRange();
13993
13993
  return a.selectNodeContents(e), a.setEnd(r, t.focusOffset), ta(a.toString()).length;
13994
13994
  }
13995
- function ed(e) {
13995
+ function nd(e) {
13996
13996
  const t = window.getSelection();
13997
13997
  if (!t || t.rangeCount === 0) return null;
13998
13998
  const r = t.getRangeAt(0);
@@ -14003,7 +14003,7 @@ function ed(e) {
14003
14003
  const n = ta(a.toString()).length, o = ta(r.toString());
14004
14004
  return { start: n, end: n + o.length };
14005
14005
  }
14006
- function td(e, t, r) {
14006
+ function rd(e, t, r) {
14007
14007
  e.focus({ preventScroll: !0 });
14008
14008
  const a = window.getSelection();
14009
14009
  if (!a) return;
@@ -14034,7 +14034,7 @@ function td(e, t, r) {
14034
14034
  u.setStart(o, i), u.setEnd(l, c), a.removeAllRanges(), a.addRange(u);
14035
14035
  }
14036
14036
  }
14037
- function nd(e, t, r) {
14037
+ function ad(e, t, r) {
14038
14038
  if (t >= r) return [];
14039
14039
  let a = 0, n = null, o = 0, i = null, l = 0;
14040
14040
  function c(f) {
@@ -14072,7 +14072,7 @@ const Co = {
14072
14072
  fc: "color",
14073
14073
  cl: "text-decoration",
14074
14074
  un: "border-bottom"
14075
- }, rd = {
14075
+ }, id = {
14076
14076
  bl: 1,
14077
14077
  it: 1,
14078
14078
  ff: 1,
@@ -14097,7 +14097,7 @@ function vr(e) {
14097
14097
  var t;
14098
14098
  return (e == null ? void 0 : e.t) === "inlineStr" && (((t = e == null ? void 0 : e.s) == null ? void 0 : t.length) ?? 0) > 0;
14099
14099
  }
14100
- function ad(e, t, r) {
14100
+ function od(e, t, r) {
14101
14101
  const a = Ke(e, t, r, "ct");
14102
14102
  if (vr(a)) {
14103
14103
  const n = a.s;
@@ -14156,7 +14156,7 @@ function Ys(e) {
14156
14156
  const t = Gs(e);
14157
14157
  return t === "rgb(0,0,255)" || t === "#0000ff" || t === "#00f" || t === "blue";
14158
14158
  }
14159
- function id(e) {
14159
+ function ld(e) {
14160
14160
  typeof e.fc == "string" && Ys(e.fc) && delete e.fc, e.un === 1 && delete e.un;
14161
14161
  }
14162
14162
  function js(e, t) {
@@ -14185,7 +14185,7 @@ function js(e, t) {
14185
14185
  }
14186
14186
  return r;
14187
14187
  }
14188
- function od(e, t, r) {
14188
+ function sd(e, t, r) {
14189
14189
  if (h.isNil(e.ct))
14190
14190
  return;
14191
14191
  const { s: a } = e.ct;
@@ -14290,7 +14290,7 @@ function pn(e, t, r = !0) {
14290
14290
  function je(e) {
14291
14291
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
14292
14292
  }
14293
- function ld(e, t, r, a) {
14293
+ function cd(e, t, r, a) {
14294
14294
  var d, p, g;
14295
14295
  const n = window.getSelection();
14296
14296
  if (!n || n.rangeCount === 0) return;
@@ -14494,7 +14494,7 @@ function nr(e, t, r) {
14494
14494
  }
14495
14495
  return a + r;
14496
14496
  }
14497
- function sd(e, t, r) {
14497
+ function ud(e, t, r) {
14498
14498
  var d, p, g, y, b, w;
14499
14499
  const a = window.getSelection();
14500
14500
  if (!a || a.rangeCount === 0) return;
@@ -14640,7 +14640,7 @@ function Js(e) {
14640
14640
  if (!(!a || !n) && !(a.linkType !== n.linkType || a.linkAddress !== n.linkAddress))
14641
14641
  return a;
14642
14642
  }
14643
- function cd(e) {
14643
+ function fd(e) {
14644
14644
  const t = window.getSelection();
14645
14645
  if (!(t != null && t.rangeCount) || !t.anchorNode || !e.contains(t.anchorNode))
14646
14646
  return;
@@ -14679,7 +14679,7 @@ function rc(e, t, r, a, n) {
14679
14679
  const u = a.measureText(o).width, f = a.measureText(s).width, m = Math.max(1, a.measureText(" ").width || 1), d = r - n - u - f, p = Math.floor(d / m);
14680
14680
  return p <= 1 ? e : `${`${c}${o}`}${" ".repeat(p)}${s}`;
14681
14681
  }
14682
- function ud() {
14682
+ function dd() {
14683
14683
  Xt = {}, cr = 0, cl = {};
14684
14684
  for (const e in mn) delete mn[e];
14685
14685
  sr = 0;
@@ -17474,7 +17474,7 @@ function Sc(e) {
17474
17474
  let r = 1, a = e.replace(/([\d]),([\d])/g, "$1$2").replace(/[$]/g, "").replace(/[%]/g, () => (r *= 100, ""));
17475
17475
  return t = Number(a), !Number.isNaN(t) || (a = a.replace(/[(](.*)[)]/, (n, o) => (r = -r, o)), t = Number(a), !Number.isNaN(t)) ? t / r : t;
17476
17476
  }
17477
- function fd(e, t, r) {
17477
+ function md(e, t, r) {
17478
17478
  var n, o, i, l, c, s;
17479
17479
  let a = Ke(e, t, r, "m");
17480
17480
  return a == null ? a = Ke(e, t, r, "v") : Number.isNaN(Sc(a)) ? ((i = (o = (n = r[e]) == null ? void 0 : n[t]) == null ? void 0 : o.ct) == null ? void 0 : i.t) === "d" || ((s = (c = (l = r[e]) == null ? void 0 : l[t]) == null ? void 0 : c.ct) == null ? void 0 : s.t) === "b" || (a = Ke(e, t, r, "v")) : h.isString(a) && a.indexOf("%") > -1 || (a = Ke(e, t, r, "v")), a;
@@ -17531,18 +17531,26 @@ function Sa(e, t) {
17531
17531
  let r = h.sortedIndex(t, e);
17532
17532
  return r >= t.length && e > 0 ? r = t.length - 1 : r === -1 && e <= 0 && (r = 0), Ec(r, t);
17533
17533
  }
17534
- const kc = 15, Rc = 20, dd = 100, md = 150, hd = 3e4;
17534
+ const kc = 15, Rc = 50, hd = 100, pd = 300, gd = 3e4, Mc = "fortune-formula-execution-debug";
17535
+ function yd() {
17536
+ if (typeof window > "u") return !1;
17537
+ try {
17538
+ return localStorage.getItem(Mc) === "true";
17539
+ } catch {
17540
+ return !1;
17541
+ }
17542
+ }
17535
17543
  function aa(e) {
17536
17544
  return !!(e.isFormulaCalculating && e.formulaAsyncEval);
17537
17545
  }
17538
- const Mc = /\b(SEQUENCE|FILTER|SORT|SORTBY|UNIQUE|TRANSPOSE|ARRAYFORMULA|INDIRECT|OFFSET|INDEX|SPARKLINE)\s*\(/i;
17539
- function pd(e) {
17540
- return Mc.test(e);
17546
+ const qc = /\b(SEQUENCE|FILTER|SORT|SORTBY|UNIQUE|TRANSPOSE|ARRAYFORMULA|INDIRECT|OFFSET|INDEX|SPARKLINE)\s*\(/i;
17547
+ function bd(e) {
17548
+ return qc.test(e);
17541
17549
  }
17542
- function qc(e, t, r, a, n) {
17550
+ function Ic(e, t, r, a, n) {
17543
17551
  return `${e}:${t}:${r}:${a}:${n}`;
17544
17552
  }
17545
- function Ic(e, t, r, a, n, o) {
17553
+ function Dc(e, t, r, a, n, o) {
17546
17554
  const i = [];
17547
17555
  for (let l = r; l <= a; l += 1)
17548
17556
  for (let c = n; c <= o; c += 1) {
@@ -17565,13 +17573,13 @@ function Lr(e, t, r, a, n) {
17565
17573
  }
17566
17574
  return o;
17567
17575
  }
17568
- function Dc(e) {
17576
+ function Oc(e) {
17569
17577
  e.rangeValuePassCache = /* @__PURE__ */ new Map(), e.rangeValuePassCacheStats = { hits: 0, misses: 0 };
17570
17578
  }
17571
17579
  function hl(e) {
17572
17580
  e.rangeValuePassCache = void 0, e.rangeValuePassCacheStats = void 0;
17573
17581
  }
17574
- function Oc(e, t) {
17582
+ function Lc(e, t) {
17575
17583
  const r = /* @__PURE__ */ new Set(), a = [e], n = /* @__PURE__ */ new Set([e]);
17576
17584
  for (; a.length > 0; ) {
17577
17585
  const o = a.shift(), i = t.get(o);
@@ -17581,8 +17589,8 @@ function Oc(e, t) {
17581
17589
  }
17582
17590
  return r;
17583
17591
  }
17584
- let Qt = 0, Un = [];
17585
- const Lc = {
17592
+ let Qt = 0, Fc = 0, Un = [];
17593
+ const Bc = {
17586
17594
  "^": 0,
17587
17595
  "%": 1,
17588
17596
  "*": 1,
@@ -17592,10 +17600,10 @@ const Lc = {
17592
17600
  }, Eo = "==|!=|<>|<=|>=|=|+|-|>|<|/|*|%|&|^".split("|"), et = {};
17593
17601
  for (let e = 0; e < Eo.length; e += 1)
17594
17602
  et[Eo[e].toString()] = 1;
17595
- const Fr = "​", Bt = (e) => (e || "").replace(/\u00a0/g, " ").replace(/\u200b/g, ""), Fc = "[A-Za-z0-9_À-ʯ]+", Bc = "'(?:(?!').|'')*'", Pc = `(${Fc}|${Bc})!`, Hc = "[$]?[A-Za-z]+[$]?[0-9]+", Uc = "[$]?[A-Za-z]+", zc = "[$]?[0-9]+", Wc = `(?:${Hc}|${Uc}|${zc})`, ko = `(?:${Pc})?(${Wc})`, Vc = new RegExp(
17603
+ const Fr = "​", Bt = (e) => (e || "").replace(/\u00a0/g, " ").replace(/\u200b/g, ""), Pc = "[A-Za-z0-9_À-ʯ]+", Hc = "'(?:(?!').|'')*'", Uc = `(${Pc}|${Hc})!`, zc = "[$]?[A-Za-z]+[$]?[0-9]+", Wc = "[$]?[A-Za-z]+", Vc = "[$]?[0-9]+", Gc = `(?:${zc}|${Wc}|${Vc})`, ko = `(?:${Uc})?(${Gc})`, Yc = new RegExp(
17596
17604
  `^${ko}(?:[:]${ko})?$`
17597
17605
  );
17598
- function Gc(e) {
17606
+ function jc(e) {
17599
17607
  if (!e) return e;
17600
17608
  const t = new Date(1900, 2, 1, 0, 0, 0), r = (i) => {
17601
17609
  let l = Date.UTC(
@@ -17619,7 +17627,7 @@ function Gc(e) {
17619
17627
  (i, l, c, s) => `${l} ${c} ${String(s).toUpperCase() === "NOW" ? o : n}`
17620
17628
  );
17621
17629
  }
17622
- function Yc(e, t) {
17630
+ function Xc(e, t) {
17623
17631
  if (typeof t != "number" || !Number.isFinite(t) || t <= 0 || t > 1e7)
17624
17632
  return !1;
17625
17633
  const r = e.replace(/^\s*=\s*/i, "").toUpperCase();
@@ -17651,7 +17659,7 @@ function pl(e, t) {
17651
17659
  };
17652
17660
  return i(e), r;
17653
17661
  }
17654
- function jc(e, t) {
17662
+ function Zc(e, t) {
17655
17663
  const r = new Set(e), a = Array.from(e);
17656
17664
  for (; a.length > 0; ) {
17657
17665
  const n = a.shift(), o = t.get(n);
@@ -17661,7 +17669,7 @@ function jc(e, t) {
17661
17669
  }
17662
17670
  return r;
17663
17671
  }
17664
- function Xc(e) {
17672
+ function Kc(e) {
17665
17673
  const t = e.indexOf(":"), r = e.indexOf(":", t + 1);
17666
17674
  if (t === -1 || r === -1) return null;
17667
17675
  const a = e.slice(0, t), n = Number(e.slice(t + 1, r)), o = Number(e.slice(r + 1));
@@ -17673,7 +17681,7 @@ function Tr(e) {
17673
17681
  function Wn(e, t, r, a, n) {
17674
17682
  e.formulaCache.execFunctionGlobalData == null && Tr(e), e.formulaCache.execFunctionGlobalData[`${t}_${r}_${a}`] = n;
17675
17683
  }
17676
- class Zc {
17684
+ class Qc {
17677
17685
  constructor() {
17678
17686
  Ve(this, "parser");
17679
17687
  Ve(this, "func_selectedrange");
@@ -17767,13 +17775,13 @@ class Zc {
17767
17775
  const b = typeof i == "object" ? i.row : null, w = typeof i == "object" ? i.column : null, _ = b != null && w != null && b >= f && b <= m && w >= d && w <= p;
17768
17776
  let T = null, v = "", x = 0;
17769
17777
  if (t.rangeValuePassCache) {
17770
- const C = qc(
17778
+ const C = Ic(
17771
17779
  s,
17772
17780
  f,
17773
17781
  m,
17774
17782
  d,
17775
17783
  p
17776
- ), I = Ic(
17784
+ ), I = Dc(
17777
17785
  c.formulaCache.execFunctionGlobalData ?? {},
17778
17786
  s,
17779
17787
  f,
@@ -17903,7 +17911,7 @@ function Sn(e, t, r) {
17903
17911
  if (t.indexOf("!") > -1) {
17904
17912
  if (t in e.formulaCache.cellTextToIndexList)
17905
17913
  return e.formulaCache.cellTextToIndexList[t];
17906
- const d = t.match(Vc);
17914
+ const d = t.match(Yc);
17907
17915
  if (d == null)
17908
17916
  return null;
17909
17917
  const [, p, g, y, b] = d;
@@ -17943,7 +17951,7 @@ function Sn(e, t, r) {
17943
17951
  };
17944
17952
  return Ro(e, t, m), m;
17945
17953
  }
17946
- function Kc(e) {
17954
+ function Jc(e) {
17947
17955
  if (e.length === 0)
17948
17956
  return "";
17949
17957
  const t = [];
@@ -17957,7 +17965,7 @@ function Kc(e) {
17957
17965
  }
17958
17966
  return t.length > 0 ? t[0] : "";
17959
17967
  }
17960
- function Qc(e, t, r, a, n, o, i) {
17968
+ function eu(e, t, r, a, n, o, i) {
17961
17969
  if (t.substring(0, 30) === "luckysheet_getSpecialReference" || t.substring(0, 20) === "luckysheet_function.") {
17962
17970
  if (t.substring(0, 20) === "luckysheet_function.") {
17963
17971
  let l = t.split(".")[1];
@@ -18033,7 +18041,7 @@ function In(e, t, r, a, n, o, i) {
18033
18041
  s += ",";
18034
18042
  else if (y in et && f.squote === 0 && f.dquote === 0 && f.braces === 0) {
18035
18043
  let b = "";
18036
- const w = Lc;
18044
+ const w = Bc;
18037
18045
  if (c + 1 < l.length && (b = l[c + 1]), y + b in et) {
18038
18046
  if (p.length === 0) {
18039
18047
  if (h.trim(s).length > 0 ? d.unshift(
@@ -18096,11 +18104,11 @@ function In(e, t, r, a, n, o, i) {
18096
18104
  if (b.length > 0 && d.unshift(b), m.length > 0)
18097
18105
  for (u.length > 0 && (d.unshift(u), u = ""); m.length > 0; )
18098
18106
  d.unshift(m.shift());
18099
- d.length > 0 ? u = Kc(d) : u += b;
18107
+ d.length > 0 ? u = Jc(d) : u += b;
18100
18108
  }
18101
18109
  c += 1;
18102
18110
  }
18103
- return Qc(
18111
+ return eu(
18104
18112
  e,
18105
18113
  u,
18106
18114
  r,
@@ -18110,7 +18118,7 @@ function In(e, t, r, a, n, o, i) {
18110
18118
  i
18111
18119
  ), u;
18112
18120
  }
18113
- function Jc(e) {
18121
+ function tu(e) {
18114
18122
  const { luckysheetfile: t } = e;
18115
18123
  let r = [];
18116
18124
  for (let a = 0; a < t.length; a += 1) {
@@ -18165,7 +18173,7 @@ function ia(e, t, r, a) {
18165
18173
  f && (i.dynamicArray = m);
18166
18174
  }
18167
18175
  }
18168
- function eu(e) {
18176
+ function nu(e) {
18169
18177
  const t = e.match(/\(/g), r = e.match(/\)/g), a = e.match(/(['"])(?:(?!\1).)*?\1/g), n = e.match(/(['"])(?:(?!\1).)*?\1/g);
18170
18178
  let o = 0, i = 0;
18171
18179
  h.isNil(t) || (o += t.length), h.isNil(r) || (i += r.length);
@@ -18182,7 +18190,7 @@ function eu(e) {
18182
18190
  }
18183
18191
  return o -= l, i -= c, o === i;
18184
18192
  }
18185
- function tu(e, t, r, a, n) {
18193
+ function ru(e, t, r, a, n) {
18186
18194
  h.isNil(a) && (a = e.currentSheetId);
18187
18195
  const { luckysheetfile: o } = e, i = Fe(e, a);
18188
18196
  if (h.isNil(i))
@@ -18204,7 +18212,7 @@ function tu(e, t, r, a, n) {
18204
18212
  };
18205
18213
  c.push(s), l.calcChain = c, e.luckysheetfile = o;
18206
18214
  }
18207
- function nu(e) {
18215
+ function au(e) {
18208
18216
  if (!e.startsWith("=")) return e;
18209
18217
  const t = e.indexOf("(");
18210
18218
  return t === -1 ? e : `=${e.substring(1, t).replace(/\./g, "_")}${e.substring(t)}`;
@@ -18212,16 +18220,16 @@ function nu(e) {
18212
18220
  function Tn(e, t, r, a, n, o, i, l) {
18213
18221
  var C, I;
18214
18222
  const c = t;
18215
- if (h.isNil(n) && (n = e.currentSheetId), (t != null && t.toUpperCase().includes("NETWORKDAYS.INTL") || t != null && t.toUpperCase().includes("WORKDAY.INTL")) && (t = nu(t)), t.indexOf(Nn.r) > -1)
18223
+ if (h.isNil(n) && (n = e.currentSheetId), (t != null && t.toUpperCase().includes("NETWORKDAYS.INTL") || t != null && t.toUpperCase().includes("WORKDAY.INTL")) && (t = au(t)), t.indexOf(Nn.r) > -1)
18216
18224
  return [!1, Nn.r, t];
18217
- eu(t) || (t += ")"), e.calculateSheetId = n;
18225
+ nu(t) || (t += ")"), e.calculateSheetId = n;
18218
18226
  const s = n || e.currentSheetId, u = `${s}:${r}:${a}`, f = /* @__PURE__ */ new Set();
18219
18227
  e.formulaCache.formulasWithWideRangeDeps.delete(u), e.formulaCache.activeDepCollection = {
18220
18228
  originKey: u,
18221
18229
  deps: f,
18222
18230
  hasWideRangeDep: !1
18223
18231
  }, e.formulaCache.parser.context = e;
18224
- const m = Gc(t.substring(1));
18232
+ const m = jc(t.substring(1));
18225
18233
  let d, p = !1;
18226
18234
  try {
18227
18235
  d = e.formulaCache.parser.parse(m, {
@@ -18249,7 +18257,7 @@ function Tn(e, t, r, a, n, o, i, l) {
18249
18257
  })) : Kt(e, r, a), f.size > 0 && d.error !== yt)
18250
18258
  for (const k of f) {
18251
18259
  if (k === u) continue;
18252
- const O = Xc(k);
18260
+ const O = Kc(k);
18253
18261
  if (!O) continue;
18254
18262
  const U = (I = e == null ? void 0 : e.formulaCache.execFunctionGlobalData) == null ? void 0 : I[`${O.r}_${O.c}_${O.sheetId}`];
18255
18263
  if (h.isNil(U)) continue;
@@ -18273,7 +18281,7 @@ function Tn(e, t, r, a, n, o, i, l) {
18273
18281
  n
18274
18282
  );
18275
18283
  }
18276
- l || tu(e, r, a, n, o);
18284
+ l || ru(e, r, a, n, o);
18277
18285
  }
18278
18286
  let _ = w;
18279
18287
  e.formulaCache.parser.cryptoDenomination && e.formulaCache.parser.cryptoDenomination !== "" && (typeof w == "number" || typeof w == "string") && (_ = `${Number(w).toFixed(
@@ -18295,7 +18303,7 @@ function Tn(e, t, r, a, n, o, i, l) {
18295
18303
  }
18296
18304
  ];
18297
18305
  }
18298
- function ru(e, t) {
18306
+ function iu(e, t) {
18299
18307
  const { r, c: a } = t;
18300
18308
  let { id: n } = t;
18301
18309
  h.isNil(n) && (n = e.currentSheetId);
@@ -18311,7 +18319,7 @@ function ru(e, t) {
18311
18319
  }
18312
18320
  return c.push(t), c;
18313
18321
  }
18314
- function gd(e) {
18322
+ function wd(e) {
18315
18323
  var r, a;
18316
18324
  const { luckysheetfile: t } = e;
18317
18325
  if (e.groupValuesRefreshData.length > 0) {
@@ -18322,7 +18330,7 @@ function gd(e) {
18322
18330
  if (h.isNil(c))
18323
18331
  continue;
18324
18332
  const s = {};
18325
- h.isNil(o.spe) || (o.spe.type === "sparklines" ? s.spl = o.spe.data : o.spe.type === "dynamicArrayItem" && (l.dynamicArray = ru(e, o.spe.data))), s.v = o.v, s.f = o.f, bn(e, o.r, o.c, c, s), (r = e == null ? void 0 : e.hooks) != null && r.updateCellYdoc && e.hooks.updateCellYdoc([
18333
+ h.isNil(o.spe) || (o.spe.type === "sparklines" ? s.spl = o.spe.data : o.spe.type === "dynamicArrayItem" && (l.dynamicArray = iu(e, o.spe.data))), s.v = o.v, s.f = o.f, bn(e, o.r, o.c, c, s), (r = e == null ? void 0 : e.hooks) != null && r.updateCellYdoc && e.hooks.updateCellYdoc([
18326
18334
  {
18327
18335
  sheetId: o.id,
18328
18336
  path: ["celldata"],
@@ -18417,7 +18425,7 @@ function xa(e, t, r, a, n, o) {
18417
18425
  }
18418
18426
  );
18419
18427
  }
18420
- function au(e, t, r) {
18428
+ function ou(e, t, r) {
18421
18429
  const a = new Set(r), n = e.formulaCache.depsByCell.get(t) ?? /* @__PURE__ */ new Set();
18422
18430
  e.formulaCache.depsByCell.set(t, a), n.forEach((o) => {
18423
18431
  if (a.has(o)) return;
@@ -18429,7 +18437,7 @@ function au(e, t, r) {
18429
18437
  i.add(t), e.formulaCache.revDepsByCell.set(o, i);
18430
18438
  });
18431
18439
  }
18432
- function yd(e, t, r, a, n = [], o) {
18440
+ function vd(e, t, r, a, n = [], o) {
18433
18441
  Tr(e);
18434
18442
  const i = new Set(n);
18435
18443
  for (const l of t.results) {
@@ -18468,7 +18476,7 @@ function yd(e, t, r, a, n = [], o) {
18468
18476
  );
18469
18477
  continue;
18470
18478
  }
18471
- au(e, c, l.deps), l.isError ? Zn(e, l.r, l.c, {
18479
+ ou(e, c, l.deps), l.isError ? Zn(e, l.r, l.c, {
18472
18480
  row_column: `${l.r}_${l.c}`,
18473
18481
  title: "Error",
18474
18482
  message: String(l.v ?? "Unknown Error")
@@ -18484,7 +18492,7 @@ function yd(e, t, r, a, n = [], o) {
18484
18492
  });
18485
18493
  }
18486
18494
  }
18487
- function bd(e, t, r = Rc) {
18495
+ function _d(e, t, r = Rc) {
18488
18496
  Tr(e);
18489
18497
  const a = new Set(t.calcChainKeys), n = new Set(t.impactedByCircular), o = new Set(t.cycleNodes), i = Ie(e), l = Math.min(t.nextIndex + r, t.formulaRunList.length);
18490
18498
  for (let s = t.nextIndex; s < l; s += 1) {
@@ -18503,8 +18511,8 @@ function bd(e, t, r = Rc) {
18503
18511
  return c && (e.formulaCache.execFunctionExist = void 0, hl(e.formulaCache), e.formulaCache.execFunctionGlobalData = null), c;
18504
18512
  }
18505
18513
  function Yn(e, t, r, a, n, o, i = !1) {
18506
- h.isNil(o) && (o = Ie(e)), h.isNil(n) && (n = e.currentSheetId), e.formulaCache.execFunctionGlobalData = {}, Dc(e.formulaCache);
18507
- const l = `${n}:${t}:${r}`, c = pl(l, e.formulaCache.depsByCell), s = c.size ? jc(c, e.formulaCache.revDepsByCell) : /* @__PURE__ */ new Set();
18514
+ h.isNil(o) && (o = Ie(e)), h.isNil(n) && (n = e.currentSheetId), e.formulaCache.execFunctionGlobalData = {}, Oc(e.formulaCache);
18515
+ const l = `${n}:${t}:${r}`, c = pl(l, e.formulaCache.depsByCell), s = c.size ? Zc(c, e.formulaCache.revDepsByCell) : /* @__PURE__ */ new Set();
18508
18516
  if (!h.isNil(a)) {
18509
18517
  const C = [[{ v: void 0 }]];
18510
18518
  bn(e, 0, 0, C, a), [
@@ -18513,10 +18521,10 @@ function Yn(e, t, r, a, n, o, i = !1) {
18513
18521
  ]
18514
18522
  ] = C;
18515
18523
  }
18516
- const u = Jc(e);
18524
+ const u = tu(e);
18517
18525
  let f = u;
18518
18526
  if (!i && !h.isNil(t) && !h.isNil(r) && !h.isNil(n) && e.formulaCache.revDepsByCell.size > 0) {
18519
- const C = Oc(
18527
+ const C = Lc(
18520
18528
  l,
18521
18529
  e.formulaCache.revDepsByCell
18522
18530
  );
@@ -18671,6 +18679,7 @@ function Yn(e, t, r, a, n, o, i = !1) {
18671
18679
  calcChainKeys: Array.from(x),
18672
18680
  impactedByCircular: Array.from(s),
18673
18681
  cycleNodes: Array.from(c),
18682
+ workerSnapshotKey: `formula-job-${Fc += 1}`,
18674
18683
  nextIndex: 0,
18675
18684
  total: _.length,
18676
18685
  debug: {
@@ -18682,6 +18691,8 @@ function Yn(e, t, r, a, n, o, i = !1) {
18682
18691
  workerAvailable: !1,
18683
18692
  unsafeFormulaCount: 0,
18684
18693
  workerFormulaCount: 0,
18694
+ totalWorkerFormulas: 0,
18695
+ totalMainThreadFormulas: 0,
18685
18696
  lastError: null
18686
18697
  }
18687
18698
  }, e.isFormulaCalculating = !0;
@@ -18700,7 +18711,7 @@ function Yn(e, t, r, a, n, o, i = !1) {
18700
18711
  }
18701
18712
  e.formulaCache.execFunctionExist = void 0, hl(e.formulaCache);
18702
18713
  }
18703
- function iu(e, t, r) {
18714
+ function lu(e, t, r) {
18704
18715
  const a = /<span.*?>/g, n = t.replace(a, "").split("</span>"), o = r.replace(a, "").split("</span>");
18705
18716
  n.pop(), o[o.length - 1] === "" && o.pop();
18706
18717
  let i = e.formulaCache.functionRangeIndex;
@@ -18761,7 +18772,7 @@ function iu(e, t, r) {
18761
18772
  }
18762
18773
  return null;
18763
18774
  }
18764
- function wd(e) {
18775
+ function Td(e) {
18765
18776
  var a, n;
18766
18777
  if (e.formulaCache.func_selectedrange) return !0;
18767
18778
  const t = e.luckysheet_select_save;
@@ -18783,17 +18794,17 @@ function wd(e) {
18783
18794
  moveXY: r.moveXY
18784
18795
  }, !0);
18785
18796
  }
18786
- function vd(e, t) {
18797
+ function $d(e, t) {
18787
18798
  e.formulaRangeSelect = t;
18788
18799
  }
18789
- function ou(e, t, r = -1) {
18800
+ function su(e, t, r = -1) {
18790
18801
  const a = gl(`<div>${t}</div>`), n = [];
18791
18802
  a.querySelectorAll("span.fortune-formula-functionrange-cell").forEach((o) => {
18792
18803
  const i = parseInt(o.getAttribute("rangeindex") || "0", 10);
18793
18804
  if (i === r) return;
18794
18805
  const l = Sn(e, o.textContent || "");
18795
18806
  if (!(i === e.formulaCache.selectingRangeIndex || l == null) && (l.sheetId === e.currentSheetId || l.sheetId === -1 && e.formulaCache.rangetosheet === e.currentSheetId)) {
18796
- const c = bf(
18807
+ const c = vf(
18797
18808
  e,
18798
18809
  l.row[0],
18799
18810
  l.row[1],
@@ -18865,7 +18876,7 @@ function mr(e, t, r, a, n) {
18865
18876
  n && n instanceof HTMLElement && yl(n);
18866
18877
  }
18867
18878
  }
18868
- function lu(e, t, r, a) {
18879
+ function cu(e, t, r, a) {
18869
18880
  if (window.getSelection) {
18870
18881
  const n = window.getSelection();
18871
18882
  if (!n) return;
@@ -18892,7 +18903,7 @@ function lu(e, t, r, a) {
18892
18903
  l = [u, dr(o[u])];
18893
18904
  }
18894
18905
  } else {
18895
- const c = iu(e, r, a);
18906
+ const c = lu(e, r, a);
18896
18907
  l = h.isNil(c) ? null : c;
18897
18908
  }
18898
18909
  h.isNil(l) ? (n.selectAllChildren(t), n.collapseToEnd()) : mr(
@@ -18904,7 +18915,7 @@ function lu(e, t, r, a) {
18904
18915
  );
18905
18916
  } else document.selection && (e.formulaCache.functionRangeIndex.moveToElementText(t), e.formulaCache.functionRangeIndex.collapse(!1), e.formulaCache.functionRangeIndex.select());
18906
18917
  }
18907
- function su(e, t) {
18918
+ function uu(e, t) {
18908
18919
  const { functionlist: r } = qt(e), a = [], n = [], o = [];
18909
18920
  let i = 0;
18910
18921
  for (let c = 0; c < r.length; c += 1) {
@@ -18915,7 +18926,7 @@ function su(e, t) {
18915
18926
  const l = [...a, ...n, ...o];
18916
18927
  l.length <= 0 || (e.functionCandidates = l);
18917
18928
  }
18918
- function cu() {
18929
+ function fu() {
18919
18930
  var n, o, i, l, c;
18920
18931
  const e = window.getSelection();
18921
18932
  if (!e) return null;
@@ -18980,8 +18991,8 @@ function Mo(e, t, r) {
18980
18991
  }
18981
18992
  return s;
18982
18993
  }
18983
- function uu(e, t) {
18984
- const r = cu();
18994
+ function du(e, t) {
18995
+ const r = fu();
18985
18996
  if (!r) return;
18986
18997
  const a = h.trim(
18987
18998
  (r.textContent || "").replace(/\u200b/g, "")
@@ -18994,7 +19005,7 @@ function uu(e, t) {
18994
19005
  return;
18995
19006
  }
18996
19007
  if (a != null && a.match(/^[a-zA-Z_]+$/))
18997
- e.defaultCandidates = [], su(e, a.toUpperCase()), e.functionHint = null;
19008
+ e.defaultCandidates = [], uu(e, a.toUpperCase()), e.functionHint = null;
18998
19009
  else {
18999
19010
  const n = Mo(t, r, e);
19000
19011
  e.functionHint = n == null ? void 0 : n.toUpperCase(), e.functionCandidates = [], e.defaultCandidates = [];
@@ -19106,7 +19117,7 @@ function bl(e) {
19106
19117
  }
19107
19118
  }), t;
19108
19119
  }
19109
- function fu(e, t) {
19120
+ function mu(e, t) {
19110
19121
  if (!t.anchorNode || t.rangeCount === 0 || !e.contains(t.anchorNode)) return null;
19111
19122
  let r = 0, a = !1;
19112
19123
  const n = (o) => {
@@ -19137,7 +19148,7 @@ function fu(e, t) {
19137
19148
  };
19138
19149
  return n(e), a ? r : null;
19139
19150
  }
19140
- function du(e) {
19151
+ function hu(e) {
19141
19152
  const t = Array.from(e.querySelectorAll("span")).filter(
19142
19153
  (o) => {
19143
19154
  var i;
@@ -19165,7 +19176,7 @@ function $r(e) {
19165
19176
  const i = parseInt(o, 10);
19166
19177
  return Number.isNaN(i) ? null : i;
19167
19178
  }
19168
- function _d(e, t) {
19179
+ function Cd(e, t) {
19169
19180
  e.formulaCache.formulaEditorOwner = t;
19170
19181
  }
19171
19182
  function wl(e) {
@@ -19185,27 +19196,27 @@ function vl(e) {
19185
19196
  const n = (o = document.activeElement) == null ? void 0 : o.id;
19186
19197
  return n === "luckysheet-functionbox-cell" ? r ?? t : t ?? r;
19187
19198
  }
19188
- function mu(e, t) {
19199
+ function pu(e, t) {
19189
19200
  const a = Bt(
19190
19201
  e.textContent || ""
19191
19202
  ).slice(0, t).split(/[=,(+\-*/&<>]/);
19192
19203
  return h.trim(a[a.length - 1] || "");
19193
19204
  }
19194
- function hu(e) {
19205
+ function gu(e) {
19195
19206
  const t = e.replace(/\s/g, "");
19196
19207
  return t && /[A-Za-z]+\d+:[A-Za-z]*$/i.test(t) ? !/[A-Za-z]+\d+:[A-Za-z]+\d+$/i.test(t) : !1;
19197
19208
  }
19198
- function pu(e, t) {
19209
+ function yu(e, t) {
19199
19210
  const r = Bt(e.textContent || ""), a = r.slice(0, t), n = r.slice(t), o = /[=,()+\-*/&<>%^]/, i = (a.split(o).pop() || "").trim(), l = (n.split(o)[0] || "").trim(), c = `${i}${l}`;
19200
- return hu(c);
19211
+ return gu(c);
19201
19212
  }
19202
- function gu(e) {
19213
+ function bu(e) {
19203
19214
  const t = e.trim();
19204
19215
  if (!t.startsWith("=")) return !1;
19205
19216
  const r = t.slice(1).trim();
19206
19217
  return !r || r.includes("(") || r.includes(")") ? !1 : _t(r);
19207
19218
  }
19208
- function yu(e) {
19219
+ function wu(e) {
19209
19220
  e.formulaCache.rangeSelectionActive = !1, e.formulaCache.keyboardRangeSelectionLock = !0, e.formulaCache.rangestart = !1, e.formulaCache.rangedrag_column_start = !1, e.formulaCache.rangedrag_row_start = !1;
19210
19221
  }
19211
19222
  function Ea(e) {
@@ -19216,17 +19227,17 @@ function Ea(e) {
19216
19227
  if (r && !e.contains(r))
19217
19228
  return !1;
19218
19229
  const a = Bt(e.innerText).trim();
19219
- if (!a.startsWith("=") || /^=\s*[A-Za-z_][A-Za-z0-9_]*$/.test(a) || gu(a))
19230
+ if (!a.startsWith("=") || /^=\s*[A-Za-z_][A-Za-z0-9_]*$/.test(a) || bu(a))
19220
19231
  return !1;
19221
19232
  const n = t.getRangeAt(0).cloneRange(), o = document.createRange();
19222
19233
  o.selectNodeContents(e), o.setEnd(n.endContainer, n.endOffset);
19223
19234
  const i = Bt(
19224
19235
  o.toString()
19225
- ).length, l = mu(
19236
+ ).length, l = pu(
19226
19237
  e,
19227
19238
  i
19228
19239
  );
19229
- if (pu(e, i) || l.length > 0 && !_t(l))
19240
+ if (yu(e, i) || l.length > 0 && !_t(l))
19230
19241
  return !1;
19231
19242
  const c = Bt(e.textContent || ""), u = c.slice(i).replace(/^\s+/, "");
19232
19243
  if (u.length === 0) {
@@ -19238,7 +19249,7 @@ function Ea(e) {
19238
19249
  const f = u[0];
19239
19250
  return f === "," || f === ")" || f === "&" || f in et;
19240
19251
  }
19241
- function bu(e) {
19252
+ function vu(e) {
19242
19253
  var r, a;
19243
19254
  let t = e.nextSibling;
19244
19255
  for (; t; ) {
@@ -19251,13 +19262,13 @@ function bu(e) {
19251
19262
  }
19252
19263
  return !1;
19253
19264
  }
19254
- function wu(e) {
19265
+ function _u(e) {
19255
19266
  e.formulaCache.rangeSelectionActive = !1, e.formulaRangeHighlight = [], e.formulaRangeSelect = void 0, e.formulaCache.selectingRangeIndex = -1, e.formulaCache.func_selectedrange = void 0, e.formulaCache.rangestart = !1, e.formulaCache.rangedrag_column_start = !1, e.formulaCache.rangedrag_row_start = !1, e.formulaCache.rangechangeindex = void 0;
19256
19267
  }
19257
- function Td(e) {
19268
+ function Nd(e) {
19258
19269
  const t = $r(e);
19259
19270
  if (t !== null) return t;
19260
- const r = du(e);
19271
+ const r = hu(e);
19261
19272
  if (r === null) return null;
19262
19273
  const a = e.querySelector(
19263
19274
  `span.fortune-formula-functionrange-cell[rangeindex="${r}"]`
@@ -19285,9 +19296,9 @@ function Td(e) {
19285
19296
  } catch {
19286
19297
  return r;
19287
19298
  }
19288
- return o.compareBoundaryPoints(Range.START_TO_START, l) >= 0 && bu(a) ? null : r;
19299
+ return o.compareBoundaryPoints(Range.START_TO_START, l) >= 0 && vu(a) ? null : r;
19289
19300
  }
19290
- function vu(e, t, r, a, n, o = !0) {
19301
+ function Tu(e, t, r, a, n, o = !0) {
19291
19302
  var i, l, c, s, u, f;
19292
19303
  if (r)
19293
19304
  try {
@@ -19295,7 +19306,7 @@ function vu(e, t, r, a, n, o = !0) {
19295
19306
  const m = a === 8 || a === 46, d = a >= 48 && a <= 57 || // 0-9
19296
19307
  a >= 65 && a <= 90 || // A-Z
19297
19308
  a >= 97 && a <= 122;
19298
- e.formulaCache.rangeSelectionActive === !0 && (m || d) && wu(e);
19309
+ e.formulaCache.rangeSelectionActive === !0 && (m || d) && _u(e);
19299
19310
  let p;
19300
19311
  const g = (w) => {
19301
19312
  const _ = (v) => {
@@ -19319,7 +19330,7 @@ function vu(e, t, r, a, n, o = !0) {
19319
19330
  }, y = n ?? g(r);
19320
19331
  let b = g(r);
19321
19332
  if ((a === 8 || a === 46) && (b = b.replace(/\n{2,}$/, `
19322
- `)), b = xf(b), b.length > 0 && b.substring(0, 1) === "=" && (a !== 229 || b.length === 1)) {
19333
+ `)), b = kf(b), b.length > 0 && b.substring(0, 1) === "=" && (a !== 229 || b.length === 1)) {
19323
19334
  if (o || (Un = bl(r)), b = oa(b), !o && Qt < Un.length && (o = !0), p = oa(y), Un = [], window.getSelection) {
19324
19335
  const w = window.getSelection();
19325
19336
  if (!w) return;
@@ -19338,7 +19349,7 @@ function vu(e, t, r, a, n, o = !0) {
19338
19349
  ),
19339
19350
  w.anchorOffset
19340
19351
  ];
19341
- e.formulaCache.functionRangeGlobalOffset = fu(
19352
+ e.formulaCache.functionRangeGlobalOffset = mu(
19342
19353
  r,
19343
19354
  w
19344
19355
  );
@@ -19346,7 +19357,7 @@ function vu(e, t, r, a, n, o = !0) {
19346
19357
  const w = document.selection.createRange();
19347
19358
  e.formulaCache.functionRangeIndex = w, e.formulaCache.functionRangeGlobalOffset = null;
19348
19359
  }
19349
- r.innerHTML = b, t && (t.innerHTML = b), lu(e, r, b, p), o && (Ml(e), ou(e, b), e.formulaCache.rangestart = !1, e.formulaCache.rangedrag_column_start = !1, e.formulaCache.rangedrag_row_start = !1, uu(e, r));
19360
+ r.innerHTML = b, t && (t.innerHTML = b), cu(e, r, b, p), o && (Ml(e), su(e, b), e.formulaCache.rangestart = !1, e.formulaCache.rangedrag_column_start = !1, e.formulaCache.rangedrag_row_start = !1, du(e, r));
19350
19361
  } else if (h.startsWith(y, "=") && !h.startsWith(b, "="))
19351
19362
  t && (t.innerHTML = b), r.innerHTML = Gn(b);
19352
19363
  else if (!h.startsWith(y, "=")) {
@@ -19369,7 +19380,7 @@ function Br(e) {
19369
19380
  let s = !1, u = !1;
19370
19381
  return !l && !c ? (s = !0, u = !0) : l && c ? (s = !1, u = !0) : !l && c ? (s = !0, u = !1) : (s = !1, u = !1), `${r}${s ? "$" : ""}${n.toUpperCase()}${u ? "$" : ""}${i}`;
19371
19382
  }
19372
- function _u(e) {
19383
+ function $u(e) {
19373
19384
  const t = e.trim();
19374
19385
  if (t.length === 0) return null;
19375
19386
  if (t.includes(":")) {
@@ -19380,7 +19391,7 @@ function _u(e) {
19380
19391
  }
19381
19392
  return Br(t);
19382
19393
  }
19383
- function $d(e, t, r) {
19394
+ function Ad(e, t, r) {
19384
19395
  if (!r) return !1;
19385
19396
  const a = window.getSelection();
19386
19397
  if (!a || a.rangeCount === 0 || !a.anchorNode || !r.contains(a.anchorNode)) return !1;
@@ -19403,12 +19414,12 @@ function $d(e, t, r) {
19403
19414
  u.parentElement === r && (i = o(u.previousSibling) || o(u.nextSibling));
19404
19415
  }
19405
19416
  if (!i || !r.contains(i)) return !1;
19406
- const l = i.textContent || "", c = _u(l);
19417
+ const l = i.textContent || "", c = $u(l);
19407
19418
  if (!c || c === l) return !1;
19408
19419
  const s = c.length;
19409
- return i.textContent = c, mr(e, i, 0, s, r), vu(e, t, r, 115), !0;
19420
+ return i.textContent = c, mr(e, i, 0, s, r), Tu(e, t, r, 115), !0;
19410
19421
  }
19411
- function Tu(e, t, r, a, n, o) {
19422
+ function Cu(e, t, r, a, n, o) {
19412
19423
  const i = e.split("!");
19413
19424
  let l, c = "";
19414
19425
  i.length > 1 ? ([, l] = i, c = `${i[0]}!`) : [l] = i;
@@ -19485,7 +19496,7 @@ function qo(e, t, r) {
19485
19496
  }
19486
19497
  return !1;
19487
19498
  }
19488
- function Cd(e) {
19499
+ function Sd(e) {
19489
19500
  return !!e.formulaCache.rangestart || !!e.formulaCache.rangedrag_column_start || !!e.formulaCache.rangedrag_row_start || e.formulaCache.rangeSelectionActive === !0 || Cr(e);
19490
19501
  }
19491
19502
  function Cr(e, t) {
@@ -19559,11 +19570,11 @@ function Cr(e, t) {
19559
19570
  }
19560
19571
  return !1;
19561
19572
  }
19562
- function Nd(e) {
19573
+ function xd(e) {
19563
19574
  const t = vl(e), r = ((t == null ? void 0 : t.innerText) || "").trim(), a = !!e.formulaCache.rangestart || !!e.formulaCache.rangedrag_column_start || !!e.formulaCache.rangedrag_row_start, n = !!t && Ea(t), o = a || e.formulaCache.rangeSelectionActive === !0;
19564
19575
  return r.startsWith("=") ? e.formulaCache.rangeSelectionActive === !0 && t && $r(t) !== null ? !0 : /^=\s*[A-Za-z_][A-Za-z0-9_]*$/.test(r) || e.formulaCache.rangeSelectionActive === !1 ? !1 : o ? a ? !0 : n : n ? !0 : Cr(e) : !1;
19565
19576
  }
19566
- function Ad(e) {
19577
+ function Ed(e) {
19567
19578
  if (e.formulaCache.rangeSelectionActive !== !1)
19568
19579
  return !1;
19569
19580
  const t = vl(e);
@@ -19630,7 +19641,7 @@ function wt(e, t, r, a, n, o) {
19630
19641
  f + m in et ? (c.length > 0 ? (s += wt(c, t, r, a, n, o) + f + m, c = "") : s += f + m, l += 1) : !/[^0-9]/.test(m) && f === "-" && (p === "(" || p == null || p === "," || p === " " || p in et) ? c += f : c.length > 0 ? (s += wt(c, t, r, a, n, o) + f, c = "") : s += f;
19631
19642
  } else
19632
19643
  c += f;
19633
- l === i.length - 1 && (_t(h.trim(c)) ? s += Tu(
19644
+ l === i.length - 1 && (_t(h.trim(c)) ? s += Cu(
19634
19645
  h.trim(c),
19635
19646
  t,
19636
19647
  r,
@@ -19647,8 +19658,8 @@ function ka(e, t, r, a) {
19647
19658
  `<div>${t.innerHTML}</div>`,
19648
19659
  "text/html"
19649
19660
  ).querySelectorAll("span"), l = i[i.length - 1], c = ((y = l == null ? void 0 : l.classList) == null ? void 0 : y.contains("fortune-formula-functionrange-cell")) ?? !1;
19650
- if (l && kf(l == null ? void 0 : l.innerText) && !c) {
19651
- const v = Rf(t.innerHTML);
19661
+ if (l && Mf(l == null ? void 0 : l.innerText) && !c) {
19662
+ const v = qf(t.innerHTML);
19652
19663
  t.innerHTML = `${v}`, t.focus();
19653
19664
  const x = t.childNodes;
19654
19665
  e.formulaCache.rangeSetValueTo = x.length > 0 ? x[x.length - 1] : void 0;
@@ -19694,7 +19705,7 @@ function ka(e, t, r, a) {
19694
19705
  }
19695
19706
  u && (u.innerHTML = s.innerHTML);
19696
19707
  }
19697
- function Sd(e) {
19708
+ function kd(e) {
19698
19709
  if (e.formulaCache.func_selectedrange) {
19699
19710
  const {
19700
19711
  left_move: t,
@@ -19718,7 +19729,7 @@ function Ra(e, t, r, a, n) {
19718
19729
  );
19719
19730
  o != null && (o.style.left = `${t}px`, o.style.top = `${r}px`, o.style.height = `${a}px`, o.style.width = `${n}px`);
19720
19731
  }
19721
- function xd(e, t, r, a, n, o, i) {
19732
+ function Rd(e, t, r, a, n, o, i) {
19722
19733
  e.formulaCache.rangeSelectionActive = !0;
19723
19734
  const { func_selectedrange: l } = e.formulaCache;
19724
19735
  if (!l || l.left == null || l.height == null || l.top == null || l.width == null)
@@ -19748,7 +19759,7 @@ function xd(e, t, r, a, n, o, i) {
19748
19759
  i
19749
19760
  ), Ra(o, T, b, w, v), t.preventDefault();
19750
19761
  }
19751
- function Ed(e, t, r, a, n, o, i) {
19762
+ function Md(e, t, r, a, n, o, i) {
19752
19763
  e.formulaCache.rangeSelectionActive = !0;
19753
19764
  const { func_selectedrange: l } = e.formulaCache;
19754
19765
  if (!l || l.left == null || l.height == null || l.top == null || l.width == null)
@@ -19776,7 +19787,7 @@ function Ed(e, t, r, a, n, o, i) {
19776
19787
  i
19777
19788
  ), Ra(o, b, d, m - d - 1, w);
19778
19789
  }
19779
- function kd(e, t, r, a, n, o, i) {
19790
+ function qd(e, t, r, a, n, o, i) {
19780
19791
  e.formulaCache.rangeSelectionActive = !0;
19781
19792
  const { func_selectedrange: l } = e.formulaCache;
19782
19793
  if (!l || l.left == null || l.height == null || l.top == null || l.width == null)
@@ -19819,16 +19830,16 @@ function Nr(e, t, r) {
19819
19830
  const c = $n(n[0]), s = $n(n[1]), u = c[0] ? "$" : "", f = c[1] ? "$" : "", m = s[0] ? "$" : "", d = s[1] ? "$" : "";
19820
19831
  return e === "u" ? (c[0] || (i[0] -= r), s[0] || (i[1] -= r)) : e === "r" ? (c[1] || (l[0] += r), s[1] || (l[1] += r)) : e === "l" ? (c[1] || (l[0] -= r), s[1] || (l[1] -= r)) : e === "d" && (c[0] || (i[0] += r), s[0] || (i[1] += r)), i[0] < 0 || l[0] < 0 ? Nn.r : Number.isNaN(l[0]) && Number.isNaN(l[1]) ? `${o + u + i[0]}:${m}${i[1]}` : Number.isNaN(i[0]) && Number.isNaN(i[1]) ? `${o + f + Ze(l[0])}:${d}${Ze(l[1])}` : `${o + f + Ze(l[0]) + u + i[0]}:${d}${Ze(l[1])}${m}${i[1]}`;
19821
19832
  }
19822
- function $u(e, t) {
19833
+ function Nu(e, t) {
19823
19834
  return Nr("d", e, t);
19824
19835
  }
19825
- function Cu(e, t) {
19836
+ function Au(e, t) {
19826
19837
  return Nr("u", e, t);
19827
19838
  }
19828
- function Nu(e, t) {
19839
+ function Su(e, t) {
19829
19840
  return Nr("l", e, t);
19830
19841
  }
19831
- function Au(e, t) {
19842
+ function xu(e, t) {
19832
19843
  return Nr("r", e, t);
19833
19844
  }
19834
19845
  function hn(e, t, r, a) {
@@ -19863,18 +19874,18 @@ function hn(e, t, r, a) {
19863
19874
  s + u in et ? (i.length > 0 ? (l += hn(e, i, r, a) + s + u, i = "") : l += s + u, o += 1) : !/[^0-9]/.test(u) && s === "-" && (m === "(" || m == null || m === "," || m === " " || m in et) ? i += s : i.length > 0 ? (l += hn(e, i, r, a) + s, i = "") : l += s;
19864
19875
  } else
19865
19876
  i += s;
19866
- o === n.length - 1 && (_t(h.trim(i)) ? r === "down" ? l += $u(h.trim(i), a) : r === "up" ? l += Cu(h.trim(i), a) : r === "left" ? l += Nu(h.trim(i), a) : r === "right" && (l += Au(h.trim(i), a)) : l += h.trim(i)), o += 1;
19877
+ o === n.length - 1 && (_t(h.trim(i)) ? r === "down" ? l += Nu(h.trim(i), a) : r === "up" ? l += Au(h.trim(i), a) : r === "left" ? l += Su(h.trim(i), a) : r === "right" && (l += xu(h.trim(i), a)) : l += h.trim(i)), o += 1;
19867
19878
  }
19868
19879
  return l = l.replace(/NaN/g, ""), l;
19869
19880
  }
19870
19881
  function _l(e) {
19871
19882
  return e.startsWith("'") && e.endsWith("'") ? e.slice(1, -1).replace(/''/g, "'") : e;
19872
19883
  }
19873
- const Su = /((?:'(?:[^']|'')+'|[A-Za-z_][A-Za-z0-9_.]*)!)?(\$?)([A-Za-z]+)(\$?)(\d+)(?::(\$?)([A-Za-z]+)(\$?)(\d+))?/g;
19874
- function xu(e, t, r, a) {
19884
+ const Eu = /((?:'(?:[^']|'')+'|[A-Za-z_][A-Za-z0-9_.]*)!)?(\$?)([A-Za-z]+)(\$?)(\d+)(?::(\$?)([A-Za-z]+)(\$?)(\d+))?/g;
19885
+ function ku(e, t, r, a) {
19875
19886
  const { rowMap: n, colMap: o } = a;
19876
19887
  return e && e.replace(
19877
- Su,
19888
+ Eu,
19878
19889
  (i, l, c, s, u, f, m, d, p, g) => {
19879
19890
  if ((l ? _l(l.slice(0, -1)) : t) !== r) return i;
19880
19891
  const b = (T, v) => {
@@ -19888,24 +19899,24 @@ function xu(e, t, r, a) {
19888
19899
  }
19889
19900
  );
19890
19901
  }
19891
- function Eu(e) {
19902
+ function Ru(e) {
19892
19903
  const t = e.match(/^(\$?)([A-Za-z]+)(\$?)(\d+)$/);
19893
19904
  if (!t) return null;
19894
19905
  const r = t[1] === "$", a = vt(t[2]), n = t[3] === "$", o = parseInt(t[4], 10) - 1;
19895
19906
  return Number.isNaN(o) || Number.isNaN(a) ? null : { colAbs: r, rowAbs: n, col: a, row: o };
19896
19907
  }
19897
- function ku(e) {
19908
+ function Mu(e) {
19898
19909
  return `${e.colAbs ? "$" : ""}${Ze(e.col)}${e.rowAbs ? "$" : ""}${e.row + 1}`;
19899
19910
  }
19900
19911
  function Pr(e, t, r, a) {
19901
- const n = Eu(e);
19902
- return !n || !(n.row >= t.rowStart && n.row <= t.rowEnd && n.col >= t.colStart && n.col <= t.colEnd) ? e : ku({
19912
+ const n = Ru(e);
19913
+ return !n || !(n.row >= t.rowStart && n.row <= t.rowEnd && n.col >= t.colStart && n.col <= t.colEnd) ? e : Mu({
19903
19914
  ...n,
19904
19915
  row: r + (n.row - t.rowStart),
19905
19916
  col: a + (n.col - t.colStart)
19906
19917
  });
19907
19918
  }
19908
- function Ru(e, t, r, a) {
19919
+ function qu(e, t, r, a) {
19909
19920
  const n = e.split(":");
19910
19921
  if (n.length === 1)
19911
19922
  return Pr(
@@ -19928,11 +19939,11 @@ function Ru(e, t, r, a) {
19928
19939
  );
19929
19940
  return `${o}:${i}`;
19930
19941
  }
19931
- function Mu(e, t, r, a, n, o) {
19942
+ function Iu(e, t, r, a, n, o) {
19932
19943
  const i = e.lastIndexOf("!");
19933
19944
  let l = "", c = e, s = t;
19934
19945
  if (i > -1 && (l = e.slice(0, i + 1), c = e.slice(i + 1), s = _l(l.slice(0, -1))), s !== r) return e;
19935
- const u = Ru(
19946
+ const u = qu(
19936
19947
  c,
19937
19948
  a,
19938
19949
  n,
@@ -20011,7 +20022,7 @@ function qn(e, t, r, a, n, o) {
20011
20022
  c += f;
20012
20023
  if (l === i.length - 1) {
20013
20024
  const m = h.trim(c);
20014
- _t(m) ? s += Mu(
20025
+ _t(m) ? s += Iu(
20015
20026
  m,
20016
20027
  t,
20017
20028
  r,
@@ -20035,7 +20046,7 @@ function Tl(e, t, r, a) {
20035
20046
  const l = (u = n.config) == null ? void 0 : u.authority;
20036
20047
  return !(h.isNil(l) || h.isNil(l.sheet) || l.sheet === 0);
20037
20048
  }
20038
- function Rd(e, t, r, a) {
20049
+ function Id(e, t, r, a) {
20039
20050
  var c;
20040
20051
  const n = Er(e, a);
20041
20052
  if (h.isNil(n) || h.isNil(n.config) || h.isNil(n.config.authority))
@@ -20046,7 +20057,7 @@ function Rd(e, t, r, a) {
20046
20057
  const { data: i } = n, l = (c = i == null ? void 0 : i[t]) == null ? void 0 : c[r];
20047
20058
  return l && l.lo === 0 ? !!(o.selectunLockedCells === 1 || h.isNil(o.selectunLockedCells)) : !!(o.selectLockedCells === 1 || h.isNil(o.selectLockedCells));
20048
20059
  }
20049
- function Md(e, t) {
20060
+ function Dd(e, t) {
20050
20061
  const r = Er(e, t);
20051
20062
  if (h.isNil(r) || h.isNil(r.config) || h.isNil(r.config.authority))
20052
20063
  return !0;
@@ -20058,7 +20069,7 @@ function Md(e, t) {
20058
20069
  let o = !1;
20059
20070
  return (a.selectLockedCells === 1 || h.isNil(a.selectLockedCells)) && (o = !0), !!(n && o);
20060
20071
  }
20061
- function qu(e) {
20072
+ function Du(e) {
20062
20073
  const t = Er(e, e.currentSheetId);
20063
20074
  if (h.isNil(t) || h.isNil(t.config) || h.isNil(t.config.authority))
20064
20075
  return !0;
@@ -20085,7 +20096,7 @@ function Do(e, t, r) {
20085
20096
  const o = Number(e), i = Number(t);
20086
20097
  return !Number.isNaN(o) && !Number.isNaN(i) && r === "<=" ? o <= i : !Number.isNaN(o) && !Number.isNaN(i) ? o < i : r === "<=" ? a.localeCompare(n) <= 0 : a.localeCompare(n) < 0;
20087
20098
  }
20088
- function Iu(e, t, r) {
20099
+ function Ou(e, t, r) {
20089
20100
  const a = String(e), n = String(t), o = String(r);
20090
20101
  let i, l;
20091
20102
  if (yn(t) || yn(r) || yn(e))
@@ -20119,13 +20130,13 @@ function Oo(e, t) {
20119
20130
  function _n(e) {
20120
20131
  return `${pr(e.getDate())}/${pr(e.getMonth() + 1)}/${e.getFullYear()}`;
20121
20132
  }
20122
- function Du(e) {
20133
+ function Lu(e) {
20123
20134
  const t = e.trim().match(/^(\d{4})-(\d{2})-(\d{2})$/);
20124
20135
  if (!t) return e;
20125
20136
  const r = Number(t[1]), a = Number(t[2]), n = Number(t[3]);
20126
20137
  return `${pr(n)}/${pr(a)}/${r}`;
20127
20138
  }
20128
- function Ou(e) {
20139
+ function Fu(e) {
20129
20140
  const t = Math.floor(e), r = Date.UTC(1899, 11, 31, 0, 0, 0), a = t * 864e5 + r, n = new Date(a);
20130
20141
  return new Date(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate());
20131
20142
  }
@@ -20137,7 +20148,7 @@ function jn(e) {
20137
20148
  const i = new Date(o, n, a);
20138
20149
  return i.getFullYear() !== o || i.getMonth() !== n || i.getDate() !== a ? null : _r(i, 0);
20139
20150
  }
20140
- function Lu(e) {
20151
+ function Bu(e) {
20141
20152
  var t, r;
20142
20153
  return e ? ((t = e.ct) == null ? void 0 : t.t) === "inlineStr" && Array.isArray((r = e.ct) == null ? void 0 : r.s) ? e.ct.s.map((a) => (a == null ? void 0 : a.v) != null ? String(a.v) : "").join("").trim() : e.m != null && String(e.m).trim() !== "" ? String(e.m).trim() : e.v != null && typeof e.v == "string" && !String(e.v).startsWith("=") ? String(e.v).trim() : "" : "";
20143
20154
  }
@@ -20147,7 +20158,7 @@ function Lo(e) {
20147
20158
  const t = e.v;
20148
20159
  if (((a = e.ct) == null ? void 0 : a.t) === "d" && typeof t == "number" && Number.isFinite(t))
20149
20160
  return Math.floor(t);
20150
- const r = Lu(e);
20161
+ const r = Bu(e);
20151
20162
  if (r && !r.startsWith("=")) {
20152
20163
  const o = jn(r);
20153
20164
  if (o != null) return Math.floor(o);
@@ -20178,7 +20189,7 @@ function la(e) {
20178
20189
  return _n(t);
20179
20190
  }
20180
20191
  }
20181
- function qd(e) {
20192
+ function Od(e) {
20182
20193
  const t = hr;
20183
20194
  if (!e || e.length === 0)
20184
20195
  return {
@@ -20197,19 +20208,19 @@ function qd(e) {
20197
20208
  if (/^\d{4}-\d{2}-\d{2}$/.test(a))
20198
20209
  return {
20199
20210
  preset: "exact",
20200
- snapshotOrExact: Du(a),
20211
+ snapshotOrExact: Lu(a),
20201
20212
  format: t
20202
20213
  };
20203
20214
  const n = Ar(a);
20204
20215
  return n != null ? {
20205
20216
  preset: "exact",
20206
20217
  snapshotOrExact: _n(
20207
- Ou(n)
20218
+ Fu(n)
20208
20219
  ),
20209
20220
  format: t
20210
20221
  } : { preset: "exact", snapshotOrExact: a, format: t };
20211
20222
  }
20212
- function Fu(e, t, r) {
20223
+ function Pu(e, t, r) {
20213
20224
  if (!(r != null && r.length)) return !1;
20214
20225
  const a = String(r[0] ?? ""), n = Math.floor(e);
20215
20226
  if (!a.startsWith("preset:")) {
@@ -20245,7 +20256,7 @@ const Sr = /* @__PURE__ */ new Set([
20245
20256
  "yesterday",
20246
20257
  "exact"
20247
20258
  ]);
20248
- function Bu(e) {
20259
+ function Hu(e) {
20249
20260
  switch (e) {
20250
20261
  case "containsText":
20251
20262
  return "textContains";
@@ -20268,7 +20279,7 @@ function Bu(e) {
20268
20279
  return e;
20269
20280
  }
20270
20281
  }
20271
- function Pu(e, t) {
20282
+ function Uu(e, t) {
20272
20283
  if (!(t != null && t.length)) return !1;
20273
20284
  const r = String(t[0] ?? ""), a = Math.floor(e);
20274
20285
  if (!r.startsWith("preset:")) {
@@ -20305,9 +20316,9 @@ function sa(e) {
20305
20316
  let n = String(e.dateValue ?? "").trim();
20306
20317
  return r !== "exact" && (n = n || la(r)), [`preset:${r}`, n, a];
20307
20318
  }
20308
- function Id(e, t, r, a, n, o, i) {
20319
+ function Ld(e, t, r, a, n, o, i) {
20309
20320
  var g, y, b, w;
20310
- if (!qu(e))
20321
+ if (!Du(e))
20311
20322
  return;
20312
20323
  const l = n.rulesType, c = [], s = [];
20313
20324
  if (l === "greaterThan" || l === "greaterThanOrEqual" || l === "lessThan" || l === "lessThanOrEqual" || l === "equal" || l === "notEqual" || l === "textContains" || l === "textDoesNotContain" || l === "textStartsWith" || l === "textEndsWith" || l === "textExactly") {
@@ -20458,7 +20469,7 @@ function Hr(e, t, r, a, n) {
20458
20469
  const o = e.split(","), i = parseInt(o[0].split("(")[1], 10), l = parseInt(o[1], 10), c = parseInt(o[2].split(")")[0], 10), s = t.split(","), u = parseInt(s[0].split("(")[1], 10), f = parseInt(s[1], 10), m = parseInt(s[2].split(")")[0], 10), d = r - a, p = r - n, g = Math.round(i - (i - u) / d * p), y = Math.round(l - (l - f) / d * p), b = Math.round(c - (c - m) / d * p);
20459
20470
  return `rgb(${g}, ${y}, ${b})`;
20460
20471
  }
20461
- function Hu(e, t, r) {
20472
+ function zu(e, t, r) {
20462
20473
  h.isNil(t) && (t = []);
20463
20474
  const a = {};
20464
20475
  if (t.length > 0)
@@ -20588,7 +20599,7 @@ function Hu(e, t, r) {
20588
20599
  }
20589
20600
  }
20590
20601
  } else if (o !== "icons") {
20591
- const c = Bu(
20602
+ const c = Hu(
20592
20603
  String(t[n].conditionName ?? "")
20593
20604
  ), s = t[n].conditionValue[0], u = t[n].conditionValue[1], { textColor: f, cellColor: m, bold: d, italic: p, underline: g, strikethrough: y } = l;
20594
20605
  for (let b = 0; b < i.length; b += 1)
@@ -20711,7 +20722,7 @@ function Hu(e, t, r) {
20711
20722
  const T = r[w][_];
20712
20723
  if (h.isNil(T) || h.isNil(T.v) || Je(T.v))
20713
20724
  continue;
20714
- const v = Iu(
20725
+ const v = Ou(
20715
20726
  T.v,
20716
20727
  s,
20717
20728
  u
@@ -20755,7 +20766,7 @@ function Hu(e, t, r) {
20755
20766
  const v = Lo(r[_][T]);
20756
20767
  if (v == null)
20757
20768
  continue;
20758
- Fu(
20769
+ Pu(
20759
20770
  v,
20760
20771
  c,
20761
20772
  w
@@ -20777,7 +20788,7 @@ function Hu(e, t, r) {
20777
20788
  const v = Lo(r[_][T]);
20778
20789
  if (v == null)
20779
20790
  continue;
20780
- Pu(v, w) && !(`${_}_${T}` in a) && (a[`${_}_${T}`] = {
20791
+ Uu(v, w) && !(`${_}_${T}` in a) && (a[`${_}_${T}`] = {
20781
20792
  textColor: f,
20782
20793
  cellColor: m,
20783
20794
  bold: d,
@@ -20916,7 +20927,7 @@ function Hu(e, t, r) {
20916
20927
  }
20917
20928
  return a;
20918
20929
  }
20919
- function Uu(e) {
20930
+ function Wu(e) {
20920
20931
  var r, a;
20921
20932
  if (!e) return !1;
20922
20933
  const t = e.rulesType;
@@ -20931,7 +20942,7 @@ function Uu(e) {
20931
20942
  }
20932
20943
  return t === "occurrenceDate" ? String(e.dateValue ?? "").trim() !== "" : t === "between" || t === "notBetween" ? String(((r = e.betweenValue) == null ? void 0 : r.value1) ?? "").trim() !== "" && String(((a = e.betweenValue) == null ? void 0 : a.value2) ?? "").trim() !== "" : String(e.rulesValue ?? "").trim() !== "";
20933
20944
  }
20934
- function zu(e) {
20945
+ function Vu(e) {
20935
20946
  if (!e) return [""];
20936
20947
  const t = sa(e);
20937
20948
  if (t) return t;
@@ -20943,7 +20954,7 @@ function Nl(e) {
20943
20954
  const t = Fe(e, e.currentSheetId), r = (l = e.luckysheetfile[t]) != null && l.luckysheet_conditionformat_save ? [...(c = e.luckysheetfile[t]) == null ? void 0 : c.luckysheet_conditionformat_save] : [], { data: a } = e.luckysheetfile[t];
20944
20955
  if (h.isNil(a)) return null;
20945
20956
  const n = (s = e.luckysheetfile[t].conditionRules) == null ? void 0 : s.editKey, o = e.luckysheetfile[t].conditionRules;
20946
- return e.conditionFormatDraftActive && e.luckysheet_select_save && Uu(o) && (n != null && r.splice(Number(n), 1), r.unshift({
20957
+ return e.conditionFormatDraftActive && e.luckysheet_select_save && Wu(o) && (n != null && r.splice(Number(n), 1), r.unshift({
20947
20958
  type: "default",
20948
20959
  cellrange: e.luckysheet_select_save,
20949
20960
  format: {
@@ -20956,13 +20967,13 @@ function Nl(e) {
20956
20967
  },
20957
20968
  conditionName: (T = e.luckysheetfile[t].conditionRules) == null ? void 0 : T.rulesType,
20958
20969
  conditionRange: [],
20959
- conditionValue: zu(o)
20960
- })), Hu(e, r, a);
20970
+ conditionValue: Vu(o)
20971
+ })), zu(e, r, a);
20961
20972
  }
20962
- function Wu(e, t, r) {
20973
+ function Gu(e, t, r) {
20963
20974
  return !h.isNil(r) && `${e}_${t}` in r ? r[`${e}_${t}`] : null;
20964
20975
  }
20965
- function Vu(e, t, r, a) {
20976
+ function Yu(e, t, r, a) {
20966
20977
  let n = [];
20967
20978
  const o = r.row[0] - t.row[0], i = r.column[0] - t.column[0], l = e.row[0], c = e.row[1], s = e.column[0], u = e.column[1];
20968
20979
  return l >= t.row[0] && c <= t.row[1] && s >= t.column[0] && u <= t.column[1] ? a === "allPart" ? n = [
@@ -21222,7 +21233,7 @@ function Vu(e, t, r, a) {
21222
21233
  }
21223
21234
  ]) : a === "allPart" ? n = [{ row: [l, c], column: [s, u] }] : a === "restPart" ? n = [{ row: [l, c], column: [s, u] }] : a === "operatePart" && (n = []), n;
21224
21235
  }
21225
- function Gu(e, t) {
21236
+ function ju(e, t) {
21226
21237
  const r = [];
21227
21238
  if (_t(t)) {
21228
21239
  const a = Sn(e, t), n = Fe(e, a.sheetId), o = e.luckysheetfile[n].data;
@@ -21246,7 +21257,7 @@ function Gu(e, t) {
21246
21257
  }
21247
21258
  return r;
21248
21259
  }
21249
- function Yu(e, t) {
21260
+ function Xu(e, t) {
21250
21261
  if (/^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/.test(t)) {
21251
21262
  if (t.length === 18) {
21252
21263
  const a = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2], n = [1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2];
@@ -21264,7 +21275,7 @@ function Al(e, t, r) {
21264
21275
  let { value1: a, value2: n } = t;
21265
21276
  const { type: o, type2: i } = t;
21266
21277
  if (o === "dropdown") {
21267
- const l = Gu(e, a);
21278
+ const l = ju(e, a);
21268
21279
  if (i && r)
21269
21280
  return r.toString().split(",").every((s) => l.indexOf(s) !== -1);
21270
21281
  let c = !1;
@@ -21288,12 +21299,12 @@ function Al(e, t, r) {
21288
21299
  } else if (o === "date") {
21289
21300
  if (!An(r) || i === "between" && (St(r, a) < 0 || St(r, n) > 0) || i === "notBetween" && St(r, a) >= 0 && St(r, n) <= 0 || i === "equal" && St(r, a) !== 0 || i === "notEqualTo" && St(r, a) === 0 || i === "earlierThan" && St(r, a) >= 0 || i === "noEarlierThan" && St(r, a) < 0 || i === "laterThan" && St(r, a) <= 0 || i === "noLaterThan" && St(r, a) > 0)
21290
21301
  return !1;
21291
- } else if (o === "validity" && (i === "identificationNumber" && !Yu(e, r) || i === "phoneNumber" && !/^1[3456789]\d{9}$/.test(r)))
21302
+ } else if (o === "validity" && (i === "identificationNumber" && !Xu(e, r) || i === "phoneNumber" && !/^1[3456789]\d{9}$/.test(r)))
21292
21303
  return !1;
21293
21304
  }
21294
21305
  return !0;
21295
21306
  }
21296
- function ju(e, t, r) {
21307
+ function Zu(e, t, r) {
21297
21308
  var c, s;
21298
21309
  const a = Fe(e, e.currentSheetId), o = (e.luckysheetfile[a].dataVerification ?? {})[`${t}_${r}`];
21299
21310
  o.checked = !o.checked;
@@ -21339,7 +21350,7 @@ function Sl(e, t) {
21339
21350
  }
21340
21351
  return r;
21341
21352
  }
21342
- function Xu(e, t) {
21353
+ function Ku(e, t) {
21343
21354
  var c, s, u, f;
21344
21355
  let r = t.hintValue || "";
21345
21356
  const { type: a, type2: n, value1: o, value2: i } = t, { lang: l } = e;
@@ -21360,8 +21371,8 @@ function Xu(e, t) {
21360
21371
  }
21361
21372
  return r;
21362
21373
  }
21363
- function Dd(e, t, r, a) {
21364
- const n = Gt(e), o = Ef(e);
21374
+ function Fd(e, t, r, a) {
21375
+ const n = Gt(e), o = Rf(e);
21365
21376
  if (!n || o) return;
21366
21377
  const i = document.getElementById(
21367
21378
  "luckysheet-dataVerification-showHintBox"
@@ -21379,10 +21390,10 @@ function Dd(e, t, r, a) {
21379
21390
  if (!b) return;
21380
21391
  const w = tn(e, b, t, r);
21381
21392
  if (w && ([m, f] = w.row, [g, p] = w.column), !u) return;
21382
- if (u.type === "checkbox" && ju(e, t, r), u.type === "dropdown" && (l.style.display = "block", l.style.maxWidth = `${p - g}px`, l.style.maxHeight = `${f - m}px`, l.style.left = `${p - 20}px`, l.style.top = `${m + (f - m - 20) / 2 - 2}px`), u.hintShow) {
21393
+ if (u.type === "checkbox" && Zu(e, t, r), u.type === "dropdown" && (l.style.display = "block", l.style.maxWidth = `${p - g}px`, l.style.maxHeight = `${f - m}px`, l.style.left = `${p - 20}px`, l.style.top = `${m + (f - m - 20) / 2 - 2}px`), u.hintShow) {
21383
21394
  let v = "";
21384
21395
  const { lang: x } = e;
21385
- x === "en" ? v = '<span style="color:#f5a623;">Hint: </span>' : x === "zh" || x === "zh-CN" || x === "zh-TW" ? v = '<span style="color:#f5a623;">提示:</span>' : x === "es" ? v = '<span style="color:#f5a623;">Consejos:</span>' : x === "hi" && (v = '<span style="color:#f5a623;">सुझाव: </span>'), v += Xu(e, u), i.innerHTML = v, i.style.display = "block", i.style.left = `${g}px`, i.style.top = `${f}px`;
21396
+ x === "en" ? v = '<span style="color:#f5a623;">Hint: </span>' : x === "zh" || x === "zh-CN" || x === "zh-TW" ? v = '<span style="color:#f5a623;">提示:</span>' : x === "es" ? v = '<span style="color:#f5a623;">Consejos:</span>' : x === "hi" && (v = '<span style="color:#f5a623;">सुझाव: </span>'), v += Ku(e, u), i.innerHTML = v, i.style.display = "block", i.style.left = `${g}px`, i.style.top = `${f}px`;
21386
21397
  }
21387
21398
  const _ = Ke(t, r, b);
21388
21399
  if (Je(_))
@@ -21393,7 +21404,7 @@ function Dd(e, t, r, a) {
21393
21404
  x === "en" ? v = '<span style="color:#f72626;">Failure: </span>' : x === "zh" || x === "zh-CN" || x === "zh-TW" ? v = '<span style="color:#f72626;">失效:</span>' : x === "es" ? v = '<span style="color:#f72626;">Caducidad: </span>' : x === "hi" && (v = '<span style="color:#f72626;">असफलता: </span>'), v = C + v + Sl(e, u), i.innerHTML = v, i.style.display = "block", i.style.left = `${y}px`, i.style.top = `${d}px`;
21394
21405
  }
21395
21406
  }
21396
- function Od(e, t, r) {
21407
+ function Bd(e, t, r) {
21397
21408
  var p, g;
21398
21409
  if (!e.luckysheet_select_save) return;
21399
21410
  const a = Ie(e);
@@ -21438,12 +21449,12 @@ function Od(e, t, r) {
21438
21449
  type: "update"
21439
21450
  }
21440
21451
  ]);
21441
- const m = Df(e, [o])[o], d = 22 * (t.split(",").length || (s == null ? void 0 : s.length)) || 22;
21442
- m < d && If(e, {
21452
+ const m = Lf(e, [o])[o], d = 22 * (t.split(",").length || (s == null ? void 0 : s.length)) || 22;
21453
+ m < d && Of(e, {
21443
21454
  [String(o)]: d
21444
21455
  }), xl(e, null, void 0);
21445
21456
  }
21446
- function Ld(e, t, r) {
21457
+ function Pd(e, t, r) {
21447
21458
  var p, g;
21448
21459
  const a = Vn(
21449
21460
  e,
@@ -21500,7 +21511,7 @@ function Ld(e, t, r) {
21500
21511
  }
21501
21512
  return !0;
21502
21513
  }
21503
- function Zu(e, t, r, a) {
21514
+ function Qu(e, t, r, a) {
21504
21515
  e.formulaCache.execFunctionExist = [];
21505
21516
  for (let n = 0; n < t.length; n += 1)
21506
21517
  for (let o = t[n].row[0]; o <= t[n].row[1]; o += 1)
@@ -21509,9 +21520,9 @@ function Zu(e, t, r, a) {
21509
21520
  e.formulaCache.execFunctionExist.reverse(), Yn(e, null, null, null, null, a), aa(e) || (e.formulaCache.execFunctionGlobalData = null);
21510
21521
  }
21511
21522
  function xl(e, t, r, a = !0) {
21512
- t == null && (t = Ie(e)), !(r == null && (r = e.luckysheet_select_save, r == null)) && a && Zu(e, r, e.currentSheetId, t);
21523
+ t == null && (t = Ie(e)), !(r == null && (r = e.luckysheet_select_save, r == null)) && a && Qu(e, r, e.currentSheetId, t);
21513
21524
  }
21514
- function Ku(e, t, r) {
21525
+ function Ju(e, t, r) {
21515
21526
  e == null && (e = !0);
21516
21527
  const a = (c, s) => {
21517
21528
  let u = c[t], f = s[t];
@@ -21538,7 +21549,7 @@ function Ku(e, t, r) {
21538
21549
  }
21539
21550
  function El(e, t, r, a, n, o, i, l, c) {
21540
21551
  var g, y;
21541
- const { sortedData: s, rowMap: u } = Ku(n, a, r);
21552
+ const { sortedData: s, rowMap: u } = Ju(n, a, r);
21542
21553
  for (let b = o; b <= i; b += 1)
21543
21554
  for (let w = l; w <= c; w += 1) {
21544
21555
  const _ = s[b - o][w - l];
@@ -21556,7 +21567,7 @@ function El(e, t, r, a, n, o, i, l, c) {
21556
21567
  if (w)
21557
21568
  for (let _ = 0; _ < w.length; _ += 1) {
21558
21569
  const T = w[_];
21559
- T != null && T.f && (T.f = xu(T.f, p, p, {
21570
+ T != null && T.f && (T.f = ku(T.f, p, p, {
21560
21571
  rowMap: f
21561
21572
  }));
21562
21573
  }
@@ -21580,7 +21591,7 @@ function El(e, t, r, a, n, o, i, l, c) {
21580
21591
  b.length > 0 && e.hooks.updateCellYdoc(b);
21581
21592
  }
21582
21593
  }
21583
- function Fd(e, t, r = 0) {
21594
+ function Hd(e, t, r = 0) {
21584
21595
  var d;
21585
21596
  if (e.allowEdit === !1 || e.luckysheet_select_save == null || e.luckysheet_select_save.length > 1)
21586
21597
  return;
@@ -21620,7 +21631,7 @@ function Fd(e, t, r = 0) {
21620
21631
  f || El(e, n, m, r, t, s, u, l, c);
21621
21632
  }
21622
21633
  }
21623
- function Bd(e, t) {
21634
+ function Ud(e, t) {
21624
21635
  var f, m, d;
21625
21636
  if (e.allowEdit === !1) return;
21626
21637
  const r = Ie(e);
@@ -21663,7 +21674,7 @@ function Bd(e, t) {
21663
21674
  c
21664
21675
  );
21665
21676
  }
21666
- function Qu(e, t, r, a, n) {
21677
+ function ef(e, t, r, a, n) {
21667
21678
  var s;
21668
21679
  const o = Ie(e);
21669
21680
  if (!o) return;
@@ -21699,7 +21710,7 @@ function kl(e, t, r, a, n) {
21699
21710
  if (typeof o != "string" || !(/= *SORT\s*\(/i.test(o) || /= *XLOOKUP\s*\(/i.test(o) || /= *SEQUENCE\s*\(/i.test(o)) || !Array.isArray(i)) return !1;
21700
21711
  const l = Array.isArray(i[0]) ? i : i.map((m) => [m]), c = l.length, s = c && Array.isArray(l[0]) ? l[0].length : 0;
21701
21712
  if (!c || !s) return !1;
21702
- Qu(
21713
+ ef(
21703
21714
  e,
21704
21715
  t,
21705
21716
  r,
@@ -21742,7 +21753,7 @@ function kl(e, t, r, a, n) {
21742
21753
  }
21743
21754
  return !0;
21744
21755
  }
21745
- const Ju = 8;
21756
+ const tf = 8;
21746
21757
  function Rl(e, t, r, a) {
21747
21758
  var s, u, f, m;
21748
21759
  if (!a) return;
@@ -21761,7 +21772,7 @@ function Rl(e, t, r, a) {
21761
21772
  });
21762
21773
  y && (l = Math.max(
21763
21774
  l,
21764
- y.textHeightAll + Ju
21775
+ y.textHeightAll + tf
21765
21776
  ));
21766
21777
  }
21767
21778
  h.isNil(o.rowlen) && (o.rowlen = {}), l > i ? o.rowlen[t] = l : h.isNil((m = o.rowlen) == null ? void 0 : m[t]) || delete o.rowlen[t], e.config = o;
@@ -21773,7 +21784,7 @@ function bt(e, t, r = 10) {
21773
21784
  if (t in a || t === "fs" && Vt(e))
21774
21785
  n || (n = "0");
21775
21786
  else if (["fc", "bg", "bc"].includes(t))
21776
- ["fc", "bc"].includes(t) && (n || (n = "#000000")), (n == null ? void 0 : n.indexOf("rgba")) > -1 && (n = Sf(n));
21787
+ ["fc", "bc"].includes(t) && (n || (n = "#000000")), (n == null ? void 0 : n.indexOf("rgba")) > -1 && (n = Ef(n));
21777
21788
  else if (t.substring(0, 2) === "bs")
21778
21789
  n || (n = "none");
21779
21790
  else if (t === "ht" || t === "vt") {
@@ -21782,14 +21793,14 @@ function bt(e, t, r = 10) {
21782
21793
  } else t === "fs" ? n || (n = r.toString()) : (t === "tb" || t === "tr") && (n || (n = "0"));
21783
21794
  return n;
21784
21795
  }
21785
- function Pd(e, t, r, a) {
21796
+ function zd(e, t, r, a) {
21786
21797
  if (!e || !e[t])
21787
21798
  return null;
21788
21799
  const n = e[t][r];
21789
21800
  if (n)
21790
21801
  return bt(n, a);
21791
21802
  }
21792
- function ef(e) {
21803
+ function nf(e) {
21793
21804
  return e ? e.replace(/\r\n|\r|\n/g, "<br />") : "";
21794
21805
  }
21795
21806
  function Fo(e) {
@@ -21810,7 +21821,7 @@ function Fo(e) {
21810
21821
  }
21811
21822
  return r <= 0 ? e : `${e}${")".repeat(r)}`;
21812
21823
  }
21813
- function tf(e) {
21824
+ function rf(e) {
21814
21825
  if (!Array.from(e.childNodes).some(
21815
21826
  (o) => !(o.nodeType === Node.ELEMENT_NODE && o.tagName === "SPAN")
21816
21827
  )) return;
@@ -21890,7 +21901,7 @@ function Ke(e, t, r, a) {
21890
21901
  } else
21891
21902
  o = m.v;
21892
21903
  else m && m.ct && m.ct.t === "d" && (o = m.m);
21893
- m != null && m.ct && vr(m.ct) && (a === "v" || a === "m") && (o = ef((f = m.ct.s[0]) == null ? void 0 : f.v));
21904
+ m != null && m.ct && vr(m.ct) && (a === "v" || a === "m") && (o = nf((f = m.ct.s[0]) == null ? void 0 : f.v));
21894
21905
  }
21895
21906
  return o === void 0 && (o = null), o;
21896
21907
  }
@@ -21940,7 +21951,7 @@ function bn(e, t, r, a, n) {
21940
21951
  const X = m.trim().replace(/,/g, "");
21941
21952
  o.m = X, o.v = X, ((v = o.ct) == null ? void 0 : v.fa) === "@" ? o.ct = { fa: "@", t: "s" } : o.ct = { fa: "General", t: "g" };
21942
21953
  } else if (!h.isNil(o.f) && Array.isArray(l))
21943
- o.v = l, h.isNil(o.ct) ? o.ct = { fa: "General", t: "g" } : (o.ct = { ...o.ct, fa: "General", t: "g" }, delete o.ct.dp), o.m = af(l);
21954
+ o.v = l, h.isNil(o.ct) ? o.ct = { fa: "General", t: "g" } : (o.ct = { ...o.ct, fa: "General", t: "g" }, delete o.ct.dp), o.m = lf(l);
21944
21955
  else if (!h.isNil(o.f) && typeof l == "number" && Number.isFinite(l) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(
21945
21956
  m
21946
21957
  )) {
@@ -21964,7 +21975,7 @@ function bn(e, t, r, a, n) {
21964
21975
  o.m = W.toString();
21965
21976
  }
21966
21977
  }
21967
- if (Yc(o.f, o.v) && (((I = o.ct) == null ? void 0 : I.fa) === "General" || ((k = o.ct) == null ? void 0 : k.t) === "g" || ((O = o.ct) == null ? void 0 : O.t) === "n" && (!((U = o.ct) != null && U.fa) || ((Z = o.ct) == null ? void 0 : Z.fa) === "General"))) {
21978
+ if (Xc(o.f, o.v) && (((I = o.ct) == null ? void 0 : I.fa) === "General" || ((k = o.ct) == null ? void 0 : k.t) === "g" || ((O = o.ct) == null ? void 0 : O.t) === "n" && (!((U = o.ct) != null && U.fa) || ((Z = o.ct) == null ? void 0 : Z.fa) === "General"))) {
21968
21979
  const K = /\bNOW\s*\(/i.test(o.f), W = il(K);
21969
21980
  o.ct = { fa: W, t: "d" };
21970
21981
  const ce = Math.round(o.v * 1e9) / 1e9;
@@ -22016,7 +22027,7 @@ function bn(e, t, r, a, n) {
22016
22027
  M && (o.m = M[0].toString(), [, o.ct, o.v] = M);
22017
22028
  }
22018
22029
  else if (Xe(l)) {
22019
- s && !X.includes(",") && (X = Mf(String(l), s)), l = parseFloat(l), X.includes("%") && !m.includes("%") && (!i || K) && (l /= 100), o != null && o.ct && (o.ct = { ...o.ct, fa: X, t: "n" });
22030
+ s && !X.includes(",") && (X = If(String(l), s)), l = parseFloat(l), X.includes("%") && !m.includes("%") && (!i || K) && (l /= 100), o != null && o.ct && (o.ct = { ...o.ct, fa: X, t: "n" });
22020
22031
  const M = kt(X, l);
22021
22032
  if (M === l) {
22022
22033
  const $ = ir(
@@ -22076,7 +22087,7 @@ function bn(e, t, r, a, n) {
22076
22087
  }
22077
22088
  h.isNil(o.f) || (c ? (o.ct || (o.ct = { fa: "General", t: "g" }), o.ct.s = c) : o != null && o.ct && h.isPlainObject(n) && Object.prototype.hasOwnProperty.call(n, "ct") && delete o.ct.s), a[t][r] = o, e.luckysheet_selection_range && (e.luckysheet_selection_range = []);
22078
22089
  }
22079
- function Hd(e, t, r, a) {
22090
+ function Wd(e, t, r, a) {
22080
22091
  let n = Ke(e, t, r, "m");
22081
22092
  if (h.isNil(n) && (n = Ke(e, t, r, a), h.isNil(n))) {
22082
22093
  const o = Ke(e, t, r, "ct");
@@ -22115,7 +22126,7 @@ function tn(e, t, r, a) {
22115
22126
  }
22116
22127
  return null;
22117
22128
  }
22118
- function nf(e, t, r, a, n, o, i, l, c) {
22129
+ function af(e, t, r, a, n, o, i, l, c) {
22119
22130
  const s = t.r, u = t.r + t.rs - 1, f = t.c, m = t.c + t.cs - 1;
22120
22131
  let d = !1;
22121
22132
  if (r[0] = Math.min(r[0], r[1]), a[0] = Math.min(a[0], a[1]), r[0] <= f && r[1] >= m && a[0] <= s && a[1] >= u || !(r[1] < f || r[0] > m) && !(a[1] < s || a[0] > u)) {
@@ -22143,7 +22154,7 @@ function Xn(e, t, r, a, n, o, i, l) {
22143
22154
  const d = s[m], p = c[d];
22144
22155
  if (d in f)
22145
22156
  continue;
22146
- const g = nf(
22157
+ const g = af(
22147
22158
  e,
22148
22159
  p,
22149
22160
  t,
@@ -22165,16 +22176,16 @@ function Ml(e) {
22165
22176
  function jt(e) {
22166
22177
  Ml(e), e.luckysheetCellUpdate = [], e.formulaRangeHighlight = [], e.functionHint = null, e.formulaCache.rangestart = !1, e.formulaCache.rangedrag_column_start = !1, e.formulaCache.rangedrag_row_start = !1, e.formulaCache.rangeSelectionActive = null, e.formulaCache.keyboardRangeSelectionLock = !1, e.formulaCache.formulaEditorOwner = null;
22167
22178
  }
22168
- function rf(e) {
22179
+ function of(e) {
22169
22180
  return typeof e == "number" ? Number.isFinite(e) : typeof e != "string" ? !1 : /^[\d.,]+$/.test(e.replace(/\s/g, ""));
22170
22181
  }
22171
- function af(e) {
22182
+ function lf(e) {
22172
22183
  if (!Array.isArray(e) || e.length === 0)
22173
22184
  return "";
22174
22185
  const t = e[0];
22175
22186
  return Array.isArray(t) && e.every((r) => Array.isArray(r)) ? e.map((r) => r.map((a) => String(a ?? "")).join(", ")).join("; ") : e.map((r) => String(r ?? "")).join(", ");
22176
22187
  }
22177
- function of(e, t, r, a, n, o) {
22188
+ function sf(e, t, r, a, n, o) {
22178
22189
  var i, l, c, s, u, f, m, d, p, g, y, b, w, _, T, v, x, C, I, k, O, U, Z, J, se, V, Q, B, re;
22179
22190
  try {
22180
22191
  if (e.allowEdit === !1 || e.isFlvReadOnly) return;
@@ -22222,7 +22233,7 @@ function of(e, t, r, a, n, o) {
22222
22233
  else if (we) {
22223
22234
  h.isPlainObject(L) || (L = {}), L || (L = {});
22224
22235
  const j = L.fs || 10;
22225
- L.ct || (L.ct = {}, L.ct.fa = "General", L.tb = "1"), L.ct.t = "inlineStr", tf(a), L.ct.s = js(
22236
+ L.ct || (L.ct = {}, L.ct.fa = "General", L.tb = "1"), L.ct.t = "inlineStr", rf(a), L.ct.s = js(
22226
22237
  a.querySelectorAll("span"),
22227
22238
  L
22228
22239
  ), delete L.fs, delete L.f, delete L._formulaEditHtml, delete L.v, delete L.m, L.fs = j, Te && (L.ct.s = [
@@ -22326,7 +22337,7 @@ function of(e, t, r, a, n, o) {
22326
22337
  v: ce(n.f),
22327
22338
  fs: n.fs || 10
22328
22339
  }
22329
- ], K(n)) : (T = n.ct) == null || delete T.s, rf(n.v)) {
22340
+ ], K(n)) : (T = n.ct) == null || delete T.s, of(n.v)) {
22330
22341
  const le = (v = Pl(n == null ? void 0 : n.f)) == null ? void 0 : v.split(","), qe = le == null ? void 0 : le.map((Ee) => Ee.trim().toUpperCase()), Se = Hl(qe, Ue, N);
22331
22342
  if (Se) {
22332
22343
  const Ee = typeof n.v == "number" ? n.v : Number(String(n.v).replace(/,/g, ""));
@@ -22417,15 +22428,15 @@ function of(e, t, r, a, n, o) {
22417
22428
  console.error(oe), jt(e);
22418
22429
  }
22419
22430
  }
22420
- function lf(e, t, r, a) {
22431
+ function cf(e, t, r, a) {
22421
22432
  const n = Ie(e, a);
22422
22433
  return h.isNil(t) || h.isNil(r) || !n || !n[t] || !n[t][r] ? null : n[t][r];
22423
22434
  }
22424
22435
  function Ma(e, t, r, a, n) {
22425
22436
  let o;
22426
- return h.isNil(n) ? o = lf(e, t, r, a) : o = n[t][r], h.isNil(o) ? null : o.f;
22437
+ return h.isNil(n) ? o = cf(e, t, r, a) : o = n[t][r], h.isNil(o) ? null : o.f;
22427
22438
  }
22428
- function sf(e) {
22439
+ function uf(e) {
22429
22440
  const t = h.cloneDeep(e.luckysheet_select_save), r = [];
22430
22441
  if (!t) return r;
22431
22442
  for (let a = 0; a < t.length; a += 1) {
@@ -22437,8 +22448,8 @@ function sf(e) {
22437
22448
  }
22438
22449
  return r;
22439
22450
  }
22440
- function cf(e, t) {
22441
- t = t || sf(e);
22451
+ function ff(e, t) {
22452
+ t = t || uf(e);
22442
22453
  const r = [];
22443
22454
  return t.forEach((a) => {
22444
22455
  const n = a.row, o = a.column;
@@ -22477,7 +22488,7 @@ function Vn(e, t) {
22477
22488
  _t(t) && r.push(Sn(e, t));
22478
22489
  return r;
22479
22490
  }
22480
- function uf(e) {
22491
+ function df(e) {
22481
22492
  const t = (e ?? "").split(",");
22482
22493
  for (const r of t) {
22483
22494
  const a = String(r).trim();
@@ -22494,11 +22505,11 @@ function uf(e) {
22494
22505
  }
22495
22506
  return !1;
22496
22507
  }
22497
- function Ud(e, t) {
22508
+ function Vd(e, t) {
22498
22509
  const r = (t ?? "").trim();
22499
- return r === "" ? !0 : uf(r) ? !1 : Vn(e, r).length > 0;
22510
+ return r === "" ? !0 : df(r) ? !1 : Vn(e, r).length > 0;
22500
22511
  }
22501
- function zd(e, t, r) {
22512
+ function Gd(e, t, r) {
22502
22513
  if (!h.isEmpty(e.luckysheetCellUpdate)) {
22503
22514
  const o = window.getSelection();
22504
22515
  if (!o || o.rangeCount === 0) return !1;
@@ -22530,7 +22541,7 @@ function zd(e, t, r) {
22530
22541
  y.textContent && y.textContent.length > 0 && i.intersectsNode(y) && p.push(y);
22531
22542
  }), p.length === 0 && (u && p.push(u), f && f !== u && p.push(f)), p.length === 0 ? !1 : h.every(p, (g) => d(g));
22532
22543
  }
22533
- const a = cf(e), n = Ie(e);
22544
+ const a = ff(e), n = Ie(e);
22534
22545
  return a.every(({ r: o, c: i }) => {
22535
22546
  var c;
22536
22547
  const l = (c = n == null ? void 0 : n[o]) == null ? void 0 : c[i];
@@ -22564,7 +22575,7 @@ function qa(e, t, r, a = !0) {
22564
22575
  function ca(e, t, r, a, n) {
22565
22576
  var u;
22566
22577
  let o = {};
22567
- const i = [], l = n ?? Nl(e), c = Wu(r, a, l), s = (u = t == null ? void 0 : t[r]) == null ? void 0 : u[a];
22578
+ const i = [], l = n ?? Nl(e), c = Gu(r, a, l), s = (u = t == null ? void 0 : t[r]) == null ? void 0 : u[a];
22568
22579
  if (!s) {
22569
22580
  if (!c)
22570
22581
  return {};
@@ -22585,7 +22596,7 @@ function ca(e, t, r, a, n) {
22585
22596
  }
22586
22597
  return o = h.assign(o, qa(s, i, c)), Po(o, c), o;
22587
22598
  }
22588
- function ff(e) {
22599
+ function mf(e) {
22589
22600
  const t = /* @__PURE__ */ new Set(), r = {
22590
22601
  color: e.color || "#000000",
22591
22602
  fontFamily: e.fontFamily || "Arial",
@@ -22595,7 +22606,7 @@ function ff(e) {
22595
22606
  }, a = e.backgroundColor || e.background;
22596
22607
  return a && a !== "transparent" && a !== "rgba(0, 0, 0, 0)" && (r.backgroundColor = a), typeof e.textDecoration == "string" && e.textDecoration.split(/\s+/).filter(Boolean).forEach((n) => t.add(n)), e.borderBottom && (t.add("underline"), r.textDecorationSkipInk = "none"), t.size > 0 && (r.textDecoration = Array.from(t).join(" ")), r;
22597
22608
  }
22598
- function df(e, t) {
22609
+ function hf(e, t) {
22599
22610
  const a = e.replace(/\r\n/g, `
22600
22611
  `).replace(/\r/g, `
22601
22612
  `).split(`
@@ -22616,7 +22627,7 @@ function ql(e, t, r, a) {
22616
22627
  const s = {
22617
22628
  ...a != null && a.useSemanticMarkup ? a.inheritedStyle ?? {} : {},
22618
22629
  ...qa(c)
22619
- }, u = a != null && a.useSemanticMarkup ? ff(s) : s;
22630
+ }, u = a != null && a.useSemanticMarkup ? mf(s) : s;
22620
22631
  u.fontWeight || (u.fontWeight = "400"), u.fontStyle || (u.fontStyle = "normal"), u.fontSize || (u.fontSize = "11pt"), u.fontFamily || (u.fontFamily = "Arial");
22621
22632
  const { link: f } = c, m = c, d = Object.prototype.hasOwnProperty.call(
22622
22633
  m,
@@ -22635,7 +22646,7 @@ function ql(e, t, r, a) {
22635
22646
  )}'${w ? " data-link-plain='1'" : ""}` : "";
22636
22647
  if (a != null && a.isRichTextCopy)
22637
22648
  if (a != null && a.useSemanticMarkup)
22638
- i += df(c.v, b);
22649
+ i += hf(c.v, b);
22639
22650
  else {
22640
22651
  const T = c.v.replace(/\r\n/g, "<br>").replace(/\n/g, "<br>");
22641
22652
  i += `<span class="luckysheet-input-span" index='${l}' style='${b}'${_}>${T}</span>`;
@@ -22648,7 +22659,7 @@ function ql(e, t, r, a) {
22648
22659
  }
22649
22660
  return "";
22650
22661
  }
22651
- function Wd(e, t, r) {
22662
+ function Yd(e, t, r) {
22652
22663
  let a = "";
22653
22664
  if (e.toString().indexOf("pt") > -1) {
22654
22665
  const o = parseFloat(e);
@@ -22660,7 +22671,7 @@ function Wd(e, t, r) {
22660
22671
  let n = 0;
22661
22672
  return t = t.toLowerCase(), t === "double" ? n = 2 : t === "dotted" ? a === "Medium" || a === "Thick" ? n = 3 : n = 10 : t === "dashed" ? a === "Medium" || a === "Thick" ? n = 4 : n = 9 : t === "solid" && (a === "Medium" ? n = 8 : a === "Thick" ? n = 13 : n = 1), [n, r];
22662
22673
  }
22663
- function mf(e, t, r) {
22674
+ function pf(e, t, r) {
22664
22675
  if (t == null && e.luckysheet_select_save && ([t] = e.luckysheet_select_save), !t) return [];
22665
22676
  if (t.row == null || t.row.length === 0)
22666
22677
  return [];
@@ -22677,12 +22688,12 @@ function mf(e, t, r) {
22677
22688
  }
22678
22689
  return o;
22679
22690
  }
22680
- function Vd(e, t, r) {
22691
+ function jd(e, t, r) {
22681
22692
  var o;
22682
22693
  const a = Ie(e), n = (o = a == null ? void 0 : a[t]) == null ? void 0 : o[r];
22683
- (n == null ? void 0 : n.f) != null && String(n.f).trim() !== "" && yu(e), e.luckysheetCellUpdate = [t, r];
22694
+ (n == null ? void 0 : n.f) != null && String(n.f).trim() !== "" && wu(e), e.luckysheetCellUpdate = [t, r];
22684
22695
  }
22685
- function hf(e, t) {
22696
+ function gf(e, t) {
22686
22697
  if (!t || !t.row || t.row.length === 0) return [];
22687
22698
  const r = [], a = Ie(e);
22688
22699
  if (!a) return [];
@@ -22726,7 +22737,7 @@ function Ia(e) {
22726
22737
  ...n != null && typeof n == "object" ? { ct: n } : {}
22727
22738
  } : null;
22728
22739
  }
22729
- function Gd(e) {
22740
+ function Xd(e) {
22730
22741
  var i;
22731
22742
  const t = Fe(e, e.currentSheetId);
22732
22743
  if (t == null) return;
@@ -22755,7 +22766,7 @@ function Gd(e) {
22755
22766
  }
22756
22767
  }), (i = e == null ? void 0 : e.hooks) != null && i.updateCellYdoc && r.size > 0 && e.hooks.updateCellYdoc(Array.from(r.values()));
22757
22768
  }
22758
- function Yd(e) {
22769
+ function Zd(e) {
22759
22770
  var l, c;
22760
22771
  const t = Fe(e, e.currentSheetId);
22761
22772
  if (t == null) return;
@@ -22784,7 +22795,7 @@ function Yd(e) {
22784
22795
  }
22785
22796
  }), (c = e == null ? void 0 : e.hooks) != null && c.updateCellYdoc && r.size > 0 && e.hooks.updateCellYdoc(Array.from(r.values()));
22786
22797
  }
22787
- function jd(e) {
22798
+ function Kd(e) {
22788
22799
  var l;
22789
22800
  const t = Fe(e, e.currentSheetId);
22790
22801
  if (t == null) return;
@@ -22813,7 +22824,7 @@ function jd(e) {
22813
22824
  }
22814
22825
  }), (l = e == null ? void 0 : e.hooks) != null && l.updateCellYdoc && r.size > 0 && e.hooks.updateCellYdoc(Array.from(r.values()));
22815
22826
  }
22816
- class pf {
22827
+ class yf {
22817
22828
  static writeHtml(t) {
22818
22829
  var r;
22819
22830
  try {
@@ -22831,7 +22842,7 @@ class pf {
22831
22842
  }
22832
22843
  }
22833
22844
  }
22834
- function Xd(e, t, r, a, n) {
22845
+ function Qd(e, t, r, a, n) {
22835
22846
  var Z, J, se, V, Q;
22836
22847
  const o = Ie(e);
22837
22848
  if (!o) return;
@@ -22871,7 +22882,7 @@ function Kt(e, t, r) {
22871
22882
  const a = Ie(e);
22872
22883
  (n = a == null ? void 0 : a[t]) != null && n[r] && delete a[t][r].error;
22873
22884
  }
22874
- function gf(e) {
22885
+ function bf(e) {
22875
22886
  const t = e.hooks;
22876
22887
  !(t != null && t.dataVerificationChange) && !(t != null && t.conditionFormatChange) && !(t != null && t.hyperlinkChange) || requestAnimationFrame(() => {
22877
22888
  requestAnimationFrame(() => {
@@ -22880,10 +22891,10 @@ function gf(e) {
22880
22891
  });
22881
22892
  });
22882
22893
  }
22883
- const Zd = {
22894
+ const Jd = {
22884
22895
  isPasteAction: !1,
22885
22896
  isPasteValuesOnly: !1
22886
- }, yf = 14e5;
22897
+ }, wf = 14e5;
22887
22898
  function Cn(e, t, r) {
22888
22899
  var u, f, m, d;
22889
22900
  const { scrollLeft: a, scrollTop: n } = e, o = e.cellmainHeight, i = e.cellmainWidth, l = Fe(e, e.currentSheetId), c = l == null ? null : e.luckysheetfile[l];
@@ -22908,7 +22919,7 @@ function Cn(e, t, r) {
22908
22919
  }
22909
22920
  }
22910
22921
  }
22911
- function bf(e, t, r, a, n) {
22922
+ function vf(e, t, r, a, n) {
22912
22923
  const o = e.visibledatarow[r], i = t - 1 === -1 ? 0 : e.visibledatarow[t - 1], l = e.visibledatacolumn[n], c = a - 1 === -1 ? 0 : e.visibledatacolumn[a - 1];
22913
22924
  return h.isNumber(o) && h.isNumber(i) && h.isNumber(l) && h.isNumber(c) ? {
22914
22925
  left: c,
@@ -22917,7 +22928,7 @@ function bf(e, t, r, a, n) {
22917
22928
  height: o - i - 1
22918
22929
  } : null;
22919
22930
  }
22920
- function wf(e, t) {
22931
+ function _f(e, t) {
22921
22932
  var c;
22922
22933
  const r = Math.min(t.row[0], t.row[1]), a = Math.max(t.row[0], t.row[1]), n = Math.min(t.column[0], t.column[1]), o = Math.max(t.column[0], t.column[1]);
22923
22934
  if (r === a && n === o)
@@ -22938,7 +22949,7 @@ function Ho(e, t) {
22938
22949
  e.primaryCellActive = null;
22939
22950
  return;
22940
22951
  }
22941
- if (wf(e, a)) {
22952
+ if (_f(e, a)) {
22942
22953
  e.primaryCellActive = null;
22943
22954
  return;
22944
22955
  }
@@ -22949,7 +22960,7 @@ function Ho(e, t) {
22949
22960
  e.primaryCellActive = { r: o, c: i };
22950
22961
  }
22951
22962
  }
22952
- function Kd(e, t = !0) {
22963
+ function em(e, t = !0) {
22953
22964
  const r = e.luckysheet_select_save;
22954
22965
  if (!(r != null && r.length)) return !1;
22955
22966
  const a = r[r.length - 1], n = a.row[0], o = a.row[1], i = a.column[0], l = a.column[1];
@@ -22961,10 +22972,10 @@ function Kd(e, t = !0) {
22961
22972
  let y, b;
22962
22973
  return t ? d < s ? (y = d + 1, b = p) : p < f ? (y = c, b = p + 1) : (y = c, b = u) : d > c ? (y = d - 1, b = p) : p > u ? (y = s, b = p - 1) : (y = s, b = f), a.row_focus = y, a.column_focus = b, Jt(e, r), !0;
22963
22974
  }
22964
- function Qd(e, t, r) {
22975
+ function tm(e, t, r) {
22965
22976
  e.primaryCellActive = { r: t, c: r };
22966
22977
  }
22967
- function Jd(e, t, r) {
22978
+ function nm(e, t, r) {
22968
22979
  const a = e.luckysheet_select_save, n = a == null ? void 0 : a[a.length - 1];
22969
22980
  if (!(n != null && n.row) || n.row.length < 2 || !n.column || n.column.length < 2) {
22970
22981
  e.luckysheet_select_save = [
@@ -22987,7 +22998,7 @@ function Jd(e, t, r) {
22987
22998
  }
22988
22999
  ], Jt(e, e.luckysheet_select_save));
22989
23000
  }
22990
- function em(e) {
23001
+ function rm(e) {
22991
23002
  var t, r, a, n;
22992
23003
  return (r = (t = e == null ? void 0 : e[0]) == null ? void 0 : t[0]) != null && r.mc && !h.isNil((a = e[0][0].mc) == null ? void 0 : a.rs) && !h.isNil((n = e[0][0].mc) == null ? void 0 : n.cs) ? [
22993
23004
  {
@@ -23014,13 +23025,13 @@ function Jt(e, t) {
23014
23025
  }
23015
23026
  return Ho(e, t), t;
23016
23027
  }
23017
- function tm(e, t, r) {
23028
+ function am(e, t, r) {
23018
23029
  const a = e || {};
23019
23030
  for (let n = t; n <= r; n += 1)
23020
23031
  n in a || (a[n] = 0);
23021
23032
  return a;
23022
23033
  }
23023
- function nm(e) {
23034
+ function im(e) {
23024
23035
  const t = Object.keys(e).map(Number);
23025
23036
  t.sort((n, o) => n - o);
23026
23037
  let r, a = [];
@@ -23032,7 +23043,7 @@ function nm(e) {
23032
23043
  r = [], r.push([t[0]]);
23033
23044
  return r;
23034
23045
  }
23035
- function vf(e, t) {
23046
+ function Tf(e, t) {
23036
23047
  return e.row[0] === t.row[0] && e.row[1] === t.row[1] && e.column[0] === t.column[0] && e.column[1] === t.column[1];
23037
23048
  }
23038
23049
  function Uo(e) {
@@ -23040,12 +23051,12 @@ function Uo(e) {
23040
23051
  const t = h.cloneDeep(e);
23041
23052
  return delete t.cellrange, JSON.stringify(t);
23042
23053
  }
23043
- function rm(e, t) {
23054
+ function om(e, t) {
23044
23055
  var B, re;
23045
23056
  const r = e.config;
23046
23057
  if (r.merge == null && (r.merge = {}), !t) return;
23047
23058
  const a = t.HasMC, n = t.dataSheetId, o = t.copyRange[0].row[0], i = t.copyRange[0].row[1], l = t.copyRange[0].column[0], c = t.copyRange[0].column[1], s = h.cloneDeep(
23048
- mf(
23059
+ pf(
23049
23060
  e,
23050
23061
  { row: [o, i], column: [l, c] },
23051
23062
  n
@@ -23181,7 +23192,7 @@ function rm(e, t) {
23181
23192
  const W = oe[K].cellrange;
23182
23193
  let ce = [];
23183
23194
  for (let ye = 0; ye < W.length; ye += 1) {
23184
- const M = Vu(
23195
+ const M = Yu(
23185
23196
  W[ye],
23186
23197
  { row: [o, i], column: [l, c] },
23187
23198
  { row: [f, m], column: [d, p] },
@@ -23196,7 +23207,7 @@ function rm(e, t) {
23196
23207
  if ($ >= 0) {
23197
23208
  const A = h.cloneDeep(X[$]);
23198
23209
  Array.isArray(A.cellrange) || (A.cellrange = []), A.cellrange.some(
23199
- (F) => vf(F, ye)
23210
+ (F) => Tf(F, ye)
23200
23211
  ) || A.cellrange.push({ ...ye }), X[$] = A;
23201
23212
  } else {
23202
23213
  const A = h.cloneDeep(oe[K]);
@@ -23207,9 +23218,9 @@ function rm(e, t) {
23207
23218
  V.luckysheet_conditionformat_save = X;
23208
23219
  }
23209
23220
  }
23210
- gf(e);
23221
+ bf(e);
23211
23222
  }
23212
- function am(e, t) {
23223
+ function lm(e, t) {
23213
23224
  e == null && (e = t.luckysheet_selection_range), e = JSON.parse(JSON.stringify(e));
23214
23225
  }
23215
23226
  function xt(e, t, r, a) {
@@ -23320,7 +23331,7 @@ function Ut(e, t, r, a) {
23320
23331
  l = o;
23321
23332
  return [i, l];
23322
23333
  }
23323
- function im(e, t, r, a) {
23334
+ function sm(e, t, r, a) {
23324
23335
  var g;
23325
23336
  const n = Ie(e);
23326
23337
  if (!n) return;
@@ -23398,7 +23409,7 @@ function im(e, t, r, a) {
23398
23409
  }, Cn(e, s, d);
23399
23410
  }
23400
23411
  }
23401
- function om(e, t, r, a) {
23412
+ function cm(e, t, r, a) {
23402
23413
  let n, o, i, l;
23403
23414
  const c = Ie(e);
23404
23415
  if (!h.isNil(c) && !h.isNil(e.luckysheet_select_save)) {
@@ -23606,7 +23617,7 @@ function At(e, t) {
23606
23617
  13: "Thick"
23607
23618
  }[e.toString()], e.indexOf("Medium") > -1 ? r += "1pt " : e === "Thick" ? r += "1.5pt " : r += "0.5pt ", e === "Hair" ? r += "double " : e.indexOf("DashDotDot") > -1 ? r += "dotted " : e.indexOf("DashDot") > -1 ? r += "dashed " : e.indexOf("Dotted") > -1 ? r += "dotted " : e.indexOf("Dashed") > -1 ? r += "dashed " : r += "solid ", `${r + t};`;
23608
23619
  }
23609
- function _f(e, t, r, a) {
23620
+ function $f(e, t, r, a) {
23610
23621
  var w, _;
23611
23622
  const n = (a == null ? void 0 : a.includeCellMetadata) ?? !1, o = (a == null ? void 0 : a.preferRichText) ?? !1, i = (a == null ? void 0 : a.respectFilterHiddenRows) ?? !1, l = Nl(e), c = /* @__PURE__ */ new Set();
23612
23623
  i && t === e.currentSheetId && !h.isNil(e.luckysheet_filter_save) && !h.isEmpty(e.filter) && Object.values(e.filter || {}).forEach((T) => {
@@ -23775,7 +23786,7 @@ function _f(e, t, r, a) {
23775
23786
  }
23776
23787
  return `<table data-type="fortune-copy-action-table">${y}${p}</table>`;
23777
23788
  }
23778
- function lm(e) {
23789
+ function um(e) {
23779
23790
  var g, y, b, w;
23780
23791
  const t = Ie(e);
23781
23792
  e.lastInternalCopyHtmlMetadataStripped = !1, e.luckysheet_selection_range = [];
@@ -23845,7 +23856,7 @@ function lm(e) {
23845
23856
  ) : "";
23846
23857
  f = `<table data-type="fortune-copy-action-table"><tr><td style="white-space: pre-line; ${Z}" data-fortune-cell="${se}">${J}</td></tr></table>`;
23847
23858
  } else
23848
- f = _f(
23859
+ f = $f(
23849
23860
  e,
23850
23861
  e.currentSheetId,
23851
23862
  e.luckysheet_select_save,
@@ -23856,9 +23867,9 @@ function lm(e) {
23856
23867
  }
23857
23868
  ), f = f === null ? f : f.replace('<td style="', '<td style="white-space: pre-line; ');
23858
23869
  let p = !1;
23859
- f && u && f.length > yf && (p = !0, f = f.replace(/\sdata-fortune-cell="[^"]*"/g, "")), f && (e.iscopyself = !0, e.lastInternalCopyHtmlMetadataStripped = p, pf.writeHtml(f));
23870
+ f && u && f.length > wf && (p = !0, f = f.replace(/\sdata-fortune-cell="[^"]*"/g, "")), f && (e.iscopyself = !0, e.lastInternalCopyHtmlMetadataStripped = p, yf.writeHtml(f));
23860
23871
  }
23861
- function sm(e) {
23872
+ function fm(e) {
23862
23873
  var a, n, o, i, l, c, s, u;
23863
23874
  if (Gt(e) === !1 || e.isFlvReadOnly)
23864
23875
  return "allowEdit";
@@ -23911,7 +23922,7 @@ function sm(e) {
23911
23922
  }
23912
23923
  return "success";
23913
23924
  }
23914
- function cm(e) {
23925
+ function dm(e) {
23915
23926
  var a;
23916
23927
  if (Gt(e) === !1)
23917
23928
  return "allowEdit";
@@ -23949,7 +23960,7 @@ function cm(e) {
23949
23960
  }
23950
23961
  return "success";
23951
23962
  }
23952
- function um(e) {
23963
+ function mm(e) {
23953
23964
  var a, n, o;
23954
23965
  if (Gt(e) === !1)
23955
23966
  return "allowEdit";
@@ -24056,7 +24067,7 @@ function um(e) {
24056
24067
  }
24057
24068
  return "success";
24058
24069
  }
24059
- function fm(e) {
24070
+ function hm(e) {
24060
24071
  var a, n, o;
24061
24072
  if (Gt(e) === !1)
24062
24073
  return "allowEdit";
@@ -24163,7 +24174,7 @@ function fm(e) {
24163
24174
  }
24164
24175
  return "success";
24165
24176
  }
24166
- function dm(e, t) {
24177
+ function pm(e, t) {
24167
24178
  var n;
24168
24179
  if (Gt(e) === !1)
24169
24180
  return "allowEdit";
@@ -24201,7 +24212,7 @@ function dm(e, t) {
24201
24212
  }
24202
24213
  return "success";
24203
24214
  }
24204
- function mm(e) {
24215
+ function gm(e) {
24205
24216
  var a;
24206
24217
  if (Gt(e) === !1)
24207
24218
  return "allowEdit";
@@ -24244,7 +24255,7 @@ function mm(e) {
24244
24255
  }
24245
24256
  return "success";
24246
24257
  }
24247
- function hm(e) {
24258
+ function ym(e) {
24248
24259
  var a;
24249
24260
  if (Gt(e) === !1)
24250
24261
  return "allowEdit";
@@ -24286,7 +24297,7 @@ function hm(e) {
24286
24297
  }
24287
24298
  return "success";
24288
24299
  }
24289
- function pm(e) {
24300
+ function bm(e) {
24290
24301
  var a;
24291
24302
  if (Gt(e) === !1)
24292
24303
  return "allowEdit";
@@ -24329,10 +24340,10 @@ function pm(e) {
24329
24340
  }
24330
24341
  return "success";
24331
24342
  }
24332
- function gm(e, t) {
24343
+ function wm(e, t) {
24333
24344
  return !1;
24334
24345
  }
24335
- function ym(e) {
24346
+ function vm(e) {
24336
24347
  const t = Ie(e);
24337
24348
  t && (e.luckysheet_select_status = !1, e.luckysheet_select_save = [
24338
24349
  {
@@ -24345,7 +24356,7 @@ function ym(e) {
24345
24356
  }
24346
24357
  ], Jt(e, e.luckysheet_select_save));
24347
24358
  }
24348
- function bm(e, t, r, a) {
24359
+ function _m(e, t, r, a) {
24349
24360
  var c;
24350
24361
  if (!a) return {};
24351
24362
  const n = {}, { scrollTop: o } = e, i = (c = a.horizontal) == null ? void 0 : c.freezenhorizontaldata;
@@ -24356,7 +24367,7 @@ function bm(e, t, r, a) {
24356
24367
  }
24357
24368
  return l || (n.display = "none"), n;
24358
24369
  }
24359
- function wm(e, t, r, a) {
24370
+ function Tm(e, t, r, a) {
24360
24371
  var c;
24361
24372
  if (!a) return {};
24362
24373
  const n = {}, { scrollLeft: o } = e, i = (c = a.vertical) == null ? void 0 : c.freezenverticaldata;
@@ -24367,12 +24378,12 @@ function wm(e, t, r, a) {
24367
24378
  }
24368
24379
  return l || (n.display = "none"), n;
24369
24380
  }
24370
- function vm(e) {
24381
+ function $m(e) {
24371
24382
  var c, s, u, f, m, d, p, g, y, b, w, _, T, v, x, C, I, k;
24372
24383
  const t = e.luckysheet_select_save;
24373
24384
  let r = 0, a = 0, n = 0, o = -1 / 0, i = 1 / 0;
24374
24385
  for (let O = 0; O < t.length; O += 1) {
24375
- const U = hf(e, t[O]);
24386
+ const U = gf(e, t[O]);
24376
24387
  for (let Z = 0; Z < U.length; Z += 1)
24377
24388
  for (let J = 0; J < U[0].length && !(Z >= U.length || J >= U[0].length); J += 1) {
24378
24389
  const se = (s = (c = U[Z][J]) == null ? void 0 : c.ct) == null ? void 0 : s.t;
@@ -24386,7 +24397,7 @@ function vm(e) {
24386
24397
  const l = String(n / r);
24387
24398
  return { numberC: r, count: a, sum: n, max: o, min: i, average: l };
24388
24399
  }
24389
- function _m(e, t, r) {
24400
+ function Cm(e, t, r) {
24390
24401
  var l, c;
24391
24402
  const a = Ie(e);
24392
24403
  if (!(a != null && a.length) || !((l = a[0]) != null && l.length)) return;
@@ -24395,12 +24406,12 @@ function _m(e, t, r) {
24395
24406
  const o = Math.max(0, Math.min(t, a.length - 1)), i = Math.max(0, Math.min(r, a[0].length - 1));
24396
24407
  n.row = [o, o], n.column = [i, i], n.row_focus = o, n.column_focus = i, n.moveXY = { x: o, y: i }, Jt(e, e.luckysheet_select_save), Cn(e, o, i);
24397
24408
  }
24398
- function Tm(e, t, r) {
24409
+ function Nm(e, t, r) {
24399
24410
  var s;
24400
24411
  if (!Gt(e)) return !1;
24401
24412
  const a = e.luckysheet_select_save;
24402
24413
  if (!(a != null && a.length)) return !1;
24403
- e.luckysheetCellUpdate.length > 0 && of(
24414
+ e.luckysheetCellUpdate.length > 0 && sf(
24404
24415
  e,
24405
24416
  e.luckysheetCellUpdate[0],
24406
24417
  e.luckysheetCellUpdate[1],
@@ -24421,7 +24432,7 @@ function Tm(e, t, r) {
24421
24432
  }
24422
24433
  return !0;
24423
24434
  }
24424
- function $m(e) {
24435
+ function Am(e) {
24425
24436
  return {
24426
24437
  luckysheetfile: [],
24427
24438
  defaultcolumnNum: 60,
@@ -24691,7 +24702,7 @@ function $m(e) {
24691
24702
  formulaAsyncEval: null,
24692
24703
  isFormulaCalculating: !1,
24693
24704
  formulaRangeNavRevision: 0,
24694
- formulaCache: new Zc(),
24705
+ formulaCache: new Qc(),
24695
24706
  // class will not be frozen by immer, can be mutated at any time.
24696
24707
  hooks: {},
24697
24708
  showQuickSearch: !1,
@@ -24711,7 +24722,7 @@ function Ie(e, t) {
24711
24722
  const r = Fe(e, t || e.currentSheetId);
24712
24723
  return h.isNil(r) ? null : (n = (a = e.luckysheetfile) == null ? void 0 : a[r]) == null ? void 0 : n.data;
24713
24724
  }
24714
- function Tf(e, t, r) {
24725
+ function Cf(e, t, r) {
24715
24726
  var o, i, l, c, s, u, f, m, d, p, g;
24716
24727
  e.visibledatarow = [], e.rh_height = 0;
24717
24728
  for (let y = 0; y < t; y += 1) {
@@ -24736,7 +24747,7 @@ function Tf(e, t, r) {
24736
24747
  }
24737
24748
  e.ch_width += a;
24738
24749
  }
24739
- function Cm(e, t) {
24750
+ function Sm(e, t) {
24740
24751
  if ((e == null ? void 0 : e.length) > 0) {
24741
24752
  let r = !1;
24742
24753
  const a = [];
@@ -24745,7 +24756,7 @@ function Cm(e, t) {
24745
24756
  }), r || (e[0].status = 1);
24746
24757
  }
24747
24758
  }
24748
- function Nm(e) {
24759
+ function xm(e) {
24749
24760
  const t = e.luckysheetfile.filter(
24750
24761
  (r) => h.isUndefined(r.hide) || r.hide !== 1
24751
24762
  );
@@ -24756,11 +24767,11 @@ function Nm(e) {
24756
24767
  break;
24757
24768
  }
24758
24769
  }
24759
- function Am(e, t) {
24770
+ function Em(e, t) {
24760
24771
  const r = t.length, a = r === 0 ? 0 : t[0].length;
24761
- Tf(e, r, a), Jt(e, e.luckysheet_select_save);
24772
+ Cf(e, r, a), Jt(e, e.luckysheet_select_save);
24762
24773
  }
24763
- function Sm(e, t, r) {
24774
+ function km(e, t, r) {
24764
24775
  e.luckysheetTableContentHW = [
24765
24776
  r.clientWidth,
24766
24777
  r.clientHeight
@@ -24770,7 +24781,7 @@ function Sm(e, t, r) {
24770
24781
  e.luckysheetTableContentHW[1] * e.devicePixelRatio
24771
24782
  );
24772
24783
  }
24773
- function $f(e, t, r, a, n, o) {
24784
+ function Nf(e, t, r, a, n, o) {
24774
24785
  var f, m, d, p, g, y, b, w, _, T, v, x, C, I, k, O, U, Z, J, se, V, Q, B, re, oe, be, fe, X, K, W, ce, ye, M, $, A, F, N, G, E, H, L, pe, de, te, ve, we, Te, xe, me, ue, He, Ue, Me, ge, D, q, Y, P, z, he, _e, Ne, j, le, qe, Se, Ee, ke, We, Be, Ye, Pt, Yt, Ot, Da, Oa, La, Fa, Ba, Pa, Ha, Ua, za, Wa, Va, Ga, Ya, ja, Xa, Za, Ka, Qa, Ja, ei, ti, ni, ri, ai, ii, oi, li, si, ci, ui, fi, di, mi, hi, pi, gi, yi, bi, wi, vi, _i, Ti, $i, Ci, Ni, Ai, Si, xi, Ei, ki, Ri, Mi, qi, Ii, Di, Oi, Li, Fi, Bi, Pi, Hi, Ui, zi, Wi, Vi, Gi, Yi, ji, Xi, Zi, Ki, Qi, Ji, eo, to, no, ro, ao, io, oo, lo, so, co, uo, fo, mo, ho;
24775
24786
  const i = {}, l = Ie(e);
24776
24787
  let c, s;
@@ -25538,7 +25549,7 @@ function Il(e, t) {
25538
25549
  else
25539
25550
  return r;
25540
25551
  }
25541
- return r = $f(
25552
+ return r = Nf(
25542
25553
  e,
25543
25554
  0,
25544
25555
  n.length,
@@ -25598,7 +25609,7 @@ const Ol = (e, t) => {
25598
25609
  const t = { ...e };
25599
25610
  return delete t.v, delete t.m, delete t.f, delete t.ps, delete t.hl, t;
25600
25611
  };
25601
- function Cf(e, t, r, a) {
25612
+ function Af(e, t, r, a) {
25602
25613
  var i, l, c;
25603
25614
  const n = [], o = e[t];
25604
25615
  if (!o || !e[0]) return n;
@@ -25618,7 +25629,7 @@ function Cf(e, t, r, a) {
25618
25629
  }
25619
25630
  return n;
25620
25631
  }
25621
- function Nf(e, t, r, a) {
25632
+ function Sf(e, t, r, a) {
25622
25633
  var o, i, l;
25623
25634
  const n = [];
25624
25635
  for (let c = 0; c < e.length; c += 1) {
@@ -25683,7 +25694,7 @@ const Ll = (e) => {
25683
25694
  }
25684
25695
  }
25685
25696
  };
25686
- function Af(e, t, r = !0) {
25697
+ function xf(e, t, r = !0) {
25687
25698
  var X, K, W, ce, ye, M, $, A, F, N, G, E, H, L, pe, de, te, ve, we, Te, xe, me, ue, He, Ue, Me, ge;
25688
25699
  let { count: a, id: n } = t;
25689
25700
  const { type: o, index: i, direction: l, templateSourceRows: c, templateSourceColumns: s } = t;
@@ -25971,7 +25982,7 @@ function Af(e, t, r = !0) {
25971
25982
  }
25972
25983
  const Se = [];
25973
25984
  for (let Ee = 0; Ee < a; Ee += 1) {
25974
- const ke = g ? b : i, We = Cf(m, ke, a, l);
25985
+ const ke = g ? b : i, We = Af(m, ke, a, l);
25975
25986
  Se.push(JSON.stringify(We));
25976
25987
  let Be = [];
25977
25988
  g ? Be = D.filter(
@@ -26030,7 +26041,7 @@ function Af(e, t, r = !0) {
26030
26041
  for (let j = 0; j < a; j += 1) {
26031
26042
  const le = y ? w : i;
26032
26043
  _e.push(
26033
- Nf(m, le, a, l)
26044
+ Sf(m, le, a, l)
26034
26045
  );
26035
26046
  }
26036
26047
  const Ne = [];
@@ -26531,7 +26542,7 @@ function Bl(e, t) {
26531
26542
  $.length > 0 && (e.formulaCache.execFunctionExist = $, Yn(e, null, null, null, null, Ie(e)), e.formulaCache.execFunctionExist = void 0);
26532
26543
  }
26533
26544
  }
26534
- function xm(e, t) {
26545
+ function Rm(e, t) {
26535
26546
  if (!e.luckysheet_select_save || e.luckysheet_select_save.length > 1)
26536
26547
  return "noMulti";
26537
26548
  const r = Fe(e, e.currentSheetId);
@@ -26553,7 +26564,7 @@ function xm(e, t) {
26553
26564
  }
26554
26565
  return e.luckysheetfile[r].config = e.config, "";
26555
26566
  }
26556
- function Em(e, t) {
26567
+ function Mm(e, t) {
26557
26568
  if (!e.luckysheet_select_save || e.luckysheet_select_save.length > 1)
26558
26569
  return "noMulti";
26559
26570
  const r = Fe(e, e.currentSheetId);
@@ -26571,7 +26582,7 @@ function Em(e, t) {
26571
26582
  }
26572
26583
  return e.luckysheetfile[r].config = e.config, "";
26573
26584
  }
26574
- function km(e) {
26585
+ function qm(e) {
26575
26586
  var t, r, a, n;
26576
26587
  if (!e.luckysheet_select_save || !e.config.colhidden && !e.config.rowhidden)
26577
26588
  return !1;
@@ -26587,7 +26598,7 @@ function km(e) {
26587
26598
  }
26588
26599
  return !1;
26589
26600
  }
26590
- function Rm(e, t) {
26601
+ function Im(e, t) {
26591
26602
  let r = 1;
26592
26603
  if (!e.luckysheet_select_save) return 0;
26593
26604
  const a = e.luckysheet_select_save[0], n = e.config.rowhidden ?? {}, o = e.config.colhidden ?? {};
@@ -26632,7 +26643,7 @@ function Rm(e, t) {
26632
26643
  }
26633
26644
  return r;
26634
26645
  }
26635
- function Mm(e, t, r) {
26646
+ function Dm(e, t, r) {
26636
26647
  let a = e.length;
26637
26648
  const n = qt(r).pivotTable, { title: o } = n;
26638
26649
  for (let i = 0; i < e.length; i += 1)
@@ -26644,7 +26655,7 @@ function Mm(e, t, r) {
26644
26655
  }
26645
26656
  return t ? o + (a + 1) : `Sheet${a + 1}`;
26646
26657
  }
26647
- function Sf(e) {
26658
+ function Ef(e) {
26648
26659
  let t;
26649
26660
  e.indexOf("rgba") > -1 ? t = e.replace("rgba(", "").replace(")", "").split(",") : t = e.replace("rgb(", "").replace(")", "").split(",");
26650
26661
  const r = Number(t[0]), a = Number(t[1]), n = Number(t[2]);
@@ -26665,7 +26676,7 @@ function vt(e) {
26665
26676
  o = a(t[i]), n += o * 26 ** (r - i - 1);
26666
26677
  return n === 0 ? NaN : n - 1;
26667
26678
  }
26668
- function xf(e) {
26679
+ function kf(e) {
26669
26680
  return typeof e != "string" ? e : e.replace(/<script>/g, "&lt;script&gt;").replace(/<\/script>/, "&lt;/script&gt;");
26670
26681
  }
26671
26682
  function Gn(e) {
@@ -26689,7 +26700,7 @@ function Er(e, t) {
26689
26700
  const r = Fe(e, t);
26690
26701
  return h.isNil(r) ? null : e.luckysheetfile[r];
26691
26702
  }
26692
- function qm(e) {
26703
+ function Om(e) {
26693
26704
  const t = /* @__PURE__ */ new Date(), r = t.getFullYear();
26694
26705
  let a = t.getMonth(), n = t.getDate(), o = t.getHours(), i = t.getMinutes(), l = t.getSeconds();
26695
26706
  a += 1, a < 10 && (a = `0${a}`), n < 10 && (n = `0${n}`), o < 10 && (o = `0${o}`), i < 10 && (i = `0${i}`), l < 10 && (l = `0${l}`);
@@ -26702,10 +26713,10 @@ function Wo(e, t) {
26702
26713
  return typeof n < "u" ? n : r;
26703
26714
  });
26704
26715
  }
26705
- function Im(e) {
26716
+ function Lm(e) {
26706
26717
  return e.replace("~*", "\\*").replace("~?", "\\?").replace(".", "\\.").replace("*", ".*").replace("?", ".");
26707
26718
  }
26708
- function Dm(e) {
26719
+ function Fm(e) {
26709
26720
  let n = "";
26710
26721
  for (; e >= 0; )
26711
26722
  n = String.fromCharCode(e % 26 + 97) + n, e = Math.floor(e / 26) - 1;
@@ -26728,7 +26739,7 @@ function Gt(e, t) {
26728
26739
  return !0;
26729
26740
  }) && (h.isUndefined(e.allowEdit) ? !0 : e.allowEdit) && !e.isFlvReadOnly;
26730
26741
  }
26731
- function Ef(e, t) {
26742
+ function Rf(e, t) {
26732
26743
  const r = e.config, a = h.isUndefined(t) ? e.luckysheet_select_save : t;
26733
26744
  return h.every(a, (n) => {
26734
26745
  var o, i;
@@ -26745,10 +26756,10 @@ function Ef(e, t) {
26745
26756
  return !0;
26746
26757
  }) && (h.isUndefined(e.isFlvReadOnly) ? !0 : e.isFlvReadOnly);
26747
26758
  }
26748
- function kf(e) {
26759
+ function Mf(e) {
26749
26760
  return /^[a-zA-Z]\d+$/.test(e);
26750
26761
  }
26751
- function Rf(e) {
26762
+ function qf(e) {
26752
26763
  const t = document.createElement("div");
26753
26764
  t.innerHTML = e;
26754
26765
  const r = t.querySelectorAll("span");
@@ -26813,7 +26824,7 @@ function Hl(e, t, r) {
26813
26824
  }
26814
26825
  }), s || c;
26815
26826
  }
26816
- function Mf(e, t) {
26827
+ function If(e, t) {
26817
26828
  var o;
26818
26829
  let r = "";
26819
26830
  const a = e.includes("."), n = t;
@@ -26823,7 +26834,7 @@ function Mf(e, t) {
26823
26834
  } else n ? r = "#,##0" : r = "General";
26824
26835
  return r;
26825
26836
  }
26826
- const rn = new Error("invalid params"), Vo = new Error("sheet not found"), qf = (e) => {
26837
+ const rn = new Error("invalid params"), Vo = new Error("sheet not found"), Df = (e) => {
26827
26838
  const t = [];
26828
26839
  if (e == null)
26829
26840
  return t;
@@ -26833,7 +26844,7 @@ const rn = new Error("invalid params"), Vo = new Error("sheet not found"), qf =
26833
26844
  n != null && t.push({ r, c: a, v: n });
26834
26845
  }
26835
26846
  return t;
26836
- }, Om = (e, t, r) => {
26847
+ }, Bm = (e, t, r) => {
26837
26848
  const a = h.maxBy(e, "r"), n = h.maxBy(e, "c");
26838
26849
  let o = ((a == null ? void 0 : a.r) ?? 0) + 1, i = ((n == null ? void 0 : n.c) ?? 0) + 1;
26839
26850
  if (t != null && r != null && t > 0 && r > 0 && (o = Math.max(o, t), i = Math.max(i, r)), o && i) {
@@ -26856,11 +26867,11 @@ function an(e, t = {}) {
26856
26867
  throw Vo;
26857
26868
  return a;
26858
26869
  }
26859
- function Lm(e, t = {}) {
26870
+ function Pm(e, t = {}) {
26860
26871
  const r = an(e, t);
26861
- return { ...r, celldata: qf(r.data) };
26872
+ return { ...r, celldata: Df(r.data) };
26862
26873
  }
26863
- function Fm(e, t, r, a = {}) {
26874
+ function Hm(e, t, r, a = {}) {
26864
26875
  const n = an(e, a), i = {
26865
26876
  row: "rangeRow",
26866
26877
  column: "rangeColumn",
@@ -26875,12 +26886,12 @@ function Fm(e, t, r, a = {}) {
26875
26886
  }
26876
26887
  };
26877
26888
  }
26878
- function Bm(e, t, r, a, n, o = {}) {
26889
+ function Um(e, t, r, a, n, o = {}) {
26879
26890
  if (!["row", "column"].includes(t) || !h.isNumber(r) || !h.isNumber(a) || !["lefttop", "rightbottom"].includes(n))
26880
26891
  throw rn;
26881
26892
  const i = an(e, o);
26882
26893
  try {
26883
- Af(e, {
26894
+ xf(e, {
26884
26895
  type: t,
26885
26896
  index: r,
26886
26897
  count: a,
@@ -26891,13 +26902,13 @@ function Bm(e, t, r, a, n, o = {}) {
26891
26902
  console.error(l);
26892
26903
  }
26893
26904
  }
26894
- function Pm(e, t, r, a, n = {}) {
26905
+ function zm(e, t, r, a, n = {}) {
26895
26906
  if (!["row", "column"].includes(t) || !h.isNumber(r) || !h.isNumber(a))
26896
26907
  throw rn;
26897
26908
  const o = an(e, n);
26898
26909
  Bl(e, { type: t, start: r, end: a, id: o.id });
26899
26910
  }
26900
- function Hm(e, t, r) {
26911
+ function Wm(e, t, r) {
26901
26912
  if (!["row", "column"].includes(r))
26902
26913
  throw rn;
26903
26914
  if (!e || !e.config) return;
@@ -26916,7 +26927,7 @@ function Hm(e, t, r) {
26916
26927
  }
26917
26928
  e.luckysheetfile[a].config = e.config;
26918
26929
  }
26919
- function Um(e, t, r) {
26930
+ function Vm(e, t, r) {
26920
26931
  if (!["row", "column"].includes(r))
26921
26932
  throw rn;
26922
26933
  if (!e || !e.config) return;
@@ -26935,7 +26946,7 @@ function Um(e, t, r) {
26935
26946
  }
26936
26947
  e.luckysheetfile[a].config = e.config;
26937
26948
  }
26938
- function If(e, t, r = {}, a = !1) {
26949
+ function Of(e, t, r = {}, a = !1) {
26939
26950
  if (!h.isPlainObject(t))
26940
26951
  throw rn;
26941
26952
  const n = an(e, r), o = n.config || {};
@@ -26943,7 +26954,7 @@ function If(e, t, r = {}, a = !1) {
26943
26954
  Number(l) >= 0 && Number(i) >= 0 && (o.rowlen[Number(l)] = Number(i), a && h.isUndefined(o.customHeight) ? o.customHeight = { [l]: 1 } : a && (o.customHeight[l] = 1));
26944
26955
  }), n.config = o, e.currentSheetId === n.id && (e.config = o);
26945
26956
  }
26946
- function zm(e, t, r = {}, a = !1) {
26957
+ function Gm(e, t, r = {}, a = !1) {
26947
26958
  if (!h.isPlainObject(t))
26948
26959
  throw rn;
26949
26960
  const n = an(e, r), o = n.config || {};
@@ -26951,7 +26962,7 @@ function zm(e, t, r = {}, a = !1) {
26951
26962
  Number(l) >= 0 && Number(i) >= 0 && (o.columnlen[Number(l)] = Number(i), a && h.isUndefined(o.customWidth) ? o.customWidth = { [l]: 1 } : a && (o.customWidth[l] = 1));
26952
26963
  }), n.config = o, e.currentSheetId === n.id && (e.config = o);
26953
26964
  }
26954
- function Df(e, t, r = {}) {
26965
+ function Lf(e, t, r = {}) {
26955
26966
  if (!h.isArray(t) || t.length === 0)
26956
26967
  throw rn;
26957
26968
  const o = (an(e, r).config || {}).rowlen || {}, i = {};
@@ -26962,7 +26973,7 @@ function Df(e, t, r = {}) {
26962
26973
  }
26963
26974
  }), i;
26964
26975
  }
26965
- function Wm(e, t, r = {}) {
26976
+ function Ym(e, t, r = {}) {
26966
26977
  if (!h.isArray(t) || t.length === 0)
26967
26978
  throw rn;
26968
26979
  const o = (an(e, r).config || {}).columnlen || {}, i = {};
@@ -26973,17 +26984,17 @@ function Wm(e, t, r = {}) {
26973
26984
  }
26974
26985
  }), i;
26975
26986
  }
26976
- function Of(e) {
26987
+ function Ff(e) {
26977
26988
  return Number.isFinite(Number(e)) && !Number.isNaN(Number(e));
26978
26989
  }
26979
- function Lf(e) {
26990
+ function Bf(e) {
26980
26991
  return /^0x?[a-fA-F0-9]+$/.test(e);
26981
26992
  }
26982
26993
  const Go = "#f3f3f3", Yo = 5;
26983
26994
  function Ul(e) {
26984
26995
  return typeof e != "string" ? !1 : ["price", "fully_diluted_value"].includes(e) || e.toLowerCase().includes("usd") || e.toLowerCase().includes("price_in");
26985
26996
  }
26986
- const zl = `$#,##0.${"0".repeat(2)}`, Ff = (e, t, r, a) => {
26997
+ const zl = `$#,##0.${"0".repeat(2)}`, Pf = (e, t, r, a) => {
26987
26998
  var o;
26988
26999
  if (!r.length) return e;
26989
27000
  const n = r.map((i) => {
@@ -27003,7 +27014,7 @@ const zl = `$#,##0.${"0".repeat(2)}`, Ff = (e, t, r, a) => {
27003
27014
  {},
27004
27015
  !1
27005
27016
  ), e + r.length;
27006
- }, Bf = ({
27017
+ }, Hf = ({
27007
27018
  row: e,
27008
27019
  column: t,
27009
27020
  newValue: r,
@@ -27021,7 +27032,7 @@ const zl = `$#,##0.${"0".repeat(2)}`, Ff = (e, t, r, a) => {
27021
27032
  return;
27022
27033
  }
27023
27034
  let l = e;
27024
- i != null && i.length && (l = Ff(
27035
+ i != null && i.length && (l = Pf(
27025
27036
  e,
27026
27037
  t,
27027
27038
  i,
@@ -27088,7 +27099,7 @@ const zl = `$#,##0.${"0".repeat(2)}`, Ff = (e, t, r, a) => {
27088
27099
  }
27089
27100
  }
27090
27101
  } else {
27091
- if (Pf({
27102
+ if (Uf({
27092
27103
  row: l,
27093
27104
  column: t,
27094
27105
  apiData: a,
@@ -27147,7 +27158,7 @@ const zl = `$#,##0.${"0".repeat(2)}`, Ff = (e, t, r, a) => {
27147
27158
  var o, i, l;
27148
27159
  const a = (i = (o = r.current) == null ? void 0 : o.getSheet()) == null ? void 0 : i.data, n = (l = a == null ? void 0 : a[e]) == null ? void 0 : l[t];
27149
27160
  return n == null ? {} : typeof n == "object" ? { ...n } : { v: n };
27150
- }, ua = (e) => Of(e) && !Lf(e), Wl = (e) => Array.isArray(e) ? e.map((t) => ({ ...t })) : e, Ln = (e, t, r) => {
27161
+ }, ua = (e) => Ff(e) && !Bf(e), Wl = (e) => Array.isArray(e) ? e.map((t) => ({ ...t })) : e, Ln = (e, t, r) => {
27151
27162
  const a = ua(e);
27152
27163
  if (r && a && Ul(r)) {
27153
27164
  const { s: l, ...c } = t || {};
@@ -27172,7 +27183,7 @@ const zl = `$#,##0.${"0".repeat(2)}`, Ff = (e, t, r, a) => {
27172
27183
  if (!e || typeof e != "object") return e ?? {};
27173
27184
  const t = e.ct;
27174
27185
  return !t || !Array.isArray(t.s) ? { ...e } : { ...e, ct: { ...t, s: Wl(t.s) } };
27175
- }, Pf = ({
27186
+ }, Uf = ({
27176
27187
  row: e,
27177
27188
  column: t,
27178
27189
  apiData: r,
@@ -27200,7 +27211,7 @@ const zl = `$#,##0.${"0".repeat(2)}`, Ff = (e, t, r, a) => {
27200
27211
  {},
27201
27212
  !0
27202
27213
  ), !0;
27203
- }, Hf = (e) => e !== null && typeof e == "object" && !Array.isArray(e) && (e == null ? void 0 : e.responseType) === "smart-contract", Uf = async ({
27214
+ }, zf = (e) => e !== null && typeof e == "object" && !Array.isArray(e) && (e == null ? void 0 : e.responseType) === "smart-contract", Wf = async ({
27204
27215
  result: e,
27205
27216
  handleSmartContractQuery: t,
27206
27217
  sheetEditorRef: r,
@@ -27215,7 +27226,7 @@ const zl = `$#,##0.${"0".repeat(2)}`, Ff = (e, t, r, a) => {
27215
27226
  row: a,
27216
27227
  column: n,
27217
27228
  newValue: o,
27218
- formulaResponseUiSync: Bf
27229
+ formulaResponseUiSync: Hf
27219
27230
  }, { callSignature: l } = e;
27220
27231
  await t(i)(l);
27221
27232
  }, Zo = (e, t, r) => {
@@ -27225,7 +27236,7 @@ const zl = `$#,##0.${"0".repeat(2)}`, Ff = (e, t, r, a) => {
27225
27236
  } catch {
27226
27237
  return;
27227
27238
  }
27228
- }, Vm = async ({
27239
+ }, jm = async ({
27229
27240
  functionCallString: e,
27230
27241
  sheetEditorRef: t,
27231
27242
  dataBlockRow: r,
@@ -27237,9 +27248,9 @@ const zl = `$#,##0.${"0".repeat(2)}`, Ff = (e, t, r, a) => {
27237
27248
  const i = await import("@fileverse-dev/formulajs"), l = e == null ? void 0 : e.match(/^(\w+)\((.*)\)$/);
27238
27249
  if (!l)
27239
27250
  throw new Error(`Invalid function call format: ${e}`);
27240
- const c = l[1].toUpperCase(), s = l[2], f = zf(s).map((m) => {
27251
+ const c = l[1].toUpperCase(), s = l[2], f = Vf(s).map((m) => {
27241
27252
  if (Vl(m)) {
27242
- const d = Wf(m);
27253
+ const d = Gf(m);
27243
27254
  return d == null ? void 0 : d.map(
27244
27255
  (g) => Zo(t, g == null ? void 0 : g.row, g == null ? void 0 : g.column)
27245
27256
  );
@@ -27256,8 +27267,8 @@ const zl = `$#,##0.${"0".repeat(2)}`, Ff = (e, t, r, a) => {
27256
27267
  });
27257
27268
  if (typeof i[c] == "function") {
27258
27269
  const m = await i[c](...f);
27259
- if (Hf(m)) {
27260
- await Uf({
27270
+ if (zf(m)) {
27271
+ await Wf({
27261
27272
  result: m,
27262
27273
  handleSmartContractQuery: n,
27263
27274
  sheetEditorRef: t,
@@ -27278,7 +27289,7 @@ const zl = `$#,##0.${"0".repeat(2)}`, Ff = (e, t, r, a) => {
27278
27289
  return;
27279
27290
  }
27280
27291
  };
27281
- function zf(e) {
27292
+ function Vf(e) {
27282
27293
  if (!(e != null && e.trim()))
27283
27294
  return [];
27284
27295
  const t = [];
@@ -27341,7 +27352,7 @@ function fa(e) {
27341
27352
  column: n
27342
27353
  };
27343
27354
  }
27344
- function Wf(e) {
27355
+ function Gf(e) {
27345
27356
  if (!Vl(e))
27346
27357
  return null;
27347
27358
  const t = e.split(":"), r = fa(t[0]), a = fa(t[1]);
@@ -27354,36 +27365,36 @@ function Wf(e) {
27354
27365
  return c;
27355
27366
  }
27356
27367
  export {
27357
- Pd as $,
27368
+ zd as $,
27358
27369
  js as A,
27359
27370
  jt as B,
27360
27371
  Vt as C,
27361
27372
  Yn as D,
27362
- am as E,
27363
- ed as F,
27364
- Jf as G,
27373
+ lm as E,
27374
+ nd as F,
27375
+ td as G,
27365
27376
  Js as H,
27366
27377
  en as I,
27367
- Fd as J,
27368
- rd as K,
27369
- ld as L,
27370
- gd as M,
27378
+ Hd as J,
27379
+ id as K,
27380
+ cd as L,
27381
+ wd as M,
27371
27382
  Ca as N,
27372
27383
  Xe as O,
27373
27384
  wa as P,
27374
27385
  _r as Q,
27375
27386
  kt as R,
27376
- od as S,
27387
+ sd as S,
27377
27388
  lc as T,
27378
- ud as U,
27389
+ dd as U,
27379
27390
  Rl as V,
27380
27391
  mr as W,
27381
27392
  Je as X,
27382
27393
  mc as Y,
27383
- zd as Z,
27394
+ Gd as Z,
27384
27395
  wl as _,
27385
27396
  Fe as a,
27386
- gm as a$,
27397
+ wm as a$,
27387
27398
  Ac as a0,
27388
27399
  Or as a1,
27389
27400
  Nc as a2,
@@ -27392,197 +27403,198 @@ export {
27392
27403
  Na as a5,
27393
27404
  Cr as a6,
27394
27405
  ka as a7,
27395
- vd as a8,
27406
+ $d as a8,
27396
27407
  ic as a9,
27397
27408
  Kn as aA,
27398
27409
  xr as aB,
27399
- Sf as aC,
27410
+ Ef as aC,
27400
27411
  El as aD,
27401
27412
  ml as aE,
27402
- mf as aF,
27413
+ pf as aF,
27403
27414
  qn as aG,
27404
- Am as aH,
27415
+ Em as aH,
27405
27416
  an as aI,
27406
27417
  Vo as aJ,
27407
27418
  oa as aK,
27408
27419
  Rt as aL,
27409
- of as aM,
27420
+ sf as aM,
27410
27421
  rn as aN,
27411
- _f as aO,
27412
- Om as aP,
27413
- Pm as aQ,
27414
- Fm as aR,
27415
- Df as aS,
27416
- Lm as aT,
27417
- Hm as aU,
27418
- Bm as aV,
27419
- Xd as aW,
27422
+ $f as aO,
27423
+ Bm as aP,
27424
+ zm as aQ,
27425
+ Hm as aR,
27426
+ Lf as aS,
27427
+ Pm as aT,
27428
+ Wm as aU,
27429
+ Um as aV,
27430
+ Qd as aW,
27420
27431
  Zn as aX,
27421
- zm as aY,
27422
- If as aZ,
27423
- Um as a_,
27432
+ Gm as aY,
27433
+ Of as aZ,
27434
+ Vm as a_,
27424
27435
  un as aa,
27425
27436
  Ze as ab,
27426
27437
  Nl as ac,
27427
- Hd as ad,
27428
- $f as ae,
27429
- Wu as af,
27430
- Wm as ag,
27438
+ Wd as ad,
27439
+ Nf as ae,
27440
+ Gu as af,
27441
+ Ym as ag,
27431
27442
  Al as ah,
27432
27443
  Zt as ai,
27433
27444
  xo as aj,
27434
- Ef as ak,
27445
+ Rf as ak,
27435
27446
  Il as al,
27436
27447
  hn as am,
27437
27448
  yc as an,
27438
27449
  It as ao,
27439
- Vu as ap,
27450
+ Yu as ap,
27440
27451
  xl as aq,
27441
27452
  Bl as ar,
27442
27453
  Ke as as,
27443
27454
  ia as at,
27444
27455
  Kt as au,
27445
- fd as av,
27456
+ md as av,
27446
27457
  Vn as aw,
27447
27458
  Cn as ax,
27448
- Dm as ay,
27449
- Im as az,
27459
+ Fm as ay,
27460
+ Lm as az,
27450
27461
  Ec as b,
27451
27462
  St as b$,
27452
- lm as b0,
27453
- _m as b1,
27454
- Tm as b2,
27455
- xm as b3,
27456
- dm as b4,
27457
- pm as b5,
27458
- hm as b6,
27459
- mm as b7,
27460
- um as b8,
27461
- fm as b9,
27462
- ou as bA,
27463
- uu as bB,
27464
- Rd as bC,
27465
- Md as bD,
27466
- bf as bE,
27463
+ um as b0,
27464
+ Cm as b1,
27465
+ Nm as b2,
27466
+ Rm as b3,
27467
+ pm as b4,
27468
+ bm as b5,
27469
+ ym as b6,
27470
+ gm as b7,
27471
+ mm as b8,
27472
+ hm as b9,
27473
+ su as bA,
27474
+ du as bB,
27475
+ Id as bC,
27476
+ Dd as bD,
27477
+ vf as bE,
27467
27478
  Ho as bF,
27468
- Sd as bG,
27469
- rm as bH,
27470
- xd as bI,
27471
- kd as bJ,
27472
- Ed as bK,
27473
- gf as bL,
27474
- pf as bM,
27479
+ kd as bG,
27480
+ om as bH,
27481
+ Rd as bI,
27482
+ qd as bJ,
27483
+ Md as bK,
27484
+ bf as bL,
27485
+ yf as bM,
27475
27486
  hr as bN,
27476
27487
  Rc as bO,
27477
27488
  kc as bP,
27478
- md as bQ,
27479
- dd as bR,
27480
- Zc as bS,
27481
- yd as bT,
27482
- vm as bU,
27483
- jd as bV,
27484
- Yd as bW,
27485
- Gd as bX,
27486
- Ld as bY,
27487
- $m as bZ,
27488
- em as b_,
27489
- ym as ba,
27490
- Nd as bb,
27491
- im as bc,
27492
- Rm as bd,
27493
- yu as be,
27494
- $d as bf,
27495
- wu as bg,
27496
- sm as bh,
27497
- _d as bi,
27498
- vu as bj,
27499
- Qf as bk,
27500
- Kd as bl,
27501
- Cd as bm,
27502
- qm as bn,
27503
- cm as bo,
27504
- Ad as bp,
27505
- om as bq,
27489
+ pd as bQ,
27490
+ hd as bR,
27491
+ Qc as bS,
27492
+ vd as bT,
27493
+ $m as bU,
27494
+ Kd as bV,
27495
+ Zd as bW,
27496
+ Xd as bX,
27497
+ Pd as bY,
27498
+ Am as bZ,
27499
+ rm as b_,
27500
+ vm as ba,
27501
+ xd as bb,
27502
+ sm as bc,
27503
+ Im as bd,
27504
+ wu as be,
27505
+ Ad as bf,
27506
+ _u as bg,
27507
+ fm as bh,
27508
+ Cd as bi,
27509
+ Tu as bj,
27510
+ ed as bk,
27511
+ em as bl,
27512
+ Sd as bm,
27513
+ Om as bn,
27514
+ dm as bo,
27515
+ Ed as bp,
27516
+ cm as bq,
27506
27517
  $r as br,
27507
27518
  Ea as bs,
27508
- wd as bt,
27509
- Zd as bu,
27510
- Wd as bv,
27511
- Vd as bw,
27512
- Dd as bx,
27519
+ Td as bt,
27520
+ Jd as bu,
27521
+ Yd as bv,
27522
+ jd as bw,
27523
+ Fd as bx,
27513
27524
  Xn as by,
27514
27525
  Ml as bz,
27515
27526
  Xl as c,
27516
- Cm as c0,
27527
+ Sm as c0,
27517
27528
  Gn as c1,
27518
- xf as c2,
27519
- wm as c3,
27520
- bm as c4,
27529
+ kf as c2,
27530
+ Tm as c3,
27531
+ _m as c4,
27521
27532
  la as c5,
27522
27533
  il as c6,
27523
27534
  Fs as c7,
27524
27535
  Us as c8,
27525
- Gu as c9,
27526
- bd as cA,
27527
- tm as cB,
27528
- nm as cC,
27529
- wf as cD,
27530
- Id as cE,
27531
- Kf as cF,
27532
- Od as cG,
27533
- Qd as cH,
27536
+ ju as c9,
27537
+ _d as cA,
27538
+ am as cB,
27539
+ im as cC,
27540
+ _f as cD,
27541
+ Ld as cE,
27542
+ Jf as cF,
27543
+ Bd as cG,
27544
+ tm as cH,
27534
27545
  Hs as cI,
27535
- Em as cJ,
27536
- Jd as cK,
27537
- Bd as cL,
27538
- Sm as cM,
27539
- hd as cN,
27540
- pd as cO,
27541
- hl as cP,
27542
- Xf as cQ,
27543
- Lf as cR,
27544
- zf as cS,
27545
- Vl as cT,
27546
- Wf as cU,
27547
- br as cV,
27548
- fa as cW,
27549
- Hf as cX,
27550
- Uf as cY,
27551
- zl as cZ,
27546
+ Mm as cJ,
27547
+ nm as cK,
27548
+ Ud as cL,
27549
+ km as cM,
27550
+ gd as cN,
27551
+ yd as cO,
27552
+ bd as cP,
27553
+ hl as cQ,
27554
+ Kf as cR,
27555
+ Bf as cS,
27556
+ Vf as cT,
27557
+ Vl as cU,
27558
+ Gf as cV,
27559
+ br as cW,
27560
+ fa as cX,
27561
+ zf as cY,
27562
+ Wf as cZ,
27563
+ zl as c_,
27552
27564
  Dl as ca,
27553
27565
  Mt as cb,
27554
- Td as cc,
27555
- cd,
27566
+ Nd as cc,
27567
+ fd as cd,
27556
27568
  ql as ce,
27557
- ad as cf,
27558
- nd as cg,
27569
+ od as cf,
27570
+ ad as cg,
27559
27571
  ca as ch,
27560
- cu as ci,
27561
- Nm as cj,
27562
- Af as ck,
27572
+ fu as ci,
27573
+ xm as cj,
27574
+ xf as ck,
27563
27575
  $c as cl,
27564
27576
  aa as cm,
27565
- km as cn,
27577
+ qm as cn,
27566
27578
  Tc as co,
27567
27579
  ba as cp,
27568
- Ud as cq,
27580
+ Vd as cq,
27569
27581
  An as cr,
27570
- Zf as cs,
27582
+ Qf as cs,
27571
27583
  Ls as ct,
27572
27584
  bt as cu,
27573
- qd as cv,
27585
+ Od as cv,
27574
27586
  jn as cw,
27575
27587
  dl as cx,
27576
- xu as cy,
27588
+ ku as cy,
27577
27589
  Wo as cz,
27578
27590
  Tn as d,
27579
- Vm as e,
27580
- Bf as f,
27591
+ jm as e,
27592
+ Hf as f,
27581
27593
  Qo as g,
27582
27594
  Ie as h,
27583
- tu as i,
27584
- qf as j,
27585
- Mm as k,
27595
+ ru as i,
27596
+ Df as j,
27597
+ Dm as k,
27586
27598
  qt as l,
27587
27599
  vr as m,
27588
27600
  Vs as n,
@@ -27595,7 +27607,7 @@ export {
27595
27607
  Jt as u,
27596
27608
  _t as v,
27597
27609
  Gt as w,
27598
- id as x,
27599
- td as y,
27600
- sd as z
27610
+ ld as x,
27611
+ rd as y,
27612
+ ud as z
27601
27613
  };