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