@fileverse-dev/dsheet 2.1.3-package-cleanup-4 → 2.1.3-package-cleanup-5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -105,8 +105,8 @@ var il = { exports: {} };
105
105
  }, t._ = r = {
106
106
  // formats numbers separators, decimals places, signs, abbreviations
107
107
  numberToFormat: function(s, u, f) {
108
- var m = o[t.options.currentLocale], d = !1, p = !1, g = 0, y = "", b = 1e12, w = 1e9, v = 1e6, T = 1e3, _ = "", E = !1, C, I, k, O, U, Z, J;
109
- if (s = s || 0, I = Math.abs(s), t._.includes(u, "(") ? (d = !0, u = u.replace(/[\(|\)]/g, "")) : (t._.includes(u, "+") || t._.includes(u, "-")) && (U = t._.includes(u, "+") ? u.indexOf("+") : s < 0 ? u.indexOf("-") : -1, u = u.replace(/[\+|\-]/g, "")), t._.includes(u, "a") && (C = u.match(/a(k|m|b|t)?/), C = C ? C[1] : !1, t._.includes(u, " a") && (y = " "), u = u.replace(new RegExp(y + "a[kmbt]?"), ""), I >= b && !C || C === "t" ? (y += m.abbreviations.trillion, s = s / b) : I < b && I >= w && !C || C === "b" ? (y += m.abbreviations.billion, s = s / w) : I < w && I >= v && !C || C === "m" ? (y += m.abbreviations.million, s = s / v) : (I < v && I >= T && !C || C === "k") && (y += m.abbreviations.thousand, s = s / T)), t._.includes(u, "[.]") && (p = !0, u = u.replace("[.]", ".")), k = s.toString().split(".")[0], O = u.split(".")[1], Z = u.indexOf(","), g = (u.split(".")[0].split(",")[0].match(/0/g) || []).length, O ? (t._.includes(O, "[") ? (O = O.replace("]", ""), O = O.split("["), _ = t._.toFixed(s, O[0].length + O[1].length, f, O[1].length)) : _ = t._.toFixed(s, O.length, f), k = _.split(".")[0], t._.includes(_, ".") ? _ = m.delimiters.decimal + _.split(".")[1] : _ = "", p && Number(_.slice(1)) === 0 && (_ = "")) : k = t._.toFixed(s, 0, f), y && !C && Number(k) >= 1e3 && y !== m.abbreviations.trillion)
108
+ var m = o[t.options.currentLocale], d = !1, p = !1, g = 0, y = "", b = 1e12, w = 1e9, v = 1e6, T = 1e3, _ = "", E = !1, C, I, k, O, z, Y, Q;
109
+ if (s = s || 0, I = Math.abs(s), t._.includes(u, "(") ? (d = !0, u = u.replace(/[\(|\)]/g, "")) : (t._.includes(u, "+") || t._.includes(u, "-")) && (z = t._.includes(u, "+") ? u.indexOf("+") : s < 0 ? u.indexOf("-") : -1, u = u.replace(/[\+|\-]/g, "")), t._.includes(u, "a") && (C = u.match(/a(k|m|b|t)?/), C = C ? C[1] : !1, t._.includes(u, " a") && (y = " "), u = u.replace(new RegExp(y + "a[kmbt]?"), ""), I >= b && !C || C === "t" ? (y += m.abbreviations.trillion, s = s / b) : I < b && I >= w && !C || C === "b" ? (y += m.abbreviations.billion, s = s / w) : I < w && I >= v && !C || C === "m" ? (y += m.abbreviations.million, s = s / v) : (I < v && I >= T && !C || C === "k") && (y += m.abbreviations.thousand, s = s / T)), t._.includes(u, "[.]") && (p = !0, u = u.replace("[.]", ".")), k = s.toString().split(".")[0], O = u.split(".")[1], Y = u.indexOf(","), g = (u.split(".")[0].split(",")[0].match(/0/g) || []).length, O ? (t._.includes(O, "[") ? (O = O.replace("]", ""), O = O.split("["), _ = t._.toFixed(s, O[0].length + O[1].length, f, O[1].length)) : _ = t._.toFixed(s, O.length, f), k = _.split(".")[0], t._.includes(_, ".") ? _ = m.delimiters.decimal + _.split(".")[1] : _ = "", p && Number(_.slice(1)) === 0 && (_ = "")) : k = t._.toFixed(s, 0, f), y && !C && Number(k) >= 1e3 && y !== m.abbreviations.trillion)
110
110
  switch (k = String(Number(k) / 1e3), y) {
111
111
  case m.abbreviations.thousand:
112
112
  y = m.abbreviations.million;
@@ -121,7 +121,7 @@ var il = { exports: {} };
121
121
  if (t._.includes(k, "-") && (k = k.slice(1), E = !0), k.length < g)
122
122
  for (var se = g - k.length; se > 0; se--)
123
123
  k = "0" + k;
124
- return Z > -1 && (k = k.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1" + m.delimiters.thousands)), u.indexOf(".") === 0 && (k = ""), J = k + _ + (y || ""), d ? J = (d && E ? "(" : "") + J + (d && E ? ")" : "") : U >= 0 ? J = U === 0 ? (E ? "-" : "+") + J : J + (E ? "-" : "+") : E && (J = "-" + J), J;
124
+ return Y > -1 && (k = k.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1" + m.delimiters.thousands)), u.indexOf(".") === 0 && (k = ""), Q = k + _ + (y || ""), d ? Q = (d && E ? "(" : "") + Q + (d && E ? ")" : "") : z >= 0 ? Q = z === 0 ? (E ? "-" : "+") + Q : Q + (E ? "-" : "+") : E && (Q = "-" + Q), Q;
125
125
  },
126
126
  // unformats numbers separators, decimals places, signs, abbreviations
127
127
  stringToNumber: function(s) {
@@ -13235,47 +13235,47 @@ var cr, Le = function(e, t, r, a) {
13235
13235
  for (var T = function() {
13236
13236
  var B;
13237
13237
  return B = p.lex() || m, typeof B != "number" && (B = r.symbols_[B] || B), B;
13238
- }, _, E, C, I, k, O = {}, U, Z, J, se; ; ) {
13238
+ }, _, E, C, I, k, O = {}, z, Y, Q, se; ; ) {
13239
13239
  if (cr = a, C = a[a.length - 1], this.defaultActions[C] ? I = this.defaultActions[C] : ((_ === null || typeof _ > "u") && (_ = T()), I = i[C] && i[C][_]), typeof I > "u" || !I.length || !I[0]) {
13240
13240
  let B = function(re) {
13241
- for (var oe = a.length - 1, be = 0; ; ) {
13241
+ for (var oe = a.length - 1, ge = 0; ; ) {
13242
13242
  if (f.toString() in i[re])
13243
- return be;
13243
+ return ge;
13244
13244
  if (re === 0 || oe < 2)
13245
13245
  return !1;
13246
- oe -= 2, re = a[oe], ++be;
13246
+ oe -= 2, re = a[oe], ++ge;
13247
13247
  }
13248
13248
  };
13249
- var V, Q = "";
13249
+ var W, j = "";
13250
13250
  if (u)
13251
- E !== m && (V = B(C));
13251
+ E !== m && (W = B(C));
13252
13252
  else {
13253
- V = B(C), se = [];
13254
- for (U in i[C])
13255
- this.terminals_[U] && U > f && se.push("'" + this.terminals_[U] + "'");
13256
- p.showPosition ? Q = "Parse error on line " + (c + 1) + `:
13253
+ W = B(C), se = [];
13254
+ for (z in i[C])
13255
+ this.terminals_[z] && z > f && se.push("'" + this.terminals_[z] + "'");
13256
+ p.showPosition ? j = "Parse error on line " + (c + 1) + `:
13257
13257
  ` + p.showPosition() + `
13258
- Expecting ` + se.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : Q = "Parse error on line " + (c + 1) + ": Unexpected " + (_ == m ? "end of input" : "'" + (this.terminals_[_] || _) + "'"), this.parseError(Q, {
13258
+ Expecting ` + se.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : j = "Parse error on line " + (c + 1) + ": Unexpected " + (_ == m ? "end of input" : "'" + (this.terminals_[_] || _) + "'"), this.parseError(j, {
13259
13259
  text: p.match,
13260
13260
  token: this.terminals_[_] || _,
13261
13261
  line: p.yylineno,
13262
13262
  loc: b,
13263
13263
  expected: se,
13264
- recoverable: V !== !1
13264
+ recoverable: W !== !1
13265
13265
  });
13266
13266
  }
13267
13267
  if (u == 3) {
13268
13268
  if (_ === m || E === m)
13269
13269
  throw new Error(
13270
- Q || "Parsing halted while starting to recover from another error."
13270
+ j || "Parsing halted while starting to recover from another error."
13271
13271
  );
13272
13272
  s = p.yyleng, l = p.yytext, c = p.yylineno, b = p.yylloc, _ = T();
13273
13273
  }
13274
- if (V === !1)
13274
+ if (W === !1)
13275
13275
  throw new Error(
13276
- Q || "Parsing halted. No suitable error recovery rule available."
13276
+ j || "Parsing halted. No suitable error recovery rule available."
13277
13277
  );
13278
- v(V), E = _ == f ? null : _, _ = f, C = a[a.length - 1], I = i[C] && i[C][f], u = 3;
13278
+ v(W), E = _ == f ? null : _, _ = f, C = a[a.length - 1], I = i[C] && i[C][f], u = 3;
13279
13279
  }
13280
13280
  if (I[0] instanceof Array && I.length > 1)
13281
13281
  throw new Error(
@@ -13286,13 +13286,13 @@ Expecting ` + se.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : Q =
13286
13286
  a.push(_), n.push(p.yytext), o.push(p.yylloc), a.push(I[1]), _ = null, E ? (_ = E, E = null) : (s = p.yyleng, l = p.yytext, c = p.yylineno, b = p.yylloc, u > 0 && u--);
13287
13287
  break;
13288
13288
  case 2:
13289
- if (Z = this.productions_[I[1]][1], O.$ = n[n.length - Z], O._$ = {
13290
- first_line: o[o.length - (Z || 1)].first_line,
13289
+ if (Y = this.productions_[I[1]][1], O.$ = n[n.length - Y], O._$ = {
13290
+ first_line: o[o.length - (Y || 1)].first_line,
13291
13291
  last_line: o[o.length - 1].last_line,
13292
- first_column: o[o.length - (Z || 1)].first_column,
13292
+ first_column: o[o.length - (Y || 1)].first_column,
13293
13293
  last_column: o[o.length - 1].last_column
13294
13294
  }, w && (O._$.range = [
13295
- o[o.length - (Z || 1)].range[0],
13295
+ o[o.length - (Y || 1)].range[0],
13296
13296
  o[o.length - 1].range[1]
13297
13297
  ]), k = this.performAction.apply(
13298
13298
  O,
@@ -13308,7 +13308,7 @@ Expecting ` + se.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : Q =
13308
13308
  ].concat(d)
13309
13309
  ), typeof k < "u")
13310
13310
  return k;
13311
- Z && (a = a.slice(0, -1 * Z * 2), n = n.slice(0, -1 * Z), o = o.slice(0, -1 * Z)), a.push(this.productions_[I[1]][0]), n.push(O.$), o.push(O._$), J = i[a[a.length - 2]][a[a.length - 1]], a.push(J);
13311
+ Y && (a = a.slice(0, -1 * Y * 2), n = n.slice(0, -1 * Y), o = o.slice(0, -1 * Y)), a.push(this.productions_[I[1]][0]), n.push(O.$), o.push(O._$), Q = i[a[a.length - 2]][a[a.length - 1]], a.push(Q);
13312
13312
  break;
13313
13313
  case 3:
13314
13314
  return !0;
@@ -14408,45 +14408,45 @@ function bd(e, t, r, a) {
14408
14408
  if (i.innerHTML.substring(0, 5) !== "<span" && (w = !0), y) {
14409
14409
  let _ = "", E = "", C = "", k = 0;
14410
14410
  if (u.nodeType === Node.TEXT_NODE && y.childNodes.length > 1)
14411
- for (let V = 0; V < y.childNodes.length; V += 1) {
14412
- const Q = y.childNodes[V];
14413
- if (Q === u) break;
14414
- Q.nodeType === Node.TEXT_NODE ? k += (Q.textContent || "").length : Q.nodeType === Node.ELEMENT_NODE && (k += Q.outerHTML.length);
14411
+ for (let W = 0; W < y.childNodes.length; W += 1) {
14412
+ const j = y.childNodes[W];
14413
+ if (j === u) break;
14414
+ j.nodeType === Node.TEXT_NODE ? k += (j.textContent || "").length : j.nodeType === Node.ELEMENT_NODE && (k += j.outerHTML.length);
14415
14415
  }
14416
- const O = k + m, U = k + f, Z = v.length;
14417
- _ = v.substring(0, O), E = v.substring(O, U), C = v.substring(U, Z);
14418
- let J = "";
14416
+ const O = k + m, z = k + f, Y = v.length;
14417
+ _ = v.substring(0, O), E = v.substring(O, z), C = v.substring(z, Y);
14418
+ let Q = "";
14419
14419
  if (_ !== "") {
14420
- let { cssText: V } = y.style;
14420
+ let { cssText: W } = y.style;
14421
14421
  if (w) {
14422
- const Q = y.closest(
14422
+ const j = y.closest(
14423
14423
  "#luckysheet-input-box"
14424
14424
  );
14425
- Q != null && (V = pn(Q.style.cssText, V));
14425
+ j != null && (W = pn(j.style.cssText, W));
14426
14426
  }
14427
- J += `<span style="${je(V)}">${_}</span>`;
14427
+ Q += `<span style="${je(W)}">${_}</span>`;
14428
14428
  }
14429
14429
  if (E !== "") {
14430
- let V = Wt(y.style.cssText, t, r);
14430
+ let W = Wt(y.style.cssText, t, r);
14431
14431
  if (w) {
14432
- const Q = y.closest(
14432
+ const j = y.closest(
14433
14433
  "#luckysheet-input-box"
14434
14434
  );
14435
- Q != null && (V = pn(Q.style.cssText, V));
14435
+ j != null && (W = pn(j.style.cssText, W));
14436
14436
  }
14437
- J += `<span style="${je(V)}">${E}</span>`;
14437
+ Q += `<span style="${je(W)}">${E}</span>`;
14438
14438
  }
14439
14439
  if (C !== "") {
14440
- let { cssText: V } = y.style;
14440
+ let { cssText: W } = y.style;
14441
14441
  if (w) {
14442
- const Q = y.closest(
14442
+ const j = y.closest(
14443
14443
  "#luckysheet-input-box"
14444
14444
  );
14445
- Q != null && (V = pn(Q.style.cssText, V));
14445
+ j != null && (W = pn(j.style.cssText, W));
14446
14446
  }
14447
- J += `<span style="${je(V)}">${C}</span>`;
14447
+ Q += `<span style="${je(W)}">${C}</span>`;
14448
14448
  }
14449
- ((d = u.parentElement) == null ? void 0 : d.tagName) === "SPAN" ? (b = h.indexOf(i.querySelectorAll("span"), y), y.outerHTML = J) : (b = 0, y.innerHTML = J);
14449
+ ((d = u.parentElement) == null ? void 0 : d.tagName) === "SPAN" ? (b = h.indexOf(i.querySelectorAll("span"), y), y.outerHTML = Q) : (b = 0, y.innerHTML = Q);
14450
14450
  let se = 0;
14451
14451
  O === 0 ? se = b : se = b + 1, Zs(
14452
14452
  i.querySelectorAll("span")[se]
@@ -14455,46 +14455,46 @@ function bd(e, t, r, a) {
14455
14455
  } else if (((p = u.parentElement) == null ? void 0 : p.tagName) === "SPAN" && ((g = s.parentElement) == null ? void 0 : g.tagName) === "SPAN") {
14456
14456
  const y = u.parentNode, b = s.parentNode, w = i.querySelectorAll("span"), v = h.indexOf(w, y), T = h.indexOf(w, b), _ = (y == null ? void 0 : y.innerHTML) || "", E = (b == null ? void 0 : b.innerHTML) || "";
14457
14457
  let C = "", I = "", k = "", O = "";
14458
- const U = 0, Z = m, J = f, se = E.length;
14459
- C = _.substring(U, Z), I = _.substring(Z, _.length), k = E.substring(0, J), O = E.substring(J, se);
14460
- let V = i.querySelectorAll("span"), Q = "";
14458
+ const z = 0, Y = m, Q = f, se = E.length;
14459
+ C = _.substring(z, Y), I = _.substring(Y, _.length), k = E.substring(0, Q), O = E.substring(Q, se);
14460
+ let W = i.querySelectorAll("span"), j = "";
14461
14461
  for (let oe = 0; oe < v; oe += 1) {
14462
- const be = V[oe], fe = be.innerHTML;
14463
- Q += `<span style="${je(
14464
- be.style.cssText
14465
- )}">${fe}</span>`;
14462
+ const ge = W[oe], ue = ge.innerHTML;
14463
+ j += `<span style="${je(
14464
+ ge.style.cssText
14465
+ )}">${ue}</span>`;
14466
14466
  }
14467
- if (C !== "" && (Q += `<span style="${je(
14467
+ if (C !== "" && (j += `<span style="${je(
14468
14468
  y.style.cssText
14469
14469
  )}">${C}</span>`), I !== "") {
14470
14470
  const oe = Wt(y.style.cssText, t, r);
14471
- Q += `<span style="${je(oe)}">${I}</span>`;
14471
+ j += `<span style="${je(oe)}">${I}</span>`;
14472
14472
  }
14473
14473
  if (v < T)
14474
14474
  for (let oe = v + 1; oe < T; oe += 1) {
14475
- const be = V[oe], fe = be.innerHTML;
14476
- Q += `<span style="${je(
14477
- be.style.cssText
14478
- )}">${fe}</span>`;
14475
+ const ge = W[oe], ue = ge.innerHTML;
14476
+ j += `<span style="${je(
14477
+ ge.style.cssText
14478
+ )}">${ue}</span>`;
14479
14479
  }
14480
14480
  if (k !== "") {
14481
14481
  const oe = Wt(b.style.cssText, t, r);
14482
- Q += `<span style="${je(oe)}">${k}</span>`;
14482
+ j += `<span style="${je(oe)}">${k}</span>`;
14483
14483
  }
14484
- O !== "" && (Q += `<span style="${je(
14484
+ O !== "" && (j += `<span style="${je(
14485
14485
  b.style.cssText
14486
14486
  )}">${O}</span>`);
14487
- for (let oe = T + 1; oe < V.length; oe += 1) {
14488
- const be = V[oe], fe = be.innerHTML;
14489
- Q += `<span style="${je(
14490
- be.style.cssText
14491
- )}">${fe}</span>`;
14487
+ for (let oe = T + 1; oe < W.length; oe += 1) {
14488
+ const ge = W[oe], ue = ge.innerHTML;
14489
+ j += `<span style="${je(
14490
+ ge.style.cssText
14491
+ )}">${ue}</span>`;
14492
14492
  }
14493
- i.innerHTML = Q;
14493
+ i.innerHTML = j;
14494
14494
  let B, re;
14495
- U === Z ? (B = v, re = T) : (B = v + 1, re = T + 1), V = i.querySelectorAll("span"), ml(
14496
- V[B],
14497
- V[re]
14495
+ z === Y ? (B = v, re = T) : (B = v + 1, re = T + 1), W = i.querySelectorAll("span"), ml(
14496
+ W[B],
14497
+ W[re]
14498
14498
  );
14499
14499
  }
14500
14500
  }
@@ -14574,8 +14574,8 @@ function wd(e, t, r) {
14574
14574
  return;
14575
14575
  }
14576
14576
  if (l === i) {
14577
- const v = l.parentNode, _ = ((g = v == null ? void 0 : v.dataset) == null ? void 0 : g.noLinkAnchor) === "1" ? (v == null ? void 0 : v.textContent) || "" : (v == null ? void 0 : v.innerHTML) || "", C = o.innerHTML.substring(0, 5) !== "<span", I = v ? ar(v, l, s) : s, k = v ? ar(v, i, c) : c, O = _.substring(0, I), U = _.substring(I, k), Z = _.substring(k, _.length);
14578
- let J = "";
14577
+ const v = l.parentNode, _ = ((g = v == null ? void 0 : v.dataset) == null ? void 0 : g.noLinkAnchor) === "1" ? (v == null ? void 0 : v.textContent) || "" : (v == null ? void 0 : v.innerHTML) || "", C = o.innerHTML.substring(0, 5) !== "<span", I = v ? ar(v, l, s) : s, k = v ? ar(v, i, c) : c, O = _.substring(0, I), z = _.substring(I, k), Y = _.substring(k, _.length);
14578
+ let Q = "";
14579
14579
  const se = kn(v);
14580
14580
  if (O !== "") {
14581
14581
  let { cssText: re } = v.style;
@@ -14585,11 +14585,11 @@ function wd(e, t, r) {
14585
14585
  );
14586
14586
  oe != null && (re = pn(oe.style.cssText, re));
14587
14587
  }
14588
- J += `<span style="${je(
14588
+ Q += `<span style="${je(
14589
14589
  re
14590
14590
  )}"${se}>${O}</span>`;
14591
14591
  }
14592
- if (U !== "") {
14592
+ if (z !== "") {
14593
14593
  let re = Rn(v.style.cssText);
14594
14594
  if (C) {
14595
14595
  const oe = v.closest(
@@ -14597,13 +14597,13 @@ function wd(e, t, r) {
14597
14597
  );
14598
14598
  oe != null && (re = pn(oe.style.cssText, re));
14599
14599
  }
14600
- J += `<span style="${je(
14600
+ Q += `<span style="${je(
14601
14601
  re
14602
14602
  )}" data-link-type="${je(
14603
14603
  t
14604
- )}" data-link-address="${je(r)}">${U}</span>`;
14604
+ )}" data-link-address="${je(r)}">${z}</span>`;
14605
14605
  }
14606
- if (Z !== "") {
14606
+ if (Y !== "") {
14607
14607
  let { cssText: re } = v.style;
14608
14608
  if (C) {
14609
14609
  const oe = v.closest(
@@ -14611,70 +14611,70 @@ function wd(e, t, r) {
14611
14611
  );
14612
14612
  oe != null && (re = pn(oe.style.cssText, re));
14613
14613
  }
14614
- J += `<span style="${je(
14614
+ Q += `<span style="${je(
14615
14615
  re
14616
- )}"${se}>${Z}</span>`;
14616
+ )}"${se}>${Y}</span>`;
14617
14617
  }
14618
- ((y = l.parentElement) == null ? void 0 : y.tagName) === "SPAN" ? v.outerHTML = J : v.innerHTML = J;
14619
- const V = r.trim();
14620
- let Q = null;
14618
+ ((y = l.parentElement) == null ? void 0 : y.tagName) === "SPAN" ? v.outerHTML = Q : v.innerHTML = Q;
14619
+ const W = r.trim();
14620
+ let j = null;
14621
14621
  const B = o.querySelectorAll("span[data-link-address]");
14622
14622
  for (let re = B.length - 1; re >= 0; re -= 1) {
14623
14623
  const oe = B[re];
14624
- if ((oe.dataset.linkAddress || "").trim() === V) {
14625
- Q = oe;
14624
+ if ((oe.dataset.linkAddress || "").trim() === W) {
14625
+ j = oe;
14626
14626
  break;
14627
14627
  }
14628
14628
  }
14629
- Q && Dr(Q), Or(o);
14629
+ j && Dr(j), Or(o);
14630
14630
  } else if (((b = l.parentElement) == null ? void 0 : b.tagName) === "SPAN" && ((w = i.parentElement) == null ? void 0 : w.tagName) === "SPAN") {
14631
- const v = l.parentNode, T = i.parentNode, _ = o.querySelectorAll("span"), E = h.indexOf(_, v), C = h.indexOf(_, T), I = (v == null ? void 0 : v.innerHTML) || "", k = (T == null ? void 0 : T.innerHTML) || "", O = v ? ar(v, l, s) : s, U = T ? ar(T, i, c) : c, Z = I.substring(0, O), J = I.substring(O, I.length), se = k.substring(0, U), V = k.substring(U, k.length);
14632
- let Q = o.querySelectorAll("span"), B = "";
14633
- for (let be = 0; be < E; be += 1) {
14634
- const fe = Q[be];
14631
+ const v = l.parentNode, T = i.parentNode, _ = o.querySelectorAll("span"), E = h.indexOf(_, v), C = h.indexOf(_, T), I = (v == null ? void 0 : v.innerHTML) || "", k = (T == null ? void 0 : T.innerHTML) || "", O = v ? ar(v, l, s) : s, z = T ? ar(T, i, c) : c, Y = I.substring(0, O), Q = I.substring(O, I.length), se = k.substring(0, z), W = k.substring(z, k.length);
14632
+ let j = o.querySelectorAll("span"), B = "";
14633
+ for (let ge = 0; ge < E; ge += 1) {
14634
+ const ue = j[ge];
14635
14635
  B += `<span style="${je(
14636
- fe.style.cssText
14637
- )}"${kn(fe)}>${fe.innerHTML}</span>`;
14636
+ ue.style.cssText
14637
+ )}"${kn(ue)}>${ue.innerHTML}</span>`;
14638
14638
  }
14639
- if (Z !== "" && (B += `<span style="${je(
14639
+ if (Y !== "" && (B += `<span style="${je(
14640
14640
  v.style.cssText
14641
- )}"${kn(v)}>${Z}</span>`), J !== "") {
14642
- const be = Rn(v.style.cssText);
14641
+ )}"${kn(v)}>${Y}</span>`), Q !== "") {
14642
+ const ge = Rn(v.style.cssText);
14643
14643
  B += `<span style="${je(
14644
- be
14644
+ ge
14645
14645
  )}" data-link-type="${je(
14646
14646
  t
14647
- )}" data-link-address="${je(r)}">${J}</span>`;
14647
+ )}" data-link-address="${je(r)}">${Q}</span>`;
14648
14648
  }
14649
14649
  if (E < C)
14650
- for (let be = E + 1; be < C; be += 1) {
14651
- const fe = Q[be], X = Rn(fe.style.cssText);
14650
+ for (let ge = E + 1; ge < C; ge += 1) {
14651
+ const ue = j[ge], K = Rn(ue.style.cssText);
14652
14652
  B += `<span style="${je(
14653
- X
14653
+ K
14654
14654
  )}" data-link-type="${je(
14655
14655
  t
14656
- )}" data-link-address="${je(r)}">${fe.innerHTML}</span>`;
14656
+ )}" data-link-address="${je(r)}">${ue.innerHTML}</span>`;
14657
14657
  }
14658
14658
  if (se !== "") {
14659
- const be = Rn(T.style.cssText);
14659
+ const ge = Rn(T.style.cssText);
14660
14660
  B += `<span style="${je(
14661
- be
14661
+ ge
14662
14662
  )}" data-link-type="${je(
14663
14663
  t
14664
14664
  )}" data-link-address="${je(r)}">${se}</span>`;
14665
14665
  }
14666
- V !== "" && (B += `<span style="${je(
14666
+ W !== "" && (B += `<span style="${je(
14667
14667
  T.style.cssText
14668
- )}"${kn(T)}>${V}</span>`);
14669
- for (let be = C + 1; be < Q.length; be += 1) {
14670
- const fe = Q[be];
14668
+ )}"${kn(T)}>${W}</span>`);
14669
+ for (let ge = C + 1; ge < j.length; ge += 1) {
14670
+ const ue = j[ge];
14671
14671
  B += `<span style="${je(
14672
- fe.style.cssText
14673
- )}"${kn(fe)}>${fe.innerHTML}</span>`;
14672
+ ue.style.cssText
14673
+ )}"${kn(ue)}>${ue.innerHTML}</span>`;
14674
14674
  }
14675
- o.innerHTML = B, Q = o.querySelectorAll("span");
14676
- const re = Z === "" ? E : E + 1, oe = V === "" ? C : C + 1;
14677
- Q[oe] ? Dr(Q[oe]) : ml(Q[re], Q[oe]), Or(o);
14675
+ o.innerHTML = B, j = o.querySelectorAll("span");
14676
+ const re = Y === "" ? E : E + 1, oe = W === "" ? C : C + 1;
14677
+ j[oe] ? Dr(j[oe]) : ml(j[re], j[oe]), Or(o);
14678
14678
  }
14679
14679
  }
14680
14680
  function oa(e, t) {
@@ -14825,7 +14825,7 @@ function Mn(e, t, r, a) {
14825
14825
  }
14826
14826
  }
14827
14827
  function hc(e, t, r, a, n) {
14828
- var O, U, Z;
14828
+ var O, z, Y;
14829
14829
  const { cellWidth: o } = a, { cellHeight: i } = a;
14830
14830
  let l = "", c = "";
14831
14831
  o == null && (l = "onlyWidth", c = "_");
@@ -14843,40 +14843,40 @@ function hc(e, t, r, a, n) {
14843
14843
  let v, T = "0", _ = "0", E = 11, C = !1, I;
14844
14844
  const k = [];
14845
14845
  if (Vt(e)) {
14846
- const J = e.ct.s;
14846
+ const Q = e.ct.s;
14847
14847
  let se = 0;
14848
- for (let V = 0; V < J.length; V += 1) {
14849
- const Q = J[V], B = Io(Q, r.defaultFontSize, n), { fc: re } = Q, { cl: oe } = Q, { un: be } = Q, fe = !!((O = Q == null ? void 0 : Q.link) != null && O.linkAddress);
14850
- let { v: X } = Q;
14851
- const { fs: K } = Q;
14852
- X = X.replace(/\r\n/g, "_x000D_").replace(/&#13;&#10;/g, "_x000D_").replace(/\r/g, "_x000D_").replace(/\n/g, "_x000D_");
14853
- const W = X.split("_x000D_");
14854
- for (let ce = 0; ce < W.length; ce += 1) {
14855
- const ye = W[ce];
14856
- if (ye === "" && ce !== W.length - 1)
14848
+ for (let W = 0; W < Q.length; W += 1) {
14849
+ const j = Q[W], B = Io(j, r.defaultFontSize, n), { fc: re } = j, { cl: oe } = j, { un: ge } = j, ue = !!((O = j == null ? void 0 : j.link) != null && O.linkAddress);
14850
+ let { v: K } = j;
14851
+ const { fs: J } = j;
14852
+ K = K.replace(/\r\n/g, "_x000D_").replace(/&#13;&#10;/g, "_x000D_").replace(/\r/g, "_x000D_").replace(/\n/g, "_x000D_");
14853
+ const V = K.split("_x000D_");
14854
+ for (let ce = 0; ce < V.length; ce += 1) {
14855
+ const be = V[ce];
14856
+ if (be === "" && ce !== V.length - 1)
14857
14857
  k.push({
14858
14858
  fontset: B,
14859
14859
  fc: re || In.cellText,
14860
14860
  cl: oe || 0,
14861
- un: be || 0,
14861
+ un: ge || 0,
14862
14862
  wrap: !0,
14863
- fs: K || 11
14863
+ fs: J || 11
14864
14864
  }), se += 1;
14865
14865
  else {
14866
- if (fe)
14866
+ if (ue)
14867
14867
  k.push({
14868
14868
  fontset: B,
14869
14869
  fc: re || In.cellText,
14870
14870
  cl: oe || 0,
14871
- un: be || 0,
14872
- v: ye,
14871
+ un: ge || 0,
14872
+ v: be,
14873
14873
  si: se,
14874
- fs: K || 11
14874
+ fs: J || 11
14875
14875
  });
14876
14876
  else {
14877
14877
  const M = Array.from(
14878
14878
  // @ts-ignore
14879
- new Intl.Segmenter().segment(ye),
14879
+ new Intl.Segmenter().segment(be),
14880
14880
  // @ts-ignore
14881
14881
  ($) => $.segment
14882
14882
  );
@@ -14886,20 +14886,20 @@ function hc(e, t, r, a, n) {
14886
14886
  fontset: B,
14887
14887
  fc: re || In.cellText,
14888
14888
  cl: oe || 0,
14889
- un: be || 0,
14889
+ un: ge || 0,
14890
14890
  v: A,
14891
14891
  si: se,
14892
- fs: K || 11
14892
+ fs: J || 11
14893
14893
  });
14894
14894
  }
14895
14895
  }
14896
- ce !== W.length - 1 && (k.push({
14896
+ ce !== V.length - 1 && (k.push({
14897
14897
  fontset: B,
14898
14898
  fc: re || In.cellText,
14899
14899
  cl: oe || 0,
14900
- un: be || 0,
14900
+ un: ge || 0,
14901
14901
  wrap: !0,
14902
- fs: K || 11
14902
+ fs: J || 11
14903
14903
  }), se += 1);
14904
14904
  }
14905
14905
  }
@@ -14909,97 +14909,97 @@ function hc(e, t, r, a, n) {
14909
14909
  } else {
14910
14910
  if (v = Io(e, r.defaultFontSize, n), t.font = v, T = bt(e, "cl"), _ = bt(e, "un"), E = bt(e, "fs"), e instanceof Object ? (I = e.m, h.isNil(I) && (I = e.v)) : I = e, h.isEmpty(I))
14911
14911
  return null;
14912
- const J = (U = e == null ? void 0 : e.ct) == null ? void 0 : U.fa;
14913
- if (h.isString(I) && h.isString(J) && (I = uc(
14912
+ const Q = (z = e == null ? void 0 : e.ct) == null ? void 0 : z.fa;
14913
+ if (h.isString(I) && h.isString(Q) && (I = uc(
14914
14914
  I,
14915
- J,
14915
+ Q,
14916
14916
  o,
14917
14917
  t,
14918
14918
  u * 2
14919
14919
  )), !h.isNil(e) && h.isNil(e.ht)) {
14920
- const se = ((Z = e.ct) == null ? void 0 : Z.fa) === "@", V = h.isNil(e.v) ? I : e.v;
14921
- !se && Xe(V) && (m = "2");
14920
+ const se = ((Y = e.ct) == null ? void 0 : Y.fa) === "@", W = h.isNil(e.v) ? I : e.v;
14921
+ !se && Xe(W) && (m = "2");
14922
14922
  }
14923
14923
  }
14924
14924
  if (g === "3") {
14925
14925
  t.textBaseline = "top";
14926
- let J = 0, se = 0, V = 0, Q = 0;
14926
+ let Q = 0, se = 0, W = 0, j = 0;
14927
14927
  const B = {}, re = [];
14928
14928
  if (C) {
14929
- let fe = null;
14930
- for (let X = 0; X < k.length; X += 1) {
14931
- const K = k[X];
14932
- let W = K.v, ce = K.v;
14933
- if (K.wrap === !0 && (W = "M", ce = "", !h.isNil(fe) && fe.wrap !== !0 && X < k.length - 1)) {
14934
- re.push(Q), Q = 0, V += 1, fe = K;
14929
+ let ue = null;
14930
+ for (let K = 0; K < k.length; K += 1) {
14931
+ const J = k[K];
14932
+ let V = J.v, ce = J.v;
14933
+ if (J.wrap === !0 && (V = "M", ce = "", !h.isNil(ue) && ue.wrap !== !0 && K < k.length - 1)) {
14934
+ re.push(j), j = 0, W += 1, ue = J;
14935
14935
  continue;
14936
14936
  }
14937
- const ye = un(
14938
- W,
14937
+ const be = un(
14938
+ V,
14939
14939
  t,
14940
14940
  r,
14941
- K.fontset
14942
- ), M = ye.width + u, $ = ye.actualBoundingBoxAscent + ye.actualBoundingBoxDescent + f;
14943
- Q += $, p === "2" && !K.wrap && Q > i && !h.isNil(B[V]) && (re.push(Q - $), Q = $, V += 1), X === k.length - 1 && re.push(Q), h.isNil(B[V]) && (B[V] = []);
14941
+ J.fontset
14942
+ ), M = be.width + u, $ = be.actualBoundingBoxAscent + be.actualBoundingBoxDescent + f;
14943
+ j += $, p === "2" && !J.wrap && j > i && !h.isNil(B[W]) && (re.push(j - $), j = $, W += 1), K === k.length - 1 && re.push(j), h.isNil(B[W]) && (B[W] = []);
14944
14944
  const A = {
14945
14945
  content: ce,
14946
- style: K,
14946
+ style: J,
14947
14947
  width: M,
14948
14948
  height: $,
14949
14949
  left: 0,
14950
14950
  top: 0,
14951
- colIndex: V,
14952
- asc: ye.actualBoundingBoxAscent,
14953
- desc: ye.actualBoundingBoxDescent,
14951
+ colIndex: W,
14952
+ asc: be.actualBoundingBoxAscent,
14953
+ desc: be.actualBoundingBoxDescent,
14954
14954
  inline: !0,
14955
14955
  wrap: !1
14956
14956
  };
14957
- K.wrap === !0 && (A.wrap = !0), B[V].push(A), fe = K;
14957
+ J.wrap === !0 && (A.wrap = !0), B[W].push(A), ue = J;
14958
14958
  }
14959
14959
  } else {
14960
- const fe = un(I, t, r), X = fe.actualBoundingBoxDescent + fe.actualBoundingBoxAscent;
14960
+ const ue = un(I, t, r), K = ue.actualBoundingBoxDescent + ue.actualBoundingBoxAscent;
14961
14961
  I = I.toString();
14962
- let K = [];
14963
- I.length > 1 ? K = I.split("") : K.push(I);
14964
- const W = un(K[0], t, r).width;
14965
- for (let ce = 0; ce < K.length; ce += 1) {
14966
- const ye = W + u, M = X + f;
14967
- Q += M, p === "2" && Q > i && !h.isNil(B[V]) && (re.push(Q - M), Q = M, V += 1), ce === K.length - 1 && re.push(Q), h.isNil(B[V]) && (B[V] = []), B[V].push({
14968
- content: K[ce],
14962
+ let J = [];
14963
+ I.length > 1 ? J = I.split("") : J.push(I);
14964
+ const V = un(J[0], t, r).width;
14965
+ for (let ce = 0; ce < J.length; ce += 1) {
14966
+ const be = V + u, M = K + f;
14967
+ j += M, p === "2" && j > i && !h.isNil(B[W]) && (re.push(j - M), j = M, W += 1), ce === J.length - 1 && re.push(j), h.isNil(B[W]) && (B[W] = []), B[W].push({
14968
+ content: J[ce],
14969
14969
  style: v,
14970
- width: ye,
14970
+ width: be,
14971
14971
  height: M,
14972
14972
  left: 0,
14973
14973
  top: 0,
14974
- colIndex: V,
14975
- asc: fe.actualBoundingBoxAscent,
14976
- desc: fe.actualBoundingBoxDescent
14974
+ colIndex: W,
14975
+ asc: ue.actualBoundingBoxAscent,
14976
+ desc: ue.actualBoundingBoxDescent
14977
14977
  });
14978
14978
  }
14979
14979
  }
14980
14980
  const oe = [];
14981
- for (let fe = 0; fe < re.length; fe += 1) {
14982
- const X = re[fe], K = B[fe];
14983
- let W = 0;
14984
- for (let ce = 0; ce < K.length; ce += 1) {
14985
- const ye = K[ce];
14986
- W = Math.max(W, ye.width);
14981
+ for (let ue = 0; ue < re.length; ue += 1) {
14982
+ const K = re[ue], J = B[ue];
14983
+ let V = 0;
14984
+ for (let ce = 0; ce < J.length; ce += 1) {
14985
+ const be = J[ce];
14986
+ V = Math.max(V, be.width);
14987
14987
  }
14988
- oe.push(W), J += W, se = Math.max(se, X);
14988
+ oe.push(V), Q += V, se = Math.max(se, K);
14989
14989
  }
14990
- if (w.type = "verticalWrap", w.textWidthAll = J, w.textHeightAll = se, l === "onlyWidth")
14990
+ if (w.type = "verticalWrap", w.textWidthAll = Q, w.textHeightAll = se, l === "onlyWidth")
14991
14991
  return w;
14992
- let be = 0;
14993
- for (let fe = 0; fe < re.length; fe += 1) {
14994
- const X = re[fe], K = oe[fe], W = B[fe];
14992
+ let ge = 0;
14993
+ for (let ue = 0; ue < re.length; ue += 1) {
14994
+ const K = re[ue], J = oe[ue], V = B[ue];
14995
14995
  let ce = 0;
14996
- for (let ye = 0; ye < W.length; ye += 1) {
14997
- const M = W[ye];
14998
- let $ = u + be;
14999
- m === "0" ? $ = o / 2 + be - J / 2 + u * re.length : m === "2" && ($ = o + be - J + u);
15000
- let A = i - f + ce - X;
15001
- d === "0" ? A = i / 2 + ce - X / 2 : d === "1" && (A = f + ce), ce += M.height, M.left = $, M.top = A, Mn(M, T, _, {
15002
- width: K,
14996
+ for (let be = 0; be < V.length; be += 1) {
14997
+ const M = V[be];
14998
+ let $ = u + ge;
14999
+ m === "0" ? $ = o / 2 + ge - Q / 2 + u * re.length : m === "2" && ($ = o + ge - Q + u);
15000
+ let A = i - f + ce - K;
15001
+ d === "0" ? A = i / 2 + ce - K / 2 : d === "1" && (A = f + ce), ce += M.height, M.left = $, M.top = A, Mn(M, T, _, {
15002
+ width: J,
15003
15003
  height: M.height,
15004
15004
  left: $,
15005
15005
  top: A + M.height - f,
@@ -15008,38 +15008,38 @@ function hc(e, t, r, a, n) {
15008
15008
  fs: E
15009
15009
  }), w.values.push(M);
15010
15010
  }
15011
- be += K;
15011
+ ge += J;
15012
15012
  }
15013
15013
  } else {
15014
- const J = mc(t);
15015
- if (J ? t.textBaseline = "alphabetic" : t.textBaseline = "bottom", p === "2" || C) {
15016
- let se = 0, V = 0, Q = 0, B = 0;
15014
+ const Q = mc(t);
15015
+ if (Q ? t.textBaseline = "alphabetic" : t.textBaseline = "bottom", p === "2" || C) {
15016
+ let se = 0, W = 0, j = 0, B = 0;
15017
15017
  const re = {};
15018
15018
  w.rotate = y, y = Math.abs(y);
15019
- let oe = 0, be, fe, X, K, W = 1, ce = null, ye = null;
15019
+ let oe = 0, ge, ue, K, J, V = 1, ce = null, be = null;
15020
15020
  if (C)
15021
- for (; W <= k.length; ) {
15022
- const de = k.slice(oe, W);
15021
+ for (; V <= k.length; ) {
15022
+ const de = k.slice(oe, V);
15023
15023
  if (de[de.length - 1].wrap === !0) {
15024
- if (oe = W, de.length > 1)
15024
+ if (oe = V, de.length > 1)
15025
15025
  for (let me = 0; me < de.length - 1; me += 1) {
15026
- const ue = de[me], He = {
15027
- content: ue.v,
15028
- style: ue,
15029
- width: ue.measureText.width,
15030
- height: ue.measureText.actualBoundingBoxAscent + ue.measureText.actualBoundingBoxDescent,
15026
+ const fe = de[me], He = {
15027
+ content: fe.v,
15028
+ style: fe,
15029
+ width: fe.measureText.width,
15030
+ height: fe.measureText.actualBoundingBoxAscent + fe.measureText.actualBoundingBoxDescent,
15031
15031
  left: 0,
15032
15032
  top: 0,
15033
15033
  splitIndex: B,
15034
- asc: ue.measureText.actualBoundingBoxAscent,
15035
- desc: ue.measureText.actualBoundingBoxDescent,
15034
+ asc: fe.measureText.actualBoundingBoxAscent,
15035
+ desc: fe.measureText.actualBoundingBoxDescent,
15036
15036
  inline: !0,
15037
- fs: ue.fs
15037
+ fs: fe.fs
15038
15038
  };
15039
15039
  re[B].push(He);
15040
15040
  }
15041
15041
  if (de.length === 1) {
15042
- const me = de[0], ue = un(
15042
+ const me = de[0], fe = un(
15043
15043
  "M",
15044
15044
  t,
15045
15045
  r,
@@ -15048,161 +15048,161 @@ function hc(e, t, r, a, n) {
15048
15048
  h.isNil(re[B]) && (re[B] = []), re[B].push({
15049
15049
  content: "",
15050
15050
  style: me,
15051
- width: ue.width,
15052
- height: ue.actualBoundingBoxAscent + ue.actualBoundingBoxDescent,
15051
+ width: fe.width,
15052
+ height: fe.actualBoundingBoxAscent + fe.actualBoundingBoxDescent,
15053
15053
  left: 0,
15054
15054
  top: 0,
15055
15055
  splitIndex: B,
15056
- asc: ue.actualBoundingBoxAscent,
15057
- desc: ue.actualBoundingBoxDescent,
15056
+ asc: fe.actualBoundingBoxAscent,
15057
+ desc: fe.actualBoundingBoxDescent,
15058
15058
  inline: !0,
15059
15059
  wrap: !0,
15060
15060
  fs: me.fs
15061
15061
  });
15062
15062
  }
15063
- B += 1, W += 1;
15063
+ B += 1, V += 1;
15064
15064
  continue;
15065
15065
  }
15066
15066
  let te = 0, ve = 0;
15067
15067
  for (let me = 0; me < de.length; me += 1) {
15068
- const ue = de[me];
15069
- h.isNil(ue.measureText) && (ue.measureText = un(
15070
- ue.v,
15068
+ const fe = de[me];
15069
+ h.isNil(fe.measureText) && (fe.measureText = un(
15070
+ fe.v,
15071
15071
  t,
15072
15072
  r,
15073
- ue.fontset
15074
- )), te += ue.measureText.width, ve = Math.max(
15075
- ue.measureText.actualBoundingBoxAscent + ue.measureText.actualBoundingBoxDescent
15073
+ fe.fontset
15074
+ )), te += fe.measureText.width, ve = Math.max(
15075
+ fe.measureText.actualBoundingBoxAscent + fe.measureText.actualBoundingBoxDescent
15076
15076
  );
15077
15077
  }
15078
15078
  const we = te * Math.cos(y * Math.PI / 180) + ve * Math.sin(y * Math.PI / 180), Te = te * Math.sin(y * Math.PI / 180) + ve * Math.cos(y * Math.PI / 180), Se = de[de.length - 1];
15079
- if ((Se.v === " " || qo(Se.v) === 2) && (ye = W), y !== 0)
15079
+ if ((Se.v === " " || qo(Se.v) === 2) && (be = V), y !== 0)
15080
15080
  if (Te + f > i && !h.isNil(re[B]) && p === "2")
15081
- if (!h.isNil(ye) && ye < W) {
15082
- for (let me = 0; me < ye - oe; me += 1) {
15083
- const ue = de[me];
15081
+ if (!h.isNil(be) && be < V) {
15082
+ for (let me = 0; me < be - oe; me += 1) {
15083
+ const fe = de[me];
15084
15084
  re[B].push({
15085
- content: ue.v,
15086
- style: ue,
15087
- width: ue.measureText.width,
15088
- height: ue.measureText.actualBoundingBoxAscent + ue.measureText.actualBoundingBoxDescent,
15085
+ content: fe.v,
15086
+ style: fe,
15087
+ width: fe.measureText.width,
15088
+ height: fe.measureText.actualBoundingBoxAscent + fe.measureText.actualBoundingBoxDescent,
15089
15089
  left: 0,
15090
15090
  top: 0,
15091
15091
  splitIndex: B,
15092
- asc: ue.measureText.actualBoundingBoxAscent,
15093
- desc: ue.measureText.actualBoundingBoxDescent,
15092
+ asc: fe.measureText.actualBoundingBoxAscent,
15093
+ desc: fe.measureText.actualBoundingBoxDescent,
15094
15094
  inline: !0,
15095
- fs: ue.fs
15095
+ fs: fe.fs
15096
15096
  });
15097
15097
  }
15098
- oe = ye, W = ye + 1, B += 1, ye = null;
15098
+ oe = be, V = be + 1, B += 1, be = null;
15099
15099
  } else {
15100
- oe = W - 1;
15100
+ oe = V - 1;
15101
15101
  for (let me = 0; me < de.length - 1; me += 1) {
15102
- const ue = de[me];
15102
+ const fe = de[me];
15103
15103
  re[B].push({
15104
- content: ue.v,
15105
- style: ue,
15106
- width: ue.measureText.width,
15107
- height: ue.measureText.actualBoundingBoxAscent + ue.measureText.actualBoundingBoxDescent,
15104
+ content: fe.v,
15105
+ style: fe,
15106
+ width: fe.measureText.width,
15107
+ height: fe.measureText.actualBoundingBoxAscent + fe.measureText.actualBoundingBoxDescent,
15108
15108
  left: 0,
15109
15109
  top: 0,
15110
15110
  splitIndex: B,
15111
- asc: ue.measureText.actualBoundingBoxAscent,
15112
- desc: ue.measureText.actualBoundingBoxDescent,
15111
+ asc: fe.measureText.actualBoundingBoxAscent,
15112
+ desc: fe.measureText.actualBoundingBoxDescent,
15113
15113
  inline: !0,
15114
- fs: ue.fs
15114
+ fs: fe.fs
15115
15115
  });
15116
15116
  }
15117
15117
  B += 1;
15118
15118
  }
15119
- else if (W === k.length) {
15119
+ else if (V === k.length) {
15120
15120
  h.isNil(re[B]) && (re[B] = []);
15121
15121
  for (let me = 0; me < de.length; me += 1) {
15122
- const ue = de[me];
15122
+ const fe = de[me];
15123
15123
  re[B].push({
15124
- content: ue.v,
15125
- style: ue,
15126
- width: ue.measureText.width,
15127
- height: ue.measureText.actualBoundingBoxAscent + ue.measureText.actualBoundingBoxDescent,
15124
+ content: fe.v,
15125
+ style: fe,
15126
+ width: fe.measureText.width,
15127
+ height: fe.measureText.actualBoundingBoxAscent + fe.measureText.actualBoundingBoxDescent,
15128
15128
  left: 0,
15129
15129
  top: 0,
15130
15130
  splitIndex: B,
15131
- asc: ue.measureText.actualBoundingBoxAscent,
15132
- desc: ue.measureText.actualBoundingBoxDescent,
15131
+ asc: fe.measureText.actualBoundingBoxAscent,
15132
+ desc: fe.measureText.actualBoundingBoxDescent,
15133
15133
  inline: !0,
15134
- fs: ue.fs
15134
+ fs: fe.fs
15135
15135
  });
15136
15136
  }
15137
15137
  break;
15138
15138
  } else
15139
- h.isNil(re[B]) && (re[B] = []), W += 1;
15139
+ h.isNil(re[B]) && (re[B] = []), V += 1;
15140
15140
  else if (we + u > o && !h.isNil(re[B]) && p === "2")
15141
- if (!h.isNil(ye) && ye < W) {
15142
- for (let me = 0; me < ye - oe; me += 1) {
15143
- const ue = de[me];
15141
+ if (!h.isNil(be) && be < V) {
15142
+ for (let me = 0; me < be - oe; me += 1) {
15143
+ const fe = de[me];
15144
15144
  re[B].push({
15145
- content: ue.v,
15146
- style: ue,
15147
- width: ue.measureText.width,
15148
- height: ue.measureText.actualBoundingBoxAscent + ue.measureText.actualBoundingBoxDescent,
15145
+ content: fe.v,
15146
+ style: fe,
15147
+ width: fe.measureText.width,
15148
+ height: fe.measureText.actualBoundingBoxAscent + fe.measureText.actualBoundingBoxDescent,
15149
15149
  left: 0,
15150
15150
  top: 0,
15151
15151
  splitIndex: B,
15152
- asc: ue.measureText.actualBoundingBoxAscent,
15153
- desc: ue.measureText.actualBoundingBoxDescent,
15152
+ asc: fe.measureText.actualBoundingBoxAscent,
15153
+ desc: fe.measureText.actualBoundingBoxDescent,
15154
15154
  inline: !0,
15155
- fs: ue.fs
15155
+ fs: fe.fs
15156
15156
  });
15157
15157
  }
15158
- oe = ye, W = ye + 1, B += 1, ye = null;
15158
+ oe = be, V = be + 1, B += 1, be = null;
15159
15159
  } else {
15160
- oe = W - 1;
15160
+ oe = V - 1;
15161
15161
  for (let me = 0; me < de.length - 1; me += 1) {
15162
- const ue = de[me];
15162
+ const fe = de[me];
15163
15163
  re[B].push({
15164
- content: ue.v,
15165
- style: ue,
15166
- width: ue.measureText.width,
15167
- height: ue.measureText.actualBoundingBoxAscent + ue.measureText.actualBoundingBoxDescent,
15164
+ content: fe.v,
15165
+ style: fe,
15166
+ width: fe.measureText.width,
15167
+ height: fe.measureText.actualBoundingBoxAscent + fe.measureText.actualBoundingBoxDescent,
15168
15168
  left: 0,
15169
15169
  top: 0,
15170
15170
  splitIndex: B,
15171
- asc: ue.measureText.actualBoundingBoxAscent,
15172
- desc: ue.measureText.actualBoundingBoxDescent,
15171
+ asc: fe.measureText.actualBoundingBoxAscent,
15172
+ desc: fe.measureText.actualBoundingBoxDescent,
15173
15173
  inline: !0,
15174
- fs: ue.fs
15174
+ fs: fe.fs
15175
15175
  });
15176
15176
  }
15177
15177
  B += 1;
15178
15178
  }
15179
- else if (W === k.length) {
15179
+ else if (V === k.length) {
15180
15180
  h.isNil(re[B]) && (re[B] = []);
15181
15181
  for (let me = 0; me < de.length; me += 1) {
15182
- const ue = de[me];
15182
+ const fe = de[me];
15183
15183
  re[B].push({
15184
- content: ue.v,
15185
- style: ue,
15186
- width: ue.measureText.width,
15187
- height: ue.measureText.actualBoundingBoxAscent + ue.measureText.actualBoundingBoxDescent,
15184
+ content: fe.v,
15185
+ style: fe,
15186
+ width: fe.measureText.width,
15187
+ height: fe.measureText.actualBoundingBoxAscent + fe.measureText.actualBoundingBoxDescent,
15188
15188
  left: 0,
15189
15189
  top: 0,
15190
15190
  splitIndex: B,
15191
- asc: ue.measureText.actualBoundingBoxAscent,
15192
- desc: ue.measureText.actualBoundingBoxDescent,
15191
+ asc: fe.measureText.actualBoundingBoxAscent,
15192
+ desc: fe.measureText.actualBoundingBoxDescent,
15193
15193
  inline: !0,
15194
- fs: ue.fs
15194
+ fs: fe.fs
15195
15195
  });
15196
15196
  }
15197
15197
  break;
15198
15198
  } else
15199
- h.isNil(re[B]) && (re[B] = []), W += 1;
15199
+ h.isNil(re[B]) && (re[B] = []), V += 1;
15200
15200
  }
15201
15201
  else
15202
- for (I = I.toString(); W <= I.length; ) {
15203
- const de = I.substring(oe, W), te = un(de, t, r), ve = te.width, we = te.actualBoundingBoxAscent + te.actualBoundingBoxDescent, Te = ve * Math.cos(y * Math.PI / 180) + we * Math.sin(y * Math.PI / 180), Se = ve * Math.sin(y * Math.PI / 180) + we * Math.cos(y * Math.PI / 180), me = de.substr(de.length - 1, 1);
15202
+ for (I = I.toString(); V <= I.length; ) {
15203
+ const de = I.substring(oe, V), te = un(de, t, r), ve = te.width, we = te.actualBoundingBoxAscent + te.actualBoundingBoxDescent, Te = ve * Math.cos(y * Math.PI / 180) + we * Math.sin(y * Math.PI / 180), Se = ve * Math.sin(y * Math.PI / 180) + we * Math.cos(y * Math.PI / 180), me = de.substr(de.length - 1, 1);
15204
15204
  if ((me === " " || qo(me) === 2) && (ce = {
15205
- index: W,
15205
+ index: V,
15206
15206
  str: de,
15207
15207
  width: Te,
15208
15208
  height: Se,
@@ -15210,7 +15210,7 @@ function hc(e, t, r, a, n) {
15210
15210
  desc: te.actualBoundingBoxDescent
15211
15211
  }), y !== 0)
15212
15212
  if (Se + f > i && !h.isNil(re[B]))
15213
- !h.isNil(ce) && ce.index < W ? (oe = ce.index, W = ce.index + 1, re[B].push({
15213
+ !h.isNil(ce) && ce.index < V ? (oe = ce.index, V = ce.index + 1, re[B].push({
15214
15214
  content: ce.str,
15215
15215
  style: v,
15216
15216
  width: ce.width,
@@ -15221,19 +15221,19 @@ function hc(e, t, r, a, n) {
15221
15221
  asc: ce.asc,
15222
15222
  desc: ce.desc,
15223
15223
  fs: E
15224
- }), B += 1, ce = null) : (oe = W - 1, re[B].push({
15225
- content: be,
15224
+ }), B += 1, ce = null) : (oe = V - 1, re[B].push({
15225
+ content: ge,
15226
15226
  style: v,
15227
15227
  left: 0,
15228
15228
  top: 0,
15229
15229
  splitIndex: B,
15230
- height: fe,
15231
- width: X,
15230
+ height: ue,
15231
+ width: K,
15232
15232
  asc: te.actualBoundingBoxAscent,
15233
15233
  desc: te.actualBoundingBoxDescent,
15234
15234
  fs: E
15235
15235
  }), B += 1);
15236
- else if (W === I.length) {
15236
+ else if (V === I.length) {
15237
15237
  h.isNil(re[B]) && (re[B] = []), re[B].push({
15238
15238
  content: de,
15239
15239
  style: v,
@@ -15248,9 +15248,9 @@ function hc(e, t, r, a, n) {
15248
15248
  });
15249
15249
  break;
15250
15250
  } else
15251
- h.isNil(re[B]) && (re[B] = []), W += 1;
15251
+ h.isNil(re[B]) && (re[B] = []), V += 1;
15252
15252
  else if (Te + u > o && !h.isNil(re[B]))
15253
- !h.isNil(ce) && ce.index < W ? (oe = ce.index, W = ce.index + 1, re[B].push({
15253
+ !h.isNil(ce) && ce.index < V ? (oe = ce.index, V = ce.index + 1, re[B].push({
15254
15254
  content: ce.str,
15255
15255
  style: v,
15256
15256
  width: ce.width,
@@ -15261,19 +15261,19 @@ function hc(e, t, r, a, n) {
15261
15261
  asc: ce.asc,
15262
15262
  desc: ce.desc,
15263
15263
  fs: E
15264
- }), B += 1, ce = null) : (ce = null, oe = W - 1, re[B].push({
15265
- content: be,
15264
+ }), B += 1, ce = null) : (ce = null, oe = V - 1, re[B].push({
15265
+ content: ge,
15266
15266
  style: v,
15267
- width: X,
15268
- height: fe,
15267
+ width: K,
15268
+ height: ue,
15269
15269
  left: 0,
15270
15270
  top: 0,
15271
15271
  splitIndex: B,
15272
- asc: K.actualBoundingBoxAscent,
15273
- desc: K.actualBoundingBoxDescent,
15272
+ asc: J.actualBoundingBoxAscent,
15273
+ desc: J.actualBoundingBoxDescent,
15274
15274
  fs: E
15275
15275
  }), B += 1);
15276
- else if (W === I.length) {
15276
+ else if (V === I.length) {
15277
15277
  h.isNil(re[B]) && (re[B] = []), re[B].push({
15278
15278
  content: de,
15279
15279
  style: v,
@@ -15288,8 +15288,8 @@ function hc(e, t, r, a, n) {
15288
15288
  });
15289
15289
  break;
15290
15290
  } else
15291
- h.isNil(re[B]) && (re[B] = []), W += 1;
15292
- be = de, fe = we, X = ve, K = te;
15291
+ h.isNil(re[B]) && (re[B] = []), V += 1;
15292
+ ge = de, ue = we, K = ve, J = te;
15293
15293
  }
15294
15294
  const M = [], $ = Object.keys(re).length;
15295
15295
  if ($ === 0) return w;
@@ -15297,29 +15297,29 @@ function hc(e, t, r, a, n) {
15297
15297
  const te = re[de];
15298
15298
  if (h.isNil(te))
15299
15299
  continue;
15300
- let ve = 0, we = 0, Te = 0, Se = 0, me = 0, ue = 0;
15300
+ let ve = 0, we = 0, Te = 0, Se = 0, me = 0, fe = 0;
15301
15301
  for (let He = 0; He < te.length; He += 1) {
15302
15302
  const Ue = te[He];
15303
15303
  ve += Ue.width, we = Math.max(
15304
15304
  we,
15305
- Ue.height - (J ? Ue.desc : 0)
15306
- ), Te = Math.max(Te, J ? Ue.desc : 0), Se = Math.max(Se, Ue.asc), ue += 1;
15305
+ Ue.height - (Q ? Ue.desc : 0)
15306
+ ), Te = Math.max(Te, Q ? Ue.desc : 0), Se = Math.max(Se, Ue.asc), fe += 1;
15307
15307
  }
15308
- me = we / 2, y !== 0 ? (we += me, Q = Math.max(Q, ve), V += we) : (we += me, se = Math.max(se, ve), V += we), M.push({
15308
+ me = we / 2, y !== 0 ? (we += me, j = Math.max(j, ve), W += we) : (we += me, se = Math.max(se, ve), W += we), M.push({
15309
15309
  width: ve,
15310
15310
  height: we,
15311
15311
  desc: Te,
15312
15312
  asc: Se,
15313
15313
  lineHeight: me,
15314
- wordCount: ue
15314
+ wordCount: fe
15315
15315
  });
15316
15316
  }
15317
15317
  let A = 0, F = 0;
15318
15318
  const N = y * Math.PI / 180, G = M[$ - 1], S = G.lineHeight;
15319
- V = V - S + G.desc;
15320
- const H = V / Math.sin(N) + Q * Math.cos(N), L = Q * Math.sin(N);
15319
+ W = W - S + G.desc;
15320
+ const H = W / Math.sin(N) + j * Math.cos(N), L = j * Math.sin(N);
15321
15321
  let pe = 0;
15322
- if (y !== 0 ? ($ === 1 ? (se = Q + 2 * (V / Math.tan(N)), pe = V / Math.tan(N)) : se = Q + V / Math.tan(N), w.textWidthAll = H, w.textHeightAll = L) : (w.textWidthAll = se, w.textHeightAll = V), l === "onlyWidth")
15322
+ if (y !== 0 ? ($ === 1 ? (se = j + 2 * (W / Math.tan(N)), pe = W / Math.tan(N)) : se = j + W / Math.tan(N), w.textWidthAll = H, w.textHeightAll = L) : (w.textWidthAll = se, w.textHeightAll = W), l === "onlyWidth")
15323
15323
  return w;
15324
15324
  if (y !== 0 && Number(b) === 1) {
15325
15325
  t.textAlign = "end";
@@ -15333,8 +15333,8 @@ function hc(e, t, r, a, n) {
15333
15333
  const Te = te[we];
15334
15334
  let Se, me;
15335
15335
  if (y !== 0) {
15336
- const ue = A + ve.asc, He = A / Math.tan(N) - F + Q;
15337
- m === "0" ? d === "0" ? (Se = He + o / 2 - se / 2 + S * Math.cos(N) / 2, me = ue + i / 2 - V / 2 - S * Math.cos(N) / 2) : d === "1" ? (Se = He + o / 2 - se / 2, me = ue - (V / 2 - L / 2)) : d === "2" && (Se = He + o / 2 - se / 2 + S * Math.cos(N), me = ue + i - L / 2 - V / 2 - S * Math.cos(N)) : m === "1" ? d === "0" ? (Se = He - L * Math.sin(N) / 2 + S * Math.cos(N) / 2, me = ue + i / 2 + L * Math.cos(N) / 2 - S * Math.cos(N) / 2) : d === "1" ? (Se = He - L * Math.sin(N), me = ue + L * Math.cos(N)) : d === "2" && (Se = He + S * Math.cos(N), me = ue + i - S * Math.cos(N)) : m === "2" && (d === "0" ? (Se = He + o - H / 2 - (Q / 2 + V / 2 / Math.tan(N)) + S * Math.cos(N) / 2, me = ue + i / 2 - V / 2 - S * Math.cos(N) / 2) : d === "1" ? (Se = He + o - se + pe, me = ue - V) : d === "2" && (Se = He + o - H * Math.cos(N) + S * Math.cos(N), me = ue + i - H * Math.sin(N) - S * Math.cos(N)));
15336
+ const fe = A + ve.asc, He = A / Math.tan(N) - F + j;
15337
+ m === "0" ? d === "0" ? (Se = He + o / 2 - se / 2 + S * Math.cos(N) / 2, me = fe + i / 2 - W / 2 - S * Math.cos(N) / 2) : d === "1" ? (Se = He + o / 2 - se / 2, me = fe - (W / 2 - L / 2)) : d === "2" && (Se = He + o / 2 - se / 2 + S * Math.cos(N), me = fe + i - L / 2 - W / 2 - S * Math.cos(N)) : m === "1" ? d === "0" ? (Se = He - L * Math.sin(N) / 2 + S * Math.cos(N) / 2, me = fe + i / 2 + L * Math.cos(N) / 2 - S * Math.cos(N) / 2) : d === "1" ? (Se = He - L * Math.sin(N), me = fe + L * Math.cos(N)) : d === "2" && (Se = He + S * Math.cos(N), me = fe + i - S * Math.cos(N)) : m === "2" && (d === "0" ? (Se = He + o - H / 2 - (j / 2 + W / 2 / Math.tan(N)) + S * Math.cos(N) / 2, me = fe + i / 2 - W / 2 - S * Math.cos(N) / 2) : d === "1" ? (Se = He + o - se + pe, me = fe - W) : d === "2" && (Se = He + o - H * Math.cos(N) + S * Math.cos(N), me = fe + i - H * Math.sin(N) - S * Math.cos(N)));
15338
15338
  }
15339
15339
  Te.left = Se, Te.top = me, Mn(Te, T, _, {
15340
15340
  width: Te.width,
@@ -15359,8 +15359,8 @@ function hc(e, t, r, a, n) {
15359
15359
  const Te = te[we];
15360
15360
  let Se, me;
15361
15361
  if (y !== 0) {
15362
- const ue = A + ve.asc, He = (V - A) / Math.tan(N) + F;
15363
- m === "0" ? d === "0" ? (Se = He + o / 2 - se / 2 - S * Math.cos(N) / 2, me = ue + i / 2 - V / 2 + S * Math.cos(N) / 2) : d === "1" ? (Se = He + o / 2 - se / 2 - S * Math.cos(N) / 2, me = ue - (V / 2 - L / 2) + S * Math.cos(N) / 2) : d === "2" && (Se = He + o / 2 - se / 2 - S * Math.cos(N), me = ue + i - L / 2 - V / 2 - S * Math.cos(N)) : m === "1" ? d === "0" ? (Se = He - L * Math.sin(N) / 2 - S * Math.cos(N) / 2, me = ue - V + i / 2 - L * Math.cos(N) / 2 - S * Math.cos(N) / 2) : d === "1" ? (Se = He, me = ue - V) : d === "2" && (Se = He - L * Math.sin(N) - S * Math.cos(N), me = ue - V + i - L * Math.cos(N) - S * Math.cos(N)) : m === "2" && (d === "0" ? (Se = He + o - H / 2 - se / 2 - S * Math.cos(N) / 2, me = ue + i / 2 - V / 2 - S * Math.cos(N) / 2) : d === "1" ? (Se = He + o - H * Math.cos(N), me = ue + L * Math.cos(N)) : d === "2" && (Se = He + o - se - S * Math.cos(N) + pe, me = ue + i - S * Math.cos(N))), Mn(Te, T, _, {
15362
+ const fe = A + ve.asc, He = (W - A) / Math.tan(N) + F;
15363
+ m === "0" ? d === "0" ? (Se = He + o / 2 - se / 2 - S * Math.cos(N) / 2, me = fe + i / 2 - W / 2 + S * Math.cos(N) / 2) : d === "1" ? (Se = He + o / 2 - se / 2 - S * Math.cos(N) / 2, me = fe - (W / 2 - L / 2) + S * Math.cos(N) / 2) : d === "2" && (Se = He + o / 2 - se / 2 - S * Math.cos(N), me = fe + i - L / 2 - W / 2 - S * Math.cos(N)) : m === "1" ? d === "0" ? (Se = He - L * Math.sin(N) / 2 - S * Math.cos(N) / 2, me = fe - W + i / 2 - L * Math.cos(N) / 2 - S * Math.cos(N) / 2) : d === "1" ? (Se = He, me = fe - W) : d === "2" && (Se = He - L * Math.sin(N) - S * Math.cos(N), me = fe - W + i - L * Math.cos(N) - S * Math.cos(N)) : m === "2" && (d === "0" ? (Se = He + o - H / 2 - se / 2 - S * Math.cos(N) / 2, me = fe + i / 2 - W / 2 - S * Math.cos(N) / 2) : d === "1" ? (Se = He + o - H * Math.cos(N), me = fe + L * Math.cos(N)) : d === "2" && (Se = He + o - se - S * Math.cos(N) + pe, me = fe + i - S * Math.cos(N))), Mn(Te, T, _, {
15364
15364
  width: Te.width,
15365
15365
  height: Te.height,
15366
15366
  left: Se,
@@ -15370,7 +15370,7 @@ function hc(e, t, r, a, n) {
15370
15370
  fs: Te.fs
15371
15371
  });
15372
15372
  } else
15373
- Se = u + F, m === "0" ? Se = o / 2 + F - ve.width / 2 : m === "2" && (Se = o + F - ve.width), me = i - f + A + ve.asc - V, d === "0" ? me = i / 2 + A - V / 2 + ve.asc : d === "1" && (me = f + A + ve.asc), Mn(Te, T, _, {
15373
+ Se = u + F, m === "0" ? Se = o / 2 + F - ve.width / 2 : m === "2" && (Se = o + F - ve.width), me = i - f + A + ve.asc - W, d === "0" ? me = i / 2 + A - W / 2 + ve.asc : d === "1" && (me = f + A + ve.asc), Mn(Te, T, _, {
15374
15374
  width: Te.width,
15375
15375
  height: Te.height,
15376
15376
  left: Se,
@@ -15385,32 +15385,32 @@ function hc(e, t, r, a, n) {
15385
15385
  }
15386
15386
  w.type = "plainWrap", y !== 0 && (m === "0" ? (w.textLeftAll = o / 2, d === "0" ? w.textTopAll = i / 2 : d === "1" ? w.textTopAll = L / 2 : d === "2" && (w.textTopAll = i - L / 2)) : m === "1" ? d === "0" ? (w.textLeftAll = 0, w.textTopAll = i / 2) : d === "1" ? (w.textLeftAll = 0, w.textTopAll = 0) : d === "2" && (w.textLeftAll = 0, w.textTopAll = i) : m === "2" && (d === "0" ? (w.textLeftAll = o - H / 2, w.textTopAll = i / 2) : d === "1" ? (w.textLeftAll = o, w.textTopAll = 0) : d === "2" && (w.textLeftAll = o, w.textTopAll = i)));
15387
15387
  } else {
15388
- const se = un(I, t, r), V = se.width, Q = se.actualBoundingBoxDescent + se.actualBoundingBoxAscent;
15388
+ const se = un(I, t, r), W = se.width, j = se.actualBoundingBoxDescent + se.actualBoundingBoxAscent;
15389
15389
  w.rotate = y, y = Math.abs(y);
15390
- const B = y * Math.PI / 180, re = V * Math.cos(B) + Q * Math.sin(B), oe = V * Math.sin(B) + Q * Math.cos(B);
15391
- if (y !== 0 ? w.textHeightAll = oe : w.textHeightAll = oe + Q / 2 - se.actualBoundingBoxDescent - f, w.textWidthAll = re, l === "onlyWidth")
15390
+ const B = y * Math.PI / 180, re = W * Math.cos(B) + j * Math.sin(B), oe = W * Math.sin(B) + j * Math.cos(B);
15391
+ if (y !== 0 ? w.textHeightAll = oe : w.textHeightAll = oe + j / 2 - se.actualBoundingBoxDescent - f, w.textWidthAll = re, l === "onlyWidth")
15392
15392
  return w;
15393
- const be = re, fe = oe, X = a.originCellWidth ?? o, W = !(h.isObject(e) && !h.isNil(e.ht)) && m === "2" && be > X ? "1" : m;
15394
- let ce = u + Q * Math.sin(B) * b;
15395
- W === "0" ? ce = o / 2 - be / 2 + Q * Math.sin(B) * b : W === "2" && (ce = o - u - be + Q * Math.sin(B) * b);
15396
- let ye = i - f - fe + se.actualBoundingBoxAscent * Math.cos(B) + V * Math.sin(B) * b;
15397
- d === "0" ? ye = i / 2 - fe / 2 + se.actualBoundingBoxAscent * Math.cos(B) + V * Math.sin(B) * b : d === "1" && (ye = f + se.actualBoundingBoxAscent * Math.cos(B) + V * Math.sin(B) * b), w.type = "plain";
15393
+ const ge = re, ue = oe, K = a.originCellWidth ?? o, V = !(h.isObject(e) && !h.isNil(e.ht)) && m === "2" && ge > K ? "1" : m;
15394
+ let ce = u + j * Math.sin(B) * b;
15395
+ V === "0" ? ce = o / 2 - ge / 2 + j * Math.sin(B) * b : V === "2" && (ce = o - u - ge + j * Math.sin(B) * b);
15396
+ let be = i - f - ue + se.actualBoundingBoxAscent * Math.cos(B) + W * Math.sin(B) * b;
15397
+ d === "0" ? be = i / 2 - ue / 2 + se.actualBoundingBoxAscent * Math.cos(B) + W * Math.sin(B) * b : d === "1" && (be = f + se.actualBoundingBoxAscent * Math.cos(B) + W * Math.sin(B) * b), w.type = "plain";
15398
15398
  const M = {
15399
15399
  content: I,
15400
15400
  style: v,
15401
- width: be,
15402
- height: fe,
15401
+ width: ge,
15402
+ height: ue,
15403
15403
  left: ce,
15404
- top: ye
15404
+ top: be
15405
15405
  };
15406
15406
  Mn(M, T, _, {
15407
- width: V,
15407
+ width: W,
15408
15408
  left: ce,
15409
- top: ye,
15409
+ top: be,
15410
15410
  asc: se.actualBoundingBoxAscent,
15411
15411
  desc: se.actualBoundingBoxDescent,
15412
15412
  fs: E
15413
- }), w.values.push(M), w.textLeftAll = ce, w.textTopAll = ye, w.asc = se.actualBoundingBoxAscent, w.desc = se.actualBoundingBoxDescent;
15413
+ }), w.values.push(M), w.textLeftAll = ce, w.textTopAll = be, w.asc = se.actualBoundingBoxAscent, w.desc = se.actualBoundingBoxDescent;
15414
15414
  }
15415
15415
  }
15416
15416
  return w;
@@ -16172,7 +16172,7 @@ const _c = function(t) {
16172
16172
  else {
16173
16173
  F > 60 && --F;
16174
16174
  var L = new Date(1900, 0, 1);
16175
- L.setDate(L.getDate() + F - 1), S = [L.getFullYear(), L.getMonth() + 1, L.getDate()], G = L.getDay(), F < 60 && (G = (G + 6) % 7), A && (G = Z(L, S));
16175
+ L.setDate(L.getDate() + F - 1), S = [L.getFullYear(), L.getMonth() + 1, L.getDate()], G = L.getDay(), F < 60 && (G = (G + 6) % 7), A && (G = Y(L, S));
16176
16176
  }
16177
16177
  return H.y = S[0], H.m = S[1], H.d = S[2], H.S = N % 60, N = Math.floor(N / 60), H.M = N % 60, N = Math.floor(N / 60), H.H = N, H.q = G, H;
16178
16178
  }
@@ -16216,7 +16216,7 @@ const _c = function(t) {
16216
16216
  return de;
16217
16217
  }();
16218
16218
  t._general_num = O;
16219
- function U(M, $) {
16219
+ function z(M, $) {
16220
16220
  switch (typeof M) {
16221
16221
  case "string":
16222
16222
  return M;
@@ -16233,13 +16233,13 @@ const _c = function(t) {
16233
16233
  }
16234
16234
  throw new Error("unsupported value in General format: " + M);
16235
16235
  }
16236
- t._general = U;
16237
- function Z(M, $) {
16236
+ t._general = z;
16237
+ function Y(M, $) {
16238
16238
  $[0] -= 581;
16239
16239
  var A = M.getDay();
16240
16240
  return M < 60 && (A = (A + 6) % 7), A;
16241
16241
  }
16242
- function J(M, $, A, F) {
16242
+ function Q(M, $, A, F) {
16243
16243
  var N = "", G = 0, S = 0, H = A.y, L, pe = 0;
16244
16244
  switch (M) {
16245
16245
  case 98:
@@ -16348,54 +16348,54 @@ const _c = function(t) {
16348
16348
  F += (F.length > 0 ? "," : "") + M.substr(A, $);
16349
16349
  return F;
16350
16350
  }
16351
- var V = /* @__PURE__ */ function() {
16351
+ var W = /* @__PURE__ */ function() {
16352
16352
  var $ = /%/g;
16353
- function A(ge, D, q) {
16354
- var Y = D.replace($, ""), P = D.length - Y.length;
16355
- return V(ge, Y, q * Math.pow(10, 2 * P)) + a("%", P);
16356
- }
16357
- function F(ge, D, q) {
16358
- for (var Y = D.length - 1; D.charCodeAt(Y - 1) === 44; ) --Y;
16359
- return V(
16360
- ge,
16361
- D.substr(0, Y),
16362
- q / Math.pow(10, 3 * (D.length - Y))
16353
+ function A(ye, D, q) {
16354
+ var X = D.replace($, ""), P = D.length - X.length;
16355
+ return W(ye, X, q * Math.pow(10, 2 * P)) + a("%", P);
16356
+ }
16357
+ function F(ye, D, q) {
16358
+ for (var X = D.length - 1; D.charCodeAt(X - 1) === 44; ) --X;
16359
+ return W(
16360
+ ye,
16361
+ D.substr(0, X),
16362
+ q / Math.pow(10, 3 * (D.length - X))
16363
16363
  );
16364
16364
  }
16365
- function N(ge, D) {
16366
- var q, Y = ge.indexOf("E") - ge.indexOf(".") - 1;
16367
- if (ge.match(/^#+0.0E\+0$/)) {
16365
+ function N(ye, D) {
16366
+ var q, X = ye.indexOf("E") - ye.indexOf(".") - 1;
16367
+ if (ye.match(/^#+0.0E\+0$/)) {
16368
16368
  if (D == 0) return "0.0E+0";
16369
- if (D < 0) return "-" + N(ge, -D);
16370
- var P = ge.indexOf(".");
16371
- P === -1 && (P = ge.indexOf("E"));
16372
- var z = Math.floor(Math.log(D) * Math.LOG10E) % P;
16373
- if (z < 0 && (z += P), q = (D / Math.pow(10, z)).toPrecision(
16374
- Y + 1 + (P + z) % P
16369
+ if (D < 0) return "-" + N(ye, -D);
16370
+ var P = ye.indexOf(".");
16371
+ P === -1 && (P = ye.indexOf("E"));
16372
+ var U = Math.floor(Math.log(D) * Math.LOG10E) % P;
16373
+ if (U < 0 && (U += P), q = (D / Math.pow(10, U)).toPrecision(
16374
+ X + 1 + (P + U) % P
16375
16375
  ), q.indexOf("e") === -1) {
16376
16376
  var he = Math.floor(Math.log(D) * Math.LOG10E);
16377
- for (q.indexOf(".") === -1 ? q = q.charAt(0) + "." + q.substr(1) + "E+" + (he - q.length + z) : q += "E+" + (he - z); q.substr(0, 2) === "0."; )
16377
+ for (q.indexOf(".") === -1 ? q = q.charAt(0) + "." + q.substr(1) + "E+" + (he - q.length + U) : q += "E+" + (he - U); q.substr(0, 2) === "0."; )
16378
16378
  q = q.charAt(0) + q.substr(2, P) + "." + q.substr(2 + P), q = q.replace(/^0+([1-9])/, "$1").replace(/^0+\./, "0.");
16379
16379
  q = q.replace(/\+-/, "-");
16380
16380
  }
16381
- q = q.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/, function(_e, Ne, j, le) {
16382
- return Ne + j + le.substr(0, (P + z) % P) + "." + le.substr(z) + "E";
16381
+ q = q.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/, function(_e, Ne, Z, le) {
16382
+ return Ne + Z + le.substr(0, (P + U) % P) + "." + le.substr(U) + "E";
16383
16383
  });
16384
- } else q = Number(D).toExponential(Y);
16385
- return ge.match(/E\+00$/) && q.match(/e[+-]\d$/) && (q = q.substr(0, q.length - 1) + "0" + q.charAt(q.length - 1)), ge.match(/E\-/) && q.match(/e\+/) && (q = q.replace(/e\+/, "e")), q.replace("e", "E");
16384
+ } else q = Number(D).toExponential(X);
16385
+ return ye.match(/E\+00$/) && q.match(/e[+-]\d$/) && (q = q.substr(0, q.length - 1) + "0" + q.charAt(q.length - 1)), ye.match(/E\-/) && q.match(/e\+/) && (q = q.replace(/e\+/, "e")), q.replace("e", "E");
16386
16386
  }
16387
16387
  var G = /# (\?+)( ?)\/( ?)(\d+)/;
16388
- function S(ge, D, q) {
16389
- var Y = parseInt(ge[4], 10), P = Math.round(D * Y), z = Math.floor(P / Y), he = P - z * Y, _e = Y;
16390
- return q + (z === 0 ? "" : "" + z) + " " + (he === 0 ? a(" ", ge[1].length + 1 + ge[4].length) : o(he, ge[1].length) + ge[2] + "/" + ge[3] + n(_e, ge[4].length));
16388
+ function S(ye, D, q) {
16389
+ var X = parseInt(ye[4], 10), P = Math.round(D * X), U = Math.floor(P / X), he = P - U * X, _e = X;
16390
+ return q + (U === 0 ? "" : "" + U) + " " + (he === 0 ? a(" ", ye[1].length + 1 + ye[4].length) : o(he, ye[1].length) + ye[2] + "/" + ye[3] + n(_e, ye[4].length));
16391
16391
  }
16392
- function H(ge, D, q) {
16393
- return q + (D === 0 ? "" : "" + D) + a(" ", ge[1].length + 2 + ge[4].length);
16392
+ function H(ye, D, q) {
16393
+ return q + (D === 0 ? "" : "" + D) + a(" ", ye[1].length + 2 + ye[4].length);
16394
16394
  }
16395
16395
  var L = /^#*0*\.([0#]+)/, pe = /\).*[0#]/, de = /\(###\) ###\\?-####/;
16396
- function te(ge) {
16397
- for (var D = "", q, Y = 0; Y != ge.length; ++Y)
16398
- switch (q = ge.charCodeAt(Y)) {
16396
+ function te(ye) {
16397
+ for (var D = "", q, X = 0; X != ye.length; ++X)
16398
+ switch (q = ye.charCodeAt(X)) {
16399
16399
  case 35:
16400
16400
  break;
16401
16401
  case 63:
@@ -16409,192 +16409,192 @@ const _c = function(t) {
16409
16409
  }
16410
16410
  return D;
16411
16411
  }
16412
- function ve(ge, D) {
16412
+ function ve(ye, D) {
16413
16413
  var q = Math.pow(10, D);
16414
- return "" + Math.round(ge * q) / q;
16414
+ return "" + Math.round(ye * q) / q;
16415
16415
  }
16416
- function we(ge, D) {
16417
- var q = ge - Math.floor(ge), Y = Math.pow(10, D);
16418
- return D < ("" + Math.round(q * Y)).length ? 0 : Math.round(q * Y);
16416
+ function we(ye, D) {
16417
+ var q = ye - Math.floor(ye), X = Math.pow(10, D);
16418
+ return D < ("" + Math.round(q * X)).length ? 0 : Math.round(q * X);
16419
16419
  }
16420
- function Te(ge, D) {
16421
- return D < ("" + Math.round((ge - Math.floor(ge)) * Math.pow(10, D))).length ? 1 : 0;
16420
+ function Te(ye, D) {
16421
+ return D < ("" + Math.round((ye - Math.floor(ye)) * Math.pow(10, D))).length ? 1 : 0;
16422
16422
  }
16423
- function Se(ge) {
16424
- return ge < 2147483647 && ge > -2147483648 ? "" + (ge >= 0 ? ge | 0 : ge - 1 | 0) : "" + Math.floor(ge);
16423
+ function Se(ye) {
16424
+ return ye < 2147483647 && ye > -2147483648 ? "" + (ye >= 0 ? ye | 0 : ye - 1 | 0) : "" + Math.floor(ye);
16425
16425
  }
16426
- function me(ge, D, q) {
16427
- if (ge.charCodeAt(0) === 40 && !D.match(pe)) {
16428
- var Y = D.replace(/\( */, "").replace(/ \)/, "").replace(/\)/, "");
16429
- return q >= 0 ? me("n", Y, q) : "(" + me("n", Y, -q) + ")";
16426
+ function me(ye, D, q) {
16427
+ if (ye.charCodeAt(0) === 40 && !D.match(pe)) {
16428
+ var X = D.replace(/\( */, "").replace(/ \)/, "").replace(/\)/, "");
16429
+ return q >= 0 ? me("n", X, q) : "(" + me("n", X, -q) + ")";
16430
16430
  }
16431
16431
  if (D.charCodeAt(D.length - 1) === 44)
16432
- return F(ge, D, q);
16433
- if (D.indexOf("%") !== -1) return A(ge, D, q);
16432
+ return F(ye, D, q);
16433
+ if (D.indexOf("%") !== -1) return A(ye, D, q);
16434
16434
  if (D.indexOf("E") !== -1) return N(D, q);
16435
16435
  if (D.charCodeAt(0) === 36)
16436
- return "$" + me(ge, D.substr(D.charAt(1) == " " ? 2 : 1), q);
16437
- var P, z, he, _e, Ne = Math.abs(q), j = q < 0 ? "-" : "";
16438
- if (D.match(/^00+$/)) return j + u(Ne, D.length);
16436
+ return "$" + me(ye, D.substr(D.charAt(1) == " " ? 2 : 1), q);
16437
+ var P, U, he, _e, Ne = Math.abs(q), Z = q < 0 ? "-" : "";
16438
+ if (D.match(/^00+$/)) return Z + u(Ne, D.length);
16439
16439
  if (D.match(/^[#?]+$/))
16440
16440
  return P = u(q, 0), P === "0" && (P = ""), P.length > D.length ? P : te(D.substr(0, D.length - P.length)) + P;
16441
- if (z = D.match(G)) return S(z, Ne, j);
16441
+ if (U = D.match(G)) return S(U, Ne, Z);
16442
16442
  if (D.match(/^#+0+$/))
16443
- return j + u(Ne, D.length - D.indexOf("0"));
16444
- if (z = D.match(L))
16445
- return P = ve(q, z[1].length).replace(/^([^\.]+)$/, "$1." + te(z[1])).replace(/\.$/, "." + te(z[1])).replace(/\.(\d*)$/, function(ke, We) {
16446
- return "." + We + a("0", te(z[1]).length - We.length);
16443
+ return Z + u(Ne, D.length - D.indexOf("0"));
16444
+ if (U = D.match(L))
16445
+ return P = ve(q, U[1].length).replace(/^([^\.]+)$/, "$1." + te(U[1])).replace(/\.$/, "." + te(U[1])).replace(/\.(\d*)$/, function(ke, We) {
16446
+ return "." + We + a("0", te(U[1]).length - We.length);
16447
16447
  }), D.indexOf("0.") !== -1 ? P : P.replace(/^0\./, ".");
16448
- if (D = D.replace(/^#+([0.])/, "$1"), z = D.match(/^(0*)\.(#*)$/))
16449
- return j + ve(Ne, z[2].length).replace(/\.(\d*[1-9])0*$/, ".$1").replace(/^(-?\d*)$/, "$1.").replace(/^0\./, z[1].length ? "0." : ".");
16450
- if (z = D.match(/^#{1,3},##0(\.?)$/))
16451
- return j + se(u(Ne, 0));
16452
- if (z = D.match(/^#,##0\.([#0]*0)$/))
16453
- return q < 0 ? "-" + me(ge, D, -q) : se("" + (Math.floor(q) + Te(q, z[1].length))) + "." + n(we(q, z[1].length), z[1].length);
16454
- if (z = D.match(/^#,#*,#0/))
16455
- return me(ge, D.replace(/^#,#*,/, ""), q);
16456
- if (z = D.match(/^([0#]+)(\\?-([0#]+))+$/))
16457
- return P = r(me(ge, D.replace(/[\\-]/g, ""), q)), he = 0, r(
16448
+ if (D = D.replace(/^#+([0.])/, "$1"), U = D.match(/^(0*)\.(#*)$/))
16449
+ return Z + ve(Ne, U[2].length).replace(/\.(\d*[1-9])0*$/, ".$1").replace(/^(-?\d*)$/, "$1.").replace(/^0\./, U[1].length ? "0." : ".");
16450
+ if (U = D.match(/^#{1,3},##0(\.?)$/))
16451
+ return Z + se(u(Ne, 0));
16452
+ if (U = D.match(/^#,##0\.([#0]*0)$/))
16453
+ return q < 0 ? "-" + me(ye, D, -q) : se("" + (Math.floor(q) + Te(q, U[1].length))) + "." + n(we(q, U[1].length), U[1].length);
16454
+ if (U = D.match(/^#,#*,#0/))
16455
+ return me(ye, D.replace(/^#,#*,/, ""), q);
16456
+ if (U = D.match(/^([0#]+)(\\?-([0#]+))+$/))
16457
+ return P = r(me(ye, D.replace(/[\\-]/g, ""), q)), he = 0, r(
16458
16458
  r(D.replace(/\\/g, "")).replace(/[0#]/g, function(ke) {
16459
16459
  return he < P.length ? P.charAt(he++) : ke === "0" ? "0" : "";
16460
16460
  })
16461
16461
  );
16462
16462
  if (D.match(de))
16463
- return P = me(ge, "##########", q), "(" + P.substr(0, 3) + ") " + P.substr(3, 3) + "-" + P.substr(6);
16463
+ return P = me(ye, "##########", q), "(" + P.substr(0, 3) + ") " + P.substr(3, 3) + "-" + P.substr(6);
16464
16464
  var le = "";
16465
- if (z = D.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))
16466
- return he = Math.min(z[4].length, 7), _e = v(Ne, Math.pow(10, he) - 1, !1), P = "" + j, le = V("n", z[1], _e[1]), le.charAt(le.length - 1) == " " && (le = le.substr(0, le.length - 1) + "0"), P += le + z[2] + "/" + z[3], le = i(_e[2], he), le.length < z[4].length && (le = te(z[4].substr(z[4].length - le.length)) + le), P += le, P;
16467
- if (z = D.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))
16468
- return he = Math.min(Math.max(z[1].length, z[4].length), 7), _e = v(Ne, Math.pow(10, he) - 1, !0), j + (_e[0] || (_e[1] ? "" : "0")) + " " + (_e[1] ? o(_e[1], he) + z[2] + "/" + z[3] + i(_e[2], he) : a(" ", 2 * he + 1 + z[2].length + z[3].length));
16469
- if (z = D.match(/^[#0?]+$/))
16465
+ if (U = D.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))
16466
+ return he = Math.min(U[4].length, 7), _e = v(Ne, Math.pow(10, he) - 1, !1), P = "" + Z, le = W("n", U[1], _e[1]), le.charAt(le.length - 1) == " " && (le = le.substr(0, le.length - 1) + "0"), P += le + U[2] + "/" + U[3], le = i(_e[2], he), le.length < U[4].length && (le = te(U[4].substr(U[4].length - le.length)) + le), P += le, P;
16467
+ if (U = D.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))
16468
+ return he = Math.min(Math.max(U[1].length, U[4].length), 7), _e = v(Ne, Math.pow(10, he) - 1, !0), Z + (_e[0] || (_e[1] ? "" : "0")) + " " + (_e[1] ? o(_e[1], he) + U[2] + "/" + U[3] + i(_e[2], he) : a(" ", 2 * he + 1 + U[2].length + U[3].length));
16469
+ if (U = D.match(/^[#0?]+$/))
16470
16470
  return P = u(q, 0), D.length <= P.length ? P : te(D.substr(0, D.length - P.length)) + P;
16471
- if (z = D.match(/^([#0?]+)\.([#0]+)$/)) {
16472
- P = "" + q.toFixed(Math.min(z[2].length, 10)).replace(/([^0])0+$/, "$1"), he = P.indexOf(".");
16471
+ if (U = D.match(/^([#0?]+)\.([#0]+)$/)) {
16472
+ P = "" + q.toFixed(Math.min(U[2].length, 10)).replace(/([^0])0+$/, "$1"), he = P.indexOf(".");
16473
16473
  var qe = D.indexOf(".") - he, xe = D.length - P.length - qe;
16474
16474
  return te(D.substr(0, qe) + P + D.substr(D.length - xe));
16475
16475
  }
16476
- if (z = D.match(/^00,000\.([#0]*0)$/))
16477
- return he = we(q, z[1].length), q < 0 ? "-" + me(ge, D, -q) : se(Se(q)).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function(ke) {
16476
+ if (U = D.match(/^00,000\.([#0]*0)$/))
16477
+ return he = we(q, U[1].length), q < 0 ? "-" + me(ye, D, -q) : se(Se(q)).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function(ke) {
16478
16478
  return "00," + (ke.length < 3 ? n(0, 3 - ke.length) : "") + ke;
16479
- }) + "." + n(he, z[1].length);
16479
+ }) + "." + n(he, U[1].length);
16480
16480
  switch (D) {
16481
16481
  case "###,##0.00":
16482
- return me(ge, "#,##0.00", q);
16482
+ return me(ye, "#,##0.00", q);
16483
16483
  case "###,###":
16484
16484
  case "##,###":
16485
16485
  case "#,###":
16486
16486
  var Ee = se(u(Ne, 0));
16487
- return Ee !== "0" ? j + Ee : "";
16487
+ return Ee !== "0" ? Z + Ee : "";
16488
16488
  case "###,###.00":
16489
- return me(ge, "###,##0.00", q).replace(/^0\./, ".");
16489
+ return me(ye, "###,##0.00", q).replace(/^0\./, ".");
16490
16490
  case "#,###.00":
16491
- return me(ge, "#,##0.00", q).replace(/^0\./, ".");
16491
+ return me(ye, "#,##0.00", q).replace(/^0\./, ".");
16492
16492
  }
16493
16493
  throw new Error("unsupported format |" + D + "|");
16494
16494
  }
16495
- function ue(ge, D, q) {
16496
- for (var Y = D.length - 1; D.charCodeAt(Y - 1) === 44; ) --Y;
16497
- return V(
16498
- ge,
16499
- D.substr(0, Y),
16500
- q / Math.pow(10, 3 * (D.length - Y))
16495
+ function fe(ye, D, q) {
16496
+ for (var X = D.length - 1; D.charCodeAt(X - 1) === 44; ) --X;
16497
+ return W(
16498
+ ye,
16499
+ D.substr(0, X),
16500
+ q / Math.pow(10, 3 * (D.length - X))
16501
16501
  );
16502
16502
  }
16503
- function He(ge, D, q) {
16504
- var Y = D.replace($, ""), P = D.length - Y.length;
16505
- return V(ge, Y, q * Math.pow(10, 2 * P)) + a("%", P);
16503
+ function He(ye, D, q) {
16504
+ var X = D.replace($, ""), P = D.length - X.length;
16505
+ return W(ye, X, q * Math.pow(10, 2 * P)) + a("%", P);
16506
16506
  }
16507
- function Ue(ge, D) {
16508
- var q, Y = ge.indexOf("E") - ge.indexOf(".") - 1;
16509
- if (ge.match(/^#+0.0E\+0$/)) {
16507
+ function Ue(ye, D) {
16508
+ var q, X = ye.indexOf("E") - ye.indexOf(".") - 1;
16509
+ if (ye.match(/^#+0.0E\+0$/)) {
16510
16510
  if (D == 0) return "0.0E+0";
16511
- if (D < 0) return "-" + Ue(ge, -D);
16512
- var P = ge.indexOf(".");
16513
- P === -1 && (P = ge.indexOf("E"));
16514
- var z = Math.floor(Math.log(D) * Math.LOG10E) % P;
16515
- if (z < 0 && (z += P), q = (D / Math.pow(10, z)).toPrecision(
16516
- Y + 1 + (P + z) % P
16511
+ if (D < 0) return "-" + Ue(ye, -D);
16512
+ var P = ye.indexOf(".");
16513
+ P === -1 && (P = ye.indexOf("E"));
16514
+ var U = Math.floor(Math.log(D) * Math.LOG10E) % P;
16515
+ if (U < 0 && (U += P), q = (D / Math.pow(10, U)).toPrecision(
16516
+ X + 1 + (P + U) % P
16517
16517
  ), !q.match(/[Ee]/)) {
16518
16518
  var he = Math.floor(Math.log(D) * Math.LOG10E);
16519
- q.indexOf(".") === -1 ? q = q.charAt(0) + "." + q.substr(1) + "E+" + (he - q.length + z) : q += "E+" + (he - z), q = q.replace(/\+-/, "-");
16519
+ q.indexOf(".") === -1 ? q = q.charAt(0) + "." + q.substr(1) + "E+" + (he - q.length + U) : q += "E+" + (he - U), q = q.replace(/\+-/, "-");
16520
16520
  }
16521
- q = q.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/, function(_e, Ne, j, le) {
16522
- return Ne + j + le.substr(0, (P + z) % P) + "." + le.substr(z) + "E";
16521
+ q = q.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/, function(_e, Ne, Z, le) {
16522
+ return Ne + Z + le.substr(0, (P + U) % P) + "." + le.substr(U) + "E";
16523
16523
  });
16524
- } else q = Number(D).toExponential(Y);
16525
- return ge.match(/E\+00$/) && q.match(/e[+-]\d$/) && (q = q.substr(0, q.length - 1) + "0" + q.charAt(q.length - 1)), ge.match(/E\-/) && q.match(/e\+/) && (q = q.replace(/e\+/, "e")), q.replace("e", "E");
16524
+ } else q = Number(D).toExponential(X);
16525
+ return ye.match(/E\+00$/) && q.match(/e[+-]\d$/) && (q = q.substr(0, q.length - 1) + "0" + q.charAt(q.length - 1)), ye.match(/E\-/) && q.match(/e\+/) && (q = q.replace(/e\+/, "e")), q.replace("e", "E");
16526
16526
  }
16527
- function Me(ge, D, q) {
16528
- if (ge.charCodeAt(0) === 40 && !D.match(pe)) {
16529
- var Y = D.replace(/\( */, "").replace(/ \)/, "").replace(/\)/, "");
16530
- return q >= 0 ? Me("n", Y, q) : "(" + Me("n", Y, -q) + ")";
16527
+ function Me(ye, D, q) {
16528
+ if (ye.charCodeAt(0) === 40 && !D.match(pe)) {
16529
+ var X = D.replace(/\( */, "").replace(/ \)/, "").replace(/\)/, "");
16530
+ return q >= 0 ? Me("n", X, q) : "(" + Me("n", X, -q) + ")";
16531
16531
  }
16532
16532
  if (D.charCodeAt(D.length - 1) === 44)
16533
- return ue(ge, D, q);
16534
- if (D.indexOf("%") !== -1) return He(ge, D, q);
16533
+ return fe(ye, D, q);
16534
+ if (D.indexOf("%") !== -1) return He(ye, D, q);
16535
16535
  if (D.indexOf("E") !== -1) return Ue(D, q);
16536
16536
  if (D.charCodeAt(0) === 36)
16537
- return "$" + Me(ge, D.substr(D.charAt(1) == " " ? 2 : 1), q);
16538
- var P, z, he, _e, Ne = Math.abs(q), j = q < 0 ? "-" : "";
16539
- if (D.match(/^00+$/)) return j + n(Ne, D.length);
16537
+ return "$" + Me(ye, D.substr(D.charAt(1) == " " ? 2 : 1), q);
16538
+ var P, U, he, _e, Ne = Math.abs(q), Z = q < 0 ? "-" : "";
16539
+ if (D.match(/^00+$/)) return Z + n(Ne, D.length);
16540
16540
  if (D.match(/^[#?]+$/))
16541
16541
  return P = "" + q, q === 0 && (P = ""), P.length > D.length ? P : te(D.substr(0, D.length - P.length)) + P;
16542
- if (z = D.match(G)) return H(z, Ne, j);
16542
+ if (U = D.match(G)) return H(U, Ne, Z);
16543
16543
  if (D.match(/^#+0+$/))
16544
- return j + n(Ne, D.length - D.indexOf("0"));
16545
- if (z = D.match(L))
16546
- return P = ("" + q).replace(/^([^\.]+)$/, "$1." + te(z[1])).replace(/\.$/, "." + te(z[1])), P = P.replace(/\.(\d*)$/, function(ke, We) {
16547
- return "." + We + a("0", te(z[1]).length - We.length);
16544
+ return Z + n(Ne, D.length - D.indexOf("0"));
16545
+ if (U = D.match(L))
16546
+ return P = ("" + q).replace(/^([^\.]+)$/, "$1." + te(U[1])).replace(/\.$/, "." + te(U[1])), P = P.replace(/\.(\d*)$/, function(ke, We) {
16547
+ return "." + We + a("0", te(U[1]).length - We.length);
16548
16548
  }), D.indexOf("0.") !== -1 ? P : P.replace(/^0\./, ".");
16549
- if (D = D.replace(/^#+([0.])/, "$1"), z = D.match(/^(0*)\.(#*)$/))
16550
- return j + ("" + Ne).replace(/\.(\d*[1-9])0*$/, ".$1").replace(/^(-?\d*)$/, "$1.").replace(/^0\./, z[1].length ? "0." : ".");
16551
- if (z = D.match(/^#{1,3},##0(\.?)$/))
16552
- return j + se("" + Ne);
16553
- if (z = D.match(/^#,##0\.([#0]*0)$/))
16554
- return q < 0 ? "-" + Me(ge, D, -q) : se("" + q) + "." + a("0", z[1].length);
16555
- if (z = D.match(/^#,#*,#0/))
16556
- return Me(ge, D.replace(/^#,#*,/, ""), q);
16557
- if (z = D.match(/^([0#]+)(\\?-([0#]+))+$/))
16558
- return P = r(Me(ge, D.replace(/[\\-]/g, ""), q)), he = 0, r(
16549
+ if (D = D.replace(/^#+([0.])/, "$1"), U = D.match(/^(0*)\.(#*)$/))
16550
+ return Z + ("" + Ne).replace(/\.(\d*[1-9])0*$/, ".$1").replace(/^(-?\d*)$/, "$1.").replace(/^0\./, U[1].length ? "0." : ".");
16551
+ if (U = D.match(/^#{1,3},##0(\.?)$/))
16552
+ return Z + se("" + Ne);
16553
+ if (U = D.match(/^#,##0\.([#0]*0)$/))
16554
+ return q < 0 ? "-" + Me(ye, D, -q) : se("" + q) + "." + a("0", U[1].length);
16555
+ if (U = D.match(/^#,#*,#0/))
16556
+ return Me(ye, D.replace(/^#,#*,/, ""), q);
16557
+ if (U = D.match(/^([0#]+)(\\?-([0#]+))+$/))
16558
+ return P = r(Me(ye, D.replace(/[\\-]/g, ""), q)), he = 0, r(
16559
16559
  r(D.replace(/\\/g, "")).replace(/[0#]/g, function(ke) {
16560
16560
  return he < P.length ? P.charAt(he++) : ke === "0" ? "0" : "";
16561
16561
  })
16562
16562
  );
16563
16563
  if (D.match(de))
16564
- return P = Me(ge, "##########", q), "(" + P.substr(0, 3) + ") " + P.substr(3, 3) + "-" + P.substr(6);
16564
+ return P = Me(ye, "##########", q), "(" + P.substr(0, 3) + ") " + P.substr(3, 3) + "-" + P.substr(6);
16565
16565
  var le = "";
16566
- if (z = D.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))
16567
- return he = Math.min(z[4].length, 7), _e = v(Ne, Math.pow(10, he) - 1, !1), P = "" + j, le = V("n", z[1], _e[1]), le.charAt(le.length - 1) == " " && (le = le.substr(0, le.length - 1) + "0"), P += le + z[2] + "/" + z[3], le = i(_e[2], he), le.length < z[4].length && (le = te(z[4].substr(z[4].length - le.length)) + le), P += le, P;
16568
- if (z = D.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))
16569
- return he = Math.min(Math.max(z[1].length, z[4].length), 7), _e = v(Ne, Math.pow(10, he) - 1, !0), j + (_e[0] || (_e[1] ? "" : "0")) + " " + (_e[1] ? o(_e[1], he) + z[2] + "/" + z[3] + i(_e[2], he) : a(" ", 2 * he + 1 + z[2].length + z[3].length));
16570
- if (z = D.match(/^[#0?]+$/))
16566
+ if (U = D.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))
16567
+ return he = Math.min(U[4].length, 7), _e = v(Ne, Math.pow(10, he) - 1, !1), P = "" + Z, le = W("n", U[1], _e[1]), le.charAt(le.length - 1) == " " && (le = le.substr(0, le.length - 1) + "0"), P += le + U[2] + "/" + U[3], le = i(_e[2], he), le.length < U[4].length && (le = te(U[4].substr(U[4].length - le.length)) + le), P += le, P;
16568
+ if (U = D.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))
16569
+ return he = Math.min(Math.max(U[1].length, U[4].length), 7), _e = v(Ne, Math.pow(10, he) - 1, !0), Z + (_e[0] || (_e[1] ? "" : "0")) + " " + (_e[1] ? o(_e[1], he) + U[2] + "/" + U[3] + i(_e[2], he) : a(" ", 2 * he + 1 + U[2].length + U[3].length));
16570
+ if (U = D.match(/^[#0?]+$/))
16571
16571
  return P = "" + q, D.length <= P.length ? P : te(D.substr(0, D.length - P.length)) + P;
16572
- if (z = D.match(/^([#0]+)\.([#0]+)$/)) {
16573
- P = "" + q.toFixed(Math.min(z[2].length, 10)).replace(/([^0])0+$/, "$1"), he = P.indexOf(".");
16572
+ if (U = D.match(/^([#0]+)\.([#0]+)$/)) {
16573
+ P = "" + q.toFixed(Math.min(U[2].length, 10)).replace(/([^0])0+$/, "$1"), he = P.indexOf(".");
16574
16574
  var qe = D.indexOf(".") - he, xe = D.length - P.length - qe;
16575
16575
  return te(D.substr(0, qe) + P + D.substr(D.length - xe));
16576
16576
  }
16577
- if (z = D.match(/^00,000\.([#0]*0)$/))
16578
- return q < 0 ? "-" + Me(ge, D, -q) : se("" + q).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function(ke) {
16577
+ if (U = D.match(/^00,000\.([#0]*0)$/))
16578
+ return q < 0 ? "-" + Me(ye, D, -q) : se("" + q).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function(ke) {
16579
16579
  return "00," + (ke.length < 3 ? n(0, 3 - ke.length) : "") + ke;
16580
- }) + "." + n(0, z[1].length);
16580
+ }) + "." + n(0, U[1].length);
16581
16581
  switch (D) {
16582
16582
  case "###,###":
16583
16583
  case "##,###":
16584
16584
  case "#,###":
16585
16585
  var Ee = se("" + Ne);
16586
- return Ee !== "0" ? j + Ee : "";
16586
+ return Ee !== "0" ? Z + Ee : "";
16587
16587
  default:
16588
16588
  if (D.match(/\.[0#?]*$/))
16589
- return Me(ge, D.slice(0, D.lastIndexOf(".")), q) + te(D.slice(D.lastIndexOf(".")));
16589
+ return Me(ye, D.slice(0, D.lastIndexOf(".")), q) + te(D.slice(D.lastIndexOf(".")));
16590
16590
  }
16591
16591
  throw new Error("unsupported format |" + D + "|");
16592
16592
  }
16593
- return function(D, q, Y) {
16594
- return (Y | 0) === Y ? Me(D, q, Y) : me(D, q, Y);
16593
+ return function(D, q, X) {
16594
+ return (X | 0) === X ? Me(D, q, X) : me(D, q, X);
16595
16595
  };
16596
16596
  }();
16597
- function Q(M) {
16597
+ function j(M) {
16598
16598
  for (var $ = [], A = !1, F = 0, N = 0; F < M.length; ++F)
16599
16599
  switch (
16600
16600
  /*cc=*/
@@ -16615,7 +16615,7 @@ const _c = function(t) {
16615
16615
  throw new Error("Format |" + M + "| unterminated string ");
16616
16616
  return $;
16617
16617
  }
16618
- t._split = Q;
16618
+ t._split = j;
16619
16619
  var B = /\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;
16620
16620
  function re(M) {
16621
16621
  for (var $ = 0, A = "", F = ""; $ < M.length; )
@@ -16879,7 +16879,7 @@ const _c = function(t) {
16879
16879
  }, ++S;
16880
16880
  break;
16881
16881
  }
16882
- var me = 0, ue = 0, He;
16882
+ var me = 0, fe = 0, He;
16883
16883
  for (S = N.length - 1, L = "t"; S >= 0; --S)
16884
16884
  switch (N[S].t) {
16885
16885
  case "h":
@@ -16887,7 +16887,7 @@ const _c = function(t) {
16887
16887
  N[S].t = ve, L = "h", me < 1 && (me = 1);
16888
16888
  break;
16889
16889
  case "s":
16890
- (He = N[S].v.match(/\.0+$/)) && (ue = Math.max(ue, He[0].length - 1)), me < 3 && (me = 3);
16890
+ (He = N[S].v.match(/\.0+$/)) && (fe = Math.max(fe, He[0].length - 1)), me < 3 && (me = 3);
16891
16891
  case "d":
16892
16892
  case "y":
16893
16893
  case "M":
@@ -16933,7 +16933,7 @@ const _c = function(t) {
16933
16933
  case "e":
16934
16934
  case "b":
16935
16935
  case "Z":
16936
- N[S].v = J(N[S].t.charCodeAt(0), N[S].v, pe, ue), N[S].t = "t";
16936
+ N[S].v = Q(N[S].t.charCodeAt(0), N[S].v, pe, fe), N[S].t = "t";
16937
16937
  break;
16938
16938
  case "n":
16939
16939
  case "?":
@@ -16945,47 +16945,47 @@ const _c = function(t) {
16945
16945
  Ue += N[S].v, S = Me - 1;
16946
16946
  break;
16947
16947
  case "G":
16948
- N[S].t = "t", N[S].v = U($, A);
16948
+ N[S].t = "t", N[S].v = z($, A);
16949
16949
  break;
16950
16950
  }
16951
- var ge = "", D, q;
16951
+ var ye = "", D, q;
16952
16952
  if (Ue.length > 0) {
16953
- Ue.charCodeAt(0) == 40 ? (D = $ < 0 && Ue.charCodeAt(0) === 45 ? -$ : $, q = V("n", Ue, D)) : (D = $ < 0 && F > 1 ? -$ : $, q = V("n", Ue, D), D < 0 && N[0] && N[0].t == "t" && (q = q.substr(1), N[0].v = "-" + N[0].v)), Me = q.length - 1;
16954
- var Y = N.length;
16953
+ Ue.charCodeAt(0) == 40 ? (D = $ < 0 && Ue.charCodeAt(0) === 45 ? -$ : $, q = W("n", Ue, D)) : (D = $ < 0 && F > 1 ? -$ : $, q = W("n", Ue, D), D < 0 && N[0] && N[0].t == "t" && (q = q.substr(1), N[0].v = "-" + N[0].v)), Me = q.length - 1;
16954
+ var X = N.length;
16955
16955
  for (S = 0; S < N.length; ++S)
16956
16956
  if (N[S] != null && N[S].t != "t" && N[S].v.indexOf(".") > -1) {
16957
- Y = S;
16957
+ X = S;
16958
16958
  break;
16959
16959
  }
16960
16960
  var P = N.length;
16961
- if (Y === N.length && q.indexOf("E") === -1) {
16961
+ if (X === N.length && q.indexOf("E") === -1) {
16962
16962
  for (S = N.length - 1; S >= 0; --S)
16963
16963
  N[S] == null || "n?".indexOf(N[S].t) === -1 || (Me >= N[S].v.length - 1 ? (Me -= N[S].v.length, N[S].v = q.substr(Me + 1, N[S].v.length)) : Me < 0 ? N[S].v = "" : (N[S].v = q.substr(0, Me + 1), Me = -1), N[S].t = "t", P = S);
16964
16964
  Me >= 0 && P < N.length && (N[P].v = q.substr(0, Me + 1) + N[P].v);
16965
- } else if (Y !== N.length && q.indexOf("E") === -1) {
16966
- for (Me = q.indexOf(".") - 1, S = Y; S >= 0; --S)
16965
+ } else if (X !== N.length && q.indexOf("E") === -1) {
16966
+ for (Me = q.indexOf(".") - 1, S = X; S >= 0; --S)
16967
16967
  if (!(N[S] == null || "n?".indexOf(N[S].t) === -1)) {
16968
- for (de = N[S].v.indexOf(".") > -1 && S === Y ? N[S].v.indexOf(".") - 1 : N[S].v.length - 1, ge = N[S].v.substr(de + 1); de >= 0; --de)
16969
- Me >= 0 && (N[S].v.charAt(de) === "0" || N[S].v.charAt(de) === "#") && (ge = q.charAt(Me--) + ge);
16970
- N[S].v = ge, N[S].t = "t", P = S;
16968
+ for (de = N[S].v.indexOf(".") > -1 && S === X ? N[S].v.indexOf(".") - 1 : N[S].v.length - 1, ye = N[S].v.substr(de + 1); de >= 0; --de)
16969
+ Me >= 0 && (N[S].v.charAt(de) === "0" || N[S].v.charAt(de) === "#") && (ye = q.charAt(Me--) + ye);
16970
+ N[S].v = ye, N[S].t = "t", P = S;
16971
16971
  }
16972
- for (Me >= 0 && P < N.length && (N[P].v = q.substr(0, Me + 1) + N[P].v), Me = q.indexOf(".") + 1, S = Y; S < N.length; ++S)
16973
- if (!(N[S] == null || "n?(".indexOf(N[S].t) === -1 && S !== Y)) {
16974
- for (de = N[S].v.indexOf(".") > -1 && S === Y ? N[S].v.indexOf(".") + 1 : 0, ge = N[S].v.substr(0, de); de < N[S].v.length; ++de)
16975
- Me < q.length && (ge += q.charAt(Me++));
16976
- N[S].v = ge, N[S].t = "t", P = S;
16972
+ for (Me >= 0 && P < N.length && (N[P].v = q.substr(0, Me + 1) + N[P].v), Me = q.indexOf(".") + 1, S = X; S < N.length; ++S)
16973
+ if (!(N[S] == null || "n?(".indexOf(N[S].t) === -1 && S !== X)) {
16974
+ for (de = N[S].v.indexOf(".") > -1 && S === X ? N[S].v.indexOf(".") + 1 : 0, ye = N[S].v.substr(0, de); de < N[S].v.length; ++de)
16975
+ Me < q.length && (ye += q.charAt(Me++));
16976
+ N[S].v = ye, N[S].t = "t", P = S;
16977
16977
  }
16978
16978
  }
16979
16979
  }
16980
16980
  for (S = 0; S < N.length; ++S)
16981
- N[S] != null && "n?".indexOf(N[S].t) > -1 && (D = F > 1 && $ < 0 && S > 0 && N[S - 1].v === "-" ? -$ : $, N[S].v = V(N[S].t, N[S].v, D), N[S].t = "t");
16982
- var z = "";
16983
- for (S = 0; S !== N.length; ++S) N[S] != null && (z += N[S].v);
16984
- return z;
16981
+ N[S] != null && "n?".indexOf(N[S].t) > -1 && (D = F > 1 && $ < 0 && S > 0 && N[S - 1].v === "-" ? -$ : $, N[S].v = W(N[S].t, N[S].v, D), N[S].t = "t");
16982
+ var U = "";
16983
+ for (S = 0; S !== N.length; ++S) N[S] != null && (U += N[S].v);
16984
+ return U;
16985
16985
  }
16986
16986
  t._eval = oe;
16987
- var be = /\[[=<>]/, fe = /\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;
16988
- function X(M, $) {
16987
+ var ge = /\[[=<>]/, ue = /\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;
16988
+ function K(M, $) {
16989
16989
  if ($ == null) return !1;
16990
16990
  var A = parseFloat($[2]);
16991
16991
  switch ($[1]) {
@@ -17010,8 +17010,8 @@ const _c = function(t) {
17010
17010
  }
17011
17011
  return !1;
17012
17012
  }
17013
- function K(M, $) {
17014
- var A = Q(M), F = A.length, N = A[F - 1].indexOf("@");
17013
+ function J(M, $) {
17014
+ var A = j(M), F = A.length, N = A[F - 1].indexOf("@");
17015
17015
  if (F < 4 && N > -1 && --F, A.length > 4)
17016
17016
  throw new Error("cannot find right format for |" + A.join("|") + "|");
17017
17017
  if (parseFloat($).toString() == "NaN")
@@ -17030,13 +17030,13 @@ const _c = function(t) {
17030
17030
  var G = $ > 0 ? A[0] : $ < 0 ? A[1] : A[2];
17031
17031
  if (A[0].indexOf("[") === -1 && A[1].indexOf("[") === -1)
17032
17032
  return [F, G];
17033
- if (A[0].match(be) != null || A[1].match(be) != null) {
17034
- var S = A[0].match(fe), H = A[1].match(fe);
17035
- return X($, S) ? [F, A[0]] : X($, H) ? [F, A[1]] : [F, A[S != null && H != null ? 2 : 1]];
17033
+ if (A[0].match(ge) != null || A[1].match(ge) != null) {
17034
+ var S = A[0].match(ue), H = A[1].match(ue);
17035
+ return K($, S) ? [F, A[0]] : K($, H) ? [F, A[1]] : [F, A[S != null && H != null ? 2 : 1]];
17036
17036
  }
17037
17037
  return [F, G];
17038
17038
  }
17039
- function W(M) {
17039
+ function V(M) {
17040
17040
  if (typeof M != "number" || !Number.isFinite(M) || !Number.isInteger(M) || M < 0) return null;
17041
17041
  const $ = 1e5, A = 4102444800, F = $ * 1e3, N = A * 1e3;
17042
17042
  return M >= $ && M <= A ? "seconds" : M >= F && M <= N ? "milliseconds" : null;
@@ -17053,7 +17053,7 @@ const _c = function(t) {
17053
17053
  break;
17054
17054
  }
17055
17055
  if (typeof $ == "number" && re && re(F)) {
17056
- var N = W($);
17056
+ var N = V($);
17057
17057
  N === "seconds" ? $ = new Date($ * 1e3) : N === "milliseconds" && ($ = new Date($));
17058
17058
  }
17059
17059
  var G = /^(w|W)((0?)|(0\.0+))$/;
@@ -17135,16 +17135,16 @@ const _c = function(t) {
17135
17135
  S != "" && ($ = Ft($).format(S));
17136
17136
  return H ? "-" + $ : $;
17137
17137
  }
17138
- if (f(F, 0)) return U($, A);
17138
+ if (f(F, 0)) return z($, A);
17139
17139
  $ instanceof Date && ($ = I($, A.date1904));
17140
- var Se = K(F, $);
17141
- if (f(Se[1])) return U($, A);
17140
+ var Se = J(F, $);
17141
+ if (f(Se[1])) return z($, A);
17142
17142
  if ($ === !0) $ = "TRUE";
17143
17143
  else if ($ === !1) $ = "FALSE";
17144
17144
  else if ($ === "" || $ == null) return "";
17145
17145
  return oe(Se[1], $, A, Se[0]);
17146
17146
  }
17147
- function ye(M, $) {
17147
+ function be(M, $) {
17148
17148
  if (typeof $ != "number") {
17149
17149
  $ = +$ || -1;
17150
17150
  for (var A = 0; A < 392; ++A) {
@@ -17161,11 +17161,11 @@ const _c = function(t) {
17161
17161
  }
17162
17162
  return g[$] = M, $;
17163
17163
  }
17164
- t.load = ye, t._table = g, t.get_table = function() {
17164
+ t.load = be, t._table = g, t.get_table = function() {
17165
17165
  return g;
17166
17166
  }, t.load_table = function($) {
17167
17167
  for (var A = 0; A != 392; ++A)
17168
- $[A] !== void 0 && ye($[A], A);
17168
+ $[A] !== void 0 && be($[A], A);
17169
17169
  }, t.init_table = p, t.format = ce;
17170
17170
  };
17171
17171
  _c(Rt);
@@ -17821,11 +17821,11 @@ class iu {
17821
17821
  const g = f === -1 || m === -1, y = d === -1 || p === -1;
17822
17822
  if (g && (f = 0, m = (u == null ? void 0 : u.length) ?? 0), y && (d = 0, p = (u == null ? void 0 : u[0].length) ?? 0), g && y) throw Error(Hn);
17823
17823
  if (t.activeDepCollection) {
17824
- const C = typeof i == "object" ? i.row : null, I = typeof i == "object" ? i.column : null, k = C != null && I != null && C >= f && C <= m && I >= d && I <= p, O = m - f + 1, U = p - d + 1;
17825
- if (O * U <= 1e4)
17824
+ const C = typeof i == "object" ? i.row : null, I = typeof i == "object" ? i.column : null, k = C != null && I != null && C >= f && C <= m && I >= d && I <= p, O = m - f + 1, z = p - d + 1;
17825
+ if (O * z <= 1e4)
17826
17826
  for (let se = f; se <= m; se += 1)
17827
- for (let V = d; V <= p; V += 1)
17828
- a(r(s, se, V));
17827
+ for (let W = d; W <= p; W += 1)
17828
+ a(r(s, se, W));
17829
17829
  else
17830
17830
  t.activeDepCollection.hasWideRangeDep = !0, k && a(r(s, C, I));
17831
17831
  }
@@ -18316,9 +18316,9 @@ function Tn(e, t, r, a, n, o, i, l) {
18316
18316
  if (k === u) continue;
18317
18317
  const O = au(k);
18318
18318
  if (!O) continue;
18319
- const U = (I = e == null ? void 0 : e.formulaCache.execFunctionGlobalData) == null ? void 0 : I[`${O.r}_${O.c}_${O.sheetId}`];
18320
- if (h.isNil(U)) continue;
18321
- if (((U == null ? void 0 : U.v) ?? (U == null ? void 0 : U.m)) === yt) {
18319
+ const z = (I = e == null ? void 0 : e.formulaCache.execFunctionGlobalData) == null ? void 0 : I[`${O.r}_${O.c}_${O.sheetId}`];
18320
+ if (h.isNil(z)) continue;
18321
+ if (((z == null ? void 0 : z.v) ?? (z == null ? void 0 : z.m)) === yt) {
18322
18322
  d.error = yt, d.result = yt;
18323
18323
  break;
18324
18324
  }
@@ -18606,25 +18606,25 @@ function Xn(e, t, r, a, n, o, i = !1) {
18606
18606
  g[k] = 1;
18607
18607
  }
18608
18608
  const b = {}, w = (C, I, k, O) => {
18609
- for (let U = 0; U < C.length; U += 1) {
18610
- const Z = C[U], J = `r${Z.row[0]}${Z.row[1]}c${Z.column[0]}${Z.column[1]}id${Z.sheetId}`;
18611
- if (J in b)
18612
- b[J].forEach((V) => {
18613
- O(V.key, V.r, V.c, V.sheetId);
18609
+ for (let z = 0; z < C.length; z += 1) {
18610
+ const Y = C[z], Q = `r${Y.row[0]}${Y.row[1]}c${Y.column[0]}${Y.column[1]}id${Y.sheetId}`;
18611
+ if (Q in b)
18612
+ b[Q].forEach((W) => {
18613
+ O(W.key, W.r, W.c, W.sheetId);
18614
18614
  });
18615
18615
  else {
18616
18616
  const se = [];
18617
- for (let V = Z.row[0]; V <= Z.row[1]; V += 1)
18618
- for (let Q = Z.column[0]; Q <= Z.column[1]; Q += 1) {
18619
- const B = `r${V}c${Q}i${Z.sheetId}`;
18620
- O(B, V, Q, Z.sheetId), (I && B in I || k && B in k) && se.push({
18617
+ for (let W = Y.row[0]; W <= Y.row[1]; W += 1)
18618
+ for (let j = Y.column[0]; j <= Y.column[1]; j += 1) {
18619
+ const B = `r${W}c${j}i${Y.sheetId}`;
18620
+ O(B, W, j, Y.sheetId), (I && B in I || k && B in k) && se.push({
18621
18621
  key: B,
18622
- r: V,
18623
- c: Q,
18624
- sheetId: Z.sheetId
18622
+ r: W,
18623
+ c: j,
18624
+ sheetId: Y.sheetId
18625
18625
  });
18626
18626
  }
18627
- (I || k) && (b[J] = se);
18627
+ (I || k) && (b[Q] = se);
18628
18628
  }
18629
18629
  }
18630
18630
  };
@@ -18637,8 +18637,8 @@ function Xn(e, t, r, a, n, o, i = !1) {
18637
18637
  );
18638
18638
  if (h.isNil(O))
18639
18639
  continue;
18640
- const U = O.toUpperCase(), Z = U.indexOf("INDIRECT(") > -1 || U.indexOf("OFFSET(") > -1 || U.indexOf("INDEX(") > -1, J = [];
18641
- if (Z)
18640
+ const z = O.toUpperCase(), Y = z.indexOf("INDIRECT(") > -1 || z.indexOf("OFFSET(") > -1 || z.indexOf("INDEX(") > -1, Q = [];
18641
+ if (Y)
18642
18642
  Dn(
18643
18643
  e,
18644
18644
  O,
@@ -18646,37 +18646,37 @@ function Xn(e, t, r, a, n, o, i = !1) {
18646
18646
  null,
18647
18647
  I.id,
18648
18648
  null,
18649
- (V) => {
18650
- const Q = xn(e, h.trim(V), I.id);
18651
- h.isNil(Q) || J.push(Q);
18649
+ (W) => {
18650
+ const j = xn(e, h.trim(W), I.id);
18651
+ h.isNil(j) || Q.push(j);
18652
18652
  }
18653
18653
  );
18654
18654
  else if (!(O.substring(0, 2) === '="' && O.substring(O.length - 1, 1) === '"')) {
18655
- let V = 0, Q = -1, B = -1;
18656
- const re = [], oe = [], be = O.length;
18657
- for (let fe = 0; fe < be; fe += 1) {
18658
- const X = O.charAt(fe);
18659
- X === "'" && B === -1 && (Q === -1 ? (V !== fe && re.push(
18660
- ...O.substring(V, fe).split(/==|!=|<>|<=|>=|[,()=+-/*%&^><]/)
18661
- ), Q = fe, V = fe) : fe < be - 1 && O.charAt(fe + 1) === "'" ? fe += 1 : (V = fe + 1, re.push(O.substring(Q, V)), oe.push(re.length - 1), Q = -1)), X === '"' && Q === -1 && (B === -1 ? (V !== fe && re.push(
18662
- ...O.substring(V, fe).split(/==|!=|<>|<=|>=|[,()=+-/*%&^><]/)
18663
- ), B = fe, V = fe) : fe < be - 1 && O.charAt(fe + 1) === '"' ? fe += 1 : (V = fe + 1, re.push(O.substring(B, V)), B = -1));
18655
+ let W = 0, j = -1, B = -1;
18656
+ const re = [], oe = [], ge = O.length;
18657
+ for (let ue = 0; ue < ge; ue += 1) {
18658
+ const K = O.charAt(ue);
18659
+ K === "'" && B === -1 && (j === -1 ? (W !== ue && re.push(
18660
+ ...O.substring(W, ue).split(/==|!=|<>|<=|>=|[,()=+-/*%&^><]/)
18661
+ ), j = ue, W = ue) : ue < ge - 1 && O.charAt(ue + 1) === "'" ? ue += 1 : (W = ue + 1, re.push(O.substring(j, W)), oe.push(re.length - 1), j = -1)), K === '"' && j === -1 && (B === -1 ? (W !== ue && re.push(
18662
+ ...O.substring(W, ue).split(/==|!=|<>|<=|>=|[,()=+-/*%&^><]/)
18663
+ ), B = ue, W = ue) : ue < ge - 1 && O.charAt(ue + 1) === '"' ? ue += 1 : (W = ue + 1, re.push(O.substring(B, W)), B = -1));
18664
18664
  }
18665
- V !== be && re.push(
18666
- ...O.substring(V, be).split(/==|!=|<>|<=|>=|[,()=+-/*%&^><]/)
18665
+ W !== ge && re.push(
18666
+ ...O.substring(W, ge).split(/==|!=|<>|<=|>=|[,()=+-/*%&^><]/)
18667
18667
  );
18668
- for (let fe = oe.length - 1; fe >= 0; fe -= 1)
18669
- oe[fe] !== re.length - 1 && (re[oe[fe]] += re[oe[fe] + 1], re.splice(oe[fe] + 1, 1));
18670
- for (let fe = 0; fe < re.length; fe += 1) {
18671
- const X = re[fe];
18672
- if (X.length <= 1 || X.substring(0, 1) === '"' && X.substring(X.length - 1, 1) === '"' || !_t(X))
18668
+ for (let ue = oe.length - 1; ue >= 0; ue -= 1)
18669
+ oe[ue] !== re.length - 1 && (re[oe[ue]] += re[oe[ue] + 1], re.splice(oe[ue] + 1, 1));
18670
+ for (let ue = 0; ue < re.length; ue += 1) {
18671
+ const K = re[ue];
18672
+ if (K.length <= 1 || K.substring(0, 1) === '"' && K.substring(K.length - 1, 1) === '"' || !_t(K))
18673
18673
  continue;
18674
- const K = xn(e, h.trim(X), I.id);
18675
- h.isNil(K) || J.push(K);
18674
+ const J = xn(e, h.trim(K), I.id);
18675
+ h.isNil(J) || Q.push(J);
18676
18676
  }
18677
18677
  }
18678
18678
  const se = {
18679
- formulaArray: J,
18679
+ formulaArray: Q,
18680
18680
  calc_funcStr: O,
18681
18681
  key: k,
18682
18682
  r: I.r,
@@ -19748,10 +19748,10 @@ function Ia(e, t, r, a) {
19748
19748
  const _ = Cl(s), E = _.length > 0 ? Math.max(..._) + 1 : Qt, C = `<span class="fortune-formula-functionrange-cell" rangeindex="${E}" dir="auto" style="color:${Ea[E]};">${f}</span>`, I = Tl(C);
19749
19749
  let k = e.formulaCache.rangeSetValueTo;
19750
19750
  if (k && !k.parentNode && (Ar(e), k = e.formulaCache.rangeSetValueTo), k && k.parentNode) {
19751
- const U = (b = document.getElementsByClassName(
19751
+ const z = (b = document.getElementsByClassName(
19752
19752
  "luckysheet-formula-text-lpar"
19753
19753
  )) == null ? void 0 : b[0];
19754
- (w = U == null ? void 0 : U.parentElement) != null && w.classList.contains(
19754
+ (w = z == null ? void 0 : z.parentElement) != null && w.classList.contains(
19755
19755
  "luckysheet-formula-text-color"
19756
19756
  ) ? (T = (v = document.getElementsByClassName("luckysheet-formula-text-lpar")) == null ? void 0 : v[0].parentNode) == null || T.appendChild(I) : k.parentNode.insertBefore(I, k.nextSibling);
19757
19757
  } else
@@ -20432,9 +20432,9 @@ function Gd(e, t, r, a, n, o, i) {
20432
20432
  if (_.length === 1) {
20433
20433
  const C = _[0].row[0], I = _[0].row[1], k = _[0].column[0], O = _[0].column[1];
20434
20434
  if (C === I && k === O) {
20435
- const U = Ie(e);
20436
- if (!U) return;
20437
- v = Ke(C, k, U), c.push({
20435
+ const z = Ie(e);
20436
+ if (!z) return;
20437
+ v = Ke(C, k, z), c.push({
20438
20438
  row: _[0].row,
20439
20439
  column: _[0].column
20440
20440
  }), s.push(v);
@@ -20457,9 +20457,9 @@ function Gd(e, t, r, a, n, o, i) {
20457
20457
  if (E.length === 1) {
20458
20458
  const C = E[0].row[0], I = E[0].row[1], k = E[0].column[0], O = E[0].column[1];
20459
20459
  if (C === I && k === O) {
20460
- const U = Ie(e);
20461
- if (!U) return;
20462
- T = Ke(C, k, U), c.push({
20460
+ const z = Ie(e);
20461
+ if (!z) return;
20462
+ T = Ke(C, k, z), c.push({
20463
20463
  row: E[0].row,
20464
20464
  column: E[0].column
20465
20465
  });
@@ -20986,10 +20986,10 @@ function Zu(e, t, r) {
20986
20986
  for (let C = w; C <= v; C += 1)
20987
20987
  for (let I = T; I <= _; I += 1) {
20988
20988
  let k = E;
20989
- const O = C - w, U = I - T;
20990
- O > 0 && (k = `=${hn(e, k, "down", O)}`), U > 0 && (k = `=${hn(e, k, "right", U)}`);
20991
- let J = Tn(e, k, C, I)[1];
20992
- typeof J != "boolean" && (J = !!Number(J)), J && (`${C}_${I}` in a || (a[`${C}_${I}`] = {
20989
+ const O = C - w, z = I - T;
20990
+ O > 0 && (k = `=${hn(e, k, "down", O)}`), z > 0 && (k = `=${hn(e, k, "right", z)}`);
20991
+ let Q = Tn(e, k, C, I)[1];
20992
+ typeof Q != "boolean" && (Q = !!Number(Q)), Q && (`${C}_${I}` in a || (a[`${C}_${I}`] = {
20993
20993
  textColor: f,
20994
20994
  cellColor: m,
20995
20995
  bold: d,
@@ -21982,7 +21982,7 @@ function Ke(e, t, r, a) {
21982
21982
  return o === void 0 && (o = null), o;
21983
21983
  }
21984
21984
  function bn(e, t, r, a, n) {
21985
- var d, p, g, y, b, w, v, T, _, E, C, I, k, O, U, Z, J, se, V, Q, B, re, oe, be, fe;
21985
+ var d, p, g, y, b, w, v, T, _, E, C, I, k, O, z, Y, Q, se, W, j, B, re, oe, ge, ue;
21986
21986
  if (e.allowEdit === !1 || e.isFlvReadOnly || (h.isNil(a) && (a = Ie(e)), !a)) return;
21987
21987
  let o = a[t][r];
21988
21988
  const i = !!o && !(Je(o.v) && Je(o.m) && Je(o.f));
@@ -21993,8 +21993,8 @@ function bn(e, t, r, a, n) {
21993
21993
  l && typeof l == "string" && l.includes(",") && (s = l.includes(","));
21994
21994
  const u = h.isPlainObject(o) ? o : null, f = u != null && (((p = u.ct) == null ? void 0 : p.fa) === "@" || u.qp === 1);
21995
21995
  if (typeof l == "string" && !f && /^[+-]?\d+\.\d+$/.test(l)) {
21996
- const X = l.replace(/(\.\d*?[1-9])0+$/, "$1").replace(/\.0+$/, "");
21997
- X !== l && (l = X);
21996
+ const K = l.replace(/(\.\d*?[1-9])0+$/, "$1").replace(/\.0+$/, "");
21997
+ K !== l && (l = K);
21998
21998
  }
21999
21999
  if (Je(l)) {
22000
22000
  h.isPlainObject(o) ? (delete o.m, delete o.v) : o = null, a[t][r] = o;
@@ -22002,12 +22002,12 @@ function bn(e, t, r, a, n) {
22002
22002
  }
22003
22003
  if ((Je(o) || (h.isString(o) || h.isNumber(o)) && o === n) && (o = {}), !o) return;
22004
22004
  if (!h.isNil(o.f) && typeof l == "string" && Xe(l) && !la(l)) {
22005
- const X = l.trim();
22005
+ const K = l.trim();
22006
22006
  if (!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(
22007
- X
22007
+ K
22008
22008
  )) {
22009
- const K = Number(X);
22010
- Number.isFinite(K) && (l = K);
22009
+ const J = Number(K);
22010
+ Number.isFinite(J) && (l = J);
22011
22011
  }
22012
22012
  }
22013
22013
  const m = l.toString();
@@ -22024,62 +22024,62 @@ function bn(e, t, r, a, n) {
22024
22024
  else if (la(l))
22025
22025
  o.m = m, h.isNil(o.ct) ? o.ct = { fa: "General", t: "e" } : o.ct.t = "e", o.v = l;
22026
22026
  else if (gl(m) && h.isNil(o.f)) {
22027
- const X = m.trim().replace(/,/g, "");
22028
- o.m = X, o.v = X, ((_ = o.ct) == null ? void 0 : _.fa) === "@" ? o.ct = { fa: "@", t: "s" } : o.ct = { fa: "General", t: "g" };
22027
+ const K = m.trim().replace(/,/g, "");
22028
+ o.m = K, o.v = K, ((_ = o.ct) == null ? void 0 : _.fa) === "@" ? o.ct = { fa: "@", t: "s" } : o.ct = { fa: "General", t: "g" };
22029
22029
  } else if (!h.isNil(o.f) && Array.isArray(l))
22030
22030
  o.v = l, h.isNil(o.ct) ? o.ct = { fa: "General", t: "g" } : (o.ct = { ...o.ct, fa: "General", t: "g" }, delete o.ct.dp), o.m = hf(l);
22031
22031
  else if (!h.isNil(o.f) && typeof l == "number" && Number.isFinite(l) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(
22032
22032
  m
22033
22033
  )) {
22034
22034
  if (o.v = l, h.isNil(o.ct) ? o.ct = { fa: "General", t: "g" } : ((o.ct.fa == null || o.ct.fa === "") && (o.ct = { ...o.ct, fa: "General" }), (o.ct.t == null || o.ct.t === "") && (o.ct = { ...o.ct, t: "g" })), Xe(l) && /^[\d.,]+$/.test(m.replace(/\s/g, "")) && h.isNil(o.qp) && ((E = o.ct) == null ? void 0 : E.fa) !== "@") {
22035
- const K = Ie(e), W = (C = Gl(o == null ? void 0 : o.f)) == null ? void 0 : C.split(","), ce = W == null ? void 0 : W.map((M) => M.trim().toUpperCase()), ye = Yl(ce, a, K);
22036
- ye && (o.ct.fa = ye, Sa(ye) ? o.ct.t = "d" : o.ct.t = "n");
22035
+ const J = Ie(e), V = (C = Gl(o == null ? void 0 : o.f)) == null ? void 0 : C.split(","), ce = V == null ? void 0 : V.map((M) => M.trim().toUpperCase()), be = Yl(ce, a, J);
22036
+ be && (o.ct.fa = be, Sa(be) ? o.ct.t = "d" : o.ct.t = "n");
22037
22037
  }
22038
22038
  if (o.v === 1 / 0 || o.v === -1 / 0)
22039
22039
  o.m = o.v.toString();
22040
22040
  else {
22041
- const K = Math.round(o.v * 1e9) / 1e9;
22042
- if (Ac(K))
22043
- o.m = xc(K);
22041
+ const J = Math.round(o.v * 1e9) / 1e9;
22042
+ if (Ac(J))
22043
+ o.m = xc(J);
22044
22044
  else if (o.v.toString().toLowerCase().indexOf("e") > -1)
22045
22045
  o.m = Cc(o.v);
22046
22046
  else if (h.isNil(o.ct)) {
22047
- const W = It(K);
22048
- W != null && (o.m = W[0].toString());
22047
+ const V = It(J);
22048
+ V != null && (o.m = V[0].toString());
22049
22049
  } else {
22050
- const W = kt(o.ct.fa, K);
22051
- o.m = W.toString();
22050
+ const V = kt(o.ct.fa, J);
22051
+ o.m = V.toString();
22052
22052
  }
22053
22053
  }
22054
- if (nu(o.f, o.v) && (((I = o.ct) == null ? void 0 : I.fa) === "General" || ((k = o.ct) == null ? void 0 : k.t) === "g" || ((O = o.ct) == null ? void 0 : O.t) === "n" && (!((U = o.ct) != null && U.fa) || ((Z = o.ct) == null ? void 0 : Z.fa) === "General"))) {
22055
- const K = /\bNOW\s*\(/i.test(o.f), W = fl(K);
22056
- o.ct = { fa: W, t: "d" };
22054
+ if (nu(o.f, o.v) && (((I = o.ct) == null ? void 0 : I.fa) === "General" || ((k = o.ct) == null ? void 0 : k.t) === "g" || ((O = o.ct) == null ? void 0 : O.t) === "n" && (!((z = o.ct) != null && z.fa) || ((Y = o.ct) == null ? void 0 : Y.fa) === "General"))) {
22055
+ const J = /\bNOW\s*\(/i.test(o.f), V = fl(J);
22056
+ o.ct = { fa: V, t: "d" };
22057
22057
  const ce = Math.round(o.v * 1e9) / 1e9;
22058
- o.m = String(kt(W, ce));
22058
+ o.m = String(kt(V, ce));
22059
22059
  }
22060
22060
  } else if (!h.isNil(o.ct) && o.ct.fa === "@")
22061
22061
  o.m = m, o.v = l;
22062
22062
  else if (o.ct != null && o.ct.t === "d" && h.isString(l)) {
22063
- const X = It(l);
22064
- if (((J = X == null ? void 0 : X[1]) == null ? void 0 : J.t) === "d")
22065
- X[1].fa === o.ct.fa ? [o.m, o.ct, o.v] = X : ([, , o.v] = X, o.m = kt(o.ct.fa, o.v));
22063
+ const K = It(l);
22064
+ if (((Q = K == null ? void 0 : K[1]) == null ? void 0 : Q.t) === "d")
22065
+ K[1].fa === o.ct.fa ? [o.m, o.ct, o.v] = K : ([, , o.v] = K, o.m = kt(o.ct.fa, o.v));
22066
22066
  else {
22067
- const K = $a(l);
22068
- if (K) {
22069
- const W = new Date(
22070
- K.year,
22071
- K.month - 1,
22072
- K.day,
22073
- K.hours,
22074
- K.minutes,
22075
- K.seconds
22067
+ const J = $a(l);
22068
+ if (J) {
22069
+ const V = new Date(
22070
+ J.year,
22071
+ J.month - 1,
22072
+ J.day,
22073
+ J.hours,
22074
+ J.minutes,
22075
+ J.seconds
22076
22076
  );
22077
- o.v = $r(W), o.m = kt(o.ct.fa, o.v);
22078
- } else X && ([o.m, o.ct, o.v] = X);
22077
+ o.v = $r(V), o.m = kt(o.ct.fa, o.v);
22078
+ } else K && ([o.m, o.ct, o.v] = K);
22079
22079
  }
22080
22080
  } else if (!h.isNil(o.ct) && !h.isNil(o.ct.fa) && o.ct.fa !== "General") {
22081
- let { fa: X } = o.ct;
22082
- const K = ((Q = (V = (se = e.getRefs) == null ? void 0 : se.call(e)) == null ? void 0 : V.globalCache) == null ? void 0 : Q.enteredEditByTyping) === !0, W = e.luckysheetCellUpdate.length > 0 && !K, ce = K && X.includes("%") && !m.includes("%") && !Xe(l), ye = W && X.includes("%") && !m.includes("%");
22081
+ let { fa: K } = o.ct;
22082
+ const J = ((j = (W = (se = e.getRefs) == null ? void 0 : se.call(e)) == null ? void 0 : W.globalCache) == null ? void 0 : j.enteredEditByTyping) === !0, V = e.luckysheetCellUpdate.length > 0 && !J, ce = J && K.includes("%") && !m.includes("%") && !Xe(l), be = V && K.includes("%") && !m.includes("%");
22083
22083
  if (ce) {
22084
22084
  const M = It(l);
22085
22085
  if (M) {
@@ -22087,7 +22087,7 @@ function bn(e, t, r, a, n) {
22087
22087
  o.m = $ == null ? "" : String($), o.ct = A, o.v = F, delete o.ht;
22088
22088
  } else
22089
22089
  o.m = m, o.v = l, o.ct = { fa: "General", t: "s" }, delete o.ht;
22090
- } else if (ye)
22090
+ } else if (be)
22091
22091
  if (Xe(l) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(
22092
22092
  m
22093
22093
  )) {
@@ -22103,8 +22103,8 @@ function bn(e, t, r, a, n) {
22103
22103
  M && (o.m = M[0].toString(), [, o.ct, o.v] = M);
22104
22104
  }
22105
22105
  else if (Xe(l)) {
22106
- s && !X.includes(",") && (X = Hf(String(l), s)), l = parseFloat(l), X.includes("%") && !m.includes("%") && (!i || K) && (l /= 100), o != null && o.ct && (o.ct = { ...o.ct, fa: X, t: "n" });
22107
- const M = kt(X, l);
22106
+ s && !K.includes(",") && (K = Hf(String(l), s)), l = parseFloat(l), K.includes("%") && !m.includes("%") && (!i || J) && (l /= 100), o != null && o.ct && (o.ct = { ...o.ct, fa: K, t: "n" });
22107
+ const M = kt(K, l);
22108
22108
  if (M === l) {
22109
22109
  const $ = lr(
22110
22110
  m,
@@ -22117,10 +22117,10 @@ function bn(e, t, r, a, n) {
22117
22117
  }
22118
22118
  } else
22119
22119
  n.m ? o.m = n.m : o.m = M.toString(), o.v = l;
22120
- } else if (kc(X, qt(e).currencyDetail) && typeof l == "string" && !m.startsWith("=") && !Xe(l))
22121
- o.v = m, o.m = m, o.ct = { fa: X, t: "s" };
22120
+ } else if (kc(K, qt(e).currencyDetail) && typeof l == "string" && !m.startsWith("=") && !Xe(l))
22121
+ o.v = m, o.m = m, o.ct = { fa: K, t: "s" };
22122
22122
  else {
22123
- const M = kt(X, l);
22123
+ const M = kt(K, l);
22124
22124
  if (M === l) {
22125
22125
  const $ = lr(
22126
22126
  m,
@@ -22137,29 +22137,29 @@ function bn(e, t, r, a, n) {
22137
22137
  } else if (Xe(l) && !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[12])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(
22138
22138
  l
22139
22139
  )) {
22140
- typeof l == "string" && (l.split("").every((W) => W === "0" || W === ".") || /^0+\d/.test(l)) && (l = parseFloat(l)), o.v = l;
22141
- const X = (re = o.ct) == null ? void 0 : re.dp;
22142
- o.ct = { fa: "General", t: "g" }, X != null && typeof X == "number" && (o.ct.dp = X), n.m ? o.m = n.m : Fr(o);
22140
+ typeof l == "string" && (l.split("").every((V) => V === "0" || V === ".") || /^0+\d/.test(l)) && (l = parseFloat(l)), o.v = l;
22141
+ const K = (re = o.ct) == null ? void 0 : re.dp;
22142
+ o.ct = { fa: "General", t: "g" }, K != null && typeof K == "number" && (o.ct.dp = K), n.m ? o.m = n.m : Fr(o);
22143
22143
  } else {
22144
- const X = lr(
22144
+ const K = lr(
22145
22145
  m,
22146
22146
  l,
22147
22147
  qt(e).currencyDetail
22148
22148
  );
22149
- X && (o.m = X[0].toString(), [, o.ct, o.v] = X);
22149
+ K && (o.m = K[0].toString(), [, o.ct, o.v] = K);
22150
22150
  }
22151
22151
  if (!h.isNil(o.f) && Je(o.m)) {
22152
- const X = o.v;
22153
- if (((oe = o == null ? void 0 : o.ct) == null ? void 0 : oe.t) === "d" && ((be = o == null ? void 0 : o.ct) != null && be.fa) && !Je(X))
22154
- o.m = kt(o.ct.fa, X);
22155
- else if (typeof X == "number") {
22156
- const K = (fe = o == null ? void 0 : o.ct) == null ? void 0 : fe.fa;
22157
- if (K && K !== "General" && Number.isFinite(X)) {
22158
- const W = Math.round(X * 1e9) / 1e9;
22159
- o.m = String(kt(K, W));
22152
+ const K = o.v;
22153
+ if (((oe = o == null ? void 0 : o.ct) == null ? void 0 : oe.t) === "d" && ((ge = o == null ? void 0 : o.ct) != null && ge.fa) && !Je(K))
22154
+ o.m = kt(o.ct.fa, K);
22155
+ else if (typeof K == "number") {
22156
+ const J = (ue = o == null ? void 0 : o.ct) == null ? void 0 : ue.fa;
22157
+ if (J && J !== "General" && Number.isFinite(K)) {
22158
+ const V = Math.round(K * 1e9) / 1e9;
22159
+ o.m = String(kt(J, V));
22160
22160
  } else
22161
22161
  Fr(o);
22162
- } else typeof X == "boolean" ? o.m = X ? "TRUE" : "FALSE" : Je(X) ? o.m = "" : o.m = String(X);
22162
+ } else typeof K == "boolean" ? o.m = K ? "TRUE" : "FALSE" : Je(K) ? o.m = "" : o.m = String(K);
22163
22163
  }
22164
22164
  h.isNil(o.f) || (c ? (o.ct || (o.ct = { fa: "General", t: "g" }), o.ct.s = c) : o != null && o.ct && h.isPlainObject(n) && Object.prototype.hasOwnProperty.call(n, "ct") && delete o.ct.s), a[t][r] = o, e.luckysheet_selection_range && (e.luckysheet_selection_range = []);
22165
22165
  }
@@ -22262,77 +22262,77 @@ function hf(e) {
22262
22262
  return Array.isArray(t) && e.every((r) => Array.isArray(r)) ? e.map((r) => r.map((a) => String(a ?? "")).join(", ")).join("; ") : e.map((r) => String(r ?? "")).join(", ");
22263
22263
  }
22264
22264
  function pf(e, t, r, a, n, o) {
22265
- var i, l, c, s, u, f, m, d, p, g, y, b, w, v, T, _, E, C, I, k, O, U, Z, J, se, V, Q, B, re;
22265
+ var i, l, c, s, u, f, m, d, p, g, y, b, w, v, T, _, E, C, I, k, O, z, Y, Q, se, W, j, B, re;
22266
22266
  try {
22267
22267
  if (e.allowEdit === !1 || e.isFlvReadOnly) return;
22268
- const oe = a == null ? void 0 : a.innerText, be = (oe || "").replace(/\u00a0/g, " ").replace(/\u200b/g, "").trimStart(), fe = (j) => j.replace(/\u00a0/g, " ").replace(/\u200b/g, ""), X = (j) => j.replace(/\r\n/g, `
22268
+ const oe = a == null ? void 0 : a.innerText, ge = (oe || "").replace(/\u00a0/g, " ").replace(/\u200b/g, "").trimStart(), ue = (Z) => Z.replace(/\u00a0/g, " ").replace(/\u200b/g, ""), K = (Z) => Z.replace(/\r\n/g, `
22269
22269
  `).replace(/\r/g, `
22270
22270
  `).replace(/\n/g, `\r
22271
- `), K = (j) => {
22272
- j.ct || (j.ct = {}), j.f && Array.isArray(j.ct.s) && j.ct.s.length > 0 && ((j.ct.fa == null || j.ct.fa === "") && (j.ct.fa = "General"), (j.ct.t == null || j.ct.t === "") && (j.ct.t = "g"));
22271
+ `), J = (Z) => {
22272
+ Z.ct || (Z.ct = {}), Z.f && Array.isArray(Z.ct.s) && Z.ct.s.length > 0 && ((Z.ct.fa == null || Z.ct.fa === "") && (Z.ct.fa = "General"), (Z.ct.t == null || Z.ct.t === "") && (Z.ct.t = "g"));
22273
22273
  };
22274
- let W = "";
22275
- const ce = (j, le = W) => {
22274
+ let V = "";
22275
+ const ce = (Z, le = V) => {
22276
22276
  const qe = oe ?? "";
22277
- return qe.length > 0 ? X(
22278
- fe(qe) + le
22279
- ) : X(
22280
- fe(j ?? "")
22277
+ return qe.length > 0 ? K(
22278
+ ue(qe) + le
22279
+ ) : K(
22280
+ ue(Z ?? "")
22281
22281
  );
22282
22282
  };
22283
- let ye = oe;
22284
- ye != null && ye.startsWith("=") && (ye = fe(ye).replace(/[\r\n]/g, ""));
22285
- const M = a == null ? void 0 : a.innerHTML, $ = !!M && (/<br\s*\/?>/i.test(M) || /[\r\n]/.test(M)), A = !!oe && /[\r\n]/.test(oe), F = !!M && !!oe && be.startsWith("=") && ($ || A), N = Ie(e);
22283
+ let be = oe;
22284
+ be != null && be.startsWith("=") && (be = ue(be).replace(/[\r\n]/g, ""));
22285
+ const M = a == null ? void 0 : a.innerHTML, $ = !!M && (/<br\s*\/?>/i.test(M) || /[\r\n]/.test(M)), A = !!oe && /[\r\n]/.test(oe), F = !!M && !!oe && ge.startsWith("=") && ($ || A), N = Ie(e);
22286
22286
  if (!N) return;
22287
22287
  const G = Fe(e, e.currentSheetId), { dataVerification: S } = e.luckysheetfile[G], H = e.luckysheetfile[G];
22288
22288
  if (!h.isNil(S)) {
22289
- const j = S[`${t}_${r}`];
22290
- if (!h.isNil(j) && j.prohibitInput && !Ml(e, j, ye)) {
22291
- const le = ql(e, j);
22289
+ const Z = S[`${t}_${r}`];
22290
+ if (!h.isNil(Z) && Z.prohibitInput && !Ml(e, Z, be)) {
22291
+ const le = ql(e, Z);
22292
22292
  jt(e), e.warnDialog = le;
22293
22293
  return;
22294
22294
  }
22295
22295
  }
22296
22296
  let L = N[t][r];
22297
- ((c = (l = (i = e.getRefs) == null ? void 0 : i.call(e)) == null ? void 0 : l.globalCache) == null ? void 0 : c.enteredEditByTyping) === !0 && typeof ye == "string" && ye.replace(/\r\n/g, `
22297
+ ((c = (l = (i = e.getRefs) == null ? void 0 : i.call(e)) == null ? void 0 : l.globalCache) == null ? void 0 : c.enteredEditByTyping) === !0 && typeof be == "string" && be.replace(/\r\n/g, `
22298
22298
  `).replace(/\r/g, `
22299
- `).trim() === "%" && typeof ((s = L == null ? void 0 : L.ct) == null ? void 0 : s.fa) == "string" && String(L.ct.fa).includes("%") && (ye = "");
22299
+ `).trim() === "%" && typeof ((s = L == null ? void 0 : L.ct) == null ? void 0 : s.fa) == "string" && String(L.ct.fa).includes("%") && (be = "");
22300
22300
  const te = h.cloneDeep(L), ve = Vt(L);
22301
- let we = (ye == null ? void 0 : ye.slice(0, 1)) !== "=" && (M == null ? void 0 : M.substring(0, 5)) === "<span", Te = !1;
22302
- if (!we && ye && ye.length > 0) {
22303
- const j = ye.replace(/\r\n/g, "_x000D_").replace(/&#13;&#10;/g, "_x000D_").replace(/\r/g, "_x000D_").replace(/\n/g, "_x000D_").split("_x000D_");
22304
- j.length > 1 && M !== "<br>" && (Te = !0, we = !0, ye = j.join(`\r
22301
+ let we = (be == null ? void 0 : be.slice(0, 1)) !== "=" && (M == null ? void 0 : M.substring(0, 5)) === "<span", Te = !1;
22302
+ if (!we && be && be.length > 0) {
22303
+ const Z = be.replace(/\r\n/g, "_x000D_").replace(/&#13;&#10;/g, "_x000D_").replace(/\r/g, "_x000D_").replace(/\n/g, "_x000D_").split("_x000D_");
22304
+ Z.length > 1 && M !== "<br>" && (Te = !0, we = !0, be = Z.join(`\r
22305
22305
  `));
22306
22306
  }
22307
22307
  if (L != null && L.ct && !n && !we && ve)
22308
22308
  delete L.ct.s, L.ct.t = "g", L.ct.fa = "General", L.tb = "1", n = "";
22309
22309
  else if (we) {
22310
22310
  h.isPlainObject(L) || (L = {}), L || (L = {});
22311
- const j = L.fs || 10;
22311
+ const Z = L.fs || 10;
22312
22312
  L.ct || (L.ct = {}, L.ct.fa = "General", L.tb = "1"), L.ct.t = "inlineStr", ff(a), L.ct.s = tc(
22313
22313
  a.querySelectorAll("span"),
22314
22314
  L
22315
- ), delete L.fs, delete L.f, delete L._formulaEditHtml, delete L.v, delete L.m, L.fs = j, Te && (L.ct.s = [
22315
+ ), delete L.fs, delete L.f, delete L._formulaEditHtml, delete L.v, delete L.m, L.fs = Z, Te && (L.ct.s = [
22316
22316
  {
22317
- v: ye,
22318
- fs: j
22317
+ v: be,
22318
+ fs: Z
22319
22319
  }
22320
22320
  ]);
22321
22321
  }
22322
- if (n = n || ye, h.isString(n) && n.startsWith("=") && (n = fe(n)), h.isString(n) && n.startsWith("=") && n.length > 1) {
22323
- const j = Wo(n);
22324
- F && (oe ?? "").startsWith("=") && j.length > n.length && (W = j.slice(n.length)), n = j;
22322
+ if (n = n || be, h.isString(n) && n.startsWith("=") && (n = ue(n)), h.isString(n) && n.startsWith("=") && n.length > 1) {
22323
+ const Z = Wo(n);
22324
+ F && (oe ?? "").startsWith("=") && Z.length > n.length && (V = Z.slice(n.length)), n = Z;
22325
22325
  } else if (h.isPlainObject(n) && h.isString(n.f) && n.f.startsWith("=") && n.f.length > 1) {
22326
- const j = n.f, le = Wo(j);
22327
- F && (oe ?? "").startsWith("=") && le.length > j.length && (W = le.slice(j.length)), n.f = le;
22326
+ const Z = n.f, le = Wo(Z);
22327
+ F && (oe ?? "").startsWith("=") && le.length > Z.length && (V = le.slice(Z.length)), n.f = le;
22328
22328
  }
22329
- const Se = F && W.length === 0;
22329
+ const Se = F && V.length === 0;
22330
22330
  if ((te != null && te.f ? te.f !== n : (te == null ? void 0 : te.v) !== n) && Kt(e, t, r), ((f = (u = e.hooks).beforeUpdateCell) == null ? void 0 : f.call(u, t, r, n)) === !1) {
22331
22331
  jt(e);
22332
22332
  return;
22333
22333
  }
22334
- const ue = h.isPlainObject(L) ? L : null;
22335
- if (h.isString(n) && ((m = ue == null ? void 0 : ue.ct) == null ? void 0 : m.t) === "d" && n === Ke(t, r, N, "f")) {
22334
+ const fe = h.isPlainObject(L) ? L : null;
22335
+ if (h.isString(n) && ((m = fe == null ? void 0 : fe.ct) == null ? void 0 : m.t) === "d" && n === Ke(t, r, N, "f")) {
22336
22336
  jt(e);
22337
22337
  return;
22338
22338
  }
@@ -22360,23 +22360,23 @@ function pf(e, t, r, a, n, o) {
22360
22360
  if (h.isPlainObject(L)) {
22361
22361
  if (!we)
22362
22362
  if (h.isString(n) && n.slice(0, 1) === "=" && n.length > 1) {
22363
- const j = Tn(e, n, t, r, void 0, void 0, !0);
22364
- if (He = !1, L = h.cloneDeep(((d = Ue == null ? void 0 : Ue[t]) == null ? void 0 : d[r]) || {}), [, L.v, L.f] = j, L.ct || (L.ct = {}), F ? (L.ct.s = [
22363
+ const Z = Tn(e, n, t, r, void 0, void 0, !0);
22364
+ if (He = !1, L = h.cloneDeep(((d = Ue == null ? void 0 : Ue[t]) == null ? void 0 : d[r]) || {}), [, L.v, L.f] = Z, L.ct || (L.ct = {}), F ? (L.ct.s = [
22365
22365
  {
22366
22366
  v: ce(L.f),
22367
22367
  fs: L.fs || 10
22368
22368
  }
22369
- ], K(L)) : delete L.ct.s, Se ? L._formulaEditHtml = M : delete L._formulaEditHtml, j.length === 4 && j[3].type === "sparklines") {
22369
+ ], J(L)) : delete L.ct.s, Se ? L._formulaEditHtml = M : delete L._formulaEditHtml, Z.length === 4 && Z[3].type === "sparklines") {
22370
22370
  delete L.m, delete L.v;
22371
- const le = j[3].data;
22372
- h.isArray(le) && !h.isPlainObject(le[0]) ? [L.v] = le : L.spl = j[3].data;
22373
- } else j.length === 4 && j[3].type === "dynamicArrayItem" && (Me = j[3].data);
22371
+ const le = Z[3].data;
22372
+ h.isArray(le) && !h.isPlainObject(le[0]) ? [L.v] = le : L.spl = Z[3].data;
22373
+ } else Z.length === 4 && Z[3].type === "dynamicArrayItem" && (Me = Z[3].data);
22374
22374
  } else if (h.isPlainObject(n)) {
22375
- const j = n.f;
22376
- if (h.isString(j) && j.slice(0, 1) === "=" && j.length > 1) {
22375
+ const Z = n.f;
22376
+ if (h.isString(Z) && Z.slice(0, 1) === "=" && Z.length > 1) {
22377
22377
  const le = Tn(
22378
22378
  e,
22379
- j,
22379
+ Z,
22380
22380
  t,
22381
22381
  r,
22382
22382
  void 0,
@@ -22388,7 +22388,7 @@ function pf(e, t, r, a, n, o) {
22388
22388
  v: ce(L.f),
22389
22389
  fs: L.fs || 10
22390
22390
  }
22391
- ], K(L)) : delete L.ct.s, Se ? L._formulaEditHtml = M : delete L._formulaEditHtml, le.length === 4 && le[3].type === "sparklines") {
22391
+ ], J(L)) : delete L.ct.s, Se ? L._formulaEditHtml = M : delete L._formulaEditHtml, le.length === 4 && le[3].type === "sparklines") {
22392
22392
  delete L.m, delete L.v;
22393
22393
  const qe = le[3].data;
22394
22394
  h.isArray(qe) && !h.isPlainObject(qe[0]) ? [L.v] = qe : L.spl = le[3].data;
@@ -22399,21 +22399,21 @@ function pf(e, t, r, a, n, o) {
22399
22399
  }), Kt(e, t, r);
22400
22400
  } else {
22401
22401
  Kt(e, t, r), ca(e, t, r), L = h.cloneDeep(((g = Ue == null ? void 0 : Ue[t]) == null ? void 0 : g[r]) || {}), L.v = n, delete L.f, delete L._formulaEditHtml, delete L.spl, delete L.m;
22402
- const j = (y = te == null ? void 0 : te.m) != null && y.toString().includes(".") ? (w = (b = te == null ? void 0 : te.m) == null ? void 0 : b.toString().split(" ")[0].split(".")[1]) == null ? void 0 : w.length : 0, le = (v = te == null ? void 0 : te.m) == null ? void 0 : v.toString().split(" ")[1];
22403
- typeof L == "object" && (L != null && L.baseValue) && (te != null && te.baseCurrencyPrice) && (L.m = `${(parseFloat(n) / te.baseCurrencyPrice).toFixed(j || 2)} ${le}`, L.baseValue = n), Xn(e, t, r, L), He = !1, L.qp === 1 && `${n}`.substring(0, 1) !== "'" && (L.qp = 0, L.ct && (L.ct.fa = "General", L.ct.t = "n"));
22402
+ const Z = (y = te == null ? void 0 : te.m) != null && y.toString().includes(".") ? (w = (b = te == null ? void 0 : te.m) == null ? void 0 : b.toString().split(" ")[0].split(".")[1]) == null ? void 0 : w.length : 0, le = (v = te == null ? void 0 : te.m) == null ? void 0 : v.toString().split(" ")[1];
22403
+ typeof L == "object" && (L != null && L.baseValue) && (te != null && te.baseCurrencyPrice) && (L.m = `${(parseFloat(n) / te.baseCurrencyPrice).toFixed(Z || 2)} ${le}`, L.baseValue = n), Xn(e, t, r, L), He = !1, L.qp === 1 && `${n}`.substring(0, 1) !== "'" && (L.qp = 0, L.ct && (L.ct.fa = "General", L.ct.t = "n"));
22404
22404
  }
22405
22405
  n = L;
22406
22406
  } else if (h.isString(n) && n.slice(0, 1) === "=" && n.length > 1) {
22407
- const j = Tn(e, n, t, r, void 0, void 0, !0);
22407
+ const Z = Tn(e, n, t, r, void 0, void 0, !0);
22408
22408
  if (He = !1, n = {
22409
- v: j[1],
22410
- f: j[2]
22409
+ v: Z[1],
22410
+ f: Z[2]
22411
22411
  }, n.ct = n.ct || {}, F ? (n.ct.s = [
22412
22412
  {
22413
22413
  v: ce(n.f),
22414
22414
  fs: n.fs || 10
22415
22415
  }
22416
- ], K(n)) : (T = n.ct) == null || delete T.s, mf(n.v)) {
22416
+ ], J(n)) : (T = n.ct) == null || delete T.s, mf(n.v)) {
22417
22417
  const le = (_ = Gl(n == null ? void 0 : n.f)) == null ? void 0 : _.split(","), qe = le == null ? void 0 : le.map((Ee) => Ee.trim().toUpperCase()), xe = Yl(qe, Ue, N);
22418
22418
  if (xe) {
22419
22419
  const Ee = typeof n.v == "number" ? n.v : Number(String(n.v).replace(/,/g, ""));
@@ -22424,16 +22424,16 @@ function pf(e, t, r, a, n, o) {
22424
22424
  };
22425
22425
  }
22426
22426
  }
22427
- if (j.length === 4 && j[3].type === "sparklines") {
22428
- const le = j[3].data;
22429
- h.isArray(le) && !h.isPlainObject(le[0]) ? [n.v] = le : n.spl = j[3].data;
22430
- } else j.length === 4 && j[3].type === "dynamicArrayItem" && (Me = j[3].data);
22427
+ if (Z.length === 4 && Z[3].type === "sparklines") {
22428
+ const le = Z[3].data;
22429
+ h.isArray(le) && !h.isPlainObject(le[0]) ? [n.v] = le : n.spl = Z[3].data;
22430
+ } else Z.length === 4 && Z[3].type === "dynamicArrayItem" && (Me = Z[3].data);
22431
22431
  } else if (h.isPlainObject(n)) {
22432
- const j = n.f;
22433
- if (h.isString(j) && j.slice(0, 1) === "=" && j.length > 1) {
22432
+ const Z = n.f;
22433
+ if (h.isString(Z) && Z.slice(0, 1) === "=" && Z.length > 1) {
22434
22434
  const le = Tn(
22435
22435
  e,
22436
- j,
22436
+ Z,
22437
22437
  t,
22438
22438
  r,
22439
22439
  void 0,
@@ -22445,7 +22445,7 @@ function pf(e, t, r, a, n, o) {
22445
22445
  v: ce(n.f),
22446
22446
  fs: n.fs || 10
22447
22447
  }
22448
- ], K(n)) : (E = n.ct) == null || delete E.s, le.length === 4 && le[3].type === "sparklines") {
22448
+ ], J(n)) : (E = n.ct) == null || delete E.s, le.length === 4 && le[3].type === "sparklines") {
22449
22449
  const qe = le[3].data;
22450
22450
  h.isArray(qe) && !h.isPlainObject(qe[0]) ? [n.v] = qe : n.spl = le[3].data;
22451
22451
  } else le.length === 4 && le[3].type === "dynamicArrayItem" && (Me = le[3].data);
@@ -22456,10 +22456,10 @@ function pf(e, t, r, a, n, o) {
22456
22456
  }
22457
22457
  } else
22458
22458
  Kt(e, t, r), ca(e, t, r), Xn(e, t, r, n), He = !1;
22459
- const ge = (C = te == null ? void 0 : te.m) != null && C.toString().includes(".") ? (k = (I = te == null ? void 0 : te.m) == null ? void 0 : I.toString().split(" ")[0].split(".")[1]) == null ? void 0 : k.length : 0, D = (O = te == null ? void 0 : te.m) == null ? void 0 : O.toString().split(" ")[1];
22459
+ const ye = (C = te == null ? void 0 : te.m) != null && C.toString().includes(".") ? (k = (I = te == null ? void 0 : te.m) == null ? void 0 : I.toString().split(" ")[0].split(".")[1]) == null ? void 0 : k.length : 0, D = (O = te == null ? void 0 : te.m) == null ? void 0 : O.toString().split(" ")[1];
22460
22460
  typeof n == "object" && n.baseValue && !(n != null && n.m) && (n.m = `${// @ts-expect-error later
22461
22461
  (parseFloat(n == null ? void 0 : n.v) / (te == null ? void 0 : te.baseCurrencyPrice)).toFixed(
22462
- ge || 2
22462
+ ye || 2
22463
22463
  )} ${D}`), typeof n == "string" ? n = {
22464
22464
  ct: {
22465
22465
  fa: "General",
@@ -22468,15 +22468,15 @@ function pf(e, t, r, a, n, o) {
22468
22468
  v: n,
22469
22469
  tb: "1"
22470
22470
  } : typeof n == "object" && !n.tb && (n.tb = "1");
22471
- const q = Array.isArray((U = n == null ? void 0 : n.v) == null ? void 0 : U[0]);
22471
+ const q = Array.isArray((z = n == null ? void 0 : n.v) == null ? void 0 : z[0]);
22472
22472
  try {
22473
22473
  if (q && Ol(e, t, r, n, Ue)) {
22474
22474
  if (jt(e), e.hooks.afterUpdateCell) {
22475
- const j = h.cloneDeep(Ue[t][r]);
22476
- (J = (Z = e.hooks).onLocalCellEdit) == null || J.call(Z), setTimeout(
22475
+ const Z = h.cloneDeep(Ue[t][r]);
22476
+ (Q = (Y = e.hooks).onLocalCellEdit) == null || Q.call(Y), setTimeout(
22477
22477
  () => {
22478
22478
  var le, qe;
22479
- return (qe = (le = e.hooks).afterUpdateCell) == null ? void 0 : qe.call(le, t, r, te, j);
22479
+ return (qe = (le = e.hooks).afterUpdateCell) == null ? void 0 : qe.call(le, t, r, te, Z);
22480
22480
  }
22481
22481
  );
22482
22482
  }
@@ -22485,18 +22485,18 @@ function pf(e, t, r, a, n, o) {
22485
22485
  }
22486
22486
  } catch {
22487
22487
  }
22488
- const Y = `${t}_${r}`, P = (se = H.hyperlink) == null ? void 0 : se[Y];
22489
- if (typeof n == "object" && n && ((V = n.ct) == null ? void 0 : V.t) === "inlineStr") {
22490
- const j = Qs(n);
22491
- H.hyperlink || (H.hyperlink = {}), j.length === 0 ? delete H.hyperlink[Y] : H.hyperlink[Y] = j.length === 1 ? j[0] : j, typeof n == "object" && n && "hl" in n && delete n.hl;
22488
+ const X = `${t}_${r}`, P = (se = H.hyperlink) == null ? void 0 : se[X];
22489
+ if (typeof n == "object" && n && ((W = n.ct) == null ? void 0 : W.t) === "inlineStr") {
22490
+ const Z = Qs(n);
22491
+ H.hyperlink || (H.hyperlink = {}), Z.length === 0 ? delete H.hyperlink[X] : H.hyperlink[X] = Z.length === 1 ? Z[0] : Z, typeof n == "object" && n && "hl" in n && delete n.hl;
22492
22492
  } else
22493
- P && H.hyperlink && delete H.hyperlink[Y], typeof n == "object" && n && "hl" in n && delete n.hl;
22493
+ P && H.hyperlink && delete H.hyperlink[X], typeof n == "object" && n && "hl" in n && delete n.hl;
22494
22494
  bn(e, t, r, Ue, n), jt(e);
22495
- const z = e.luckysheetfile[Fe(e, e.currentSheetId)].config || {}, he = (te == null ? void 0 : te.tb) === "2" && !h.isNil(te == null ? void 0 : te.v) && (te == null ? void 0 : te.v) !== "" || Vt(te), _e = Ue[t][r], Ne = (_e == null ? void 0 : _e.tb) === "2" && !h.isNil(_e == null ? void 0 : _e.v) && (_e == null ? void 0 : _e.v) !== "" || Vt(_e);
22496
- if ((he || Ne) && !((Q = z.customHeight) != null && Q[t]) && o && Ll(e, t, Ue, o), e.hooks.afterUpdateCell) {
22497
- const j = h.cloneDeep(N[t][r]), { afterUpdateCell: le } = e.hooks;
22495
+ const U = e.luckysheetfile[Fe(e, e.currentSheetId)].config || {}, he = (te == null ? void 0 : te.tb) === "2" && !h.isNil(te == null ? void 0 : te.v) && (te == null ? void 0 : te.v) !== "" || Vt(te), _e = Ue[t][r], Ne = (_e == null ? void 0 : _e.tb) === "2" && !h.isNil(_e == null ? void 0 : _e.v) && (_e == null ? void 0 : _e.v) !== "" || Vt(_e);
22496
+ if ((he || Ne) && !((j = U.customHeight) != null && j[t]) && o && Ll(e, t, Ue, o), e.hooks.afterUpdateCell) {
22497
+ const Z = h.cloneDeep(N[t][r]), { afterUpdateCell: le } = e.hooks;
22498
22498
  (re = (B = e.hooks).onLocalCellEdit) == null || re.call(B), setTimeout(() => {
22499
- le == null || le(t, r, te, j);
22499
+ le == null || le(t, r, te, Z);
22500
22500
  });
22501
22501
  }
22502
22502
  sa(e) || (e.formulaCache.execFunctionGlobalData = null);
@@ -22919,19 +22919,19 @@ class Cf {
22919
22919
  }
22920
22920
  }
22921
22921
  function lm(e, t, r, a, n) {
22922
- var Z, J, se, V, Q;
22922
+ var Y, Q, se, W, j;
22923
22923
  const o = Ie(e);
22924
22924
  if (!o) return;
22925
22925
  const { scrollLeft: i } = r, { scrollTop: l } = a, c = n.getBoundingClientRect(), s = t.pageX - c.left - e.rowHeaderWidth + i, u = t.pageY - c.top - e.columnHeaderHeight + l;
22926
22926
  let f = ka(u, e.visibledatarow)[2], m = Ra(s, e.visibledatacolumn)[2];
22927
22927
  const d = tn(e, o, f, m);
22928
22928
  d && ([, , f] = d.row, [, , m] = d.column);
22929
- const p = (Z = e.luckysheet_select_save) == null ? void 0 : Z[0], g = p == null ? void 0 : p.row_focus, y = p == null ? void 0 : p.column_focus;
22929
+ const p = (Y = e.luckysheet_select_save) == null ? void 0 : Y[0], g = p == null ? void 0 : p.row_focus, y = p == null ? void 0 : p.column_focus;
22930
22930
  if (f === g && m === y) {
22931
22931
  e.hoverErrorBox = void 0;
22932
22932
  return;
22933
22933
  }
22934
- const b = `${f}_${m}`, w = (J = o[f]) == null ? void 0 : J[m], v = w == null ? void 0 : w.error, T = Array.isArray(e.errorBoxes) ? h.findIndex(e.errorBoxes, (B) => B.row_column === b) !== -1 : !1;
22934
+ const b = `${f}_${m}`, w = (Q = o[f]) == null ? void 0 : Q[m], v = w == null ? void 0 : w.error, T = Array.isArray(e.errorBoxes) ? h.findIndex(e.errorBoxes, (B) => B.row_column === b) !== -1 : !1;
22935
22935
  if (!v || T) {
22936
22936
  e.hoverErrorBox = void 0;
22937
22937
  return;
@@ -22940,13 +22940,13 @@ function lm(e, t, r, a, n) {
22940
22940
  let _ = f - 1 === -1 ? 0 : e.visibledatarow[f - 1], E = e.visibledatacolumn[m];
22941
22941
  d && ([_] = d.row, [, E] = d.column);
22942
22942
  const C = E, I = _, k = e.zoomRatio, O = v.left == null ? C + 8 * k : v.left * k;
22943
- let U = v.top == null ? I - 2 * k : v.top * k;
22944
- U < 0 && (U = 2), e.hoverErrorBox = {
22943
+ let z = v.top == null ? I - 2 * k : v.top * k;
22944
+ z < 0 && (z = 2), e.hoverErrorBox = {
22945
22945
  row_column: b,
22946
22946
  left: O,
22947
- top: U,
22948
- title: ((V = w.error) == null ? void 0 : V.title) || "Error",
22949
- message: ((Q = w.error) == null ? void 0 : Q.message) || "Default error message"
22947
+ top: z,
22948
+ title: ((W = w.error) == null ? void 0 : W.title) || "Error",
22949
+ message: ((j = w.error) == null ? void 0 : j.message) || "Default error message"
22950
22950
  };
22951
22951
  }
22952
22952
  function Qn(e, t, r, a) {
@@ -23162,59 +23162,59 @@ function pm(e, t) {
23162
23162
  const T = [], _ = [], E = v[0].length, C = v.length, I = Pl(e, n), k = h.cloneDeep(
23163
23163
  e.luckysheetfile[Fe(e, n)].dataVerification
23164
23164
  ) || {};
23165
- let O = null, U = 0, Z = 0, J = 0, se = 0;
23165
+ let O = null, z = 0, Y = 0, Q = 0, se = 0;
23166
23166
  for (let oe = 1; oe <= b; oe += 1)
23167
- for (let be = 1; be <= w; be += 1) {
23168
- U = f + (oe - 1) * g, Z = d + (be - 1) * y, se = f + oe * g > C ? C : f + oe * g, se > m + 1 && (se = m + 1), J = d + be * y > E ? E : d + be * y, J > p + 1 && (J = p + 1);
23169
- const fe = {};
23170
- for (let X = U; X < se; X += 1) {
23171
- if (X == null || v[X] == null) return;
23172
- let K = [];
23173
- K = v[X];
23174
- for (let W = Z; W < J; W += 1) {
23175
- if (I[`${o + X - U}_${l + W - Z}`]) {
23176
- const ye = {
23167
+ for (let ge = 1; ge <= w; ge += 1) {
23168
+ z = f + (oe - 1) * g, Y = d + (ge - 1) * y, se = f + oe * g > C ? C : f + oe * g, se > m + 1 && (se = m + 1), Q = d + ge * y > E ? E : d + ge * y, Q > p + 1 && (Q = p + 1);
23169
+ const ue = {};
23170
+ for (let K = z; K < se; K += 1) {
23171
+ if (K == null || v[K] == null) return;
23172
+ let J = [];
23173
+ J = v[K];
23174
+ for (let V = Y; V < Q; V += 1) {
23175
+ if (I[`${o + K - z}_${l + V - Y}`]) {
23176
+ const be = {
23177
23177
  rangeType: "cell",
23178
23178
  value: {
23179
- row_index: X,
23180
- col_index: W,
23181
- l: I[`${o + X - U}_${l + W - Z}`].l,
23182
- r: I[`${o + X - U}_${l + W - Z}`].r,
23183
- t: I[`${o + X - U}_${l + W - Z}`].t,
23184
- b: I[`${o + X - U}_${l + W - Z}`].b
23179
+ row_index: K,
23180
+ col_index: V,
23181
+ l: I[`${o + K - z}_${l + V - Y}`].l,
23182
+ r: I[`${o + K - z}_${l + V - Y}`].r,
23183
+ t: I[`${o + K - z}_${l + V - Y}`].t,
23184
+ b: I[`${o + K - z}_${l + V - Y}`].b
23185
23185
  }
23186
23186
  };
23187
- r.borderInfo == null && (r.borderInfo = []), r.borderInfo.push(ye);
23188
- } else if (I[`${X}_${W}`]) {
23189
- const ye = {
23187
+ r.borderInfo == null && (r.borderInfo = []), r.borderInfo.push(be);
23188
+ } else if (I[`${K}_${V}`]) {
23189
+ const be = {
23190
23190
  rangeType: "cell",
23191
23191
  value: {
23192
- row_index: X,
23193
- col_index: W,
23192
+ row_index: K,
23193
+ col_index: V,
23194
23194
  l: null,
23195
23195
  r: null,
23196
23196
  t: null,
23197
23197
  b: null
23198
23198
  }
23199
23199
  };
23200
- r.borderInfo == null && (r.borderInfo = []), r.borderInfo.push(ye);
23200
+ r.borderInfo == null && (r.borderInfo = []), r.borderInfo.push(be);
23201
23201
  }
23202
- if (k[`${o + X - U}_${l + W - Z}`]) {
23202
+ if (k[`${o + K - z}_${l + V - Y}`]) {
23203
23203
  O == null && (O = h.cloneDeep(
23204
23204
  e.luckysheetfile[Fe(e, e.currentSheetId)].dataVerification
23205
23205
  ));
23206
- const ye = k[`${o + X - U}_${l + W - Z}`];
23207
- O[`${X}_${W}`] = ye, _.push({
23206
+ const be = k[`${o + K - z}_${l + V - Y}`];
23207
+ O[`${K}_${V}`] = be, _.push({
23208
23208
  sheetId: e.currentSheetId,
23209
23209
  path: ["dataVerification"],
23210
- key: `${X}_${W}`,
23211
- value: JSON.parse(JSON.stringify(ye)),
23210
+ key: `${K}_${V}`,
23211
+ value: JSON.parse(JSON.stringify(be)),
23212
23212
  type: "update"
23213
23213
  });
23214
23214
  }
23215
- _o(K[W]) && K[W].mc && (K[W].mc.rs && delete r.merge[`${K[W].mc.r}_${K[W].mc.c}`], delete K[W].mc);
23215
+ _o(J[V]) && J[V].mc && (J[V].mc.rs && delete r.merge[`${J[V].mc.r}_${J[V].mc.c}`], delete J[V].mc);
23216
23216
  let ce = null;
23217
- if (s[X - U] != null && s[X - U][W - Z] != null && (ce = s[X - U][W - Z]), _o(K[W]) ? K[W].ct && K[W].ct.t === "inlineStr" && ce ? delete ce.ct : [
23217
+ if (s[K - z] != null && s[K - z][V - Y] != null && (ce = s[K - z][V - Y]), _o(J[V]) ? J[V].ct && J[V].ct.t === "inlineStr" && ce ? delete ce.ct : [
23218
23218
  "bg",
23219
23219
  "fc",
23220
23220
  "ct",
@@ -23228,48 +23228,48 @@ function pm(e, t) {
23228
23228
  "ff",
23229
23229
  "tb"
23230
23230
  ].forEach((M) => {
23231
- Reflect.deleteProperty(K[W], M);
23232
- }) : K[W] = { v: K[W] }, ce != null && (delete ce.v, delete ce.m, delete ce.f, delete ce.spl, ce.ct && ce.ct.t === "inlineStr" && delete ce.ct, K[W] = h.assign(K[W], h.cloneDeep(ce)), K[W].ct && K[W].ct.t === "inlineStr" && K[W].ct.s.forEach((ye) => h.assign(ye, ce)), a && K[W].mc && (K[W].mc.rs != null ? (K[W].mc.r = X, K[W].mc.rs + X >= se && (K[W].mc.rs = se - X), K[W].mc.c = W, K[W].mc.cs + W >= J && (K[W].mc.cs = J - W), r.merge[`${K[W].mc.r}_${K[W].mc.c}`] = K[W].mc, fe[`${ce.mc.r}_${ce.mc.c}`] = [
23233
- K[W].mc.r,
23234
- K[W].mc.c
23235
- ]) : K[W] = {
23231
+ Reflect.deleteProperty(J[V], M);
23232
+ }) : J[V] = { v: J[V] }, ce != null && (delete ce.v, delete ce.m, delete ce.f, delete ce.spl, ce.ct && ce.ct.t === "inlineStr" && delete ce.ct, J[V] = h.assign(J[V], h.cloneDeep(ce)), J[V].ct && J[V].ct.t === "inlineStr" && J[V].ct.s.forEach((be) => h.assign(be, ce)), a && J[V].mc && (J[V].mc.rs != null ? (J[V].mc.r = K, J[V].mc.rs + K >= se && (J[V].mc.rs = se - K), J[V].mc.c = V, J[V].mc.cs + V >= Q && (J[V].mc.cs = Q - V), r.merge[`${J[V].mc.r}_${J[V].mc.c}`] = J[V].mc, ue[`${ce.mc.r}_${ce.mc.c}`] = [
23233
+ J[V].mc.r,
23234
+ J[V].mc.c
23235
+ ]) : J[V] = {
23236
23236
  mc: {
23237
- r: fe[`${ce.mc.r}_${ce.mc.c}`][0],
23238
- c: fe[`${ce.mc.r}_${ce.mc.c}`][1]
23237
+ r: ue[`${ce.mc.r}_${ce.mc.c}`][0],
23238
+ c: ue[`${ce.mc.r}_${ce.mc.c}`][1]
23239
23239
  }
23240
- }), K[W].v != null && ce.ct != null && ce.ct.fa != null)) {
23241
- const ye = kt(ce.ct.fa, K[W].v);
23242
- K[W].m = ye;
23240
+ }), J[V].v != null && ce.ct != null && ce.ct.fa != null)) {
23241
+ const be = kt(ce.ct.fa, J[V].v);
23242
+ J[V].m = be;
23243
23243
  }
23244
23244
  T.push({
23245
23245
  sheetId: e.currentSheetId,
23246
23246
  path: ["celldata"],
23247
- value: { r: X, c: W, v: K[W] ?? null },
23248
- key: `${X}_${W}`,
23247
+ value: { r: K, c: V, v: J[V] ?? null },
23248
+ key: `${K}_${V}`,
23249
23249
  type: "update"
23250
23250
  });
23251
23251
  }
23252
- v[X] = K;
23252
+ v[K] = J;
23253
23253
  }
23254
23254
  }
23255
23255
  T.length > 0 && ((B = e == null ? void 0 : e.hooks) != null && B.updateCellYdoc) ? e.hooks.updateCellYdoc(
23256
23256
  _.length > 0 ? [...T, ..._] : T
23257
23257
  ) : _.length > 0 && ((re = e == null ? void 0 : e.hooks) != null && re.updateCellYdoc) && e.hooks.updateCellYdoc(_);
23258
- const V = e.luckysheetfile[Fe(e, e.currentSheetId)];
23259
- V.config = r, O != null && (V.dataVerification = O);
23260
- const Q = Fe(e, n);
23261
- if (Q != null) {
23258
+ const W = e.luckysheetfile[Fe(e, e.currentSheetId)];
23259
+ W.config = r, O != null && (W.dataVerification = O);
23260
+ const j = Fe(e, n);
23261
+ if (j != null) {
23262
23262
  const oe = h.cloneDeep(
23263
- e.luckysheetfile[Q].luckysheet_conditionformat_save
23263
+ e.luckysheetfile[j].luckysheet_conditionformat_save
23264
23264
  );
23265
23265
  if (!h.isNil(oe) && oe.length > 0) {
23266
- const be = Fe(e, e.currentSheetId), fe = e.luckysheetfile[be].luckysheet_conditionformat_save, X = h.cloneDeep(fe) ?? [];
23267
- for (let K = 0; K < oe.length; K += 1) {
23268
- const W = oe[K].cellrange;
23266
+ const ge = Fe(e, e.currentSheetId), ue = e.luckysheetfile[ge].luckysheet_conditionformat_save, K = h.cloneDeep(ue) ?? [];
23267
+ for (let J = 0; J < oe.length; J += 1) {
23268
+ const V = oe[J].cellrange;
23269
23269
  let ce = [];
23270
- for (let ye = 0; ye < W.length; ye += 1) {
23270
+ for (let be = 0; be < V.length; be += 1) {
23271
23271
  const M = ef(
23272
- W[ye],
23272
+ V[be],
23273
23273
  { row: [o, i], column: [l, c] },
23274
23274
  { row: [f, m], column: [d, p] },
23275
23275
  "operatePart"
@@ -23277,21 +23277,21 @@ function pm(e, t) {
23277
23277
  M.length > 0 && (ce = ce.concat(M));
23278
23278
  }
23279
23279
  if (ce.length > 0) {
23280
- const ye = { row: [f, m], column: [d, p] }, M = jo(oe[K]), $ = X.findIndex(
23280
+ const be = { row: [f, m], column: [d, p] }, M = jo(oe[J]), $ = K.findIndex(
23281
23281
  (A) => M === jo(A)
23282
23282
  );
23283
23283
  if ($ >= 0) {
23284
- const A = h.cloneDeep(X[$]);
23284
+ const A = h.cloneDeep(K[$]);
23285
23285
  Array.isArray(A.cellrange) || (A.cellrange = []), A.cellrange.some(
23286
- (F) => Ef(F, ye)
23287
- ) || A.cellrange.push({ ...ye }), X[$] = A;
23286
+ (F) => Ef(F, be)
23287
+ ) || A.cellrange.push({ ...be }), K[$] = A;
23288
23288
  } else {
23289
- const A = h.cloneDeep(oe[K]);
23290
- A.cellrange = [h.cloneDeep(ye)], X.push(A);
23289
+ const A = h.cloneDeep(oe[J]);
23290
+ A.cellrange = [h.cloneDeep(be)], K.push(A);
23291
23291
  }
23292
23292
  }
23293
23293
  }
23294
- V.luckysheet_conditionformat_save = X;
23294
+ W.luckysheet_conditionformat_save = K;
23295
23295
  }
23296
23296
  }
23297
23297
  Nf(e);
@@ -23426,8 +23426,8 @@ function ym(e, t, r, a) {
23426
23426
  h.isNil(y.column_focus) ? [C] = y.column : C = y.column_focus;
23427
23427
  const I = tn(e, n, E, C);
23428
23428
  if (I) {
23429
- const Z = I.row[2], J = I.row[3], se = I.column[2], V = I.column[3];
23430
- r > 0 ? t === "down" ? (E = J, C = se) : t === "right" && (E = Z, C = V) : (E = Z, C = se);
23429
+ const Y = I.row[2], Q = I.row[3], se = I.column[2], W = I.column[3];
23430
+ r > 0 ? t === "down" ? (E = Q, C = se) : t === "right" && (E = Y, C = W) : (E = Y, C = se);
23431
23431
  }
23432
23432
  if (h.isNil(E) || h.isNil(C)) {
23433
23433
  console.error("moveHighlightCell: curR or curC is nil");
@@ -23435,8 +23435,8 @@ function ym(e, t, r, a) {
23435
23435
  }
23436
23436
  let k = h.isNil(y.moveXY) ? E : y.moveXY.x, O = h.isNil(y.moveXY) ? C : y.moveXY.y;
23437
23437
  t === "down" ? (E += r, k = E) : t === "right" && (C += r, O = C), E >= o && (E = o - 1, k = E), E < 0 && (E = 0, k = E), C >= i && (C = i - 1, O = C), C < 0 && (C = 0, O = C);
23438
- const U = tn(e, n, E, C);
23439
- if (U ? ([c, l, s, u] = U.row, [m, f, d, p] = U.column) : (l = e.visibledatarow[k], c = k - 1 === -1 ? 0 : e.visibledatarow[k - 1], f = e.visibledatacolumn[O], m = O - 1 === -1 ? 0 : e.visibledatacolumn[O - 1], s = E, u = E, d = C, p = C), h.isNil(s) || h.isNil(u) || h.isNil(d) || h.isNil(p)) {
23438
+ const z = tn(e, n, E, C);
23439
+ if (z ? ([c, l, s, u] = z.row, [m, f, d, p] = z.column) : (l = e.visibledatarow[k], c = k - 1 === -1 ? 0 : e.visibledatarow[k - 1], f = e.visibledatacolumn[O], m = O - 1 === -1 ? 0 : e.visibledatacolumn[O - 1], s = E, u = E, d = C, p = C), h.isNil(s) || h.isNil(u) || h.isNil(d) || h.isNil(p)) {
23440
23440
  console.error(
23441
23441
  "moveHighlightCell: row_index or row_index_ed or col_index or col_index_ed is nil"
23442
23442
  );
@@ -23584,17 +23584,17 @@ function bm(e, t, r, a) {
23584
23584
  const p = s.row_focus, g = s.column_focus, y = c.length, b = c[0].length;
23585
23585
  if (t === "down") {
23586
23586
  if (!h.isNil(p) && St(e, p, m, d)) {
23587
- const k = Ht(e, p, m, d), O = k[0], U = k[1];
23588
- if (!h.isNil(O) && O > u && U === f) {
23587
+ const k = Ht(e, p, m, d), O = k[0], z = k[1];
23588
+ if (!h.isNil(O) && O > u && z === f) {
23589
23589
  if (r > 0 && St(e, u, m, d)) {
23590
- const Z = Ht(e, u, m, d)[1];
23591
- h.isNil(Z) || (u = Z);
23590
+ const Y = Ht(e, u, m, d)[1];
23591
+ h.isNil(Y) || (u = Y);
23592
23592
  }
23593
23593
  u += r;
23594
- } else if (!h.isNil(U) && U < f && O === u) {
23594
+ } else if (!h.isNil(z) && z < f && O === u) {
23595
23595
  if (r < 0 && St(e, f, m, d)) {
23596
- const Z = Ht(e, f, m, d)[0];
23597
- h.isNil(Z) || (f = Z), f += r;
23596
+ const Y = Ht(e, f, m, d)[0];
23597
+ h.isNil(Y) || (f = Y), f += r;
23598
23598
  }
23599
23599
  } else
23600
23600
  r > 0 ? f += r : u += r;
@@ -23614,17 +23614,17 @@ function bm(e, t, r, a) {
23614
23614
  f >= y && (f = y - 1), f < 0 && (f = 0), u >= y && (u = y - 1), u < 0 && (u = 0);
23615
23615
  } else {
23616
23616
  if (!h.isNil(g) && Et(e, g, u, f)) {
23617
- const k = Ut(e, g, u, f), O = k[0], U = k[1];
23618
- if (!h.isNil(O) && O > m && U === d) {
23617
+ const k = Ut(e, g, u, f), O = k[0], z = k[1];
23618
+ if (!h.isNil(O) && O > m && z === d) {
23619
23619
  if (r > 0 && Et(e, m, u, f)) {
23620
- const Z = Ut(e, m, u, f)[1];
23621
- h.isNil(Z) || (m = Z);
23620
+ const Y = Ut(e, m, u, f)[1];
23621
+ h.isNil(Y) || (m = Y);
23622
23622
  }
23623
23623
  m += r;
23624
- } else if (!h.isNil(U) && U < d && O === m) {
23624
+ } else if (!h.isNil(z) && z < d && O === m) {
23625
23625
  if (r < 0 && Et(e, d, u, f)) {
23626
- const Z = Ut(e, d, u, f)[0];
23627
- h.isNil(Z) || (d = Z);
23626
+ const Y = Ut(e, d, u, f)[0];
23627
+ h.isNil(Y) || (d = Y);
23628
23628
  }
23629
23629
  d += r;
23630
23630
  } else
@@ -23711,8 +23711,8 @@ function kf(e, t, r, a) {
23711
23711
  for (let O = E; O <= C; O += 1)
23712
23712
  if (!c.has(O)) {
23713
23713
  f.includes(O) || f.push(O);
23714
- for (let U = I; U <= k; U += 1)
23715
- m.includes(U) || m.push(U);
23714
+ for (let z = I; z <= k; z += 1)
23715
+ m.includes(z) || m.push(z);
23716
23716
  }
23717
23717
  }
23718
23718
  let d;
@@ -23729,78 +23729,78 @@ function kf(e, t, r, a) {
23729
23729
  let I = '<td ${span} style="${style}" data-fortune-cell="${cellData}">';
23730
23730
  const k = (v = g[_]) == null ? void 0 : v[C];
23731
23731
  if (k != null) {
23732
- let O = "", U = "";
23732
+ let O = "", z = "";
23733
23733
  _ === f[0] && (h.isNil(u.config) || h.isNil(u.config.columnlen) || h.isNil(u.config.columnlen[C.toString()]) ? y += '<colgroup width="72px"></colgroup>' : y += `<colgroup width="${u.config.columnlen[C.toString()]}px"></colgroup>`), C === m[0] && (h.isNil(u.config) || h.isNil(u.config.rowlen) || h.isNil(u.config.rowlen[_.toString()]) ? O += "height:19px;" : O += `height:${u.config.rowlen[_.toString()]}px;`);
23734
- const Z = /^(w|W)((0?)|(0\.0+))$/;
23735
- let J;
23736
- !h.isNil(k.ct) && !h.isNil(k.ct.fa) && k.ct.fa.match(Z) ? J = Ke(_, C, g) : J = Ke(_, C, g, "m");
23734
+ const Y = /^(w|W)((0?)|(0\.0+))$/;
23735
+ let Q;
23736
+ !h.isNil(k.ct) && !h.isNil(k.ct.fa) && k.ct.fa.match(Y) ? Q = Ke(_, C, g) : Q = Ke(_, C, g, "m");
23737
23737
  const se = ma(e, g, _, C, l);
23738
- if (O += h.map(se, (Q, B) => `${h.kebabCase(B)}:${h.isNumber(Q) ? `${Q}px` : Q};`).join(""), k.mc)
23738
+ if (O += h.map(se, (j, B) => `${h.kebabCase(B)}:${h.isNumber(j) ? `${j}px` : j};`).join(""), k.mc)
23739
23739
  if ("rs" in k.mc) {
23740
- if (U = `rowspan="${k.mc.rs}" colspan="${k.mc.cs}"`, d && d[`${_}_${C}`]) {
23741
- const Q = { color: {}, style: {} }, B = { color: {}, style: {} }, re = { color: {}, style: {} }, oe = { color: {}, style: {} };
23742
- for (let X = _; X < _ + k.mc.rs; X += 1)
23743
- for (let K = C; K < C + k.mc.cs; K += 1) {
23744
- if (X === _ && d[`${X}_${K}`] && d[`${X}_${K}`].t) {
23745
- const W = d[`${X}_${K}`].t.style, ce = d[`${X}_${K}`].t.color;
23746
- h.isNil(re.style[W]) ? re.style[W] = 1 : re.style[W] += 1, h.isNil(re.color[ce]) ? re.color[ce] = 1 : re.color[ce] += 1;
23740
+ if (z = `rowspan="${k.mc.rs}" colspan="${k.mc.cs}"`, d && d[`${_}_${C}`]) {
23741
+ const j = { color: {}, style: {} }, B = { color: {}, style: {} }, re = { color: {}, style: {} }, oe = { color: {}, style: {} };
23742
+ for (let K = _; K < _ + k.mc.rs; K += 1)
23743
+ for (let J = C; J < C + k.mc.cs; J += 1) {
23744
+ if (K === _ && d[`${K}_${J}`] && d[`${K}_${J}`].t) {
23745
+ const V = d[`${K}_${J}`].t.style, ce = d[`${K}_${J}`].t.color;
23746
+ h.isNil(re.style[V]) ? re.style[V] = 1 : re.style[V] += 1, h.isNil(re.color[ce]) ? re.color[ce] = 1 : re.color[ce] += 1;
23747
23747
  }
23748
- if (X === _ + k.mc.rs - 1 && d[`${X}_${K}`] && d[`${X}_${K}`].b) {
23749
- const W = d[`${X}_${K}`].b.style, ce = d[`${X}_${K}`].b.color;
23750
- h.isNil(oe.style[W]) ? oe.style[W] = 1 : oe.style[W] += 1, h.isNil(oe.color[ce]) ? oe.color[ce] = 1 : oe.color[ce] += 1;
23748
+ if (K === _ + k.mc.rs - 1 && d[`${K}_${J}`] && d[`${K}_${J}`].b) {
23749
+ const V = d[`${K}_${J}`].b.style, ce = d[`${K}_${J}`].b.color;
23750
+ h.isNil(oe.style[V]) ? oe.style[V] = 1 : oe.style[V] += 1, h.isNil(oe.color[ce]) ? oe.color[ce] = 1 : oe.color[ce] += 1;
23751
23751
  }
23752
- if (K === C && d[`${X}_${K}`] && d[`${X}_${K}`].l) {
23753
- const W = d[`${_}_${C}`].l.style, ce = d[`${X}_${K}`].l.color;
23754
- h.isNil(Q.style[W]) ? Q.style[W] = 1 : Q.style[W] += 1, h.isNil(Q.color[ce]) ? Q.color[ce] = 1 : Q.color[ce] += 1;
23752
+ if (J === C && d[`${K}_${J}`] && d[`${K}_${J}`].l) {
23753
+ const V = d[`${_}_${C}`].l.style, ce = d[`${K}_${J}`].l.color;
23754
+ h.isNil(j.style[V]) ? j.style[V] = 1 : j.style[V] += 1, h.isNil(j.color[ce]) ? j.color[ce] = 1 : j.color[ce] += 1;
23755
23755
  }
23756
- if (K === C + k.mc.cs - 1 && d[`${X}_${K}`] && d[`${X}_${K}`].r) {
23757
- const W = d[`${X}_${K}`].r.style, ce = d[`${X}_${K}`].r.color;
23758
- h.isNil(B.style[W]) ? B.style[W] = 1 : B.style[W] += 1, h.isNil(B.color[ce]) ? B.color[ce] = 1 : B.color[ce] += 1;
23756
+ if (J === C + k.mc.cs - 1 && d[`${K}_${J}`] && d[`${K}_${J}`].r) {
23757
+ const V = d[`${K}_${J}`].r.style, ce = d[`${K}_${J}`].r.color;
23758
+ h.isNil(B.style[V]) ? B.style[V] = 1 : B.style[V] += 1, h.isNil(B.color[ce]) ? B.color[ce] = 1 : B.color[ce] += 1;
23759
23759
  }
23760
23760
  }
23761
- const be = k.mc.rs, fe = k.mc.cs;
23762
- if (JSON.stringify(Q).length > 23) {
23763
- let X = null, K = null;
23764
- Object.keys(Q.color).forEach((W) => {
23765
- Q.color[W] >= be / 2 && (X = W);
23766
- }), Object.keys(Q.style).forEach((W) => {
23767
- Q.style[W] >= be / 2 && (K = W);
23768
- }), !h.isNil(X) && !h.isNil(K) && (O += `border-left:${At(
23769
- K,
23770
- X
23761
+ const ge = k.mc.rs, ue = k.mc.cs;
23762
+ if (JSON.stringify(j).length > 23) {
23763
+ let K = null, J = null;
23764
+ Object.keys(j.color).forEach((V) => {
23765
+ j.color[V] >= ge / 2 && (K = V);
23766
+ }), Object.keys(j.style).forEach((V) => {
23767
+ j.style[V] >= ge / 2 && (J = V);
23768
+ }), !h.isNil(K) && !h.isNil(J) && (O += `border-left:${At(
23769
+ J,
23770
+ K
23771
23771
  )}`);
23772
23772
  }
23773
23773
  if (JSON.stringify(B).length > 23) {
23774
- let X = null, K = null;
23775
- Object.keys(B.color).forEach((W) => {
23776
- B.color[W] >= be / 2 && (X = W);
23777
- }), Object.keys(B.style).forEach((W) => {
23778
- B.style[W] >= be / 2 && (K = W);
23779
- }), !h.isNil(X) && !h.isNil(K) && (O += `border-right:${At(
23780
- K,
23781
- X
23774
+ let K = null, J = null;
23775
+ Object.keys(B.color).forEach((V) => {
23776
+ B.color[V] >= ge / 2 && (K = V);
23777
+ }), Object.keys(B.style).forEach((V) => {
23778
+ B.style[V] >= ge / 2 && (J = V);
23779
+ }), !h.isNil(K) && !h.isNil(J) && (O += `border-right:${At(
23780
+ J,
23781
+ K
23782
23782
  )}`);
23783
23783
  }
23784
23784
  if (JSON.stringify(re).length > 23) {
23785
- let X = null, K = null;
23786
- Object.keys(re.color).forEach((W) => {
23787
- re.color[W] >= fe / 2 && (X = W);
23788
- }), Object.keys(re.style).forEach((W) => {
23789
- re.style[W] >= fe / 2 && (K = W);
23790
- }), !h.isNil(X) && !h.isNil(K) && (O += `border-top:${At(
23791
- K,
23792
- X
23785
+ let K = null, J = null;
23786
+ Object.keys(re.color).forEach((V) => {
23787
+ re.color[V] >= ue / 2 && (K = V);
23788
+ }), Object.keys(re.style).forEach((V) => {
23789
+ re.style[V] >= ue / 2 && (J = V);
23790
+ }), !h.isNil(K) && !h.isNil(J) && (O += `border-top:${At(
23791
+ J,
23792
+ K
23793
23793
  )}`);
23794
23794
  }
23795
23795
  if (JSON.stringify(oe).length > 23) {
23796
- let X = null, K = null;
23797
- Object.keys(oe.color).forEach((W) => {
23798
- oe.color[W] >= fe / 2 && (X = W);
23799
- }), Object.keys(oe.style).forEach((W) => {
23800
- oe.style[W] >= fe / 2 && (K = W);
23801
- }), !h.isNil(X) && !h.isNil(K) && (O += `border-bottom:${At(
23802
- K,
23803
- X
23796
+ let K = null, J = null;
23797
+ Object.keys(oe.color).forEach((V) => {
23798
+ oe.color[V] >= ue / 2 && (K = V);
23799
+ }), Object.keys(oe.style).forEach((V) => {
23800
+ oe.style[V] >= ue / 2 && (J = V);
23801
+ }), !h.isNil(K) && !h.isNil(J) && (O += `border-bottom:${At(
23802
+ J,
23803
+ K
23804
23804
  )}`);
23805
23805
  }
23806
23806
  }
@@ -23808,53 +23808,53 @@ function kf(e, t, r, a) {
23808
23808
  continue;
23809
23809
  else if (d && d[`${_}_${C}`]) {
23810
23810
  if (d[`${_}_${C}`].l) {
23811
- const Q = d[`${_}_${C}`].l.style, B = d[`${_}_${C}`].l.color;
23812
- O += `border-left:${At(Q, B)}`;
23811
+ const j = d[`${_}_${C}`].l.style, B = d[`${_}_${C}`].l.color;
23812
+ O += `border-left:${At(j, B)}`;
23813
23813
  }
23814
23814
  if (d[`${_}_${C}`].r) {
23815
- const Q = d[`${_}_${C}`].r.style, B = d[`${_}_${C}`].r.color;
23816
- O += `border-right:${At(Q, B)}`;
23815
+ const j = d[`${_}_${C}`].r.style, B = d[`${_}_${C}`].r.color;
23816
+ O += `border-right:${At(j, B)}`;
23817
23817
  }
23818
23818
  if (d[`${_}_${C}`].b) {
23819
- const Q = d[`${_}_${C}`].b.style, B = d[`${_}_${C}`].b.color;
23820
- O += `border-bottom:${At(Q, B)}`;
23819
+ const j = d[`${_}_${C}`].b.style, B = d[`${_}_${C}`].b.color;
23820
+ O += `border-bottom:${At(j, B)}`;
23821
23821
  }
23822
23822
  if (d[`${_}_${C}`].t) {
23823
- const Q = d[`${_}_${C}`].t.style, B = d[`${_}_${C}`].t.color;
23824
- O += `border-top:${At(Q, B)}`;
23823
+ const j = d[`${_}_${C}`].t.style, B = d[`${_}_${C}`].t.color;
23824
+ O += `border-top:${At(j, B)}`;
23825
23825
  }
23826
23826
  }
23827
- const V = n ? encodeURIComponent(
23827
+ const W = n ? encodeURIComponent(
23828
23828
  JSON.stringify({ ...k, _srcRow: _, _srcCol: C })
23829
23829
  ) : "";
23830
- I = Zo(I, { style: O, span: U, cellData: V }), h.isNil(J) && (J = Ke(_, C, g)), h.isNil(J) && (J = ""), o && Vt(k) ? I += Bl(_, C, g, {
23830
+ I = Zo(I, { style: O, span: z, cellData: W }), h.isNil(Q) && (Q = Ke(_, C, g)), h.isNil(Q) && (Q = ""), o && Vt(k) ? I += Bl(_, C, g, {
23831
23831
  useSemanticMarkup: !0,
23832
23832
  inheritedStyle: se,
23833
23833
  isRichTextCopy: !0
23834
- }) : I += Yn(J);
23834
+ }) : I += Yn(Q);
23835
23835
  } else {
23836
23836
  let O = "";
23837
23837
  if (d && d[`${_}_${C}`]) {
23838
23838
  if (d[`${_}_${C}`].l) {
23839
- const Z = d[`${_}_${C}`].l.style, J = d[`${_}_${C}`].l.color;
23840
- O += `border-left:${At(Z, J)}`;
23839
+ const Y = d[`${_}_${C}`].l.style, Q = d[`${_}_${C}`].l.color;
23840
+ O += `border-left:${At(Y, Q)}`;
23841
23841
  }
23842
23842
  if (d[`${_}_${C}`].r) {
23843
- const Z = d[`${_}_${C}`].r.style, J = d[`${_}_${C}`].r.color;
23844
- O += `border-right:${At(Z, J)}`;
23843
+ const Y = d[`${_}_${C}`].r.style, Q = d[`${_}_${C}`].r.color;
23844
+ O += `border-right:${At(Y, Q)}`;
23845
23845
  }
23846
23846
  if (d[`${_}_${C}`].b) {
23847
- const Z = d[`${_}_${C}`].b.style, J = d[`${_}_${C}`].b.color;
23848
- O += `border-bottom:${At(Z, J)}`;
23847
+ const Y = d[`${_}_${C}`].b.style, Q = d[`${_}_${C}`].b.color;
23848
+ O += `border-bottom:${At(Y, Q)}`;
23849
23849
  }
23850
23850
  if (d[`${_}_${C}`].t) {
23851
- const Z = d[`${_}_${C}`].t.style, J = d[`${_}_${C}`].t.color;
23852
- O += `border-top:${At(Z, J)}`;
23851
+ const Y = d[`${_}_${C}`].t.style, Q = d[`${_}_${C}`].t.color;
23852
+ O += `border-top:${At(Y, Q)}`;
23853
23853
  }
23854
23854
  }
23855
23855
  I += "", _ === f[0] && (h.isNil(u.config) || h.isNil(u.config.columnlen) || h.isNil(u.config.columnlen[C.toString()]) ? y += '<colgroup width="72px"></colgroup>' : y += `<colgroup width="${u.config.columnlen[C.toString()]}px"></colgroup>`), C === m[0] && (h.isNil(u.config) || h.isNil(u.config.rowlen) || h.isNil(u.config.rowlen[_.toString()]) ? O += "height:19px;" : O += `height:${u.config.rowlen[_.toString()]}px;`);
23856
- const U = ma(e, g, _, C, l);
23857
- O += h.map(U, (Z, J) => `${h.kebabCase(J)}:${h.isNumber(Z) ? `${Z}px` : Z};`).join(""), I = Zo(I, { style: O, span: "", cellData: "" }), I += "";
23856
+ const z = ma(e, g, _, C, l);
23857
+ O += h.map(z, (Y, Q) => `${h.kebabCase(Q)}:${h.isNumber(Y) ? `${Y}px` : Y};`).join(""), I = Zo(I, { style: O, span: "", cellData: "" }), I += "";
23858
23858
  }
23859
23859
  I += "</td>", p += I;
23860
23860
  }
@@ -23876,14 +23876,14 @@ function wm(e) {
23876
23876
  for (let O = C; O <= I; O += 1) {
23877
23877
  if (!h.isNil(e.config.colhidden) && !h.isNil(e.config.colhidden[O]))
23878
23878
  continue;
23879
- const U = (y = t == null ? void 0 : t[k]) == null ? void 0 : y[O];
23880
- if (U) {
23881
- Vt(U) && (o = !0), h.isNil(U.f) || (i = !0), h.isNil(U.hl) || (l = !0);
23882
- const Z = U.m ?? U.v;
23883
- h.isString(Z) && Z.includes(`
23879
+ const z = (y = t == null ? void 0 : t[k]) == null ? void 0 : y[O];
23880
+ if (z) {
23881
+ Vt(z) && (o = !0), h.isNil(z.f) || (i = !0), h.isNil(z.hl) || (l = !0);
23882
+ const Y = z.m ?? z.v;
23883
+ h.isString(Y) && Y.includes(`
23884
23884
  `) && (c = !0);
23885
23885
  }
23886
- h.isNil((b = U == null ? void 0 : U.mc) == null ? void 0 : b.rs) || (n = !0);
23886
+ h.isNil((b = z == null ? void 0 : z.mc) == null ? void 0 : b.rs) || (n = !0);
23887
23887
  }
23888
23888
  }
23889
23889
  e.luckysheet_selection_range.push({
@@ -23909,7 +23909,7 @@ function wm(e) {
23909
23909
  fontStyle: "normal",
23910
23910
  textAlign: "left",
23911
23911
  backgroundColor: "transparent"
23912
- }, C = (w = t == null ? void 0 : t[v]) == null ? void 0 : w[T], I = C != null && Vt(C), k = ma(e, t, v, T), O = { ...E, ...k }, U = /* @__PURE__ */ new Set([
23912
+ }, C = (w = t == null ? void 0 : t[v]) == null ? void 0 : w[T], I = C != null && Vt(C), k = ma(e, t, v, T), O = { ...E, ...k }, z = /* @__PURE__ */ new Set([
23913
23913
  "color",
23914
23914
  "fontFamily",
23915
23915
  "fontSize",
@@ -23917,9 +23917,9 @@ function wm(e) {
23917
23917
  "fontStyle",
23918
23918
  "textDecoration",
23919
23919
  "textDecorationSkipInk"
23920
- ]), Z = h.toPairs(O).filter(
23921
- ([V, Q]) => !h.isNil(Q) && Q !== "" && Q !== "undefined" && !(I && U.has(V))
23922
- ).map(([V, Q]) => `${h.kebabCase(V)}:${h.isNumber(Q) ? `${Q}px` : Q};`).join(" "), J = I ? Bl(v, T, t, {
23920
+ ]), Y = h.toPairs(O).filter(
23921
+ ([W, j]) => !h.isNil(j) && j !== "" && j !== "undefined" && !(I && z.has(W))
23922
+ ).map(([W, j]) => `${h.kebabCase(W)}:${h.isNumber(j) ? `${j}px` : j};`).join(" "), Q = I ? Bl(v, T, t, {
23923
23923
  useSemanticMarkup: !0,
23924
23924
  inheritedStyle: O,
23925
23925
  isRichTextCopy: !0
@@ -23930,7 +23930,7 @@ function wm(e) {
23930
23930
  ).replace(/&lt;br\s*\/?&gt;/g, "<br>"), se = u ? encodeURIComponent(
23931
23931
  JSON.stringify({ ...C ?? {}, _srcRow: v, _srcCol: T })
23932
23932
  ) : "";
23933
- f = `<table data-type="fortune-copy-action-table"><tr><td style="white-space: pre-line; ${Z}" data-fortune-cell="${se}">${J}</td></tr></table>`;
23933
+ f = `<table data-type="fortune-copy-action-table"><tr><td style="white-space: pre-line; ${Y}" data-fortune-cell="${se}">${Q}</td></tr></table>`;
23934
23934
  } else
23935
23935
  f = kf(
23936
23936
  e,
@@ -23969,22 +23969,22 @@ function vm(e) {
23969
23969
  const w = r[b].row[0], v = r[b].row[1], T = r[b].column[0], _ = r[b].column[1];
23970
23970
  for (let E = w; E <= v; E += 1)
23971
23971
  for (let C = T; C <= _; C += 1) {
23972
- const I = Fe(e, e.currentSheetId), k = f[E][C] != null ? h.cloneDeep(f[E][C]) : null, O = k != null && (k.tb === "2" && !h.isNil(k.v) && k.v !== "" || Vt(k)), { dataVerification: U } = e.luckysheetfile[I];
23973
- if (U && (U != null && U[`${E}_${C}`]) && (U == null || delete U[`${E}_${C}`]), h.isPlainObject(f[E][C])) {
23974
- const J = f[E][C];
23975
- delete J.m, delete J.v, delete J.fc, delete J.un, J.f != null && (delete J.f, ca(e, E, C, e.currentSheetId), delete J.spl), J.ct != null && (J.ct.t === "inlineStr" || (a = J.ct.fa) != null && a.includes("BTC") || (n = J.ct.fa) != null && n.includes("ETH") || (o = J.ct.fa) != null && o.includes("SOL")) && (delete J.ct, J == null || delete J.baseValue, J == null || delete J.baseCurrency), Kt(e, E, C);
23972
+ const I = Fe(e, e.currentSheetId), k = f[E][C] != null ? h.cloneDeep(f[E][C]) : null, O = k != null && (k.tb === "2" && !h.isNil(k.v) && k.v !== "" || Vt(k)), { dataVerification: z } = e.luckysheetfile[I];
23973
+ if (z && (z != null && z[`${E}_${C}`]) && (z == null || delete z[`${E}_${C}`]), h.isPlainObject(f[E][C])) {
23974
+ const Q = f[E][C];
23975
+ delete Q.m, delete Q.v, delete Q.fc, delete Q.un, Q.f != null && (delete Q.f, ca(e, E, C, e.currentSheetId), delete Q.spl), Q.ct != null && (Q.ct.t === "inlineStr" || (a = Q.ct.fa) != null && a.includes("BTC") || (n = Q.ct.fa) != null && n.includes("ETH") || (o = Q.ct.fa) != null && o.includes("SOL")) && (delete Q.ct, Q == null || delete Q.baseValue, Q == null || delete Q.baseCurrency), Kt(e, E, C);
23976
23976
  } else
23977
23977
  f[E][C] = null;
23978
23978
  g && g[`${E}_${C}`] && delete g[`${E}_${C}`];
23979
- const Z = f[E][C] ?? null;
23980
- if (!h.isEqual(k, Z)) {
23981
- const J = `${E}_${C}`;
23982
- d.set(J, {
23979
+ const Y = f[E][C] ?? null;
23980
+ if (!h.isEqual(k, Y)) {
23981
+ const Q = `${E}_${C}`;
23982
+ d.set(Q, {
23983
23983
  sheetId: e.currentSheetId,
23984
23984
  path: ["celldata"],
23985
- value: { r: E, c: C, v: Z },
23986
- key: J,
23987
- type: Z == null ? "delete" : "update"
23985
+ value: { r: E, c: C, v: Y },
23986
+ key: Q,
23987
+ type: Y == null ? "delete" : "update"
23988
23988
  });
23989
23989
  }
23990
23990
  O && m.add(E);
@@ -24087,9 +24087,9 @@ function Tm(e) {
24087
24087
  for (let k = 0; k < w.length; k += 1) {
24088
24088
  const O = w[k].cellrange;
24089
24089
  if (O)
24090
- for (let U = 0; U < O.length; U += 1) {
24091
- const Z = O[U];
24092
- if (T >= Z.row[0] && T <= Z.row[1] && _ >= Z.column[0] && _ <= Z.column[1]) {
24090
+ for (let z = 0; z < O.length; z += 1) {
24091
+ const Y = O[z];
24092
+ if (T >= Y.row[0] && T <= Y.row[1] && _ >= Y.column[0] && _ <= Y.column[1]) {
24093
24093
  O.push({ row: [u, u], column: [m, m] });
24094
24094
  break;
24095
24095
  }
@@ -24128,9 +24128,9 @@ function Tm(e) {
24128
24128
  for (let k = 0; k < w.length; k += 1) {
24129
24129
  const O = w[k].cellrange;
24130
24130
  if (O)
24131
- for (let U = 0; U < O.length; U += 1) {
24132
- const Z = O[U];
24133
- if (T >= Z.row[0] && T <= Z.row[1] && m >= Z.column[0] && m <= Z.column[1]) {
24131
+ for (let z = 0; z < O.length; z += 1) {
24132
+ const Y = O[z];
24133
+ if (T >= Y.row[0] && T <= Y.row[1] && m >= Y.column[0] && m <= Y.column[1]) {
24134
24134
  O.push({ row: [T, T], column: [E, E] });
24135
24135
  break;
24136
24136
  }
@@ -24194,9 +24194,9 @@ function $m(e) {
24194
24194
  for (let k = 0; k < w.length; k += 1) {
24195
24195
  const O = w[k].cellrange;
24196
24196
  if (O)
24197
- for (let U = 0; U < O.length; U += 1) {
24198
- const Z = O[U];
24199
- if (T >= Z.row[0] && T <= Z.row[1] && _ >= Z.column[0] && _ <= Z.column[1]) {
24197
+ for (let z = 0; z < O.length; z += 1) {
24198
+ const Y = O[z];
24199
+ if (T >= Y.row[0] && T <= Y.row[1] && _ >= Y.column[0] && _ <= Y.column[1]) {
24200
24200
  O.push({ row: [u, u], column: [m, m] });
24201
24201
  break;
24202
24202
  }
@@ -24235,9 +24235,9 @@ function $m(e) {
24235
24235
  for (let k = 0; k < w.length; k += 1) {
24236
24236
  const O = w[k].cellrange;
24237
24237
  if (O)
24238
- for (let U = 0; U < O.length; U += 1) {
24239
- const Z = O[U];
24240
- if (u >= Z.row[0] && u <= Z.row[1] && T >= Z.column[0] && T <= Z.column[1]) {
24238
+ for (let z = 0; z < O.length; z += 1) {
24239
+ const Y = O[z];
24240
+ if (u >= Y.row[0] && u <= Y.row[1] && T >= Y.column[0] && T <= Y.column[1]) {
24241
24241
  O.push({ row: [E, E], column: [T, T] });
24242
24242
  break;
24243
24243
  }
@@ -24459,15 +24459,15 @@ function Mm(e) {
24459
24459
  const t = e.luckysheet_select_save;
24460
24460
  let r = 0, a = 0, n = 0, o = -1 / 0, i = 1 / 0;
24461
24461
  for (let O = 0; O < t.length; O += 1) {
24462
- const U = $f(e, t[O]);
24463
- for (let Z = 0; Z < U.length; Z += 1)
24464
- for (let J = 0; J < U[0].length && !(Z >= U.length || J >= U[0].length); J += 1) {
24465
- const se = (s = (c = U[Z][J]) == null ? void 0 : c.ct) == null ? void 0 : s.t;
24466
- let V = (u = U[Z][J]) == null ? void 0 : u.m;
24467
- if ((d = (m = (f = U[Z][J]) == null ? void 0 : f.ct) == null ? void 0 : m.fa) != null && d.includes("#,##0") && (V = (p = U[Z][J]) == null ? void 0 : p.v), ((y = (g = U[Z][J]) == null ? void 0 : g.ct) == null ? void 0 : y.t) === "inlineStr" && (V == null || V === "") && ((w = (b = U[Z][J]) == null ? void 0 : b.ct) != null && w.s) && !((_ = (T = (v = U[Z][J]) == null ? void 0 : v.ct) == null ? void 0 : T.s[0]) != null && _.v.includes("\r")) && (V = (I = (C = (E = U[Z][J]) == null ? void 0 : E.ct) == null ? void 0 : C.s[0]) == null ? void 0 : I.v), se === "n" || se === "g" && parseFloat(V).toString() !== "NaN" || se === "inlineStr" && parseFloat(V).toString() !== "NaN") {
24468
- const Q = ((k = String(V)) == null ? void 0 : k.replace(/,/g, "")) || "0", B = parseFloat(Q);
24462
+ const z = $f(e, t[O]);
24463
+ for (let Y = 0; Y < z.length; Y += 1)
24464
+ for (let Q = 0; Q < z[0].length && !(Y >= z.length || Q >= z[0].length); Q += 1) {
24465
+ const se = (s = (c = z[Y][Q]) == null ? void 0 : c.ct) == null ? void 0 : s.t;
24466
+ let W = (u = z[Y][Q]) == null ? void 0 : u.m;
24467
+ if ((d = (m = (f = z[Y][Q]) == null ? void 0 : f.ct) == null ? void 0 : m.fa) != null && d.includes("#,##0") && (W = (p = z[Y][Q]) == null ? void 0 : p.v), ((y = (g = z[Y][Q]) == null ? void 0 : g.ct) == null ? void 0 : y.t) === "inlineStr" && (W == null || W === "") && ((w = (b = z[Y][Q]) == null ? void 0 : b.ct) != null && w.s) && !((_ = (T = (v = z[Y][Q]) == null ? void 0 : v.ct) == null ? void 0 : T.s[0]) != null && _.v.includes("\r")) && (W = (I = (C = (E = z[Y][Q]) == null ? void 0 : E.ct) == null ? void 0 : C.s[0]) == null ? void 0 : I.v), se === "n" || se === "g" && parseFloat(W).toString() !== "NaN" || se === "inlineStr" && parseFloat(W).toString() !== "NaN") {
24468
+ const j = ((k = String(W)) == null ? void 0 : k.replace(/,/g, "")) || "0", B = parseFloat(j);
24469
24469
  a += 1, n += B, o = Math.max(B, o), i = Math.min(B, i), r += 1;
24470
- } else V != null && (a += 1);
24470
+ } else W != null && (a += 1);
24471
24471
  }
24472
24472
  }
24473
24473
  const l = String(n / r);
@@ -24858,7 +24858,7 @@ function Bm(e, t, r) {
24858
24858
  );
24859
24859
  }
24860
24860
  function Mf(e, t, r, a, n, o) {
24861
- var f, m, d, p, g, y, b, w, v, T, _, E, C, I, k, O, U, Z, J, se, V, Q, B, re, oe, be, fe, X, K, W, ce, ye, M, $, A, F, N, G, S, H, L, pe, de, te, ve, we, Te, Se, me, ue, He, Ue, Me, ge, D, q, Y, P, z, he, _e, Ne, j, le, qe, xe, Ee, ke, We, Be, Ye, Pt, Yt, Ot, Pa, Ha, Ua, za, Wa, Va, Ga, Ya, ja, Xa, Za, Ka, Qa, Ja, ei, ti, ni, ri, ai, ii, oi, li, si, ci, ui, fi, di, mi, hi, pi, gi, yi, bi, wi, vi, _i, Ti, $i, Ci, Ni, Ai, xi, Si, Ei, ki, Ri, Mi, qi, Ii, Di, Oi, Li, Fi, Bi, Pi, Hi, Ui, zi, Wi, Vi, Gi, Yi, ji, Xi, Zi, Ki, Qi, Ji, eo, to, no, ro, ao, io, oo, lo, so, co, uo, fo, mo, ho, po, go, yo, bo, wo;
24861
+ var f, m, d, p, g, y, b, w, v, T, _, E, C, I, k, O, z, Y, Q, se, W, j, B, re, oe, ge, ue, K, J, V, ce, be, M, $, A, F, N, G, S, H, L, pe, de, te, ve, we, Te, Se, me, fe, He, Ue, Me, ye, D, q, X, P, U, he, _e, Ne, Z, le, qe, xe, Ee, ke, We, Be, Ye, Pt, Yt, Ot, Pa, Ha, Ua, za, Wa, Va, Ga, Ya, ja, Xa, Za, Ka, Qa, Ja, ei, ti, ni, ri, ai, ii, oi, li, si, ci, ui, fi, di, mi, hi, pi, gi, yi, bi, wi, vi, _i, Ti, $i, Ci, Ni, Ai, xi, Si, Ei, ki, Ri, Mi, qi, Ii, Di, Oi, Li, Fi, Bi, Pi, Hi, Ui, zi, Wi, Vi, Gi, Yi, ji, Xi, Zi, Ki, Qi, Ji, eo, to, no, ro, ao, io, oo, lo, so, co, uo, fo, mo, ho, po, go, yo, bo, wo;
24862
24862
  const i = {}, l = Ie(e);
24863
24863
  let c, s;
24864
24864
  if (!o)
@@ -24981,13 +24981,13 @@ function Mf(e, t, r, a, n, o) {
24981
24981
  };
24982
24982
  const R = Ae + 1;
24983
24983
  if (R < s.length && i[`${R}_${x}`])
24984
- if (h.isNil((U = (O = s[R]) == null ? void 0 : O[x]) == null ? void 0 : U.mc))
24984
+ if (h.isNil((z = (O = s[R]) == null ? void 0 : O[x]) == null ? void 0 : z.mc))
24985
24985
  i[`${R}_${x}`].t = {
24986
24986
  color: ae,
24987
24987
  style: ie
24988
24988
  };
24989
24989
  else {
24990
- const ee = s[R][x], Re = (se = c.merge) == null ? void 0 : se[`${(Z = ee == null ? void 0 : ee.mc) == null ? void 0 : Z.r}_${(J = ee == null ? void 0 : ee.mc) == null ? void 0 : J.c}`];
24990
+ const ee = s[R][x], Re = (se = c.merge) == null ? void 0 : se[`${(Y = ee == null ? void 0 : ee.mc) == null ? void 0 : Y.r}_${(Q = ee == null ? void 0 : ee.mc) == null ? void 0 : Q.c}`];
24991
24991
  (Re == null ? void 0 : Re.r) === R && (i[`${R}_${x}`].t = {
24992
24992
  color: ae,
24993
24993
  style: ie
@@ -25003,7 +25003,7 @@ function Mf(e, t, r, a, n, o) {
25003
25003
  for (let x = $e; x <= Ae; x += 1)
25004
25004
  if (!(!h.isNil(c.rowhidden) && !h.isNil(c.rowhidden[x])))
25005
25005
  for (let R = Pe; R <= ze; R += 1) {
25006
- if (h.isNil((Q = (V = s[x]) == null ? void 0 : V[R]) == null ? void 0 : Q.mc))
25006
+ if (h.isNil((j = (W = s[x]) == null ? void 0 : W[R]) == null ? void 0 : j.mc))
25007
25007
  i[`${x}_${R}`] === void 0 && (i[`${x}_${R}`] = {}), i[`${x}_${R}`].l = {
25008
25008
  color: ae,
25009
25009
  style: ie
@@ -25036,13 +25036,13 @@ function Mf(e, t, r, a, n, o) {
25036
25036
  if (x === $e) {
25037
25037
  const ne = $e - 1;
25038
25038
  if (ne >= 0 && i[`${ne}_${R}`])
25039
- if (h.isNil((fe = (be = s[ne]) == null ? void 0 : be[R]) == null ? void 0 : fe.mc))
25039
+ if (h.isNil((ue = (ge = s[ne]) == null ? void 0 : ge[R]) == null ? void 0 : ue.mc))
25040
25040
  i[`${ne}_${R}`].b = {
25041
25041
  color: ae,
25042
25042
  style: ie
25043
25043
  };
25044
25044
  else {
25045
- const ee = s[ne][R], Re = (W = c.merge) == null ? void 0 : W[`${(X = ee == null ? void 0 : ee.mc) == null ? void 0 : X.r}_${(K = ee == null ? void 0 : ee.mc) == null ? void 0 : K.c}`];
25045
+ const ee = s[ne][R], Re = (V = c.merge) == null ? void 0 : V[`${(K = ee == null ? void 0 : ee.mc) == null ? void 0 : K.r}_${(J = ee == null ? void 0 : ee.mc) == null ? void 0 : J.c}`];
25046
25046
  Re && Re.r + Re.rs - 1 === ne && (i[`${ne}_${R}`].b = {
25047
25047
  color: ae,
25048
25048
  style: ie
@@ -25052,7 +25052,7 @@ function Mf(e, t, r, a, n, o) {
25052
25052
  if (x === Ae) {
25053
25053
  const ne = Ae + 1;
25054
25054
  if (ne < s.length && i[`${ne}_${R}`])
25055
- if (h.isNil((ye = (ce = s[ne]) == null ? void 0 : ce[R]) == null ? void 0 : ye.mc))
25055
+ if (h.isNil((be = (ce = s[ne]) == null ? void 0 : ce[R]) == null ? void 0 : be.mc))
25056
25056
  i[`${ne}_${R}`].t = {
25057
25057
  color: ae,
25058
25058
  style: ie
@@ -25116,7 +25116,7 @@ function Mf(e, t, r, a, n, o) {
25116
25116
  style: ie
25117
25117
  };
25118
25118
  else {
25119
- const ee = s[ne][R], Re = (ue = c.merge) == null ? void 0 : ue[`${(Se = ee == null ? void 0 : ee.mc) == null ? void 0 : Se.r}_${(me = ee == null ? void 0 : ee.mc) == null ? void 0 : me.c}`];
25119
+ const ee = s[ne][R], Re = (fe = c.merge) == null ? void 0 : fe[`${(Se = ee == null ? void 0 : ee.mc) == null ? void 0 : Se.r}_${(me = ee == null ? void 0 : ee.mc) == null ? void 0 : me.c}`];
25120
25120
  Re && Re.r + Re.rs - 1 === ne && (i[`${ne}_${R}`].b = {
25121
25121
  color: ae,
25122
25122
  style: ie
@@ -25136,7 +25136,7 @@ function Mf(e, t, r, a, n, o) {
25136
25136
  style: ie
25137
25137
  };
25138
25138
  else {
25139
- const ee = s[ne][R], Re = (D = c.merge) == null ? void 0 : D[`${(Me = ee == null ? void 0 : ee.mc) == null ? void 0 : Me.r}_${(ge = ee == null ? void 0 : ee.mc) == null ? void 0 : ge.c}`];
25139
+ const ee = s[ne][R], Re = (D = c.merge) == null ? void 0 : D[`${(Me = ee == null ? void 0 : ee.mc) == null ? void 0 : Me.r}_${(ye = ee == null ? void 0 : ee.mc) == null ? void 0 : ye.c}`];
25140
25140
  (Re == null ? void 0 : Re.r) === ne && (i[`${ne}_${R}`].t = {
25141
25141
  color: ae,
25142
25142
  style: ie
@@ -25150,13 +25150,13 @@ function Mf(e, t, r, a, n, o) {
25150
25150
  };
25151
25151
  const ne = Pe - 1;
25152
25152
  if (ne >= 0 && i[`${x}_${ne}`])
25153
- if (h.isNil((Y = (q = s[x]) == null ? void 0 : q[ne]) == null ? void 0 : Y.mc))
25153
+ if (h.isNil((X = (q = s[x]) == null ? void 0 : q[ne]) == null ? void 0 : X.mc))
25154
25154
  i[`${x}_${ne}`].r = {
25155
25155
  color: ae,
25156
25156
  style: ie
25157
25157
  };
25158
25158
  else {
25159
- const ee = s[x][ne], Re = (he = c.merge) == null ? void 0 : he[`${(P = ee == null ? void 0 : ee.mc) == null ? void 0 : P.r}_${(z = ee == null ? void 0 : ee.mc) == null ? void 0 : z.c}`];
25159
+ const ee = s[x][ne], Re = (he = c.merge) == null ? void 0 : he[`${(P = ee == null ? void 0 : ee.mc) == null ? void 0 : P.r}_${(U = ee == null ? void 0 : ee.mc) == null ? void 0 : U.c}`];
25160
25160
  Re && Re.c + Re.cs - 1 === ne && (i[`${x}_${ne}`].r = {
25161
25161
  color: ae,
25162
25162
  style: ie
@@ -25176,7 +25176,7 @@ function Mf(e, t, r, a, n, o) {
25176
25176
  style: ie
25177
25177
  };
25178
25178
  else {
25179
- const ee = s[x][ne], Re = (qe = c.merge) == null ? void 0 : qe[`${(j = ee == null ? void 0 : ee.mc) == null ? void 0 : j.r}_${(le = ee == null ? void 0 : ee.mc) == null ? void 0 : le.c}`];
25179
+ const ee = s[x][ne], Re = (qe = c.merge) == null ? void 0 : qe[`${(Z = ee == null ? void 0 : ee.mc) == null ? void 0 : Z.r}_${(le = ee == null ? void 0 : ee.mc) == null ? void 0 : le.c}`];
25180
25180
  (Re == null ? void 0 : Re.c) === ne && (i[`${x}_${ne}`].l = {
25181
25181
  color: ae,
25182
25182
  style: ie
@@ -25771,7 +25771,7 @@ const zl = (e) => {
25771
25771
  }
25772
25772
  };
25773
25773
  function Df(e, t, r = !0) {
25774
- var X, K, W, ce, ye, M, $, A, F, N, G, S, H, L, pe, de, te, ve, we, Te, Se, me, ue, He, Ue, Me, ge;
25774
+ var K, J, V, ce, be, M, $, A, F, N, G, S, H, L, pe, de, te, ve, we, Te, Se, me, fe, He, Ue, Me, ye;
25775
25775
  let { count: a, id: n } = t;
25776
25776
  const { type: o, index: i, direction: l, templateSourceRows: c, templateSourceColumns: s } = t;
25777
25777
  n = n || e.currentSheetId;
@@ -25792,12 +25792,12 @@ function Df(e, t, r = !0) {
25792
25792
  if (r) {
25793
25793
  if (o === "row") {
25794
25794
  if (g) {
25795
- if ((X = d.rowReadOnly) != null && X[b])
25795
+ if ((K = d.rowReadOnly) != null && K[b])
25796
25796
  throw new Error("readOnly");
25797
- } else if ((K = d.rowReadOnly) != null && K[i])
25797
+ } else if ((J = d.rowReadOnly) != null && J[i])
25798
25798
  throw new Error("readOnly");
25799
25799
  } else if (y) {
25800
- if ((W = d.colReadOnly) != null && W[w])
25800
+ if ((V = d.colReadOnly) != null && V[w])
25801
25801
  throw new Error("readOnly");
25802
25802
  } else if ((ce = d.colReadOnly) != null && ce[i])
25803
25803
  throw new Error("readOnly");
@@ -25808,85 +25808,85 @@ function Df(e, t, r = !0) {
25808
25808
  throw new Error("maxExceeded");
25809
25809
  const v = g && f.dataVerification != null ? [b].map((D) => {
25810
25810
  const q = {};
25811
- return h.forEach(f.dataVerification, (Y, P) => {
25812
- const z = Number(P.split("_")[0]), he = Number(P.split("_")[1]);
25813
- z === D && (q[he] = h.cloneDeep(Y));
25811
+ return h.forEach(f.dataVerification, (X, P) => {
25812
+ const U = Number(P.split("_")[0]), he = Number(P.split("_")[1]);
25813
+ U === D && (q[he] = h.cloneDeep(X));
25814
25814
  }), q;
25815
25815
  }) : null, T = y && f.dataVerification != null ? [w].map((D) => {
25816
25816
  const q = {};
25817
- return h.forEach(f.dataVerification, (Y, P) => {
25818
- const z = Number(P.split("_")[0]);
25819
- Number(P.split("_")[1]) === D && (q[z] = h.cloneDeep(Y));
25817
+ return h.forEach(f.dataVerification, (X, P) => {
25818
+ const U = Number(P.split("_")[0]);
25819
+ Number(P.split("_")[1]) === D && (q[U] = h.cloneDeep(X));
25820
25820
  }), q;
25821
25821
  }) : null;
25822
25822
  d.merge == null && (d.merge = {});
25823
25823
  const _ = {};
25824
25824
  h.forEach(d.merge, (D) => {
25825
- const { r: q, c: Y, rs: P, cs: z } = D;
25826
- o === "row" ? i < q ? _[`${q + a}_${Y}`] = { r: q + a, c: Y, rs: P, cs: z } : i === q ? l === "lefttop" ? _[`${q + a}_${Y}`] = {
25825
+ const { r: q, c: X, rs: P, cs: U } = D;
25826
+ o === "row" ? i < q ? _[`${q + a}_${X}`] = { r: q + a, c: X, rs: P, cs: U } : i === q ? l === "lefttop" ? _[`${q + a}_${X}`] = {
25827
25827
  r: q + a,
25828
- c: Y,
25828
+ c: X,
25829
25829
  rs: P,
25830
- cs: z
25831
- } : _[`${q}_${Y}`] = { r: q, c: Y, rs: P + a, cs: z } : i < q + P - 1 ? _[`${q}_${Y}`] = { r: q, c: Y, rs: P + a, cs: z } : i === q + P - 1 ? l === "lefttop" ? _[`${q}_${Y}`] = { r: q, c: Y, rs: P + a, cs: z } : _[`${q}_${Y}`] = { r: q, c: Y, rs: P, cs: z } : _[`${q}_${Y}`] = { r: q, c: Y, rs: P, cs: z } : o === "column" && (i < Y ? _[`${q}_${Y + a}`] = {
25830
+ cs: U
25831
+ } : _[`${q}_${X}`] = { r: q, c: X, rs: P + a, cs: U } : i < q + P - 1 ? _[`${q}_${X}`] = { r: q, c: X, rs: P + a, cs: U } : i === q + P - 1 ? l === "lefttop" ? _[`${q}_${X}`] = { r: q, c: X, rs: P + a, cs: U } : _[`${q}_${X}`] = { r: q, c: X, rs: P, cs: U } : _[`${q}_${X}`] = { r: q, c: X, rs: P, cs: U } : o === "column" && (i < X ? _[`${q}_${X + a}`] = {
25832
25832
  r: q,
25833
- c: Y + a,
25833
+ c: X + a,
25834
25834
  rs: P,
25835
- cs: z
25836
- } : i === Y ? l === "lefttop" ? _[`${q}_${Y + a}`] = {
25835
+ cs: U
25836
+ } : i === X ? l === "lefttop" ? _[`${q}_${X + a}`] = {
25837
25837
  r: q,
25838
- c: Y + a,
25838
+ c: X + a,
25839
25839
  rs: P,
25840
- cs: z
25841
- } : _[`${q}_${Y}`] = { r: q, c: Y, rs: P, cs: z + a } : i < Y + z - 1 ? _[`${q}_${Y}`] = { r: q, c: Y, rs: P, cs: z + a } : i === Y + z - 1 ? l === "lefttop" ? _[`${q}_${Y}`] = { r: q, c: Y, rs: P, cs: z + a } : _[`${q}_${Y}`] = { r: q, c: Y, rs: P, cs: z } : _[`${q}_${Y}`] = { r: q, c: Y, rs: P, cs: z });
25840
+ cs: U
25841
+ } : _[`${q}_${X}`] = { r: q, c: X, rs: P, cs: U + a } : i < X + U - 1 ? _[`${q}_${X}`] = { r: q, c: X, rs: P, cs: U + a } : i === X + U - 1 ? l === "lefttop" ? _[`${q}_${X}`] = { r: q, c: X, rs: P, cs: U + a } : _[`${q}_${X}`] = { r: q, c: X, rs: P, cs: U } : _[`${q}_${X}`] = { r: q, c: X, rs: P, cs: U });
25842
25842
  }), d.merge = _;
25843
25843
  const E = [];
25844
25844
  for (let D = 0; D < e.luckysheetfile.length; D += 1) {
25845
25845
  if (h.isNil(e.luckysheetfile[D].calcChain) || e.luckysheetfile.length === 0)
25846
25846
  continue;
25847
- const { calcChain: q } = e.luckysheetfile[D], { data: Y } = e.luckysheetfile[D];
25847
+ const { calcChain: q } = e.luckysheetfile[D], { data: X } = e.luckysheetfile[D];
25848
25848
  for (let P = 0; P < q.length; P += 1) {
25849
- const z = h.cloneDeep(q[P]), he = z.r, _e = z.c, Ne = z.id, j = La(e, he, _e, Ne);
25849
+ const U = h.cloneDeep(q[P]), he = U.r, _e = U.c, Ne = U.id, Z = La(e, he, _e, Ne);
25850
25850
  if (o === "row" && D === u) {
25851
25851
  const le = `=${wt(
25852
- j,
25852
+ Z,
25853
25853
  "add",
25854
25854
  "row",
25855
25855
  l,
25856
25856
  i,
25857
25857
  a
25858
25858
  )}`;
25859
- ((M = (ye = m[he]) == null ? void 0 : ye[_e]) == null ? void 0 : M.f) === j && (m[he][_e].f = le), l === "lefttop" ? he >= i && (z.r += a) : l === "rightbottom" && he > i && (z.r += a), E.push(z);
25859
+ ((M = (be = m[he]) == null ? void 0 : be[_e]) == null ? void 0 : M.f) === Z && (m[he][_e].f = le), l === "lefttop" ? he >= i && (U.r += a) : l === "rightbottom" && he > i && (U.r += a), E.push(U);
25860
25860
  } else if (o === "row") {
25861
25861
  const le = `=${wt(
25862
- j,
25862
+ Z,
25863
25863
  "add",
25864
25864
  "row",
25865
25865
  l,
25866
25866
  i,
25867
25867
  a
25868
25868
  )}`;
25869
- ((A = ($ = Y[he]) == null ? void 0 : $[_e]) == null ? void 0 : A.f) === j && (Y[he][_e].f = le);
25869
+ ((A = ($ = X[he]) == null ? void 0 : $[_e]) == null ? void 0 : A.f) === Z && (X[he][_e].f = le);
25870
25870
  } else if (o === "column" && D === u) {
25871
25871
  const le = `=${wt(
25872
- j,
25872
+ Z,
25873
25873
  "add",
25874
25874
  "col",
25875
25875
  l,
25876
25876
  i,
25877
25877
  a
25878
25878
  )}`;
25879
- ((N = (F = m[he]) == null ? void 0 : F[_e]) == null ? void 0 : N.f) === j && (m[he][_e].f = le), l === "lefttop" ? _e >= i && (z.c += a) : l === "rightbottom" && _e > i && (z.c += a), E.push(z);
25879
+ ((N = (F = m[he]) == null ? void 0 : F[_e]) == null ? void 0 : N.f) === Z && (m[he][_e].f = le), l === "lefttop" ? _e >= i && (U.c += a) : l === "rightbottom" && _e > i && (U.c += a), E.push(U);
25880
25880
  } else if (o === "column") {
25881
25881
  const le = `=${wt(
25882
- j,
25882
+ Z,
25883
25883
  "add",
25884
25884
  "col",
25885
25885
  l,
25886
25886
  i,
25887
25887
  a
25888
25888
  )}`;
25889
- ((S = (G = Y[he]) == null ? void 0 : G[_e]) == null ? void 0 : S.f) === j && (Y[he][_e].f = le);
25889
+ ((S = (G = X[he]) == null ? void 0 : G[_e]) == null ? void 0 : S.f) === Z && (X[he][_e].f = le);
25890
25890
  }
25891
25891
  }
25892
25892
  Wl(
@@ -25903,17 +25903,17 @@ function Df(e, t, r = !0) {
25903
25903
  let k = null;
25904
25904
  if (!h.isEmpty(C) && C != null) {
25905
25905
  k = { filter_select: null, filter: null };
25906
- let D = C.row[0], q = C.row[1], Y = C.column[0], P = C.column[1];
25907
- o === "row" ? (D < i ? (q === i && l === "lefttop" || q > i) && (q += a) : D === i ? l === "lefttop" ? (D += a, q += a) : l === "rightbottom" && q > i && (q += a) : (D += a, q += a), I != null && (k.filter = {}, h.forEach(I, (z, he) => {
25906
+ let D = C.row[0], q = C.row[1], X = C.column[0], P = C.column[1];
25907
+ o === "row" ? (D < i ? (q === i && l === "lefttop" || q > i) && (q += a) : D === i ? l === "lefttop" ? (D += a, q += a) : l === "rightbottom" && q > i && (q += a) : (D += a, q += a), I != null && (k.filter = {}, h.forEach(I, (U, he) => {
25908
25908
  const _e = I[he].rowhidden, Ne = {};
25909
- h.forEach(_e, (j, le) => {
25909
+ h.forEach(_e, (Z, le) => {
25910
25910
  const qe = parseFloat(le);
25911
25911
  qe < i ? Ne[qe] = 0 : qe === i ? l === "lefttop" ? Ne[qe + a] = 0 : l === "rightbottom" && (Ne[qe] = 0) : Ne[qe + a] = 0;
25912
25912
  }), k.filter[he] = h.cloneDeep(I[he]), k.filter[he].rowhidden = Ne, k.filter[he].str = D, k.filter[he].edr = q;
25913
- }))) : o === "column" && (Y < i ? (P === i && l === "lefttop" || P > i) && (P += a) : Y === i ? l === "lefttop" ? (Y += a, P += a) : l === "rightbottom" && P > i && (P += a) : (Y += a, P += a), I != null && (k.filter = {}, h.forEach(I, (z, he) => {
25913
+ }))) : o === "column" && (X < i ? (P === i && l === "lefttop" || P > i) && (P += a) : X === i ? l === "lefttop" ? (X += a, P += a) : l === "rightbottom" && P > i && (P += a) : (X += a, P += a), I != null && (k.filter = {}, h.forEach(I, (U, he) => {
25914
25914
  let _e = I[he].cindex;
25915
- (_e === i && l === "lefttop" || _e > i) && (_e += a), k.filter[_e - Y] = h.cloneDeep(I[he]), k.filter[_e - Y].cindex = _e, k.filter[_e - Y].stc = Y, k.filter[_e - Y].edc = P;
25916
- }))), k.filter_select = { row: [D, q], column: [Y, P] };
25915
+ (_e === i && l === "lefttop" || _e > i) && (_e += a), k.filter[_e - X] = h.cloneDeep(I[he]), k.filter[_e - X].cindex = _e, k.filter[_e - X].stc = X, k.filter[_e - X].edc = P;
25916
+ }))), k.filter_select = { row: [D, q], column: [X, P] };
25917
25917
  }
25918
25918
  const O = (k == null ? void 0 : k.filter) != null ? Mt(k.filter) : Mt(I);
25919
25919
  d.rowhidden_filter = O, d.rowhidden = h.assign(
@@ -25921,67 +25921,67 @@ function Df(e, t, r = !0) {
25921
25921
  d.rowhidden_manual || {},
25922
25922
  O
25923
25923
  );
25924
- const U = f.luckysheet_conditionformat_save, Z = [];
25925
- if (U != null && U.length > 0)
25926
- for (let D = 0; D < U.length; D += 1) {
25927
- const q = U[D].cellrange, Y = [];
25928
- for (let z = 0; z < q.length; z += 1) {
25929
- let he = q[z].row[0], _e = q[z].row[1], Ne = q[z].column[0], j = q[z].column[1];
25930
- o === "row" ? he < i ? (_e === i && l === "lefttop" || _e > i) && (_e += a) : he === i ? (l === "lefttop" || l === "rightbottom" && _e >= i) && (_e += a) : (he += a, _e += a) : o === "column" && (Ne < i ? (j === i && l === "lefttop" || j > i) && (j += a) : Ne === i ? (l === "lefttop" || l === "rightbottom" && j >= i) && (j += a) : (Ne += a, j += a)), Y.push({ row: [he, _e], column: [Ne, j] });
25924
+ const z = f.luckysheet_conditionformat_save, Y = [];
25925
+ if (z != null && z.length > 0)
25926
+ for (let D = 0; D < z.length; D += 1) {
25927
+ const q = z[D].cellrange, X = [];
25928
+ for (let U = 0; U < q.length; U += 1) {
25929
+ let he = q[U].row[0], _e = q[U].row[1], Ne = q[U].column[0], Z = q[U].column[1];
25930
+ o === "row" ? he < i ? (_e === i && l === "lefttop" || _e > i) && (_e += a) : he === i ? (l === "lefttop" || l === "rightbottom" && _e >= i) && (_e += a) : (he += a, _e += a) : o === "column" && (Ne < i ? (Z === i && l === "lefttop" || Z > i) && (Z += a) : Ne === i ? (l === "lefttop" || l === "rightbottom" && Z >= i) && (Z += a) : (Ne += a, Z += a)), X.push({ row: [he, _e], column: [Ne, Z] });
25931
25931
  }
25932
- const P = h.clone(U[D]);
25933
- P.cellrange = Y, Z.push(P);
25934
- }
25935
- const J = f.luckysheet_alternateformat_save, se = [];
25936
- if (J != null && J.length > 0)
25937
- for (let D = 0; D < J.length; D += 1) {
25938
- let q = J[D].cellrange.row[0], Y = J[D].cellrange.row[1], P = J[D].cellrange.column[0], z = J[D].cellrange.column[1];
25939
- const he = h.clone(J[D]);
25940
- o === "row" ? q < i ? (Y === i && l === "lefttop" || Y > i) && (Y += a) : q === i ? (l === "lefttop" || l === "rightbottom" && Y >= i) && (Y += a) : (q += a, Y += a) : o === "column" && (P < i ? (z === i && l === "lefttop" || z > i) && (z += a) : P === i ? (l === "lefttop" || l === "rightbottom" && z >= i) && (z += a) : (P += a, z += a)), he.cellrange = { row: [q, Y], column: [P, z] }, se.push(he);
25941
- }
25942
- const { frozen: V } = f;
25943
- if (V) {
25932
+ const P = h.clone(z[D]);
25933
+ P.cellrange = X, Y.push(P);
25934
+ }
25935
+ const Q = f.luckysheet_alternateformat_save, se = [];
25936
+ if (Q != null && Q.length > 0)
25937
+ for (let D = 0; D < Q.length; D += 1) {
25938
+ let q = Q[D].cellrange.row[0], X = Q[D].cellrange.row[1], P = Q[D].cellrange.column[0], U = Q[D].cellrange.column[1];
25939
+ const he = h.clone(Q[D]);
25940
+ o === "row" ? q < i ? (X === i && l === "lefttop" || X > i) && (X += a) : q === i ? (l === "lefttop" || l === "rightbottom" && X >= i) && (X += a) : (q += a, X += a) : o === "column" && (P < i ? (U === i && l === "lefttop" || U > i) && (U += a) : P === i ? (l === "lefttop" || l === "rightbottom" && U >= i) && (U += a) : (P += a, U += a)), he.cellrange = { row: [q, X], column: [P, U] }, se.push(he);
25941
+ }
25942
+ const { frozen: W } = f;
25943
+ if (W) {
25944
25944
  const D = l === "lefttop" ? i - 1 : i;
25945
- o === "row" && (V.type === "rangeRow" || V.type === "rangeBoth") && (((H = V.range) == null ? void 0 : H.row_focus) ?? -1) > D && (V.range.row_focus += a), o === "column" && (V.type === "rangeColumn" || V.type === "rangeBoth") && (((L = V.range) == null ? void 0 : L.column_focus) ?? -1) > D && (V.range.column_focus += a);
25945
+ o === "row" && (W.type === "rangeRow" || W.type === "rangeBoth") && (((H = W.range) == null ? void 0 : H.row_focus) ?? -1) > D && (W.range.row_focus += a), o === "column" && (W.type === "rangeColumn" || W.type === "rangeBoth") && (((L = W.range) == null ? void 0 : L.column_focus) ?? -1) > D && (W.range.column_focus += a);
25946
25946
  }
25947
- const { dataVerification: Q } = f, B = {};
25948
- Q != null && h.forEach(Q, (D, q) => {
25949
- const Y = Number(q.split("_")[0]), P = Number(q.split("_")[1]), z = Q[q];
25947
+ const { dataVerification: j } = f, B = {};
25948
+ j != null && h.forEach(j, (D, q) => {
25949
+ const X = Number(q.split("_")[0]), P = Number(q.split("_")[1]), U = j[q];
25950
25950
  if (o === "row")
25951
- if (i < Y)
25952
- B[`${Y + a}_${P}`] = h.cloneDeep(z);
25953
- else if (i === Y) {
25951
+ if (i < X)
25952
+ B[`${X + a}_${P}`] = h.cloneDeep(U);
25953
+ else if (i === X) {
25954
25954
  if (l === "lefttop") {
25955
- if (B[`${Y + a}_${P}`] = h.cloneDeep(z), !v)
25955
+ if (B[`${X + a}_${P}`] = h.cloneDeep(U), !v)
25956
25956
  for (let he = 0; he < a; he += 1)
25957
- B[`${Y + he}_${P}`] = h.cloneDeep(z);
25958
- } else if (B[`${Y}_${P}`] = h.cloneDeep(z), !v)
25957
+ B[`${X + he}_${P}`] = h.cloneDeep(U);
25958
+ } else if (B[`${X}_${P}`] = h.cloneDeep(U), !v)
25959
25959
  for (let he = 0; he < a; he += 1)
25960
- B[`${Y + he + 1}_${P}`] = h.cloneDeep(z);
25960
+ B[`${X + he + 1}_${P}`] = h.cloneDeep(U);
25961
25961
  } else
25962
- B[`${Y}_${P}`] = h.cloneDeep(z);
25962
+ B[`${X}_${P}`] = h.cloneDeep(U);
25963
25963
  else if (o === "column")
25964
25964
  if (i < P)
25965
- B[`${Y}_${P + a}`] = h.cloneDeep(z);
25965
+ B[`${X}_${P + a}`] = h.cloneDeep(U);
25966
25966
  else if (i === P) {
25967
25967
  if (l === "lefttop") {
25968
- if (B[`${Y}_${P + a}`] = h.cloneDeep(z), !T)
25968
+ if (B[`${X}_${P + a}`] = h.cloneDeep(U), !T)
25969
25969
  for (let he = 0; he < a; he += 1)
25970
- B[`${Y}_${P + he}`] = h.cloneDeep(z);
25971
- } else if (B[`${Y}_${P}`] = h.cloneDeep(z), !T)
25970
+ B[`${X}_${P + he}`] = h.cloneDeep(U);
25971
+ } else if (B[`${X}_${P}`] = h.cloneDeep(U), !T)
25972
25972
  for (let he = 0; he < a; he += 1)
25973
- B[`${Y}_${P + he + 1}`] = h.cloneDeep(z);
25973
+ B[`${X}_${P + he + 1}`] = h.cloneDeep(U);
25974
25974
  } else
25975
- B[`${Y}_${P}`] = h.cloneDeep(z);
25975
+ B[`${X}_${P}`] = h.cloneDeep(U);
25976
25976
  });
25977
25977
  const { hyperlink: re } = f, oe = {};
25978
25978
  if (re != null && h.forEach(re, (D, q) => {
25979
- const Y = Number(q.split("_")[0]), P = Number(q.split("_")[1]), z = re[q];
25980
- o === "row" ? i < Y ? oe[`${Y + a}_${P}`] = z : i === Y ? l === "lefttop" ? oe[`${Y + a}_${P}`] = z : oe[`${Y}_${P}`] = z : oe[`${Y}_${P}`] = z : o === "column" && (i < P ? oe[`${Y}_${P + a}`] = z : i === P ? l === "lefttop" ? oe[`${Y}_${P + a}`] = z : oe[`${Y}_${P}`] = z : oe[`${Y}_${P}`] = z);
25979
+ const X = Number(q.split("_")[0]), P = Number(q.split("_")[1]), U = re[q];
25980
+ o === "row" ? i < X ? oe[`${X + a}_${P}`] = U : i === X ? l === "lefttop" ? oe[`${X + a}_${P}`] = U : oe[`${X}_${P}`] = U : oe[`${X}_${P}`] = U : o === "column" && (i < P ? oe[`${X}_${P + a}`] = U : i === P ? l === "lefttop" ? oe[`${X}_${P + a}`] = U : oe[`${X}_${P}`] = U : oe[`${X}_${P}`] = U);
25981
25981
  }), o === "row") {
25982
25982
  const D = h.cloneDeep(d.borderInfo || []), q = g ? [
25983
25983
  ((pe = d.rowlen) == null ? void 0 : pe[b]) ?? f.defaultRowHeight ?? e.defaultrowlen
25984
- ] : null, Y = g ? [(de = d.customHeight) == null ? void 0 : de[b]] : null, P = ((te = d.rowlen) == null ? void 0 : te[i]) ?? f.defaultRowHeight ?? e.defaultrowlen, z = (ve = d.customHeight) == null ? void 0 : ve[i];
25984
+ ] : null, X = g ? [(de = d.customHeight) == null ? void 0 : de[b]] : null, P = ((te = d.rowlen) == null ? void 0 : te[i]) ?? f.defaultRowHeight ?? e.defaultrowlen, U = (ve = d.customHeight) == null ? void 0 : ve[i];
25985
25985
  if (d.rowlen != null) {
25986
25986
  const Ee = {}, ke = {};
25987
25987
  h.forEach(d.rowlen, (We, Be) => {
@@ -26007,8 +26007,8 @@ function Df(e, t, r = !0) {
26007
26007
  if (q) {
26008
26008
  d.customHeight || (d.customHeight = {});
26009
26009
  for (let ke = 0; ke < a; ke += 1)
26010
- Y[0] === 1 && (d.customHeight[Ee + ke] = 1);
26011
- } else if (z === 1) {
26010
+ X[0] === 1 && (d.customHeight[Ee + ke] = 1);
26011
+ } else if (U === 1) {
26012
26012
  d.customHeight || (d.customHeight = {});
26013
26013
  for (let ke = 0; ke < a; ke += 1)
26014
26014
  d.customHeight[Ee + ke] = 1;
@@ -26016,11 +26016,11 @@ function Df(e, t, r = !0) {
26016
26016
  }
26017
26017
  const _e = Mt(
26018
26018
  f.filter
26019
- ), Ne = d.rowhidden_manual ?? h.omit(d.rowhidden || {}, h.keys(_e)), j = {};
26019
+ ), Ne = d.rowhidden_manual ?? h.omit(d.rowhidden || {}, h.keys(_e)), Z = {};
26020
26020
  h.forEach(Ne, (Ee, ke) => {
26021
26021
  const We = parseFloat(ke);
26022
- We < i ? j[We] = Ne[We] : We === i ? l === "lefttop" ? j[We + a] = Ne[We] : l === "rightbottom" && (j[We] = Ne[We]) : j[We + a] = Ne[We];
26023
- }), d.rowhidden_manual = j;
26022
+ We < i ? Z[We] = Ne[We] : We === i ? l === "lefttop" ? Z[We + a] = Ne[We] : l === "rightbottom" && (Z[We] = Ne[We]) : Z[We + a] = Ne[We];
26023
+ }), d.rowhidden_manual = Z;
26024
26024
  const le = (k == null ? void 0 : k.filter) != null ? Mt(k.filter) : Mt(I);
26025
26025
  d.rowhidden_filter = le, d.rowhidden = h.assign({}, d.rowhidden_manual, le);
26026
26026
  const qe = [];
@@ -26073,48 +26073,48 @@ function Df(e, t, r = !0) {
26073
26073
  } else {
26074
26074
  const D = h.cloneDeep(d.borderInfo || []), q = y ? [
26075
26075
  ((Te = d.columnlen) == null ? void 0 : Te[w]) ?? f.defaultColWidth ?? e.defaultcollen
26076
- ] : null, Y = y ? [(Se = d.customWidth) == null ? void 0 : Se[w]] : null, P = ((me = d.columnlen) == null ? void 0 : me[i]) ?? f.defaultColWidth ?? e.defaultcollen, z = (ue = d.customWidth) == null ? void 0 : ue[i];
26076
+ ] : null, X = y ? [(Se = d.customWidth) == null ? void 0 : Se[w]] : null, P = ((me = d.columnlen) == null ? void 0 : me[i]) ?? f.defaultColWidth ?? e.defaultcollen, U = (fe = d.customWidth) == null ? void 0 : fe[i];
26077
26077
  if (d.columnlen != null) {
26078
- const j = {}, le = {};
26078
+ const Z = {}, le = {};
26079
26079
  h.forEach(d.columnlen, (qe, xe) => {
26080
26080
  const Ee = parseFloat(xe);
26081
- Ee < i ? j[Ee] = d.columnlen[Ee] : Ee === i ? l === "lefttop" ? j[Ee + a] = d.columnlen[Ee] : l === "rightbottom" && (j[Ee] = d.columnlen[Ee]) : j[Ee + a] = d.columnlen[Ee];
26081
+ Ee < i ? Z[Ee] = d.columnlen[Ee] : Ee === i ? l === "lefttop" ? Z[Ee + a] = d.columnlen[Ee] : l === "rightbottom" && (Z[Ee] = d.columnlen[Ee]) : Z[Ee + a] = d.columnlen[Ee];
26082
26082
  }), h.forEach(d.colReadOnly, (qe, xe) => {
26083
26083
  const Ee = parseFloat(xe);
26084
26084
  Ee < i ? le[Ee] = d.colReadOnly[Ee] : Ee > i && (le[Ee + a] = d.colReadOnly[Ee]);
26085
- }), d.columnlen = j, d.colReadOnly = le;
26085
+ }), d.columnlen = Z, d.colReadOnly = le;
26086
26086
  }
26087
26087
  if (d.customWidth != null) {
26088
- const j = {};
26088
+ const Z = {};
26089
26089
  h.forEach(d.customWidth, (le, qe) => {
26090
26090
  const xe = parseFloat(qe);
26091
- xe < i ? j[xe] = d.customWidth[xe] : xe === i ? l === "lefttop" ? j[xe + a] = d.customWidth[xe] : l === "rightbottom" && (j[xe] = d.customWidth[xe]) : j[xe + a] = d.customWidth[xe];
26092
- }), d.customWidth = j;
26091
+ xe < i ? Z[xe] = d.customWidth[xe] : xe === i ? l === "lefttop" ? Z[xe + a] = d.customWidth[xe] : l === "rightbottom" && (Z[xe] = d.customWidth[xe]) : Z[xe + a] = d.customWidth[xe];
26092
+ }), d.customWidth = Z;
26093
26093
  }
26094
26094
  if (a === 1) {
26095
26095
  d.columnlen == null && (d.columnlen = {});
26096
- const j = l === "lefttop" ? i : i + 1;
26096
+ const Z = l === "lefttop" ? i : i + 1;
26097
26097
  for (let le = 0; le < a; le += 1)
26098
- d.columnlen[j + le] = q ? q[0] : P;
26098
+ d.columnlen[Z + le] = q ? q[0] : P;
26099
26099
  if (q) {
26100
26100
  d.customWidth || (d.customWidth = {});
26101
26101
  for (let le = 0; le < a; le += 1)
26102
- Y[0] === 1 && (d.customWidth[j + le] = 1);
26103
- } else if (z === 1) {
26102
+ X[0] === 1 && (d.customWidth[Z + le] = 1);
26103
+ } else if (U === 1) {
26104
26104
  d.customWidth || (d.customWidth = {});
26105
26105
  for (let le = 0; le < a; le += 1)
26106
- d.customWidth[j + le] = 1;
26106
+ d.customWidth[Z + le] = 1;
26107
26107
  }
26108
26108
  }
26109
26109
  if (d.colhidden != null) {
26110
- const j = {};
26110
+ const Z = {};
26111
26111
  h.forEach(d.colhidden, (le, qe) => {
26112
26112
  const xe = parseFloat(qe);
26113
- xe < i ? j[xe] = d.colhidden[xe] : xe === i ? l === "lefttop" ? j[xe + a] = d.colhidden[xe] : l === "rightbottom" && (j[xe] = d.colhidden[xe]) : j[xe + a] = d.colhidden[xe];
26114
- }), d.colhidden = j;
26113
+ xe < i ? Z[xe] = d.colhidden[xe] : xe === i ? l === "lefttop" ? Z[xe + a] = d.colhidden[xe] : l === "rightbottom" && (Z[xe] = d.colhidden[xe]) : Z[xe + a] = d.colhidden[xe];
26114
+ }), d.colhidden = Z;
26115
26115
  }
26116
26116
  const _e = [];
26117
- for (let j = 0; j < a; j += 1) {
26117
+ for (let Z = 0; Z < a; Z += 1) {
26118
26118
  const le = y ? w : i;
26119
26119
  _e.push(
26120
26120
  If(m, le, a, l)
@@ -26122,7 +26122,7 @@ function Df(e, t, r = !0) {
26122
26122
  }
26123
26123
  const Ne = [];
26124
26124
  if (d.borderInfo && d.borderInfo.length > 0) {
26125
- const j = [];
26125
+ const Z = [];
26126
26126
  for (let le = 0; le < d.borderInfo.length; le += 1) {
26127
26127
  const { rangeType: qe } = d.borderInfo[le];
26128
26128
  if (qe === "range") {
@@ -26142,93 +26142,93 @@ function Df(e, t, r = !0) {
26142
26142
  color: d.borderInfo[le].color,
26143
26143
  range: Ee
26144
26144
  };
26145
- j.push(ke);
26145
+ Z.push(ke);
26146
26146
  }
26147
26147
  } else if (qe === "cell") {
26148
26148
  let { col_index: xe } = d.borderInfo[le].value;
26149
26149
  !y && xe === i && Ne.push(
26150
26150
  JSON.parse(JSON.stringify(d.borderInfo[le]))
26151
- ), l === "lefttop" ? i <= xe && (xe += a) : i < xe && (xe += a), d.borderInfo[le].value.col_index = xe, j.push(d.borderInfo[le]);
26151
+ ), l === "lefttop" ? i <= xe && (xe += a) : i < xe && (xe += a), d.borderInfo[le].value.col_index = xe, Z.push(d.borderInfo[le]);
26152
26152
  }
26153
26153
  }
26154
- d.borderInfo = j;
26154
+ d.borderInfo = Z;
26155
26155
  }
26156
- for (let j = 0; j < a; j += 1) {
26156
+ for (let Z = 0; Z < a; Z += 1) {
26157
26157
  const le = y ? w : i;
26158
26158
  let qe = [];
26159
26159
  y ? qe = D.filter(
26160
26160
  (xe) => xe.rangeType === "cell" && xe.value.col_index === le
26161
26161
  ).map((xe) => JSON.parse(JSON.stringify(xe))) : Ne.length && (qe = h.cloneDeep(Ne)), qe.length && (qe.forEach((xe) => {
26162
- l === "rightbottom" ? xe.value.col_index += j + 1 : l === "lefttop" && (xe.value.col_index += j);
26162
+ l === "rightbottom" ? xe.value.col_index += Z + 1 : l === "lefttop" && (xe.value.col_index += Z);
26163
26163
  }), (He = d.borderInfo) == null || He.push(...qe));
26164
26164
  }
26165
- for (let j = 0; j < m.length; j += 1) {
26166
- const le = m[j], qe = _e.map((xe) => xe[j]);
26165
+ for (let Z = 0; Z < m.length; Z += 1) {
26166
+ const le = m[Z], qe = _e.map((xe) => xe[Z]);
26167
26167
  l === "lefttop" ? le.splice(i, 0, ...qe) : le.splice(i + 1, 0, ...qe);
26168
26168
  }
26169
26169
  }
26170
- if (f.data = m, f.config = d, f.calcChain = E, k != null && (f.filter = k.filter, f.filter_select = k.filter_select), f.luckysheet_conditionformat_save = Z, f.luckysheet_alternateformat_save = se, v) {
26170
+ if (f.data = m, f.config = d, f.calcChain = E, k != null && (f.filter = k.filter, f.filter_select = k.filter_select), f.luckysheet_conditionformat_save = Y, f.luckysheet_alternateformat_save = se, v) {
26171
26171
  const D = l === "lefttop" ? i : i + 1;
26172
26172
  for (let q = 0; q < a; q += 1) {
26173
- const Y = D + q;
26174
- h.forEach(v[0], (P, z) => {
26175
- const he = Number(z);
26176
- B[`${Y}_${he}`] = h.cloneDeep(P);
26173
+ const X = D + q;
26174
+ h.forEach(v[0], (P, U) => {
26175
+ const he = Number(U);
26176
+ B[`${X}_${he}`] = h.cloneDeep(P);
26177
26177
  });
26178
26178
  }
26179
26179
  }
26180
26180
  if (T) {
26181
26181
  const D = l === "lefttop" ? i : i + 1;
26182
26182
  for (let q = 0; q < a; q += 1) {
26183
- const Y = D + q;
26184
- h.forEach(T[0], (P, z) => {
26185
- const he = Number(z);
26186
- B[`${he}_${Y}`] = h.cloneDeep(P);
26183
+ const X = D + q;
26184
+ h.forEach(T[0], (P, U) => {
26185
+ const he = Number(U);
26186
+ B[`${he}_${X}`] = h.cloneDeep(P);
26187
26187
  });
26188
26188
  }
26189
26189
  }
26190
- if (g && U != null && U.length > 0) {
26190
+ if (g && z != null && z.length > 0) {
26191
26191
  const D = l === "lefttop" ? i : i + 1;
26192
26192
  for (let q = 0; q < a; q += 1) {
26193
- const Y = b, P = D + q;
26194
- for (let z = 0; z < U.length; z += 1) {
26195
- const he = U[z], _e = (he.cellrange || []).filter((Ne) => Y >= Ne.row[0] && Y <= Ne.row[1]).map((Ne) => ({
26193
+ const X = b, P = D + q;
26194
+ for (let U = 0; U < z.length; U += 1) {
26195
+ const he = z[U], _e = (he.cellrange || []).filter((Ne) => X >= Ne.row[0] && X <= Ne.row[1]).map((Ne) => ({
26196
26196
  row: [P, P],
26197
26197
  column: [Ne.column[0], Ne.column[1]]
26198
26198
  }));
26199
26199
  if (_e.length > 0) {
26200
26200
  const Ne = h.cloneDeep(he);
26201
- Ne.cellrange = _e, Z.push(Ne);
26201
+ Ne.cellrange = _e, Y.push(Ne);
26202
26202
  }
26203
26203
  }
26204
26204
  }
26205
26205
  }
26206
- if (y && U != null && U.length > 0) {
26206
+ if (y && z != null && z.length > 0) {
26207
26207
  const D = l === "lefttop" ? i : i + 1;
26208
26208
  for (let q = 0; q < a; q += 1) {
26209
- const Y = w, P = D + q;
26210
- for (let z = 0; z < U.length; z += 1) {
26211
- const he = U[z], _e = (he.cellrange || []).filter((Ne) => Y >= Ne.column[0] && Y <= Ne.column[1]).map((Ne) => ({
26209
+ const X = w, P = D + q;
26210
+ for (let U = 0; U < z.length; U += 1) {
26211
+ const he = z[U], _e = (he.cellrange || []).filter((Ne) => X >= Ne.column[0] && X <= Ne.column[1]).map((Ne) => ({
26212
26212
  row: [Ne.row[0], Ne.row[1]],
26213
26213
  column: [P, P]
26214
26214
  }));
26215
26215
  if (_e.length > 0) {
26216
26216
  const Ne = h.cloneDeep(he);
26217
- Ne.cellrange = _e, Z.push(Ne);
26217
+ Ne.cellrange = _e, Y.push(Ne);
26218
26218
  }
26219
26219
  }
26220
26220
  }
26221
26221
  }
26222
26222
  f.dataVerification = B, f.hyperlink = oe, f.id === e.currentSheetId && (e.config = d);
26223
- let be = null;
26224
- o === "row" ? (l === "lefttop" ? be = [
26223
+ let ge = null;
26224
+ o === "row" ? (l === "lefttop" ? ge = [
26225
26225
  { row: [i, i + a - 1], column: [0, m[0].length - 1] }
26226
- ] : be = [
26226
+ ] : ge = [
26227
26227
  { row: [i + 1, i + a], column: [0, m[0].length - 1] }
26228
- ], f.row = f.data.length) : (l === "lefttop" ? be = [{ row: [0, m.length - 1], column: [i, i + a - 1] }] : be = [{ row: [0, m.length - 1], column: [i + 1, i + a] }], f.column = (Ue = f.data[0]) == null ? void 0 : Ue.length), r && (f.luckysheet_select_save = be, f.id === e.currentSheetId && (e.luckysheet_select_save = be)), Ul(_, f);
26229
- const fe = zl(d.merge);
26228
+ ], f.row = f.data.length) : (l === "lefttop" ? ge = [{ row: [0, m.length - 1], column: [i, i + a - 1] }] : ge = [{ row: [0, m.length - 1], column: [i + 1, i + a] }], f.column = (Ue = f.data[0]) == null ? void 0 : Ue.length), r && (f.luckysheet_select_save = ge, f.id === e.currentSheetId && (e.luckysheet_select_save = ge)), Ul(_, f);
26229
+ const ue = zl(d.merge);
26230
26230
  if (o === "row") {
26231
- const D = l === "lefttop" ? i : i + 1, q = fe ? Math.min(D, fe.minR) : D;
26231
+ const D = l === "lefttop" ? i : i + 1, q = ue ? Math.min(D, ue.minR) : D;
26232
26232
  wr(
26233
26233
  e,
26234
26234
  n,
@@ -26239,7 +26239,7 @@ function Df(e, t, r = !0) {
26239
26239
  (((Me = m[0]) == null ? void 0 : Me.length) ?? 1) - 1
26240
26240
  );
26241
26241
  } else {
26242
- const D = l === "lefttop" ? i : i + 1, q = fe ? Math.min(D, fe.minC) : D;
26242
+ const D = l === "lefttop" ? i : i + 1, q = ue ? Math.min(D, ue.minC) : D;
26243
26243
  wr(
26244
26244
  e,
26245
26245
  n,
@@ -26247,12 +26247,12 @@ function Df(e, t, r = !0) {
26247
26247
  0,
26248
26248
  m.length - 1,
26249
26249
  q,
26250
- (((ge = m[0]) == null ? void 0 : ge.length) ?? 1) - 1
26250
+ (((ye = m[0]) == null ? void 0 : ye.length) ?? 1) - 1
26251
26251
  );
26252
26252
  }
26253
26253
  }
26254
26254
  function Vl(e, t) {
26255
- var Z, J, se, V, Q, B, re, oe, be, fe, X, K, W, ce, ye, M;
26255
+ var Y, Q, se, W, j, B, re, oe, ge, ue, K, J, V, ce, be, M;
26256
26256
  const { type: r } = t;
26257
26257
  let { start: a, end: n, id: o } = t;
26258
26258
  o = o || e.currentSheetId;
@@ -26268,11 +26268,11 @@ function Vl(e, t) {
26268
26268
  h.keys(s)
26269
26269
  )), c.rowhidden_filter = s, c.rowhidden = h.assign({}, c.rowhidden_manual, s), r === "row") {
26270
26270
  for (let $ = a; $ <= n; $ += 1)
26271
- if ((Z = c.rowReadOnly) != null && Z[$])
26271
+ if ((Y = c.rowReadOnly) != null && Y[$])
26272
26272
  throw new Error("readOnly");
26273
26273
  } else
26274
26274
  for (let $ = a; $ <= n; $ += 1)
26275
- if ((J = c.colReadOnly) != null && J[$])
26275
+ if ((Q = c.colReadOnly) != null && Q[$])
26276
26276
  throw new Error("readOnly");
26277
26277
  const u = l.data;
26278
26278
  if (!u || (a < 0 && (a = 0), n < 0 && (n = 0), r === "row" ? (a > u.length - 1 && (a = u.length - 1), n > u.length - 1 && (n = u.length - 1)) : (a > u[0].length - 1 && (a = u[0].length - 1), n > u[0].length - 1 && (n = u[0].length - 1)), a > n))
@@ -26339,7 +26339,7 @@ function Vl(e, t) {
26339
26339
  a,
26340
26340
  f
26341
26341
  )}`;
26342
- ((Q = (V = F[S]) == null ? void 0 : V[H]) == null ? void 0 : Q.f) === pe && (F[S][H].f = de, de.includes("#REF!") && On(F[S][H])), S > n && (G.r = S - f), d.push(G);
26342
+ ((j = (W = F[S]) == null ? void 0 : W[H]) == null ? void 0 : j.f) === pe && (F[S][H].f = de, de.includes("#REF!") && On(F[S][H])), S > n && (G.r = S - f), d.push(G);
26343
26343
  }
26344
26344
  } else if (r === "row") {
26345
26345
  const de = `=${wt(
@@ -26361,7 +26361,7 @@ function Vl(e, t) {
26361
26361
  a,
26362
26362
  f
26363
26363
  )}`;
26364
- ((be = (oe = F[S]) == null ? void 0 : oe[H]) == null ? void 0 : be.f) === pe && (F[S][H].f = de, de.includes("#REF!") && On(F[S][H])), H > n && (G.c = H - f), d.push(G);
26364
+ ((ge = (oe = F[S]) == null ? void 0 : oe[H]) == null ? void 0 : ge.f) === pe && (F[S][H].f = de, de.includes("#REF!") && On(F[S][H])), H > n && (G.c = H - f), d.push(G);
26365
26365
  }
26366
26366
  } else if (r === "column") {
26367
26367
  const de = `=${wt(
@@ -26372,7 +26372,7 @@ function Vl(e, t) {
26372
26372
  a,
26373
26373
  f
26374
26374
  )}`;
26375
- ((X = (fe = F[S]) == null ? void 0 : fe[H]) == null ? void 0 : X.f) === pe && (F[S][H].f = de, de === "=#REF!" && On(F[S][H]));
26375
+ ((K = (ue = F[S]) == null ? void 0 : ue[H]) == null ? void 0 : K.f) === pe && (F[S][H].f = de, de === "=#REF!" && On(F[S][H]));
26376
26376
  }
26377
26377
  }
26378
26378
  Wl(
@@ -26450,7 +26450,7 @@ function Vl(e, t) {
26450
26450
  }
26451
26451
  }
26452
26452
  const { frozen: E } = l;
26453
- E && (r === "row" && (E.type === "rangeRow" || E.type === "rangeBoth") && (((K = E.range) == null ? void 0 : K.row_focus) ?? -1) >= a && (E.range.row_focus -= Math.min(n, E.range.row_focus) - a + 1), r === "column" && (E.type === "rangeColumn" || E.type === "rangeBoth") && (((W = E.range) == null ? void 0 : W.column_focus) ?? -1) >= a && (E.range.column_focus -= Math.min(n, E.range.column_focus) - a + 1));
26453
+ E && (r === "row" && (E.type === "rangeRow" || E.type === "rangeBoth") && (((J = E.range) == null ? void 0 : J.row_focus) ?? -1) >= a && (E.range.row_focus -= Math.min(n, E.range.row_focus) - a + 1), r === "column" && (E.type === "rangeColumn" || E.type === "rangeBoth") && (((V = E.range) == null ? void 0 : V.column_focus) ?? -1) >= a && (E.range.column_focus -= Math.min(n, E.range.column_focus) - a + 1));
26454
26454
  const { dataVerification: C } = l, I = {};
26455
26455
  C != null && h.forEach(C, ($, A) => {
26456
26456
  const F = Number(A.split("_")[0]), N = Number(A.split("_")[1]), G = C[A];
@@ -26584,9 +26584,9 @@ function Vl(e, t) {
26584
26584
  l.column = (ce = u[0]) == null ? void 0 : ce.length;
26585
26585
  }
26586
26586
  e.luckysheet_select_save = void 0, l.data = u, l.config = c, l.calcChain = d, y != null && (l.filter = y.filter, l.filter_select = y.filter_select), l.luckysheet_conditionformat_save = v, l.luckysheet_alternateformat_save = _, l.dataVerification = I, l.hyperlink = O, Ul(m, l);
26587
- const U = zl(c.merge);
26587
+ const z = zl(c.merge);
26588
26588
  if (r === "row") {
26589
- const $ = U ? Math.min(a, U.minR) : a;
26589
+ const $ = z ? Math.min(a, z.minR) : a;
26590
26590
  wr(
26591
26591
  e,
26592
26592
  o,
@@ -26594,10 +26594,10 @@ function Vl(e, t) {
26594
26594
  $,
26595
26595
  u.length - 1,
26596
26596
  0,
26597
- (((ye = u[0]) == null ? void 0 : ye.length) ?? 1) - 1
26597
+ (((be = u[0]) == null ? void 0 : be.length) ?? 1) - 1
26598
26598
  );
26599
26599
  } else {
26600
- const $ = U ? Math.min(a, U.minC) : a;
26600
+ const $ = z ? Math.min(a, z.minC) : a;
26601
26601
  wr(
26602
26602
  e,
26603
26603
  o,
@@ -27099,7 +27099,7 @@ const Xl = `$#,##0.${"0".repeat(2)}`, Yf = (e, t, r, a) => {
27099
27099
  shouldIgnoreUsdValue: o,
27100
27100
  staticLinesAbove: i
27101
27101
  }) => {
27102
- var y, b, w, v, T, _, E, C;
27102
+ var y, b, w, v, T, _, E, C, I, k;
27103
27103
  if (!a || a.length === 0) {
27104
27104
  (y = n.current) == null || y.setCellError(e, t, {
27105
27105
  title: "No results",
@@ -27132,46 +27132,46 @@ const Xl = `$#,##0.${"0".repeat(2)}`, Yf = (e, t, r, a) => {
27132
27132
  row: [l, l + a.length - 1],
27133
27133
  column: [t, t + (a[0].length - 1)]
27134
27134
  };
27135
- const k = a[0].map(String).map((O, U) => {
27136
- if (U === 0)
27135
+ const z = a[0].map(String).map((Y, Q) => {
27136
+ if (Q === 0)
27137
27137
  return {
27138
27138
  ...r && typeof r == "object" ? tl({ ...r }) : r,
27139
- m: O,
27140
- v: O,
27139
+ m: Y,
27140
+ v: Y,
27141
27141
  isDataBlockFormula: !0
27142
27142
  };
27143
- const Z = Ln(
27143
+ const se = Ln(
27144
27144
  l,
27145
- t + U,
27145
+ t + Q,
27146
27146
  n
27147
- ), { m: J, ct: se, ...V } = Z || {}, Q = Fn(O, Z == null ? void 0 : Z.ct);
27147
+ ), { m: W, ct: j, ...B } = se || {}, re = Fn(Y, se == null ? void 0 : se.ct);
27148
27148
  return {
27149
- ...V,
27150
- v: O,
27151
- m: String(O),
27152
- ...Q ? { ct: Q } : {}
27149
+ ...B,
27150
+ v: Y,
27151
+ m: String(Y),
27152
+ ...re ? { ct: re } : {}
27153
27153
  };
27154
27154
  });
27155
- g.push(k);
27156
- for (let O = 1; O < a.length; O++) {
27157
- const U = [];
27158
- a[O].forEach((Z, J) => {
27159
- const se = Ln(
27160
- l + O,
27161
- t + J,
27155
+ g.push(z);
27156
+ for (let Y = 1; Y < a.length; Y++) {
27157
+ const Q = [];
27158
+ a[Y].forEach((se, W) => {
27159
+ const j = Ln(
27160
+ l + Y,
27161
+ t + W,
27162
27162
  n
27163
- ), { m: V, ct: Q, ...B } = se || {}, re = ha(Z);
27164
- U.push({
27165
- ...B,
27166
- ...el(se, re),
27163
+ ), { m: B, ct: re, ...oe } = j || {}, ge = ha(se);
27164
+ Q.push({
27165
+ ...oe,
27166
+ ...el(j, ge),
27167
27167
  // move color from styles to cell-level 'fc' when becoming numeric
27168
- v: Z,
27169
- ct: Fn(Z, se.ct),
27168
+ v: se,
27169
+ ct: Fn(se, j.ct),
27170
27170
  // if the value is numeric, skip "m" (FortuneSheet will render display text using v + ct/fa).
27171
27171
  // if it's text, explicitly set "m" to match the value so it displays correctly.
27172
- ...re ? {} : { m: Z ? String(Z) : "" }
27172
+ ...ge ? {} : { m: se ? String(se) : "" }
27173
27173
  });
27174
- }), g.push(U);
27174
+ }), g.push(Q);
27175
27175
  }
27176
27176
  }
27177
27177
  } else {
@@ -27181,55 +27181,57 @@ const Xl = `$#,##0.${"0".repeat(2)}`, Yf = (e, t, r, a) => {
27181
27181
  apiData: a,
27182
27182
  sheetEditorRef: n,
27183
27183
  newValue: r
27184
- }))
27184
+ })) {
27185
+ (C = n.current) == null || C.clearCellError(e, t);
27185
27186
  return;
27187
+ }
27186
27188
  p = {
27187
27189
  row: [l, l + a.length],
27188
27190
  column: [t, t + (c.length - 1)]
27189
27191
  };
27190
- const I = c.map((k, O) => {
27191
- if (O === 0)
27192
+ const O = c.map((z, Y) => {
27193
+ if (Y === 0)
27192
27194
  return {
27193
27195
  ...r && typeof r == "object" ? tl({ ...r }) : r,
27194
- m: k,
27195
- v: k,
27196
+ m: z,
27197
+ v: z,
27196
27198
  isDataBlockFormula: !0,
27197
27199
  ...i != null && i.length ? { bl: 1 } : {}
27198
27200
  };
27199
- const U = Ln(
27201
+ const Q = Ln(
27200
27202
  l,
27201
- t + O,
27203
+ t + Y,
27202
27204
  n
27203
- ), { m: Z, ct: J, ...se } = U || {}, V = Fn(k, U == null ? void 0 : U.ct);
27205
+ ), { m: se, ct: W, ...j } = Q || {}, B = Fn(z, Q == null ? void 0 : Q.ct);
27204
27206
  return {
27205
- ...se,
27206
- v: k,
27207
- m: String(k),
27208
- ...V ? { ct: V } : {},
27207
+ ...j,
27208
+ v: z,
27209
+ m: String(z),
27210
+ ...B ? { ct: B } : {},
27209
27211
  ...i != null && i.length ? { bl: 1 } : {}
27210
27212
  };
27211
27213
  });
27212
- g.push(I);
27213
- for (let k = 0; k < a.length; k++) {
27214
- const O = [];
27215
- c.forEach((U, Z) => {
27216
- const J = a[k][U], se = Ln(
27217
- l + 1 + k,
27218
- t + Z,
27214
+ g.push(O);
27215
+ for (let z = 0; z < a.length; z++) {
27216
+ const Y = [];
27217
+ c.forEach((Q, se) => {
27218
+ const W = a[z][Q], j = Ln(
27219
+ l + 1 + z,
27220
+ t + se,
27219
27221
  n
27220
- ), { m: V, ct: Q, ...B } = se || {}, re = ha(J), oe = {};
27221
- re && jl(U) && !o ? (oe.m = kt(Xl, J), oe.ht = 2) : J && (oe.m = String(J)), O.push({
27222
- ...B,
27223
- ...el(se, re),
27222
+ ), { m: B, ct: re, ...oe } = j || {}, ge = ha(W), ue = {};
27223
+ ge && jl(Q) && !o ? (ue.m = kt(Xl, W), ue.ht = 2) : W && (ue.m = String(W)), Y.push({
27224
+ ...oe,
27225
+ ...el(j, ge),
27224
27226
  // move color from styles to cell-level 'fc' when becoming numeric
27225
- v: J,
27226
- ct: Fn(J, se.ct, U),
27227
- ...oe
27227
+ v: W,
27228
+ ct: Fn(W, j.ct, Q),
27229
+ ...ue
27228
27230
  });
27229
- }), g.push(O);
27231
+ }), g.push(Y);
27230
27232
  }
27231
27233
  }
27232
- p && ((C = n.current) == null || C.setCellValuesByRange(g, p, {}, !1));
27234
+ p && ((I = n.current) == null || I.setCellValuesByRange(g, p, {}, !1)), (k = n.current) == null || k.clearCellError(e, t);
27233
27235
  }, Ln = (e, t, r) => {
27234
27236
  var o, i, l;
27235
27237
  const a = (i = (o = r.current) == null ? void 0 : o.getSheet()) == null ? void 0 : i.data, n = (l = a == null ? void 0 : a[e]) == null ? void 0 : l[t];
@@ -27266,7 +27268,7 @@ const Xl = `$#,##0.${"0".repeat(2)}`, Yf = (e, t, r, a) => {
27266
27268
  sheetEditorRef: a,
27267
27269
  newValue: n
27268
27270
  }) => {
27269
- var m;
27271
+ var m, d;
27270
27272
  if (!(r.length === 1 && Object.keys(r[0] || {}).length === 1)) return !1;
27271
27273
  const i = Object.values(r[0])[0];
27272
27274
  if (typeof i != "string" && typeof i != "number" && typeof i != "boolean" && typeof i < "u")
@@ -27286,7 +27288,7 @@ const Xl = `$#,##0.${"0".repeat(2)}`, Yf = (e, t, r, a) => {
27286
27288
  },
27287
27289
  {},
27288
27290
  !0
27289
- ), !0;
27291
+ ), (d = a.current) == null || d.clearCellError(e, t), !0;
27290
27292
  }, Zf = (e) => e !== null && typeof e == "object" && !Array.isArray(e) && (e == null ? void 0 : e.responseType) === "smart-contract", Kf = async ({
27291
27293
  result: e,
27292
27294
  handleSmartContractQuery: t,