@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,25 +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 { $t as t,
|
|
8
|
-
import { BufferUtils as
|
|
9
|
-
import { AddressUtils as
|
|
10
|
-
import { BlobReader as
|
|
11
|
-
var
|
|
7
|
+
import { $t as t, Bn as e, Bt as s, C as o, Cn as r, Dt as n, En as i, Et as a, Fn as l, Hn as c, It as h, Jt as u, Kt as d, Ln as p, Nn as f, On as g, Ot as m, Pn as b, Pt as x, Q as y, Qn as v, Sn as w, Tn as T, Tt as S, Vt as C, X as A, Xn as k, Xt as E, Zt as I, _n as P, _t as O, bn as D, bt as _, d as N, dt as $, en as R, et as L, fn as V, ft as M, gn as B, gt as j, h as F, hn as H, ht as W, in as z, jn as X, kn as q, mn as U, n as K, nn as G, pt as Z, qn as Q, qt as Y, rn as tt, rt as et, sn as st, st as ot, t as rt, tt as nt, u as it, vn as at, vt as lt, w as ct, wn as ht, wt as ut, x as dt, xn as pt, xt as ft, yn as gt, zt as mt } from "./BCSJ_kqVLXkZlYh3.mjs";
|
|
8
|
+
import { BufferUtils as bt, CommonUtils as xt, ExpectedError as yt, OverlappingRange as vt, RangeAxis as wt } from "@sheetxl/utils";
|
|
9
|
+
import { AddressUtils as Tt, CommonUtils as St, CoordUtils as Ct, FormulaError as At, FormulaText as kt, FunctionDeclarations as Et, ICellStyle as It, ICondition as Pt, IConditionalFormat as Ot, ICustomProperty as Dt, IFont as _t, IRange as Nt, OutOfBoundsError as $t, PersonCollection as Rt, ResourceCollection as Lt, RichDataRegistry as Vt, Scalar as Mt, Sort as Bt, Theme as jt, Tuple as Ft, Workbook as Ht } from "@sheetxl/sdk";
|
|
10
|
+
import { BlobReader as Wt, Uint8ArrayReader as zt, Uint8ArrayWriter as Xt, ZipReader as qt } from "@zip.js/zip.js";
|
|
11
|
+
var Ut = {
|
|
12
12
|
ascending: "ascending",
|
|
13
13
|
descending: "descending",
|
|
14
14
|
natural: "dataSource"
|
|
15
15
|
};
|
|
16
|
-
function
|
|
16
|
+
function Kt(t, e) {
|
|
17
17
|
if (!e) return null;
|
|
18
18
|
for (let s = 0; s < t.length; s++) if (void 0 !== t[s].id && String(t[s].id) === e) return t[s];
|
|
19
19
|
const s = Number(e);
|
|
20
20
|
return Number.isInteger(s) && s >= 1 && s <= t.length ? t[s - 1] : null;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Gt(t, e, s) {
|
|
23
23
|
const o = {
|
|
24
24
|
...e,
|
|
25
25
|
source: s
|
|
@@ -29,28 +29,28 @@ function qt(t, e, s) {
|
|
|
29
29
|
e > 0 && 27 !== e && (o.rowHeight = e);
|
|
30
30
|
}
|
|
31
31
|
t.style && "SlicerStyleLight1" !== t.style && (o.style = t.style);
|
|
32
|
-
const r = t.sortOrder ?
|
|
32
|
+
const r = t.sortOrder ? Ut[t.sortOrder] : void 0;
|
|
33
33
|
return r && "ascending" !== r && (o.sortOrder = r), t.crossFilter && "showItemsWithDataAtTop" !== t.crossFilter && (o.crossFilter = t.crossFilter), t.lockedPosition && (o.lockedPosition = !0), !1 === t.customListSort && (o.disabledCustomListSort = !0), t.cacheName && (o.cacheName = t.cacheName), t.startItem && (o.startItem = t.startItem), void 0 !== t.level && (o.level = t.level), t.uid && (o.uid = t.uid), o;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
35
|
+
var Jt = "xl/richData/rdrichvaluestructure.xml", Zt = "xl/richData/rdrichvalue.xml", Qt = "xl/richData/rdarray.xml", Yt = "xl/richData/rdsupportingpropertybagstructure.xml", te = "xl/richData/rdsupportingpropertybag.xml", ee = "xl/richData/rdRichValueTypes.xml", se = "xl/richData/richStyles.xml", oe = (t, e) => {
|
|
36
36
|
const s = [], o = t?.childNodes, r = o?.length ?? 0;
|
|
37
37
|
for (let t = 0; t < r; t++) {
|
|
38
38
|
const r = o.item(t);
|
|
39
39
|
1 !== r.nodeType || e && r.localName !== e || s.push(r);
|
|
40
40
|
}
|
|
41
41
|
return s;
|
|
42
|
-
},
|
|
42
|
+
}, re = (t) => oe(t, "k").map((t) => [t.getAttribute("n") ?? "", t.getAttribute("t") || null]), ne = (t) => oe(t, "v").map((t) => ({
|
|
43
43
|
t: t.getAttribute("t") || null,
|
|
44
44
|
text: t.textContent ?? ""
|
|
45
|
-
})),
|
|
45
|
+
})), ie = (t) => {
|
|
46
46
|
const e = /* @__PURE__ */ new Map();
|
|
47
|
-
for (const s of
|
|
47
|
+
for (const s of oe(t, "key")) {
|
|
48
48
|
const t = /* @__PURE__ */ new Map();
|
|
49
|
-
for (const e of
|
|
49
|
+
for (const e of oe(s, "flag")) t.set(e.getAttribute("name") ?? "", e.getAttribute("value") ?? "");
|
|
50
50
|
e.set(s.getAttribute("name") ?? "", t);
|
|
51
51
|
}
|
|
52
52
|
return e;
|
|
53
|
-
},
|
|
53
|
+
}, ae = /* @__PURE__ */ new Uint8Array(0), le = class t {
|
|
54
54
|
constructor(t, e, s) {
|
|
55
55
|
this.buffers = /* @__PURE__ */ new Map(), this.zip = t, this.entries = e, this.rawBuffer = s;
|
|
56
56
|
}
|
|
@@ -58,7 +58,7 @@ var Ut = "xl/richData/rdrichvaluestructure.xml", Gt = "xl/richData/rdrichvalue.x
|
|
|
58
58
|
return t.startsWith("/") ? t.slice(1) : t;
|
|
59
59
|
}
|
|
60
60
|
static async create(e) {
|
|
61
|
-
const s = e instanceof Blob ?
|
|
61
|
+
const s = e instanceof Blob ? ae : e instanceof Uint8Array ? e : new Uint8Array(e), o = e instanceof Blob ? new Wt(e) : new zt(s), r = new qt(o), n = /* @__PURE__ */ new Map();
|
|
62
62
|
for (const t of await r.getEntries()) t.directory || n.set(t.filename, t);
|
|
63
63
|
return new t(r, n, s);
|
|
64
64
|
}
|
|
@@ -76,12 +76,12 @@ var Ut = "xl/richData/rdrichvaluestructure.xml", Gt = "xl/richData/rdrichvalue.x
|
|
|
76
76
|
if (o) return o;
|
|
77
77
|
const r = this.entries.get(s);
|
|
78
78
|
if (!r) return null;
|
|
79
|
-
const n = await r.getData(new
|
|
79
|
+
const n = await r.getData(new Xt());
|
|
80
80
|
return this.buffers.set(s, n), n;
|
|
81
81
|
}
|
|
82
82
|
async prefetch(t) {
|
|
83
83
|
const e = [];
|
|
84
|
-
for (const [s, o] of this.entries) !this.buffers.has(s) && t(s, o) && e.push(o.getData(new
|
|
84
|
+
for (const [s, o] of this.entries) !this.buffers.has(s) && t(s, o) && e.push(o.getData(new Xt()).then((t) => {
|
|
85
85
|
this.buffers.set(s, t);
|
|
86
86
|
}));
|
|
87
87
|
await Promise.all(e);
|
|
@@ -124,18 +124,18 @@ var Ut = "xl/richData/rdrichvaluestructure.xml", Gt = "xl/richData/rdrichvalue.x
|
|
|
124
124
|
async close() {
|
|
125
125
|
await this.zip.close();
|
|
126
126
|
}
|
|
127
|
-
},
|
|
127
|
+
}, ce = class {
|
|
128
128
|
constructor(t) {
|
|
129
|
-
this._sink = t, this._samples = [], this._t0 =
|
|
129
|
+
this._sink = t, this._samples = [], this._t0 = he(), this._tPrev = this._t0, this._heapPrev = ue();
|
|
130
130
|
}
|
|
131
131
|
mark(t) {
|
|
132
|
-
const e =
|
|
132
|
+
const e = he(), s = ue(), o = {
|
|
133
133
|
label: t,
|
|
134
134
|
tMs: e - this._t0,
|
|
135
135
|
dtMs: e - this._tPrev,
|
|
136
136
|
heapBytes: s,
|
|
137
137
|
dHeapBytes: void 0 !== s && void 0 !== this._heapPrev ? s - this._heapPrev : void 0,
|
|
138
|
-
rssBytes:
|
|
138
|
+
rssBytes: de()
|
|
139
139
|
};
|
|
140
140
|
this._tPrev = e, this._heapPrev = s, this._samples.push(o), this._sink?.(o);
|
|
141
141
|
}
|
|
@@ -147,91 +147,91 @@ var Ut = "xl/richData/rdrichvaluestructure.xml", Gt = "xl/richData/rdrichvalue.x
|
|
|
147
147
|
phase: t.label,
|
|
148
148
|
tMs: Math.round(t.tMs),
|
|
149
149
|
dtMs: Math.round(t.dtMs),
|
|
150
|
-
heapMB: void 0 !== t.heapBytes ?
|
|
151
|
-
dHeapMB: void 0 !== t.dHeapBytes ?
|
|
152
|
-
rssMB: void 0 !== t.rssBytes ?
|
|
150
|
+
heapMB: void 0 !== t.heapBytes ? pe(t.heapBytes / 1048576) : "—",
|
|
151
|
+
dHeapMB: void 0 !== t.dHeapBytes ? pe(t.dHeapBytes / 1048576) : "—",
|
|
152
|
+
rssMB: void 0 !== t.rssBytes ? pe(t.rssBytes / 1048576) : "—"
|
|
153
153
|
}));
|
|
154
154
|
}
|
|
155
|
-
},
|
|
156
|
-
function
|
|
155
|
+
}, he = "object" == typeof performance && "function" == typeof performance.now ? () => performance.now() : () => Date.now();
|
|
156
|
+
function ue() {
|
|
157
157
|
const t = "object" == typeof performance ? performance.memory : void 0;
|
|
158
158
|
if (t && "number" == typeof t.usedJSHeapSize) return t.usedJSHeapSize;
|
|
159
159
|
const e = globalThis.process;
|
|
160
160
|
return "object" == typeof e && "function" == typeof e.memoryUsage ? e.memoryUsage().heapUsed : void 0;
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function de() {
|
|
163
163
|
const t = globalThis.process;
|
|
164
164
|
if ("object" == typeof t && "function" == typeof t.memoryUsage) return t.memoryUsage().rss;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function pe(t) {
|
|
167
167
|
return Math.round(10 * t) / 10;
|
|
168
168
|
}
|
|
169
|
-
var
|
|
169
|
+
var fe = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", ge = `-${fe}.0-9·̀-ͯ‿-⁀`, me = (new RegExp(`^[${fe}]$`, "u"), new RegExp(`^[${ge}]$`, "u"), new RegExp(`^[${fe}][${ge}]*$`, "u")), be = (new RegExp(`^[${ge}]+$`, "u"), [
|
|
170
170
|
32,
|
|
171
171
|
10,
|
|
172
172
|
13,
|
|
173
173
|
9
|
|
174
174
|
]);
|
|
175
|
-
function
|
|
175
|
+
function xe(t) {
|
|
176
176
|
return t >= 65 && t <= 90 || t >= 97 && t <= 122 || 58 === t || 95 === t || 8204 === t || 8205 === t || t >= 192 && t <= 214 || t >= 216 && t <= 246 || t >= 248 && t <= 767 || t >= 880 && t <= 893 || t >= 895 && t <= 8191 || t >= 8304 && t <= 8591 || t >= 11264 && t <= 12271 || t >= 12289 && t <= 55295 || t >= 63744 && t <= 64975 || t >= 65008 && t <= 65533 || t >= 65536 && t <= 983039;
|
|
177
177
|
}
|
|
178
|
-
var
|
|
179
|
-
new RegExp(`^[${
|
|
180
|
-
var
|
|
181
|
-
function
|
|
178
|
+
var ye = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", ve = `-${ye}.0-9·̀-ͯ‿-⁀`;
|
|
179
|
+
new RegExp(`^[${ye}]$`, "u"), new RegExp(`^[${ve}]$`, "u"), new RegExp(`^[${ye}][${ve}]*$`, "u"), new RegExp(`^[${ve}]+$`, "u");
|
|
180
|
+
var we = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Te = `-${we}.0-9·̀-ͯ‿-⁀`, Se = (new RegExp(`^[${we}]$`, "u"), new RegExp(`^[${Te}]$`, "u"), new RegExp(`^[${we}][${Te}]*$`, "u"));
|
|
181
|
+
function Ce(t) {
|
|
182
182
|
return t >= 65 && t <= 90 || 95 === t || t >= 97 && t <= 122 || t >= 192 && t <= 214 || t >= 216 && t <= 246 || t >= 248 && t <= 767 || t >= 880 && t <= 893 || t >= 895 && t <= 8191 || t >= 8204 && t <= 8205 || t >= 8304 && t <= 8591 || t >= 11264 && t <= 12271 || t >= 12289 && t <= 55295 || t >= 63744 && t <= 64975 || t >= 65008 && t <= 65533 || t >= 65536 && t <= 983039;
|
|
183
183
|
}
|
|
184
|
-
var
|
|
184
|
+
var Ae = function(t) {
|
|
185
185
|
return 32 === t || 10 === t || 13 === t || 9 === t;
|
|
186
|
-
},
|
|
186
|
+
}, ke = function(t) {
|
|
187
187
|
return t >= 32 && t <= 55295 || 10 === t || 13 === t || 9 === t || t >= 57344 && t <= 65533 || t >= 65536 && t <= 1114111;
|
|
188
|
-
},
|
|
189
|
-
return
|
|
190
|
-
},
|
|
188
|
+
}, Ee = xe, Ie = function(t) {
|
|
189
|
+
return xe(t) || t >= 48 && t <= 57 || 45 === t || 46 === t || 183 === t || t >= 768 && t <= 879 || t >= 8255 && t <= 8256;
|
|
190
|
+
}, Pe = be, Oe = me, De = function(t) {
|
|
191
191
|
return t >= 1 && t <= 55295 || t >= 57344 && t <= 65533 || t >= 65536 && t <= 1114111;
|
|
192
|
-
},
|
|
193
|
-
return
|
|
194
|
-
},
|
|
192
|
+
}, _e = Ce, Ne = function(t) {
|
|
193
|
+
return Ce(t) || 45 === t || 46 === t || t >= 48 && t <= 57 || 183 === t || t >= 768 && t <= 879 || t >= 8255 && t <= 8256;
|
|
194
|
+
}, $e = Se, Re = "http://www.w3.org/XML/1998/namespace", Le = "http://www.w3.org/2000/xmlns/", Ve = {
|
|
195
195
|
__proto__: null,
|
|
196
|
-
xml:
|
|
197
|
-
xmlns:
|
|
198
|
-
},
|
|
196
|
+
xml: Re,
|
|
197
|
+
xmlns: Le
|
|
198
|
+
}, Me = {
|
|
199
199
|
__proto__: null,
|
|
200
200
|
amp: "&",
|
|
201
201
|
gt: ">",
|
|
202
202
|
lt: "<",
|
|
203
203
|
quot: "\"",
|
|
204
204
|
apos: "'"
|
|
205
|
-
},
|
|
206
|
-
...
|
|
205
|
+
}, Be = -1, je = -2, Fe = 13, He = 33, We = 10, ze = 60, Xe = 61, qe = 62, Ue = 63, Ke = 93, Ge = (t) => 34 === t || 39 === t, Je = [34, 39], Ze = [
|
|
206
|
+
...Je,
|
|
207
207
|
91,
|
|
208
|
-
|
|
209
|
-
],
|
|
210
|
-
...
|
|
211
|
-
Fe,
|
|
212
|
-
Xe
|
|
213
|
-
], Ze = [
|
|
214
|
-
He,
|
|
208
|
+
qe
|
|
209
|
+
], Qe = [
|
|
210
|
+
...Je,
|
|
215
211
|
ze,
|
|
216
|
-
|
|
217
|
-
],
|
|
218
|
-
|
|
219
|
-
|
|
212
|
+
Ke
|
|
213
|
+
], Ye = [
|
|
214
|
+
Xe,
|
|
215
|
+
Ue,
|
|
216
|
+
...Pe
|
|
217
|
+
], ts = [
|
|
218
|
+
...Pe,
|
|
219
|
+
qe,
|
|
220
220
|
38,
|
|
221
|
-
|
|
221
|
+
ze
|
|
222
222
|
];
|
|
223
|
-
function
|
|
223
|
+
function es(t, e, s) {
|
|
224
224
|
switch (e) {
|
|
225
225
|
case "xml":
|
|
226
|
-
s !==
|
|
226
|
+
s !== Re && t.fail(`xml prefix must be bound to ${Re}.`);
|
|
227
227
|
break;
|
|
228
|
-
case "xmlns": s !==
|
|
228
|
+
case "xmlns": s !== Le && t.fail(`xmlns prefix must be bound to ${Le}.`);
|
|
229
229
|
}
|
|
230
230
|
switch (s) {
|
|
231
|
-
case
|
|
232
|
-
t.fail("" === e ? `the default namespace may not be set to ${s}.` : `may not assign a prefix (even "xmlns") to the URI ${
|
|
231
|
+
case Le:
|
|
232
|
+
t.fail("" === e ? `the default namespace may not be set to ${s}.` : `may not assign a prefix (even "xmlns") to the URI ${Le}.`);
|
|
233
233
|
break;
|
|
234
|
-
case
|
|
234
|
+
case Re: switch (e) {
|
|
235
235
|
case "xml": break;
|
|
236
236
|
case "":
|
|
237
237
|
t.fail(`the default namespace may not be set to ${s}.`);
|
|
@@ -240,7 +240,7 @@ function Qe(t, e, s) {
|
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
var
|
|
243
|
+
var ss, os = (t) => $e.test(t), rs = (t) => Oe.test(t), ns = {
|
|
244
244
|
xmldecl: "xmlDeclHandler",
|
|
245
245
|
text: "textHandler",
|
|
246
246
|
processinginstruction: "piHandler",
|
|
@@ -254,7 +254,7 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
254
254
|
error: "errorHandler",
|
|
255
255
|
end: "endHandler",
|
|
256
256
|
ready: "readyHandler"
|
|
257
|
-
},
|
|
257
|
+
}, is = class {
|
|
258
258
|
get closed() {
|
|
259
259
|
return this._closed;
|
|
260
260
|
}
|
|
@@ -262,15 +262,15 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
262
262
|
this.i = 0, this.prevI = 0, this.opt = t ?? {}, this.fragmentOpt = !!this.opt.fragment;
|
|
263
263
|
const e = this.xmlnsOpt = !!this.opt.xmlns;
|
|
264
264
|
if (this.trackPosition = !1 !== this.opt.position, this.fileName = this.opt.fileName, e) {
|
|
265
|
-
this.nameStartCheck =
|
|
265
|
+
this.nameStartCheck = _e, this.nameCheck = Ne, this.isName = os, this.processAttribs = this.processAttribsNS, this.pushAttrib = this.pushAttribNS, this.ns = {
|
|
266
266
|
__proto__: null,
|
|
267
|
-
|
|
267
|
+
...Ve
|
|
268
268
|
};
|
|
269
269
|
const t = this.opt.additionalNamespaces;
|
|
270
270
|
null != t && (function(t, e) {
|
|
271
|
-
for (const s of Object.keys(e))
|
|
271
|
+
for (const s of Object.keys(e)) es(t, s, e[s]);
|
|
272
272
|
}(this, t), Object.assign(this.ns, t));
|
|
273
|
-
} else this.nameStartCheck =
|
|
273
|
+
} else this.nameStartCheck = Ee, this.nameCheck = Ie, this.isName = rs, this.processAttribs = this.processAttribsPlain, this.pushAttrib = this.pushAttribPlain;
|
|
274
274
|
this.stateTable = [
|
|
275
275
|
this.sBegin,
|
|
276
276
|
this.sBeginWhitespace,
|
|
@@ -322,7 +322,7 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
322
322
|
_init() {
|
|
323
323
|
this.openWakaBang = "", this.text = "", this.name = "", this.piTarget = "", this.entity = "", this.q = null, this.tags = [], this.tag = null, this.topNS = null, this.chunk = "", this.chunkPosition = 0, this.i = 0, this.prevI = 0, this.carriedFromPrevious = void 0, this.forbiddenState = 0, this.attribList = [];
|
|
324
324
|
const { fragmentOpt: t } = this;
|
|
325
|
-
this.state = t ?
|
|
325
|
+
this.state = t ? Fe : 0, this.reportedTextBeforeRoot = this.reportedTextAfterRoot = this.closedRoot = this.sawRoot = t, this.xmlDeclPossible = !t, this.xmlDeclExpects = ["version"], this.entityReturnState = void 0;
|
|
326
326
|
let { defaultXMLVersion: e } = this.opt;
|
|
327
327
|
if (void 0 === e) {
|
|
328
328
|
if (!0 === this.opt.forceXMLVersion) throw new Error("forceXMLVersion set but defaultXMLVersion is not set");
|
|
@@ -332,7 +332,7 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
332
332
|
version: void 0,
|
|
333
333
|
encoding: void 0,
|
|
334
334
|
standalone: void 0
|
|
335
|
-
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(
|
|
335
|
+
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(Me), this.readyHandler?.();
|
|
336
336
|
}
|
|
337
337
|
get position() {
|
|
338
338
|
return this.chunkPosition + this.i;
|
|
@@ -341,10 +341,10 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
341
341
|
return this.position - this.positionAtNewLine;
|
|
342
342
|
}
|
|
343
343
|
on(t, e) {
|
|
344
|
-
this[
|
|
344
|
+
this[ns[t]] = e;
|
|
345
345
|
}
|
|
346
346
|
off(t) {
|
|
347
|
-
this[
|
|
347
|
+
this[ns[t]] = void 0;
|
|
348
348
|
}
|
|
349
349
|
makeError(t) {
|
|
350
350
|
let e = this.fileName ?? "";
|
|
@@ -371,13 +371,13 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
371
371
|
}
|
|
372
372
|
getCode10() {
|
|
373
373
|
const t = this.chunk, e = this.i;
|
|
374
|
-
if (this.prevI = e, this.i++, e >= t.length) return
|
|
374
|
+
if (this.prevI = e, this.i++, e >= t.length) return Be;
|
|
375
375
|
const s = t.charCodeAt(e);
|
|
376
376
|
if (this.column++, s < 55296) {
|
|
377
377
|
if (s >= 32 || 9 === s) return s;
|
|
378
378
|
switch (s) {
|
|
379
|
-
case
|
|
380
|
-
case 13: return t.charCodeAt(e + 1) ===
|
|
379
|
+
case We: return this.line++, this.column = 0, this.positionAtNewLine = this.position, We;
|
|
380
|
+
case 13: return t.charCodeAt(e + 1) === We && (this.i = e + 2), this.line++, this.column = 0, this.positionAtNewLine = this.position, je;
|
|
381
381
|
default: return this.fail("disallowed character."), s;
|
|
382
382
|
}
|
|
383
383
|
}
|
|
@@ -387,18 +387,18 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
387
387
|
}
|
|
388
388
|
getCode11() {
|
|
389
389
|
const { chunk: t, i: e } = this;
|
|
390
|
-
if (this.prevI = e, this.i = e + 1, e >= t.length) return
|
|
390
|
+
if (this.prevI = e, this.i = e + 1, e >= t.length) return Be;
|
|
391
391
|
const s = t.charCodeAt(e);
|
|
392
392
|
if (this.column++, s < 55296) {
|
|
393
393
|
if (s > 31 && s < 127 || s > 159 && 8232 !== s || 9 === s) return s;
|
|
394
394
|
switch (s) {
|
|
395
|
-
case
|
|
395
|
+
case We: return this.line++, this.column = 0, this.positionAtNewLine = this.position, We;
|
|
396
396
|
case 13: {
|
|
397
397
|
const s = t.charCodeAt(e + 1);
|
|
398
|
-
s !==
|
|
398
|
+
s !== We && 133 !== s || (this.i = e + 2);
|
|
399
399
|
}
|
|
400
400
|
case 133:
|
|
401
|
-
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position,
|
|
401
|
+
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position, je;
|
|
402
402
|
default: return this.fail("disallowed character."), s;
|
|
403
403
|
}
|
|
404
404
|
}
|
|
@@ -408,7 +408,7 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
408
408
|
}
|
|
409
409
|
getCodeNorm() {
|
|
410
410
|
const t = this.getCode();
|
|
411
|
-
return t ===
|
|
411
|
+
return t === je ? We : t;
|
|
412
412
|
}
|
|
413
413
|
unGet() {
|
|
414
414
|
this.i = this.prevI, this.column--;
|
|
@@ -417,8 +417,8 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
417
417
|
let { i: e } = this;
|
|
418
418
|
const { chunk: s } = this;
|
|
419
419
|
for (;;) {
|
|
420
|
-
const o = this.getCode(), r = o ===
|
|
421
|
-
if (n ===
|
|
420
|
+
const o = this.getCode(), r = o === je, n = r ? We : o;
|
|
421
|
+
if (n === Be || t.includes(n)) return this.text += s.slice(e, this.prevI), n;
|
|
422
422
|
r && (this.text += `${s.slice(e, this.prevI)}\n`, e = this.i);
|
|
423
423
|
}
|
|
424
424
|
}
|
|
@@ -428,10 +428,10 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
428
428
|
for (;;) {
|
|
429
429
|
let o = this.getCode();
|
|
430
430
|
switch (o) {
|
|
431
|
-
case
|
|
432
|
-
this.text += `${s.slice(e, this.prevI)}\n`, e = this.i, o =
|
|
431
|
+
case je:
|
|
432
|
+
this.text += `${s.slice(e, this.prevI)}\n`, e = this.i, o = We;
|
|
433
433
|
break;
|
|
434
|
-
case
|
|
434
|
+
case Be: return this.text += s.slice(e), !1;
|
|
435
435
|
}
|
|
436
436
|
if (o === t) return this.text += s.slice(e, this.prevI), !0;
|
|
437
437
|
}
|
|
@@ -440,18 +440,18 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
440
440
|
const { chunk: t, i: e } = this;
|
|
441
441
|
for (;;) {
|
|
442
442
|
const s = this.getCode();
|
|
443
|
-
if (s ===
|
|
444
|
-
if (!
|
|
443
|
+
if (s === Be) return this.name += t.slice(e), Be;
|
|
444
|
+
if (!Ie(s)) return this.name += t.slice(e, this.prevI), s === je ? We : s;
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
447
|
skipSpaces() {
|
|
448
448
|
for (;;) {
|
|
449
449
|
const t = this.getCodeNorm();
|
|
450
|
-
if (t ===
|
|
450
|
+
if (t === Be || !Ae(t)) return t;
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
453
|
setXMLVersion(t) {
|
|
454
|
-
this.currentXMLVersion = t, "1.0" === t ? (this.isChar =
|
|
454
|
+
this.currentXMLVersion = t, "1.0" === t ? (this.isChar = ke, this.getCode = this.getCode10) : (this.isChar = De, this.getCode = this.getCode11);
|
|
455
455
|
}
|
|
456
456
|
sBegin() {
|
|
457
457
|
65279 === this.chunk.charCodeAt(0) && (this.i++, this.column++), this.state = 1;
|
|
@@ -459,21 +459,21 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
459
459
|
sBeginWhitespace() {
|
|
460
460
|
const t = this.i, e = this.skipSpaces();
|
|
461
461
|
switch (this.prevI !== t && (this.xmlDeclPossible = !1), e) {
|
|
462
|
-
case
|
|
462
|
+
case ze:
|
|
463
463
|
if (this.state = 15, 0 !== this.text.length) throw new Error("no-empty text at start");
|
|
464
464
|
break;
|
|
465
|
-
case
|
|
466
|
-
default: this.unGet(), this.state =
|
|
465
|
+
case Be: break;
|
|
466
|
+
default: this.unGet(), this.state = Fe, this.xmlDeclPossible = !1;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
sDoctype() {
|
|
470
|
-
const t = this.captureTo(
|
|
470
|
+
const t = this.captureTo(Ze);
|
|
471
471
|
switch (t) {
|
|
472
|
-
case
|
|
473
|
-
this.doctypeHandler?.(this.text), this.text = "", this.state =
|
|
472
|
+
case qe:
|
|
473
|
+
this.doctypeHandler?.(this.text), this.text = "", this.state = Fe, this.doctype = !0;
|
|
474
474
|
break;
|
|
475
|
-
case
|
|
476
|
-
default: this.text += String.fromCodePoint(t), 91 === t ? this.state = 4 :
|
|
475
|
+
case Be: break;
|
|
476
|
+
default: this.text += String.fromCodePoint(t), 91 === t ? this.state = 4 : Ge(t) && (this.state = 3, this.q = t);
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
479
|
sDoctypeQuote() {
|
|
@@ -481,8 +481,8 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
481
481
|
this.captureToChar(t) && (this.text += String.fromCodePoint(t), this.q = null, this.state = 2);
|
|
482
482
|
}
|
|
483
483
|
sDTD() {
|
|
484
|
-
const t = this.captureTo(
|
|
485
|
-
t !==
|
|
484
|
+
const t = this.captureTo(Qe);
|
|
485
|
+
t !== Be && (this.text += String.fromCodePoint(t), t === Ke ? this.state = 2 : t === ze ? this.state = 6 : Ge(t) && (this.state = 5, this.q = t));
|
|
486
486
|
}
|
|
487
487
|
sDTDQuoted() {
|
|
488
488
|
const t = this.q;
|
|
@@ -494,7 +494,7 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
494
494
|
case 33:
|
|
495
495
|
this.state = 7, this.openWakaBang = "";
|
|
496
496
|
break;
|
|
497
|
-
case
|
|
497
|
+
case Ue:
|
|
498
498
|
this.state = 11;
|
|
499
499
|
break;
|
|
500
500
|
default: this.state = 4;
|
|
@@ -513,14 +513,14 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
513
513
|
}
|
|
514
514
|
sDTDCommentEnded() {
|
|
515
515
|
const t = this.getCodeNorm();
|
|
516
|
-
this.text += String.fromCodePoint(t), t ===
|
|
516
|
+
this.text += String.fromCodePoint(t), t === qe ? this.state = 4 : (this.fail("malformed comment."), this.state = 8);
|
|
517
517
|
}
|
|
518
518
|
sDTDPI() {
|
|
519
|
-
this.captureToChar(
|
|
519
|
+
this.captureToChar(Ue) && (this.text += "?", this.state = 12);
|
|
520
520
|
}
|
|
521
521
|
sDTDPIEnding() {
|
|
522
522
|
const t = this.getCodeNorm();
|
|
523
|
-
this.text += String.fromCodePoint(t), t ===
|
|
523
|
+
this.text += String.fromCodePoint(t), t === qe && (this.state = 4);
|
|
524
524
|
}
|
|
525
525
|
sText() {
|
|
526
526
|
0 !== this.tags.length ? this.handleTextInRoot() : this.handleTextOutsideRoot();
|
|
@@ -529,23 +529,23 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
529
529
|
let { i: t } = this;
|
|
530
530
|
const { chunk: e } = this;
|
|
531
531
|
t: for (;;) switch (this.getCode()) {
|
|
532
|
-
case
|
|
532
|
+
case je:
|
|
533
533
|
this.entity += `${e.slice(t, this.prevI)}\n`, t = this.i;
|
|
534
534
|
break;
|
|
535
535
|
case 59: {
|
|
536
536
|
const { entityReturnState: s } = this, o = this.entity + e.slice(t, this.prevI);
|
|
537
537
|
let r;
|
|
538
|
-
this.state = s, "" === o ? (this.fail("empty entity name."), r = "&;") : (r = this.parseEntity(o), this.entity = ""), s ===
|
|
538
|
+
this.state = s, "" === o ? (this.fail("empty entity name."), r = "&;") : (r = this.parseEntity(o), this.entity = ""), s === Fe && void 0 === this.textHandler || (this.text += r);
|
|
539
539
|
break t;
|
|
540
540
|
}
|
|
541
|
-
case
|
|
541
|
+
case Be:
|
|
542
542
|
this.entity += e.slice(t);
|
|
543
543
|
break t;
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
sOpenWaka() {
|
|
547
547
|
const t = this.getCode();
|
|
548
|
-
if (
|
|
548
|
+
if (Ee(t)) this.state = 34, this.unGet(), this.xmlDeclPossible = !1;
|
|
549
549
|
else switch (t) {
|
|
550
550
|
case 47:
|
|
551
551
|
this.state = 43, this.xmlDeclPossible = !1;
|
|
@@ -553,10 +553,10 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
553
553
|
case 33:
|
|
554
554
|
this.state = 16, this.openWakaBang = "", this.xmlDeclPossible = !1;
|
|
555
555
|
break;
|
|
556
|
-
case
|
|
556
|
+
case Ue:
|
|
557
557
|
this.state = 23;
|
|
558
558
|
break;
|
|
559
|
-
default: this.fail("disallowed character in tag name"), this.state =
|
|
559
|
+
default: this.fail("disallowed character in tag name"), this.state = Fe, this.xmlDeclPossible = !1;
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
562
|
sOpenWakaBang() {
|
|
@@ -582,22 +582,22 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
582
582
|
}
|
|
583
583
|
sCommentEnded() {
|
|
584
584
|
const t = this.getCodeNorm();
|
|
585
|
-
t !==
|
|
585
|
+
t !== qe ? (this.fail("malformed comment."), this.text += `--${String.fromCodePoint(t)}`, this.state = 17) : this.state = Fe;
|
|
586
586
|
}
|
|
587
587
|
sCData() {
|
|
588
|
-
this.captureToChar(
|
|
588
|
+
this.captureToChar(Ke) && (this.state = 21);
|
|
589
589
|
}
|
|
590
590
|
sCDataEnding() {
|
|
591
591
|
const t = this.getCodeNorm();
|
|
592
|
-
t ===
|
|
592
|
+
t === Ke ? this.state = 22 : (this.text += `]${String.fromCodePoint(t)}`, this.state = 20);
|
|
593
593
|
}
|
|
594
594
|
sCDataEnding2() {
|
|
595
595
|
const t = this.getCodeNorm();
|
|
596
596
|
switch (t) {
|
|
597
|
-
case
|
|
598
|
-
this.cdataHandler?.(this.text), this.text = "", this.state =
|
|
597
|
+
case qe:
|
|
598
|
+
this.cdataHandler?.(this.text), this.text = "", this.state = Fe;
|
|
599
599
|
break;
|
|
600
|
-
case
|
|
600
|
+
case Ke:
|
|
601
601
|
this.text += "]";
|
|
602
602
|
break;
|
|
603
603
|
default: this.text += `]]${String.fromCodePoint(t)}`, this.state = 20;
|
|
@@ -605,17 +605,17 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
605
605
|
}
|
|
606
606
|
sPIFirstChar() {
|
|
607
607
|
const t = this.getCodeNorm();
|
|
608
|
-
this.nameStartCheck(t) ? (this.piTarget += String.fromCodePoint(t), this.state = 24) : t ===
|
|
608
|
+
this.nameStartCheck(t) ? (this.piTarget += String.fromCodePoint(t), this.state = 24) : t === Ue || Ae(t) ? (this.fail("processing instruction without a target."), this.state = t === Ue ? 26 : 25) : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(t), this.state = 24);
|
|
609
609
|
}
|
|
610
610
|
sPIRest() {
|
|
611
611
|
const { chunk: t, i: e } = this;
|
|
612
612
|
for (;;) {
|
|
613
613
|
const s = this.getCodeNorm();
|
|
614
|
-
if (s ===
|
|
614
|
+
if (s === Be) return void (this.piTarget += t.slice(e));
|
|
615
615
|
if (!this.nameCheck(s)) {
|
|
616
616
|
this.piTarget += t.slice(e, this.prevI);
|
|
617
|
-
const o = s ===
|
|
618
|
-
o ||
|
|
617
|
+
const o = s === Ue;
|
|
618
|
+
o || Ae(s) ? "xml" === this.piTarget ? (this.xmlDeclPossible || this.fail("an XML declaration must be at the start of the document."), this.state = o ? He : 27) : this.state = o ? 26 : 25 : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(s));
|
|
619
619
|
break;
|
|
620
620
|
}
|
|
621
621
|
}
|
|
@@ -623,28 +623,28 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
623
623
|
sPIBody() {
|
|
624
624
|
if (0 === this.text.length) {
|
|
625
625
|
const t = this.getCodeNorm();
|
|
626
|
-
t ===
|
|
627
|
-
} else this.captureToChar(
|
|
626
|
+
t === Ue ? this.state = 26 : Ae(t) || (this.text = String.fromCodePoint(t));
|
|
627
|
+
} else this.captureToChar(Ue) && (this.state = 26);
|
|
628
628
|
}
|
|
629
629
|
sPIEnding() {
|
|
630
630
|
const t = this.getCodeNorm();
|
|
631
|
-
if (t ===
|
|
631
|
+
if (t === qe) {
|
|
632
632
|
const { piTarget: t } = this;
|
|
633
633
|
"xml" === t.toLowerCase() && this.fail("the XML declaration must appear at the start of the document."), this.piHandler?.({
|
|
634
634
|
target: t,
|
|
635
635
|
body: this.text
|
|
636
|
-
}), this.piTarget = this.text = "", this.state =
|
|
637
|
-
} else t ===
|
|
636
|
+
}), this.piTarget = this.text = "", this.state = Fe;
|
|
637
|
+
} else t === Ue ? this.text += "?" : (this.text += `?${String.fromCodePoint(t)}`, this.state = 25);
|
|
638
638
|
this.xmlDeclPossible = !1;
|
|
639
639
|
}
|
|
640
640
|
sXMLDeclNameStart() {
|
|
641
641
|
const t = this.skipSpaces();
|
|
642
|
-
t !==
|
|
642
|
+
t !== Ue ? t !== Be && (this.state = 28, this.name = String.fromCodePoint(t)) : this.state = He;
|
|
643
643
|
}
|
|
644
644
|
sXMLDeclName() {
|
|
645
|
-
const t = this.captureTo(
|
|
646
|
-
if (t ===
|
|
647
|
-
if (
|
|
645
|
+
const t = this.captureTo(Ye);
|
|
646
|
+
if (t === Ue) return this.state = He, this.name += this.text, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
647
|
+
if (Ae(t) || t === Xe) {
|
|
648
648
|
if (this.name += this.text, this.text = "", !this.xmlDeclExpects.includes(this.name)) switch (this.name.length) {
|
|
649
649
|
case 0:
|
|
650
650
|
this.fail("did not expect any more name/value pairs.");
|
|
@@ -654,23 +654,23 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
654
654
|
break;
|
|
655
655
|
default: this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`);
|
|
656
656
|
}
|
|
657
|
-
this.state = t ===
|
|
657
|
+
this.state = t === Xe ? 30 : 29;
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
660
|
sXMLDeclEq() {
|
|
661
661
|
const t = this.getCodeNorm();
|
|
662
|
-
if (t ===
|
|
663
|
-
|
|
662
|
+
if (t === Ue) return this.state = He, void this.fail("XML declaration is incomplete.");
|
|
663
|
+
Ae(t) || (t !== Xe && this.fail("value required."), this.state = 30);
|
|
664
664
|
}
|
|
665
665
|
sXMLDeclValueStart() {
|
|
666
666
|
const t = this.getCodeNorm();
|
|
667
|
-
if (t ===
|
|
668
|
-
|
|
667
|
+
if (t === Ue) return this.state = He, void this.fail("XML declaration is incomplete.");
|
|
668
|
+
Ae(t) || (Ge(t) ? this.q = t : (this.fail("value must be quoted."), this.q = 32), this.state = 31);
|
|
669
669
|
}
|
|
670
670
|
sXMLDeclValue() {
|
|
671
|
-
const t = this.captureTo([this.q,
|
|
672
|
-
if (t ===
|
|
673
|
-
if (t ===
|
|
671
|
+
const t = this.captureTo([this.q, Ue]);
|
|
672
|
+
if (t === Ue) return this.state = He, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
673
|
+
if (t === Be) return;
|
|
674
674
|
const e = this.text;
|
|
675
675
|
switch (this.text = "", this.name) {
|
|
676
676
|
case "version": {
|
|
@@ -688,52 +688,52 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
688
688
|
}
|
|
689
689
|
sXMLDeclSeparator() {
|
|
690
690
|
const t = this.getCodeNorm();
|
|
691
|
-
t !==
|
|
691
|
+
t !== Ue ? (Ae(t) || (this.fail("whitespace required."), this.unGet()), this.state = 27) : this.state = He;
|
|
692
692
|
}
|
|
693
693
|
sXMLDeclEnding() {
|
|
694
|
-
this.getCodeNorm() ===
|
|
694
|
+
this.getCodeNorm() === qe ? ("xml" !== this.piTarget ? this.fail("processing instructions are not allowed before root.") : "version" !== this.name && this.xmlDeclExpects.includes("version") && this.fail("XML declaration must contain a version."), this.xmlDeclHandler?.(this.xmlDecl), this.name = "", this.piTarget = this.text = "", this.state = Fe) : this.fail("The character ? is disallowed anywhere in XML declarations."), this.xmlDeclPossible = !1;
|
|
695
695
|
}
|
|
696
696
|
sOpenTag() {
|
|
697
697
|
const t = this.captureNameChars();
|
|
698
|
-
if (t ===
|
|
698
|
+
if (t === Be) return;
|
|
699
699
|
const e = this.tag = {
|
|
700
700
|
name: this.name,
|
|
701
701
|
attributes: Object.create(null)
|
|
702
702
|
};
|
|
703
703
|
switch (this.name = "", this.xmlnsOpt && (this.topNS = e.ns = Object.create(null)), this.openTagStartHandler?.(e), this.sawRoot = !0, !this.fragmentOpt && this.closedRoot && this.fail("documents may contain only one root."), t) {
|
|
704
|
-
case
|
|
704
|
+
case qe:
|
|
705
705
|
this.openTag();
|
|
706
706
|
break;
|
|
707
707
|
case 47:
|
|
708
708
|
this.state = 35;
|
|
709
709
|
break;
|
|
710
|
-
default:
|
|
710
|
+
default: Ae(t) || this.fail("disallowed character in tag name."), this.state = 36;
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
sOpenTagSlash() {
|
|
714
|
-
this.getCode() ===
|
|
714
|
+
this.getCode() === qe ? this.openSelfClosingTag() : (this.fail("forward-slash in opening tag not followed by >."), this.state = 36);
|
|
715
715
|
}
|
|
716
716
|
sAttrib() {
|
|
717
717
|
const t = this.skipSpaces();
|
|
718
|
-
t !==
|
|
718
|
+
t !== Be && (Ee(t) ? (this.unGet(), this.state = 37) : t === qe ? this.openTag() : 47 === t ? this.state = 35 : this.fail("disallowed character in attribute name."));
|
|
719
719
|
}
|
|
720
720
|
sAttribName() {
|
|
721
721
|
const t = this.captureNameChars();
|
|
722
|
-
t ===
|
|
722
|
+
t === Xe ? this.state = 39 : Ae(t) ? this.state = 38 : t === qe ? (this.fail("attribute without value."), this.pushAttrib(this.name, this.name), this.name = this.text = "", this.openTag()) : t !== Be && this.fail("disallowed character in attribute name.");
|
|
723
723
|
}
|
|
724
724
|
sAttribNameSawWhite() {
|
|
725
725
|
const t = this.skipSpaces();
|
|
726
726
|
switch (t) {
|
|
727
|
-
case
|
|
728
|
-
case
|
|
727
|
+
case Be: return;
|
|
728
|
+
case Xe:
|
|
729
729
|
this.state = 39;
|
|
730
730
|
break;
|
|
731
|
-
default: this.fail("attribute without value."), this.text = "", this.name = "", t ===
|
|
731
|
+
default: this.fail("attribute without value."), this.text = "", this.name = "", t === qe ? this.openTag() : Ee(t) ? (this.unGet(), this.state = 37) : (this.fail("disallowed character in attribute name."), this.state = 36);
|
|
732
732
|
}
|
|
733
733
|
}
|
|
734
734
|
sAttribValue() {
|
|
735
735
|
const t = this.getCodeNorm();
|
|
736
|
-
|
|
736
|
+
Ge(t) ? (this.q = t, this.state = 40) : Ae(t) || (this.fail("unquoted attribute value."), this.state = 42, this.unGet());
|
|
737
737
|
}
|
|
738
738
|
sAttribValueQuoted() {
|
|
739
739
|
const { q: t, chunk: e } = this;
|
|
@@ -745,46 +745,46 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
745
745
|
case 38:
|
|
746
746
|
this.text += e.slice(s, this.prevI), this.state = 14, this.entityReturnState = 40;
|
|
747
747
|
return;
|
|
748
|
+
case We:
|
|
748
749
|
case je:
|
|
749
|
-
case Le:
|
|
750
750
|
case 9:
|
|
751
751
|
this.text += `${e.slice(s, this.prevI)} `, s = this.i;
|
|
752
752
|
break;
|
|
753
|
-
case
|
|
753
|
+
case ze:
|
|
754
754
|
this.text += e.slice(s, this.prevI), this.fail("disallowed character.");
|
|
755
755
|
return;
|
|
756
|
-
case
|
|
756
|
+
case Be:
|
|
757
757
|
this.text += e.slice(s);
|
|
758
758
|
return;
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
761
|
sAttribValueClosed() {
|
|
762
762
|
const t = this.getCodeNorm();
|
|
763
|
-
|
|
763
|
+
Ae(t) ? this.state = 36 : t === qe ? this.openTag() : 47 === t ? this.state = 35 : Ee(t) ? (this.fail("no whitespace between attributes."), this.unGet(), this.state = 37) : this.fail("disallowed character in attribute name.");
|
|
764
764
|
}
|
|
765
765
|
sAttribValueUnquoted() {
|
|
766
|
-
const t = this.captureTo(
|
|
766
|
+
const t = this.captureTo(ts);
|
|
767
767
|
switch (t) {
|
|
768
768
|
case 38:
|
|
769
769
|
this.state = 14, this.entityReturnState = 42;
|
|
770
770
|
break;
|
|
771
|
-
case
|
|
771
|
+
case ze:
|
|
772
772
|
this.fail("disallowed character.");
|
|
773
773
|
break;
|
|
774
|
-
case
|
|
775
|
-
default: this.text.includes("]]>") && this.fail("the string \"]]>\" is disallowed in char data."), this.pushAttrib(this.name, this.text), this.name = this.text = "", t ===
|
|
774
|
+
case Be: break;
|
|
775
|
+
default: this.text.includes("]]>") && this.fail("the string \"]]>\" is disallowed in char data."), this.pushAttrib(this.name, this.text), this.name = this.text = "", t === qe ? this.openTag() : this.state = 36;
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
778
|
sCloseTag() {
|
|
779
779
|
const t = this.captureNameChars();
|
|
780
|
-
t ===
|
|
780
|
+
t === qe ? this.closeTag() : Ae(t) ? this.state = 44 : t !== Be && this.fail("disallowed character in closing tag.");
|
|
781
781
|
}
|
|
782
782
|
sCloseTagSawWhite() {
|
|
783
783
|
switch (this.skipSpaces()) {
|
|
784
|
-
case
|
|
784
|
+
case qe:
|
|
785
785
|
this.closeTag();
|
|
786
786
|
break;
|
|
787
|
-
case
|
|
787
|
+
case Be: break;
|
|
788
788
|
default: this.fail("disallowed character in closing tag.");
|
|
789
789
|
}
|
|
790
790
|
}
|
|
@@ -792,7 +792,7 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
792
792
|
let { i: t, forbiddenState: e } = this;
|
|
793
793
|
const { chunk: s, textHandler: o } = this;
|
|
794
794
|
t: for (;;) switch (this.getCode()) {
|
|
795
|
-
case
|
|
795
|
+
case ze:
|
|
796
796
|
if (this.state = 15, void 0 !== o) {
|
|
797
797
|
const { text: e } = this, r = s.slice(t, this.prevI);
|
|
798
798
|
0 !== e.length ? (o(e + r), this.text = "") : 0 !== r.length && o(r);
|
|
@@ -800,9 +800,9 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
800
800
|
e = 0;
|
|
801
801
|
break t;
|
|
802
802
|
case 38:
|
|
803
|
-
this.state = 14, this.entityReturnState =
|
|
803
|
+
this.state = 14, this.entityReturnState = Fe, void 0 !== o && (this.text += s.slice(t, this.prevI)), e = 0;
|
|
804
804
|
break t;
|
|
805
|
-
case
|
|
805
|
+
case Ke:
|
|
806
806
|
switch (e) {
|
|
807
807
|
case 0:
|
|
808
808
|
e = 1;
|
|
@@ -814,13 +814,13 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
814
814
|
default: throw new Error("impossible state");
|
|
815
815
|
}
|
|
816
816
|
break;
|
|
817
|
-
case
|
|
817
|
+
case qe:
|
|
818
818
|
2 === e && this.fail("the string \"]]>\" is disallowed in char data."), e = 0;
|
|
819
819
|
break;
|
|
820
|
-
case
|
|
820
|
+
case je:
|
|
821
821
|
void 0 !== o && (this.text += `${s.slice(t, this.prevI)}\n`), t = this.i, e = 0;
|
|
822
822
|
break;
|
|
823
|
-
case
|
|
823
|
+
case Be:
|
|
824
824
|
void 0 !== o && (this.text += s.slice(t));
|
|
825
825
|
break t;
|
|
826
826
|
default: e = 0;
|
|
@@ -834,22 +834,22 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
834
834
|
t: for (;;) {
|
|
835
835
|
const r = this.getCode();
|
|
836
836
|
switch (r) {
|
|
837
|
-
case
|
|
837
|
+
case ze:
|
|
838
838
|
if (this.state = 15, void 0 !== s) {
|
|
839
839
|
const { text: o } = this, r = e.slice(t, this.prevI);
|
|
840
840
|
0 !== o.length ? (s(o + r), this.text = "") : 0 !== r.length && s(r);
|
|
841
841
|
}
|
|
842
842
|
break t;
|
|
843
843
|
case 38:
|
|
844
|
-
this.state = 14, this.entityReturnState =
|
|
844
|
+
this.state = 14, this.entityReturnState = Fe, void 0 !== s && (this.text += e.slice(t, this.prevI)), o = !0;
|
|
845
845
|
break t;
|
|
846
|
-
case
|
|
846
|
+
case je:
|
|
847
847
|
void 0 !== s && (this.text += `${e.slice(t, this.prevI)}\n`), t = this.i;
|
|
848
848
|
break;
|
|
849
|
-
case
|
|
849
|
+
case Be:
|
|
850
850
|
void 0 !== s && (this.text += e.slice(t));
|
|
851
851
|
break t;
|
|
852
|
-
default:
|
|
852
|
+
default: Ae(r) || (o = !0);
|
|
853
853
|
}
|
|
854
854
|
}
|
|
855
855
|
o && (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));
|
|
@@ -863,10 +863,10 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
863
863
|
};
|
|
864
864
|
if (this.attribList.push(r), this.attributeHandler?.(r), "xmlns" === s) {
|
|
865
865
|
const t = e.trim();
|
|
866
|
-
"1.0" === this.currentXMLVersion && "" === t && this.fail("invalid attempt to undefine prefix in XML 1.0"), this.topNS[o] = t,
|
|
866
|
+
"1.0" === this.currentXMLVersion && "" === t && this.fail("invalid attempt to undefine prefix in XML 1.0"), this.topNS[o] = t, es(this, o, t);
|
|
867
867
|
} else if ("xmlns" === t) {
|
|
868
868
|
const t = e.trim();
|
|
869
|
-
this.topNS[""] = t,
|
|
869
|
+
this.topNS[""] = t, es(this, "", t);
|
|
870
870
|
}
|
|
871
871
|
}
|
|
872
872
|
pushAttribPlain(t, e) {
|
|
@@ -883,7 +883,7 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
883
883
|
const e = t.pop();
|
|
884
884
|
this.fail(`unclosed tag: ${e.name}`);
|
|
885
885
|
}
|
|
886
|
-
0 !== this.state && this.state !==
|
|
886
|
+
0 !== this.state && this.state !== Fe && this.fail("unexpected end.");
|
|
887
887
|
const { text: e } = this;
|
|
888
888
|
return 0 !== e.length && (this.textHandler?.(e), this.text = ""), this._closed = !0, this.endHandler?.(), this._init(), this;
|
|
889
889
|
}
|
|
@@ -919,7 +919,7 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
919
919
|
for (const e of t) {
|
|
920
920
|
const { name: t, prefix: r, local: n } = e;
|
|
921
921
|
let i, a;
|
|
922
|
-
"" === r ? (i = "xmlns" === t ?
|
|
922
|
+
"" === r ? (i = "xmlns" === t ? Le : "", a = t) : (i = this.resolve(r), void 0 === i && (this.fail(`unbound namespace prefix: ${JSON.stringify(r)}.`), i = r), a = `{${i}}${n}`), o.has(a) && this.fail(`duplicate attribute: ${a}.`), o.add(a), e.uri = i, s[t] = e;
|
|
923
923
|
}
|
|
924
924
|
this.attribList = [];
|
|
925
925
|
}
|
|
@@ -931,16 +931,16 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
931
931
|
openTag() {
|
|
932
932
|
this.processAttribs();
|
|
933
933
|
const { tags: t } = this, e = this.tag;
|
|
934
|
-
e.isSelfClosing = !1, this.openTagHandler?.(e), t.push(e), this.state =
|
|
934
|
+
e.isSelfClosing = !1, this.openTagHandler?.(e), t.push(e), this.state = Fe, this.name = "";
|
|
935
935
|
}
|
|
936
936
|
openSelfClosingTag() {
|
|
937
937
|
this.processAttribs();
|
|
938
938
|
const { tags: t } = this, e = this.tag;
|
|
939
|
-
e.isSelfClosing = !0, this.openTagHandler?.(e), this.closeTagHandler?.(e), null === (this.tag = t[t.length - 1] ?? null) && (this.closedRoot = !0), this.state =
|
|
939
|
+
e.isSelfClosing = !0, this.openTagHandler?.(e), this.closeTagHandler?.(e), null === (this.tag = t[t.length - 1] ?? null) && (this.closedRoot = !0), this.state = Fe, this.name = "";
|
|
940
940
|
}
|
|
941
941
|
closeTag() {
|
|
942
942
|
const { tags: t, name: e } = this;
|
|
943
|
-
if (this.state =
|
|
943
|
+
if (this.state = Fe, this.name = "", "" === e) return this.fail("weird empty close tag."), void (this.text += "</>");
|
|
944
944
|
const s = this.closeTagHandler;
|
|
945
945
|
let o = t.length;
|
|
946
946
|
for (; o-- > 0;) {
|
|
@@ -958,21 +958,21 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
958
958
|
let e = NaN;
|
|
959
959
|
return "x" === t[1] && /^#x[0-9a-f]+$/i.test(t) ? e = parseInt(t.slice(2), 16) : /^#[0-9]+$/.test(t) && (e = parseInt(t.slice(1), 10)), this.isChar(e) ? String.fromCodePoint(e) : (this.fail("malformed character entity."), `&${t};`);
|
|
960
960
|
}
|
|
961
|
-
},
|
|
961
|
+
}, as = /&(#x[0-9a-fA-F]+|#[0-9]+|amp|lt|gt|quot|apos);/g, ls = {
|
|
962
962
|
amp: "&",
|
|
963
963
|
lt: "<",
|
|
964
964
|
gt: ">",
|
|
965
965
|
quot: "\"",
|
|
966
966
|
apos: "'"
|
|
967
|
-
},
|
|
968
|
-
const s =
|
|
967
|
+
}, cs = (t, e) => {
|
|
968
|
+
const s = ls[e];
|
|
969
969
|
if (void 0 !== s) return s;
|
|
970
970
|
const o = 120 === e.charCodeAt(1) ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10);
|
|
971
971
|
return o > 0 && o <= 1114111 ? String.fromCodePoint(o) : t;
|
|
972
|
-
},
|
|
972
|
+
}, hs = (t) => {
|
|
973
973
|
let e = t;
|
|
974
|
-
return -1 !== e.indexOf("\r") && (e = e.replace(/\r\n?/g, "\n")), -1 !== e.indexOf("&") && (e = e.replace(
|
|
975
|
-
},
|
|
974
|
+
return -1 !== e.indexOf("\r") && (e = e.replace(/\r\n?/g, "\n")), -1 !== e.indexOf("&") && (e = e.replace(as, cs)), e;
|
|
975
|
+
}, us = (t) => {
|
|
976
976
|
let e = t;
|
|
977
977
|
const s = e.length;
|
|
978
978
|
for (let t = 0; t < s; t++) {
|
|
@@ -982,8 +982,8 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
982
982
|
break;
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
|
-
return -1 !== e.indexOf("&") && (e = e.replace(
|
|
986
|
-
},
|
|
985
|
+
return -1 !== e.indexOf("&") && (e = e.replace(as, cs)), e;
|
|
986
|
+
}, ds = (t) => 32 === t || 9 === t || 10 === t || 13 === t, ps = class t {
|
|
987
987
|
constructor() {
|
|
988
988
|
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;
|
|
989
989
|
}
|
|
@@ -994,7 +994,7 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
994
994
|
this.NOT_HANDLED = -2;
|
|
995
995
|
}
|
|
996
996
|
static decodeText(t) {
|
|
997
|
-
return
|
|
997
|
+
return hs(t);
|
|
998
998
|
}
|
|
999
999
|
on(t, e) {
|
|
1000
1000
|
switch (t) {
|
|
@@ -1061,7 +1061,7 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
1061
1061
|
if (0 === t.length) return;
|
|
1062
1062
|
this._text = "";
|
|
1063
1063
|
const e = this._textHandler;
|
|
1064
|
-
void 0 !== e && 0 !== this._tags.length && e(
|
|
1064
|
+
void 0 !== e && 0 !== this._tags.length && e(hs(t));
|
|
1065
1065
|
}
|
|
1066
1066
|
_markup(e, s, o) {
|
|
1067
1067
|
if (s + 1 >= o) return -1;
|
|
@@ -1100,7 +1100,7 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
1100
1100
|
const r = s + 1 + i.name.length;
|
|
1101
1101
|
if (r >= o) return -1;
|
|
1102
1102
|
const n = e.charCodeAt(r);
|
|
1103
|
-
if (62 === n || 47 === n ||
|
|
1103
|
+
if (62 === n || 47 === n || ds(n)) {
|
|
1104
1104
|
this._flushText();
|
|
1105
1105
|
const r = i.scan(e, s, o);
|
|
1106
1106
|
if (r !== t.NOT_HANDLED) {
|
|
@@ -1118,12 +1118,12 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
_openTag(t, e, s) {
|
|
1120
1120
|
let o = e + 1, r = 0;
|
|
1121
|
-
for (; o < s && (r = t.charCodeAt(o), 62 !== r && 47 !== r && !
|
|
1121
|
+
for (; o < s && (r = t.charCodeAt(o), 62 !== r && 47 !== r && !ds(r));) o++;
|
|
1122
1122
|
if (o >= s) return -1;
|
|
1123
1123
|
const n = t.slice(e + 1, o), i = {};
|
|
1124
1124
|
let a = !1;
|
|
1125
1125
|
for (;;) {
|
|
1126
|
-
for (; o < s &&
|
|
1126
|
+
for (; o < s && ds(r = t.charCodeAt(o));) o++;
|
|
1127
1127
|
if (o >= s) return -1;
|
|
1128
1128
|
if (62 === r) {
|
|
1129
1129
|
o++;
|
|
@@ -1139,16 +1139,16 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
1139
1139
|
break;
|
|
1140
1140
|
}
|
|
1141
1141
|
const e = o;
|
|
1142
|
-
for (; o < s && (r = t.charCodeAt(o), 61 !== r && 62 !== r && 47 !== r && !
|
|
1142
|
+
for (; o < s && (r = t.charCodeAt(o), 61 !== r && 62 !== r && 47 !== r && !ds(r));) o++;
|
|
1143
1143
|
if (o >= s) return -1;
|
|
1144
1144
|
const n = t.slice(e, o);
|
|
1145
|
-
for (; o < s &&
|
|
1145
|
+
for (; o < s && ds(r = t.charCodeAt(o));) o++;
|
|
1146
1146
|
if (o >= s) return -1;
|
|
1147
1147
|
if (61 !== r) {
|
|
1148
1148
|
this.fail("attribute without value.");
|
|
1149
1149
|
continue;
|
|
1150
1150
|
}
|
|
1151
|
-
for (o++; o < s &&
|
|
1151
|
+
for (o++; o < s && ds(r = t.charCodeAt(o));) o++;
|
|
1152
1152
|
if (o >= s) return -1;
|
|
1153
1153
|
if (34 !== r && 39 !== r) {
|
|
1154
1154
|
this.fail("unquoted attribute value.");
|
|
@@ -1156,7 +1156,7 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
1156
1156
|
}
|
|
1157
1157
|
const l = t.indexOf(34 === r ? "\"" : "'", o + 1);
|
|
1158
1158
|
if (-1 === l) return -1;
|
|
1159
|
-
"__proto__" !== n && (i[n] =
|
|
1159
|
+
"__proto__" !== n && (i[n] = us(t.slice(o + 1, l))), o = l + 1;
|
|
1160
1160
|
}
|
|
1161
1161
|
this._flushText(), this._sawRoot = !0;
|
|
1162
1162
|
const l = {
|
|
@@ -1196,7 +1196,7 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
1196
1196
|
};
|
|
1197
1197
|
t.parseStream = async (t, e, s) => {
|
|
1198
1198
|
if (s?.lean) return (async (t, e) => {
|
|
1199
|
-
const s = new
|
|
1199
|
+
const s = new ps();
|
|
1200
1200
|
let o;
|
|
1201
1201
|
e.elementScanners && s.setElementScanners(e.elementScanners), e.onOpenTag && s.on("opentag", e.onOpenTag), e.onCloseTag && s.on("closetag", e.onCloseTag), e.onText && s.on("text", e.onText), e.onError && s.on("error", e.onError);
|
|
1202
1202
|
const r = e.onEnd;
|
|
@@ -1209,18 +1209,18 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
1209
1209
|
}
|
|
1210
1210
|
return s.close(), o;
|
|
1211
1211
|
})(t, e);
|
|
1212
|
-
const o = new
|
|
1212
|
+
const o = new is({
|
|
1213
1213
|
position: !1,
|
|
1214
1214
|
...s
|
|
1215
1215
|
});
|
|
1216
1216
|
let r;
|
|
1217
|
-
e.onOpenTagStart && o.on(
|
|
1217
|
+
e.onOpenTagStart && o.on(ss.Events.OpenTagStart, e.onOpenTagStart), e.onOpenTag && o.on(ss.Events.OpenTag, e.onOpenTag), e.onCloseTag && o.on(ss.Events.CloseTag, e.onCloseTag), e.onAttribute && o.on(ss.Events.Attribute, e.onAttribute), e.onText && o.on(ss.Events.Text, e.onText), e.onError && o.on(ss.Events.Error, e.onError);
|
|
1218
1218
|
const n = e.onEnd;
|
|
1219
1219
|
if (n) {
|
|
1220
1220
|
const t = () => {
|
|
1221
1221
|
r = n();
|
|
1222
1222
|
};
|
|
1223
|
-
o.on(
|
|
1223
|
+
o.on(ss.Events.End, t);
|
|
1224
1224
|
}
|
|
1225
1225
|
for (;;) {
|
|
1226
1226
|
const { value: e, done: s } = await t.read();
|
|
@@ -1229,14 +1229,14 @@ var Ye, ts = (t) => De.test(t), es = (t) => Ee.test(t), ss = {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
return o.close(), r;
|
|
1231
1231
|
};
|
|
1232
|
-
})(
|
|
1233
|
-
var
|
|
1232
|
+
})(ss || (ss = {}));
|
|
1233
|
+
var fs = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t && "0" !== t && "off" !== t && "false" !== t && null, gs = (t) => {
|
|
1234
1234
|
const e = parseInt(t);
|
|
1235
1235
|
return isNaN(e) ? null : e;
|
|
1236
|
-
},
|
|
1236
|
+
}, ms = (t) => {
|
|
1237
1237
|
const e = parseFloat(t);
|
|
1238
1238
|
return isNaN(e) ? null : e;
|
|
1239
|
-
},
|
|
1239
|
+
}, bs = null, xs = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), ys = (t) => xs(t).replace(/"/g, """), vs = class {
|
|
1240
1240
|
constructor() {
|
|
1241
1241
|
this._registeredVisitors = /* @__PURE__ */ new Map();
|
|
1242
1242
|
}
|
|
@@ -1308,7 +1308,7 @@ var us = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t
|
|
|
1308
1308
|
let s = `<${t.name}`;
|
|
1309
1309
|
for (const t in e) {
|
|
1310
1310
|
const o = e[t];
|
|
1311
|
-
s += ` ${t}="${
|
|
1311
|
+
s += ` ${t}="${ys("string" == typeof o ? o : o?.value ?? "")}"`;
|
|
1312
1312
|
}
|
|
1313
1313
|
return s + ">";
|
|
1314
1314
|
})(t)), i = {
|
|
@@ -1358,12 +1358,12 @@ var us = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t
|
|
|
1358
1358
|
a = i?.local ?? null, l = i?.tag ?? null, c = i?.visitor ?? null, p = !i?.destination;
|
|
1359
1359
|
},
|
|
1360
1360
|
onText: (t) => {
|
|
1361
|
-
f ? f.push(
|
|
1361
|
+
f ? f.push(xs(t)) : c?.text?.(t, x);
|
|
1362
1362
|
},
|
|
1363
1363
|
onEnd: e
|
|
1364
1364
|
};
|
|
1365
1365
|
}
|
|
1366
|
-
},
|
|
1366
|
+
}, ws = `IFERROR(${C}(`, Ts = ws.toUpperCase(), Ss = s.toUpperCase(), Cs = { kind: "none" }, As = { kind: "spilled" }, ks = (t, e) => {
|
|
1367
1367
|
if (34 !== t.charCodeAt(e)) return null;
|
|
1368
1368
|
let s = "", o = e + 1;
|
|
1369
1369
|
for (; o < t.length;) if (34 === t.charCodeAt(o)) {
|
|
@@ -1374,13 +1374,13 @@ var us = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t
|
|
|
1374
1374
|
s += "\"", o += 2;
|
|
1375
1375
|
} else s += t[o], o++;
|
|
1376
1376
|
return null;
|
|
1377
|
-
},
|
|
1377
|
+
}, Es = (t) => {
|
|
1378
1378
|
const e = [];
|
|
1379
1379
|
let s = 0;
|
|
1380
1380
|
for (; s < t.length;) {
|
|
1381
1381
|
const o = t.charCodeAt(s);
|
|
1382
1382
|
if (34 === o) {
|
|
1383
|
-
const e =
|
|
1383
|
+
const e = ks(t, s);
|
|
1384
1384
|
if (null === e) break;
|
|
1385
1385
|
s = e.end;
|
|
1386
1386
|
continue;
|
|
@@ -1398,27 +1398,56 @@ var us = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t
|
|
|
1398
1398
|
40 === t.charCodeAt(r) && e.push(t.slice(s, r).toUpperCase().replace(/^_XLFN\./, "").replace(/^_XLWS\./, "")), s = r;
|
|
1399
1399
|
}
|
|
1400
1400
|
return e;
|
|
1401
|
-
},
|
|
1402
|
-
|
|
1401
|
+
}, Is = class {
|
|
1402
|
+
constructor(t) {
|
|
1403
|
+
this._restored = [], this._byColumn = /* @__PURE__ */ new Map(), this._isKnown = t;
|
|
1404
|
+
}
|
|
1405
|
+
anchor(t, e, s) {
|
|
1406
|
+
const o = this._byColumn.get(e);
|
|
1407
|
+
o && t === o.rowEnd + 1 && t > o.rowStart && (o.closed = !0);
|
|
1408
|
+
const r = Es(s);
|
|
1409
|
+
let n = !0;
|
|
1410
|
+
for (let t = 0; t < r.length && n; t++) n = this._isKnown(r[t]);
|
|
1411
|
+
const i = {
|
|
1412
|
+
rowStart: t,
|
|
1413
|
+
colStart: e,
|
|
1414
|
+
rowEnd: t,
|
|
1415
|
+
colEnd: e,
|
|
1416
|
+
closed: !1,
|
|
1417
|
+
restored: n
|
|
1418
|
+
};
|
|
1419
|
+
return this._byColumn.set(e, i), n && this._restored.push(i), n;
|
|
1420
|
+
}
|
|
1421
|
+
placeholder(t, e) {
|
|
1422
|
+
const s = this._byColumn.get(e);
|
|
1423
|
+
if (s && !s.closed && t > s.rowStart && t <= s.rowEnd + 1 && e >= s.colStart && e <= s.colEnd) return s.rowEnd = t, s.restored;
|
|
1424
|
+
const o = this._byColumn.get(e - 1);
|
|
1425
|
+
return !(!o || o.rowStart !== t || o.colEnd !== e - 1) && (o.colEnd = e, this._byColumn.set(e, o), o.restored);
|
|
1426
|
+
}
|
|
1427
|
+
getFormulaArray() {
|
|
1428
|
+
return this._restored.map((t) => [Tt.rangeToString(t), "dynamic"]);
|
|
1429
|
+
}
|
|
1430
|
+
}, Ps = /^\s*TABLE\s*\(([^()]*)\)\s*$/i, Os = /^\s*(\$?)([A-Za-z]{1,3})(\$?)(\d{1,7})\s*$/, Ds = (t) => {
|
|
1431
|
+
const e = Os.exec(t);
|
|
1403
1432
|
if (!e) return null;
|
|
1404
|
-
const s =
|
|
1433
|
+
const s = Tt.fastStringToCol(e[2]), o = parseInt(e[4], 10) - 1;
|
|
1405
1434
|
return s < 0 || o < 0 ? null : {
|
|
1406
1435
|
row: o,
|
|
1407
1436
|
col: s,
|
|
1408
1437
|
colAbsolute: "$" === e[1],
|
|
1409
1438
|
rowAbsolute: "$" === e[3]
|
|
1410
1439
|
};
|
|
1411
|
-
},
|
|
1440
|
+
}, _s = (t) => Tt.cellToString({
|
|
1412
1441
|
rowIndex: t.row,
|
|
1413
1442
|
colIndex: t.col
|
|
1414
|
-
}),
|
|
1415
|
-
const s =
|
|
1443
|
+
}), Ns = (t, e) => {
|
|
1444
|
+
const s = Ps.exec(t);
|
|
1416
1445
|
if (!s) return null;
|
|
1417
1446
|
const o = s[1].split(",");
|
|
1418
1447
|
if (3 !== o.length && 5 !== o.length) return null;
|
|
1419
1448
|
const r = [];
|
|
1420
1449
|
for (let t = 0; t < o.length; t++) {
|
|
1421
|
-
const e =
|
|
1450
|
+
const e = Ds(o[t]);
|
|
1422
1451
|
if (!e) return null;
|
|
1423
1452
|
r.push(e);
|
|
1424
1453
|
}
|
|
@@ -1432,30 +1461,30 @@ var us = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t
|
|
|
1432
1461
|
const [, t, e] = r;
|
|
1433
1462
|
return a(e) && l(h) ? {
|
|
1434
1463
|
ref: c,
|
|
1435
|
-
columnInput:
|
|
1464
|
+
columnInput: _s(t)
|
|
1436
1465
|
} : l(e) && a(h) ? {
|
|
1437
1466
|
ref: c,
|
|
1438
|
-
rowInput:
|
|
1467
|
+
rowInput: _s(t)
|
|
1439
1468
|
} : null;
|
|
1440
1469
|
}
|
|
1441
1470
|
if (!h.rowAbsolute || !h.colAbsolute || h.row !== n - 1 || h.col !== i - 1) return null;
|
|
1442
1471
|
const [, u, d, p, f] = r;
|
|
1443
1472
|
return a(d) && l(f) ? {
|
|
1444
1473
|
ref: c,
|
|
1445
|
-
rowInput:
|
|
1446
|
-
columnInput:
|
|
1474
|
+
rowInput: _s(p),
|
|
1475
|
+
columnInput: _s(u)
|
|
1447
1476
|
} : l(d) && a(f) ? {
|
|
1448
1477
|
ref: c,
|
|
1449
|
-
rowInput:
|
|
1450
|
-
columnInput:
|
|
1478
|
+
rowInput: _s(u),
|
|
1479
|
+
columnInput: _s(p)
|
|
1451
1480
|
} : null;
|
|
1452
|
-
},
|
|
1481
|
+
}, $s = /^(?:(\d{4})-(\d{2})-(\d{2}))?T?(?:(\d{2}):(\d{2})(?::(\d{2})(\.\d+)?)?)?(?:Z|[+-]\d{2}:?\d{2})?$/, Rs = /^PT(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?$/, Ls = (t, e, s) => {
|
|
1453
1482
|
const o = Math.floor((14 - e) / 12), r = t + 4800 - o, n = e + 12 * o - 3;
|
|
1454
1483
|
return s + Math.floor((153 * n + 2) / 5) + 365 * r + Math.floor(r / 4) - Math.floor(r / 100) + Math.floor(r / 400) - 32045;
|
|
1455
|
-
},
|
|
1484
|
+
}, Vs = Ls(1899, 12, 30), Ms = (t) => {
|
|
1456
1485
|
const e = t.indexOf(":");
|
|
1457
1486
|
return -1 === e ? t : t.slice(e + 1);
|
|
1458
|
-
},
|
|
1487
|
+
}, Bs = class {
|
|
1459
1488
|
constructor() {
|
|
1460
1489
|
this._runs = null, this._text = "", this._font = null, this._inRun = !1, this._inRPr = !1;
|
|
1461
1490
|
}
|
|
@@ -1466,23 +1495,23 @@ var us = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t
|
|
|
1466
1495
|
"r" === t ? (this._inRun = !0, this._text = "", this._font = null, this._runs ??= []) : "rPr" === t ? this._inRun && (this._inRPr = !0) : this._inRPr && function(t, e, s) {
|
|
1467
1496
|
switch (t) {
|
|
1468
1497
|
case "b":
|
|
1469
|
-
s.weight =
|
|
1498
|
+
s.weight = Hs(e) ? 700 : 400;
|
|
1470
1499
|
break;
|
|
1471
1500
|
case "i":
|
|
1472
|
-
s.style =
|
|
1501
|
+
s.style = Hs(e) ? _t.Style.Italic : _t.Style.Normal;
|
|
1473
1502
|
break;
|
|
1474
1503
|
case "strike":
|
|
1475
|
-
s.strike =
|
|
1504
|
+
s.strike = n(Hs(e));
|
|
1476
1505
|
break;
|
|
1477
1506
|
case "outline":
|
|
1478
|
-
s.outline =
|
|
1507
|
+
s.outline = Hs(e);
|
|
1479
1508
|
break;
|
|
1480
1509
|
case "shadow":
|
|
1481
|
-
s.shadow =
|
|
1510
|
+
s.shadow = Hs(e);
|
|
1482
1511
|
break;
|
|
1483
1512
|
case "condense":
|
|
1484
1513
|
case "extend": {
|
|
1485
|
-
const o = a(t,
|
|
1514
|
+
const o = a(t, Hs(e));
|
|
1486
1515
|
void 0 !== o && (s.letterSpacing = o);
|
|
1487
1516
|
break;
|
|
1488
1517
|
}
|
|
@@ -1490,7 +1519,7 @@ var us = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t
|
|
|
1490
1519
|
s.underline = m(e.val);
|
|
1491
1520
|
break;
|
|
1492
1521
|
case "vertAlign": {
|
|
1493
|
-
const t =
|
|
1522
|
+
const t = ut(e.val);
|
|
1494
1523
|
void 0 !== t && (s.baseline = t);
|
|
1495
1524
|
break;
|
|
1496
1525
|
}
|
|
@@ -1505,7 +1534,7 @@ var us = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t
|
|
|
1505
1534
|
break;
|
|
1506
1535
|
}
|
|
1507
1536
|
case "family": {
|
|
1508
|
-
const t =
|
|
1537
|
+
const t = Fs[e.val ?? ""];
|
|
1509
1538
|
t && (s.fallbacks = [t]);
|
|
1510
1539
|
break;
|
|
1511
1540
|
}
|
|
@@ -1515,7 +1544,7 @@ var us = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t
|
|
|
1515
1544
|
break;
|
|
1516
1545
|
}
|
|
1517
1546
|
case "scheme":
|
|
1518
|
-
|
|
1547
|
+
S(s, e.val);
|
|
1519
1548
|
break;
|
|
1520
1549
|
case "color": {
|
|
1521
1550
|
const t = e.rgb;
|
|
@@ -1523,7 +1552,7 @@ var us = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t
|
|
|
1523
1552
|
s.color = "#" + (8 === t.length ? t.substring(2) : t).toUpperCase();
|
|
1524
1553
|
break;
|
|
1525
1554
|
}
|
|
1526
|
-
const o =
|
|
1555
|
+
const o = gt((t) => e[t]);
|
|
1527
1556
|
o && (s.color = o);
|
|
1528
1557
|
break;
|
|
1529
1558
|
}
|
|
@@ -1536,7 +1565,7 @@ var us = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t
|
|
|
1536
1565
|
onCloseTag(t) {
|
|
1537
1566
|
if ("rPr" === t) this._inRPr = !1, this._font ??= {};
|
|
1538
1567
|
else if ("r" === t && this._inRun) {
|
|
1539
|
-
const t =
|
|
1568
|
+
const t = k(this._text), e = this._font;
|
|
1540
1569
|
this._runs.push(e ? {
|
|
1541
1570
|
text: t,
|
|
1542
1571
|
font: e
|
|
@@ -1550,15 +1579,15 @@ var us = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t
|
|
|
1550
1579
|
return null;
|
|
1551
1580
|
}
|
|
1552
1581
|
};
|
|
1553
|
-
function
|
|
1582
|
+
function js(t, e) {
|
|
1554
1583
|
const s = {
|
|
1555
1584
|
family: "Calibri",
|
|
1556
1585
|
size: 11,
|
|
1557
1586
|
...e,
|
|
1558
1587
|
weight: 400,
|
|
1559
|
-
style:
|
|
1560
|
-
underline:
|
|
1561
|
-
strike:
|
|
1588
|
+
style: _t.Style.Normal,
|
|
1589
|
+
underline: _t.UnderlineStyle.None,
|
|
1590
|
+
strike: _t.StrikeStyle.None,
|
|
1562
1591
|
baseline: 0
|
|
1563
1592
|
}, o = new Array(t.length);
|
|
1564
1593
|
for (let e = 0; e < t.length; e++) {
|
|
@@ -1578,17 +1607,17 @@ function Vs(t, e) {
|
|
|
1578
1607
|
}
|
|
1579
1608
|
return o;
|
|
1580
1609
|
}
|
|
1581
|
-
var
|
|
1610
|
+
var Fs = {
|
|
1582
1611
|
1: "serif",
|
|
1583
1612
|
2: "sans-serif",
|
|
1584
1613
|
3: "monospace",
|
|
1585
1614
|
4: "cursive",
|
|
1586
1615
|
5: "fantasy"
|
|
1587
|
-
},
|
|
1616
|
+
}, Hs = (t) => {
|
|
1588
1617
|
const e = t.val;
|
|
1589
1618
|
return void 0 === e || "1" === e || "true" === e;
|
|
1590
1619
|
};
|
|
1591
|
-
var
|
|
1620
|
+
var Ws = (t) => {
|
|
1592
1621
|
const e = (e) => {
|
|
1593
1622
|
if (t) return new RegExp(`<(?:[\\w.-]+:)?${e}\\b[^>]*>([^<]*)<`).exec(t)?.[1];
|
|
1594
1623
|
}, s = (t) => {
|
|
@@ -1598,23 +1627,23 @@ var Bs = (t) => {
|
|
|
1598
1627
|
return {
|
|
1599
1628
|
c: s(e("col")),
|
|
1600
1629
|
r: s(e("row")),
|
|
1601
|
-
x:
|
|
1602
|
-
y:
|
|
1630
|
+
x: Y(e("colOff") ?? "0") ?? 0,
|
|
1631
|
+
y: Y(e("rowOff") ?? "0") ?? 0
|
|
1603
1632
|
};
|
|
1604
|
-
},
|
|
1605
|
-
const m = new
|
|
1606
|
-
const e = t.getAttribute("dxfId",
|
|
1633
|
+
}, zs = "formulaDialect", Xs = "isKnownFunction", qs = "date1904", Us = "richStrings", Ks = "defaultFont", Gs = (t, e, s, o, n, a, c, f) => {
|
|
1634
|
+
const m = new vs(), v = (t) => {
|
|
1635
|
+
const e = t.getAttribute("dxfId", gs);
|
|
1607
1636
|
if (null === e) return;
|
|
1608
1637
|
return o?.get(e) || (a?.(`A color filter or sort names a format that does not exist (dxfId '${e}').`), {});
|
|
1609
1638
|
};
|
|
1610
1639
|
let S = !1;
|
|
1611
|
-
const C =
|
|
1612
|
-
let
|
|
1640
|
+
const C = f?.get("parseInlineDxf"), E = f?.get(zs), I = (t) => E && t ? E.readDetached(t) : t, P = new Ft.TransposedBuilder();
|
|
1641
|
+
let D = null, N = "topLeft";
|
|
1613
1642
|
m.registerVisitor({
|
|
1614
1643
|
from: "autoFilter",
|
|
1615
1644
|
to: "autoTable",
|
|
1616
1645
|
openTag: (t) => {
|
|
1617
|
-
const e = t.getAttribute("ref"), s =
|
|
1646
|
+
const e = t.getAttribute("ref"), s = Tt.fastStringToRange(e);
|
|
1618
1647
|
t.getSource().r = s, t.getSource().v = {};
|
|
1619
1648
|
},
|
|
1620
1649
|
closeTag: (t) => {
|
|
@@ -1635,7 +1664,7 @@ var Bs = (t) => {
|
|
|
1635
1664
|
const o = {
|
|
1636
1665
|
r: s,
|
|
1637
1666
|
conditionals: e.conditionals
|
|
1638
|
-
}, r = t.getAttribute("pivot",
|
|
1667
|
+
}, r = t.getAttribute("pivot", fs);
|
|
1639
1668
|
null !== r && (o.pivot = r), t.setSource(o);
|
|
1640
1669
|
}
|
|
1641
1670
|
}), m.registerVisitor({
|
|
@@ -1649,24 +1678,24 @@ var Bs = (t) => {
|
|
|
1649
1678
|
r: e.r,
|
|
1650
1679
|
v: null,
|
|
1651
1680
|
rule: s
|
|
1652
|
-
}), t.copyToObject(s, "type",
|
|
1653
|
-
const r = t.getAttribute("dxfId",
|
|
1681
|
+
}), t.copyToObject(s, "type", bs), t.copyToObject(s, "priority", gs), t.copyToObject(s, "stopIfTrue", fs);
|
|
1682
|
+
const r = t.getAttribute("dxfId", gs);
|
|
1654
1683
|
if (null !== r) {
|
|
1655
1684
|
let e = o?.get(r);
|
|
1656
1685
|
e || (a?.(`Unable to load conditional color. Invalid dxfI: '${r}' at '${t.getPath()}'.`), e = {}), s.style = e;
|
|
1657
1686
|
}
|
|
1658
|
-
t.copyToObject(s, "aboveAverage",
|
|
1687
|
+
t.copyToObject(s, "aboveAverage", fs), t.copyToObject(s, "equalAverage", fs), t.copyToObject(s, "stdDev", gs), t.copyToObject(s, "bottom", fs), t.copyToObject(s, "percent", fs), t.copyToObject(s, "rank", gs), t.copyToObject(s, "operator", bs), t.copyToObject(s, "text", bs), t.copyToObject(s, "timePeriod", bs);
|
|
1659
1688
|
},
|
|
1660
1689
|
closeTag: (t) => {
|
|
1661
1690
|
const e = t.getParent();
|
|
1662
1691
|
if (!e?.r) return;
|
|
1663
1692
|
const s = e.conditionals[e.conditionals.length - 1], o = s?.rule;
|
|
1664
1693
|
if (!o) return;
|
|
1665
|
-
const r = {}, n =
|
|
1694
|
+
const r = {}, n = $(o, a);
|
|
1666
1695
|
n && (r.condition = n), o.style && (r.style = o.style), o.scale && (r.scale = o.scale), o.stopIfTrue && (r.stopIfTrue = !0), o.pivot && (r.pivot = !0), s.v = r, s.priority = o.priority, o.x14Id && (s.x14Id = o.x14Id), delete s.rule;
|
|
1667
1696
|
}
|
|
1668
1697
|
});
|
|
1669
|
-
const
|
|
1698
|
+
const R = (t) => {
|
|
1670
1699
|
const e = t.conditions ?? [], s = [];
|
|
1671
1700
|
for (let t = 0; t < e.length; t++) {
|
|
1672
1701
|
const o = e[t], r = {};
|
|
@@ -1679,10 +1708,10 @@ var Bs = (t) => {
|
|
|
1679
1708
|
to: {},
|
|
1680
1709
|
openTag: (t) => {},
|
|
1681
1710
|
closeTag: (t) => {
|
|
1682
|
-
const e = t.getSource(), s = e.colors ?? [], o =
|
|
1711
|
+
const e = t.getSource(), s = e.colors ?? [], o = R(e);
|
|
1683
1712
|
for (let t = 0; t < o.length; t++) o[t].color = s[t];
|
|
1684
1713
|
t.getParent().scale = {
|
|
1685
|
-
type:
|
|
1714
|
+
type: Ot.ScaleType.ColorScale,
|
|
1686
1715
|
stops: o
|
|
1687
1716
|
};
|
|
1688
1717
|
}
|
|
@@ -1690,12 +1719,12 @@ var Bs = (t) => {
|
|
|
1690
1719
|
from: "dataBar",
|
|
1691
1720
|
to: {},
|
|
1692
1721
|
openTag: (t) => {
|
|
1693
|
-
t.copyTo("maxLength",
|
|
1722
|
+
t.copyTo("maxLength", gs), t.copyTo("minLength", gs), t.copyTo("showValue", fs);
|
|
1694
1723
|
},
|
|
1695
1724
|
closeTag: (t) => {
|
|
1696
1725
|
const e = t.getSource(), s = {
|
|
1697
|
-
type:
|
|
1698
|
-
stops:
|
|
1726
|
+
type: Ot.ScaleType.DataBar,
|
|
1727
|
+
stops: R(e)
|
|
1699
1728
|
}, o = e.colors?.[0];
|
|
1700
1729
|
o && (s.color = o), void 0 !== e.minLength && (s.minLength = e.minLength), void 0 !== e.maxLength && (s.maxLength = e.maxLength), void 0 !== e.showValue && (s.showValue = e.showValue), t.getParent().scale = s;
|
|
1701
1730
|
}
|
|
@@ -1703,12 +1732,12 @@ var Bs = (t) => {
|
|
|
1703
1732
|
from: "iconSet",
|
|
1704
1733
|
to: {},
|
|
1705
1734
|
openTag: (t) => {
|
|
1706
|
-
t.copyTo("iconSet",
|
|
1735
|
+
t.copyTo("iconSet", bs), t.copyTo("reverse", fs), t.copyTo("showValue", fs);
|
|
1707
1736
|
},
|
|
1708
1737
|
closeTag: (t) => {
|
|
1709
1738
|
const e = t.getSource(), s = {
|
|
1710
|
-
type:
|
|
1711
|
-
stops:
|
|
1739
|
+
type: Ot.ScaleType.IconSet,
|
|
1740
|
+
stops: R(e)
|
|
1712
1741
|
};
|
|
1713
1742
|
void 0 !== e.iconSet && (s.iconSet = e.iconSet), void 0 !== e.reverse && (s.reverse = e.reverse), void 0 !== e.showValue && (s.showValue = e.showValue), t.getParent().scale = s;
|
|
1714
1743
|
}
|
|
@@ -1727,11 +1756,11 @@ var Bs = (t) => {
|
|
|
1727
1756
|
const e = t.getParent();
|
|
1728
1757
|
e.conditions || (e.conditions = []);
|
|
1729
1758
|
const s = t.getSource();
|
|
1730
|
-
if (e.conditions.push(s), t.copyTo("type",
|
|
1759
|
+
if (e.conditions.push(s), t.copyTo("type", bs), s.type === Ot.ColorStopType.Formula) {
|
|
1731
1760
|
const e = t.getAttribute("val");
|
|
1732
1761
|
null != e && (s.value = I(String(e)));
|
|
1733
|
-
} else t.copyTo("value",
|
|
1734
|
-
!1 === t.getAttribute("gte",
|
|
1762
|
+
} else t.copyTo("value", ms, "val");
|
|
1763
|
+
!1 === t.getAttribute("gte", fs) && (s.exclusive = !0);
|
|
1735
1764
|
}
|
|
1736
1765
|
}), m.registerVisitor({
|
|
1737
1766
|
from: "color",
|
|
@@ -1739,7 +1768,7 @@ var Bs = (t) => {
|
|
|
1739
1768
|
openTag: (t) => {
|
|
1740
1769
|
const e = t.getParent();
|
|
1741
1770
|
e.colors || (e.colors = []);
|
|
1742
|
-
const s =
|
|
1771
|
+
const s = gt((e) => t.getAttribute(e));
|
|
1743
1772
|
e.colors.push(s);
|
|
1744
1773
|
}
|
|
1745
1774
|
}), m.registerVisitor({
|
|
@@ -1751,11 +1780,11 @@ var Bs = (t) => {
|
|
|
1751
1780
|
let r = e.filter;
|
|
1752
1781
|
r || (r = { conditions: [] }, e.filter = r);
|
|
1753
1782
|
let n = r.conditions;
|
|
1754
|
-
if (n || (n = [], r.conditions = n), n.push(o), t.getAttribute("hiddenButton",
|
|
1783
|
+
if (n || (n = [], r.conditions = n), n.push(o), t.getAttribute("hiddenButton", fs) && e) {
|
|
1755
1784
|
let t = e.hiddenButtons;
|
|
1756
1785
|
t || (t = [], e.hiddenButtons = t), t.push(s);
|
|
1757
1786
|
}
|
|
1758
|
-
if (t.getAttribute("showButton",
|
|
1787
|
+
if (t.getAttribute("showButton", fs) && e) {
|
|
1759
1788
|
let t = e.showButtons;
|
|
1760
1789
|
t || (t = [], e.showButtons = t), t.push(s);
|
|
1761
1790
|
}
|
|
@@ -1765,71 +1794,71 @@ var Bs = (t) => {
|
|
|
1765
1794
|
from: "colorFilter",
|
|
1766
1795
|
openTag: (t) => {
|
|
1767
1796
|
const e = t.getParent(), s = {};
|
|
1768
|
-
e.operator =
|
|
1769
|
-
const o =
|
|
1797
|
+
e.operator = Pt.BuiltInOperatorNames.Color, e.param = s, t.copyToObject(s, "cellColor", fs);
|
|
1798
|
+
const o = v(t);
|
|
1770
1799
|
o && (s.style = o);
|
|
1771
1800
|
}
|
|
1772
1801
|
}), m.registerVisitor({
|
|
1773
1802
|
from: "iconFilter",
|
|
1774
1803
|
openTag: (t) => {
|
|
1775
1804
|
const e = t.getParent(), s = {};
|
|
1776
|
-
e.operator =
|
|
1805
|
+
e.operator = Pt.BuiltInOperatorNames.Icon, e.param = s, t.copyToObject(s, "iconId", gs), t.copyToObject(s, "iconSet", bs);
|
|
1777
1806
|
}
|
|
1778
1807
|
}), m.registerVisitor({
|
|
1779
1808
|
from: "top10",
|
|
1780
1809
|
openTag: (t) => {
|
|
1781
1810
|
const e = t.getParent(), s = {};
|
|
1782
|
-
e.operator =
|
|
1811
|
+
e.operator = Pt.BuiltInOperatorNames.TopN, e.param = s, t.copyToObject(s, "filterVal", ms), t.copyToObject(s, "percent", fs), t.copyToObject(s, "top", fs), t.copyToObject(s, "limit", ms, "val");
|
|
1783
1812
|
}
|
|
1784
1813
|
}), m.registerVisitor({
|
|
1785
1814
|
from: "dynamicFilter",
|
|
1786
1815
|
openTag: (t) => {
|
|
1787
|
-
const e = t.getParent(), s =
|
|
1816
|
+
const e = t.getParent(), s = L(t.getAttribute("type"));
|
|
1788
1817
|
e.operator = s.operator, e.param = s.param;
|
|
1789
1818
|
}
|
|
1790
1819
|
});
|
|
1791
|
-
const
|
|
1820
|
+
const V = {
|
|
1792
1821
|
from: "filters",
|
|
1793
1822
|
to: {},
|
|
1794
1823
|
openTag: (t) => {
|
|
1795
1824
|
const e = t.getParent(), s = {};
|
|
1796
|
-
return e.selector =
|
|
1825
|
+
return e.selector = Pt.BuiltInSelectorNames.Display, e.operator = Pt.BuiltInOperatorNames.InSet, e.param = s, t.copyToObject(s, "blank", fs), t.copyToObject(s, "calendarType", bs), s;
|
|
1797
1826
|
}
|
|
1798
1827
|
};
|
|
1799
|
-
m.registerVisitor(
|
|
1800
|
-
const
|
|
1828
|
+
m.registerVisitor(V);
|
|
1829
|
+
const M = {
|
|
1801
1830
|
from: "filter",
|
|
1802
1831
|
openTag: (t) => {
|
|
1803
1832
|
const e = t.getParent();
|
|
1804
1833
|
let s = e.items;
|
|
1805
|
-
s || (s = [], e.items = s), s.push(t.getAttribute("val",
|
|
1834
|
+
s || (s = [], e.items = s), s.push(t.getAttribute("val", bs));
|
|
1806
1835
|
}
|
|
1807
1836
|
};
|
|
1808
|
-
m.registerVisitor(
|
|
1809
|
-
const
|
|
1837
|
+
m.registerVisitor(M);
|
|
1838
|
+
const B = {
|
|
1810
1839
|
from: "dateGroupItem",
|
|
1811
1840
|
to: {},
|
|
1812
1841
|
openTag: (t) => {
|
|
1813
1842
|
const e = t.getParent();
|
|
1814
1843
|
let s = e.dateGroups;
|
|
1815
|
-
s || (s = [], e.dateGroups = s), s.push(t.getSource()), t.copyTo("group",
|
|
1844
|
+
s || (s = [], e.dateGroups = s), s.push(t.getSource()), t.copyTo("group", bs, "dateTimeGrouping"), t.copyTo("day", gs), t.copyTo("hour", gs), t.copyTo("minute", gs), t.copyTo("month", gs), t.copyTo("second", gs), t.copyTo("year", gs);
|
|
1816
1845
|
}
|
|
1817
1846
|
};
|
|
1818
|
-
m.registerVisitor(
|
|
1819
|
-
const
|
|
1820
|
-
|
|
1847
|
+
m.registerVisitor(B);
|
|
1848
|
+
const H = /* @__PURE__ */ new Map();
|
|
1849
|
+
H.set("filterColumn", {
|
|
1821
1850
|
from: "filterColumn",
|
|
1822
1851
|
transparent: !0
|
|
1823
|
-
}),
|
|
1852
|
+
}), H.set("filters", V), H.set("filter", M), H.set("dateGroupItem", B), m.registerVisitor({
|
|
1824
1853
|
from: "customFilters",
|
|
1825
1854
|
openTag: (t) => {
|
|
1826
1855
|
const e = t.getParent(), s = t.getAttribute("and"), o = "and" === s || "1" === s, r = [];
|
|
1827
|
-
return e.operator = o ?
|
|
1856
|
+
return e.operator = o ? Pt.BuiltInOperatorNames.And : Pt.BuiltInOperatorNames.Or, e.param = r, t.setSource(e), r;
|
|
1828
1857
|
},
|
|
1829
1858
|
closeTag: (t) => {
|
|
1830
1859
|
const e = t.getSource(), s = e?.param;
|
|
1831
1860
|
if (!e || !s) return;
|
|
1832
|
-
const o = 1 === s.length ? s[0] :
|
|
1861
|
+
const o = 1 === s.length ? s[0] : nt(e);
|
|
1833
1862
|
o !== e && (e.operator = o.operator, e.param = o.param);
|
|
1834
1863
|
}
|
|
1835
1864
|
}), m.registerVisitor({
|
|
@@ -1838,14 +1867,14 @@ var Bs = (t) => {
|
|
|
1838
1867
|
const e = t.getParent();
|
|
1839
1868
|
let s;
|
|
1840
1869
|
Array.isArray(e) ? (s = {}, e.push(s)) : s = e;
|
|
1841
|
-
const o =
|
|
1870
|
+
const o = ot({
|
|
1842
1871
|
operator: t.getAttribute("operator"),
|
|
1843
1872
|
val: t.getAttribute("val")
|
|
1844
1873
|
}, (e) => t.warn(e));
|
|
1845
1874
|
o && (s.operator = o.operator, s.param = o.param);
|
|
1846
1875
|
}
|
|
1847
1876
|
});
|
|
1848
|
-
let
|
|
1877
|
+
let z = {}, X = null;
|
|
1849
1878
|
m.registerVisitor({
|
|
1850
1879
|
from: "sortState",
|
|
1851
1880
|
to: {},
|
|
@@ -1854,16 +1883,16 @@ var Bs = (t) => {
|
|
|
1854
1883
|
let s = e.v;
|
|
1855
1884
|
if (!s) return;
|
|
1856
1885
|
const o = {};
|
|
1857
|
-
|
|
1858
|
-
const r = t.getAttribute("caseSensitive",
|
|
1859
|
-
null != r && (
|
|
1886
|
+
z = {};
|
|
1887
|
+
const r = t.getAttribute("caseSensitive", fs);
|
|
1888
|
+
null != r && (z.collatorOptions = r ? Bt.CaseSensitiveOptions : Bt.CaseInsensitiveOptions);
|
|
1860
1889
|
const n = t.getAttribute("sortMethod");
|
|
1861
|
-
"stroke" !== n && "pinYin" !== n || (
|
|
1862
|
-
...
|
|
1890
|
+
"stroke" !== n && "pinYin" !== n || (z.collatorOptions = {
|
|
1891
|
+
...z.collatorOptions,
|
|
1863
1892
|
collation: "stroke" === n ? "stroke" : "pinyin"
|
|
1864
|
-
}), t.getAttribute("columnSort",
|
|
1893
|
+
}), t.getAttribute("columnSort", fs) && (o.axis = Nt.Axis.Column);
|
|
1865
1894
|
const i = t.getAttribute("ref"), a = e.r;
|
|
1866
|
-
|
|
1895
|
+
X = i && a ? Tt.fastStringToRange(i) : null, X && (o.extent = { range: h(a, X) }), s.sort = o, t.setSource(e);
|
|
1867
1896
|
}
|
|
1868
1897
|
}), m.registerVisitor({
|
|
1869
1898
|
from: "sortCondition",
|
|
@@ -1878,14 +1907,14 @@ var Bs = (t) => {
|
|
|
1878
1907
|
const n = t.getAttribute("ref");
|
|
1879
1908
|
let i = 0, a = null;
|
|
1880
1909
|
if (n) {
|
|
1881
|
-
const t =
|
|
1882
|
-
i = o ? s - r : s, o &&
|
|
1910
|
+
const t = Tt.fastStringToRange(n, Ys), s = t.colStart, o = e.r, r = o.colStart;
|
|
1911
|
+
i = o ? s - r : s, o && X && (a = x(o, X, t));
|
|
1883
1912
|
}
|
|
1884
1913
|
o.extent && (o.extent.sorts ??= []).push(a);
|
|
1885
|
-
const l = { ...
|
|
1914
|
+
const l = { ...z }, c = et(t.getAttribute("sortBy"));
|
|
1886
1915
|
c && (l.sortOn = c);
|
|
1887
|
-
const h =
|
|
1888
|
-
h && (l.style = h), t.copyToObject(l, "iconSet",
|
|
1916
|
+
const h = v(t);
|
|
1917
|
+
h && (l.style = h), t.copyToObject(l, "iconSet", bs), t.copyToObject(l, "customList", bs), l.reverse = t.getAttribute("descending", fs) ?? !1;
|
|
1889
1918
|
const u = {
|
|
1890
1919
|
index: i,
|
|
1891
1920
|
criteria: l
|
|
@@ -1893,25 +1922,25 @@ var Bs = (t) => {
|
|
|
1893
1922
|
r.push(u);
|
|
1894
1923
|
}
|
|
1895
1924
|
});
|
|
1896
|
-
const
|
|
1897
|
-
|
|
1925
|
+
const U = (t) => {
|
|
1926
|
+
D = t.getSource(), N = "topLeft", t.copyTo("topLeft", bs, "topLeftCell");
|
|
1898
1927
|
const e = d(t.getAttribute("defaultGridColor")), s = t.getAttribute("colorId");
|
|
1899
|
-
null === s || e || (t.getSource().gridLineColor = "index" + parseFloat(s)), t.copyTo("showZeros",
|
|
1928
|
+
null === s || e || (t.getSource().gridLineColor = "index" + parseFloat(s)), t.copyTo("showZeros", fs), t.copyTo("showFormulas", fs), t.copyTo("zoomScale", gs), t.copyTo("viewMode", bs, "view");
|
|
1900
1929
|
const o = {};
|
|
1901
|
-
for (const [e, s] of
|
|
1902
|
-
const r = t.getAttribute(s,
|
|
1930
|
+
for (const [e, s] of lt) {
|
|
1931
|
+
const r = t.getAttribute(s, gs);
|
|
1903
1932
|
r && (o[e] = Math.min(400, Math.max(10, r)));
|
|
1904
1933
|
}
|
|
1905
|
-
Object.keys(o).length > 0 && (t.getSource().zoomScales = o), t.copyTo("showRuler",
|
|
1934
|
+
Object.keys(o).length > 0 && (t.getSource().zoomScales = o), t.copyTo("showRuler", fs), t.copyTo("showWhitespace", fs, "showWhiteSpace"), t.copyTo("windowProtection", fs), t.copyTo("showRowHeaders", fs, "showRowColHeaders"), t.copyTo("showColumnHeaders", fs, "showRowColHeaders"), t.copyTo("showRowGridlines", fs, "showGridLines"), t.copyTo("showColumnGridlines", fs, "showGridLines"), t.copyTo("rightToLeft", fs), t.copyTo("showOutlineSymbols", fs);
|
|
1906
1935
|
};
|
|
1907
1936
|
m.registerVisitor({
|
|
1908
1937
|
from: "sheetView",
|
|
1909
1938
|
to: "view",
|
|
1910
1939
|
openTag: (t) => {
|
|
1911
|
-
|
|
1940
|
+
U(t);
|
|
1912
1941
|
},
|
|
1913
1942
|
closeTag: () => {
|
|
1914
|
-
|
|
1943
|
+
D = null;
|
|
1915
1944
|
}
|
|
1916
1945
|
}), m.registerVisitor({
|
|
1917
1946
|
from: "customSheetViews",
|
|
@@ -1923,19 +1952,19 @@ var Bs = (t) => {
|
|
|
1923
1952
|
from: "customSheetView",
|
|
1924
1953
|
to: [],
|
|
1925
1954
|
openTag: (t) => {
|
|
1926
|
-
|
|
1955
|
+
K = !0, U(t);
|
|
1927
1956
|
},
|
|
1928
1957
|
closeTag: () => {
|
|
1929
|
-
|
|
1958
|
+
K = !1, D = null;
|
|
1930
1959
|
}
|
|
1931
1960
|
}), m.registerVisitor({
|
|
1932
1961
|
from: "selection",
|
|
1933
1962
|
to: null,
|
|
1934
1963
|
openTag: (t) => {
|
|
1935
|
-
if (!
|
|
1964
|
+
if (!D) return;
|
|
1936
1965
|
const e = t.getAttribute("activeCell")?.replace(/\$/g, ""), s = t.getAttribute("sqref")?.replace(/\$/g, ""), o = t.getAttribute("pane") ?? "topLeft";
|
|
1937
1966
|
if (o !== N) {
|
|
1938
|
-
const t =
|
|
1967
|
+
const t = D.freezePanes;
|
|
1939
1968
|
if (t && e) {
|
|
1940
1969
|
const r = { activeCell: e };
|
|
1941
1970
|
s && s !== e && (r.sqref = s), (t.paneSelections ??= {})[o] = r;
|
|
@@ -1944,32 +1973,32 @@ var Bs = (t) => {
|
|
|
1944
1973
|
}
|
|
1945
1974
|
const r = {};
|
|
1946
1975
|
e && (r.cell = e);
|
|
1947
|
-
const n = t.getAttribute("activeCellId",
|
|
1948
|
-
null !== n && (r.rangeIndex = n), s && s !== e && (r.ranges = s.trim().split(/\s+/)),
|
|
1976
|
+
const n = t.getAttribute("activeCellId", gs);
|
|
1977
|
+
null !== n && (r.rangeIndex = n), s && s !== e && (r.ranges = s.trim().split(/\s+/)), D.selection = r;
|
|
1949
1978
|
}
|
|
1950
1979
|
}), m.registerVisitor({
|
|
1951
1980
|
from: "pane",
|
|
1952
1981
|
to: null,
|
|
1953
1982
|
openTag: (t) => {
|
|
1954
|
-
if (!
|
|
1983
|
+
if (!D) return;
|
|
1955
1984
|
N = t.getAttribute("activePane") ?? "topLeft";
|
|
1956
1985
|
const e = t.getAttribute("state");
|
|
1957
1986
|
if ("frozen" === e || "frozenSplit" === e) {
|
|
1958
1987
|
const e = {};
|
|
1959
|
-
|
|
1960
|
-
const s = (
|
|
1988
|
+
D.freezePanes = e, t.copyToObject(e, "topLeft", bs, "topLeftCell");
|
|
1989
|
+
const s = (D.topLeft ? Tt.fastStringToCell(D.topLeft) : void 0) ?? {
|
|
1961
1990
|
colIndex: 0,
|
|
1962
1991
|
rowIndex: 0
|
|
1963
1992
|
}, o = {
|
|
1964
1993
|
colIndex: 0,
|
|
1965
1994
|
rowIndex: 0
|
|
1966
1995
|
};
|
|
1967
|
-
t.copyToObject(o, "colIndex",
|
|
1996
|
+
t.copyToObject(o, "colIndex", gs, "xSplit"), t.copyToObject(o, "rowIndex", gs, "ySplit");
|
|
1968
1997
|
const r = {
|
|
1969
1998
|
colIndex: s.colIndex + o.colIndex,
|
|
1970
1999
|
rowIndex: s.rowIndex + o.rowIndex
|
|
1971
2000
|
};
|
|
1972
|
-
e.coords =
|
|
2001
|
+
e.coords = Tt.cellToString(r);
|
|
1973
2002
|
}
|
|
1974
2003
|
}
|
|
1975
2004
|
}), m.registerVisitor({
|
|
@@ -1977,9 +2006,9 @@ var Bs = (t) => {
|
|
|
1977
2006
|
transparent: !0,
|
|
1978
2007
|
openTag: (e) => {
|
|
1979
2008
|
const s = e.getAttribute("codeName");
|
|
1980
|
-
s && (t.codeName = s), !1 === e.getAttribute("enableFormatConditionsCalculation",
|
|
2009
|
+
s && (t.codeName = s), !1 === e.getAttribute("enableFormatConditionsCalculation", fs) && (t.conditionalFormatCalculation = !1), !0 === e.getAttribute("transitionEvaluation", fs) && (t.transitionFormulaEvaluation = !0), !0 === e.getAttribute("transitionEntry", fs) && (t.transitionFormulaEntry = !0), !1 === e.getAttribute("published", fs) && (t.excludeFromPublishing = !0);
|
|
1981
2010
|
const o = {};
|
|
1982
|
-
!0 === e.getAttribute("syncHorizontal",
|
|
2011
|
+
!0 === e.getAttribute("syncHorizontal", fs) && (o.horizontal = !0), !0 === e.getAttribute("syncVertical", fs) && (o.vertical = !0);
|
|
1983
2012
|
const r = e.getAttribute("syncRef");
|
|
1984
2013
|
r && (o.anchor = r), Object.keys(o).length > 0 && (t.syncScroll = o);
|
|
1985
2014
|
}
|
|
@@ -1987,17 +2016,17 @@ var Bs = (t) => {
|
|
|
1987
2016
|
from: "tabColor",
|
|
1988
2017
|
to: null,
|
|
1989
2018
|
openTag: (e) => {
|
|
1990
|
-
const s =
|
|
2019
|
+
const s = gt((t) => e.getAttribute(t));
|
|
1991
2020
|
s && (t.tabColor = s);
|
|
1992
2021
|
}
|
|
1993
2022
|
});
|
|
1994
|
-
let
|
|
2023
|
+
let K = !1;
|
|
1995
2024
|
const G = () => t.pageLayout ??= {};
|
|
1996
2025
|
m.registerVisitor({
|
|
1997
2026
|
from: "pageSetUpPr",
|
|
1998
2027
|
to: null,
|
|
1999
2028
|
openTag: (t) => {
|
|
2000
|
-
!0 === t.getAttribute("fitToPage",
|
|
2029
|
+
!0 === t.getAttribute("fitToPage", fs) && (G().fitToPage = !0), !1 === t.getAttribute("autoPageBreaks", fs) && (G().hideAutoPageBreaks = !0);
|
|
2001
2030
|
}
|
|
2002
2031
|
}), m.registerVisitor({
|
|
2003
2032
|
from: "outlinePr",
|
|
@@ -2016,8 +2045,8 @@ var Bs = (t) => {
|
|
|
2016
2045
|
from: "pageMargins",
|
|
2017
2046
|
to: null,
|
|
2018
2047
|
openTag: (t) => {
|
|
2019
|
-
if (
|
|
2020
|
-
const e = (e, s) => t.getAttribute(e,
|
|
2048
|
+
if (K) return;
|
|
2049
|
+
const e = (e, s) => t.getAttribute(e, ms) ?? s, s = {
|
|
2021
2050
|
left: e("left", .7),
|
|
2022
2051
|
right: e("right", .7),
|
|
2023
2052
|
top: e("top", .75),
|
|
@@ -2031,8 +2060,8 @@ var Bs = (t) => {
|
|
|
2031
2060
|
from: "pageSetup",
|
|
2032
2061
|
to: null,
|
|
2033
2062
|
openTag: (t) => {
|
|
2034
|
-
if (
|
|
2035
|
-
const s = G(), o = (e) => t.getAttribute(e,
|
|
2063
|
+
if (K) return;
|
|
2064
|
+
const s = G(), o = (e) => t.getAttribute(e, gs) ?? void 0, r = (e) => t.getAttribute(e, fs), n = t.getAttribute("orientation");
|
|
2036
2065
|
"landscape" !== n && "portrait" !== n || (s.orientation = n);
|
|
2037
2066
|
for (const t of [
|
|
2038
2067
|
"paperSize",
|
|
@@ -2051,9 +2080,9 @@ var Bs = (t) => {
|
|
|
2051
2080
|
i && (s.paperHeight = i);
|
|
2052
2081
|
const a = t.getAttribute("paperWidth");
|
|
2053
2082
|
a && (s.paperWidth = a), "overThenDown" === t.getAttribute("pageOrder") && (s.printOrder = "overThenDown"), !0 === r("blackAndWhite") && (s.blackAndWhite = !0), !0 === r("draft") && (s.draftMode = !0), !0 === r("useFirstPageNumber") && (s.useFirstPageNumber = !0), !1 === r("usePrinterDefaults") && (s.ignorePrinterDefaults = !0);
|
|
2054
|
-
const l = t.getAttribute("cellComments"), c =
|
|
2083
|
+
const l = t.getAttribute("cellComments"), c = W.find(([t]) => t === l)?.[1];
|
|
2055
2084
|
c && (s.printComments = c);
|
|
2056
|
-
const h = t.getAttribute("errors"), u =
|
|
2085
|
+
const h = t.getAttribute("errors"), u = O.find(([t]) => t === h)?.[1];
|
|
2057
2086
|
u && (s.printErrors = u);
|
|
2058
2087
|
const d = t.getAttribute("r:id"), p = d ? e(d, "part") : null;
|
|
2059
2088
|
p && (s.printerSettings = p);
|
|
@@ -2062,49 +2091,49 @@ var Bs = (t) => {
|
|
|
2062
2091
|
from: "printOptions",
|
|
2063
2092
|
to: null,
|
|
2064
2093
|
openTag: (t) => {
|
|
2065
|
-
if (
|
|
2066
|
-
const e = (e) => !0 === t.getAttribute(e,
|
|
2094
|
+
if (K) return;
|
|
2095
|
+
const e = (e) => !0 === t.getAttribute(e, fs);
|
|
2067
2096
|
e("horizontalCentered") && (G().centerHorizontally = !0), e("verticalCentered") && (G().centerVertically = !0), e("gridLines") && (G().printGridlines = !0), e("headings") && (G().printHeadings = !0);
|
|
2068
2097
|
}
|
|
2069
2098
|
}), m.registerVisitor({
|
|
2070
2099
|
from: "headerFooter",
|
|
2071
2100
|
to: {},
|
|
2072
2101
|
openTag: (t) => {
|
|
2073
|
-
if (
|
|
2074
|
-
const e = {}, s = (e) => t.getAttribute(e,
|
|
2102
|
+
if (K) return;
|
|
2103
|
+
const e = {}, s = (e) => t.getAttribute(e, fs);
|
|
2075
2104
|
!0 === s("differentOddEven") && (e.differentOddEven = !0), !0 === s("differentFirst") && (e.differentFirst = !0), !1 === s("scaleWithDoc") && (e.ignoreSheetScale = !0), !1 === s("alignWithMargins") && (e.ignoreSheetMargins = !0), Object.keys(e).length > 0 && (G().headerFooter = e);
|
|
2076
2105
|
}
|
|
2077
2106
|
});
|
|
2078
|
-
for (const t of
|
|
2107
|
+
for (const t of j) m.registerVisitor({
|
|
2079
2108
|
from: t,
|
|
2080
2109
|
to: {},
|
|
2081
2110
|
text: (e, s) => {
|
|
2082
|
-
if (
|
|
2111
|
+
if (K) return;
|
|
2083
2112
|
const o = G(), r = o.headerFooter ??= {};
|
|
2084
|
-
r[t] = (r[t] ?? "") +
|
|
2113
|
+
r[t] = (r[t] ?? "") + k(e);
|
|
2085
2114
|
}
|
|
2086
2115
|
});
|
|
2087
|
-
let
|
|
2116
|
+
let J = "rowBreaks";
|
|
2088
2117
|
for (const [t, e] of [["rowBreaks", "rowBreaks"], ["colBreaks", "columnBreaks"]]) m.registerVisitor({
|
|
2089
2118
|
from: t,
|
|
2090
2119
|
to: {},
|
|
2091
2120
|
openTag: () => {
|
|
2092
|
-
|
|
2121
|
+
J = e;
|
|
2093
2122
|
}
|
|
2094
2123
|
});
|
|
2095
2124
|
m.registerVisitor({
|
|
2096
2125
|
from: "brk",
|
|
2097
2126
|
to: null,
|
|
2098
2127
|
openTag: (t) => {
|
|
2099
|
-
if (
|
|
2100
|
-
const e = t.getAttribute("id",
|
|
2128
|
+
if (K) return;
|
|
2129
|
+
const e = t.getAttribute("id", gs);
|
|
2101
2130
|
if (null == e) return;
|
|
2102
|
-
const s = { index: e }, o = t.getAttribute("min",
|
|
2131
|
+
const s = { index: e }, o = t.getAttribute("min", gs);
|
|
2103
2132
|
null != o && (s.min = o);
|
|
2104
|
-
const r = t.getAttribute("max",
|
|
2105
|
-
null != r && (s.max = r), !0 !== t.getAttribute("man",
|
|
2133
|
+
const r = t.getAttribute("max", gs);
|
|
2134
|
+
null != r && (s.max = r), !0 !== t.getAttribute("man", fs) && (s.automatic = !0), !0 === t.getAttribute("pt", fs) && (s.pivot = !0);
|
|
2106
2135
|
const n = G();
|
|
2107
|
-
(n[
|
|
2136
|
+
(n[J] ??= []).push(s);
|
|
2108
2137
|
}
|
|
2109
2138
|
}), m.registerVisitor({
|
|
2110
2139
|
from: "ignoredErrors",
|
|
@@ -2116,7 +2145,7 @@ var Bs = (t) => {
|
|
|
2116
2145
|
const s = e.getAttribute("sqref");
|
|
2117
2146
|
if (!s) return;
|
|
2118
2147
|
const o = [];
|
|
2119
|
-
for (const t of
|
|
2148
|
+
for (const t of u) !0 === e.getAttribute(t, fs) && o.push(t);
|
|
2120
2149
|
if (0 !== o.length) for (const e of s.trim().split(/\s+/)) (t.ignoredErrors ??= []).push({
|
|
2121
2150
|
r: e,
|
|
2122
2151
|
v: o
|
|
@@ -2134,10 +2163,10 @@ var Bs = (t) => {
|
|
|
2134
2163
|
openTag: (e) => {
|
|
2135
2164
|
e.setSource([]);
|
|
2136
2165
|
const s = {};
|
|
2137
|
-
!0 === e.getAttribute("disablePrompts",
|
|
2138
|
-
const o = e.getAttribute("xWindow",
|
|
2166
|
+
!0 === e.getAttribute("disablePrompts", fs) && (s.disablePrompts = !0);
|
|
2167
|
+
const o = e.getAttribute("xWindow", gs);
|
|
2139
2168
|
null !== o && (s.windowX = o);
|
|
2140
|
-
const r = e.getAttribute("yWindow",
|
|
2169
|
+
const r = e.getAttribute("yWindow", gs);
|
|
2141
2170
|
null !== r && (s.windowY = r), Object.keys(s).length > 0 && (t.validationSettings = {
|
|
2142
2171
|
...t.validationSettings,
|
|
2143
2172
|
...s
|
|
@@ -2158,13 +2187,13 @@ var Bs = (t) => {
|
|
|
2158
2187
|
operator: t.getAttribute("operator") ?? void 0
|
|
2159
2188
|
}
|
|
2160
2189
|
};
|
|
2161
|
-
!0 === t.getAttribute("showDropDown",
|
|
2190
|
+
!0 === t.getAttribute("showDropDown", fs) && (s.hideDropdown = !0), t.copyToObject(s, "alert", bs, "error"), t.copyToObject(s, "alertTitle", bs, "errorTitle"), t.copyToObject(s, "showAlertMessage", fs, "showErrorMessage"), s.alertStyle = t.getAttribute("errorStyle") ?? "stop", t.copyToObject(s, "imeMode"), t.copyToObject(s, "prompt"), t.copyToObject(s, "promptTitle"), t.copyToObject(s, "showPromptMessage", fs, "showInputMessage"), t.setSource(o);
|
|
2162
2191
|
},
|
|
2163
2192
|
closeTag: (t) => {
|
|
2164
2193
|
const e = t.getSource();
|
|
2165
2194
|
if (!e?.rule) return;
|
|
2166
2195
|
const s = y(e.rule, a);
|
|
2167
|
-
s && (t.getAttribute("allowBlank",
|
|
2196
|
+
s && (t.getAttribute("allowBlank", fs) && (s.includeBlanks = !0), e.v.condition = s), delete e.rule;
|
|
2168
2197
|
}
|
|
2169
2198
|
};
|
|
2170
2199
|
m.registerVisitor(Z), m.registerVisitor({
|
|
@@ -2191,7 +2220,7 @@ var Bs = (t) => {
|
|
|
2191
2220
|
t.getSource().resId = o;
|
|
2192
2221
|
}
|
|
2193
2222
|
});
|
|
2194
|
-
const
|
|
2223
|
+
const Q = {
|
|
2195
2224
|
from: "slicer",
|
|
2196
2225
|
to: {},
|
|
2197
2226
|
openTag: (t) => {
|
|
@@ -2203,8 +2232,8 @@ var Bs = (t) => {
|
|
|
2203
2232
|
for (const t of n) r.slicers[t] = o[t];
|
|
2204
2233
|
}
|
|
2205
2234
|
};
|
|
2206
|
-
m.registerVisitor(
|
|
2207
|
-
const
|
|
2235
|
+
m.registerVisitor(Q);
|
|
2236
|
+
const Y = (t, e) => ({
|
|
2208
2237
|
from: t,
|
|
2209
2238
|
to: {},
|
|
2210
2239
|
openTag: (t) => {
|
|
@@ -2216,8 +2245,8 @@ var Bs = (t) => {
|
|
|
2216
2245
|
closeTag: (t) => {
|
|
2217
2246
|
e(String(t.getSource() ?? ""), t);
|
|
2218
2247
|
}
|
|
2219
|
-
}),
|
|
2220
|
-
|
|
2248
|
+
}), tt = /* @__PURE__ */ new Map();
|
|
2249
|
+
tt.set("dataValidations", {
|
|
2221
2250
|
from: "dataValidations",
|
|
2222
2251
|
to: "validations",
|
|
2223
2252
|
openTag: (t) => {
|
|
@@ -2227,7 +2256,7 @@ var Bs = (t) => {
|
|
|
2227
2256
|
closeTag: (t) => {
|
|
2228
2257
|
0 === (t.getSource()?.length ?? 0) && t.setSource(void 0);
|
|
2229
2258
|
}
|
|
2230
|
-
}),
|
|
2259
|
+
}), tt.set("dataValidation", {
|
|
2231
2260
|
...Z,
|
|
2232
2261
|
closeTag: (t) => {
|
|
2233
2262
|
Z.closeTag(t);
|
|
@@ -2245,18 +2274,18 @@ var Bs = (t) => {
|
|
|
2245
2274
|
});
|
|
2246
2275
|
}
|
|
2247
2276
|
});
|
|
2248
|
-
|
|
2277
|
+
tt.set("formula1", st("formula1")), tt.set("formula2", st("formula2")), tt.set("f", Y("f", (t, e) => {
|
|
2249
2278
|
const s = e.getParent(), o = s?.rule;
|
|
2250
2279
|
o && (o[s.key] = A(I(t), o.type));
|
|
2251
|
-
})),
|
|
2280
|
+
})), tt.set("sqref", Y("sqref", (t, e) => {
|
|
2252
2281
|
const s = e.getParent(), o = t.trim();
|
|
2253
2282
|
s && o && (s.r = o.split(/\s+/).join(","));
|
|
2254
2283
|
}));
|
|
2255
|
-
const rt = /* @__PURE__ */ new Map(),
|
|
2256
|
-
|
|
2284
|
+
const rt = /* @__PURE__ */ new Map(), it = [], at = /* @__PURE__ */ new Map();
|
|
2285
|
+
at.set("conditionalFormattings", {
|
|
2257
2286
|
from: "conditionalFormattings",
|
|
2258
2287
|
transparent: !0
|
|
2259
|
-
}),
|
|
2288
|
+
}), at.set("conditionalFormatting", {
|
|
2260
2289
|
from: "conditionalFormatting",
|
|
2261
2290
|
to: {},
|
|
2262
2291
|
openTag: (t) => {
|
|
@@ -2266,61 +2295,61 @@ var Bs = (t) => {
|
|
|
2266
2295
|
const e = t.getSource(), s = e?.rules ?? [];
|
|
2267
2296
|
for (let t = 0; t < s.length; t++) {
|
|
2268
2297
|
const o = s[t];
|
|
2269
|
-
o.sqref = e.sqref, o.id ? rt.set(o.id, o) :
|
|
2298
|
+
o.sqref = e.sqref, o.id ? rt.set(o.id, o) : it.push(o);
|
|
2270
2299
|
}
|
|
2271
2300
|
}
|
|
2272
|
-
}),
|
|
2301
|
+
}), at.set("cfRule", {
|
|
2273
2302
|
from: "cfRule",
|
|
2274
2303
|
to: {},
|
|
2275
2304
|
openTag: (t) => {
|
|
2276
|
-
t.copyTo("id",
|
|
2305
|
+
t.copyTo("id", bs), t.copyTo("type", bs), t.copyTo("priority", gs), t.copyTo("stopIfTrue", fs), t.copyTo("operator", bs), t.copyTo("text", bs), t.copyTo("timePeriod", bs), t.copyTo("aboveAverage", fs), t.copyTo("equalAverage", fs), t.copyTo("stdDev", gs), t.copyTo("bottom", fs), t.copyTo("percent", fs), t.copyTo("rank", gs);
|
|
2277
2306
|
},
|
|
2278
2307
|
closeTag: (t) => {
|
|
2279
2308
|
const e = t.getSource();
|
|
2280
2309
|
e && t.getParent()?.rules?.push(e);
|
|
2281
2310
|
}
|
|
2282
|
-
}),
|
|
2311
|
+
}), at.set("sqref", Y("sqref", (t, e) => {
|
|
2283
2312
|
const s = e.getParent(), o = t.trim();
|
|
2284
2313
|
s && o && (s.sqref = o);
|
|
2285
|
-
})),
|
|
2314
|
+
})), at.set("dataBar", {
|
|
2286
2315
|
from: "dataBar",
|
|
2287
2316
|
to: {},
|
|
2288
2317
|
openTag: (t) => {
|
|
2289
|
-
t.copyTo("minLength",
|
|
2318
|
+
t.copyTo("minLength", gs), t.copyTo("maxLength", gs), t.copyTo("gradient", fs), t.copyTo("border", fs), t.copyTo("direction", bs), t.copyTo("axisPosition", bs), t.copyTo("negativeBarColorSameAsPositive", fs), t.copyTo("negativeBarBorderColorSameAsPositive", fs);
|
|
2290
2319
|
},
|
|
2291
2320
|
closeTag: (t) => {
|
|
2292
2321
|
t.getParent().dataBar = t.getSource();
|
|
2293
2322
|
}
|
|
2294
|
-
}),
|
|
2323
|
+
}), at.set("iconSet", {
|
|
2295
2324
|
from: "iconSet",
|
|
2296
2325
|
to: {},
|
|
2297
2326
|
openTag: (t) => {
|
|
2298
|
-
t.copyTo("iconSet",
|
|
2327
|
+
t.copyTo("iconSet", bs), t.copyTo("custom", fs), t.copyTo("reverse", fs), t.copyTo("showValue", fs);
|
|
2299
2328
|
},
|
|
2300
2329
|
closeTag: (t) => {
|
|
2301
2330
|
t.getParent().iconSet = t.getSource();
|
|
2302
2331
|
}
|
|
2303
2332
|
});
|
|
2304
|
-
const
|
|
2305
|
-
|
|
2333
|
+
const ct = /* @__PURE__ */ new Map();
|
|
2334
|
+
ct.set("f", Y("f", (t, e) => {
|
|
2306
2335
|
const s = e.getParent();
|
|
2307
2336
|
if (!s) return;
|
|
2308
2337
|
const o = t.trim(), r = Number(o);
|
|
2309
2338
|
s.value = o.length > 0 && Number.isFinite(r) ? r : I(t);
|
|
2310
|
-
})),
|
|
2339
|
+
})), at.set("cfvo", {
|
|
2311
2340
|
from: "cfvo",
|
|
2312
2341
|
to: {},
|
|
2313
|
-
scope: () =>
|
|
2342
|
+
scope: () => ct,
|
|
2314
2343
|
openTag: (t) => {
|
|
2315
2344
|
const e = t.getParent();
|
|
2316
2345
|
e.conditions || (e.conditions = []);
|
|
2317
2346
|
const s = t.getSource();
|
|
2318
|
-
e.conditions.push(s), t.copyTo("type",
|
|
2347
|
+
e.conditions.push(s), t.copyTo("type", bs), !1 === t.getAttribute("gte", fs) && (s.exclusive = !0);
|
|
2319
2348
|
}
|
|
2320
|
-
}),
|
|
2349
|
+
}), at.set("f", Y("f", (t, e) => {
|
|
2321
2350
|
const s = e.getParent();
|
|
2322
2351
|
s && (s.formulas ??= []).push(I(t));
|
|
2323
|
-
})),
|
|
2352
|
+
})), at.set("dxf", {
|
|
2324
2353
|
from: "dxf",
|
|
2325
2354
|
to: {},
|
|
2326
2355
|
raw: !0,
|
|
@@ -2332,19 +2361,19 @@ var Bs = (t) => {
|
|
|
2332
2361
|
s && (e.style = s);
|
|
2333
2362
|
}
|
|
2334
2363
|
});
|
|
2335
|
-
const
|
|
2364
|
+
const ut = (t) => ({
|
|
2336
2365
|
from: t,
|
|
2337
2366
|
to: {},
|
|
2338
2367
|
openTag: (e) => {
|
|
2339
|
-
const s =
|
|
2368
|
+
const s = gt((t) => e.getAttribute(t));
|
|
2340
2369
|
s && (e.getParent()[t] = s);
|
|
2341
2370
|
}
|
|
2342
2371
|
});
|
|
2343
|
-
|
|
2372
|
+
at.set("borderColor", ut("borderColor")), at.set("negativeFillColor", ut("negativeFillColor")), at.set("negativeBorderColor", ut("negativeBorderColor")), at.set("axisColor", ut("axisColor")), at.set("cfIcon", {
|
|
2344
2373
|
from: "cfIcon",
|
|
2345
2374
|
to: {},
|
|
2346
2375
|
openTag: (t) => {
|
|
2347
|
-
const e = t.getAttribute("iconSet"), s = t.getAttribute("iconId",
|
|
2376
|
+
const e = t.getAttribute("iconSet"), s = t.getAttribute("iconId", gs);
|
|
2348
2377
|
if (null === e || null === s) return;
|
|
2349
2378
|
const o = t.getParent();
|
|
2350
2379
|
o.icons || (o.icons = []), o.icons.push({
|
|
@@ -2353,24 +2382,24 @@ var Bs = (t) => {
|
|
|
2353
2382
|
});
|
|
2354
2383
|
}
|
|
2355
2384
|
});
|
|
2356
|
-
const
|
|
2357
|
-
|
|
2385
|
+
const dt = /* @__PURE__ */ new Map();
|
|
2386
|
+
dt.set("id", Y("id", (t, e) => {
|
|
2358
2387
|
const s = e.getParent(), o = t.trim();
|
|
2359
2388
|
s && o && (s.x14Id = o);
|
|
2360
2389
|
}));
|
|
2361
|
-
const
|
|
2362
|
-
|
|
2390
|
+
const pt = /* @__PURE__ */ new Map();
|
|
2391
|
+
pt.set("slicerList", {
|
|
2363
2392
|
from: "slicerList",
|
|
2364
2393
|
transparent: !0
|
|
2365
|
-
}),
|
|
2394
|
+
}), pt.set("slicer", Q);
|
|
2366
2395
|
const mt = /* @__PURE__ */ new Map([
|
|
2367
|
-
[
|
|
2368
|
-
[
|
|
2369
|
-
[
|
|
2370
|
-
[
|
|
2371
|
-
[
|
|
2372
|
-
[
|
|
2373
|
-
[
|
|
2396
|
+
[p(T), tt],
|
|
2397
|
+
[p(r), at],
|
|
2398
|
+
[p(ht), at],
|
|
2399
|
+
[p(w), dt],
|
|
2400
|
+
[p(g), pt],
|
|
2401
|
+
[p(q), pt],
|
|
2402
|
+
[p(i), H]
|
|
2374
2403
|
]), bt = /* @__PURE__ */ new Set();
|
|
2375
2404
|
m.registerVisitor({
|
|
2376
2405
|
from: "extLst",
|
|
@@ -2379,11 +2408,11 @@ var Bs = (t) => {
|
|
|
2379
2408
|
from: "ext",
|
|
2380
2409
|
transparent: !0,
|
|
2381
2410
|
scope: (t) => {
|
|
2382
|
-
const e = t.getAttribute("uri"), s =
|
|
2411
|
+
const e = t.getAttribute("uri"), s = p(e), o = mt.get(s);
|
|
2383
2412
|
if (o) return o;
|
|
2384
|
-
if (!
|
|
2413
|
+
if (!b.has(s) && !bt.has(s)) {
|
|
2385
2414
|
bt.add(s);
|
|
2386
|
-
const o =
|
|
2415
|
+
const o = l[s];
|
|
2387
2416
|
t.warn(o ? `Extension content '${o}' (${e}) is not read; it will be lost on resave.` : `Unknown extension content (uri ${e}) is not read; it will be lost on resave.`);
|
|
2388
2417
|
}
|
|
2389
2418
|
return null;
|
|
@@ -2443,14 +2472,14 @@ var Bs = (t) => {
|
|
|
2443
2472
|
}
|
|
2444
2473
|
});
|
|
2445
2474
|
let xt = null, yt = !1;
|
|
2446
|
-
const vt = /* @__PURE__ */ new Map(),
|
|
2475
|
+
const vt = /* @__PURE__ */ new Map(), wt = {
|
|
2447
2476
|
from: "Fallback",
|
|
2448
2477
|
to: null
|
|
2449
2478
|
}, St = {
|
|
2450
2479
|
from: "Choice",
|
|
2451
2480
|
transparent: !0
|
|
2452
2481
|
};
|
|
2453
|
-
vt.set("Fallback",
|
|
2482
|
+
vt.set("Fallback", wt), vt.set("Choice", St), vt.set("control", {
|
|
2454
2483
|
from: "control",
|
|
2455
2484
|
transparent: !0,
|
|
2456
2485
|
openTag: (t) => {
|
|
@@ -2497,7 +2526,7 @@ var Bs = (t) => {
|
|
|
2497
2526
|
const o = e[t];
|
|
2498
2527
|
s[t] = "string" == typeof o ? o : o?.value ?? "";
|
|
2499
2528
|
}
|
|
2500
|
-
|
|
2529
|
+
F(s, xt.control);
|
|
2501
2530
|
},
|
|
2502
2531
|
closeTag: (t) => {
|
|
2503
2532
|
if (!xt) return;
|
|
@@ -2507,8 +2536,8 @@ var Bs = (t) => {
|
|
|
2507
2536
|
const s = e[2], o = (t) => new RegExp(`<(?:[\\w.-]+:)?${t}\\b[^>]*>([\\s\\S]*?)<\\/(?:[\\w.-]+:)?${t}>`).exec(s)?.[1], r = e[1], n = /\bmoveWithCells="(?:1|true)"/.test(r), i = /\bsizeWithCells="(?:1|true)"/.test(r);
|
|
2508
2537
|
return {
|
|
2509
2538
|
anchor: {
|
|
2510
|
-
tl:
|
|
2511
|
-
br:
|
|
2539
|
+
tl: Ws(o("from")),
|
|
2540
|
+
br: Ws(o("to"))
|
|
2512
2541
|
},
|
|
2513
2542
|
anchorType: n ? i ? "twoCell" : "oneCell" : "absolute",
|
|
2514
2543
|
rest: (t.slice(0, e.index) + t.slice(e.index + e[0].length)).trim()
|
|
@@ -2525,7 +2554,7 @@ var Bs = (t) => {
|
|
|
2525
2554
|
m.registerVisitor(Ct);
|
|
2526
2555
|
const At = /* @__PURE__ */ new Map([
|
|
2527
2556
|
["Choice", St],
|
|
2528
|
-
["Fallback",
|
|
2557
|
+
["Fallback", wt],
|
|
2529
2558
|
["controls", Ct]
|
|
2530
2559
|
]);
|
|
2531
2560
|
m.registerVisitor({
|
|
@@ -2549,25 +2578,25 @@ var Bs = (t) => {
|
|
|
2549
2578
|
}
|
|
2550
2579
|
});
|
|
2551
2580
|
const kt = (t, e) => {
|
|
2552
|
-
e.conditions?.length && (t.stops =
|
|
2553
|
-
},
|
|
2554
|
-
e.conditions?.length && (t.stops =
|
|
2555
|
-
},
|
|
2581
|
+
e.conditions?.length && (t.stops = R(e)), void 0 !== e.minLength && (t.minLength = e.minLength), void 0 !== e.maxLength && (t.maxLength = e.maxLength), (e.gradient ?? 1) && (t.gradient = !0), e.border && e.borderColor && (t.borderColor = e.borderColor), !e.negativeBarColorSameAsPositive && e.negativeFillColor && (t.negativeFillColor = e.negativeFillColor), !(e.negativeBarBorderColorSameAsPositive ?? 1) && e.negativeBorderColor && (t.negativeBorderColor = e.negativeBorderColor), e.axisColor && (t.axisColor = e.axisColor), "middle" !== e.axisPosition && "none" !== e.axisPosition || (t.axisPosition = e.axisPosition), "leftToRight" !== e.direction && "rightToLeft" !== e.direction || (t.direction = e.direction);
|
|
2582
|
+
}, Et = (t, e) => {
|
|
2583
|
+
e.conditions?.length && (t.stops = R(e)), e.iconSet && e.iconSet !== t.iconSet && (t.iconSet = e.iconSet), e.icons?.length && (t.icon = e.icons), void 0 !== e.reverse && (t.reverse = e.reverse), void 0 !== e.showValue && (t.showValue = e.showValue);
|
|
2584
|
+
}, It = (t) => {
|
|
2556
2585
|
if (!t.sqref) return null;
|
|
2557
2586
|
const e = t.sqref.split(/\s+/).join(",");
|
|
2558
2587
|
if ("iconSet" === t.type) {
|
|
2559
2588
|
if (!t.iconSet) return null;
|
|
2560
2589
|
const s = {
|
|
2561
|
-
type:
|
|
2590
|
+
type: Ot.ScaleType.IconSet,
|
|
2562
2591
|
stops: []
|
|
2563
2592
|
};
|
|
2564
|
-
return
|
|
2593
|
+
return Et(s, t.iconSet), {
|
|
2565
2594
|
r: e,
|
|
2566
2595
|
v: { scale: s },
|
|
2567
2596
|
priority: t.priority
|
|
2568
2597
|
};
|
|
2569
2598
|
}
|
|
2570
|
-
const s =
|
|
2599
|
+
const s = $(t, a);
|
|
2571
2600
|
if (!s) return null;
|
|
2572
2601
|
const o = { condition: s };
|
|
2573
2602
|
return t.style && (o.style = t.style), t.stopIfTrue && (o.stopIfTrue = !0), {
|
|
@@ -2591,12 +2620,12 @@ var Bs = (t) => {
|
|
|
2591
2620
|
if (!r) continue;
|
|
2592
2621
|
rt.delete(o);
|
|
2593
2622
|
const n = e.v?.scale;
|
|
2594
|
-
r.dataBar && n?.type ===
|
|
2623
|
+
r.dataBar && n?.type === Ot.ScaleType.DataBar ? kt(n, r.dataBar) : r.iconSet && n?.type === Ot.ScaleType.IconSet && Et(n, r.iconSet);
|
|
2595
2624
|
}
|
|
2596
|
-
const o = [...rt.values(), ...
|
|
2625
|
+
const o = [...rt.values(), ...it], r = /* @__PURE__ */ new Set();
|
|
2597
2626
|
let n = 0;
|
|
2598
2627
|
for (let t = 0; t < o.length; t++) {
|
|
2599
|
-
const i =
|
|
2628
|
+
const i = It(o[t]);
|
|
2600
2629
|
i ? (s || (s = [], e.conditionals = s), s.push(i)) : (r.add(o[t].type ?? "unknown"), n++);
|
|
2601
2630
|
}
|
|
2602
2631
|
if (n > 0) {
|
|
@@ -2634,13 +2663,13 @@ var Bs = (t) => {
|
|
|
2634
2663
|
to: "protection",
|
|
2635
2664
|
openTag: (t) => {
|
|
2636
2665
|
const e = t.getSource();
|
|
2637
|
-
for (const s of
|
|
2666
|
+
for (const s of _) {
|
|
2638
2667
|
const o = t.hasAttribute(s.attribute) ? t.getAttribute(s.attribute) : null;
|
|
2639
|
-
e[s.key] =
|
|
2668
|
+
e[s.key] = ft(s, o);
|
|
2640
2669
|
}
|
|
2641
2670
|
if (e.sheet) return;
|
|
2642
2671
|
const s = {};
|
|
2643
|
-
if (t.copyToObject(s, "hash",
|
|
2672
|
+
if (t.copyToObject(s, "hash", bs, "hashValue"), t.copyToObject(s, "algorithm", bs, "algorithmName"), t.copyToObject(s, "salt", bs, "saltValue"), t.copyToObject(s, "spinCount", gs), t.copyToObject(s, "legacyHash", bs, "password"), Object.keys(s).length > 0) t.getSource().password = s;
|
|
2644
2673
|
}
|
|
2645
2674
|
}), m.registerVisitor({
|
|
2646
2675
|
from: "protectedRanges",
|
|
@@ -2660,7 +2689,7 @@ var Bs = (t) => {
|
|
|
2660
2689
|
};
|
|
2661
2690
|
t.copyToObject(s, "name"), t.copyToObject(s, "securityDescriptor");
|
|
2662
2691
|
const r = {};
|
|
2663
|
-
t.copyToObject(r, "hash",
|
|
2692
|
+
t.copyToObject(r, "hash", bs, "hashValue"), t.copyToObject(r, "algorithm", bs, "algorithmName"), t.copyToObject(r, "salt", bs, "saltValue"), t.copyToObject(r, "spinCount", gs), t.copyToObject(r, "legacyHash", bs, "password"), Object.keys(r).length > 0 && (s.password = r), t.setSource(o);
|
|
2664
2693
|
},
|
|
2665
2694
|
closeTag: (t) => {
|
|
2666
2695
|
const e = t.getSource();
|
|
@@ -2670,11 +2699,11 @@ var Bs = (t) => {
|
|
|
2670
2699
|
from: "sheetFormatPr",
|
|
2671
2700
|
to: "sheetFormatPr",
|
|
2672
2701
|
openTag: (e) => {
|
|
2673
|
-
e.copyToObject(t, "defaultColSize",
|
|
2702
|
+
e.copyToObject(t, "defaultColSize", ms, "defaultColWidth");
|
|
2674
2703
|
const s = e.getAttribute("customHeight");
|
|
2675
|
-
"1" !== s && "true" !== s || e.copyToObject(t, "defaultRowSize",
|
|
2676
|
-
const o = e.getAttribute("baseColWidth",
|
|
2677
|
-
o && 8 !== o && (t.baseColSize = o), S = !!e.getAttribute("zeroHeight",
|
|
2704
|
+
"1" !== s && "true" !== s || e.copyToObject(t, "defaultRowSize", ms, "defaultRowHeight");
|
|
2705
|
+
const o = e.getAttribute("baseColWidth", gs);
|
|
2706
|
+
o && 8 !== o && (t.baseColSize = o), S = !!e.getAttribute("zeroHeight", fs);
|
|
2678
2707
|
}
|
|
2679
2708
|
}), m.registerVisitor({
|
|
2680
2709
|
from: "cols",
|
|
@@ -2687,9 +2716,9 @@ var Bs = (t) => {
|
|
|
2687
2716
|
to: [],
|
|
2688
2717
|
openTag: (t) => {
|
|
2689
2718
|
const e = t.getSource(), s = t.getAttribute("min"), o = t.getAttribute("max"), r = void 0 === s ? 0 : parseInt(s) - 1, n = void 0 === o ? r : parseInt(o) - 1;
|
|
2690
|
-
e.r =
|
|
2719
|
+
e.r = Tt.runToString(r, n, !0);
|
|
2691
2720
|
const i = {};
|
|
2692
|
-
e.v = i, t.copyToObject(i, "sz",
|
|
2721
|
+
e.v = i, t.copyToObject(i, "sz", ms, "width"), t.copyToObject(i, "csz", fs, "customWidth"), t.copyToObject(i, "h", fs, "hidden"), t.copyToObject(i, "l", gs, "outlineLevel"), t.copyToObject(i, "cl", fs, "collapsed"), t.getAttribute("bestFit", fs) && (i.bf = !0), t.copyToObject(i, "s", gs, "style");
|
|
2693
2722
|
}
|
|
2694
2723
|
}), m.registerVisitor({
|
|
2695
2724
|
from: "oleObjects",
|
|
@@ -2698,40 +2727,40 @@ var Bs = (t) => {
|
|
|
2698
2727
|
t.warn("'OLE Objects' are not supported.");
|
|
2699
2728
|
}
|
|
2700
2729
|
});
|
|
2701
|
-
let
|
|
2702
|
-
const
|
|
2730
|
+
let Dt = !1, _t = !1, $t = 0, Rt = "", Lt = "";
|
|
2731
|
+
const Vt = (t) => {
|
|
2703
2732
|
const e = t.indexOf(":");
|
|
2704
2733
|
return -1 === e ? t : t.slice(e + 1);
|
|
2705
|
-
},
|
|
2706
|
-
return
|
|
2734
|
+
}, Mt = new Bs();
|
|
2735
|
+
return eo(P, t, m.createEventHandler(t, n, a), a, c, {
|
|
2707
2736
|
onOpenTag: (t) => {
|
|
2708
|
-
|
|
2709
|
-
const e =
|
|
2710
|
-
"t" === e || "v" === e ? 0 === $t && (_t = !0) : "rPh" === e || "phoneticPr" === e ? $t++ : 0 === $t &&
|
|
2737
|
+
Dt = !0;
|
|
2738
|
+
const e = Vt(t.name);
|
|
2739
|
+
"t" === e || "v" === e ? 0 === $t && (_t = !0) : "rPh" === e || "phoneticPr" === e ? $t++ : 0 === $t && Mt.onOpenTag(e, t.attributes);
|
|
2711
2740
|
},
|
|
2712
2741
|
onText: (t) => {
|
|
2713
|
-
_t && (Rt += t,
|
|
2742
|
+
_t && (Rt += t, Mt.onText(t));
|
|
2714
2743
|
},
|
|
2715
2744
|
onCloseTag: (t) => {
|
|
2716
|
-
const e =
|
|
2717
|
-
"t" === e || "v" === e ? _t = !1 : "rPh" === e || "phoneticPr" === e ? $t > 0 && $t-- :
|
|
2745
|
+
const e = Vt(t.name);
|
|
2746
|
+
"t" === e || "v" === e ? _t = !1 : "rPh" === e || "phoneticPr" === e ? $t > 0 && $t-- : Mt.onCloseTag(e);
|
|
2718
2747
|
},
|
|
2719
2748
|
onEnd: () => {
|
|
2720
|
-
if (!
|
|
2721
|
-
const t =
|
|
2722
|
-
|
|
2723
|
-
const e =
|
|
2749
|
+
if (!Dt) return;
|
|
2750
|
+
const t = Mt.take();
|
|
2751
|
+
Dt = !1, _t = !1, $t = 0;
|
|
2752
|
+
const e = k(Rt);
|
|
2724
2753
|
return Rt = "", Lt = e, t ? {
|
|
2725
2754
|
t: "r",
|
|
2726
2755
|
v: {
|
|
2727
2756
|
type: "richText",
|
|
2728
|
-
data: { runs:
|
|
2757
|
+
data: { runs: js(t, f?.get(Ks)) }
|
|
2729
2758
|
}
|
|
2730
2759
|
} : s(e);
|
|
2731
2760
|
},
|
|
2732
2761
|
onError: (t) => {}
|
|
2733
|
-
},
|
|
2734
|
-
},
|
|
2762
|
+
}, f, s, () => S, () => Lt);
|
|
2763
|
+
}, Js = class {
|
|
2735
2764
|
static {
|
|
2736
2765
|
this.Collapsed = 1;
|
|
2737
2766
|
}
|
|
@@ -2762,20 +2791,22 @@ var Bs = (t) => {
|
|
|
2762
2791
|
static {
|
|
2763
2792
|
this.Spans = 512;
|
|
2764
2793
|
}
|
|
2765
|
-
},
|
|
2794
|
+
}, Zs = (t, e, s) => {
|
|
2766
2795
|
if (t[0].value[0] === t[1].value[0]) return e;
|
|
2767
|
-
},
|
|
2796
|
+
}, Qs = /^\s*TABLE\s*\(/i, Ys = {
|
|
2768
2797
|
colStart: 0,
|
|
2769
2798
|
colEnd: 0,
|
|
2770
2799
|
rowStart: 0,
|
|
2771
2800
|
rowEnd: 0
|
|
2772
|
-
},
|
|
2801
|
+
}, to = (t) => "1" === t || "true" === t, eo = (t, e, s, o, r, n, i, a, l, c) => {
|
|
2773
2802
|
let h = !1;
|
|
2774
|
-
const u = [], d = i?.get(
|
|
2803
|
+
const u = [], d = i?.get(Us), p = i?.get(Ks), f = /* @__PURE__ */ new Map();
|
|
2775
2804
|
let g = !1, m = [], b = !1, x = null, y = null, v = null, w = null, T = null, S = null;
|
|
2776
|
-
const C = i?.get("richData") ??
|
|
2777
|
-
let
|
|
2778
|
-
const
|
|
2805
|
+
const C = i?.get("richData") ?? St.EmptyArray;
|
|
2806
|
+
let A = null, k = !1;
|
|
2807
|
+
const E = Tt.normalizeA1ToR1C1, I = Ct.createConflatingRanges(), P = /* @__PURE__ */ new Map(), O = [], D = [];
|
|
2808
|
+
let _ = !1, N = !1, $ = null;
|
|
2809
|
+
const R = (t) => {
|
|
2779
2810
|
const e = (i?.get("metadata"))?.values;
|
|
2780
2811
|
if (!e) return;
|
|
2781
2812
|
const s = parseInt(t, 10);
|
|
@@ -2783,26 +2814,26 @@ var Bs = (t) => {
|
|
|
2783
2814
|
const o = e[s - 1]?.get("XLRICHVALUE");
|
|
2784
2815
|
return void 0 !== o?.richValueIndex ? C[o.richValueIndex] : void 0;
|
|
2785
2816
|
};
|
|
2786
|
-
let
|
|
2787
|
-
const V =
|
|
2788
|
-
let
|
|
2789
|
-
const
|
|
2817
|
+
let L = !1;
|
|
2818
|
+
const V = Ct.createConflatingRanges();
|
|
2819
|
+
let M, B = !1, j = -1, F = -1, H = null, W = null;
|
|
2820
|
+
const X = (t) => ({
|
|
2790
2821
|
t: "r",
|
|
2791
2822
|
v: {
|
|
2792
2823
|
type: "hyperlink",
|
|
2793
2824
|
data: {
|
|
2794
|
-
address:
|
|
2825
|
+
address: M,
|
|
2795
2826
|
friendly: t
|
|
2796
2827
|
}
|
|
2797
2828
|
}
|
|
2798
2829
|
});
|
|
2799
|
-
let
|
|
2800
|
-
const
|
|
2801
|
-
let
|
|
2802
|
-
const
|
|
2830
|
+
let q = null;
|
|
2831
|
+
const U = [];
|
|
2832
|
+
let K = null, G = -2, J = 0, Q = "", Y = "", tt = "", et = "", st = "", ot = "", rt = "", nt = "", it = "", at = "", lt = "", ct = "", ht = "", ut = "", dt = !0, pt = null, ft = !1, gt = !1, bt = !1, xt = null, yt = 0;
|
|
2833
|
+
const vt = (t) => {
|
|
2803
2834
|
let o = t.name;
|
|
2804
2835
|
const a = o.indexOf(":");
|
|
2805
|
-
if (-1 !== a && (o = o.slice(a + 1)),
|
|
2836
|
+
if (-1 !== a && (o = o.slice(a + 1)), yt++, yt % 196608 == 0 && r?.(yt), W) {
|
|
2806
2837
|
const e = t.attributes;
|
|
2807
2838
|
switch (o) {
|
|
2808
2839
|
case "v":
|
|
@@ -2817,60 +2848,60 @@ var Bs = (t) => {
|
|
|
2817
2848
|
y = e.ref, x = t;
|
|
2818
2849
|
break;
|
|
2819
2850
|
case "array":
|
|
2820
|
-
y = e.ref,
|
|
2851
|
+
y = e.ref, $ = y;
|
|
2821
2852
|
break;
|
|
2822
2853
|
case "dataTable": {
|
|
2823
2854
|
const t = ((t, e, s) => {
|
|
2824
|
-
const o = t.r1, r =
|
|
2855
|
+
const o = t.r1, r = to(t.del1);
|
|
2825
2856
|
if (!o && !r) return null;
|
|
2826
|
-
const n = t.ref ??
|
|
2857
|
+
const n = t.ref ?? Tt.cellToString({
|
|
2827
2858
|
rowIndex: e,
|
|
2828
2859
|
colIndex: s
|
|
2829
|
-
}), i =
|
|
2860
|
+
}), i = Tt.fastStringToRange(n);
|
|
2830
2861
|
if (!i) return null;
|
|
2831
2862
|
const a = { ref: {
|
|
2832
2863
|
rowStart: i.rowStart,
|
|
2833
2864
|
colStart: i.colStart,
|
|
2834
2865
|
rowEnd: i.rowEnd,
|
|
2835
2866
|
colEnd: i.colEnd
|
|
2836
|
-
} }, l =
|
|
2837
|
-
if (l ||
|
|
2867
|
+
} }, l = to(t.dt2D);
|
|
2868
|
+
if (l || to(t.dtr) ? (o && (a.rowInput = o), r && (a.rowInputDeleted = !0)) : (o && (a.columnInput = o), r && (a.columnInputDeleted = !0)), l) {
|
|
2838
2869
|
const e = t.r2;
|
|
2839
|
-
e && (a.columnInput = e),
|
|
2870
|
+
e && (a.columnInput = e), to(t.del2) && (a.columnInputDeleted = !0);
|
|
2840
2871
|
}
|
|
2841
2872
|
return a;
|
|
2842
|
-
})(e,
|
|
2843
|
-
t && (
|
|
2873
|
+
})(e, j, F);
|
|
2874
|
+
t && (D.push(t), to(e.ca) && V.append(j, F));
|
|
2844
2875
|
return;
|
|
2845
2876
|
}
|
|
2846
2877
|
}
|
|
2847
2878
|
const t = e.ca;
|
|
2848
|
-
void 0 !== t && (
|
|
2879
|
+
void 0 !== t && (L = "1" === t);
|
|
2849
2880
|
break;
|
|
2850
2881
|
case "is":
|
|
2851
|
-
|
|
2882
|
+
B = !0;
|
|
2852
2883
|
return;
|
|
2853
2884
|
}
|
|
2854
|
-
|
|
2885
|
+
B && !b && n?.onOpenTag?.(t);
|
|
2855
2886
|
return;
|
|
2856
2887
|
}
|
|
2857
2888
|
if (h) {
|
|
2858
2889
|
if ("c" === o) {
|
|
2859
|
-
|
|
2890
|
+
W = t, M = void 0;
|
|
2860
2891
|
const e = t.attributes, s = e.r;
|
|
2861
|
-
|
|
2892
|
+
F = void 0 !== s ? Tt.fastStringToCol(s) : F + 1;
|
|
2862
2893
|
const o = e.t;
|
|
2863
|
-
void 0 === o ?
|
|
2894
|
+
void 0 === o ? q = null : (q = o, "str" === q && (B = !0));
|
|
2864
2895
|
let r = e.s;
|
|
2865
|
-
void 0 === r && (null !==
|
|
2866
|
-
colStart:
|
|
2867
|
-
rowStart:
|
|
2868
|
-
colEnd:
|
|
2869
|
-
rowEnd:
|
|
2896
|
+
void 0 === r && (null !== xt || bt) && (r = "0"), void 0 !== r && (r = parseInt(r), pt && pt.value === r && pt.colEnd + 1 === F ? pt.colEnd = F : (pt = {
|
|
2897
|
+
colStart: F,
|
|
2898
|
+
rowStart: j,
|
|
2899
|
+
colEnd: F,
|
|
2900
|
+
rowEnd: j,
|
|
2870
2901
|
value: r
|
|
2871
|
-
}, m.push(
|
|
2902
|
+
}, m.push(pt))), $ = null, N = !1, k = !1;
|
|
2872
2903
|
const n = e.cm;
|
|
2873
|
-
|
|
2904
|
+
_ = void 0 !== n && ((t) => {
|
|
2874
2905
|
const e = (i?.get("metadata"))?.cells;
|
|
2875
2906
|
if (!e) return !1;
|
|
2876
2907
|
const s = parseInt(t, 10);
|
|
@@ -2878,55 +2909,55 @@ var Bs = (t) => {
|
|
|
2878
2909
|
})(n);
|
|
2879
2910
|
const a = e.vm;
|
|
2880
2911
|
if (void 0 !== a) {
|
|
2881
|
-
const t =
|
|
2882
|
-
if (
|
|
2912
|
+
const t = R(a);
|
|
2913
|
+
if (At.isError(t)) {
|
|
2883
2914
|
const e = t.getCode();
|
|
2884
|
-
|
|
2915
|
+
H = {
|
|
2885
2916
|
t: "e",
|
|
2886
2917
|
v: e
|
|
2887
|
-
},
|
|
2918
|
+
}, _ && e === At.Code.Spill && (N = !0);
|
|
2888
2919
|
}
|
|
2889
2920
|
}
|
|
2890
2921
|
}
|
|
2891
2922
|
} else {
|
|
2892
|
-
if (
|
|
2923
|
+
if (gt && "row" === o) {
|
|
2893
2924
|
h = !0;
|
|
2894
2925
|
const e = t.attributes.r;
|
|
2895
|
-
if (
|
|
2926
|
+
if (j = void 0 !== e ? parseInt(e) - 1 : j + 1, F = -1, l?.()) {
|
|
2896
2927
|
const t = u[u.length - 1];
|
|
2897
|
-
t && t.max + 1 ===
|
|
2898
|
-
min:
|
|
2899
|
-
max:
|
|
2928
|
+
t && t.max + 1 === j ? t.max = j : u.push({
|
|
2929
|
+
min: j,
|
|
2930
|
+
max: j
|
|
2900
2931
|
});
|
|
2901
2932
|
}
|
|
2902
|
-
if (
|
|
2903
|
-
const t = void 0 !==
|
|
2904
|
-
|
|
2905
|
-
min:
|
|
2906
|
-
max:
|
|
2933
|
+
if (J = 0, Y = t.attributes.customHeight, void 0 !== Y && (J |= Js.CustomHeight), Y !== it && (dt = !0, it = Y), Q = t.attributes.ht, void 0 !== Q && (J |= Js.Ht), Q !== nt && (dt = !0, nt = Q), tt = t.attributes.hidden, void 0 !== tt && (J |= Js.Hidden), tt !== at && (dt = !0, at = tt), st = t.attributes.s, void 0 !== st && (J |= Js.S), st !== ct && (dt = !0, ct = st), et = t.attributes.customFormat, void 0 !== et && (J |= Js.CustomFormat), et !== lt && (dt = !0, lt = et), ot = t.attributes.outlineLevel, void 0 !== ot && (J |= Js.OutlineLevel), ot !== ht && (dt = !0, ht = ot), rt = t.attributes.collapsed, void 0 !== rt && (J |= Js.Collapsed), rt !== ut && (dt = !0, ut = rt), 0 !== J) if (G + 1 !== j || dt) {
|
|
2934
|
+
const t = void 0 !== Y && ("1" === Y || "true" === Y), e = void 0 !== et && ("1" === et || "true" === et);
|
|
2935
|
+
xt = e && void 0 !== st ? st : null, e && null === xt && (xt = "0"), K = {
|
|
2936
|
+
min: j,
|
|
2937
|
+
max: j,
|
|
2907
2938
|
value: {
|
|
2908
|
-
sz: void 0 ===
|
|
2939
|
+
sz: void 0 === Q ? -1 : parseFloat(Q),
|
|
2909
2940
|
csz: t,
|
|
2910
|
-
h: void 0 !==
|
|
2911
|
-
s: null ===
|
|
2912
|
-
l: void 0 ===
|
|
2913
|
-
cl: void 0 !==
|
|
2941
|
+
h: void 0 !== tt && ("1" === tt || "true" === tt),
|
|
2942
|
+
s: null === xt ? void 0 : "0" === xt ? 0 : parseInt(xt),
|
|
2943
|
+
l: void 0 === ot || "0" === ot ? 0 : parseInt(ot),
|
|
2944
|
+
cl: void 0 !== rt && ("1" === rt || "true" === rt)
|
|
2914
2945
|
}
|
|
2915
|
-
},
|
|
2916
|
-
} else
|
|
2917
|
-
|
|
2946
|
+
}, U.push(K);
|
|
2947
|
+
} else K.max = j;
|
|
2948
|
+
G = j, dt = !1;
|
|
2918
2949
|
return;
|
|
2919
2950
|
}
|
|
2920
|
-
if ("sheetData" === o && (
|
|
2921
|
-
|
|
2951
|
+
if ("sheetData" === o && (gt = !0), !ft && "sheetData" === o) {
|
|
2952
|
+
ft = !0;
|
|
2922
2953
|
const t = e.cols, s = t ? t.length : 0;
|
|
2923
|
-
for (let e = 0; !
|
|
2954
|
+
for (let e = 0; !bt && e < s; e++) t[e].v.s && (bt = !0);
|
|
2924
2955
|
}
|
|
2925
2956
|
s?.onOpenTag?.(t);
|
|
2926
2957
|
}
|
|
2927
|
-
},
|
|
2958
|
+
}, wt = (e) => {
|
|
2928
2959
|
let o = e.name;
|
|
2929
|
-
if ("sheetData" === o && (
|
|
2960
|
+
if ("sheetData" === o && (gt = !1), !b || "c" !== o && "f" !== o || (x && (w = P.get(x) ?? null), w && (M = ((t) => {
|
|
2930
2961
|
if (t.length < 11 || 104 != (32 | t.charCodeAt(0))) return;
|
|
2931
2962
|
if (!/^HYPERLINK\(/i.test(t)) return;
|
|
2932
2963
|
let e = 1, s = !1, o = 10;
|
|
@@ -2937,53 +2968,53 @@ var Bs = (t) => {
|
|
|
2937
2968
|
if (0 !== e || t.slice(o).trim().length > 0) return;
|
|
2938
2969
|
const r = /^HYPERLINK\(\s*"((?:[^"]|"")*)"\s*[,)]/i.exec(t);
|
|
2939
2970
|
return r ? r[1].replace(/""/g, "\"") : null;
|
|
2940
|
-
})(w[2]),
|
|
2971
|
+
})(w[2]), I.append(j, F, w), L && V.append(j, F)), null !== $ && O.push([$, _ ? N ? "error" : "dynamic" : "fixed"]), b = !1, w = null, x = null, y = null, g = !1, L = !1, $ = null, _ = !1, N = !1), W) {
|
|
2941
2972
|
const s = o.indexOf(":");
|
|
2942
|
-
if (-1 !== s && (o = o.slice(s + 1)),
|
|
2973
|
+
if (-1 !== s && (o = o.slice(s + 1)), B) if ("is" === o || "v" === o) {
|
|
2943
2974
|
const e = n?.onEnd?.();
|
|
2944
|
-
null
|
|
2975
|
+
null == e || k && "" === c?.() || t.pushAt(j, F, void 0 !== M && "number" == typeof e ? X(c?.() ?? "") : "number" == typeof e ? "" + e : e);
|
|
2945
2976
|
} else "f" !== o && n?.onCloseTag?.(e);
|
|
2946
|
-
g && (g = !1), "c" === o && (
|
|
2977
|
+
g && (g = !1), "c" === o && (W = null, B = !1);
|
|
2947
2978
|
return;
|
|
2948
2979
|
}
|
|
2949
|
-
if (h) return h = !1, void (
|
|
2980
|
+
if (h) return h = !1, void (pt = null);
|
|
2950
2981
|
s?.onCloseTag?.(e);
|
|
2951
|
-
},
|
|
2952
|
-
const
|
|
2982
|
+
}, kt = (e) => {
|
|
2983
|
+
const r = e.trim();
|
|
2953
2984
|
if (g) {
|
|
2954
|
-
switch (
|
|
2985
|
+
switch (H = null, q) {
|
|
2955
2986
|
case null:
|
|
2956
2987
|
case "n":
|
|
2957
|
-
|
|
2988
|
+
H = Mt.flushSubnormal(parseFloat(r));
|
|
2958
2989
|
break;
|
|
2959
2990
|
case "b":
|
|
2960
|
-
|
|
2991
|
+
H = "1" === r || "true" === r;
|
|
2961
2992
|
break;
|
|
2962
2993
|
case "s": {
|
|
2963
|
-
const t = parseInt(
|
|
2994
|
+
const t = parseInt(r, 10);
|
|
2964
2995
|
let e = f.get(t);
|
|
2965
2996
|
if (void 0 === e) {
|
|
2966
2997
|
const s = d?.get(t);
|
|
2967
|
-
e = s ?
|
|
2998
|
+
e = s ? js(s, p) : null, f.set(t, e);
|
|
2968
2999
|
}
|
|
2969
|
-
|
|
3000
|
+
H = e ? {
|
|
2970
3001
|
t: "r",
|
|
2971
3002
|
v: {
|
|
2972
3003
|
type: "richText",
|
|
2973
3004
|
data: { runs: e }
|
|
2974
3005
|
}
|
|
2975
|
-
} :
|
|
3006
|
+
} : r;
|
|
2976
3007
|
break;
|
|
2977
3008
|
}
|
|
2978
3009
|
case "d": {
|
|
2979
3010
|
const t = ((t, e = !1) => {
|
|
2980
3011
|
if (!t) return null;
|
|
2981
|
-
const s =
|
|
3012
|
+
const s = Rs.exec(t);
|
|
2982
3013
|
if (s) {
|
|
2983
3014
|
const [, t, e, o] = s;
|
|
2984
3015
|
return void 0 === t && void 0 === e && void 0 === o ? null : (3600 * parseFloat(t ?? "0") + 60 * parseFloat(e ?? "0") + parseFloat(o ?? "0")) / 86400;
|
|
2985
3016
|
}
|
|
2986
|
-
const o =
|
|
3017
|
+
const o = $s.exec(t);
|
|
2987
3018
|
if (!o) return null;
|
|
2988
3019
|
const [, r, n, i, a, l, c, h] = o;
|
|
2989
3020
|
if (void 0 === r && void 0 === a) return null;
|
|
@@ -2991,32 +3022,32 @@ var Bs = (t) => {
|
|
|
2991
3022
|
if (void 0 !== r) {
|
|
2992
3023
|
const t = parseInt(r, 10), s = parseInt(n, 10), o = parseInt(i, 10);
|
|
2993
3024
|
if (s < 1 || s > 12 || o < 1 || o > 31) return null;
|
|
2994
|
-
const a =
|
|
3025
|
+
const a = Ls(t, s, o) - Vs;
|
|
2995
3026
|
if (u = a <= 60 ? a - 1 : a, e && (u -= 1462), u < 0) return null;
|
|
2996
3027
|
}
|
|
2997
3028
|
void 0 !== a && (u += (3600 * parseInt(a, 10) + 60 * parseInt(l, 10) + (void 0 !== c ? parseInt(c, 10) : 0) + (void 0 !== h ? parseFloat(h) : 0)) / 86400);
|
|
2998
3029
|
return u;
|
|
2999
|
-
})(
|
|
3000
|
-
null !== t ?
|
|
3001
|
-
colIndex:
|
|
3002
|
-
rowIndex:
|
|
3003
|
-
})} is not a date this workbook can hold; kept as text.`, void 0, "xlsx.cell.isoDateText"),
|
|
3030
|
+
})(r, !0 === i?.get(qs));
|
|
3031
|
+
null !== t ? H = t : a && (o?.(`Date '${r}' in cell ${Tt.cellToString({
|
|
3032
|
+
colIndex: F,
|
|
3033
|
+
rowIndex: j
|
|
3034
|
+
})} is not a date this workbook can hold; kept as text.`, void 0, "xlsx.cell.isoDateText"), H = "" + a(r));
|
|
3004
3035
|
break;
|
|
3005
3036
|
}
|
|
3006
3037
|
case "e":
|
|
3007
|
-
if ("#VALUE!" ===
|
|
3008
|
-
const t =
|
|
3038
|
+
if ("#VALUE!" === r) {
|
|
3039
|
+
const t = W.attributes.vm;
|
|
3009
3040
|
if (void 0 !== t) {
|
|
3010
|
-
const e =
|
|
3011
|
-
if (
|
|
3012
|
-
|
|
3041
|
+
const e = R(t);
|
|
3042
|
+
if (At.isError(e)) {
|
|
3043
|
+
H = {
|
|
3013
3044
|
t: "e",
|
|
3014
3045
|
v: e.getCode()
|
|
3015
3046
|
};
|
|
3016
3047
|
break;
|
|
3017
3048
|
}
|
|
3018
|
-
if (
|
|
3019
|
-
|
|
3049
|
+
if (Vt.isJSON(e)) {
|
|
3050
|
+
H = {
|
|
3020
3051
|
t: "r",
|
|
3021
3052
|
v: e
|
|
3022
3053
|
};
|
|
@@ -3024,90 +3055,91 @@ var Bs = (t) => {
|
|
|
3024
3055
|
}
|
|
3025
3056
|
}
|
|
3026
3057
|
}
|
|
3027
|
-
const t =
|
|
3028
|
-
t ?
|
|
3058
|
+
const t = At.getBuiltInByLabel(r);
|
|
3059
|
+
t ? H = {
|
|
3029
3060
|
t: "e",
|
|
3030
3061
|
v: t.getCode()
|
|
3031
|
-
} : (
|
|
3032
|
-
colIndex:
|
|
3033
|
-
rowIndex:
|
|
3062
|
+
} : (H = r, o?.(`Unknown formula error '${r}' in cell ${Tt.cellToString({
|
|
3063
|
+
colIndex: F,
|
|
3064
|
+
rowIndex: j
|
|
3034
3065
|
})}`));
|
|
3035
3066
|
break;
|
|
3036
3067
|
case "str":
|
|
3037
|
-
case "inlineStr":
|
|
3068
|
+
case "inlineStr": B = !0;
|
|
3038
3069
|
}
|
|
3039
|
-
null !==
|
|
3070
|
+
null !== H && t.pushAt(j, F, void 0 === M || "number" != typeof H && "boolean" != typeof H ? H : X(H));
|
|
3040
3071
|
}
|
|
3072
|
+
const l = null !== x;
|
|
3041
3073
|
if (x) {
|
|
3042
3074
|
if (T === x) w = S;
|
|
3043
3075
|
else {
|
|
3044
|
-
if (w =
|
|
3076
|
+
if (w = P.get(x) ?? null, !w) {
|
|
3045
3077
|
const t = [];
|
|
3046
|
-
v =
|
|
3078
|
+
v = E(r, j, F, t), w = [
|
|
3047
3079
|
v,
|
|
3048
3080
|
t,
|
|
3049
|
-
|
|
3050
|
-
],
|
|
3081
|
+
r
|
|
3082
|
+
], P.set(x, w);
|
|
3051
3083
|
}
|
|
3052
3084
|
T = x, S = w;
|
|
3053
3085
|
}
|
|
3054
3086
|
x = null;
|
|
3055
3087
|
}
|
|
3056
3088
|
if (b) {
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
if (
|
|
3063
|
-
|
|
3064
|
-
if (
|
|
3065
|
-
if (41 !== t.charCodeAt(
|
|
3089
|
+
let t = r;
|
|
3090
|
+
const e = l ? void 0 : i?.get(Xs);
|
|
3091
|
+
if (e) {
|
|
3092
|
+
const s = ((t) => {
|
|
3093
|
+
if (t.length < ws.length) return Cs;
|
|
3094
|
+
if (t.slice(0, ws.length).toUpperCase() !== Ts) return Cs;
|
|
3095
|
+
const e = ks(t, ws.length);
|
|
3096
|
+
if (null === e) return Cs;
|
|
3097
|
+
if (41 !== t.charCodeAt(e.end)) return Cs;
|
|
3098
|
+
if (44 !== t.charCodeAt(e.end + 1)) return Cs;
|
|
3099
|
+
if (41 !== t.charCodeAt(t.length - 1)) return Cs;
|
|
3066
3100
|
const s = e.value;
|
|
3067
|
-
return s.toUpperCase() ===
|
|
3101
|
+
return s.toUpperCase() === Ss ? As : 0 === s.length ? Cs : {
|
|
3068
3102
|
kind: "formula",
|
|
3069
3103
|
formula: s
|
|
3070
3104
|
};
|
|
3071
|
-
})(
|
|
3072
|
-
"none" !==
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3105
|
+
})(r);
|
|
3106
|
+
"none" !== s.kind && (A ??= new Is(e), "spilled" === s.kind ? k = A.placeholder(j, F) : A.anchor(j, F, s.formula) && (t = s.formula, L ||= ((t) => Es(t).some((t) => z(t) || !0 === Et.get(t)?.getDeclaration().getReturnType()?.isVolatile()))(t)));
|
|
3107
|
+
}
|
|
3108
|
+
if (k) L = !1;
|
|
3109
|
+
else {
|
|
3110
|
+
const e = [];
|
|
3111
|
+
v = E(t, j, F, e), w = [
|
|
3112
|
+
v,
|
|
3113
|
+
e,
|
|
3114
|
+
t
|
|
3115
|
+
];
|
|
3078
3116
|
}
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
t,
|
|
3083
|
-
l
|
|
3084
|
-
];
|
|
3085
|
-
}
|
|
3086
|
-
M ? n?.onText?.(r) : h || s?.onText?.(l);
|
|
3087
|
-
}, At = {
|
|
3117
|
+
}
|
|
3118
|
+
B ? n?.onText?.(e) : h || s?.onText?.(r);
|
|
3119
|
+
}, It = {
|
|
3088
3120
|
r: void 0,
|
|
3089
3121
|
t: void 0,
|
|
3090
3122
|
s: void 0,
|
|
3091
3123
|
cm: void 0,
|
|
3092
3124
|
vm: void 0
|
|
3093
|
-
},
|
|
3125
|
+
}, Pt = {
|
|
3094
3126
|
name: "c",
|
|
3095
|
-
attributes:
|
|
3127
|
+
attributes: It,
|
|
3096
3128
|
isSelfClosing: !1
|
|
3097
|
-
},
|
|
3129
|
+
}, Ot = {
|
|
3098
3130
|
t: void 0,
|
|
3099
3131
|
si: void 0,
|
|
3100
3132
|
ref: void 0,
|
|
3101
3133
|
ca: void 0
|
|
3102
|
-
},
|
|
3134
|
+
}, Dt = {
|
|
3103
3135
|
name: "f",
|
|
3104
|
-
attributes:
|
|
3136
|
+
attributes: Ot,
|
|
3105
3137
|
isSelfClosing: !1
|
|
3106
|
-
},
|
|
3138
|
+
}, _t = {
|
|
3107
3139
|
name: "v",
|
|
3108
3140
|
attributes: {},
|
|
3109
3141
|
isSelfClosing: !1
|
|
3110
|
-
},
|
|
3142
|
+
}, $t = {
|
|
3111
3143
|
r: void 0,
|
|
3112
3144
|
s: void 0,
|
|
3113
3145
|
ht: void 0,
|
|
@@ -3116,59 +3148,59 @@ var Bs = (t) => {
|
|
|
3116
3148
|
customHeight: void 0,
|
|
3117
3149
|
customFormat: void 0,
|
|
3118
3150
|
outlineLevel: void 0
|
|
3119
|
-
},
|
|
3151
|
+
}, Rt = {
|
|
3120
3152
|
name: "row",
|
|
3121
|
-
attributes:
|
|
3153
|
+
attributes: $t,
|
|
3122
3154
|
isSelfClosing: !1
|
|
3123
|
-
},
|
|
3124
|
-
let
|
|
3125
|
-
const
|
|
3155
|
+
}, Lt = ps.NEED_MORE, Bt = ps.NOT_HANDLED, jt = ps.decodeText;
|
|
3156
|
+
let Ft = !1;
|
|
3157
|
+
const Ht = (t, e, s, o) => {
|
|
3126
3158
|
for (;;) {
|
|
3127
3159
|
let r = 0;
|
|
3128
3160
|
for (; e < s && (32 === (r = t.charCodeAt(e)) || 9 === r || 10 === r || 13 === r);) e++;
|
|
3129
|
-
if (e >= s) return
|
|
3130
|
-
if (62 === r) return
|
|
3131
|
-
if (47 === r) return e + 1 >= s ?
|
|
3161
|
+
if (e >= s) return Lt;
|
|
3162
|
+
if (62 === r) return Ft = !1, e + 1;
|
|
3163
|
+
if (47 === r) return e + 1 >= s ? Lt : 62 !== t.charCodeAt(e + 1) ? Bt : (Ft = !0, e + 2);
|
|
3132
3164
|
const n = e;
|
|
3133
3165
|
for (; e < s && 61 !== (r = t.charCodeAt(e));) {
|
|
3134
|
-
if (62 === r || 47 === r || 32 === r || 9 === r || 10 === r || 13 === r) return
|
|
3166
|
+
if (62 === r || 47 === r || 32 === r || 9 === r || 10 === r || 13 === r) return Bt;
|
|
3135
3167
|
e++;
|
|
3136
3168
|
}
|
|
3137
|
-
if (e + 1 >= s) return
|
|
3169
|
+
if (e + 1 >= s) return Lt;
|
|
3138
3170
|
const i = e - n, a = t.charCodeAt(e + 1);
|
|
3139
|
-
if (34 !== a && 39 !== a) return
|
|
3171
|
+
if (34 !== a && 39 !== a) return Bt;
|
|
3140
3172
|
const l = e + 2;
|
|
3141
3173
|
let c = l;
|
|
3142
3174
|
for (; c < s && (r = t.charCodeAt(c)) !== a;) {
|
|
3143
|
-
if (38 === r || r < 32) return
|
|
3175
|
+
if (38 === r || r < 32) return Bt;
|
|
3144
3176
|
c++;
|
|
3145
3177
|
}
|
|
3146
|
-
if (c >= s) return
|
|
3178
|
+
if (c >= s) return Lt;
|
|
3147
3179
|
e = c + 1;
|
|
3148
3180
|
const h = t.charCodeAt(n);
|
|
3149
3181
|
if (2 === o) switch (i) {
|
|
3150
3182
|
case 1:
|
|
3151
|
-
114 === h ?
|
|
3183
|
+
114 === h ? $t.r = t.slice(l, c) : 115 === h && ($t.s = t.slice(l, c));
|
|
3152
3184
|
break;
|
|
3153
3185
|
case 2:
|
|
3154
|
-
t.startsWith("ht", n) && (
|
|
3186
|
+
t.startsWith("ht", n) && ($t.ht = t.slice(l, c));
|
|
3155
3187
|
break;
|
|
3156
3188
|
case 6:
|
|
3157
|
-
t.startsWith("hidden", n) && (
|
|
3189
|
+
t.startsWith("hidden", n) && ($t.hidden = t.slice(l, c));
|
|
3158
3190
|
break;
|
|
3159
3191
|
case 9:
|
|
3160
|
-
t.startsWith("collapsed", n) && (
|
|
3192
|
+
t.startsWith("collapsed", n) && ($t.collapsed = t.slice(l, c));
|
|
3161
3193
|
break;
|
|
3162
|
-
case 12: t.startsWith("customHeight", n) ?
|
|
3194
|
+
case 12: t.startsWith("customHeight", n) ? $t.customHeight = t.slice(l, c) : t.startsWith("customFormat", n) ? $t.customFormat = t.slice(l, c) : t.startsWith("outlineLevel", n) && ($t.outlineLevel = t.slice(l, c));
|
|
3163
3195
|
}
|
|
3164
|
-
else if (0 === o) 1 === i ? 114 === h ?
|
|
3165
|
-
else if (1 === i) 116 === h && (
|
|
3196
|
+
else if (0 === o) 1 === i ? 114 === h ? It.r = t.slice(l, c) : 116 === h ? It.t = t.slice(l, c) : 115 === h && (It.s = t.slice(l, c)) : 2 === i && 109 === t.charCodeAt(n + 1) && (99 === h ? It.cm = t.slice(l, c) : 118 === h && (It.vm = t.slice(l, c)));
|
|
3197
|
+
else if (1 === i) 116 === h && (Ot.t = t.slice(l, c));
|
|
3166
3198
|
else if (2 === i) {
|
|
3167
3199
|
const e = t.charCodeAt(n + 1);
|
|
3168
|
-
115 === h && 105 === e ?
|
|
3169
|
-
} else 3 === i && t.startsWith("ref", n) && (
|
|
3200
|
+
115 === h && 105 === e ? Ot.si = t.slice(l, c) : 99 === h && 97 === e && (Ot.ca = t.slice(l, c));
|
|
3201
|
+
} else 3 === i && t.startsWith("ref", n) && (Ot.ref = t.slice(l, c));
|
|
3170
3202
|
}
|
|
3171
|
-
},
|
|
3203
|
+
}, Wt = (t, e, s) => 47 === t.charCodeAt(e + 1) && t.charCodeAt(e + 2) === s && 62 === t.charCodeAt(e + 3);
|
|
3172
3204
|
return {
|
|
3173
3205
|
...s,
|
|
3174
3206
|
onEnd: () => {
|
|
@@ -3187,15 +3219,15 @@ var Bs = (t) => {
|
|
|
3187
3219
|
}
|
|
3188
3220
|
});
|
|
3189
3221
|
for (const o of u) o.min > t && e.push(s(t, o.min - 1)), t = Math.max(t, o.max + 1);
|
|
3190
|
-
t <=
|
|
3222
|
+
t <= Z && e.push(s(t, Z)), e.length > 0 && (U.push(...e), U.sort((t, e) => t.min - e.min));
|
|
3191
3223
|
}
|
|
3192
|
-
|
|
3193
|
-
let o =
|
|
3224
|
+
U.length > 0 && (e.rows = Tt.runsToRefs(U, !1));
|
|
3225
|
+
let o = I.done(Zs);
|
|
3194
3226
|
o = ((t, e) => {
|
|
3195
3227
|
let s = null;
|
|
3196
3228
|
for (let e = 0; e < t.length; e++) {
|
|
3197
3229
|
const o = t[e];
|
|
3198
|
-
if (!
|
|
3230
|
+
if (!Qs.test(o.value[2])) continue;
|
|
3199
3231
|
s ??= /* @__PURE__ */ new Map();
|
|
3200
3232
|
const r = o.value[0], n = s.get(r);
|
|
3201
3233
|
n ? n.push(o) : s.set(r, [o]);
|
|
@@ -3215,27 +3247,27 @@ var Bs = (t) => {
|
|
|
3215
3247
|
s.rowStart < r.rowStart && (r.rowStart = s.rowStart), s.colStart < r.colStart && (r.colStart = s.colStart), s.rowEnd > r.rowEnd && (r.rowEnd = s.rowEnd), s.colEnd > r.colEnd && (r.colEnd = s.colEnd), n += (s.rowEnd - s.rowStart + 1) * (s.colEnd - s.colStart + 1);
|
|
3216
3248
|
}
|
|
3217
3249
|
if (n !== (r.rowEnd - r.rowStart + 1) * (r.colEnd - r.colStart + 1)) continue;
|
|
3218
|
-
const a =
|
|
3250
|
+
const a = Ns(Tt.resolveRelativeToA1(s.value[1], r.rowStart, r.colStart), r);
|
|
3219
3251
|
if (a) {
|
|
3220
3252
|
e.push(a);
|
|
3221
3253
|
for (let e = 0; e < t.length; e++) o.add(t[e]);
|
|
3222
3254
|
}
|
|
3223
3255
|
}
|
|
3224
3256
|
return 0 === o.size ? t : t.filter((t) => !o.has(t));
|
|
3225
|
-
})(o,
|
|
3257
|
+
})(o, D);
|
|
3226
3258
|
const r = o.length;
|
|
3227
|
-
if (r > 0 ||
|
|
3259
|
+
if (r > 0 || D.length > 0) {
|
|
3228
3260
|
const t = new Array(r);
|
|
3229
3261
|
for (let e = 0; e < r; e++) {
|
|
3230
|
-
const s = o[e], r =
|
|
3262
|
+
const s = o[e], r = Tt.rangeToString(s), n = s.value[1], i = Tt.resolveRelativeToA1(n, s.rowStart, s.colStart);
|
|
3231
3263
|
t[e] = [r, i];
|
|
3232
3264
|
}
|
|
3233
|
-
for (let e = 0; e <
|
|
3234
|
-
const s =
|
|
3235
|
-
t.push([
|
|
3265
|
+
for (let e = 0; e < D.length; e++) {
|
|
3266
|
+
const s = D[e], o = s.ref;
|
|
3267
|
+
t.push([Tt.cellToString({
|
|
3236
3268
|
rowIndex: o.rowStart,
|
|
3237
3269
|
colIndex: o.colStart
|
|
3238
|
-
}),
|
|
3270
|
+
}), mt(s)]), O.push([Tt.rangeToString(o), "dynamic"]);
|
|
3239
3271
|
}
|
|
3240
3272
|
e.formulas = t;
|
|
3241
3273
|
}
|
|
@@ -3243,15 +3275,15 @@ var Bs = (t) => {
|
|
|
3243
3275
|
if (i > 0) {
|
|
3244
3276
|
const t = new Array(i);
|
|
3245
3277
|
for (let e = 0; e < i; e++) {
|
|
3246
|
-
const s = n[e], o =
|
|
3278
|
+
const s = n[e], o = Tt.rangeToString(s);
|
|
3247
3279
|
t[e] = o;
|
|
3248
3280
|
}
|
|
3249
3281
|
e.volatile = t;
|
|
3250
3282
|
}
|
|
3251
|
-
|
|
3283
|
+
A && O.push(...A.getFormulaArray()), O.length > 0 && (e.formulaArray = [...O]);
|
|
3252
3284
|
const a = m.length;
|
|
3253
3285
|
if (a > 0) {
|
|
3254
|
-
m.sort(
|
|
3286
|
+
m.sort(Ct.createRangeComparator(Nt.Axis.Column));
|
|
3255
3287
|
let t = m[0], s = t.colStart, o = t.colEnd, r = t.rowEnd, n = t.value;
|
|
3256
3288
|
const i = [];
|
|
3257
3289
|
i.push(t);
|
|
@@ -3259,7 +3291,7 @@ var Bs = (t) => {
|
|
|
3259
3291
|
for (let e = 1; e < a; e++) l = m[e], n !== l.value || s !== l.colStart || o !== l.colEnd || r + 1 !== l.rowEnd ? (i.push(l), t = l, s = t.colStart, o = t.colEnd, r = t.rowEnd, n = t.value) : (r = l.rowEnd, t.rowEnd = r);
|
|
3260
3292
|
const c = i.length, h = new Array(c);
|
|
3261
3293
|
for (let t = 0; t < c; t++) {
|
|
3262
|
-
const e = i[t], s =
|
|
3294
|
+
const e = i[t], s = Tt.rangeToString(e);
|
|
3263
3295
|
h[t] = [s, e.value];
|
|
3264
3296
|
}
|
|
3265
3297
|
e.directStyles = h;
|
|
@@ -3267,74 +3299,74 @@ var Bs = (t) => {
|
|
|
3267
3299
|
const c = t.build();
|
|
3268
3300
|
c && (e.data = c.tuples), s?.onEnd?.();
|
|
3269
3301
|
},
|
|
3270
|
-
onOpenTag:
|
|
3271
|
-
onCloseTag:
|
|
3272
|
-
onText:
|
|
3302
|
+
onOpenTag: vt,
|
|
3303
|
+
onCloseTag: wt,
|
|
3304
|
+
onText: kt,
|
|
3273
3305
|
elementScanners: [{
|
|
3274
3306
|
name: "c",
|
|
3275
3307
|
scan: (t, e, s) => {
|
|
3276
|
-
if (!h || null !==
|
|
3277
|
-
|
|
3278
|
-
let o =
|
|
3308
|
+
if (!h || null !== W) return Bt;
|
|
3309
|
+
It.r = It.t = It.s = It.cm = It.vm = void 0;
|
|
3310
|
+
let o = Ht(t, e + 2, s, 0);
|
|
3279
3311
|
if (o < 0) return o;
|
|
3280
|
-
const r =
|
|
3281
|
-
if (void 0 ===
|
|
3312
|
+
const r = It.t;
|
|
3313
|
+
if (void 0 === It.r || "str" === r || "inlineStr" === r) return Bt;
|
|
3282
3314
|
let n = !1, i = -1, a = -1, l = -1, c = -1, u = o;
|
|
3283
|
-
if (!
|
|
3315
|
+
if (!Ft) for (Ot.t = Ot.si = Ot.ref = Ot.ca = void 0;;) {
|
|
3284
3316
|
const e = t.indexOf("<", o);
|
|
3285
|
-
if (-1 === e || e + 3 >= s) return
|
|
3317
|
+
if (-1 === e || e + 3 >= s) return Lt;
|
|
3286
3318
|
for (let s = o; s < e; s++) {
|
|
3287
3319
|
const e = t.charCodeAt(s);
|
|
3288
|
-
if (32 !== e && 9 !== e && 10 !== e && 13 !== e) return
|
|
3320
|
+
if (32 !== e && 9 !== e && 10 !== e && 13 !== e) return Bt;
|
|
3289
3321
|
}
|
|
3290
3322
|
const r = t.charCodeAt(e + 1), h = t.charCodeAt(e + 2);
|
|
3291
3323
|
if (47 === r) {
|
|
3292
|
-
if (!
|
|
3324
|
+
if (!Wt(t, e, 99)) return Bt;
|
|
3293
3325
|
u = e + 4;
|
|
3294
3326
|
break;
|
|
3295
3327
|
}
|
|
3296
3328
|
if (102 === r && !n && -1 === l && (32 === h || 62 === h || 47 === h)) {
|
|
3297
|
-
if (n = !0, o =
|
|
3298
|
-
if ("dataTable" ===
|
|
3299
|
-
if (
|
|
3329
|
+
if (n = !0, o = Ht(t, e + 2, s, 1), o < 0) return o;
|
|
3330
|
+
if ("dataTable" === Ot.t) return Bt;
|
|
3331
|
+
if (Ft) continue;
|
|
3300
3332
|
const r = t.indexOf("<", o);
|
|
3301
|
-
if (-1 === r || r + 3 >= s) return
|
|
3302
|
-
if (!
|
|
3333
|
+
if (-1 === r || r + 3 >= s) return Lt;
|
|
3334
|
+
if (!Wt(t, r, 102)) return Bt;
|
|
3303
3335
|
i = o, a = r, o = r + 4;
|
|
3304
3336
|
continue;
|
|
3305
3337
|
}
|
|
3306
3338
|
if (118 === r && 62 === h && -1 === l) {
|
|
3307
3339
|
const r = t.indexOf("<", e + 3);
|
|
3308
|
-
if (-1 === r || r + 3 >= s) return
|
|
3309
|
-
if (!
|
|
3340
|
+
if (-1 === r || r + 3 >= s) return Lt;
|
|
3341
|
+
if (!Wt(t, r, 118)) return Bt;
|
|
3310
3342
|
l = e + 3, c = r, o = r + 4;
|
|
3311
3343
|
continue;
|
|
3312
3344
|
}
|
|
3313
|
-
return
|
|
3345
|
+
return Bt;
|
|
3314
3346
|
}
|
|
3315
|
-
return
|
|
3347
|
+
return vt(Pt), n && (vt(Dt), a > i && kt(jt(t.slice(i, a))), wt(Dt)), -1 !== l && (vt(_t), c > l && kt(jt(t.slice(l, c))), wt(_t)), wt(Pt), u;
|
|
3316
3348
|
}
|
|
3317
3349
|
}, {
|
|
3318
3350
|
name: "row",
|
|
3319
|
-
openTag:
|
|
3351
|
+
openTag: Rt,
|
|
3320
3352
|
scan: (t, e, s) => {
|
|
3321
|
-
if (!
|
|
3322
|
-
|
|
3323
|
-
const o =
|
|
3324
|
-
return o < 0 ? o :
|
|
3353
|
+
if (!gt || h || null !== W) return Bt;
|
|
3354
|
+
$t.r = $t.s = $t.ht = $t.hidden = $t.collapsed = $t.customHeight = $t.customFormat = $t.outlineLevel = void 0;
|
|
3355
|
+
const o = Ht(t, e + 4, s, 2);
|
|
3356
|
+
return o < 0 ? o : Ft || void 0 === $t.r ? Bt : (vt(Rt), o);
|
|
3325
3357
|
}
|
|
3326
3358
|
}]
|
|
3327
3359
|
};
|
|
3328
|
-
},
|
|
3360
|
+
}, so = /* @__PURE__ */ new Map([
|
|
3329
3361
|
["urn:schemas-microsoft-com:vml", "v"],
|
|
3330
3362
|
["urn:schemas-microsoft-com:office:office", "o"],
|
|
3331
3363
|
["urn:schemas-microsoft-com:office:excel", "x"]
|
|
3332
|
-
]),
|
|
3333
|
-
function
|
|
3364
|
+
]), oo = [...so].map(([t, e]) => ` xmlns:${e}="${t}"`).join(""), ro = /<(\/?)([A-Za-z_][\w.-]*(?::[\w.-]+)?)((?:[^>"']|"[^"]*"|'[^']*')*?)(\/?)>/g, no = /(\s+)([A-Za-z_][\w.-]*(?::[\w.-]+)?)(\s*=\s*)("[^"]*"|'[^']*')/g, io = /\sxmlns(?::([\w.-]+))?\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
|
|
3365
|
+
function ao(t) {
|
|
3334
3366
|
if (!t || !((t) => {
|
|
3335
3367
|
let e;
|
|
3336
|
-
for (
|
|
3337
|
-
const t =
|
|
3368
|
+
for (io.lastIndex = 0; null !== (e = io.exec(t));) {
|
|
3369
|
+
const t = so.get(e[2] ?? e[3] ?? "");
|
|
3338
3370
|
if (t && t !== (e[1] ?? "")) return !0;
|
|
3339
3371
|
}
|
|
3340
3372
|
return !1;
|
|
@@ -3351,34 +3383,34 @@ function so(t) {
|
|
|
3351
3383
|
const o = e[s].bindings.get(t);
|
|
3352
3384
|
if (void 0 !== o) return o;
|
|
3353
3385
|
}
|
|
3354
|
-
})(n, s), a = void 0 !== i ?
|
|
3386
|
+
})(n, s), a = void 0 !== i ? so.get(i) : void 0;
|
|
3355
3387
|
return a ? `${a}:${-1 === r ? t : t.substring(r + 1)}` : null;
|
|
3356
3388
|
};
|
|
3357
3389
|
let o = !1, r = !1;
|
|
3358
|
-
const n = t.replace(
|
|
3390
|
+
const n = t.replace(ro, (t, n, i, a, l) => {
|
|
3359
3391
|
if (n) {
|
|
3360
3392
|
const o = e[e.length - 1], r = s(i, null, !1);
|
|
3361
3393
|
return o && o.name === i && (o.nested > 0 ? o.nested-- : e.pop()), r ? `</${r}>` : t;
|
|
3362
3394
|
}
|
|
3363
3395
|
const c = ((t) => {
|
|
3364
3396
|
let e, s = null;
|
|
3365
|
-
for (
|
|
3397
|
+
for (io.lastIndex = 0; null !== (e = io.exec(t));) (s ??= /* @__PURE__ */ new Map()).set(e[1] ?? "", e[2] ?? e[3] ?? "");
|
|
3366
3398
|
return s;
|
|
3367
3399
|
})(a);
|
|
3368
3400
|
c?.forEach((t, e) => {
|
|
3369
|
-
const s = [...
|
|
3401
|
+
const s = [...so].find(([, t]) => t === e)?.[0];
|
|
3370
3402
|
s && s !== t && (o = !0);
|
|
3371
3403
|
});
|
|
3372
3404
|
const h = s(i, c, !1);
|
|
3373
|
-
let u = a.replace(
|
|
3405
|
+
let u = a.replace(no, (t, e, o, r, n) => {
|
|
3374
3406
|
if ("xmlns" === o || o.startsWith("xmlns:")) {
|
|
3375
3407
|
const e = n.slice(1, -1);
|
|
3376
|
-
return
|
|
3408
|
+
return so.has(e) ? "" : t;
|
|
3377
3409
|
}
|
|
3378
3410
|
const i = s(o, c, !0);
|
|
3379
3411
|
return i ? `${e}${i}${r}${n}` : t;
|
|
3380
3412
|
});
|
|
3381
|
-
if (r || (r = !0, u = u.replace(/\s+$/, "") +
|
|
3413
|
+
if (r || (r = !0, u = u.replace(/\s+$/, "") + oo), !l) {
|
|
3382
3414
|
const t = e[e.length - 1];
|
|
3383
3415
|
c ? e.push({
|
|
3384
3416
|
name: i,
|
|
@@ -3390,7 +3422,7 @@ function so(t) {
|
|
|
3390
3422
|
});
|
|
3391
3423
|
return o ? t : n;
|
|
3392
3424
|
}
|
|
3393
|
-
var
|
|
3425
|
+
var lo = {
|
|
3394
3426
|
creator: "author",
|
|
3395
3427
|
category: "category",
|
|
3396
3428
|
description: "comments",
|
|
@@ -3403,47 +3435,47 @@ var oo = {
|
|
|
3403
3435
|
revision: "revisionNumber",
|
|
3404
3436
|
subject: "subject",
|
|
3405
3437
|
title: "title"
|
|
3406
|
-
},
|
|
3438
|
+
}, co = {
|
|
3407
3439
|
Company: "company",
|
|
3408
3440
|
Manager: "manager"
|
|
3409
|
-
},
|
|
3410
|
-
lpwstr:
|
|
3411
|
-
lpstr:
|
|
3412
|
-
bstr:
|
|
3413
|
-
i1:
|
|
3414
|
-
i2:
|
|
3415
|
-
i4:
|
|
3416
|
-
i8:
|
|
3417
|
-
int:
|
|
3418
|
-
ui1:
|
|
3419
|
-
ui2:
|
|
3420
|
-
ui4:
|
|
3421
|
-
ui8:
|
|
3422
|
-
uint:
|
|
3423
|
-
r4:
|
|
3424
|
-
r8:
|
|
3425
|
-
decimal:
|
|
3426
|
-
bool:
|
|
3427
|
-
filetime:
|
|
3428
|
-
date:
|
|
3429
|
-
},
|
|
3430
|
-
const e = t.kind ?
|
|
3441
|
+
}, ho = {
|
|
3442
|
+
lpwstr: Dt.Type.String,
|
|
3443
|
+
lpstr: Dt.Type.String,
|
|
3444
|
+
bstr: Dt.Type.String,
|
|
3445
|
+
i1: Dt.Type.Number,
|
|
3446
|
+
i2: Dt.Type.Number,
|
|
3447
|
+
i4: Dt.Type.Number,
|
|
3448
|
+
i8: Dt.Type.Number,
|
|
3449
|
+
int: Dt.Type.Number,
|
|
3450
|
+
ui1: Dt.Type.Number,
|
|
3451
|
+
ui2: Dt.Type.Number,
|
|
3452
|
+
ui4: Dt.Type.Number,
|
|
3453
|
+
ui8: Dt.Type.Number,
|
|
3454
|
+
uint: Dt.Type.Number,
|
|
3455
|
+
r4: Dt.Type.Float,
|
|
3456
|
+
r8: Dt.Type.Float,
|
|
3457
|
+
decimal: Dt.Type.Float,
|
|
3458
|
+
bool: Dt.Type.Boolean,
|
|
3459
|
+
filetime: Dt.Type.Date,
|
|
3460
|
+
date: Dt.Type.Date
|
|
3461
|
+
}, uo = (t) => {
|
|
3462
|
+
const e = t.kind ? ho[t.kind] : void 0;
|
|
3431
3463
|
if (!e) return null;
|
|
3432
3464
|
const s = t.value.trim();
|
|
3433
3465
|
let o;
|
|
3434
|
-
if (e ===
|
|
3466
|
+
if (e === Dt.Type.String) o = {
|
|
3435
3467
|
key: t.key,
|
|
3436
3468
|
type: e,
|
|
3437
3469
|
value: t.value
|
|
3438
3470
|
};
|
|
3439
|
-
else if (e ===
|
|
3471
|
+
else if (e === Dt.Type.Boolean) {
|
|
3440
3472
|
if ("true" !== s && "false" !== s && "1" !== s && "0" !== s) return null;
|
|
3441
3473
|
o = {
|
|
3442
3474
|
key: t.key,
|
|
3443
3475
|
type: e,
|
|
3444
3476
|
value: "true" === s || "1" === s
|
|
3445
3477
|
};
|
|
3446
|
-
} else if (e ===
|
|
3478
|
+
} else if (e === Dt.Type.Date) {
|
|
3447
3479
|
const r = new Date(s);
|
|
3448
3480
|
if (!s || isNaN(r.getTime())) return null;
|
|
3449
3481
|
o = {
|
|
@@ -3454,46 +3486,46 @@ var oo = {
|
|
|
3454
3486
|
} else {
|
|
3455
3487
|
const r = Number(s);
|
|
3456
3488
|
if (!s || !Number.isFinite(r)) return null;
|
|
3457
|
-
const n = e ===
|
|
3489
|
+
const n = e === Dt.Type.Number && r >= -2147483648 && r <= 2147483647;
|
|
3458
3490
|
o = {
|
|
3459
3491
|
key: t.key,
|
|
3460
|
-
type: n ? e :
|
|
3492
|
+
type: n ? e : Dt.Type.Float,
|
|
3461
3493
|
value: r
|
|
3462
3494
|
};
|
|
3463
3495
|
}
|
|
3464
3496
|
return t.linkTarget && (o.linkTarget = t.linkTarget), o;
|
|
3465
|
-
},
|
|
3497
|
+
}, po = "hiddenXfs", fo = (t) => (Array.isArray(t) ? t[1] : t?.v)?.s, go = (t) => {
|
|
3466
3498
|
if (!t || 0 === t.length) return !1;
|
|
3467
|
-
const e =
|
|
3499
|
+
const e = Tt.refsToRuns(t, !0);
|
|
3468
3500
|
let s = 0;
|
|
3469
3501
|
for (const t of e) {
|
|
3470
3502
|
if (t.min > s || void 0 === t.value?.s) return !1;
|
|
3471
3503
|
s = Math.max(s, t.max + 1);
|
|
3472
3504
|
}
|
|
3473
|
-
return s >
|
|
3474
|
-
},
|
|
3505
|
+
return s > M;
|
|
3506
|
+
}, mo = (t, e) => {
|
|
3475
3507
|
t.protection = {
|
|
3476
3508
|
...t.protection,
|
|
3477
3509
|
showFormulas: e
|
|
3478
3510
|
};
|
|
3479
|
-
},
|
|
3511
|
+
}, bo = "xfComplements", xo = (t, e) => {
|
|
3480
3512
|
if ("string" == typeof t) return void e.push(t);
|
|
3481
3513
|
const s = Array.isArray(t) ? t : [t];
|
|
3482
3514
|
for (let t = 0; t < s.length; t++) {
|
|
3483
|
-
const o =
|
|
3515
|
+
const o = Tt.rangeToString(s[t]);
|
|
3484
3516
|
o && e.push(o);
|
|
3485
3517
|
}
|
|
3486
|
-
},
|
|
3518
|
+
}, yo = (t) => {
|
|
3487
3519
|
const e = Array.isArray(t) ? t[1] : t.v;
|
|
3488
3520
|
if (!e || !("s" in e)) return;
|
|
3489
3521
|
const s = e.s;
|
|
3490
3522
|
return delete e.s, s;
|
|
3491
|
-
},
|
|
3523
|
+
}, vo = (t, e, s, o) => {
|
|
3492
3524
|
if (!t) return;
|
|
3493
3525
|
const r = e ? 2 : 1, n = e ? s.rowStart : s.colStart, i = e ? s.rowEnd : s.colEnd;
|
|
3494
3526
|
let a, l = -1;
|
|
3495
3527
|
for (const s of t) {
|
|
3496
|
-
const t =
|
|
3528
|
+
const t = Tt.refToRun(s, e), c = yo(s);
|
|
3497
3529
|
t && void 0 !== c ? c !== l || (e ? a.colEnd : a.rowEnd) + 1 !== t.min ? (a = {
|
|
3498
3530
|
colStart: e ? t.min : n,
|
|
3499
3531
|
rowStart: e ? n : t.min,
|
|
@@ -3505,7 +3537,7 @@ var oo = {
|
|
|
3505
3537
|
}
|
|
3506
3538
|
}, l = c, o.push(a)) : e ? a.colEnd = t.max : a.rowEnd = t.max : l = -1;
|
|
3507
3539
|
}
|
|
3508
|
-
},
|
|
3540
|
+
}, wo = {
|
|
3509
3541
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": "workbooks",
|
|
3510
3542
|
"application/vnd.ms-excel.sheet.macroEnabled.main+xml": "workbooks",
|
|
3511
3543
|
"application/vnd.ms-excel.sheet.binary.macroEnabled.main": "workbooks",
|
|
@@ -3538,7 +3570,7 @@ var oo = {
|
|
|
3538
3570
|
"application/vnd.ms-excel.externalLink": "links",
|
|
3539
3571
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml": "links",
|
|
3540
3572
|
"application/vnd.openxmlformats-officedocument.theme+xml": "themes"
|
|
3541
|
-
},
|
|
3573
|
+
}, To = v({ readXLSX: () => Eo }), So = (t) => t.startsWith("/") ? t.slice(1) : t, Co = [
|
|
3542
3574
|
208,
|
|
3543
3575
|
207,
|
|
3544
3576
|
17,
|
|
@@ -3547,10 +3579,10 @@ var oo = {
|
|
|
3547
3579
|
177,
|
|
3548
3580
|
26,
|
|
3549
3581
|
225
|
|
3550
|
-
],
|
|
3551
|
-
const { password: n, onVBA: i, profile: a, calcOnLoad: l = "auto", createWorkbookOptions:
|
|
3552
|
-
await
|
|
3553
|
-
const d = !!
|
|
3582
|
+
], Ao = /^xl\/worksheets\/[^/]+\.xml$/i, ko = (t) => "string" == typeof t ? t : (t?.runs ?? []).map((t) => t.text ?? "").join(""), Eo = async (s, r) => {
|
|
3583
|
+
const { password: n, onVBA: i, profile: a, calcOnLoad: l = "auto", createWorkbookOptions: h = {}, ...u } = r ?? {};
|
|
3584
|
+
await kt.load();
|
|
3585
|
+
const d = !!h.origin && "string" != typeof h.origin, p = a ? new ce("function" == typeof a ? a : void 0) : null, g = [], m = (t, e, s) => {
|
|
3554
3586
|
g.push([
|
|
3555
3587
|
t,
|
|
3556
3588
|
e ?? "",
|
|
@@ -3558,43 +3590,43 @@ var oo = {
|
|
|
3558
3590
|
]);
|
|
3559
3591
|
}, b = { onWarning: m }, x = r?.progress, y = x?.onProgress ? x.onProgress.bind(x) : void 0, v = s.byteLength;
|
|
3560
3592
|
let w = 0, T = 0;
|
|
3561
|
-
const
|
|
3593
|
+
const S = y ? (t) => {
|
|
3562
3594
|
if (w <= 0) return;
|
|
3563
3595
|
T += t;
|
|
3564
3596
|
const e = Math.min(v, Math.round(T / w * v));
|
|
3565
3597
|
y(e, v);
|
|
3566
|
-
} : void 0,
|
|
3567
|
-
let
|
|
3598
|
+
} : void 0, C = import("./CvcAx132Yp5uUDUB.mjs");
|
|
3599
|
+
let A = null;
|
|
3568
3600
|
try {
|
|
3569
|
-
|
|
3601
|
+
A = new DOMParser();
|
|
3570
3602
|
} catch (t) {}
|
|
3571
|
-
let
|
|
3603
|
+
let O = null;
|
|
3572
3604
|
try {
|
|
3573
|
-
|
|
3605
|
+
O = new XMLSerializer();
|
|
3574
3606
|
} catch (t) {}
|
|
3575
|
-
let
|
|
3576
|
-
|
|
3607
|
+
let _, $, L, j = null;
|
|
3608
|
+
A || (j = import("@xmldom/xmldom"));
|
|
3577
3609
|
try {
|
|
3578
|
-
const [t, e] = await Promise.all([
|
|
3579
|
-
|
|
3610
|
+
const [t, e] = await Promise.all([j, C]);
|
|
3611
|
+
_ = new e.DOMTransformer(), $ = A ?? new t.DOMParser(), L = O ?? new t.XMLSerializer();
|
|
3580
3612
|
} catch (t) {
|
|
3581
3613
|
throw new Error("Unable to load XLSX parser.", { cause: t });
|
|
3582
3614
|
}
|
|
3583
|
-
const
|
|
3615
|
+
const F = (t) => L.serializeToString(t);
|
|
3584
3616
|
if (((t) => {
|
|
3585
|
-
if (t.byteLength <
|
|
3586
|
-
const e = new Uint8Array(t, 0,
|
|
3587
|
-
return
|
|
3588
|
-
})(s)) throw new
|
|
3617
|
+
if (t.byteLength < Co.length) return !1;
|
|
3618
|
+
const e = new Uint8Array(t, 0, Co.length);
|
|
3619
|
+
return Co.every((t, s) => e[s] === t);
|
|
3620
|
+
})(s)) throw new yt("This is an Excel 97-2003 workbook (.xls), which cannot be read. Save it as '.xlsx' and try again.");
|
|
3589
3621
|
let W;
|
|
3590
3622
|
try {
|
|
3591
|
-
W = await
|
|
3623
|
+
W = await le.create(s);
|
|
3592
3624
|
} catch (t) {
|
|
3593
|
-
throw new
|
|
3625
|
+
throw new yt("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.", { cause: t });
|
|
3594
3626
|
}
|
|
3595
|
-
|
|
3627
|
+
p?.mark("zip-open");
|
|
3596
3628
|
try {
|
|
3597
|
-
if (!W.has("[Content_Types].xml")) throw new
|
|
3629
|
+
if (!W.has("[Content_Types].xml")) throw new yt("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
3598
3630
|
const s = (t) => {
|
|
3599
3631
|
const e = W.getEntry(t);
|
|
3600
3632
|
return e ? { content: e } : void 0;
|
|
@@ -3632,7 +3664,7 @@ var oo = {
|
|
|
3632
3664
|
const e = o.ContentType, s = o.PartName;
|
|
3633
3665
|
if (!e || !s) return;
|
|
3634
3666
|
t.overrides[s.startsWith("/") ? s.slice(1) : s] = e;
|
|
3635
|
-
const r =
|
|
3667
|
+
const r = wo[e], n = r ? t[r] : void 0;
|
|
3636
3668
|
Array.isArray(n) && n.push(s);
|
|
3637
3669
|
} else if ("Default" === s) {
|
|
3638
3670
|
const e = o.Extension, s = o.ContentType;
|
|
@@ -3650,19 +3682,19 @@ var oo = {
|
|
|
3650
3682
|
}), e = await W.getTextStream("[Content_Types].xml");
|
|
3651
3683
|
if (!e) throw new Error("Error parsing content types: '[Content_Types].xml'");
|
|
3652
3684
|
try {
|
|
3653
|
-
await
|
|
3685
|
+
await ss.parseStream(e, t, { xmlns: !1 });
|
|
3654
3686
|
} catch (t) {
|
|
3655
3687
|
throw new Error("Error parsing content types: '[Content_Types].xml'", { cause: t });
|
|
3656
3688
|
}
|
|
3657
3689
|
d && await W.getBuffer("[Content_Types].xml");
|
|
3658
3690
|
}
|
|
3659
|
-
|
|
3660
|
-
const n = r.sst,
|
|
3661
|
-
for (const t of r.sheets)
|
|
3662
|
-
n &&
|
|
3663
|
-
for (const t of
|
|
3664
|
-
if (await W.prefetch((t) => !
|
|
3665
|
-
const t =
|
|
3691
|
+
p?.mark("content-types");
|
|
3692
|
+
const n = r.sst, u = /* @__PURE__ */ new Set();
|
|
3693
|
+
for (const t of r.sheets) u.add(So(t));
|
|
3694
|
+
n && u.add(So(n));
|
|
3695
|
+
for (const t of u) w += W.uncompressedSize(t);
|
|
3696
|
+
if (await W.prefetch((t) => !u.has(t) && !Ao.test(t)), p?.mark("prefetch-side-parts"), 0 === r.workbooks.length) {
|
|
3697
|
+
const t = H("_rels/.rels", s, $, _, b), e = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument";
|
|
3666
3698
|
if (t) {
|
|
3667
3699
|
for (const s of t.values()) if (s.type === e && s.target) {
|
|
3668
3700
|
r.workbooks.push(s.target);
|
|
@@ -3670,36 +3702,34 @@ var oo = {
|
|
|
3670
3702
|
}
|
|
3671
3703
|
}
|
|
3672
3704
|
}
|
|
3673
|
-
if (0 === r.workbooks.length) throw new
|
|
3674
|
-
const T =
|
|
3705
|
+
if (0 === r.workbooks.length) throw new yt("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
3706
|
+
const T = h?.resources ?? new Lt(), C = T.beginPersist(), A = {}, O = /* @__PURE__ */ new Set(), L = /* @__PURE__ */ new Map();
|
|
3675
3707
|
L.set("parseInlineDxf", (t) => {
|
|
3676
3708
|
if (!t) return;
|
|
3677
|
-
const
|
|
3678
|
-
if (!
|
|
3679
|
-
const
|
|
3680
|
-
return Object.keys(
|
|
3709
|
+
const e = $.parseFromString(`<dxf xmlns:x14="${X}" xmlns:xm="${f}">${t}</dxf>`, "text/xml")?.documentElement;
|
|
3710
|
+
if (!e) return;
|
|
3711
|
+
const s = _.parseDxf(e, "", b);
|
|
3712
|
+
return Object.keys(s).length > 0 ? s : void 0;
|
|
3681
3713
|
});
|
|
3682
|
-
const
|
|
3683
|
-
L.set("
|
|
3684
|
-
const
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
et.add(xo(t));
|
|
3688
|
-
}, nt = (t, e = Q) => {
|
|
3714
|
+
const j = at("metadata", r, s, $, _, b).entries().next()?.value?.[1]?.metadata;
|
|
3715
|
+
j && L.set("metadata", j), L.set(zs, G());
|
|
3716
|
+
const z = /* @__PURE__ */ new Map(), q = [], J = /* @__PURE__ */ new Set(), Y = (t) => {
|
|
3717
|
+
J.add(So(t));
|
|
3718
|
+
}, et = (t, e = z) => {
|
|
3689
3719
|
const o = t.lastIndexOf("/"), r = t.substring(0, o + 1) + "_rels/" + t.substring(o + 1, t.length) + ".rels";
|
|
3690
3720
|
let n = e.get(r);
|
|
3691
|
-
return n || (n =
|
|
3692
|
-
},
|
|
3693
|
-
let n =
|
|
3721
|
+
return n || (n = H(r, s, $, _, Ot), e.set(r, n)), n;
|
|
3722
|
+
}, ot = (t, e, o, r = z) => {
|
|
3723
|
+
let n = et(e, r).get(t), i = n?.target;
|
|
3694
3724
|
if (!i) return null;
|
|
3695
3725
|
if ("External" === n.targetMode) {
|
|
3696
3726
|
if (!o) return n.target;
|
|
3697
3727
|
const t = T.add({ source: { external: n.target } });
|
|
3698
|
-
return t.addReference(
|
|
3728
|
+
return t.addReference(A), O.add(t), C.toResourceId(t);
|
|
3699
3729
|
}
|
|
3700
3730
|
const a = e.lastIndexOf("/"), l = e.substring(0, a + 1);
|
|
3701
|
-
i.startsWith("/") || (i = l + i), i =
|
|
3702
|
-
const c =
|
|
3731
|
+
i.startsWith("/") || (i = l + i), i = pt(i);
|
|
3732
|
+
const c = _?.getVisitorParamsState().get("dxfs");
|
|
3703
3733
|
let h = r.get(i);
|
|
3704
3734
|
if (!h) {
|
|
3705
3735
|
const t = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet", e = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink";
|
|
@@ -3707,44 +3737,44 @@ var oo = {
|
|
|
3707
3737
|
const t = {};
|
|
3708
3738
|
h = t;
|
|
3709
3739
|
const e = async () => {
|
|
3710
|
-
const e =
|
|
3740
|
+
const e = Gs(t, (t, e) => "legacyDrawing" === e ? ht(t, i) : "formControl" === e ? ut(t, i) : "part" === e ? ft(t, i) : ot(t, i, "resource" === e) ?? null, Mt, c, () => {}, (t, e, s) => {
|
|
3711
3741
|
m(t, e ? `${e} (${i})` : i, s);
|
|
3712
|
-
}, void 0, L), s = await W.getTextStream(i,
|
|
3742
|
+
}, void 0, L), s = await W.getTextStream(i, S);
|
|
3713
3743
|
if (s) try {
|
|
3714
|
-
await
|
|
3744
|
+
await ss.parseStream(s, e, {
|
|
3715
3745
|
xmlns: !1,
|
|
3716
3746
|
lean: !0
|
|
3717
3747
|
});
|
|
3718
3748
|
} catch (t) {
|
|
3719
3749
|
throw new Error(`Error parsing sheet: '${i}'`, { cause: t });
|
|
3720
3750
|
}
|
|
3721
|
-
const o =
|
|
3751
|
+
const o = et(i, r);
|
|
3722
3752
|
if (o) {
|
|
3723
|
-
|
|
3753
|
+
lt(t, i, o, r), N(t), it(t);
|
|
3724
3754
|
const e = [];
|
|
3725
3755
|
o.forEach((t, s) => {
|
|
3726
3756
|
if ("http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable" !== t.type) return;
|
|
3727
|
-
const o =
|
|
3757
|
+
const o = ft(s, i, t.type, (t) => "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition" !== t);
|
|
3728
3758
|
if (!o?.xml) return;
|
|
3729
3759
|
const r = /<pivotTableDefinition\b[^>]*>/.exec(o.xml)?.[0] ?? "", n = parseInt(/\scacheId="(\d+)"/.exec(r)?.[1] ?? "", 10);
|
|
3730
3760
|
if (isNaN(n)) return void g.push([`Pivot table '${o.name}' names no cache and was dropped.`, i]);
|
|
3731
3761
|
const a = /\sname="([^"]*)"/.exec(r)?.[1];
|
|
3732
3762
|
e.push({
|
|
3733
|
-
...a ? { name:
|
|
3763
|
+
...a ? { name: st(a) } : {},
|
|
3734
3764
|
cacheId: n,
|
|
3735
3765
|
part: o
|
|
3736
3766
|
});
|
|
3737
3767
|
}), e.length > 0 && (t.pivotTables = e);
|
|
3738
3768
|
}
|
|
3739
3769
|
};
|
|
3740
|
-
|
|
3770
|
+
q.push(e());
|
|
3741
3771
|
} else if (n.type === e) {
|
|
3742
|
-
const t =
|
|
3772
|
+
const t = P(i, s, $, _, Ot);
|
|
3743
3773
|
if (t && 0 !== Object.keys(t).length) {
|
|
3744
3774
|
const e = t, s = e.__bookRelId, o = e.__absoluteUrlRelId;
|
|
3745
3775
|
delete e.__bookRelId, delete e.__absoluteUrlRelId;
|
|
3746
3776
|
const n = [];
|
|
3747
|
-
|
|
3777
|
+
et(i, r)?.forEach((t, e) => {
|
|
3748
3778
|
if ("External" === t.targetMode && t.type && t.target) {
|
|
3749
3779
|
const r = {
|
|
3750
3780
|
type: t.type,
|
|
@@ -3752,32 +3782,32 @@ var oo = {
|
|
|
3752
3782
|
};
|
|
3753
3783
|
e === s ? r.role = "book" : e === o && (r.role = "absoluteUrl"), n.push(r);
|
|
3754
3784
|
}
|
|
3755
|
-
}), n.sort((t, e) => ("book" === t.role ? 0 : 1) - ("book" === e.role ? 0 : 1)), e.sources = n,
|
|
3785
|
+
}), n.sort((t, e) => ("book" === t.role ? 0 : 1) - ("book" === e.role ? 0 : 1)), e.sources = n, Y(i), h = e;
|
|
3756
3786
|
} else h = null;
|
|
3757
|
-
} else h = o ?
|
|
3787
|
+
} else h = o ? B(i, s, (t, e) => {
|
|
3758
3788
|
const s = T.add({ source: { buffer: t } });
|
|
3759
|
-
return s.addReference(
|
|
3760
|
-
}, Ot) :
|
|
3789
|
+
return s.addReference(A), O.add(s), C.toResourceId(s);
|
|
3790
|
+
}, Ot) : P(i, s, $, _, Ot);
|
|
3761
3791
|
}
|
|
3762
3792
|
return h;
|
|
3763
|
-
},
|
|
3793
|
+
}, nt = (t, e) => {
|
|
3764
3794
|
if (!t) return null;
|
|
3765
|
-
const s =
|
|
3795
|
+
const s = et(e, z)?.get(t);
|
|
3766
3796
|
if (!s?.target || "External" === s.targetMode) return null;
|
|
3767
3797
|
let o = s.target;
|
|
3768
|
-
return o.startsWith("/") || (o = e.substring(0, e.lastIndexOf("/") + 1) + o),
|
|
3769
|
-
},
|
|
3798
|
+
return o.startsWith("/") || (o = e.substring(0, e.lastIndexOf("/") + 1) + o), pt(o);
|
|
3799
|
+
}, lt = (t, e, s, r) => {
|
|
3770
3800
|
const n = [], i = /* @__PURE__ */ new Map(), a = [];
|
|
3771
3801
|
s.forEach((t, s) => {
|
|
3772
3802
|
if ("http://schemas.microsoft.com/office/2017/10/relationships/threadedComment" !== t.type) return;
|
|
3773
|
-
const o =
|
|
3803
|
+
const o = ot(s, e, !1, r)?.comments;
|
|
3774
3804
|
if (!o) return;
|
|
3775
3805
|
for (let t = 0; t < o.length; t++) {
|
|
3776
3806
|
const e = o[t];
|
|
3777
3807
|
if (!e?.v?.id) continue;
|
|
3778
3808
|
const { parentId: s, done: r, content: l, ...c } = e.v, h = {
|
|
3779
3809
|
...c,
|
|
3780
|
-
content:
|
|
3810
|
+
content: ko(l)
|
|
3781
3811
|
};
|
|
3782
3812
|
s ? a.push({
|
|
3783
3813
|
parentId: s,
|
|
@@ -3787,8 +3817,8 @@ var oo = {
|
|
|
3787
3817
|
v: h
|
|
3788
3818
|
}));
|
|
3789
3819
|
}
|
|
3790
|
-
const l =
|
|
3791
|
-
l &&
|
|
3820
|
+
const l = nt(s, e);
|
|
3821
|
+
l && Y(l);
|
|
3792
3822
|
});
|
|
3793
3823
|
for (let t = 0; t < a.length; t++) {
|
|
3794
3824
|
const { parentId: e, json: s } = a[t], o = i.get(e);
|
|
@@ -3797,7 +3827,7 @@ var oo = {
|
|
|
3797
3827
|
const l = [];
|
|
3798
3828
|
if (s.forEach((t, s) => {
|
|
3799
3829
|
if ("http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" !== t.type) return;
|
|
3800
|
-
const o =
|
|
3830
|
+
const o = ot(s, e, !1, r), n = o?.comments;
|
|
3801
3831
|
if (!n) return;
|
|
3802
3832
|
const a = o?.authors;
|
|
3803
3833
|
for (let t = 0; t < n.length; t++) {
|
|
@@ -3805,11 +3835,11 @@ var oo = {
|
|
|
3805
3835
|
if (!e?.r) continue;
|
|
3806
3836
|
let s = a && void 0 !== e.v.authorId ? a[e.v.authorId] : void 0;
|
|
3807
3837
|
if (s && s.startsWith("tc=")) {
|
|
3808
|
-
if (i.has(
|
|
3838
|
+
if (i.has(D(s.substring(3)))) continue;
|
|
3809
3839
|
s = void 0;
|
|
3810
3840
|
}
|
|
3811
3841
|
const o = {
|
|
3812
|
-
id:
|
|
3842
|
+
id: xt.uuidV4().toUpperCase(),
|
|
3813
3843
|
asNote: !0,
|
|
3814
3844
|
content: e.v.content ?? ""
|
|
3815
3845
|
}, r = s ? Pt({ displayName: s }) : void 0;
|
|
@@ -3818,17 +3848,17 @@ var oo = {
|
|
|
3818
3848
|
v: o
|
|
3819
3849
|
});
|
|
3820
3850
|
}
|
|
3821
|
-
const c =
|
|
3822
|
-
c &&
|
|
3851
|
+
const c = nt(s, e);
|
|
3852
|
+
c && Y(c);
|
|
3823
3853
|
}), 0 === n.length && 0 === l.length) return;
|
|
3824
3854
|
const c = [...n, ...l], h = t.legacyDrawing;
|
|
3825
3855
|
if (h?.xml) {
|
|
3826
|
-
const { rest: e, notes: s } =
|
|
3856
|
+
const { rest: e, notes: s } = ct(h.xml);
|
|
3827
3857
|
if (s.length > 0) {
|
|
3828
3858
|
const r = /* @__PURE__ */ new Map();
|
|
3829
3859
|
for (let t = 0; t < s.length; t++) {
|
|
3830
3860
|
const e = s[t];
|
|
3831
|
-
r.set(
|
|
3861
|
+
r.set(Tt.cellToString({
|
|
3832
3862
|
rowIndex: e.row,
|
|
3833
3863
|
colIndex: e.col
|
|
3834
3864
|
}), e);
|
|
@@ -3861,55 +3891,55 @@ var oo = {
|
|
|
3861
3891
|
r.forEach((t) => {
|
|
3862
3892
|
n.push(t.xml);
|
|
3863
3893
|
});
|
|
3864
|
-
const i =
|
|
3894
|
+
const i = dt(e, n);
|
|
3865
3895
|
i ? h.xml = i : delete t.legacyDrawing;
|
|
3866
3896
|
}
|
|
3867
3897
|
}
|
|
3868
3898
|
t.comments = c;
|
|
3869
|
-
},
|
|
3870
|
-
const o =
|
|
3899
|
+
}, ht = (t, e) => {
|
|
3900
|
+
const o = nt(t, e);
|
|
3871
3901
|
if (!o) return null;
|
|
3872
|
-
const r = s(
|
|
3902
|
+
const r = s(So(o));
|
|
3873
3903
|
if (!r) return null;
|
|
3874
|
-
const n = { xml:
|
|
3875
|
-
return
|
|
3904
|
+
const n = { xml: ao(new TextDecoder("utf-8").decode(r.content)) }, i = [];
|
|
3905
|
+
return et(o, z)?.forEach((t, e) => {
|
|
3876
3906
|
if ("http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" !== t.type) return;
|
|
3877
|
-
const s =
|
|
3907
|
+
const s = ot(e, o, !0);
|
|
3878
3908
|
"number" == typeof s && i.push({
|
|
3879
3909
|
id: e,
|
|
3880
3910
|
resId: s
|
|
3881
3911
|
});
|
|
3882
|
-
}), i.length > 0 && (n.images = i),
|
|
3883
|
-
},
|
|
3884
|
-
const o =
|
|
3912
|
+
}), i.length > 0 && (n.images = i), Y(o), n;
|
|
3913
|
+
}, ut = (t, e) => {
|
|
3914
|
+
const o = nt(t, e);
|
|
3885
3915
|
if (!o) return null;
|
|
3886
|
-
const r =
|
|
3887
|
-
return r &&
|
|
3888
|
-
},
|
|
3889
|
-
const a =
|
|
3916
|
+
const r = P(o, s, $, _, Ot)?.formControl ?? null;
|
|
3917
|
+
return r && Y(o), r;
|
|
3918
|
+
}, ft = (t, e, o, n, i = /* @__PURE__ */ new Set()) => {
|
|
3919
|
+
const a = nt(t, e);
|
|
3890
3920
|
if (!a || i.has(a)) return null;
|
|
3891
|
-
const l = o ??
|
|
3921
|
+
const l = o ?? et(e, z)?.get(t)?.type;
|
|
3892
3922
|
if (!l) return null;
|
|
3893
|
-
const c = s(
|
|
3923
|
+
const c = s(So(a));
|
|
3894
3924
|
if (!c) return null;
|
|
3895
3925
|
i.add(a);
|
|
3896
|
-
const h = a.substring(a.lastIndexOf("/") + 1), u = r.overrides[
|
|
3926
|
+
const h = a.substring(a.lastIndexOf("/") + 1), u = r.overrides[So(a)] ?? r.defaults[h.substring(h.lastIndexOf(".") + 1).toLowerCase()], d = {
|
|
3897
3927
|
id: t,
|
|
3898
3928
|
type: l,
|
|
3899
3929
|
name: h
|
|
3900
3930
|
};
|
|
3901
3931
|
if (u && (d.contentType = u), ((t, e) => t ? t.endsWith("+xml") || "application/xml" === t : /\.(xml|rels|vml)$/i.test(e))(u, h)) d.xml = new TextDecoder("utf-8").decode(c.content);
|
|
3902
3932
|
else {
|
|
3903
|
-
const s =
|
|
3933
|
+
const s = ot(t, e, !0);
|
|
3904
3934
|
if ("number" != typeof s) return null;
|
|
3905
3935
|
d.resId = s;
|
|
3906
3936
|
}
|
|
3907
3937
|
const p = [];
|
|
3908
|
-
return
|
|
3938
|
+
return et(a, z)?.forEach((t, e) => {
|
|
3909
3939
|
if (!t?.type) return;
|
|
3910
3940
|
if (n && !n(t.type)) return;
|
|
3911
3941
|
if ("External" === t.targetMode) {
|
|
3912
|
-
const s =
|
|
3942
|
+
const s = ot(e, a, !0);
|
|
3913
3943
|
"number" == typeof s && p.push({
|
|
3914
3944
|
id: e,
|
|
3915
3945
|
type: t.type,
|
|
@@ -3917,99 +3947,99 @@ var oo = {
|
|
|
3917
3947
|
});
|
|
3918
3948
|
return;
|
|
3919
3949
|
}
|
|
3920
|
-
const s =
|
|
3950
|
+
const s = ft(e, a, t.type, n, i);
|
|
3921
3951
|
s && p.push(s);
|
|
3922
|
-
}), p.length > 0 && (d.parts = p),
|
|
3923
|
-
},
|
|
3924
|
-
|
|
3925
|
-
t?.custom &&
|
|
3952
|
+
}), p.length > 0 && (d.parts = p), Y(a), d;
|
|
3953
|
+
}, gt = at("coreprops", r, s, $, _, b), mt = at("extprops", r, s, $, _, b), St = at("custprops", r, s, $, _, b);
|
|
3954
|
+
St.forEach((t, e) => {
|
|
3955
|
+
t?.custom && Y(e);
|
|
3926
3956
|
});
|
|
3927
|
-
const
|
|
3928
|
-
if (
|
|
3929
|
-
const [t, e] =
|
|
3930
|
-
|
|
3957
|
+
const Ct = new Rt(), At = at("people", r, s, $, _, b);
|
|
3958
|
+
if (At.size > 0) {
|
|
3959
|
+
const [t, e] = At.entries().next().value;
|
|
3960
|
+
Ct.fromJSON(e?.persons), Y(t);
|
|
3931
3961
|
}
|
|
3932
3962
|
const Pt = (t) => {
|
|
3933
|
-
if (t) return
|
|
3963
|
+
if (t) return Ct.add(t).toJSON();
|
|
3934
3964
|
}, Ot = {
|
|
3935
3965
|
paramMap: L,
|
|
3936
|
-
getRefs:
|
|
3937
|
-
getRef:
|
|
3938
|
-
parsedRefs:
|
|
3939
|
-
readEmbeddedPart: (t, e) =>
|
|
3966
|
+
getRefs: et,
|
|
3967
|
+
getRef: ot,
|
|
3968
|
+
parsedRefs: z,
|
|
3969
|
+
readEmbeddedPart: (t, e) => ft(t, e),
|
|
3940
3970
|
addPerson: Pt,
|
|
3941
|
-
serializeElement:
|
|
3971
|
+
serializeElement: F,
|
|
3942
3972
|
onWarning: m
|
|
3943
|
-
}, Dt = [],
|
|
3944
|
-
if (L.set(
|
|
3945
|
-
const t = await W.getTextStream(n,
|
|
3973
|
+
}, Dt = [], _t = /* @__PURE__ */ new Map();
|
|
3974
|
+
if (L.set(Us, _t), n) {
|
|
3975
|
+
const t = await W.getTextStream(n, S);
|
|
3946
3976
|
if (t) {
|
|
3947
3977
|
const e = ((t, e) => {
|
|
3948
3978
|
let s = !1, o = !1, r = 0, n = "";
|
|
3949
|
-
const i = new
|
|
3979
|
+
const i = new Bs();
|
|
3950
3980
|
return {
|
|
3951
3981
|
onOpenTag: (t) => {
|
|
3952
|
-
const e =
|
|
3982
|
+
const e = Ms(t.name);
|
|
3953
3983
|
"t" === e ? s && 0 === r && (o = !0) : "si" === e ? (s = !0, n = "", i.reset(), r = 0) : "rPh" === e || "phoneticPr" === e ? r++ : s && 0 === r && i.onOpenTag(e, t.attributes);
|
|
3954
3984
|
},
|
|
3955
3985
|
onText: (t) => {
|
|
3956
3986
|
o && (n += t, i.onText(t));
|
|
3957
3987
|
},
|
|
3958
3988
|
onCloseTag: (e) => {
|
|
3959
|
-
const a =
|
|
3960
|
-
"t" === a ? o = !1 : "si" === a ? (t(
|
|
3989
|
+
const a = Ms(e.name);
|
|
3990
|
+
"t" === a ? o = !1 : "si" === a ? (t(k(n), i.take() ?? void 0), s = !1, n = "") : "rPh" === a || "phoneticPr" === a ? r > 0 && r-- : i.onCloseTag(a);
|
|
3961
3991
|
},
|
|
3962
3992
|
onError: (t) => {
|
|
3963
3993
|
e?.(`Error parsing shared strings: ${t?.message ?? t}`);
|
|
3964
3994
|
}
|
|
3965
3995
|
};
|
|
3966
3996
|
})((t, e) => {
|
|
3967
|
-
e &&
|
|
3997
|
+
e && _t.set(Dt.length, e), Dt.push(t);
|
|
3968
3998
|
}, (t) => {
|
|
3969
3999
|
m(t, n);
|
|
3970
4000
|
});
|
|
3971
4001
|
try {
|
|
3972
|
-
await
|
|
4002
|
+
await ss.parseStream(t, e, { xmlns: !1 });
|
|
3973
4003
|
} catch (t) {
|
|
3974
4004
|
throw new Error(`Error parsing shared strings: '${n}'`, { cause: t });
|
|
3975
4005
|
}
|
|
3976
4006
|
}
|
|
3977
4007
|
}
|
|
3978
|
-
|
|
3979
|
-
let
|
|
3980
|
-
const
|
|
3981
|
-
let
|
|
3982
|
-
const
|
|
3983
|
-
const e =
|
|
4008
|
+
p?.mark("shared-strings");
|
|
4009
|
+
let Nt = Dt.length;
|
|
4010
|
+
const $t = /* @__PURE__ */ new Map();
|
|
4011
|
+
let Vt = Nt;
|
|
4012
|
+
const Mt = (t) => {
|
|
4013
|
+
const e = $t.get(t);
|
|
3984
4014
|
if (void 0 !== e) return e;
|
|
3985
|
-
const s =
|
|
3986
|
-
return
|
|
3987
|
-
},
|
|
3988
|
-
r.slicersCache =
|
|
3989
|
-
const
|
|
4015
|
+
const s = Vt;
|
|
4016
|
+
return $t.set(t, Vt++), Dt.push(t), s;
|
|
4017
|
+
}, Bt = [];
|
|
4018
|
+
r.slicersCache = Bt;
|
|
4019
|
+
const Ft = W.getNames(), Wt = Ft.length;
|
|
3990
4020
|
for (let t = 0; t < Wt; t++) {
|
|
3991
|
-
const e =
|
|
3992
|
-
e && e.startsWith("xl/slicerCache") &&
|
|
4021
|
+
const e = Ft[t];
|
|
4022
|
+
e && e.startsWith("xl/slicerCache") && Bt.push(`/${e}`);
|
|
3993
4023
|
}
|
|
3994
|
-
const zt =
|
|
4024
|
+
const zt = at("slicersCache", r, s, $, _, Ot), Xt = /* @__PURE__ */ new Map();
|
|
3995
4025
|
zt.forEach((t, e) => {
|
|
3996
|
-
t?.cacheName && (t.cachePath = e,
|
|
3997
|
-
}), L.set("slicerCaches",
|
|
3998
|
-
const
|
|
3999
|
-
r.slicers =
|
|
4026
|
+
t?.cacheName && (t.cachePath = e, Xt.set(t.cacheName, t));
|
|
4027
|
+
}), L.set("slicerCaches", Xt);
|
|
4028
|
+
const qt = [];
|
|
4029
|
+
r.slicers = qt;
|
|
4000
4030
|
for (let t = 0; t < Wt; t++) {
|
|
4001
|
-
const e =
|
|
4002
|
-
e && e.startsWith("xl/slicers/") && e.endsWith(".xml") &&
|
|
4031
|
+
const e = Ft[t];
|
|
4032
|
+
e && e.startsWith("xl/slicers/") && e.endsWith(".xml") && qt.push(`/${e}`);
|
|
4003
4033
|
}
|
|
4004
|
-
const
|
|
4034
|
+
const Ut = {
|
|
4005
4035
|
getFile: s,
|
|
4006
4036
|
domParser: $,
|
|
4007
4037
|
getAddress: (t, e) => {
|
|
4008
|
-
const s =
|
|
4038
|
+
const s = ot(e, t, !1);
|
|
4009
4039
|
return "string" == typeof s ? s : null;
|
|
4010
4040
|
},
|
|
4011
4041
|
getBytes: (t, e) => {
|
|
4012
|
-
const o =
|
|
4042
|
+
const o = nt(e, t), r = o ? s(o.substring(1))?.content : void 0;
|
|
4013
4043
|
return r ? r.slice().buffer : null;
|
|
4014
4044
|
},
|
|
4015
4045
|
addFetched: (t, e) => {
|
|
@@ -4017,38 +4047,38 @@ var oo = {
|
|
|
4017
4047
|
source: { buffer: t },
|
|
4018
4048
|
fetchedFrom: e
|
|
4019
4049
|
});
|
|
4020
|
-
return s.addReference(
|
|
4050
|
+
return s.addReference(A), O.add(s), C.toResourceId(s);
|
|
4021
4051
|
},
|
|
4022
|
-
markAbsorbed:
|
|
4052
|
+
markAbsorbed: Y
|
|
4023
4053
|
}, ae = /* @__PURE__ */ new Map();
|
|
4024
|
-
for (const t of
|
|
4054
|
+
for (const t of U.getAll()) ae.set(t.structure, t.beginRead(Ut));
|
|
4025
4055
|
const le = ((t, e) => {
|
|
4026
4056
|
const s = (s) => {
|
|
4027
4057
|
const o = t(s);
|
|
4028
4058
|
return o ? e.parseFromString(new TextDecoder().decode(o.content), "text/xml").documentElement ?? null : null;
|
|
4029
|
-
}, o =
|
|
4059
|
+
}, o = oe(s(Jt), "s").map((t) => ({
|
|
4030
4060
|
t: t.getAttribute("t") ?? "",
|
|
4031
|
-
keys:
|
|
4032
|
-
})), r =
|
|
4033
|
-
const e =
|
|
4061
|
+
keys: re(t)
|
|
4062
|
+
})), r = oe(s(Zt), "rv").map((t) => {
|
|
4063
|
+
const e = oe(t, "fb")[0];
|
|
4034
4064
|
return {
|
|
4035
4065
|
s: parseInt(t.getAttribute("s") ?? "-1", 10),
|
|
4036
|
-
values:
|
|
4066
|
+
values: oe(t, "v").map((t) => t.textContent ?? ""),
|
|
4037
4067
|
fb: e ? e.textContent ?? "" : null
|
|
4038
4068
|
};
|
|
4039
|
-
}), n =
|
|
4040
|
-
const e =
|
|
4069
|
+
}), n = oe(s(Qt), "a").map((t) => {
|
|
4070
|
+
const e = ne(t), s = parseInt(t.getAttribute("r") ?? "", 10), o = parseInt(t.getAttribute("c") ?? "", 10), r = s > 0 ? s : e.length;
|
|
4041
4071
|
return {
|
|
4042
4072
|
rows: r,
|
|
4043
4073
|
columns: o > 0 ? o : Math.max(1, Math.ceil(e.length / Math.max(1, r))),
|
|
4044
4074
|
items: e
|
|
4045
4075
|
};
|
|
4046
|
-
}), i =
|
|
4076
|
+
}), i = oe(s(Yt), "s").map(re), a = s(te), l = oe(oe(a, "spbArrays")[0], "a").map(ne), c = oe(oe(a, "spbData")[0], "spb").map((t) => ({
|
|
4047
4077
|
s: parseInt(t.getAttribute("s") ?? "-1", 10),
|
|
4048
|
-
values:
|
|
4049
|
-
})), h = s(
|
|
4050
|
-
for (const t of
|
|
4051
|
-
const p = s(
|
|
4078
|
+
values: oe(t, "v").map((t) => t.textContent ?? "")
|
|
4079
|
+
})), h = s(ee), u = ie(oe(oe(h, "global")[0], "keyFlags")[0]), d = /* @__PURE__ */ new Map();
|
|
4080
|
+
for (const t of oe(oe(h, "types")[0], "type")) d.set(t.getAttribute("name") ?? "", ie(oe(t, "keyFlags")[0]));
|
|
4081
|
+
const p = s(se), f = oe(oe(p, "dxfs")[0], "dxf").map((t) => oe(t, "numFmt")[0]?.getAttribute("formatCode") ?? null), g = oe(oe(p, "richProperties")[0], "rPr").map((t) => t.getAttribute("n") ?? "");
|
|
4052
4082
|
return {
|
|
4053
4083
|
structures: o,
|
|
4054
4084
|
values: r,
|
|
@@ -4058,9 +4088,9 @@ var oo = {
|
|
|
4058
4088
|
bags: c,
|
|
4059
4089
|
globalKeyFlags: u,
|
|
4060
4090
|
typeKeyFlags: d,
|
|
4061
|
-
richStyles:
|
|
4091
|
+
richStyles: oe(oe(p, "richStyles")[0], "rSty").map((t) => {
|
|
4062
4092
|
const e = /* @__PURE__ */ new Map();
|
|
4063
|
-
for (const s of
|
|
4093
|
+
for (const s of oe(t, "rpv")) {
|
|
4064
4094
|
const t = g[parseInt(s.getAttribute("i") ?? "-1", 10)];
|
|
4065
4095
|
t && e.set(t, s.textContent ?? "");
|
|
4066
4096
|
}
|
|
@@ -4077,38 +4107,50 @@ var oo = {
|
|
|
4077
4107
|
});
|
|
4078
4108
|
L.set("richData", le.values.map((t, e) => ce.cellValue(e)));
|
|
4079
4109
|
for (let t = 0; t < Wt; t++) {
|
|
4080
|
-
const e =
|
|
4081
|
-
e.startsWith("xl/richData/") && !e.includes("/_rels/") &&
|
|
4110
|
+
const e = Ft[t];
|
|
4111
|
+
e.startsWith("xl/richData/") && !e.includes("/_rels/") && Y(e);
|
|
4082
4112
|
}
|
|
4083
|
-
const he =
|
|
4113
|
+
const he = at("themes", r, s, $, _, Ot);
|
|
4084
4114
|
let ue = null;
|
|
4085
4115
|
if (he && he.entries) {
|
|
4086
4116
|
let t = he.entries().next();
|
|
4087
4117
|
t?.value?.[1] && (ue = t.value[1]);
|
|
4088
4118
|
}
|
|
4089
|
-
const de = new
|
|
4090
|
-
let pe =
|
|
4091
|
-
pe && (pe = JSON.parse(
|
|
4092
|
-
const fe =
|
|
4093
|
-
L.set(
|
|
4119
|
+
const de = new jt(ue);
|
|
4120
|
+
let pe = at("styles", r, s, $, _, Ot).entries().next()?.value?.[1];
|
|
4121
|
+
pe && (pe = JSON.parse(bt.JSONStableStringify(pe)));
|
|
4122
|
+
const fe = at("workbooks", r, s, $, _, Ot);
|
|
4123
|
+
L.set(qs, !0 === fe.entries().next().value?.[1]?.date1904), "none" !== (h.calcOnLoad ?? l) && L.set(Xs, ((t, e) => {
|
|
4124
|
+
const s = /* @__PURE__ */ new Set();
|
|
4125
|
+
if (t) for (let e = 0; e < t.length; e++) s.add(String(t[e]?.name).toUpperCase());
|
|
4126
|
+
if (e) for (let t = 0; t < e.length; t++) try {
|
|
4127
|
+
const o = e[t](() => {
|
|
4128
|
+
throw new Error("Not evaluating.");
|
|
4129
|
+
}, (t, e, o, r) => {
|
|
4130
|
+
for (const t of Object.keys(r)) s.add(t.toUpperCase());
|
|
4131
|
+
}, /* @__PURE__ */ new Map());
|
|
4132
|
+
for (const t of o.keys()) s.add(t.toUpperCase());
|
|
4133
|
+
} catch {}
|
|
4134
|
+
return (t) => s.has(t) || Et.has(t);
|
|
4135
|
+
})(fe.entries().next().value?.[1]?.names, h.functions)), p?.mark("side-parts-json"), await Promise.all(q);
|
|
4094
4136
|
{
|
|
4095
|
-
const t = fe.entries().next().value?.[1],
|
|
4096
|
-
for (let t = 0; t <
|
|
4097
|
-
const
|
|
4098
|
-
if ("macro" ===
|
|
4099
|
-
|
|
4137
|
+
const t = fe.entries().next().value?.[1], s = G(t?.names), o = t?.sheets ?? [];
|
|
4138
|
+
for (let t = 0; t < o.length; t++) {
|
|
4139
|
+
const r = o[t], n = c(r);
|
|
4140
|
+
if ("macro" === r?.kind && n?.part.xml) {
|
|
4141
|
+
n.part.xml = e(n.part.xml, Dt);
|
|
4100
4142
|
continue;
|
|
4101
4143
|
}
|
|
4102
|
-
const
|
|
4103
|
-
|
|
4144
|
+
const i = Q(r);
|
|
4145
|
+
i && tt(i, s);
|
|
4104
4146
|
}
|
|
4105
|
-
const
|
|
4106
|
-
if (
|
|
4107
|
-
const
|
|
4108
|
-
"string" == typeof
|
|
4147
|
+
const r = t?.names;
|
|
4148
|
+
if (r) for (let t = 0; t < r.length; t++) {
|
|
4149
|
+
const e = r[t]?.ref;
|
|
4150
|
+
"string" == typeof e && (r[t].ref = s.readDetached(e));
|
|
4109
4151
|
}
|
|
4110
4152
|
}
|
|
4111
|
-
y && w > 0 && (y(v, v), await new Promise((t) => setTimeout(t, 0))),
|
|
4153
|
+
y && w > 0 && (y(v, v), await new Promise((t) => setTimeout(t, 0))), p?.mark("sheets");
|
|
4112
4154
|
const ge = {
|
|
4113
4155
|
...fe.entries().next().value?.[1],
|
|
4114
4156
|
styles: pe,
|
|
@@ -4123,16 +4165,16 @@ var oo = {
|
|
|
4123
4165
|
} else r[t] = o;
|
|
4124
4166
|
}
|
|
4125
4167
|
};
|
|
4126
|
-
if (n(t,
|
|
4168
|
+
if (n(t, lo), n(e, co), s) {
|
|
4127
4169
|
const t = [];
|
|
4128
4170
|
for (const e of s) {
|
|
4129
|
-
const s =
|
|
4171
|
+
const s = uo(e);
|
|
4130
4172
|
s ? t.push(s) : o?.(`The custom document property '${e.key}' holds a value of a kind that is not read (${e.kind ? "vt:" + e.kind : "none"}); it was dropped.`, "xlsx.docProps.custom.kind");
|
|
4131
4173
|
}
|
|
4132
4174
|
t.length > 0 && (r.custom = t);
|
|
4133
4175
|
}
|
|
4134
4176
|
return Object.keys(r).length > 0 ? r : void 0;
|
|
4135
|
-
})(
|
|
4177
|
+
})(gt.values().next().value?.properties, mt.values().next().value?.properties, St.values().next().value?.custom, (t, e) => {
|
|
4136
4178
|
m(t, "docProps/custom.xml", e);
|
|
4137
4179
|
});
|
|
4138
4180
|
me && (ge.properties = me), ((t, e) => {
|
|
@@ -4141,17 +4183,17 @@ var oo = {
|
|
|
4141
4183
|
if (!s) return;
|
|
4142
4184
|
const o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
4143
4185
|
for (const s of t.sheets ?? []) {
|
|
4144
|
-
const t =
|
|
4186
|
+
const t = Q(s);
|
|
4145
4187
|
if (!t) continue;
|
|
4146
4188
|
const n = /* @__PURE__ */ new Set();
|
|
4147
|
-
|
|
4189
|
+
go(t.cols) || n.add(0);
|
|
4148
4190
|
for (const e of t.directStyles ?? []) n.add(Array.isArray(e) ? e[1] : e.v);
|
|
4149
4191
|
for (const e of t.rows ?? []) {
|
|
4150
|
-
const t =
|
|
4192
|
+
const t = fo(e);
|
|
4151
4193
|
void 0 !== t && n.add(t);
|
|
4152
4194
|
}
|
|
4153
4195
|
for (const e of t.cols ?? []) {
|
|
4154
|
-
const t =
|
|
4196
|
+
const t = fo(e);
|
|
4155
4197
|
void 0 !== t && n.add(t);
|
|
4156
4198
|
}
|
|
4157
4199
|
let i = !1;
|
|
@@ -4169,38 +4211,38 @@ var oo = {
|
|
|
4169
4211
|
}
|
|
4170
4212
|
if (0 === o.size) return;
|
|
4171
4213
|
const n = s.direct ?? (s.direct = []);
|
|
4172
|
-
for (const t of o) 0 !== t &&
|
|
4173
|
-
for (const t of r) 0 !== t &&
|
|
4214
|
+
for (const t of o) 0 !== t && mo(n[t] ?? (n[t] = {}), !0);
|
|
4215
|
+
for (const t of r) 0 !== t && mo(n[t] ?? (n[t] = {}), !1);
|
|
4174
4216
|
if (o.has(0)) {
|
|
4175
|
-
const t = s.named ?? (s.named = []), e =
|
|
4217
|
+
const t = s.named ?? (s.named = []), e = It.BuiltInName.Normal.toLowerCase();
|
|
4176
4218
|
let o = t.find((t) => t.name?.toLowerCase() === e);
|
|
4177
4219
|
o || (o = {
|
|
4178
|
-
name:
|
|
4220
|
+
name: It.BuiltInName.Normal,
|
|
4179
4221
|
style: {}
|
|
4180
|
-
}, t.push(o)),
|
|
4222
|
+
}, t.push(o)), mo(o.style, !0);
|
|
4181
4223
|
}
|
|
4182
|
-
})(ge, L.get(
|
|
4224
|
+
})(ge, L.get(po)), ((t) => {
|
|
4183
4225
|
const e = {
|
|
4184
4226
|
colStart: 0,
|
|
4185
4227
|
rowStart: 0,
|
|
4186
|
-
colEnd:
|
|
4187
|
-
rowEnd:
|
|
4228
|
+
colEnd: M,
|
|
4229
|
+
rowEnd: Z
|
|
4188
4230
|
};
|
|
4189
4231
|
for (const s of t.sheets ?? []) {
|
|
4190
|
-
const t =
|
|
4232
|
+
const t = Q(s);
|
|
4191
4233
|
if (!t) continue;
|
|
4192
4234
|
const o = [];
|
|
4193
|
-
if (
|
|
4235
|
+
if (vo(t.cols, !0, e, o), vo(t.rows, !1, e, o), 0 === o.length) continue;
|
|
4194
4236
|
const r = [];
|
|
4195
4237
|
for (const [e, s] of t.directStyles ?? []) r.push({
|
|
4196
|
-
...
|
|
4238
|
+
...Tt.fastStringToRange(e),
|
|
4197
4239
|
value: {
|
|
4198
4240
|
kind: 0,
|
|
4199
4241
|
index: s
|
|
4200
4242
|
}
|
|
4201
4243
|
});
|
|
4202
4244
|
r.push(...o);
|
|
4203
|
-
const n = [], i = new
|
|
4245
|
+
const n = [], i = new vt.IteratorInstance(r, { axis: wt.Column });
|
|
4204
4246
|
for (let t = i.next(); !t.done; t = i.next()) {
|
|
4205
4247
|
const s = t.value.overlaps;
|
|
4206
4248
|
let o;
|
|
@@ -4214,13 +4256,13 @@ var oo = {
|
|
|
4214
4256
|
}
|
|
4215
4257
|
o = t ?? e ?? r;
|
|
4216
4258
|
}
|
|
4217
|
-
n.push([
|
|
4259
|
+
n.push([Tt.rangeToString(t.value.range, e), o.index]);
|
|
4218
4260
|
}
|
|
4219
4261
|
n.length > 0 ? t.directStyles = n : delete t.directStyles;
|
|
4220
4262
|
}
|
|
4221
4263
|
})(ge);
|
|
4222
4264
|
{
|
|
4223
|
-
const t = L.get(
|
|
4265
|
+
const t = L.get(bo);
|
|
4224
4266
|
if (t) ((t, e, s) => {
|
|
4225
4267
|
if (!e || 0 === e.size || !s) return;
|
|
4226
4268
|
const o = (t) => {
|
|
@@ -4229,7 +4271,7 @@ var oo = {
|
|
|
4229
4271
|
return void 0 !== o ? s.controls[o] ?? null : null;
|
|
4230
4272
|
};
|
|
4231
4273
|
for (const e of t.sheets ?? []) {
|
|
4232
|
-
const t =
|
|
4274
|
+
const t = Q(e);
|
|
4233
4275
|
if (!t) continue;
|
|
4234
4276
|
const s = /* @__PURE__ */ new Map();
|
|
4235
4277
|
for (const e of t.directStyles ?? []) {
|
|
@@ -4240,7 +4282,7 @@ var oo = {
|
|
|
4240
4282
|
i || (i = {
|
|
4241
4283
|
control: r,
|
|
4242
4284
|
addresses: []
|
|
4243
|
-
}, s.set(n, i)),
|
|
4285
|
+
}, s.set(n, i)), xo(t, i.addresses);
|
|
4244
4286
|
}
|
|
4245
4287
|
if (0 === s.size) continue;
|
|
4246
4288
|
const r = [...t.cellControls ?? []];
|
|
@@ -4250,16 +4292,16 @@ var oo = {
|
|
|
4250
4292
|
});
|
|
4251
4293
|
t.cellControls = r;
|
|
4252
4294
|
}
|
|
4253
|
-
})(ge, t,
|
|
4295
|
+
})(ge, t, at("featurePropertyBag", r, s, $, _, Ot).values().next().value?.featurePropertyBag);
|
|
4254
4296
|
}
|
|
4255
4297
|
{
|
|
4256
4298
|
const t = /* @__PURE__ */ new Map();
|
|
4257
|
-
|
|
4299
|
+
at("slicers", r, s, $, _, Ot).forEach((e, s) => {
|
|
4258
4300
|
e?.slicers && t.set(s, e.slicers);
|
|
4259
4301
|
}), function(t, e) {
|
|
4260
4302
|
const s = t.sheets ?? [], o = /* @__PURE__ */ new Map();
|
|
4261
4303
|
for (let t = 0; t < s.length; t++) {
|
|
4262
|
-
const e = s[t], r =
|
|
4304
|
+
const e = s[t], r = Q(e)?.tables ?? [];
|
|
4263
4305
|
for (let t = 0; t < r.length; t++) {
|
|
4264
4306
|
const e = r[t], s = Array.isArray(e) ? e[1] : e?.v;
|
|
4265
4307
|
if (!s?.id) continue;
|
|
@@ -4272,7 +4314,7 @@ var oo = {
|
|
|
4272
4314
|
}
|
|
4273
4315
|
const r = /* @__PURE__ */ new Set();
|
|
4274
4316
|
for (let t = 0; t < s.length; t++) {
|
|
4275
|
-
const n = s[t], i =
|
|
4317
|
+
const n = s[t], i = Q(n);
|
|
4276
4318
|
if (!i) continue;
|
|
4277
4319
|
const a = i.slicers, l = i.movables;
|
|
4278
4320
|
if (a && l) for (let t = l.length - 1; t >= 0; t--) {
|
|
@@ -4280,8 +4322,8 @@ var oo = {
|
|
|
4280
4322
|
if ("slicer" !== s?.type || s.json?.source) continue;
|
|
4281
4323
|
const n = s.name ?? "", i = a[n];
|
|
4282
4324
|
if (!i?.tableId) continue;
|
|
4283
|
-
const c = o.get(String(i.tableId)), h = c ?
|
|
4284
|
-
c && h ? (s.json =
|
|
4325
|
+
const c = o.get(String(i.tableId)), h = c ? Kt(c.columns, i.columnId) : null;
|
|
4326
|
+
c && h ? (s.json = Gt(i, s.json, kt.structuredReference(c.name, h.name)), r.add(n), i.cachePath && e.markAbsorbed(i.cachePath)) : (e.warn("A slicer names no table; it was not imported.", "xlsx.slicer.cacheDefinition"), l.splice(t, 1));
|
|
4285
4327
|
}
|
|
4286
4328
|
delete i.slicers;
|
|
4287
4329
|
}
|
|
@@ -4293,7 +4335,7 @@ var oo = {
|
|
|
4293
4335
|
warn: (t, e) => {
|
|
4294
4336
|
m(t, "xl/slicers", e);
|
|
4295
4337
|
},
|
|
4296
|
-
markAbsorbed:
|
|
4338
|
+
markAbsorbed: Y,
|
|
4297
4339
|
slicerParts: t
|
|
4298
4340
|
});
|
|
4299
4341
|
}
|
|
@@ -4301,15 +4343,15 @@ var oo = {
|
|
|
4301
4343
|
...ge.calc ?? {},
|
|
4302
4344
|
legacyIntersect: !0
|
|
4303
4345
|
}, Dt.length > 0 && (ge.strings = Dt);
|
|
4304
|
-
const be =
|
|
4346
|
+
const be = Ct.toJSON();
|
|
4305
4347
|
be && be.length > 0 && (ge.people = be);
|
|
4306
4348
|
const xe = W.getEntry("xl/vbaProject.bin");
|
|
4307
4349
|
if (xe) try {
|
|
4308
|
-
const { VBAProject: t } = await import("./
|
|
4350
|
+
const { VBAProject: t } = await import("./TPq4Re0SQgONsX_u.mjs"), e = t.extract(xe);
|
|
4309
4351
|
if (e) {
|
|
4310
4352
|
const s = /* @__PURE__ */ new Map();
|
|
4311
4353
|
for (const t of ge.sheets ?? []) {
|
|
4312
|
-
const e =
|
|
4354
|
+
const e = Q(t), o = e?.codeName;
|
|
4313
4355
|
o && s.set(o, e);
|
|
4314
4356
|
}
|
|
4315
4357
|
for (const o of e.modules) {
|
|
@@ -4325,81 +4367,21 @@ var oo = {
|
|
|
4325
4367
|
} catch (t) {
|
|
4326
4368
|
g.push([`Error extracting VBA: ${t?.message ?? t}`, "xl/vbaProject.bin"]);
|
|
4327
4369
|
}
|
|
4328
|
-
const ye = L.get("calcId"), ve = void 0 === ye || !(Number(ye) >= 191029), we =
|
|
4329
|
-
...
|
|
4370
|
+
const ye = L.get("calcId"), ve = void 0 === ye || !(Number(ye) >= 191029), we = h.calcOnLoad ?? ("auto" === l && ve ? "full" : l), Te = {
|
|
4371
|
+
...h,
|
|
4330
4372
|
calcOnLoad: we,
|
|
4331
4373
|
resources: T,
|
|
4332
4374
|
json: ge
|
|
4333
4375
|
};
|
|
4334
4376
|
if (void 0 === Te.disableLoadAutoFit) {
|
|
4335
|
-
const t = L.get(
|
|
4336
|
-
Te.disableLoadAutoFit = !!t?.declared && t.normalIsThemeFont && await
|
|
4337
|
-
}
|
|
4338
|
-
|
|
4339
|
-
const Se = new
|
|
4340
|
-
if (
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
for (let o = 0; o < e.length; o++) {
|
|
4344
|
-
const r = e[o], n = s[o], i = u(r);
|
|
4345
|
-
i && n?.isIWorksheet && t.set(i, n);
|
|
4346
|
-
}
|
|
4347
|
-
((t, e, s) => {
|
|
4348
|
-
if (0 === e.length) return;
|
|
4349
|
-
const o = t.getCalculation().getFunctions(), r = /* @__PURE__ */ new Map(), n = (t) => {
|
|
4350
|
-
let e = r.get(t);
|
|
4351
|
-
return void 0 === e && (e = null !== o.getByName(t), r.set(t, e)), e;
|
|
4352
|
-
}, i = /* @__PURE__ */ new Map();
|
|
4353
|
-
for (const t of e) {
|
|
4354
|
-
let e = i.get(t.sheet);
|
|
4355
|
-
e || (e = [], i.set(t.sheet, e)), e.push(t);
|
|
4356
|
-
}
|
|
4357
|
-
for (const [t, e] of i) {
|
|
4358
|
-
const o = s.get(t);
|
|
4359
|
-
if (!o) continue;
|
|
4360
|
-
const r = (t, e) => `${t},${e}`, i = /* @__PURE__ */ new Set();
|
|
4361
|
-
for (const t of e) null === t.formula && i.add(r(t.rowIndex, t.colIndex));
|
|
4362
|
-
for (const t of e) {
|
|
4363
|
-
if (null === t.formula) continue;
|
|
4364
|
-
const e = Cs(t.formula);
|
|
4365
|
-
let s = !0;
|
|
4366
|
-
for (const t of e) if (!n(t)) {
|
|
4367
|
-
s = !1;
|
|
4368
|
-
break;
|
|
4369
|
-
}
|
|
4370
|
-
if (!s) continue;
|
|
4371
|
-
const a = [], l = [[t.rowIndex, t.colIndex]], c = /* @__PURE__ */ new Set([r(t.rowIndex, t.colIndex)]);
|
|
4372
|
-
for (; l.length > 0;) {
|
|
4373
|
-
const [t, e] = l.pop(), s = [
|
|
4374
|
-
[t + 1, e],
|
|
4375
|
-
[t - 1, e],
|
|
4376
|
-
[t, e + 1],
|
|
4377
|
-
[t, e - 1]
|
|
4378
|
-
];
|
|
4379
|
-
for (const [t, e] of s) {
|
|
4380
|
-
const s = r(t, e);
|
|
4381
|
-
!c.has(s) && i.has(s) && (c.add(s), a.push([t, e]), l.push([t, e]));
|
|
4382
|
-
}
|
|
4383
|
-
}
|
|
4384
|
-
for (const [t, e] of a) i.delete(r(t, e)), o.getRange({
|
|
4385
|
-
rowStart: t,
|
|
4386
|
-
colStart: e,
|
|
4387
|
-
rowEnd: t,
|
|
4388
|
-
colEnd: e
|
|
4389
|
-
}).clear();
|
|
4390
|
-
o.getRange({
|
|
4391
|
-
rowStart: t.rowIndex,
|
|
4392
|
-
colStart: t.colIndex,
|
|
4393
|
-
rowEnd: t.rowIndex,
|
|
4394
|
-
colEnd: t.colIndex
|
|
4395
|
-
}).setValue("=" + t.formula);
|
|
4396
|
-
}
|
|
4397
|
-
}
|
|
4398
|
-
})(Se, B, t);
|
|
4399
|
-
}
|
|
4400
|
-
if (D.forEach((t) => {
|
|
4401
|
-
t.deleteReference(I);
|
|
4402
|
-
}), A.endPersist(), d) {
|
|
4377
|
+
const t = L.get(rt);
|
|
4378
|
+
Te.disableLoadAutoFit = !!t?.declared && t.normalIsThemeFont && await K(t.faces);
|
|
4379
|
+
}
|
|
4380
|
+
p?.mark("json-assembled");
|
|
4381
|
+
const Se = new Ht(Te);
|
|
4382
|
+
if (p?.mark("workbook-constructed"), O.forEach((t) => {
|
|
4383
|
+
t.deleteReference(A);
|
|
4384
|
+
}), C.endPersist(), d) {
|
|
4403
4385
|
t(Se);
|
|
4404
4386
|
const e = /* @__PURE__ */ new Map();
|
|
4405
4387
|
let s = 0;
|
|
@@ -4420,10 +4402,10 @@ var oo = {
|
|
|
4420
4402
|
};
|
|
4421
4403
|
e.set(t, n), s += o.byteLength;
|
|
4422
4404
|
}
|
|
4423
|
-
if (s > 67108864) g.push([`Source package too large to retain (${s} bytes, limit ${
|
|
4405
|
+
if (s > 67108864) g.push([`Source package too large to retain (${s} bytes, limit ${E}); unmodeled parts will be dropped on save.`, "SourcePackage"]);
|
|
4424
4406
|
else if (e.size > 0) {
|
|
4425
|
-
const s = new
|
|
4426
|
-
|
|
4407
|
+
const s = new I(e, J);
|
|
4408
|
+
R(Se, s);
|
|
4427
4409
|
let o = Se.getWorksheets().getItems();
|
|
4428
4410
|
const r = Se.getTransactions().addListener({ onCommitEnd: (t) => {
|
|
4429
4411
|
const e = t.getOperation()?.name;
|
|
@@ -4444,12 +4426,12 @@ var oo = {
|
|
|
4444
4426
|
t.has(n) || (t.add(n), x.onWarning(s, o));
|
|
4445
4427
|
}
|
|
4446
4428
|
}
|
|
4447
|
-
return
|
|
4429
|
+
return p && !0 === a && console.table(p.toTable()), await Se.whenFontsReady(), Se;
|
|
4448
4430
|
} catch (t) {
|
|
4449
4431
|
let e = "Unable to parse XLSX.";
|
|
4450
|
-
throw t instanceof
|
|
4432
|
+
throw t instanceof $t && (e = "Unable to open XLSX. There are too many rows or columns."), new Error(e, { cause: t });
|
|
4451
4433
|
} finally {
|
|
4452
4434
|
await W.close().catch(() => {});
|
|
4453
4435
|
}
|
|
4454
4436
|
};
|
|
4455
|
-
export {
|
|
4437
|
+
export { Ks as i, bo as n, po as r, Eo as readXLSX, To as t };
|