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