@silurus/ooxml 0.85.3 → 0.86.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 (56) hide show
  1. package/README.md +39 -7
  2. package/dist/assets/render-worker-BCGnuBLj.js +10 -0
  3. package/dist/assets/render-worker-CB4DxjXg.js +31 -0
  4. package/dist/assets/render-worker-CHW0F0n6.js +11 -0
  5. package/dist/{bounded-raw-part-cache-C6ro6Ezf.js → bounded-raw-part-cache-DVx3Camo.js} +12 -10
  6. package/dist/{canvas-viewer-mechanics-CDNMJ-Yz.js → canvas-viewer-mechanics-B3A7KLLi.js} +1 -1
  7. package/dist/{comment-ui-runtime-DAKBCpsM.js → comment-ui-runtime-DEtgcmj7.js} +5 -5
  8. package/dist/comment-ui-runtime-TLHustXJ.js +2 -0
  9. package/dist/{comment-ui-runtime-CAbpuWi_.js → comment-ui-runtime-ssI6IE39.js} +4 -4
  10. package/dist/{comments-Brfxa3hQ.js → comments-CAn2A_Xh.js} +1 -1
  11. package/dist/delimited-text-worker-host-DcHj_JZt.js +27 -0
  12. package/dist/{document-pull-client-F3ox_VXK.js → document-pull-client-xZrA2IjM.js} +577 -576
  13. package/dist/{docx-BYvm3TWw.js → docx-DzDiGvqe.js} +63 -63
  14. package/dist/docx.mjs +5 -5
  15. package/dist/docx_parser_bg.wasm +0 -0
  16. package/dist/{dom-interaction-boundary-CDGegIB5.js → dom-interaction-boundary-DK1JLkrz.js} +2 -2
  17. package/dist/{line-metrics-BGtFM-ec.js → hyperlink-enyPbflR.js} +847 -877
  18. package/dist/index.mjs +3 -3
  19. package/dist/line-distribute-BFB575d6.js +1023 -0
  20. package/dist/line-metrics-CBbw80Ko.js +60 -0
  21. package/dist/node.mjs +91 -91
  22. package/dist/{pptx-BqpVTP8p.js → pptx-D_U62nl-.js} +71 -71
  23. package/dist/pptx.mjs +5 -5
  24. package/dist/pptx_parser_bg.wasm +0 -0
  25. package/dist/{render-DeZpRCfx.js → render-DSn0d35X.js} +1 -1
  26. package/dist/{render-worker-host-CBcQXsR5.js → render-worker-host-BHz9vjxB.js} +1 -1
  27. package/dist/{render-worker-host-BKtXmlEF.js → render-worker-host-CO0UYoQh.js} +1 -1
  28. package/dist/{render-worker-host-CNKQ76tu.js → render-worker-host-CbYDBg7U.js} +1 -1
  29. package/dist/{resource-measurement-D41R-0Bl.js → resource-measurement-Do07ZRcR.js} +7 -7
  30. package/dist/{session-n2p5_jxV.js → session-C1GYhr6n.js} +77 -77
  31. package/dist/{slide-pull-client-Dwek7xW8.js → slide-pull-client-DuEaUxPw.js} +732 -732
  32. package/dist/types/chart-ex.d.ts +2 -2
  33. package/dist/types/docx.d.ts +10 -10
  34. package/dist/types/index.d.ts +38 -18
  35. package/dist/types/math.d.ts +1 -1
  36. package/dist/types/node.d.ts +6 -5
  37. package/dist/types/pptx.d.ts +10 -10
  38. package/dist/types/region-map.d.ts +2 -2
  39. package/dist/types/three-d.d.ts +2 -2
  40. package/dist/types/tiff.d.ts +1 -1
  41. package/dist/types/xlsx.d.ts +34 -14
  42. package/dist/{worksheet-pull-client-C9sC36Vu.js → worksheet-pull-client-eDiHHEG2.js} +99 -96
  43. package/dist/{xlsx-DSU6pV1O.js → xlsx-CMHmYTHP.js} +1629 -1469
  44. package/dist/xlsx.mjs +5 -5
  45. package/dist/xlsx_parser_bg.wasm +0 -0
  46. package/package.json +1 -1
  47. package/dist/assets/render-worker-D1O73gYW.js +0 -10
  48. package/dist/assets/render-worker-DHP0rgcW.js +0 -24
  49. package/dist/assets/render-worker-V2wWYA4O.js +0 -11
  50. package/dist/comment-ui-runtime-DTaaZdXC.js +0 -2
  51. package/dist/line-distribute-BsV4MVZ2.js +0 -1023
  52. /package/dist/{comment-occurrence-tj54AXXB.js → comment-occurrence-Dhdplprg.js} +0 -0
  53. /package/dist/{highlight-rect-DBcYVJDv.js → highlight-rect-FuUSmL3a.js} +0 -0
  54. /package/dist/{read-only-comment-decoration-Mv_SAiHy.js → read-only-comment-decoration-BTnWEeo5.js} +0 -0
  55. /package/dist/{read-only-comment-margin-Cqu-Ir0C.js → read-only-comment-margin-plStyGfE.js} +0 -0
  56. /package/dist/{source-key-BkBB3X82.js → source-key-Ktb1GRE5.js} +0 -0
package/dist/pptx.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { u as e } from "./slide-pull-client-Dwek7xW8.js";
2
- import { a as t, cn as n, sn as r } from "./line-metrics-BGtFM-ec.js";
3
- import { T as i } from "./canvas-viewer-mechanics-CDNMJ-Yz.js";
1
+ import { u as e } from "./slide-pull-client-DuEaUxPw.js";
2
+ import { on as t, r as n, sn as r } from "./hyperlink-enyPbflR.js";
3
+ import { T as i } from "./canvas-viewer-mechanics-B3A7KLLi.js";
4
4
  import { l as a, s as o } from "./pixel-budget-Dgjw269h.js";
5
5
  import { i as s, s as c } from "./raster-target-ojDdQizC.js";
6
- import { a as l, i as u, n as d, o as f, r as p, s as m } from "./pptx-BqpVTP8p.js";
7
- export { o as OoxmlDecodedImageLimitError, r as OoxmlError, n as OoxmlResourceLimitError, l as PptxPresentation, d as PptxScrollViewer, p as PptxViewer, s as TiffDecodeError, i as autoResize, f as buildPptxHighlightLayer, m as buildPptxTextLayer, a as isOoxmlDecodedImageLimitError, c as isTiffDecodeError, t as openExternalHyperlink, u as readPptxTextSelectionContext, e as renderSlide };
6
+ import { a as l, i as u, n as d, o as f, r as p, s as m } from "./pptx-D_U62nl-.js";
7
+ export { o as OoxmlDecodedImageLimitError, t as OoxmlError, r as OoxmlResourceLimitError, l as PptxPresentation, d as PptxScrollViewer, p as PptxViewer, s as TiffDecodeError, i as autoResize, f as buildPptxHighlightLayer, m as buildPptxTextLayer, a as isOoxmlDecodedImageLimitError, c as isTiffDecodeError, n as openExternalHyperlink, u as readPptxTextSelectionContext, e as renderSlide };
Binary file
@@ -46,7 +46,7 @@ function a(e, t) {
46
46
  return n = o.then(() => void 0, () => void 0), o;
47
47
  }
48
48
  async function o(e, t, n, r = {}) {
49
- let { renderSlide: i } = await import("./session-n2p5_jxV.js").then((e) => e.t), o = t.slides[n];
49
+ let { renderSlide: i } = await import("./session-C1GYhr6n.js").then((e) => e.t), o = t.slides[n];
50
50
  if (!o) throw Error(`Slide index ${n} out of range`);
51
51
  let s = r.width ?? 960, c = r.dpr ?? 2, l = r.fetchImage ?? (async () => new Blob([])), u = async () => {
52
52
  await i(e, o, t.slideWidth, t.slideHeight, {
@@ -1,5 +1,5 @@
1
1
  //#region packages/docx/src/render-worker.ts?worker&url
2
- var e = "" + new URL("assets/render-worker-D1O73gYW.js", import.meta.url).href;
2
+ var e = "" + new URL("assets/render-worker-BCGnuBLj.js", import.meta.url).href;
3
3
  //#endregion
4
4
  //#region packages/docx/src/render-worker-host.ts
5
5
  function t() {
@@ -1,5 +1,5 @@
1
1
  //#region packages/pptx/src/render-worker.ts?worker&url
2
- var e = "" + new URL("assets/render-worker-V2wWYA4O.js", import.meta.url).href;
2
+ var e = "" + new URL("assets/render-worker-CHW0F0n6.js", import.meta.url).href;
3
3
  //#endregion
4
4
  //#region packages/pptx/src/render-worker-host.ts
5
5
  function t() {
@@ -1,5 +1,5 @@
1
1
  //#region packages/xlsx/src/render-worker.ts?worker&url
2
- var e = "" + new URL("assets/render-worker-DHP0rgcW.js", import.meta.url).href;
2
+ var e = "" + new URL("assets/render-worker-CB4DxjXg.js", import.meta.url).href;
3
3
  //#endregion
4
4
  //#region packages/xlsx/src/render-worker-host.ts
5
5
  function t() {
@@ -1,4 +1,4 @@
1
- import { ft as e, ht as t, mt as n, ot as r, yt as i } from "./line-metrics-BGtFM-ec.js";
1
+ import { _t as e, ft as t, it as n, pt as r, ut as i } from "./hyperlink-enyPbflR.js";
2
2
  import { an as a } from "./plot-area-frame-D5hEOgkJ.js";
3
3
  import { i as o } from "./pixel-budget-Dgjw269h.js";
4
4
  import { r as s } from "./raster-target-ojDdQizC.js";
@@ -15,23 +15,23 @@ async function u(u, d, f, p, m = {}) {
15
15
  ...v,
16
16
  targetWidthPx: void 0,
17
17
  targetHeightPx: void 0
18
- } : v, b = f ? e(p, l) : void 0, x = await n(u, d, p, y);
18
+ } : v, b = f ? i(p, l) : void 0, x = await t(u, d, p, y);
19
19
  if (!f || !x) return x;
20
- let S = await i(u, d, p, y, b, x), C = s(Number(x.width), Number(x.height), _.targetWidthPx, _.targetHeightPx), w = C ? `|resize:${C.resizeWidth}x${C.resizeHeight}` : "";
21
- return t(l, `${c(S, f)}${w}${g ? "|strict" : ""}`, p, async () => {
20
+ let S = await e(u, d, p, y, b, x), C = s(Number(x.width), Number(x.height), _.targetWidthPx, _.targetHeightPx), w = C ? `|resize:${C.resizeWidth}x${C.resizeHeight}` : "";
21
+ return r(l, `${c(S, f)}${w}${g ? "|strict" : ""}`, p, async () => {
22
22
  let { w: e, h: t } = a(x);
23
23
  if (e <= 0 || t <= 0) return {
24
24
  bitmap: g ? null : x,
25
25
  owned: !1
26
26
  };
27
- let n = await r(x, f, {
27
+ let r = await n(x, f, {
28
28
  width: e,
29
29
  height: t,
30
30
  offscreenFactory: h,
31
31
  targetWidthPx: _.targetWidthPx,
32
32
  targetHeightPx: _.targetHeightPx
33
33
  });
34
- if (n === x) {
34
+ if (r === x) {
35
35
  if (g) return {
36
36
  bitmap: null,
37
37
  owned: !1
@@ -47,7 +47,7 @@ async function u(u, d, f, p, m = {}) {
47
47
  owned: e !== x
48
48
  };
49
49
  }
50
- let i = n;
50
+ let i = r;
51
51
  return {
52
52
  bitmap: i,
53
53
  owned: i !== x
@@ -1,22 +1,22 @@
1
1
  import { t as e } from "./chunk-DmhlhrBa.js";
2
- import { a as t, u as n } from "./slide-pull-client-Dwek7xW8.js";
3
- import { B as r, F as i, G as a, H as o, I as s, K as c, P as l, Q as u, R as d, U as f, W as p, X as m, Xt as h, Y as g, Z as _, cn as v, q as y } from "./line-metrics-BGtFM-ec.js";
4
- import { t as b } from "./transfer-mIj7E7NB.js";
2
+ import { a as t, u as n } from "./slide-pull-client-DuEaUxPw.js";
3
+ import { B as r, G as i, H as a, I as o, J as s, M as c, N as l, P as u, R as d, U as f, V as p, W as m, X as ee, Y as te, Yt as h, q as g, sn as _ } from "./hyperlink-enyPbflR.js";
4
+ import { t as v } from "./transfer-mIj7E7NB.js";
5
5
  //#region packages/pptx/src/slide-cursor-operation.ts
6
- function x(e) {
6
+ function y(e) {
7
7
  try {
8
- return f(e((e) => e.slide_cursor_resource_usage()));
8
+ return p(e((e) => e.slide_cursor_resource_usage()));
9
9
  } catch (e) {
10
10
  if (String(e).includes("slide cursor usage is unavailable")) return;
11
11
  throw e;
12
12
  }
13
13
  }
14
- function ee(e, t, n, r, i) {
14
+ function b(e, t, n, r, i) {
15
15
  let a, o;
16
16
  try {
17
17
  if (i) {
18
18
  if (!r) throw Error("slide payload is missing before acknowledgement");
19
- let t = i(n, r, x(e));
19
+ let t = i(n, r, y(e));
20
20
  typeof t == "function" ? a = t : t && ({rollback: a, commit: o} = t);
21
21
  }
22
22
  e((e) => e.acknowledge_slide(t.operationId, t.generation)), o?.();
@@ -29,8 +29,8 @@ function ee(e, t, n, r, i) {
29
29
  }
30
30
  //#endregion
31
31
  //#region packages/pptx/src/slide-pull-worker.ts
32
- var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
33
- coordinatorGeneration = new s();
32
+ var ne = "ooxml-pull-resetting", re = "ooxml-pull-reset-failed", ie = class {
33
+ coordinatorGeneration = new u();
34
34
  sessions = /* @__PURE__ */ new Map();
35
35
  pendingOpens = /* @__PURE__ */ new Map();
36
36
  operationTail = Promise.resolve();
@@ -45,7 +45,7 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
45
45
  return this.coordinatorGeneration;
46
46
  }
47
47
  reserveOpen(e) {
48
- if (this.assertReady(), S(e), this.pendingOpens.has(e.sessionId) || this.sessions.has(e.sessionId)) throw Error("slide pull session id is already reserved");
48
+ if (this.assertReady(), ae(e), this.pendingOpens.has(e.sessionId) || this.sessions.has(e.sessionId)) throw Error("slide pull session id is already reserved");
49
49
  this.pendingOpens.set(e.sessionId, {
50
50
  identity: e,
51
51
  canceled: !1
@@ -61,12 +61,12 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
61
61
  if (this.assertReady(), this.resourceFailure) throw this.resourceFailure;
62
62
  if (!Number.isSafeInteger(e) || e < 0) throw RangeError("slide index must be a non-negative safe integer");
63
63
  let n = this.pendingOpens.get(t.sessionId);
64
- if (!n || !C(n.identity, t)) throw Error("slide pull session open reservation is stale or missing");
64
+ if (!n || !x(n.identity, t)) throw Error("slide pull session open reservation is stale or missing");
65
65
  let r, a = new Promise((e) => {
66
66
  r = e;
67
67
  }), o = this.operationTail.then(() => this.coordinator.enqueue(async () => {
68
68
  if (n.canceled) throw Error("slide pull session open was canceled");
69
- let a, o = !1, s = new i({
69
+ let a, o = !1, s = new l({
70
70
  ...t,
71
71
  maxByteCredit: h,
72
72
  coordinator: this.coordinator,
@@ -76,21 +76,21 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
76
76
  try {
77
77
  r = this.executeArchive((r) => r.pull_slide(e, t.operationId, t.generation, n));
78
78
  } catch (e) {
79
- throw y(e, n, h) || (this.latchResourceFailure(e), e);
79
+ throw i(e, n, h) || (this.latchResourceFailure(e), e);
80
80
  }
81
- let i = b(r);
82
- return this.acceptSlide && (a = JSON.parse(new TextDecoder().decode(new Uint8Array(i)))), o = !0, {
83
- payload: i,
84
- byteLength: i.byteLength,
81
+ let s = v(r);
82
+ return this.acceptSlide && (a = JSON.parse(new TextDecoder().decode(new Uint8Array(s)))), o = !0, {
83
+ payload: s,
84
+ byteLength: s.byteLength,
85
85
  done: !0,
86
- transfer: [i]
86
+ transfer: [s]
87
87
  };
88
88
  },
89
89
  measureChunk: ({ payload: e }) => e.byteLength,
90
90
  acknowledge: () => {
91
91
  if (!o) throw Error("slide unit is not awaiting acknowledgement");
92
92
  try {
93
- ee(this.executeArchive, t, e, a, this.acceptSlide);
93
+ b(this.executeArchive, t, e, a, this.acceptSlide);
94
94
  } catch (e) {
95
95
  throw this.latchResourceFailure(e), e;
96
96
  }
@@ -153,9 +153,9 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
153
153
  if (n) return n.host.dispatch(e, t);
154
154
  let r = this.pendingOpens.get(e.sessionId);
155
155
  if (r && (e.kind === "cancel" || e.kind === "close")) {
156
- let n = C(r.identity, e);
156
+ let n = x(r.identity, e);
157
157
  return n && (r.canceled = !0), t(n ? {
158
- protocol: l,
158
+ protocol: c,
159
159
  kind: "accepted",
160
160
  sessionId: e.sessionId,
161
161
  operationId: e.operationId,
@@ -165,7 +165,7 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
165
165
  } : this.staleLifecycleResponse(e)), Promise.resolve();
166
166
  }
167
167
  return e.kind === "cancel" || e.kind === "close" ? (t({
168
- protocol: l,
168
+ protocol: c,
169
169
  kind: "accepted",
170
170
  sessionId: e.sessionId,
171
171
  operationId: e.operationId,
@@ -173,13 +173,13 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
173
173
  requestId: e.requestId,
174
174
  command: e.kind
175
175
  }), Promise.resolve()) : (t({
176
- protocol: l,
176
+ protocol: c,
177
177
  kind: "error",
178
178
  sessionId: e.sessionId,
179
179
  operationId: e.operationId,
180
180
  generation: e.generation,
181
181
  requestId: e.requestId,
182
- error: c(/* @__PURE__ */ Error("slide pull session is not open"))
182
+ error: m(/* @__PURE__ */ Error("slide pull session is not open"))
183
183
  }), Promise.resolve());
184
184
  }
185
185
  async dispatchSafely(e, t) {
@@ -188,13 +188,13 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
188
188
  } catch (n) {
189
189
  try {
190
190
  t({
191
- protocol: l,
191
+ protocol: c,
192
192
  kind: "error",
193
193
  sessionId: e.sessionId,
194
194
  operationId: e.operationId,
195
195
  generation: e.generation,
196
196
  requestId: e.requestId,
197
- error: c(n)
197
+ error: m(n)
198
198
  });
199
199
  } catch {}
200
200
  }
@@ -227,22 +227,22 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
227
227
  for (let { host: t, identity: n } of [...this.sessions.values()]) {
228
228
  let r;
229
229
  if (await t.dispatch({
230
- protocol: l,
230
+ protocol: c,
231
231
  kind: "close",
232
232
  ...n,
233
233
  requestId: e++
234
234
  }, (e) => {
235
- e.kind === "error" && (r = p(e.error));
235
+ e.kind === "error" && (r = a(e.error));
236
236
  }), r) throw r;
237
237
  }
238
- this.sessions.clear(), await this.operationTail, this.pendingOpens.clear(), this.archive() && await this.executeArchive((e) => e.close_presentation_session()), this.coordinatorGeneration = new s(), this.resourceFailure = void 0;
238
+ this.sessions.clear(), await this.operationTail, this.pendingOpens.clear(), this.archive() && await this.executeArchive((e) => e.close_presentation_session()), this.coordinatorGeneration = new u(), this.resourceFailure = void 0;
239
239
  }
240
240
  assertReady() {
241
241
  if (this.lifecycleState !== "ready") throw this.lifecycleError();
242
242
  }
243
243
  lifecycleError() {
244
244
  let e = this.lifecycleState === "reset-failed", t = /* @__PURE__ */ Error(e ? "slide pull worker reset failed; retry reset before new work" : "slide pull worker reset is in progress");
245
- return t.name = "PullSessionLifecycleError", Object.assign(t, { code: e ? ne : te });
245
+ return t.name = "PullSessionLifecycleError", Object.assign(t, { code: e ? re : ne });
246
246
  }
247
247
  captureResetIdentities() {
248
248
  for (let { identity: e } of this.sessions.values()) this.resetIdentities.set(e.sessionId, e);
@@ -251,8 +251,8 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
251
251
  responseDuringReset(e) {
252
252
  if (e.kind === "cancel" || e.kind === "close") {
253
253
  let t = this.resetIdentities.get(e.sessionId);
254
- return t && !C(t, e) ? this.staleLifecycleResponse(e) : {
255
- protocol: l,
254
+ return t && !x(t, e) ? this.staleLifecycleResponse(e) : {
255
+ protocol: c,
256
256
  kind: "accepted",
257
257
  sessionId: e.sessionId,
258
258
  operationId: e.operationId,
@@ -262,13 +262,13 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
262
262
  };
263
263
  }
264
264
  return {
265
- protocol: l,
265
+ protocol: c,
266
266
  kind: "error",
267
267
  sessionId: e.sessionId,
268
268
  operationId: e.operationId,
269
269
  generation: e.generation,
270
270
  requestId: e.requestId,
271
- error: c(this.lifecycleError())
271
+ error: m(this.lifecycleError())
272
272
  };
273
273
  }
274
274
  requireArchive() {
@@ -281,7 +281,7 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
281
281
  let t = this.sessions.get(e.sessionId);
282
282
  if (t) {
283
283
  await t.host.dispatch({
284
- protocol: l,
284
+ protocol: c,
285
285
  kind: "close",
286
286
  ...e,
287
287
  requestId: 1
@@ -289,18 +289,18 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
289
289
  return;
290
290
  }
291
291
  let n = this.pendingOpens.get(e.sessionId);
292
- n && C(n.identity, e) && (n.canceled = !0);
292
+ n && x(n.identity, e) && (n.canceled = !0);
293
293
  }
294
294
  readResourceUsage() {
295
- return x(this.executeArchive);
295
+ return y(this.executeArchive);
296
296
  }
297
297
  latchResourceFailure(e) {
298
- let t = e instanceof v ? e : a(e);
298
+ let t = e instanceof _ ? e : f(e);
299
299
  t && (this.resourceFailure ??= t);
300
300
  }
301
301
  staleLifecycleResponse(e) {
302
302
  return {
303
- protocol: l,
303
+ protocol: c,
304
304
  kind: "error",
305
305
  sessionId: e.sessionId,
306
306
  operationId: e.operationId,
@@ -314,24 +314,24 @@ var te = "ooxml-pull-resetting", ne = "ooxml-pull-reset-failed", re = class {
314
314
  };
315
315
  }
316
316
  };
317
- function S(e) {
317
+ function ae(e) {
318
318
  if (!Number.isSafeInteger(e.sessionId) || e.sessionId <= 0) throw RangeError("session id must be a positive safe integer");
319
319
  if (!Number.isSafeInteger(e.operationId) || e.operationId <= 0) throw RangeError("operation id must be a positive safe integer");
320
320
  if (!Number.isSafeInteger(e.generation) || e.generation <= 0) throw RangeError("generation must be a positive safe integer");
321
321
  }
322
- function C(e, t) {
322
+ function x(e, t) {
323
323
  return e.sessionId === t.sessionId && e.operationId === t.operationId && e.generation === t.generation;
324
324
  }
325
325
  //#endregion
326
326
  //#region packages/core/src/internal/wasm-runtime-generation.ts
327
- function ie(e) {
328
- return _(e) ? new g(`WASM parser trapped and was recycled: ${e instanceof Error ? e.message : String(e)}`) : null;
327
+ function S(e) {
328
+ return te(e) ? new g(`WASM parser trapped and was recycled: ${e instanceof Error ? e.message : String(e)}`) : null;
329
329
  }
330
- var w = class {
330
+ var C = class {
331
331
  realm;
332
332
  live = /* @__PURE__ */ new Set();
333
333
  constructor(e, t) {
334
- this.realm = new u(() => e.initSync({ module: t }), () => e.reinit({ module_or_path: t }), ie), this.realm.onPoison((e) => {
334
+ this.realm = new ee(() => e.initSync({ module: t }), () => e.reinit({ module_or_path: t }), S), this.realm.onPoison((e) => {
335
335
  for (let t of this.live) t.poison(e);
336
336
  this.live.clear();
337
337
  });
@@ -341,7 +341,7 @@ var w = class {
341
341
  this.throwIfOpenAborted(t), await this.awaitReadyOrAbort(t), this.throwIfOpenAborted(t);
342
342
  let n = this.realm.tryRunReady(e);
343
343
  if (!n.current) continue;
344
- let r = new ae(this, n.value, n.generation);
344
+ let r = new oe(this, n.value, n.generation);
345
345
  if (this.live.add(r), t?.signal?.aborted) throw r.close(t.disposeOnAbort), t.abortError?.() ?? new DOMException("The operation was aborted", "AbortError");
346
346
  return r;
347
347
  }
@@ -373,7 +373,7 @@ var w = class {
373
373
  let n = e.detachForClose();
374
374
  this.live.delete(e), n && this.realm.run(() => t(n));
375
375
  }
376
- }, ae = class {
376
+ }, oe = class {
377
377
  archive;
378
378
  failure;
379
379
  proxy;
@@ -403,17 +403,17 @@ var w = class {
403
403
  }
404
404
  poison(e) {
405
405
  let t = this.archive;
406
- this.failure = e, this.archive = void 0, m(t);
406
+ this.failure = e, this.archive = void 0, s(t);
407
407
  }
408
- }, oe = /* @__PURE__ */ e({
408
+ }, w = /* @__PURE__ */ e({
409
409
  PptxArchive: () => T,
410
410
  default: () => Y,
411
- extract_font: () => se,
412
- extract_image: () => ce,
413
- extract_media: () => E,
411
+ extract_font: () => E,
412
+ extract_image: () => D,
413
+ extract_media: () => O,
414
414
  initSync: () => ue,
415
- parse_pptx: () => D,
416
- pptx_to_markdown: () => O,
415
+ parse_pptx: () => se,
416
+ pptx_to_markdown: () => ce,
417
417
  reinit: () => de
418
418
  }), T = class {
419
419
  __destroy_into_raw() {
@@ -504,31 +504,31 @@ var w = class {
504
504
  }
505
505
  };
506
506
  Symbol.dispose && (T.prototype[Symbol.dispose] = T.prototype.free);
507
- function se(e, t, n, r) {
507
+ function E(e, t, n, r) {
508
508
  let i = R(e, q.__wbindgen_malloc), a = K, o = z(t, q.__wbindgen_malloc, q.__wbindgen_realloc), s = K, c = q.extract_font(i, a, o, s, !L(n), L(n) ? BigInt(0) : n, !L(r), L(r) ? BigInt(0) : r);
509
509
  if (c[3]) throw B(c[2]);
510
510
  var l = j(c[0], c[1]).slice();
511
511
  return q.__wbindgen_free(c[0], c[1] * 1, 1), l;
512
512
  }
513
- function ce(e, t, n, r) {
513
+ function D(e, t, n, r) {
514
514
  let i = R(e, q.__wbindgen_malloc), a = K, o = z(t, q.__wbindgen_malloc, q.__wbindgen_realloc), s = K, c = q.extract_image(i, a, o, s, !L(n), L(n) ? BigInt(0) : n, !L(r), L(r) ? BigInt(0) : r);
515
515
  if (c[3]) throw B(c[2]);
516
516
  var l = j(c[0], c[1]).slice();
517
517
  return q.__wbindgen_free(c[0], c[1] * 1, 1), l;
518
518
  }
519
- function E(e, t, n, r) {
519
+ function O(e, t, n, r) {
520
520
  let i = R(e, q.__wbindgen_malloc), a = K, o = z(t, q.__wbindgen_malloc, q.__wbindgen_realloc), s = K, c = q.extract_media(i, a, o, s, !L(n), L(n) ? BigInt(0) : n, !L(r), L(r) ? BigInt(0) : r);
521
521
  if (c[3]) throw B(c[2]);
522
522
  var l = j(c[0], c[1]).slice();
523
523
  return q.__wbindgen_free(c[0], c[1] * 1, 1), l;
524
524
  }
525
- function D(e, t, n) {
525
+ function se(e, t, n) {
526
526
  let r = R(e, q.__wbindgen_malloc), i = K, a = q.parse_pptx(r, i, !L(t), L(t) ? BigInt(0) : t, !L(n), L(n) ? BigInt(0) : n);
527
527
  if (a[3]) throw B(a[2]);
528
528
  var o = j(a[0], a[1]).slice();
529
529
  return q.__wbindgen_free(a[0], a[1] * 1, 1), o;
530
530
  }
531
- function O(e, t, n) {
531
+ function ce(e, t, n) {
532
532
  let r, i;
533
533
  try {
534
534
  let s = R(e, q.__wbindgen_malloc), c = K, l = q.pptx_to_markdown(s, c, !L(t), L(t) ? BigInt(0) : t, !L(n), L(n) ? BigInt(0) : n);
@@ -690,43 +690,43 @@ async function de(e) {
690
690
  //#region packages/pptx/src/internal/node-acquisition.ts
691
691
  var X, Z;
692
692
  function fe(e) {
693
- if (!Z) X = e, Z = new w(oe, e);
693
+ if (!Z) X = e, Z = new C(w, e);
694
694
  else if (X !== e) throw Error("PPTX runtime was already initialized with another WebAssembly.Module");
695
695
  return Z;
696
696
  }
697
697
  async function pe(e, n, i = {}) {
698
- let s = r(i), c = new d({
699
- enabled: s.debug || s.onResourceMetrics !== void 0,
698
+ let a = d(i), s = new o({
699
+ enabled: a.debug || a.onResourceMetrics !== void 0,
700
700
  format: "pptx",
701
701
  mode: "node",
702
702
  scope: "session",
703
- policy: s.policy,
704
- onMetrics: s.onResourceMetrics,
705
- emitToConsole: s.debug
703
+ policy: a.policy,
704
+ onMetrics: a.onResourceMetrics,
705
+ emitToConsole: a.debug
706
706
  });
707
- c.setSourceBytes(e.byteLength);
708
- let l;
707
+ s.setSourceBytes(e.byteLength);
708
+ let c;
709
709
  try {
710
710
  Q(i.signal);
711
- let [r, a, u] = o(s.policy), d = T;
712
- l = await fe(n).open(() => new d(e, r, a, u), {
711
+ let [o, l, u] = r(a.policy), d = T;
712
+ c = await fe(n).open(() => new d(e, o, l, u), {
713
713
  signal: i.signal,
714
714
  abortError: $,
715
715
  disposeOnAbort: (e) => e.free()
716
716
  }), Q(i.signal);
717
- let f = l.proxy, p = t(JSON.parse(new TextDecoder().decode(f.presentation_bootstrap())));
718
- return c.checkpoint("presentation bootstrap ready"), {
717
+ let f = c.proxy, p = t(JSON.parse(new TextDecoder().decode(f.presentation_bootstrap())));
718
+ return s.checkpoint("presentation bootstrap ready"), {
719
719
  archive: f,
720
720
  bootstrap: p,
721
- metrics: c,
722
- closeArchive: () => l?.close((e) => e.free())
721
+ metrics: s,
722
+ closeArchive: () => c?.close((e) => e.free())
723
723
  };
724
724
  } catch (e) {
725
725
  try {
726
- l?.close((e) => e.free());
726
+ c?.close((e) => e.free());
727
727
  } catch {}
728
- let t = a(e) ?? e;
729
- throw c.fail(t), t;
728
+ let t = f(e) ?? e;
729
+ throw s.fail(t), t;
730
730
  }
731
731
  }
732
732
  function Q(e) {
@@ -740,4 +740,4 @@ function $() {
740
740
  //#region packages/pptx/src/internal/session.ts
741
741
  var me = /* @__PURE__ */ e({ renderSlide: () => n });
742
742
  //#endregion
743
- export { x as a, re as i, pe as n, w as r, me as t };
743
+ export { y as a, ie as i, pe as n, C as r, me as t };