@sheetxl/io-xlsx 0.8.0-beta.14 → 0.8.0-beta.16
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/LICENSE.md +8 -7
- package/browser/esm/BQaNticMfvf7-y0L.mjs +2474 -0
- package/browser/esm/{DbygDdjktfjoU4DI.mjs → BalqIL4s8nR3NbK8.mjs} +2528 -1702
- package/browser/esm/{Bs0IJqyry5ZycCBU.mjs → BiueQ3eVPDOEdEeL.mjs} +1321 -1087
- package/browser/esm/{CIRY1QIACITHu_lA.mjs → BtLo1V0gnJ3ktOw9.mjs} +2 -2
- package/browser/esm/{QuYxg3ec6kN-djPF.mjs → C3H8HKjSun-wLDrE.mjs} +5 -5
- package/browser/esm/{DN7ig6HovGU5gMbr.mjs → CCGqD5BzdZMq2pTI.mjs} +2 -2
- package/browser/esm/{BjkdoGjLpkKUlK5q.mjs → DT-3sV5qGuHTFmnB.mjs} +3295 -2163
- package/browser/esm/{DiNNY0EgHikWbrDz.mjs → W3dYk6brWDUtMZca.mjs} +3 -3
- package/browser/esm/{DAYdoS9sLmYf8kzD.mjs → X5YJn8ZwrgDKMwwO.mjs} +3 -3
- package/browser/esm/{Cs4lg7bxClbTkldF.mjs → ekV6d7YNDF6FkKLw.mjs} +423 -318
- package/browser/esm/{DKWU_JYjVmtOzTGr.mjs → idgOmd_zpVTKLyek.mjs} +3 -3
- package/browser/esm/index.mjs +3 -3
- package/node/esm/{TPq4Re0SQgONsX_u.mjs → BO8o53Yo-gLFNELS.mjs} +3 -3
- package/node/esm/{CvcAx132Yp5uUDUB.mjs → BT0HKieizRDqDegH.mjs} +440 -330
- package/node/esm/BmIrpH_719z1aqvw.mjs +2562 -0
- package/node/esm/CJYMs5EGkLOZKyF0.mjs +4676 -0
- package/node/esm/{H9egT6kWCw8RAf76.mjs → CZsPzV1CsMPKiICx.mjs} +2 -2
- package/node/esm/CdFqKswnjeM_u8-g.mjs +7242 -0
- package/node/esm/CnYiZh1EVKY4BNVs.mjs +6851 -0
- package/node/esm/{CkenuXqno-ffP331.mjs → OO5K_WYvAj-UV14K.mjs} +3 -3
- package/node/esm/index.mjs +5 -5
- package/package.json +4 -4
- package/types/src/AutoFilterRules.d.ts +26 -4
- package/types/src/OOXMLExtensions.d.ts +12 -1
- package/types/src/pivot/PivotArea.d.ts +20 -0
- package/types/src/pivot/PivotCacheRead.d.ts +30 -0
- package/types/src/pivot/PivotCacheWrite.d.ts +23 -0
- package/types/src/pivot/PivotFilters.d.ts +29 -0
- package/types/src/pivot/PivotFormats.d.ts +60 -0
- package/types/src/pivot/PivotTableRead.d.ts +44 -0
- package/types/src/pivot/PivotTableWrite.d.ts +13 -0
- package/types/src/pivot/_PivotCacheXml.d.ts +48 -0
- package/types/src/pivot/_PivotTableXml.d.ts +23 -0
- package/types/src/reader/PivotButtons.d.ts +14 -0
- package/types/src/reader/PivotCellFormats.d.ts +22 -0
- package/types/src/reader/SlicerJoin.d.ts +6 -4
- package/types/src/reader/_SlicerRecord.d.ts +22 -0
- package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +5 -0
- package/types/src/reader/domVisitors/SlicerCacheDefinitionVisitor.d.ts +6 -2
- package/types/src/reader/domVisitors/SlicersVisitor.d.ts +2 -0
- package/types/src/reader/domVisitors/TimelinesVisitor.d.ts +13 -0
- package/types/src/reader/domVisitors/index.d.ts +2 -0
- package/types/src/writer/EvaluationSheet.d.ts +5 -0
- package/types/src/writer/builder/Types.d.ts +13 -0
- package/types/src/writer/emitters/PivotTableEmitter.d.ts +30 -1
- package/types/src/writer/emitters/SlicerEmitter.d.ts +81 -18
- package/types/src/writer/emitters/StylesEmitter.d.ts +32 -1
- package/types/src/writer/emitters/WorkbookEmitter.d.ts +19 -2
- package/types/src/writer/utils/DateSystem.d.ts +6 -0
- package/types/src/writer/utils/XfVariants.d.ts +61 -0
- package/browser/esm/Bomb4K5f16UyiyED.mjs +0 -2265
- package/node/esm/BCSJ_kqVLXkZlYh3.mjs +0 -5693
- package/node/esm/BCXSNXHvNQ9JQMLE.mjs +0 -6367
- package/node/esm/BycDf9HTtfpzL-zt.mjs +0 -2346
- package/node/esm/CTdvEKRTM-W1L1KU.mjs +0 -4437
- package/types/src/writer/utils/HiddenFormulaXfs.d.ts +0 -28
|
@@ -1,48 +1,124 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.16
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License:
|
|
5
|
+
* License: SheetXL EULA — https://www.sheetxl.com/eula
|
|
6
6
|
*/
|
|
7
|
-
import { n as e, r as t } from "./
|
|
8
|
-
import { $n as n,
|
|
9
|
-
import { BufferUtils as
|
|
10
|
-
import { AddressUtils as
|
|
11
|
-
var
|
|
7
|
+
import { n as e, r as t } from "./BtLo1V0gnJ3ktOw9.mjs";
|
|
8
|
+
import { $n as n, An as r, At as i, C as a, Dn as o, Dt as s, E as c, Er as l, Fn as u, Gn as d, Ir as f, Jn as p, Kn as m, Lr as h, Lt as g, Mn as _, Mr as v, Mt as y, On as b, Q as ee, Qn as te, Qt as x, Rt as ne, T as re, Tn as ie, Tt as ae, Un as oe, Vn as se, Wn as ce, Xn as le, Xt as S, Yn as C, Yt as ue, Zt as de, _ as fe, _t as pe, an as me, ar as he, cn as ge, ct as w, dt as T, er as E, et as D, f as _e, fr as ve, ft as ye, gr as O, gt as be, ht as k, it as xe, jn as Se, jr as A, jt as Ce, kr as we, lr as j, lt as M, mr as N, n as Te, nr as Ee, nt as De, o as Oe, on as ke, or as Ae, ot as je, p as Me, pn as Ne, pr as Pe, qn as P, rt as Fe, st as Ie, t as Le, tr as Re, ur as F, vt as ze, wn as Be, xr as I, yr as Ve, yt as L, zt as R } from "./DT-3sV5qGuHTFmnB.mjs";
|
|
9
|
+
import { BufferUtils as He, CommonUtils as z, ExpectedError as Ue, OverlappingRange as We, RangeAxis as B } from "@sheetxl/utils";
|
|
10
|
+
import { AddressUtils as V, BufferUtils as H, CommonUtils as Ge, CoordUtils as Ke, FormulaError as qe, FormulaText as Je, FunctionDeclarations as Ye, ICellStyle as Xe, ICondition as Ze, IConditionalFormat as Qe, ICustomProperty as U, IFont as $e, IRange as et, ITextFrame as tt, NumberFormat as nt, OutOfBoundsError as rt, PersonCollection as it, ResourceCollection as at, RichDataRegistry as ot, Scalar as st, Sort as ct, Theme as lt, Tuple as ut, Workbook as dt, pivotCellFormatsOf as ft } from "@sheetxl/sdk";
|
|
11
|
+
var pt = {
|
|
12
12
|
ascending: "ascending",
|
|
13
13
|
descending: "descending",
|
|
14
14
|
natural: "dataSource"
|
|
15
15
|
};
|
|
16
|
-
function
|
|
16
|
+
function mt(e, t) {
|
|
17
|
+
let n = e.sheets ?? [], r = /* @__PURE__ */ new Map();
|
|
18
|
+
for (let e = 0; e < n.length; e++) {
|
|
19
|
+
let t = n[e], i = l(t)?.tables ?? [];
|
|
20
|
+
for (let e = 0; e < i.length; e++) {
|
|
21
|
+
let t = i[e], n = Array.isArray(t) ? t[1] : t?.v;
|
|
22
|
+
if (!n?.id) continue;
|
|
23
|
+
let a = (n.columns ?? []).map((e) => typeof e == "string" ? { name: e } : e);
|
|
24
|
+
r.set(String(n.id), {
|
|
25
|
+
name: n.name ?? "",
|
|
26
|
+
columns: a
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
let i = /* @__PURE__ */ new Map();
|
|
31
|
+
for (let e = 0; e < n.length; e++) {
|
|
32
|
+
let t = n[e];
|
|
33
|
+
t?.sheetId !== void 0 && t.name && i.set(String(t.sheetId), t.name);
|
|
34
|
+
}
|
|
35
|
+
let a = function(e) {
|
|
36
|
+
let t = /* @__PURE__ */ new Map(), n = e.pivotCaches ?? [];
|
|
37
|
+
for (let e = 0; e < n.length; e++) {
|
|
38
|
+
let r = n[e].part?.xml, i = r ? /<(?:\w+:)?pivotCacheDefinition\b[^>]*?\spivotCacheId="(\d+)"[^>]*\/?>\s*<\/(?:\w+:)?ext>/.exec(r)?.[1] : void 0;
|
|
39
|
+
i !== void 0 && t.set(i, n[e].cacheId);
|
|
40
|
+
}
|
|
41
|
+
return t;
|
|
42
|
+
}(e), o = /* @__PURE__ */ new Map();
|
|
43
|
+
for (let e = 0; e < n.length; e++) {
|
|
44
|
+
let t = l(n[e])?.pivotTables ?? [];
|
|
45
|
+
for (let r = 0; r < t.length; r++) o.set(`${n[e].name}\0${t[r].name}`, t[r]);
|
|
46
|
+
}
|
|
47
|
+
let s = new Set((e.pivotCaches ?? []).flatMap((e) => e.fields ? [e.cacheId] : [])), c = /* @__PURE__ */ new Set();
|
|
48
|
+
for (let e = 0; e < n.length; e++) {
|
|
49
|
+
let u = n[e], d = l(u);
|
|
50
|
+
if (!d) continue;
|
|
51
|
+
let f = d.slicers, p = d.movables;
|
|
52
|
+
if (f && p) for (let e = p.length - 1; e >= 0; e--) {
|
|
53
|
+
let n = p[e].content;
|
|
54
|
+
if (n?.type !== "slicer" || n.json?.source) continue;
|
|
55
|
+
let l = n.name ?? "", u = f[l];
|
|
56
|
+
if (!u) continue;
|
|
57
|
+
if (!u.tableId) {
|
|
58
|
+
if (u.pivotBody === void 0) continue;
|
|
59
|
+
n.json = W(u, n.json), n.json.pivot = gt(u, i, a, o, s), c.add(l), u.cachePath && t.markAbsorbed(u.cachePath);
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
let d = r.get(String(u.tableId)), m = d ? ht(d.columns, u.columnId) : null;
|
|
63
|
+
d && m ? (n.json = W(u, n.json, Je.structuredReference(d.name, m.name)), c.add(l), u.cachePath && t.markAbsorbed(u.cachePath)) : (t.warn("A slicer names no table; it was not imported.", "xlsx.slicer.cacheDefinition"), p.splice(e, 1));
|
|
64
|
+
}
|
|
65
|
+
delete d.slicers;
|
|
66
|
+
}
|
|
67
|
+
t.slicerParts.forEach((e, n) => {
|
|
68
|
+
let r = Object.keys(e);
|
|
69
|
+
r.length > 0 && r.every((e) => c.has(e)) && t.markAbsorbed(n);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function ht(e, t) {
|
|
17
73
|
if (!t) return null;
|
|
18
74
|
for (let n = 0; n < e.length; n++) if (e[n].id !== void 0 && String(e[n].id) === t) return e[n];
|
|
19
75
|
let n = Number(t);
|
|
20
76
|
return Number.isInteger(n) && n >= 1 && n <= e.length ? e[n - 1] : null;
|
|
21
77
|
}
|
|
22
|
-
function
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
78
|
+
function gt(e, t, n, r, i) {
|
|
79
|
+
let a = [], o = e.pivotTables ?? [];
|
|
80
|
+
for (let e = 0; e < o.length; e++) {
|
|
81
|
+
let n = t.get(o[e].tabId);
|
|
82
|
+
n && a.push({
|
|
83
|
+
sheet: n,
|
|
84
|
+
name: o[e].name
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
let s = {
|
|
88
|
+
sourceName: e.sourceName ?? "",
|
|
89
|
+
tables: a,
|
|
90
|
+
body: e.pivotBody ?? ""
|
|
91
|
+
}, c = e.pivotCacheId === void 0 ? void 0 : n.get(e.pivotCacheId);
|
|
92
|
+
if (e.tabular) {
|
|
93
|
+
let t = a.length > 0 ? r.get(`${a[0].sheet}\0${a[0].name}`) : void 0;
|
|
94
|
+
c ??= t?.cacheId, t?.fields && c !== void 0 && i.has(c) ? s.tabular = !1 === e.showMissing ? { hideMissing: !0 } : {} : s.body = (e.pivotData ?? "") + s.body;
|
|
95
|
+
}
|
|
96
|
+
return c !== void 0 && (s.cacheId = c), e.timelineAttributes && (s.timeline = {
|
|
97
|
+
attributes: e.timelineAttributes,
|
|
98
|
+
body: e.timelineBody ?? ""
|
|
99
|
+
}), s;
|
|
100
|
+
}
|
|
101
|
+
function W(e, t, n) {
|
|
102
|
+
let r = { ...t };
|
|
103
|
+
if (n !== void 0 && (r.source = n), e.caption !== void 0 && e.caption !== e.sourceName && (r.caption = e.caption), !1 === e.showCaption && (r.hiddenCaption = !0), e.columnCount !== void 0 && e.columnCount > 1 && (r.columnCount = e.columnCount), e.rowHeight !== void 0) {
|
|
28
104
|
let t = Math.round(e.rowHeight / 9525);
|
|
29
105
|
t > 0 && t !== 27 && (r.rowHeight = t);
|
|
30
106
|
}
|
|
31
107
|
e.style && e.style !== "SlicerStyleLight1" && (r.style = e.style);
|
|
32
|
-
let i = e.sortOrder ?
|
|
108
|
+
let i = e.sortOrder ? pt[e.sortOrder] : void 0;
|
|
33
109
|
return i && i !== "ascending" && (r.sortOrder = i), e.crossFilter && e.crossFilter !== "showItemsWithDataAtTop" && (r.crossFilter = e.crossFilter), e.lockedPosition && (r.lockedPosition = !0), !1 === e.customListSort && (r.disabledCustomListSort = !0), e.cacheName && (r.cacheName = e.cacheName), e.startItem && (r.startItem = e.startItem), e.level !== void 0 && (r.level = e.level), e.uid && (r.uid = e.uid), r;
|
|
34
110
|
}
|
|
35
|
-
var
|
|
111
|
+
var _t = "xl/richData/rdrichvaluestructure.xml", vt = "xl/richData/rdrichvalue.xml", yt = "xl/richData/rdarray.xml", bt = "xl/richData/rdsupportingpropertybagstructure.xml", xt = "xl/richData/rdsupportingpropertybag.xml", St = "xl/richData/rdRichValueTypes.xml", Ct = "xl/richData/richStyles.xml", G = (e, t) => {
|
|
36
112
|
let n = [], r = e?.childNodes, i = r?.length ?? 0;
|
|
37
113
|
for (let e = 0; e < i; e++) {
|
|
38
114
|
let i = r.item(e);
|
|
39
115
|
i.nodeType !== 1 || t && i.localName !== t || n.push(i);
|
|
40
116
|
}
|
|
41
117
|
return n;
|
|
42
|
-
},
|
|
118
|
+
}, wt = (e) => G(e, "k").map((e) => [e.getAttribute("n") ?? "", e.getAttribute("t") || null]), Tt = (e) => G(e, "v").map((e) => ({
|
|
43
119
|
t: e.getAttribute("t") || null,
|
|
44
120
|
text: e.textContent ?? ""
|
|
45
|
-
})),
|
|
121
|
+
})), Et = (e) => {
|
|
46
122
|
let t = /* @__PURE__ */ new Map();
|
|
47
123
|
for (let n of G(e, "key")) {
|
|
48
124
|
let e = /* @__PURE__ */ new Map();
|
|
@@ -50,7 +126,7 @@ var at = "xl/richData/rdrichvaluestructure.xml", ot = "xl/richData/rdrichvalue.x
|
|
|
50
126
|
t.set(n.getAttribute("name") ?? "", e);
|
|
51
127
|
}
|
|
52
128
|
return t;
|
|
53
|
-
},
|
|
129
|
+
}, Dt = /* @__PURE__ */ new Uint8Array(), Ot = class e {
|
|
54
130
|
constructor(e, t, n) {
|
|
55
131
|
this.buffers = /* @__PURE__ */ new Map(), this.zip = e, this.entries = t, this.rawBuffer = n;
|
|
56
132
|
}
|
|
@@ -58,9 +134,9 @@ var at = "xl/richData/rdrichvaluestructure.xml", ot = "xl/richData/rdrichvalue.x
|
|
|
58
134
|
return e.startsWith("/") ? e.slice(1) : e;
|
|
59
135
|
}
|
|
60
136
|
static async create(t) {
|
|
61
|
-
let
|
|
62
|
-
for (let e of await
|
|
63
|
-
return new e(
|
|
137
|
+
let n = t instanceof Blob ? Dt : t instanceof Uint8Array ? t : new Uint8Array(t), r = t instanceof Blob ? new v(t) : new f(n), i = new A(r), a = /* @__PURE__ */ new Map();
|
|
138
|
+
for (let e of await i.getEntries()) e.directory || a.set(e.filename, e);
|
|
139
|
+
return new e(i, a, n);
|
|
64
140
|
}
|
|
65
141
|
getNames() {
|
|
66
142
|
return [...this.entries.keys()];
|
|
@@ -76,12 +152,12 @@ var at = "xl/richData/rdrichvaluestructure.xml", ot = "xl/richData/rdrichvalue.x
|
|
|
76
152
|
if (r) return r;
|
|
77
153
|
let i = this.entries.get(n);
|
|
78
154
|
if (!i) return null;
|
|
79
|
-
let a = await i.getData(new
|
|
155
|
+
let a = await i.getData(new h());
|
|
80
156
|
return this.buffers.set(n, a), a;
|
|
81
157
|
}
|
|
82
158
|
async prefetch(e) {
|
|
83
159
|
let t = [];
|
|
84
|
-
for (let [n, r] of this.entries) !this.buffers.has(n) && e(n, r) && t.push(r.getData(new
|
|
160
|
+
for (let [n, r] of this.entries) !this.buffers.has(n) && e(n, r) && t.push(r.getData(new h()).then((e) => {
|
|
85
161
|
this.buffers.set(n, e);
|
|
86
162
|
}));
|
|
87
163
|
await Promise.all(t);
|
|
@@ -124,18 +200,18 @@ var at = "xl/richData/rdrichvaluestructure.xml", ot = "xl/richData/rdrichvalue.x
|
|
|
124
200
|
async close() {
|
|
125
201
|
await this.zip.close();
|
|
126
202
|
}
|
|
127
|
-
},
|
|
203
|
+
}, kt = class {
|
|
128
204
|
constructor(e) {
|
|
129
|
-
this._sink = e, this._samples = [], this._t0 =
|
|
205
|
+
this._sink = e, this._samples = [], this._t0 = At(), this._tPrev = this._t0, this._heapPrev = jt();
|
|
130
206
|
}
|
|
131
207
|
mark(e) {
|
|
132
|
-
let t =
|
|
208
|
+
let t = At(), n = jt(), r = {
|
|
133
209
|
label: e,
|
|
134
210
|
tMs: t - this._t0,
|
|
135
211
|
dtMs: t - this._tPrev,
|
|
136
212
|
heapBytes: n,
|
|
137
213
|
dHeapBytes: n !== void 0 && this._heapPrev !== void 0 ? n - this._heapPrev : void 0,
|
|
138
|
-
rssBytes:
|
|
214
|
+
rssBytes: Mt()
|
|
139
215
|
};
|
|
140
216
|
this._tPrev = t, this._heapPrev = n, this._samples.push(r), this._sink?.(r);
|
|
141
217
|
}
|
|
@@ -147,91 +223,91 @@ var at = "xl/richData/rdrichvaluestructure.xml", ot = "xl/richData/rdrichvalue.x
|
|
|
147
223
|
phase: e.label,
|
|
148
224
|
tMs: Math.round(e.tMs),
|
|
149
225
|
dtMs: Math.round(e.dtMs),
|
|
150
|
-
heapMB: e.heapBytes === void 0 ? "—" :
|
|
151
|
-
dHeapMB: e.dHeapBytes === void 0 ? "—" :
|
|
152
|
-
rssMB: e.rssBytes === void 0 ? "—" :
|
|
226
|
+
heapMB: e.heapBytes === void 0 ? "—" : Nt(e.heapBytes / 1048576),
|
|
227
|
+
dHeapMB: e.dHeapBytes === void 0 ? "—" : Nt(e.dHeapBytes / 1048576),
|
|
228
|
+
rssMB: e.rssBytes === void 0 ? "—" : Nt(e.rssBytes / 1048576)
|
|
153
229
|
}));
|
|
154
230
|
}
|
|
155
|
-
},
|
|
156
|
-
function
|
|
231
|
+
}, At = typeof performance == "object" && typeof performance.now == "function" ? () => performance.now() : () => Date.now();
|
|
232
|
+
function jt() {
|
|
157
233
|
let e = typeof performance == "object" ? performance.memory : void 0;
|
|
158
234
|
if (e && typeof e.usedJSHeapSize == "number") return e.usedJSHeapSize;
|
|
159
235
|
let t = globalThis.process;
|
|
160
236
|
return typeof t == "object" && typeof t.memoryUsage == "function" ? t.memoryUsage().heapUsed : void 0;
|
|
161
237
|
}
|
|
162
|
-
function
|
|
238
|
+
function Mt() {
|
|
163
239
|
let e = globalThis.process;
|
|
164
240
|
if (typeof e == "object" && typeof e.memoryUsage == "function") return e.memoryUsage().rss;
|
|
165
241
|
}
|
|
166
|
-
function
|
|
242
|
+
function Nt(e) {
|
|
167
243
|
return Math.round(10 * e) / 10;
|
|
168
244
|
}
|
|
169
|
-
var
|
|
245
|
+
var Pt = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Ft = `-${Pt}.0-9·̀-ͯ‿-⁀`, It = (RegExp(`^[${Pt}]$`, "u"), RegExp(`^[${Ft}]$`, "u"), RegExp(`^[${Pt}][${Ft}]*$`, "u")), Lt = (RegExp(`^[${Ft}]+$`, "u"), [
|
|
170
246
|
32,
|
|
171
247
|
10,
|
|
172
248
|
13,
|
|
173
249
|
9
|
|
174
250
|
]);
|
|
175
|
-
function
|
|
251
|
+
function Rt(e) {
|
|
176
252
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122 || e === 58 || e === 95 || e === 8204 || e === 8205 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 767 || e >= 880 && e <= 893 || e >= 895 && e <= 8191 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
|
|
177
253
|
}
|
|
178
|
-
var
|
|
179
|
-
RegExp(`^[${
|
|
180
|
-
var
|
|
181
|
-
function
|
|
254
|
+
var zt = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Bt = `-${zt}.0-9·̀-ͯ‿-⁀`;
|
|
255
|
+
RegExp(`^[${zt}]$`, "u"), RegExp(`^[${Bt}]$`, "u"), RegExp(`^[${zt}][${Bt}]*$`, "u"), RegExp(`^[${Bt}]+$`, "u");
|
|
256
|
+
var Vt = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Ht = `-${Vt}.0-9·̀-ͯ‿-⁀`, Ut = (RegExp(`^[${Vt}]$`, "u"), RegExp(`^[${Ht}]$`, "u"), RegExp(`^[${Vt}][${Ht}]*$`, "u"));
|
|
257
|
+
function Wt(e) {
|
|
182
258
|
return e >= 65 && e <= 90 || e === 95 || e >= 97 && e <= 122 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 767 || e >= 880 && e <= 893 || e >= 895 && e <= 8191 || e >= 8204 && e <= 8205 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
|
|
183
259
|
}
|
|
184
|
-
var
|
|
260
|
+
var K = function(e) {
|
|
185
261
|
return e === 32 || e === 10 || e === 13 || e === 9;
|
|
186
|
-
},
|
|
262
|
+
}, Gt = function(e) {
|
|
187
263
|
return e >= 32 && e <= 55295 || e === 10 || e === 13 || e === 9 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
188
|
-
},
|
|
189
|
-
return
|
|
190
|
-
},
|
|
264
|
+
}, Kt = Rt, qt = function(e) {
|
|
265
|
+
return Rt(e) || e >= 48 && e <= 57 || e === 45 || e === 46 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
266
|
+
}, Jt = Lt, Yt = It, Xt = function(e) {
|
|
191
267
|
return e >= 1 && e <= 55295 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
192
|
-
},
|
|
193
|
-
return
|
|
194
|
-
},
|
|
268
|
+
}, Zt = Wt, Qt = function(e) {
|
|
269
|
+
return Wt(e) || e === 45 || e === 46 || e >= 48 && e <= 57 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
270
|
+
}, $t = Ut, en = "http://www.w3.org/XML/1998/namespace", tn = "http://www.w3.org/2000/xmlns/", nn = {
|
|
195
271
|
__proto__: null,
|
|
196
|
-
xml:
|
|
197
|
-
xmlns:
|
|
198
|
-
},
|
|
272
|
+
xml: en,
|
|
273
|
+
xmlns: tn
|
|
274
|
+
}, rn = {
|
|
199
275
|
__proto__: null,
|
|
200
276
|
amp: "&",
|
|
201
277
|
gt: ">",
|
|
202
278
|
lt: "<",
|
|
203
279
|
quot: "\"",
|
|
204
280
|
apos: "'"
|
|
205
|
-
}, q = -1,
|
|
206
|
-
|
|
281
|
+
}, q = -1, an = -2, J = 13, on = 33, sn = 10, cn = 60, ln = 61, Y = 62, X = 63, un = 93, dn = (e) => e === 34 || e === 39, fn = [34, 39], pn = [
|
|
282
|
+
...fn,
|
|
207
283
|
91,
|
|
208
284
|
Y
|
|
209
|
-
],
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
],
|
|
214
|
-
|
|
285
|
+
], mn = [
|
|
286
|
+
...fn,
|
|
287
|
+
cn,
|
|
288
|
+
un
|
|
289
|
+
], hn = [
|
|
290
|
+
ln,
|
|
215
291
|
X,
|
|
216
|
-
...
|
|
217
|
-
],
|
|
218
|
-
...
|
|
292
|
+
...Jt
|
|
293
|
+
], gn = [
|
|
294
|
+
...Jt,
|
|
219
295
|
Y,
|
|
220
296
|
38,
|
|
221
|
-
|
|
297
|
+
cn
|
|
222
298
|
];
|
|
223
|
-
function
|
|
299
|
+
function _n(e, t, n) {
|
|
224
300
|
switch (t) {
|
|
225
301
|
case "xml":
|
|
226
|
-
n !==
|
|
302
|
+
n !== en && e.fail(`xml prefix must be bound to ${en}.`);
|
|
227
303
|
break;
|
|
228
|
-
case "xmlns": n !==
|
|
304
|
+
case "xmlns": n !== tn && e.fail(`xmlns prefix must be bound to ${tn}.`);
|
|
229
305
|
}
|
|
230
306
|
switch (n) {
|
|
231
|
-
case
|
|
232
|
-
e.fail(t === "" ? `the default namespace may not be set to ${n}.` : `may not assign a prefix (even "xmlns") to the URI ${
|
|
307
|
+
case tn:
|
|
308
|
+
e.fail(t === "" ? `the default namespace may not be set to ${n}.` : `may not assign a prefix (even "xmlns") to the URI ${tn}.`);
|
|
233
309
|
break;
|
|
234
|
-
case
|
|
310
|
+
case en: switch (t) {
|
|
235
311
|
case "xml": break;
|
|
236
312
|
case "":
|
|
237
313
|
e.fail(`the default namespace may not be set to ${n}.`);
|
|
@@ -240,7 +316,7 @@ function an(e, t, n) {
|
|
|
240
316
|
}
|
|
241
317
|
}
|
|
242
318
|
}
|
|
243
|
-
var
|
|
319
|
+
var vn, yn = (e) => $t.test(e), bn = (e) => Yt.test(e), xn = {
|
|
244
320
|
xmldecl: "xmlDeclHandler",
|
|
245
321
|
text: "textHandler",
|
|
246
322
|
processinginstruction: "piHandler",
|
|
@@ -254,7 +330,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
254
330
|
error: "errorHandler",
|
|
255
331
|
end: "endHandler",
|
|
256
332
|
ready: "readyHandler"
|
|
257
|
-
},
|
|
333
|
+
}, Sn = class {
|
|
258
334
|
get closed() {
|
|
259
335
|
return this._closed;
|
|
260
336
|
}
|
|
@@ -262,15 +338,15 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
262
338
|
this.i = 0, this.prevI = 0, this.opt = e ?? {}, this.fragmentOpt = !!this.opt.fragment;
|
|
263
339
|
let t = this.xmlnsOpt = !!this.opt.xmlns;
|
|
264
340
|
if (this.trackPosition = !1 !== this.opt.position, this.fileName = this.opt.fileName, t) {
|
|
265
|
-
this.nameStartCheck =
|
|
341
|
+
this.nameStartCheck = Zt, this.nameCheck = Qt, this.isName = yn, this.processAttribs = this.processAttribsNS, this.pushAttrib = this.pushAttribNS, this.ns = {
|
|
266
342
|
__proto__: null,
|
|
267
|
-
...
|
|
343
|
+
...nn
|
|
268
344
|
};
|
|
269
345
|
let e = this.opt.additionalNamespaces;
|
|
270
346
|
e != null && (function(e, t) {
|
|
271
|
-
for (let n of Object.keys(t))
|
|
347
|
+
for (let n of Object.keys(t)) _n(e, n, t[n]);
|
|
272
348
|
}(this, e), Object.assign(this.ns, e));
|
|
273
|
-
} else this.nameStartCheck =
|
|
349
|
+
} else this.nameStartCheck = Kt, this.nameCheck = qt, this.isName = bn, this.processAttribs = this.processAttribsPlain, this.pushAttrib = this.pushAttribPlain;
|
|
274
350
|
this.stateTable = [
|
|
275
351
|
this.sBegin,
|
|
276
352
|
this.sBeginWhitespace,
|
|
@@ -332,7 +408,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
332
408
|
version: void 0,
|
|
333
409
|
encoding: void 0,
|
|
334
410
|
standalone: void 0
|
|
335
|
-
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(
|
|
411
|
+
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(rn), this.readyHandler?.();
|
|
336
412
|
}
|
|
337
413
|
get position() {
|
|
338
414
|
return this.chunkPosition + this.i;
|
|
@@ -341,10 +417,10 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
341
417
|
return this.position - this.positionAtNewLine;
|
|
342
418
|
}
|
|
343
419
|
on(e, t) {
|
|
344
|
-
this[
|
|
420
|
+
this[xn[e]] = t;
|
|
345
421
|
}
|
|
346
422
|
off(e) {
|
|
347
|
-
this[
|
|
423
|
+
this[xn[e]] = void 0;
|
|
348
424
|
}
|
|
349
425
|
makeError(e) {
|
|
350
426
|
let t = this.fileName ?? "";
|
|
@@ -375,8 +451,8 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
375
451
|
if (this.column++, n < 55296) {
|
|
376
452
|
if (n >= 32 || n === 9) return n;
|
|
377
453
|
switch (n) {
|
|
378
|
-
case
|
|
379
|
-
case 13: return e.charCodeAt(t + 1) ===
|
|
454
|
+
case sn: return this.line++, this.column = 0, this.positionAtNewLine = this.position, sn;
|
|
455
|
+
case 13: return e.charCodeAt(t + 1) === sn && (this.i = t + 2), this.line++, this.column = 0, this.positionAtNewLine = this.position, an;
|
|
380
456
|
default: return this.fail("disallowed character."), n;
|
|
381
457
|
}
|
|
382
458
|
}
|
|
@@ -391,13 +467,13 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
391
467
|
if (this.column++, n < 55296) {
|
|
392
468
|
if (n > 31 && n < 127 || n > 159 && n !== 8232 || n === 9) return n;
|
|
393
469
|
switch (n) {
|
|
394
|
-
case
|
|
470
|
+
case sn: return this.line++, this.column = 0, this.positionAtNewLine = this.position, sn;
|
|
395
471
|
case 13: {
|
|
396
472
|
let n = e.charCodeAt(t + 1);
|
|
397
|
-
n !==
|
|
473
|
+
n !== sn && n !== 133 || (this.i = t + 2);
|
|
398
474
|
}
|
|
399
475
|
case 133:
|
|
400
|
-
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position,
|
|
476
|
+
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position, an;
|
|
401
477
|
default: return this.fail("disallowed character."), n;
|
|
402
478
|
}
|
|
403
479
|
}
|
|
@@ -407,7 +483,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
407
483
|
}
|
|
408
484
|
getCodeNorm() {
|
|
409
485
|
let e = this.getCode();
|
|
410
|
-
return e ===
|
|
486
|
+
return e === an ? sn : e;
|
|
411
487
|
}
|
|
412
488
|
unGet() {
|
|
413
489
|
this.i = this.prevI, this.column--;
|
|
@@ -415,7 +491,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
415
491
|
captureTo(e) {
|
|
416
492
|
let { i: t } = this, { chunk: n } = this;
|
|
417
493
|
for (;;) {
|
|
418
|
-
let r = this.getCode(), i = r ===
|
|
494
|
+
let r = this.getCode(), i = r === an, a = i ? sn : r;
|
|
419
495
|
if (a === q || e.includes(a)) return this.text += n.slice(t, this.prevI), a;
|
|
420
496
|
i && (this.text += `${n.slice(t, this.prevI)}\n`, t = this.i);
|
|
421
497
|
}
|
|
@@ -425,8 +501,8 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
425
501
|
for (;;) {
|
|
426
502
|
let r = this.getCode();
|
|
427
503
|
switch (r) {
|
|
428
|
-
case
|
|
429
|
-
this.text += `${n.slice(t, this.prevI)}\n`, t = this.i, r =
|
|
504
|
+
case an:
|
|
505
|
+
this.text += `${n.slice(t, this.prevI)}\n`, t = this.i, r = sn;
|
|
430
506
|
break;
|
|
431
507
|
case q: return this.text += n.slice(t), !1;
|
|
432
508
|
}
|
|
@@ -438,17 +514,17 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
438
514
|
for (;;) {
|
|
439
515
|
let n = this.getCode();
|
|
440
516
|
if (n === q) return this.name += e.slice(t), q;
|
|
441
|
-
if (!
|
|
517
|
+
if (!qt(n)) return this.name += e.slice(t, this.prevI), n === an ? sn : n;
|
|
442
518
|
}
|
|
443
519
|
}
|
|
444
520
|
skipSpaces() {
|
|
445
521
|
for (;;) {
|
|
446
522
|
let e = this.getCodeNorm();
|
|
447
|
-
if (e === q || !
|
|
523
|
+
if (e === q || !K(e)) return e;
|
|
448
524
|
}
|
|
449
525
|
}
|
|
450
526
|
setXMLVersion(e) {
|
|
451
|
-
this.currentXMLVersion = e, e === "1.0" ? (this.isChar =
|
|
527
|
+
this.currentXMLVersion = e, e === "1.0" ? (this.isChar = Gt, this.getCode = this.getCode10) : (this.isChar = Xt, this.getCode = this.getCode11);
|
|
452
528
|
}
|
|
453
529
|
sBegin() {
|
|
454
530
|
this.chunk.charCodeAt(0) === 65279 && (this.i++, this.column++), this.state = 1;
|
|
@@ -456,7 +532,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
456
532
|
sBeginWhitespace() {
|
|
457
533
|
let e = this.i, t = this.skipSpaces();
|
|
458
534
|
switch (this.prevI !== e && (this.xmlDeclPossible = !1), t) {
|
|
459
|
-
case
|
|
535
|
+
case cn:
|
|
460
536
|
if (this.state = 15, this.text.length !== 0) throw Error("no-empty text at start");
|
|
461
537
|
break;
|
|
462
538
|
case q: break;
|
|
@@ -464,13 +540,13 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
464
540
|
}
|
|
465
541
|
}
|
|
466
542
|
sDoctype() {
|
|
467
|
-
let e = this.captureTo(
|
|
543
|
+
let e = this.captureTo(pn);
|
|
468
544
|
switch (e) {
|
|
469
545
|
case Y:
|
|
470
546
|
this.doctypeHandler?.(this.text), this.text = "", this.state = J, this.doctype = !0;
|
|
471
547
|
break;
|
|
472
548
|
case q: break;
|
|
473
|
-
default: this.text += String.fromCodePoint(e), e === 91 ? this.state = 4 :
|
|
549
|
+
default: this.text += String.fromCodePoint(e), e === 91 ? this.state = 4 : dn(e) && (this.state = 3, this.q = e);
|
|
474
550
|
}
|
|
475
551
|
}
|
|
476
552
|
sDoctypeQuote() {
|
|
@@ -478,8 +554,8 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
478
554
|
this.captureToChar(e) && (this.text += String.fromCodePoint(e), this.q = null, this.state = 2);
|
|
479
555
|
}
|
|
480
556
|
sDTD() {
|
|
481
|
-
let e = this.captureTo(
|
|
482
|
-
e !== q && (this.text += String.fromCodePoint(e), e ===
|
|
557
|
+
let e = this.captureTo(mn);
|
|
558
|
+
e !== q && (this.text += String.fromCodePoint(e), e === un ? this.state = 2 : e === cn ? this.state = 6 : dn(e) && (this.state = 5, this.q = e));
|
|
483
559
|
}
|
|
484
560
|
sDTDQuoted() {
|
|
485
561
|
let e = this.q;
|
|
@@ -525,7 +601,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
525
601
|
sEntity() {
|
|
526
602
|
let { i: e } = this, { chunk: t } = this;
|
|
527
603
|
t: for (;;) switch (this.getCode()) {
|
|
528
|
-
case
|
|
604
|
+
case an:
|
|
529
605
|
this.entity += `${t.slice(e, this.prevI)}\n`, e = this.i;
|
|
530
606
|
break;
|
|
531
607
|
case 59: {
|
|
@@ -540,7 +616,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
540
616
|
}
|
|
541
617
|
sOpenWaka() {
|
|
542
618
|
let e = this.getCode();
|
|
543
|
-
if (
|
|
619
|
+
if (Kt(e)) this.state = 34, this.unGet(), this.xmlDeclPossible = !1;
|
|
544
620
|
else switch (e) {
|
|
545
621
|
case 47:
|
|
546
622
|
this.state = 43, this.xmlDeclPossible = !1;
|
|
@@ -580,11 +656,11 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
580
656
|
e === Y ? this.state = J : (this.fail("malformed comment."), this.text += `--${String.fromCodePoint(e)}`, this.state = 17);
|
|
581
657
|
}
|
|
582
658
|
sCData() {
|
|
583
|
-
this.captureToChar(
|
|
659
|
+
this.captureToChar(un) && (this.state = 21);
|
|
584
660
|
}
|
|
585
661
|
sCDataEnding() {
|
|
586
662
|
let e = this.getCodeNorm();
|
|
587
|
-
e ===
|
|
663
|
+
e === un ? this.state = 22 : (this.text += `]${String.fromCodePoint(e)}`, this.state = 20);
|
|
588
664
|
}
|
|
589
665
|
sCDataEnding2() {
|
|
590
666
|
let e = this.getCodeNorm();
|
|
@@ -592,7 +668,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
592
668
|
case Y:
|
|
593
669
|
this.cdataHandler?.(this.text), this.text = "", this.state = J;
|
|
594
670
|
break;
|
|
595
|
-
case
|
|
671
|
+
case un:
|
|
596
672
|
this.text += "]";
|
|
597
673
|
break;
|
|
598
674
|
default: this.text += `]]${String.fromCodePoint(e)}`, this.state = 20;
|
|
@@ -600,7 +676,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
600
676
|
}
|
|
601
677
|
sPIFirstChar() {
|
|
602
678
|
let e = this.getCodeNorm();
|
|
603
|
-
this.nameStartCheck(e) ? (this.piTarget += String.fromCodePoint(e), this.state = 24) : e === X ||
|
|
679
|
+
this.nameStartCheck(e) ? (this.piTarget += String.fromCodePoint(e), this.state = 24) : e === X || K(e) ? (this.fail("processing instruction without a target."), this.state = e === X ? 26 : 25) : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(e), this.state = 24);
|
|
604
680
|
}
|
|
605
681
|
sPIRest() {
|
|
606
682
|
let { chunk: e, i: t } = this;
|
|
@@ -610,7 +686,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
610
686
|
if (!this.nameCheck(n)) {
|
|
611
687
|
this.piTarget += e.slice(t, this.prevI);
|
|
612
688
|
let r = n === X;
|
|
613
|
-
r ||
|
|
689
|
+
r || K(n) ? this.piTarget === "xml" ? (this.xmlDeclPossible || this.fail("an XML declaration must be at the start of the document."), this.state = r ? on : 27) : this.state = r ? 26 : 25 : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(n));
|
|
614
690
|
break;
|
|
615
691
|
}
|
|
616
692
|
}
|
|
@@ -618,7 +694,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
618
694
|
sPIBody() {
|
|
619
695
|
if (this.text.length === 0) {
|
|
620
696
|
let e = this.getCodeNorm();
|
|
621
|
-
e === X ? this.state = 26 :
|
|
697
|
+
e === X ? this.state = 26 : K(e) || (this.text = String.fromCodePoint(e));
|
|
622
698
|
} else this.captureToChar(X) && (this.state = 26);
|
|
623
699
|
}
|
|
624
700
|
sPIEnding() {
|
|
@@ -634,12 +710,12 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
634
710
|
}
|
|
635
711
|
sXMLDeclNameStart() {
|
|
636
712
|
let e = this.skipSpaces();
|
|
637
|
-
e === X ? this.state =
|
|
713
|
+
e === X ? this.state = on : e !== q && (this.state = 28, this.name = String.fromCodePoint(e));
|
|
638
714
|
}
|
|
639
715
|
sXMLDeclName() {
|
|
640
|
-
let e = this.captureTo(
|
|
641
|
-
if (e === X) return this.state =
|
|
642
|
-
if (
|
|
716
|
+
let e = this.captureTo(hn);
|
|
717
|
+
if (e === X) return this.state = on, this.name += this.text, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
718
|
+
if (K(e) || e === ln) {
|
|
643
719
|
if (this.name += this.text, this.text = "", !this.xmlDeclExpects.includes(this.name)) switch (this.name.length) {
|
|
644
720
|
case 0:
|
|
645
721
|
this.fail("did not expect any more name/value pairs.");
|
|
@@ -649,22 +725,22 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
649
725
|
break;
|
|
650
726
|
default: this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`);
|
|
651
727
|
}
|
|
652
|
-
this.state = e ===
|
|
728
|
+
this.state = e === ln ? 30 : 29;
|
|
653
729
|
}
|
|
654
730
|
}
|
|
655
731
|
sXMLDeclEq() {
|
|
656
732
|
let e = this.getCodeNorm();
|
|
657
|
-
if (e === X) return this.state =
|
|
658
|
-
|
|
733
|
+
if (e === X) return this.state = on, void this.fail("XML declaration is incomplete.");
|
|
734
|
+
K(e) || (e !== ln && this.fail("value required."), this.state = 30);
|
|
659
735
|
}
|
|
660
736
|
sXMLDeclValueStart() {
|
|
661
737
|
let e = this.getCodeNorm();
|
|
662
|
-
if (e === X) return this.state =
|
|
663
|
-
|
|
738
|
+
if (e === X) return this.state = on, void this.fail("XML declaration is incomplete.");
|
|
739
|
+
K(e) || (dn(e) ? this.q = e : (this.fail("value must be quoted."), this.q = 32), this.state = 31);
|
|
664
740
|
}
|
|
665
741
|
sXMLDeclValue() {
|
|
666
742
|
let e = this.captureTo([this.q, X]);
|
|
667
|
-
if (e === X) return this.state =
|
|
743
|
+
if (e === X) return this.state = on, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
668
744
|
if (e === q) return;
|
|
669
745
|
let t = this.text;
|
|
670
746
|
switch (this.text = "", this.name) {
|
|
@@ -683,7 +759,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
683
759
|
}
|
|
684
760
|
sXMLDeclSeparator() {
|
|
685
761
|
let e = this.getCodeNorm();
|
|
686
|
-
e === X ? this.state =
|
|
762
|
+
e === X ? this.state = on : (K(e) || (this.fail("whitespace required."), this.unGet()), this.state = 27);
|
|
687
763
|
}
|
|
688
764
|
sXMLDeclEnding() {
|
|
689
765
|
this.getCodeNorm() === Y ? (this.piTarget === "xml" ? this.name !== "version" && this.xmlDeclExpects.includes("version") && this.fail("XML declaration must contain a version.") : this.fail("processing instructions are not allowed before root."), this.xmlDeclHandler?.(this.xmlDecl), this.name = "", this.piTarget = this.text = "", this.state = J) : this.fail("The character ? is disallowed anywhere in XML declarations."), this.xmlDeclPossible = !1;
|
|
@@ -702,7 +778,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
702
778
|
case 47:
|
|
703
779
|
this.state = 35;
|
|
704
780
|
break;
|
|
705
|
-
default:
|
|
781
|
+
default: K(e) || this.fail("disallowed character in tag name."), this.state = 36;
|
|
706
782
|
}
|
|
707
783
|
}
|
|
708
784
|
sOpenTagSlash() {
|
|
@@ -710,25 +786,25 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
710
786
|
}
|
|
711
787
|
sAttrib() {
|
|
712
788
|
let e = this.skipSpaces();
|
|
713
|
-
e !== q && (
|
|
789
|
+
e !== q && (Kt(e) ? (this.unGet(), this.state = 37) : e === Y ? this.openTag() : e === 47 ? this.state = 35 : this.fail("disallowed character in attribute name."));
|
|
714
790
|
}
|
|
715
791
|
sAttribName() {
|
|
716
792
|
let e = this.captureNameChars();
|
|
717
|
-
e ===
|
|
793
|
+
e === ln ? this.state = 39 : K(e) ? this.state = 38 : e === Y ? (this.fail("attribute without value."), this.pushAttrib(this.name, this.name), this.name = this.text = "", this.openTag()) : e !== q && this.fail("disallowed character in attribute name.");
|
|
718
794
|
}
|
|
719
795
|
sAttribNameSawWhite() {
|
|
720
796
|
let e = this.skipSpaces();
|
|
721
797
|
switch (e) {
|
|
722
798
|
case q: return;
|
|
723
|
-
case
|
|
799
|
+
case ln:
|
|
724
800
|
this.state = 39;
|
|
725
801
|
break;
|
|
726
|
-
default: this.fail("attribute without value."), this.text = "", this.name = "", e === Y ? this.openTag() :
|
|
802
|
+
default: this.fail("attribute without value."), this.text = "", this.name = "", e === Y ? this.openTag() : Kt(e) ? (this.unGet(), this.state = 37) : (this.fail("disallowed character in attribute name."), this.state = 36);
|
|
727
803
|
}
|
|
728
804
|
}
|
|
729
805
|
sAttribValue() {
|
|
730
806
|
let e = this.getCodeNorm();
|
|
731
|
-
|
|
807
|
+
dn(e) ? (this.q = e, this.state = 40) : K(e) || (this.fail("unquoted attribute value."), this.state = 42, this.unGet());
|
|
732
808
|
}
|
|
733
809
|
sAttribValueQuoted() {
|
|
734
810
|
let { q: e, chunk: t } = this, { i: n } = this;
|
|
@@ -739,12 +815,12 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
739
815
|
case 38:
|
|
740
816
|
this.text += t.slice(n, this.prevI), this.state = 14, this.entityReturnState = 40;
|
|
741
817
|
return;
|
|
742
|
-
case
|
|
743
|
-
case
|
|
818
|
+
case sn:
|
|
819
|
+
case an:
|
|
744
820
|
case 9:
|
|
745
821
|
this.text += `${t.slice(n, this.prevI)} `, n = this.i;
|
|
746
822
|
break;
|
|
747
|
-
case
|
|
823
|
+
case cn:
|
|
748
824
|
this.text += t.slice(n, this.prevI), this.fail("disallowed character.");
|
|
749
825
|
return;
|
|
750
826
|
case q:
|
|
@@ -754,15 +830,15 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
754
830
|
}
|
|
755
831
|
sAttribValueClosed() {
|
|
756
832
|
let e = this.getCodeNorm();
|
|
757
|
-
|
|
833
|
+
K(e) ? this.state = 36 : e === Y ? this.openTag() : e === 47 ? this.state = 35 : Kt(e) ? (this.fail("no whitespace between attributes."), this.unGet(), this.state = 37) : this.fail("disallowed character in attribute name.");
|
|
758
834
|
}
|
|
759
835
|
sAttribValueUnquoted() {
|
|
760
|
-
let e = this.captureTo(
|
|
836
|
+
let e = this.captureTo(gn);
|
|
761
837
|
switch (e) {
|
|
762
838
|
case 38:
|
|
763
839
|
this.state = 14, this.entityReturnState = 42;
|
|
764
840
|
break;
|
|
765
|
-
case
|
|
841
|
+
case cn:
|
|
766
842
|
this.fail("disallowed character.");
|
|
767
843
|
break;
|
|
768
844
|
case q: break;
|
|
@@ -771,7 +847,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
771
847
|
}
|
|
772
848
|
sCloseTag() {
|
|
773
849
|
let e = this.captureNameChars();
|
|
774
|
-
e === Y ? this.closeTag() :
|
|
850
|
+
e === Y ? this.closeTag() : K(e) ? this.state = 44 : e !== q && this.fail("disallowed character in closing tag.");
|
|
775
851
|
}
|
|
776
852
|
sCloseTagSawWhite() {
|
|
777
853
|
switch (this.skipSpaces()) {
|
|
@@ -785,7 +861,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
785
861
|
handleTextInRoot() {
|
|
786
862
|
let { i: e, forbiddenState: t } = this, { chunk: n, textHandler: r } = this;
|
|
787
863
|
t: for (;;) switch (this.getCode()) {
|
|
788
|
-
case
|
|
864
|
+
case cn:
|
|
789
865
|
if (this.state = 15, r !== void 0) {
|
|
790
866
|
let { text: t } = this, i = n.slice(e, this.prevI);
|
|
791
867
|
t.length === 0 ? i.length !== 0 && r(i) : (r(t + i), this.text = "");
|
|
@@ -795,7 +871,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
795
871
|
case 38:
|
|
796
872
|
this.state = 14, this.entityReturnState = J, r !== void 0 && (this.text += n.slice(e, this.prevI)), t = 0;
|
|
797
873
|
break t;
|
|
798
|
-
case
|
|
874
|
+
case un:
|
|
799
875
|
switch (t) {
|
|
800
876
|
case 0:
|
|
801
877
|
t = 1;
|
|
@@ -810,7 +886,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
810
886
|
case Y:
|
|
811
887
|
t === 2 && this.fail("the string \"]]>\" is disallowed in char data."), t = 0;
|
|
812
888
|
break;
|
|
813
|
-
case
|
|
889
|
+
case an:
|
|
814
890
|
r !== void 0 && (this.text += `${n.slice(e, this.prevI)}\n`), e = this.i, t = 0;
|
|
815
891
|
break;
|
|
816
892
|
case q:
|
|
@@ -825,7 +901,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
825
901
|
t: for (;;) {
|
|
826
902
|
let i = this.getCode();
|
|
827
903
|
switch (i) {
|
|
828
|
-
case
|
|
904
|
+
case cn:
|
|
829
905
|
if (this.state = 15, n !== void 0) {
|
|
830
906
|
let { text: r } = this, i = t.slice(e, this.prevI);
|
|
831
907
|
r.length === 0 ? i.length !== 0 && n(i) : (n(r + i), this.text = "");
|
|
@@ -834,13 +910,13 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
834
910
|
case 38:
|
|
835
911
|
this.state = 14, this.entityReturnState = J, n !== void 0 && (this.text += t.slice(e, this.prevI)), r = !0;
|
|
836
912
|
break t;
|
|
837
|
-
case
|
|
913
|
+
case an:
|
|
838
914
|
n !== void 0 && (this.text += `${t.slice(e, this.prevI)}\n`), e = this.i;
|
|
839
915
|
break;
|
|
840
916
|
case q:
|
|
841
917
|
n !== void 0 && (this.text += t.slice(e));
|
|
842
918
|
break t;
|
|
843
|
-
default:
|
|
919
|
+
default: K(i) || (r = !0);
|
|
844
920
|
}
|
|
845
921
|
}
|
|
846
922
|
r && (this.sawRoot || this.reportedTextBeforeRoot || (this.fail("text data outside of root node."), this.reportedTextBeforeRoot = !0), this.closedRoot && !this.reportedTextAfterRoot && (this.fail("text data outside of root node."), this.reportedTextAfterRoot = !0));
|
|
@@ -854,10 +930,10 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
854
930
|
};
|
|
855
931
|
if (this.attribList.push(i), this.attributeHandler?.(i), n === "xmlns") {
|
|
856
932
|
let e = t.trim();
|
|
857
|
-
this.currentXMLVersion === "1.0" && e === "" && this.fail("invalid attempt to undefine prefix in XML 1.0"), this.topNS[r] = e,
|
|
933
|
+
this.currentXMLVersion === "1.0" && e === "" && this.fail("invalid attempt to undefine prefix in XML 1.0"), this.topNS[r] = e, _n(this, r, e);
|
|
858
934
|
} else if (e === "xmlns") {
|
|
859
935
|
let e = t.trim();
|
|
860
|
-
this.topNS[""] = e,
|
|
936
|
+
this.topNS[""] = e, _n(this, "", e);
|
|
861
937
|
}
|
|
862
938
|
}
|
|
863
939
|
pushAttribPlain(e, t) {
|
|
@@ -909,7 +985,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
909
985
|
let { attributes: n } = t, r = /* @__PURE__ */ new Set();
|
|
910
986
|
for (let t of e) {
|
|
911
987
|
let { name: e, prefix: i, local: a } = t, o, s;
|
|
912
|
-
i === "" ? (o = e === "xmlns" ?
|
|
988
|
+
i === "" ? (o = e === "xmlns" ? tn : "", s = e) : (o = this.resolve(i), o === void 0 && (this.fail(`unbound namespace prefix: ${JSON.stringify(i)}.`), o = i), s = `{${o}}${a}`), r.has(s) && this.fail(`duplicate attribute: ${s}.`), r.add(s), t.uri = o, n[e] = t;
|
|
913
989
|
}
|
|
914
990
|
this.attribList = [];
|
|
915
991
|
}
|
|
@@ -947,21 +1023,21 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
947
1023
|
let t = NaN;
|
|
948
1024
|
return e[1] === "x" && /^#x[0-9a-f]+$/i.test(e) ? t = parseInt(e.slice(2), 16) : /^#[0-9]+$/.test(e) && (t = parseInt(e.slice(1), 10)), this.isChar(t) ? String.fromCodePoint(t) : (this.fail("malformed character entity."), `&${e};`);
|
|
949
1025
|
}
|
|
950
|
-
},
|
|
1026
|
+
}, Cn = /&(#x[0-9a-fA-F]+|#[0-9]+|amp|lt|gt|quot|apos);/g, wn = {
|
|
951
1027
|
amp: "&",
|
|
952
1028
|
lt: "<",
|
|
953
1029
|
gt: ">",
|
|
954
1030
|
quot: "\"",
|
|
955
1031
|
apos: "'"
|
|
956
|
-
},
|
|
957
|
-
let n =
|
|
1032
|
+
}, Tn = (e, t) => {
|
|
1033
|
+
let n = wn[t];
|
|
958
1034
|
if (n !== void 0) return n;
|
|
959
1035
|
let r = t.charCodeAt(1) === 120 ? parseInt(t.slice(2), 16) : parseInt(t.slice(1), 10);
|
|
960
1036
|
return r > 0 && r <= 1114111 ? String.fromCodePoint(r) : e;
|
|
961
|
-
},
|
|
1037
|
+
}, En = (e) => {
|
|
962
1038
|
let t = e;
|
|
963
|
-
return t.indexOf("\r") !== -1 && (t = t.replace(/\r\n?/g, "\n")), t.indexOf("&") !== -1 && (t = t.replace(
|
|
964
|
-
},
|
|
1039
|
+
return t.indexOf("\r") !== -1 && (t = t.replace(/\r\n?/g, "\n")), t.indexOf("&") !== -1 && (t = t.replace(Cn, Tn)), t;
|
|
1040
|
+
}, Dn = (e) => {
|
|
965
1041
|
let t = e, n = t.length;
|
|
966
1042
|
for (let e = 0; e < n; e++) {
|
|
967
1043
|
let n = t.charCodeAt(e);
|
|
@@ -970,8 +1046,8 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
970
1046
|
break;
|
|
971
1047
|
}
|
|
972
1048
|
}
|
|
973
|
-
return t.indexOf("&") !== -1 && (t = t.replace(
|
|
974
|
-
},
|
|
1049
|
+
return t.indexOf("&") !== -1 && (t = t.replace(Cn, Tn)), t;
|
|
1050
|
+
}, On = (e) => e === 32 || e === 9 || e === 10 || e === 13, kn = class e {
|
|
975
1051
|
constructor() {
|
|
976
1052
|
this._openTagHandler = void 0, this._closeTagHandler = void 0, this._textHandler = void 0, this._cdataHandler = void 0, this._errorHandler = void 0, this._endHandler = void 0, this._scanners = null, this._carry = "", this._text = "", this._tags = [], this._sawRoot = !1, this._closed = !1;
|
|
977
1053
|
}
|
|
@@ -982,7 +1058,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
982
1058
|
this.NOT_HANDLED = -2;
|
|
983
1059
|
}
|
|
984
1060
|
static decodeText(e) {
|
|
985
|
-
return
|
|
1061
|
+
return En(e);
|
|
986
1062
|
}
|
|
987
1063
|
on(e, t) {
|
|
988
1064
|
switch (e) {
|
|
@@ -1048,7 +1124,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
1048
1124
|
if (e.length === 0) return;
|
|
1049
1125
|
this._text = "";
|
|
1050
1126
|
let t = this._textHandler;
|
|
1051
|
-
t !== void 0 && this._tags.length !== 0 && t(
|
|
1127
|
+
t !== void 0 && this._tags.length !== 0 && t(En(e));
|
|
1052
1128
|
}
|
|
1053
1129
|
_markup(t, n, r) {
|
|
1054
1130
|
if (n + 1 >= r) return -1;
|
|
@@ -1087,7 +1163,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
1087
1163
|
let i = n + 1 + o.name.length;
|
|
1088
1164
|
if (i >= r) return -1;
|
|
1089
1165
|
let a = t.charCodeAt(i);
|
|
1090
|
-
if (a === 62 || a === 47 ||
|
|
1166
|
+
if (a === 62 || a === 47 || On(a)) {
|
|
1091
1167
|
this._flushText();
|
|
1092
1168
|
let i = o.scan(t, n, r);
|
|
1093
1169
|
if (i !== e.NOT_HANDLED) {
|
|
@@ -1105,11 +1181,11 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
1105
1181
|
}
|
|
1106
1182
|
_openTag(e, t, n) {
|
|
1107
1183
|
let r = t + 1, i = 0;
|
|
1108
|
-
for (; r < n && (i = e.charCodeAt(r), i !== 62 && i !== 47 && !
|
|
1184
|
+
for (; r < n && (i = e.charCodeAt(r), i !== 62 && i !== 47 && !On(i));) r++;
|
|
1109
1185
|
if (r >= n) return -1;
|
|
1110
1186
|
let a = e.slice(t + 1, r), o = {}, s = !1;
|
|
1111
1187
|
for (;;) {
|
|
1112
|
-
for (; r < n &&
|
|
1188
|
+
for (; r < n && On(i = e.charCodeAt(r));) r++;
|
|
1113
1189
|
if (r >= n) return -1;
|
|
1114
1190
|
if (i === 62) {
|
|
1115
1191
|
r++;
|
|
@@ -1125,16 +1201,16 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
1125
1201
|
break;
|
|
1126
1202
|
}
|
|
1127
1203
|
let t = r;
|
|
1128
|
-
for (; r < n && (i = e.charCodeAt(r), i !== 61 && i !== 62 && i !== 47 && !
|
|
1204
|
+
for (; r < n && (i = e.charCodeAt(r), i !== 61 && i !== 62 && i !== 47 && !On(i));) r++;
|
|
1129
1205
|
if (r >= n) return -1;
|
|
1130
1206
|
let a = e.slice(t, r);
|
|
1131
|
-
for (; r < n &&
|
|
1207
|
+
for (; r < n && On(i = e.charCodeAt(r));) r++;
|
|
1132
1208
|
if (r >= n) return -1;
|
|
1133
1209
|
if (i !== 61) {
|
|
1134
1210
|
this.fail("attribute without value.");
|
|
1135
1211
|
continue;
|
|
1136
1212
|
}
|
|
1137
|
-
for (r++; r < n &&
|
|
1213
|
+
for (r++; r < n && On(i = e.charCodeAt(r));) r++;
|
|
1138
1214
|
if (r >= n) return -1;
|
|
1139
1215
|
if (i !== 34 && i !== 39) {
|
|
1140
1216
|
this.fail("unquoted attribute value.");
|
|
@@ -1142,7 +1218,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
1142
1218
|
}
|
|
1143
1219
|
let c = e.indexOf(i === 34 ? "\"" : "'", r + 1);
|
|
1144
1220
|
if (c === -1) return -1;
|
|
1145
|
-
a !== "__proto__" && (o[a] =
|
|
1221
|
+
a !== "__proto__" && (o[a] = Dn(e.slice(r + 1, c))), r = c + 1;
|
|
1146
1222
|
}
|
|
1147
1223
|
this._flushText(), this._sawRoot = !0;
|
|
1148
1224
|
let c = {
|
|
@@ -1180,7 +1256,7 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
1180
1256
|
Ready: "ready"
|
|
1181
1257
|
}, e.parseStream = async (e, t, n) => {
|
|
1182
1258
|
if (n?.lean) return (async (e, t) => {
|
|
1183
|
-
let n = new
|
|
1259
|
+
let n = new kn(), r;
|
|
1184
1260
|
t.elementScanners && n.setElementScanners(t.elementScanners), t.onOpenTag && n.on("opentag", t.onOpenTag), t.onCloseTag && n.on("closetag", t.onCloseTag), t.onText && n.on("text", t.onText), t.onError && n.on("error", t.onError);
|
|
1185
1261
|
let i = t.onEnd;
|
|
1186
1262
|
for (i && n.on("end", () => {
|
|
@@ -1192,13 +1268,13 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
1192
1268
|
}
|
|
1193
1269
|
return n.close(), r;
|
|
1194
1270
|
})(e, t);
|
|
1195
|
-
let r = new
|
|
1271
|
+
let r = new Sn({
|
|
1196
1272
|
position: !1,
|
|
1197
1273
|
...n
|
|
1198
1274
|
}), i;
|
|
1199
|
-
t.onOpenTagStart && r.on(
|
|
1275
|
+
t.onOpenTagStart && r.on(vn.Events.OpenTagStart, t.onOpenTagStart), t.onOpenTag && r.on(vn.Events.OpenTag, t.onOpenTag), t.onCloseTag && r.on(vn.Events.CloseTag, t.onCloseTag), t.onAttribute && r.on(vn.Events.Attribute, t.onAttribute), t.onText && r.on(vn.Events.Text, t.onText), t.onError && r.on(vn.Events.Error, t.onError);
|
|
1200
1276
|
let a = t.onEnd;
|
|
1201
|
-
for (a && r.on(
|
|
1277
|
+
for (a && r.on(vn.Events.End, () => {
|
|
1202
1278
|
i = a();
|
|
1203
1279
|
});;) {
|
|
1204
1280
|
let { value: t, done: n } = await e.read();
|
|
@@ -1207,14 +1283,14 @@ var on, sn = (e) => Vt.test(e), cn = (e) => Lt.test(e), ln = {
|
|
|
1207
1283
|
}
|
|
1208
1284
|
return r.close(), i;
|
|
1209
1285
|
};
|
|
1210
|
-
})(
|
|
1286
|
+
})(vn ||= {});
|
|
1211
1287
|
var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e && e !== "0" && e !== "off" && e !== "false" && null, Q = (e) => {
|
|
1212
1288
|
let t = parseInt(e);
|
|
1213
1289
|
return isNaN(t) ? null : t;
|
|
1214
|
-
},
|
|
1290
|
+
}, An = (e) => {
|
|
1215
1291
|
let t = parseFloat(e);
|
|
1216
1292
|
return isNaN(t) ? null : t;
|
|
1217
|
-
}, $ = null,
|
|
1293
|
+
}, $ = null, jn = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), Mn = (e) => jn(e).replace(/"/g, """), Nn = class {
|
|
1218
1294
|
constructor() {
|
|
1219
1295
|
this._registeredVisitors = /* @__PURE__ */ new Map();
|
|
1220
1296
|
}
|
|
@@ -1276,7 +1352,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1276
1352
|
let t = e.attributes ?? {}, n = `<${e.name}`;
|
|
1277
1353
|
for (let e in t) {
|
|
1278
1354
|
let r = t[e];
|
|
1279
|
-
n += ` ${e}="${
|
|
1355
|
+
n += ` ${e}="${Mn(typeof r == "string" ? r : r?.value ?? "")}"`;
|
|
1280
1356
|
}
|
|
1281
1357
|
return n + ">";
|
|
1282
1358
|
})(e)), o = {
|
|
@@ -1325,12 +1401,12 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1325
1401
|
s = o?.local ?? null, c = o?.tag ?? null, l = o?.visitor ?? null, p = !o?.destination;
|
|
1326
1402
|
},
|
|
1327
1403
|
onText: (e) => {
|
|
1328
|
-
m ? m.push(
|
|
1404
|
+
m ? m.push(jn(e)) : l?.text?.(e, v);
|
|
1329
1405
|
},
|
|
1330
1406
|
onEnd: t
|
|
1331
1407
|
};
|
|
1332
1408
|
}
|
|
1333
|
-
},
|
|
1409
|
+
}, Pn = `IFERROR(${y}(`, Fn = Pn.toUpperCase(), In = Ce.toUpperCase(), Ln = { kind: "none" }, Rn = { kind: "spilled" }, zn = (e, t) => {
|
|
1334
1410
|
if (e.charCodeAt(t) !== 34) return null;
|
|
1335
1411
|
let n = "", r = t + 1;
|
|
1336
1412
|
for (; r < e.length;) if (e.charCodeAt(r) === 34) {
|
|
@@ -1341,12 +1417,12 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1341
1417
|
n += "\"", r += 2;
|
|
1342
1418
|
} else n += e[r], r++;
|
|
1343
1419
|
return null;
|
|
1344
|
-
},
|
|
1420
|
+
}, Bn = (e) => {
|
|
1345
1421
|
let t = [], n = 0;
|
|
1346
1422
|
for (; n < e.length;) {
|
|
1347
1423
|
let r = e.charCodeAt(n);
|
|
1348
1424
|
if (r === 34) {
|
|
1349
|
-
let t =
|
|
1425
|
+
let t = zn(e, n);
|
|
1350
1426
|
if (t === null) break;
|
|
1351
1427
|
n = t.end;
|
|
1352
1428
|
continue;
|
|
@@ -1364,14 +1440,14 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1364
1440
|
e.charCodeAt(i) === 40 && t.push(e.slice(n, i).toUpperCase().replace(/^_XLFN\./, "").replace(/^_XLWS\./, "")), n = i;
|
|
1365
1441
|
}
|
|
1366
1442
|
return t;
|
|
1367
|
-
},
|
|
1443
|
+
}, Vn = class {
|
|
1368
1444
|
constructor(e) {
|
|
1369
1445
|
this._restored = [], this._byColumn = /* @__PURE__ */ new Map(), this._isKnown = e;
|
|
1370
1446
|
}
|
|
1371
1447
|
anchor(e, t, n) {
|
|
1372
1448
|
let r = this._byColumn.get(t);
|
|
1373
1449
|
r && e === r.rowEnd + 1 && e > r.rowStart && (r.closed = !0);
|
|
1374
|
-
let i =
|
|
1450
|
+
let i = Bn(n), a = !0;
|
|
1375
1451
|
for (let e = 0; e < i.length && a; e++) a = this._isKnown(i[e]);
|
|
1376
1452
|
let o = {
|
|
1377
1453
|
rowStart: e,
|
|
@@ -1390,29 +1466,29 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1390
1466
|
return !(!r || r.rowStart !== e || r.colEnd !== t - 1) && (r.colEnd = t, this._byColumn.set(t, r), r.restored);
|
|
1391
1467
|
}
|
|
1392
1468
|
getFormulaArray() {
|
|
1393
|
-
return this._restored.map((e) => [
|
|
1469
|
+
return this._restored.map((e) => [V.rangeToString(e), "dynamic"]);
|
|
1394
1470
|
}
|
|
1395
|
-
},
|
|
1396
|
-
let t =
|
|
1471
|
+
}, Hn = /^\s*TABLE\s*\(([^()]*)\)\s*$/i, Un = /^\s*(\$?)([A-Za-z]{1,3})(\$?)(\d{1,7})\s*$/, Wn = (e) => {
|
|
1472
|
+
let t = Un.exec(e);
|
|
1397
1473
|
if (!t) return null;
|
|
1398
|
-
let n =
|
|
1474
|
+
let n = V.fastStringToCol(t[2]), r = parseInt(t[4], 10) - 1;
|
|
1399
1475
|
return n < 0 || r < 0 ? null : {
|
|
1400
1476
|
row: r,
|
|
1401
1477
|
col: n,
|
|
1402
1478
|
colAbsolute: t[1] === "$",
|
|
1403
1479
|
rowAbsolute: t[3] === "$"
|
|
1404
1480
|
};
|
|
1405
|
-
},
|
|
1481
|
+
}, Gn = (e) => V.cellToString({
|
|
1406
1482
|
rowIndex: e.row,
|
|
1407
1483
|
colIndex: e.col
|
|
1408
|
-
}),
|
|
1409
|
-
let n =
|
|
1484
|
+
}), Kn = (e, t) => {
|
|
1485
|
+
let n = Hn.exec(e);
|
|
1410
1486
|
if (!n) return null;
|
|
1411
1487
|
let r = n[1].split(",");
|
|
1412
1488
|
if (r.length !== 3 && r.length !== 5) return null;
|
|
1413
1489
|
let i = [];
|
|
1414
1490
|
for (let e = 0; e < r.length; e++) {
|
|
1415
|
-
let t =
|
|
1491
|
+
let t = Wn(r[e]);
|
|
1416
1492
|
if (!t) return null;
|
|
1417
1493
|
i.push(t);
|
|
1418
1494
|
}
|
|
@@ -1426,30 +1502,30 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1426
1502
|
let [, e, t] = i;
|
|
1427
1503
|
return s(t) && c(u) ? {
|
|
1428
1504
|
ref: l,
|
|
1429
|
-
columnInput:
|
|
1505
|
+
columnInput: Gn(e)
|
|
1430
1506
|
} : c(t) && s(u) ? {
|
|
1431
1507
|
ref: l,
|
|
1432
|
-
rowInput:
|
|
1508
|
+
rowInput: Gn(e)
|
|
1433
1509
|
} : null;
|
|
1434
1510
|
}
|
|
1435
1511
|
if (!u.rowAbsolute || !u.colAbsolute || u.row !== a - 1 || u.col !== o - 1) return null;
|
|
1436
1512
|
let [, d, f, p, m] = i;
|
|
1437
1513
|
return s(f) && c(m) ? {
|
|
1438
1514
|
ref: l,
|
|
1439
|
-
rowInput:
|
|
1440
|
-
columnInput:
|
|
1515
|
+
rowInput: Gn(p),
|
|
1516
|
+
columnInput: Gn(d)
|
|
1441
1517
|
} : c(f) && s(m) ? {
|
|
1442
1518
|
ref: l,
|
|
1443
|
-
rowInput:
|
|
1444
|
-
columnInput:
|
|
1519
|
+
rowInput: Gn(d),
|
|
1520
|
+
columnInput: Gn(p)
|
|
1445
1521
|
} : null;
|
|
1446
|
-
},
|
|
1522
|
+
}, qn = /^(?:(\d{4})-(\d{2})-(\d{2}))?T?(?:(\d{2}):(\d{2})(?::(\d{2})(\.\d+)?)?)?(?:Z|[+-]\d{2}:?\d{2})?$/, Jn = /^PT(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?$/, Yn = (e, t, n) => {
|
|
1447
1523
|
let r = Math.floor((14 - t) / 12), i = e + 4800 - r, a = t + 12 * r - 3;
|
|
1448
1524
|
return n + Math.floor((153 * a + 2) / 5) + 365 * i + Math.floor(i / 4) - Math.floor(i / 100) + Math.floor(i / 400) - 32045;
|
|
1449
|
-
},
|
|
1525
|
+
}, Xn = Yn(1899, 12, 30), Zn = (e) => {
|
|
1450
1526
|
let t = e.indexOf(":");
|
|
1451
1527
|
return t === -1 ? e : e.slice(t + 1);
|
|
1452
|
-
},
|
|
1528
|
+
}, Qn = class {
|
|
1453
1529
|
constructor() {
|
|
1454
1530
|
this._runs = null, this._text = "", this._font = null, this._inRun = !1, this._inRPr = !1;
|
|
1455
1531
|
}
|
|
@@ -1460,31 +1536,31 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1460
1536
|
e === "r" ? (this._inRun = !0, this._text = "", this._font = null, this._runs ??= []) : e === "rPr" ? this._inRun && (this._inRPr = !0) : this._inRPr && function(e, t, n) {
|
|
1461
1537
|
switch (e) {
|
|
1462
1538
|
case "b":
|
|
1463
|
-
n.weight =
|
|
1539
|
+
n.weight = tr(t) ? 700 : 400;
|
|
1464
1540
|
break;
|
|
1465
1541
|
case "i":
|
|
1466
|
-
n.style =
|
|
1542
|
+
n.style = tr(t) ? $e.Style.Italic : $e.Style.Normal;
|
|
1467
1543
|
break;
|
|
1468
1544
|
case "strike":
|
|
1469
|
-
n.strike =
|
|
1545
|
+
n.strike = ze(tr(t));
|
|
1470
1546
|
break;
|
|
1471
1547
|
case "outline":
|
|
1472
|
-
n.outline =
|
|
1548
|
+
n.outline = tr(t);
|
|
1473
1549
|
break;
|
|
1474
1550
|
case "shadow":
|
|
1475
|
-
n.shadow =
|
|
1551
|
+
n.shadow = tr(t);
|
|
1476
1552
|
break;
|
|
1477
1553
|
case "condense":
|
|
1478
1554
|
case "extend": {
|
|
1479
|
-
let r =
|
|
1555
|
+
let r = pe(e, tr(t));
|
|
1480
1556
|
r !== void 0 && (n.letterSpacing = r);
|
|
1481
1557
|
break;
|
|
1482
1558
|
}
|
|
1483
1559
|
case "u":
|
|
1484
|
-
n.underline =
|
|
1560
|
+
n.underline = L(t.val);
|
|
1485
1561
|
break;
|
|
1486
1562
|
case "vertAlign": {
|
|
1487
|
-
let e =
|
|
1563
|
+
let e = k(t.val);
|
|
1488
1564
|
e !== void 0 && (n.baseline = e);
|
|
1489
1565
|
break;
|
|
1490
1566
|
}
|
|
@@ -1499,7 +1575,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1499
1575
|
break;
|
|
1500
1576
|
}
|
|
1501
1577
|
case "family": {
|
|
1502
|
-
let e =
|
|
1578
|
+
let e = er[t.val ?? ""];
|
|
1503
1579
|
e && (n.fallbacks = [e]);
|
|
1504
1580
|
break;
|
|
1505
1581
|
}
|
|
@@ -1509,7 +1585,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1509
1585
|
break;
|
|
1510
1586
|
}
|
|
1511
1587
|
case "scheme":
|
|
1512
|
-
|
|
1588
|
+
be(n, t.val);
|
|
1513
1589
|
break;
|
|
1514
1590
|
case "color": {
|
|
1515
1591
|
let e = t.rgb;
|
|
@@ -1517,7 +1593,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1517
1593
|
n.color = "#" + (e.length === 8 ? e.substring(2) : e).toUpperCase();
|
|
1518
1594
|
break;
|
|
1519
1595
|
}
|
|
1520
|
-
let r =
|
|
1596
|
+
let r = p((e) => t[e]);
|
|
1521
1597
|
r && (n.color = r);
|
|
1522
1598
|
break;
|
|
1523
1599
|
}
|
|
@@ -1530,7 +1606,7 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1530
1606
|
onCloseTag(e) {
|
|
1531
1607
|
if (e === "rPr") this._inRPr = !1, this._font ??= {};
|
|
1532
1608
|
else if (e === "r" && this._inRun) {
|
|
1533
|
-
let e =
|
|
1609
|
+
let e = we(this._text), t = this._font;
|
|
1534
1610
|
this._runs.push(t ? {
|
|
1535
1611
|
text: e,
|
|
1536
1612
|
font: t
|
|
@@ -1544,15 +1620,15 @@ var Z = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e &
|
|
|
1544
1620
|
return null;
|
|
1545
1621
|
}
|
|
1546
1622
|
};
|
|
1547
|
-
function
|
|
1623
|
+
function $n(e, t) {
|
|
1548
1624
|
let n = {
|
|
1549
1625
|
family: "Calibri",
|
|
1550
1626
|
size: 11,
|
|
1551
1627
|
...t,
|
|
1552
1628
|
weight: 400,
|
|
1553
|
-
style:
|
|
1554
|
-
underline:
|
|
1555
|
-
strike:
|
|
1629
|
+
style: $e.Style.Normal,
|
|
1630
|
+
underline: $e.UnderlineStyle.None,
|
|
1631
|
+
strike: $e.StrikeStyle.None,
|
|
1556
1632
|
baseline: 0
|
|
1557
1633
|
}, r = Array(e.length);
|
|
1558
1634
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -1572,16 +1648,16 @@ function Vn(e, t) {
|
|
|
1572
1648
|
}
|
|
1573
1649
|
return r;
|
|
1574
1650
|
}
|
|
1575
|
-
var
|
|
1651
|
+
var er = {
|
|
1576
1652
|
1: "serif",
|
|
1577
1653
|
2: "sans-serif",
|
|
1578
1654
|
3: "monospace",
|
|
1579
1655
|
4: "cursive",
|
|
1580
1656
|
5: "fantasy"
|
|
1581
|
-
},
|
|
1657
|
+
}, tr = (e) => {
|
|
1582
1658
|
let t = e.val;
|
|
1583
1659
|
return t === void 0 || t === "1" || t === "true";
|
|
1584
|
-
},
|
|
1660
|
+
}, nr = (e) => {
|
|
1585
1661
|
let t = (t) => {
|
|
1586
1662
|
if (e) return RegExp(`<(?:[\\w.-]+:)?${t}\\b[^>]*>([^<]*)<`).exec(e)?.[1];
|
|
1587
1663
|
}, n = (e) => {
|
|
@@ -1591,19 +1667,19 @@ var Hn = {
|
|
|
1591
1667
|
return {
|
|
1592
1668
|
c: n(t("col")),
|
|
1593
1669
|
r: n(t("row")),
|
|
1594
|
-
x:
|
|
1595
|
-
y:
|
|
1670
|
+
x: ne(t("colOff") ?? "0") ?? 0,
|
|
1671
|
+
y: ne(t("rowOff") ?? "0") ?? 0
|
|
1596
1672
|
};
|
|
1597
|
-
},
|
|
1598
|
-
let
|
|
1673
|
+
}, rr = "formulaDialect", ir = "isKnownFunction", ar = "date1904", or = "richStrings", sr = "defaultFont", cr = (e, t, r, i, a, o, c, l) => {
|
|
1674
|
+
let u = new Nn(), d = (e) => {
|
|
1599
1675
|
let t = e.getAttribute("dxfId", Q);
|
|
1600
|
-
return t === null ? void 0 :
|
|
1601
|
-
},
|
|
1602
|
-
|
|
1676
|
+
return t === null ? void 0 : i?.get(t) || (o?.(`A color filter or sort names a format that does not exist (dxfId '${t}').`), {});
|
|
1677
|
+
}, f = !1, m = l?.get("parseInlineDxf"), h = l?.get(rr), _ = (e) => h && e ? h.readDetached(e) : e, v = new ut.TransposedBuilder(), y = null, b = "topLeft";
|
|
1678
|
+
u.registerVisitor({
|
|
1603
1679
|
from: "autoFilter",
|
|
1604
1680
|
to: "autoTable",
|
|
1605
1681
|
openTag: (e) => {
|
|
1606
|
-
let t = e.getAttribute("ref"), n =
|
|
1682
|
+
let t = e.getAttribute("ref"), n = V.fastStringToRange(t);
|
|
1607
1683
|
e.getSource().r = n, e.getSource().v = {};
|
|
1608
1684
|
},
|
|
1609
1685
|
closeTag: (e) => {
|
|
@@ -1613,7 +1689,7 @@ var Hn = {
|
|
|
1613
1689
|
e === 0 ? n.hiddenButtons = !1 : e === a && (n.hiddenButtons = !0);
|
|
1614
1690
|
}
|
|
1615
1691
|
}
|
|
1616
|
-
}),
|
|
1692
|
+
}), u.registerVisitor({
|
|
1617
1693
|
from: "conditionalFormatting",
|
|
1618
1694
|
to: {},
|
|
1619
1695
|
openTag: (e) => {
|
|
@@ -1627,7 +1703,7 @@ var Hn = {
|
|
|
1627
1703
|
}, i = e.getAttribute("pivot", Z);
|
|
1628
1704
|
i !== null && (r.pivot = i), e.setSource(r);
|
|
1629
1705
|
}
|
|
1630
|
-
}),
|
|
1706
|
+
}), u.registerVisitor({
|
|
1631
1707
|
from: "cfRule",
|
|
1632
1708
|
to: {},
|
|
1633
1709
|
openTag: (e) => {
|
|
@@ -1639,10 +1715,10 @@ var Hn = {
|
|
|
1639
1715
|
v: null,
|
|
1640
1716
|
rule: n
|
|
1641
1717
|
}), e.copyToObject(n, "type", $), e.copyToObject(n, "priority", Q), e.copyToObject(n, "stopIfTrue", Z);
|
|
1642
|
-
let
|
|
1643
|
-
if (
|
|
1644
|
-
let t =
|
|
1645
|
-
t ||= (o?.(`Unable to load conditional color. Invalid dxfI: '${
|
|
1718
|
+
let r = e.getAttribute("dxfId", Q);
|
|
1719
|
+
if (r !== null) {
|
|
1720
|
+
let t = i?.get(r);
|
|
1721
|
+
t ||= (o?.(`Unable to load conditional color. Invalid dxfI: '${r}' at '${e.getPath()}'.`), {}), n.style = t;
|
|
1646
1722
|
}
|
|
1647
1723
|
e.copyToObject(n, "aboveAverage", Z), e.copyToObject(n, "equalAverage", Z), e.copyToObject(n, "stdDev", Q), e.copyToObject(n, "bottom", Z), e.copyToObject(n, "percent", Z), e.copyToObject(n, "rank", Q), e.copyToObject(n, "operator", $), e.copyToObject(n, "text", $), e.copyToObject(n, "timePeriod", $);
|
|
1648
1724
|
},
|
|
@@ -1651,11 +1727,11 @@ var Hn = {
|
|
|
1651
1727
|
if (!t?.r) return;
|
|
1652
1728
|
let n = t.conditionals[t.conditionals.length - 1], r = n?.rule;
|
|
1653
1729
|
if (!r) return;
|
|
1654
|
-
let i = {}, a =
|
|
1655
|
-
a && (i.condition = a), r.style && (i.style = r.style), r.scale && (i.scale = r.scale), r.stopIfTrue && (i.stopIfTrue = !0), r.pivot && (i.
|
|
1730
|
+
let i = {}, a = De(r, o);
|
|
1731
|
+
a && (i.condition = a), r.style && (i.style = r.style), r.scale && (i.scale = r.scale), r.stopIfTrue && (i.stopIfTrue = !0), r.pivot && typeof r.priority == "number" && (i.pivotKey = r.priority), n.v = i, n.priority = r.priority, r.x14Id && (n.x14Id = r.x14Id), delete n.rule;
|
|
1656
1732
|
}
|
|
1657
1733
|
});
|
|
1658
|
-
let
|
|
1734
|
+
let x = (e) => {
|
|
1659
1735
|
let t = e.conditions ?? [], n = [];
|
|
1660
1736
|
for (let e = 0; e < t.length; e++) {
|
|
1661
1737
|
let r = t[e], i = {};
|
|
@@ -1663,19 +1739,19 @@ var Hn = {
|
|
|
1663
1739
|
}
|
|
1664
1740
|
return n;
|
|
1665
1741
|
};
|
|
1666
|
-
|
|
1742
|
+
u.registerVisitor({
|
|
1667
1743
|
from: "colorScale",
|
|
1668
1744
|
to: {},
|
|
1669
1745
|
openTag: (e) => {},
|
|
1670
1746
|
closeTag: (e) => {
|
|
1671
|
-
let t = e.getSource(), n = t.colors ?? [], r =
|
|
1747
|
+
let t = e.getSource(), n = t.colors ?? [], r = x(t);
|
|
1672
1748
|
for (let e = 0; e < r.length; e++) r[e].color = n[e];
|
|
1673
1749
|
e.getParent().scale = {
|
|
1674
|
-
type:
|
|
1750
|
+
type: Qe.ScaleType.ColorScale,
|
|
1675
1751
|
stops: r
|
|
1676
1752
|
};
|
|
1677
1753
|
}
|
|
1678
|
-
}),
|
|
1754
|
+
}), u.registerVisitor({
|
|
1679
1755
|
from: "dataBar",
|
|
1680
1756
|
to: {},
|
|
1681
1757
|
openTag: (e) => {
|
|
@@ -1683,12 +1759,12 @@ var Hn = {
|
|
|
1683
1759
|
},
|
|
1684
1760
|
closeTag: (e) => {
|
|
1685
1761
|
let t = e.getSource(), n = {
|
|
1686
|
-
type:
|
|
1687
|
-
stops:
|
|
1762
|
+
type: Qe.ScaleType.DataBar,
|
|
1763
|
+
stops: x(t)
|
|
1688
1764
|
}, r = t.colors?.[0];
|
|
1689
1765
|
r && (n.color = r), t.minLength !== void 0 && (n.minLength = t.minLength), t.maxLength !== void 0 && (n.maxLength = t.maxLength), t.showValue !== void 0 && (n.showValue = t.showValue), e.getParent().scale = n;
|
|
1690
1766
|
}
|
|
1691
|
-
}),
|
|
1767
|
+
}), u.registerVisitor({
|
|
1692
1768
|
from: "iconSet",
|
|
1693
1769
|
to: {},
|
|
1694
1770
|
openTag: (e) => {
|
|
@@ -1696,41 +1772,41 @@ var Hn = {
|
|
|
1696
1772
|
},
|
|
1697
1773
|
closeTag: (e) => {
|
|
1698
1774
|
let t = e.getSource(), n = {
|
|
1699
|
-
type:
|
|
1700
|
-
stops:
|
|
1775
|
+
type: Qe.ScaleType.IconSet,
|
|
1776
|
+
stops: x(t)
|
|
1701
1777
|
};
|
|
1702
1778
|
t.iconSet !== void 0 && (n.iconSet = t.iconSet), t.reverse !== void 0 && (n.reverse = t.reverse), t.showValue !== void 0 && (n.showValue = t.showValue), e.getParent().scale = n;
|
|
1703
1779
|
}
|
|
1704
|
-
}),
|
|
1780
|
+
}), u.registerVisitor({
|
|
1705
1781
|
from: "formula",
|
|
1706
1782
|
to: {},
|
|
1707
1783
|
text: (e, t) => {
|
|
1708
1784
|
let n = t.getParent(), r = n.formulas;
|
|
1709
|
-
r || (r = [], n.formulas = r), r.push(
|
|
1785
|
+
r || (r = [], n.formulas = r), r.push(_(e));
|
|
1710
1786
|
}
|
|
1711
|
-
}),
|
|
1787
|
+
}), u.registerVisitor({
|
|
1712
1788
|
from: "cfvo",
|
|
1713
1789
|
to: {},
|
|
1714
1790
|
openTag: (e) => {
|
|
1715
1791
|
let t = e.getParent();
|
|
1716
1792
|
t.conditions ||= [];
|
|
1717
1793
|
let n = e.getSource();
|
|
1718
|
-
if (t.conditions.push(n), e.copyTo("type", $), n.type ===
|
|
1794
|
+
if (t.conditions.push(n), e.copyTo("type", $), n.type === Qe.ColorStopType.Formula) {
|
|
1719
1795
|
let t = e.getAttribute("val");
|
|
1720
|
-
t != null && (n.value =
|
|
1721
|
-
} else e.copyTo("value",
|
|
1796
|
+
t != null && (n.value = _(String(t)));
|
|
1797
|
+
} else e.copyTo("value", An, "val");
|
|
1722
1798
|
!1 === e.getAttribute("gte", Z) && (n.exclusive = !0);
|
|
1723
1799
|
}
|
|
1724
|
-
}),
|
|
1800
|
+
}), u.registerVisitor({
|
|
1725
1801
|
from: "color",
|
|
1726
1802
|
to: {},
|
|
1727
1803
|
openTag: (e) => {
|
|
1728
1804
|
let t = e.getParent();
|
|
1729
1805
|
t.colors ||= [];
|
|
1730
|
-
let n =
|
|
1806
|
+
let n = p((t) => e.getAttribute(t));
|
|
1731
1807
|
t.colors.push(n);
|
|
1732
1808
|
}
|
|
1733
|
-
}),
|
|
1809
|
+
}), u.registerVisitor({
|
|
1734
1810
|
from: "filterColumn",
|
|
1735
1811
|
to: {},
|
|
1736
1812
|
openTag: (e) => {
|
|
@@ -1749,51 +1825,51 @@ var Hn = {
|
|
|
1749
1825
|
}
|
|
1750
1826
|
return r;
|
|
1751
1827
|
}
|
|
1752
|
-
}),
|
|
1828
|
+
}), u.registerVisitor({
|
|
1753
1829
|
from: "colorFilter",
|
|
1754
1830
|
openTag: (e) => {
|
|
1755
1831
|
let t = e.getParent(), n = {};
|
|
1756
|
-
t.operator =
|
|
1757
|
-
let r =
|
|
1832
|
+
t.operator = Ze.BuiltInOperatorNames.Color, t.param = n, e.copyToObject(n, "cellColor", Z);
|
|
1833
|
+
let r = d(e);
|
|
1758
1834
|
r && (n.style = r);
|
|
1759
1835
|
}
|
|
1760
|
-
}),
|
|
1836
|
+
}), u.registerVisitor({
|
|
1761
1837
|
from: "iconFilter",
|
|
1762
1838
|
openTag: (e) => {
|
|
1763
1839
|
let t = e.getParent(), n = {};
|
|
1764
|
-
t.operator =
|
|
1840
|
+
t.operator = Ze.BuiltInOperatorNames.Icon, t.param = n, e.copyToObject(n, "iconId", Q), e.copyToObject(n, "iconSet", $);
|
|
1765
1841
|
}
|
|
1766
|
-
}),
|
|
1842
|
+
}), u.registerVisitor({
|
|
1767
1843
|
from: "top10",
|
|
1768
1844
|
openTag: (e) => {
|
|
1769
1845
|
let t = e.getParent(), n = {};
|
|
1770
|
-
t.operator =
|
|
1846
|
+
t.operator = Ze.BuiltInOperatorNames.TopN, t.param = n, e.copyToObject(n, "filterVal", An), e.copyToObject(n, "percent", Z), e.copyToObject(n, "top", Z), e.copyToObject(n, "limit", An, "val");
|
|
1771
1847
|
}
|
|
1772
|
-
}),
|
|
1848
|
+
}), u.registerVisitor({
|
|
1773
1849
|
from: "dynamicFilter",
|
|
1774
1850
|
openTag: (e) => {
|
|
1775
|
-
let t = e.getParent(), n =
|
|
1851
|
+
let t = e.getParent(), n = me(e.getAttribute("type"), e.getAttribute("val"), e.getAttribute("maxVal"));
|
|
1776
1852
|
t.operator = n.operator, t.param = n.param;
|
|
1777
1853
|
}
|
|
1778
1854
|
});
|
|
1779
|
-
let
|
|
1855
|
+
let ne = {
|
|
1780
1856
|
from: "filters",
|
|
1781
1857
|
to: {},
|
|
1782
1858
|
openTag: (e) => {
|
|
1783
1859
|
let t = e.getParent(), n = {};
|
|
1784
|
-
return t.selector =
|
|
1860
|
+
return t.selector = Ze.BuiltInSelectorNames.Display, t.operator = Ze.BuiltInOperatorNames.InSet, t.param = n, e.copyToObject(n, "blank", Z), e.copyToObject(n, "calendarType", $), n;
|
|
1785
1861
|
}
|
|
1786
1862
|
};
|
|
1787
|
-
|
|
1788
|
-
let
|
|
1863
|
+
u.registerVisitor(ne);
|
|
1864
|
+
let re = {
|
|
1789
1865
|
from: "filter",
|
|
1790
1866
|
openTag: (e) => {
|
|
1791
1867
|
let t = e.getParent(), n = t.items;
|
|
1792
1868
|
n || (n = [], t.items = n), n.push(e.getAttribute("val", $));
|
|
1793
1869
|
}
|
|
1794
1870
|
};
|
|
1795
|
-
|
|
1796
|
-
let
|
|
1871
|
+
u.registerVisitor(re);
|
|
1872
|
+
let ie = {
|
|
1797
1873
|
from: "dateGroupItem",
|
|
1798
1874
|
to: {},
|
|
1799
1875
|
openTag: (e) => {
|
|
@@ -1801,55 +1877,55 @@ var Hn = {
|
|
|
1801
1877
|
n || (n = [], t.dateGroups = n), n.push(e.getSource()), e.copyTo("group", $, "dateTimeGrouping"), e.copyTo("day", Q), e.copyTo("hour", Q), e.copyTo("minute", Q), e.copyTo("month", Q), e.copyTo("second", Q), e.copyTo("year", Q);
|
|
1802
1878
|
}
|
|
1803
1879
|
};
|
|
1804
|
-
|
|
1805
|
-
let
|
|
1806
|
-
|
|
1880
|
+
u.registerVisitor(ie);
|
|
1881
|
+
let oe = /* @__PURE__ */ new Map();
|
|
1882
|
+
oe.set("filterColumn", {
|
|
1807
1883
|
from: "filterColumn",
|
|
1808
1884
|
transparent: !0
|
|
1809
|
-
}),
|
|
1885
|
+
}), oe.set("filters", ne), oe.set("filter", re), oe.set("dateGroupItem", ie), u.registerVisitor({
|
|
1810
1886
|
from: "customFilters",
|
|
1811
1887
|
openTag: (e) => {
|
|
1812
1888
|
let t = e.getParent(), n = e.getAttribute("and"), r = n === "and" || n === "1", i = [];
|
|
1813
|
-
return t.operator = r ?
|
|
1889
|
+
return t.operator = r ? Ze.BuiltInOperatorNames.And : Ze.BuiltInOperatorNames.Or, t.param = i, e.setSource(t), i;
|
|
1814
1890
|
},
|
|
1815
1891
|
closeTag: (e) => {
|
|
1816
1892
|
let t = e.getSource(), n = t?.param;
|
|
1817
1893
|
if (!t || !n) return;
|
|
1818
|
-
let r = n.length === 1 ? n[0] :
|
|
1894
|
+
let r = n.length === 1 ? n[0] : ke(t);
|
|
1819
1895
|
r !== t && (t.operator = r.operator, t.param = r.param);
|
|
1820
1896
|
}
|
|
1821
|
-
}),
|
|
1897
|
+
}), u.registerVisitor({
|
|
1822
1898
|
from: "customFilter",
|
|
1823
1899
|
openTag: (e) => {
|
|
1824
1900
|
let t = e.getParent(), n;
|
|
1825
1901
|
Array.isArray(t) ? (n = {}, t.push(n)) : n = t;
|
|
1826
|
-
let r =
|
|
1902
|
+
let r = Ne({
|
|
1827
1903
|
operator: e.getAttribute("operator"),
|
|
1828
1904
|
val: e.getAttribute("val")
|
|
1829
1905
|
}, (t) => e.warn(t));
|
|
1830
1906
|
r && (n.operator = r.operator, n.param = r.param);
|
|
1831
1907
|
}
|
|
1832
1908
|
});
|
|
1833
|
-
let
|
|
1834
|
-
|
|
1909
|
+
let se = {}, ce = null;
|
|
1910
|
+
u.registerVisitor({
|
|
1835
1911
|
from: "sortState",
|
|
1836
1912
|
to: {},
|
|
1837
1913
|
openTag: (e) => {
|
|
1838
1914
|
let t = e.getParent(), n = t.v;
|
|
1839
1915
|
if (!n) return;
|
|
1840
1916
|
let r = {};
|
|
1841
|
-
|
|
1917
|
+
se = {};
|
|
1842
1918
|
let i = e.getAttribute("caseSensitive", Z);
|
|
1843
|
-
i != null && (
|
|
1919
|
+
i != null && (se.collatorOptions = i ? ct.CaseSensitiveOptions : ct.CaseInsensitiveOptions);
|
|
1844
1920
|
let a = e.getAttribute("sortMethod");
|
|
1845
|
-
a !== "stroke" && a !== "pinYin" || (
|
|
1846
|
-
...
|
|
1921
|
+
a !== "stroke" && a !== "pinYin" || (se.collatorOptions = {
|
|
1922
|
+
...se.collatorOptions,
|
|
1847
1923
|
collation: a === "stroke" ? "stroke" : "pinyin"
|
|
1848
|
-
}), e.getAttribute("columnSort", Z) && (r.axis =
|
|
1849
|
-
let o = e.getAttribute("ref"),
|
|
1850
|
-
|
|
1924
|
+
}), e.getAttribute("columnSort", Z) && (r.axis = et.Axis.Column);
|
|
1925
|
+
let o = e.getAttribute("ref"), c = t.r;
|
|
1926
|
+
ce = o && c ? V.fastStringToRange(o) : null, ce && (r.extent = { range: s(c, ce) }), n.sort = r, e.setSource(t);
|
|
1851
1927
|
}
|
|
1852
|
-
}),
|
|
1928
|
+
}), u.registerVisitor({
|
|
1853
1929
|
from: "sortCondition",
|
|
1854
1930
|
to: {},
|
|
1855
1931
|
openTag: (e) => {
|
|
@@ -1861,64 +1937,64 @@ var Hn = {
|
|
|
1861
1937
|
i || (i = [], r.sorts = i);
|
|
1862
1938
|
let a = e.getAttribute("ref"), o = 0, s = null;
|
|
1863
1939
|
if (a) {
|
|
1864
|
-
let e =
|
|
1865
|
-
o = r ? n - i : n, r &&
|
|
1940
|
+
let e = V.fastStringToRange(a, fr), n = e.colStart, r = t.r, i = r.colStart;
|
|
1941
|
+
o = r ? n - i : n, r && ce && (s = ae(r, ce, e));
|
|
1866
1942
|
}
|
|
1867
1943
|
r.extent && (r.extent.sorts ??= []).push(s);
|
|
1868
|
-
let c = { ...
|
|
1944
|
+
let c = { ...se }, l = ge(e.getAttribute("sortBy"));
|
|
1869
1945
|
l && (c.sortOn = l);
|
|
1870
|
-
let u =
|
|
1946
|
+
let u = d(e);
|
|
1871
1947
|
u && (c.style = u), e.copyToObject(c, "iconSet", $), e.copyToObject(c, "customList", $), c.reverse = e.getAttribute("descending", Z) ?? !1;
|
|
1872
|
-
let
|
|
1948
|
+
let f = {
|
|
1873
1949
|
index: o,
|
|
1874
1950
|
criteria: c
|
|
1875
1951
|
};
|
|
1876
|
-
i.push(
|
|
1952
|
+
i.push(f);
|
|
1877
1953
|
}
|
|
1878
1954
|
});
|
|
1879
|
-
let
|
|
1880
|
-
|
|
1881
|
-
let t =
|
|
1955
|
+
let le = (e) => {
|
|
1956
|
+
y = e.getSource(), b = "topLeft", e.copyTo("topLeft", $, "topLeftCell");
|
|
1957
|
+
let t = g(e.getAttribute("defaultGridColor")), n = e.getAttribute("colorId");
|
|
1882
1958
|
n === null || t || (e.getSource().gridLineColor = "index" + parseFloat(n)), e.copyTo("showZeros", Z), e.copyTo("showFormulas", Z), e.copyTo("zoomScale", Q), e.copyTo("viewMode", $, "view");
|
|
1883
1959
|
let r = {};
|
|
1884
|
-
for (let [t, n] of
|
|
1960
|
+
for (let [t, n] of M) {
|
|
1885
1961
|
let i = e.getAttribute(n, Q);
|
|
1886
1962
|
i && (r[t] = Math.min(400, Math.max(10, i)));
|
|
1887
1963
|
}
|
|
1888
1964
|
Object.keys(r).length > 0 && (e.getSource().zoomScales = r), e.copyTo("showRuler", Z), e.copyTo("showWhitespace", Z, "showWhiteSpace"), e.copyTo("windowProtection", Z), e.copyTo("showRowHeaders", Z, "showRowColHeaders"), e.copyTo("showColumnHeaders", Z, "showRowColHeaders"), e.copyTo("showRowGridlines", Z, "showGridLines"), e.copyTo("showColumnGridlines", Z, "showGridLines"), e.copyTo("rightToLeft", Z), e.copyTo("showOutlineSymbols", Z);
|
|
1889
1965
|
};
|
|
1890
|
-
|
|
1966
|
+
u.registerVisitor({
|
|
1891
1967
|
from: "sheetView",
|
|
1892
1968
|
to: "view",
|
|
1893
1969
|
openTag: (e) => {
|
|
1894
|
-
|
|
1970
|
+
le(e);
|
|
1895
1971
|
},
|
|
1896
1972
|
closeTag: () => {
|
|
1897
|
-
|
|
1973
|
+
y = null;
|
|
1898
1974
|
}
|
|
1899
|
-
}),
|
|
1975
|
+
}), u.registerVisitor({
|
|
1900
1976
|
from: "customSheetViews",
|
|
1901
1977
|
to: "customSheetViews",
|
|
1902
1978
|
openTag: (e) => {
|
|
1903
1979
|
e.setSource([]);
|
|
1904
1980
|
}
|
|
1905
|
-
}),
|
|
1981
|
+
}), u.registerVisitor({
|
|
1906
1982
|
from: "customSheetView",
|
|
1907
1983
|
to: [],
|
|
1908
1984
|
openTag: (e) => {
|
|
1909
|
-
|
|
1985
|
+
S = !0, le(e);
|
|
1910
1986
|
},
|
|
1911
1987
|
closeTag: () => {
|
|
1912
|
-
|
|
1988
|
+
S = !1, y = null;
|
|
1913
1989
|
}
|
|
1914
|
-
}),
|
|
1990
|
+
}), u.registerVisitor({
|
|
1915
1991
|
from: "selection",
|
|
1916
1992
|
to: null,
|
|
1917
1993
|
openTag: (e) => {
|
|
1918
|
-
if (!
|
|
1994
|
+
if (!y) return;
|
|
1919
1995
|
let t = e.getAttribute("activeCell")?.replace(/\$/g, ""), n = e.getAttribute("sqref")?.replace(/\$/g, ""), r = e.getAttribute("pane") ?? "topLeft";
|
|
1920
|
-
if (r !==
|
|
1921
|
-
let e =
|
|
1996
|
+
if (r !== b) {
|
|
1997
|
+
let e = y.freezePanes;
|
|
1922
1998
|
if (e && t) {
|
|
1923
1999
|
let i = { activeCell: t };
|
|
1924
2000
|
n && n !== t && (i.sqref = n), (e.paneSelections ??= {})[r] = i;
|
|
@@ -1928,19 +2004,19 @@ var Hn = {
|
|
|
1928
2004
|
let i = {};
|
|
1929
2005
|
t && (i.cell = t);
|
|
1930
2006
|
let a = e.getAttribute("activeCellId", Q);
|
|
1931
|
-
a !== null && (i.rangeIndex = a), n && n !== t && (i.ranges = n.trim().split(/\s+/)),
|
|
2007
|
+
a !== null && (i.rangeIndex = a), n && n !== t && (i.ranges = n.trim().split(/\s+/)), y.selection = i;
|
|
1932
2008
|
}
|
|
1933
|
-
}),
|
|
2009
|
+
}), u.registerVisitor({
|
|
1934
2010
|
from: "pane",
|
|
1935
2011
|
to: null,
|
|
1936
2012
|
openTag: (e) => {
|
|
1937
|
-
if (!
|
|
1938
|
-
|
|
2013
|
+
if (!y) return;
|
|
2014
|
+
b = e.getAttribute("activePane") ?? "topLeft";
|
|
1939
2015
|
let t = e.getAttribute("state");
|
|
1940
2016
|
if (t === "frozen" || t === "frozenSplit") {
|
|
1941
2017
|
let t = {};
|
|
1942
|
-
|
|
1943
|
-
let n = (
|
|
2018
|
+
y.freezePanes = t, e.copyToObject(t, "topLeft", $, "topLeftCell");
|
|
2019
|
+
let n = (y.topLeft ? V.fastStringToCell(y.topLeft) : void 0) ?? {
|
|
1944
2020
|
colIndex: 0,
|
|
1945
2021
|
rowIndex: 0
|
|
1946
2022
|
}, r = {
|
|
@@ -1952,10 +2028,10 @@ var Hn = {
|
|
|
1952
2028
|
colIndex: n.colIndex + r.colIndex,
|
|
1953
2029
|
rowIndex: n.rowIndex + r.rowIndex
|
|
1954
2030
|
};
|
|
1955
|
-
t.coords =
|
|
2031
|
+
t.coords = V.cellToString(i);
|
|
1956
2032
|
}
|
|
1957
2033
|
}
|
|
1958
|
-
}),
|
|
2034
|
+
}), u.registerVisitor({
|
|
1959
2035
|
from: "sheetPr",
|
|
1960
2036
|
transparent: !0,
|
|
1961
2037
|
openTag: (t) => {
|
|
@@ -1966,22 +2042,22 @@ var Hn = {
|
|
|
1966
2042
|
let i = t.getAttribute("syncRef");
|
|
1967
2043
|
i && (r.anchor = i), Object.keys(r).length > 0 && (e.syncScroll = r);
|
|
1968
2044
|
}
|
|
1969
|
-
}),
|
|
2045
|
+
}), u.registerVisitor({
|
|
1970
2046
|
from: "tabColor",
|
|
1971
2047
|
to: null,
|
|
1972
2048
|
openTag: (t) => {
|
|
1973
|
-
let n =
|
|
2049
|
+
let n = p((e) => t.getAttribute(e));
|
|
1974
2050
|
n && (e.tabColor = n);
|
|
1975
2051
|
}
|
|
1976
2052
|
});
|
|
1977
|
-
let
|
|
1978
|
-
|
|
2053
|
+
let S = !1, C = () => e.pageLayout ??= {};
|
|
2054
|
+
u.registerVisitor({
|
|
1979
2055
|
from: "pageSetUpPr",
|
|
1980
2056
|
to: null,
|
|
1981
2057
|
openTag: (e) => {
|
|
1982
|
-
!0 === e.getAttribute("fitToPage", Z) && (
|
|
2058
|
+
!0 === e.getAttribute("fitToPage", Z) && (C().fitToPage = !0), !1 === e.getAttribute("autoPageBreaks", Z) && (C().hideAutoPageBreaks = !0);
|
|
1983
2059
|
}
|
|
1984
|
-
}),
|
|
2060
|
+
}), u.registerVisitor({
|
|
1985
2061
|
from: "outlinePr",
|
|
1986
2062
|
to: null,
|
|
1987
2063
|
openTag: (t) => {
|
|
@@ -1994,12 +2070,12 @@ var Hn = {
|
|
|
1994
2070
|
return n === "1" || n === "true";
|
|
1995
2071
|
})("applyStyles") && (r.automaticStyles = !0), Object.keys(r).length > 0 && (e.outline = r);
|
|
1996
2072
|
}
|
|
1997
|
-
}),
|
|
2073
|
+
}), u.registerVisitor({
|
|
1998
2074
|
from: "pageMargins",
|
|
1999
2075
|
to: null,
|
|
2000
2076
|
openTag: (e) => {
|
|
2001
|
-
if (
|
|
2002
|
-
let t = (t, n) => e.getAttribute(t,
|
|
2077
|
+
if (S) return;
|
|
2078
|
+
let t = (t, n) => e.getAttribute(t, An) ?? n, n = {
|
|
2003
2079
|
left: t("left", .7),
|
|
2004
2080
|
right: t("right", .7),
|
|
2005
2081
|
top: t("top", .75),
|
|
@@ -2007,14 +2083,14 @@ var Hn = {
|
|
|
2007
2083
|
header: t("header", .3),
|
|
2008
2084
|
footer: t("footer", .3)
|
|
2009
2085
|
};
|
|
2010
|
-
n.left === .7 && n.right === .7 && n.top === .75 && n.bottom === .75 && n.header === .3 && n.footer === .3 || (
|
|
2086
|
+
n.left === .7 && n.right === .7 && n.top === .75 && n.bottom === .75 && n.header === .3 && n.footer === .3 || (C().margins = n);
|
|
2011
2087
|
}
|
|
2012
|
-
}),
|
|
2088
|
+
}), u.registerVisitor({
|
|
2013
2089
|
from: "pageSetup",
|
|
2014
2090
|
to: null,
|
|
2015
2091
|
openTag: (e) => {
|
|
2016
|
-
if (
|
|
2017
|
-
let n =
|
|
2092
|
+
if (S) return;
|
|
2093
|
+
let n = C(), r = (t) => e.getAttribute(t, Q) ?? void 0, i = (t) => e.getAttribute(t, Z), a = e.getAttribute("orientation");
|
|
2018
2094
|
a !== "landscape" && a !== "portrait" || (n.orientation = a);
|
|
2019
2095
|
for (let e of [
|
|
2020
2096
|
"paperSize",
|
|
@@ -2033,84 +2109,84 @@ var Hn = {
|
|
|
2033
2109
|
o && (n.paperHeight = o);
|
|
2034
2110
|
let s = e.getAttribute("paperWidth");
|
|
2035
2111
|
s && (n.paperWidth = s), e.getAttribute("pageOrder") === "overThenDown" && (n.printOrder = "overThenDown"), !0 === i("blackAndWhite") && (n.blackAndWhite = !0), !0 === i("draft") && (n.draftMode = !0), !0 === i("useFirstPageNumber") && (n.useFirstPageNumber = !0), !1 === i("usePrinterDefaults") && (n.ignorePrinterDefaults = !0);
|
|
2036
|
-
let c = e.getAttribute("cellComments"), l =
|
|
2112
|
+
let c = e.getAttribute("cellComments"), l = je.find(([e]) => e === c)?.[1];
|
|
2037
2113
|
l && (n.printComments = l);
|
|
2038
|
-
let u = e.getAttribute("errors"), d =
|
|
2114
|
+
let u = e.getAttribute("errors"), d = w.find(([e]) => e === u)?.[1];
|
|
2039
2115
|
d && (n.printErrors = d);
|
|
2040
2116
|
let f = e.getAttribute("r:id"), p = f ? t(f, "part") : null;
|
|
2041
2117
|
p && (n.printerSettings = p);
|
|
2042
2118
|
}
|
|
2043
|
-
}),
|
|
2119
|
+
}), u.registerVisitor({
|
|
2044
2120
|
from: "printOptions",
|
|
2045
2121
|
to: null,
|
|
2046
2122
|
openTag: (e) => {
|
|
2047
|
-
if (
|
|
2123
|
+
if (S) return;
|
|
2048
2124
|
let t = (t) => !0 === e.getAttribute(t, Z);
|
|
2049
|
-
t("horizontalCentered") && (
|
|
2125
|
+
t("horizontalCentered") && (C().centerHorizontally = !0), t("verticalCentered") && (C().centerVertically = !0), t("gridLines") && (C().printGridlines = !0), t("headings") && (C().printHeadings = !0);
|
|
2050
2126
|
}
|
|
2051
|
-
}),
|
|
2127
|
+
}), u.registerVisitor({
|
|
2052
2128
|
from: "headerFooter",
|
|
2053
2129
|
to: {},
|
|
2054
2130
|
openTag: (e) => {
|
|
2055
|
-
if (
|
|
2131
|
+
if (S) return;
|
|
2056
2132
|
let t = {}, n = (t) => e.getAttribute(t, Z);
|
|
2057
|
-
!0 === n("differentOddEven") && (t.differentOddEven = !0), !0 === n("differentFirst") && (t.differentFirst = !0), !1 === n("scaleWithDoc") && (t.ignoreSheetScale = !0), !1 === n("alignWithMargins") && (t.ignoreSheetMargins = !0), Object.keys(t).length > 0 && (
|
|
2133
|
+
!0 === n("differentOddEven") && (t.differentOddEven = !0), !0 === n("differentFirst") && (t.differentFirst = !0), !1 === n("scaleWithDoc") && (t.ignoreSheetScale = !0), !1 === n("alignWithMargins") && (t.ignoreSheetMargins = !0), Object.keys(t).length > 0 && (C().headerFooter = t);
|
|
2058
2134
|
}
|
|
2059
2135
|
});
|
|
2060
|
-
for (let e of
|
|
2136
|
+
for (let e of Ie) u.registerVisitor({
|
|
2061
2137
|
from: e,
|
|
2062
2138
|
to: {},
|
|
2063
2139
|
text: (t, n) => {
|
|
2064
|
-
if (
|
|
2065
|
-
let r =
|
|
2066
|
-
i[e] = (i[e] ?? "") +
|
|
2140
|
+
if (S) return;
|
|
2141
|
+
let r = C(), i = r.headerFooter ??= {};
|
|
2142
|
+
i[e] = (i[e] ?? "") + we(t);
|
|
2067
2143
|
}
|
|
2068
2144
|
});
|
|
2069
|
-
let
|
|
2070
|
-
for (let [e, t] of [["rowBreaks", "rowBreaks"], ["colBreaks", "columnBreaks"]])
|
|
2145
|
+
let ue = "rowBreaks";
|
|
2146
|
+
for (let [e, t] of [["rowBreaks", "rowBreaks"], ["colBreaks", "columnBreaks"]]) u.registerVisitor({
|
|
2071
2147
|
from: e,
|
|
2072
2148
|
to: {},
|
|
2073
2149
|
openTag: () => {
|
|
2074
|
-
|
|
2150
|
+
ue = t;
|
|
2075
2151
|
}
|
|
2076
2152
|
});
|
|
2077
|
-
|
|
2153
|
+
u.registerVisitor({
|
|
2078
2154
|
from: "brk",
|
|
2079
2155
|
to: null,
|
|
2080
2156
|
openTag: (e) => {
|
|
2081
|
-
if (
|
|
2157
|
+
if (S) return;
|
|
2082
2158
|
let t = e.getAttribute("id", Q);
|
|
2083
2159
|
if (t == null) return;
|
|
2084
2160
|
let n = { index: t }, r = e.getAttribute("min", Q);
|
|
2085
2161
|
r != null && (n.min = r);
|
|
2086
2162
|
let i = e.getAttribute("max", Q);
|
|
2087
2163
|
i != null && (n.max = i), !0 !== e.getAttribute("man", Z) && (n.automatic = !0), !0 === e.getAttribute("pt", Z) && (n.pivot = !0);
|
|
2088
|
-
let a =
|
|
2089
|
-
(a[
|
|
2164
|
+
let a = C();
|
|
2165
|
+
(a[ue] ??= []).push(n);
|
|
2090
2166
|
}
|
|
2091
|
-
}),
|
|
2167
|
+
}), u.registerVisitor({
|
|
2092
2168
|
from: "ignoredErrors",
|
|
2093
2169
|
transparent: !0
|
|
2094
|
-
}),
|
|
2170
|
+
}), u.registerVisitor({
|
|
2095
2171
|
from: "ignoredError",
|
|
2096
2172
|
to: null,
|
|
2097
2173
|
openTag: (t) => {
|
|
2098
2174
|
let n = t.getAttribute("sqref");
|
|
2099
2175
|
if (!n) return;
|
|
2100
2176
|
let r = [];
|
|
2101
|
-
for (let e of
|
|
2177
|
+
for (let e of R) !0 === t.getAttribute(e, Z) && r.push(e);
|
|
2102
2178
|
if (r.length !== 0) for (let t of n.trim().split(/\s+/)) (e.ignoredErrors ??= []).push({
|
|
2103
2179
|
r: t,
|
|
2104
2180
|
v: r
|
|
2105
2181
|
});
|
|
2106
2182
|
}
|
|
2107
|
-
}),
|
|
2183
|
+
}), u.registerVisitor({
|
|
2108
2184
|
from: "mergeCells",
|
|
2109
2185
|
to: "merges",
|
|
2110
2186
|
openTag: (e) => {
|
|
2111
2187
|
e.setSource([]);
|
|
2112
2188
|
}
|
|
2113
|
-
}),
|
|
2189
|
+
}), u.registerVisitor({
|
|
2114
2190
|
from: "dataValidations",
|
|
2115
2191
|
to: "validations",
|
|
2116
2192
|
openTag: (t) => {
|
|
@@ -2126,7 +2202,7 @@ var Hn = {
|
|
|
2126
2202
|
});
|
|
2127
2203
|
}
|
|
2128
2204
|
});
|
|
2129
|
-
let
|
|
2205
|
+
let de = {
|
|
2130
2206
|
from: "dataValidation",
|
|
2131
2207
|
to: [],
|
|
2132
2208
|
openTag: (e) => {
|
|
@@ -2145,25 +2221,25 @@ var Hn = {
|
|
|
2145
2221
|
closeTag: (e) => {
|
|
2146
2222
|
let t = e.getSource();
|
|
2147
2223
|
if (!t?.rule) return;
|
|
2148
|
-
let n =
|
|
2224
|
+
let n = D(t.rule, o);
|
|
2149
2225
|
n && (e.getAttribute("allowBlank", Z) && (n.includeBlanks = !0), t.v.condition = n), delete t.rule;
|
|
2150
2226
|
}
|
|
2151
2227
|
};
|
|
2152
|
-
|
|
2228
|
+
u.registerVisitor(de), u.registerVisitor({
|
|
2153
2229
|
from: "formula1",
|
|
2154
2230
|
to: {},
|
|
2155
2231
|
text: (e, t) => {
|
|
2156
2232
|
let n = t.getParent().rule;
|
|
2157
|
-
n?.type && (n.formula1 =
|
|
2233
|
+
n?.type && (n.formula1 = ee(_(e), n.type));
|
|
2158
2234
|
}
|
|
2159
|
-
}),
|
|
2235
|
+
}), u.registerVisitor({
|
|
2160
2236
|
from: "formula2",
|
|
2161
2237
|
to: {},
|
|
2162
2238
|
text: (e, t) => {
|
|
2163
2239
|
let n = t.getParent().rule;
|
|
2164
|
-
n?.type && (n.formula2 =
|
|
2240
|
+
n?.type && (n.formula2 = ee(_(e), n.type));
|
|
2165
2241
|
}
|
|
2166
|
-
}),
|
|
2242
|
+
}), u.registerVisitor({
|
|
2167
2243
|
from: "picture",
|
|
2168
2244
|
to: "picture",
|
|
2169
2245
|
openTag: (e) => {
|
|
@@ -2173,7 +2249,7 @@ var Hn = {
|
|
|
2173
2249
|
e.getSource().resId = r;
|
|
2174
2250
|
}
|
|
2175
2251
|
});
|
|
2176
|
-
let
|
|
2252
|
+
let pe = {
|
|
2177
2253
|
from: "slicer",
|
|
2178
2254
|
to: {},
|
|
2179
2255
|
openTag: (e) => {
|
|
@@ -2185,8 +2261,18 @@ var Hn = {
|
|
|
2185
2261
|
for (let e of a) i.slicers[e] = r[e];
|
|
2186
2262
|
}
|
|
2187
2263
|
};
|
|
2188
|
-
|
|
2189
|
-
let
|
|
2264
|
+
u.registerVisitor(pe);
|
|
2265
|
+
let _e = {
|
|
2266
|
+
from: "timelineRef",
|
|
2267
|
+
to: {},
|
|
2268
|
+
openTag: (e) => {
|
|
2269
|
+
let n = e.getAttribute("r:id"), r = n ? t(n)?.slicers : void 0;
|
|
2270
|
+
if (!r) return void e.warn("A timeline names no part; it was not imported.", { onceKey: "xlsx.sheet.timeline.noRel" });
|
|
2271
|
+
let i = e.getParent();
|
|
2272
|
+
i.slicers ??= {};
|
|
2273
|
+
for (let e of Object.keys(r)) i.slicers[e] = r[e];
|
|
2274
|
+
}
|
|
2275
|
+
}, ve = (e, t) => ({
|
|
2190
2276
|
from: e,
|
|
2191
2277
|
to: {},
|
|
2192
2278
|
openTag: (e) => {
|
|
@@ -2198,8 +2284,8 @@ var Hn = {
|
|
|
2198
2284
|
closeTag: (e) => {
|
|
2199
2285
|
t(String(e.getSource() ?? ""), e);
|
|
2200
2286
|
}
|
|
2201
|
-
}),
|
|
2202
|
-
|
|
2287
|
+
}), be = /* @__PURE__ */ new Map();
|
|
2288
|
+
be.set("dataValidations", {
|
|
2203
2289
|
from: "dataValidations",
|
|
2204
2290
|
to: "validations",
|
|
2205
2291
|
openTag: (e) => {
|
|
@@ -2209,15 +2295,15 @@ var Hn = {
|
|
|
2209
2295
|
closeTag: (e) => {
|
|
2210
2296
|
(e.getSource()?.length ?? 0) === 0 && e.setSource(void 0);
|
|
2211
2297
|
}
|
|
2212
|
-
}),
|
|
2213
|
-
...
|
|
2298
|
+
}), be.set("dataValidation", {
|
|
2299
|
+
...de,
|
|
2214
2300
|
closeTag: (e) => {
|
|
2215
|
-
|
|
2301
|
+
de.closeTag(e);
|
|
2216
2302
|
let t = e.getSource();
|
|
2217
2303
|
t && !t.r && (e.warn("x14 dataValidation with no xm:sqref was dropped."), e.setSource(void 0));
|
|
2218
2304
|
}
|
|
2219
2305
|
});
|
|
2220
|
-
let
|
|
2306
|
+
let k = (e) => ({
|
|
2221
2307
|
from: e,
|
|
2222
2308
|
to: {},
|
|
2223
2309
|
openTag: (t) => {
|
|
@@ -2227,18 +2313,18 @@ var Hn = {
|
|
|
2227
2313
|
});
|
|
2228
2314
|
}
|
|
2229
2315
|
});
|
|
2230
|
-
|
|
2316
|
+
be.set("formula1", k("formula1")), be.set("formula2", k("formula2")), be.set("f", ve("f", (e, t) => {
|
|
2231
2317
|
let n = t.getParent(), r = n?.rule;
|
|
2232
|
-
r && (r[n.key] =
|
|
2233
|
-
})),
|
|
2318
|
+
r && (r[n.key] = ee(_(e), r.type));
|
|
2319
|
+
})), be.set("sqref", ve("sqref", (e, t) => {
|
|
2234
2320
|
let n = t.getParent(), r = e.trim();
|
|
2235
2321
|
n && r && (n.r = r.split(/\s+/).join(","));
|
|
2236
2322
|
}));
|
|
2237
|
-
let xe = /* @__PURE__ */ new Map(), Se = [],
|
|
2238
|
-
|
|
2323
|
+
let xe = /* @__PURE__ */ new Map(), Se = [], A = /* @__PURE__ */ new Map();
|
|
2324
|
+
A.set("conditionalFormattings", {
|
|
2239
2325
|
from: "conditionalFormattings",
|
|
2240
2326
|
transparent: !0
|
|
2241
|
-
}),
|
|
2327
|
+
}), A.set("conditionalFormatting", {
|
|
2242
2328
|
from: "conditionalFormatting",
|
|
2243
2329
|
to: {},
|
|
2244
2330
|
openTag: (e) => {
|
|
@@ -2251,7 +2337,7 @@ var Hn = {
|
|
|
2251
2337
|
r.sqref = t.sqref, r.id ? xe.set(r.id, r) : Se.push(r);
|
|
2252
2338
|
}
|
|
2253
2339
|
}
|
|
2254
|
-
}),
|
|
2340
|
+
}), A.set("cfRule", {
|
|
2255
2341
|
from: "cfRule",
|
|
2256
2342
|
to: {},
|
|
2257
2343
|
openTag: (e) => {
|
|
@@ -2261,10 +2347,10 @@ var Hn = {
|
|
|
2261
2347
|
let t = e.getSource();
|
|
2262
2348
|
t && e.getParent()?.rules?.push(t);
|
|
2263
2349
|
}
|
|
2264
|
-
}),
|
|
2350
|
+
}), A.set("sqref", ve("sqref", (e, t) => {
|
|
2265
2351
|
let n = t.getParent(), r = e.trim();
|
|
2266
2352
|
n && r && (n.sqref = r);
|
|
2267
|
-
})),
|
|
2353
|
+
})), A.set("dataBar", {
|
|
2268
2354
|
from: "dataBar",
|
|
2269
2355
|
to: {},
|
|
2270
2356
|
openTag: (e) => {
|
|
@@ -2273,7 +2359,7 @@ var Hn = {
|
|
|
2273
2359
|
closeTag: (e) => {
|
|
2274
2360
|
e.getParent().dataBar = e.getSource();
|
|
2275
2361
|
}
|
|
2276
|
-
}),
|
|
2362
|
+
}), A.set("iconSet", {
|
|
2277
2363
|
from: "iconSet",
|
|
2278
2364
|
to: {},
|
|
2279
2365
|
openTag: (e) => {
|
|
@@ -2283,46 +2369,46 @@ var Hn = {
|
|
|
2283
2369
|
e.getParent().iconSet = e.getSource();
|
|
2284
2370
|
}
|
|
2285
2371
|
});
|
|
2286
|
-
let
|
|
2287
|
-
|
|
2372
|
+
let Ce = /* @__PURE__ */ new Map();
|
|
2373
|
+
Ce.set("f", ve("f", (e, t) => {
|
|
2288
2374
|
let n = t.getParent();
|
|
2289
2375
|
if (!n) return;
|
|
2290
2376
|
let r = e.trim(), i = Number(r);
|
|
2291
|
-
n.value = r.length > 0 && Number.isFinite(i) ? i :
|
|
2292
|
-
})),
|
|
2377
|
+
n.value = r.length > 0 && Number.isFinite(i) ? i : _(e);
|
|
2378
|
+
})), A.set("cfvo", {
|
|
2293
2379
|
from: "cfvo",
|
|
2294
2380
|
to: {},
|
|
2295
|
-
scope: () =>
|
|
2381
|
+
scope: () => Ce,
|
|
2296
2382
|
openTag: (e) => {
|
|
2297
2383
|
let t = e.getParent();
|
|
2298
2384
|
t.conditions ||= [];
|
|
2299
2385
|
let n = e.getSource();
|
|
2300
2386
|
t.conditions.push(n), e.copyTo("type", $), !1 === e.getAttribute("gte", Z) && (n.exclusive = !0);
|
|
2301
2387
|
}
|
|
2302
|
-
}),
|
|
2388
|
+
}), A.set("f", ve("f", (e, t) => {
|
|
2303
2389
|
let n = t.getParent();
|
|
2304
|
-
n && (n.formulas ??= []).push(
|
|
2305
|
-
})),
|
|
2390
|
+
n && (n.formulas ??= []).push(_(e));
|
|
2391
|
+
})), A.set("dxf", {
|
|
2306
2392
|
from: "dxf",
|
|
2307
2393
|
to: {},
|
|
2308
2394
|
raw: !0,
|
|
2309
2395
|
closeTag: (e) => {
|
|
2310
|
-
if (!
|
|
2396
|
+
if (!m) return;
|
|
2311
2397
|
let t = e.getParent();
|
|
2312
2398
|
if (!t) return;
|
|
2313
|
-
let n =
|
|
2399
|
+
let n = m(e.getRawXml() ?? "");
|
|
2314
2400
|
n && (t.style = n);
|
|
2315
2401
|
}
|
|
2316
2402
|
});
|
|
2317
|
-
let
|
|
2403
|
+
let Te = (e) => ({
|
|
2318
2404
|
from: e,
|
|
2319
2405
|
to: {},
|
|
2320
2406
|
openTag: (t) => {
|
|
2321
|
-
let n =
|
|
2407
|
+
let n = p((e) => t.getAttribute(e));
|
|
2322
2408
|
n && (t.getParent()[e] = n);
|
|
2323
2409
|
}
|
|
2324
2410
|
});
|
|
2325
|
-
|
|
2411
|
+
A.set("borderColor", Te("borderColor")), A.set("negativeFillColor", Te("negativeFillColor")), A.set("negativeBorderColor", Te("negativeBorderColor")), A.set("axisColor", Te("axisColor")), A.set("cfIcon", {
|
|
2326
2412
|
from: "cfIcon",
|
|
2327
2413
|
to: {},
|
|
2328
2414
|
openTag: (e) => {
|
|
@@ -2340,50 +2426,56 @@ var Hn = {
|
|
|
2340
2426
|
let n = t.getParent(), r = e.trim();
|
|
2341
2427
|
n && r && (n.x14Id = r);
|
|
2342
2428
|
}));
|
|
2343
|
-
let
|
|
2344
|
-
|
|
2429
|
+
let Me = /* @__PURE__ */ new Map();
|
|
2430
|
+
Me.set("slicerList", {
|
|
2345
2431
|
from: "slicerList",
|
|
2346
2432
|
transparent: !0
|
|
2347
|
-
}),
|
|
2348
|
-
let
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
[
|
|
2355
|
-
[
|
|
2356
|
-
|
|
2357
|
-
|
|
2433
|
+
}), Me.set("slicer", pe);
|
|
2434
|
+
let P = /* @__PURE__ */ new Map();
|
|
2435
|
+
P.set("timelineRefs", {
|
|
2436
|
+
from: "timelineRefs",
|
|
2437
|
+
transparent: !0
|
|
2438
|
+
}), P.set("timelineRef", _e);
|
|
2439
|
+
let Fe = /* @__PURE__ */ new Map([
|
|
2440
|
+
[O(Re), be],
|
|
2441
|
+
[O(n), A],
|
|
2442
|
+
[O(E), A],
|
|
2443
|
+
[O(te), Oe],
|
|
2444
|
+
[O(he), Me],
|
|
2445
|
+
[O(Ae), Me],
|
|
2446
|
+
[O(j), P],
|
|
2447
|
+
[O(Ee), oe]
|
|
2448
|
+
]), Le = /* @__PURE__ */ new Set();
|
|
2449
|
+
u.registerVisitor({
|
|
2358
2450
|
from: "extLst",
|
|
2359
2451
|
transparent: !0
|
|
2360
|
-
}),
|
|
2452
|
+
}), u.registerVisitor({
|
|
2361
2453
|
from: "ext",
|
|
2362
2454
|
transparent: !0,
|
|
2363
2455
|
scope: (e) => {
|
|
2364
|
-
let t = e.getAttribute("uri"), n =
|
|
2456
|
+
let t = e.getAttribute("uri"), n = O(t), r = Fe.get(n);
|
|
2365
2457
|
if (r) return r;
|
|
2366
|
-
if (!
|
|
2367
|
-
|
|
2368
|
-
let r =
|
|
2458
|
+
if (!Pe.has(n) && !Le.has(n)) {
|
|
2459
|
+
Le.add(n);
|
|
2460
|
+
let r = N[n];
|
|
2369
2461
|
e.warn(r ? `Extension content '${r}' (${t}) is not read; it will be lost on resave.` : `Unknown extension content (uri ${t}) is not read; it will be lost on resave.`);
|
|
2370
2462
|
}
|
|
2371
2463
|
return null;
|
|
2372
2464
|
}
|
|
2373
|
-
}),
|
|
2465
|
+
}), u.registerVisitor({
|
|
2374
2466
|
from: "mergeCell",
|
|
2375
2467
|
to: [],
|
|
2376
2468
|
openTag: (e) => {
|
|
2377
2469
|
let t = e.getAttribute("ref");
|
|
2378
2470
|
e.setSource(t);
|
|
2379
2471
|
}
|
|
2380
|
-
}),
|
|
2472
|
+
}), u.registerVisitor({
|
|
2381
2473
|
from: "hyperlinks",
|
|
2382
2474
|
to: "hyperlinks",
|
|
2383
2475
|
openTag: (e) => {
|
|
2384
2476
|
e.setSource([]);
|
|
2385
2477
|
}
|
|
2386
|
-
}),
|
|
2478
|
+
}), u.registerVisitor({
|
|
2387
2479
|
from: "hyperlink",
|
|
2388
2480
|
to: [],
|
|
2389
2481
|
openTag: (e) => {
|
|
@@ -2401,7 +2493,7 @@ var Hn = {
|
|
|
2401
2493
|
v: o
|
|
2402
2494
|
});
|
|
2403
2495
|
}
|
|
2404
|
-
}),
|
|
2496
|
+
}), u.registerVisitor({
|
|
2405
2497
|
from: "drawing",
|
|
2406
2498
|
to: "movables",
|
|
2407
2499
|
openTag: (e) => {
|
|
@@ -2410,32 +2502,32 @@ var Hn = {
|
|
|
2410
2502
|
let r = t(n);
|
|
2411
2503
|
r ? e.setSource(r.movables) : e.warn("A drawing part is missing; its shapes were not imported.", { onceKey: "xlsx.sheet.drawing.missing" });
|
|
2412
2504
|
}
|
|
2413
|
-
}),
|
|
2505
|
+
}), u.registerVisitor({
|
|
2414
2506
|
from: "legacyDrawing",
|
|
2415
2507
|
to: "legacyDrawing",
|
|
2416
2508
|
openTag: (e) => {
|
|
2417
2509
|
e.setSource(t(e.getAttribute("r:id"), "legacyDrawing") ?? void 0);
|
|
2418
2510
|
}
|
|
2419
|
-
}),
|
|
2511
|
+
}), u.registerVisitor({
|
|
2420
2512
|
from: "legacyDrawingHF",
|
|
2421
2513
|
to: "legacyDrawingHF",
|
|
2422
2514
|
openTag: (e) => {
|
|
2423
2515
|
e.setSource(t(e.getAttribute("r:id"), "legacyDrawing") ?? void 0);
|
|
2424
2516
|
}
|
|
2425
2517
|
});
|
|
2426
|
-
let
|
|
2518
|
+
let F = null, ze = !1, Be = /* @__PURE__ */ new Map(), I = {
|
|
2427
2519
|
from: "Fallback",
|
|
2428
2520
|
to: null
|
|
2429
|
-
},
|
|
2521
|
+
}, Ve = {
|
|
2430
2522
|
from: "Choice",
|
|
2431
2523
|
transparent: !0
|
|
2432
2524
|
};
|
|
2433
|
-
|
|
2525
|
+
Be.set("Fallback", I), Be.set("Choice", Ve), Be.set("control", {
|
|
2434
2526
|
from: "control",
|
|
2435
2527
|
transparent: !0,
|
|
2436
2528
|
openTag: (e) => {
|
|
2437
2529
|
let n = e.getAttribute("name"), r = e.getAttribute("r:id"), i = r ? t(r, "formControl") : null;
|
|
2438
|
-
if (!i) return e.warn(`The form control '${n ?? ""}' has no properties and was not read.`, { onceKey: "xlsx.sheet.control.noProperties" }), void (
|
|
2530
|
+
if (!i) return e.warn(`The form control '${n ?? ""}' has no properties and was not read.`, { onceKey: "xlsx.sheet.control.noProperties" }), void (F = null);
|
|
2439
2531
|
let a = i.json, o = parseInt(e.getAttribute("shapeId") ?? "", 10);
|
|
2440
2532
|
isNaN(o) || (a.shapeId = o);
|
|
2441
2533
|
let s = {
|
|
@@ -2458,67 +2550,67 @@ var Hn = {
|
|
|
2458
2550
|
json: a
|
|
2459
2551
|
}
|
|
2460
2552
|
};
|
|
2461
|
-
n && (s.content.name = n),
|
|
2553
|
+
n && (s.content.name = n), F = {
|
|
2462
2554
|
movable: s,
|
|
2463
2555
|
control: a
|
|
2464
2556
|
};
|
|
2465
2557
|
},
|
|
2466
2558
|
closeTag: () => {
|
|
2467
|
-
|
|
2559
|
+
F &&= (e.movables ||= [], e.movables.push(F.movable), null);
|
|
2468
2560
|
}
|
|
2469
|
-
}),
|
|
2561
|
+
}), Be.set("controlPr", {
|
|
2470
2562
|
from: "controlPr",
|
|
2471
2563
|
transparent: !0,
|
|
2472
2564
|
raw: !0,
|
|
2473
2565
|
openTag: (e) => {
|
|
2474
|
-
if (!
|
|
2566
|
+
if (!F) return;
|
|
2475
2567
|
let t = e.getFrom().attributes ?? {}, n = {};
|
|
2476
2568
|
for (let e in t) {
|
|
2477
2569
|
let r = t[e];
|
|
2478
2570
|
n[e] = typeof r == "string" ? r : r?.value ?? "";
|
|
2479
2571
|
}
|
|
2480
|
-
|
|
2572
|
+
fe(n, F.control);
|
|
2481
2573
|
},
|
|
2482
2574
|
closeTag: (e) => {
|
|
2483
|
-
if (!
|
|
2575
|
+
if (!F) return;
|
|
2484
2576
|
let t = ((e) => {
|
|
2485
2577
|
let t = /<(?:[\w.-]+:)?anchor\b([^>]*)>([\s\S]*?)<\/(?:[\w.-]+:)?anchor>/.exec(e);
|
|
2486
2578
|
if (!t) return null;
|
|
2487
2579
|
let n = t[2], r = (e) => RegExp(`<(?:[\\w.-]+:)?${e}\\b[^>]*>([\\s\\S]*?)<\\/(?:[\\w.-]+:)?${e}>`).exec(n)?.[1], i = t[1], a = /\bmoveWithCells="(?:1|true)"/.test(i), o = /\bsizeWithCells="(?:1|true)"/.test(i);
|
|
2488
2580
|
return {
|
|
2489
2581
|
anchor: {
|
|
2490
|
-
tl:
|
|
2491
|
-
br:
|
|
2582
|
+
tl: nr(r("from")),
|
|
2583
|
+
br: nr(r("to"))
|
|
2492
2584
|
},
|
|
2493
2585
|
anchorType: a ? o ? "twoCell" : "oneCell" : "absolute",
|
|
2494
2586
|
rest: (e.slice(0, t.index) + e.slice(t.index + t[0].length)).trim()
|
|
2495
2587
|
};
|
|
2496
2588
|
})(e.getRawXml() ?? "");
|
|
2497
|
-
t ? (
|
|
2589
|
+
t ? (F.movable.anchor = t.anchor, t.anchorType !== "twoCell" && (F.movable.anchorType = t.anchorType), t.rest && (F.control.xml = t.rest)) : ze || (ze = !0, e.warn("A form control has no anchor; it is placed at the top left of the sheet."));
|
|
2498
2590
|
}
|
|
2499
2591
|
});
|
|
2500
|
-
let
|
|
2592
|
+
let L = {
|
|
2501
2593
|
from: "controls",
|
|
2502
2594
|
transparent: !0,
|
|
2503
|
-
scope: () =>
|
|
2595
|
+
scope: () => Be
|
|
2504
2596
|
};
|
|
2505
|
-
|
|
2506
|
-
let
|
|
2507
|
-
["Choice",
|
|
2508
|
-
["Fallback",
|
|
2509
|
-
["controls",
|
|
2597
|
+
u.registerVisitor(L);
|
|
2598
|
+
let He = /* @__PURE__ */ new Map([
|
|
2599
|
+
["Choice", Ve],
|
|
2600
|
+
["Fallback", I],
|
|
2601
|
+
["controls", L]
|
|
2510
2602
|
]);
|
|
2511
|
-
|
|
2603
|
+
u.registerVisitor({
|
|
2512
2604
|
from: "AlternateContent",
|
|
2513
2605
|
transparent: !0,
|
|
2514
|
-
scope: () =>
|
|
2515
|
-
}),
|
|
2606
|
+
scope: () => He
|
|
2607
|
+
}), u.registerVisitor({
|
|
2516
2608
|
from: "tableParts",
|
|
2517
2609
|
to: "tables",
|
|
2518
2610
|
openTag: (e) => {
|
|
2519
2611
|
e.setSource([]);
|
|
2520
2612
|
}
|
|
2521
|
-
}),
|
|
2613
|
+
}), u.registerVisitor({
|
|
2522
2614
|
from: "tablePart",
|
|
2523
2615
|
to: [],
|
|
2524
2616
|
openTag: (e) => {
|
|
@@ -2528,26 +2620,26 @@ var Hn = {
|
|
|
2528
2620
|
r ? e.setSource(r) : e.warn("A table part is missing; the table was not imported.", { onceKey: "xlsx.sheet.table.missing" });
|
|
2529
2621
|
}
|
|
2530
2622
|
});
|
|
2531
|
-
let
|
|
2532
|
-
t.conditions?.length && (e.stops =
|
|
2533
|
-
},
|
|
2534
|
-
t.conditions?.length && (e.stops =
|
|
2535
|
-
},
|
|
2623
|
+
let z = (e, t) => {
|
|
2624
|
+
t.conditions?.length && (e.stops = x(t)), t.minLength !== void 0 && (e.minLength = t.minLength), t.maxLength !== void 0 && (e.maxLength = t.maxLength), (t.gradient ?? 1) && (e.gradient = !0), t.border && t.borderColor && (e.borderColor = t.borderColor), !t.negativeBarColorSameAsPositive && t.negativeFillColor && (e.negativeFillColor = t.negativeFillColor), !(t.negativeBarBorderColorSameAsPositive ?? 1) && t.negativeBorderColor && (e.negativeBorderColor = t.negativeBorderColor), t.axisColor && (e.axisColor = t.axisColor), t.axisPosition !== "middle" && t.axisPosition !== "none" || (e.axisPosition = t.axisPosition), t.direction !== "leftToRight" && t.direction !== "rightToLeft" || (e.direction = t.direction);
|
|
2625
|
+
}, Ue = (e, t) => {
|
|
2626
|
+
t.conditions?.length && (e.stops = x(t)), t.iconSet && t.iconSet !== e.iconSet && (e.iconSet = t.iconSet), t.icons?.length && (e.icon = t.icons), t.reverse !== void 0 && (e.reverse = t.reverse), t.showValue !== void 0 && (e.showValue = t.showValue);
|
|
2627
|
+
}, We = (e) => {
|
|
2536
2628
|
if (!e.sqref) return null;
|
|
2537
2629
|
let t = e.sqref.split(/\s+/).join(",");
|
|
2538
2630
|
if (e.type === "iconSet") {
|
|
2539
2631
|
if (!e.iconSet) return null;
|
|
2540
2632
|
let n = {
|
|
2541
|
-
type:
|
|
2633
|
+
type: Qe.ScaleType.IconSet,
|
|
2542
2634
|
stops: []
|
|
2543
2635
|
};
|
|
2544
|
-
return
|
|
2636
|
+
return Ue(n, e.iconSet), {
|
|
2545
2637
|
r: t,
|
|
2546
2638
|
v: { scale: n },
|
|
2547
2639
|
priority: e.priority
|
|
2548
2640
|
};
|
|
2549
2641
|
}
|
|
2550
|
-
let n =
|
|
2642
|
+
let n = De(e, o);
|
|
2551
2643
|
if (!n) return null;
|
|
2552
2644
|
let r = { condition: n };
|
|
2553
2645
|
return e.style && (r.style = e.style), e.stopIfTrue && (r.stopIfTrue = !0), {
|
|
@@ -2556,7 +2648,7 @@ var Hn = {
|
|
|
2556
2648
|
priority: e.priority
|
|
2557
2649
|
};
|
|
2558
2650
|
};
|
|
2559
|
-
|
|
2651
|
+
u.registerVisitor({
|
|
2560
2652
|
from: "worksheet",
|
|
2561
2653
|
to: {},
|
|
2562
2654
|
openTag: (e) => {},
|
|
@@ -2570,11 +2662,11 @@ var Hn = {
|
|
|
2570
2662
|
if (!i) continue;
|
|
2571
2663
|
xe.delete(r);
|
|
2572
2664
|
let a = t.v?.scale;
|
|
2573
|
-
i.dataBar && a?.type ===
|
|
2665
|
+
i.dataBar && a?.type === Qe.ScaleType.DataBar ? z(a, i.dataBar) : i.iconSet && a?.type === Qe.ScaleType.IconSet && Ue(a, i.iconSet);
|
|
2574
2666
|
}
|
|
2575
2667
|
let r = [...xe.values(), ...Se], i = /* @__PURE__ */ new Set(), a = 0;
|
|
2576
2668
|
for (let e = 0; e < r.length; e++) {
|
|
2577
|
-
let o =
|
|
2669
|
+
let o = We(r[e]);
|
|
2578
2670
|
o ? (n || (n = [], t.conditionals = n), n.push(o)) : (i.add(r[e].type ?? "unknown"), a++);
|
|
2579
2671
|
}
|
|
2580
2672
|
if (a > 0) {
|
|
@@ -2586,7 +2678,7 @@ var Hn = {
|
|
|
2586
2678
|
for (let e = 0; e < n.length; e++) delete n[e].priority;
|
|
2587
2679
|
}
|
|
2588
2680
|
}
|
|
2589
|
-
}),
|
|
2681
|
+
}), u.registerVisitor({
|
|
2590
2682
|
from: "customProperties",
|
|
2591
2683
|
to: "customProperties",
|
|
2592
2684
|
openTag: (e) => {
|
|
@@ -2596,7 +2688,7 @@ var Hn = {
|
|
|
2596
2688
|
let t = e.getSource();
|
|
2597
2689
|
t.length > 0 && (e.getParent().customProperties = t);
|
|
2598
2690
|
}
|
|
2599
|
-
}),
|
|
2691
|
+
}), u.registerVisitor({
|
|
2600
2692
|
from: "customPr",
|
|
2601
2693
|
to: {},
|
|
2602
2694
|
openTag: (e) => {
|
|
@@ -2607,26 +2699,26 @@ var Hn = {
|
|
|
2607
2699
|
let i = t(r, "resource"), a = e.getSource();
|
|
2608
2700
|
a.resId = i, n.push(a);
|
|
2609
2701
|
}
|
|
2610
|
-
}),
|
|
2702
|
+
}), u.registerVisitor({
|
|
2611
2703
|
from: "sheetProtection",
|
|
2612
2704
|
to: "protection",
|
|
2613
2705
|
openTag: (e) => {
|
|
2614
2706
|
let t = e.getSource();
|
|
2615
|
-
for (let n of
|
|
2707
|
+
for (let n of T) {
|
|
2616
2708
|
let r = e.hasAttribute(n.attribute) ? e.getAttribute(n.attribute) : null;
|
|
2617
|
-
t[n.key] =
|
|
2709
|
+
t[n.key] = ye(n, r);
|
|
2618
2710
|
}
|
|
2619
2711
|
if (t.sheet) return;
|
|
2620
2712
|
let n = {};
|
|
2621
2713
|
e.copyToObject(n, "hash", $, "hashValue"), e.copyToObject(n, "algorithm", $, "algorithmName"), e.copyToObject(n, "salt", $, "saltValue"), e.copyToObject(n, "spinCount", Q), e.copyToObject(n, "legacyHash", $, "password"), Object.keys(n).length > 0 && (e.getSource().password = n);
|
|
2622
2714
|
}
|
|
2623
|
-
}),
|
|
2715
|
+
}), u.registerVisitor({
|
|
2624
2716
|
from: "protectedRanges",
|
|
2625
2717
|
to: "protectedRanges",
|
|
2626
2718
|
openTag: (e) => {
|
|
2627
2719
|
e.setSource([]);
|
|
2628
2720
|
}
|
|
2629
|
-
}),
|
|
2721
|
+
}), u.registerVisitor({
|
|
2630
2722
|
from: "protectedRange",
|
|
2631
2723
|
to: [],
|
|
2632
2724
|
openTag: (e) => {
|
|
@@ -2644,71 +2736,71 @@ var Hn = {
|
|
|
2644
2736
|
let t = e.getSource();
|
|
2645
2737
|
t?.r && t.v.name || e.setSource(void 0);
|
|
2646
2738
|
}
|
|
2647
|
-
}),
|
|
2739
|
+
}), u.registerVisitor({
|
|
2648
2740
|
from: "sheetFormatPr",
|
|
2649
2741
|
to: "sheetFormatPr",
|
|
2650
2742
|
openTag: (t) => {
|
|
2651
|
-
t.copyToObject(e, "defaultColSize",
|
|
2743
|
+
t.copyToObject(e, "defaultColSize", An, "defaultColWidth");
|
|
2652
2744
|
let n = t.getAttribute("customHeight");
|
|
2653
|
-
n !== "1" && n !== "true" || t.copyToObject(e, "defaultRowSize",
|
|
2745
|
+
n !== "1" && n !== "true" || t.copyToObject(e, "defaultRowSize", An, "defaultRowHeight");
|
|
2654
2746
|
let r = t.getAttribute("baseColWidth", Q);
|
|
2655
|
-
r && r !== 8 && (e.baseColSize = r),
|
|
2747
|
+
r && r !== 8 && (e.baseColSize = r), f = !!t.getAttribute("zeroHeight", Z);
|
|
2656
2748
|
}
|
|
2657
|
-
}),
|
|
2749
|
+
}), u.registerVisitor({
|
|
2658
2750
|
from: "cols",
|
|
2659
2751
|
to: "cols",
|
|
2660
2752
|
openTag: (e) => {
|
|
2661
2753
|
e.setSource([]);
|
|
2662
2754
|
}
|
|
2663
|
-
}),
|
|
2755
|
+
}), u.registerVisitor({
|
|
2664
2756
|
from: "col",
|
|
2665
2757
|
to: [],
|
|
2666
2758
|
openTag: (e) => {
|
|
2667
2759
|
let t = e.getSource(), n = e.getAttribute("min"), r = e.getAttribute("max"), i = n === void 0 ? 0 : parseInt(n) - 1, a = r === void 0 ? i : parseInt(r) - 1;
|
|
2668
|
-
t.r =
|
|
2760
|
+
t.r = V.runToString(i, a, !0);
|
|
2669
2761
|
let o = {};
|
|
2670
|
-
t.v = o, e.copyToObject(o, "sz",
|
|
2762
|
+
t.v = o, e.copyToObject(o, "sz", An, "width"), e.copyToObject(o, "csz", Z, "customWidth"), e.copyToObject(o, "h", Z, "hidden"), e.copyToObject(o, "l", Q, "outlineLevel"), e.copyToObject(o, "cl", Z, "collapsed"), e.getAttribute("bestFit", Z) && (o.bf = !0), e.copyToObject(o, "s", Q, "style");
|
|
2671
2763
|
}
|
|
2672
|
-
}),
|
|
2764
|
+
}), u.registerVisitor({
|
|
2673
2765
|
from: "oleObjects",
|
|
2674
2766
|
to: null,
|
|
2675
2767
|
openTag: (e) => {
|
|
2676
2768
|
e.warn("'OLE Objects' are not supported.");
|
|
2677
2769
|
}
|
|
2678
2770
|
});
|
|
2679
|
-
let
|
|
2771
|
+
let B = !1, H = !1, Ge = 0, Ke = "", qe = "", Je = (e) => {
|
|
2680
2772
|
let t = e.indexOf(":");
|
|
2681
2773
|
return t === -1 ? e : e.slice(t + 1);
|
|
2682
|
-
},
|
|
2683
|
-
return
|
|
2774
|
+
}, Ye = new Qn();
|
|
2775
|
+
return mr(v, e, u.createEventHandler(e, a, o), o, c, {
|
|
2684
2776
|
onOpenTag: (e) => {
|
|
2685
|
-
|
|
2686
|
-
let t =
|
|
2687
|
-
t === "t" || t === "v" ?
|
|
2777
|
+
B = !0;
|
|
2778
|
+
let t = Je(e.name);
|
|
2779
|
+
t === "t" || t === "v" ? Ge === 0 && (H = !0) : t === "rPh" || t === "phoneticPr" ? Ge++ : Ge === 0 && Ye.onOpenTag(t, e.attributes);
|
|
2688
2780
|
},
|
|
2689
2781
|
onText: (e) => {
|
|
2690
|
-
|
|
2782
|
+
H && (Ke += e, Ye.onText(e));
|
|
2691
2783
|
},
|
|
2692
2784
|
onCloseTag: (e) => {
|
|
2693
|
-
let t =
|
|
2694
|
-
t === "t" || t === "v" ?
|
|
2785
|
+
let t = Je(e.name);
|
|
2786
|
+
t === "t" || t === "v" ? H = !1 : t === "rPh" || t === "phoneticPr" ? Ge > 0 && Ge-- : Ye.onCloseTag(t);
|
|
2695
2787
|
},
|
|
2696
2788
|
onEnd: () => {
|
|
2697
|
-
if (!
|
|
2698
|
-
let e =
|
|
2699
|
-
|
|
2700
|
-
let t =
|
|
2701
|
-
return
|
|
2789
|
+
if (!B) return;
|
|
2790
|
+
let e = Ye.take();
|
|
2791
|
+
B = !1, H = !1, Ge = 0;
|
|
2792
|
+
let t = we(Ke);
|
|
2793
|
+
return Ke = "", qe = t, e ? {
|
|
2702
2794
|
t: "r",
|
|
2703
2795
|
v: {
|
|
2704
2796
|
type: "richText",
|
|
2705
|
-
data: { runs:
|
|
2797
|
+
data: { runs: $n(e, l?.get(sr)) }
|
|
2706
2798
|
}
|
|
2707
|
-
} :
|
|
2799
|
+
} : r(t);
|
|
2708
2800
|
},
|
|
2709
2801
|
onError: (e) => {}
|
|
2710
|
-
},
|
|
2711
|
-
},
|
|
2802
|
+
}, l, r, () => f, () => qe);
|
|
2803
|
+
}, lr = class {
|
|
2712
2804
|
static {
|
|
2713
2805
|
this.Collapsed = 1;
|
|
2714
2806
|
}
|
|
@@ -2739,157 +2831,157 @@ var Hn = {
|
|
|
2739
2831
|
static {
|
|
2740
2832
|
this.Spans = 512;
|
|
2741
2833
|
}
|
|
2742
|
-
},
|
|
2834
|
+
}, ur = (e, t, n) => {
|
|
2743
2835
|
if (e[0].value[0] === e[1].value[0]) return t;
|
|
2744
|
-
},
|
|
2836
|
+
}, dr = /^\s*TABLE\s*\(/i, fr = {
|
|
2745
2837
|
colStart: 0,
|
|
2746
2838
|
colEnd: 0,
|
|
2747
2839
|
rowStart: 0,
|
|
2748
2840
|
rowEnd: 0
|
|
2749
|
-
},
|
|
2750
|
-
let
|
|
2751
|
-
let t =
|
|
2841
|
+
}, pr = (e) => e === "1" || e === "true", mr = (e, t, n, r, a, o, s, c, l, u) => {
|
|
2842
|
+
let d = !1, f = [], p = s?.get(or), m = s?.get(sr), h = /* @__PURE__ */ new Map(), g = !1, v = [], y = !1, b = null, ee = null, te = null, x = null, ne = null, re = null, ie = s?.get("richData") ?? Ge.EmptyArray, ae = null, oe = !1, se = V.normalizeA1ToR1C1, ce = Ke.createConflatingRanges(), le = /* @__PURE__ */ new Map(), S = [], C = [], ue = !1, de = !1, fe = null, pe = (e) => {
|
|
2843
|
+
let t = s?.get("metadata")?.values;
|
|
2752
2844
|
if (!t) return;
|
|
2753
2845
|
let n = parseInt(e, 10);
|
|
2754
2846
|
if (!Number.isFinite(n) || n < 1) return;
|
|
2755
2847
|
let r = t[n - 1]?.get("XLRICHVALUE");
|
|
2756
|
-
return r?.richValueIndex === void 0 ? void 0 :
|
|
2757
|
-
},
|
|
2848
|
+
return r?.richValueIndex === void 0 ? void 0 : ie[r.richValueIndex];
|
|
2849
|
+
}, me = !1, he = Ke.createConflatingRanges(), ge, w = !1, T = -1, E = -1, D = null, _e = null, ve = (e) => ({
|
|
2758
2850
|
t: "r",
|
|
2759
2851
|
v: {
|
|
2760
2852
|
type: "hyperlink",
|
|
2761
2853
|
data: {
|
|
2762
|
-
address:
|
|
2854
|
+
address: ge,
|
|
2763
2855
|
friendly: e
|
|
2764
2856
|
}
|
|
2765
2857
|
}
|
|
2766
|
-
}),
|
|
2767
|
-
let r = e.name,
|
|
2768
|
-
if (
|
|
2858
|
+
}), ye = null, O = [], be = null, k = -2, Se = 0, A = "", Ce = "", we = "", j = "", M = "", N = "", Te = "", Ee = "", De = "", Oe = "", ke = "", Ae = "", je = "", Me = "", Ne = !0, Pe = null, P = !1, Fe = !1, Ie = !1, Le = null, Re = 0, F = (e) => {
|
|
2859
|
+
let r = e.name, i = r.indexOf(":");
|
|
2860
|
+
if (i !== -1 && (r = r.slice(i + 1)), Re++, Re % 196608 == 0 && a?.(Re), _e) {
|
|
2769
2861
|
let t = e.attributes;
|
|
2770
2862
|
switch (r) {
|
|
2771
2863
|
case "v":
|
|
2772
|
-
|
|
2864
|
+
g = !0;
|
|
2773
2865
|
break;
|
|
2774
2866
|
case "f":
|
|
2775
|
-
switch (
|
|
2867
|
+
switch (y = !0, t.t ?? null) {
|
|
2776
2868
|
case null:
|
|
2777
2869
|
case "normal": break;
|
|
2778
2870
|
case "shared":
|
|
2779
2871
|
let e = t.si;
|
|
2780
|
-
|
|
2872
|
+
ee = t.ref, b = e;
|
|
2781
2873
|
break;
|
|
2782
2874
|
case "array":
|
|
2783
|
-
|
|
2875
|
+
ee = t.ref, fe = ee;
|
|
2784
2876
|
break;
|
|
2785
2877
|
case "dataTable": {
|
|
2786
2878
|
let e = ((e, t, n) => {
|
|
2787
|
-
let r = e.r1, i =
|
|
2879
|
+
let r = e.r1, i = pr(e.del1);
|
|
2788
2880
|
if (!r && !i) return null;
|
|
2789
|
-
let a = e.ref ??
|
|
2881
|
+
let a = e.ref ?? V.cellToString({
|
|
2790
2882
|
rowIndex: t,
|
|
2791
2883
|
colIndex: n
|
|
2792
|
-
}), o =
|
|
2884
|
+
}), o = V.fastStringToRange(a);
|
|
2793
2885
|
if (!o) return null;
|
|
2794
2886
|
let s = { ref: {
|
|
2795
2887
|
rowStart: o.rowStart,
|
|
2796
2888
|
colStart: o.colStart,
|
|
2797
2889
|
rowEnd: o.rowEnd,
|
|
2798
2890
|
colEnd: o.colEnd
|
|
2799
|
-
} }, c =
|
|
2800
|
-
if (c ||
|
|
2891
|
+
} }, c = pr(e.dt2D);
|
|
2892
|
+
if (c || pr(e.dtr) ? (r && (s.rowInput = r), i && (s.rowInputDeleted = !0)) : (r && (s.columnInput = r), i && (s.columnInputDeleted = !0)), c) {
|
|
2801
2893
|
let t = e.r2;
|
|
2802
|
-
t && (s.columnInput = t),
|
|
2894
|
+
t && (s.columnInput = t), pr(e.del2) && (s.columnInputDeleted = !0);
|
|
2803
2895
|
}
|
|
2804
2896
|
return s;
|
|
2805
|
-
})(t,
|
|
2806
|
-
e && (
|
|
2897
|
+
})(t, T, E);
|
|
2898
|
+
e && (C.push(e), pr(t.ca) && he.append(T, E));
|
|
2807
2899
|
return;
|
|
2808
2900
|
}
|
|
2809
2901
|
}
|
|
2810
2902
|
let e = t.ca;
|
|
2811
|
-
e !== void 0 && (
|
|
2903
|
+
e !== void 0 && (me = e === "1");
|
|
2812
2904
|
break;
|
|
2813
2905
|
case "is":
|
|
2814
|
-
|
|
2906
|
+
w = !0;
|
|
2815
2907
|
return;
|
|
2816
2908
|
}
|
|
2817
|
-
|
|
2818
|
-
} else if (
|
|
2909
|
+
w && !y && o?.onOpenTag?.(e);
|
|
2910
|
+
} else if (d) {
|
|
2819
2911
|
if (r === "c") {
|
|
2820
|
-
|
|
2912
|
+
_e = e, ge = void 0;
|
|
2821
2913
|
let t = e.attributes, n = t.r;
|
|
2822
|
-
|
|
2914
|
+
E = n === void 0 ? E + 1 : V.fastStringToCol(n);
|
|
2823
2915
|
let r = t.t;
|
|
2824
|
-
r === void 0 ?
|
|
2916
|
+
r === void 0 ? ye = null : (ye = r, ye === "str" && (w = !0));
|
|
2825
2917
|
let i = t.s;
|
|
2826
|
-
i === void 0 && (
|
|
2827
|
-
colStart:
|
|
2828
|
-
rowStart:
|
|
2829
|
-
colEnd:
|
|
2830
|
-
rowEnd:
|
|
2918
|
+
i === void 0 && (Le !== null || Ie) && (i = "0"), i !== void 0 && (i = parseInt(i), Pe && Pe.value === i && Pe.colEnd + 1 === E ? Pe.colEnd = E : (Pe = {
|
|
2919
|
+
colStart: E,
|
|
2920
|
+
rowStart: T,
|
|
2921
|
+
colEnd: E,
|
|
2922
|
+
rowEnd: T,
|
|
2831
2923
|
value: i
|
|
2832
|
-
},
|
|
2924
|
+
}, v.push(Pe))), fe = null, de = !1, oe = !1;
|
|
2833
2925
|
let a = t.cm;
|
|
2834
|
-
|
|
2835
|
-
let t =
|
|
2926
|
+
ue = a !== void 0 && ((e) => {
|
|
2927
|
+
let t = s?.get("metadata")?.cells;
|
|
2836
2928
|
if (!t) return !1;
|
|
2837
2929
|
let n = parseInt(e, 10);
|
|
2838
2930
|
return !(!Number.isFinite(n) || n < 1) && !0 === t[n - 1]?.get("XLDAPR")?.fDynamic;
|
|
2839
2931
|
})(a);
|
|
2840
|
-
let
|
|
2841
|
-
if (
|
|
2842
|
-
let e =
|
|
2843
|
-
if (
|
|
2932
|
+
let o = t.vm;
|
|
2933
|
+
if (o !== void 0) {
|
|
2934
|
+
let e = pe(o);
|
|
2935
|
+
if (qe.isError(e)) {
|
|
2844
2936
|
let t = e.getCode();
|
|
2845
|
-
|
|
2937
|
+
D = {
|
|
2846
2938
|
t: "e",
|
|
2847
2939
|
v: t
|
|
2848
|
-
},
|
|
2940
|
+
}, ue && t === qe.Code.Spill && (de = !0);
|
|
2849
2941
|
}
|
|
2850
2942
|
}
|
|
2851
2943
|
}
|
|
2852
2944
|
} else {
|
|
2853
|
-
if (
|
|
2854
|
-
|
|
2945
|
+
if (Fe && r === "row") {
|
|
2946
|
+
d = !0;
|
|
2855
2947
|
let t = e.attributes.r;
|
|
2856
|
-
if (
|
|
2857
|
-
let e =
|
|
2858
|
-
e && e.max + 1 ===
|
|
2859
|
-
min:
|
|
2860
|
-
max:
|
|
2948
|
+
if (T = t === void 0 ? T + 1 : parseInt(t) - 1, E = -1, l?.()) {
|
|
2949
|
+
let e = f[f.length - 1];
|
|
2950
|
+
e && e.max + 1 === T ? e.max = T : f.push({
|
|
2951
|
+
min: T,
|
|
2952
|
+
max: T
|
|
2861
2953
|
});
|
|
2862
2954
|
}
|
|
2863
|
-
if (
|
|
2864
|
-
if (
|
|
2865
|
-
let e =
|
|
2866
|
-
|
|
2867
|
-
min:
|
|
2868
|
-
max:
|
|
2955
|
+
if (Se = 0, Ce = e.attributes.customHeight, Ce !== void 0 && (Se |= lr.CustomHeight), Ce !== De && (Ne = !0, De = Ce), A = e.attributes.ht, A !== void 0 && (Se |= lr.Ht), A !== Ee && (Ne = !0, Ee = A), we = e.attributes.hidden, we !== void 0 && (Se |= lr.Hidden), we !== Oe && (Ne = !0, Oe = we), M = e.attributes.s, M !== void 0 && (Se |= lr.S), M !== Ae && (Ne = !0, Ae = M), j = e.attributes.customFormat, j !== void 0 && (Se |= lr.CustomFormat), j !== ke && (Ne = !0, ke = j), N = e.attributes.outlineLevel, N !== void 0 && (Se |= lr.OutlineLevel), N !== je && (Ne = !0, je = N), Te = e.attributes.collapsed, Te !== void 0 && (Se |= lr.Collapsed), Te !== Me && (Ne = !0, Me = Te), Se !== 0) {
|
|
2956
|
+
if (k + 1 !== T || Ne) {
|
|
2957
|
+
let e = Ce !== void 0 && (Ce === "1" || Ce === "true"), t = j !== void 0 && (j === "1" || j === "true");
|
|
2958
|
+
Le = t && M !== void 0 ? M : null, t && Le === null && (Le = "0"), be = {
|
|
2959
|
+
min: T,
|
|
2960
|
+
max: T,
|
|
2869
2961
|
value: {
|
|
2870
|
-
sz:
|
|
2962
|
+
sz: A === void 0 ? -1 : parseFloat(A),
|
|
2871
2963
|
csz: e,
|
|
2872
|
-
h:
|
|
2873
|
-
s:
|
|
2874
|
-
l:
|
|
2875
|
-
cl:
|
|
2964
|
+
h: we !== void 0 && (we === "1" || we === "true"),
|
|
2965
|
+
s: Le === null ? void 0 : Le === "0" ? 0 : parseInt(Le),
|
|
2966
|
+
l: N === void 0 || N === "0" ? 0 : parseInt(N),
|
|
2967
|
+
cl: Te !== void 0 && (Te === "1" || Te === "true")
|
|
2876
2968
|
}
|
|
2877
|
-
},
|
|
2878
|
-
} else
|
|
2969
|
+
}, O.push(be);
|
|
2970
|
+
} else be.max = T;
|
|
2879
2971
|
}
|
|
2880
|
-
|
|
2972
|
+
k = T, Ne = !1;
|
|
2881
2973
|
return;
|
|
2882
2974
|
}
|
|
2883
|
-
if (r === "sheetData" && (
|
|
2884
|
-
|
|
2975
|
+
if (r === "sheetData" && (Fe = !0), !P && r === "sheetData") {
|
|
2976
|
+
P = !0;
|
|
2885
2977
|
let e = t.cols, n = e ? e.length : 0;
|
|
2886
|
-
for (let t = 0; !
|
|
2978
|
+
for (let t = 0; !Ie && t < n; t++) e[t].v.s && (Ie = !0);
|
|
2887
2979
|
}
|
|
2888
2980
|
n?.onOpenTag?.(e);
|
|
2889
2981
|
}
|
|
2890
|
-
},
|
|
2982
|
+
}, ze = (t) => {
|
|
2891
2983
|
let r = t.name;
|
|
2892
|
-
if (r === "sheetData" && (
|
|
2984
|
+
if (r === "sheetData" && (Fe = !1), !y || r !== "c" && r !== "f" || (b && (x = le.get(b) ?? null), x && (ge = ((e) => {
|
|
2893
2985
|
if (e.length < 11 || (32 | e.charCodeAt(0)) != 104 || !/^HYPERLINK\(/i.test(e)) return;
|
|
2894
2986
|
let t = 1, n = !1, r = 10;
|
|
2895
2987
|
for (; r < e.length && t > 0; r++) {
|
|
@@ -2899,37 +2991,37 @@ var Hn = {
|
|
|
2899
2991
|
if (t !== 0 || e.slice(r).trim().length > 0) return;
|
|
2900
2992
|
let i = /^HYPERLINK\(\s*"((?:[^"]|"")*)"\s*[,)]/i.exec(e);
|
|
2901
2993
|
return i ? i[1].replace(/""/g, "\"") : null;
|
|
2902
|
-
})(x[2]),
|
|
2994
|
+
})(x[2]), ce.append(T, E, x), me && he.append(T, E)), fe !== null && S.push([fe, ue ? de ? "error" : "dynamic" : "fixed"]), y = !1, x = null, b = null, ee = null, g = !1, me = !1, fe = null, ue = !1, de = !1), _e) {
|
|
2903
2995
|
let n = r.indexOf(":");
|
|
2904
|
-
if (n !== -1 && (r = r.slice(n + 1)),
|
|
2996
|
+
if (n !== -1 && (r = r.slice(n + 1)), w) {
|
|
2905
2997
|
if (r === "is" || r === "v") {
|
|
2906
|
-
let t =
|
|
2907
|
-
t == null ||
|
|
2908
|
-
} else r !== "f" &&
|
|
2998
|
+
let t = o?.onEnd?.();
|
|
2999
|
+
t == null || oe && u?.() === "" || e.pushAt(T, E, ge !== void 0 && typeof t == "number" ? ve(u?.() ?? "") : typeof t == "number" ? "" + t : t);
|
|
3000
|
+
} else r !== "f" && o?.onCloseTag?.(t);
|
|
2909
3001
|
}
|
|
2910
|
-
|
|
3002
|
+
g &&= !1, r === "c" && (_e = null, w = !1);
|
|
2911
3003
|
} else {
|
|
2912
|
-
if (
|
|
3004
|
+
if (d) return d = !1, void (Pe = null);
|
|
2913
3005
|
n?.onCloseTag?.(t);
|
|
2914
3006
|
}
|
|
2915
|
-
},
|
|
3007
|
+
}, Be = (t) => {
|
|
2916
3008
|
let i = t.trim();
|
|
2917
|
-
if (
|
|
2918
|
-
switch (
|
|
3009
|
+
if (g) {
|
|
3010
|
+
switch (D = null, ye) {
|
|
2919
3011
|
case null:
|
|
2920
3012
|
case "n":
|
|
2921
|
-
|
|
3013
|
+
D = st.flushSubnormal(parseFloat(i));
|
|
2922
3014
|
break;
|
|
2923
3015
|
case "b":
|
|
2924
|
-
|
|
3016
|
+
D = i === "1" || i === "true";
|
|
2925
3017
|
break;
|
|
2926
3018
|
case "s": {
|
|
2927
|
-
let e = parseInt(i, 10), t =
|
|
3019
|
+
let e = parseInt(i, 10), t = h.get(e);
|
|
2928
3020
|
if (t === void 0) {
|
|
2929
|
-
let n =
|
|
2930
|
-
t = n ?
|
|
3021
|
+
let n = p?.get(e);
|
|
3022
|
+
t = n ? $n(n, m) : null, h.set(e, t);
|
|
2931
3023
|
}
|
|
2932
|
-
|
|
3024
|
+
D = t ? {
|
|
2933
3025
|
t: "r",
|
|
2934
3026
|
v: {
|
|
2935
3027
|
type: "richText",
|
|
@@ -2941,12 +3033,12 @@ var Hn = {
|
|
|
2941
3033
|
case "d": {
|
|
2942
3034
|
let e = ((e, t = !1) => {
|
|
2943
3035
|
if (!e) return null;
|
|
2944
|
-
let n =
|
|
3036
|
+
let n = Jn.exec(e);
|
|
2945
3037
|
if (n) {
|
|
2946
3038
|
let [, e, t, r] = n;
|
|
2947
3039
|
return e === void 0 && t === void 0 && r === void 0 ? null : (3600 * parseFloat(e ?? "0") + 60 * parseFloat(t ?? "0") + parseFloat(r ?? "0")) / 86400;
|
|
2948
3040
|
}
|
|
2949
|
-
let r =
|
|
3041
|
+
let r = qn.exec(e);
|
|
2950
3042
|
if (!r) return null;
|
|
2951
3043
|
let [, i, a, o, s, c, l, u] = r;
|
|
2952
3044
|
if (i === void 0 && s === void 0) return null;
|
|
@@ -2954,31 +3046,31 @@ var Hn = {
|
|
|
2954
3046
|
if (i !== void 0) {
|
|
2955
3047
|
let e = parseInt(i, 10), n = parseInt(a, 10), r = parseInt(o, 10);
|
|
2956
3048
|
if (n < 1 || n > 12 || r < 1 || r > 31) return null;
|
|
2957
|
-
let s =
|
|
3049
|
+
let s = Yn(e, n, r) - Xn;
|
|
2958
3050
|
if (d = s <= 60 ? s - 1 : s, t && (d -= 1462), d < 0) return null;
|
|
2959
3051
|
}
|
|
2960
3052
|
return s !== void 0 && (d += (3600 * parseInt(s, 10) + 60 * parseInt(c, 10) + (l === void 0 ? 0 : parseInt(l, 10)) + (u === void 0 ? 0 : parseFloat(u))) / 86400), d;
|
|
2961
|
-
})(i, !0 ===
|
|
2962
|
-
e === null ?
|
|
2963
|
-
colIndex:
|
|
2964
|
-
rowIndex:
|
|
2965
|
-
})} is not a date this workbook can hold; kept as text.`, void 0, "xlsx.cell.isoDateText"),
|
|
3053
|
+
})(i, !0 === s?.get(ar));
|
|
3054
|
+
e === null ? c && (r?.(`Date '${i}' in cell ${V.cellToString({
|
|
3055
|
+
colIndex: E,
|
|
3056
|
+
rowIndex: T
|
|
3057
|
+
})} is not a date this workbook can hold; kept as text.`, void 0, "xlsx.cell.isoDateText"), D = "" + c(i)) : D = e;
|
|
2966
3058
|
break;
|
|
2967
3059
|
}
|
|
2968
3060
|
case "e":
|
|
2969
3061
|
if (i === "#VALUE!") {
|
|
2970
|
-
let e =
|
|
3062
|
+
let e = _e.attributes.vm;
|
|
2971
3063
|
if (e !== void 0) {
|
|
2972
|
-
let t =
|
|
2973
|
-
if (
|
|
2974
|
-
|
|
3064
|
+
let t = pe(e);
|
|
3065
|
+
if (qe.isError(t)) {
|
|
3066
|
+
D = {
|
|
2975
3067
|
t: "e",
|
|
2976
3068
|
v: t.getCode()
|
|
2977
3069
|
};
|
|
2978
3070
|
break;
|
|
2979
3071
|
}
|
|
2980
|
-
if (
|
|
2981
|
-
|
|
3072
|
+
if (ot.isJSON(t)) {
|
|
3073
|
+
D = {
|
|
2982
3074
|
t: "r",
|
|
2983
3075
|
v: t
|
|
2984
3076
|
};
|
|
@@ -2986,86 +3078,86 @@ var Hn = {
|
|
|
2986
3078
|
}
|
|
2987
3079
|
}
|
|
2988
3080
|
}
|
|
2989
|
-
let e =
|
|
2990
|
-
e ?
|
|
3081
|
+
let e = qe.getBuiltInByLabel(i);
|
|
3082
|
+
e ? D = {
|
|
2991
3083
|
t: "e",
|
|
2992
3084
|
v: e.getCode()
|
|
2993
|
-
} : (
|
|
2994
|
-
colIndex:
|
|
2995
|
-
rowIndex:
|
|
3085
|
+
} : (D = i, r?.(`Unknown formula error '${i}' in cell ${V.cellToString({
|
|
3086
|
+
colIndex: E,
|
|
3087
|
+
rowIndex: T
|
|
2996
3088
|
})}`));
|
|
2997
3089
|
break;
|
|
2998
3090
|
case "str":
|
|
2999
|
-
case "inlineStr":
|
|
3091
|
+
case "inlineStr": w = !0;
|
|
3000
3092
|
}
|
|
3001
|
-
|
|
3093
|
+
D !== null && e.pushAt(T, E, ge === void 0 || typeof D != "number" && typeof D != "boolean" ? D : ve(D));
|
|
3002
3094
|
}
|
|
3003
|
-
let
|
|
3004
|
-
if (
|
|
3005
|
-
if (
|
|
3095
|
+
let a = b !== null;
|
|
3096
|
+
if (b) {
|
|
3097
|
+
if (ne === b) x = re;
|
|
3006
3098
|
else {
|
|
3007
|
-
if (x =
|
|
3099
|
+
if (x = le.get(b) ?? null, !x) {
|
|
3008
3100
|
let e = [];
|
|
3009
|
-
|
|
3010
|
-
|
|
3101
|
+
te = se(i, T, E, e), x = [
|
|
3102
|
+
te,
|
|
3011
3103
|
e,
|
|
3012
3104
|
i
|
|
3013
|
-
],
|
|
3105
|
+
], le.set(b, x);
|
|
3014
3106
|
}
|
|
3015
|
-
|
|
3107
|
+
ne = b, re = x;
|
|
3016
3108
|
}
|
|
3017
|
-
|
|
3109
|
+
b = null;
|
|
3018
3110
|
}
|
|
3019
|
-
if (
|
|
3020
|
-
let e = i, t =
|
|
3111
|
+
if (y) {
|
|
3112
|
+
let e = i, t = a ? void 0 : s?.get(ir);
|
|
3021
3113
|
if (t) {
|
|
3022
3114
|
let n = ((e) => {
|
|
3023
|
-
if (e.length <
|
|
3024
|
-
let t =
|
|
3025
|
-
if (t === null || e.charCodeAt(t.end) !== 41 || e.charCodeAt(t.end + 1) !== 44 || e.charCodeAt(e.length - 1) !== 41) return
|
|
3115
|
+
if (e.length < Pn.length || e.slice(0, Pn.length).toUpperCase() !== Fn) return Ln;
|
|
3116
|
+
let t = zn(e, Pn.length);
|
|
3117
|
+
if (t === null || e.charCodeAt(t.end) !== 41 || e.charCodeAt(t.end + 1) !== 44 || e.charCodeAt(e.length - 1) !== 41) return Ln;
|
|
3026
3118
|
let n = t.value;
|
|
3027
|
-
return n.toUpperCase() ===
|
|
3119
|
+
return n.toUpperCase() === In ? Rn : n.length === 0 ? Ln : {
|
|
3028
3120
|
kind: "formula",
|
|
3029
3121
|
formula: n
|
|
3030
3122
|
};
|
|
3031
3123
|
})(i);
|
|
3032
|
-
n.kind !== "none" && (
|
|
3124
|
+
n.kind !== "none" && (ae ??= new Vn(t), n.kind === "spilled" ? oe = ae.placeholder(T, E) : ae.anchor(T, E, n.formula) && (e = n.formula, me ||= ((e) => Bn(e).some((e) => _(e) || !0 === Ye.get(e)?.getDeclaration().getReturnType()?.isVolatile()))(e)));
|
|
3033
3125
|
}
|
|
3034
|
-
if (
|
|
3126
|
+
if (oe) me = !1;
|
|
3035
3127
|
else {
|
|
3036
3128
|
let t = [];
|
|
3037
|
-
|
|
3038
|
-
|
|
3129
|
+
te = se(e, T, E, t), x = [
|
|
3130
|
+
te,
|
|
3039
3131
|
t,
|
|
3040
3132
|
e
|
|
3041
3133
|
];
|
|
3042
3134
|
}
|
|
3043
3135
|
}
|
|
3044
|
-
|
|
3045
|
-
},
|
|
3136
|
+
w ? o?.onText?.(t) : d || n?.onText?.(i);
|
|
3137
|
+
}, I = {
|
|
3046
3138
|
r: void 0,
|
|
3047
3139
|
t: void 0,
|
|
3048
3140
|
s: void 0,
|
|
3049
3141
|
cm: void 0,
|
|
3050
3142
|
vm: void 0
|
|
3051
|
-
},
|
|
3143
|
+
}, Ve = {
|
|
3052
3144
|
name: "c",
|
|
3053
|
-
attributes:
|
|
3145
|
+
attributes: I,
|
|
3054
3146
|
isSelfClosing: !1
|
|
3055
|
-
},
|
|
3147
|
+
}, L = {
|
|
3056
3148
|
t: void 0,
|
|
3057
3149
|
si: void 0,
|
|
3058
3150
|
ref: void 0,
|
|
3059
3151
|
ca: void 0
|
|
3060
|
-
},
|
|
3152
|
+
}, R = {
|
|
3061
3153
|
name: "f",
|
|
3062
|
-
attributes:
|
|
3154
|
+
attributes: L,
|
|
3063
3155
|
isSelfClosing: !1
|
|
3064
|
-
},
|
|
3156
|
+
}, He = {
|
|
3065
3157
|
name: "v",
|
|
3066
3158
|
attributes: {},
|
|
3067
3159
|
isSelfClosing: !1
|
|
3068
|
-
},
|
|
3160
|
+
}, z = {
|
|
3069
3161
|
r: void 0,
|
|
3070
3162
|
s: void 0,
|
|
3071
3163
|
ht: void 0,
|
|
@@ -3074,60 +3166,60 @@ var Hn = {
|
|
|
3074
3166
|
customHeight: void 0,
|
|
3075
3167
|
customFormat: void 0,
|
|
3076
3168
|
outlineLevel: void 0
|
|
3077
|
-
},
|
|
3169
|
+
}, Ue = {
|
|
3078
3170
|
name: "row",
|
|
3079
|
-
attributes:
|
|
3171
|
+
attributes: z,
|
|
3080
3172
|
isSelfClosing: !1
|
|
3081
|
-
},
|
|
3173
|
+
}, We = kn.NEED_MORE, B = kn.NOT_HANDLED, H = kn.decodeText, Je = !1, Xe = (e, t, n, r) => {
|
|
3082
3174
|
for (;;) {
|
|
3083
3175
|
let i = 0;
|
|
3084
3176
|
for (; t < n && ((i = e.charCodeAt(t)) === 32 || i === 9 || i === 10 || i === 13);) t++;
|
|
3085
|
-
if (t >= n) return
|
|
3177
|
+
if (t >= n) return We;
|
|
3086
3178
|
if (i === 62) return Je = !1, t + 1;
|
|
3087
|
-
if (i === 47) return t + 1 >= n ?
|
|
3179
|
+
if (i === 47) return t + 1 >= n ? We : e.charCodeAt(t + 1) === 62 ? (Je = !0, t + 2) : B;
|
|
3088
3180
|
let a = t;
|
|
3089
3181
|
for (; t < n && (i = e.charCodeAt(t)) !== 61;) {
|
|
3090
|
-
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return
|
|
3182
|
+
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return B;
|
|
3091
3183
|
t++;
|
|
3092
3184
|
}
|
|
3093
|
-
if (t + 1 >= n) return
|
|
3185
|
+
if (t + 1 >= n) return We;
|
|
3094
3186
|
let o = t - a, s = e.charCodeAt(t + 1);
|
|
3095
|
-
if (s !== 34 && s !== 39) return
|
|
3187
|
+
if (s !== 34 && s !== 39) return B;
|
|
3096
3188
|
let c = t + 2, l = c;
|
|
3097
3189
|
for (; l < n && (i = e.charCodeAt(l)) !== s;) {
|
|
3098
|
-
if (i === 38 || i < 32) return
|
|
3190
|
+
if (i === 38 || i < 32) return B;
|
|
3099
3191
|
l++;
|
|
3100
3192
|
}
|
|
3101
|
-
if (l >= n) return
|
|
3193
|
+
if (l >= n) return We;
|
|
3102
3194
|
t = l + 1;
|
|
3103
3195
|
let u = e.charCodeAt(a);
|
|
3104
3196
|
if (r === 2) switch (o) {
|
|
3105
3197
|
case 1:
|
|
3106
|
-
u === 114 ?
|
|
3198
|
+
u === 114 ? z.r = e.slice(c, l) : u === 115 && (z.s = e.slice(c, l));
|
|
3107
3199
|
break;
|
|
3108
3200
|
case 2:
|
|
3109
|
-
e.startsWith("ht", a) && (
|
|
3201
|
+
e.startsWith("ht", a) && (z.ht = e.slice(c, l));
|
|
3110
3202
|
break;
|
|
3111
3203
|
case 6:
|
|
3112
|
-
e.startsWith("hidden", a) && (
|
|
3204
|
+
e.startsWith("hidden", a) && (z.hidden = e.slice(c, l));
|
|
3113
3205
|
break;
|
|
3114
3206
|
case 9:
|
|
3115
|
-
e.startsWith("collapsed", a) && (
|
|
3207
|
+
e.startsWith("collapsed", a) && (z.collapsed = e.slice(c, l));
|
|
3116
3208
|
break;
|
|
3117
|
-
case 12: e.startsWith("customHeight", a) ?
|
|
3209
|
+
case 12: e.startsWith("customHeight", a) ? z.customHeight = e.slice(c, l) : e.startsWith("customFormat", a) ? z.customFormat = e.slice(c, l) : e.startsWith("outlineLevel", a) && (z.outlineLevel = e.slice(c, l));
|
|
3118
3210
|
}
|
|
3119
|
-
else if (r === 0) o === 1 ? u === 114 ?
|
|
3120
|
-
else if (o === 1) u === 116 && (
|
|
3211
|
+
else if (r === 0) o === 1 ? u === 114 ? I.r = e.slice(c, l) : u === 116 ? I.t = e.slice(c, l) : u === 115 && (I.s = e.slice(c, l)) : o === 2 && e.charCodeAt(a + 1) === 109 && (u === 99 ? I.cm = e.slice(c, l) : u === 118 && (I.vm = e.slice(c, l)));
|
|
3212
|
+
else if (o === 1) u === 116 && (L.t = e.slice(c, l));
|
|
3121
3213
|
else if (o === 2) {
|
|
3122
3214
|
let t = e.charCodeAt(a + 1);
|
|
3123
|
-
u === 115 && t === 105 ?
|
|
3124
|
-
} else o === 3 && e.startsWith("ref", a) && (
|
|
3215
|
+
u === 115 && t === 105 ? L.si = e.slice(c, l) : u === 99 && t === 97 && (L.ca = e.slice(c, l));
|
|
3216
|
+
} else o === 3 && e.startsWith("ref", a) && (L.ref = e.slice(c, l));
|
|
3125
3217
|
}
|
|
3126
|
-
},
|
|
3218
|
+
}, Ze = (e, t, n) => e.charCodeAt(t + 1) === 47 && e.charCodeAt(t + 2) === n && e.charCodeAt(t + 3) === 62;
|
|
3127
3219
|
return {
|
|
3128
3220
|
...n,
|
|
3129
3221
|
onEnd: () => {
|
|
3130
|
-
if (
|
|
3222
|
+
if (l?.()) {
|
|
3131
3223
|
let e = 0, t = [], n = (e, t) => ({
|
|
3132
3224
|
min: e,
|
|
3133
3225
|
max: t,
|
|
@@ -3140,16 +3232,16 @@ var Hn = {
|
|
|
3140
3232
|
cl: !1
|
|
3141
3233
|
}
|
|
3142
3234
|
});
|
|
3143
|
-
for (let r of
|
|
3144
|
-
e <=
|
|
3235
|
+
for (let r of f) r.min > e && t.push(n(e, r.min - 1)), e = Math.max(e, r.max + 1);
|
|
3236
|
+
e <= xe && t.push(n(e, xe)), t.length > 0 && (O.push(...t), O.sort((e, t) => e.min - t.min));
|
|
3145
3237
|
}
|
|
3146
|
-
|
|
3147
|
-
let r =
|
|
3238
|
+
O.length > 0 && (t.rows = V.runsToRefs(O, !1));
|
|
3239
|
+
let r = ce.done(ur);
|
|
3148
3240
|
r = ((e, t) => {
|
|
3149
3241
|
let n = null;
|
|
3150
3242
|
for (let t = 0; t < e.length; t++) {
|
|
3151
3243
|
let r = e[t];
|
|
3152
|
-
if (
|
|
3244
|
+
if (!dr.test(r.value[2])) continue;
|
|
3153
3245
|
n ??= /* @__PURE__ */ new Map();
|
|
3154
3246
|
let i = r.value[0], a = n.get(i);
|
|
3155
3247
|
a ? a.push(r) : n.set(i, [r]);
|
|
@@ -3168,121 +3260,121 @@ var Hn = {
|
|
|
3168
3260
|
n.rowStart < i.rowStart && (i.rowStart = n.rowStart), n.colStart < i.colStart && (i.colStart = n.colStart), n.rowEnd > i.rowEnd && (i.rowEnd = n.rowEnd), n.colEnd > i.colEnd && (i.colEnd = n.colEnd), a += (n.rowEnd - n.rowStart + 1) * (n.colEnd - n.colStart + 1);
|
|
3169
3261
|
}
|
|
3170
3262
|
if (a !== (i.rowEnd - i.rowStart + 1) * (i.colEnd - i.colStart + 1)) continue;
|
|
3171
|
-
let o =
|
|
3263
|
+
let o = Kn(V.resolveRelativeToA1(n.value[1], i.rowStart, i.colStart), i);
|
|
3172
3264
|
if (o) {
|
|
3173
3265
|
t.push(o);
|
|
3174
3266
|
for (let t = 0; t < e.length; t++) r.add(e[t]);
|
|
3175
3267
|
}
|
|
3176
3268
|
}
|
|
3177
3269
|
return r.size === 0 ? e : e.filter((e) => !r.has(e));
|
|
3178
|
-
})(r,
|
|
3179
|
-
let
|
|
3180
|
-
if (
|
|
3181
|
-
let e = Array(
|
|
3182
|
-
for (let t = 0; t <
|
|
3183
|
-
let n = r[t], i =
|
|
3270
|
+
})(r, C);
|
|
3271
|
+
let a = r.length;
|
|
3272
|
+
if (a > 0 || C.length > 0) {
|
|
3273
|
+
let e = Array(a);
|
|
3274
|
+
for (let t = 0; t < a; t++) {
|
|
3275
|
+
let n = r[t], i = V.rangeToString(n), a = n.value[1], o = V.resolveRelativeToA1(a, n.rowStart, n.colStart);
|
|
3184
3276
|
e[t] = [i, o];
|
|
3185
3277
|
}
|
|
3186
|
-
for (let t = 0; t <
|
|
3187
|
-
let n =
|
|
3188
|
-
e.push([
|
|
3278
|
+
for (let t = 0; t < C.length; t++) {
|
|
3279
|
+
let n = C[t], r = n.ref;
|
|
3280
|
+
e.push([V.cellToString({
|
|
3189
3281
|
rowIndex: r.rowStart,
|
|
3190
3282
|
colIndex: r.colStart
|
|
3191
|
-
}),
|
|
3283
|
+
}), i(n)]), S.push([V.rangeToString(r), "dynamic"]);
|
|
3192
3284
|
}
|
|
3193
3285
|
t.formulas = e;
|
|
3194
3286
|
}
|
|
3195
|
-
let
|
|
3196
|
-
if (
|
|
3197
|
-
let e = Array(
|
|
3198
|
-
for (let t = 0; t <
|
|
3199
|
-
let n =
|
|
3287
|
+
let o = he.done(!0), s = o.length;
|
|
3288
|
+
if (s > 0) {
|
|
3289
|
+
let e = Array(s);
|
|
3290
|
+
for (let t = 0; t < s; t++) {
|
|
3291
|
+
let n = o[t], r = V.rangeToString(n);
|
|
3200
3292
|
e[t] = r;
|
|
3201
3293
|
}
|
|
3202
3294
|
t.volatile = e;
|
|
3203
3295
|
}
|
|
3204
|
-
|
|
3205
|
-
let
|
|
3206
|
-
if (
|
|
3207
|
-
|
|
3208
|
-
let e =
|
|
3296
|
+
ae && S.push(...ae.getFormulaArray()), S.length > 0 && (t.formulaArray = [...S]);
|
|
3297
|
+
let c = v.length;
|
|
3298
|
+
if (c > 0) {
|
|
3299
|
+
v.sort(Ke.createRangeComparator(et.Axis.Column));
|
|
3300
|
+
let e = v[0], n = e.colStart, r = e.colEnd, i = e.rowEnd, a = e.value, o = [];
|
|
3209
3301
|
o.push(e);
|
|
3210
|
-
let
|
|
3211
|
-
for (let t = 1; t <
|
|
3302
|
+
let s = null;
|
|
3303
|
+
for (let t = 1; t < c; t++) s = v[t], a !== s.value || n !== s.colStart || r !== s.colEnd || i + 1 !== s.rowEnd ? (o.push(s), e = s, n = e.colStart, r = e.colEnd, i = e.rowEnd, a = e.value) : (i = s.rowEnd, e.rowEnd = i);
|
|
3212
3304
|
let l = o.length, u = Array(l);
|
|
3213
3305
|
for (let e = 0; e < l; e++) {
|
|
3214
|
-
let t = o[e], n =
|
|
3306
|
+
let t = o[e], n = V.rangeToString(t);
|
|
3215
3307
|
u[e] = [n, t.value];
|
|
3216
3308
|
}
|
|
3217
3309
|
t.directStyles = u;
|
|
3218
3310
|
}
|
|
3219
|
-
let
|
|
3220
|
-
|
|
3311
|
+
let u = e.build();
|
|
3312
|
+
u && (t.data = u.tuples), n?.onEnd?.();
|
|
3221
3313
|
},
|
|
3222
|
-
onOpenTag:
|
|
3223
|
-
onCloseTag:
|
|
3224
|
-
onText:
|
|
3314
|
+
onOpenTag: F,
|
|
3315
|
+
onCloseTag: ze,
|
|
3316
|
+
onText: Be,
|
|
3225
3317
|
elementScanners: [{
|
|
3226
3318
|
name: "c",
|
|
3227
3319
|
scan: (e, t, n) => {
|
|
3228
|
-
if (!
|
|
3229
|
-
|
|
3230
|
-
let r =
|
|
3320
|
+
if (!d || _e !== null) return B;
|
|
3321
|
+
I.r = I.t = I.s = I.cm = I.vm = void 0;
|
|
3322
|
+
let r = Xe(e, t + 2, n, 0);
|
|
3231
3323
|
if (r < 0) return r;
|
|
3232
|
-
let i =
|
|
3233
|
-
if (
|
|
3234
|
-
let a = !1, o = -1, s = -1, c = -1, l = -1,
|
|
3235
|
-
if (!Je) for (
|
|
3324
|
+
let i = I.t;
|
|
3325
|
+
if (I.r === void 0 || i === "str" || i === "inlineStr") return B;
|
|
3326
|
+
let a = !1, o = -1, s = -1, c = -1, l = -1, u = r;
|
|
3327
|
+
if (!Je) for (L.t = L.si = L.ref = L.ca = void 0;;) {
|
|
3236
3328
|
let t = e.indexOf("<", r);
|
|
3237
|
-
if (t === -1 || t + 3 >= n) return
|
|
3329
|
+
if (t === -1 || t + 3 >= n) return We;
|
|
3238
3330
|
for (let n = r; n < t; n++) {
|
|
3239
3331
|
let t = e.charCodeAt(n);
|
|
3240
|
-
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return
|
|
3332
|
+
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return B;
|
|
3241
3333
|
}
|
|
3242
|
-
let i = e.charCodeAt(t + 1),
|
|
3334
|
+
let i = e.charCodeAt(t + 1), d = e.charCodeAt(t + 2);
|
|
3243
3335
|
if (i === 47) {
|
|
3244
|
-
if (!
|
|
3245
|
-
|
|
3336
|
+
if (!Ze(e, t, 99)) return B;
|
|
3337
|
+
u = t + 4;
|
|
3246
3338
|
break;
|
|
3247
3339
|
}
|
|
3248
|
-
if (i === 102 && !a && c === -1 && (
|
|
3249
|
-
if (a = !0, r =
|
|
3250
|
-
if (
|
|
3340
|
+
if (i === 102 && !a && c === -1 && (d === 32 || d === 62 || d === 47)) {
|
|
3341
|
+
if (a = !0, r = Xe(e, t + 2, n, 1), r < 0) return r;
|
|
3342
|
+
if (L.t === "dataTable") return B;
|
|
3251
3343
|
if (Je) continue;
|
|
3252
3344
|
let i = e.indexOf("<", r);
|
|
3253
|
-
if (i === -1 || i + 3 >= n) return
|
|
3254
|
-
if (!
|
|
3345
|
+
if (i === -1 || i + 3 >= n) return We;
|
|
3346
|
+
if (!Ze(e, i, 102)) return B;
|
|
3255
3347
|
o = r, s = i, r = i + 4;
|
|
3256
|
-
} else if (i === 118 &&
|
|
3348
|
+
} else if (i === 118 && d === 62 && c === -1) {
|
|
3257
3349
|
let i = e.indexOf("<", t + 3);
|
|
3258
|
-
if (i === -1 || i + 3 >= n) return
|
|
3259
|
-
if (!
|
|
3350
|
+
if (i === -1 || i + 3 >= n) return We;
|
|
3351
|
+
if (!Ze(e, i, 118)) return B;
|
|
3260
3352
|
c = t + 3, l = i, r = i + 4;
|
|
3261
|
-
} else return
|
|
3353
|
+
} else return B;
|
|
3262
3354
|
}
|
|
3263
|
-
return
|
|
3355
|
+
return F(Ve), a && (F(R), s > o && Be(H(e.slice(o, s))), ze(R)), c !== -1 && (F(He), l > c && Be(H(e.slice(c, l))), ze(He)), ze(Ve), u;
|
|
3264
3356
|
}
|
|
3265
3357
|
}, {
|
|
3266
3358
|
name: "row",
|
|
3267
|
-
openTag:
|
|
3359
|
+
openTag: Ue,
|
|
3268
3360
|
scan: (e, t, n) => {
|
|
3269
|
-
if (!
|
|
3270
|
-
|
|
3271
|
-
let r =
|
|
3272
|
-
return r < 0 ? r : Je ||
|
|
3361
|
+
if (!Fe || d || _e !== null) return B;
|
|
3362
|
+
z.r = z.s = z.ht = z.hidden = z.collapsed = z.customHeight = z.customFormat = z.outlineLevel = void 0;
|
|
3363
|
+
let r = Xe(e, t + 4, n, 2);
|
|
3364
|
+
return r < 0 ? r : Je || z.r === void 0 ? B : (F(Ue), r);
|
|
3273
3365
|
}
|
|
3274
3366
|
}]
|
|
3275
3367
|
};
|
|
3276
|
-
},
|
|
3368
|
+
}, hr = /* @__PURE__ */ new Map([
|
|
3277
3369
|
["urn:schemas-microsoft-com:vml", "v"],
|
|
3278
3370
|
["urn:schemas-microsoft-com:office:office", "o"],
|
|
3279
3371
|
["urn:schemas-microsoft-com:office:excel", "x"]
|
|
3280
|
-
]),
|
|
3281
|
-
function
|
|
3372
|
+
]), gr = [...hr].map(([e, t]) => ` xmlns:${t}="${e}"`).join(""), _r = /<(\/?)([A-Za-z_][\w.-]*(?::[\w.-]+)?)((?:[^>"']|"[^"]*"|'[^']*')*?)(\/?)>/g, vr = /(\s+)([A-Za-z_][\w.-]*(?::[\w.-]+)?)(\s*=\s*)("[^"]*"|'[^']*')/g, yr = /\sxmlns(?::([\w.-]+))?\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
|
|
3373
|
+
function br(e) {
|
|
3282
3374
|
if (!e || !((e) => {
|
|
3283
3375
|
let t;
|
|
3284
|
-
for (
|
|
3285
|
-
let e =
|
|
3376
|
+
for (yr.lastIndex = 0; (t = yr.exec(e)) !== null;) {
|
|
3377
|
+
let e = hr.get(t[2] ?? t[3] ?? "");
|
|
3286
3378
|
if (e && e !== (t[1] ?? "")) return !0;
|
|
3287
3379
|
}
|
|
3288
3380
|
return !1;
|
|
@@ -3299,31 +3391,31 @@ function cr(e) {
|
|
|
3299
3391
|
let r = t[n].bindings.get(e);
|
|
3300
3392
|
if (r !== void 0) return r;
|
|
3301
3393
|
}
|
|
3302
|
-
})(a, n), s = o === void 0 ? void 0 :
|
|
3394
|
+
})(a, n), s = o === void 0 ? void 0 : hr.get(o);
|
|
3303
3395
|
return s ? `${s}:${i === -1 ? e : e.substring(i + 1)}` : null;
|
|
3304
|
-
}, r = !1, i = !1, a = e.replace(
|
|
3396
|
+
}, r = !1, i = !1, a = e.replace(_r, (e, a, o, s, c) => {
|
|
3305
3397
|
if (a) {
|
|
3306
3398
|
let r = t[t.length - 1], i = n(o, null, !1);
|
|
3307
3399
|
return r && r.name === o && (r.nested > 0 ? r.nested-- : t.pop()), i ? `</${i}>` : e;
|
|
3308
3400
|
}
|
|
3309
3401
|
let l = ((e) => {
|
|
3310
3402
|
let t, n = null;
|
|
3311
|
-
for (
|
|
3403
|
+
for (yr.lastIndex = 0; (t = yr.exec(e)) !== null;) (n ??= /* @__PURE__ */ new Map()).set(t[1] ?? "", t[2] ?? t[3] ?? "");
|
|
3312
3404
|
return n;
|
|
3313
3405
|
})(s);
|
|
3314
3406
|
l?.forEach((e, t) => {
|
|
3315
|
-
let n = [...
|
|
3407
|
+
let n = [...hr].find(([, e]) => e === t)?.[0];
|
|
3316
3408
|
n && n !== e && (r = !0);
|
|
3317
3409
|
});
|
|
3318
|
-
let u = n(o, l, !1), d = s.replace(
|
|
3410
|
+
let u = n(o, l, !1), d = s.replace(vr, (e, t, r, i, a) => {
|
|
3319
3411
|
if (r === "xmlns" || r.startsWith("xmlns:")) {
|
|
3320
3412
|
let t = a.slice(1, -1);
|
|
3321
|
-
return
|
|
3413
|
+
return hr.has(t) ? "" : e;
|
|
3322
3414
|
}
|
|
3323
3415
|
let o = n(r, l, !0);
|
|
3324
3416
|
return o ? `${t}${o}${i}${a}` : e;
|
|
3325
3417
|
});
|
|
3326
|
-
if (i || (i = !0, d = d.replace(/\s+$/, "") +
|
|
3418
|
+
if (i || (i = !0, d = d.replace(/\s+$/, "") + gr), !c) {
|
|
3327
3419
|
let e = t[t.length - 1];
|
|
3328
3420
|
l ? t.push({
|
|
3329
3421
|
name: o,
|
|
@@ -3335,7 +3427,7 @@ function cr(e) {
|
|
|
3335
3427
|
});
|
|
3336
3428
|
return r ? e : a;
|
|
3337
3429
|
}
|
|
3338
|
-
var
|
|
3430
|
+
var xr = {
|
|
3339
3431
|
creator: "author",
|
|
3340
3432
|
category: "category",
|
|
3341
3433
|
description: "comments",
|
|
@@ -3348,10 +3440,10 @@ var lr = {
|
|
|
3348
3440
|
revision: "revisionNumber",
|
|
3349
3441
|
subject: "subject",
|
|
3350
3442
|
title: "title"
|
|
3351
|
-
},
|
|
3443
|
+
}, Sr = {
|
|
3352
3444
|
Company: "company",
|
|
3353
3445
|
Manager: "manager"
|
|
3354
|
-
},
|
|
3446
|
+
}, Cr = {
|
|
3355
3447
|
lpwstr: U.Type.String,
|
|
3356
3448
|
lpstr: U.Type.String,
|
|
3357
3449
|
bstr: U.Type.String,
|
|
@@ -3371,8 +3463,8 @@ var lr = {
|
|
|
3371
3463
|
bool: U.Type.Boolean,
|
|
3372
3464
|
filetime: U.Type.Date,
|
|
3373
3465
|
date: U.Type.Date
|
|
3374
|
-
},
|
|
3375
|
-
let t = e.kind ?
|
|
3466
|
+
}, wr = (e) => {
|
|
3467
|
+
let t = e.kind ? Cr[e.kind] : void 0;
|
|
3376
3468
|
if (!t) return null;
|
|
3377
3469
|
let n = e.value.trim(), r;
|
|
3378
3470
|
if (t === U.Type.String) r = {
|
|
@@ -3406,36 +3498,184 @@ var lr = {
|
|
|
3406
3498
|
};
|
|
3407
3499
|
}
|
|
3408
3500
|
return e.linkTarget && (r.linkTarget = e.linkTarget), r;
|
|
3409
|
-
},
|
|
3501
|
+
}, Tr = "hiddenXfs", Er = (e) => (Array.isArray(e) ? e[1] : e?.v)?.s, Dr = (e) => {
|
|
3410
3502
|
if (!e || e.length === 0) return !1;
|
|
3411
|
-
let t =
|
|
3503
|
+
let t = V.refsToRuns(e, !0), n = 0;
|
|
3412
3504
|
for (let e of t) {
|
|
3413
3505
|
if (e.min > n || e.value?.s === void 0) return !1;
|
|
3414
3506
|
n = Math.max(n, e.max + 1);
|
|
3415
3507
|
}
|
|
3416
|
-
return n >
|
|
3417
|
-
},
|
|
3508
|
+
return n > Fe;
|
|
3509
|
+
}, Or = (e, t) => {
|
|
3418
3510
|
e.protection = {
|
|
3419
3511
|
...e.protection,
|
|
3420
3512
|
showFormulas: t
|
|
3421
3513
|
};
|
|
3422
|
-
},
|
|
3514
|
+
}, kr = "pivotButtonXfs", Ar = (e, t) => {
|
|
3515
|
+
let n = e.styles?.direct;
|
|
3516
|
+
if (!n || n.length === 0) return;
|
|
3517
|
+
let r = null, i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (e, o, s, c) => {
|
|
3518
|
+
let l = "";
|
|
3519
|
+
c && (l = a.get(c) ?? H.JSONStableStringify(c), a.set(c, l));
|
|
3520
|
+
let u = `${e}|${o ?? ""}|${s ?? ""}|${l}`, d = i.get(u);
|
|
3521
|
+
if (d !== void 0) return d;
|
|
3522
|
+
let f = n[e], p = f ? Mr(f, o, s, c) : null, m = t?.get(e);
|
|
3523
|
+
return d = p === f ? e : p || m !== void 0 ? ((e, i) => {
|
|
3524
|
+
if (!r) {
|
|
3525
|
+
r = /* @__PURE__ */ new Map();
|
|
3526
|
+
for (let e = 0; e < n.length; e++) {
|
|
3527
|
+
let i = H.JSONStableStringify(n[e]), a = t?.get(e);
|
|
3528
|
+
a !== void 0 && (i += `|${a}`), r.has(i) || r.set(i, e);
|
|
3529
|
+
}
|
|
3530
|
+
}
|
|
3531
|
+
let a = H.JSONStableStringify(e);
|
|
3532
|
+
i !== void 0 && (a += `|${i}`);
|
|
3533
|
+
let o = r.get(a);
|
|
3534
|
+
return o === void 0 && (o = n.length, n.push(e), r.set(a, o), i !== void 0 && t.set(o, i)), o;
|
|
3535
|
+
})(p ?? {}, m) : null, i.set(u, d), d;
|
|
3536
|
+
}, s = new Map((e.pivotCaches ?? []).map((e) => [e.cacheId, e.fields]));
|
|
3537
|
+
for (let t of e.sheets ?? []) {
|
|
3538
|
+
let e = l(t), n = e?.pivotTables, r = e?.directStyles;
|
|
3539
|
+
if (!e || !n || n.length === 0 || !r || r.length === 0) continue;
|
|
3540
|
+
let i = r, a = !1;
|
|
3541
|
+
for (let e of n) {
|
|
3542
|
+
let t = jr(e, s.get(e.cacheId));
|
|
3543
|
+
if (!t) continue;
|
|
3544
|
+
let n = [];
|
|
3545
|
+
for (let e of i) {
|
|
3546
|
+
let r = V.fastStringToRange(e[0]), i = zr(r, t.coords);
|
|
3547
|
+
if (!i) {
|
|
3548
|
+
n.push(e);
|
|
3549
|
+
continue;
|
|
3550
|
+
}
|
|
3551
|
+
a = !0;
|
|
3552
|
+
for (let t of Br(r, i)) n.push([V.rangeToString(t), e[1]]);
|
|
3553
|
+
let { rowIndex: s, colIndex: c } = t.origin;
|
|
3554
|
+
for (let r = i.rowStart; r <= i.rowEnd; r++) {
|
|
3555
|
+
let a = i.colStart, l = null, u = (e) => {
|
|
3556
|
+
l !== null && n.push([V.rangeToString({
|
|
3557
|
+
rowStart: r,
|
|
3558
|
+
rowEnd: r,
|
|
3559
|
+
colStart: a,
|
|
3560
|
+
colEnd: e
|
|
3561
|
+
}), l]);
|
|
3562
|
+
};
|
|
3563
|
+
for (let n = i.colStart; n <= i.colEnd; n++) {
|
|
3564
|
+
let { numberFormat: d, labelIndent: f, user: p } = t.formats.formatAt(r - s, n - c), m = o(e[1], d, f, p);
|
|
3565
|
+
n !== i.colStart && m === l || (n !== i.colStart && u(n - 1), a = n, l = m);
|
|
3566
|
+
}
|
|
3567
|
+
u(i.colEnd);
|
|
3568
|
+
}
|
|
3569
|
+
}
|
|
3570
|
+
i = n;
|
|
3571
|
+
}
|
|
3572
|
+
a && (e.directStyles = i);
|
|
3573
|
+
}
|
|
3574
|
+
}, jr = (e, t) => {
|
|
3575
|
+
let n = ft(e, t);
|
|
3576
|
+
if (!n || !e.location) return null;
|
|
3577
|
+
let r = V.fastStringToRange(e.location), i = {
|
|
3578
|
+
rowIndex: r.rowStart - n.top,
|
|
3579
|
+
colIndex: r.colStart
|
|
3580
|
+
};
|
|
3581
|
+
return i.rowIndex < 0 || r.rowEnd !== i.rowIndex + n.rows - 1 ? null : {
|
|
3582
|
+
coords: {
|
|
3583
|
+
rowStart: i.rowIndex,
|
|
3584
|
+
colStart: i.colIndex,
|
|
3585
|
+
rowEnd: r.rowEnd,
|
|
3586
|
+
colEnd: i.colIndex + n.columns - 1
|
|
3587
|
+
},
|
|
3588
|
+
origin: i,
|
|
3589
|
+
formats: n
|
|
3590
|
+
};
|
|
3591
|
+
}, Mr = (e, t, n, r) => {
|
|
3592
|
+
let i = e, a = r?.numberFormat ?? t ?? 0;
|
|
3593
|
+
if (e.numberFormat !== void 0 && Nr(e.numberFormat, a)) {
|
|
3594
|
+
let { numberFormat: e, ...t } = i;
|
|
3595
|
+
i = t;
|
|
3596
|
+
}
|
|
3597
|
+
let o = i.alignment;
|
|
3598
|
+
if (n !== null && o?.horizontal === tt.HorizontalAlignment.Left && (o.indent ?? 0) === n) {
|
|
3599
|
+
let { horizontal: e, indent: t, ...n } = o, { alignment: r, ...a } = i;
|
|
3600
|
+
i = Rr(n) ? a : {
|
|
3601
|
+
...a,
|
|
3602
|
+
alignment: n
|
|
3603
|
+
};
|
|
3604
|
+
}
|
|
3605
|
+
if (r) {
|
|
3606
|
+
let { numberFormat: e, ...t } = r;
|
|
3607
|
+
if (i = Ir(i, t), i.alignment && Rr(i.alignment)) {
|
|
3608
|
+
let { alignment: e, ...t } = i;
|
|
3609
|
+
i = t;
|
|
3610
|
+
}
|
|
3611
|
+
}
|
|
3612
|
+
if (i === e) return e;
|
|
3613
|
+
for (let e of Object.keys(i)) if (i[e] !== void 0 && (e !== "named" || i.named !== Xe.BuiltInName.Normal)) return i;
|
|
3614
|
+
return null;
|
|
3615
|
+
}, Nr = (e, t) => e === t || nt.toBuiltInID(e) === nt.toBuiltInID(t), Pr = (e) => typeof e == "object" && !!e && !Array.isArray(e), Fr = (e, t) => !(!Pr(e) || !Pr(t)) && (e.patternType === "solid" && t.patternType === "solid" ? e.foreground === t.foreground : H.JSONStableStringify(e) === H.JSONStableStringify(t)), Ir = (e, t) => {
|
|
3616
|
+
let n = null, r = (t, r) => {
|
|
3617
|
+
n ??= { ...e }, r === void 0 ? delete n[t] : n[t] = r;
|
|
3618
|
+
};
|
|
3619
|
+
for (let n of Object.keys(e)) {
|
|
3620
|
+
let i = e[n], a = t[n];
|
|
3621
|
+
if (a !== void 0 && i !== void 0) {
|
|
3622
|
+
if (n === "fill") Fr(i, a) && r(n);
|
|
3623
|
+
else if (Pr(i) && Pr(a)) {
|
|
3624
|
+
let e = Ir(i, a);
|
|
3625
|
+
e !== i && r(n, Object.keys(e).some((t) => e[t] !== void 0) ? e : void 0);
|
|
3626
|
+
} else i === a && r(n);
|
|
3627
|
+
}
|
|
3628
|
+
}
|
|
3629
|
+
return n ?? e;
|
|
3630
|
+
}, Lr = {
|
|
3631
|
+
vertical: tt.VerticalAlignment.Bottom,
|
|
3632
|
+
relativeIndent: 0,
|
|
3633
|
+
overflow: tt.Overflow.Visible,
|
|
3634
|
+
rotation: 0
|
|
3635
|
+
}, Rr = (e) => Object.keys(e).every((t) => e[t] === void 0 || Lr[t] === e[t]), zr = (e, t) => {
|
|
3636
|
+
let n = Math.max(e.rowStart, t.rowStart), r = Math.min(e.rowEnd, t.rowEnd), i = Math.max(e.colStart, t.colStart), a = Math.min(e.colEnd, t.colEnd);
|
|
3637
|
+
return n <= r && i <= a ? {
|
|
3638
|
+
rowStart: n,
|
|
3639
|
+
rowEnd: r,
|
|
3640
|
+
colStart: i,
|
|
3641
|
+
colEnd: a
|
|
3642
|
+
} : null;
|
|
3643
|
+
}, Br = (e, t) => {
|
|
3644
|
+
let n = [];
|
|
3645
|
+
return e.rowStart < t.rowStart && n.push({
|
|
3646
|
+
...e,
|
|
3647
|
+
rowEnd: t.rowStart - 1
|
|
3648
|
+
}), e.rowEnd > t.rowEnd && n.push({
|
|
3649
|
+
...e,
|
|
3650
|
+
rowStart: t.rowEnd + 1
|
|
3651
|
+
}), e.colStart < t.colStart && n.push({
|
|
3652
|
+
rowStart: t.rowStart,
|
|
3653
|
+
rowEnd: t.rowEnd,
|
|
3654
|
+
colStart: e.colStart,
|
|
3655
|
+
colEnd: t.colStart - 1
|
|
3656
|
+
}), e.colEnd > t.colEnd && n.push({
|
|
3657
|
+
rowStart: t.rowStart,
|
|
3658
|
+
rowEnd: t.rowEnd,
|
|
3659
|
+
colStart: t.colEnd + 1,
|
|
3660
|
+
colEnd: e.colEnd
|
|
3661
|
+
}), n;
|
|
3662
|
+
}, Vr = "xfComplements", Hr = (e, t) => {
|
|
3423
3663
|
if (typeof e == "string") return void t.push(e);
|
|
3424
3664
|
let n = Array.isArray(e) ? e : [e];
|
|
3425
3665
|
for (let e = 0; e < n.length; e++) {
|
|
3426
|
-
let r =
|
|
3666
|
+
let r = V.rangeToString(n[e]);
|
|
3427
3667
|
r && t.push(r);
|
|
3428
3668
|
}
|
|
3429
|
-
},
|
|
3669
|
+
}, Ur = (e) => {
|
|
3430
3670
|
let t = Array.isArray(e) ? e[1] : e.v;
|
|
3431
3671
|
if (!t || !("s" in t)) return;
|
|
3432
3672
|
let n = t.s;
|
|
3433
3673
|
return delete t.s, n;
|
|
3434
|
-
},
|
|
3674
|
+
}, Wr = (e, t, n, r) => {
|
|
3435
3675
|
if (!e) return;
|
|
3436
3676
|
let i = t ? 2 : 1, a = t ? n.rowStart : n.colStart, o = t ? n.rowEnd : n.colEnd, s, c = -1;
|
|
3437
3677
|
for (let n of e) {
|
|
3438
|
-
let e =
|
|
3678
|
+
let e = V.refToRun(n, t), l = Ur(n);
|
|
3439
3679
|
e && l !== void 0 ? l !== c || (t ? s.colEnd : s.rowEnd) + 1 !== e.min ? (s = {
|
|
3440
3680
|
colStart: t ? e.min : a,
|
|
3441
3681
|
rowStart: t ? a : e.min,
|
|
@@ -3447,7 +3687,7 @@ var lr = {
|
|
|
3447
3687
|
}
|
|
3448
3688
|
}, c = l, r.push(s)) : t ? s.colEnd = e.max : s.rowEnd = e.max : c = -1;
|
|
3449
3689
|
}
|
|
3450
|
-
},
|
|
3690
|
+
}, Gr = {
|
|
3451
3691
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": "workbooks",
|
|
3452
3692
|
"application/vnd.ms-excel.sheet.macroEnabled.main+xml": "workbooks",
|
|
3453
3693
|
"application/vnd.ms-excel.sheet.binary.macroEnabled.main": "workbooks",
|
|
@@ -3480,7 +3720,7 @@ var lr = {
|
|
|
3480
3720
|
"application/vnd.ms-excel.externalLink": "links",
|
|
3481
3721
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml": "links",
|
|
3482
3722
|
"application/vnd.openxmlformats-officedocument.theme+xml": "themes"
|
|
3483
|
-
},
|
|
3723
|
+
}, Kr = e({ readXLSX: () => Zr }), qr = (e) => e.startsWith("/") ? e.slice(1) : e, Jr = [
|
|
3484
3724
|
208,
|
|
3485
3725
|
207,
|
|
3486
3726
|
17,
|
|
@@ -3489,21 +3729,21 @@ var lr = {
|
|
|
3489
3729
|
177,
|
|
3490
3730
|
26,
|
|
3491
3731
|
225
|
|
3492
|
-
],
|
|
3493
|
-
let { password: i, onVBA:
|
|
3494
|
-
await
|
|
3495
|
-
let
|
|
3496
|
-
|
|
3732
|
+
], Yr = /^xl\/worksheets\/[^/]+\.xml$/i, Xr = (e) => typeof e == "string" ? e : (e?.runs ?? []).map((e) => e.text ?? "").join(""), Zr = async (e, n) => {
|
|
3733
|
+
let { password: i, onVBA: s, profile: f, calcOnLoad: p = "auto", createWorkbookOptions: h = {}, ...g } = n ?? {};
|
|
3734
|
+
await Je.load();
|
|
3735
|
+
let _ = !!h.origin && typeof h.origin != "string", v = f ? new kt(typeof f == "function" ? f : void 0) : null, y = [], ee = (e, t, n) => {
|
|
3736
|
+
y.push([
|
|
3497
3737
|
e,
|
|
3498
3738
|
t ?? "",
|
|
3499
3739
|
n
|
|
3500
3740
|
]);
|
|
3501
|
-
},
|
|
3502
|
-
if (
|
|
3503
|
-
|
|
3504
|
-
let t = Math.min(
|
|
3505
|
-
|
|
3506
|
-
} : void 0,
|
|
3741
|
+
}, te = { onWarning: ee }, ne = n?.progress, ae = ne?.onProgress ? ne.onProgress.bind(ne) : void 0, fe = e.byteLength, pe = 0, me = 0, he = ae ? (e) => {
|
|
3742
|
+
if (pe <= 0) return;
|
|
3743
|
+
me += e;
|
|
3744
|
+
let t = Math.min(fe, Math.round(me / pe * fe));
|
|
3745
|
+
ae(t, fe);
|
|
3746
|
+
} : void 0, ge = import("./ekV6d7YNDF6FkKLw.mjs"), w = null;
|
|
3507
3747
|
try {
|
|
3508
3748
|
w = new DOMParser();
|
|
3509
3749
|
} catch {}
|
|
@@ -3511,31 +3751,31 @@ var lr = {
|
|
|
3511
3751
|
try {
|
|
3512
3752
|
T = new XMLSerializer();
|
|
3513
3753
|
} catch {}
|
|
3514
|
-
let E, D,
|
|
3515
|
-
w || (O = import("./
|
|
3754
|
+
let E, D, ye, O = null;
|
|
3755
|
+
w || (O = import("./W3dYk6brWDUtMZca.mjs").then((e) => t(e.default, 1)));
|
|
3516
3756
|
try {
|
|
3517
|
-
let [e, t] = await Promise.all([O,
|
|
3518
|
-
E = new t.DOMTransformer(), D = w ?? new e.DOMParser(),
|
|
3757
|
+
let [e, t] = await Promise.all([O, ge]);
|
|
3758
|
+
E = new t.DOMTransformer(), D = w ?? new e.DOMParser(), ye = T ?? new e.XMLSerializer();
|
|
3519
3759
|
} catch (e) {
|
|
3520
3760
|
throw Error("Unable to load XLSX parser.", { cause: e });
|
|
3521
3761
|
}
|
|
3522
|
-
let
|
|
3762
|
+
let be = (e) => ye.serializeToString(e);
|
|
3523
3763
|
if (((e) => {
|
|
3524
|
-
if (e.byteLength <
|
|
3525
|
-
let t = new Uint8Array(e, 0,
|
|
3526
|
-
return
|
|
3527
|
-
})(e)) throw new
|
|
3528
|
-
let
|
|
3764
|
+
if (e.byteLength < Jr.length) return !1;
|
|
3765
|
+
let t = new Uint8Array(e, 0, Jr.length);
|
|
3766
|
+
return Jr.every((e, n) => t[n] === e);
|
|
3767
|
+
})(e)) throw new Ue("This is an Excel 97-2003 workbook (.xls), which cannot be read. Save it as '.xlsx' and try again.");
|
|
3768
|
+
let k;
|
|
3529
3769
|
try {
|
|
3530
|
-
|
|
3770
|
+
k = await Ot.create(e);
|
|
3531
3771
|
} catch (e) {
|
|
3532
|
-
throw new
|
|
3772
|
+
throw new Ue("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.", { cause: e });
|
|
3533
3773
|
}
|
|
3534
|
-
|
|
3774
|
+
v?.mark("zip-open");
|
|
3535
3775
|
try {
|
|
3536
|
-
if (!
|
|
3776
|
+
if (!k.has("[Content_Types].xml")) throw new Ue("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
3537
3777
|
let e = (e) => {
|
|
3538
|
-
let t =
|
|
3778
|
+
let t = k.getEntry(e);
|
|
3539
3779
|
return t ? { content: t } : void 0;
|
|
3540
3780
|
}, t = {
|
|
3541
3781
|
workbooks: [],
|
|
@@ -3571,7 +3811,7 @@ var lr = {
|
|
|
3571
3811
|
let t = r.ContentType, n = r.PartName;
|
|
3572
3812
|
if (!t || !n) return;
|
|
3573
3813
|
e.overrides[n.startsWith("/") ? n.slice(1) : n] = t;
|
|
3574
|
-
let i =
|
|
3814
|
+
let i = Gr[t], a = i ? e[i] : void 0;
|
|
3575
3815
|
Array.isArray(a) && a.push(n);
|
|
3576
3816
|
} else if (n === "Default") {
|
|
3577
3817
|
let t = r.Extension, n = r.ContentType;
|
|
@@ -3585,23 +3825,23 @@ var lr = {
|
|
|
3585
3825
|
t?.(`Error parsing content types: ${e?.message ?? e}`);
|
|
3586
3826
|
}
|
|
3587
3827
|
}))(t, (e) => {
|
|
3588
|
-
|
|
3589
|
-
}), n = await
|
|
3828
|
+
y.push([e, "[Content_Types].xml"]);
|
|
3829
|
+
}), n = await k.getTextStream("[Content_Types].xml");
|
|
3590
3830
|
if (!n) throw Error("Error parsing content types: '[Content_Types].xml'");
|
|
3591
3831
|
try {
|
|
3592
|
-
await
|
|
3832
|
+
await vn.parseStream(n, e, { xmlns: !1 });
|
|
3593
3833
|
} catch (e) {
|
|
3594
3834
|
throw Error("Error parsing content types: '[Content_Types].xml'", { cause: e });
|
|
3595
3835
|
}
|
|
3596
|
-
|
|
3836
|
+
_ && await k.getBuffer("[Content_Types].xml");
|
|
3597
3837
|
}
|
|
3598
|
-
|
|
3838
|
+
v?.mark("content-types");
|
|
3599
3839
|
let n = t.sst, i = /* @__PURE__ */ new Set();
|
|
3600
|
-
for (let e of t.sheets) i.add(
|
|
3601
|
-
n && i.add(
|
|
3602
|
-
for (let e of i)
|
|
3603
|
-
if (await
|
|
3604
|
-
let n =
|
|
3840
|
+
for (let e of t.sheets) i.add(qr(e));
|
|
3841
|
+
n && i.add(qr(n));
|
|
3842
|
+
for (let e of i) pe += k.uncompressedSize(e);
|
|
3843
|
+
if (await k.prefetch((e) => !i.has(e) && !Yr.test(e)), v?.mark("prefetch-side-parts"), t.workbooks.length === 0) {
|
|
3844
|
+
let n = ce("_rels/.rels", e, D, E, te);
|
|
3605
3845
|
if (n) {
|
|
3606
3846
|
for (let e of n.values()) if (e.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" && e.target) {
|
|
3607
3847
|
t.workbooks.push(e.target);
|
|
@@ -3609,74 +3849,79 @@ var lr = {
|
|
|
3609
3849
|
}
|
|
3610
3850
|
}
|
|
3611
3851
|
}
|
|
3612
|
-
if (t.workbooks.length === 0) throw new
|
|
3613
|
-
let
|
|
3852
|
+
if (t.workbooks.length === 0) throw new Ue("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
3853
|
+
let g = h?.resources ?? new at(), me = g.beginPersist(), ge = {}, w = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Map();
|
|
3614
3854
|
T.set("parseInlineDxf", (e) => {
|
|
3615
3855
|
if (!e) return;
|
|
3616
|
-
let t = D.parseFromString(`<dxf xmlns:x14="${
|
|
3856
|
+
let t = D.parseFromString(`<dxf xmlns:x14="${F}" xmlns:xm="${ve}">${e}</dxf>`, "text/xml")?.documentElement;
|
|
3617
3857
|
if (!t) return;
|
|
3618
|
-
let n = E.parseDxf(t, "",
|
|
3858
|
+
let n = E.parseDxf(t, "", te);
|
|
3619
3859
|
return Object.keys(n).length > 0 ? n : void 0;
|
|
3620
3860
|
});
|
|
3621
|
-
let
|
|
3622
|
-
|
|
3623
|
-
let O = /* @__PURE__ */ new Map(),
|
|
3624
|
-
|
|
3625
|
-
},
|
|
3861
|
+
let ye = P("metadata", t, e, D, E, te).entries().next()?.value?.[1]?.metadata;
|
|
3862
|
+
ye && T.set("metadata", ye), T.set(rr, r());
|
|
3863
|
+
let O = /* @__PURE__ */ new Map(), A = [], Ce = /* @__PURE__ */ new Set(), j = (e) => {
|
|
3864
|
+
Ce.add(qr(e));
|
|
3865
|
+
}, M = (t, n = O) => {
|
|
3626
3866
|
let r = t.lastIndexOf("/"), i = t.substring(0, r + 1) + "_rels/" + t.substring(r + 1, t.length) + ".rels", a = n.get(i);
|
|
3627
|
-
return a || (a =
|
|
3628
|
-
},
|
|
3629
|
-
let a =
|
|
3867
|
+
return a || (a = ce(i, e, D, E, R), n.set(i, a)), a;
|
|
3868
|
+
}, N = (t, n, r, i = O) => {
|
|
3869
|
+
let a = M(n, i).get(t), o = a?.target;
|
|
3630
3870
|
if (!o) return null;
|
|
3631
3871
|
if (a.targetMode === "External") {
|
|
3632
3872
|
if (!r) return a.target;
|
|
3633
|
-
let e =
|
|
3634
|
-
return e.addReference(
|
|
3873
|
+
let e = g.add({ source: { external: a.target } });
|
|
3874
|
+
return e.addReference(ge), w.add(e), me.toResourceId(e);
|
|
3635
3875
|
}
|
|
3636
3876
|
let s = n.lastIndexOf("/"), c = n.substring(0, s + 1);
|
|
3637
|
-
o.startsWith("/") || (o = c + o), o =
|
|
3638
|
-
let l = E?.getVisitorParamsState().get("dxfs"),
|
|
3639
|
-
if (!
|
|
3877
|
+
o.startsWith("/") || (o = c + o), o = le(o);
|
|
3878
|
+
let l = E?.getVisitorParamsState().get("dxfs"), f = i.get(o);
|
|
3879
|
+
if (!f) {
|
|
3640
3880
|
if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet") {
|
|
3641
3881
|
let e = {};
|
|
3642
|
-
|
|
3643
|
-
let t =
|
|
3644
|
-
|
|
3645
|
-
}, void 0, T), n = await
|
|
3882
|
+
f = e, A.push((async () => {
|
|
3883
|
+
let t = cr(e, (e, t) => t === "legacyDrawing" ? ke(e, o) : t === "formControl" ? Ae(e, o) : t === "part" ? je(e, o) : N(e, o, t === "resource") ?? null, Ze, l, () => {}, (e, t, n) => {
|
|
3884
|
+
ee(e, t ? `${t} (${o})` : o, n);
|
|
3885
|
+
}, void 0, T), n = await k.getTextStream(o, he);
|
|
3646
3886
|
if (n) try {
|
|
3647
|
-
await
|
|
3887
|
+
await vn.parseStream(n, t, {
|
|
3648
3888
|
xmlns: !1,
|
|
3649
3889
|
lean: !0
|
|
3650
3890
|
});
|
|
3651
3891
|
} catch (e) {
|
|
3652
3892
|
throw Error(`Error parsing sheet: '${o}'`, { cause: e });
|
|
3653
3893
|
}
|
|
3654
|
-
let r =
|
|
3894
|
+
let r = M(o, i);
|
|
3655
3895
|
if (r) {
|
|
3656
|
-
|
|
3896
|
+
De(e, o, r, i), Me(e), _e(e);
|
|
3657
3897
|
let t = [];
|
|
3658
3898
|
r.forEach((e, n) => {
|
|
3659
3899
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable") return;
|
|
3660
|
-
let r =
|
|
3900
|
+
let r = je(n, o, e.type, (e) => e !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition");
|
|
3661
3901
|
if (!r?.xml) return;
|
|
3662
3902
|
let i = /<pivotTableDefinition\b[^>]*>/.exec(r.xml)?.[0] ?? "", a = parseInt(/\scacheId="(\d+)"/.exec(i)?.[1] ?? "", 10);
|
|
3663
|
-
if (isNaN(a)) return void
|
|
3664
|
-
let s = /\sname="([^"]*)"/.exec(i)?.[1];
|
|
3903
|
+
if (isNaN(a)) return void y.push([`Pivot table '${r.name}' names no cache and was dropped.`, o]);
|
|
3904
|
+
let s = /\sname="([^"]*)"/.exec(i)?.[1], c = ue(r.xml);
|
|
3905
|
+
if (!c) return void y.push([`Pivot table '${r.name}' states no location and was dropped.`, o]);
|
|
3906
|
+
let l = E?.getVisitorParamsState(), d = de(l?.get("numFmts"), l?.get("dxfs")), f = S(r.xml, d), p = f ? void 0 : x(r.xml, d);
|
|
3665
3907
|
t.push({
|
|
3666
|
-
...s ? { name:
|
|
3908
|
+
...s ? { name: u(s) } : {},
|
|
3667
3909
|
cacheId: a,
|
|
3668
|
-
|
|
3910
|
+
location: c,
|
|
3911
|
+
part: r,
|
|
3912
|
+
...p ? { partFormats: p } : {},
|
|
3913
|
+
...f
|
|
3669
3914
|
});
|
|
3670
3915
|
}), t.length > 0 && (e.pivotTables = t);
|
|
3671
3916
|
}
|
|
3672
3917
|
})());
|
|
3673
3918
|
} else if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink") {
|
|
3674
|
-
let t =
|
|
3919
|
+
let t = m(o, e, D, E, R);
|
|
3675
3920
|
if (t && Object.keys(t).length !== 0) {
|
|
3676
3921
|
let e = t, n = e.__bookRelId, r = e.__absoluteUrlRelId;
|
|
3677
3922
|
delete e.__bookRelId, delete e.__absoluteUrlRelId;
|
|
3678
3923
|
let a = [];
|
|
3679
|
-
|
|
3924
|
+
M(o, i)?.forEach((e, t) => {
|
|
3680
3925
|
if (e.targetMode === "External" && e.type && e.target) {
|
|
3681
3926
|
let i = {
|
|
3682
3927
|
type: e.type,
|
|
@@ -3684,91 +3929,91 @@ var lr = {
|
|
|
3684
3929
|
};
|
|
3685
3930
|
t === n ? i.role = "book" : t === r && (i.role = "absoluteUrl"), a.push(i);
|
|
3686
3931
|
}
|
|
3687
|
-
}), a.sort((e, t) => (e.role === "book" ? 0 : 1) - (t.role === "book" ? 0 : 1)), e.sources = a,
|
|
3688
|
-
} else
|
|
3689
|
-
} else
|
|
3690
|
-
let n =
|
|
3691
|
-
return n.addReference(
|
|
3692
|
-
},
|
|
3932
|
+
}), a.sort((e, t) => (e.role === "book" ? 0 : 1) - (t.role === "book" ? 0 : 1)), e.sources = a, j(o), f = e;
|
|
3933
|
+
} else f = null;
|
|
3934
|
+
} else f = r ? d(o, e, (e, t) => {
|
|
3935
|
+
let n = g.add({ source: { buffer: e } });
|
|
3936
|
+
return n.addReference(ge), w.add(n), me.toResourceId(n);
|
|
3937
|
+
}, R) : m(o, e, D, E, R);
|
|
3693
3938
|
}
|
|
3694
|
-
return
|
|
3695
|
-
},
|
|
3939
|
+
return f;
|
|
3940
|
+
}, Ee = (e, t) => {
|
|
3696
3941
|
if (!e) return null;
|
|
3697
|
-
let n =
|
|
3942
|
+
let n = M(t, O)?.get(e);
|
|
3698
3943
|
if (!n?.target || n.targetMode === "External") return null;
|
|
3699
3944
|
let r = n.target;
|
|
3700
|
-
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r),
|
|
3701
|
-
},
|
|
3702
|
-
let i = [],
|
|
3945
|
+
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r), le(r);
|
|
3946
|
+
}, De = (e, t, n, r) => {
|
|
3947
|
+
let i = [], o = /* @__PURE__ */ new Map(), s = [];
|
|
3703
3948
|
n.forEach((e, n) => {
|
|
3704
3949
|
if (e.type !== "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment") return;
|
|
3705
|
-
let
|
|
3706
|
-
if (!
|
|
3707
|
-
for (let e = 0; e <
|
|
3708
|
-
let t =
|
|
3950
|
+
let a = N(n, t, !1, r)?.comments;
|
|
3951
|
+
if (!a) return;
|
|
3952
|
+
for (let e = 0; e < a.length; e++) {
|
|
3953
|
+
let t = a[e];
|
|
3709
3954
|
if (!t?.v?.id) continue;
|
|
3710
3955
|
let { parentId: n, done: r, content: c, ...l } = t.v, u = {
|
|
3711
3956
|
...l,
|
|
3712
|
-
content:
|
|
3957
|
+
content: Xr(c)
|
|
3713
3958
|
};
|
|
3714
3959
|
n ? s.push({
|
|
3715
3960
|
parentId: n,
|
|
3716
3961
|
json: u
|
|
3717
|
-
}) : (r && (u.done = !0),
|
|
3962
|
+
}) : (r && (u.done = !0), o.set(u.id, u), i.push({
|
|
3718
3963
|
r: t.r,
|
|
3719
3964
|
v: u
|
|
3720
3965
|
}));
|
|
3721
3966
|
}
|
|
3722
|
-
let c =
|
|
3723
|
-
c &&
|
|
3967
|
+
let c = Ee(n, t);
|
|
3968
|
+
c && j(c);
|
|
3724
3969
|
});
|
|
3725
3970
|
for (let e = 0; e < s.length; e++) {
|
|
3726
|
-
let { parentId: t, json: n } = s[e], r =
|
|
3971
|
+
let { parentId: t, json: n } = s[e], r = o.get(t);
|
|
3727
3972
|
r && (r.replies ??= []).push(n);
|
|
3728
3973
|
}
|
|
3729
|
-
let
|
|
3974
|
+
let l = [];
|
|
3730
3975
|
if (n.forEach((e, n) => {
|
|
3731
3976
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments") return;
|
|
3732
|
-
let i =
|
|
3733
|
-
if (!
|
|
3977
|
+
let i = N(n, t, !1, r), a = i?.comments;
|
|
3978
|
+
if (!a) return;
|
|
3734
3979
|
let s = i?.authors;
|
|
3735
|
-
for (let e = 0; e <
|
|
3736
|
-
let t =
|
|
3980
|
+
for (let e = 0; e < a.length; e++) {
|
|
3981
|
+
let t = a[e];
|
|
3737
3982
|
if (!t?.r) continue;
|
|
3738
3983
|
let n = s && t.v.authorId !== void 0 ? s[t.v.authorId] : void 0;
|
|
3739
3984
|
if (n && n.startsWith("tc=")) {
|
|
3740
|
-
if (
|
|
3985
|
+
if (o.has(C(n.substring(3)))) continue;
|
|
3741
3986
|
n = void 0;
|
|
3742
3987
|
}
|
|
3743
3988
|
let r = {
|
|
3744
|
-
id:
|
|
3989
|
+
id: z.uuidV4().toUpperCase(),
|
|
3745
3990
|
asNote: !0,
|
|
3746
3991
|
content: t.v.content ?? ""
|
|
3747
|
-
}, i = n ?
|
|
3748
|
-
i && (r.personId = i.id),
|
|
3992
|
+
}, i = n ? L({ displayName: n }) : void 0;
|
|
3993
|
+
i && (r.personId = i.id), l.push({
|
|
3749
3994
|
r: t.r,
|
|
3750
3995
|
v: r
|
|
3751
3996
|
});
|
|
3752
3997
|
}
|
|
3753
|
-
let
|
|
3754
|
-
|
|
3755
|
-
}), i.length === 0 &&
|
|
3756
|
-
let
|
|
3757
|
-
if (
|
|
3758
|
-
let { rest: t, notes: n } =
|
|
3998
|
+
let c = Ee(n, t);
|
|
3999
|
+
c && j(c);
|
|
4000
|
+
}), i.length === 0 && l.length === 0) return;
|
|
4001
|
+
let u = [...i, ...l], d = e.legacyDrawing;
|
|
4002
|
+
if (d?.xml) {
|
|
4003
|
+
let { rest: t, notes: n } = c(d.xml);
|
|
3759
4004
|
if (n.length > 0) {
|
|
3760
4005
|
let r = /* @__PURE__ */ new Map();
|
|
3761
4006
|
for (let e = 0; e < n.length; e++) {
|
|
3762
4007
|
let t = n[e];
|
|
3763
|
-
r.set(
|
|
4008
|
+
r.set(V.cellToString({
|
|
3764
4009
|
rowIndex: t.row,
|
|
3765
4010
|
colIndex: t.col
|
|
3766
4011
|
}), t);
|
|
3767
4012
|
}
|
|
3768
|
-
for (let e = 0; e <
|
|
3769
|
-
let t =
|
|
4013
|
+
for (let e = 0; e < u.length; e++) {
|
|
4014
|
+
let t = u[e], n = r.get(String(t.r).toUpperCase());
|
|
3770
4015
|
if (!n || (r.delete(String(t.r).toUpperCase()), !t.v.asNote)) continue;
|
|
3771
|
-
let i =
|
|
4016
|
+
let i = re(n.xml), a = {};
|
|
3772
4017
|
if (i.anchor) {
|
|
3773
4018
|
let [e, t, r, o, s, c, l, u] = i.anchor;
|
|
3774
4019
|
a.anchor = {
|
|
@@ -3792,54 +4037,54 @@ var lr = {
|
|
|
3792
4037
|
r.forEach((e) => {
|
|
3793
4038
|
i.push(e.xml);
|
|
3794
4039
|
});
|
|
3795
|
-
let
|
|
3796
|
-
|
|
4040
|
+
let o = a(t, i);
|
|
4041
|
+
o ? d.xml = o : delete e.legacyDrawing;
|
|
3797
4042
|
}
|
|
3798
4043
|
}
|
|
3799
|
-
e.comments =
|
|
3800
|
-
},
|
|
3801
|
-
let r =
|
|
4044
|
+
e.comments = u;
|
|
4045
|
+
}, ke = (t, n) => {
|
|
4046
|
+
let r = Ee(t, n);
|
|
3802
4047
|
if (!r) return null;
|
|
3803
|
-
let i = e(
|
|
4048
|
+
let i = e(qr(r));
|
|
3804
4049
|
if (!i) return null;
|
|
3805
|
-
let a = { xml:
|
|
3806
|
-
return
|
|
4050
|
+
let a = { xml: br(new TextDecoder("utf-8").decode(i.content)) }, o = [];
|
|
4051
|
+
return M(r, O)?.forEach((e, t) => {
|
|
3807
4052
|
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image") return;
|
|
3808
|
-
let n =
|
|
4053
|
+
let n = N(t, r, !0);
|
|
3809
4054
|
typeof n == "number" && o.push({
|
|
3810
4055
|
id: t,
|
|
3811
4056
|
resId: n
|
|
3812
4057
|
});
|
|
3813
|
-
}), o.length > 0 && (a.images = o),
|
|
3814
|
-
},
|
|
3815
|
-
let r =
|
|
4058
|
+
}), o.length > 0 && (a.images = o), j(r), a;
|
|
4059
|
+
}, Ae = (t, n) => {
|
|
4060
|
+
let r = Ee(t, n);
|
|
3816
4061
|
if (!r) return null;
|
|
3817
|
-
let i =
|
|
3818
|
-
return i &&
|
|
3819
|
-
},
|
|
3820
|
-
let s =
|
|
4062
|
+
let i = m(r, e, D, E, R)?.formControl ?? null;
|
|
4063
|
+
return i && j(r), i;
|
|
4064
|
+
}, je = (n, r, i, a, o = /* @__PURE__ */ new Set()) => {
|
|
4065
|
+
let s = Ee(n, r);
|
|
3821
4066
|
if (!s || o.has(s)) return null;
|
|
3822
|
-
let c = i ??
|
|
4067
|
+
let c = i ?? M(r, O)?.get(n)?.type;
|
|
3823
4068
|
if (!c) return null;
|
|
3824
|
-
let l = e(
|
|
4069
|
+
let l = e(qr(s));
|
|
3825
4070
|
if (!l) return null;
|
|
3826
4071
|
o.add(s);
|
|
3827
|
-
let u = s.substring(s.lastIndexOf("/") + 1), d = t.overrides[
|
|
4072
|
+
let u = s.substring(s.lastIndexOf("/") + 1), d = t.overrides[qr(s)] ?? t.defaults[u.substring(u.lastIndexOf(".") + 1).toLowerCase()], f = {
|
|
3828
4073
|
id: n,
|
|
3829
4074
|
type: c,
|
|
3830
4075
|
name: u
|
|
3831
4076
|
};
|
|
3832
4077
|
if (d && (f.contentType = d), ((e, t) => e ? e.endsWith("+xml") || e === "application/xml" : /\.(xml|rels|vml)$/i.test(t))(d, u)) f.xml = new TextDecoder("utf-8").decode(l.content);
|
|
3833
4078
|
else {
|
|
3834
|
-
let e =
|
|
4079
|
+
let e = N(n, r, !0);
|
|
3835
4080
|
if (typeof e != "number") return null;
|
|
3836
4081
|
f.resId = e;
|
|
3837
4082
|
}
|
|
3838
4083
|
let p = [];
|
|
3839
|
-
return
|
|
4084
|
+
return M(s, O)?.forEach((e, t) => {
|
|
3840
4085
|
if (!e?.type || a && !a(e.type)) return;
|
|
3841
4086
|
if (e.targetMode === "External") {
|
|
3842
|
-
let n =
|
|
4087
|
+
let n = N(t, s, !0);
|
|
3843
4088
|
typeof n == "number" && p.push({
|
|
3844
4089
|
id: t,
|
|
3845
4090
|
type: e.type,
|
|
@@ -3847,134 +4092,134 @@ var lr = {
|
|
|
3847
4092
|
});
|
|
3848
4093
|
return;
|
|
3849
4094
|
}
|
|
3850
|
-
let n =
|
|
4095
|
+
let n = je(t, s, e.type, a, o);
|
|
3851
4096
|
n && p.push(n);
|
|
3852
|
-
}), p.length > 0 && (f.parts = p),
|
|
3853
|
-
},
|
|
3854
|
-
|
|
3855
|
-
e?.custom &&
|
|
4097
|
+
}), p.length > 0 && (f.parts = p), j(s), f;
|
|
4098
|
+
}, Ne = P("coreprops", t, e, D, E, te), Pe = P("extprops", t, e, D, E, te), Ie = P("custprops", t, e, D, E, te);
|
|
4099
|
+
Ie.forEach((e, t) => {
|
|
4100
|
+
e?.custom && j(t);
|
|
3856
4101
|
});
|
|
3857
|
-
let
|
|
3858
|
-
if (
|
|
3859
|
-
let [e, t] =
|
|
3860
|
-
|
|
3861
|
-
}
|
|
3862
|
-
let
|
|
3863
|
-
if (e) return
|
|
3864
|
-
},
|
|
4102
|
+
let Re = new it(), ze = P("people", t, e, D, E, te);
|
|
4103
|
+
if (ze.size > 0) {
|
|
4104
|
+
let [e, t] = ze.entries().next().value;
|
|
4105
|
+
Re.fromJSON(t?.persons), j(e);
|
|
4106
|
+
}
|
|
4107
|
+
let L = (e) => {
|
|
4108
|
+
if (e) return Re.add(e).toJSON();
|
|
4109
|
+
}, R = {
|
|
3865
4110
|
paramMap: T,
|
|
3866
|
-
getRefs:
|
|
3867
|
-
getRef:
|
|
4111
|
+
getRefs: M,
|
|
4112
|
+
getRef: N,
|
|
3868
4113
|
parsedRefs: O,
|
|
3869
|
-
readEmbeddedPart: (e, t) =>
|
|
3870
|
-
addPerson:
|
|
3871
|
-
serializeElement:
|
|
3872
|
-
onWarning:
|
|
3873
|
-
},
|
|
3874
|
-
if (T.set(
|
|
3875
|
-
let e = await
|
|
4114
|
+
readEmbeddedPart: (e, t) => je(e, t),
|
|
4115
|
+
addPerson: L,
|
|
4116
|
+
serializeElement: be,
|
|
4117
|
+
onWarning: ee
|
|
4118
|
+
}, H = [], Ge = /* @__PURE__ */ new Map();
|
|
4119
|
+
if (T.set(or, Ge), n) {
|
|
4120
|
+
let e = await k.getTextStream(n, he);
|
|
3876
4121
|
if (e) {
|
|
3877
4122
|
let t = ((e, t) => {
|
|
3878
|
-
let n = !1, r = !1, i = 0, a = "", o = new
|
|
4123
|
+
let n = !1, r = !1, i = 0, a = "", o = new Qn();
|
|
3879
4124
|
return {
|
|
3880
4125
|
onOpenTag: (e) => {
|
|
3881
|
-
let t =
|
|
4126
|
+
let t = Zn(e.name);
|
|
3882
4127
|
t === "t" ? n && i === 0 && (r = !0) : t === "si" ? (n = !0, a = "", o.reset(), i = 0) : t === "rPh" || t === "phoneticPr" ? i++ : n && i === 0 && o.onOpenTag(t, e.attributes);
|
|
3883
4128
|
},
|
|
3884
4129
|
onText: (e) => {
|
|
3885
4130
|
r && (a += e, o.onText(e));
|
|
3886
4131
|
},
|
|
3887
4132
|
onCloseTag: (t) => {
|
|
3888
|
-
let s =
|
|
3889
|
-
s === "t" ? r = !1 : s === "si" ? (e(
|
|
4133
|
+
let s = Zn(t.name);
|
|
4134
|
+
s === "t" ? r = !1 : s === "si" ? (e(we(a), o.take() ?? void 0), n = !1, a = "") : s === "rPh" || s === "phoneticPr" ? i > 0 && i-- : o.onCloseTag(s);
|
|
3890
4135
|
},
|
|
3891
4136
|
onError: (e) => {
|
|
3892
4137
|
t?.(`Error parsing shared strings: ${e?.message ?? e}`);
|
|
3893
4138
|
}
|
|
3894
4139
|
};
|
|
3895
4140
|
})((e, t) => {
|
|
3896
|
-
t &&
|
|
4141
|
+
t && Ge.set(H.length, t), H.push(e);
|
|
3897
4142
|
}, (e) => {
|
|
3898
|
-
|
|
4143
|
+
ee(e, n);
|
|
3899
4144
|
});
|
|
3900
4145
|
try {
|
|
3901
|
-
await
|
|
4146
|
+
await vn.parseStream(e, t, { xmlns: !1 });
|
|
3902
4147
|
} catch (e) {
|
|
3903
4148
|
throw Error(`Error parsing shared strings: '${n}'`, { cause: e });
|
|
3904
4149
|
}
|
|
3905
4150
|
}
|
|
3906
4151
|
}
|
|
3907
|
-
|
|
3908
|
-
let
|
|
3909
|
-
let t =
|
|
4152
|
+
v?.mark("shared-strings");
|
|
4153
|
+
let Ke = H.length, qe = /* @__PURE__ */ new Map(), Je = Ke, Ze = (e) => {
|
|
4154
|
+
let t = qe.get(e);
|
|
3910
4155
|
if (t !== void 0) return t;
|
|
3911
|
-
let n =
|
|
3912
|
-
return
|
|
3913
|
-
},
|
|
3914
|
-
t.slicersCache =
|
|
3915
|
-
let
|
|
3916
|
-
for (let e = 0; e <
|
|
3917
|
-
let t =
|
|
3918
|
-
t && t.startsWith("xl/slicerCache") &&
|
|
3919
|
-
}
|
|
3920
|
-
let
|
|
3921
|
-
|
|
3922
|
-
e?.cacheName && (e.cachePath = t,
|
|
3923
|
-
}), T.set("slicerCaches",
|
|
3924
|
-
let
|
|
3925
|
-
t.slicers =
|
|
3926
|
-
for (let e = 0; e <
|
|
3927
|
-
let t =
|
|
3928
|
-
t && t.startsWith("xl/slicers/") && t.endsWith(".xml") &&
|
|
3929
|
-
}
|
|
3930
|
-
let
|
|
4156
|
+
let n = Je;
|
|
4157
|
+
return qe.set(e, Je++), H.push(e), n;
|
|
4158
|
+
}, Qe = [];
|
|
4159
|
+
t.slicersCache = Qe;
|
|
4160
|
+
let U = k.getNames(), $e = U.length;
|
|
4161
|
+
for (let e = 0; e < $e; e++) {
|
|
4162
|
+
let t = U[e];
|
|
4163
|
+
t && (t.startsWith("xl/slicerCache") || t.startsWith("xl/timelineCaches/") && t.endsWith(".xml")) && Qe.push(`/${t}`);
|
|
4164
|
+
}
|
|
4165
|
+
let et = P("slicersCache", t, e, D, E, R), tt = /* @__PURE__ */ new Map();
|
|
4166
|
+
et.forEach((e, t) => {
|
|
4167
|
+
e?.cacheName && (e.cachePath = t, tt.set(e.cacheName, e));
|
|
4168
|
+
}), T.set("slicerCaches", tt);
|
|
4169
|
+
let nt = [];
|
|
4170
|
+
t.slicers = nt;
|
|
4171
|
+
for (let e = 0; e < $e; e++) {
|
|
4172
|
+
let t = U[e];
|
|
4173
|
+
t && (t.startsWith("xl/slicers/") || t.startsWith("xl/timelines/")) && t.endsWith(".xml") && nt.push(`/${t}`);
|
|
4174
|
+
}
|
|
4175
|
+
let rt = {
|
|
3931
4176
|
getFile: e,
|
|
3932
4177
|
domParser: D,
|
|
3933
4178
|
getAddress: (e, t) => {
|
|
3934
|
-
let n =
|
|
4179
|
+
let n = N(t, e, !1);
|
|
3935
4180
|
return typeof n == "string" ? n : null;
|
|
3936
4181
|
},
|
|
3937
4182
|
getBytes: (t, n) => {
|
|
3938
|
-
let r =
|
|
4183
|
+
let r = Ee(n, t), i = r ? e(r.substring(1))?.content : void 0;
|
|
3939
4184
|
return i ? i.slice().buffer : null;
|
|
3940
4185
|
},
|
|
3941
4186
|
addFetched: (e, t) => {
|
|
3942
|
-
let n =
|
|
4187
|
+
let n = g.add({
|
|
3943
4188
|
source: { buffer: e },
|
|
3944
4189
|
fetchedFrom: t
|
|
3945
4190
|
});
|
|
3946
|
-
return n.addReference(
|
|
4191
|
+
return n.addReference(ge), w.add(n), me.toResourceId(n);
|
|
3947
4192
|
},
|
|
3948
|
-
markAbsorbed:
|
|
3949
|
-
},
|
|
3950
|
-
for (let e of
|
|
3951
|
-
let
|
|
4193
|
+
markAbsorbed: j
|
|
4194
|
+
}, ot = /* @__PURE__ */ new Map();
|
|
4195
|
+
for (let e of oe.getAll()) ot.set(e.structure, e.beginRead(rt));
|
|
4196
|
+
let st = ((e, t) => {
|
|
3952
4197
|
let n = (n) => {
|
|
3953
4198
|
let r = e(n);
|
|
3954
4199
|
return r ? t.parseFromString(new TextDecoder().decode(r.content), "text/xml").documentElement ?? null : null;
|
|
3955
|
-
}, r = G(n(
|
|
4200
|
+
}, r = G(n(_t), "s").map((e) => ({
|
|
3956
4201
|
t: e.getAttribute("t") ?? "",
|
|
3957
|
-
keys:
|
|
3958
|
-
})), i = G(n(
|
|
4202
|
+
keys: wt(e)
|
|
4203
|
+
})), i = G(n(vt), "rv").map((e) => {
|
|
3959
4204
|
let t = G(e, "fb")[0];
|
|
3960
4205
|
return {
|
|
3961
4206
|
s: parseInt(e.getAttribute("s") ?? "-1", 10),
|
|
3962
4207
|
values: G(e, "v").map((e) => e.textContent ?? ""),
|
|
3963
4208
|
fb: t ? t.textContent ?? "" : null
|
|
3964
4209
|
};
|
|
3965
|
-
}), a = G(n(
|
|
3966
|
-
let t =
|
|
4210
|
+
}), a = G(n(yt), "a").map((e) => {
|
|
4211
|
+
let t = Tt(e), n = parseInt(e.getAttribute("r") ?? "", 10), r = parseInt(e.getAttribute("c") ?? "", 10), i = n > 0 ? n : t.length;
|
|
3967
4212
|
return {
|
|
3968
4213
|
rows: i,
|
|
3969
4214
|
columns: r > 0 ? r : Math.max(1, Math.ceil(t.length / Math.max(1, i))),
|
|
3970
4215
|
items: t
|
|
3971
4216
|
};
|
|
3972
|
-
}), o = G(n(
|
|
4217
|
+
}), o = G(n(bt), "s").map(wt), s = n(xt), c = G(G(s, "spbArrays")[0], "a").map(Tt), l = G(G(s, "spbData")[0], "spb").map((e) => ({
|
|
3973
4218
|
s: parseInt(e.getAttribute("s") ?? "-1", 10),
|
|
3974
4219
|
values: G(e, "v").map((e) => e.textContent ?? "")
|
|
3975
|
-
})), u = n(
|
|
3976
|
-
for (let e of G(G(u, "types")[0], "type")) f.set(e.getAttribute("name") ?? "",
|
|
3977
|
-
let p = n(
|
|
4220
|
+
})), u = n(St), d = Et(G(G(u, "global")[0], "keyFlags")[0]), f = /* @__PURE__ */ new Map();
|
|
4221
|
+
for (let e of G(G(u, "types")[0], "type")) f.set(e.getAttribute("name") ?? "", Et(G(e, "keyFlags")[0]));
|
|
4222
|
+
let p = n(Ct), m = G(G(p, "dxfs")[0], "dxf").map((e) => G(e, "numFmt")[0]?.getAttribute("formatCode") ?? null), h = G(G(p, "richProperties")[0], "rPr").map((e) => e.getAttribute("n") ?? "");
|
|
3978
4223
|
return {
|
|
3979
4224
|
structures: r,
|
|
3980
4225
|
values: i,
|
|
@@ -3998,23 +4243,23 @@ var lr = {
|
|
|
3998
4243
|
};
|
|
3999
4244
|
})
|
|
4000
4245
|
};
|
|
4001
|
-
})(e, D),
|
|
4002
|
-
|
|
4246
|
+
})(e, D), ct = se(st, ot, (e) => {
|
|
4247
|
+
ee(e, "/xl/richData/rdrichvalue.xml");
|
|
4003
4248
|
});
|
|
4004
|
-
T.set("richData",
|
|
4005
|
-
for (let e = 0; e <
|
|
4006
|
-
let t =
|
|
4007
|
-
t.startsWith("xl/richData/") && !t.includes("/_rels/") &&
|
|
4008
|
-
}
|
|
4009
|
-
let
|
|
4010
|
-
if (
|
|
4011
|
-
let e =
|
|
4012
|
-
e?.value?.[1] && (
|
|
4013
|
-
}
|
|
4014
|
-
let
|
|
4015
|
-
|
|
4016
|
-
let
|
|
4017
|
-
T.set(
|
|
4249
|
+
T.set("richData", st.values.map((e, t) => ct.cellValue(t)));
|
|
4250
|
+
for (let e = 0; e < $e; e++) {
|
|
4251
|
+
let t = U[e];
|
|
4252
|
+
t.startsWith("xl/richData/") && !t.includes("/_rels/") && j(t);
|
|
4253
|
+
}
|
|
4254
|
+
let ut = P("themes", t, e, D, E, R), ft = null;
|
|
4255
|
+
if (ut && ut.entries) {
|
|
4256
|
+
let e = ut.entries().next();
|
|
4257
|
+
e?.value?.[1] && (ft = e.value[1]);
|
|
4258
|
+
}
|
|
4259
|
+
let pt = new lt(ft), ht = P("styles", t, e, D, E, R).entries().next()?.value?.[1];
|
|
4260
|
+
ht &&= JSON.parse(He.JSONStableStringify(ht));
|
|
4261
|
+
let gt = P("workbooks", t, e, D, E, R);
|
|
4262
|
+
T.set(ar, !0 === gt.entries().next().value?.[1]?.date1904), (h.calcOnLoad ?? p) !== "none" && T.set(ir, ((e, t) => {
|
|
4018
4263
|
let n = /* @__PURE__ */ new Set();
|
|
4019
4264
|
if (e) for (let t = 0; t < e.length; t++) n.add(String(e[t]?.name).toUpperCase());
|
|
4020
4265
|
if (t) for (let e = 0; e < t.length; e++) try {
|
|
@@ -4025,31 +4270,31 @@ var lr = {
|
|
|
4025
4270
|
}, /* @__PURE__ */ new Map());
|
|
4026
4271
|
for (let e of r.keys()) n.add(e.toUpperCase());
|
|
4027
4272
|
} catch {}
|
|
4028
|
-
return (e) => n.has(e) ||
|
|
4029
|
-
})(
|
|
4273
|
+
return (e) => n.has(e) || Ye.has(e);
|
|
4274
|
+
})(gt.entries().next().value?.[1]?.names, h.functions)), v?.mark("side-parts-json"), await Promise.all(A);
|
|
4030
4275
|
{
|
|
4031
|
-
let e =
|
|
4276
|
+
let e = gt.entries().next().value?.[1], t = r(e?.names), n = e?.sheets ?? [];
|
|
4032
4277
|
for (let e = 0; e < n.length; e++) {
|
|
4033
|
-
let r = n[e], i =
|
|
4278
|
+
let r = n[e], i = I(r);
|
|
4034
4279
|
if (r?.kind === "macro" && i?.part.xml) {
|
|
4035
|
-
i.part.xml =
|
|
4280
|
+
i.part.xml = Ve(i.part.xml, H);
|
|
4036
4281
|
continue;
|
|
4037
4282
|
}
|
|
4038
|
-
let a =
|
|
4039
|
-
a &&
|
|
4283
|
+
let a = l(r);
|
|
4284
|
+
a && Se(a, t);
|
|
4040
4285
|
}
|
|
4041
|
-
let
|
|
4042
|
-
if (
|
|
4043
|
-
let n =
|
|
4044
|
-
typeof n == "string" && (
|
|
4286
|
+
let i = e?.names;
|
|
4287
|
+
if (i) for (let e = 0; e < i.length; e++) {
|
|
4288
|
+
let n = i[e]?.ref;
|
|
4289
|
+
typeof n == "string" && (i[e].ref = t.readDetached(n));
|
|
4045
4290
|
}
|
|
4046
4291
|
}
|
|
4047
|
-
|
|
4048
|
-
let
|
|
4049
|
-
...
|
|
4050
|
-
styles:
|
|
4051
|
-
theme:
|
|
4052
|
-
},
|
|
4292
|
+
ae && pe > 0 && (ae(fe, fe), await new Promise((e) => setTimeout(e, 0))), v?.mark("sheets");
|
|
4293
|
+
let W = {
|
|
4294
|
+
...gt.entries().next().value?.[1],
|
|
4295
|
+
styles: ht,
|
|
4296
|
+
theme: pt.toJSON()
|
|
4297
|
+
}, Dt = ((e, t, n, r) => {
|
|
4053
4298
|
let i = {}, a = (e, t) => {
|
|
4054
4299
|
if (e) for (let { key: n, value: r } of e) {
|
|
4055
4300
|
let e = t[n];
|
|
@@ -4061,35 +4306,35 @@ var lr = {
|
|
|
4061
4306
|
}
|
|
4062
4307
|
}
|
|
4063
4308
|
};
|
|
4064
|
-
if (a(e,
|
|
4309
|
+
if (a(e, xr), a(t, Sr), n) {
|
|
4065
4310
|
let e = [];
|
|
4066
4311
|
for (let t of n) {
|
|
4067
|
-
let n =
|
|
4312
|
+
let n = wr(t);
|
|
4068
4313
|
n ? e.push(n) : r?.(`The custom document property '${t.key}' holds a value of a kind that is not read (${t.kind ? "vt:" + t.kind : "none"}); it was dropped.`, "xlsx.docProps.custom.kind");
|
|
4069
4314
|
}
|
|
4070
4315
|
e.length > 0 && (i.custom = e);
|
|
4071
4316
|
}
|
|
4072
4317
|
return Object.keys(i).length > 0 ? i : void 0;
|
|
4073
|
-
})(
|
|
4074
|
-
|
|
4318
|
+
})(Ne.values().next().value?.properties, Pe.values().next().value?.properties, Ie.values().next().value?.custom, (e, t) => {
|
|
4319
|
+
ee(e, "docProps/custom.xml", t);
|
|
4075
4320
|
});
|
|
4076
|
-
|
|
4321
|
+
Dt && (W.properties = Dt), ((e, t) => {
|
|
4077
4322
|
if (!t || t.size === 0) return;
|
|
4078
4323
|
let n = e.styles;
|
|
4079
4324
|
if (!n) return;
|
|
4080
4325
|
let r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
4081
4326
|
for (let n of e.sheets ?? []) {
|
|
4082
|
-
let e =
|
|
4327
|
+
let e = l(n);
|
|
4083
4328
|
if (!e) continue;
|
|
4084
4329
|
let a = /* @__PURE__ */ new Set();
|
|
4085
|
-
|
|
4330
|
+
Dr(e.cols) || a.add(0);
|
|
4086
4331
|
for (let t of e.directStyles ?? []) a.add(Array.isArray(t) ? t[1] : t.v);
|
|
4087
4332
|
for (let t of e.rows ?? []) {
|
|
4088
|
-
let e =
|
|
4333
|
+
let e = Er(t);
|
|
4089
4334
|
e !== void 0 && a.add(e);
|
|
4090
4335
|
}
|
|
4091
4336
|
for (let t of e.cols ?? []) {
|
|
4092
|
-
let e =
|
|
4337
|
+
let e = Er(t);
|
|
4093
4338
|
e !== void 0 && a.add(e);
|
|
4094
4339
|
}
|
|
4095
4340
|
let o = !1;
|
|
@@ -4107,37 +4352,63 @@ var lr = {
|
|
|
4107
4352
|
}
|
|
4108
4353
|
if (r.size === 0) return;
|
|
4109
4354
|
let a = n.direct ??= [];
|
|
4110
|
-
for (let e of r) e !== 0 &&
|
|
4111
|
-
for (let e of i) e !== 0 &&
|
|
4355
|
+
for (let e of r) e !== 0 && Or(a[e] ?? (a[e] = {}), !0);
|
|
4356
|
+
for (let e of i) e !== 0 && Or(a[e] ?? (a[e] = {}), !1);
|
|
4112
4357
|
if (r.has(0)) {
|
|
4113
|
-
let e = n.named ??= [], t =
|
|
4358
|
+
let e = n.named ??= [], t = Xe.BuiltInName.Normal.toLowerCase(), r = e.find((e) => e.name?.toLowerCase() === t);
|
|
4114
4359
|
r || (r = {
|
|
4115
|
-
name:
|
|
4360
|
+
name: Xe.BuiltInName.Normal,
|
|
4116
4361
|
style: {}
|
|
4117
|
-
}, e.push(r)),
|
|
4362
|
+
}, e.push(r)), Or(r.style, !0);
|
|
4363
|
+
}
|
|
4364
|
+
})(W, T.get(Tr)), ((e, t) => {
|
|
4365
|
+
if (t && t.size !== 0) for (let n of e.sheets ?? []) {
|
|
4366
|
+
let e = l(n), r = e?.pivotTables;
|
|
4367
|
+
if (!e || !r || r.length === 0) continue;
|
|
4368
|
+
let i = r.map(Oe), a = r.map(() => []);
|
|
4369
|
+
for (let [n, r] of e.directStyles ?? []) {
|
|
4370
|
+
if (!t.has(r)) continue;
|
|
4371
|
+
let e = V.fastStringToRange(n);
|
|
4372
|
+
for (let t = 0; t < i.length; t++) {
|
|
4373
|
+
let n = i[t];
|
|
4374
|
+
if (!n) continue;
|
|
4375
|
+
let r = Math.max(e.rowStart, n.rowStart), o = Math.min(e.rowEnd, n.rowEnd), s = Math.max(e.colStart, n.colStart), c = Math.min(e.colEnd, n.colEnd);
|
|
4376
|
+
if (r > o || s > c) continue;
|
|
4377
|
+
let l = V.rangeToString({
|
|
4378
|
+
rowStart: r - n.rowStart,
|
|
4379
|
+
rowEnd: o - n.rowStart,
|
|
4380
|
+
colStart: s - n.colStart,
|
|
4381
|
+
colEnd: c - n.colStart
|
|
4382
|
+
});
|
|
4383
|
+
l && a[t].push(l);
|
|
4384
|
+
}
|
|
4385
|
+
}
|
|
4386
|
+
for (let e = 0; e < r.length; e++) a[e].length > 0 && (r[e].buttons = a[e]);
|
|
4118
4387
|
}
|
|
4119
|
-
})(
|
|
4388
|
+
})(W, T.get(kr));
|
|
4389
|
+
let Ot = T.get(Vr);
|
|
4390
|
+
Ar(W, Ot), ((e) => {
|
|
4120
4391
|
let t = {
|
|
4121
4392
|
colStart: 0,
|
|
4122
4393
|
rowStart: 0,
|
|
4123
|
-
colEnd:
|
|
4124
|
-
rowEnd:
|
|
4394
|
+
colEnd: Fe,
|
|
4395
|
+
rowEnd: xe
|
|
4125
4396
|
};
|
|
4126
4397
|
for (let n of e.sheets ?? []) {
|
|
4127
|
-
let e =
|
|
4398
|
+
let e = l(n);
|
|
4128
4399
|
if (!e) continue;
|
|
4129
4400
|
let r = [];
|
|
4130
|
-
if (
|
|
4401
|
+
if (Wr(e.cols, !0, t, r), Wr(e.rows, !1, t, r), r.length === 0) continue;
|
|
4131
4402
|
let i = [];
|
|
4132
4403
|
for (let [t, n] of e.directStyles ?? []) i.push({
|
|
4133
|
-
...
|
|
4404
|
+
...V.fastStringToRange(t),
|
|
4134
4405
|
value: {
|
|
4135
4406
|
kind: 0,
|
|
4136
4407
|
index: n
|
|
4137
4408
|
}
|
|
4138
4409
|
});
|
|
4139
4410
|
i.push(...r);
|
|
4140
|
-
let a = [], o = new
|
|
4411
|
+
let a = [], o = new We.IteratorInstance(i, { axis: B.Column });
|
|
4141
4412
|
for (let e = o.next(); !e.done; e = o.next()) {
|
|
4142
4413
|
let n = e.value.overlaps, r;
|
|
4143
4414
|
if (n.length === 1) {
|
|
@@ -4150,101 +4421,64 @@ var lr = {
|
|
|
4150
4421
|
}
|
|
4151
4422
|
r = e ?? t ?? i;
|
|
4152
4423
|
}
|
|
4153
|
-
a.push([
|
|
4424
|
+
a.push([V.rangeToString(e.value.range, t), r.index]);
|
|
4154
4425
|
}
|
|
4155
4426
|
a.length > 0 ? e.directStyles = a : delete e.directStyles;
|
|
4156
4427
|
}
|
|
4157
|
-
})(
|
|
4158
|
-
|
|
4159
|
-
let
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
control: i,
|
|
4177
|
-
addresses: []
|
|
4178
|
-
}, n.set(a, o)), vr(e, o.addresses);
|
|
4179
|
-
}
|
|
4180
|
-
if (n.size === 0) continue;
|
|
4181
|
-
let i = [...e.cellControls ?? []];
|
|
4182
|
-
for (let { control: e, addresses: t } of n.values()) i.push({
|
|
4183
|
-
r: t.join(","),
|
|
4184
|
-
v: e
|
|
4185
|
-
});
|
|
4186
|
-
e.cellControls = i;
|
|
4428
|
+
})(W), Ot && ((e, t, n) => {
|
|
4429
|
+
if (!t || t.size === 0 || !n) return;
|
|
4430
|
+
let r = (e) => {
|
|
4431
|
+
if (e === void 0 || e === 0) return null;
|
|
4432
|
+
let r = t.get(e);
|
|
4433
|
+
return r === void 0 ? null : n.controls[r] ?? null;
|
|
4434
|
+
};
|
|
4435
|
+
for (let t of e.sheets ?? []) {
|
|
4436
|
+
let e = l(t);
|
|
4437
|
+
if (!e) continue;
|
|
4438
|
+
let n = /* @__PURE__ */ new Map();
|
|
4439
|
+
for (let t of e.directStyles ?? []) {
|
|
4440
|
+
let e = Array.isArray(t) ? t[0] : t.r, i = r(Array.isArray(t) ? t[1] : t.v);
|
|
4441
|
+
if (!i) continue;
|
|
4442
|
+
let a = JSON.stringify(i), o = n.get(a);
|
|
4443
|
+
o || (o = {
|
|
4444
|
+
control: i,
|
|
4445
|
+
addresses: []
|
|
4446
|
+
}, n.set(a, o)), Hr(e, o.addresses);
|
|
4187
4447
|
}
|
|
4188
|
-
|
|
4189
|
-
|
|
4448
|
+
if (n.size === 0) continue;
|
|
4449
|
+
let i = [...e.cellControls ?? []];
|
|
4450
|
+
for (let { control: e, addresses: t } of n.values()) i.push({
|
|
4451
|
+
r: t.join(","),
|
|
4452
|
+
v: e
|
|
4453
|
+
});
|
|
4454
|
+
e.cellControls = i;
|
|
4455
|
+
}
|
|
4456
|
+
})(W, Ot, P("featurePropertyBag", t, e, D, E, R).values().next().value?.featurePropertyBag);
|
|
4190
4457
|
{
|
|
4191
4458
|
let n = /* @__PURE__ */ new Map();
|
|
4192
|
-
|
|
4459
|
+
P("slicers", t, e, D, E, R).forEach((e, t) => {
|
|
4193
4460
|
e?.slicers && n.set(t, e.slicers);
|
|
4194
|
-
}),
|
|
4195
|
-
let n = e.sheets ?? [], r = /* @__PURE__ */ new Map();
|
|
4196
|
-
for (let e = 0; e < n.length; e++) {
|
|
4197
|
-
let t = n[e], i = h(t)?.tables ?? [];
|
|
4198
|
-
for (let e = 0; e < i.length; e++) {
|
|
4199
|
-
let t = i[e], n = Array.isArray(t) ? t[1] : t?.v;
|
|
4200
|
-
if (!n?.id) continue;
|
|
4201
|
-
let a = (n.columns ?? []).map((e) => typeof e == "string" ? { name: e } : e);
|
|
4202
|
-
r.set(String(n.id), {
|
|
4203
|
-
name: n.name ?? "",
|
|
4204
|
-
columns: a
|
|
4205
|
-
});
|
|
4206
|
-
}
|
|
4207
|
-
}
|
|
4208
|
-
let i = /* @__PURE__ */ new Set();
|
|
4209
|
-
for (let e = 0; e < n.length; e++) {
|
|
4210
|
-
let a = n[e], o = h(a);
|
|
4211
|
-
if (!o) continue;
|
|
4212
|
-
let s = o.slicers, c = o.movables;
|
|
4213
|
-
if (s && c) for (let e = c.length - 1; e >= 0; e--) {
|
|
4214
|
-
let n = c[e].content;
|
|
4215
|
-
if (n?.type !== "slicer" || n.json?.source) continue;
|
|
4216
|
-
let a = n.name ?? "", o = s[a];
|
|
4217
|
-
if (!o?.tableId) continue;
|
|
4218
|
-
let l = r.get(String(o.tableId)), u = l ? rt(l.columns, o.columnId) : null;
|
|
4219
|
-
l && u ? (n.json = it(o, n.json, He.structuredReference(l.name, u.name)), i.add(a), o.cachePath && t.markAbsorbed(o.cachePath)) : (t.warn("A slicer names no table; it was not imported.", "xlsx.slicer.cacheDefinition"), c.splice(e, 1));
|
|
4220
|
-
}
|
|
4221
|
-
delete o.slicers;
|
|
4222
|
-
}
|
|
4223
|
-
t.slicerParts.forEach((e, n) => {
|
|
4224
|
-
let r = Object.keys(e);
|
|
4225
|
-
r.length > 0 && r.every((e) => i.has(e)) && t.markAbsorbed(n);
|
|
4226
|
-
});
|
|
4227
|
-
}(K, {
|
|
4461
|
+
}), mt(W, {
|
|
4228
4462
|
warn: (e, t) => {
|
|
4229
|
-
|
|
4463
|
+
ee(e, "xl/slicers", t);
|
|
4230
4464
|
},
|
|
4231
|
-
markAbsorbed:
|
|
4465
|
+
markAbsorbed: j,
|
|
4232
4466
|
slicerParts: n
|
|
4233
4467
|
});
|
|
4234
4468
|
}
|
|
4235
|
-
|
|
4236
|
-
...
|
|
4469
|
+
W.calc = {
|
|
4470
|
+
...W.calc ?? {},
|
|
4237
4471
|
legacyIntersect: !0
|
|
4238
|
-
},
|
|
4239
|
-
let
|
|
4240
|
-
|
|
4241
|
-
let
|
|
4242
|
-
if (
|
|
4243
|
-
let { VBAProject: e } = await import("./
|
|
4472
|
+
}, H.length > 0 && (W.strings = H);
|
|
4473
|
+
let kt = Re.toJSON();
|
|
4474
|
+
kt && kt.length > 0 && (W.people = kt);
|
|
4475
|
+
let At = k.getEntry("xl/vbaProject.bin");
|
|
4476
|
+
if (At) try {
|
|
4477
|
+
let { VBAProject: e } = await import("./X5YJn8ZwrgDKMwwO.mjs"), t = e.extract(At);
|
|
4244
4478
|
if (t) {
|
|
4245
4479
|
let n = /* @__PURE__ */ new Map();
|
|
4246
|
-
for (let e of
|
|
4247
|
-
let t =
|
|
4480
|
+
for (let e of W.sheets ?? []) {
|
|
4481
|
+
let t = l(e), r = t?.codeName;
|
|
4248
4482
|
r && n.set(r, t);
|
|
4249
4483
|
}
|
|
4250
4484
|
for (let r of t.modules) {
|
|
@@ -4252,37 +4486,37 @@ var lr = {
|
|
|
4252
4486
|
a && (t.source = a), i && (t.sourceHeader = i);
|
|
4253
4487
|
let o = r.type === "document" ? n.get(r.name) : void 0;
|
|
4254
4488
|
o || r.type !== "document" || (t.scope = "workbook");
|
|
4255
|
-
let s = o ? o.modules ??= {} :
|
|
4489
|
+
let s = o ? o.modules ??= {} : W.modules ??= {};
|
|
4256
4490
|
s[r.name] || (s[r.name] = t);
|
|
4257
4491
|
}
|
|
4258
|
-
|
|
4259
|
-
} else
|
|
4492
|
+
s?.(t);
|
|
4493
|
+
} else y.push(["Unable to parse VBA project.", "xl/vbaProject.bin"]);
|
|
4260
4494
|
} catch (e) {
|
|
4261
|
-
|
|
4495
|
+
y.push([`Error extracting VBA: ${e?.message ?? e}`, "xl/vbaProject.bin"]);
|
|
4262
4496
|
}
|
|
4263
|
-
let
|
|
4264
|
-
...
|
|
4265
|
-
calcOnLoad:
|
|
4266
|
-
resources:
|
|
4267
|
-
json:
|
|
4497
|
+
let jt = T.get("calcId"), Mt = jt === void 0 || !(Number(jt) >= 191029), Nt = h.calcOnLoad ?? (p === "auto" && Mt ? "full" : p), Pt = {
|
|
4498
|
+
...h,
|
|
4499
|
+
calcOnLoad: Nt,
|
|
4500
|
+
resources: g,
|
|
4501
|
+
json: W
|
|
4268
4502
|
};
|
|
4269
|
-
if (
|
|
4270
|
-
let e = T.get(
|
|
4271
|
-
|
|
4272
|
-
}
|
|
4273
|
-
|
|
4274
|
-
let
|
|
4275
|
-
if (
|
|
4276
|
-
e.deleteReference(
|
|
4277
|
-
}),
|
|
4278
|
-
|
|
4503
|
+
if (Pt.disableLoadAutoFit === void 0) {
|
|
4504
|
+
let e = T.get(Le);
|
|
4505
|
+
Pt.disableLoadAutoFit = !!e?.declared && e.normalIsThemeFont && await Te(e.faces);
|
|
4506
|
+
}
|
|
4507
|
+
v?.mark("json-assembled");
|
|
4508
|
+
let Ft = new dt(Pt);
|
|
4509
|
+
if (v?.mark("workbook-constructed"), w.forEach((e) => {
|
|
4510
|
+
e.deleteReference(ge);
|
|
4511
|
+
}), me.endPersist(), _) {
|
|
4512
|
+
o(Ft);
|
|
4279
4513
|
let e = /* @__PURE__ */ new Map(), t = 0;
|
|
4280
|
-
for (let n of
|
|
4281
|
-
let r =
|
|
4514
|
+
for (let n of k.getNames()) {
|
|
4515
|
+
let r = k.getEntry(n);
|
|
4282
4516
|
if (!r) continue;
|
|
4283
|
-
let i =
|
|
4517
|
+
let i = k.getRawEntry(n), a = i ? {
|
|
4284
4518
|
data: r,
|
|
4285
|
-
uncompressedSize:
|
|
4519
|
+
uncompressedSize: k.uncompressedSize(n),
|
|
4286
4520
|
raw: {
|
|
4287
4521
|
compressedData: i.data,
|
|
4288
4522
|
compressionMethod: i.compressionMethod,
|
|
@@ -4290,39 +4524,39 @@ var lr = {
|
|
|
4290
4524
|
}
|
|
4291
4525
|
} : {
|
|
4292
4526
|
data: r,
|
|
4293
|
-
uncompressedSize:
|
|
4527
|
+
uncompressedSize: k.uncompressedSize(n)
|
|
4294
4528
|
};
|
|
4295
4529
|
e.set(n, a), t += r.byteLength;
|
|
4296
4530
|
}
|
|
4297
|
-
if (t > 67108864)
|
|
4531
|
+
if (t > 67108864) y.push([`Source package too large to retain (${t} bytes, limit ${Be}); unmodeled parts will be dropped on save.`, "SourcePackage"]);
|
|
4298
4532
|
else if (e.size > 0) {
|
|
4299
|
-
let t = new
|
|
4300
|
-
|
|
4301
|
-
let n =
|
|
4533
|
+
let t = new ie(e, Ce);
|
|
4534
|
+
b(Ft, t);
|
|
4535
|
+
let n = Ft.getWorksheets().getItems(), r = Ft.getTransactions().addListener({ onCommitEnd: (e) => {
|
|
4302
4536
|
let n = e.getOperation()?.name;
|
|
4303
4537
|
n !== "insertCells" && n !== "deleteCells" || t.markStructuralChange();
|
|
4304
|
-
} }),
|
|
4305
|
-
let e =
|
|
4538
|
+
} }), i = Ft.addListeners({ onSheetsChange: () => {
|
|
4539
|
+
let e = Ft.getWorksheets().getItems();
|
|
4306
4540
|
(e.length !== n.length || e.some((e, t) => e !== n[t])) && t.markStructuralChange(), n = e;
|
|
4307
4541
|
} });
|
|
4308
|
-
|
|
4309
|
-
|
|
4542
|
+
Ft.addListeners({ onClose: () => {
|
|
4543
|
+
r(), i(), o(Ft);
|
|
4310
4544
|
} });
|
|
4311
4545
|
}
|
|
4312
4546
|
}
|
|
4313
|
-
if (
|
|
4547
|
+
if (y.length && ne?.onWarning) {
|
|
4314
4548
|
let e = /* @__PURE__ */ new Set();
|
|
4315
|
-
for (let t of
|
|
4549
|
+
for (let t of y) {
|
|
4316
4550
|
let [n, r, i] = t, a = i ?? n;
|
|
4317
|
-
e.has(a) || (e.add(a),
|
|
4551
|
+
e.has(a) || (e.add(a), ne.onWarning(n, r));
|
|
4318
4552
|
}
|
|
4319
4553
|
}
|
|
4320
|
-
return
|
|
4554
|
+
return v && !0 === f && console.table(v.toTable()), await Ft.whenFontsReady(), Ft;
|
|
4321
4555
|
} catch (e) {
|
|
4322
4556
|
let t = "Unable to parse XLSX.";
|
|
4323
|
-
throw e instanceof
|
|
4557
|
+
throw e instanceof rt && (t = "Unable to open XLSX. There are too many rows or columns."), Error(t, { cause: e });
|
|
4324
4558
|
} finally {
|
|
4325
|
-
await
|
|
4559
|
+
await k.close().catch(() => {});
|
|
4326
4560
|
}
|
|
4327
4561
|
};
|
|
4328
|
-
export {
|
|
4562
|
+
export { sr as a, Tr as i, Vr as n, kr as r, Zr as readXLSX, Kr as t };
|