@silurus/ooxml 0.86.0 → 0.86.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/assets/render-worker-D21h5TGR.js +10 -0
  2. package/dist/assets/render-worker-Dsfekaht.js +11 -0
  3. package/dist/assets/{render-worker-CB4DxjXg.js → render-worker-DxU7IrKo.js} +18 -18
  4. package/dist/bounded-raw-part-cache-BfbSxRIL.js +119 -0
  5. package/dist/{canvas-viewer-mechanics-B3A7KLLi.js → canvas-viewer-mechanics-DN5SqWGS.js} +329 -192
  6. package/dist/{comment-ui-runtime-ssI6IE39.js → comment-ui-runtime-lXwVOgjW.js} +1 -1
  7. package/dist/{document-pull-client-xZrA2IjM.js → document-pull-client-uopDjRde.js} +4501 -4456
  8. package/dist/{docx-DzDiGvqe.js → docx-wPzeF76A.js} +492 -307
  9. package/dist/docx.mjs +6 -6
  10. package/dist/docx_parser_bg.wasm +0 -0
  11. package/dist/{dom-interaction-boundary-DK1JLkrz.js → dom-interaction-boundary-CswB9Tzi.js} +60 -57
  12. package/dist/{hyperlink-enyPbflR.js → hyperlink-BR1NCO7S.js} +934 -885
  13. package/dist/index.mjs +4 -4
  14. package/dist/line-distribute-IsUGfHXm.js +1023 -0
  15. package/dist/node.mjs +272 -272
  16. package/dist/{pptx-D_U62nl-.js → pptx-BxJ_RBSY.js} +169 -161
  17. package/dist/pptx.mjs +5 -5
  18. package/dist/pptx_parser_bg.wasm +0 -0
  19. package/dist/{render-DSn0d35X.js → render-DEiun_AH.js} +1 -1
  20. package/dist/{render-worker-host-CO0UYoQh.js → render-worker-host-BEfLZvSL.js} +1 -1
  21. package/dist/{render-worker-host-CbYDBg7U.js → render-worker-host-Ba6Fchqr.js} +1 -1
  22. package/dist/{render-worker-host-BHz9vjxB.js → render-worker-host-C3xwtHnv.js} +1 -1
  23. package/dist/{resource-measurement-Do07ZRcR.js → resource-measurement-CclArDRs.js} +9 -9
  24. package/dist/{session-C1GYhr6n.js → session-BuJL_xcp.js} +87 -87
  25. package/dist/{slide-pull-client-DuEaUxPw.js → slide-pull-client-Ck8wfRT_.js} +977 -903
  26. package/dist/types/docx.d.ts +1 -2
  27. package/dist/types/index.d.ts +1 -2
  28. package/dist/{worksheet-pull-client-eDiHHEG2.js → worksheet-pull-client-CAvuf22q.js} +78 -78
  29. package/dist/{xlsx-CMHmYTHP.js → xlsx-Bblm5r1h.js} +574 -574
  30. package/dist/xlsx.mjs +5 -5
  31. package/package.json +1 -1
  32. package/dist/assets/render-worker-BCGnuBLj.js +0 -10
  33. package/dist/assets/render-worker-CHW0F0n6.js +0 -11
  34. package/dist/bounded-raw-part-cache-DVx3Camo.js +0 -256
  35. package/dist/line-distribute-BFB575d6.js +0 -1023
  36. /package/dist/{comment-occurrence-Dhdplprg.js → comment-occurrence-CqejEuts.js} +0 -0
@@ -1,18 +1,18 @@
1
1
  import { t as e } from "./chunk-DmhlhrBa.js";
2
- import { $ as t, A as n, Bt as r, C as i, Ct as a, E as o, Ft as s, H as c, Ht as l, I as u, It as d, L as f, O as p, Pt as m, Q as h, R as g, Rt as _, S as v, St as y, T as b, Ut as x, Vt as S, Xt as C, Z as w, Zt as T, _ as E, a as D, b as O, bt as k, c as A, ct as j, d as ee, dt as M, et as N, f as te, h as ne, jt as P, k as F, l as I, lt as L, m as R, mt as z, nt as B, o as re, on as V, p as H, r as ie, rt as U, sn as ae, tt as oe, u as se, vt as ce, wt as le, x as ue, xt as de, yt as fe, z as pe, zt as me } from "./hyperlink-enyPbflR.js";
3
- import { C as W, D as G, E as K, S as he, T as ge, _ as _e, a as ve, b as ye, d as q, f as be, h as xe, i as Se, l as Ce, m as we, p as Te, t as Ee, u as De, v as Oe, w as ke, x as Ae, y as je } from "./canvas-viewer-mechanics-B3A7KLLi.js";
4
- import { a as Me, i as Ne, t as Pe } from "./bounded-raw-part-cache-DVx3Camo.js";
5
- import { A as Fe, C as Ie, D as Le, _ as J, c as Re, h as ze, hn as Be, in as Ve, j as He, l as Ue, o as We, on as Ge, s as Ke, sn as qe, v as Je, w as Ye } from "./plot-area-frame-D5hEOgkJ.js";
6
- import { l as Xe, s as Ze } from "./pixel-budget-Dgjw269h.js";
7
- import { a as Qe, i as Y, r as $e } from "./units-EJdC96r6.js";
8
- import { L as et } from "./three-d-YYghQndN.js";
9
- import { k as tt } from "./renderer-XFSCOT6m.js";
10
- import { i as nt, s as rt } from "./raster-target-ojDdQizC.js";
11
- import { a as it } from "./resource-measurement-Do07ZRcR.js";
12
- import { n as at } from "./renderer-module-contract-Cu-GKuPd.js";
13
- import { n as ot, r as st, t as ct } from "./visible-index-DPoQYSDt.js";
14
- import { n as lt } from "./line-metrics-CBbw80Ko.js";
15
- import { a as ut, c as dt, d as ft, f as pt, i as mt, l as ht, m as gt, n as _t, o as vt, p as yt, s as bt, t as xt, u as St } from "./worksheet-pull-client-eDiHHEG2.js";
2
+ import { $ as t, A as n, B as r, Bt as i, C as a, Ct as o, D as s, E as c, Ft as l, Ht as u, It as d, L as f, Lt as p, Mt as m, Q as h, Qt as g, R as _, St as v, Tt as y, U as b, Ut as x, Vt as S, Wt as C, Zt as w, _ as T, a as E, b as D, bt as O, c as k, cn as A, d as j, et as M, f as N, ft as P, h as ee, ht as te, it as F, j as I, k as L, l as R, lt as z, m as B, nt as V, o as ne, p as H, r as U, rt as re, sn as W, tt as ie, u as ae, ut as oe, w as se, wt as ce, x as le, xt as ue, yt as de, z as fe, zt as pe } from "./hyperlink-BR1NCO7S.js";
3
+ import { C as me, D as G, M as K, N as he, O as ge, S as _e, T as ve, _ as ye, a as q, b as be, d as xe, f as Se, h as Ce, i as we, l as Te, m as Ee, p as De, t as Oe, u as ke, v as Ae, w as je, x as Me, y as Ne } from "./canvas-viewer-mechanics-DN5SqWGS.js";
4
+ import { A as Pe, C as Fe, D as Ie, _ as J, c as Le, h as Re, hn as ze, in as Be, j as Ve, l as He, o as Ue, on as We, s as Ge, sn as Ke, v as qe, w as Je } from "./plot-area-frame-D5hEOgkJ.js";
5
+ import { l as Ye, s as Xe } from "./pixel-budget-Dgjw269h.js";
6
+ import { a as Ze, i as Y, r as Qe } from "./units-EJdC96r6.js";
7
+ import { L as $e } from "./three-d-YYghQndN.js";
8
+ import { k as et } from "./renderer-XFSCOT6m.js";
9
+ import { i as tt, s as nt } from "./raster-target-ojDdQizC.js";
10
+ import { a as rt } from "./resource-measurement-CclArDRs.js";
11
+ import { n as it } from "./renderer-module-contract-Cu-GKuPd.js";
12
+ import { n as at, r as ot, t as st } from "./visible-index-DPoQYSDt.js";
13
+ import { n as ct } from "./line-metrics-CBbw80Ko.js";
14
+ import { t as lt } from "./bounded-raw-part-cache-BfbSxRIL.js";
15
+ import { a as ut, c as dt, d as ft, f as pt, i as mt, l as ht, m as gt, n as _t, o as vt, p as yt, s as bt, t as xt, u as St } from "./worksheet-pull-client-CAvuf22q.js";
16
16
  //#region packages/core/src/sparkline/renderer.ts
17
17
  function Ct(e, t, n) {
18
18
  let { values: r } = n;
@@ -36,7 +36,7 @@ function Ct(e, t, n) {
36
36
  e.moveTo(s, t), e.lineTo(s + l, t), e.stroke(), e.restore();
37
37
  }
38
38
  let v = r.length, y = (e) => v === 1 ? s + l / 2 : s + e / (v - 1) * l;
39
- e.save(), e.strokeStyle = i, e.lineCap = "round", e.lineJoin = "round", e.lineWidth = (n.lineWeight ?? .75) * Qe, e.beginPath();
39
+ e.save(), e.strokeStyle = i, e.lineCap = "round", e.lineJoin = "round", e.lineWidth = (n.lineWeight ?? .75) * Ze, e.beginPath();
40
40
  let b = !1, x = n.displayEmptyCellsAs ?? "gap";
41
41
  for (let t = 0; t < v; t++) {
42
42
  let n = r[t];
@@ -99,7 +99,7 @@ function Et(e, t, n, r, i, a) {
99
99
  //#endregion
100
100
  //#region packages/core/src/text/bidi/segments.ts
101
101
  function Dt(e, t) {
102
- return e === !0 ? "rtl" : e === !1 ? "ltr" : n().computeLevels(t, "auto").paragraphLevel === 1 ? "rtl" : "ltr";
102
+ return e === !0 ? "rtl" : e === !1 ? "ltr" : I().computeLevels(t, "auto").paragraphLevel === 1 ? "rtl" : "ltr";
103
103
  }
104
104
  //#endregion
105
105
  //#region packages/xlsx/src/worker.ts?worker&inline
@@ -649,16 +649,16 @@ function dn(e) {
649
649
  }
650
650
  function fn() {
651
651
  let e = /* @__PURE__ */ new Date();
652
- return Ue(new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())), !1);
652
+ return He(new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())), !1);
653
653
  }
654
654
  function pn() {
655
- return Ue(new Date(Date.now()), !1);
655
+ return He(new Date(Date.now()), !1);
656
656
  }
657
657
  function mn(e, t, n) {
658
- return Math.floor(Ue(new Date(Date.UTC(e, t - 1, n)), !1));
658
+ return Math.floor(He(new Date(Date.UTC(e, t - 1, n)), !1));
659
659
  }
660
660
  function hn(e) {
661
- return Re(Math.floor(e), !1);
661
+ return Le(Math.floor(e), !1);
662
662
  }
663
663
  function gn(e) {
664
664
  let t = hn(e);
@@ -828,7 +828,7 @@ function On(e) {
828
828
  };
829
829
  }
830
830
  function kn(e, t, n = !1) {
831
- let r = Re(e, n), i = r.getUTCFullYear(), a = r.getUTCMonth() + 1, o = r.getUTCDate(), s = r.getUTCDay(), c = r.getUTCHours(), l = r.getUTCMinutes(), u = r.getUTCSeconds(), d = t.split(";")[0], f = /am\/pm|a\/p/i.test(d), p = null, m = () => p ??= On(r), h = "", g = 0, _ = !1;
831
+ let r = Le(e, n), i = r.getUTCFullYear(), a = r.getUTCMonth() + 1, o = r.getUTCDate(), s = r.getUTCDay(), c = r.getUTCHours(), l = r.getUTCMinutes(), u = r.getUTCSeconds(), d = t.split(";")[0], f = /am\/pm|a\/p/i.test(d), p = null, m = () => p ??= On(r), h = "", g = 0, _ = !1;
832
832
  for (; g < d.length;) {
833
833
  let t = d[g];
834
834
  if (t === "\"") {
@@ -915,7 +915,7 @@ function In(e) {
915
915
  return t ? `-${i}` : i;
916
916
  }
917
917
  function Ln(e, t, n, r = !1) {
918
- if (t === 14 && !n) return { text: We(e, r) };
918
+ if (t === 14 && !n) return { text: Ue(e, r) };
919
919
  let i = Sn[t];
920
920
  if (i) return { text: kn(e, i, r) };
921
921
  if (n && n.trim().toLowerCase() === "general") return { text: In(e) };
@@ -1148,11 +1148,11 @@ function Jn(e, t, n) {
1148
1148
  }
1149
1149
  if (r.exp) {
1150
1150
  let e = Math.max(r.intSpec.length, 1), t = r.fracSpec.length, n = 0, i = 0;
1151
- o !== 0 && (i = Math.floor(Math.log10(o)), i = Math.floor(i / e) * e, n = o / 10 ** i, parseFloat(Ke(n, t)) >= 10 ** e && (i += e, n = o / 10 ** i));
1152
- let [s, c = ""] = Ke(n, t).split(".");
1151
+ o !== 0 && (i = Math.floor(Math.log10(o)), i = Math.floor(i / e) * e, n = o / 10 ** i, parseFloat(Ge(n, t)) >= 10 ** e && (i += e, n = o / 10 ** i));
1152
+ let [s, c = ""] = Ge(n, t).split(".");
1153
1153
  return a + Yn(r, Gn(s, r.intSpec, !1), Kn(c, r.fracSpec), "E" + (i < 0 ? "-" : r.exp.plus ? "+" : "") + String(Math.abs(i)).padStart(r.exp.width, "0"));
1154
1154
  }
1155
- let s = r.fracSpec.length, [c, l = ""] = Ke(o, s).split("."), u = c.replace(/^0+/, ""), d = /[0]/.test(r.intSpec) || r.intSpec === "" && !1;
1155
+ let s = r.fracSpec.length, [c, l = ""] = Ge(o, s).split("."), u = c.replace(/^0+/, ""), d = /[0]/.test(r.intSpec) || r.intSpec === "" && !1;
1156
1156
  return u === "" && d && (u = "0"), a + Yn(r, Gn(u, r.intSpec, r.grouping), Kn(l, r.fracSpec), "");
1157
1157
  }
1158
1158
  function Yn(e, t, n, r) {
@@ -1200,10 +1200,10 @@ function Xn(e, t) {
1200
1200
  }
1201
1201
  //#endregion
1202
1202
  //#region packages/xlsx/src/renderer-coordinate-index.ts
1203
- var Zn = T;
1203
+ var Zn = g;
1204
1204
  function Qn(e, t) {
1205
1205
  let n = Zn;
1206
- return new ae(`XLSX renderer ${e.resource} exceeded its hard limit of ${n} entries`, {
1206
+ return new A(`XLSX renderer ${e.resource} exceeded its hard limit of ${n} entries`, {
1207
1207
  stage: "rendering",
1208
1208
  violation: {
1209
1209
  format: "xlsx",
@@ -1469,29 +1469,29 @@ var vr = (e) => {
1469
1469
  return typeof t == "string" ? t : void 0;
1470
1470
  };
1471
1471
  function yr(e, t) {
1472
- let n = e === 2 || F(t);
1472
+ let r = e === 2 || n(t);
1473
1473
  return {
1474
- needBidi: n,
1475
- baseRtl: n && _r(e, t)
1474
+ needBidi: r,
1475
+ baseRtl: r && _r(e, t)
1476
1476
  };
1477
1477
  }
1478
1478
  function br(e, t) {
1479
- let r = e.length;
1480
- if (r === 0) return {
1479
+ let n = e.length;
1480
+ if (n === 0) return {
1481
1481
  order: [],
1482
1482
  rtl: []
1483
1483
  };
1484
- let i = "", a = Array(r);
1485
- for (let t = 0; t < r; t++) {
1486
- a[t] = i.length;
1484
+ let r = "", i = Array(n);
1485
+ for (let t = 0; t < n; t++) {
1486
+ i[t] = r.length;
1487
1487
  let n = vr(e[t]) ?? "";
1488
- i += n.length > 0 ? n : "";
1488
+ r += n.length > 0 ? n : "";
1489
1489
  }
1490
- let { levels: o, paragraphLevel: s } = n().computeLevels(i, t ? "rtl" : "ltr"), { order: c, segLevels: l } = p(o, s, a), u = Array(r);
1491
- for (let e = 0; e < r; e++) u[e] = (l[e] & 1) == 1;
1490
+ let { levels: a, paragraphLevel: o } = I().computeLevels(r, t ? "rtl" : "ltr"), { order: s, segLevels: c } = L(a, o, i), l = Array(n);
1491
+ for (let e = 0; e < n; e++) l[e] = (c[e] & 1) == 1;
1492
1492
  return {
1493
- order: c,
1494
- rtl: u
1493
+ order: s,
1494
+ rtl: l
1495
1495
  };
1496
1496
  }
1497
1497
  function xr(e, t = 8) {
@@ -1501,10 +1501,10 @@ function Sr(e, t = 8) {
1501
1501
  return e / t;
1502
1502
  }
1503
1503
  function Cr(e) {
1504
- return Math.round(e * Qe);
1504
+ return Math.round(e * Ze);
1505
1505
  }
1506
1506
  function wr(e) {
1507
- return e / Qe;
1507
+ return e / Ze;
1508
1508
  }
1509
1509
  //#endregion
1510
1510
  //#region packages/xlsx/src/internal/grid-axis-geometry.ts
@@ -1785,25 +1785,25 @@ function kr(e, t) {
1785
1785
  //#endregion
1786
1786
  //#region packages/xlsx/src/vertical-text.ts
1787
1787
  function Ar(e, t, n, r, i, a = !1) {
1788
- let o = t.codePointAt(0) ?? 0, s = se(o);
1789
- if (a && ee(o)) {
1790
- e.save(), e.translate(n, r + i / 2), e.textAlign = "center", e.textBaseline = "middle", re(e, () => e.fillText(t, 0, 0)), e.restore();
1788
+ let o = t.codePointAt(0) ?? 0, s = ae(o);
1789
+ if (a && j(o)) {
1790
+ e.save(), e.translate(n, r + i / 2), e.textAlign = "center", e.textBaseline = "middle", ne(e, () => e.fillText(t, 0, 0)), e.restore();
1791
1791
  return;
1792
1792
  }
1793
1793
  if (s === "Tr") {
1794
- let a = A(o);
1794
+ let a = k(o);
1795
1795
  if (a !== null) {
1796
1796
  e.fillText(String.fromCodePoint(a), n, r);
1797
1797
  return;
1798
1798
  }
1799
- if (te(o)) {
1799
+ if (N(o)) {
1800
1800
  e.fillText(t, n, r);
1801
1801
  return;
1802
1802
  }
1803
1803
  e.save(), e.translate(n, r + i / 2), e.rotate(Math.PI / 2), e.textAlign = "center", e.textBaseline = "middle", e.fillText(t, 0, 0), e.restore();
1804
1804
  return;
1805
1805
  }
1806
- let c = s === "Tu" ? I(o) : null;
1806
+ let c = s === "Tu" ? R(o) : null;
1807
1807
  e.fillText(c === null ? t : String.fromCodePoint(c), n, r);
1808
1808
  }
1809
1809
  //#endregion
@@ -1829,12 +1829,12 @@ function Fr(e, t, n) {
1829
1829
  function Ir(e, t) {
1830
1830
  return t ? `${e}|duo:${t.clr1}:${t.clr2}` : e;
1831
1831
  }
1832
- var Lr = m.map((e) => `"${e}"`).join(", "), Rr = s.map((e) => `"${e}"`).join(", "), zr = `"Calibri", "Carlito", "Cambria", "Caladea", Arial, "Noto Naskh Arabic", "Noto Sans Arabic", ${Lr}, sans-serif`, Br = `"Cambria", "Caladea", "Times New Roman", "Liberation Serif", "Noto Naskh Arabic", "Noto Sans Arabic", ${Rr}, serif`, Vr = "\"Courier New\", \"Liberation Mono\", monospace";
1832
+ var Lr = l.map((e) => `"${e}"`).join(", "), Rr = d.map((e) => `"${e}"`).join(", "), zr = `"Calibri", "Carlito", "Cambria", "Caladea", Arial, "Noto Naskh Arabic", "Noto Sans Arabic", ${Lr}, sans-serif`, Br = `"Cambria", "Caladea", "Times New Roman", "Liberation Serif", "Noto Naskh Arabic", "Noto Sans Arabic", ${Rr}, serif`, Vr = "\"Courier New\", \"Liberation Mono\", monospace";
1833
1833
  function Hr(e) {
1834
- let t = e ? me(e) : null, n = r(e);
1834
+ let t = e ? i(e) : null, n = S(e);
1835
1835
  if (!t) return n === "serif" ? Br : n === "mono" ? Vr : zr;
1836
- let i = n === "serif", a = S(e), o = [...a ? [a] : [], ..._(t, i ? "serif" : "sans").filter((e) => e !== a)].map((e) => `"${e}"`).join(", ");
1837
- return `${o ? `${o}, ` : ""}"Calibri", "Carlito", "Cambria", "Caladea", Arial, "Noto Naskh Arabic", "Noto Sans Arabic", ${i ? Rr : Lr}, ${i ? "serif" : "sans-serif"}`;
1836
+ let r = n === "serif", a = u(e), o = [...a ? [a] : [], ...pe(t, r ? "serif" : "sans").filter((e) => e !== a)].map((e) => `"${e}"`).join(", ");
1837
+ return `${o ? `${o}, ` : ""}"Calibri", "Carlito", "Cambria", "Caladea", Arial, "Noto Naskh Arabic", "Noto Sans Arabic", ${r ? Rr : Lr}, ${r ? "serif" : "sans-serif"}`;
1838
1838
  }
1839
1839
  function Ur(e) {
1840
1840
  let t = e?.trim();
@@ -1849,7 +1849,7 @@ function Kr(e, t, n, r) {
1849
1849
  }
1850
1850
  var qr = "#7a7a7a";
1851
1851
  function Jr(e, t) {
1852
- let n = t * Qe, r = typeof OffscreenCanvas < "u" ? new OffscreenCanvas(1, 1) : typeof document < "u" ? document.createElement("canvas") : null;
1852
+ let n = t * Ze, r = typeof OffscreenCanvas < "u" ? new OffscreenCanvas(1, 1) : typeof document < "u" ? document.createElement("canvas") : null;
1853
1853
  if (!r) return 8;
1854
1854
  let i = r.getContext("2d");
1855
1855
  if (!i) return 8;
@@ -2066,7 +2066,7 @@ function ei(e, t, n, r) {
2066
2066
  if (Qr.has(s)) return Qr.get(s);
2067
2067
  let c = $r[t];
2068
2068
  if (!c) return Qr.set(s, null), null;
2069
- let l = c.length, u = Be(l, l);
2069
+ let l = c.length, u = ze(l, l);
2070
2070
  if (!u) return Qr.set(s, null), null;
2071
2071
  let d = u.getContext("2d");
2072
2072
  if (!d) return Qr.set(s, null), null;
@@ -2121,11 +2121,11 @@ function ai(e, t, n) {
2121
2121
  return `rgb(${Math.round(a * d + c * (1 - d))},${Math.round(o * d + l * (1 - d))},${Math.round(s * d + u * (1 - d))})`;
2122
2122
  }
2123
2123
  function $(e, t, n = 1, r) {
2124
- let i = Math.round(e * Qe * n * t);
2125
- return r ? Math.max(i, Math.round(lt(r, e * Qe * t))) : i;
2124
+ let i = Math.round(e * Ze * n * t);
2125
+ return r ? Math.max(i, Math.round(ct(r, e * Ze * t))) : i;
2126
2126
  }
2127
2127
  function oi(e, t = 1) {
2128
- return `${e.italic ? "italic " : ""}${e.bold ? "bold " : ""}${Math.max(1, Math.round(e.size * Qe * t))}px ${Ur(e.name)}`;
2128
+ return `${e.italic ? "italic " : ""}${e.bold ? "bold " : ""}${Math.max(1, Math.round(e.size * Ze * t))}px ${Ur(e.name)}`;
2129
2129
  }
2130
2130
  function si(e, t, n, r, i, a, o, s, c, l) {
2131
2131
  if (t.length === 0) return;
@@ -2164,10 +2164,10 @@ function ci(e, t, n) {
2164
2164
  }
2165
2165
  function li(e, t, n, r, i, a, o = 1) {
2166
2166
  if (e.save(), e.strokeStyle = i, e.lineWidth = .5, e.beginPath(), a) {
2167
- let i = r - 1, a = r + 1, s = i + w(i, .5, o), c = a + w(a, .5, o);
2167
+ let i = r - 1, a = r + 1, s = i + h(i, .5, o), c = a + h(a, .5, o);
2168
2168
  e.moveTo(t, s), e.lineTo(n, s), e.moveTo(t, c), e.lineTo(n, c);
2169
2169
  } else {
2170
- let i = r + w(r, .5, o);
2170
+ let i = r + h(r, .5, o);
2171
2171
  e.moveTo(t, i), e.lineTo(n, i);
2172
2172
  }
2173
2173
  e.stroke(), e.restore();
@@ -2239,13 +2239,13 @@ function mi(e, t, n) {
2239
2239
  function hi(e, t) {
2240
2240
  if (e.length === 0 || t.length === 0) return 0;
2241
2241
  let n = [...e, ...t], r = e.length;
2242
- return r - b(n, r, o, 1);
2242
+ return r - c(n, r, s, 1);
2243
2243
  }
2244
2244
  function gi(e, t) {
2245
2245
  let n = t;
2246
2246
  for (; n < e.length;) {
2247
- let t = e[e.length - n - 1], r = e[e.length - n], a = t?.codePointAt(0), o = r?.codePointAt(0);
2248
- if (a !== void 0 && o !== void 0 && i(a) && i(o)) n++;
2247
+ let t = e[e.length - n - 1], r = e[e.length - n], i = t?.codePointAt(0), a = r?.codePointAt(0);
2248
+ if (i !== void 0 && a !== void 0 && se(i) && se(a)) n++;
2249
2249
  else break;
2250
2250
  }
2251
2251
  return n >= e.length ? t : n;
@@ -2253,128 +2253,128 @@ function gi(e, t) {
2253
2253
  function _i(e, t) {
2254
2254
  if (e.length === 0 || t.length === 0) return 0;
2255
2255
  let n = t[0].codePointAt(0), r = e.length - 1, i = e[r].codePointAt(0);
2256
- if (i === void 0 || n === void 0 || i === 8203 || n === 8203 || !ue(i, n)) return 0;
2256
+ if (i === void 0 || n === void 0 || i === 8203 || n === 8203 || !le(i, n)) return 0;
2257
2257
  for (; r > 0;) {
2258
2258
  let t = e[r - 1].codePointAt(0), n = e[r].codePointAt(0);
2259
- if (t === void 0 || n === void 0 || !ue(t, n)) break;
2259
+ if (t === void 0 || n === void 0 || !le(t, n)) break;
2260
2260
  r--;
2261
2261
  }
2262
2262
  return r === 0 ? 0 : e.length - r;
2263
2263
  }
2264
2264
  function vi(e, t, n) {
2265
- let r = [], i = [], a = 0;
2266
- for (; a < t.length;) {
2267
- let e = t[a], n = e.codePointAt(0) ?? 0;
2268
- if (v(n)) i.push(e), a += n > 65535 ? 2 : 1;
2265
+ let r = [], i = [], o = 0;
2266
+ for (; o < t.length;) {
2267
+ let e = t[o], n = e.codePointAt(0) ?? 0;
2268
+ if (a(n)) i.push(e), o += n > 65535 ? 2 : 1;
2269
2269
  else if (e === " ") {
2270
- let e = a;
2270
+ let e = o;
2271
2271
  for (; e < t.length && t[e] === " ";) e++;
2272
- i.push(t.slice(a, e)), a = e;
2272
+ i.push(t.slice(o, e)), o = e;
2273
2273
  } else {
2274
- let e = a;
2274
+ let e = o;
2275
2275
  for (; e < t.length;) {
2276
2276
  let n = t[e], r = n.codePointAt(0) ?? 0;
2277
- if (n === " " || v(r)) break;
2277
+ if (n === " " || a(r)) break;
2278
2278
  e += r > 65535 ? 2 : 1;
2279
2279
  }
2280
- let n = t.slice(a, e), r = H(n) ? O(n) : null;
2280
+ let n = t.slice(o, e), r = H(n) ? D(n) : null;
2281
2281
  if (r && r.length > 0) {
2282
2282
  let e = 0;
2283
2283
  for (let t of r) i.push(n.slice(e, t)), e = t;
2284
2284
  i.push(n.slice(e));
2285
2285
  } else i.push(n);
2286
- a = e;
2286
+ o = e;
2287
2287
  }
2288
2288
  }
2289
- let o = "";
2289
+ let s = "";
2290
2290
  for (let t of i) {
2291
- if (o === "") {
2292
- o = t;
2291
+ if (s === "") {
2292
+ s = t;
2293
2293
  continue;
2294
2294
  }
2295
- let i = o + t;
2296
- if (e.measureText(i).width <= n) o = i;
2295
+ let i = s + t;
2296
+ if (e.measureText(i).width <= n) s = i;
2297
2297
  else {
2298
2298
  let e = t.replace(/^ +/, "");
2299
2299
  e === "" && (e = t);
2300
- let n = [...o], i = hi(n, [...e]);
2300
+ let n = [...s], i = hi(n, [...e]);
2301
2301
  if (i > 0) {
2302
2302
  let t = n.length - i;
2303
- r.push(n.slice(0, t).join("")), o = n.slice(t).join("") + e;
2304
- } else r.push(o), o = e;
2303
+ r.push(n.slice(0, t).join("")), s = n.slice(t).join("") + e;
2304
+ } else r.push(s), s = e;
2305
2305
  }
2306
2306
  }
2307
- return r.push(o), r;
2307
+ return r.push(s), r;
2308
2308
  }
2309
2309
  function yi(e, t, n, r, i) {
2310
- let a = [], o = [], s = 0, c = 0, l = null, u = n.size, d = n.name, f = 0, p = () => {
2311
- o.length !== 0 && (a.push({
2312
- segments: o,
2313
- maxFontSize: c,
2314
- maxFontFamily: l,
2315
- para: f
2316
- }), o = [], s = 0, c = 0, l = null);
2317
- }, m = () => {
2318
- if (o.length === 0) {
2319
- a.push({
2310
+ let o = [], s = [], c = 0, l = 0, u = null, d = n.size, f = n.name, p = 0, m = () => {
2311
+ s.length !== 0 && (o.push({
2312
+ segments: s,
2313
+ maxFontSize: l,
2314
+ maxFontFamily: u,
2315
+ para: p
2316
+ }), s = [], c = 0, l = 0, u = null);
2317
+ }, h = () => {
2318
+ if (s.length === 0) {
2319
+ o.push({
2320
2320
  segments: [],
2321
- maxFontSize: u || Wr,
2322
- maxFontFamily: d,
2323
- para: f
2321
+ maxFontSize: d || Wr,
2322
+ maxFontFamily: f,
2323
+ para: p
2324
2324
  });
2325
2325
  return;
2326
2326
  }
2327
- p();
2328
- }, h = (t, n) => {
2327
+ m();
2328
+ }, g = (t, n) => {
2329
2329
  if (!t) return;
2330
- u = n.size, d = n.name, e.font = oi(Si(n), r);
2330
+ d = n.size, f = n.name, e.font = oi(Si(n), r);
2331
2331
  let a = e.measureText(t).width;
2332
- if (o.length > 0 && s + a > i) {
2333
- let i = o.flatMap((e) => [...e.text]), a = hi(i, [...t]);
2334
- a > 0 ? a = gi(i, a) : !H(t) && !H(o[o.length - 1]?.text ?? "") && !/^\s/u.test(t) && !/\s$/u.test(i.at(-1) ?? "") && (a = _i(i, [...t]));
2335
- let u = o[o.length - 1], d = [...u.text];
2332
+ if (s.length > 0 && c + a > i) {
2333
+ let i = s.flatMap((e) => [...e.text]), a = hi(i, [...t]);
2334
+ a > 0 ? a = gi(i, a) : !H(t) && !H(s[s.length - 1]?.text ?? "") && !/^\s/u.test(t) && !/\s$/u.test(i.at(-1) ?? "") && (a = _i(i, [...t]));
2335
+ let o = s[s.length - 1], d = [...o.text];
2336
2336
  a > d.length && (a = d.length);
2337
2337
  let f = null;
2338
2338
  if (a > 0) {
2339
2339
  let t = d.slice(0, d.length - a), n = d.slice(d.length - a);
2340
- if (e.font = oi(Si(u.font), r), t.length === 0) o.pop();
2340
+ if (e.font = oi(Si(o.font), r), t.length === 0) s.pop();
2341
2341
  else {
2342
2342
  let n = t.join("");
2343
- u.text = n, u.width = e.measureText(n).width;
2343
+ o.text = n, o.width = e.measureText(n).width;
2344
2344
  }
2345
2345
  let i = n.join("");
2346
2346
  f = {
2347
2347
  text: i,
2348
- font: u.font,
2348
+ font: o.font,
2349
2349
  width: e.measureText(i).width
2350
2350
  };
2351
2351
  }
2352
- p(), f && (o.push(f), s += f.width, f.font.size > c && (c = f.font.size, l = f.font.name)), e.font = oi(Si(n), r);
2352
+ m(), f && (s.push(f), c += f.width, f.font.size > l && (l = f.font.size, u = f.font.name)), e.font = oi(Si(n), r);
2353
2353
  }
2354
- o.push({
2354
+ s.push({
2355
2355
  text: t,
2356
2356
  font: n,
2357
2357
  width: a
2358
- }), s += a, n.size > c && (c = n.size, l = n.name);
2359
- }, g = (t, n) => {
2360
- let a = O(t);
2358
+ }), c += a, n.size > l && (l = n.size, u = n.name);
2359
+ }, _ = (t, n) => {
2360
+ let a = D(t);
2361
2361
  if (a.length === 0) {
2362
- h(t, n);
2362
+ g(t, n);
2363
2363
  return;
2364
2364
  }
2365
2365
  e.font = oi(Si(n), r);
2366
- let o = (t) => e.measureText(t).width, c = E(t), l = t.length, u = 0;
2366
+ let o = (t) => e.measureText(t).width, s = T(t), l = t.length, u = 0;
2367
2367
  for (; u < l;) {
2368
- let e = i - s, r = R(t, a, u, e, o, c);
2368
+ let e = i - c, r = B(t, a, u, e, o, s);
2369
2369
  if (r <= u) {
2370
- if (s > 0) {
2371
- p();
2370
+ if (c > 0) {
2371
+ m();
2372
2372
  continue;
2373
2373
  }
2374
- let n = a.find((e) => e > u) ?? l, i = t.slice(u, n), d = ne(i), f = R(i, d, 0, e, o, c);
2374
+ let n = a.find((e) => e > u) ?? l, i = t.slice(u, n), d = ee(i), f = B(i, d, 0, e, o, s);
2375
2375
  f <= 0 && (f = d.length > 0 ? d[0] : i.length), r = u + f;
2376
2376
  }
2377
- h(t.slice(u, r), n), u = r, u < l && p();
2377
+ g(t.slice(u, r), n), u = r, u < l && m();
2378
2378
  }
2379
2379
  };
2380
2380
  for (let e of t) {
@@ -2382,7 +2382,7 @@ function yi(e, t, n, r, i) {
2382
2382
  for (; i < e.text.length;) {
2383
2383
  let t = e.text[i], n = t.codePointAt(0) ?? 0;
2384
2384
  if (n === 10) r.push("\n"), i += 1;
2385
- else if (v(n)) r.push(t), i += n > 65535 ? 2 : 1;
2385
+ else if (a(n)) r.push(t), i += n > 65535 ? 2 : 1;
2386
2386
  else if (t === " ") {
2387
2387
  let t = i;
2388
2388
  for (; t < e.text.length && e.text[t] === " ";) t++;
@@ -2391,15 +2391,15 @@ function yi(e, t, n, r, i) {
2391
2391
  let t = i;
2392
2392
  for (; t < e.text.length;) {
2393
2393
  let n = e.text[t], r = n.codePointAt(0) ?? 0;
2394
- if (n === " " || n === "\n" || v(r)) break;
2394
+ if (n === " " || n === "\n" || a(r)) break;
2395
2395
  t += r > 65535 ? 2 : 1;
2396
2396
  }
2397
2397
  r.push(e.text.slice(i, t)), i = t;
2398
2398
  }
2399
2399
  }
2400
- for (let e of r) e === "\n" ? (m(), f++) : H(e) ? g(e, t) : h(e, t);
2400
+ for (let e of r) e === "\n" ? (h(), p++) : H(e) ? _(e, t) : g(e, t);
2401
2401
  }
2402
- return (o.length > 0 || a.length > 0) && m(), a;
2402
+ return (s.length > 0 || o.length > 0) && h(), o;
2403
2403
  }
2404
2404
  function bi(e, t, n) {
2405
2405
  return e === "middle" ? {
@@ -2444,17 +2444,17 @@ function Ci(e, t, n, r, i, a, o, s) {
2444
2444
  e.font = oi(p, a);
2445
2445
  let m = s.fontColor ?? f.font.color;
2446
2446
  e.fillStyle = m ? J(m) : "#000000";
2447
- let h = $(f.font.size, a), g = 0;
2448
- f.font.vertAlign === "superscript" ? g = -Math.round(h * .35) : f.font.vertAlign === "subscript" && (g = Math.round(h * .1)), e.fillText(f.text, u, r + g);
2449
- let _ = $(p.size, a);
2447
+ let g = $(f.font.size, a), _ = 0;
2448
+ f.font.vertAlign === "superscript" ? _ = -Math.round(g * .35) : f.font.vertAlign === "subscript" && (_ = Math.round(g * .1)), e.fillText(f.text, u, r + _);
2449
+ let v = $(p.size, a);
2450
2450
  if (f.font.underline || f.font.strike) {
2451
- let t = bi(i, r, _);
2451
+ let t = bi(i, r, v);
2452
2452
  if (f.font.underline) {
2453
2453
  let n = m ? J(m) : "#000000", r = f.font.underlineStyle === "double" || f.font.underlineStyle === "doubleAccounting";
2454
- li(e, u, u + f.width, t.underline + g, n, r, o);
2454
+ li(e, u, u + f.width, t.underline + _, n, r, o);
2455
2455
  }
2456
2456
  if (f.font.strike) {
2457
- let n = t.strike + g, r = n + w(n, .5, o);
2457
+ let n = t.strike + _, r = n + h(n, .5, o);
2458
2458
  e.save(), e.strokeStyle = m ? J(m) : "#000000", e.lineWidth = .5, e.beginPath(), e.moveTo(u, r), e.lineTo(u + f.width, r), e.stroke(), e.restore();
2459
2459
  }
2460
2460
  }
@@ -2661,395 +2661,395 @@ function Bi(e) {
2661
2661
  let n = parseInt(t.slice(0, 2), 16), r = parseInt(t.slice(2, 4), 16), i = parseInt(t.slice(4, 6), 16), a = (e) => Math.round(e * .2 + 255 * .8), o = (e) => e.toString(16).padStart(2, "0").toUpperCase();
2662
2662
  return `#${o(a(n))}${o(a(r))}${o(a(i))}`;
2663
2663
  }
2664
- function Vi(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
2665
- if (m <= 0 || h <= 0) return;
2666
- let { styles: g, cellMap: _, mergeAnchorMap: v, mergeSkipSet: y, cfContext: b, cs: x, dpr: S } = t, C = i.length, T = a.length, E = new Set(s), O = new Set(o), k = (e, n) => t.rtl ? Gr(e, n, t.canvasW) : e, A = [], j = -c;
2667
- for (let e = 0; e < C; e++) A.push(j), j += i[e];
2668
- let M = [], N = -l;
2669
- for (let e = 0; e < T; e++) M.push(N), N += a[e];
2670
- e.save(), e.beginPath(), e.rect(k(f, m), p, m, h), e.clip();
2671
- let te = [], ne = [], P = [];
2664
+ function Vi(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, g) {
2665
+ if (m <= 0 || g <= 0) return;
2666
+ let { styles: _, cellMap: v, mergeAnchorMap: y, mergeSkipSet: b, cfContext: x, cs: S, dpr: C } = t, w = i.length, T = a.length, D = new Set(s), O = new Set(o), k = (e, n) => t.rtl ? Gr(e, n, t.canvasW) : e, A = [], M = -c;
2667
+ for (let e = 0; e < w; e++) A.push(M), M += i[e];
2668
+ let N = [], P = -l;
2669
+ for (let e = 0; e < T; e++) N.push(P), P += a[e];
2670
+ e.save(), e.beginPath(), e.rect(k(f, m), p, m, g), e.clip();
2671
+ let ee = [], te = [], F = [];
2672
2672
  for (let i of t.worksheet.mergeCells ?? []) {
2673
2673
  let a = i.top, f = i.left;
2674
- if (E.has(a) && O.has(f) || !s.some((e) => e >= i.top && e <= i.bottom) || !o.some((e) => e >= i.left && e <= i.right)) continue;
2674
+ if (D.has(a) && O.has(f) || !s.some((e) => e >= i.top && e <= i.bottom) || !o.some((e) => e >= i.left && e <= i.right)) continue;
2675
2675
  let p = t.mergeAnchorMap.get(`${a}:${f}`);
2676
2676
  if (!p) continue;
2677
- let m = u - c + t.colAxis.offsetOf(f) - t.colAxis.offsetOf(r), h = d - l + t.rowAxis.offsetOf(a) - t.rowAxis.offsetOf(n), _ = p.totalW, v = p.totalH;
2678
- m = k(m, _);
2679
- let y = `${a}:${f}`, C = t.cellMap.get(y), { font: w, fill: T, border: D, xf: A } = di(g, pi(t.worksheet, C, f)), j = gr(C, a, f, b, g.dxfs ?? []);
2680
- if (ti(e, j.fill ?? T, m, h, _, v), j.dataBar && j.dataBar.ratio > 0) {
2681
- let t = Math.max(0, (_ - 4) * j.dataBar.ratio);
2677
+ let m = u - c + t.colAxis.offsetOf(f) - t.colAxis.offsetOf(r), h = d - l + t.rowAxis.offsetOf(a) - t.rowAxis.offsetOf(n), g = p.totalW, v = p.totalH;
2678
+ m = k(m, g);
2679
+ let y = `${a}:${f}`, b = t.cellMap.get(y), { font: w, fill: T, border: E, xf: A } = di(_, pi(t.worksheet, b, f)), j = gr(b, a, f, x, _.dxfs ?? []);
2680
+ if (ti(e, j.fill ?? T, m, h, g, v), j.dataBar && j.dataBar.ratio > 0) {
2681
+ let t = Math.max(0, (g - 4) * j.dataBar.ratio);
2682
2682
  Xr(e, j.dataBar.color, m + 2, h + 2, t, v - 4, j.dataBar.gradient);
2683
2683
  }
2684
- let ee = Ca(Sa(D, a, f, p.right, p.bottom, t.cellMap, g), j.border);
2685
- if (ne.push(() => Ta(e, ee, m, h, _, v, S)), !C) continue;
2686
- let M = yn(C, g, j.numFmt, t.worksheet.date1904), N = M.text;
2687
- if (!N || N === "0" && t.worksheet.showZeros === !1) continue;
2688
- let te = w.bold || !!j.fontBold, P = w.italic || !!j.fontItalic, F = w.underline || !!j.fontUnderline, I = w.strike || !!j.fontStrike, L = te !== w.bold || P !== w.italic || F !== w.underline || I !== w.strike ? {
2684
+ let M = Ca(Sa(E, a, f, p.right, p.bottom, t.cellMap, _), j.border);
2685
+ if (te.push(() => Ta(e, M, m, h, g, v, C)), !b) continue;
2686
+ let N = yn(b, _, j.numFmt, t.worksheet.date1904), P = N.text;
2687
+ if (!P || P === "0" && t.worksheet.showZeros === !1) continue;
2688
+ let ee = w.bold || !!j.fontBold, F = w.italic || !!j.fontItalic, I = w.underline || !!j.fontUnderline, L = w.strike || !!j.fontStrike, R = ee !== w.bold || F !== w.italic || I !== w.underline || L !== w.strike ? {
2689
2689
  ...w,
2690
- bold: te,
2691
- italic: P,
2692
- underline: F,
2693
- strike: I
2690
+ bold: ee,
2691
+ italic: F,
2692
+ underline: I,
2693
+ strike: L
2694
2694
  } : w;
2695
- e.font = oi(L, x);
2696
- let R = t.hyperlinkMap.get(y) ? "#0563C1" : j.fontColor ?? M.color ?? w.color;
2697
- e.fillStyle = R ? J(R) : "#000000";
2698
- let z = C.value.type === "number", B = A.alignH ?? (z ? "right" : "left"), re = A.alignV ?? "bottom", V = A.indent ? Math.round(A.indent * 3 * t.mdw) : 0, H = 3 + (B === "left" || !A.alignH ? V : 0);
2699
- e.save(), e.beginPath(), e.rect(m, h, _, v), e.clip();
2700
- let ie;
2701
- B === "right" ? (ie = m + _ - 3, e.textAlign = "right") : B === "center" ? (ie = m + _ / 2, e.textAlign = "center") : (ie = m + H, e.textAlign = "left");
2702
- let U = C.value.type === "text" ? C.value.runs : void 0, ae = U && U.length > 0;
2703
- if (A.wrapText && ae) Ai(e, U, L, {
2704
- alignH: B,
2705
- alignV: re,
2695
+ e.font = oi(R, S);
2696
+ let z = t.hyperlinkMap.get(y) ? "#0563C1" : j.fontColor ?? N.color ?? w.color;
2697
+ e.fillStyle = z ? J(z) : "#000000";
2698
+ let B = b.value.type === "number", V = A.alignH ?? (B ? "right" : "left"), ne = A.alignV ?? "bottom", H = A.indent ? Math.round(A.indent * 3 * t.mdw) : 0, U = 3 + (V === "left" || !A.alignH ? H : 0);
2699
+ e.save(), e.beginPath(), e.rect(m, h, g, v), e.clip();
2700
+ let re;
2701
+ V === "right" ? (re = m + g - 3, e.textAlign = "right") : V === "center" ? (re = m + g / 2, e.textAlign = "center") : (re = m + U, e.textAlign = "left");
2702
+ let W = b.value.type === "text" ? b.value.runs : void 0, ie = W && W.length > 0;
2703
+ if (A.wrapText && ie) Ai(e, W, R, {
2704
+ alignH: V,
2705
+ alignV: ne,
2706
2706
  cx: m,
2707
2707
  cy: h,
2708
- cellW: _,
2708
+ cellW: g,
2709
2709
  cellH: v,
2710
- leftPad: H,
2710
+ leftPad: U,
2711
2711
  paddingX: 3,
2712
2712
  paddingY: 2
2713
- }, x, S, {
2713
+ }, S, C, {
2714
2714
  fontColor: j.fontColor,
2715
2715
  readingOrder: A.readingOrder
2716
2716
  });
2717
- else if (A.wrapText) ki(e, N, ie, L, {
2718
- alignH: B,
2719
- alignV: re,
2717
+ else if (A.wrapText) ki(e, P, re, R, {
2718
+ alignH: V,
2719
+ alignV: ne,
2720
2720
  cx: m,
2721
2721
  cy: h,
2722
- cellW: _,
2722
+ cellW: g,
2723
2723
  cellH: v,
2724
- leftPad: H,
2724
+ leftPad: U,
2725
2725
  paddingX: 3,
2726
2726
  paddingY: 2
2727
- }, x);
2728
- else if (ae) Oi(e, U, L, {
2729
- alignH: B,
2730
- alignV: re,
2727
+ }, S);
2728
+ else if (ie) Oi(e, W, R, {
2729
+ alignH: V,
2730
+ alignV: ne,
2731
2731
  cx: m,
2732
2732
  cy: h,
2733
- cellW: _,
2733
+ cellW: g,
2734
2734
  cellH: v,
2735
- leftPad: H,
2735
+ leftPad: U,
2736
2736
  paddingX: 3,
2737
2737
  paddingY: 2
2738
- }, x, S, {
2738
+ }, S, C, {
2739
2739
  fontColor: j.fontColor,
2740
2740
  readingOrder: A.readingOrder
2741
2741
  });
2742
2742
  else {
2743
2743
  let { baseline: t, textY: n } = xi({
2744
- alignH: B,
2745
- alignV: re,
2744
+ alignH: V,
2745
+ alignV: ne,
2746
2746
  cx: m,
2747
2747
  cy: h,
2748
- cellW: _,
2748
+ cellW: g,
2749
2749
  cellH: v,
2750
- leftPad: H,
2750
+ leftPad: U,
2751
2751
  paddingX: 3,
2752
2752
  paddingY: 2
2753
2753
  });
2754
- e.textBaseline = t, e.fillText(N, ie, n);
2754
+ e.textBaseline = t, e.fillText(P, re, n);
2755
2755
  }
2756
2756
  e.restore();
2757
2757
  }
2758
2758
  for (let n = 0; n < T; n++) {
2759
- let r = s[n], c = d + M[n], l = a[n];
2760
- if ((c + l <= p || c >= p + h) && !o.some((e) => {
2761
- let t = v.get(`${r}:${e}`);
2762
- return t != null && c + t.totalH > p && c < p + h;
2759
+ let r = s[n], c = d + N[n], l = a[n];
2760
+ if ((c + l <= p || c >= p + g) && !o.some((e) => {
2761
+ let t = y.get(`${r}:${e}`);
2762
+ return t != null && c + t.totalH > p && c < p + g;
2763
2763
  })) continue;
2764
- let T = /* @__PURE__ */ new Set(), E = /* @__PURE__ */ new Set(), O = -1, j = (e) => {
2764
+ let T = /* @__PURE__ */ new Set(), D = /* @__PURE__ */ new Set(), O = -1, M = (e) => {
2765
2765
  if (O >= 0 && e - O >= 2) {
2766
2766
  for (let t = O; t < e - 1; t++) T.add(t);
2767
- for (let t = O + 1; t < e; t++) E.add(t);
2767
+ for (let t = O + 1; t < e; t++) D.add(t);
2768
2768
  }
2769
2769
  O = -1;
2770
2770
  };
2771
- for (let e = 0; e <= C; e++) {
2771
+ for (let e = 0; e <= w; e++) {
2772
2772
  let n = !1, i = !1;
2773
- if (e < C) {
2773
+ if (e < w) {
2774
2774
  let a = `${r}:${o[e]}`;
2775
- if (!y.has(a) && !v.has(a)) {
2776
- let r = _.get(a);
2777
- n = di(g, pi(t.worksheet, r, o[e])).xf.alignH === "centerContinuous", i = !!(r && r.value && r.value.type !== "empty");
2775
+ if (!b.has(a) && !y.has(a)) {
2776
+ let r = v.get(a);
2777
+ n = di(_, pi(t.worksheet, r, o[e])).xf.alignH === "centerContinuous", i = !!(r && r.value && r.value.type !== "empty");
2778
2778
  }
2779
2779
  }
2780
- n ? i && O >= 0 && e > O ? (j(e), O = e) : O < 0 && (O = e) : j(e);
2781
- }
2782
- for (let a = 0; a < C; a++) {
2783
- let s = o[a], d = u + A[a], O = i[a], j = `${r}:${s}`;
2784
- if (y.has(j)) continue;
2785
- let M = v.get(j), N = M ? M.totalW : O, F = M ? M.totalH : l, I = d + N <= f || d >= f + m;
2786
- if (c + F <= p || c >= p + h || I && !t.overflowTextAnchors.has(j)) continue;
2787
- let L = k(d, N), R = _.get(j), { font: z, fill: B, border: re, xf: V } = di(g, pi(t.worksheet, R, s)), H = gr(R, r, s, b, g.dxfs ?? []), ie = H.fill ?? B, U = t.tableStyleMap.get(j), ae = g.dxfs ?? [], oe = (e) => e == null ? void 0 : ae[e], se = oe(U?.wholeTableDxf), ce = oe(U?.headerRowDxf), le = oe(U?.totalRowDxf), ue = oe(U?.firstColumnDxf), de = oe(U?.lastColumnDxf), fe = oe(U?.stripeDxf), pe = U?.isHeader && ce?.fill?.fgColor ? ce : U?.isTotals && le?.fill?.fgColor ? le : U?.isLastCol && de?.fill?.fgColor ? de : U?.isFirstCol && ue?.fill?.fgColor ? ue : fe?.fill?.fgColor ? fe : !U?.isHeader && !U?.isTotals && se?.fill?.fgColor ? se : void 0, me = ti(e, ie, L, c, N, F);
2788
- if (me || (U && pe?.fill?.fgColor ? (e.fillStyle = J(pe.fill.fgColor), e.fillRect(L, c, N, F), me = !0) : U && !U.isCustom && U.isBanded && (e.fillStyle = Bi(U.accent), e.fillRect(L, c, N, F), me = !0)), t.commentCells.has(j) && ii(e, L, c, N, F), H.dataBar && H.dataBar.ratio > 0) {
2789
- let t = Math.max(0, (N - 4) * H.dataBar.ratio);
2790
- Xr(e, H.dataBar.color, L + 2, c + 2, t, F - 4, H.dataBar.gradient);
2780
+ n ? i && O >= 0 && e > O ? (M(e), O = e) : O < 0 && (O = e) : M(e);
2781
+ }
2782
+ for (let a = 0; a < w; a++) {
2783
+ let s = o[a], d = u + A[a], O = i[a], M = `${r}:${s}`;
2784
+ if (b.has(M)) continue;
2785
+ let N = y.get(M), P = N ? N.totalW : O, I = N ? N.totalH : l, L = d + P <= f || d >= f + m;
2786
+ if (c + I <= p || c >= p + g || L && !t.overflowTextAnchors.has(M)) continue;
2787
+ let R = k(d, P), z = v.get(M), { font: B, fill: V, border: ne, xf: H } = di(_, pi(t.worksheet, z, s)), U = gr(z, r, s, x, _.dxfs ?? []), re = U.fill ?? V, W = t.tableStyleMap.get(M), ie = _.dxfs ?? [], ae = (e) => e == null ? void 0 : ie[e], oe = ae(W?.wholeTableDxf), se = ae(W?.headerRowDxf), ce = ae(W?.totalRowDxf), le = ae(W?.firstColumnDxf), ue = ae(W?.lastColumnDxf), de = ae(W?.stripeDxf), fe = W?.isHeader && se?.fill?.fgColor ? se : W?.isTotals && ce?.fill?.fgColor ? ce : W?.isLastCol && ue?.fill?.fgColor ? ue : W?.isFirstCol && le?.fill?.fgColor ? le : de?.fill?.fgColor ? de : !W?.isHeader && !W?.isTotals && oe?.fill?.fgColor ? oe : void 0, pe = ti(e, re, R, c, P, I);
2788
+ if (pe || (W && fe?.fill?.fgColor ? (e.fillStyle = J(fe.fill.fgColor), e.fillRect(R, c, P, I), pe = !0) : W && !W.isCustom && W.isBanded && (e.fillStyle = Bi(W.accent), e.fillRect(R, c, P, I), pe = !0)), t.commentCells.has(M) && ii(e, R, c, P, I), U.dataBar && U.dataBar.ratio > 0) {
2789
+ let t = Math.max(0, (P - 4) * U.dataBar.ratio);
2790
+ Xr(e, U.dataBar.color, R + 2, c + 2, t, I - 4, U.dataBar.gradient);
2791
2791
  }
2792
- let W = t.sparklineMap.get(j);
2793
- if (W && Ct(e, {
2794
- x: L,
2792
+ let me = t.sparklineMap.get(M);
2793
+ if (me && Ct(e, {
2794
+ x: R,
2795
2795
  y: c,
2796
- w: N,
2797
- h: F
2798
- }, W), t.worksheet.isChartSheet !== !0 && t.worksheet.showGridlines !== !1 && !me) {
2796
+ w: P,
2797
+ h: I
2798
+ }, me), t.worksheet.isChartSheet !== !0 && t.worksheet.showGridlines !== !1 && !pe) {
2799
2799
  if (e.strokeStyle = "#d0d0d0", e.lineWidth = .5, e.beginPath(), !T.has(a)) {
2800
- let t = L + N + w(L + N, .5, S);
2801
- e.moveTo(t, c), e.lineTo(t, c + F);
2800
+ let t = R + P + h(R + P, .5, C);
2801
+ e.moveTo(t, c), e.lineTo(t, c + I);
2802
2802
  }
2803
- let t = c + F + w(c + F, .5, S);
2804
- if (e.moveTo(L, t), e.lineTo(L + N, t), n === 0) {
2805
- let t = c + w(c, .5, S);
2806
- e.moveTo(L, t), e.lineTo(L + N, t);
2803
+ let t = c + I + h(c + I, .5, C);
2804
+ if (e.moveTo(R, t), e.lineTo(R + P, t), n === 0) {
2805
+ let t = c + h(c, .5, C);
2806
+ e.moveTo(R, t), e.lineTo(R + P, t);
2807
2807
  }
2808
2808
  if (a === 0) {
2809
- let t = L + w(L, .5, S);
2810
- e.moveTo(t, c), e.lineTo(t, c + F);
2809
+ let t = R + h(R, .5, C);
2810
+ e.moveTo(t, c), e.lineTo(t, c + I);
2811
2811
  }
2812
2812
  e.stroke();
2813
2813
  }
2814
- let G = Ca(M ? Sa(re, r, s, M.right, M.bottom, _, g) : re, H.border);
2815
- (T.has(a) || E.has(a)) && (G = {
2814
+ let G = Ca(N ? Sa(ne, r, s, N.right, N.bottom, v, _) : ne, U.border);
2815
+ (T.has(a) || D.has(a)) && (G = {
2816
2816
  ...G,
2817
- left: E.has(a) ? null : G.left,
2817
+ left: D.has(a) ? null : G.left,
2818
2818
  right: T.has(a) ? null : G.right
2819
2819
  });
2820
- let K = _.get(`${r - 1}:${s}`), he = K ? di(g, pi(t.worksheet, K, s)).border.bottom : null;
2820
+ let K = v.get(`${r - 1}:${s}`), he = K ? di(_, pi(t.worksheet, K, s)).border.bottom : null;
2821
2821
  if (he?.style && (n === 0 || G.top?.style) && (G = {
2822
2822
  ...G,
2823
2823
  top: ka(G.top, he)
2824
- }), !E.has(a)) {
2825
- let e = _.get(`${r}:${s - 1}`), n = e ? di(g, pi(t.worksheet, e, s - 1)).border.right : null;
2824
+ }), !D.has(a)) {
2825
+ let e = v.get(`${r}:${s - 1}`), n = e ? di(_, pi(t.worksheet, e, s - 1)).border.right : null;
2826
2826
  n?.style && (a === 0 || G.left?.style) && (G = {
2827
2827
  ...G,
2828
2828
  left: ka(G.left, n)
2829
2829
  });
2830
2830
  }
2831
- let ge = U ? Ri(U, se, ce, s) : null, _e = t.autoFilterCells.has(j), ve = () => {
2831
+ let ge = W ? Ri(W, oe, se, s) : null, _e = t.autoFilterCells.has(M), ve = () => {
2832
2832
  if (ge) {
2833
- if (ge.kind === "dxf") Ta(e, ge.border, L, c, N, F, S);
2833
+ if (ge.kind === "dxf") Ta(e, ge.border, R, c, P, I, C);
2834
2834
  else if (ge.kind === "accent") {
2835
- let t = .5 / S;
2836
- if (e.strokeStyle = ge.color, e.lineWidth = ge.lineWidth, e.beginPath(), e.moveTo(L, c + F - t), e.lineTo(L + N, c + F - t), ge.topEdge) {
2837
- let t = c + w(c, ge.lineWidth, S);
2838
- e.moveTo(L, t), e.lineTo(L + N, t);
2835
+ let t = .5 / C;
2836
+ if (e.strokeStyle = ge.color, e.lineWidth = ge.lineWidth, e.beginPath(), e.moveTo(R, c + I - t), e.lineTo(R + P, c + I - t), ge.topEdge) {
2837
+ let t = c + h(c, ge.lineWidth, C);
2838
+ e.moveTo(R, t), e.lineTo(R + P, t);
2839
2839
  }
2840
2840
  e.stroke();
2841
2841
  }
2842
2842
  }
2843
- _e && Ii(e, L, c, O, F);
2843
+ _e && Ii(e, R, c, O, I);
2844
2844
  };
2845
- if (M) {
2845
+ if (N) {
2846
2846
  let t = G;
2847
- ne.push(() => Ta(e, t, L, c, N, F, S)), ve();
2847
+ te.push(() => Ta(e, t, R, c, P, I, C)), ve();
2848
2848
  } else {
2849
2849
  let t = G;
2850
- P.push(() => {
2851
- Ta(e, t, L, c, N, F, S), ve();
2850
+ F.push(() => {
2851
+ Ta(e, t, R, c, P, I, C), ve();
2852
2852
  });
2853
2853
  }
2854
- if (!R) continue;
2855
- let ye = yn(R, g, H.numFmt, t.worksheet.date1904), q = ye.text;
2856
- !q || q === "0" && t.worksheet.showZeros === !1 || te.push(() => {
2857
- let n = U?.isHeader ? ce : U?.isTotals ? le : U?.isLastCol && de ? de : U?.isFirstCol && ue ? ue : fe || (U ? se : void 0), l = U ? U.isCustom ? !!n?.font?.bold : U.isHeader || U.isTotals : !1, u = z.bold || !!H.fontBold || l, d = z.italic || !!H.fontItalic, f = z.underline || !!H.fontUnderline, p = z.strike || !!H.fontStrike, m = u !== z.bold || d !== z.italic || f !== z.underline || p !== z.strike ? {
2858
- ...z,
2854
+ if (!z) continue;
2855
+ let ye = yn(z, _, U.numFmt, t.worksheet.date1904), q = ye.text;
2856
+ !q || q === "0" && t.worksheet.showZeros === !1 || ee.push(() => {
2857
+ let n = W?.isHeader ? se : W?.isTotals ? ce : W?.isLastCol && ue ? ue : W?.isFirstCol && le ? le : de || (W ? oe : void 0), l = W ? W.isCustom ? !!n?.font?.bold : W.isHeader || W.isTotals : !1, u = B.bold || !!U.fontBold || l, d = B.italic || !!U.fontItalic, f = B.underline || !!U.fontUnderline, p = B.strike || !!U.fontStrike, m = u !== B.bold || d !== B.italic || f !== B.underline || p !== B.strike ? {
2858
+ ...B,
2859
2859
  bold: u,
2860
2860
  italic: d,
2861
2861
  underline: f,
2862
2862
  strike: p
2863
- } : z;
2864
- e.font = oi(m, x);
2865
- let h = t.hyperlinkMap.get(j), b = n?.font?.color ?? null, T = h ? "#0563C1" : H.fontColor ?? ye.color ?? b ?? z.color;
2863
+ } : B;
2864
+ e.font = oi(m, S);
2865
+ let g = t.hyperlinkMap.get(M), x = n?.font?.color ?? null, T = g ? "#0563C1" : U.fontColor ?? ye.color ?? x ?? B.color;
2866
2866
  e.fillStyle = T ? J(T) : "#000000";
2867
- let E = R.value.type === "number", O = V.alignH ?? (E ? "right" : "left"), k = V.alignV ?? "bottom", A = V.indent ? Math.round(V.indent * 3 * t.mdw) : 0, te = H.iconSet ? Math.max(8, Math.round(Math.min(N, F) * .55)) : 0, ne = te > 0 ? te + 4 : 0, P = 3 + (O === "left" || !V.alignH ? A : 0) + ne, I = N, B = a;
2868
- if (O === "centerContinuous" && !M) for (let e = a + 1; e < C; e++) {
2867
+ let D = z.value.type === "number", O = H.alignH ?? (D ? "right" : "left"), k = H.alignV ?? "bottom", A = H.indent ? Math.round(H.indent * 3 * t.mdw) : 0, ee = U.iconSet ? Math.max(8, Math.round(Math.min(P, I) * .55)) : 0, te = ee > 0 ? ee + 4 : 0, F = 3 + (O === "left" || !H.alignH ? A : 0) + te, L = P, V = a;
2868
+ if (O === "centerContinuous" && !N) for (let e = a + 1; e < w; e++) {
2869
2869
  let n = `${r}:${o[e]}`;
2870
- if (y.has(n) || v.has(n)) break;
2871
- let a = _.get(n);
2872
- if (a && a.value.type !== "empty" || di(g, pi(t.worksheet, a, o[e])).xf.alignH !== "centerContinuous") break;
2873
- I += i[e], B = e;
2870
+ if (b.has(n) || y.has(n)) break;
2871
+ let a = v.get(n);
2872
+ if (a && a.value.type !== "empty" || di(_, pi(t.worksheet, a, o[e])).xf.alignH !== "centerContinuous") break;
2873
+ L += i[e], V = e;
2874
2874
  }
2875
- let re = t.rtl ? L - (I - N) : L, ie = O === "centerContinuous" ? re : L, ae = O === "centerContinuous" ? I : N, oe = q.includes("\n");
2876
- if (!M && !V.wrapText && !V.textRotation && !E && !oe) {
2877
- let n = e.measureText(q).width, s = O === "centerContinuous", c = s ? n + 6 : n + P + 3, l = s ? I : N;
2875
+ let ne = t.rtl ? R - (L - P) : R, re = O === "centerContinuous" ? ne : R, ie = O === "centerContinuous" ? L : P, ae = q.includes("\n");
2876
+ if (!N && !H.wrapText && !H.textRotation && !D && !ae) {
2877
+ let n = e.measureText(q).width, s = O === "centerContinuous", c = s ? n + 6 : n + F + 3, l = s ? L : P;
2878
2878
  if (c > l) {
2879
2879
  let e = c - l, n = 0, u = 0;
2880
2880
  O === "right" ? u = e : O === "center" || s ? (u = e / 2, n = e / 2) : n = e;
2881
- let d = t.rtl ? -1 : 1, f = t.rtl ? a - 1 : B + 1, p = t.rtl ? 1 : -1, m = t.rtl ? B + 1 : a - 1;
2881
+ let d = t.rtl ? -1 : 1, f = t.rtl ? a - 1 : V + 1, p = t.rtl ? 1 : -1, m = t.rtl ? V + 1 : a - 1;
2882
2882
  if (n > 0) {
2883
2883
  let e = n;
2884
- for (let t = f; t >= 0 && t < C && e > 0; t += d) {
2884
+ for (let t = f; t >= 0 && t < w && e > 0; t += d) {
2885
2885
  let n = `${r}:${o[t]}`;
2886
- if (y.has(n) || v.has(n)) break;
2887
- let a = _.get(n);
2886
+ if (b.has(n) || y.has(n)) break;
2887
+ let a = v.get(n);
2888
2888
  if (a && a.value.type !== "empty") break;
2889
- ae += i[t], e -= i[t];
2889
+ ie += i[t], e -= i[t];
2890
2890
  }
2891
2891
  }
2892
2892
  if (u > 0) {
2893
2893
  let e = u;
2894
- for (let t = m; t >= 0 && t < C && e > 0; t += p) {
2894
+ for (let t = m; t >= 0 && t < w && e > 0; t += p) {
2895
2895
  let n = `${r}:${o[t]}`;
2896
- if (y.has(n) || v.has(n)) break;
2897
- let a = _.get(n);
2896
+ if (b.has(n) || y.has(n)) break;
2897
+ let a = v.get(n);
2898
2898
  if (a && a.value.type !== "empty") break;
2899
- ie -= i[t], ae += i[t], e -= i[t];
2899
+ re -= i[t], ie += i[t], e -= i[t];
2900
2900
  }
2901
2901
  }
2902
2902
  }
2903
2903
  }
2904
- let pe = q, me = 0;
2905
- if (O === "fill" && !E && q.length > 0) {
2906
- let t = Math.max(1, N - 6), n = e.measureText(q).width;
2904
+ let fe = q, pe = 0;
2905
+ if (O === "fill" && !D && q.length > 0) {
2906
+ let t = Math.max(1, P - 6), n = e.measureText(q).width;
2907
2907
  if (n > 0 && n < t) {
2908
2908
  let e = Math.max(1, Math.floor(t / n));
2909
- pe = q.repeat(e);
2909
+ fe = q.repeat(e);
2910
2910
  }
2911
2911
  }
2912
- if (O === "distributed" || O === "justify" && !V.wrapText && !oe) {
2913
- let t = Math.max(1, N - 6), n = e.measureText(pe).width, r = Math.max(1, [...pe].length - 1);
2914
- n < t && (me = Math.max(0, (t - n) / r));
2912
+ if (O === "distributed" || O === "justify" && !H.wrapText && !ae) {
2913
+ let t = Math.max(1, P - 6), n = e.measureText(fe).width, r = Math.max(1, [...fe].length - 1);
2914
+ n < t && (pe = Math.max(0, (t - n) / r));
2915
2915
  }
2916
- let W, G;
2917
- O === "right" ? (W = L + N - 3, G = "right") : O === "center" ? (W = L + N / 2, G = "center") : O === "centerContinuous" ? (W = re + I / 2, G = "center") : O === "distributed" || O === "justify" && !V.wrapText && !oe ? (W = L + 3, G = "left") : (W = L + P, G = "left");
2918
- let K = V.textRotation ?? 0, he = K === 255, ge = K > 0 && K !== 255;
2919
- if (H.iconSet && te > 0 && (e.save(), e.beginPath(), e.rect(L, c, N, F), e.clip(), Fi(e, H.iconSet.name, H.iconSet.index, L + 2, c + (F - te) / 2, te), e.restore()), e.save(), e.beginPath(), e.rect(ie, c, ae, F), e.clip(), he) {
2920
- let t = $(z.size, x, 1.1), n = [...q].length * t, r = k === "top" ? c + 2 : k === "center" ? c + (F - n) / 2 : c + F - n - 2;
2916
+ let me, G;
2917
+ O === "right" ? (me = R + P - 3, G = "right") : O === "center" ? (me = R + P / 2, G = "center") : O === "centerContinuous" ? (me = ne + L / 2, G = "center") : O === "distributed" || O === "justify" && !H.wrapText && !ae ? (me = R + 3, G = "left") : (me = R + F, G = "left");
2918
+ let K = H.textRotation ?? 0, he = K === 255, ge = K > 0 && K !== 255;
2919
+ if (U.iconSet && ee > 0 && (e.save(), e.beginPath(), e.rect(R, c, P, I), e.clip(), Fi(e, U.iconSet.name, U.iconSet.index, R + 2, c + (I - ee) / 2, ee), e.restore()), e.save(), e.beginPath(), e.rect(re, c, ie, I), e.clip(), he) {
2920
+ let t = $(B.size, S, 1.1), n = [...q].length * t, r = k === "top" ? c + 2 : k === "center" ? c + (I - n) / 2 : c + I - n - 2;
2921
2921
  e.textAlign = "center", e.textBaseline = "top";
2922
2922
  for (let n of q) {
2923
- let i = n.codePointAt(0) ?? 0, a = ee(i) && D(e, i);
2924
- Ar(e, n, L + N / 2, r, t, a), r += t;
2923
+ let i = n.codePointAt(0) ?? 0, a = j(i) && E(e, i);
2924
+ Ar(e, n, R + P / 2, r, t, a), r += t;
2925
2925
  }
2926
2926
  e.restore();
2927
2927
  return;
2928
2928
  }
2929
2929
  if (ge) {
2930
2930
  let t = K <= 90 ? -(K * Math.PI / 180) : (K - 90) * Math.PI / 180;
2931
- e.translate(L + N / 2, c + F / 2), e.rotate(t), e.textAlign = "center", e.textBaseline = "middle", e.fillText(q, 0, 0), e.restore();
2931
+ e.translate(R + P / 2, c + I / 2), e.rotate(t), e.textAlign = "center", e.textBaseline = "middle", e.fillText(q, 0, 0), e.restore();
2932
2932
  return;
2933
2933
  }
2934
- if (V.shrinkToFit) {
2935
- let t = e.measureText(q).width, n = N - P - 3;
2934
+ if (H.shrinkToFit) {
2935
+ let t = e.measureText(q).width, n = P - F - 3;
2936
2936
  if (t > n && t > 0) {
2937
- let r = n / t, i = O === "right" ? L + N - 3 : O === "center" ? L + N / 2 : L + P;
2937
+ let r = n / t, i = O === "right" ? R + P - 3 : O === "center" ? R + P / 2 : R + F;
2938
2938
  e.transform(r, 0, 0, 1, i * (1 - r), 0);
2939
2939
  }
2940
2940
  }
2941
- if (e.textAlign = G, me > 0) try {
2942
- e.letterSpacing = `${me}px`;
2941
+ if (e.textAlign = G, pe > 0) try {
2942
+ e.letterSpacing = `${pe}px`;
2943
2943
  } catch {}
2944
2944
  try {
2945
- e.direction = _r(V.readingOrder, q) ? "rtl" : "ltr";
2945
+ e.direction = _r(H.readingOrder, q) ? "rtl" : "ltr";
2946
2946
  } catch {}
2947
- let _e = R.value.type === "text" ? R.value.runs : void 0, ve = _e && _e.length > 0;
2948
- if (V.wrapText && ve) Ai(e, _e, m, {
2947
+ let _e = z.value.type === "text" ? z.value.runs : void 0, ve = _e && _e.length > 0;
2948
+ if (H.wrapText && ve) Ai(e, _e, m, {
2949
2949
  alignH: O,
2950
2950
  alignV: k,
2951
- cx: L,
2951
+ cx: R,
2952
2952
  cy: c,
2953
- cellW: N,
2954
- cellH: F,
2955
- leftPad: P,
2953
+ cellW: P,
2954
+ cellH: I,
2955
+ leftPad: F,
2956
2956
  paddingX: 3,
2957
2957
  paddingY: 2
2958
- }, x, S, {
2959
- fontColor: H.fontColor,
2960
- readingOrder: V.readingOrder
2958
+ }, S, C, {
2959
+ fontColor: U.fontColor,
2960
+ readingOrder: H.readingOrder
2961
2961
  });
2962
- else if (V.wrapText) ki(e, q, W, m, {
2962
+ else if (H.wrapText) ki(e, q, me, m, {
2963
2963
  alignH: O,
2964
2964
  alignV: k,
2965
- cx: L,
2965
+ cx: R,
2966
2966
  cy: c,
2967
- cellW: N,
2968
- cellH: F,
2969
- leftPad: P,
2967
+ cellW: P,
2968
+ cellH: I,
2969
+ leftPad: F,
2970
2970
  paddingX: 3,
2971
2971
  paddingY: 2
2972
- }, x);
2972
+ }, S);
2973
2973
  else if (ve) Oi(e, _e, m, {
2974
2974
  alignH: O,
2975
2975
  alignV: k,
2976
- cx: L,
2976
+ cx: R,
2977
2977
  cy: c,
2978
- cellW: N,
2979
- cellH: F,
2980
- leftPad: P,
2978
+ cellW: P,
2979
+ cellH: I,
2980
+ leftPad: F,
2981
2981
  paddingX: 3,
2982
2982
  paddingY: 2
2983
- }, x, S, {
2984
- fontColor: H.fontColor,
2985
- readingOrder: V.readingOrder
2983
+ }, S, C, {
2984
+ fontColor: U.fontColor,
2985
+ readingOrder: H.readingOrder
2986
2986
  });
2987
2987
  else {
2988
- let t = m.vertAlign, n = $(z.size, x), r = 0;
2988
+ let t = m.vertAlign, n = $(B.size, S), r = 0;
2989
2989
  t === "superscript" ? r = -Math.round(n * .35) : t === "subscript" && (r = Math.round(n * .1));
2990
2990
  let i = t ? {
2991
2991
  ...m,
2992
2992
  size: m.size * .65
2993
2993
  } : m;
2994
- t && (e.font = oi(i, x));
2994
+ t && (e.font = oi(i, S));
2995
2995
  let a = null, o = () => a ??= e.measureText(q), s = () => {
2996
- let e = Math.min(o().width, ae - P - 3);
2996
+ let e = Math.min(o().width, ie - F - 3);
2997
2997
  return {
2998
- x: O === "right" ? L + N - 3 - e : O === "center" ? L + N / 2 - e / 2 : L + P,
2998
+ x: O === "right" ? R + P - 3 - e : O === "center" ? R + P / 2 - e / 2 : R + F,
2999
2999
  width: e
3000
3000
  };
3001
- }, l = $(i.size, x);
3002
- if (m.underline || h) {
3003
- let { x: t, width: n } = s(), i = (k === "top" ? c + 2 + l + 1 : k === "center" ? c + F / 2 + Math.round(l * .55) : c + F - 2 + 1) + r, a = h ? "#0563C1" : T ? J(T) : "#000000", o = m.underlineStyle === "double" || m.underlineStyle === "doubleAccounting";
3004
- li(e, t, t + n, i, a, o, S);
3001
+ }, l = $(i.size, S);
3002
+ if (m.underline || g) {
3003
+ let { x: t, width: n } = s(), i = (k === "top" ? c + 2 + l + 1 : k === "center" ? c + I / 2 + Math.round(l * .55) : c + I - 2 + 1) + r, a = g ? "#0563C1" : T ? J(T) : "#000000", o = m.underlineStyle === "double" || m.underlineStyle === "doubleAccounting";
3004
+ li(e, t, t + n, i, a, o, C);
3005
3005
  }
3006
3006
  if (m.strike) {
3007
- let { x: t, width: n } = s(), i = (k === "top" ? c + 2 + Math.round(l * .5) : k === "center" ? c + F / 2 : c + F - 2 - Math.round(l * .35)) + r, a = i + w(i, .5, S);
3007
+ let { x: t, width: n } = s(), i = (k === "top" ? c + 2 + Math.round(l * .5) : k === "center" ? c + I / 2 : c + I - 2 - Math.round(l * .35)) + r, a = i + h(i, .5, C);
3008
3008
  e.save(), e.strokeStyle = T ? J(T) : "#000000", e.lineWidth = .5, e.beginPath(), e.moveTo(t, a), e.lineTo(t + n, a), e.stroke(), e.restore();
3009
3009
  }
3010
3010
  if (q.includes("\n")) {
3011
- let t = q.split("\n"), n = $(z.size, x, 1.2, z.name ?? void 0), i = t.length * n, a;
3012
- k === "top" ? (a = c + 2, e.textBaseline = "top") : k === "center" ? (a = c + (F - i) / 2, e.textBaseline = "top") : (a = c + F - i - 2, e.textBaseline = "top");
3013
- for (let i = 0; i < t.length; i++) e.fillText(t[i], W, a + i * n + r);
3011
+ let t = q.split("\n"), n = $(B.size, S, 1.2, B.name ?? void 0), i = t.length * n, a;
3012
+ k === "top" ? (a = c + 2, e.textBaseline = "top") : k === "center" ? (a = c + (I - i) / 2, e.textBaseline = "top") : (a = c + I - i - 2, e.textBaseline = "top");
3013
+ for (let i = 0; i < t.length; i++) e.fillText(t[i], me, a + i * n + r);
3014
3014
  } else {
3015
3015
  let { baseline: t, textY: n } = xi({
3016
3016
  alignH: O,
3017
3017
  alignV: k,
3018
- cx: L,
3018
+ cx: R,
3019
3019
  cy: c,
3020
- cellW: N,
3021
- cellH: F,
3022
- leftPad: P,
3020
+ cellW: P,
3021
+ cellH: I,
3022
+ leftPad: F,
3023
3023
  paddingX: 3,
3024
3024
  paddingY: 2
3025
3025
  });
3026
- e.textBaseline = t, e.fillText(pe, W, n + r);
3026
+ e.textBaseline = t, e.fillText(fe, me, n + r);
3027
3027
  }
3028
3028
  }
3029
- let be = R.value.type === "text" ? R.value.phoneticRuns : void 0;
3030
- if (R.showPhonetic && be && be.length > 0 && !q.includes("\n")) {
3031
- let t = oi(m, x), n = ci(e, q, t), r;
3032
- r = O === "right" ? L + N - 3 - n : O === "center" ? L + N / 2 - n / 2 : L + P;
3029
+ let be = z.value.type === "text" ? z.value.phoneticRuns : void 0;
3030
+ if (z.showPhonetic && be && be.length > 0 && !q.includes("\n")) {
3031
+ let t = oi(m, S), n = ci(e, q, t), r;
3032
+ r = O === "right" ? R + P - 3 - n : O === "center" ? R + P / 2 - n / 2 : R + F;
3033
3033
  let i = T ? J(T) : "#000000";
3034
- si(e, be, R.value.type === "text" ? R.value.phoneticPr : void 0, q, t, g, r, c, x, i);
3034
+ si(e, be, z.value.type === "text" ? z.value.phoneticPr : void 0, q, t, _, r, c, S, i);
3035
3035
  }
3036
3036
  e.restore(), q && t.onTextRun && t.onTextRun({
3037
3037
  sheetName: t.worksheet.name,
3038
3038
  cellRef: kr(r, s),
3039
3039
  text: q,
3040
- x: L,
3040
+ x: R,
3041
3041
  y: c,
3042
- width: N,
3043
- height: F,
3042
+ width: P,
3043
+ height: I,
3044
3044
  row: r,
3045
3045
  col: s
3046
3046
  });
3047
3047
  });
3048
3048
  }
3049
3049
  }
3050
- for (let e of P) e();
3051
- for (let e of ne) e();
3050
+ for (let e of F) e();
3052
3051
  for (let e of te) e();
3052
+ for (let e of ee) e();
3053
3053
  e.restore();
3054
3054
  }
3055
3055
  var Hi = /* @__PURE__ */ new WeakMap();
@@ -3258,8 +3258,8 @@ function ra(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g) {
3258
3258
  bold: E,
3259
3259
  italic: D
3260
3260
  } : v, m);
3261
- let O = y.alignH ?? "left", k = y.indent ? Math.round(y.indent * 3 * h) : 0, A = c.sizeOf(u), j = l.sizeOf(i), ee = b.iconSet ? Math.max(8, Math.round(Math.min(A, j) * .55)) : 0, M = ee > 0 ? ee + 4 : 0, N = 3 + (O === "left" || !y.alignH ? k : 0) + M, te = e.measureText(x).width + N + 3, ne = Math.max(0, te - A);
3262
- return ne <= 0 ? !1 : (O === "center" || O === "centerContinuous" ? ne / 2 : ((g ? d === "higher" ? "left" : "right" : d === "higher" ? "right" : "left") == "left" ? O === "right" : O !== "right") ? ne : 0) > f;
3261
+ let O = y.alignH ?? "left", k = y.indent ? Math.round(y.indent * 3 * h) : 0, A = c.sizeOf(u), j = l.sizeOf(i), M = b.iconSet ? Math.max(8, Math.round(Math.min(A, j) * .55)) : 0, N = M > 0 ? M + 4 : 0, P = 3 + (O === "left" || !y.alignH ? k : 0) + N, ee = e.measureText(x).width + P + 3, te = Math.max(0, ee - A);
3262
+ return te <= 0 ? !1 : (O === "center" || O === "centerContinuous" ? te / 2 : ((g ? d === "higher" ? "left" : "right" : d === "higher" ? "right" : "left") == "left" ? O === "right" : O !== "right") ? te : 0) > f;
3263
3263
  };
3264
3264
  for (let e of u) {
3265
3265
  let n = i.get(e);
@@ -3281,101 +3281,101 @@ function ia(e, t) {
3281
3281
  function aa(e, t, n, r, i = {}) {
3282
3282
  let a = i.dpr ?? 1, o = i.cellScale ?? 1, s = t.isChartSheet === !0, c = Q(t), l = c.maximumDigitWidth, u = e.canvas.width / a, d = e.canvas.height / a;
3283
3283
  e.clearRect(0, 0, u, d), e.fillStyle = "#ffffff", e.fillRect(0, 0, u, d);
3284
- let f = (e) => Math.round(e * o), p = s ? 0 : f(50), m = s ? 0 : f(22), { row: h, col: g, rows: _, cols: v } = r, y = (i.scrollOffsetX ?? 0) * o, b = (i.scrollOffsetY ?? 0) * o, { col: x, row: S } = c.axesAtScale(o), C = x.bandsToCover(1, s ? 0 : i.freezeCols ?? 0, Math.max(0, u - p)), T = S.bandsToCover(1, s ? 0 : i.freezeRows ?? 0, Math.max(0, d - m)), E = T.at(-1)?.index ?? 0, D = C.at(-1)?.index ?? 0, O = C.map(({ index: e }) => e), k = T.map(({ index: e }) => e), A = C.map(({ size: e }) => e), j = T.map(({ size: e }) => e), ee = A.reduce((e, t) => e + t, 0), M = j.reduce((e, t) => e + t, 0), N = x.bandsToCover(g, Math.min(16384, g + v - 1)), te = S.bandsToCover(h, Math.min(1048576, h + _ - 1)), ne = N.map(({ index: e }) => e), P = te.map(({ index: e }) => e), F = N.map(({ size: e }) => e), I = te.map(({ size: e }) => e), { cellMap: L, cfContext: R, mergeSkipSet: z, autoFilterCells: B, hyperlinkMap: re, commentCells: V, tableStyleMap: H, sparklineMap: ie, nonEmptyColsByRow: U } = Wi(t), ae = /* @__PURE__ */ new Map(), oe = Ui("worksheet-merge-anchor-index", "index-merge-anchor-coordinates");
3284
+ let f = (e) => Math.round(e * o), p = s ? 0 : f(50), m = s ? 0 : f(22), { row: g, col: _, rows: v, cols: y } = r, b = (i.scrollOffsetX ?? 0) * o, x = (i.scrollOffsetY ?? 0) * o, { col: S, row: C } = c.axesAtScale(o), w = S.bandsToCover(1, s ? 0 : i.freezeCols ?? 0, Math.max(0, u - p)), T = C.bandsToCover(1, s ? 0 : i.freezeRows ?? 0, Math.max(0, d - m)), E = T.at(-1)?.index ?? 0, D = w.at(-1)?.index ?? 0, O = w.map(({ index: e }) => e), k = T.map(({ index: e }) => e), A = w.map(({ size: e }) => e), j = T.map(({ size: e }) => e), M = A.reduce((e, t) => e + t, 0), N = j.reduce((e, t) => e + t, 0), P = S.bandsToCover(_, Math.min(16384, _ + y - 1)), ee = C.bandsToCover(g, Math.min(1048576, g + v - 1)), te = P.map(({ index: e }) => e), F = ee.map(({ index: e }) => e), I = P.map(({ size: e }) => e), L = ee.map(({ size: e }) => e), { cellMap: R, cfContext: z, mergeSkipSet: B, autoFilterCells: V, hyperlinkMap: ne, commentCells: H, tableStyleMap: U, sparklineMap: re, nonEmptyColsByRow: W } = Wi(t), ie = /* @__PURE__ */ new Map(), ae = Ui("worksheet-merge-anchor-index", "index-merge-anchor-coordinates");
3285
3285
  for (let e of t.mergeCells ?? []) {
3286
- let t = x.offsetOf(e.right + 1) - x.offsetOf(e.left), n = S.offsetOf(e.bottom + 1) - S.offsetOf(e.top);
3287
- er(ae, `${e.top}:${e.left}`, {
3286
+ let t = S.offsetOf(e.right + 1) - S.offsetOf(e.left), n = C.offsetOf(e.bottom + 1) - C.offsetOf(e.top);
3287
+ er(ie, `${e.top}:${e.left}`, {
3288
3288
  totalW: t,
3289
3289
  totalH: n,
3290
3290
  right: e.right,
3291
3291
  bottom: e.bottom
3292
- }, oe);
3292
+ }, ae);
3293
3293
  }
3294
- let se = ne[0] ?? g, ce = ne.at(-1) ?? Math.min(16384, g + v - 1), le = ra(e, t, n, L, U, R, H, ae, x, S, [...new Set([...k, ...P])], se, ce, D + 1, o, l, t.rightToLeft === !0), ue = x.bandsToCover(le.startCol, le.endCol), de = ue.map(({ index: e }) => e), fe = ue.map(({ size: e }) => e), pe = y + x.offsetOf(se) - x.offsetOf(le.startCol), me = {
3294
+ let oe = te[0] ?? _, se = te.at(-1) ?? Math.min(16384, _ + y - 1), ce = ra(e, t, n, R, W, z, U, ie, S, C, [...new Set([...k, ...F])], oe, se, D + 1, o, l, t.rightToLeft === !0), le = S.bandsToCover(ce.startCol, ce.endCol), ue = le.map(({ index: e }) => e), de = le.map(({ size: e }) => e), fe = b + S.offsetOf(oe) - S.offsetOf(ce.startCol), pe = {
3295
3295
  worksheet: t,
3296
3296
  styles: n,
3297
- cellMap: L,
3298
- mergeAnchorMap: ae,
3299
- mergeSkipSet: z,
3300
- cfContext: R,
3301
- colWidths: fe,
3302
- rowHeights: I,
3303
- colAxis: x,
3304
- rowAxis: S,
3297
+ cellMap: R,
3298
+ mergeAnchorMap: ie,
3299
+ mergeSkipSet: B,
3300
+ cfContext: z,
3301
+ colWidths: de,
3302
+ rowHeights: L,
3303
+ colAxis: S,
3304
+ rowAxis: C,
3305
3305
  frozenColWidths: A,
3306
3306
  frozenRowHeights: j,
3307
- frozenW: ee,
3308
- frozenH: M,
3309
- startRow: h,
3310
- startCol: g,
3307
+ frozenW: M,
3308
+ frozenH: N,
3309
+ startRow: g,
3310
+ startCol: _,
3311
3311
  cs: o,
3312
3312
  dpr: a,
3313
- autoFilterCells: B,
3314
- hyperlinkMap: re,
3315
- commentCells: V,
3316
- tableStyleMap: H,
3317
- sparklineMap: ie,
3318
- overflowTextAnchors: le.anchorKeys,
3313
+ autoFilterCells: V,
3314
+ hyperlinkMap: ne,
3315
+ commentCells: H,
3316
+ tableStyleMap: U,
3317
+ sparklineMap: re,
3318
+ overflowTextAnchors: ce.anchorKeys,
3319
3319
  mdw: l,
3320
3320
  onTextRun: i.onTextRun,
3321
3321
  rtl: t.rightToLeft === !0,
3322
3322
  canvasW: u,
3323
3323
  threeD: i.threeD
3324
- }, W = p, G = m, K = W + ee, he = G + M, ge = Math.max(0, u - K), _e = Math.max(0, d - he);
3325
- E > 0 && D > 0 && Vi(e, me, 1, 1, A, j, O, k, 0, 0, W, G, W, G, ee, M), E > 0 && Vi(e, me, 1, le.startCol, fe, j, de, k, pe, 0, K, G, K, G, ge, M), D > 0 && Vi(e, me, h, 1, A, I, O, P, 0, b, W, he, W, he, ee, _e), s || Vi(e, me, h, le.startCol, fe, I, de, P, pe, b, K, he, K, he, ge, _e), sa(e, t, x, S, i.loadedImages, o, h, g, y, b, K, he, ge, _e, t.rightToLeft === !0, u, i.threeD, i.regionMap, i.chartEx), !s && t.slicers && t.slicers.length > 0 && Ua(e, t, x, S, o, h, g, y, b, K, he, ge, _e, t.rightToLeft === !0, u), s || oa(e, u, d, h, g, _, v, F, I, ne, P, y, b, A, j, O, k, ee, M, p, m, o, a, i.selectedRowRange ?? null, i.selectedColRange ?? null, t.rightToLeft === !0, i.chromeColors);
3324
+ }, me = p, G = m, K = me + M, he = G + N, ge = Math.max(0, u - K), _e = Math.max(0, d - he);
3325
+ E > 0 && D > 0 && Vi(e, pe, 1, 1, A, j, O, k, 0, 0, me, G, me, G, M, N), E > 0 && Vi(e, pe, 1, ce.startCol, de, j, ue, k, fe, 0, K, G, K, G, ge, N), D > 0 && Vi(e, pe, g, 1, A, L, O, F, 0, x, me, he, me, he, M, _e), s || Vi(e, pe, g, ce.startCol, de, L, ue, F, fe, x, K, he, K, he, ge, _e), sa(e, t, S, C, i.loadedImages, o, g, _, b, x, K, he, ge, _e, t.rightToLeft === !0, u, i.threeD, i.regionMap, i.chartEx), !s && t.slicers && t.slicers.length > 0 && Ua(e, t, S, C, o, g, _, b, x, K, he, ge, _e, t.rightToLeft === !0, u), s || oa(e, u, d, g, _, v, y, I, L, te, F, b, x, A, j, O, k, M, N, p, m, o, a, i.selectedRowRange ?? null, i.selectedColRange ?? null, t.rightToLeft === !0, i.chromeColors);
3326
3326
  let ve = t.rightToLeft === !0;
3327
3327
  if (E > 0) {
3328
3328
  e.save(), e.strokeStyle = qr, e.lineWidth = .5, e.beginPath();
3329
- let t = he + w(he, .5, a);
3329
+ let t = he + h(he, .5, a);
3330
3330
  e.moveTo(0, t), e.lineTo(u, t), e.stroke(), e.restore();
3331
3331
  }
3332
3332
  if (D > 0) {
3333
3333
  e.save(), e.strokeStyle = qr, e.lineWidth = .5, e.beginPath();
3334
- let t = ve ? u - K : K, n = t + w(t, .5, a);
3334
+ let t = ve ? u - K : K, n = t + h(t, .5, a);
3335
3335
  e.moveTo(n, m), e.lineTo(n, d), e.stroke(), e.restore();
3336
3336
  }
3337
3337
  }
3338
- function oa(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, T, E, D) {
3339
- let O = D?.surface ?? "#f8f9fa", k = D?.mutedSurface ?? "#e8eaed", A = D?.selectedSurface ?? "#caddf6", j = D?.border ?? "#c8ccd0", ee = D?.accent ?? "#5b9bd5", M = D?.text ?? "#444", N = (e) => !T || e < T.start || e > T.end ? O : T.strong ? A : k, te = (e) => !T || e < T.start || e > T.end ? j : T.strong ? ee : j, ne = (e) => !C || e < C.start || e > C.end ? O : C.strong ? A : k, P = (e) => !C || e < C.start || e > C.end ? j : C.strong ? ee : j, F = `${Math.max(1, Math.round(11 * x))}px ${zr}`, I = y + _, L = b + v, R = .5 / S, z = (e, n) => E ? Gr(e, n, t) : e, B = E ? t - y : 0;
3340
- e.fillStyle = O, e.fillRect(B, 0, y, b), e.strokeStyle = j, e.lineWidth = .5, e.beginPath();
3341
- let re = E ? B + w(B, .5, S) : B + y - R;
3342
- e.moveTo(re, 0), e.lineTo(re, b), e.moveTo(B, b - R), e.lineTo(B + y, b - R), e.stroke(), e.font = F, e.fillStyle = M;
3343
- let V = (t, n, r) => {
3344
- let i = z(n, r);
3345
- e.fillStyle = N(t), e.fillRect(i, 0, r, b), e.strokeStyle = te(t), e.lineWidth = .5, e.beginPath();
3346
- let a = i + w(i, .5, S);
3347
- e.moveTo(a, 0), e.lineTo(a, b), e.moveTo(i, b - R), e.lineTo(i + r, b - R), e.stroke(), e.fillStyle = M, e.textAlign = "center", e.textBaseline = "middle", e.fillText(ji(t), i + r / 2, b / 2);
3348
- }, H = (t, n, r) => {
3349
- let i = B;
3350
- e.fillStyle = ne(t), e.fillRect(i, n, y, r), e.strokeStyle = P(t), e.lineWidth = .5, e.beginPath();
3351
- let a = n + w(n, .5, S), o = E ? i + w(i, .5, S) : i + y - R;
3352
- e.moveTo(o, n), e.lineTo(o, n + r), e.moveTo(i, a), e.lineTo(i + y, a), e.stroke(), e.fillStyle = M, e.textBaseline = "middle";
3353
- let s = Math.max(2, Math.round(4 * x));
3354
- E ? (e.textAlign = "left", e.fillText(String(t), i + s, n + r / 2)) : (e.textAlign = "right", e.fillText(String(t), i + y - s, n + r / 2));
3338
+ function oa(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, g, _, v, y, b, x, S, C, w, T, E, D) {
3339
+ let O = D?.surface ?? "#f8f9fa", k = D?.mutedSurface ?? "#e8eaed", A = D?.selectedSurface ?? "#caddf6", j = D?.border ?? "#c8ccd0", M = D?.accent ?? "#5b9bd5", N = D?.text ?? "#444", P = (e) => !T || e < T.start || e > T.end ? O : T.strong ? A : k, ee = (e) => !T || e < T.start || e > T.end ? j : T.strong ? M : j, te = (e) => !w || e < w.start || e > w.end ? O : w.strong ? A : k, F = (e) => !w || e < w.start || e > w.end ? j : w.strong ? M : j, I = `${Math.max(1, Math.round(11 * S))}px ${zr}`, L = b + v, R = x + y, z = .5 / C, B = (e, n) => E ? Gr(e, n, t) : e, V = E ? t - b : 0;
3340
+ e.fillStyle = O, e.fillRect(V, 0, b, x), e.strokeStyle = j, e.lineWidth = .5, e.beginPath();
3341
+ let ne = E ? V + h(V, .5, C) : V + b - z;
3342
+ e.moveTo(ne, 0), e.lineTo(ne, x), e.moveTo(V, x - z), e.lineTo(V + b, x - z), e.stroke(), e.font = I, e.fillStyle = N;
3343
+ let H = (t, n, r) => {
3344
+ let i = B(n, r);
3345
+ e.fillStyle = P(t), e.fillRect(i, 0, r, x), e.strokeStyle = ee(t), e.lineWidth = .5, e.beginPath();
3346
+ let a = i + h(i, .5, C);
3347
+ e.moveTo(a, 0), e.lineTo(a, x), e.moveTo(i, x - z), e.lineTo(i + r, x - z), e.stroke(), e.fillStyle = N, e.textAlign = "center", e.textBaseline = "middle", e.fillText(ji(t), i + r / 2, x / 2);
3348
+ }, U = (t, n, r) => {
3349
+ let i = V;
3350
+ e.fillStyle = te(t), e.fillRect(i, n, b, r), e.strokeStyle = F(t), e.lineWidth = .5, e.beginPath();
3351
+ let a = n + h(n, .5, C), o = E ? i + h(i, .5, C) : i + b - z;
3352
+ e.moveTo(o, n), e.lineTo(o, n + r), e.moveTo(i, a), e.lineTo(i + b, a), e.stroke(), e.fillStyle = N, e.textBaseline = "middle";
3353
+ let s = Math.max(2, Math.round(4 * S));
3354
+ E ? (e.textAlign = "left", e.fillText(String(t), i + s, n + r / 2)) : (e.textAlign = "right", e.fillText(String(t), i + b - s, n + r / 2));
3355
3355
  };
3356
3356
  if (p.length > 0) {
3357
- e.save(), e.beginPath(), e.rect(z(y, _), 0, _, b), e.clip();
3358
- let t = y;
3359
- for (let e = 0; e < p.length; e++) V(h[e], t, p[e]), t += p[e];
3357
+ e.save(), e.beginPath(), e.rect(B(b, v), 0, v, x), e.clip();
3358
+ let t = b;
3359
+ for (let e = 0; e < p.length; e++) H(g[e], t, p[e]), t += p[e];
3360
3360
  e.restore();
3361
3361
  }
3362
- e.save(), e.beginPath(), e.rect(z(I, t - I), 0, t - I, b), e.clip();
3363
- let ie = I - d;
3362
+ e.save(), e.beginPath(), e.rect(B(L, t - L), 0, t - L, x), e.clip();
3363
+ let re = L - d;
3364
3364
  for (let e = 0; e < s.length; e++) {
3365
3365
  let n = s[e];
3366
- ie + n > I && ie < t && V(l[e], ie, n), ie += n;
3366
+ re + n > L && re < t && H(l[e], re, n), re += n;
3367
3367
  }
3368
3368
  if (e.restore(), m.length > 0) {
3369
- e.save(), e.beginPath(), e.rect(B, b, y, v), e.clip();
3370
- let t = b;
3371
- for (let e = 0; e < m.length; e++) H(g[e], t, m[e]), t += m[e];
3369
+ e.save(), e.beginPath(), e.rect(V, x, b, y), e.clip();
3370
+ let t = x;
3371
+ for (let e = 0; e < m.length; e++) U(_[e], t, m[e]), t += m[e];
3372
3372
  e.restore();
3373
3373
  }
3374
- e.save(), e.beginPath(), e.rect(B, L, y, n - L), e.clip();
3375
- let U = L - f;
3374
+ e.save(), e.beginPath(), e.rect(V, R, b, n - R), e.clip();
3375
+ let W = R - f;
3376
3376
  for (let e = 0; e < c.length; e++) {
3377
3377
  let t = c[e];
3378
- U + t > L && U < n && H(u[e], U, t), U += t;
3378
+ W + t > R && W < n && U(u[e], W, t), W += t;
3379
3379
  }
3380
3380
  e.restore();
3381
3381
  }
@@ -3412,15 +3412,15 @@ function ca(e, t) {
3412
3412
  function la(e, t) {
3413
3413
  return e.offsetOf(t);
3414
3414
  }
3415
- function ua(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g = t.images) {
3416
- if (f <= 0 || p <= 0) return;
3417
- let _ = ca(n, s), v = la(r, o);
3415
+ function ua(e, t, n, r, i, a, s, c, l, u, d, f, p, m, h, g, _ = t.images) {
3416
+ if (p <= 0 || m <= 0) return;
3417
+ let v = ca(n, c), y = la(r, s);
3418
3418
  e.save(), e.beginPath();
3419
- let b = Kr(u, f, h, m);
3420
- e.rect(b, d, f, p), e.clip();
3421
- for (let t of g) {
3422
- let o = Ir(t.imagePath, t.duotone), s = i.get(o), g = Fr(i, o, "tiff");
3423
- if (!s && !g) continue;
3419
+ let b = Kr(d, p, g, h);
3420
+ e.rect(b, f, p, m), e.clip();
3421
+ for (let t of _) {
3422
+ let s = Ir(t.imagePath, t.duotone), c = i.get(s), _ = Fr(i, s, "tiff");
3423
+ if (!c && !_) continue;
3424
3424
  let x = t.fromCol + 1, S = t.fromRow + 1, C = ca(n, x) + t.fromColOff * a / Y, w = la(r, S) + t.fromRowOff * a / Y, T, E;
3425
3425
  if (jr(t)) T = t.nativeExtCx * a / Y, E = t.nativeExtCy * a / Y;
3426
3426
  else {
@@ -3428,10 +3428,10 @@ function ua(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g = t.images) {
3428
3428
  T = o - C, E = s - w;
3429
3429
  }
3430
3430
  if (T <= 0 || E <= 0) continue;
3431
- let D = Kr(u + (C - _) - c, T, h, m), O = d + (w - v) - l;
3432
- if (D + T < b || D > b + f || O + E < d || O > d + p) continue;
3431
+ let D = Kr(d + (C - v) - l, T, g, h), O = f + (w - y) - u;
3432
+ if (D + T < b || D > b + p || O + E < f || O > f + m) continue;
3433
3433
  let k = () => {
3434
- s ? Ve(e, s, t.srcRect, D, O, T, E) : y(e, "tiff", {
3434
+ c ? Be(e, c, t.srcRect, D, O, T, E) : o(e, "tiff", {
3435
3435
  x: D,
3436
3436
  y: O,
3437
3437
  width: T,
@@ -3464,7 +3464,7 @@ function da(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g = t.shapeGroups ??
3464
3464
  }
3465
3465
  e.restore();
3466
3466
  }
3467
- function fa(e, t, n, r, i, a, o, s) {
3467
+ function fa(e, t, n, r, i, a, s, c) {
3468
3468
  if (e.save(), t.rot !== 0 || t.flipH || t.flipV ? (e.translate(n + i / 2, r + a / 2), e.rotate(t.rot * Math.PI / 180), e.scale(t.flipH ? -1 : 1, t.flipV ? -1 : 1), e.translate(-i / 2, -a / 2)) : e.translate(n, r), t.geom.type === "custom") for (let n of t.geom.paths) {
3469
3469
  if (n.w <= 0 || n.h <= 0) continue;
3470
3470
  let r = i / n.w, o = a / n.h;
@@ -3505,16 +3505,16 @@ function fa(e, t, n, r, i, a, o, s) {
3505
3505
  ya(e, t, i, a);
3506
3506
  }
3507
3507
  else if (t.geom.type === "preset") {
3508
- let n = Je(t.fill ?? (t.fillColor ? {
3508
+ let n = qe(t.fill ?? (t.fillColor ? {
3509
3509
  fillType: "solid",
3510
3510
  color: t.fillColor
3511
3511
  } : null), e, 0, 0, i, a, t.rot), r = t.strokeColor && t.strokeWidth > 0 ? () => xa(e, t, i, a) : null;
3512
- P(e, t.geom.name, 0, 0, i, a, t.geom.adj ?? [], n, r, () => {}) || (e.beginPath(), e.rect(0, 0, i, a), ya(e, t, i, a));
3512
+ m(e, t.geom.name, 0, 0, i, a, t.geom.adj ?? [], n, r, () => {}) || (e.beginPath(), e.rect(0, 0, i, a), ya(e, t, i, a));
3513
3513
  } else if (t.geom.type === "image") {
3514
- let n = t.geom, r = Ir(n.imagePath, n.duotone), o = s?.get(r), c = Fr(s, r, "tiff");
3515
- if (o || c) {
3514
+ let n = t.geom, r = Ir(n.imagePath, n.duotone), s = c?.get(r), l = Fr(c, r, "tiff");
3515
+ if (s || l) {
3516
3516
  let t = n.alpha, r = () => {
3517
- o ? Ve(e, o, n.srcRect, 0, 0, i, a) : y(e, "tiff", {
3517
+ s ? Be(e, s, n.srcRect, 0, 0, i, a) : o(e, "tiff", {
3518
3518
  x: 0,
3519
3519
  y: 0,
3520
3520
  width: i,
@@ -3524,13 +3524,13 @@ function fa(e, t, n, r, i, a, o, s) {
3524
3524
  t != null && t < 1 ? (e.save(), e.globalAlpha = t, r(), e.restore()) : r();
3525
3525
  }
3526
3526
  }
3527
- t.text && va(e, t.text, i, a, o), e.restore();
3527
+ t.text && va(e, t.text, i, a, s), e.restore();
3528
3528
  }
3529
3529
  var pa = /* @__PURE__ */ new WeakMap();
3530
3530
  function ma(e, t) {
3531
3531
  let n = e.tinted.get(t);
3532
3532
  if (n) return n;
3533
- let r = oe(e.raster, t);
3533
+ let r = V(e.raster, t);
3534
3534
  return e.tinted.set(t, r), r;
3535
3535
  }
3536
3536
  function ha(e) {
@@ -3550,7 +3550,7 @@ async function _a(e, t) {
3550
3550
  if (n.length !== 0) {
3551
3551
  await t.loadMathJax();
3552
3552
  for (let e of n) if (!pa.has(e.nodes)) try {
3553
- let n = await t.mathMLToSvg(B(e.nodes, e.display)), r = await N(n, "#000000");
3553
+ let n = await t.mathMLToSvg(re(e.nodes, e.display)), r = await ie(n, "#000000");
3554
3554
  pa.set(e.nodes, {
3555
3555
  raster: r,
3556
3556
  widthEm: n.widthEm,
@@ -3566,7 +3566,7 @@ function va(e, t, n, r, i) {
3566
3566
  let a = t.lIns / Y * i, o = t.rIns / Y * i, s = t.tIns / Y * i, c = t.bIns / Y * i, l = Math.max(0, n - a - o), u = Math.max(0, r - s - c);
3567
3567
  if (l <= 0 || u <= 0) return;
3568
3568
  let d = (e) => {
3569
- let t = (e.size > 0 ? e.size : Wr) * Qe * i, n = Ur(e.fontFace);
3569
+ let t = (e.size > 0 ? e.size : Wr) * Ze * i, n = Ur(e.fontFace);
3570
3570
  return {
3571
3571
  font: `${e.italic ? "italic " : ""}${e.bold ? "bold " : ""}${t}px ${n}`,
3572
3572
  px: t
@@ -3580,10 +3580,10 @@ function va(e, t, n, r, i) {
3580
3580
  for (let n of t.paragraphs) {
3581
3581
  let r = n.align || "l", a = (n.marL ?? 0) / Y * i, o = (n.marR ?? 0) / Y * i, s = (n.indent ?? 0) / Y * i, c = Math.max(0, s), u = Math.max(0, l - a - o), h = !1, g = () => h ? a : a + c, _ = () => h ? u : u - c, v = [], y = 0, b = 0, x = 0, S = !1, C = n.spaceLine?.type === "pct", w = (e) => {
3582
3582
  let r = e;
3583
- return n.spaceLine && (n.spaceLine.type === "pct" ? r *= n.spaceLine.val / 1e5 : r = n.spaceLine.val * Qe * i), t.autoFit === "norm" && t.lnSpcReduction != null && n.spaceLine?.type !== "pts" && (r *= 1 - t.lnSpcReduction), r;
3583
+ return n.spaceLine && (n.spaceLine.type === "pct" ? r *= n.spaceLine.val / 1e5 : r = n.spaceLine.val * Ze * i), t.autoFit === "norm" && t.lnSpcReduction != null && n.spaceLine?.type !== "pts" && (r *= 1 - t.lnSpcReduction), r;
3584
3584
  }, T = () => {
3585
3585
  if (b === 0) {
3586
- let e = (E || Wr) * Qe * i, t = Math.max(lt(D, e), lt(O, e)), n = e * 1.2;
3586
+ let e = (E || Wr) * Ze * i, t = Math.max(ct(D, e), ct(O, e)), n = e * 1.2;
3587
3587
  b = C ? n : Math.max(n, t), x = f(`${e}px ${Ur(D)}`, e);
3588
3588
  }
3589
3589
  b = w(b), m.push({
@@ -3604,7 +3604,7 @@ function va(e, t, n, r, i) {
3604
3604
  if (t.type === "math") {
3605
3605
  let e = pa.get(t.nodes);
3606
3606
  if (!e) continue;
3607
- let n = (t.fontSize ?? (E || Wr)) * Qe * i, o = e.widthEm * n, s = e.ascentEm * n, c = e.descentEm * n, l = t.color ?? "#000000";
3607
+ let n = (t.fontSize ?? (E || Wr)) * Ze * i, o = e.widthEm * n, s = e.ascentEm * n, c = e.descentEm * n, l = t.color ?? "#000000";
3608
3608
  if (t.display) {
3609
3609
  T(), m.push({
3610
3610
  segs: [{
@@ -3635,7 +3635,7 @@ function va(e, t, n, r, i) {
3635
3635
  continue;
3636
3636
  }
3637
3637
  E = t.size > 0 ? t.size : Wr, D = t.fontFace, O = t.fontFaceEa;
3638
- let { font: n, px: o } = d(t), s = t.color ?? "#000000", c = Math.max(lt(t.fontFace, o), lt(t.fontFaceEa, o)), l = o * 1.2, g = C ? l : Math.max(l, c);
3638
+ let { font: n, px: o } = d(t), s = t.color ?? "#000000", c = Math.max(ct(t.fontFace, o), ct(t.fontFaceEa, o)), l = o * 1.2, g = C ? l : Math.max(l, c);
3639
3639
  b = Math.max(b, g), x = Math.max(x, f(n, o)), e.font = n;
3640
3640
  let k = t.text.split("\n");
3641
3641
  for (let t = 0; t < k.length; t++) {
@@ -3709,7 +3709,7 @@ function va(e, t, n, r, i) {
3709
3709
  }
3710
3710
  }
3711
3711
  function ya(e, t, n, r) {
3712
- let i = Je(t.fill ?? (t.fillColor ? {
3712
+ let i = qe(t.fill ?? (t.fillColor ? {
3713
3713
  fillType: "solid",
3714
3714
  color: t.fillColor
3715
3715
  } : null), e, 0, 0, n, r, t.rot);
@@ -3734,8 +3734,8 @@ function ba(e) {
3734
3734
  function xa(e, t, n, r) {
3735
3735
  let i = ba(t);
3736
3736
  if (i) {
3737
- if (ze(e, i, 1 / Y), i.fill) {
3738
- let a = Je(i.fill, e, 0, 0, n, r, t.rot);
3737
+ if (Re(e, i, 1 / Y), i.fill) {
3738
+ let a = qe(i.fill, e, 0, 0, n, r, t.rot);
3739
3739
  a && (e.strokeStyle = a);
3740
3740
  }
3741
3741
  e.stroke();
@@ -3855,10 +3855,10 @@ function Ta(e, t, n, r, i, a, o = 1) {
3855
3855
  e.beginPath(), e.strokeStyle = s;
3856
3856
  let m = Ea(c.style);
3857
3857
  e.lineWidth = m;
3858
- let h = Da(c.style);
3859
- e.setLineDash(h);
3860
- let g = p === "v" ? w(l, m, o) : 0, _ = p === "h" ? w(u, m, o) : 0;
3861
- e.moveTo(l + g, u + _), e.lineTo(d + g, f + _), e.stroke(), e.setLineDash([]);
3858
+ let g = Da(c.style);
3859
+ e.setLineDash(g);
3860
+ let _ = p === "v" ? h(l, m, o) : 0, v = p === "h" ? h(u, m, o) : 0;
3861
+ e.moveTo(l + _, u + v), e.lineTo(d + _, f + v), e.stroke(), e.setLineDash([]);
3862
3862
  }
3863
3863
  }
3864
3864
  function Ea(e) {
@@ -3874,7 +3874,7 @@ function Ea(e) {
3874
3874
  }
3875
3875
  }
3876
3876
  function Da(e) {
3877
- return Ie(e);
3877
+ return Fe(e);
3878
3878
  }
3879
3879
  function Oa(e) {
3880
3880
  switch (e) {
@@ -3905,7 +3905,7 @@ function Aa(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g = t.charts, _, v,
3905
3905
  let a = t.fromCol + 1, o = t.fromRow + 1, g = t.toCol + 1, C = t.toRow + 1, w = ca(n, a) + t.fromColOff * i / Y, T = la(r, o) + t.fromRowOff * i / Y, E = ca(n, g) + t.toColOff * i / Y, D = la(r, C) + t.toRowOff * i / Y, O = E - w, k = D - T;
3906
3906
  if (O <= 0 || k <= 0) continue;
3907
3907
  let A = Kr(l + (w - b) - s, O, m, p), j = u + (T - x) - c;
3908
- A + O < S || A > S + d || j + k < u || j > u + f || (e.save(), e.beginPath(), e.rect(S, u, d, f), e.clip(), e.save(), i !== 1 && e.scale(i, i), tt(e, t.chart, i === 1 ? {
3908
+ A + O < S || A > S + d || j + k < u || j > u + f || (e.save(), e.beginPath(), e.rect(S, u, d, f), e.clip(), e.save(), i !== 1 && e.scale(i, i), et(e, t.chart, i === 1 ? {
3909
3909
  x: A,
3910
3910
  y: j,
3911
3911
  w: O,
@@ -3915,7 +3915,7 @@ function Aa(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g = t.charts, _, v,
3915
3915
  y: j / i,
3916
3916
  w: O / i,
3917
3917
  h: k / i
3918
- }, Qe, 0, _, v, (e) => h?.get(Ye(e)), y), e.restore(), e.restore());
3918
+ }, Ze, 0, _, v, (e) => h?.get(Je(e)), y), e.restore(), e.restore());
3919
3919
  }
3920
3920
  }
3921
3921
  var ja = "600 12px \"Meiryo UI\", \"Segoe UI\", sans-serif", Ma = "11px \"Meiryo UI\", \"Segoe UI\", sans-serif", Na = "#FFFFFF", Pa = "#BFBFBF", Fa = "#F2F2F2", Ia = "#404040", La = "#FFFFFF", Ra = "#000000", za = "#A5A5A5", Ba = "#E7E6E6", Va = "#A6A6A6", Ha = "#C6C6C6";
@@ -4044,9 +4044,9 @@ function ro(e, t, n, r, i) {
4044
4044
  async function io(e, t, n, r, i = 0, a = 0, o = null, s = null, c, l = !1, u, d, f, p) {
4045
4045
  let m = t === "image/svg+xml";
4046
4046
  if (m && s) return null;
4047
- let h = Ge(t, o, i, a);
4047
+ let h = We(t, o, i, a);
4048
4048
  if (!h) return null;
4049
- let g = () => it(e, t, s, r, {
4049
+ let g = () => rt(e, t, s, r, {
4050
4050
  widthPt: h.widthPt,
4051
4051
  heightPt: h.heightPt,
4052
4052
  offscreenFactory: c,
@@ -4058,20 +4058,20 @@ async function io(e, t, n, r, i = 0, a = 0, o = null, s = null, c, l = !1, u, d,
4058
4058
  svgImagePath: n,
4059
4059
  srcRect: o
4060
4060
  };
4061
- if (!s && U(_)) try {
4062
- return await L(_.svgImagePath, r, {
4061
+ if (!s && F(_)) try {
4062
+ return await oe(_.svgImagePath, r, {
4063
4063
  ...d,
4064
4064
  maxRetainedPixels: p,
4065
4065
  workerDecoder: f
4066
4066
  });
4067
4067
  } catch {
4068
- return m ? L(e, r, {
4068
+ return m ? oe(e, r, {
4069
4069
  ...d,
4070
4070
  maxRetainedPixels: p,
4071
4071
  workerDecoder: f
4072
4072
  }) : g();
4073
4073
  }
4074
- return m ? L(e, r, {
4074
+ return m ? oe(e, r, {
4075
4075
  ...d,
4076
4076
  maxRetainedPixels: p,
4077
4077
  workerDecoder: f
@@ -4079,23 +4079,23 @@ async function io(e, t, n, r, i = 0, a = 0, o = null, s = null, c, l = !1, u, d,
4079
4079
  }
4080
4080
  async function ao(e, t, n, r) {
4081
4081
  if (t.clear(), Nr(t), !n) return;
4082
- let i = n, o = /* @__PURE__ */ new Map(), s = r?.viewport ? Q(e) : void 0, c = r?.viewport && r.width !== void 0 && r.height !== void 0 ? {
4082
+ let i = n, a = /* @__PURE__ */ new Map(), o = r?.viewport ? Q(e) : void 0, s = r?.viewport && r.width !== void 0 && r.height !== void 0 ? {
4083
4083
  width: r.width,
4084
4084
  height: r.height,
4085
4085
  scale: r.cellScale ?? 1,
4086
4086
  freezeRows: r.freezeRows ?? e.freezeRows ?? 0,
4087
4087
  freezeCols: r.freezeCols ?? e.freezeCols ?? 0
4088
4088
  } : void 0;
4089
- if (e.images) for (let t of e.images) ro(t, e, r?.viewport, s, c) && to(o, Ir(t.imagePath, t.duotone), {
4089
+ if (e.images) for (let t of e.images) ro(t, e, r?.viewport, o, s) && to(a, Ir(t.imagePath, t.duotone), {
4090
4090
  imagePath: t.imagePath,
4091
4091
  mimeType: t.mimeType,
4092
4092
  svgImagePath: t.svgImagePath,
4093
- widthPt: t.nativeExtCx > 0 ? t.nativeExtCx / $e : 0,
4094
- heightPt: t.nativeExtCy > 0 ? t.nativeExtCy / $e : 0,
4093
+ widthPt: t.nativeExtCx > 0 ? t.nativeExtCx / Qe : 0,
4094
+ heightPt: t.nativeExtCy > 0 ? t.nativeExtCy / Qe : 0,
4095
4095
  srcRect: t.srcRect ?? null,
4096
4096
  duotone: t.duotone ?? null,
4097
4097
  ...(() => {
4098
- let n = no(t, e, s, r?.cellScale ?? 1), i = n && r?.effectiveDpr ? qe(n.width * r.effectiveDpr, n.height * r.effectiveDpr, t.srcRect) : null;
4098
+ let n = no(t, e, o, r?.cellScale ?? 1), i = n && r?.effectiveDpr ? Ke(n.width * r.effectiveDpr, n.height * r.effectiveDpr, t.srcRect) : null;
4099
4099
  return i ? {
4100
4100
  targetWidthPx: i.width,
4101
4101
  targetHeightPx: i.height
@@ -4103,16 +4103,16 @@ async function ao(e, t, n, r) {
4103
4103
  })()
4104
4104
  });
4105
4105
  if (e.shapeGroups) {
4106
- for (let t of e.shapeGroups) if (ro(t, e, r?.viewport, s, c)) for (let n of t.shapes) n.geom.type === "image" && to(o, Ir(n.geom.imagePath, n.geom.duotone), {
4106
+ for (let t of e.shapeGroups) if (ro(t, e, r?.viewport, o, s)) for (let n of t.shapes) n.geom.type === "image" && to(a, Ir(n.geom.imagePath, n.geom.duotone), {
4107
4107
  imagePath: n.geom.imagePath,
4108
4108
  mimeType: n.geom.mimeType,
4109
4109
  svgImagePath: n.geom.svgImagePath,
4110
- widthPt: t.nativeExtCx > 0 ? t.nativeExtCx * n.w / $e : 0,
4111
- heightPt: t.nativeExtCy > 0 ? t.nativeExtCy * n.h / $e : 0,
4110
+ widthPt: t.nativeExtCx > 0 ? t.nativeExtCx * n.w / Qe : 0,
4111
+ heightPt: t.nativeExtCy > 0 ? t.nativeExtCy * n.h / Qe : 0,
4112
4112
  srcRect: n.geom.srcRect ?? null,
4113
4113
  duotone: n.geom.duotone ?? null,
4114
4114
  ...(() => {
4115
- let i = no(t, e, s, r?.cellScale ?? 1), a = i && r?.effectiveDpr ? qe(i.width * n.w * r.effectiveDpr, i.height * n.h * r.effectiveDpr, n.geom.srcRect) : null;
4115
+ let i = no(t, e, o, r?.cellScale ?? 1), a = i && r?.effectiveDpr ? Ke(i.width * n.w * r.effectiveDpr, i.height * n.h * r.effectiveDpr, n.geom.srcRect) : null;
4116
4116
  return a ? {
4117
4117
  targetWidthPx: a.width,
4118
4118
  targetHeightPx: a.height
@@ -4120,21 +4120,21 @@ async function ao(e, t, n, r) {
4120
4120
  })()
4121
4121
  });
4122
4122
  }
4123
- let l = e.charts ?? [], u = l.length > 0 ? s ?? Q(e) : s, d = [];
4124
- for (let t of l) {
4125
- if (!ro(t, e, r?.viewport, u, c)) continue;
4126
- let n = no(t, e, u, r?.cellScale ?? 1);
4123
+ let c = e.charts ?? [], l = c.length > 0 ? o ?? Q(e) : o, u = [];
4124
+ for (let t of c) {
4125
+ if (!ro(t, e, r?.viewport, l, s)) continue;
4126
+ let n = no(t, e, l, r?.cellScale ?? 1);
4127
4127
  if (!n || !Number.isFinite(n.width) || !Number.isFinite(n.height) || n.width <= 0 || n.height <= 0) continue;
4128
- let i = Fe(t.chart), a = {
4129
- widthPt: n.width * (Y / $e),
4130
- heightPt: n.height * (Y / $e),
4128
+ let i = Pe(t.chart), a = {
4129
+ widthPt: n.width * (Y / Qe),
4130
+ heightPt: n.height * (Y / Qe),
4131
4131
  targetWidthPx: r?.effectiveDpr === void 0 ? void 0 : n.width * r.effectiveDpr,
4132
4132
  targetHeightPx: r?.effectiveDpr === void 0 ? void 0 : n.height * r.effectiveDpr
4133
- }, o = [], s = !0;
4133
+ }, o = [], c = !0;
4134
4134
  for (let e of i) {
4135
- let t = Le(e, a);
4135
+ let t = Ie(e, a);
4136
4136
  if (!t) {
4137
- s = !1;
4137
+ c = !1;
4138
4138
  break;
4139
4139
  }
4140
4140
  o.push({
@@ -4142,16 +4142,16 @@ async function ao(e, t, n, r) {
4142
4142
  size: t
4143
4143
  });
4144
4144
  }
4145
- s && d.push({
4145
+ c && u.push({
4146
4146
  chart: t,
4147
4147
  frame: a,
4148
4148
  usages: o
4149
4149
  });
4150
4150
  }
4151
- let f = He(d.map(({ chart: e }) => e.chart), (e, t) => Le(e, d[t].frame) != null), p = /* @__PURE__ */ new Map();
4152
- for (let e of f) {
4153
- let { fill: t } = e, n = Ye(t);
4154
- p.set(n, {
4151
+ let d = Ve(u.map(({ chart: e }) => e.chart), (e, t) => Ie(e, u[t].frame) != null), f = /* @__PURE__ */ new Map();
4152
+ for (let e of d) {
4153
+ let { fill: t } = e, n = Je(t);
4154
+ f.set(n, {
4155
4155
  fill: t,
4156
4156
  widthPt: 0,
4157
4157
  heightPt: 0,
@@ -4159,11 +4159,11 @@ async function ao(e, t, n, r) {
4159
4159
  hasSourceCrop: e.hasSourceCrop
4160
4160
  });
4161
4161
  }
4162
- for (let e of d) for (let { usage: t, size: n } of e.usages) {
4163
- let { fill: e } = t, r = Ye(e), i = p.get(r);
4162
+ for (let e of u) for (let { usage: t, size: n } of e.usages) {
4163
+ let { fill: e } = t, r = Je(e), i = f.get(r);
4164
4164
  if (!i) continue;
4165
4165
  let a = i.preserveNaturalSize || t.preserveNaturalSize;
4166
- p.set(r, {
4166
+ f.set(r, {
4167
4167
  ...i,
4168
4168
  widthPt: Math.max(i.widthPt, n.widthPt),
4169
4169
  heightPt: Math.max(i.heightPt, n.heightPt),
@@ -4173,9 +4173,9 @@ async function ao(e, t, n, r) {
4173
4173
  hasSourceCrop: i.hasSourceCrop || t.hasSourceCrop
4174
4174
  });
4175
4175
  }
4176
- for (let [e, t] of p) {
4177
- let { fill: n, widthPt: r, heightPt: i, targetWidthPx: a, targetHeightPx: s, hasSourceCrop: c } = t;
4178
- to(o, e, {
4176
+ for (let [e, t] of f) {
4177
+ let { fill: n, widthPt: r, heightPt: i, targetWidthPx: o, targetHeightPx: s, hasSourceCrop: c } = t;
4178
+ to(a, e, {
4179
4179
  imagePath: n.imagePath,
4180
4180
  mimeType: n.mimeType,
4181
4181
  svgImagePath: n.svgImagePath,
@@ -4189,26 +4189,26 @@ async function ao(e, t, n, r) {
4189
4189
  } : null,
4190
4190
  duotone: n.duotone ?? null,
4191
4191
  failClosedOnDuotoneFailure: !0,
4192
- ...a && s ? {
4193
- targetWidthPx: a,
4192
+ ...o && s ? {
4193
+ targetWidthPx: o,
4194
4194
  targetHeightPx: s
4195
4195
  } : {}
4196
4196
  });
4197
4197
  }
4198
- if (o.size === 0) return;
4199
- let m = fe(r?.imageResources), h = k((await Promise.all([...o].map(async ([e, t]) => {
4200
- if (!t.targetWidthPx || !t.targetHeightPx || t.mimeType === "image/svg+xml" || t.duotone || !t.duotone && U({
4198
+ if (a.size === 0) return;
4199
+ let p = O(r?.imageResources), m = ue((await Promise.all([...a].map(async ([e, t]) => {
4200
+ if (!t.targetWidthPx || !t.targetHeightPx || t.mimeType === "image/svg+xml" || t.duotone || !t.duotone && F({
4201
4201
  svgImagePath: t.svgImagePath,
4202
4202
  srcRect: t.srcRect
4203
4203
  })) return null;
4204
- if (a(t.mimeType) && (m.resolution === "display" || m.strategy === "adaptive")) return {
4204
+ if (ce(t.mimeType) && (p.resolution === "display" || p.strategy === "adaptive")) return {
4205
4205
  key: e,
4206
4206
  targetWidthPx: t.targetWidthPx,
4207
4207
  targetHeightPx: t.targetHeightPx,
4208
4208
  retainedSurfaceCount: 1
4209
4209
  };
4210
- let n = await z(t.imagePath, t.mimeType, i).catch(() => null);
4211
- return !n?.dimensions || !le(n.format, r?.tiff !== void 0) ? null : {
4210
+ let n = await te(t.imagePath, t.mimeType, i).catch(() => null);
4211
+ return !n?.dimensions || !y(n.format, r?.tiff !== void 0) ? null : {
4212
4212
  key: e,
4213
4213
  targetWidthPx: t.targetWidthPx,
4214
4214
  targetHeightPx: t.targetHeightPx,
@@ -4216,16 +4216,16 @@ async function ao(e, t, n, r) {
4216
4216
  sourceHeightPx: n.dimensions.height,
4217
4217
  retainedSurfaceCount: 1
4218
4218
  };
4219
- }))).filter((e) => e !== null), m);
4220
- for (let [e, t] of o) {
4221
- if (t.mimeType === "image/svg+xml" || !t.duotone && U({
4219
+ }))).filter((e) => e !== null), p);
4220
+ for (let [e, t] of a) {
4221
+ if (t.mimeType === "image/svg+xml" || !t.duotone && F({
4222
4222
  svgImagePath: t.svgImagePath,
4223
4223
  srcRect: t.srcRect
4224
4224
  })) continue;
4225
- let n = h.targets.get(e);
4225
+ let n = m.targets.get(e);
4226
4226
  t.targetWidthPx = n?.width, t.targetHeightPx = n?.height, t.plannedPixelLimit = n?.maxRetainedPixels;
4227
4227
  }
4228
- await Promise.all([...o.entries()].map(async ([e, n]) => {
4228
+ await Promise.all([...a.entries()].map(async ([e, n]) => {
4229
4229
  try {
4230
4230
  let a = await io(n.imagePath, n.mimeType, n.svgImagePath, i, n.widthPt, n.heightPt, n.srcRect, n.duotone, r?.offscreenFactory, n.failClosedOnDuotoneFailure ?? !1, r?.tiff, n.targetWidthPx && n.targetHeightPx ? {
4231
4231
  targetWidthPx: n.targetWidthPx,
@@ -4233,11 +4233,11 @@ async function ao(e, t, n, r) {
4233
4233
  } : void 0, r?.svgDecoder, n.plannedPixelLimit);
4234
4234
  t.set(e, a);
4235
4235
  } catch (n) {
4236
- if (de(n, "tiff") || rt(n)) {
4236
+ if (v(n, "tiff") || nt(n)) {
4237
4237
  t.set(e, null), Pr(t, e, "tiff");
4238
4238
  return;
4239
4239
  }
4240
- if (Xe(n)) throw n;
4240
+ if (Ye(n)) throw n;
4241
4241
  t.delete(e);
4242
4242
  }
4243
4243
  }));
@@ -4256,15 +4256,15 @@ function so(e, t, n) {
4256
4256
  return Dr.forWorksheet(i, a), Xi(e, i, n), Dr.forWorksheet(i, a), oo.set(t, i), i;
4257
4257
  }
4258
4258
  async function co(e, t, n, r = {}, i) {
4259
- let a = () => lo(e, t, n, r, i), o = !e.ws.isDialogSheet && ((e.ws.images?.length ?? 0) > 0 || (e.ws.shapeGroups?.some((e) => e.shapes.some((e) => e.geom.type === "image")) ?? !1) || He((e.ws.charts ?? []).map((e) => e.chart)).length > 0);
4260
- return r.fetchImage && o ? ce(r.fetchImage, r.imageResources, a) : a();
4259
+ let a = () => lo(e, t, n, r, i), o = !e.ws.isDialogSheet && ((e.ws.images?.length ?? 0) > 0 || (e.ws.shapeGroups?.some((e) => e.shapes.some((e) => e.geom.type === "image")) ?? !1) || Ve((e.ws.charts ?? []).map((e) => e.chart)).length > 0);
4260
+ return r.fetchImage && o ? de(r.fetchImage, r.imageResources, a) : a();
4261
4261
  }
4262
4262
  async function lo(e, n, r, i = {}, a) {
4263
4263
  if (i[Ya]?.() === !1) return;
4264
4264
  let o = e.styles, s = n.getContext("2d");
4265
4265
  if (!s) throw Error("XLSX render target does not provide a 2-D canvas context");
4266
- let c = e.ws.isDialogSheet ? e.ws : so(s, e.ws, o), l = t(n) ? n.clientWidth || 800 : n.width, u = t(n) ? n.clientHeight || 600 : n.height, d = i.width ?? l, f = i.height ?? u, p = i.dpr ?? h(), m = et(d * p, f * p), g = m.clamped ? p * m.scale : p, _ = /* @__PURE__ */ new Map();
4267
- if (c.isDialogSheet || await ao(c, _, i.fetchImage, {
4266
+ let c = e.ws.isDialogSheet ? e.ws : so(s, e.ws, o), l = M(n) ? n.clientWidth || 800 : n.width, u = M(n) ? n.clientHeight || 600 : n.height, d = i.width ?? l, f = i.height ?? u, p = i.dpr ?? t(), m = $e(d * p, f * p), h = m.clamped ? p * m.scale : p, g = /* @__PURE__ */ new Map();
4267
+ if (c.isDialogSheet || await ao(c, g, i.fetchImage, {
4268
4268
  viewport: r,
4269
4269
  width: d,
4270
4270
  height: f,
@@ -4272,28 +4272,28 @@ async function lo(e, n, r, i = {}, a) {
4272
4272
  freezeRows: i.freezeRows,
4273
4273
  freezeCols: i.freezeCols,
4274
4274
  tiff: e.tiff,
4275
- effectiveDpr: g,
4275
+ effectiveDpr: h,
4276
4276
  svgDecoder: a,
4277
4277
  imageResources: i.imageResources
4278
4278
  }), !c.isDialogSheet && e.math && ga(c) && await _a(c, e.math), i[Ya]?.() === !1) return;
4279
- let v = m.width, y = m.height;
4280
- if (n.width !== v && (n.width = v), n.height !== y && (n.height = y), t(n)) {
4279
+ let _ = m.width, v = m.height;
4280
+ if (n.width !== _ && (n.width = _), n.height !== v && (n.height = v), M(n)) {
4281
4281
  let e = `${d}px`, t = `${f}px`;
4282
4282
  n.style.width !== e && (n.style.width = e), n.style.height !== t && (n.style.height = t);
4283
4283
  }
4284
- let b = n.getContext("2d");
4285
- if (b.setTransform(g, 0, 0, g, 0, 0), c.parseError) {
4286
- fo(b, d, f, c.name, c.parseError);
4284
+ let y = n.getContext("2d");
4285
+ if (y.setTransform(h, 0, 0, h, 0, 0), c.parseError) {
4286
+ fo(y, d, f, c.name, c.parseError);
4287
4287
  return;
4288
4288
  }
4289
4289
  if (c.isDialogSheet) {
4290
- uo(b, d, f);
4290
+ uo(y, d, f);
4291
4291
  return;
4292
4292
  }
4293
- aa(b, c, o, r, {
4293
+ aa(y, c, o, r, {
4294
4294
  ...i,
4295
- dpr: g,
4296
- loadedImages: _,
4295
+ dpr: h,
4296
+ loadedImages: g,
4297
4297
  threeD: e.threeD,
4298
4298
  regionMap: e.regionMap,
4299
4299
  chartEx: e.chartEx
@@ -4325,8 +4325,8 @@ function fo(e, t, n, r, i) {
4325
4325
  //#endregion
4326
4326
  //#region packages/xlsx/src/google-fonts.ts
4327
4327
  var po = {
4328
- ...x,
4329
- ...d
4328
+ ...C,
4329
+ ...p
4330
4330
  };
4331
4331
  function* mo(e) {
4332
4332
  for (let t of e?.sharedStrings ?? []) if (t.runs && t.runs.length > 0) for (let e of t.runs) yield e.text;
@@ -4334,8 +4334,8 @@ function* mo(e) {
4334
4334
  }
4335
4335
  function ho(e) {
4336
4336
  let t = /* @__PURE__ */ new Set(), n = null;
4337
- for (let r of e?.styles?.fonts ?? []) r.name && (t.add(r.name), n ??= me(r.name));
4338
- for (let r of l(mo(e), n)) t.add(r);
4337
+ for (let r of e?.styles?.fonts ?? []) r.name && (t.add(r.name), n ??= i(r.name));
4338
+ for (let r of x(mo(e), n)) t.add(r);
4339
4339
  return t;
4340
4340
  }
4341
4341
  function go(e) {
@@ -4538,9 +4538,9 @@ var ko = Symbol("retain-xlsx-viewer-fonts"), Ao = Symbol("prepare-xlsx-viewer-ro
4538
4538
  parsedWorkbook = null;
4539
4539
  sheetCache = /* @__PURE__ */ new Map();
4540
4540
  sheetLoads = /* @__PURE__ */ new Map();
4541
- rawParts = new Pe({
4541
+ rawParts = new lt({
4542
4542
  maxEntries: 64,
4543
- maxBytes: C
4543
+ maxBytes: w
4544
4544
  });
4545
4545
  queuedImageLoads = /* @__PURE__ */ new Map();
4546
4546
  _fetchImage = (e, t) => this.getImageWithinArchiveOperation(e, t);
@@ -4566,11 +4566,11 @@ var ko = Symbol("retain-xlsx-viewer-fonts"), Ao = Symbol("prepare-xlsx-viewer-ro
4566
4566
  };
4567
4567
  resourceFailure = null;
4568
4568
  constructor(e, t, n, r = !0) {
4569
- if (this._mode = t, e && (this.bridge = new ke(e, {
4569
+ if (this._mode = t, e && (this.bridge = new je(e, {
4570
4570
  correlate: (e) => "protocol" in e && e.protocol === "ooxml-pull-v1" ? e.requestId : "id" in e ? e.id : void 0,
4571
- toError: (e) => "type" in e && e.type === "error" ? c(e) : void 0,
4571
+ toError: (e) => "type" in e && e.type === "error" ? b(e) : void 0,
4572
4572
  onUnsolicited: (t) => {
4573
- he((t, n) => e.postMessage(t, n), t);
4573
+ _e((t, n) => e.postMessage(t, n), t);
4574
4574
  }
4575
4575
  }), r)) {
4576
4576
  let e = new URL(n ?? jt, location.href).href;
@@ -4589,7 +4589,7 @@ var ko = Symbol("retain-xlsx-viewer-fonts"), Ao = Symbol("prepare-xlsx-viewer-ro
4589
4589
  throw TypeError("Unsupported XlsxSheetViewer source format");
4590
4590
  }
4591
4591
  static async loadDelimitedText(t, n, r) {
4592
- let i = Do(r), a = g(n), o = n.mode ?? "main", s = new u({
4592
+ let i = Do(r), a = fe(n), o = n.mode ?? "main", s = new f({
4593
4593
  enabled: !0,
4594
4594
  format: "xlsx",
4595
4595
  mode: o,
@@ -4606,20 +4606,20 @@ var ko = Symbol("retain-xlsx-viewer-fonts"), Ao = Symbol("prepare-xlsx-viewer-ro
4606
4606
  c = await Oo(e);
4607
4607
  } else c = t;
4608
4608
  Eo(c.byteLength), s.setSourceBytes(c.byteLength), s.checkpoint("source ready");
4609
- let l = o === "worker" ? (await import("./render-worker-host-CbYDBg7U.js")).createRenderWorker() : (await import("./delimited-text-worker-host-DcHj_JZt.js")).createDelimitedTextWorker(), u;
4609
+ let l = o === "worker" ? (await import("./render-worker-host-Ba6Fchqr.js")).createRenderWorker() : (await import("./delimited-text-worker-host-DcHj_JZt.js")).createDelimitedTextWorker(), u;
4610
4610
  try {
4611
4611
  let t = new e(l, o, void 0, !1);
4612
4612
  return u = t, t.metrics = s, await t._loadDelimitedText(r === c ? c.slice(0) : c, n, a.policy, i), o === "main" && (t.bridge?.terminate(), t.bridge = null), s.checkpoint("worksheet ready"), s.succeed({ sheets: 1 }), t;
4613
4613
  } catch (e) {
4614
4614
  let t = u;
4615
- throw W(l, t ? () => t.destroy() : void 0), e;
4615
+ throw me(l, t ? () => t.destroy() : void 0), e;
4616
4616
  }
4617
4617
  } catch (e) {
4618
4618
  throw s.fail(e), e;
4619
4619
  }
4620
4620
  }
4621
4621
  static async load(t, n = {}) {
4622
- let r = g(n), i = n.mode ?? "main", a = new u({
4622
+ let r = fe(n), i = n.mode ?? "main", a = new f({
4623
4623
  enabled: !0,
4624
4624
  format: "xlsx",
4625
4625
  mode: i,
@@ -4635,60 +4635,60 @@ var ko = Symbol("retain-xlsx-viewer-fonts"), Ao = Symbol("prepare-xlsx-viewer-ro
4635
4635
  if (!e.ok) throw Error(`Failed to fetch: ${e.status} ${e.statusText}`);
4636
4636
  s = await e.arrayBuffer();
4637
4637
  } else s = t;
4638
- s = G(await K(s, n.password));
4638
+ s = he(await K(s, n.password));
4639
4639
  let c = s === o;
4640
4640
  a.setSourceBytes(s.byteLength), a.checkpoint("container ready");
4641
- let l = i === "worker" ? (await import("./render-worker-host-CbYDBg7U.js")).createRenderWorker() : new At(), u;
4641
+ let l = i === "worker" ? (await import("./render-worker-host-Ba6Fchqr.js")).createRenderWorker() : new At(), u;
4642
4642
  try {
4643
4643
  return u = new e(l, i, n.wasmUrl), u.metrics = a, await u._load(s, n, r.policy, (e) => a.observeUsage(e), c), a.checkpoint("workbook index ready"), a.succeed({ sheets: u.sheetCount }), u;
4644
4644
  } catch (e) {
4645
4645
  let t = u;
4646
- throw W(l, t ? () => t.destroy() : void 0), e;
4646
+ throw me(l, t ? () => t.destroy() : void 0), e;
4647
4647
  }
4648
4648
  } catch (e) {
4649
4649
  throw a.fail(e), e;
4650
4650
  }
4651
4651
  }
4652
- async _load(e, t = {}, n = pe(t), r, i = !1) {
4653
- let a = this.requireBridge();
4652
+ async _load(e, t = {}, n = r(t), i, a = !1) {
4653
+ let o = this.requireBridge();
4654
4654
  this.resourceFailure = null, this.retainedSheetUsage = {
4655
4655
  rows: 0,
4656
4656
  cells: 0,
4657
4657
  ownedUtf8Bytes: 0,
4658
4658
  jsonBytes: 0
4659
4659
  }, this.sheetCache.clear(), await this.worksheetPullClient?.cancelAll("closed"), this.worksheetPullClient = null, this.generation = (this.generation ?? 0) + 1, this.resourcePolicy = n, this.workerTimeoutMs = t.workerTimeoutMs, this.math = this._mode === "worker" ? void 0 : t.math, this.threeD = this._mode === "worker" ? void 0 : t.threeD, this.regionMap = this._mode === "worker" ? void 0 : t.regionMap, this.chartEx = this._mode === "worker" ? void 0 : t.chartEx, this.tiff = this._mode === "worker" ? void 0 : t.tiff;
4660
- let o = this._mode === "worker" ? at(t) : void 0;
4661
- t.math && this._mode === "worker" && !o?.math && console.warn("[ooxml] a custom math renderer cannot cross the worker boundary; equations will be skipped in mode: 'worker'. Use the math renderer from @silurus/ooxml/math."), t.threeD && this._mode === "worker" && !o?.threeD && console.warn("[ooxml] a custom 3-D chart renderer cannot cross the worker boundary; charts use their 2-D family fallback in mode: 'worker'. Use the renderer from @silurus/ooxml/three-d."), t.regionMap && this._mode === "worker" && !o?.regionMap && console.warn("[ooxml] a custom Region Map renderer cannot cross the worker boundary; geospatial charts use the unsupported-chart placeholder in mode: 'worker'. Use the renderer from @silurus/ooxml/region-map."), t.chartEx && this._mode === "worker" && !o?.chartEx && console.warn("[ooxml] a custom ChartEx renderer cannot cross the worker boundary; ChartEx charts use the unsupported-chart placeholder in mode: 'worker'. Use the renderer from @silurus/ooxml/chart-ex."), t.tiff && this._mode === "worker" && !o?.tiff && console.warn("[ooxml] a custom TIFF codec cannot cross the worker boundary; recognized TIFF images will use an unavailable-image placeholder in mode: 'worker'. Use the codec from @silurus/ooxml/tiff to display them.");
4662
- let s = i ? e.slice(0) : e, c = await a.request((e) => this._mode === "worker" ? {
4660
+ let s = this._mode === "worker" ? it(t) : void 0;
4661
+ t.math && this._mode === "worker" && !s?.math && console.warn("[ooxml] a custom math renderer cannot cross the worker boundary; equations will be skipped in mode: 'worker'. Use the math renderer from @silurus/ooxml/math."), t.threeD && this._mode === "worker" && !s?.threeD && console.warn("[ooxml] a custom 3-D chart renderer cannot cross the worker boundary; charts use their 2-D family fallback in mode: 'worker'. Use the renderer from @silurus/ooxml/three-d."), t.regionMap && this._mode === "worker" && !s?.regionMap && console.warn("[ooxml] a custom Region Map renderer cannot cross the worker boundary; geospatial charts use the unsupported-chart placeholder in mode: 'worker'. Use the renderer from @silurus/ooxml/region-map."), t.chartEx && this._mode === "worker" && !s?.chartEx && console.warn("[ooxml] a custom ChartEx renderer cannot cross the worker boundary; ChartEx charts use the unsupported-chart placeholder in mode: 'worker'. Use the renderer from @silurus/ooxml/chart-ex."), t.tiff && this._mode === "worker" && !s?.tiff && console.warn("[ooxml] a custom TIFF codec cannot cross the worker boundary; recognized TIFF images will use an unavailable-image placeholder in mode: 'worker'. Use the codec from @silurus/ooxml/tiff to display them.");
4662
+ let c = a ? e.slice(0) : e, l = await o.request((e) => this._mode === "worker" ? {
4663
4663
  type: "parse",
4664
4664
  id: e,
4665
- data: s,
4665
+ data: c,
4666
4666
  resourcePolicy: n,
4667
4667
  useGoogleFonts: !!t.useGoogleFonts,
4668
- renderers: o
4668
+ renderers: s
4669
4669
  } : {
4670
4670
  type: "parse",
4671
4671
  id: e,
4672
- data: s,
4672
+ data: c,
4673
4673
  resourcePolicy: n
4674
- }, [s], { timeoutMs: t.workerTimeoutMs });
4674
+ }, [c], { timeoutMs: t.workerTimeoutMs });
4675
4675
  if (this._mode === "worker") {
4676
- let e = c;
4677
- this.parsedWorkbook = e.workbook, e.usage && r?.(e.usage);
4676
+ let e = l;
4677
+ this.parsedWorkbook = e.workbook, e.usage && i?.(e.usage);
4678
4678
  } else {
4679
- let { workbookJson: e, usage: t } = c;
4680
- t && r?.(t), this.parsedWorkbook = JSON.parse(new TextDecoder().decode(new Uint8Array(e)));
4679
+ let { workbookJson: e, usage: t } = l;
4680
+ t && i?.(t), this.parsedWorkbook = JSON.parse(new TextDecoder().decode(new Uint8Array(e)));
4681
4681
  }
4682
- let l = this.parsedWorkbook;
4683
- if (!l) throw Error("XLSX worker returned no workbook metadata");
4682
+ let u = this.parsedWorkbook;
4683
+ if (!u) throw Error("XLSX worker returned no workbook metadata");
4684
4684
  this.ensureWorksheetPullClient();
4685
- let u = l.workbook.parseError;
4686
- u && console.warn(`[ooxml] xlsx opened with a degraded part: ${u}`), t.useGoogleFonts && (this.googleFontNames = [...ho(l)], typeof document < "u" && document.fonts && await this.retainFontsInSet(document.fonts));
4685
+ let d = u.workbook.parseError;
4686
+ d && console.warn(`[ooxml] xlsx opened with a degraded part: ${d}`), t.useGoogleFonts && (this.googleFontNames = [...ho(u)], typeof document < "u" && document.fonts && await this.retainFontsInSet(document.fonts));
4687
4687
  }
4688
4688
  async _loadDelimitedText(e, t, n, r) {
4689
4689
  let i = this.requireBridge();
4690
4690
  this.delimitedTextBacked = !0, this.resourcePolicy = n, this.workerTimeoutMs = t.workerTimeoutMs, this.generation++, this.math = this._mode === "worker" ? void 0 : t.math, this.threeD = this._mode === "worker" ? void 0 : t.threeD, this.regionMap = this._mode === "worker" ? void 0 : t.regionMap, this.chartEx = this._mode === "worker" ? void 0 : t.chartEx, this.tiff = this._mode === "worker" ? void 0 : t.tiff;
4691
- let a = this._mode === "worker" ? at(t) : void 0, o = await i.request((n) => ({
4691
+ let a = this._mode === "worker" ? it(t) : void 0, o = await i.request((n) => ({
4692
4692
  type: "parseDelimitedText",
4693
4693
  id: n,
4694
4694
  data: e,
@@ -4705,13 +4705,13 @@ var ko = Symbol("retain-xlsx-viewer-fonts"), Ao = Symbol("prepare-xlsx-viewer-ro
4705
4705
  let t = this.retainedFontSets.get(e);
4706
4706
  if (t) t.refs++;
4707
4707
  else {
4708
- let n = Ne(this.googleFontNames, po, e);
4708
+ let n = G(this.googleFontNames, po, e);
4709
4709
  t = {
4710
4710
  refs: 1,
4711
4711
  faces: null,
4712
4712
  loading: n
4713
4713
  }, this.retainedFontSets.set(e, t), n.then((e) => {
4714
- t.faces = e, this.fontsDestroyed && Me(e);
4714
+ t.faces = e, this.fontsDestroyed && ge(e);
4715
4715
  });
4716
4716
  }
4717
4717
  await t.loading;
@@ -4720,7 +4720,7 @@ var ko = Symbol("retain-xlsx-viewer-fonts"), Ao = Symbol("prepare-xlsx-viewer-ro
4720
4720
  if (n) return;
4721
4721
  n = !0;
4722
4722
  let r = this.retainedFontSets.get(e);
4723
- r === t && (r.refs--, !(r.refs > 0) && (this.retainedFontSets.delete(e), r.faces ? Me(r.faces) : r.loading.then(Me)));
4723
+ r === t && (r.refs--, !(r.refs > 0) && (this.retainedFontSets.delete(e), r.faces ? ge(r.faces) : r.loading.then(ge)));
4724
4724
  };
4725
4725
  }
4726
4726
  async [ko](e) {
@@ -4770,7 +4770,7 @@ var ko = Symbol("retain-xlsx-viewer-fonts"), Ao = Symbol("prepare-xlsx-viewer-ro
4770
4770
  if (!t) throw Error("OOXML resource metrics are not ready");
4771
4771
  return t;
4772
4772
  }
4773
- return f(e, async (e) => (await this.requireBridge().request((e) => ({
4773
+ return _(e, async (e) => (await this.requireBridge().request((e) => ({
4774
4774
  type: "resourceUsage",
4775
4775
  id: e
4776
4776
  }), void 0, { timeoutMs: e })).usage);
@@ -4813,7 +4813,7 @@ var ko = Symbol("retain-xlsx-viewer-fonts"), Ao = Symbol("prepare-xlsx-viewer-ro
4813
4813
  if (!a || !o) throw Error(`XLSX worksheet ${e} did not produce a terminal model`);
4814
4814
  return this.retainedSheetUsage = o, this.sheetCache.set(e, a), a;
4815
4815
  } catch (e) {
4816
- throw e instanceof ae && (this.resourceFailure ??= e), e;
4816
+ throw e instanceof A && (this.resourceFailure ??= e), e;
4817
4817
  }
4818
4818
  }
4819
4819
  ensureWorksheetPullClient() {
@@ -4841,7 +4841,7 @@ var ko = Symbol("retain-xlsx-viewer-fonts"), Ao = Symbol("prepare-xlsx-viewer-ro
4841
4841
  try {
4842
4842
  return await e();
4843
4843
  } catch (e) {
4844
- throw e instanceof ae && (this.resourceFailure ??= e), e;
4844
+ throw e instanceof A && (this.resourceFailure ??= e), e;
4845
4845
  }
4846
4846
  }, n = (this.archiveOperationTail ?? Promise.resolve()).then(t, t);
4847
4847
  return this.archiveOperationTail = n.then(() => void 0, () => void 0), n;
@@ -4917,26 +4917,26 @@ var ko = Symbol("retain-xlsx-viewer-fonts"), Ao = Symbol("prepare-xlsx-viewer-ro
4917
4917
  });
4918
4918
  });
4919
4919
  }
4920
- async renderViewportToBitmap(e, t, n) {
4920
+ async renderViewportToBitmap(e, n, r) {
4921
4921
  this.assertResourceHealthy();
4922
- let r = Co(n), i = {
4923
- ...r.opts,
4924
- dpr: n.dpr ?? h()
4922
+ let i = Co(r), a = {
4923
+ ...i.opts,
4924
+ dpr: r.dpr ?? t()
4925
4925
  };
4926
4926
  if (this._mode === "worker") {
4927
4927
  if (!Number.isInteger(e) || e < 0 || e >= this.sheetCount) throw Error(`Sheet index ${e} out of range (count: ${this.sheetCount})`);
4928
- return (await this.withWorksheetArchiveOperation(e, () => this.requireBridge().request((n) => ({
4928
+ return (await this.withWorksheetArchiveOperation(e, () => this.requireBridge().request((t) => ({
4929
4929
  type: "renderViewport",
4930
- id: n,
4930
+ id: t,
4931
4931
  sheetIndex: e,
4932
- viewport: t,
4933
- opts: i,
4934
- layoutMetrics: r.layoutMetrics,
4935
- viewProjection: r.projection
4932
+ viewport: n,
4933
+ opts: a,
4934
+ layoutMetrics: i.layoutMetrics,
4935
+ viewProjection: i.projection
4936
4936
  })))).bitmap;
4937
4937
  }
4938
- let a = new OffscreenCanvas(1, 1);
4939
- return await this.renderViewport(a, e, t, i), a.transferToImageBitmap();
4938
+ let o = new OffscreenCanvas(1, 1);
4939
+ return await this.renderViewport(o, e, n, a), o.transferToImageBitmap();
4940
4940
  }
4941
4941
  [jo](e) {
4942
4942
  this._mode === "worker" && this.requireBridge().post({
@@ -4968,8 +4968,8 @@ var ko = Symbol("retain-xlsx-viewer-fonts"), Ao = Symbol("prepare-xlsx-viewer-ro
4968
4968
  }
4969
4969
  destroy() {
4970
4970
  this.generation = (this.generation ?? 1) + 1, this.worksheetPullClient?.cancelAll("closed").catch(() => void 0), this.worksheetPullClient = null, this.bridge?.terminate(), this.bridge = null, this.parsedWorkbook = null, this.sheetCache.clear(), this.sheetLoads.clear(), this.fontsDestroyed = !0;
4971
- for (let e of this.retainedFontSets.values()) e.faces && Me(e.faces);
4972
- this.retainedFontSets.clear(), this.googleFontNames = [], M(this._fetchImage), j(this._fetchImage), this.rawParts.clear(), this.queuedImageLoads?.clear();
4971
+ for (let e of this.retainedFontSets.values()) e.faces && ge(e.faces);
4972
+ this.retainedFontSets.clear(), this.googleFontNames = [], P(this._fetchImage), z(this._fetchImage), this.rawParts.clear(), this.queuedImageLoads?.clear();
4973
4973
  }
4974
4974
  assertResourceHealthy() {
4975
4975
  if (this.resourceFailure) throw this.resourceFailure;
@@ -5196,7 +5196,7 @@ function Zo(e, t, n, r, i) {
5196
5196
  for (let a = e.charts.length - 1; a >= 0; a--) {
5197
5197
  let o = e.charts[a], s = Vo(o, r);
5198
5198
  if (!s || !Uo(s, r) || !Ho(n, s)) continue;
5199
- let c = q(o.chart, i);
5199
+ let c = xe(o.chart, i);
5200
5200
  return {
5201
5201
  ...Xo(e, t, "chart", a, o, c.text, c.truncated, c.maxTextCharacters),
5202
5202
  seriesCount: o.chart.series.length
@@ -5249,16 +5249,16 @@ function es(e, t, n, r, i) {
5249
5249
  }
5250
5250
  return null;
5251
5251
  }
5252
- function ts(e, t, n, r, i = De) {
5252
+ function ts(e, t, n, r, i = ke) {
5253
5253
  if (!Number.isFinite(n.x) || !Number.isFinite(n.y)) throw RangeError("XLSX hit-test point must contain finite coordinates.");
5254
5254
  if (!Number.isFinite(i) || i < 0) throw RangeError("maxTextCharacters must be a finite non-negative number.");
5255
- let a = Math.min(De, Math.floor(i)), o = Go(e, r);
5255
+ let a = Math.min(ke, Math.floor(i)), o = Go(e, r);
5256
5256
  return Wo(n, o) ? Zo(e, t, n, o, a) ?? $o(e, t, n, o, a) ?? es(e, t, n, o, a) : null;
5257
5257
  }
5258
5258
  function ns(e, t) {
5259
5259
  let n = t ?? e.maxTextCharacters;
5260
5260
  if (!Number.isFinite(n) || n < 0) throw RangeError("maxTextCharacters must be a finite non-negative number.");
5261
- let r = Math.min(De, Math.floor(n)), i = e.text === void 0 ? void 0 : Jo(e.text, r), a = e.truncated || e.text !== void 0 && i.length < e.text.length;
5261
+ let r = Math.min(ke, Math.floor(n)), i = e.text === void 0 ? void 0 : Jo(e.text, r), a = e.truncated || e.text !== void 0 && i.length < e.text.length;
5262
5262
  return {
5263
5263
  ...structuredClone(e),
5264
5264
  ...i === void 0 ? {} : { text: i },
@@ -5475,7 +5475,7 @@ var hs = class {
5475
5475
  if (n !== this._generation) return [];
5476
5476
  let o = this._sheetName(a);
5477
5477
  for (let n of r) {
5478
- let r = xe(we([{ text: n.text }]), e, t);
5478
+ let r = Ce(Ee([{ text: n.text }]), e, t);
5479
5479
  for (let e of r) {
5480
5480
  let t = e.slices[0], r = n.text.slice(t.start, t.end);
5481
5481
  i.push({
@@ -5491,10 +5491,10 @@ var hs = class {
5491
5491
  return n === this._generation ? (this._matches = i, this._active = -1, this.matches()) : [];
5492
5492
  }
5493
5493
  next() {
5494
- return this._active = be(this._active, this._matches.length), this._activePublic();
5494
+ return this._active = Se(this._active, this._matches.length), this._activePublic();
5495
5495
  }
5496
5496
  prev() {
5497
- return this._active = Te(this._active, this._matches.length), this._activePublic();
5497
+ return this._active = De(this._active, this._matches.length), this._activePublic();
5498
5498
  }
5499
5499
  _activePublic() {
5500
5500
  let e = this._locationAt(this._active);
@@ -5677,7 +5677,7 @@ function Os(e, t) {
5677
5677
  //#endregion
5678
5678
  //#region packages/xlsx/src/internal/sheet-viewer-runtime.ts
5679
5679
  var ks = class {
5680
- owner = new ve("SheetAcquisition");
5680
+ owner = new q("SheetAcquisition");
5681
5681
  get current() {
5682
5682
  return this.owner.current;
5683
5683
  }
@@ -5759,7 +5759,7 @@ var js = class {
5759
5759
  this.frameScheduler = typeof r.requestAnimationFrame == "function" && typeof r.cancelAnimationFrame == "function" ? {
5760
5760
  requestAnimationFrame: (e) => r.requestAnimationFrame(e),
5761
5761
  cancelAnimationFrame: (e) => r.cancelAnimationFrame(e)
5762
- } : null, this.staticDispatcher = e ? new Se(e, t) : null;
5762
+ } : null, this.staticDispatcher = e ? new we(e, t) : null;
5763
5763
  }
5764
5764
  begin() {
5765
5765
  return this.staticDispatcher ? this.staticDispatcher.begin() : ++this.generation;
@@ -6362,7 +6362,7 @@ var Ec = class {
6362
6362
  if (!r) throw Error("XlsxViewer requires a document with an active Window");
6363
6363
  this.hostWindow = r, this.opts = t, this._mountKind = n.kind, this._nativeScrollbars = t.showScrollbars ?? !0;
6364
6364
  let i = t[zs];
6365
- this._borrowed = i !== void 0, this._mode = n.kind === "sheet" ? n.mode : Ce("XlsxViewer", t.mode, i), this._hiddenSheetMode = t.hiddenSheetMode ?? "show", this.viewport = new js(t.cellScale ?? 1), this.wrapper = this.hostDocument.createElement("div"), this.wrapper.style.cssText = `position:relative;width:100%;height:100%;background:${n.kind === "composite" ? "var(--ooxml-xlsx-chrome-surface,#fff)" : "transparent"};box-sizing:border-box;font-family:sans-serif;display:flex;flex-direction:column;`, this.gridRegion = this.hostDocument.createElement("div"), this.gridRegion.style.cssText = "position:relative;flex:1;min-height:0;overflow:hidden;";
6365
+ this._borrowed = i !== void 0, this._mode = n.kind === "sheet" ? n.mode : Te("XlsxViewer", t.mode, i), this._hiddenSheetMode = t.hiddenSheetMode ?? "show", this.viewport = new js(t.cellScale ?? 1), this.wrapper = this.hostDocument.createElement("div"), this.wrapper.style.cssText = `position:relative;width:100%;height:100%;background:${n.kind === "composite" ? "var(--ooxml-xlsx-chrome-surface,#fff)" : "transparent"};box-sizing:border-box;font-family:sans-serif;display:flex;flex-direction:column;`, this.gridRegion = this.hostDocument.createElement("div"), this.gridRegion.style.cssText = "position:relative;flex:1;min-height:0;overflow:hidden;";
6366
6366
  let a = "position:absolute;top:0;left:0;z-index:3;display:none;background:var(--ooxml-xlsx-chrome-background,#f5f5f5);";
6367
6367
  this.cornerGutter = this.hostDocument.createElement("canvas"), this.cornerGutter.style.cssText = a, this.cornerGutter.setAttribute("data-xlsx-outline", "corner"), this.colGutter = this.hostDocument.createElement("canvas"), this.colGutter.style.cssText = a, this.colGutter.setAttribute("data-xlsx-outline", "col"), this.rowGutter = this.hostDocument.createElement("canvas"), this.rowGutter.style.cssText = a, this.rowGutter.setAttribute("data-xlsx-outline", "row"), this.canvasArea = this.hostDocument.createElement("div"), this.canvasArea.style.cssText = "position:absolute;inset:0;overflow:hidden;", this.canvas = n.kind === "sheet" ? n.canvas : this.hostDocument.createElement("canvas"), this.canvas.style.cssText = "position:absolute;top:0;left:0;z-index:0;display:block;", this.renderDispatcher = new Ms(this.canvas, this._mode === "worker", this.hostWindow), this.scrollHost = this.hostDocument.createElement("div"), this.scrollHost.setAttribute("data-xlsx-viewport-input", n.kind), this.scrollHost.setAttribute("role", "region"), this.scrollHost.setAttribute("aria-label", "Spreadsheet viewport. Use Arrow keys to move the selected cell. Press Enter to show its comment."), this.scrollHost.tabIndex = 0, this.scrollHost.style.cssText = `position:absolute;inset:0;overflow:${this._nativeScrollbars ? "auto" : "clip"};z-index:2;background:transparent;scrollbar-color:var(--ooxml-xlsx-chrome-scrollbar-color,auto);`, this.spacer = this.hostDocument.createElement("div"), this.spacer.style.cssText = "position:absolute;top:0;left:0;pointer-events:none;", this._nativeScrollbars && this.scrollHost.appendChild(this.spacer), this.surface = new Ps(this.canvas, this.canvasArea, this.scrollHost), this.overlayHost = new Fs(this.canvasArea, this.canvas, this.scrollHost, {
6368
6368
  commentMaxWidth: Ws,
@@ -6822,10 +6822,10 @@ var Ec = class {
6822
6822
  !n || !this.currentWorksheet || (this._scrollCellIntoView(n.row, n.col, t.align ?? "nearest"), await this.renderCurrentSheet(), this.updateSelectionOverlay(), this.updateFindOverlay(), this.emitViewportChange());
6823
6823
  }
6824
6824
  _stepSheet(e) {
6825
- return this._hiddenSheetMode === "skip" && this.wb ? ot(this.currentSheet, e, (e) => this.wb.isHidden(e), this.sheetCount) : this.currentSheet + e;
6825
+ return this._hiddenSheetMode === "skip" && this.wb ? at(this.currentSheet, e, (e) => this.wb.isHidden(e), this.sheetCount) : this.currentSheet + e;
6826
6826
  }
6827
6827
  _initialSheet() {
6828
- return this._hiddenSheetMode === "skip" && this.wb ? st(0, (e) => this.wb.isHidden(e), this.sheetCount) : 0;
6828
+ return this._hiddenSheetMode === "skip" && this.wb ? ot(0, (e) => this.wb.isHidden(e), this.sheetCount) : 0;
6829
6829
  }
6830
6830
  getCellAt(e, t) {
6831
6831
  if (this._destroyed) return null;
@@ -7191,7 +7191,7 @@ var Ec = class {
7191
7191
  this.opts.selectionColor = e, this.updateSelectionOverlay();
7192
7192
  }
7193
7193
  async setHiddenSheetMode(e) {
7194
- this._hiddenSheetMode = e, this.buildTabs(), e === "skip" && this.wb && this.wb.isHidden(this.currentSheet) ? await this.showSheet(st(this.currentSheet, (e) => this.wb.isHidden(e), this.sheetCount)) : this.updateTabActive(this.currentSheet);
7194
+ this._hiddenSheetMode = e, this.buildTabs(), e === "skip" && this.wb && this.wb.isHidden(this.currentSheet) ? await this.showSheet(ot(this.currentSheet, (e) => this.wb.isHidden(e), this.sheetCount)) : this.updateTabActive(this.currentSheet);
7195
7195
  }
7196
7196
  get hiddenSheetMode() {
7197
7197
  return this._hiddenSheetMode;
@@ -7199,7 +7199,7 @@ var Ec = class {
7199
7199
  get visibleSheetCount() {
7200
7200
  if (!this.wb) return 0;
7201
7201
  let e = this.wb;
7202
- return ct((t) => e.isHidden(t), this.sheetCount);
7202
+ return st((t) => e.isHidden(t), this.sheetCount);
7203
7203
  }
7204
7204
  async copySelection() {
7205
7205
  this.assertOpen();
@@ -7631,7 +7631,7 @@ var Ec = class {
7631
7631
  };
7632
7632
  else return !1;
7633
7633
  let r = this.opts.onHyperlinkClick;
7634
- return r ? (r(n), !0) : (n.kind === "external" ? ie(n.url, void 0, this.hostWindow) : this.navigateInternalHyperlink(n.ref).catch((e) => this._reportRenderError(e)), !0);
7634
+ return r ? (r(n), !0) : (n.kind === "external" ? U(n.url, void 0, this.hostWindow) : this.navigateInternalHyperlink(n.ref).catch((e) => this._reportRenderError(e)), !0);
7635
7635
  }
7636
7636
  async navigateInternalHyperlink(e) {
7637
7637
  let t = Bo(e, this.currentSheet, this.sheetNames, this.currentWorksheet?.definedNames ?? []);
@@ -7992,7 +7992,7 @@ var Ec = class {
7992
7992
  this._pendingZoomAnchor = Number.isFinite(t) && Number.isFinite(n) ? {
7993
7993
  x: t,
7994
7994
  y: n
7995
- } : null, this.setScale(Ae(this.viewport.scale, e.deltaY, e.deltaMode));
7995
+ } : null, this.setScale(Me(this.viewport.scale, e.deltaY, e.deltaMode));
7996
7996
  }, { passive: !1 }), this.surface.on("pointerleave", (e) => {
7997
7997
  let t = e.relatedTarget;
7998
7998
  t && this.commentPopup.contains(t) || this.hideCommentPopup();
@@ -8105,8 +8105,8 @@ var Ec = class {
8105
8105
  if (this.viewport.setScale(i), this.zoomSlider && (this.zoomSlider.value = String(this.zoomScaleToPos(i, t, n))), this.zoomLabel && (this.zoomLabel.textContent = `${r}%`), this.currentWorksheet) {
8106
8106
  let e = this.effectiveScrollLeft, t = this.viewportTop;
8107
8107
  if (this.layoutGutters(), this.updateSpacerSize(this.currentWorksheet), o) {
8108
- this.viewportTop = ye(t, o.y, a, i, { maxScroll: this.maxScrollTop });
8109
- let n = this.screenX(o.x, 0), r = this.maxScrollLeft, s = ye(e, n, a, i, { maxScroll: r });
8108
+ this.viewportTop = be(t, o.y, a, i, { maxScroll: this.maxScrollTop });
8109
+ let n = this.screenX(o.x, 0), r = this.maxScrollLeft, s = be(e, n, a, i, { maxScroll: r });
8110
8110
  this.setViewportLeft(s);
8111
8111
  } else this.setViewportLeft(e);
8112
8112
  }
@@ -8117,10 +8117,10 @@ var Ec = class {
8117
8117
  return this.viewport.scale;
8118
8118
  }
8119
8119
  zoomIn() {
8120
- this.setScale(Oe(this.getScale()));
8120
+ this.setScale(Ae(this.getScale()));
8121
8121
  }
8122
8122
  zoomOut() {
8123
- this.setScale(je(this.getScale()));
8123
+ this.setScale(Ne(this.getScale()));
8124
8124
  }
8125
8125
  fitWidth() {
8126
8126
  this._fit("width");
@@ -8131,7 +8131,7 @@ var Ec = class {
8131
8131
  _fit(e) {
8132
8132
  let t = this.currentWorksheet;
8133
8133
  if (!t) return;
8134
- let { width: n, height: r } = this._naturalContentExtent(t), i = _e({
8134
+ let { width: n, height: r } = this._naturalContentExtent(t), i = ye({
8135
8135
  contentWidth: n,
8136
8136
  contentHeight: r,
8137
8137
  containerWidth: this.canvasArea.clientWidth,
@@ -8263,8 +8263,8 @@ var Ec = class {
8263
8263
  }
8264
8264
  constructor(e, t = {}) {
8265
8265
  this.canvasElement = e;
8266
- let n = t[zs], r = Ce("XlsxSheetViewer", t.mode, n), i = e.getBoundingClientRect();
8267
- this.canvasMount = new Ee(e, {
8266
+ let n = t[zs], r = Te("XlsxSheetViewer", t.mode, n), i = e.getBoundingClientRect();
8267
+ this.canvasMount = new Oe(e, {
8268
8268
  wrapperCssText: `position:relative;display:inline-block;vertical-align:top;overflow:hidden;width:${e.style.width || `${i.width || e.width}px`};height:${e.style.height || `${i.height || e.height}px`};`,
8269
8269
  restoreMode: "style-and-bitmap"
8270
8270
  }), this.engine = new Ec(this.canvasMount.wrapper, {
@@ -8439,17 +8439,17 @@ var Ec = class {
8439
8439
  MAX_SELECTION_AREAS: () => 128,
8440
8440
  MAX_SELECTION_CONTEXT_CELLS: () => is,
8441
8441
  MAX_SELECTION_CONTEXT_TEXT_CHARACTERS: () => as,
8442
- OoxmlDecodedImageLimitError: () => Ze,
8443
- OoxmlError: () => V,
8444
- OoxmlResourceLimitError: () => ae,
8445
- TiffDecodeError: () => nt,
8442
+ OoxmlDecodedImageLimitError: () => Xe,
8443
+ OoxmlError: () => W,
8444
+ OoxmlResourceLimitError: () => A,
8445
+ TiffDecodeError: () => tt,
8446
8446
  XlsxSheetViewer: () => Oc,
8447
8447
  XlsxViewer: () => Dc,
8448
8448
  XlsxWorkbook: () => No,
8449
- autoResize: () => ge,
8450
- isOoxmlDecodedImageLimitError: () => Xe,
8451
- isTiffDecodeError: () => rt,
8452
- openExternalHyperlink: () => ie,
8449
+ autoResize: () => ve,
8450
+ isOoxmlDecodedImageLimitError: () => Ye,
8451
+ isTiffDecodeError: () => nt,
8452
+ openExternalHyperlink: () => U,
8453
8453
  resolveSharedStrings: () => mt
8454
8454
  });
8455
8455
  //#endregion