@silurus/ooxml 0.88.0 → 0.89.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.
- package/README.md +118 -23
- package/THIRD_PARTY_NOTICES.md +7 -6
- package/dist/abort-VrnK7mdP.js +10 -0
- package/dist/assets/render-worker-CUOU6mL2.js +16 -0
- package/dist/assets/render-worker-DOqrFhSU.js +15 -0
- package/dist/assets/render-worker-DvWUdZUN.js +35 -0
- package/dist/bounded-raw-part-cache-B7JoC1CD.js +64586 -0
- package/dist/bundled-asset-url-E2nXURF9.js +15 -0
- package/dist/canvas-viewer-mechanics-DfQqRKkD.js +675 -0
- package/dist/cfb-guard-9QTRTg7f.js +528 -0
- package/dist/chart-ex.mjs +692 -688
- package/dist/comment-overlay-controller-B5_zGgG5.js +994 -0
- package/dist/comment-ui-runtime-B7ZvovcS.js +2 -0
- package/dist/{comment-ui-runtime-DcJOYlw-.js → comment-ui-runtime-D_sb2K6s.js} +5 -5
- package/dist/{comment-ui-runtime-CWGqn5Vr.js → comment-ui-runtime-Jy-3goA9.js} +5 -5
- package/dist/delimited-text-worker-host-CikWU6_m.js +27 -0
- package/dist/document-model-source-BKNrXjAL.js +249 -0
- package/dist/document-pull-client-CxONDGbk.js +37833 -0
- package/dist/document-pull-worker-AMyXYpPq.js +104 -0
- package/dist/docx-D91ER1_S.js +495 -0
- package/dist/docx-DhDnKEI6.js +3563 -0
- package/dist/docx-model-source-CdrSt3hF.js +98 -0
- package/dist/docx-source-worker.mjs +455 -0
- package/dist/docx.mjs +7 -7
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/drawingml-shape-ChcGZNd8.js +310 -0
- package/dist/duotone-ekYik4ix.js +126 -0
- package/dist/emf-UT6I8rVi.js +1790 -0
- package/dist/font-preload-demand-CdJZUMCT.js +2058 -0
- package/dist/grid-geometry-uQOgViJU.js +384 -0
- package/dist/host-layout-DVMw8hDY.js +56 -0
- package/dist/host-layout-measure-CCEgaC_v.js +7 -0
- package/dist/in-process-pull-transport-DuXcPZng.js +29 -0
- package/dist/index.mjs +4 -4
- package/dist/internal-companion.mjs +12 -0
- package/dist/line-distribute-CPOV6csk.js +2716 -0
- package/dist/math.mjs +2 -2
- package/dist/mathjax-stix2.js +10 -10
- package/dist/model-source-DJGzDtGb.js +61 -0
- package/dist/model-source-kz_NkZqT.js +179 -0
- package/dist/model-source-session-Bu9CHFHc.js +71 -0
- package/dist/model-source-session-CDuijwv1.js +85 -0
- package/dist/model-source-session-sKpNiIJI.js +58 -0
- package/dist/node.mjs +7 -1327
- package/dist/{pixel-budget-9P63Bsk5.js → pixel-budget-BpTYrepD.js} +13 -10
- package/dist/plot-area-frame-CaJFvZ7p.js +8502 -0
- package/dist/pptx-CDP9dZHe.js +2936 -0
- package/dist/pptx-C_uxLVKB.js +183 -0
- package/dist/pptx-model-source-O7LhpOjz.js +37 -0
- package/dist/pptx-source-worker.mjs +446 -0
- package/dist/pptx.mjs +8 -7
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/presentation-model-source-tmROzteR.js +77 -0
- package/dist/raster-target-YQ4G6rxo.js +42 -0
- package/dist/region-map.mjs +114 -150
- package/dist/{render-D3iqVKCo.js → render-CJVglUHl.js} +3 -3
- package/dist/{render-worker-host-B5wQfB7U.js → render-worker-host-BseIaVvm.js} +1 -1
- package/dist/{render-worker-host-D4123J27.js → render-worker-host-CyxPU4JU.js} +1 -1
- package/dist/{render-worker-host-Di3LxLc0.js → render-worker-host-aF6aWkC0.js} +1 -1
- package/dist/renderer-CkGLj0CC.js +5170 -0
- package/dist/renderer-Czw1cCC7.js +5823 -0
- package/dist/resource-measurement-mXw-WjMF.js +771 -0
- package/dist/session-Csv9maad.js +656 -0
- package/dist/slide-pull-client-DRZYwBTu.js +6515 -0
- package/dist/three-d-BK5siJgJ.js +878 -0
- package/dist/three-d.mjs +960 -945
- package/dist/{raster-target-ojDdQizC.js → tiff-contract-C6M3QcPp.js} +1 -42
- package/dist/tiff.mjs +401 -248
- package/dist/types/chart-ex.d.ts +149 -2
- package/dist/types/docx.d.ts +333 -96
- package/dist/types/index.d.ts +566 -301
- package/dist/types/internal-companion.d.ts +11 -0
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +422 -9
- package/dist/types/pptx.d.ts +302 -95
- package/dist/types/region-map.d.ts +149 -2
- package/dist/types/three-d.d.ts +149 -2
- package/dist/types/tiff.d.ts +1 -1
- package/dist/types/xlsx.d.ts +343 -132
- package/dist/wasm-loader-rlgHmcSv.js +35 -0
- package/dist/wasm-runtime-generation-DX4y0Ecl.js +97 -0
- package/dist/workbook-model-source-BTC4ISTS.js +94 -0
- package/dist/worker-source-I1cIYBel.js +22 -0
- package/dist/worker-source-SbudzjYL.js +22 -0
- package/dist/worker-source-UAi3GNcM.js +22 -0
- package/dist/worksheet-pull-client-CkHgbtyM.js +579 -0
- package/dist/xlsx-CpSDPAEU.js +5809 -0
- package/dist/xlsx-D5569TPf.js +534 -0
- package/dist/xlsx-model-source-DPSkjFic.js +309 -0
- package/dist/xlsx-source-worker.mjs +525 -0
- package/dist/xlsx.mjs +8 -7
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +42 -16
- package/dist/assets/render-worker-1uPAxMZr.js +0 -31
- package/dist/assets/render-worker-BlvJybji.js +0 -10
- package/dist/assets/render-worker-CzmiJfFL.js +0 -11
- package/dist/bounded-raw-part-cache-Cg1BsSZQ.js +0 -119
- package/dist/canvas-viewer-mechanics-DbLz0rYW.js +0 -1384
- package/dist/cjk-fallback-bLI3z70h.js +0 -46
- package/dist/comment-occurrence-C8Y2uoVr.js +0 -6
- package/dist/comment-ui-runtime-BsK8pmUT.js +0 -2
- package/dist/comments-Diid5ujN.js +0 -246
- package/dist/delimited-text-worker-host-BVY-Ecni.js +0 -27
- package/dist/document-pull-client-B9PTM-pL.js +0 -27280
- package/dist/docx-BF9WXrYH.js +0 -3103
- package/dist/dom-interaction-boundary-Cnm8DSBN.js +0 -223
- package/dist/highlight-rect-C5hkRqUr.js +0 -13
- package/dist/hyperlink-Cxzhet30.js +0 -36446
- package/dist/line-distribute-D1WNHKz_.js +0 -1023
- package/dist/line-metrics-B60C86uh.js +0 -60
- package/dist/plot-area-frame-DLTYKHNP.js +0 -4354
- package/dist/pptx-DkyYBYoL.js +0 -3065
- package/dist/renderer-B4GZb5We.js +0 -6492
- package/dist/resource-measurement-SHQCbkh2.js +0 -150
- package/dist/session-BGq81gRQ.js +0 -743
- package/dist/slide-pull-client-DiPnm240.js +0 -6253
- package/dist/source-key-DIJG8BA0.js +0 -42
- package/dist/three-d-DJBl8g8M.js +0 -1162
- package/dist/transfer-p6iCC2R7.js +0 -6
- package/dist/units-BzZ0gAxs.js +0 -4
- package/dist/worksheet-pull-client-BM8ywvbu.js +0 -458
- package/dist/xlsx-C9NVjgaV.js +0 -8484
- /package/dist/{chunk-DmhlhrBa.js → chunk-Dy4uBu1J.js} +0 -0
- /package/dist/{mathjax-DoyWZbSp.js → mathjax-BhwN6ilc.js} +0 -0
- /package/dist/{read-only-comment-decoration-Dz7eTQ4d.js → read-only-comment-decoration-PidH0wnP.js} +0 -0
- /package/dist/{read-only-comment-margin-DkgzASAl.js → read-only-comment-margin-B52rDVKo.js} +0 -0
- /package/dist/{renderer-module-contract-D91rkYHH.js → renderer-module-contract-CWM7jv6d.js} +0 -0
- /package/dist/{visible-index-BgiHEc1z.js → visible-index-FeVA0mGE.js} +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region packages/core/src/internal/bundled-asset-url.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
if (e.startsWith("/") && globalThis.location?.href) {
|
|
4
|
+
let n;
|
|
5
|
+
try {
|
|
6
|
+
n = new URL("/", t);
|
|
7
|
+
} catch {}
|
|
8
|
+
if (!n || n.protocol === "file:") try {
|
|
9
|
+
return new URL(e, globalThis.location.href).href;
|
|
10
|
+
} catch {}
|
|
11
|
+
}
|
|
12
|
+
return new URL(e, t).href;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { e as t };
|
|
@@ -0,0 +1,675 @@
|
|
|
1
|
+
import { lt as e } from "./bounded-raw-part-cache-B7JoC1CD.js";
|
|
2
|
+
import { B as t } from "./renderer-Czw1cCC7.js";
|
|
3
|
+
import { t as n } from "./abort-VrnK7mdP.js";
|
|
4
|
+
//#region packages/core/src/autoResize.ts
|
|
5
|
+
function r(e, t, n = {}) {
|
|
6
|
+
let r = n.pauseWhenHidden ?? !0, i = null, a = 0, o = 0, s = null, c = !1, l = !1, u = () => {
|
|
7
|
+
if (!l && !(r && typeof document < "u" && document.hidden)) {
|
|
8
|
+
if (s) {
|
|
9
|
+
c = !0;
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
i === null && (i = requestAnimationFrame(d));
|
|
13
|
+
}
|
|
14
|
+
}, d = async () => {
|
|
15
|
+
if (i = null, l) return;
|
|
16
|
+
let t = a, n = o;
|
|
17
|
+
try {
|
|
18
|
+
let r = e(t, n);
|
|
19
|
+
s = r instanceof Promise ? r : Promise.resolve(), await s;
|
|
20
|
+
} catch (e) {
|
|
21
|
+
console.error("[autoResize] render failed:", e);
|
|
22
|
+
} finally {
|
|
23
|
+
s = null, c && !l && (c = !1, u());
|
|
24
|
+
}
|
|
25
|
+
}, f = new ResizeObserver((e) => {
|
|
26
|
+
for (let t of e) {
|
|
27
|
+
let e = t.contentRect;
|
|
28
|
+
a = e.width, o = e.height;
|
|
29
|
+
}
|
|
30
|
+
u();
|
|
31
|
+
});
|
|
32
|
+
f.observe(t);
|
|
33
|
+
let p = () => {
|
|
34
|
+
typeof document < "u" && !document.hidden && u();
|
|
35
|
+
};
|
|
36
|
+
return r && typeof document < "u" && document.addEventListener("visibilitychange", p), () => {
|
|
37
|
+
l = !0, f.disconnect(), i !== null && (cancelAnimationFrame(i), i = null), r && typeof document < "u" && document.removeEventListener("visibilitychange", p);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region packages/core/src/worker/bridge.ts
|
|
42
|
+
function i() {
|
|
43
|
+
return n("worker request aborted");
|
|
44
|
+
}
|
|
45
|
+
var a = class {
|
|
46
|
+
_worker;
|
|
47
|
+
_opts;
|
|
48
|
+
_pending = /* @__PURE__ */ new Map();
|
|
49
|
+
_orphaned = /* @__PURE__ */ new Map();
|
|
50
|
+
_nextId = 1;
|
|
51
|
+
_terminated = !1;
|
|
52
|
+
_failure;
|
|
53
|
+
constructor(e, t) {
|
|
54
|
+
this._worker = e, this._opts = t, this._worker.addEventListener("message", this._handle), this._worker.addEventListener("messageerror", this._handleWorkerError), this._worker.addEventListener("error", this._handleWorkerError);
|
|
55
|
+
}
|
|
56
|
+
_handle = (e) => {
|
|
57
|
+
let t = e.data, n = this._opts.correlate(t);
|
|
58
|
+
if (n === void 0) {
|
|
59
|
+
this._opts.onUnsolicited?.(t);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
let r = this._pending.get(n);
|
|
63
|
+
if (!r) {
|
|
64
|
+
try {
|
|
65
|
+
let e = this._orphaned.get(n);
|
|
66
|
+
e ? (this._orphaned.delete(n), e(t)) : this._opts.onOrphanedResponse?.(t);
|
|
67
|
+
} catch {}
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this._pending.delete(n), r.cleanup();
|
|
71
|
+
let i = this._opts.toError?.(t);
|
|
72
|
+
i === void 0 ? r.resolve(t) : r.reject(i instanceof Error ? i : Error(i));
|
|
73
|
+
};
|
|
74
|
+
_handleWorkerError = (e) => {
|
|
75
|
+
let t = "message" in e && e.message ? `: ${e.message}` : "", n = e.type === "error" && !t && globalThis.origin === "null" ? ": this page has an opaque origin; a sandboxed iframe without allow-same-origin can block Worker loading" : "";
|
|
76
|
+
this._failure ??= /* @__PURE__ */ Error(`Worker error${t}${n}`), this._rejectAll(this._failure);
|
|
77
|
+
};
|
|
78
|
+
_rejectAll(e) {
|
|
79
|
+
let t = [...this._pending.values()];
|
|
80
|
+
this._pending.clear();
|
|
81
|
+
for (let n of t) n.cleanup(), n.reject(e);
|
|
82
|
+
}
|
|
83
|
+
nextId() {
|
|
84
|
+
return this._nextId++;
|
|
85
|
+
}
|
|
86
|
+
request(e, t, n) {
|
|
87
|
+
let r = this._nextId++, a = n?.timeoutMs === !1 ? void 0 : n?.timeoutMs ?? this._opts.timeoutMs, o = n?.signal, s = (e) => {
|
|
88
|
+
try {
|
|
89
|
+
n?.onCancel?.(r, e);
|
|
90
|
+
} catch {}
|
|
91
|
+
};
|
|
92
|
+
return new Promise((c, l) => {
|
|
93
|
+
if (this._terminated) {
|
|
94
|
+
l(/* @__PURE__ */ Error("Worker terminated"));
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (this._failure) {
|
|
98
|
+
l(this._failure);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (o?.aborted) {
|
|
102
|
+
s("abort"), l(i());
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
let u, d;
|
|
106
|
+
this._pending.set(r, {
|
|
107
|
+
resolve: c,
|
|
108
|
+
reject: l,
|
|
109
|
+
cleanup: () => {
|
|
110
|
+
u !== void 0 && (clearTimeout(u), u = void 0), d && o && (o.removeEventListener("abort", d), d = void 0);
|
|
111
|
+
},
|
|
112
|
+
onOrphanedResponse: n?.onOrphanedResponse
|
|
113
|
+
}), a !== void 0 && (u = setTimeout(() => {
|
|
114
|
+
let e = this._pending.get(r);
|
|
115
|
+
e && (this._pending.delete(r), e.onOrphanedResponse && this._orphaned.set(r, e.onOrphanedResponse), e.cleanup(), s("timeout"), e.reject(/* @__PURE__ */ Error(`worker request timed out after ${a}ms`)));
|
|
116
|
+
}, a)), o && (d = () => {
|
|
117
|
+
let e = this._pending.get(r);
|
|
118
|
+
e && (this._pending.delete(r), e.onOrphanedResponse && this._orphaned.set(r, e.onOrphanedResponse), e.cleanup(), s("abort"), e.reject(i()));
|
|
119
|
+
}, o.addEventListener("abort", d));
|
|
120
|
+
try {
|
|
121
|
+
this._worker.postMessage(e(r), t);
|
|
122
|
+
} catch (e) {
|
|
123
|
+
let t = this._pending.get(r);
|
|
124
|
+
if (!t) return;
|
|
125
|
+
this._pending.delete(r), t.cleanup(), t.reject(e instanceof Error ? e : Error(String(e)));
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
transport(e) {
|
|
130
|
+
return {
|
|
131
|
+
request: (t, n, r) => this.request(t, n, {
|
|
132
|
+
...r,
|
|
133
|
+
onOrphanedResponse: r?.onOrphanedResponse ? (t) => {
|
|
134
|
+
e(t) && r.onOrphanedResponse?.(t);
|
|
135
|
+
} : void 0
|
|
136
|
+
}).then((t) => {
|
|
137
|
+
if (!e(t)) throw Error("worker response does not match the selected transport");
|
|
138
|
+
return t;
|
|
139
|
+
}),
|
|
140
|
+
forgetOrphaned: (e) => this.forgetOrphaned(e),
|
|
141
|
+
terminate: () => this.terminate()
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
post(e, t) {
|
|
145
|
+
this._worker.postMessage(e, t);
|
|
146
|
+
}
|
|
147
|
+
forgetOrphaned(e) {
|
|
148
|
+
for (let t of e) this._orphaned.delete(t);
|
|
149
|
+
}
|
|
150
|
+
get orphanedRequestCount() {
|
|
151
|
+
return this._orphaned.size;
|
|
152
|
+
}
|
|
153
|
+
terminate() {
|
|
154
|
+
this._terminated || (this._terminated = !0, this._worker.removeEventListener("message", this._handle), this._worker.removeEventListener("messageerror", this._handleWorkerError), this._worker.removeEventListener("error", this._handleWorkerError), this._worker.terminate(), this._rejectAll(/* @__PURE__ */ Error("Worker terminated")), this._orphaned.clear());
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region packages/core/src/worker/rejected-load.ts
|
|
159
|
+
function o(e, t) {
|
|
160
|
+
if (t) try {
|
|
161
|
+
t();
|
|
162
|
+
return;
|
|
163
|
+
} catch {}
|
|
164
|
+
try {
|
|
165
|
+
e.terminate();
|
|
166
|
+
} catch {}
|
|
167
|
+
}
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region packages/core/src/worker/svg-decode-bridge.ts
|
|
170
|
+
function s(e) {
|
|
171
|
+
return !!e && typeof e == "object" && e.kind === "ooxmlDecodeSvg";
|
|
172
|
+
}
|
|
173
|
+
function c(n, r) {
|
|
174
|
+
return s(r) ? (e(new Blob([r.bytes], { type: "image/svg+xml" }), r).then((e) => {
|
|
175
|
+
try {
|
|
176
|
+
n({
|
|
177
|
+
kind: "ooxmlSvgDecoded",
|
|
178
|
+
decodeId: r.decodeId,
|
|
179
|
+
bitmap: e
|
|
180
|
+
}, [e]);
|
|
181
|
+
} catch {
|
|
182
|
+
t(e);
|
|
183
|
+
}
|
|
184
|
+
}).catch((e) => {
|
|
185
|
+
try {
|
|
186
|
+
n({
|
|
187
|
+
kind: "ooxmlSvgDecodeFailed",
|
|
188
|
+
decodeId: r.decodeId,
|
|
189
|
+
message: e instanceof Error ? e.message : String(e)
|
|
190
|
+
});
|
|
191
|
+
} catch {}
|
|
192
|
+
}), !0) : !1;
|
|
193
|
+
}
|
|
194
|
+
//#endregion
|
|
195
|
+
//#region packages/core/src/interaction/zoom.ts
|
|
196
|
+
var l = 1.1, u = 10, d = 3, f = 1;
|
|
197
|
+
function p(e, t) {
|
|
198
|
+
let n;
|
|
199
|
+
switch (t) {
|
|
200
|
+
case 1:
|
|
201
|
+
n = e / d;
|
|
202
|
+
break;
|
|
203
|
+
case 2:
|
|
204
|
+
n = e / f;
|
|
205
|
+
break;
|
|
206
|
+
default:
|
|
207
|
+
n = e / u;
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
210
|
+
return Math.max(-1, Math.min(1, n));
|
|
211
|
+
}
|
|
212
|
+
function m(e, t, n = 0) {
|
|
213
|
+
return e * l ** +-p(t, n);
|
|
214
|
+
}
|
|
215
|
+
function h(e, t, n, r, i) {
|
|
216
|
+
let a = n > 0 ? r / n : 1, o = (e + t) * a - t, s = i.maxScroll > 0 ? i.maxScroll : 0;
|
|
217
|
+
return o < 0 ? 0 : o > s ? s : o;
|
|
218
|
+
}
|
|
219
|
+
//#endregion
|
|
220
|
+
//#region packages/core/src/interaction/zoomable.ts
|
|
221
|
+
var g = Object.freeze([
|
|
222
|
+
.25,
|
|
223
|
+
.33,
|
|
224
|
+
.5,
|
|
225
|
+
.67,
|
|
226
|
+
.75,
|
|
227
|
+
.9,
|
|
228
|
+
1,
|
|
229
|
+
1.1,
|
|
230
|
+
1.25,
|
|
231
|
+
1.5,
|
|
232
|
+
1.75,
|
|
233
|
+
2,
|
|
234
|
+
2.5,
|
|
235
|
+
3,
|
|
236
|
+
4
|
|
237
|
+
]), _ = .005;
|
|
238
|
+
function v(e) {
|
|
239
|
+
for (let t of g) if (t > e + _) return t;
|
|
240
|
+
return g[g.length - 1];
|
|
241
|
+
}
|
|
242
|
+
function y(e, t = g[0]) {
|
|
243
|
+
for (let t = g.length - 1; t >= 0; t--) {
|
|
244
|
+
let n = g[t];
|
|
245
|
+
if (n < e - _) return n;
|
|
246
|
+
}
|
|
247
|
+
return Math.min(t, g[0]);
|
|
248
|
+
}
|
|
249
|
+
function b(e, t, n) {
|
|
250
|
+
return e < t ? t : e > n ? n : e;
|
|
251
|
+
}
|
|
252
|
+
function x(e, t) {
|
|
253
|
+
let { contentWidth: n, contentHeight: r, containerWidth: i, containerHeight: a } = e;
|
|
254
|
+
if (n <= 0 || i <= 0) return 0;
|
|
255
|
+
let o = i / n;
|
|
256
|
+
if (t === "width") return o;
|
|
257
|
+
if (r <= 0 || a <= 0) return 0;
|
|
258
|
+
let s = a / r;
|
|
259
|
+
return Math.min(o, s);
|
|
260
|
+
}
|
|
261
|
+
//#endregion
|
|
262
|
+
//#region packages/core/src/search/text-index.ts
|
|
263
|
+
function S(e) {
|
|
264
|
+
let t = e.toLowerCase();
|
|
265
|
+
if (t.length === e.length) return t;
|
|
266
|
+
let n = "";
|
|
267
|
+
for (let t of e) {
|
|
268
|
+
let e = t.toLowerCase();
|
|
269
|
+
n += e.length === t.length ? e : t;
|
|
270
|
+
}
|
|
271
|
+
return n;
|
|
272
|
+
}
|
|
273
|
+
function C(e) {
|
|
274
|
+
let t = Array(e.length), n = 0, r = "";
|
|
275
|
+
for (let i = 0; i < e.length; i++) t[i] = n, r += e[i].text, n += e[i].text.length;
|
|
276
|
+
return {
|
|
277
|
+
text: r,
|
|
278
|
+
folded: S(r),
|
|
279
|
+
runStart: t,
|
|
280
|
+
runCount: e.length
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
function w(e, t) {
|
|
284
|
+
let { runStart: n } = e, r = 0, i = n.length - 1;
|
|
285
|
+
for (; r < i;) {
|
|
286
|
+
let e = r + i + 1 >> 1;
|
|
287
|
+
n[e] <= t ? r = e : i = e - 1;
|
|
288
|
+
}
|
|
289
|
+
return r;
|
|
290
|
+
}
|
|
291
|
+
function T(e, t, n) {
|
|
292
|
+
let { runStart: r, runCount: i, text: a } = e, o = [], s = w(e, t), c = t;
|
|
293
|
+
for (; c < n && s < i;) {
|
|
294
|
+
let e = s + 1 < i ? r[s + 1] : a.length, t = Math.min(n, e), l = c - r[s], u = t - r[s];
|
|
295
|
+
u > l && o.push({
|
|
296
|
+
runIndex: s,
|
|
297
|
+
start: l,
|
|
298
|
+
end: u
|
|
299
|
+
}), c = t, s++;
|
|
300
|
+
}
|
|
301
|
+
return o;
|
|
302
|
+
}
|
|
303
|
+
function E(e, t, n = {}) {
|
|
304
|
+
if (t.length === 0) return [];
|
|
305
|
+
let r = n.caseSensitive ?? !1, i = r ? e.text : e.folded, a = r ? t : S(t), o = [], s = 0, c = 0;
|
|
306
|
+
for (;;) {
|
|
307
|
+
let t = i.indexOf(a, s);
|
|
308
|
+
if (t === -1) break;
|
|
309
|
+
o.push({
|
|
310
|
+
matchIndex: c,
|
|
311
|
+
slices: T(e, t, t + a.length)
|
|
312
|
+
}), c++, s = t + a.length;
|
|
313
|
+
}
|
|
314
|
+
return o;
|
|
315
|
+
}
|
|
316
|
+
//#endregion
|
|
317
|
+
//#region packages/core/src/search/find-cursor.ts
|
|
318
|
+
function D(e, t) {
|
|
319
|
+
return t <= 0 ? -1 : e < 0 ? 0 : (e + 1) % t;
|
|
320
|
+
}
|
|
321
|
+
function O(e, t) {
|
|
322
|
+
return t <= 0 ? -1 : e < 0 ? t - 1 : (e - 1 + t) % t;
|
|
323
|
+
}
|
|
324
|
+
//#endregion
|
|
325
|
+
//#region packages/core/src/internal/utf16-prefix.ts
|
|
326
|
+
function k(e, t) {
|
|
327
|
+
let n = Math.min(e.length, t);
|
|
328
|
+
if (n > 0 && n < e.length) {
|
|
329
|
+
let t = e.charCodeAt(n - 1), r = e.charCodeAt(n);
|
|
330
|
+
t >= 55296 && t <= 56319 && r >= 56320 && r <= 57343 && n--;
|
|
331
|
+
}
|
|
332
|
+
return e.slice(0, n);
|
|
333
|
+
}
|
|
334
|
+
//#endregion
|
|
335
|
+
//#region packages/core/src/internal/chart-context.ts
|
|
336
|
+
var A = 65536;
|
|
337
|
+
function j(e) {
|
|
338
|
+
let t = e ?? 16384;
|
|
339
|
+
if (!Number.isFinite(t) || t < 0) throw RangeError("maxTextCharacters must be a finite non-negative number.");
|
|
340
|
+
return Math.min(A, Math.floor(t));
|
|
341
|
+
}
|
|
342
|
+
function M(e, t) {
|
|
343
|
+
let n = j(t), r = [], i = 0, a = !1, o = !1, s = (e, t) => {
|
|
344
|
+
if (t && o) {
|
|
345
|
+
if (i >= n) return a = !0, !1;
|
|
346
|
+
r.push("\n"), i++;
|
|
347
|
+
}
|
|
348
|
+
o = !0;
|
|
349
|
+
let s = k(e, Math.max(0, n - i));
|
|
350
|
+
return r.push(s), i += s.length, s.length < e.length ? (a = !0, !1) : !0;
|
|
351
|
+
};
|
|
352
|
+
if (!s(`Chart type: ${e.chartType}`, !0) || e.title !== null && !s(`Title: ${e.title}`, !0)) return {
|
|
353
|
+
text: r.join(""),
|
|
354
|
+
truncated: a,
|
|
355
|
+
textCharacters: i,
|
|
356
|
+
maxTextCharacters: n
|
|
357
|
+
};
|
|
358
|
+
if (e.categories.length > 0) {
|
|
359
|
+
if (!s("Categories: ", !0)) return {
|
|
360
|
+
text: r.join(""),
|
|
361
|
+
truncated: a,
|
|
362
|
+
textCharacters: i,
|
|
363
|
+
maxTextCharacters: n
|
|
364
|
+
};
|
|
365
|
+
for (let [t, o] of e.categories.entries()) if (!s(`${t === 0 ? "" : ", "}${o}`, !1)) return {
|
|
366
|
+
text: r.join(""),
|
|
367
|
+
truncated: a,
|
|
368
|
+
textCharacters: i,
|
|
369
|
+
maxTextCharacters: n
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
for (let t of e.series) {
|
|
373
|
+
if (!s(`Series ${t.name || "(unnamed)"}: `, !0)) break;
|
|
374
|
+
for (let [e, o] of t.values.entries()) if (!s(`${e === 0 ? "" : ", "}${o === null ? "" : o}`, !1)) return {
|
|
375
|
+
text: r.join(""),
|
|
376
|
+
truncated: a,
|
|
377
|
+
textCharacters: i,
|
|
378
|
+
maxTextCharacters: n
|
|
379
|
+
};
|
|
380
|
+
if (a) break;
|
|
381
|
+
}
|
|
382
|
+
return {
|
|
383
|
+
text: r.join(""),
|
|
384
|
+
truncated: a,
|
|
385
|
+
textCharacters: i,
|
|
386
|
+
maxTextCharacters: n
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
//#endregion
|
|
390
|
+
//#region packages/core/src/internal/canvas-viewer-mechanics.ts
|
|
391
|
+
var N = 65536, P = 1024;
|
|
392
|
+
function F(e, t, n) {
|
|
393
|
+
let r = e ?? t;
|
|
394
|
+
if (!Number.isFinite(r) || r < 0) throw RangeError(`${n} must be a finite non-negative number.`);
|
|
395
|
+
return Math.min(t, Math.floor(r));
|
|
396
|
+
}
|
|
397
|
+
function* I(e) {
|
|
398
|
+
let t = e.firstChild ?? e.childNodes[0] ?? null;
|
|
399
|
+
for (; t;) {
|
|
400
|
+
if (t.nodeType === 3 && (yield t), t.firstChild) {
|
|
401
|
+
t = t.firstChild;
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
for (; t && t !== e && !t.nextSibling;) t = t.parentNode;
|
|
405
|
+
if (!t || t === e) break;
|
|
406
|
+
t = t.nextSibling;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
function L(e, t, n, r, i) {
|
|
410
|
+
for (let a of r) {
|
|
411
|
+
let r = !1;
|
|
412
|
+
try {
|
|
413
|
+
r = a.intersectsNode(n);
|
|
414
|
+
} catch {}
|
|
415
|
+
if (r) for (let r of I(n)) {
|
|
416
|
+
let n = r.data, o, s;
|
|
417
|
+
if (a.startContainer === r) o = a.startOffset;
|
|
418
|
+
else try {
|
|
419
|
+
o = a.comparePoint(r, 0) === 0 ? 0 : null;
|
|
420
|
+
} catch {
|
|
421
|
+
o = null;
|
|
422
|
+
}
|
|
423
|
+
if (a.endContainer === r) s = a.endOffset;
|
|
424
|
+
else try {
|
|
425
|
+
s = a.comparePoint(r, n.length) === 0 ? n.length : null;
|
|
426
|
+
} catch {
|
|
427
|
+
s = null;
|
|
428
|
+
}
|
|
429
|
+
if (o === null || s === null || s <= o) continue;
|
|
430
|
+
let c = i - t;
|
|
431
|
+
if (c <= 0) return t;
|
|
432
|
+
let l = n.slice(Math.max(0, o), Math.min(n.length, s, Math.max(0, o) + c));
|
|
433
|
+
if (e.push(l), t += l.length, t >= i) return t;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
return t;
|
|
437
|
+
}
|
|
438
|
+
function R(e, t, n, r = {}) {
|
|
439
|
+
if (!t || t.isCollapsed || t.rangeCount === 0) return null;
|
|
440
|
+
let i = [...e.matches?.("[data-ooxml-selection-surface]") ? [e] : [], ...e.querySelectorAll("[data-ooxml-selection-surface]")];
|
|
441
|
+
if (i.length === 0) return null;
|
|
442
|
+
let a = (e) => i.some((t) => t.contains(e)), o = [];
|
|
443
|
+
for (let n = 0; n < t.rangeCount; n++) {
|
|
444
|
+
let r = t.getRangeAt(n);
|
|
445
|
+
if (!e.contains(r.startContainer) || !e.contains(r.endContainer) || !a(r.startContainer) || !a(r.endContainer)) return null;
|
|
446
|
+
o.push(r);
|
|
447
|
+
}
|
|
448
|
+
let s = F(r.maxChars, N, "maxTextCharacters"), c = F(r.maxLocators, P, "maxRunLocators"), l = [], u = !1, d = s + 2, f = [], p = 0;
|
|
449
|
+
for (let t of e.querySelectorAll("[data-ooxml-selection-run]")) {
|
|
450
|
+
if (!o.some((e) => {
|
|
451
|
+
try {
|
|
452
|
+
return e.intersectsNode(t);
|
|
453
|
+
} catch {
|
|
454
|
+
return !1;
|
|
455
|
+
}
|
|
456
|
+
})) continue;
|
|
457
|
+
let e = n(t);
|
|
458
|
+
if (e !== null && (l.length >= c ? u = !0 : l.push(structuredClone(e)), p < d && (p = L(f, p, t, o, d)), u && p >= d)) break;
|
|
459
|
+
}
|
|
460
|
+
if (l.length === 0 && !u) return null;
|
|
461
|
+
let m = f.join("");
|
|
462
|
+
if (m.length === 0) return null;
|
|
463
|
+
let h = k(m, s), g = m.length > s;
|
|
464
|
+
return {
|
|
465
|
+
text: h,
|
|
466
|
+
locators: l,
|
|
467
|
+
truncated: g || u,
|
|
468
|
+
truncationReasons: [...g ? ["text"] : [], ...u ? ["runs"] : []],
|
|
469
|
+
textCharacters: h.length,
|
|
470
|
+
maxTextCharacters: s,
|
|
471
|
+
maxLocators: c
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
var z = class {
|
|
475
|
+
canvas;
|
|
476
|
+
options;
|
|
477
|
+
wrapper;
|
|
478
|
+
originalParent;
|
|
479
|
+
originalNextSibling;
|
|
480
|
+
originalDisplay;
|
|
481
|
+
originalStyle;
|
|
482
|
+
originalWidth;
|
|
483
|
+
originalHeight;
|
|
484
|
+
restored = !1;
|
|
485
|
+
constructor(e, t) {
|
|
486
|
+
this.canvas = e, this.options = t, this.originalParent = e.parentNode, this.originalNextSibling = e.nextSibling, this.originalDisplay = e.style.display, this.originalStyle = t.restoreMode === "style-and-bitmap" ? e.getAttribute("style") : null, this.originalWidth = e.width, this.originalHeight = e.height;
|
|
487
|
+
let n = e.ownerDocument ?? document;
|
|
488
|
+
this.wrapper = n.createElement("div"), this.wrapper.style.cssText = t.wrapperCssText, t.forceDisplayBlock && !e.style.display && (e.style.display = "block"), this.originalParent && this.originalParent.insertBefore(this.wrapper, e), this.wrapper.appendChild(e);
|
|
489
|
+
}
|
|
490
|
+
restore() {
|
|
491
|
+
if (!this.restored) {
|
|
492
|
+
if (this.restored = !0, this.originalParent) {
|
|
493
|
+
let e = this.originalNextSibling?.parentNode === this.originalParent ? this.originalNextSibling : null;
|
|
494
|
+
this.originalParent.insertBefore(this.canvas, e);
|
|
495
|
+
} else this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas);
|
|
496
|
+
(this.options.restoreMode ?? "display") === "style-and-bitmap" ? (this.originalStyle === null ? this.canvas.removeAttribute("style") : this.canvas.setAttribute("style", this.originalStyle), this.canvas.width = this.originalWidth, this.canvas.height = this.originalHeight) : this.canvas.style.display = this.originalDisplay, this.wrapper.remove();
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}, B = "position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none;user-select:text;-webkit-user-select:text;", V = "position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none;", H = "position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none;";
|
|
500
|
+
function U(e, t) {
|
|
501
|
+
if (!t) return null;
|
|
502
|
+
let n = (e.ownerDocument ?? document).createElement("div");
|
|
503
|
+
return n.setAttribute("data-overlay", "element"), n.style.cssText = H, e.appendChild(n), n;
|
|
504
|
+
}
|
|
505
|
+
function W(e, t) {
|
|
506
|
+
if (!e || (e.innerHTML = "", !t || !Number.isFinite(t.x) || !Number.isFinite(t.y) || !Number.isFinite(t.width) || !Number.isFinite(t.height) || t.width <= 0 || t.height <= 0)) return;
|
|
507
|
+
let n = (e.ownerDocument ?? document).createElement("div"), r = Number.isFinite(t.rotation) ? t.rotation ?? 0 : 0;
|
|
508
|
+
n.style.cssText = `position:absolute;left:${t.x * 100}%;top:${t.y * 100}%;width:${t.width * 100}%;height:${t.height * 100}%;box-sizing:border-box;border:2px solid #1a73e8;background:color-mix(in srgb, #1a73e8 6%, transparent);transform:rotate(${r}deg);transform-origin:center;pointer-events:none;`, e.appendChild(n);
|
|
509
|
+
}
|
|
510
|
+
var G = class {
|
|
511
|
+
textLayer;
|
|
512
|
+
highlightLayer;
|
|
513
|
+
elementLayer;
|
|
514
|
+
constructor(e, t, n = !1) {
|
|
515
|
+
let r = e.ownerDocument ?? document;
|
|
516
|
+
this.textLayer = t ? r.createElement("div") : null, this.textLayer && (this.textLayer.setAttribute("data-overlay", "text"), this.textLayer.style.cssText = B, e.appendChild(this.textLayer)), this.highlightLayer = r.createElement("div"), this.highlightLayer.setAttribute("data-overlay", "highlight"), this.highlightLayer.style.cssText = V, e.appendChild(this.highlightLayer), this.elementLayer = U(e, n);
|
|
517
|
+
}
|
|
518
|
+
}, K = class {
|
|
519
|
+
message;
|
|
520
|
+
layer;
|
|
521
|
+
status;
|
|
522
|
+
constructor(e, t) {
|
|
523
|
+
this.message = t;
|
|
524
|
+
let n = e.ownerDocument ?? document;
|
|
525
|
+
this.layer = n.createElement("div"), this.layer.style.cssText = "position:absolute;inset:0;display:none;align-items:center;justify-content:center;background:rgba(255,255,255,0.72);pointer-events:none;z-index:4;", this.layer.setAttribute("aria-hidden", "true"), e.appendChild(this.layer), this.status = n.createElement("div"), this.status.setAttribute("role", "status"), this.status.setAttribute("aria-live", "polite"), this.status.setAttribute("aria-atomic", "true"), this.status.style.cssText = "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;pointer-events:none;user-select:none;-webkit-user-select:none;", e.appendChild(this.status);
|
|
526
|
+
}
|
|
527
|
+
setLoading(e) {
|
|
528
|
+
this.layer.style.display = e ? "flex" : "none";
|
|
529
|
+
let t = e ? this.message : "";
|
|
530
|
+
this.status.textContent !== t && (this.status.textContent = t);
|
|
531
|
+
}
|
|
532
|
+
};
|
|
533
|
+
function q(e, t, n) {
|
|
534
|
+
if (n && t !== void 0 && t !== n.mode) throw Error(`${e}: opts.mode='${t}' conflicts with the borrowed engine's mode='${n.mode}'. Omit opts.mode when borrowing an engine — the engine owns its render mode.`);
|
|
535
|
+
return n?.mode ?? t ?? "main";
|
|
536
|
+
}
|
|
537
|
+
var J = class {
|
|
538
|
+
ownerName;
|
|
539
|
+
generation = 0;
|
|
540
|
+
resource;
|
|
541
|
+
ownsResource;
|
|
542
|
+
closed = !1;
|
|
543
|
+
constructor(e, t = null, n = !1) {
|
|
544
|
+
this.ownerName = e, this.resource = t, this.ownsResource = t !== null && n;
|
|
545
|
+
}
|
|
546
|
+
get current() {
|
|
547
|
+
return this.resource;
|
|
548
|
+
}
|
|
549
|
+
async replace(e, t) {
|
|
550
|
+
this.assertOpen();
|
|
551
|
+
let n = ++this.generation, r;
|
|
552
|
+
try {
|
|
553
|
+
r = await e();
|
|
554
|
+
} catch (e) {
|
|
555
|
+
if (this.closed) throw this.closedError();
|
|
556
|
+
if (n !== this.generation) return null;
|
|
557
|
+
throw e;
|
|
558
|
+
}
|
|
559
|
+
if (this.closed) throw this.dispose(r), this.closedError();
|
|
560
|
+
if (n !== this.generation) return this.dispose(r), null;
|
|
561
|
+
try {
|
|
562
|
+
t?.(this.resource);
|
|
563
|
+
} catch (e) {
|
|
564
|
+
throw this.dispose(r), e;
|
|
565
|
+
}
|
|
566
|
+
return this.install(r, !0), r;
|
|
567
|
+
}
|
|
568
|
+
install(e, t = !0) {
|
|
569
|
+
this.assertOpen(), this.generation++;
|
|
570
|
+
let n = this.resource, r = this.ownsResource;
|
|
571
|
+
this.resource = e, this.ownsResource = t, r && n && this.dispose(n);
|
|
572
|
+
}
|
|
573
|
+
close() {
|
|
574
|
+
if (this.closed) return;
|
|
575
|
+
this.closed = !0, this.generation++;
|
|
576
|
+
let e = this.resource, t = this.ownsResource;
|
|
577
|
+
this.resource = null, this.ownsResource = !1, t && e && this.dispose(e);
|
|
578
|
+
}
|
|
579
|
+
assertOpen() {
|
|
580
|
+
if (this.closed) throw this.closedError();
|
|
581
|
+
}
|
|
582
|
+
closedError() {
|
|
583
|
+
return /* @__PURE__ */ Error(`${this.ownerName} is closed`);
|
|
584
|
+
}
|
|
585
|
+
dispose(e) {
|
|
586
|
+
try {
|
|
587
|
+
e.destroy();
|
|
588
|
+
} catch {}
|
|
589
|
+
}
|
|
590
|
+
}, Y = class {
|
|
591
|
+
canvas;
|
|
592
|
+
generation = 0;
|
|
593
|
+
destroyed = !1;
|
|
594
|
+
bitmapContext;
|
|
595
|
+
constructor(e, t) {
|
|
596
|
+
this.canvas = e, this.bitmapContext = t ? e.getContext("bitmaprenderer") : null;
|
|
597
|
+
}
|
|
598
|
+
begin() {
|
|
599
|
+
return ++this.generation;
|
|
600
|
+
}
|
|
601
|
+
isCurrent(e) {
|
|
602
|
+
return !this.destroyed && e === this.generation;
|
|
603
|
+
}
|
|
604
|
+
commitBitmap(e, t, n = {}) {
|
|
605
|
+
if (!this.isCurrent(e)) return t.close(), !1;
|
|
606
|
+
if (!this.bitmapContext) throw t.close(), Error("bitmaprenderer context not available");
|
|
607
|
+
this.canvas.width !== t.width && (this.canvas.width = t.width), this.canvas.height !== t.height && (this.canvas.height = t.height), n.cssWidth !== void 0 && (this.canvas.style.width = `${n.cssWidth}px`), n.cssHeight !== void 0 && (this.canvas.style.height = `${n.cssHeight}px`);
|
|
608
|
+
try {
|
|
609
|
+
this.bitmapContext.transferFromImageBitmap(t);
|
|
610
|
+
} catch (e) {
|
|
611
|
+
throw t.close(), e;
|
|
612
|
+
}
|
|
613
|
+
return !0;
|
|
614
|
+
}
|
|
615
|
+
commitBitmapTo2d(e, t, n = {}) {
|
|
616
|
+
if (!this.isCurrent(e)) return t.close(), !1;
|
|
617
|
+
this.canvas.width !== t.width && (this.canvas.width = t.width), this.canvas.height !== t.height && (this.canvas.height = t.height), n.cssWidth !== void 0 && (this.canvas.style.width = `${n.cssWidth}px`), n.cssHeight !== void 0 && (this.canvas.style.height = `${n.cssHeight}px`);
|
|
618
|
+
let r = this.canvas.getContext("2d");
|
|
619
|
+
if (!r) throw t.close(), Error("2D context not available");
|
|
620
|
+
try {
|
|
621
|
+
r.drawImage(t, 0, 0);
|
|
622
|
+
} finally {
|
|
623
|
+
t.close();
|
|
624
|
+
}
|
|
625
|
+
return !0;
|
|
626
|
+
}
|
|
627
|
+
destroy() {
|
|
628
|
+
this.destroyed || (this.destroyed = !0, this.generation++);
|
|
629
|
+
}
|
|
630
|
+
}, X = class {
|
|
631
|
+
viewerName;
|
|
632
|
+
onError;
|
|
633
|
+
closed = !1;
|
|
634
|
+
handled = /* @__PURE__ */ new WeakSet();
|
|
635
|
+
backgroundLifecycleOwners = 0;
|
|
636
|
+
constructor(e, t) {
|
|
637
|
+
this.viewerName = e, this.onError = t;
|
|
638
|
+
}
|
|
639
|
+
report(e) {
|
|
640
|
+
if (this.closed) return;
|
|
641
|
+
let t = e instanceof Error ? e : Error(String(e));
|
|
642
|
+
this.handled.has(t) || (this.handled.add(t), this.onError ? this.onError(t) : console.error(`[ooxml] ${this.viewerName} render failed:`, t));
|
|
643
|
+
}
|
|
644
|
+
markHandled(e) {
|
|
645
|
+
this.closed || !(e instanceof Error) || this.handled.add(e);
|
|
646
|
+
}
|
|
647
|
+
async ownAwaitable(e) {
|
|
648
|
+
try {
|
|
649
|
+
return await e();
|
|
650
|
+
} catch (e) {
|
|
651
|
+
throw this.markHandled(e), e;
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
async ownBackgroundLifecycle(e) {
|
|
655
|
+
this.backgroundLifecycleOwners++;
|
|
656
|
+
try {
|
|
657
|
+
return await this.ownAwaitable(e);
|
|
658
|
+
} finally {
|
|
659
|
+
this.backgroundLifecycleOwners--;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
reportBackground(e, t = !1) {
|
|
663
|
+
let n = e instanceof Error ? e : Error(String(e));
|
|
664
|
+
if (t || this.backgroundLifecycleOwners > 0) {
|
|
665
|
+
this.markHandled(n);
|
|
666
|
+
return;
|
|
667
|
+
}
|
|
668
|
+
this.report(n);
|
|
669
|
+
}
|
|
670
|
+
close() {
|
|
671
|
+
this.closed = !0;
|
|
672
|
+
}
|
|
673
|
+
};
|
|
674
|
+
//#endregion
|
|
675
|
+
export { m as C, r as D, a as E, h as S, o as T, E as _, Y as a, v as b, R as c, A as d, M as f, C as g, O as h, X as i, W as l, D as m, K as n, J as o, k as p, G as r, U as s, z as t, q as u, b as v, c as w, y as x, x as y };
|