@fileverse-dev/dsheet 3.0.1-yjs-11 → 3.0.1-yjs-13

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 Wu = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
9
9
  function bs(e) {
10
10
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
11
11
  }
12
- function pp(e) {
12
+ function gp(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 hr = {}, Ra = {
35
35
  hi: () => import("./hi-Ca55EZ4A.js"),
36
36
  "zh-TW": () => import("./zh_tw-CINWHD2H.js")
37
37
  };
38
- async function gp(e) {
38
+ async function yp(e) {
39
39
  const t = e in Ra ? e : e.split("-")[0], n = t in Ra ? t : "en";
40
40
  if (hr[n]) return;
41
41
  const r = await Ra[n]();
@@ -119,7 +119,7 @@ function Ju(e) {
119
119
  function Bn(e) {
120
120
  return e == null ? !1 : typeof e != "object" ? !0 : ha(e);
121
121
  }
122
- function yp(e, t) {
122
+ function bp(e, t) {
123
123
  if (e === t) return !0;
124
124
  if (e == null || t == null) return !1;
125
125
  const n = e, r = t;
@@ -235,7 +235,7 @@ function ac(e) {
235
235
  }
236
236
  return n.push([r, a]), n;
237
237
  }
238
- function bp(e, t, n) {
238
+ function wp(e, t, n) {
239
239
  if (!(e != null && e.length)) return [];
240
240
  const r = [];
241
241
  return e.forEach((a) => {
@@ -249,7 +249,7 @@ function bp(e, t, n) {
249
249
  });
250
250
  }), Jn(r);
251
251
  }
252
- function wp(e, t, n) {
252
+ function vp(e, t, n) {
253
253
  if (!(e != null && e.length)) return [];
254
254
  const r = { ...t }, a = n.row[0] - t.row[0], l = n.column[0] - t.column[0], o = [];
255
255
  e.forEach((s) => {
@@ -418,7 +418,7 @@ function Ao(e, t) {
418
418
  }
419
419
  }
420
420
  }
421
- function vp(e) {
421
+ function _p(e) {
422
422
  var s;
423
423
  if (Array.isArray(e.data) && e.data.length > 0)
424
424
  return e.data;
@@ -462,7 +462,7 @@ function fc(e, t) {
462
462
  return !0;
463
463
  return !1;
464
464
  }
465
- function _p(e) {
465
+ function Tp(e) {
466
466
  return e.luckysheetfile;
467
467
  }
468
468
  function Ss(e, t, n) {
@@ -489,7 +489,7 @@ function Eo(e, t = {}) {
489
489
  const r = e.luckysheetfile[n];
490
490
  return r ? (a = r.data) != null && a.length ? r.data : Ss(e, n, r) : null;
491
491
  }
492
- function Tp(e, t) {
492
+ function $p(e, t) {
493
493
  const n = Ee(e, t);
494
494
  e.luckysheetfile[n].hide = 1, e.luckysheetfile[n].status = 0;
495
495
  const r = e.luckysheetfile.filter(
@@ -497,7 +497,7 @@ function Tp(e, t) {
497
497
  );
498
498
  e.currentSheetId = r[0].id;
499
499
  }
500
- function $p(e, t) {
500
+ function Cp(e, t) {
501
501
  const n = Ee(e, t);
502
502
  e.luckysheetfile[n].hide = void 0;
503
503
  }
@@ -525,10 +525,10 @@ function dc(e, t) {
525
525
  } while (s.indexOf(c) !== -1);
526
526
  return c;
527
527
  }
528
- function Cp(e, t) {
528
+ function Np(e, t) {
529
529
  var c, f, m, d, p;
530
530
  const n = Ee(e, t), r = e.luckysheetfile[n].order + 1, a = dc(e, t), l = h.cloneDeep(e.luckysheetfile[n]);
531
- delete l.id, delete l.status, l.celldata = To(l.data), delete l.data, ep(
531
+ delete l.id, delete l.status, l.celldata = To(l.data), delete l.data, tp(
532
532
  e,
533
533
  void 0,
534
534
  ws(),
@@ -548,7 +548,7 @@ function Cp(e, t) {
548
548
  (g) => g && typeof g == "object" && "id" in g ? { ...g, id: u } : g
549
549
  ));
550
550
  const s = {};
551
- if (s[u] = r, tp(e, s), wo(e, u), (d = e == null ? void 0 : e.hooks) != null && d.updateAllCell)
551
+ if (s[u] = r, np(e, s), wo(e, u), (d = e == null ? void 0 : e.hooks) != null && d.updateAllCell)
552
552
  e.hooks.updateAllCell(u, "duplicateSheet");
553
553
  else if ((p = e == null ? void 0 : e.hooks) != null && p.updateCellYdoc) {
554
554
  const g = [], y = i.celldata || To(i.data);
@@ -565,7 +565,7 @@ function Cp(e, t) {
565
565
  }), g.length > 0 && e.hooks.updateCellYdoc(g);
566
566
  }
567
567
  }
568
- function Np(e, t) {
568
+ function Sp(e, t) {
569
569
  var r, a, l;
570
570
  const n = Ee(e, t);
571
571
  if (e.luckysheetfile[n].data)
@@ -573,7 +573,7 @@ function Np(e, t) {
573
573
  for (let i = 0; i < e.luckysheetfile[n].data[o].length; i += 1) {
574
574
  if (!((r = e.luckysheetfile[n].data[o][i]) != null && r.f) || (a = e.luckysheetfile[n].data[o][i]) != null && a.isDataBlockFormula)
575
575
  continue;
576
- const u = Lt(
576
+ const u = Ft(
577
577
  e,
578
578
  (l = e.luckysheetfile[n].data[o][i]) == null ? void 0 : l.f,
579
579
  o,
@@ -588,7 +588,7 @@ function Np(e, t) {
588
588
  On(e, o, i, t);
589
589
  }
590
590
  }
591
- function Sp(e, t, n) {
591
+ function kp(e, t, n) {
592
592
  var a, l, o, i, u;
593
593
  const r = Ee(e, t);
594
594
  if (e.luckysheetfile[r].data)
@@ -603,7 +603,7 @@ function Sp(e, t, n) {
603
603
  );
604
604
  })), !f || !((o = e.luckysheetfile[r].data[s][c]) != null && o.f) || (i = e.luckysheetfile[r].data[s][c]) != null && i.isDataBlockFormula)
605
605
  continue;
606
- const m = Lt(
606
+ const m = Ft(
607
607
  e,
608
608
  (u = e.luckysheetfile[r].data[s][c]) == null ? void 0 : u.f,
609
609
  s,
@@ -14478,7 +14478,7 @@ let Do = "uk";
14478
14478
  function ef(e) {
14479
14479
  return e === "us" ? "us" : "uk";
14480
14480
  }
14481
- function kp(e) {
14481
+ function Ap(e) {
14482
14482
  Do = ef(e);
14483
14483
  }
14484
14484
  function tf() {
@@ -14512,7 +14512,7 @@ function af(e) {
14512
14512
  function of(e, t) {
14513
14513
  return af(e) ? e : Is(t);
14514
14514
  }
14515
- const Nr = "light", Ap = "#EFC703", io = {
14515
+ const Nr = "light", Ep = "#EFC703", io = {
14516
14516
  light: {
14517
14517
  cellBg: "#FFFFFF",
14518
14518
  gridLine: "#e8ebec",
@@ -14565,11 +14565,11 @@ const Nr = "light", Ap = "#EFC703", io = {
14565
14565
  }
14566
14566
  }, lf = (e) => io[e ?? Nr] ?? io[Nr];
14567
14567
  let sr = io[Nr], Pi = Nr;
14568
- const Ep = (e) => {
14568
+ const Mp = (e) => {
14569
14569
  const t = e ?? Nr;
14570
14570
  return t === Pi ? !1 : (Pi = t, sr = lf(t), !0);
14571
14571
  };
14572
- function Mp(e) {
14572
+ function Rp(e) {
14573
14573
  if (document.createRange)
14574
14574
  if (e.innerHTML !== e.innerText || e.innerHTML === "") {
14575
14575
  e.focus();
@@ -14661,7 +14661,7 @@ function Oa(e, t, n) {
14661
14661
  c.setStart(l, o), c.setEnd(i, u), r.removeAllRanges(), r.addRange(c);
14662
14662
  }
14663
14663
  }
14664
- function Rp(e, t, n) {
14664
+ function xp(e, t, n) {
14665
14665
  if (t >= n) return [];
14666
14666
  let r = 0, a = null, l = 0, o = null, i = 0;
14667
14667
  function u(f) {
@@ -14724,7 +14724,7 @@ function $n(e) {
14724
14724
  var t;
14725
14725
  return (e == null ? void 0 : e.t) === "inlineStr" && (((t = e == null ? void 0 : e.s) == null ? void 0 : t.length) ?? 0) > 0;
14726
14726
  }
14727
- function xp(e, t, n) {
14727
+ function Ip(e, t, n) {
14728
14728
  const r = at(e, t, n, "ct");
14729
14729
  if ($n(r)) {
14730
14730
  const a = r.s;
@@ -15267,7 +15267,7 @@ function Ps(e) {
15267
15267
  if (!(!r || !a) && !(r.linkType !== a.linkType || r.linkAddress !== a.linkAddress))
15268
15268
  return r;
15269
15269
  }
15270
- function Ip(e) {
15270
+ function qp(e) {
15271
15271
  const t = window.getSelection();
15272
15272
  if (!(t != null && t.rangeCount) || !t.anchorNode || !e.contains(t.anchorNode))
15273
15273
  return;
@@ -16634,7 +16634,7 @@ function un(e, t, n, r, a, l) {
16634
16634
  return !0;
16635
16635
  }), o;
16636
16636
  }
16637
- var Ot = {};
16637
+ var Dt = {};
16638
16638
  const xf = function(t) {
16639
16639
  t.version = "0.11.2";
16640
16640
  function n(q) {
@@ -17738,7 +17738,7 @@ const xf = function(t) {
17738
17738
  A[P] !== void 0 && we(A[P], P);
17739
17739
  }, t.init_table = p, t.format = ge;
17740
17740
  };
17741
- xf(Ot);
17741
+ xf(Dt);
17742
17742
  const If = new Date(1900, 2, 1, 0, 0, 0), qf = 999999999999997, Fo = 1e15;
17743
17743
  function Lo(e) {
17744
17744
  return Number.isFinite(e) && e > qf && e < Fo;
@@ -17855,9 +17855,9 @@ function Qe(e) {
17855
17855
  c ? (n = {
17856
17856
  fa: `#,##0.${new Array(s + 1).join("0")}%`,
17857
17857
  t: "n"
17858
- }, r = rn(e).value(), t = Ot.format(n.fa, r)) : (t = e.toString(), n = { fa: "@", t: "s" });
17858
+ }, r = rn(e).value(), t = Dt.format(n.fa, r)) : (t = e.toString(), n = { fa: "@", t: "s" });
17859
17859
  } else
17860
- n = { fa: `0.${new Array(s + 1).join("0")}%`, t: "n" }, r = rn(e).value(), t = Ot.format(n.fa, r);
17860
+ n = { fa: `0.${new Array(s + 1).join("0")}%`, t: "n" }, r = rn(e).value(), t = Dt.format(n.fa, r);
17861
17861
  } else
17862
17862
  t = e.toString(), n = { fa: "@", t: "s" };
17863
17863
  else if (l.indexOf(",") > -1) {
@@ -17868,9 +17868,9 @@ function Qe(e) {
17868
17868
  i = !1;
17869
17869
  break;
17870
17870
  }
17871
- i ? (n = { fa: "#,##0%", t: "n" }, r = rn(e).value(), t = Ot.format(n.fa, r)) : (t = e.toString(), n = { fa: "@", t: "s" });
17871
+ i ? (n = { fa: "#,##0%", t: "n" }, r = rn(e).value(), t = Dt.format(n.fa, r)) : (t = e.toString(), n = { fa: "@", t: "s" });
17872
17872
  } else
17873
- n = { fa: "0%", t: "n" }, r = rn(e).value(), t = Ot.format(n.fa, r);
17873
+ n = { fa: "0%", t: "n" }, r = rn(e).value(), t = Dt.format(n.fa, r);
17874
17874
  else
17875
17875
  t = e.toString(), n = { fa: "@", t: "s" };
17876
17876
  } else if (e.toString().indexOf(".") > -1)
@@ -17885,9 +17885,9 @@ function Qe(e) {
17885
17885
  i = !1;
17886
17886
  break;
17887
17887
  }
17888
- i ? (n = { fa: `#,##0.${new Array(o + 1).join("0")}`, t: "n" }, r = rn(e).value(), t = Ot.format(n.fa, r)) : (t = e.toString(), n = { fa: "@", t: "s" });
17888
+ i ? (n = { fa: `#,##0.${new Array(o + 1).join("0")}`, t: "n" }, r = rn(e).value(), t = Dt.format(n.fa, r)) : (t = e.toString(), n = { fa: "@", t: "s" });
17889
17889
  } else
17890
- Ge(a) && Ge(l) ? (n = { fa: `0.${new Array(o + 1).join("0")}`, t: "n" }, r = rn(e).value(), t = Ot.format(n.fa, r)) : (t = e.toString(), n = { fa: "@", t: "s" });
17890
+ Ge(a) && Ge(l) ? (n = { fa: `0.${new Array(o + 1).join("0")}`, t: "n" }, r = rn(e).value(), t = Dt.format(n.fa, r)) : (t = e.toString(), n = { fa: "@", t: "s" });
17891
17891
  } else
17892
17892
  t = e.toString(), n = { fa: "@", t: "s" };
17893
17893
  else if (Ge(e)) {
@@ -17979,7 +17979,7 @@ function Qe(e) {
17979
17979
  "dy dd/MM/yyyy": "ddd dd/mm/yyyy",
17980
17980
  "dy MM/dd/yyyy": "ddd mm/dd/yyyy"
17981
17981
  };
17982
- n.fa = o[a.formatType] || (tf() === "us" ? "MM/dd/yyyy" : "dd/MM/yyyy"), t = Ot.format(n.fa, r);
17982
+ n.fa = o[a.formatType] || (tf() === "us" ? "MM/dd/yyyy" : "dd/MM/yyyy"), t = Dt.format(n.fa, r);
17983
17983
  } else
17984
17984
  t = String(e), n.fa = "General", n.t = "g";
17985
17985
  } else
@@ -18036,10 +18036,10 @@ function Hf(e, t) {
18036
18036
  if (!Number.isFinite(d)) continue;
18037
18037
  if (u === "crypto") {
18038
18038
  const b = `0 "${i}"`, w = { fa: b, t: "n" };
18039
- return [Ot.format(b, d), w, d];
18039
+ return [Dt.format(b, d), w, d];
18040
18040
  }
18041
18041
  const p = Xs(i, 0, { spaced: !1 }), g = { fa: p, t: "n" };
18042
- return [Ot.format(p, d), g, d];
18042
+ return [Dt.format(p, d), g, d];
18043
18043
  }
18044
18044
  return null;
18045
18045
  }
@@ -18055,7 +18055,7 @@ function Xs(e, t = 2, n) {
18055
18055
  return `${js(e)}${l}${a}`;
18056
18056
  }
18057
18057
  function ut(e, t) {
18058
- return Ot.format(e, t);
18058
+ return Dt.format(e, t);
18059
18059
  }
18060
18060
  const Zs = 15;
18061
18061
  function br(e) {
@@ -18091,7 +18091,7 @@ function br(e) {
18091
18091
  l && (e.m = l[0].toString());
18092
18092
  }
18093
18093
  function ya(e, t) {
18094
- return Ot.is_date(e, t);
18094
+ return Dt.is_date(e, t);
18095
18095
  }
18096
18096
  function Uf(e) {
18097
18097
  let t = Number(e);
@@ -18101,7 +18101,7 @@ function Uf(e) {
18101
18101
  let n = 1, r = e.replace(/([\d]),([\d])/g, "$1$2").replace(/[$]/g, "").replace(/[%]/g, () => (n *= 100, ""));
18102
18102
  return t = Number(r), !Number.isNaN(t) || (r = r.replace(/[(](.*)[)]/, (a, l) => (n = -n, l)), t = Number(r), !Number.isNaN(t)) ? t / n : t;
18103
18103
  }
18104
- function qp(e, t, n) {
18104
+ function Dp(e, t, n) {
18105
18105
  var a, l, o, i, u, s;
18106
18106
  let r = at(e, t, n, "m");
18107
18107
  return r == null ? r = at(e, t, n, "v") : Number.isNaN(Uf(r)) ? ((o = (l = (a = n[e]) == null ? void 0 : a[t]) == null ? void 0 : l.ct) == null ? void 0 : o.t) === "d" || ((s = (u = (i = n[e]) == null ? void 0 : i[t]) == null ? void 0 : u.ct) == null ? void 0 : s.t) === "b" || (r = at(e, t, n, "v")) : h.isString(r) && r.indexOf("%") > -1 || (r = at(e, t, n, "v")), r;
@@ -18158,8 +18158,8 @@ function zn(e, t) {
18158
18158
  let n = h.sortedIndex(t, e);
18159
18159
  return n >= t.length && e > 0 ? n = t.length - 1 : n === -1 && e <= 0 && (n = 0), mo(n, t);
18160
18160
  }
18161
- const zf = 15, Yf = 50, Dp = 100, Op = 300, Fp = 3e4, Vf = "fortune-formula-execution-debug";
18162
- function Lp() {
18161
+ const zf = 15, Yf = 50, Op = 100, Fp = 300, Lp = 3e4, Vf = "fortune-formula-execution-debug";
18162
+ function Bp() {
18163
18163
  if (typeof window > "u") return !1;
18164
18164
  try {
18165
18165
  return localStorage.getItem(Vf) === "true";
@@ -18171,7 +18171,7 @@ function ho(e) {
18171
18171
  return !!(e.isFormulaCalculating && e.formulaAsyncEval);
18172
18172
  }
18173
18173
  const Wf = /\b(SEQUENCE|FILTER|SORT|SORTBY|UNIQUE|TRANSPOSE|ARRAYFORMULA|INDIRECT|OFFSET|INDEX|SPARKLINE)\s*\(/i;
18174
- function Bp(e) {
18174
+ function Pp(e) {
18175
18175
  return Wf.test(e);
18176
18176
  }
18177
18177
  function Gf(e, t, n, r, a) {
@@ -18509,7 +18509,7 @@ class fd {
18509
18509
  function eu(e) {
18510
18510
  return new DOMParser().parseFromString(e, "text/html").body.childNodes[0];
18511
18511
  }
18512
- function Dt(e) {
18512
+ function qt(e) {
18513
18513
  const t = e.split("!");
18514
18514
  let n;
18515
18515
  t.length > 1 ? [, n] = t : [n] = t;
@@ -18519,12 +18519,12 @@ function Dt(e) {
18519
18519
  const a = /^(([a-zA-Z]+)|([$][a-zA-Z]+))(([0-9]+)|([$][0-9]+))$/g;
18520
18520
  let l = /^(((([a-zA-Z]+)|([$][a-zA-Z]+))(([0-9]+)|([$][0-9]+)))|((([a-zA-Z]+)|([$][a-zA-Z]+))))$/g;
18521
18521
  if (n.indexOf(":") === -1) {
18522
- const s = parseInt(n.replace(/[^0-9]/g, ""), 10) - 1, c = qt(n.replace(/[^A-Za-z]/g, ""));
18522
+ const s = parseInt(n.replace(/[^0-9]/g, ""), 10) - 1, c = It(n.replace(/[^A-Za-z]/g, ""));
18523
18523
  return !Number.isNaN(s) && !Number.isNaN(c) && n.toString().match(a) ? !0 : (!Number.isNaN(s) || !Number.isNaN(c), !1);
18524
18524
  }
18525
18525
  l = /^((\$?[A-Za-z]+\$?\d+)|(\$?[A-Za-z]+)|(\$?\d+))$/g;
18526
18526
  const o = n.split(":"), i = [], u = [];
18527
- return i[0] = parseInt(o[0].replace(/[^0-9]/g, ""), 10) - 1, i[1] = parseInt(o[1].replace(/[^0-9]/g, ""), 10) - 1, i[0] > i[1] || (u[0] = qt(o[0].replace(/[^A-Za-z]/g, "")), u[1] = qt(o[1].replace(/[^A-Za-z]/g, "")), u[0] > u[1]) ? !1 : !!(o[0].toString().match(l) && o[1].toString().match(l));
18527
+ return i[0] = parseInt(o[0].replace(/[^0-9]/g, ""), 10) - 1, i[1] = parseInt(o[1].replace(/[^0-9]/g, ""), 10) - 1, i[0] > i[1] || (u[0] = It(o[0].replace(/[^A-Za-z]/g, "")), u[1] = It(o[1].replace(/[^A-Za-z]/g, "")), u[0] > u[1]) ? !1 : !!(o[0].toString().match(l) && o[1].toString().match(l));
18528
18528
  }
18529
18529
  function ji(e, t, n) {
18530
18530
  h.isNil(t) || t.length === 0 || h.isNil(n) || (h.isNil(e.formulaCache.cellTextToIndexList) && (e.formulaCache.cellTextToIndexList = {}), t.indexOf("!") > -1 ? (t = t.replace(/\\'/g, "'").replace(/''/g, "'"), e.formulaCache.cellTextToIndexList[t] = n) : e.formulaCache.cellTextToIndexList[`${t}_${n.sheetId}`] = n);
@@ -18557,7 +18557,7 @@ function Hn(e, t, n) {
18557
18557
  if (h.isNil(i))
18558
18558
  return null;
18559
18559
  if (l.indexOf(":") === -1) {
18560
- const d = parseInt(l.replace(/[^0-9]/g, ""), 10) - 1, p = qt(l.replace(/[^A-Za-z]/g, ""));
18560
+ const d = parseInt(l.replace(/[^0-9]/g, ""), 10) - 1, p = It(l.replace(/[^A-Za-z]/g, ""));
18561
18561
  if (!Number.isNaN(d) && !Number.isNaN(p)) {
18562
18562
  const g = {
18563
18563
  row: [d, d],
@@ -18569,7 +18569,7 @@ function Hn(e, t, n) {
18569
18569
  return null;
18570
18570
  }
18571
18571
  const s = l.split(":"), c = [], f = [];
18572
- if (c[0] = parseInt(s[0].replace(/[^0-9]/g, ""), 10) - 1, c[1] = parseInt(s[1].replace(/[^0-9]/g, ""), 10) - 1, Number.isNaN(c[0]) && (c[0] = 0), Number.isNaN(c[1]) && (c[1] = i.length - 1), c[0] > c[1] || (f[0] = qt(s[0].replace(/[^A-Za-z]/g, "")), f[1] = qt(s[1].replace(/[^A-Za-z]/g, "")), Number.isNaN(f[0]) && (f[0] = 0), Number.isNaN(f[1]) && (f[1] = i[0].length - 1), f[0] > f[1]))
18572
+ if (c[0] = parseInt(s[0].replace(/[^0-9]/g, ""), 10) - 1, c[1] = parseInt(s[1].replace(/[^0-9]/g, ""), 10) - 1, Number.isNaN(c[0]) && (c[0] = 0), Number.isNaN(c[1]) && (c[1] = i.length - 1), c[0] > c[1] || (f[0] = It(s[0].replace(/[^A-Za-z]/g, "")), f[1] = It(s[1].replace(/[^A-Za-z]/g, "")), Number.isNaN(f[0]) && (f[0] = 0), Number.isNaN(f[1]) && (f[1] = i[0].length - 1), f[0] > f[1]))
18573
18573
  return null;
18574
18574
  const m = {
18575
18575
  row: c,
@@ -18602,7 +18602,7 @@ function md(e, t, n, r, a, l, o) {
18602
18602
  try {
18603
18603
  e.calculateSheetId = a;
18604
18604
  const i = t.split(",")[t.split(",").length - 1].split("'")[1].split("'")[0], u = h.trim(i);
18605
- Dt(u) && typeof o == "function" && o(u);
18605
+ qt(u) && typeof o == "function" && o(u);
18606
18606
  } catch {
18607
18607
  }
18608
18608
  }
@@ -18715,10 +18715,10 @@ function cr(e, t, n, r, a, l, o) {
18715
18715
  f.dquote === 0 && f.squote === 0 ? s += h.trim(y) : s += y;
18716
18716
  if (u === i.length - 1) {
18717
18717
  let b = "", w = h.trim(s).replace(/'/g, "\\'");
18718
- if (Dt(w) && w.substring(0, 1) !== ":")
18718
+ if (qt(w) && w.substring(0, 1) !== ":")
18719
18719
  b = `luckysheet_getcelldata('${w}')`;
18720
18720
  else if (w.substring(0, 1) === ":")
18721
- w = w.substring(1), Dt(w) && (b = `luckysheet_getSpecialReference(false,${c},'${w}')`);
18721
+ w = w.substring(1), qt(w) && (b = `luckysheet_getSpecialReference(false,${c},'${w}')`);
18722
18722
  else {
18723
18723
  s = h.trim(s);
18724
18724
  const v = /{.*?}/;
@@ -18763,7 +18763,7 @@ function hd(e) {
18763
18763
  }
18764
18764
  return n;
18765
18765
  }
18766
- function Ft(e, t, n, r) {
18766
+ function Ot(e, t, n, r) {
18767
18767
  var s, c;
18768
18768
  h.isNil(r) && (r = e.currentSheetId);
18769
18769
  const a = `${r}:${t}:${n}`;
@@ -18844,7 +18844,7 @@ function gd(e) {
18844
18844
  const t = e.indexOf("(");
18845
18845
  return t === -1 ? e : `=${e.substring(1, t).replace(/\./g, "_")}${e.substring(t)}`;
18846
18846
  }
18847
- function Lt(e, t, n, r, a, l, o, i) {
18847
+ function Ft(e, t, n, r, a, l, o, i) {
18848
18848
  var $, S;
18849
18849
  const u = t;
18850
18850
  if (h.isNil(a) && (a = e.currentSheetId), (t != null && t.toUpperCase().includes("NETWORKDAYS.INTL") || t != null && t.toUpperCase().includes("WORKDAY.INTL")) && (t = gd(t)), t.indexOf(Zn.r) > -1)
@@ -18959,7 +18959,7 @@ function bd(e) {
18959
18959
  if (h.isNil(c) && (c = Eo(e, { id: i.id }) ?? void 0), h.isNil(c))
18960
18960
  continue;
18961
18961
  const f = {};
18962
- h.isNil(i.spe) || (i.spe.type === "sparklines" ? f.spl = i.spe.data : i.spe.type === "dynamicArrayItem" && (s.dynamicArray = yd(e, i.spe.data))), f.v = i.v, f.f = i.f, It(e, i.r, i.c, c, f);
18962
+ h.isNil(i.spe) || (i.spe.type === "sparklines" ? f.spl = i.spe.data : i.spe.type === "dynamicArrayItem" && (s.dynamicArray = yd(e, i.spe.data))), f.v = i.v, f.f = i.f, Lt(e, i.r, i.c, c, f);
18963
18963
  const m = ((n = c == null ? void 0 : c[i.r]) == null ? void 0 : n[i.c]) ?? null, d = `${i.r}_${i.c}`;
18964
18964
  Bn(m) ? a.set(`${i.id}:${d}`, {
18965
18965
  sheetId: i.id,
@@ -19007,7 +19007,7 @@ function Ho(e, t, n, r, a, l) {
19007
19007
  );
19008
19008
  return;
19009
19009
  }
19010
- const u = Lt(
19010
+ const u = Ft(
19011
19011
  e,
19012
19012
  o,
19013
19013
  t.r,
@@ -19069,7 +19069,7 @@ function wd(e, t, n) {
19069
19069
  o.add(t), e.formulaCache.revDepsByCell.set(l, o);
19070
19070
  });
19071
19071
  }
19072
- function Pp(e, t, n, r, a = [], l) {
19072
+ function Hp(e, t, n, r, a = [], l) {
19073
19073
  wa(e);
19074
19074
  const o = new Set(a);
19075
19075
  for (const i of t.results) {
@@ -19124,7 +19124,7 @@ function Pp(e, t, n, r, a = [], l) {
19124
19124
  });
19125
19125
  }
19126
19126
  }
19127
- function Hp(e, t, n = Yf) {
19127
+ function Up(e, t, n = Yf) {
19128
19128
  wa(e);
19129
19129
  const r = new Set(t.calcChainKeys), a = new Set(t.impactedByCircular), l = new Set(t.cycleNodes), o = Se(e), i = Math.min(t.nextIndex + n, t.formulaRunList.length);
19130
19130
  for (let s = t.nextIndex; s < i; s += 1) {
@@ -19147,7 +19147,7 @@ function ln(e, t, n, r, a, l, o = !1) {
19147
19147
  const i = `${a}:${t}:${n}`, u = Js(i, e.formulaCache.depsByCell), s = u.size ? ud(u, e.formulaCache.revDepsByCell) : /* @__PURE__ */ new Set();
19148
19148
  if (!h.isNil(r)) {
19149
19149
  const $ = [[{ v: void 0 }]];
19150
- It(e, 0, 0, $, r), [
19150
+ Lt(e, 0, 0, $, r), [
19151
19151
  [
19152
19152
  e.formulaCache.execFunctionGlobalData[`${t}_${n}_${a}`]
19153
19153
  ]
@@ -19244,7 +19244,7 @@ function ln(e, t, n, r, a, l, o = !1) {
19244
19244
  O[ae] !== Y.length - 1 && (Y[O[ae]] += Y[O[ae] + 1], Y.splice(O[ae] + 1, 1));
19245
19245
  for (let ae = 0; ae < Y.length; ae += 1) {
19246
19246
  const G = Y[ae];
19247
- if (G.length <= 1 || G.substring(0, 1) === '"' && G.substring(G.length - 1, 1) === '"' || !Dt(G))
19247
+ if (G.length <= 1 || G.substring(0, 1) === '"' && G.substring(G.length - 1, 1) === '"' || !qt(G))
19248
19248
  continue;
19249
19249
  const Z = Hn(e, h.trim(G), S.id);
19250
19250
  h.isNil(Z) || K.push(Z);
@@ -19404,7 +19404,7 @@ function vd(e, t, n) {
19404
19404
  }
19405
19405
  return null;
19406
19406
  }
19407
- function Up(e) {
19407
+ function zp(e) {
19408
19408
  var r, a;
19409
19409
  if (e.formulaCache.func_selectedrange) return !0;
19410
19410
  const t = e.luckysheet_select_save;
@@ -19662,7 +19662,7 @@ function In(e) {
19662
19662
  return;
19663
19663
  a += s;
19664
19664
  }
19665
- if (Dt(h.trim(i))) {
19665
+ if (qt(h.trim(i))) {
19666
19666
  const d = wr.length > wn ? wr[wn] : wn;
19667
19667
  a += `<span class="fortune-formula-functionrange-cell" rangeindex="${d}" dir="auto" style="color:${ba[d]};">${i}</span>`, wn += 1;
19668
19668
  } else if (u > 0)
@@ -19808,7 +19808,7 @@ function va(e) {
19808
19808
  const o = parseInt(l, 10);
19809
19809
  return Number.isNaN(o) ? null : o;
19810
19810
  }
19811
- function zp(e, t) {
19811
+ function Yp(e, t) {
19812
19812
  e.formulaCache.formulaEditorOwner = t;
19813
19813
  }
19814
19814
  function Uo(e) {
@@ -19846,7 +19846,7 @@ function xd(e) {
19846
19846
  const t = e.trim();
19847
19847
  if (!t.startsWith("=")) return !1;
19848
19848
  const n = t.slice(1).trim();
19849
- return !n || n.includes("(") || n.includes(")") ? !1 : Dt(n);
19849
+ return !n || n.includes("(") || n.includes(")") ? !1 : qt(n);
19850
19850
  }
19851
19851
  function Id(e) {
19852
19852
  e.formulaCache.rangeSelectionActive = !1, e.formulaCache.keyboardRangeSelectionLock = !0, e.formulaCache.rangestart = !1, e.formulaCache.rangedrag_column_start = !1, e.formulaCache.rangedrag_row_start = !1;
@@ -19869,7 +19869,7 @@ function zo(e) {
19869
19869
  e,
19870
19870
  o
19871
19871
  );
19872
- if (Rd(e, o) || i.length > 0 && !Dt(i))
19872
+ if (Rd(e, o) || i.length > 0 && !qt(i))
19873
19873
  return !1;
19874
19874
  const u = an(e.textContent || ""), c = u.slice(o).replace(/^\s+/, "");
19875
19875
  if (c.length === 0) {
@@ -19897,7 +19897,7 @@ function qd(e) {
19897
19897
  function Dd(e) {
19898
19898
  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;
19899
19899
  }
19900
- function Yp(e) {
19900
+ function Vp(e) {
19901
19901
  const t = va(e);
19902
19902
  if (t !== null) return t;
19903
19903
  const n = Ad(e);
@@ -19962,7 +19962,7 @@ function Od(e, t, n, r, a, l = !0) {
19962
19962
  }, y = a ?? g(n);
19963
19963
  let b = g(n);
19964
19964
  if ((r === 8 || r === 46) && (b = b.replace(/\n{2,}$/, `
19965
- `)), b = Gh(b), b.length > 0 && b.substring(0, 1) === "=" && (r !== 229 || b.length === 1)) {
19965
+ `)), b = jh(b), b.length > 0 && b.substring(0, 1) === "=" && (r !== 229 || b.length === 1)) {
19966
19966
  if (l || (wr = nu(n)), b = na(b), !l && wn < wr.length && (l = !0), p = na(y), wr = [], window.getSelection) {
19967
19967
  const w = window.getSelection();
19968
19968
  if (!w) return;
@@ -20023,7 +20023,7 @@ function Fd(e) {
20023
20023
  }
20024
20024
  return Ua(t);
20025
20025
  }
20026
- function Vp(e, t, n) {
20026
+ function Wp(e, t, n) {
20027
20027
  if (!n) return !1;
20028
20028
  const r = window.getSelection();
20029
20029
  if (!r || r.rangeCount === 0 || !r.anchorNode || !n.contains(r.anchorNode)) return !1;
@@ -20057,11 +20057,11 @@ function Ld(e, t, n, r, a, l) {
20057
20057
  o.length > 1 ? ([, i] = o, u = `${o[0]}!`) : [i] = o;
20058
20058
  let s, c, f, m, d, p, g, y;
20059
20059
  if (i.indexOf(":") === -1) {
20060
- s = parseInt(i.replace(/[^0-9]/g, ""), 10) - 1, c = s, f = qt(i.replace(/[^A-Za-z]/g, "")), m = f;
20060
+ s = parseInt(i.replace(/[^0-9]/g, ""), 10) - 1, c = s, f = It(i.replace(/[^A-Za-z]/g, "")), m = f;
20061
20061
  const b = jn(i);
20062
20062
  d = b[0] ? "$" : "", p = d, g = b[1] ? "$" : "", y = g;
20063
20063
  } else {
20064
- if (i = i.split(":"), s = parseInt(i[0].replace(/[^0-9]/g, ""), 10) - 1, c = parseInt(i[1].replace(/[^0-9]/g, ""), 10) - 1, s > c || (f = qt(i[0].replace(/[^A-Za-z]/g, "")), m = qt(i[1].replace(/[^A-Za-z]/g, "")), f > m))
20064
+ if (i = i.split(":"), s = parseInt(i[0].replace(/[^0-9]/g, ""), 10) - 1, c = parseInt(i[1].replace(/[^0-9]/g, ""), 10) - 1, s > c || (f = It(i[0].replace(/[^A-Za-z]/g, "")), m = It(i[1].replace(/[^A-Za-z]/g, "")), f > m))
20065
20065
  return e;
20066
20066
  const b = jn(i[0]);
20067
20067
  d = b[0] ? "$" : "", g = b[1] ? "$" : "";
@@ -20128,7 +20128,7 @@ function Zi(e, t, n) {
20128
20128
  }
20129
20129
  return !1;
20130
20130
  }
20131
- function Wp(e) {
20131
+ function Gp(e) {
20132
20132
  return !!e.formulaCache.rangestart || !!e.formulaCache.rangedrag_column_start || !!e.formulaCache.rangedrag_row_start || e.formulaCache.rangeSelectionActive === !0 || xr(e);
20133
20133
  }
20134
20134
  function xr(e, t) {
@@ -20202,11 +20202,11 @@ function xr(e, t) {
20202
20202
  }
20203
20203
  return !1;
20204
20204
  }
20205
- function Gp(e) {
20205
+ function jp(e) {
20206
20206
  const t = ru(e), n = ((t == null ? void 0 : t.innerText) || "").trim(), r = !!e.formulaCache.rangestart || !!e.formulaCache.rangedrag_column_start || !!e.formulaCache.rangedrag_row_start, a = !!t && zo(t), l = r || e.formulaCache.rangeSelectionActive === !0;
20207
20207
  return n.startsWith("=") ? e.formulaCache.rangeSelectionActive === !0 && t && va(t) !== null ? !0 : /^=\s*[A-Za-z_][A-Za-z0-9_]*$/.test(n) || e.formulaCache.rangeSelectionActive === !1 ? !1 : l ? r ? !0 : a : a ? !0 : xr(e) : !1;
20208
20208
  }
20209
- function jp(e) {
20209
+ function Xp(e) {
20210
20210
  if (e.formulaCache.rangeSelectionActive !== !1)
20211
20211
  return !1;
20212
20212
  const t = ru(e);
@@ -20273,7 +20273,7 @@ function xt(e, t, n, r, a, l) {
20273
20273
  f + m in it ? (u.length > 0 ? (s += xt(u, t, n, r, a, l) + f + m, u = "") : s += f + m, i += 1) : !/[^0-9]/.test(m) && f === "-" && (p === "(" || p == null || p === "," || p === " " || p in it) ? u += f : u.length > 0 ? (s += xt(u, t, n, r, a, l) + f, u = "") : s += f;
20274
20274
  } else
20275
20275
  u += f;
20276
- i === o.length - 1 && (Dt(h.trim(u)) ? s += Ld(
20276
+ i === o.length - 1 && (qt(h.trim(u)) ? s += Ld(
20277
20277
  h.trim(u),
20278
20278
  t,
20279
20279
  n,
@@ -20290,8 +20290,8 @@ function _a(e, t, n, r) {
20290
20290
  `<div>${t.innerHTML}</div>`,
20291
20291
  "text/html"
20292
20292
  ).querySelectorAll("span"), i = o[o.length - 1], u = ((y = i == null ? void 0 : i.classList) == null ? void 0 : y.contains("fortune-formula-functionrange-cell")) ?? !1;
20293
- if (i && jh(i == null ? void 0 : i.innerText) && !u) {
20294
- const T = Xh(t.innerHTML);
20293
+ if (i && Xh(i == null ? void 0 : i.innerText) && !u) {
20294
+ const T = Zh(t.innerHTML);
20295
20295
  t.innerHTML = `${T}`, t.focus();
20296
20296
  const C = t.childNodes;
20297
20297
  e.formulaCache.rangeSetValueTo = C.length > 0 ? C[C.length - 1] : void 0;
@@ -20337,7 +20337,7 @@ function _a(e, t, n, r) {
20337
20337
  }
20338
20338
  c && (c.innerHTML = s.innerHTML);
20339
20339
  }
20340
- function Xp(e) {
20340
+ function Zp(e) {
20341
20341
  if (e.formulaCache.func_selectedrange) {
20342
20342
  const {
20343
20343
  left_move: t,
@@ -20361,7 +20361,7 @@ function Yo(e, t, n, r, a) {
20361
20361
  );
20362
20362
  l != null && (l.style.left = `${t}px`, l.style.top = `${n}px`, l.style.height = `${r}px`, l.style.width = `${a}px`);
20363
20363
  }
20364
- function Zp(e, t, n, r, a, l, o) {
20364
+ function Kp(e, t, n, r, a, l, o) {
20365
20365
  e.formulaCache.rangeSelectionActive = !0;
20366
20366
  const { func_selectedrange: i } = e.formulaCache;
20367
20367
  if (!i || i.left == null || i.height == null || i.top == null || i.width == null)
@@ -20391,7 +20391,7 @@ function Zp(e, t, n, r, a, l, o) {
20391
20391
  o
20392
20392
  ), Yo(l, _, b, w, T), t.preventDefault();
20393
20393
  }
20394
- function Kp(e, t, n, r, a, l, o) {
20394
+ function Qp(e, t, n, r, a, l, o) {
20395
20395
  e.formulaCache.rangeSelectionActive = !0;
20396
20396
  const { func_selectedrange: i } = e.formulaCache;
20397
20397
  if (!i || i.left == null || i.height == null || i.top == null || i.width == null)
@@ -20419,7 +20419,7 @@ function Kp(e, t, n, r, a, l, o) {
20419
20419
  o
20420
20420
  ), Yo(l, b, d, m - d - 1, w);
20421
20421
  }
20422
- function Qp(e, t, n, r, a, l, o) {
20422
+ function Jp(e, t, n, r, a, l, o) {
20423
20423
  e.formulaCache.rangeSelectionActive = !0;
20424
20424
  const { func_selectedrange: i } = e.formulaCache;
20425
20425
  if (!i || i.left == null || i.height == null || i.top == null || i.width == null)
@@ -20451,13 +20451,13 @@ function Ta(e, t, n) {
20451
20451
  const r = t.split("!");
20452
20452
  let a, l = "";
20453
20453
  if (r.length > 1 ? ([, a] = r, l = `${r[0]}!`) : [a] = r, a.indexOf(":") === -1) {
20454
- let p = parseInt(a.replace(/[^0-9]/g, ""), 10), g = qt(a.replace(/[^A-Za-z]/g, ""));
20454
+ let p = parseInt(a.replace(/[^0-9]/g, ""), 10), g = It(a.replace(/[^A-Za-z]/g, ""));
20455
20455
  const y = jn(a), b = y[0] ? "$" : "", w = y[1] ? "$" : "";
20456
20456
  return e === "u" && !y[0] ? p -= n : e === "r" && !y[1] ? g += n : e === "l" && !y[1] ? g -= n : e === "d" && !y[0] && (p += n), !Number.isNaN(p) && !Number.isNaN(g) ? l + w + rt(g) + b + p : Number.isNaN(p) ? Number.isNaN(g) ? t : l + w + rt(g) : l + b + p;
20457
20457
  }
20458
20458
  a = a.split(":");
20459
20459
  const o = [], i = [];
20460
- if (o[0] = parseInt(a[0].replace(/[^0-9]/g, ""), 10), o[1] = parseInt(a[1].replace(/[^0-9]/g, ""), 10), o[0] > o[1] || (i[0] = qt(a[0].replace(/[^A-Za-z]/g, "")), i[1] = qt(a[1].replace(/[^A-Za-z]/g, "")), i[0] > i[1]))
20460
+ if (o[0] = parseInt(a[0].replace(/[^0-9]/g, ""), 10), o[1] = parseInt(a[1].replace(/[^0-9]/g, ""), 10), o[0] > o[1] || (i[0] = It(a[0].replace(/[^A-Za-z]/g, "")), i[1] = It(a[1].replace(/[^A-Za-z]/g, "")), i[0] > i[1]))
20461
20461
  return t;
20462
20462
  const u = jn(a[0]), s = jn(a[1]), c = u[0] ? "$" : "", f = u[1] ? "$" : "", m = s[0] ? "$" : "", d = s[1] ? "$" : "";
20463
20463
  return e === "u" ? (u[0] || (o[0] -= n), s[0] || (o[1] -= n)) : e === "r" ? (u[1] || (i[0] += n), s[1] || (i[1] += n)) : e === "l" ? (u[1] || (i[0] -= n), s[1] || (i[1] -= n)) : e === "d" && (u[0] || (o[0] += n), s[0] || (o[1] += n)), o[0] < 0 || i[0] < 0 ? Zn.r : Number.isNaN(i[0]) && Number.isNaN(i[1]) ? `${l + c + o[0]}:${m}${o[1]}` : Number.isNaN(o[0]) && Number.isNaN(o[1]) ? `${l + f + rt(i[0])}:${d}${rt(i[1])}` : `${l + f + rt(i[0]) + c + o[0]}:${d}${rt(i[1])}${m}${o[1]}`;
@@ -20506,7 +20506,7 @@ function on(e, t, n, r) {
20506
20506
  s + c in it ? (o.length > 0 ? (i += on(e, o, n, r) + s + c, o = "") : i += s + c, l += 1) : !/[^0-9]/.test(c) && s === "-" && (m === "(" || m == null || m === "," || m === " " || m in it) ? o += s : o.length > 0 ? (i += on(e, o, n, r) + s, o = "") : i += s;
20507
20507
  } else
20508
20508
  o += s;
20509
- l === a.length - 1 && (Dt(h.trim(o)) ? n === "down" ? i += Bd(h.trim(o), r) : n === "up" ? i += Pd(h.trim(o), r) : n === "left" ? i += Hd(h.trim(o), r) : n === "right" && (i += Ud(h.trim(o), r)) : i += h.trim(o)), l += 1;
20509
+ l === a.length - 1 && (qt(h.trim(o)) ? n === "down" ? i += Bd(h.trim(o), r) : n === "up" ? i += Pd(h.trim(o), r) : n === "left" ? i += Hd(h.trim(o), r) : n === "right" && (i += Ud(h.trim(o), r)) : i += h.trim(o)), l += 1;
20510
20510
  }
20511
20511
  return i = i.replace(/NaN/g, ""), i;
20512
20512
  }
@@ -20521,7 +20521,7 @@ function Yd(e, t, n, r) {
20521
20521
  (o, i, u, s, c, f, m, d, p, g) => {
20522
20522
  if ((i ? au(i.slice(0, -1)) : t) !== n) return o;
20523
20523
  const b = (_, T) => {
20524
- const C = qt(_), $ = parseInt(T, 10) - 1, S = !Number.isNaN(C) && !h.isNil(l == null ? void 0 : l[C]) ? rt(l[C]) : _, N = !Number.isNaN($) && !h.isNil(a == null ? void 0 : a[$]) ? String(a[$] + 1) : T;
20524
+ const C = It(_), $ = parseInt(T, 10) - 1, S = !Number.isNaN(C) && !h.isNil(l == null ? void 0 : l[C]) ? rt(l[C]) : _, N = !Number.isNaN($) && !h.isNil(a == null ? void 0 : a[$]) ? String(a[$] + 1) : T;
20525
20525
  return { nextCol: S, nextRow: N };
20526
20526
  }, w = b(s, f);
20527
20527
  if (h.isNil(d) || h.isNil(g))
@@ -20534,7 +20534,7 @@ function Yd(e, t, n, r) {
20534
20534
  function Vd(e) {
20535
20535
  const t = e.match(/^(\$?)([A-Za-z]+)(\$?)(\d+)$/);
20536
20536
  if (!t) return null;
20537
- const n = t[1] === "$", r = qt(t[2]), a = t[3] === "$", l = parseInt(t[4], 10) - 1;
20537
+ const n = t[1] === "$", r = It(t[2]), a = t[3] === "$", l = parseInt(t[4], 10) - 1;
20538
20538
  return Number.isNaN(l) || Number.isNaN(r) ? null : { colAbs: n, rowAbs: a, col: r, row: l };
20539
20539
  }
20540
20540
  function Wd(e) {
@@ -20654,7 +20654,7 @@ function or(e, t, n, r, a, l) {
20654
20654
  u += f;
20655
20655
  if (i === o.length - 1) {
20656
20656
  const m = h.trim(u);
20657
- Dt(m) ? s += jd(
20657
+ qt(m) ? s += jd(
20658
20658
  m,
20659
20659
  t,
20660
20660
  n,
@@ -20678,7 +20678,7 @@ function ou(e, t, n, r) {
20678
20678
  const i = (c = a.config) == null ? void 0 : c.authority;
20679
20679
  return !(h.isNil(i) || h.isNil(i.sheet) || i.sheet === 0);
20680
20680
  }
20681
- function Jp(e, t, n, r) {
20681
+ function eg(e, t, n, r) {
20682
20682
  var u;
20683
20683
  const a = Ma(e, r);
20684
20684
  if (h.isNil(a) || h.isNil(a.config) || h.isNil(a.config.authority))
@@ -20689,7 +20689,7 @@ function Jp(e, t, n, r) {
20689
20689
  const { data: o } = a, i = (u = o == null ? void 0 : o[t]) == null ? void 0 : u[n];
20690
20690
  return i && i.lo === 0 ? !!(l.selectunLockedCells === 1 || h.isNil(l.selectunLockedCells)) : !!(l.selectLockedCells === 1 || h.isNil(l.selectLockedCells));
20691
20691
  }
20692
- function eg(e, t) {
20692
+ function tg(e, t) {
20693
20693
  const n = Ma(e, t);
20694
20694
  if (h.isNil(n) || h.isNil(n.config) || h.isNil(n.config.authority))
20695
20695
  return !0;
@@ -20840,7 +20840,7 @@ function po(e) {
20840
20840
  return Wn(t);
20841
20841
  }
20842
20842
  }
20843
- function tg(e) {
20843
+ function ng(e) {
20844
20844
  const t = ra;
20845
20845
  if (!e || e.length === 0)
20846
20846
  return {
@@ -20967,7 +20967,7 @@ function go(e) {
20967
20967
  let a = String(e.dateValue ?? "").trim();
20968
20968
  return n !== "exact" && (a = a || po(n)), [`preset:${n}`, a, r];
20969
20969
  }
20970
- function ng(e, t, n, r, a, l, o) {
20970
+ function rg(e, t, n, r, a, l, o) {
20971
20971
  var g, y, b, w;
20972
20972
  if (!Xd(e))
20973
20973
  return;
@@ -21563,7 +21563,7 @@ function rm(e, t, n) {
21563
21563
  let N = C;
21564
21564
  const M = $ - w, z = S - _;
21565
21565
  M > 0 && (N = `=${on(e, N, "down", M)}`), z > 0 && (N = `=${on(e, N, "right", z)}`);
21566
- let K = Lt(e, N, $, S)[1];
21566
+ let K = Ft(e, N, $, S)[1];
21567
21567
  typeof K != "boolean" && (K = !!Number(K)), K && (`${$}_${S}` in r || (r[`${$}_${S}`] = {
21568
21568
  textColor: f,
21569
21569
  cellColor: m,
@@ -21886,7 +21886,7 @@ function uu(e, t, n, r) {
21886
21886
  }
21887
21887
  function im(e, t) {
21888
21888
  const n = [];
21889
- if (Dt(t)) {
21889
+ if (qt(t)) {
21890
21890
  const r = Hn(e, t), a = Ee(e, r.sheetId), l = e.luckysheetfile[a].data;
21891
21891
  if (!l) return [];
21892
21892
  for (let o = r.row[0]; o <= r.row[1]; o += 1)
@@ -21962,7 +21962,7 @@ function um(e, t, n) {
21962
21962
  let o = l.value2;
21963
21963
  l.checked && (o = l.value1);
21964
21964
  const i = Se(e);
21965
- It(e, t, n, i, o), (u = e == null ? void 0 : e.hooks) != null && u.updateCellYdoc && e.hooks.updateCellYdoc([
21965
+ Lt(e, t, n, i, o), (u = e == null ? void 0 : e.hooks) != null && u.updateCellYdoc && e.hooks.updateCellYdoc([
21966
21966
  {
21967
21967
  sheetId: e.currentSheetId,
21968
21968
  path: ["celldata"],
@@ -22022,7 +22022,7 @@ function cm(e, t) {
22022
22022
  }
22023
22023
  return n;
22024
22024
  }
22025
- function rg(e, t, n, r) {
22025
+ function ag(e, t, n, r) {
22026
22026
  const a = ct(e), l = Du(e);
22027
22027
  if (!a || l) return;
22028
22028
  const o = document.getElementById(
@@ -22055,7 +22055,7 @@ function rg(e, t, n, r) {
22055
22055
  C === "en" ? T = '<span style="color:#f72626;">Failure: </span>' : C === "zh" || C === "zh-CN" || C === "zh-TW" ? T = '<span style="color:#f72626;">失效:</span>' : C === "es" ? T = '<span style="color:#f72626;">Caducidad: </span>' : C === "hi" && (T = '<span style="color:#f72626;">असफलता: </span>'), T = $ + T + fu(e, c), o.innerHTML = T, o.style.display = "block", o.style.left = `${y}px`, o.style.top = `${d}px`;
22056
22056
  }
22057
22057
  }
22058
- function ag(e, t, n) {
22058
+ function og(e, t, n) {
22059
22059
  var p, g;
22060
22060
  if (!e.luckysheet_select_save) return;
22061
22061
  const r = Se(e);
@@ -22080,7 +22080,7 @@ function ag(e, t, n) {
22080
22080
  }
22081
22081
  f = typeof w == "number" ? b[w] : "";
22082
22082
  }
22083
- It(e, l, o, r, {
22083
+ Lt(e, l, o, r, {
22084
22084
  ct: {
22085
22085
  fa: "General",
22086
22086
  t: "g"
@@ -22100,12 +22100,12 @@ function ag(e, t, n) {
22100
22100
  type: "update"
22101
22101
  }
22102
22102
  ]);
22103
- const m = Jh(e, [l])[l], d = 22 * (t.split(",").length || (s == null ? void 0 : s.length)) || 22;
22104
- m < d && Qh(e, {
22103
+ const m = ep(e, [l])[l], d = 22 * (t.split(",").length || (s == null ? void 0 : s.length)) || 22;
22104
+ m < d && Jh(e, {
22105
22105
  [String(l)]: d
22106
22106
  }), Wo(e, null, void 0);
22107
22107
  }
22108
- function og(e, t, n) {
22108
+ function lg(e, t, n) {
22109
22109
  var p, g;
22110
22110
  const r = Tr(
22111
22111
  e,
@@ -22282,7 +22282,7 @@ function mm(e, t, n = 0) {
22282
22282
  f || du(e, a, m, n, t, s, c, i, u);
22283
22283
  }
22284
22284
  }
22285
- function lg(e, t) {
22285
+ function ig(e, t) {
22286
22286
  var f, m, d;
22287
22287
  if (e.allowEdit === !1) return;
22288
22288
  const n = Se(e);
@@ -22370,7 +22370,7 @@ function Na(e, t, n, r, a) {
22370
22370
  );
22371
22371
  const c = a || Se(e);
22372
22372
  if (!c) return !1;
22373
- It(e, t, n, c, {
22373
+ Lt(e, t, n, c, {
22374
22374
  ...r,
22375
22375
  v: i[0][0],
22376
22376
  tb: "1"
@@ -22379,7 +22379,7 @@ function Na(e, t, n, r, a) {
22379
22379
  for (let d = 0; d < s; d++) {
22380
22380
  if (m === 0 && d === 0) continue;
22381
22381
  const p = i[m][d];
22382
- It(e, t + m, n + d, c, {
22382
+ Lt(e, t + m, n + d, c, {
22383
22383
  v: p,
22384
22384
  ct: { fa: "General", t: typeof p == "number" ? "n" : "g" },
22385
22385
  tb: "1"
@@ -22435,7 +22435,7 @@ function Rt(e, t, n = 10) {
22435
22435
  if (t in r || t === "fs" && sn(e))
22436
22436
  a || (a = "0");
22437
22437
  else if (["fc", "bg", "bc"].includes(t))
22438
- ["fc", "bc"].includes(t) && (a || (a = "#000000")), (a == null ? void 0 : a.indexOf("rgba")) > -1 && (a = Wh(a));
22438
+ ["fc", "bc"].includes(t) && (a || (a = "#000000")), (a == null ? void 0 : a.indexOf("rgba")) > -1 && (a = Gh(a));
22439
22439
  else if (t.substring(0, 2) === "bs")
22440
22440
  a || (a = "none");
22441
22441
  else if (t === "ht" || t === "vt") {
@@ -22556,7 +22556,7 @@ function at(e, t, n, r) {
22556
22556
  }
22557
22557
  return l === void 0 && (l = null), l;
22558
22558
  }
22559
- function It(e, t, n, r, a) {
22559
+ function Lt(e, t, n, r, a) {
22560
22560
  var d, p, g, y, b, w, v, _, T, C, $, S, N, M, z, Q, K, le, F, J, j, Y, O, $e, ae;
22561
22561
  if (e.allowEdit === !1 || e.isFlvReadOnly || (h.isNil(r) && (r = Se(e)), !r)) return;
22562
22562
  let l = r[t][n];
@@ -22678,7 +22678,7 @@ function It(e, t, n, r, a) {
22678
22678
  q && (l.m = q[0].toString(), [, l.ct, l.v] = q);
22679
22679
  }
22680
22680
  else if (Ge(i)) {
22681
- s && !G.includes(",") && (G = Zh(String(i), s)), i = parseFloat(i), G.includes("%") && !m.includes("%") && (!o || Z) && (i /= 100), l != null && l.ct && (l.ct = { ...l.ct, fa: G, t: "n" });
22681
+ s && !G.includes(",") && (G = Kh(String(i), s)), i = parseFloat(i), G.includes("%") && !m.includes("%") && (!o || Z) && (i /= 100), l != null && l.ct && (l.ct = { ...l.ct, fa: G, t: "n" });
22682
22682
  const q = ut(G, i);
22683
22683
  if (q === i) {
22684
22684
  const A = Yr(
@@ -22738,7 +22738,7 @@ function It(e, t, n, r, a) {
22738
22738
  }
22739
22739
  h.isNil(l.f) || (u ? (l.ct || (l.ct = { fa: "General", t: "g" }), l.ct.s = u) : l != null && l.ct && h.isPlainObject(a) && Object.prototype.hasOwnProperty.call(a, "ct") && delete l.ct.s), r[t][n] = l, e.luckysheet_selection_range && (e.luckysheet_selection_range = []);
22740
22740
  }
22741
- function ig(e, t, n, r) {
22741
+ function sg(e, t, n, r) {
22742
22742
  let a = at(e, t, n, "m");
22743
22743
  if (h.isNil(a) && (a = at(e, t, n, r), h.isNil(a))) {
22744
22744
  const l = at(e, t, n, "ct");
@@ -22935,7 +22935,7 @@ function yo(e, t, n, r, a, l) {
22935
22935
  if (h.isPlainObject(D)) {
22936
22936
  if (!_e)
22937
22937
  if (h.isString(a) && a.slice(0, 1) === "=" && a.length > 1) {
22938
- const re = Lt(e, a, t, n, void 0, void 0, !0);
22938
+ const re = Ft(e, a, t, n, void 0, void 0, !0);
22939
22939
  if (Oe = !1, D = h.cloneDeep(((d = Me == null ? void 0 : Me[t]) == null ? void 0 : d[n]) || {}), [, D.v, D.f] = re, D.ct || (D.ct = {}), Ce ? (D.ct.s = [
22940
22940
  {
22941
22941
  v: ge(D.f),
@@ -22949,7 +22949,7 @@ function yo(e, t, n, r, a, l) {
22949
22949
  } else if (h.isPlainObject(a)) {
22950
22950
  const re = a.f;
22951
22951
  if (h.isString(re) && re.slice(0, 1) === "=" && re.length > 1) {
22952
- const be = Lt(
22952
+ const be = Ft(
22953
22953
  e,
22954
22954
  re,
22955
22955
  t,
@@ -22973,13 +22973,13 @@ function yo(e, t, n, r, a, l) {
22973
22973
  D[be] = a[be];
22974
22974
  }), bn(e, t, n);
22975
22975
  } else {
22976
- bn(e, t, n), Ft(e, t, n), D = h.cloneDeep(((g = Me == null ? void 0 : Me[t]) == null ? void 0 : g[n]) || {}), D.v = a, delete D.f, delete D._formulaEditHtml, delete D.spl, delete D.m;
22976
+ bn(e, t, n), Ot(e, t, n), D = h.cloneDeep(((g = Me == null ? void 0 : Me[t]) == null ? void 0 : g[n]) || {}), D.v = a, delete D.f, delete D._formulaEditHtml, delete D.spl, delete D.m;
22977
22977
  const re = (y = U == null ? void 0 : U.m) != null && y.toString().includes(".") ? (w = (b = U == null ? void 0 : U.m) == null ? void 0 : b.toString().split(" ")[0].split(".")[1]) == null ? void 0 : w.length : 0, be = (v = U == null ? void 0 : U.m) == null ? void 0 : v.toString().split(" ")[1];
22978
22978
  typeof D == "object" && (D != null && D.baseValue) && (U != null && U.baseCurrencyPrice) && (D.m = `${(parseFloat(a) / U.baseCurrencyPrice).toFixed(re || 2)} ${be}`, D.baseValue = a), ln(e, t, n, D), Oe = !1, D.qp === 1 && `${a}`.substring(0, 1) !== "'" && (D.qp = 0, D.ct && (D.ct.fa = "General", D.ct.t = "n"));
22979
22979
  }
22980
22980
  a = D;
22981
22981
  } else if (h.isString(a) && a.slice(0, 1) === "=" && a.length > 1) {
22982
- const re = Lt(e, a, t, n, void 0, void 0, !0);
22982
+ const re = Ft(e, a, t, n, void 0, void 0, !0);
22983
22983
  if (Oe = !1, a = {
22984
22984
  v: re[1],
22985
22985
  f: re[2]
@@ -23006,7 +23006,7 @@ function yo(e, t, n, r, a, l) {
23006
23006
  } else if (h.isPlainObject(a)) {
23007
23007
  const re = a.f;
23008
23008
  if (h.isString(re) && re.slice(0, 1) === "=" && re.length > 1) {
23009
- const be = Lt(
23009
+ const be = Ft(
23010
23010
  e,
23011
23011
  re,
23012
23012
  t,
@@ -23030,7 +23030,7 @@ function yo(e, t, n, r, a, l) {
23030
23030
  h.isNil(a.v) && (a.v = be);
23031
23031
  }
23032
23032
  } else
23033
- bn(e, t, n), Ft(e, t, n), ln(e, t, n, a), Oe = !1;
23033
+ bn(e, t, n), Ot(e, t, n), ln(e, t, n, a), Oe = !1;
23034
23034
  const Te = ($ = U == null ? void 0 : U.m) != null && $.toString().includes(".") ? (N = (S = U == null ? void 0 : U.m) == null ? void 0 : S.toString().split(" ")[0].split(".")[1]) == null ? void 0 : N.length : 0, I = (M = U == null ? void 0 : U.m) == null ? void 0 : M.toString().split(" ")[1];
23035
23035
  typeof a == "object" && a.baseValue && !(a != null && a.m) && (a.m = `${// @ts-expect-error later
23036
23036
  (parseFloat(a == null ? void 0 : a.v) / (U == null ? void 0 : U.baseCurrencyPrice)).toFixed(
@@ -23066,7 +23066,7 @@ function yo(e, t, n, r, a, l) {
23066
23066
  W.hyperlink || (W.hyperlink = {}), re.length === 0 ? delete W.hyperlink[pe] : W.hyperlink[pe] = re.length === 1 ? re[0] : re, typeof a == "object" && a && "hl" in a && delete a.hl;
23067
23067
  } else
23068
23068
  H && W.hyperlink && delete W.hyperlink[pe], typeof a == "object" && a && "hl" in a && delete a.hl;
23069
- It(e, t, n, Me, a), hn(e);
23069
+ Lt(e, t, n, Me, a), hn(e);
23070
23070
  const x = e.luckysheetfile[Ee(e, e.currentSheetId)].config || {}, X = (U == null ? void 0 : U.tb) === "2" && !h.isNil(U == null ? void 0 : U.v) && (U == null ? void 0 : U.v) !== "" || sn(U), ie = Me[t][n], fe = (ie == null ? void 0 : ie.tb) === "2" && !h.isNil(ie == null ? void 0 : ie.v) && (ie == null ? void 0 : ie.v) !== "" || sn(ie);
23071
23071
  if ((X || fe) && !((J = x.customHeight) != null && J[t]) && l && Go(e, t, Me, l), e.hooks.afterUpdateCell) {
23072
23072
  const re = h.cloneDeep(B[t][n]), { afterUpdateCell: be } = e.hooks;
@@ -23129,14 +23129,14 @@ function Tr(e, t) {
23129
23129
  if (t.indexOf(",") !== -1) {
23130
23130
  const r = t.split(",");
23131
23131
  for (let a = 0; a < r.length; a += 1)
23132
- if (Dt(r[a]))
23132
+ if (qt(r[a]))
23133
23133
  n.push(Hn(e, r[a]));
23134
23134
  else {
23135
23135
  n = [];
23136
23136
  break;
23137
23137
  }
23138
23138
  } else
23139
- Dt(t) && n.push(Hn(e, t));
23139
+ qt(t) && n.push(Hn(e, t));
23140
23140
  return n;
23141
23141
  }
23142
23142
  function Cm(e) {
@@ -23156,7 +23156,7 @@ function Cm(e) {
23156
23156
  }
23157
23157
  return !1;
23158
23158
  }
23159
- function sg(e, t) {
23159
+ function ug(e, t) {
23160
23160
  const n = (t ?? "").trim();
23161
23161
  return n === "" ? !0 : Cm(n) ? !1 : Tr(e, n).length > 0;
23162
23162
  }
@@ -23310,7 +23310,7 @@ function pu(e, t, n, r) {
23310
23310
  }
23311
23311
  return "";
23312
23312
  }
23313
- function ug(e, t, n) {
23313
+ function cg(e, t, n) {
23314
23314
  let r = "";
23315
23315
  if (e.toString().indexOf("pt") > -1) {
23316
23316
  const l = parseFloat(e);
@@ -23339,7 +23339,7 @@ function Am(e, t, n) {
23339
23339
  }
23340
23340
  return l;
23341
23341
  }
23342
- function cg(e, t, n) {
23342
+ function fg(e, t, n) {
23343
23343
  var l;
23344
23344
  const r = Se(e), a = (l = r == null ? void 0 : r[t]) == null ? void 0 : l[n];
23345
23345
  (a == null ? void 0 : a.f) != null && String(a.f).trim() !== "" && Id(e), e.luckysheetCellUpdate = [t, n];
@@ -23388,7 +23388,7 @@ function Zo(e) {
23388
23388
  ...a != null && typeof a == "object" ? { ct: a } : {}
23389
23389
  } : null;
23390
23390
  }
23391
- function fg(e) {
23391
+ function dg(e) {
23392
23392
  var o;
23393
23393
  const t = Ee(e, e.currentSheetId);
23394
23394
  if (t == null) return;
@@ -23435,7 +23435,7 @@ function fg(e) {
23435
23435
  })), e.hooks.updateCellYdoc(i);
23436
23436
  }
23437
23437
  }
23438
- function dg(e) {
23438
+ function mg(e) {
23439
23439
  var i, u;
23440
23440
  const t = Ee(e, e.currentSheetId);
23441
23441
  if (t == null) return;
@@ -23482,7 +23482,7 @@ function dg(e) {
23482
23482
  })), e.hooks.updateCellYdoc(s);
23483
23483
  }
23484
23484
  }
23485
- function mg(e) {
23485
+ function hg(e) {
23486
23486
  var i;
23487
23487
  const t = Ee(e, e.currentSheetId);
23488
23488
  if (t == null) return;
@@ -23547,7 +23547,7 @@ class Mm {
23547
23547
  }
23548
23548
  }
23549
23549
  }
23550
- function hg(e, t, n, r, a) {
23550
+ function pg(e, t, n, r, a) {
23551
23551
  var Q, K, le, F, J;
23552
23552
  const l = Se(e);
23553
23553
  if (!l) return;
@@ -23611,7 +23611,14 @@ function xm(e, t, n, r, a, l, o) {
23611
23611
  l,
23612
23612
  o
23613
23613
  );
23614
- return i.changed ? (t.cellFormatRanges = i.ranges, e.config || (e.config = {}), e.config.cellFormatRanges = i.ranges, i.ranges) : null;
23614
+ if (!i.changed) return null;
23615
+ const u = Ee(e, e.currentSheetId);
23616
+ if (u != null) {
23617
+ const s = e.luckysheetfile[u];
23618
+ s.config || (s.config = {}), s.config.cellFormatRanges = i.ranges, t.cellFormatRanges = i.ranges, e.config = s.config;
23619
+ } else
23620
+ t.cellFormatRanges = i.ranges, e.config || (e.config = {}), e.config.cellFormatRanges = i.ranges;
23621
+ return i.ranges;
23615
23622
  }
23616
23623
  function Im(e) {
23617
23624
  const t = Ee(e, e.currentSheetId);
@@ -23636,7 +23643,7 @@ function Dm(e, t, n = void 0, r = !1, a = void 0, l = void 0) {
23636
23643
  e.allowEdit === !1
23637
23644
  )
23638
23645
  return;
23639
- const o = e.luckysheetfile.length, i = n ?? (t == null ? void 0 : t.generateSheetId()), u = a || Vh(e.luckysheetfile, r, e);
23646
+ const o = e.luckysheetfile.length, i = n ?? (t == null ? void 0 : t.generateSheetId()), u = a || Wh(e.luckysheetfile, r, e);
23640
23647
  h.isNil(l) || (delete l.data, e.luckysheetfile.forEach((p) => (p.order = p.order < l.order ? p.order : p.order + 1, p)));
23641
23648
  const s = h.isNil(l) ? {
23642
23649
  name: a === void 0 ? u : a,
@@ -23684,7 +23691,7 @@ function Fm(e, t) {
23684
23691
  } else n.celldata != null && Ss(e, o, n);
23685
23692
  });
23686
23693
  }
23687
- function pg(e, t) {
23694
+ function gg(e, t) {
23688
23695
  var o, i;
23689
23696
  const n = Ee(e, e.currentSheetId);
23690
23697
  if (e.allowEdit === !1) {
@@ -23711,7 +23718,7 @@ function pg(e, t) {
23711
23718
  }
23712
23719
  }
23713
23720
  }
23714
- function gg(e, t, n) {
23721
+ function yg(e, t, n) {
23715
23722
  if (t <= 0 && n <= 0)
23716
23723
  return e;
23717
23724
  if (e.length + t >= 1e4)
@@ -23732,7 +23739,7 @@ function gg(e, t, n) {
23732
23739
  e.push(h.times(r + n, () => null));
23733
23740
  return e;
23734
23741
  }
23735
- const yg = {
23742
+ const bg = {
23736
23743
  isPasteAction: !1,
23737
23744
  isPasteValuesOnly: !1
23738
23745
  }, Lm = 14e5;
@@ -23801,7 +23808,7 @@ function rs(e, t) {
23801
23808
  e.primaryCellActive = { r: l, c: o };
23802
23809
  }
23803
23810
  }
23804
- function bg(e, t = !0) {
23811
+ function wg(e, t = !0) {
23805
23812
  const n = e.luckysheet_select_save;
23806
23813
  if (!(n != null && n.length)) return !1;
23807
23814
  const r = n[n.length - 1], a = r.row[0], l = r.row[1], o = r.column[0], i = r.column[1];
@@ -23813,10 +23820,10 @@ function bg(e, t = !0) {
23813
23820
  let y, b;
23814
23821
  return t ? d < s ? (y = d + 1, b = p) : p < f ? (y = u, b = p + 1) : (y = u, b = c) : d > u ? (y = d - 1, b = p) : p > c ? (y = s, b = p - 1) : (y = s, b = f), r.row_focus = y, r.column_focus = b, Kt(e, n), !0;
23815
23822
  }
23816
- function wg(e, t, n) {
23823
+ function vg(e, t, n) {
23817
23824
  e.primaryCellActive = { r: t, c: n };
23818
23825
  }
23819
- function vg(e, t, n) {
23826
+ function _g(e, t, n) {
23820
23827
  const r = e.luckysheet_select_save, a = r == null ? void 0 : r[r.length - 1];
23821
23828
  if (!(a != null && a.row) || a.row.length < 2 || !a.column || a.column.length < 2) {
23822
23829
  e.luckysheet_select_save = [
@@ -23839,7 +23846,7 @@ function vg(e, t, n) {
23839
23846
  }
23840
23847
  ], Kt(e, e.luckysheet_select_save));
23841
23848
  }
23842
- function _g(e) {
23849
+ function Tg(e) {
23843
23850
  var t, n, r, a;
23844
23851
  return (n = (t = e == null ? void 0 : e[0]) == null ? void 0 : t[0]) != null && n.mc && !h.isNil((r = e[0][0].mc) == null ? void 0 : r.rs) && !h.isNil((a = e[0][0].mc) == null ? void 0 : a.cs) ? [
23845
23852
  {
@@ -23866,13 +23873,13 @@ function Kt(e, t) {
23866
23873
  }
23867
23874
  return rs(e, t), t;
23868
23875
  }
23869
- function Tg(e, t, n) {
23876
+ function $g(e, t, n) {
23870
23877
  const r = e || {};
23871
23878
  for (let a = t; a <= n; a += 1)
23872
23879
  a in r || (r[a] = 0);
23873
23880
  return r;
23874
23881
  }
23875
- function $g(e) {
23882
+ function Cg(e) {
23876
23883
  const t = Object.keys(e).map(Number);
23877
23884
  t.sort((a, l) => a - l);
23878
23885
  let n, r = [];
@@ -23892,7 +23899,7 @@ function as(e) {
23892
23899
  const t = h.cloneDeep(e);
23893
23900
  return delete t.cellrange, JSON.stringify(t);
23894
23901
  }
23895
- function Cg(e, t) {
23902
+ function Ng(e, t) {
23896
23903
  var Y;
23897
23904
  const n = e.config;
23898
23905
  if (n.merge == null && (n.merge = {}), !t) return;
@@ -24187,7 +24194,7 @@ function dn(e, t, n, r) {
24187
24194
  i = l;
24188
24195
  return [o, i];
24189
24196
  }
24190
- function Ng(e, t, n, r) {
24197
+ function Sg(e, t, n, r) {
24191
24198
  var g;
24192
24199
  const a = Se(e);
24193
24200
  if (!a) return;
@@ -24265,7 +24272,7 @@ function Ng(e, t, n, r) {
24265
24272
  }, Xn(e, s, d);
24266
24273
  }
24267
24274
  }
24268
- function Sg(e, t, n, r) {
24275
+ function kg(e, t, n, r) {
24269
24276
  let a, l, o, i;
24270
24277
  const u = Se(e);
24271
24278
  if (!h.isNil(u) && !h.isNil(e.luckysheet_select_save)) {
@@ -24642,7 +24649,7 @@ function Um(e, t, n, r) {
24642
24649
  }
24643
24650
  return `<table data-type="fortune-copy-action-table">${y}${p}</table>`;
24644
24651
  }
24645
- function kg(e) {
24652
+ function Ag(e) {
24646
24653
  var g, y, b, w;
24647
24654
  const t = Se(e);
24648
24655
  e.lastInternalCopyHtmlMetadataStripped = !1, e.luckysheet_selection_range = [];
@@ -24725,7 +24732,7 @@ function kg(e) {
24725
24732
  let p = !1;
24726
24733
  f && c && f.length > Lm && (p = !0, f = f.replace(/\sdata-fortune-cell="[^"]*"/g, "")), f && (e.iscopyself = !0, e.lastInternalCopyHtmlMetadataStripped = p, Mm.writeHtml(f));
24727
24734
  }
24728
- function Ag(e) {
24735
+ function Eg(e) {
24729
24736
  var r, a, l, o, i, u, s, c;
24730
24737
  if (ct(e) === !1 || e.isFlvReadOnly)
24731
24738
  return "allowEdit";
@@ -24752,7 +24759,7 @@ function Ag(e) {
24752
24759
  const S = Ee(e, e.currentSheetId), N = f[C][$] != null ? h.cloneDeep(f[C][$]) : null, M = N != null && (N.tb === "2" && !h.isNil(N.v) && N.v !== "" || sn(N)), { dataVerification: z } = e.luckysheetfile[S];
24753
24760
  if (z && (z != null && z[`${C}_${$}`]) && (z == null || delete z[`${C}_${$}`]), h.isPlainObject(f[C][$])) {
24754
24761
  const K = f[C][$];
24755
- delete K.m, delete K.v, delete K.fc, delete K.un, K.f != null && (delete K.f, Ft(e, C, $, e.currentSheetId), delete K.spl), K.ct != null && (K.ct.t === "inlineStr" || (r = K.ct.fa) != null && r.includes("BTC") || (a = K.ct.fa) != null && a.includes("ETH") || (l = K.ct.fa) != null && l.includes("SOL")) && (delete K.ct, K == null || delete K.baseValue, K == null || delete K.baseCurrency), bn(e, C, $);
24762
+ delete K.m, delete K.v, delete K.fc, delete K.un, K.f != null && (delete K.f, Ot(e, C, $, e.currentSheetId), delete K.spl), K.ct != null && (K.ct.t === "inlineStr" || (r = K.ct.fa) != null && r.includes("BTC") || (a = K.ct.fa) != null && a.includes("ETH") || (l = K.ct.fa) != null && l.includes("SOL")) && (delete K.ct, K == null || delete K.baseValue, K == null || delete K.baseCurrency), bn(e, C, $);
24756
24763
  } else
24757
24764
  f[C][$] = null;
24758
24765
  g && g[`${C}_${$}`] && delete g[`${C}_${$}`];
@@ -24778,7 +24785,7 @@ function Ag(e) {
24778
24785
  }
24779
24786
  return "success";
24780
24787
  }
24781
- function Eg(e) {
24788
+ function Mg(e) {
24782
24789
  var r;
24783
24790
  if (ct(e) === !1)
24784
24791
  return "allowEdit";
@@ -24816,7 +24823,7 @@ function Eg(e) {
24816
24823
  }
24817
24824
  return "success";
24818
24825
  }
24819
- function Mg(e) {
24826
+ function Rg(e) {
24820
24827
  var r, a, l;
24821
24828
  if (ct(e) === !1)
24822
24829
  return "allowEdit";
@@ -24923,7 +24930,7 @@ function Mg(e) {
24923
24930
  }
24924
24931
  return "success";
24925
24932
  }
24926
- function Rg(e) {
24933
+ function xg(e) {
24927
24934
  var r, a, l;
24928
24935
  if (ct(e) === !1)
24929
24936
  return "allowEdit";
@@ -25030,7 +25037,7 @@ function Rg(e) {
25030
25037
  }
25031
25038
  return "success";
25032
25039
  }
25033
- function xg(e, t) {
25040
+ function Ig(e, t) {
25034
25041
  var a;
25035
25042
  if (ct(e) === !1)
25036
25043
  return "allowEdit";
@@ -25068,7 +25075,7 @@ function xg(e, t) {
25068
25075
  }
25069
25076
  return "success";
25070
25077
  }
25071
- function Ig(e) {
25078
+ function qg(e) {
25072
25079
  var r;
25073
25080
  if (ct(e) === !1)
25074
25081
  return "allowEdit";
@@ -25111,7 +25118,7 @@ function Ig(e) {
25111
25118
  }
25112
25119
  return "success";
25113
25120
  }
25114
- function qg(e) {
25121
+ function Dg(e) {
25115
25122
  var r;
25116
25123
  if (ct(e) === !1)
25117
25124
  return "allowEdit";
@@ -25153,7 +25160,7 @@ function qg(e) {
25153
25160
  }
25154
25161
  return "success";
25155
25162
  }
25156
- function Dg(e) {
25163
+ function Og(e) {
25157
25164
  var r;
25158
25165
  if (ct(e) === !1)
25159
25166
  return "allowEdit";
@@ -25196,10 +25203,10 @@ function Dg(e) {
25196
25203
  }
25197
25204
  return "success";
25198
25205
  }
25199
- function Og(e, t) {
25206
+ function Fg(e, t) {
25200
25207
  return !1;
25201
25208
  }
25202
- function Fg(e) {
25209
+ function Lg(e) {
25203
25210
  const t = Se(e);
25204
25211
  t && (e.luckysheet_select_status = !1, e.luckysheet_select_save = [
25205
25212
  {
@@ -25212,7 +25219,7 @@ function Fg(e) {
25212
25219
  }
25213
25220
  ], Kt(e, e.luckysheet_select_save));
25214
25221
  }
25215
- function Lg(e, t, n, r) {
25222
+ function Bg(e, t, n, r) {
25216
25223
  var u;
25217
25224
  if (!r) return {};
25218
25225
  const a = {}, { scrollTop: l } = e, o = (u = r.horizontal) == null ? void 0 : u.freezenhorizontaldata;
@@ -25223,7 +25230,7 @@ function Lg(e, t, n, r) {
25223
25230
  }
25224
25231
  return i || (a.display = "none"), a;
25225
25232
  }
25226
- function Bg(e, t, n, r) {
25233
+ function Pg(e, t, n, r) {
25227
25234
  var u;
25228
25235
  if (!r) return {};
25229
25236
  const a = {}, { scrollLeft: l } = e, o = (u = r.vertical) == null ? void 0 : u.freezenverticaldata;
@@ -25234,7 +25241,7 @@ function Bg(e, t, n, r) {
25234
25241
  }
25235
25242
  return i || (a.display = "none"), a;
25236
25243
  }
25237
- function Pg(e) {
25244
+ function Hg(e) {
25238
25245
  var u, s, c, f, m, d, p, g, y, b, w, v, _, T, C, $, S, N;
25239
25246
  const t = e.luckysheet_select_save;
25240
25247
  let n = 0, r = 0, a = 0, l = -1 / 0, o = 1 / 0;
@@ -25253,7 +25260,7 @@ function Pg(e) {
25253
25260
  const i = String(a / n);
25254
25261
  return { numberC: n, count: r, sum: a, max: l, min: o, average: i };
25255
25262
  }
25256
- function Hg(e, t, n) {
25263
+ function Ug(e, t, n) {
25257
25264
  var i, u;
25258
25265
  const r = Se(e);
25259
25266
  if (!(r != null && r.length) || !((i = r[0]) != null && i.length)) return;
@@ -25262,7 +25269,7 @@ function Hg(e, t, n) {
25262
25269
  const l = Math.max(0, Math.min(t, r.length - 1)), o = Math.max(0, Math.min(n, r[0].length - 1));
25263
25270
  a.row = [l, l], a.column = [o, o], a.row_focus = l, a.column_focus = o, a.moveXY = { x: l, y: o }, Kt(e, e.luckysheet_select_save), Xn(e, l, o);
25264
25271
  }
25265
- function Ug(e, t, n) {
25272
+ function zg(e, t, n) {
25266
25273
  var s;
25267
25274
  if (!ct(e)) return !1;
25268
25275
  const r = e.luckysheet_select_save;
@@ -25288,7 +25295,7 @@ function Ug(e, t, n) {
25288
25295
  }
25289
25296
  return !0;
25290
25297
  }
25291
- function zg(e) {
25298
+ function Yg(e) {
25292
25299
  return {
25293
25300
  luckysheetfile: [],
25294
25301
  defaultcolumnNum: 60,
@@ -25603,7 +25610,7 @@ function zm(e, t, n) {
25603
25610
  }
25604
25611
  e.ch_width += r;
25605
25612
  }
25606
- function Yg(e, t) {
25613
+ function Vg(e, t) {
25607
25614
  if ((e == null ? void 0 : e.length) > 0) {
25608
25615
  let n = !1;
25609
25616
  const r = [];
@@ -25612,7 +25619,7 @@ function Yg(e, t) {
25612
25619
  }), n || (e[0].status = 1);
25613
25620
  }
25614
25621
  }
25615
- function Vg(e) {
25622
+ function Wg(e) {
25616
25623
  const t = e.luckysheetfile.filter(
25617
25624
  (n) => h.isUndefined(n.hide) || n.hide !== 1
25618
25625
  );
@@ -25623,11 +25630,11 @@ function Vg(e) {
25623
25630
  break;
25624
25631
  }
25625
25632
  }
25626
- function Wg(e, t) {
25633
+ function Gg(e, t) {
25627
25634
  const n = t.length, r = n === 0 ? 0 : t[0].length;
25628
25635
  zm(e, n, r), Kt(e, e.luckysheet_select_save);
25629
25636
  }
25630
- function Gg(e, t, n) {
25637
+ function jg(e, t, n) {
25631
25638
  e.luckysheetTableContentHW = [
25632
25639
  n.clientWidth,
25633
25640
  n.clientHeight
@@ -27577,7 +27584,7 @@ function Tu(e, t) {
27577
27584
  ue.length > 0 && (e.formulaCache.execFunctionExist = ue, ln(e, null, null, null, null, Se(e)), e.formulaCache.execFunctionExist = void 0);
27578
27585
  }
27579
27586
  }
27580
- function jg(e, t) {
27587
+ function Xg(e, t) {
27581
27588
  if (!e.luckysheet_select_save || e.luckysheet_select_save.length > 1)
27582
27589
  return "noMulti";
27583
27590
  const n = Ee(e, e.currentSheetId);
@@ -27599,7 +27606,7 @@ function jg(e, t) {
27599
27606
  }
27600
27607
  return e.luckysheetfile[n].config = e.config, "";
27601
27608
  }
27602
- function Xg(e, t) {
27609
+ function Zg(e, t) {
27603
27610
  if (!e.luckysheet_select_save || e.luckysheet_select_save.length > 1)
27604
27611
  return "noMulti";
27605
27612
  const n = Ee(e, e.currentSheetId);
@@ -27617,7 +27624,7 @@ function Xg(e, t) {
27617
27624
  }
27618
27625
  return e.luckysheetfile[n].config = e.config, "";
27619
27626
  }
27620
- function Zg(e) {
27627
+ function Kg(e) {
27621
27628
  var t, n, r, a;
27622
27629
  if (!e.luckysheet_select_save || !e.config.colhidden && !e.config.rowhidden)
27623
27630
  return !1;
@@ -27633,7 +27640,7 @@ function Zg(e) {
27633
27640
  }
27634
27641
  return !1;
27635
27642
  }
27636
- function Kg(e, t) {
27643
+ function Qg(e, t) {
27637
27644
  let n = 1;
27638
27645
  if (!e.luckysheet_select_save) return 0;
27639
27646
  const r = e.luckysheet_select_save[0], a = e.config.rowhidden ?? {}, l = e.config.colhidden ?? {};
@@ -27683,7 +27690,7 @@ function eh(e) {
27683
27690
  return e == null ? !1 : $n(e.ct) || !h.isEmpty(e.v) || e.f != null || // @ts-ignore
27684
27691
  e.s != null || e.ct && ((t = e.ct.s) == null ? void 0 : t.length);
27685
27692
  }
27686
- function Qg(e) {
27693
+ function Jg(e) {
27687
27694
  var n, r;
27688
27695
  const t = Se(e);
27689
27696
  if (!t || !((n = e.luckysheet_select_save) != null && n.length)) return !1;
@@ -27875,7 +27882,7 @@ function Mr(e) {
27875
27882
  `).replace(/\r/g, `
27876
27883
  `);
27877
27884
  }
27878
- function Jg(e, t, n, r, a) {
27885
+ function e1(e, t, n, r, a) {
27879
27886
  const l = Se(e);
27880
27887
  if (l == null) return;
27881
27888
  const { scrollLeft: o } = r, { scrollTop: i } = a, u = n.getBoundingClientRect();
@@ -27917,7 +27924,7 @@ function qr(e, t, n) {
27917
27924
  ((u = (i = Se(e)) == null ? void 0 : i[t]) == null ? void 0 : u[n]) ?? void 0
27918
27925
  );
27919
27926
  }
27920
- function e1(e, t, n) {
27927
+ function t1(e, t, n) {
27921
27928
  return qr(e, t, n)[0];
27922
27929
  }
27923
27930
  function nh(e, t) {
@@ -27929,7 +27936,7 @@ function Jo(e) {
27929
27936
  `).replace(/\r/g, `
27930
27937
  `);
27931
27938
  }
27932
- function t1(e, t) {
27939
+ function n1(e, t) {
27933
27940
  var l;
27934
27941
  if (((l = e == null ? void 0 : e.ct) == null ? void 0 : l.t) !== "inlineStr" || !Array.isArray(e.ct.s))
27935
27942
  return;
@@ -28078,7 +28085,7 @@ function ca(e, t, n) {
28078
28085
  const i = (o.length > 0 ? o : a)[0];
28079
28086
  e.linkCard.originType = i.linkType, e.linkCard.originAddress = i.linkAddress, e.linkCard.originText = (l == null ? void 0 : l.v) != null && !Array.isArray(l.v) ? `${l.v}` : "";
28080
28087
  }
28081
- function n1(e, t, n, r, a, l, o) {
28088
+ function r1(e, t, n, r, a, l, o) {
28082
28089
  var c, f, m, d;
28083
28090
  const i = Ee(e, e.currentSheetId), u = Se(e);
28084
28091
  if (o != null && o.applySelectionFromModel && i != null && u != null && sh(
@@ -28180,7 +28187,7 @@ function uh(e, t, n) {
28180
28187
  }), e.hooks.updateCellYdoc(f);
28181
28188
  }
28182
28189
  }
28183
- function r1(e, t, n, r) {
28190
+ function a1(e, t, n, r) {
28184
28191
  var m, d, p;
28185
28192
  if (!ct(e)) return;
28186
28193
  const l = Ee(e, e.currentSheetId), o = Se(e);
@@ -28212,7 +28219,7 @@ function r1(e, t, n, r) {
28212
28219
  ]), ca(e, t, n);
28213
28220
  }
28214
28221
  }
28215
- function a1(e, t, n, r, a, l, o) {
28222
+ function o1(e, t, n, r, a, l, o) {
28216
28223
  var y, b, w;
28217
28224
  if (!ct(e)) return;
28218
28225
  const u = Ee(e, e.currentSheetId), s = Se(e);
@@ -28291,7 +28298,7 @@ function ch(e, t, n, r, a = !1, l = !1) {
28291
28298
  };
28292
28299
  }
28293
28300
  }
28294
- function o1(e, t, n, r, a, l, o) {
28301
+ function l1(e, t, n, r, a, l, o) {
28295
28302
  if (Ee(e, e.currentSheetId) != null && qr(e, t, n).length !== 0) {
28296
28303
  if (r === "webpage") {
28297
28304
  const u = String(a ?? "").trim();
@@ -28317,12 +28324,12 @@ function o1(e, t, n, r, a, l, o) {
28317
28324
  e.linkCard = void 0;
28318
28325
  }
28319
28326
  }
28320
- function l1(e, t, n) {
28327
+ function i1(e, t, n) {
28321
28328
  if (!n) return { isValid: !1, tooltip: "" };
28322
28329
  const { insertLink: r } = Et(e), a = String(n ?? "").trim();
28323
- return $u(a) ? { isValid: !0, tooltip: "" } : (/^https?:\/\//i.test(n) || (n = `https://${n}`), /^(https?):\/\/[^\s$.?#].[^\s]*$/i.test(n) ? t === "cellrange" && !Dt(n) ? { isValid: !1, tooltip: r.invalidCellRangeTip } : { isValid: !0, tooltip: "" } : { isValid: !1, tooltip: r.tooltipInfo1 });
28330
+ return $u(a) ? { isValid: !0, tooltip: "" } : (/^https?:\/\//i.test(n) || (n = `https://${n}`), /^(https?):\/\/[^\s$.?#].[^\s]*$/i.test(n) ? t === "cellrange" && !qt(n) ? { isValid: !1, tooltip: r.invalidCellRangeTip } : { isValid: !0, tooltip: "" } : { isValid: !1, tooltip: r.tooltipInfo1 });
28324
28331
  }
28325
- function i1(e, t) {
28332
+ function s1(e, t) {
28326
28333
  var u;
28327
28334
  const n = (u = e.linkCard) == null ? void 0 : u.rangeSelectionModal;
28328
28335
  if (n == null) return;
@@ -28332,7 +28339,7 @@ function i1(e, t) {
28332
28339
  let { top: o, left: i } = n.initialPosition;
28333
28340
  i += t.pageX - a, o += t.pageY - l, o < 0 && (o = 0), r.style.left = `${i}px`, r.style.top = `${o}px`;
28334
28341
  }
28335
- function s1(e) {
28342
+ function u1(e) {
28336
28343
  h.set(e, "linkCard.rangeSelectionModal", void 0);
28337
28344
  }
28338
28345
  function fh(e, t, n, r) {
@@ -28595,7 +28602,69 @@ function fh(e, t, n, r) {
28595
28602
  }
28596
28603
  ]) : r === "allPart" ? a = [{ row: [i, u], column: [s, c] }] : r === "restPart" ? a = [{ row: [i, u], column: [s, c] }] : r === "operatePart" && (a = []), a;
28597
28604
  }
28598
- function dh(e, t, n, r, a) {
28605
+ function dh(e) {
28606
+ const t = [];
28607
+ if (e.length === 0) return t;
28608
+ let n = e[0], r = e[0];
28609
+ for (let a = 1; a < e.length; a += 1) {
28610
+ const l = e[a];
28611
+ if (l === r || l === r + 1) {
28612
+ r = l;
28613
+ continue;
28614
+ }
28615
+ t.push([n, r]), n = l, r = l;
28616
+ }
28617
+ return t.push([n, r]), t;
28618
+ }
28619
+ function c1(e, t, n) {
28620
+ if (!(e != null && e.length)) return [];
28621
+ const r = [];
28622
+ for (let a = 0; a < e.length; a += 1) {
28623
+ const l = e[a];
28624
+ if (l) {
28625
+ if (l.rangeType === "cell" && l.value) {
28626
+ const o = { ...l.value };
28627
+ if (t === "row") {
28628
+ const i = Number(o.row_index);
28629
+ Number.isFinite(i) && (o.row_index = n[i] ?? i);
28630
+ } else {
28631
+ const i = Number(o.col_index);
28632
+ Number.isFinite(i) && (o.col_index = n[i] ?? i);
28633
+ }
28634
+ r.push({ ...l, value: o });
28635
+ continue;
28636
+ }
28637
+ if (l.rangeType === "range" && Array.isArray(l.range)) {
28638
+ const o = [];
28639
+ for (let i = 0; i < l.range.length; i += 1) {
28640
+ const u = l.range[i];
28641
+ if (!(u != null && u.row) || !(u != null && u.column)) continue;
28642
+ const s = t === "row" ? u.row : u.column, c = t === "row" ? u.column : u.row;
28643
+ if (!Array.isArray(s) || s.length < 2) continue;
28644
+ let f = Number(s[0]), m = Number(s[1]);
28645
+ if (!Number.isFinite(f) || !Number.isFinite(m)) continue;
28646
+ if (f > m) {
28647
+ const p = f;
28648
+ f = m, m = p;
28649
+ }
28650
+ const d = [];
28651
+ for (let p = f; p <= m; p += 1)
28652
+ d.push(n[p] ?? p);
28653
+ d.sort((p, g) => p - g), dh(d).forEach(([p, g]) => {
28654
+ o.push(
28655
+ t === "row" ? { row: [p, g], column: c } : { row: c, column: [p, g] }
28656
+ );
28657
+ });
28658
+ }
28659
+ o.length > 0 && r.push({ ...l, range: o });
28660
+ continue;
28661
+ }
28662
+ r.push(l);
28663
+ }
28664
+ }
28665
+ return r;
28666
+ }
28667
+ function mh(e, t, n, r, a) {
28599
28668
  if (!e.length) return [];
28600
28669
  const l = [];
28601
28670
  for (let o = 0; o < e.length; o += 1) {
@@ -28623,7 +28692,7 @@ function dh(e, t, n, r, a) {
28623
28692
  function Nu(e, t) {
28624
28693
  let n = e ?? [];
28625
28694
  return t.forEach((r) => {
28626
- n = dh(
28695
+ n = mh(
28627
28696
  n,
28628
28697
  r.row[0],
28629
28698
  r.row[1],
@@ -28883,7 +28952,7 @@ function fa(e) {
28883
28952
  let t = e;
28884
28953
  return h.isPlainObject(t) && (t = t.v), !!(!ot(t) && Vs(t).num && (e.ct == null || e.ct.t == null || e.ct.t === "n" || e.ct.t === "g"));
28885
28954
  }
28886
- function mh(e) {
28955
+ function hh(e) {
28887
28956
  let t = e;
28888
28957
  return h.isPlainObject(t) && (t = t.v), !ot(t);
28889
28958
  }
@@ -28944,8 +29013,8 @@ function Tn(e, t, n, r, a, l, o) {
28944
29013
  o.currentSheetId,
28945
29014
  { row: r, column: a },
28946
29015
  o.currentSheetId
28947
- )})`, u = Lt(o, i, t, n), s = { v: u[1], f: u[2] };
28948
- It(o, t, n, e, s), (c = o == null ? void 0 : o.hooks) != null && c.updateCellYdoc && o.hooks.updateCellYdoc([
29016
+ )})`, u = Ft(o, i, t, n), s = { v: u[1], f: u[2] };
29017
+ Lt(o, t, n, e, s), (c = o == null ? void 0 : o.hooks) != null && c.updateCellYdoc && o.hooks.updateCellYdoc([
28949
29018
  {
28950
29019
  sheetId: o.currentSheetId,
28951
29020
  path: ["celldata"],
@@ -28964,7 +29033,7 @@ function Vr(e, t, n, r, a, l, o, i, u, s, c, f, m) {
28964
29033
  let d = !0, p = !1;
28965
29034
  for (let g = o; g <= i; g += 1) {
28966
29035
  let y = null;
28967
- s === "c" ? y = r[g][l] : y = r[l][g], fa(y) ? (d = !1, p = !0) : mh(y) && (d = !1);
29036
+ s === "c" ? y = r[g][l] : y = r[l][g], fa(y) ? (d = !1, p = !0) : hh(y) && (d = !1);
28968
29037
  }
28969
29038
  if (d && m) {
28970
29039
  let g = $r(r, a, l, s);
@@ -29066,7 +29135,7 @@ function Vr(e, t, n, r, a, l, o, i, u, s, c, f, m) {
29066
29135
  }
29067
29136
  return !0;
29068
29137
  }
29069
- function hh(e, t, n, r, a) {
29138
+ function ph(e, t, n, r, a) {
29070
29139
  if (!ct(e)) return;
29071
29140
  const o = Se(e);
29072
29141
  if (o == null) return;
@@ -29198,7 +29267,7 @@ function hh(e, t, n, r, a) {
29198
29267
  i = i && i;
29199
29268
  }), i || (e.formulaCache.execFunctionExist.reverse(), ln(e, null, null, null, null, o), e.formulaCache.execFunctionGlobalData = null));
29200
29269
  }
29201
- function ph(e) {
29270
+ function gh(e) {
29202
29271
  var t;
29203
29272
  if (e.luckysheet_copy_save !== null) {
29204
29273
  if (((t = e.luckysheet_copy_save) == null ? void 0 : t.dataSheetId) === e.currentSheetId)
@@ -29217,7 +29286,7 @@ function ph(e) {
29217
29286
  }, e.luckysheetPaintModelOn = !1;
29218
29287
  }
29219
29288
  }
29220
- function gh(e, t) {
29289
+ function yh(e, t) {
29221
29290
  const n = Se(e);
29222
29291
  if (!n) return;
29223
29292
  const r = e.currency || "¥";
@@ -29229,11 +29298,11 @@ function gh(e, t) {
29229
29298
  Xs(r, 2)
29230
29299
  );
29231
29300
  }
29232
- function yh(e, t) {
29301
+ function bh(e, t) {
29233
29302
  const n = Se(e);
29234
29303
  n && Xt(e, t, n, "ct", "0.00%");
29235
29304
  }
29236
- function bh(e, t) {
29305
+ function wh(e, t) {
29237
29306
  var p;
29238
29307
  const n = Se(e);
29239
29308
  if (!n || !e.luckysheet_select_save) return;
@@ -29289,7 +29358,7 @@ function bh(e, t) {
29289
29358
  }
29290
29359
  Xt(e, t, n, "ct", d);
29291
29360
  }
29292
- function wh(e, t) {
29361
+ function vh(e, t) {
29293
29362
  const n = Se(e);
29294
29363
  if (!n || !e.luckysheet_select_save) return;
29295
29364
  const r = e.luckysheet_select_save[0].row_focus, a = e.luckysheet_select_save[0].column_focus;
@@ -29331,32 +29400,32 @@ function wh(e, t) {
29331
29400
  m.length > 0 ? d = `${c.replace(m, "")}.0${m}` : d = `${c}.0${m}`;
29332
29401
  Xt(e, t, n, "ct", d);
29333
29402
  }
29334
- function vh(e, t) {
29403
+ function _h(e, t) {
29335
29404
  Ea(e, t, "bl");
29336
29405
  }
29337
- function _h(e, t) {
29406
+ function Th(e, t) {
29338
29407
  Ea(e, t, "it");
29339
29408
  }
29340
- function Th(e, t) {
29409
+ function $h(e, t) {
29341
29410
  Ea(e, t, "cl");
29342
29411
  }
29343
- function $h(e, t) {
29412
+ function Ch(e, t) {
29344
29413
  Ea(e, t, "un");
29345
29414
  }
29346
- function u1(e, t, n) {
29415
+ function f1(e, t, n) {
29347
29416
  Dr(e, t, "ht", n);
29348
29417
  }
29349
- function c1(e, t, n) {
29418
+ function d1(e, t, n) {
29350
29419
  Dr(e, t, "vt", n);
29351
29420
  }
29352
- function Ch(e) {
29421
+ function Nh(e) {
29353
29422
  if (!ct(e) || e.luckysheet_select_save == null || e.luckysheet_select_save.length === 0 || e.luckysheet_select_save.length > 1)
29354
29423
  return;
29355
29424
  let n = !1;
29356
29425
  const r = e.luckysheet_select_save[0].row[0], a = e.luckysheet_select_save[0].row[1], l = e.luckysheet_select_save[0].column[0], o = e.luckysheet_select_save[0].column[1];
29357
29426
  if (n = un(e, e.config, r, a, l, o), n)
29358
29427
  return;
29359
- ph(e), e.luckysheet_selection_range = [
29428
+ gh(e), e.luckysheet_selection_range = [
29360
29429
  {
29361
29430
  row: e.luckysheet_select_save[0].row,
29362
29431
  column: e.luckysheet_select_save[0].column
@@ -29385,7 +29454,7 @@ function Ch(e) {
29385
29454
  HasMC: u
29386
29455
  }, e.luckysheetPaintModelOn = !0, e.luckysheetPaintSingle = !0;
29387
29456
  }
29388
- function Nh(e) {
29457
+ function Sh(e) {
29389
29458
  var l, o, i, u, s;
29390
29459
  if (e.allowEdit === !1) return;
29391
29460
  const t = Se(e);
@@ -29423,13 +29492,13 @@ function Nh(e) {
29423
29492
  }
29424
29493
  (u = e == null ? void 0 : e.hooks) != null && u.updateCellYdoc && (r && vo(e, ((s = e.config) == null ? void 0 : s.borderInfo) ?? []), n.length > 0 && e.hooks.updateCellYdoc(n));
29425
29494
  }
29426
- function f1(e, t, n) {
29495
+ function m1(e, t, n) {
29427
29496
  Dr(e, t, "fc", n);
29428
29497
  }
29429
- function d1(e, t, n) {
29498
+ function h1(e, t, n) {
29430
29499
  Dr(e, t, "bg", n);
29431
29500
  }
29432
- function Sh(e, t, n, r) {
29501
+ function kh(e, t, n, r) {
29433
29502
  var c;
29434
29503
  if (!ct(e)) return;
29435
29504
  t == null && (t = "border-all");
@@ -29477,7 +29546,7 @@ function Sh(e, t, n, r) {
29477
29546
  const s = Ee(e, e.currentSheetId);
29478
29547
  s != null && (la(e.luckysheetfile[s], e.config), e.config = e.luckysheetfile[s].config, vo(e, i.borderInfo));
29479
29548
  }
29480
- function kh(e, t) {
29549
+ function Ah(e, t) {
29481
29550
  if (!ct(e)) return;
29482
29551
  if (e.config.merge != null) {
29483
29552
  let a = !1;
@@ -29492,10 +29561,10 @@ function kh(e, t) {
29492
29561
  }
29493
29562
  Se(e) && e.luckysheet_select_save && th(e, e.currentSheetId, e.luckysheet_select_save, t);
29494
29563
  }
29495
- function Ah(e, t) {
29564
+ function Eh(e, t) {
29496
29565
  mm(e, t);
29497
29566
  }
29498
- function m1(e, t) {
29567
+ function p1(e, t) {
29499
29568
  var u, s;
29500
29569
  if (!ct(e)) return;
29501
29570
  const r = e.luckysheetfile[Ee(e, e.currentSheetId)];
@@ -29511,18 +29580,18 @@ function m1(e, t) {
29511
29580
  const i = (s = e.config.merge) == null ? void 0 : s[`${l}_${o}`];
29512
29581
  i && (l = i.r + i.rs - 1, o = i.c + i.cs - 1), r.frozen = { type: "both", range: { row_focus: l, column_focus: o } }, t === "freeze-row" ? r.frozen.type = "rangeRow" : t === "freeze-col" && (r.frozen.type = "rangeColumn");
29513
29582
  }
29514
- function h1(e, t, n, r) {
29583
+ function g1(e, t, n, r) {
29515
29584
  Dr(e, t, "fs", n, r);
29516
29585
  }
29517
- function p1(e, t, n, r) {
29518
- hh(e, t, n, "SUM", r);
29586
+ function y1(e, t, n, r) {
29587
+ ph(e, t, n, "SUM", r);
29519
29588
  }
29520
29589
  function Au(e) {
29521
29590
  return e.replace(/\r\n/g, `
29522
29591
  `).replace(/\r/g, `
29523
29592
  `);
29524
29593
  }
29525
- function Eh(e, t) {
29594
+ function Mh(e, t) {
29526
29595
  var a;
29527
29596
  if (!(((a = e.luckysheetCellUpdate) == null ? void 0 : a.length) === 2 && e.luckysheetCellUpdate[0] != null && e.luckysheetCellUpdate[1] != null)) return "";
29528
29597
  if (Uo(e) === "fx") {
@@ -29533,16 +29602,16 @@ function Eh(e, t) {
29533
29602
  }
29534
29603
  return (t == null ? void 0 : t.innerText) ?? "";
29535
29604
  }
29536
- function Mh(e, t) {
29605
+ function Rh(e, t) {
29537
29606
  var s, c;
29538
29607
  const n = (s = e.luckysheet_select_save) == null ? void 0 : s[0], r = Se(e);
29539
29608
  if (r == null || n == null) return !1;
29540
29609
  const a = n.row[0], l = n.column[0], o = (c = r[a]) == null ? void 0 : c[l];
29541
29610
  if ((o == null ? void 0 : o.f) != null && String(o.f).trim() !== "") return !0;
29542
- const u = Eh(e, t);
29611
+ const u = Mh(e, t);
29543
29612
  return !!(u.length > 0 && u.trimStart().startsWith("="));
29544
29613
  }
29545
- function g1(e, t, n) {
29614
+ function b1(e, t, n) {
29546
29615
  if (!n || !t) return;
29547
29616
  if (e.luckysheetCellUpdate.length !== 2) {
29548
29617
  delete n.linkEditorOpenSnapshot;
@@ -29568,10 +29637,10 @@ function g1(e, t, n) {
29568
29637
  selectedPlain: s
29569
29638
  };
29570
29639
  }
29571
- function Rh(e, t, n) {
29640
+ function xh(e, t, n) {
29572
29641
  var g, y, b, w;
29573
29642
  if (!ct(e)) return;
29574
- if (Mh(e, t)) {
29643
+ if (Rh(e, t)) {
29575
29644
  (g = n == null ? void 0 : n.onHyperlinkInsertBlocked) == null || g.call(n);
29576
29645
  return;
29577
29646
  }
@@ -29634,36 +29703,36 @@ function Rh(e, t, n) {
29634
29703
  !1
29635
29704
  );
29636
29705
  }
29637
- const xh = {
29638
- "currency-format": gh,
29639
- "percentage-format": yh,
29640
- "number-decrease": bh,
29641
- "number-increase": wh,
29642
- "sort-cell": (e) => Ah(e, !0),
29643
- "merge-all": (e) => kh(e, "merge-all"),
29644
- "border-all": (e) => Sh(e, "border-all"),
29645
- bold: vh,
29646
- italic: _h,
29647
- "strike-through": Th,
29648
- underline: $h,
29649
- "clear-format": Nh,
29650
- "format-painter": Ch,
29706
+ const Ih = {
29707
+ "currency-format": yh,
29708
+ "percentage-format": bh,
29709
+ "number-decrease": wh,
29710
+ "number-increase": vh,
29711
+ "sort-cell": (e) => Eh(e, !0),
29712
+ "merge-all": (e) => Ah(e, "merge-all"),
29713
+ "border-all": (e) => kh(e, "border-all"),
29714
+ bold: _h,
29715
+ italic: Th,
29716
+ "strike-through": $h,
29717
+ underline: Ch,
29718
+ "clear-format": Sh,
29719
+ "format-painter": Nh,
29651
29720
  search: (e) => {
29652
29721
  e.showSearch = !0;
29653
29722
  },
29654
- link: (e, t, n) => Rh(e, t, n)
29655
- }, Ih = {
29723
+ link: (e, t, n) => xh(e, t, n)
29724
+ }, qh = {
29656
29725
  bold: (e) => (e == null ? void 0 : e.bl) === 1,
29657
29726
  italic: (e) => (e == null ? void 0 : e.it) === 1,
29658
29727
  "strike-through": (e) => (e == null ? void 0 : e.cl) === 1,
29659
29728
  underline: (e) => (e == null ? void 0 : e.un) === 1
29660
29729
  };
29661
- function y1(e) {
29662
- return xh[e];
29663
- }
29664
- function b1(e) {
29730
+ function w1(e) {
29665
29731
  return Ih[e];
29666
29732
  }
29733
+ function v1(e) {
29734
+ return qh[e];
29735
+ }
29667
29736
  function Wr(e) {
29668
29737
  return `${e}px`;
29669
29738
  }
@@ -29713,7 +29782,7 @@ function nn(e) {
29713
29782
  }
29714
29783
  return t + n;
29715
29784
  }
29716
- function qh(e) {
29785
+ function Dh(e) {
29717
29786
  let t = "", n = "", r = 0, a = !0;
29718
29787
  for (; e > 0; ) {
29719
29788
  const l = e % 10;
@@ -29721,13 +29790,13 @@ function qh(e) {
29721
29790
  }
29722
29791
  return n;
29723
29792
  }
29724
- function Dh(e) {
29793
+ function Oh(e) {
29725
29794
  let t = "", n = "", r = 0, a = !1;
29726
29795
  if (e === 0)
29727
29796
  return Ke.chnNumChar2[0];
29728
29797
  for (; e > 0; ) {
29729
29798
  const l = e % 1e4;
29730
- a && (n = Ke.chnNumChar2[0] + n), t = qh(l), t += l !== 0 ? Ke.chnUnitSection[r] : Ke.chnUnitSection[0], n = t + n, a = l < 1e3 && l > 0, e = Math.floor(e / 1e4), r += 1;
29799
+ a && (n = Ke.chnNumChar2[0] + n), t = Dh(l), t += l !== 0 ? Ke.chnUnitSection[r] : Ke.chnUnitSection[0], n = t + n, a = l < 1e3 && l > 0, e = Math.floor(e / 1e4), r += 1;
29731
29800
  }
29732
29801
  return n;
29733
29802
  }
@@ -29780,7 +29849,7 @@ function lr(e) {
29780
29849
  }
29781
29850
  return t;
29782
29851
  }
29783
- function Oh(e) {
29852
+ function Fh(e) {
29784
29853
  let t = !0;
29785
29854
  const n = e[1] / e[0];
29786
29855
  for (let r = 1; r < e.length; r += 1)
@@ -29790,7 +29859,7 @@ function Oh(e) {
29790
29859
  }
29791
29860
  return t;
29792
29861
  }
29793
- function Fh(e) {
29862
+ function Lh(e) {
29794
29863
  const t = [];
29795
29864
  for (let n = 1; n <= e; n += 1)
29796
29865
  t.push(n);
@@ -29834,13 +29903,13 @@ function xu({ width: e, height: t, top: n, left: r }, a) {
29834
29903
  );
29835
29904
  l && (l.style.left = Wr(r), l.style.width = Wr(e), l.style.top = Wr(n), l.style.height = Wr(t), l.style.display = "block");
29836
29905
  }
29837
- function Lh(e) {
29906
+ function Bh(e) {
29838
29907
  const t = e.querySelector(
29839
29908
  ".fortune-cell-selected-extend"
29840
29909
  );
29841
29910
  t && (t.style.display = "none");
29842
29911
  }
29843
- function w1(e, t, n) {
29912
+ function _1(e, t, n) {
29844
29913
  e.luckysheet_cell_selected_extend = !0, e.luckysheet_scroll_status = !0;
29845
29914
  const { scrollLeft: r, scrollTop: a } = e, l = n.getBoundingClientRect(), o = t.pageX - l.left - e.rowHeaderWidth + r, i = t.pageY - l.top - e.columnHeaderHeight + a, u = Un(i, e.visibledatarow), s = u[0], c = u[1], f = u[2], m = zn(o, e.visibledatacolumn), d = m[0], p = m[1], g = m[2];
29846
29915
  e.luckysheet_cell_selected_extend_index = [f, g], xu(
@@ -29853,7 +29922,7 @@ function w1(e, t, n) {
29853
29922
  n
29854
29923
  );
29855
29924
  }
29856
- function v1(e, t, n, r, a) {
29925
+ function T1(e, t, n, r, a) {
29857
29926
  const { scrollLeft: l } = n, { scrollTop: o } = r, i = a.getBoundingClientRect(), u = t.pageX - i.left - e.rowHeaderWidth + l, s = t.pageY - i.top - e.columnHeaderHeight + o, c = Un(s, e.visibledatarow), f = c[1], m = c[0], d = c[2], p = zn(u, e.visibledatacolumn), g = p[1], y = p[0], b = p[2], w = e.luckysheet_cell_selected_extend_index[0], v = e.luckysheet_cell_selected_extend_index[1];
29858
29927
  if (!e.luckysheet_select_save) return;
29859
29928
  let _ = e.luckysheet_select_save[0].row[0], T = e.luckysheet_select_save[0].row[1], C = e.luckysheet_select_save[0].column[0], $ = e.luckysheet_select_save[0].column[1], S = e.luckysheet_select_save[0].top_move, N = e.luckysheet_select_save[0].height_move, M = e.luckysheet_select_save[0].left_move, z = e.luckysheet_select_save[0].width_move;
@@ -29867,13 +29936,13 @@ function Yt(e, t) {
29867
29936
  }
29868
29937
  return n;
29869
29938
  }
29870
- function Bh(e, t, n) {
29939
+ function Ph(e, t, n) {
29871
29940
  const r = [], a = [];
29872
29941
  for (let l = 0; l < e.length; l += 1) {
29873
29942
  const o = h.cloneDeep(e[l]);
29874
29943
  o != null && a.push(Number(o.v));
29875
29944
  }
29876
- if (e.length > 2 && Oh(a) && e[0] != null && e[1] != null)
29945
+ if (e.length > 2 && Fh(a) && e[0] != null && e[1] != null)
29877
29946
  for (let l = 1; l <= t; l += 1) {
29878
29947
  const o = (l - 1) % e.length, i = h.cloneDeep(e[o]);
29879
29948
  if (i != null) {
@@ -29882,7 +29951,7 @@ function Bh(e, t, n) {
29882
29951
  }
29883
29952
  }
29884
29953
  else {
29885
- const l = Fh(e.length);
29954
+ const l = Lh(e.length);
29886
29955
  for (let o = 1; o <= t; o += 1) {
29887
29956
  const i = (o - 1) % e.length, u = h.cloneDeep(e[i]);
29888
29957
  if (u != null) {
@@ -29893,7 +29962,7 @@ function Bh(e, t, n) {
29893
29962
  }
29894
29963
  return r;
29895
29964
  }
29896
- function Ph(e, t, n) {
29965
+ function Hh(e, t, n) {
29897
29966
  var l;
29898
29967
  const r = [], a = /0|([1-9]+[0-9]*)/g;
29899
29968
  for (let o = 1; o <= t; o += 1) {
@@ -29944,7 +30013,7 @@ function is(e, t, n) {
29944
30013
  }
29945
30014
  return r;
29946
30015
  }
29947
- function Hh(e, t, n) {
30016
+ function Uh(e, t, n) {
29948
30017
  var a;
29949
30018
  const r = [];
29950
30019
  for (let l = 1; l <= t; l += 1) {
@@ -29959,7 +30028,7 @@ function Hh(e, t, n) {
29959
30028
  }
29960
30029
  return r;
29961
30030
  }
29962
- function Uh(e, t, n) {
30031
+ function zh(e, t, n) {
29963
30032
  var a;
29964
30033
  const r = [];
29965
30034
  for (let l = 1; l <= t; l += 1) {
@@ -29981,7 +30050,7 @@ function Uh(e, t, n) {
29981
30050
  }
29982
30051
  return r;
29983
30052
  }
29984
- function zh(e, t, n) {
30053
+ function Yh(e, t, n) {
29985
30054
  var a;
29986
30055
  const r = [];
29987
30056
  for (let l = 1; l <= t; l += 1) {
@@ -30011,7 +30080,7 @@ function ss(e, t, n) {
30011
30080
  if (u != null && i != null) {
30012
30081
  const s = nn(`${u}`) + n * l;
30013
30082
  let c;
30014
- s <= 0 ? c = "零" : c = Dh(s), i.v = c, i.m = c.toString(), r.push(i);
30083
+ s <= 0 ? c = "零" : c = Oh(s), i.v = c, i.m = c.toString(), r.push(i);
30015
30084
  }
30016
30085
  }
30017
30086
  return r;
@@ -30065,7 +30134,7 @@ function _t(e, t, n, r, a) {
30065
30134
  (n === "up" || n === "left") && e.reverse(), l = Yt(e, t);
30066
30135
  else if (r === "1")
30067
30136
  if (a === "number")
30068
- l = Bh(e, t, n);
30137
+ l = Ph(e, t, n);
30069
30138
  else if (a === "extendNumber") {
30070
30139
  const I = [];
30071
30140
  for (let L = 0; L < e.length; L += 1) {
@@ -30074,7 +30143,7 @@ function _t(e, t, n, r, a) {
30074
30143
  }
30075
30144
  if ((n === "up" || n === "left") && (e.reverse(), I.reverse()), lr(I)) {
30076
30145
  const L = I[1] - I[0];
30077
- l = Ph(e, t, L);
30146
+ l = Hh(e, t, L);
30078
30147
  } else
30079
30148
  l = Yt(e, t);
30080
30149
  } else if (a === "date") {
@@ -30104,7 +30173,7 @@ function _t(e, t, n, r, a) {
30104
30173
  if ((n === "up" || n === "left") && (e.reverse(), L.reverse()), lr(L))
30105
30174
  if (I || L[L.length - 1] < 6 && L[0] > 0 || L[0] < 6 && L[L.length - 1] > 0) {
30106
30175
  const H = L[1] - L[0];
30107
- l = Hh(e, t, H);
30176
+ l = Uh(e, t, H);
30108
30177
  } else {
30109
30178
  const H = L[1] - L[0];
30110
30179
  l = ss(e, t, H);
@@ -30124,7 +30193,7 @@ function _t(e, t, n, r, a) {
30124
30193
  }
30125
30194
  if ((n === "up" || n === "left") && (e.reverse(), I.reverse()), lr(I)) {
30126
30195
  const pe = I[1] - I[0];
30127
- l = Uh(e, t, pe);
30196
+ l = zh(e, t, pe);
30128
30197
  } else
30129
30198
  l = Yt(e, t);
30130
30199
  } else if (a === "chnWeek3") {
@@ -30140,7 +30209,7 @@ function _t(e, t, n, r, a) {
30140
30209
  }
30141
30210
  if ((n === "up" || n === "left") && (e.reverse(), I.reverse()), lr(I)) {
30142
30211
  const pe = I[1] - I[0];
30143
- l = zh(e, t, pe);
30212
+ l = Yh(e, t, pe);
30144
30213
  } else
30145
30214
  l = Yt(e, t);
30146
30215
  } else
@@ -30349,7 +30418,7 @@ function _t(e, t, n, r, a) {
30349
30418
  I != null && delete I.ps;
30350
30419
  }), l;
30351
30420
  }
30352
- function Yh(e, t, n, r, a, l) {
30421
+ function Vh(e, t, n, r, a, l) {
30353
30422
  const o = [];
30354
30423
  let i, u, s, c;
30355
30424
  l === "down" || l === "up" ? (i = r, u = a, s = t, c = n) : (i = t, u = n, s = r, c = a);
@@ -30526,7 +30595,7 @@ function qu(e) {
30526
30595
  if (a == null) return;
30527
30596
  const l = e.luckysheetfile[a], o = new Set(Object.keys(((M = l.config) == null ? void 0 : M.rowhidden) || {})), i = new Set(Object.keys(((z = l.config) == null ? void 0 : z.colhidden) || {})), u = h.cloneDeep(e.config);
30528
30597
  u.borderInfo == null && (u.borderInfo = []);
30529
- const s = Ko(e, e.currentSheetId), c = h.cloneDeep(l.dataVerification), { direction: f } = Ke, { copyRange: m } = Ke, d = m.row[0], p = m.row[1], g = m.column[0], y = m.column[1], b = Yh(
30598
+ const s = Ko(e, e.currentSheetId), c = h.cloneDeep(l.dataVerification), { direction: f } = Ke, { copyRange: m } = Ke, d = m.row[0], p = m.row[1], g = m.column[0], y = m.column[1], b = Vh(
30530
30599
  t,
30531
30600
  d,
30532
30601
  p,
@@ -30553,7 +30622,7 @@ function qu(e) {
30553
30622
  O.f,
30554
30623
  "down",
30555
30624
  Y - _ + 1
30556
- )}`, V = Lt(e, Z, Y, F);
30625
+ )}`, V = Ft(e, Z, Y, F);
30557
30626
  ln(e, Y, F, V[1], void 0, t), [, O.v, O.f] = V;
30558
30627
  const { afterUpdateCell: ge } = e.hooks;
30559
30628
  if (ge && (ge(Y, F, null, {
@@ -30634,7 +30703,7 @@ function qu(e) {
30634
30703
  O.f,
30635
30704
  "up",
30636
30705
  T - Y + 1
30637
- )}`, V = Lt(e, Z, Y, F);
30706
+ )}`, V = Ft(e, Z, Y, F);
30638
30707
  ln(e, Y, F, V[1], void 0, t), [, O.v, O.f] = V;
30639
30708
  const { afterUpdateCell: ge } = e.hooks;
30640
30709
  if (ge && (ge(Y, F, null, {
@@ -30719,7 +30788,7 @@ function qu(e) {
30719
30788
  O.f,
30720
30789
  "right",
30721
30790
  Y - C + 1
30722
- )}`, V = Lt(e, Z, F, Y);
30791
+ )}`, V = Ft(e, Z, F, Y);
30723
30792
  ln(e, Y, F, V[1], void 0, t), [, O.v, O.f] = V;
30724
30793
  const { afterUpdateCell: ge } = e.hooks;
30725
30794
  if (ge && (ge(F, Y, null, {
@@ -30798,7 +30867,7 @@ function qu(e) {
30798
30867
  O.f,
30799
30868
  "left",
30800
30869
  $ - Y + 1
30801
- )}`, V = Lt(e, Z, F, Y);
30870
+ )}`, V = Ft(e, Z, F, Y);
30802
30871
  ln(e, Y, F, V[1], void 0, t), [, O.v, O.f] = V;
30803
30872
  const { afterUpdateCell: ge } = e.hooks;
30804
30873
  if (ge && (ge(F, Y, null, {
@@ -30895,9 +30964,9 @@ function qu(e) {
30895
30964
  }
30896
30965
  l.dataVerification = c, Wo(e, t, e.luckysheet_select_save);
30897
30966
  }
30898
- function _1(e, t, n) {
30967
+ function $1(e, t, n) {
30899
30968
  var b, w, v;
30900
- e.luckysheet_cell_selected_extend = !1, Lh(n);
30969
+ e.luckysheet_cell_selected_extend = !1, Bh(n);
30901
30970
  const { scrollLeft: r, scrollTop: a } = e, l = n.getBoundingClientRect(), o = t.pageX - l.left - e.rowHeaderWidth + r, i = t.pageY - l.top - e.columnHeaderHeight + a, u = Un(i, e.visibledatarow), s = u[0], c = u[2], f = zn(o, e.visibledatacolumn), m = f[0], d = f[2], p = e.luckysheet_cell_selected_extend_index[0], g = e.luckysheet_cell_selected_extend_index[1], y = (b = e.luckysheet_select_save) == null ? void 0 : b[e.luckysheet_select_save.length - 1];
30902
30971
  if (y && y.top != null && y.left != null && y.height != null && y.width != null && y.row_focus != null && y.column_focus != null) {
30903
30972
  let _ = y.row[0], T = y.row[1], C = y.column[0], $ = y.column[1];
@@ -30969,7 +31038,7 @@ function _1(e, t, n) {
30969
31038
  Q && (Q.style.display = "none");
30970
31039
  }
30971
31040
  }
30972
- function Vh(e, t, n) {
31041
+ function Wh(e, t, n) {
30973
31042
  let r = e.length;
30974
31043
  const a = Et(n).pivotTable, { title: l } = a;
30975
31044
  for (let o = 0; o < e.length; o += 1)
@@ -30981,7 +31050,7 @@ function Vh(e, t, n) {
30981
31050
  }
30982
31051
  return t ? l + (r + 1) : `Sheet${r + 1}`;
30983
31052
  }
30984
- function Wh(e) {
31053
+ function Gh(e) {
30985
31054
  let t;
30986
31055
  e.indexOf("rgba") > -1 ? t = e.replace("rgba(", "").replace(")", "").split(",") : t = e.replace("rgb(", "").replace(")", "").split(",");
30987
31056
  const n = Number(t[0]), r = Number(t[1]), a = Number(t[2]);
@@ -30993,7 +31062,7 @@ function rt(e) {
30993
31062
  a = String.fromCharCode(e % 26 + 97) + a, e = Math.floor(e / 26) - 1;
30994
31063
  return a.toUpperCase();
30995
31064
  }
30996
- function qt(e) {
31065
+ function It(e) {
30997
31066
  if (e == null || e.length === 0)
30998
31067
  return NaN;
30999
31068
  const t = e.toLowerCase().split(""), n = t.length, r = (o) => o.charCodeAt(0) - 96;
@@ -31002,7 +31071,7 @@ function qt(e) {
31002
31071
  l = r(t[o]), a += l * 26 ** (n - o - 1);
31003
31072
  return a === 0 ? NaN : a - 1;
31004
31073
  }
31005
- function Gh(e) {
31074
+ function jh(e) {
31006
31075
  return typeof e != "string" ? e : e.replace(/<script>/g, "&lt;script&gt;").replace(/<\/script>/, "&lt;/script&gt;");
31007
31076
  }
31008
31077
  function Cr(e) {
@@ -31026,7 +31095,7 @@ function Ma(e, t) {
31026
31095
  const n = Ee(e, t);
31027
31096
  return h.isNil(n) ? null : e.luckysheetfile[n];
31028
31097
  }
31029
- function T1(e) {
31098
+ function C1(e) {
31030
31099
  const t = /* @__PURE__ */ new Date(), n = t.getFullYear();
31031
31100
  let r = t.getMonth(), a = t.getDate(), l = t.getHours(), o = t.getMinutes(), i = t.getSeconds();
31032
31101
  r += 1, r < 10 && (r = `0${r}`), a < 10 && (a = `0${a}`), l < 10 && (l = `0${l}`), o < 10 && (o = `0${o}`), i < 10 && (i = `0${i}`);
@@ -31039,10 +31108,10 @@ function fs(e, t) {
31039
31108
  return typeof a < "u" ? a : n;
31040
31109
  });
31041
31110
  }
31042
- function $1(e) {
31111
+ function N1(e) {
31043
31112
  return e.replace("~*", "\\*").replace("~?", "\\?").replace(".", "\\.").replace("*", ".*").replace("?", ".");
31044
31113
  }
31045
- function C1(e) {
31114
+ function S1(e) {
31046
31115
  let a = "";
31047
31116
  for (; e >= 0; )
31048
31117
  a = String.fromCharCode(e % 26 + 97) + a, e = Math.floor(e / 26) - 1;
@@ -31082,10 +31151,10 @@ function Du(e, t) {
31082
31151
  return !0;
31083
31152
  }) && (h.isUndefined(e.isFlvReadOnly) ? !0 : e.isFlvReadOnly);
31084
31153
  }
31085
- function jh(e) {
31154
+ function Xh(e) {
31086
31155
  return /^[a-zA-Z]\d+$/.test(e);
31087
31156
  }
31088
- function Xh(e) {
31157
+ function Zh(e) {
31089
31158
  const t = document.createElement("div");
31090
31159
  t.innerHTML = e;
31091
31160
  const n = t.querySelectorAll("span");
@@ -31150,7 +31219,7 @@ function Fu(e, t, n) {
31150
31219
  }
31151
31220
  }), s || u;
31152
31221
  }
31153
- function Zh(e, t) {
31222
+ function Kh(e, t) {
31154
31223
  var l;
31155
31224
  let n = "";
31156
31225
  const r = e.includes("."), a = t;
@@ -31170,7 +31239,7 @@ const Zt = new Error("invalid params"), _o = new Error("sheet not found"), To =
31170
31239
  a != null && Bn(a) && t.push({ r: n, c: r, v: a });
31171
31240
  }
31172
31241
  return t;
31173
- }, N1 = (e, t, n, r) => {
31242
+ }, k1 = (e, t, n, r) => {
31174
31243
  const a = h.maxBy(e, "r"), l = h.maxBy(e, "c");
31175
31244
  let o = ((a == null ? void 0 : a.r) ?? 0) + 1, i = ((l == null ? void 0 : l.c) ?? 0) + 1;
31176
31245
  t != null && n != null && t > 0 && n > 0 && (o = Math.max(o, t), i = Math.max(i, n));
@@ -31195,11 +31264,11 @@ function At(e, t = {}) {
31195
31264
  throw _o;
31196
31265
  return r;
31197
31266
  }
31198
- function S1(e, t = {}) {
31267
+ function A1(e, t = {}) {
31199
31268
  const n = At(e, t);
31200
31269
  return { ...n, celldata: To(n.data) };
31201
31270
  }
31202
- function k1(e, t, n, r = {}) {
31271
+ function E1(e, t, n, r = {}) {
31203
31272
  var s;
31204
31273
  if (!h.isNumber(t) || !h.isNumber(n))
31205
31274
  throw new Error("row or column cannot be null or undefined");
@@ -31256,12 +31325,12 @@ function Lu(e, t, n, r, a, l = {}, o) {
31256
31325
  // quotePrefix, show number as string
31257
31326
  };
31258
31327
  if (r == null || r.toString().length === 0)
31259
- Ft(e, t, n), It(e, t, n, u, r);
31328
+ Ot(e, t, n), Lt(e, t, n, u, r);
31260
31329
  else if (r instanceof Object) {
31261
31330
  const g = {};
31262
31331
  ((c = u == null ? void 0 : u[t]) == null ? void 0 : c[n]) == null && (u[t][n] = {});
31263
31332
  const y = u[t][n];
31264
- r.f != null && r.v == null ? (g.f = r.f, r.ct != null && (g.ct = r.ct), yo(e, t, n, a, g)) : (r.ct != null && (g.ct = r.ct), r.f != null && (g.f = r.f), r.v != null ? g.v = r.v : g.v = y.v, r.m != null && (g.m = r.m), Ft(e, t, n), It(e, t, n, u, g)), h.forEach(r, (b, w) => {
31333
+ r.f != null && r.v == null ? (g.f = r.f, r.ct != null && (g.ct = r.ct), yo(e, t, n, a, g)) : (r.ct != null && (g.ct = r.ct), r.f != null && (g.f = r.f), r.v != null ? g.v = r.v : g.v = y.v, r.m != null && (g.m = r.m), Ot(e, t, n), Lt(e, t, n, u, g)), h.forEach(r, (b, w) => {
31265
31334
  w in s && o ? ku(
31266
31335
  e,
31267
31336
  u,
@@ -31274,10 +31343,10 @@ function Lu(e, t, n, r, a, l = {}, o) {
31274
31343
  ) : y[w] = b;
31275
31344
  }), u[t][n] = y;
31276
31345
  } else
31277
- r.toString().substr(0, 1) === "=" || r.toString().substr(0, 5) === "<span" ? yo(e, t, n, a, r) : (Ft(e, t, n), It(e, t, n, u, r));
31346
+ r.toString().substr(0, 1) === "=" || r.toString().substr(0, 5) === "<span" ? yo(e, t, n, a, r) : (Ot(e, t, n), Lt(e, t, n, u, r));
31278
31347
  o && ((m = (f = e.hooks).onLocalCellEdit) == null || m.call(f), e.hooks.afterUpdateCell && ((p = (d = e.hooks).afterUpdateCell) == null || p.call(d, t, n, null, r)));
31279
31348
  }
31280
- function Kh(e, t, n, r) {
31349
+ function Qh(e, t, n, r) {
31281
31350
  e.celldata || (e.celldata = []);
31282
31351
  const a = e.celldata.findIndex((u) => u.r === t && u.c === n);
31283
31352
  if (r == null || typeof r == "string" && r.length === 0 || r instanceof Object && !Bn(r)) {
@@ -31294,41 +31363,41 @@ function Kh(e, t, n, r) {
31294
31363
  const i = { r: t, c: n, v: o };
31295
31364
  a >= 0 ? e.celldata[a] = i : e.celldata.push(i);
31296
31365
  }
31297
- function A1(e, t, n, r, a = {}) {
31366
+ function M1(e, t, n, r, a = {}) {
31298
31367
  if (!h.isNumber(t) || !h.isNumber(n))
31299
31368
  throw new Error("row or column cannot be null or undefined");
31300
31369
  const l = At(e, a), o = a.id ?? l.id ?? e.currentSheetId, { data: i } = l;
31301
31370
  if (!i) {
31302
- if (Kh(l, t, n, r), r == null || r.toString().length === 0)
31303
- Ft(e, t, n, o);
31371
+ if (Qh(l, t, n, r), r == null || r.toString().length === 0)
31372
+ Ot(e, t, n, o);
31304
31373
  else if (r instanceof Object)
31305
- r.f != null ? On(e, t, n, o) : Ft(e, t, n, o);
31374
+ r.f != null ? On(e, t, n, o) : Ot(e, t, n, o);
31306
31375
  else {
31307
31376
  const s = r.toString();
31308
- s.substr(0, 1) === "=" || s.substr(0, 5) === "<span" ? On(e, t, n, o) : Ft(e, t, n, o);
31377
+ s.substr(0, 1) === "=" || s.substr(0, 5) === "<span" ? On(e, t, n, o) : Ot(e, t, n, o);
31309
31378
  }
31310
31379
  return;
31311
31380
  }
31312
31381
  if (r == null || r.toString().length === 0) {
31313
- Ft(e, t, n, o), It(e, t, n, i, r);
31382
+ Ot(e, t, n, o), i[t][n] = null;
31314
31383
  return;
31315
31384
  }
31316
31385
  if (r instanceof Object) {
31317
31386
  const s = h.cloneDeep(r);
31318
- i[t][n] = s, s.f != null ? On(e, t, n, o) : Ft(e, t, n, o);
31387
+ i[t][n] = s, s.f != null ? On(e, t, n, o) : Ot(e, t, n, o);
31319
31388
  return;
31320
31389
  }
31321
31390
  const u = r.toString();
31322
- u.substr(0, 1) === "=" || u.substr(0, 5) === "<span" ? (It(e, t, n, i, { f: u }), On(e, t, n, o)) : (Ft(e, t, n, o), It(e, t, n, i, r));
31391
+ u.substr(0, 1) === "=" || u.substr(0, 5) === "<span" ? (Lt(e, t, n, i, { f: u }), On(e, t, n, o)) : (Ot(e, t, n, o), Lt(e, t, n, i, r));
31323
31392
  }
31324
- function E1(e, t, n, r = {}) {
31393
+ function R1(e, t, n, r = {}) {
31325
31394
  var o, i;
31326
31395
  if (!h.isNumber(t) || !h.isNumber(n))
31327
31396
  throw new Error("row or column cannot be null or undefined");
31328
31397
  const a = At(e, r), l = (i = (o = a.data) == null ? void 0 : o[t]) == null ? void 0 : i[n];
31329
- l && h.isPlainObject(l) && (delete l.m, delete l.v, l.f != null && (delete l.f, Ft(e, t, n, a.id), delete l.spl));
31398
+ l && h.isPlainObject(l) && (delete l.m, delete l.v, l.f != null && (delete l.f, Ot(e, t, n, a.id), delete l.spl));
31330
31399
  }
31331
- function M1(e, t, n, r, a, l = {}) {
31400
+ function x1(e, t, n, r, a, l = {}) {
31332
31401
  var c;
31333
31402
  if (!h.isNumber(t) || !h.isNumber(n))
31334
31403
  throw new Error("row or column cannot be null or undefined");
@@ -31339,7 +31408,7 @@ function M1(e, t, n, r, a, l = {}) {
31339
31408
  throw new Error(
31340
31409
  "'fa' and 't' should be present in value when attr is 'ct'"
31341
31410
  );
31342
- if (r === "ct" && !h.isNil(u.v) && (u.m = Ot.format(a.fa, u.v)), r === "bd") {
31411
+ if (r === "ct" && !h.isNil(u.v) && (u.m = Dt.format(a.fa, u.v)), r === "bd") {
31343
31412
  s.borderInfo == null && (s.borderInfo = []);
31344
31413
  const f = {
31345
31414
  rangeType: "range",
@@ -31359,12 +31428,12 @@ function M1(e, t, n, r, a, l = {}) {
31359
31428
  u[r] = a;
31360
31429
  i[t][n] = u, o.config = s, e.config = s;
31361
31430
  }
31362
- function R1(e, t, n, r) {
31431
+ function I1(e, t, n, r) {
31363
31432
  Ke.copyRange = t, Ke.applyRange = n, Ke.direction = r;
31364
31433
  const a = Iu(e);
31365
31434
  !a[0] && !a[1] && !a[2] && !a[3] && !a[4] && !a[5] && !a[6] ? Ke.applyType = "0" : Ke.applyType = "1", qu(e);
31366
31435
  }
31367
- function x1(e, t, n, r = {}) {
31436
+ function q1(e, t, n, r = {}) {
31368
31437
  const a = At(e, r), o = {
31369
31438
  row: "rangeRow",
31370
31439
  column: "rangeColumn",
@@ -31379,7 +31448,7 @@ function x1(e, t, n, r = {}) {
31379
31448
  }
31380
31449
  };
31381
31450
  }
31382
- function I1(e, t, n, r, a, l = {}) {
31451
+ function D1(e, t, n, r, a, l = {}) {
31383
31452
  if (!["row", "column"].includes(t) || !h.isNumber(n) || !h.isNumber(r) || !["lefttop", "rightbottom"].includes(a))
31384
31453
  throw Zt;
31385
31454
  const o = At(e, l);
@@ -31395,13 +31464,13 @@ function I1(e, t, n, r, a, l = {}) {
31395
31464
  console.error(i);
31396
31465
  }
31397
31466
  }
31398
- function q1(e, t, n, r, a = {}) {
31467
+ function O1(e, t, n, r, a = {}) {
31399
31468
  if (!["row", "column"].includes(t) || !h.isNumber(n) || !h.isNumber(r))
31400
31469
  throw Zt;
31401
31470
  const l = At(e, a);
31402
31471
  Tu(e, { type: t, start: n, end: r, id: l.id });
31403
31472
  }
31404
- function D1(e, t, n) {
31473
+ function F1(e, t, n) {
31405
31474
  if (!["row", "column"].includes(n))
31406
31475
  throw Zt;
31407
31476
  if (!e || !e.config) return;
@@ -31420,7 +31489,7 @@ function D1(e, t, n) {
31420
31489
  }
31421
31490
  e.luckysheetfile[r].config = e.config;
31422
31491
  }
31423
- function O1(e, t, n) {
31492
+ function L1(e, t, n) {
31424
31493
  if (!["row", "column"].includes(n))
31425
31494
  throw Zt;
31426
31495
  if (!e || !e.config) return;
@@ -31439,7 +31508,7 @@ function O1(e, t, n) {
31439
31508
  }
31440
31509
  e.luckysheetfile[r].config = e.config;
31441
31510
  }
31442
- function Qh(e, t, n = {}, r = !1) {
31511
+ function Jh(e, t, n = {}, r = !1) {
31443
31512
  if (!h.isPlainObject(t))
31444
31513
  throw Zt;
31445
31514
  const a = At(e, n), l = a.config || {};
@@ -31455,7 +31524,7 @@ function Qh(e, t, n = {}, r = !1) {
31455
31524
  }
31456
31525
  }), a.config = l, e.currentSheetId === a.id && (e.config = l);
31457
31526
  }
31458
- function F1(e, t, n = {}, r = !1) {
31527
+ function B1(e, t, n = {}, r = !1) {
31459
31528
  if (!h.isPlainObject(t))
31460
31529
  throw Zt;
31461
31530
  const a = At(e, n), l = a.config || {};
@@ -31471,7 +31540,7 @@ function F1(e, t, n = {}, r = !1) {
31471
31540
  }
31472
31541
  }), a.config = l, e.currentSheetId === a.id && (e.config = l);
31473
31542
  }
31474
- function Jh(e, t, n = {}) {
31543
+ function ep(e, t, n = {}) {
31475
31544
  if (!h.isArray(t) || t.length === 0)
31476
31545
  throw Zt;
31477
31546
  const l = (At(e, n).config || {}).rowlen || {}, o = {};
@@ -31482,7 +31551,7 @@ function Jh(e, t, n = {}) {
31482
31551
  }
31483
31552
  }), o;
31484
31553
  }
31485
- function L1(e, t, n = {}) {
31554
+ function P1(e, t, n = {}) {
31486
31555
  if (!h.isArray(t) || t.length === 0)
31487
31556
  throw Zt;
31488
31557
  const l = (At(e, n).config || {}).columnlen || {}, o = {};
@@ -31493,7 +31562,7 @@ function L1(e, t, n = {}) {
31493
31562
  }
31494
31563
  }), o;
31495
31564
  }
31496
- function ep(e, t, n, r = !1, a = void 0, l = void 0) {
31565
+ function tp(e, t, n, r = !1, a = void 0, l = void 0) {
31497
31566
  Dm(
31498
31567
  e,
31499
31568
  t,
@@ -31503,22 +31572,22 @@ function ep(e, t, n, r = !1, a = void 0, l = void 0) {
31503
31572
  l
31504
31573
  );
31505
31574
  }
31506
- function B1(e, t = {}) {
31575
+ function H1(e, t = {}) {
31507
31576
  const n = At(e, t);
31508
31577
  Om(e, n.id);
31509
31578
  }
31510
- function P1(e, t) {
31579
+ function U1(e, t) {
31511
31580
  Fm(e, t);
31512
31581
  }
31513
- function H1(e, t = {}) {
31582
+ function z1(e, t = {}) {
31514
31583
  const n = At(e, t);
31515
31584
  e.currentSheetId = n.id;
31516
31585
  }
31517
- function U1(e, t, n = {}) {
31586
+ function Y1(e, t, n = {}) {
31518
31587
  const r = At(e, n);
31519
31588
  r.name = t;
31520
31589
  }
31521
- function tp(e, t) {
31590
+ function np(e, t) {
31522
31591
  var n;
31523
31592
  (n = e.luckysheetfile) == null || n.forEach((r) => {
31524
31593
  r.id in t && (r.order = t[r.id]);
@@ -31526,7 +31595,7 @@ function tp(e, t) {
31526
31595
  r.order = a;
31527
31596
  });
31528
31597
  }
31529
- function z1(e, t, n, r) {
31598
+ function V1(e, t, n, r) {
31530
31599
  if (r.scrollLeft != null) {
31531
31600
  if (!h.isNumber(r.scrollLeft))
31532
31601
  throw Zt;
@@ -31548,17 +31617,17 @@ function z1(e, t, n, r) {
31548
31617
  n && (n.scrollTop = a);
31549
31618
  }
31550
31619
  }
31551
- function np(e) {
31620
+ function rp(e) {
31552
31621
  return Number.isFinite(Number(e)) && !Number.isNaN(Number(e));
31553
31622
  }
31554
- function rp(e) {
31623
+ function ap(e) {
31555
31624
  return /^0x?[a-fA-F0-9]+$/.test(e);
31556
31625
  }
31557
31626
  const ds = "#f3f3f3", ms = 5;
31558
31627
  function Bu(e) {
31559
31628
  return typeof e != "string" ? !1 : ["price", "fully_diluted_value"].includes(e) || e.toLowerCase().includes("usd") || e.toLowerCase().includes("price_in");
31560
31629
  }
31561
- const Pu = `$#,##0.${"0".repeat(2)}`, ap = (e, t, n, r) => {
31630
+ const Pu = `$#,##0.${"0".repeat(2)}`, op = (e, t, n, r) => {
31562
31631
  var l;
31563
31632
  if (!n.length) return e;
31564
31633
  const a = n.map((o) => {
@@ -31578,7 +31647,7 @@ const Pu = `$#,##0.${"0".repeat(2)}`, ap = (e, t, n, r) => {
31578
31647
  {},
31579
31648
  !1
31580
31649
  ), e + n.length;
31581
- }, op = ({
31650
+ }, lp = ({
31582
31651
  row: e,
31583
31652
  column: t,
31584
31653
  newValue: n,
@@ -31596,7 +31665,7 @@ const Pu = `$#,##0.${"0".repeat(2)}`, ap = (e, t, n, r) => {
31596
31665
  return;
31597
31666
  }
31598
31667
  let i = e;
31599
- o != null && o.length && (i = ap(
31668
+ o != null && o.length && (i = op(
31600
31669
  e,
31601
31670
  t,
31602
31671
  o,
@@ -31663,7 +31732,7 @@ const Pu = `$#,##0.${"0".repeat(2)}`, ap = (e, t, n, r) => {
31663
31732
  }
31664
31733
  }
31665
31734
  } else {
31666
- if (lp({
31735
+ if (ip({
31667
31736
  row: i,
31668
31737
  column: t,
31669
31738
  apiData: r,
@@ -31724,7 +31793,7 @@ const Pu = `$#,##0.${"0".repeat(2)}`, ap = (e, t, n, r) => {
31724
31793
  var l, o, i;
31725
31794
  const r = (o = (l = n.current) == null ? void 0 : l.getSheet()) == null ? void 0 : o.data, a = (i = r == null ? void 0 : r[e]) == null ? void 0 : i[t];
31726
31795
  return a == null ? {} : typeof a == "object" ? { ...a } : { v: a };
31727
- }, $o = (e) => np(e) && !rp(e), Hu = (e) => Array.isArray(e) ? e.map((t) => ({ ...t })) : e, mr = (e, t, n) => {
31796
+ }, $o = (e) => rp(e) && !ap(e), Hu = (e) => Array.isArray(e) ? e.map((t) => ({ ...t })) : e, mr = (e, t, n) => {
31728
31797
  const r = $o(e);
31729
31798
  if (n && r && Bu(n)) {
31730
31799
  const { s: i, ...u } = t || {};
@@ -31749,7 +31818,7 @@ const Pu = `$#,##0.${"0".repeat(2)}`, ap = (e, t, n, r) => {
31749
31818
  if (!e || typeof e != "object") return e ?? {};
31750
31819
  const t = e.ct;
31751
31820
  return !t || !Array.isArray(t.s) ? { ...e } : { ...e, ct: { ...t, s: Hu(t.s) } };
31752
- }, lp = ({
31821
+ }, ip = ({
31753
31822
  row: e,
31754
31823
  column: t,
31755
31824
  apiData: n,
@@ -31777,7 +31846,7 @@ const Pu = `$#,##0.${"0".repeat(2)}`, ap = (e, t, n, r) => {
31777
31846
  {},
31778
31847
  !0
31779
31848
  ), (d = r.current) == null || d.clearCellError(e, t), !0;
31780
- }, ip = (e) => e !== null && typeof e == "object" && !Array.isArray(e) && (e == null ? void 0 : e.responseType) === "smart-contract", sp = async ({
31849
+ }, sp = (e) => e !== null && typeof e == "object" && !Array.isArray(e) && (e == null ? void 0 : e.responseType) === "smart-contract", up = async ({
31781
31850
  result: e,
31782
31851
  handleSmartContractQuery: t,
31783
31852
  sheetEditorRef: n,
@@ -31792,7 +31861,7 @@ const Pu = `$#,##0.${"0".repeat(2)}`, ap = (e, t, n, r) => {
31792
31861
  row: r,
31793
31862
  column: a,
31794
31863
  newValue: l,
31795
- formulaResponseUiSync: op
31864
+ formulaResponseUiSync: lp
31796
31865
  }, { callSignature: i } = e;
31797
31866
  await t(o)(i);
31798
31867
  }, gs = (e, t, n) => {
@@ -31802,7 +31871,7 @@ const Pu = `$#,##0.${"0".repeat(2)}`, ap = (e, t, n, r) => {
31802
31871
  } catch {
31803
31872
  return;
31804
31873
  }
31805
- }, Y1 = async ({
31874
+ }, W1 = async ({
31806
31875
  functionCallString: e,
31807
31876
  sheetEditorRef: t,
31808
31877
  dataBlockRow: n,
@@ -31814,9 +31883,9 @@ const Pu = `$#,##0.${"0".repeat(2)}`, ap = (e, t, n, r) => {
31814
31883
  const o = await import("@fileverse-dev/formulajs"), i = e == null ? void 0 : e.match(/^(\w+)\((.*)\)$/);
31815
31884
  if (!i)
31816
31885
  throw new Error(`Invalid function call format: ${e}`);
31817
- const u = i[1].toUpperCase(), s = i[2], f = up(s).map((m) => {
31886
+ const u = i[1].toUpperCase(), s = i[2], f = cp(s).map((m) => {
31818
31887
  if (Uu(m)) {
31819
- const d = cp(m);
31888
+ const d = fp(m);
31820
31889
  return d == null ? void 0 : d.map(
31821
31890
  (g) => gs(t, g == null ? void 0 : g.row, g == null ? void 0 : g.column)
31822
31891
  );
@@ -31833,8 +31902,8 @@ const Pu = `$#,##0.${"0".repeat(2)}`, ap = (e, t, n, r) => {
31833
31902
  });
31834
31903
  if (typeof o[u] == "function") {
31835
31904
  const m = await o[u](...f);
31836
- if (ip(m)) {
31837
- await sp({
31905
+ if (sp(m)) {
31906
+ await up({
31838
31907
  result: m,
31839
31908
  handleSmartContractQuery: a,
31840
31909
  sheetEditorRef: t,
@@ -31855,7 +31924,7 @@ const Pu = `$#,##0.${"0".repeat(2)}`, ap = (e, t, n, r) => {
31855
31924
  return;
31856
31925
  }
31857
31926
  };
31858
- function up(e) {
31927
+ function cp(e) {
31859
31928
  if (!(e != null && e.trim()))
31860
31929
  return [];
31861
31930
  const t = [];
@@ -31918,7 +31987,7 @@ function Co(e) {
31918
31987
  column: a
31919
31988
  };
31920
31989
  }
31921
- function cp(e) {
31990
+ function fp(e) {
31922
31991
  if (!Uu(e))
31923
31992
  return null;
31924
31993
  const t = e.split(":"), n = Co(t[0]), r = Co(t[1]);
@@ -31939,109 +32008,109 @@ export {
31939
32008
  Go as E,
31940
32009
  at as F,
31941
32010
  ot as G,
31942
- Ft as H,
32011
+ Ot as H,
31943
32012
  bn as I,
31944
- qp as J,
32013
+ Dp as J,
31945
32014
  Tr as K,
31946
- It as L,
32015
+ Lt as L,
31947
32016
  Kt as M,
31948
32017
  Xn as N,
31949
- C1 as O,
32018
+ S1 as O,
31950
32019
  wo as P,
31951
- $1 as Q,
31952
- Lt as R,
31953
- Ap as S,
32020
+ N1 as Q,
32021
+ Ft as R,
32022
+ Ep as S,
31954
32023
  Ir as T,
31955
32024
  Sa as U,
31956
- Wh as V,
32025
+ Gh as V,
31957
32026
  ut as W,
31958
32027
  du as X,
31959
32028
  Ks as Y,
31960
32029
  Am as Z,
31961
32030
  Ko as _,
31962
32031
  Ee as a,
31963
- Rh as a$,
32032
+ xh as a$,
31964
32033
  uu as a0,
31965
- wp as a1,
32034
+ vp as a1,
31966
32035
  tc as a2,
31967
32036
  or as a3,
31968
- Wg as a4,
32037
+ Gg as a4,
31969
32038
  zn as a5,
31970
32039
  Un as a6,
31971
32040
  At as a7,
31972
32041
  Zt as a8,
31973
32042
  Um as a9,
31974
32043
  Ss as aA,
31975
- I1 as aB,
31976
- hg as aC,
31977
- z1 as aD,
32044
+ D1 as aB,
32045
+ pg as aC,
32046
+ V1 as aD,
31978
32047
  Er as aE,
31979
- F1 as aF,
31980
- Qh as aG,
31981
- U1 as aH,
31982
- tp as aI,
31983
- O1 as aJ,
31984
- $p as aK,
31985
- P1 as aL,
32048
+ B1 as aF,
32049
+ Jh as aG,
32050
+ Y1 as aH,
32051
+ np as aI,
32052
+ L1 as aJ,
32053
+ Cp as aK,
32054
+ U1 as aL,
31986
32055
  ws as aM,
31987
- ph as aN,
31988
- Og as aO,
31989
- kg as aP,
31990
- Hg as aQ,
31991
- Ug as aR,
31992
- Th as aS,
31993
- Sh as aT,
32056
+ gh as aN,
32057
+ Fg as aO,
32058
+ Ag as aP,
32059
+ Ug as aQ,
32060
+ zg as aR,
32061
+ $h as aS,
32062
+ kh as aT,
31994
32063
  Xt as aU,
31995
- wh as aV,
31996
- bh as aW,
31997
- jg as aX,
31998
- yh as aY,
31999
- gh as aZ,
32000
- xg as a_,
32064
+ vh as aV,
32065
+ wh as aW,
32066
+ Xg as aX,
32067
+ bh as aY,
32068
+ yh as aZ,
32069
+ Ig as a_,
32001
32070
  oa as aa,
32002
- M1 as ab,
32071
+ x1 as ab,
32003
32072
  Lu as ac,
32004
32073
  th as ad,
32005
32074
  To as ae,
32006
32075
  la as af,
32007
32076
  Eo as ag,
32008
32077
  cs as ah,
32009
- H1 as ai,
32010
- ep as aj,
32011
- A1 as ak,
32012
- R1 as al,
32013
- Sp as am,
32014
- Np as an,
32015
- N1 as ao,
32016
- E1 as ap,
32017
- Cp as aq,
32018
- q1 as ar,
32019
- B1 as as,
32020
- x1 as at,
32021
- _p as au,
32022
- k1 as av,
32023
- Jh as aw,
32024
- S1 as ax,
32025
- D1 as ay,
32026
- Tp as az,
32027
- vp as b,
32078
+ z1 as ai,
32079
+ tp as aj,
32080
+ M1 as ak,
32081
+ I1 as al,
32082
+ kp as am,
32083
+ Sp as an,
32084
+ k1 as ao,
32085
+ R1 as ap,
32086
+ Np as aq,
32087
+ O1 as ar,
32088
+ H1 as as,
32089
+ q1 as at,
32090
+ Tp as au,
32091
+ E1 as av,
32092
+ ep as aw,
32093
+ A1 as ax,
32094
+ F1 as ay,
32095
+ $p as az,
32096
+ _p as b,
32028
32097
  Na as b$,
32029
- Dg as b0,
32030
- qg as b1,
32031
- Ig as b2,
32032
- Mg as b3,
32033
- Rg as b4,
32034
- Fg as b5,
32035
- Gp as b6,
32098
+ Og as b0,
32099
+ Dg as b1,
32100
+ qg as b2,
32101
+ Rg as b3,
32102
+ xg as b4,
32103
+ Lg as b5,
32104
+ jp as b6,
32036
32105
  yo as b7,
32037
- Ng as b8,
32038
- Kg as b9,
32106
+ Sg as b8,
32107
+ Qg as b9,
32039
32108
  Bs as bA,
32040
- ug as bB,
32109
+ cg as bB,
32041
32110
  xr as bC,
32042
- cg as bD,
32111
+ fg as bD,
32043
32112
  ch as bE,
32044
- rg as bF,
32113
+ ag as bF,
32045
32114
  Ar as bG,
32046
32115
  na as bH,
32047
32116
  hu as bI,
@@ -32049,48 +32118,48 @@ export {
32049
32118
  Sd as bK,
32050
32119
  _a as bL,
32051
32120
  _d as bM,
32052
- Jp as bN,
32053
- eg as bO,
32121
+ eg as bN,
32122
+ tg as bO,
32054
32123
  Bm as bP,
32055
32124
  rs as bQ,
32056
- i1 as bR,
32057
- Xp as bS,
32058
- s1 as bT,
32059
- Cg as bU,
32060
- _1 as bV,
32061
- Zp as bW,
32062
- Qp as bX,
32063
- Kp as bY,
32064
- v1 as bZ,
32065
- gg as b_,
32125
+ s1 as bR,
32126
+ Zp as bS,
32127
+ u1 as bT,
32128
+ Ng as bU,
32129
+ $1 as bV,
32130
+ Kp as bW,
32131
+ Jp as bX,
32132
+ Qp as bY,
32133
+ T1 as bZ,
32134
+ yg as b_,
32066
32135
  Du as ba,
32067
32136
  Id as bb,
32068
32137
  Uo as bc,
32069
- Vp as bd,
32138
+ Wp as bd,
32070
32139
  hn as be,
32071
32140
  Dd as bf,
32072
- Ag as bg,
32073
- zp as bh,
32141
+ Eg as bg,
32142
+ Yp as bh,
32074
32143
  Od as bi,
32075
- Mp as bj,
32076
- bg as bk,
32077
- Wp as bl,
32078
- T1 as bm,
32079
- vh as bn,
32080
- _h as bo,
32081
- $h as bp,
32082
- Eg as bq,
32083
- jp as br,
32084
- Sg as bs,
32144
+ Rp as bj,
32145
+ wg as bk,
32146
+ Gp as bl,
32147
+ C1 as bm,
32148
+ _h as bn,
32149
+ Th as bo,
32150
+ Ch as bp,
32151
+ Mg as bq,
32152
+ Xp as br,
32153
+ kg as bs,
32085
32154
  va as bt,
32086
32155
  zo as bu,
32087
- Up as bv,
32088
- yg as bw,
32089
- n1 as bx,
32156
+ zp as bv,
32157
+ bg as bw,
32158
+ r1 as bx,
32090
32159
  Qe as by,
32091
32160
  Ge as bz,
32092
32161
  Wu as c,
32093
- u1 as c$,
32162
+ f1 as c$,
32094
32163
  Rm as c0,
32095
32164
  Bn as c1,
32096
32165
  xm as c2,
@@ -32099,139 +32168,140 @@ export {
32099
32168
  ra as c5,
32100
32169
  Yf as c6,
32101
32170
  zf as c7,
32102
- Op as c8,
32103
- Dp as c9,
32171
+ Fp as c8,
32172
+ Op as c9,
32104
32173
  po as cA,
32105
32174
  Is as cB,
32106
- e1 as cC,
32175
+ t1 as cC,
32107
32176
  qr as cD,
32108
- Jg as cE,
32177
+ e1 as cE,
32109
32178
  tf as cF,
32110
32179
  of as cG,
32111
32180
  im as cH,
32112
32181
  yu as cI,
32113
32182
  jt as cJ,
32114
- Yp as cK,
32115
- Ip as cL,
32183
+ Vp as cK,
32184
+ qp as cL,
32116
32185
  nh as cM,
32117
32186
  Pn as cN,
32118
- t1 as cO,
32187
+ n1 as cO,
32119
32188
  pu as cP,
32120
- xp as cQ,
32121
- Rp as cR,
32189
+ Ip as cQ,
32190
+ xp as cR,
32122
32191
  bo as cS,
32123
32192
  ah as cT,
32124
32193
  rh as cU,
32125
32194
  Ps as cV,
32126
32195
  Hn as cW,
32127
32196
  Nd as cX,
32128
- o1 as cY,
32197
+ l1 as cY,
32129
32198
  bd as cZ,
32130
- m1 as c_,
32199
+ p1 as c_,
32131
32200
  fd as ca,
32132
32201
  Dm as cb,
32133
32202
  wf as cc,
32134
- Pp as cd,
32135
- hh as ce,
32203
+ Hp as cd,
32204
+ ph as ce,
32136
32205
  Xs as cf,
32137
- Pg as cg,
32138
- g1 as ch,
32139
- mg as ci,
32140
- dg as cj,
32141
- fg as ck,
32142
- og as cl,
32143
- w1 as cm,
32144
- zg as cn,
32145
- _g as co,
32206
+ Hg as cg,
32207
+ b1 as ch,
32208
+ hg as ci,
32209
+ mg as cj,
32210
+ dg as ck,
32211
+ lg as cl,
32212
+ _1 as cm,
32213
+ Yg as cn,
32214
+ Tg as co,
32146
32215
  Tu as cp,
32147
32216
  Om as cq,
32148
32217
  ga as cr,
32149
32218
  Vt as cs,
32150
- pg as ct,
32151
- Yg as cu,
32219
+ gg as ct,
32220
+ Vg as cu,
32152
32221
  Cr as cv,
32153
- Gh as cw,
32222
+ jh as cw,
32154
32223
  ln as cx,
32155
- Bg as cy,
32156
- Lg as cz,
32224
+ Pg as cy,
32225
+ Bg as cz,
32157
32226
  mo as d,
32158
- sc as d$,
32159
- kh as d0,
32160
- Ah as d1,
32161
- p1 as d2,
32162
- d1 as d3,
32163
- f1 as d4,
32164
- h1 as d5,
32165
- c1 as d6,
32166
- Vg as d7,
32227
+ Qs as d$,
32228
+ Ah as d0,
32229
+ Eh as d1,
32230
+ y1 as d2,
32231
+ h1 as d3,
32232
+ m1 as d4,
32233
+ g1 as d5,
32234
+ d1 as d6,
32235
+ Wg as d7,
32167
32236
  Jm as d8,
32168
32237
  On as d9,
32169
- $g as dA,
32238
+ Cg as dA,
32170
32239
  Pm as dB,
32171
32240
  Sr as dC,
32172
- ng as dD,
32173
- kp as dE,
32174
- ag as dF,
32175
- wg as dG,
32241
+ rg as dD,
32242
+ Ap as dE,
32243
+ og as dF,
32244
+ vg as dG,
32176
32245
  af as dH,
32177
- Xg as dI,
32178
- vg as dJ,
32246
+ Zg as dI,
32247
+ _g as dJ,
32179
32248
  mm as dK,
32180
- lg as dL,
32249
+ ig as dL,
32181
32250
  ca as dM,
32182
- y1 as dN,
32183
- b1 as dO,
32184
- Gg as dP,
32185
- a1 as dQ,
32186
- Fp as dR,
32251
+ w1 as dN,
32252
+ v1 as dO,
32253
+ jg as dP,
32254
+ o1 as dQ,
32255
+ Lp as dR,
32187
32256
  wu as dS,
32188
- bp as dT,
32189
- jm as dU,
32190
- So as dV,
32191
- Ao as dW,
32192
- Ep as dX,
32193
- Lp as dY,
32257
+ wp as dT,
32258
+ c1 as dU,
32259
+ jm as dV,
32260
+ So as dW,
32261
+ Ao as dX,
32262
+ Mp as dY,
32194
32263
  Bp as dZ,
32195
- Qs as d_,
32264
+ Pp as d_,
32196
32265
  Pf as da,
32197
32266
  ho as db,
32198
- Mh as dc,
32199
- l1 as dd,
32200
- Zg as de,
32267
+ Rh as dc,
32268
+ i1 as dd,
32269
+ Kg as de,
32201
32270
  Bf as df,
32202
32271
  Oo as dg,
32203
- sg as dh,
32272
+ ug as dh,
32204
32273
  ya as di,
32205
- Dt as dj,
32274
+ qt as dj,
32206
32275
  Vs as dk,
32207
32276
  Kn as dl,
32208
- gp as dm,
32209
- Qg as dn,
32277
+ yp as dm,
32278
+ Jg as dn,
32210
32279
  ef as dp,
32211
32280
  Rt as dq,
32212
- tg as dr,
32281
+ ng as dr,
32213
32282
  kr as ds,
32214
32283
  js as dt,
32215
32284
  Yd as du,
32216
32285
  uh as dv,
32217
- r1 as dw,
32286
+ a1 as dw,
32218
32287
  fs as dx,
32219
- Hp as dy,
32220
- Tg as dz,
32221
- Y1 as e,
32222
- ic as e0,
32223
- yp as e1,
32224
- pp as e2,
32225
- rp as e3,
32226
- up as e4,
32227
- Uu as e5,
32228
- cp as e6,
32229
- ma as e7,
32230
- Co as e8,
32231
- ip as e9,
32288
+ Up as dy,
32289
+ $g as dz,
32290
+ W1 as e,
32291
+ sc as e0,
32292
+ ic as e1,
32293
+ bp as e2,
32294
+ gp as e3,
32295
+ ap as e4,
32296
+ cp as e5,
32297
+ Uu as e6,
32298
+ fp as e7,
32299
+ ma as e8,
32300
+ Co as e9,
32232
32301
  sp as ea,
32233
- Pu as eb,
32234
- op as f,
32302
+ up as eb,
32303
+ Pu as ec,
32304
+ lp as f,
32235
32305
  bs as g,
32236
32306
  Nf as h,
32237
32307
  sr as i,
@@ -32239,13 +32309,13 @@ export {
32239
32309
  rt as k,
32240
32310
  Se as l,
32241
32311
  su as m,
32242
- ig as n,
32312
+ sg as n,
32243
32313
  Ym as o,
32244
32314
  mu as p,
32245
32315
  Ys as q,
32246
32316
  fo as r,
32247
32317
  lm as s,
32248
- L1 as t,
32318
+ P1 as t,
32249
32319
  tn as u,
32250
32320
  cu as v,
32251
32321
  Vi as w,