@silurus/ooxml 0.79.1 → 0.80.0

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 (45) hide show
  1. package/README.md +22 -15
  2. package/dist/assets/render-worker-BSx9_xRC.js +8 -0
  3. package/dist/assets/render-worker-BTp87EaD.js +21 -0
  4. package/dist/assets/render-worker-fdwAjSve.js +7 -0
  5. package/dist/{canvas-viewer-mechanics-DJ9yfiLN.js → canvas-viewer-mechanics-D41tGY4d.js} +1 -1
  6. package/dist/{document-pull-client-DYoybVCn.js → document-pull-client-D-fnlVGf.js} +2246 -2253
  7. package/dist/{docx-CSk_-kj_.js → docx-CbIqgb1f.js} +107 -105
  8. package/dist/docx.mjs +4 -4
  9. package/dist/index.mjs +3 -3
  10. package/dist/line-distribute-DFdgzaLK.js +1002 -0
  11. package/dist/{line-metrics-A77J_KRx.js → line-metrics-PpgpOvz4.js} +1813 -1680
  12. package/dist/math.mjs +34 -24
  13. package/dist/node.mjs +186 -186
  14. package/dist/{pptx-CO1Ut97p.js → pptx-DwF8olh2.js} +128 -126
  15. package/dist/pptx.mjs +5 -5
  16. package/dist/region-map.mjs +75 -74
  17. package/dist/{render-C5m7Ddwx.js → render-BMC4d1CO.js} +1 -1
  18. package/dist/render-worker-host-CcENRoDr.js +9 -0
  19. package/dist/render-worker-host-CzsHtsN_.js +9 -0
  20. package/dist/render-worker-host-DFgTN7hy.js +9 -0
  21. package/dist/renderer-module-contract-BNGz8HvO.js +30 -0
  22. package/dist/{resource-measurement-COxqtfGk.js → resource-measurement-DvIKHd-9.js} +7 -7
  23. package/dist/{session-CJwZaquG.js → session-BzhcJOvj.js} +9 -9
  24. package/dist/{slide-pull-client-CFHNk0ek.js → slide-pull-client-DLC3nJUt.js} +847 -861
  25. package/dist/three-d.mjs +311 -310
  26. package/dist/types/docx.d.ts +7 -7
  27. package/dist/types/index.d.ts +9 -9
  28. package/dist/types/math.d.ts +1 -1
  29. package/dist/types/node.d.ts +2 -2
  30. package/dist/types/pptx.d.ts +7 -7
  31. package/dist/types/region-map.d.ts +2 -2
  32. package/dist/types/three-d.d.ts +2 -2
  33. package/dist/types/xlsx.d.ts +7 -7
  34. package/dist/{worksheet-pull-client-CziyJf24.js → worksheet-pull-client-DlVk_4Bt.js} +13 -13
  35. package/dist/{xlsx-DHQmjAfh.js → xlsx-C1BUns1R.js} +1206 -1216
  36. package/dist/xlsx.mjs +5 -5
  37. package/package.json +4 -1
  38. package/dist/line-distribute-CU7vu7XS.js +0 -1002
  39. package/dist/render-worker-host-BhMT5U73.js +0 -27
  40. package/dist/render-worker-host-DNMxGh5s.js +0 -27
  41. package/dist/render-worker-host-DWyg7wio.js +0 -27
  42. /package/dist/{highlight-rect-cCvVU-MW.js → highlight-rect-BuX5rWP4.js} +0 -0
  43. /package/dist/{mathjax-Dqo857oC.js → mathjax-DgAl7Yi5.js} +0 -0
  44. /package/dist/{transfer-3QEJrsJa.js → transfer-CKZ79zFw.js} +0 -0
  45. /package/dist/{visible-index-CKvgpUrf.js → visible-index-BjesVGhg.js} +0 -0
package/dist/node.mjs CHANGED
@@ -1,18 +1,18 @@
1
1
  import { t as e } from "./chunk-DmhlhrBa.js";
2
- import { t } from "./slide-pull-client-CFHNk0ek.js";
3
- import { B as n, Et as r, F as i, H as a, I as o, It as s, Lt as c, P as l, R as u, U as d, W as f, at as p, kt as m, ot as h, q as g, rt as _, sn as v, st as ee } from "./line-metrics-A77J_KRx.js";
4
- import { t as te } from "./bounded-raw-part-cache-C6ro6Ezf.js";
5
- import { a as ne, c as re, i as ie, l as ae, r as oe, u as se } from "./document-pull-client-DYoybVCn.js";
6
- import { t as ce } from "./transfer-3QEJrsJa.js";
7
- import { a as le, c as ue, d as de, l as fe, o as pe, r as me, s as he, t as ge, u as _e } from "./worksheet-pull-client-CziyJf24.js";
8
- import { a as ve, i as ye, n as be, r as xe } from "./session-CJwZaquG.js";
9
- import { a as Se, n as Ce, r as we, t as Te } from "./render-C5m7Ddwx.js";
10
- import { existsSync as Ee, readFileSync as De } from "node:fs";
11
- import { fileURLToPath as Oe } from "node:url";
12
- import { basename as ke, dirname as Ae, resolve as je } from "node:path";
13
- import { createRequire as Me } from "node:module";
2
+ import { t } from "./slide-pull-client-DLC3nJUt.js";
3
+ import { B as n, F as r, H as i, I as a, Ot as o, P as s, R as c, Rt as l, U as u, W as d, at as f, jt as p, ln as m, ot as h, q as g, rt as _, st as ee, zt as te } from "./line-metrics-PpgpOvz4.js";
4
+ import { t as ne } from "./bounded-raw-part-cache-C6ro6Ezf.js";
5
+ import { a as re, c as ie, i as ae, l as oe, r as se, u as ce } from "./document-pull-client-D-fnlVGf.js";
6
+ import { t as le } from "./transfer-CKZ79zFw.js";
7
+ import { a as ue, c as de, d as fe, l as pe, o as me, r as he, s as ge, t as _e, u as ve } from "./worksheet-pull-client-DlVk_4Bt.js";
8
+ import { a as ye, i as be, n as xe, r as Se } from "./session-BzhcJOvj.js";
9
+ import { a as Ce, n as we, r as Te, t as Ee } from "./render-BMC4d1CO.js";
10
+ import { existsSync as De, readFileSync as Oe } from "node:fs";
11
+ import { fileURLToPath as ke } from "node:url";
12
+ import { basename as Ae, dirname as je, resolve as Me } from "node:path";
13
+ import { createRequire as Ne } from "node:module";
14
14
  //#region packages/core/src/internal/owned-session.ts
15
- async function y(e, t) {
15
+ async function v(e, t) {
16
16
  let n = await e(), r;
17
17
  try {
18
18
  return await t(n);
@@ -28,7 +28,7 @@ async function y(e, t) {
28
28
  }
29
29
  //#endregion
30
30
  //#region packages/core/src/internal/in-process-pull-transport.ts
31
- var b = class {
31
+ var y = class {
32
32
  nextRequestId = 1;
33
33
  terminated = !1;
34
34
  constructor(e, t) {
@@ -54,27 +54,27 @@ var b = class {
54
54
  };
55
55
  //#endregion
56
56
  //#region packages/node/src/wasm-loader.ts
57
- function Ne(e) {
58
- return new WebAssembly.Module(De(e));
57
+ function Pe(e) {
58
+ return new WebAssembly.Module(Oe(e));
59
59
  }
60
- function Pe(e, t = Ne) {
60
+ function b(e, t = Pe) {
61
61
  let n = {};
62
62
  return () => n.value ??= t(e());
63
63
  }
64
64
  function Fe(e, t, n) {
65
- let r = Ae(Oe(e)), i = je(r, t);
66
- if (Ee(i)) return i;
67
- let a = je(r, ke(t));
68
- return Ee(a) || !n ? a : Me(e).resolve(n);
65
+ let r = je(ke(e)), i = Me(r, t);
66
+ if (De(i)) return i;
67
+ let a = Me(r, Ae(t));
68
+ return De(a) || !n ? a : Ne(e).resolve(n);
69
69
  }
70
70
  //#endregion
71
71
  //#region packages/node/src/pptx.ts
72
- var Ie = Pe(() => Fe(import.meta.url, "pptx_parser_bg.wasm", "@silurus/ooxml-pptx/wasm-binary"));
72
+ var Ie = b(() => Fe(import.meta.url, "pptx_parser_bg.wasm", "@silurus/ooxml-pptx/wasm-binary"));
73
73
  async function Le(e, t = {}) {
74
74
  return Re(e, t);
75
75
  }
76
76
  async function Re(e, t = {}) {
77
- let n = await be(Ve(e), Ie(), t);
77
+ let n = await xe(Ve(e), Ie(), t);
78
78
  return new ze(n.closeArchive, n.archive, n.bootstrap, n.metrics, t.signal);
79
79
  }
80
80
  var ze = class {
@@ -93,12 +93,12 @@ var ze = class {
93
93
  renderTail = Promise.resolve();
94
94
  fetchImage = (e, t) => this.getPartInternal(e, t, (t) => t.extract_image(e));
95
95
  fetchMedia = (e) => this.getPartInternal(e, "application/octet-stream", (t) => t.extract_media(e));
96
- rawParts = new te({
96
+ rawParts = new ne({
97
97
  maxEntries: 64,
98
98
  maxBytes: g
99
99
  });
100
100
  constructor(e, n, r, i, a) {
101
- this.closeArchive = e, this.archive = n, this.bootstrap = r, this.metrics = i, this.signal = a, this.slideCount = r.slideCount, this.slideWidth = r.slideWidth, this.slideHeight = r.slideHeight, this.slidePull = new ye(() => this.archive), this.transport = new b((e, t) => this.slidePull.dispatchSafely(e, t), () => void 0), this.slideClient = new t({
101
+ this.closeArchive = e, this.archive = n, this.bootstrap = r, this.metrics = i, this.signal = a, this.slideCount = r.slideCount, this.slideWidth = r.slideWidth, this.slideHeight = r.slideHeight, this.slidePull = new be(() => this.archive), this.transport = new y((e, t) => this.slidePull.dispatchSafely(e, t), () => void 0), this.slideClient = new t({
102
102
  slideCount: this.slideCount,
103
103
  transport: this.transport,
104
104
  open: async (e, t) => {
@@ -133,7 +133,7 @@ var ze = class {
133
133
  async renderSlide(e, t, n) {
134
134
  return this.assertOpen(), this.enqueueRender(async () => {
135
135
  x(this.signal);
136
- let { renderSlideNode: r } = await import("./render-C5m7Ddwx.js").then((e) => e.i);
136
+ let { renderSlideNode: r } = await import("./render-BMC4d1CO.js").then((e) => e.i);
137
137
  await r(e, {
138
138
  slideWidth: this.slideWidth,
139
139
  slideHeight: this.slideHeight,
@@ -163,10 +163,10 @@ var ze = class {
163
163
  x(this.signal);
164
164
  let t = await this.slideClient.load(e);
165
165
  if (!t) throw Error(`PPTX slide ${e} was not decoded`);
166
- this.usage ??= await this.slidePull.run(() => ve((e) => e(this.archive))), this.metrics.observeUsage(this.usage), this.consumedSlides = e + 1, yield t;
166
+ this.usage ??= await this.slidePull.run(() => ye((e) => e(this.archive))), this.metrics.observeUsage(this.usage), this.consumedSlides = e + 1, yield t;
167
167
  }
168
168
  } catch (t) {
169
- throw e = p(t) ?? t, this.metrics.fail(e), e;
169
+ throw e = f(t) ?? t, this.metrics.fail(e), e;
170
170
  } finally {
171
171
  try {
172
172
  await this.close();
@@ -180,17 +180,17 @@ var ze = class {
180
180
  }
181
181
  async release() {
182
182
  let e;
183
- await this.renderTail, m(this.fetchImage), r(this.fetchImage);
183
+ await this.renderTail, p(this.fetchImage), o(this.fetchImage);
184
184
  try {
185
185
  await this.slidePull.reset();
186
186
  } catch (t) {
187
- e = p(t) ?? t;
187
+ e = f(t) ?? t;
188
188
  }
189
189
  this.transport.terminate(), this.rawParts.clear();
190
190
  try {
191
191
  this.closeArchive();
192
192
  } catch (t) {
193
- e ??= p(t) ?? t;
193
+ e ??= f(t) ?? t;
194
194
  }
195
195
  if (e !== void 0) throw this.metrics.fail(e), e;
196
196
  this.metrics.checkpoint("presentation session closed"), this.metrics.succeed({ slides: this.consumedSlides });
@@ -217,12 +217,12 @@ var ze = class {
217
217
  if (this.resourceFailure) throw this.resourceFailure;
218
218
  }
219
219
  failOperation(e) {
220
- let t = p(e) ?? e;
221
- throw t instanceof v && (this.resourceFailure ??= t), this.metrics.fail(t), t;
220
+ let t = f(e) ?? e;
221
+ throw t instanceof m && (this.resourceFailure ??= t), this.metrics.fail(t), t;
222
222
  }
223
223
  };
224
224
  async function Be(e, t = {}) {
225
- return y(() => Re(e, t), async (e) => {
225
+ return v(() => Re(e, t), async (e) => {
226
226
  let t = [];
227
227
  for await (let n of e.slides()) t.push(n);
228
228
  return e.materialize(t);
@@ -238,8 +238,8 @@ function x(e) {
238
238
  }
239
239
  //#endregion
240
240
  //#region packages/docx/src/document-pull-worker.ts
241
- var He = Math.max(d, f), Ue = class {
242
- coordinator = new o();
241
+ var He = Math.max(u, d), Ue = class {
242
+ coordinator = new a();
243
243
  host = null;
244
244
  identity = null;
245
245
  constructor(e, t = (e) => e(this.requireArchive())) {
@@ -251,7 +251,7 @@ var He = Math.max(d, f), Ue = class {
251
251
  t.open_document_cursor(e.operationId, e.generation);
252
252
  });
253
253
  let t = 0;
254
- this.identity = e, this.host = new i({
254
+ this.identity = e, this.host = new r({
255
255
  ...e,
256
256
  maxByteCredit: He,
257
257
  coordinator: this.coordinator,
@@ -263,7 +263,7 @@ var He = Math.max(d, f), Ue = class {
263
263
  } catch (e) {
264
264
  throw ee(e, n, He) || e;
265
265
  }
266
- let i = ce(r);
266
+ let i = le(r);
267
267
  return {
268
268
  payload: i,
269
269
  byteLength: i.byteLength,
@@ -287,7 +287,7 @@ var He = Math.max(d, f), Ue = class {
287
287
  }
288
288
  dispatch(e, t) {
289
289
  return !this.host || !this.identity ? (t({
290
- protocol: l,
290
+ protocol: s,
291
291
  kind: "error",
292
292
  sessionId: e.sessionId,
293
293
  operationId: e.operationId,
@@ -300,7 +300,7 @@ var He = Math.max(d, f), Ue = class {
300
300
  if (this.host) try {
301
301
  this.archive() && this.executeArchive((e) => e.close_document_session());
302
302
  } finally {
303
- this.host = null, this.identity = null, this.coordinator = new o();
303
+ this.host = null, this.identity = null, this.coordinator = new a();
304
304
  }
305
305
  }
306
306
  requireArchive() {
@@ -568,14 +568,14 @@ async function rt(e) {
568
568
  }
569
569
  //#endregion
570
570
  //#region packages/docx/src/internal/node-acquisition.ts
571
- var it, L;
572
- function at(e) {
573
- if (!L) it = e, L = new xe(We, e);
571
+ var it, at;
572
+ function ot(e) {
573
+ if (!at) it = e, at = new Se(We, e);
574
574
  else if (it !== e) throw Error("DOCX runtime was already initialized with another WebAssembly.Module");
575
- return L;
575
+ return at;
576
576
  }
577
- async function ot(e, t, r, i) {
578
- let o = n(r), s = new u({
577
+ async function st(e, t, r, a) {
578
+ let o = n(r), s = new c({
579
579
  enabled: o.debug || o.onResourceMetrics !== void 0,
580
580
  format: "docx",
581
581
  mode: "node",
@@ -585,80 +585,80 @@ async function ot(e, t, r, i) {
585
585
  emitToConsole: o.debug
586
586
  });
587
587
  s.setSourceBytes(e.byteLength);
588
- let c, l, d;
588
+ let l, u, d;
589
589
  try {
590
- ct(r.signal);
591
- let [n, u, f] = a(o.policy), p = S;
592
- c = await at(t).open(() => new p(e, n, u, f), {
590
+ lt(r.signal);
591
+ let [n, c, f] = i(o.policy), p = S;
592
+ l = await ot(t).open(() => new p(e, n, c, f), {
593
593
  signal: r.signal,
594
- abortError: lt,
594
+ abortError: ut,
595
595
  disposeOnAbort: (e) => e.free()
596
- }), ct(r.signal);
597
- let m = c.proxy;
598
- s.checkpoint("container ready"), l = new Ue(() => m);
596
+ }), lt(r.signal);
597
+ let m = l.proxy;
598
+ s.checkpoint("container ready"), u = new Ue(() => m);
599
599
  let h = {
600
600
  sessionId: 1,
601
601
  operationId: 1,
602
602
  generation: 1
603
603
  };
604
- l.open(h), d = new b((e, t) => l?.dispatch(e, t), () => void 0);
605
- let g, _ = await i(d, h, {
604
+ u.open(h), d = new y((e, t) => u?.dispatch(e, t), () => void 0);
605
+ let g, _ = await a(d, h, {
606
606
  signal: r.signal,
607
607
  onUsage: (e) => {
608
608
  g = e, s.observeUsage(e);
609
609
  }
610
610
  });
611
- return g ??= st(m.document_cursor_resource_usage()), s.observeUsage(g), s.checkpoint("model streamed"), await l.reset(), d.terminate(), {
611
+ return g ??= ct(m.document_cursor_resource_usage()), s.observeUsage(g), s.checkpoint("model streamed"), await u.reset(), d.terminate(), {
612
612
  archive: m,
613
613
  result: _,
614
614
  usage: g,
615
615
  metrics: s,
616
- closeArchive: () => c?.close((e) => e.free())
616
+ closeArchive: () => l?.close((e) => e.free())
617
617
  };
618
618
  } catch (e) {
619
- await l?.reset().catch(() => void 0), d?.terminate();
619
+ await u?.reset().catch(() => void 0), d?.terminate();
620
620
  try {
621
- c?.close((e) => e.free());
621
+ l?.close((e) => e.free());
622
622
  } catch {}
623
- let t = p(e) ?? e;
623
+ let t = f(e) ?? e;
624
624
  throw s.fail(t), t;
625
625
  }
626
626
  }
627
- function st(e) {
627
+ function ct(e) {
628
628
  try {
629
629
  return _(e);
630
630
  } catch {
631
631
  return;
632
632
  }
633
633
  }
634
- function ct(e) {
635
- if (e?.aborted) throw lt();
634
+ function lt(e) {
635
+ if (e?.aborted) throw ut();
636
636
  }
637
- function lt() {
637
+ function ut() {
638
638
  let e = /* @__PURE__ */ Error("DOCX document session was aborted");
639
639
  return e.name = "AbortError", e;
640
640
  }
641
641
  //#endregion
642
642
  //#region packages/node/src/docx.ts
643
- var ut = Pe(() => Fe(import.meta.url, "docx_parser_bg.wasm", "@silurus/ooxml-docx/wasm-binary"));
644
- async function dt(e, t) {
643
+ var dt = b(() => Fe(import.meta.url, "docx_parser_bg.wasm", "@silurus/ooxml-docx/wasm-binary"));
644
+ async function ft(e, t) {
645
645
  if (!t?.factory) throw TypeError("openDocxDocument requires a canvas factory");
646
- let n = await ot(ht(e), ut(), t, (e, t, n) => oe(e, t, n));
646
+ let n = await st(gt(e), dt(), t, (e, t, n) => se(e, t, n));
647
647
  try {
648
- R(t.signal);
649
- let e = t.factory.createCanvas(1, 1), r = ae(n.result, { measureContext: e.getContext("2d") }), i = mt(t.currentDate), a = ne(n.result, r, i).layoutVariants.defaultLayout, o = new pt(n.closeArchive, n.archive, n.result, r, a, t.factory, i, n.usage, n.metrics, t.signal);
648
+ L(t.signal);
649
+ let e = t.factory.createCanvas(1, 1), r = oe(n.result, { measureContext: e.getContext("2d") }), i = ht(t.currentDate), a = re(n.result, r, i).layoutVariants.defaultLayout, o = new mt(n.closeArchive, n.archive, n.result, r, a, t.factory, i, n.usage, n.metrics, t.signal);
650
650
  return n.metrics.observeUsage(o.resourceUsage), n.metrics.checkpoint("pagination ready"), o;
651
651
  } catch (e) {
652
652
  try {
653
653
  n.closeArchive();
654
654
  } catch {}
655
- let t = p(e) ?? e;
655
+ let t = f(e) ?? e;
656
656
  throw n.metrics.fail(t), t;
657
657
  }
658
658
  }
659
- async function ft(e, t = {}) {
660
- return y(async () => {
661
- let n = await ot(ht(e), ut(), t, (e, t, n) => ie(e, t, n)), r = !1;
659
+ async function pt(e, t = {}) {
660
+ return v(async () => {
661
+ let n = await st(gt(e), dt(), t, (e, t, n) => ae(e, t, n)), r = !1;
662
662
  return {
663
663
  acquired: n,
664
664
  markSucceeded: () => {
@@ -674,14 +674,14 @@ async function ft(e, t = {}) {
674
674
  };
675
675
  }, async ({ acquired: e, markSucceeded: t }) => {
676
676
  try {
677
- let n = se(e.result);
677
+ let n = ce(e.result);
678
678
  return e.metrics.checkpoint("document materialized", e.usage), t(), n;
679
679
  } catch (t) {
680
680
  throw e.metrics.fail(t), t;
681
681
  }
682
682
  });
683
683
  }
684
- var pt = class {
684
+ var mt = class {
685
685
  pageCount;
686
686
  sizes;
687
687
  lastResourceUsage;
@@ -723,18 +723,18 @@ var pt = class {
723
723
  }
724
724
  renderPage(e, t = {}) {
725
725
  return this.closed ? Promise.reject(/* @__PURE__ */ Error("DOCX document session is closed")) : this.resourceFailure ? Promise.reject(this.resourceFailure) : (this.pageSize(e), this.enqueueRender(async () => {
726
- R(this.signal);
726
+ L(this.signal);
727
727
  let n = this.requireState(), r = this.factory.createCanvas(1, 1);
728
- return await Se(this.factory, () => re(n.source, r, e, {
728
+ return await Ce(this.factory, () => ie(n.source, r, e, {
729
729
  ...t,
730
730
  currentDate: this.defaultCurrentDateMs,
731
731
  defaultCurrentDateMs: this.defaultCurrentDateMs,
732
732
  layoutServices: n.services,
733
733
  fetchImage: this.fetchImage
734
- })), R(this.signal), r;
734
+ })), L(this.signal), r;
735
735
  }).catch((e) => {
736
- let t = p(e) ?? e;
737
- throw t instanceof v && (this.resourceFailure ??= t), this.metrics.fail(t), t;
736
+ let t = f(e) ?? e;
737
+ throw t instanceof m && (this.resourceFailure ??= t), this.metrics.fail(t), t;
738
738
  }));
739
739
  }
740
740
  async *pages(e = {}) {
@@ -752,7 +752,7 @@ var pt = class {
752
752
  };
753
753
  }
754
754
  } catch (e) {
755
- throw t = p(e) ?? e, t;
755
+ throw t = f(e) ?? e, t;
756
756
  } finally {
757
757
  try {
758
758
  await this.close();
@@ -769,11 +769,11 @@ var pt = class {
769
769
  return this.renderTail = t.then(() => void 0, () => void 0), t;
770
770
  }
771
771
  async release() {
772
- await this.renderTail, m(this.fetchImage), r(this.fetchImage), this.state = null;
772
+ await this.renderTail, p(this.fetchImage), o(this.fetchImage), this.state = null;
773
773
  try {
774
774
  this.closeArchive();
775
775
  } catch (e) {
776
- let t = p(e) ?? e;
776
+ let t = f(e) ?? e;
777
777
  throw this.metrics.fail(t), t;
778
778
  }
779
779
  this.metrics.checkpoint("document session closed", this.lastResourceUsage), this.metrics.succeed({ pages: this.pageCount });
@@ -783,33 +783,33 @@ var pt = class {
783
783
  return this.state;
784
784
  }
785
785
  };
786
- function mt(e) {
786
+ function ht(e) {
787
787
  let t = e instanceof Date ? e.getTime() : e ?? Date.now();
788
788
  if (!Number.isFinite(t)) throw RangeError("currentDate must resolve to finite epoch milliseconds");
789
789
  return t;
790
790
  }
791
- function ht(e) {
791
+ function gt(e) {
792
792
  return e instanceof Uint8Array ? e : new Uint8Array(e);
793
793
  }
794
- function R(e) {
794
+ function L(e) {
795
795
  if (!e?.aborted) return;
796
796
  let t = /* @__PURE__ */ Error("DOCX document session was aborted");
797
797
  throw t.name = "AbortError", t;
798
798
  }
799
799
  //#endregion
800
800
  //#region packages/xlsx/src/wasm/xlsx_parser.js
801
- var gt = /* @__PURE__ */ e({
802
- XlsxArchive: () => z,
801
+ var _t = /* @__PURE__ */ e({
802
+ XlsxArchive: () => R,
803
803
  default: () => kt,
804
- extract_image: () => _t,
804
+ extract_image: () => vt,
805
805
  initSync: () => Ot,
806
- parse_xlsx: () => vt,
806
+ parse_xlsx: () => yt,
807
807
  reinit: () => At,
808
- xlsx_to_markdown: () => yt
809
- }), z = class {
808
+ xlsx_to_markdown: () => bt
809
+ }), R = class {
810
810
  __destroy_into_raw() {
811
811
  let e = this.__wbg_ptr;
812
- return this.__wbg_ptr = 0, xt.unregister(this), e;
812
+ return this.__wbg_ptr = 0, St.unregister(this), e;
813
813
  }
814
814
  free() {
815
815
  let e = this.__destroy_into_raw();
@@ -817,11 +817,11 @@ var gt = /* @__PURE__ */ e({
817
817
  }
818
818
  acknowledge_sheet_cursor_terminal() {
819
819
  let e = Q.xlsxarchive_acknowledge_sheet_cursor_terminal(this.__wbg_ptr);
820
- if (e[1]) throw J(e[0]);
820
+ if (e[1]) throw q(e[0]);
821
821
  }
822
822
  assert_healthy() {
823
823
  let e = Q.xlsxarchive_assert_healthy(this.__wbg_ptr);
824
- if (e[1]) throw J(e[0]);
824
+ if (e[1]) throw q(e[0]);
825
825
  }
826
826
  cancel_sheet_cursor() {
827
827
  Q.xlsxarchive_cancel_sheet_cursor(this.__wbg_ptr);
@@ -830,36 +830,36 @@ var gt = /* @__PURE__ */ e({
830
830
  Q.xlsxarchive_close_sheet_cursor(this.__wbg_ptr);
831
831
  }
832
832
  extract_image(e) {
833
- let t = q(e, Q.__wbindgen_malloc, Q.__wbindgen_realloc), n = Z, r = Q.xlsxarchive_extract_image(this.__wbg_ptr, t, n);
834
- if (r[3]) throw J(r[2]);
835
- var i = B(r[0], r[1]).slice();
833
+ let t = K(e, Q.__wbindgen_malloc, Q.__wbindgen_realloc), n = Z, r = Q.xlsxarchive_extract_image(this.__wbg_ptr, t, n);
834
+ if (r[3]) throw q(r[2]);
835
+ var i = z(r[0], r[1]).slice();
836
836
  return Q.__wbindgen_free(r[0], r[1] * 1, 1), i;
837
837
  }
838
838
  constructor(e, t, n, r) {
839
- let i = K(e, Q.__wbindgen_malloc), a = Z, o = Q.xlsxarchive_new(i, a, !G(t), G(t) ? BigInt(0) : t, !G(n), G(n) ? BigInt(0) : n, !G(r), G(r) ? BigInt(0) : r);
840
- if (o[2]) throw J(o[1]);
841
- return this.__wbg_ptr = o[0] >>> 0, xt.register(this, this.__wbg_ptr, this), this;
839
+ let i = G(e, Q.__wbindgen_malloc), a = Z, o = Q.xlsxarchive_new(i, a, !W(t), W(t) ? BigInt(0) : t, !W(n), W(n) ? BigInt(0) : n, !W(r), W(r) ? BigInt(0) : r);
840
+ if (o[2]) throw q(o[1]);
841
+ return this.__wbg_ptr = o[0] >>> 0, St.register(this, this.__wbg_ptr, this), this;
842
842
  }
843
843
  open_sheet_cursor(e, t) {
844
- let n = q(t, Q.__wbindgen_malloc, Q.__wbindgen_realloc), r = Z, i = Q.xlsxarchive_open_sheet_cursor(this.__wbg_ptr, e, n, r);
845
- if (i[1]) throw J(i[0]);
844
+ let n = K(t, Q.__wbindgen_malloc, Q.__wbindgen_realloc), r = Z, i = Q.xlsxarchive_open_sheet_cursor(this.__wbg_ptr, e, n, r);
845
+ if (i[1]) throw q(i[0]);
846
846
  }
847
847
  parse() {
848
848
  let e = Q.xlsxarchive_parse(this.__wbg_ptr);
849
- if (e[3]) throw J(e[2]);
850
- var t = B(e[0], e[1]).slice();
849
+ if (e[3]) throw q(e[2]);
850
+ var t = z(e[0], e[1]).slice();
851
851
  return Q.__wbindgen_free(e[0], e[1] * 1, 1), t;
852
852
  }
853
853
  pull_sheet_cursor(e) {
854
854
  let t = Q.xlsxarchive_pull_sheet_cursor(this.__wbg_ptr, e);
855
- if (t[3]) throw J(t[2]);
856
- var n = B(t[0], t[1]).slice();
855
+ if (t[3]) throw q(t[2]);
856
+ var n = z(t[0], t[1]).slice();
857
857
  return Q.__wbindgen_free(t[0], t[1] * 1, 1), n;
858
858
  }
859
859
  resource_usage() {
860
860
  let e = Q.xlsxarchive_resource_usage(this.__wbg_ptr);
861
- if (e[3]) throw J(e[2]);
862
- var t = B(e[0], e[1]).slice();
861
+ if (e[3]) throw q(e[2]);
862
+ var t = z(e[0], e[1]).slice();
863
863
  return Q.__wbindgen_free(e[0], e[1] * 1, 1), t;
864
864
  }
865
865
  sheet_cursor_pull_finished() {
@@ -867,8 +867,8 @@ var gt = /* @__PURE__ */ e({
867
867
  }
868
868
  sheet_cursor_resource_usage() {
869
869
  let e = Q.xlsxarchive_sheet_cursor_resource_usage(this.__wbg_ptr);
870
- if (e[3]) throw J(e[2]);
871
- var t = B(e[0], e[1]).slice();
870
+ if (e[3]) throw q(e[2]);
871
+ var t = z(e[0], e[1]).slice();
872
872
  return Q.__wbindgen_free(e[0], e[1] * 1, 1), t;
873
873
  }
874
874
  to_markdown() {
@@ -876,49 +876,49 @@ var gt = /* @__PURE__ */ e({
876
876
  try {
877
877
  let i = Q.xlsxarchive_to_markdown(this.__wbg_ptr);
878
878
  var n = i[0], r = i[1];
879
- if (i[3]) throw n = 0, r = 0, J(i[2]);
880
- return e = n, t = r, H(n, r);
879
+ if (i[3]) throw n = 0, r = 0, q(i[2]);
880
+ return e = n, t = r, V(n, r);
881
881
  } finally {
882
882
  Q.__wbindgen_free(e, t, 1);
883
883
  }
884
884
  }
885
885
  };
886
- Symbol.dispose && (z.prototype[Symbol.dispose] = z.prototype.free);
887
- function _t(e, t, n, r) {
888
- let i = K(e, Q.__wbindgen_malloc), a = Z, o = q(t, Q.__wbindgen_malloc, Q.__wbindgen_realloc), s = Z, c = Q.extract_image(i, a, o, s, !G(n), G(n) ? BigInt(0) : n, !G(r), G(r) ? BigInt(0) : r);
889
- if (c[3]) throw J(c[2]);
890
- var l = B(c[0], c[1]).slice();
886
+ Symbol.dispose && (R.prototype[Symbol.dispose] = R.prototype.free);
887
+ function vt(e, t, n, r) {
888
+ let i = G(e, Q.__wbindgen_malloc), a = Z, o = K(t, Q.__wbindgen_malloc, Q.__wbindgen_realloc), s = Z, c = Q.extract_image(i, a, o, s, !W(n), W(n) ? BigInt(0) : n, !W(r), W(r) ? BigInt(0) : r);
889
+ if (c[3]) throw q(c[2]);
890
+ var l = z(c[0], c[1]).slice();
891
891
  return Q.__wbindgen_free(c[0], c[1] * 1, 1), l;
892
892
  }
893
- function vt(e, t, n) {
894
- let r = K(e, Q.__wbindgen_malloc), i = Z, a = Q.parse_xlsx(r, i, !G(t), G(t) ? BigInt(0) : t, !G(n), G(n) ? BigInt(0) : n);
895
- if (a[3]) throw J(a[2]);
896
- var o = B(a[0], a[1]).slice();
893
+ function yt(e, t, n) {
894
+ let r = G(e, Q.__wbindgen_malloc), i = Z, a = Q.parse_xlsx(r, i, !W(t), W(t) ? BigInt(0) : t, !W(n), W(n) ? BigInt(0) : n);
895
+ if (a[3]) throw q(a[2]);
896
+ var o = z(a[0], a[1]).slice();
897
897
  return Q.__wbindgen_free(a[0], a[1] * 1, 1), o;
898
898
  }
899
- function yt(e, t, n) {
899
+ function bt(e, t, n) {
900
900
  let r, i;
901
901
  try {
902
- let s = K(e, Q.__wbindgen_malloc), c = Z, l = Q.xlsx_to_markdown(s, c, !G(t), G(t) ? BigInt(0) : t, !G(n), G(n) ? BigInt(0) : n);
902
+ let s = G(e, Q.__wbindgen_malloc), c = Z, l = Q.xlsx_to_markdown(s, c, !W(t), W(t) ? BigInt(0) : t, !W(n), W(n) ? BigInt(0) : n);
903
903
  var a = l[0], o = l[1];
904
- if (l[3]) throw a = 0, o = 0, J(l[2]);
905
- return r = a, i = o, H(a, o);
904
+ if (l[3]) throw a = 0, o = 0, q(l[2]);
905
+ return r = a, i = o, V(a, o);
906
906
  } finally {
907
907
  Q.__wbindgen_free(r, i, 1);
908
908
  }
909
909
  }
910
- function bt() {
910
+ function xt() {
911
911
  return {
912
912
  __proto__: null,
913
913
  "./xlsx_parser_bg.js": {
914
914
  __proto__: null,
915
915
  __wbg___wbindgen_throw_6b64449b9b9ed33c: function(e, t) {
916
- throw Error(H(e, t));
916
+ throw Error(V(e, t));
917
917
  },
918
918
  __wbg_error_a6fa202b58aa1cd3: function(e, t) {
919
919
  let n, r;
920
920
  try {
921
- n = e, r = t, console.error(H(e, t));
921
+ n = e, r = t, console.error(V(e, t));
922
922
  } finally {
923
923
  Q.__wbindgen_free(n, r, 1);
924
924
  }
@@ -927,11 +927,11 @@ function bt() {
927
927
  return /* @__PURE__ */ Error();
928
928
  },
929
929
  __wbg_stack_3b0d974bbf31e44f: function(e, t) {
930
- let n = t.stack, r = q(n, Q.__wbindgen_malloc, Q.__wbindgen_realloc), i = Z;
931
- St().setInt32(e + 4, i, !0), St().setInt32(e + 0, r, !0);
930
+ let n = t.stack, r = K(n, Q.__wbindgen_malloc, Q.__wbindgen_realloc), i = Z;
931
+ Ct().setInt32(e + 4, i, !0), Ct().setInt32(e + 0, r, !0);
932
932
  },
933
933
  __wbindgen_cast_0000000000000001: function(e, t) {
934
- return H(e, t);
934
+ return V(e, t);
935
935
  },
936
936
  __wbindgen_init_externref_table: function() {
937
937
  let e = Q.__wbindgen_externrefs, t = e.grow(4);
@@ -940,37 +940,37 @@ function bt() {
940
940
  }
941
941
  };
942
942
  }
943
- var xt = typeof FinalizationRegistry > "u" ? {
943
+ var St = typeof FinalizationRegistry > "u" ? {
944
944
  register: () => {},
945
945
  unregister: () => {}
946
946
  } : new FinalizationRegistry((e) => Q.__wbg_xlsxarchive_free(e >>> 0, 1));
947
- function B(e, t) {
948
- return e >>>= 0, W().subarray(e / 1, e / 1 + t);
947
+ function z(e, t) {
948
+ return e >>>= 0, U().subarray(e / 1, e / 1 + t);
949
949
  }
950
- var V = null;
951
- function St() {
952
- return (V === null || V.buffer.detached === !0 || V.buffer.detached === void 0 && V.buffer !== Q.memory.buffer) && (V = new DataView(Q.memory.buffer)), V;
950
+ var B = null;
951
+ function Ct() {
952
+ return (B === null || B.buffer.detached === !0 || B.buffer.detached === void 0 && B.buffer !== Q.memory.buffer) && (B = new DataView(Q.memory.buffer)), B;
953
953
  }
954
- function H(e, t) {
954
+ function V(e, t) {
955
955
  return e >>>= 0, Tt(e, t);
956
956
  }
957
- var U = null;
958
- function W() {
959
- return (U === null || U.byteLength === 0) && (U = new Uint8Array(Q.memory.buffer)), U;
957
+ var H = null;
958
+ function U() {
959
+ return (H === null || H.byteLength === 0) && (H = new Uint8Array(Q.memory.buffer)), H;
960
960
  }
961
- function G(e) {
961
+ function W(e) {
962
962
  return e == null;
963
963
  }
964
- function K(e, t) {
964
+ function G(e, t) {
965
965
  let n = t(e.length * 1, 1) >>> 0;
966
- return W().set(e, n / 1), Z = e.length, n;
966
+ return U().set(e, n / 1), Z = e.length, n;
967
967
  }
968
- function q(e, t, n) {
968
+ function K(e, t, n) {
969
969
  if (n === void 0) {
970
970
  let n = X.encode(e), r = t(n.length, 1) >>> 0;
971
- return W().subarray(r, r + n.length).set(n), Z = n.length, r;
971
+ return U().subarray(r, r + n.length).set(n), Z = n.length, r;
972
972
  }
973
- let r = e.length, i = t(r, 1) >>> 0, a = W(), o = 0;
973
+ let r = e.length, i = t(r, 1) >>> 0, a = U(), o = 0;
974
974
  for (; o < r; o++) {
975
975
  let t = e.charCodeAt(o);
976
976
  if (t > 127) break;
@@ -978,26 +978,26 @@ function q(e, t, n) {
978
978
  }
979
979
  if (o !== r) {
980
980
  o !== 0 && (e = e.slice(o)), i = n(i, r, r = o + e.length * 3, 1) >>> 0;
981
- let t = W().subarray(i + o, i + r), a = X.encodeInto(e, t);
981
+ let t = U().subarray(i + o, i + r), a = X.encodeInto(e, t);
982
982
  o += a.written, i = n(i, r, o, 1) >>> 0;
983
983
  }
984
984
  return Z = o, i;
985
985
  }
986
- function J(e) {
986
+ function q(e) {
987
987
  let t = Q.__wbindgen_externrefs.get(e);
988
988
  return Q.__externref_table_dealloc(e), t;
989
989
  }
990
- var Y = new TextDecoder("utf-8", {
990
+ var J = new TextDecoder("utf-8", {
991
991
  ignoreBOM: !0,
992
992
  fatal: !0
993
993
  });
994
- Y.decode();
995
- var Ct = 2146435072, wt = 0;
994
+ J.decode();
995
+ var wt = 2146435072, Y = 0;
996
996
  function Tt(e, t) {
997
- return wt += t, wt >= Ct && (Y = new TextDecoder("utf-8", {
997
+ return Y += t, Y >= wt && (J = new TextDecoder("utf-8", {
998
998
  ignoreBOM: !0,
999
999
  fatal: !0
1000
- }), Y.decode(), wt = t), Y.decode(W().subarray(e, e + t));
1000
+ }), J.decode(), Y = t), J.decode(U().subarray(e, e + t));
1001
1001
  }
1002
1002
  var X = new TextEncoder();
1003
1003
  "encodeInto" in X || (X.encodeInto = function(e, t) {
@@ -1009,7 +1009,7 @@ var X = new TextEncoder();
1009
1009
  });
1010
1010
  var Z = 0, Q;
1011
1011
  function Et(e, t) {
1012
- return Q = e.exports, V = null, U = null, Q.__wbindgen_start(), Q;
1012
+ return Q = e.exports, B = null, H = null, Q.__wbindgen_start(), Q;
1013
1013
  }
1014
1014
  async function Dt(e, t) {
1015
1015
  if (typeof Response == "function" && e instanceof Response) {
@@ -1040,43 +1040,43 @@ async function Dt(e, t) {
1040
1040
  function Ot(e) {
1041
1041
  if (Q !== void 0) return Q;
1042
1042
  e !== void 0 && (Object.getPrototypeOf(e) === Object.prototype ? {module: e} = e : console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));
1043
- let t = bt();
1043
+ let t = xt();
1044
1044
  return e instanceof WebAssembly.Module || (e = new WebAssembly.Module(e)), Et(new WebAssembly.Instance(e, t), e);
1045
1045
  }
1046
1046
  async function kt(e) {
1047
1047
  if (Q !== void 0) return Q;
1048
1048
  e !== void 0 && (Object.getPrototypeOf(e) === Object.prototype ? {module_or_path: e} = e : console.warn("using deprecated parameters for the initialization function; pass a single object instead"));
1049
- let t = bt();
1049
+ let t = xt();
1050
1050
  (typeof e == "string" || typeof Request == "function" && e instanceof Request || typeof URL == "function" && e instanceof URL) && (e = fetch(e));
1051
1051
  let { instance: n, module: r } = await Dt(await e, t);
1052
1052
  return Et(n, r);
1053
1053
  }
1054
1054
  async function At(e) {
1055
- return Q = void 0, V = null, U = null, kt(e);
1055
+ return Q = void 0, B = null, H = null, kt(e);
1056
1056
  }
1057
1057
  //#endregion
1058
1058
  //#region packages/xlsx/src/internal/node-acquisition.ts
1059
1059
  var jt, Mt;
1060
1060
  function Nt(e) {
1061
- if (!Mt) jt = e, Mt = new xe(gt, e);
1061
+ if (!Mt) jt = e, Mt = new Se(_t, e);
1062
1062
  else if (jt !== e) throw Error("XLSX runtime was already initialized with another WebAssembly.Module");
1063
1063
  return Mt;
1064
1064
  }
1065
1065
  async function Pt(e, t, r = {}) {
1066
- let i = n(r), o = new u({
1067
- enabled: i.debug || i.onResourceMetrics !== void 0,
1066
+ let a = n(r), o = new c({
1067
+ enabled: a.debug || a.onResourceMetrics !== void 0,
1068
1068
  format: "xlsx",
1069
1069
  mode: "node",
1070
1070
  scope: "session",
1071
- policy: i.policy,
1072
- onMetrics: i.onResourceMetrics,
1073
- emitToConsole: i.debug
1071
+ policy: a.policy,
1072
+ onMetrics: a.onResourceMetrics,
1073
+ emitToConsole: a.debug
1074
1074
  });
1075
1075
  o.setSourceBytes(e.byteLength);
1076
1076
  let s;
1077
1077
  try {
1078
1078
  It(r.signal);
1079
- let [n, c, l] = a(i.policy), u = z;
1079
+ let [n, c, l] = i(a.policy), u = R;
1080
1080
  s = await Nt(t).open(() => new u(e, n, c, l), {
1081
1081
  signal: r.signal,
1082
1082
  abortError: Lt,
@@ -1094,7 +1094,7 @@ async function Pt(e, t, r = {}) {
1094
1094
  try {
1095
1095
  s?.close((e) => e.free());
1096
1096
  } catch {}
1097
- let t = p(e) ?? e;
1097
+ let t = f(e) ?? e;
1098
1098
  throw o.fail(t), t;
1099
1099
  }
1100
1100
  }
@@ -1115,7 +1115,7 @@ function Lt() {
1115
1115
  }
1116
1116
  //#endregion
1117
1117
  //#region packages/node/src/xlsx.ts
1118
- var Rt = Pe(() => Fe(import.meta.url, "xlsx_parser_bg.wasm", "@silurus/ooxml-xlsx/wasm-binary"));
1118
+ var Rt = b(() => Fe(import.meta.url, "xlsx_parser_bg.wasm", "@silurus/ooxml-xlsx/wasm-binary"));
1119
1119
  async function $(e, t = {}) {
1120
1120
  let n = await Pt(Kt(e), Rt(), t);
1121
1121
  return new zt(n.closeArchive, n.archive, n.workbookIndex, n.metrics, n.usage, t.signal);
@@ -1135,7 +1135,7 @@ var zt = class {
1135
1135
  rowBatches = 0;
1136
1136
  emittedRows = 0;
1137
1137
  constructor(e, t, n, r, i, a) {
1138
- this.closeArchive = e, this.archive = t, this.metrics = r, this.signal = a, this.workbookIndex = Wt(n), this.sheetNames = Object.freeze(this.workbookIndex.workbook.sheets.map((e) => e.name)), this.sheetCount = this.sheetNames.length, this.lastUsage = i, this.pull = new me(() => this.archive), this.transport = new b((e, t) => this.pull.dispatchSafely(e, t), () => void 0), this.worksheetPullClient = new ge({
1138
+ this.closeArchive = e, this.archive = t, this.metrics = r, this.signal = a, this.workbookIndex = Wt(n), this.sheetNames = Object.freeze(this.workbookIndex.workbook.sheets.map((e) => e.name)), this.sheetCount = this.sheetNames.length, this.lastUsage = i, this.pull = new he(() => this.archive), this.transport = new y((e, t) => this.pull.dispatchSafely(e, t), () => void 0), this.worksheetPullClient = new _e({
1139
1139
  transport: this.transport,
1140
1140
  sharedStrings: n.sharedStrings,
1141
1141
  open: async (e, t, n) => {
@@ -1183,13 +1183,13 @@ var zt = class {
1183
1183
  }
1184
1184
  this.completedWorksheets += 1, this.metrics.checkpoint("worksheet stream complete", this.lastUsage);
1185
1185
  } catch (e) {
1186
- throw r = p(e) ?? e, this.metrics.fail(r), await this.close().catch(() => void 0), r;
1186
+ throw r = f(e) ?? e, this.metrics.fail(r), await this.close().catch(() => void 0), r;
1187
1187
  } finally {
1188
1188
  try {
1189
1189
  await this.cleanupOperation(n, r === void 0 ? "closed" : "request-error");
1190
1190
  } catch (e) {
1191
1191
  if (r === void 0) {
1192
- let t = p(e) ?? e;
1192
+ let t = f(e) ?? e;
1193
1193
  throw this.metrics.fail(t), await this.close().catch(() => void 0), t;
1194
1194
  }
1195
1195
  }
@@ -1204,12 +1204,12 @@ var zt = class {
1204
1204
  try {
1205
1205
  await this.worksheetPullClient.cancelAll(t);
1206
1206
  } catch (e) {
1207
- n = p(e) ?? e;
1207
+ n = f(e) ?? e;
1208
1208
  }
1209
1209
  try {
1210
1210
  await this.pull.reset();
1211
1211
  } catch (e) {
1212
- n ??= p(e) ?? e;
1212
+ n ??= f(e) ?? e;
1213
1213
  }
1214
1214
  if (this.active === e && (this.active = void 0), n !== void 0) throw n;
1215
1215
  })(), e.cleanupPromise;
@@ -1219,13 +1219,13 @@ var zt = class {
1219
1219
  if (this.active) try {
1220
1220
  await this.cleanupOperation(this.active, "closed");
1221
1221
  } catch (t) {
1222
- e = p(t) ?? t;
1222
+ e = f(t) ?? t;
1223
1223
  }
1224
1224
  this.transport.terminate();
1225
1225
  try {
1226
1226
  this.closeArchive();
1227
1227
  } catch (t) {
1228
- e ??= p(t) ?? t;
1228
+ e ??= f(t) ?? t;
1229
1229
  }
1230
1230
  if (e !== void 0) throw this.metrics.fail(e), e;
1231
1231
  this.metrics.checkpoint("workbook session closed", this.lastUsage), this.metrics.succeed({
@@ -1241,13 +1241,13 @@ var zt = class {
1241
1241
  }
1242
1242
  };
1243
1243
  async function Bt(e, t = {}) {
1244
- return y(() => $(e, t), async (e) => structuredClone(e.workbookIndex));
1244
+ return v(() => $(e, t), async (e) => structuredClone(e.workbookIndex));
1245
1245
  }
1246
1246
  async function Vt(e, t, n = {}) {
1247
- return y(() => $(e, n), async (e) => (await Ut(e, t)).worksheet);
1247
+ return v(() => $(e, n), async (e) => (await Ut(e, t)).worksheet);
1248
1248
  }
1249
1249
  async function Ht(e, t = {}) {
1250
- return y(() => $(e, t), async (e) => {
1250
+ return v(() => $(e, t), async (e) => {
1251
1251
  let t = [], n = {
1252
1252
  rows: 0,
1253
1253
  cells: 0,
@@ -1255,8 +1255,8 @@ async function Ht(e, t = {}) {
1255
1255
  jsonBytes: 0
1256
1256
  };
1257
1257
  for (let r = 0; r < e.sheetCount; r += 1) {
1258
- let i = await Ut(e, r), a = le(n, i.usage);
1259
- he(a, "materialize-workbook", void 0, i.resourceUsage), n = a, t.push(i.worksheet);
1258
+ let i = await Ut(e, r), a = ue(n, i.usage);
1259
+ ge(a, "materialize-workbook", void 0, i.resourceUsage), n = a, t.push(i.worksheet);
1260
1260
  }
1261
1261
  return {
1262
1262
  workbookIndex: structuredClone(e.workbookIndex),
@@ -1271,16 +1271,16 @@ async function Ut(e, t) {
1271
1271
  ownedUtf8Bytes: 0
1272
1272
  }, i, a, o;
1273
1273
  for await (let s of e.worksheetRows(t)) if (o = s.usage ?? o, s.kind === "rows") {
1274
- let e = pe(r, de(s.rows));
1275
- fe(e, "materialize-worksheet", void 0, o), n.push(...s.rows), r = e;
1274
+ let e = me(r, fe(s.rows));
1275
+ pe(e, "materialize-worksheet", void 0, o), n.push(...s.rows), r = e;
1276
1276
  } else {
1277
1277
  a = s.worksheet, a.rows = a.parseError ? [] : n;
1278
- let e = _e(a, a.parseError ? {
1278
+ let e = ve(a, a.parseError ? {
1279
1279
  rows: 0,
1280
1280
  cells: 0,
1281
1281
  ownedUtf8Bytes: 0
1282
1282
  } : r);
1283
- fe(e, "materialize-worksheet", void 0, o), ue(e.jsonBytes, "materialize-worksheet", void 0, o), r = e, i = e;
1283
+ pe(e, "materialize-worksheet", void 0, o), de(e.jsonBytes, "materialize-worksheet", void 0, o), r = e, i = e;
1284
1284
  }
1285
1285
  if (!a || !i) throw Error(`XLSX worksheet ${t} did not produce a terminal model`);
1286
1286
  return {
@@ -1309,4 +1309,4 @@ function Kt(e) {
1309
1309
  return e instanceof Uint8Array ? e : new Uint8Array(e);
1310
1310
  }
1311
1311
  //#endregion
1312
- export { s as OoxmlDecodedImageLimitError, v as OoxmlResourceLimitError, Te as installImageBitmapShim, Ce as installOffscreenCanvasShim, c as isOoxmlDecodedImageLimitError, ft as materializeDocxDocument, Be as materializePptxPresentation, Ht as materializeXlsxWorkbook, Bt as materializeXlsxWorkbookIndex, Vt as materializeXlsxWorksheet, dt as openDocxDocument, Le as openPptxPresentation, $ as openXlsxWorkbook, we as renderSlideNode };
1312
+ export { l as OoxmlDecodedImageLimitError, m as OoxmlResourceLimitError, Ee as installImageBitmapShim, we as installOffscreenCanvasShim, te as isOoxmlDecodedImageLimitError, pt as materializeDocxDocument, Be as materializePptxPresentation, Ht as materializeXlsxWorkbook, Bt as materializeXlsxWorkbookIndex, Vt as materializeXlsxWorksheet, ft as openDocxDocument, Le as openPptxPresentation, $ as openXlsxWorkbook, Te as renderSlideNode };