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