@sheetxl/io-xlsx 0.8.0-beta.11 → 0.8.0-beta.12
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/{Cv3R6fGatARKedSn.mjs → 9dwUocbOsJuAcmKn.mjs} +2514 -2058
- package/browser/esm/{CZ9I80og75SDRjv0.mjs → BIvDjK4Zl8bWRgl8.mjs} +2 -2
- package/browser/esm/{DatIA9fZbEPjW4bh.mjs → CcH5ITJFTMVWUJO9.mjs} +1810 -1294
- package/browser/esm/{yveeVJ6hKDI5KDEz.mjs → D8k22TSWPd_RHEpj.mjs} +1182 -1002
- package/browser/esm/{DICL6ecj9BdJv8aX.mjs → DKnOwucZq4z9_-r-.mjs} +4 -4
- package/browser/esm/{Bs0EzhdU8WgGfPzf.mjs → DO75RoAQTgMuVzXv.mjs} +2 -2
- package/browser/esm/{BiDqExNXiY7ykk8E.mjs → DVLJTjJCGqrJUa8c.mjs} +200 -199
- package/browser/esm/{CLWsOc6DO8l1G_LF.mjs → DeMZN_qj__PKo4Wh.mjs} +816 -764
- package/browser/esm/{CuAXx5i4uqTz-mMY.mjs → DsppUz-14Z7ti9i3.mjs} +1 -1
- package/browser/esm/{CzFYJPxmLyKgEKF0.mjs → aUBXbTh2r0u3x4Xo.mjs} +2 -2
- package/browser/esm/index.mjs +2 -2
- package/node/esm/{ipiyzn5Pfohw2afB.mjs → BmIIQODk4dBVIXA4.mjs} +1280 -1096
- package/node/esm/{CxlSbH7mmnEEsqmX.mjs → C-e5AO_4TnGywT-m.mjs} +1 -1
- package/node/esm/{DScqM1V4wPntNP6-.mjs → C78E45n6j2E8rruH.mjs} +2044 -1585
- package/node/esm/{Bpqm_PpGLpdjL47-.mjs → CDKm5s3JE_d99TJw.mjs} +242 -241
- package/node/esm/{CAJxmJdobUbzpUz5.mjs → DCaAOfuW-w_dx_qd.mjs} +2 -2
- package/node/esm/{fopiRR7OiVoEiF7B.mjs → DSgxL0sBZtWMydVl.mjs} +2 -2
- package/node/esm/DXusvwW73FUDSyvD.mjs +6367 -0
- package/node/esm/{B9Zn6H1RV07Ob377.mjs → DsyuWxk3bdGhJUQN.mjs} +512 -460
- package/node/esm/index.mjs +4 -4
- package/package.json +3 -3
- package/types/src/DataTableFormula.d.ts +36 -0
- package/types/src/chart/ChartSpaceXml.d.ts +2 -1
- package/types/src/chart/_chartCodecs.d.ts +2 -0
- package/types/src/reader/CellControls.d.ts +18 -0
- package/types/src/reader/LibreOfficeDataTable.d.ts +3 -2
- package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +1 -1
- package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +27 -0
- package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +6 -0
- package/types/src/reader/domVisitors/index.d.ts +2 -4
- package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +1 -0
- package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +14 -3
- package/types/src/richValue/ErrorRichValueHandler.d.ts +22 -0
- package/types/src/richValue/IRichValueHandler.d.ts +109 -0
- package/types/src/richValue/LocalImageRichValueHandler.d.ts +18 -0
- package/types/src/richValue/RichDataParts.d.ts +69 -0
- package/types/src/richValue/RichRecordWriter.d.ts +61 -0
- package/types/src/richValue/RichValueHandlers.d.ts +25 -0
- package/types/src/richValue/RichValueResolver.d.ts +54 -0
- package/types/src/richValue/WebImageRichValueHandler.d.ts +42 -0
- package/types/src/richValue/index.d.ts +7 -0
- package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +18 -0
- package/types/src/writer/emitters/RichValuePartsEmitters.d.ts +36 -0
- package/types/src/writer/emitters/RichValueRelEmitter.d.ts +12 -0
- package/types/src/writer/emitters/RichValueStructureEmitter.d.ts +4 -3
- package/types/src/writer/emitters/RichValueTypesEmitter.d.ts +3 -2
- package/types/src/writer/emitters/RichValueWebImageEmitter.d.ts +24 -0
- package/types/src/writer/emitters/SlicerEmitter.d.ts +5 -2
- package/types/src/writer/emitters/StylesEmitter.d.ts +2 -0
- package/types/src/writer/utils/CellControlComplements.d.ts +29 -0
- package/types/src/writer/utils/RichValueCollector.d.ts +81 -129
- package/types/src/writer/utils/SheetStyleLayout.d.ts +18 -5
- package/node/esm/DD-yXSBzvDYy0TX5.mjs +0 -5842
- package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts +0 -7
- package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts +0 -6
|
@@ -1,14 +1,14 @@
|
|
|
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.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { A as e, At as t, Ct as n, D as r, Dt as i, Et as a, F as o,
|
|
8
|
-
import { n as pe, r as me } from "./
|
|
9
|
-
import { a as he, o as ge, r as _e } from "./
|
|
10
|
-
import { CommonUtils as
|
|
11
|
-
import { AddressUtils as
|
|
7
|
+
import { A as e, At as t, Ct as n, D as r, Dt as i, Et as a, F as o, Gn as s, Gt as c, I as l, It as u, Kn as d, Kt as f, L as p, Ln as m, M as h, N as g, O as ee, Ot as _, P as v, Pt as te, R as y, Tt as b, bn as x, et as ne, g as S, j as C, k as re, qt as w, r as ie, rt as ae, st as oe, t as se, tt as ce, wt as T, xt as le, yn as E, yt as ue, z as de } from "./9dwUocbOsJuAcmKn.mjs";
|
|
8
|
+
import { i as fe, n as pe, r as me } from "./D8k22TSWPd_RHEpj.mjs";
|
|
9
|
+
import { a as he, o as ge, r as _e } from "./DeMZN_qj__PKo4Wh.mjs";
|
|
10
|
+
import { CommonUtils as D } from "@sheetxl/utils";
|
|
11
|
+
import { AddressUtils as O, FormulaError as ve, IBorders as k, ICellStyle as A, ICondition as j, IFill as M, IFont as N, IRange as ye, IShape as P, ISlicerStyle as F, ITextFrame as I, ShapeStyleUtils as L, Sort as R, Tuple as be } from "@sheetxl/sdk";
|
|
12
12
|
var xe = class {
|
|
13
13
|
constructor(e) {
|
|
14
14
|
this.list = e;
|
|
@@ -41,8 +41,8 @@ var xe = class {
|
|
|
41
41
|
}, we = (e) => {
|
|
42
42
|
let t = parseFloat(e);
|
|
43
43
|
return isNaN(t) ? null : t;
|
|
44
|
-
}, Te = /* @__PURE__ */ new Map(),
|
|
45
|
-
constructor(e, t, n, r, i, a = null, o =
|
|
44
|
+
}, Te = /* @__PURE__ */ new Map(), z = class {
|
|
45
|
+
constructor(e, t, n, r, i, a = null, o = D.EmptyObject) {
|
|
46
46
|
this._fileLocation = "";
|
|
47
47
|
let s = (e, t, n) => o?.getRef?.(e, t, n, o?.parsedRefs), c = (e) => o?.getRefs?.(e, o?.parsedRefs);
|
|
48
48
|
this._parent = e, this.sharedShared = t, this.currentPath = n, this.elemRoot = r, this.jsonRoot = i, e ? (this._fileLocation = e._fileLocation, this._getRef = e._getRef, this._getRefs = e._getRefs, this._serializeElement = e._serializeElement, this._readEmbeddedPart = e._readEmbeddedPart) : (a && (this._fileLocation = a), o?.getRef && (this._getRef = s), o?.getRefs && (this._getRefs = c), this._onWarning = o?.onWarning, this._addPerson = o?.addPerson, this._serializeElement = o?.serializeElement, this._readEmbeddedPart = o?.readEmbeddedPart);
|
|
@@ -130,10 +130,10 @@ var xe = class {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
getFromPath(e, t) {
|
|
133
|
-
return
|
|
133
|
+
return D.getFromPath(e, t);
|
|
134
134
|
}
|
|
135
135
|
setToPath(e, t, n) {
|
|
136
|
-
return
|
|
136
|
+
return D.setToPath(e, t, n);
|
|
137
137
|
}
|
|
138
138
|
getValAttrAsString(e, t) {
|
|
139
139
|
let n = this.evaluate(e, t);
|
|
@@ -173,7 +173,7 @@ var xe = class {
|
|
|
173
173
|
}
|
|
174
174
|
this.setToPath(n, r, a);
|
|
175
175
|
}
|
|
176
|
-
},
|
|
176
|
+
}, B = (e, t) => {
|
|
177
177
|
let n = [], r = e.childNodes, i = r.length;
|
|
178
178
|
for (let e = 0; e < i; e++) {
|
|
179
179
|
let i = r.item(e);
|
|
@@ -184,8 +184,8 @@ var xe = class {
|
|
|
184
184
|
["fillRef", "fill"],
|
|
185
185
|
["lnRef", "stroke"],
|
|
186
186
|
["effectRef", "effect"]
|
|
187
|
-
],
|
|
188
|
-
let n = new
|
|
187
|
+
], V = (e, t) => {
|
|
188
|
+
let n = new h(), r = {};
|
|
189
189
|
for (let [i, a] of Ee) {
|
|
190
190
|
let o = e.evaluate(i, t);
|
|
191
191
|
if (!o) continue;
|
|
@@ -198,7 +198,7 @@ var xe = class {
|
|
|
198
198
|
a && (t.color = a), r.font = t;
|
|
199
199
|
}
|
|
200
200
|
return r;
|
|
201
|
-
},
|
|
201
|
+
}, H = class {
|
|
202
202
|
visit(e, t, n) {
|
|
203
203
|
if (!t) return;
|
|
204
204
|
let r = e.evaluate("*/cNvPr", t);
|
|
@@ -254,7 +254,7 @@ var xe = class {
|
|
|
254
254
|
readStyleRefs(e, t, n) {
|
|
255
255
|
let r = e.evaluate("style", t);
|
|
256
256
|
if (!r) return void (n.style = null);
|
|
257
|
-
let i =
|
|
257
|
+
let i = V(e, r), a = L.withoutDefaultStyleRefs({
|
|
258
258
|
...n,
|
|
259
259
|
style: i
|
|
260
260
|
});
|
|
@@ -266,7 +266,7 @@ var xe = class {
|
|
|
266
266
|
let n = {};
|
|
267
267
|
for (let e = 0; e < t.length; e++) {
|
|
268
268
|
let r = t.item(e);
|
|
269
|
-
r.name.startsWith("xmlns") || (n[r.localName ?? r.name] =
|
|
269
|
+
r.name.startsWith("xmlns") || (n[r.localName ?? r.name] = f(r.value));
|
|
270
270
|
}
|
|
271
271
|
return Object.keys(n).length > 0 ? n : void 0;
|
|
272
272
|
}
|
|
@@ -280,16 +280,16 @@ var xe = class {
|
|
|
280
280
|
["spDef", "shape"],
|
|
281
281
|
["lnDef", "line"],
|
|
282
282
|
["txDef", "text"]
|
|
283
|
-
],
|
|
283
|
+
], U = (e, t) => {
|
|
284
284
|
let n = t.getAttribute("dxfId");
|
|
285
285
|
if (n === null) return;
|
|
286
286
|
let r = parseInt(n);
|
|
287
287
|
return e.getVisitorParamsState().get("dxfs")?.get(r) || (e.warn(`A color filter or sort names a format that does not exist (dxfId '${n}').`), {});
|
|
288
|
-
},
|
|
288
|
+
}, W = (e) => e === "1" || e === "true", G = class {
|
|
289
289
|
visit(e, t, n) {}
|
|
290
290
|
processDataBarColor(e, t, n, r, i = "auto") {
|
|
291
291
|
if (!t) return;
|
|
292
|
-
let a =
|
|
292
|
+
let a = E((e) => t.getAttribute(e), i);
|
|
293
293
|
return a && (n[r] = a), n;
|
|
294
294
|
}
|
|
295
295
|
processFonts(e, t, n) {
|
|
@@ -309,15 +309,15 @@ var xe = class {
|
|
|
309
309
|
let r = e.evaluate("u", t);
|
|
310
310
|
if (r) {
|
|
311
311
|
let e = r.getAttribute("val");
|
|
312
|
-
n.underline =
|
|
312
|
+
n.underline = _(e);
|
|
313
313
|
}
|
|
314
314
|
let s = T(e.evaluate("vertAlign", t)?.getAttribute("val"));
|
|
315
|
-
s !== void 0 && (n.baseline = s),
|
|
316
|
-
let
|
|
317
|
-
this.processDataBarColor(e,
|
|
318
|
-
let
|
|
319
|
-
if (
|
|
320
|
-
let e =
|
|
315
|
+
s !== void 0 && (n.baseline = s), l(e, t, n, "sz", "size");
|
|
316
|
+
let c = e.evaluate("color", t);
|
|
317
|
+
this.processDataBarColor(e, c, n, "color"), n.color ||= "auto", y(e, t, n, "name", "family"), y(e, t, n, "rFont", "family");
|
|
318
|
+
let u = e.evaluate("family", t);
|
|
319
|
+
if (u) {
|
|
320
|
+
let e = u.getAttribute("val");
|
|
321
321
|
if (e) switch (e) {
|
|
322
322
|
case "1":
|
|
323
323
|
n.fallbacks = ["serif"];
|
|
@@ -334,12 +334,12 @@ var xe = class {
|
|
|
334
334
|
case "5": n.fallbacks = ["fantasy"];
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
|
|
337
|
+
b(n, e.evaluate("scheme", t)?.getAttribute("val")), o(e, t, n, "shadow", "shadow", !0), o(e, t, n, "outline", "outline", !0);
|
|
338
338
|
for (let r of ["condense", "extend"]) {
|
|
339
339
|
let i = a(r, !!e.getValAttrAsBoolean(r, t, !0));
|
|
340
340
|
i !== void 0 && (n.letterSpacing = i);
|
|
341
341
|
}
|
|
342
|
-
return
|
|
342
|
+
return p(e, t, n, "charset", "charset"), n;
|
|
343
343
|
}
|
|
344
344
|
processFills(e, t, n) {
|
|
345
345
|
if (!t) return;
|
|
@@ -367,10 +367,10 @@ var xe = class {
|
|
|
367
367
|
i && (n.gradientType = i);
|
|
368
368
|
let a = t.hasAttribute("degree") ? parseFloat(t.getAttribute("degree")) : 0;
|
|
369
369
|
(a + 90) % 360 != 0 && (n.angle = (a + 90) % 360), (t.hasAttribute("left") || t.hasAttribute("top") || t.hasAttribute("right") || t.hasAttribute("bottom")) && (n.focus = {
|
|
370
|
-
left:
|
|
371
|
-
top:
|
|
372
|
-
right:
|
|
373
|
-
bottom:
|
|
370
|
+
left: K(t.getAttribute("left")),
|
|
371
|
+
top: K(t.getAttribute("top")),
|
|
372
|
+
right: K(t.getAttribute("right")),
|
|
373
|
+
bottom: K(t.getAttribute("bottom"))
|
|
374
374
|
});
|
|
375
375
|
let o = t.childNodes, s = o.length;
|
|
376
376
|
for (let t = 0; t < s; t++) {
|
|
@@ -413,7 +413,7 @@ var xe = class {
|
|
|
413
413
|
let a = {};
|
|
414
414
|
this.processBorderStroke(e, t, a, k.Edge.Left), this.processBorderStroke(e, t, a, k.Edge.Right), i ? (a.right || a.left) && (a.vertical = a.right ? { ...a.right } : { ...a.left }) : this.processBorderStroke(e, t, a, k.Edge.Vertical), this.processBorderStroke(e, t, a, k.Edge.Top), this.processBorderStroke(e, t, a, k.Edge.Bottom), i ? (a.bottom || a.top) && (a.horizontal = a.bottom ? { ...a.bottom } : { ...a.top }) : this.processBorderStroke(e, t, a, k.Edge.Horizontal);
|
|
415
415
|
let o = this.processBorderStroke(e, t, {}, "diagonal");
|
|
416
|
-
return o && (
|
|
416
|
+
return o && (W(t.getAttribute("diagonalUp")) && (a.diagonalUp = { ...o }), W(t.getAttribute("diagonalDown")) && (a.diagonalDown = { ...o })), n[r] = a, n;
|
|
417
417
|
}
|
|
418
418
|
processBorderStroke(e, t, n, r) {
|
|
419
419
|
if (!t) return;
|
|
@@ -424,15 +424,23 @@ var xe = class {
|
|
|
424
424
|
let o = e.evaluate("color", i);
|
|
425
425
|
return o && this.processDataBarColor(e, o, a, "color"), Object.keys(a).length > 0 ? n[r] = a : null;
|
|
426
426
|
}
|
|
427
|
-
},
|
|
427
|
+
}, K = (e) => {
|
|
428
428
|
if (!e) return 0;
|
|
429
429
|
let t = parseFloat(e);
|
|
430
430
|
return isNaN(t) ? 0 : t;
|
|
431
|
+
}, q = (e, t) => {
|
|
432
|
+
if (!e || e.nodeType !== 1) return null;
|
|
433
|
+
let n = e.childNodes;
|
|
434
|
+
for (let e = 0; e < n.length; e++) {
|
|
435
|
+
let r = n.item(e);
|
|
436
|
+
if (r.nodeType === 1 && r.localName === t) return r;
|
|
437
|
+
}
|
|
438
|
+
return null;
|
|
431
439
|
}, Oe = new Set(Object.values(F.ElementType).filter((e) => e !== F.ElementType.WholeTable && e !== F.ElementType.HeaderRow)), ke = {
|
|
432
440
|
auto: "auto",
|
|
433
441
|
autoNoTable: "automaticExceptTables",
|
|
434
442
|
manual: "manual"
|
|
435
|
-
},
|
|
443
|
+
}, J = [
|
|
436
444
|
"tableId",
|
|
437
445
|
"columnId",
|
|
438
446
|
"cacheName",
|
|
@@ -441,7 +449,7 @@ var xe = class {
|
|
|
441
449
|
"sortOrder",
|
|
442
450
|
"customListSort",
|
|
443
451
|
"crossFilter"
|
|
444
|
-
],
|
|
452
|
+
], Y = (e, t) => {
|
|
445
453
|
let n = e.content, r = n?.json;
|
|
446
454
|
if (r) {
|
|
447
455
|
if (n.type === "shape" || n.type === "picture") {
|
|
@@ -457,14 +465,14 @@ var xe = class {
|
|
|
457
465
|
}
|
|
458
466
|
});
|
|
459
467
|
}
|
|
460
|
-
if (n.type === "group") for (let e of r.members ?? [])
|
|
468
|
+
if (n.type === "group") for (let e of r.members ?? []) Y(e, !0);
|
|
461
469
|
}
|
|
462
|
-
},
|
|
470
|
+
}, X = class extends H {
|
|
463
471
|
visit(e, t, n) {
|
|
464
472
|
if (t) return this.visitShape(e, t, n, "sp", "nvSpPr/cNvSpPr/spLocks");
|
|
465
473
|
}
|
|
466
474
|
visitShape(e, t, n, i, a) {
|
|
467
|
-
let o =
|
|
475
|
+
let o = de[i];
|
|
468
476
|
if (this.isGroupContent(n)) {
|
|
469
477
|
if (e.getPath().includes("Fallback")) return {};
|
|
470
478
|
let { movable: r, content: s } = this.readMemberHeader(e, t, "shape");
|
|
@@ -478,7 +486,7 @@ var xe = class {
|
|
|
478
486
|
let i = n.content.json;
|
|
479
487
|
if (n.content.type === "shape" && i && (i.type ?? P.Type.Shape) === o) {
|
|
480
488
|
let n = e.evaluate("txBody", t), a = n ? new r().readTextBody(e, n) : null;
|
|
481
|
-
a &&
|
|
489
|
+
a && ee(a) !== "" && (i.text = a);
|
|
482
490
|
}
|
|
483
491
|
return {};
|
|
484
492
|
}
|
|
@@ -503,7 +511,7 @@ var xe = class {
|
|
|
503
511
|
let a = t.getAttribute("macro");
|
|
504
512
|
a && (i.macro = a);
|
|
505
513
|
let o = t.getAttribute("textlink");
|
|
506
|
-
o && (i.textLink = o), t.hasAttribute("fLocksText") && (i.locksText =
|
|
514
|
+
o && (i.textLink = o), t.hasAttribute("fLocksText") && (i.locksText = f(t.getAttribute("fLocksText"))), t.hasAttribute("fPublished") && (i.published = f(t.getAttribute("fPublished")));
|
|
507
515
|
let s = r.slice(0, r.lastIndexOf("/")), c = e.evaluate(s, t);
|
|
508
516
|
c?.getAttribute?.("txBox") === "1" && (i.textBox = !0);
|
|
509
517
|
let l = this.readLocks(e.evaluate(r, t));
|
|
@@ -518,25 +526,25 @@ var xe = class {
|
|
|
518
526
|
(n || r) && (i.connectorEnds = {}, n && (i.connectorEnds.start = n), r && (i.connectorEnds.end = r));
|
|
519
527
|
}
|
|
520
528
|
}
|
|
521
|
-
}, Ae = /^<a:extLst(?:\s+xmlns:a="[^"]*")?><a:ext uri="\{28A0092B-C50C-407E-A947-70E740481C1C\}"><a14:useLocalDpi(?:\s+xmlns:a14="[^"]*")?\s+val="0"\s*\/><\/a:ext><\/a:extLst>$/,
|
|
529
|
+
}, Ae = /^<a:extLst(?:\s+xmlns:a="[^"]*")?><a:ext uri="\{28A0092B-C50C-407E-A947-70E740481C1C\}"><a14:useLocalDpi(?:\s+xmlns:a14="[^"]*")?\s+val="0"\s*\/><\/a:ext><\/a:extLst>$/, Z = (e, t, n, r) => {
|
|
522
530
|
let i = e.evaluate(n, t), a = e.evaluate(r, t);
|
|
523
531
|
return i || a ? {
|
|
524
|
-
x:
|
|
525
|
-
y:
|
|
526
|
-
width:
|
|
527
|
-
height:
|
|
532
|
+
x: w(i?.getAttribute("x") ?? null) ?? 0,
|
|
533
|
+
y: w(i?.getAttribute("y") ?? null) ?? 0,
|
|
534
|
+
width: w(a?.getAttribute("cx") ?? null) ?? 0,
|
|
535
|
+
height: w(a?.getAttribute("cy") ?? null) ?? 0
|
|
528
536
|
} : null;
|
|
529
|
-
},
|
|
537
|
+
}, je = { Checkbox: "checkbox" }, Q = (e) => {
|
|
530
538
|
let t = e.getAttribute("val");
|
|
531
539
|
return t !== "0" && t !== "false";
|
|
532
|
-
},
|
|
540
|
+
}, Me = {
|
|
533
541
|
1: "serif",
|
|
534
542
|
2: "sans-serif",
|
|
535
543
|
3: "monospace",
|
|
536
544
|
4: "cursive",
|
|
537
545
|
5: "fantasy"
|
|
538
546
|
};
|
|
539
|
-
function
|
|
547
|
+
function Ne(e) {
|
|
540
548
|
let t = {}, n = e.childNodes;
|
|
541
549
|
for (let e = 0; e < n.length; e++) {
|
|
542
550
|
let r = n.item(e);
|
|
@@ -563,7 +571,7 @@ function Me(e) {
|
|
|
563
571
|
break;
|
|
564
572
|
}
|
|
565
573
|
case "u":
|
|
566
|
-
t.underline =
|
|
574
|
+
t.underline = _(r.getAttribute("val"));
|
|
567
575
|
break;
|
|
568
576
|
case "vertAlign": {
|
|
569
577
|
let e = T(r.getAttribute("val"));
|
|
@@ -581,7 +589,7 @@ function Me(e) {
|
|
|
581
589
|
break;
|
|
582
590
|
}
|
|
583
591
|
case "family": {
|
|
584
|
-
let e =
|
|
592
|
+
let e = Me[r.getAttribute("val") ?? ""];
|
|
585
593
|
e && (t.fallbacks = [e]);
|
|
586
594
|
break;
|
|
587
595
|
}
|
|
@@ -591,7 +599,7 @@ function Me(e) {
|
|
|
591
599
|
break;
|
|
592
600
|
}
|
|
593
601
|
case "scheme":
|
|
594
|
-
|
|
602
|
+
b(t, r.getAttribute("val"));
|
|
595
603
|
break;
|
|
596
604
|
case "color": {
|
|
597
605
|
let e = r.getAttribute("rgb");
|
|
@@ -599,7 +607,7 @@ function Me(e) {
|
|
|
599
607
|
t.color = "#" + (e.length === 8 ? e.substring(2) : e).toUpperCase();
|
|
600
608
|
break;
|
|
601
609
|
}
|
|
602
|
-
let n =
|
|
610
|
+
let n = E((e) => r.getAttribute(e));
|
|
603
611
|
n && (t.color = n);
|
|
604
612
|
break;
|
|
605
613
|
}
|
|
@@ -683,15 +691,15 @@ var $ = {
|
|
|
683
691
|
}
|
|
684
692
|
},
|
|
685
693
|
ShapePropertiesVisitor: C,
|
|
686
|
-
TextPropertiesVisitor:
|
|
694
|
+
TextPropertiesVisitor: re,
|
|
687
695
|
ShapeTextVisitor: r,
|
|
688
696
|
ThemeVisitor: class {
|
|
689
697
|
visit(e, t, n) {
|
|
690
698
|
n.name = t.getAttribute("name"), n.objectDefaults = {};
|
|
691
|
-
let r =
|
|
699
|
+
let r = B(t, "custClrLst")[0];
|
|
692
700
|
if (r) {
|
|
693
|
-
let t = new
|
|
694
|
-
for (let n of
|
|
701
|
+
let t = new h(), i = [];
|
|
702
|
+
for (let n of B(r, "custClr")) {
|
|
695
703
|
let r = t.processAdjColor(e, n);
|
|
696
704
|
if (!r) continue;
|
|
697
705
|
let a = { color: r }, o = n.getAttribute("name");
|
|
@@ -699,9 +707,9 @@ var $ = {
|
|
|
699
707
|
}
|
|
700
708
|
i.length && (n.customColors = i);
|
|
701
709
|
}
|
|
702
|
-
for (let e of
|
|
710
|
+
for (let e of B(t, "extLst")) for (let t of B(e, "ext")) {
|
|
703
711
|
if (t.getAttribute("uri") !== "{05A4C25C-085E-4340-85A3-A5531E510DB2}") continue;
|
|
704
|
-
let e =
|
|
712
|
+
let e = B(t, "themeFamily")[0], r = e?.getAttribute("id");
|
|
705
713
|
if (!r) continue;
|
|
706
714
|
let i = {
|
|
707
715
|
name: e.getAttribute("name") ?? "",
|
|
@@ -712,7 +720,7 @@ var $ = {
|
|
|
712
720
|
return n;
|
|
713
721
|
}
|
|
714
722
|
},
|
|
715
|
-
ClrSchemeVisitor: class extends
|
|
723
|
+
ClrSchemeVisitor: class extends h {
|
|
716
724
|
visit(e, t, n) {
|
|
717
725
|
let r = {};
|
|
718
726
|
r.name = t.getAttribute("name");
|
|
@@ -771,10 +779,10 @@ var $ = {
|
|
|
771
779
|
let a = new r().readTextBody(e, t);
|
|
772
780
|
(a.body || a.listStyle) && (n.text = a);
|
|
773
781
|
let o = e.evaluate("style", t);
|
|
774
|
-
return o && (n.style =
|
|
782
|
+
return o && (n.style = V(e, o)), n;
|
|
775
783
|
}
|
|
776
784
|
},
|
|
777
|
-
FmtSchemeVisitor: class extends
|
|
785
|
+
FmtSchemeVisitor: class extends h {
|
|
778
786
|
visit(e, t, n) {
|
|
779
787
|
let r = this.parseFillList(e, t, "fillStyleLst"), i = this.parseLnList(e, t, "lnStyleLst"), a = this.parseEffectStyleList(e, t, "effectStyleLst"), o = this.parseFillList(e, t, "bgFillStyleLst");
|
|
780
788
|
if (r && (n.fillStyleLst = r), i && (n.lnStyleLst = i), a && (n.effectStyleLst = a), o && (n.bgFillStyleLst = o), r && i && a && o) return;
|
|
@@ -846,11 +854,11 @@ var $ = {
|
|
|
846
854
|
param: n
|
|
847
855
|
};
|
|
848
856
|
e.copyFromAttribute(t, "cellColor", n, "cellColor", e.BOOLEAN_COPY);
|
|
849
|
-
let i =
|
|
857
|
+
let i = U(e, t);
|
|
850
858
|
return i && (n.style = i), r;
|
|
851
859
|
}
|
|
852
860
|
processCustomFilter(e, t) {
|
|
853
|
-
return
|
|
861
|
+
return oe({
|
|
854
862
|
operator: t.getAttribute("operator"),
|
|
855
863
|
val: t.getAttribute("val")
|
|
856
864
|
}, (t) => e.warn(t));
|
|
@@ -868,7 +876,7 @@ var $ = {
|
|
|
868
876
|
let r = null;
|
|
869
877
|
n.localName === "customFilter" && (r = this.processCustomFilter(e, n)), r && i.push(r);
|
|
870
878
|
}
|
|
871
|
-
return i.length === 1 ? i[0] :
|
|
879
|
+
return i.length === 1 ? i[0] : ce(a);
|
|
872
880
|
}
|
|
873
881
|
processDynamicFilter(e, t) {
|
|
874
882
|
return ne(t.getAttribute("type"));
|
|
@@ -919,7 +927,7 @@ var $ = {
|
|
|
919
927
|
let n = t.childNodes;
|
|
920
928
|
for (let t = 0; t < n.length; t++) {
|
|
921
929
|
let r = n.item(t);
|
|
922
|
-
if (r.nodeType !== 1 || r.localName !== "ext" ||
|
|
930
|
+
if (r.nodeType !== 1 || r.localName !== "ext" || m(r.getAttribute("uri")) !== m("{1AD28BCE-077C-4C59-8B6E-1921CE8616D4}")) continue;
|
|
923
931
|
let i = r.childNodes;
|
|
924
932
|
for (let t = 0; t < i.length; t++) {
|
|
925
933
|
let n = i.item(t);
|
|
@@ -945,12 +953,12 @@ var $ = {
|
|
|
945
953
|
if (!t) return null;
|
|
946
954
|
if (!t.hasAttribute("colId")) return;
|
|
947
955
|
let r = parseInt(t.getAttribute("colId")), i = !1;
|
|
948
|
-
if (t.hasAttribute("hiddenButton") && (i =
|
|
956
|
+
if (t.hasAttribute("hiddenButton") && (i = f(t.getAttribute("hiddenButton"))), i && n) {
|
|
949
957
|
let e = n.hiddenButtons;
|
|
950
958
|
e || (e = [], n.hiddenButtons = e), e.push(r);
|
|
951
959
|
}
|
|
952
960
|
let a = !1;
|
|
953
|
-
if (t.hasAttribute("showButton") && (a =
|
|
961
|
+
if (t.hasAttribute("showButton") && (a = f(t.getAttribute("showButton"))), a && n) {
|
|
954
962
|
let e = n.showButtons;
|
|
955
963
|
!0 !== e && (e || (e = [], n.showButtons = e), e[r] = !0);
|
|
956
964
|
}
|
|
@@ -974,7 +982,7 @@ var $ = {
|
|
|
974
982
|
visit(e, t, n) {
|
|
975
983
|
if (!t) return;
|
|
976
984
|
let r = t.getAttribute("ref"), i = {};
|
|
977
|
-
t.hasAttribute("caseSensitive") && (i.collatorOptions =
|
|
985
|
+
t.hasAttribute("caseSensitive") && (i.collatorOptions = f(t.getAttribute("caseSensitive")) ? R.CaseSensitiveOptions : R.CaseInsensitiveOptions);
|
|
978
986
|
let a = t.getAttribute("sortMethod");
|
|
979
987
|
a != null && a !== "none" && (a === "stroke" ? i.collatorOptions = {
|
|
980
988
|
...i.collatorOptions,
|
|
@@ -984,15 +992,15 @@ var $ = {
|
|
|
984
992
|
collation: "pinyin"
|
|
985
993
|
}));
|
|
986
994
|
let o = {};
|
|
987
|
-
t.hasAttribute("columnSort") &&
|
|
988
|
-
let s =
|
|
989
|
-
this.processSortConditions(e, t, c, s, i,
|
|
995
|
+
t.hasAttribute("columnSort") && f(t.getAttribute("columnSort")) && (o.axis = ye.Axis.Column);
|
|
996
|
+
let s = O.fastStringToRange(r), c = [], l = [];
|
|
997
|
+
this.processSortConditions(e, t, c, s, i, l), c.length > 0 && (o.sorts = c);
|
|
990
998
|
let d = e.getVisitorParamsState().get("ref");
|
|
991
999
|
if (d && r) {
|
|
992
|
-
let e =
|
|
1000
|
+
let e = O.fastStringToRange(d);
|
|
993
1001
|
o.extent = {
|
|
994
|
-
range:
|
|
995
|
-
sorts:
|
|
1002
|
+
range: u(e, s),
|
|
1003
|
+
sorts: l.map((t) => te(e, s, t))
|
|
996
1004
|
};
|
|
997
1005
|
}
|
|
998
1006
|
return Object.keys(c).length > 0 && (n.sort = o), o;
|
|
@@ -1002,14 +1010,14 @@ var $ = {
|
|
|
1002
1010
|
let a = {};
|
|
1003
1011
|
if (!t.hasAttribute("ref")) return void e.warn("A sort condition has no ref; it was dropped.", { onceKey: "xlsx.sheet.sort.noRef" });
|
|
1004
1012
|
if (t.hasAttribute("ref")) {
|
|
1005
|
-
let e = t.getAttribute("ref"), r =
|
|
1013
|
+
let e = t.getAttribute("ref"), r = O.fastStringToRange(e);
|
|
1006
1014
|
a.index = n ? r.colStart - n.colStart : r.colStart, i?.push(r);
|
|
1007
1015
|
}
|
|
1008
1016
|
let o = { ...r };
|
|
1009
|
-
a.criteria = o, o.reverse = !1, t.hasAttribute("descending") && (o.reverse =
|
|
1010
|
-
let s =
|
|
1017
|
+
a.criteria = o, o.reverse = !1, t.hasAttribute("descending") && (o.reverse = f(t.getAttribute("descending")));
|
|
1018
|
+
let s = ae(t.getAttribute("sortBy"));
|
|
1011
1019
|
s && (o.sortOn = s);
|
|
1012
|
-
let c =
|
|
1020
|
+
let c = U(e, t);
|
|
1013
1021
|
return c && (o.style = c), e.copyFromAttribute(t, "iconSet", o), e.copyFromAttribute(t, "customList", o), a;
|
|
1014
1022
|
}
|
|
1015
1023
|
processSortConditions(e, t, n, r, i, a) {
|
|
@@ -1024,7 +1032,7 @@ var $ = {
|
|
|
1024
1032
|
}
|
|
1025
1033
|
}
|
|
1026
1034
|
},
|
|
1027
|
-
SheetStyleVisitor: class extends
|
|
1035
|
+
SheetStyleVisitor: class extends G {
|
|
1028
1036
|
visit(e, r, i) {
|
|
1029
1037
|
this.processNumFmts(e, e.evaluate("numFmts", r), null), e.getVisitorParamsState().set("colorsToProcess", /* @__PURE__ */ new Set());
|
|
1030
1038
|
let a = {
|
|
@@ -1036,12 +1044,12 @@ var $ = {
|
|
|
1036
1044
|
let s = a.fonts[this.normalFontId(e, r)], c = {
|
|
1037
1045
|
declared: ["1", "true"].includes(o?.getAttribute("x14ac:knownFonts") ?? ""),
|
|
1038
1046
|
normalIsThemeFont: n(s?.family),
|
|
1039
|
-
faces:
|
|
1047
|
+
faces: ie(Object.values(a.fonts).map((e) => ({
|
|
1040
1048
|
...e,
|
|
1041
1049
|
family: t(e?.family, e?.fallbacks, null, !1).name
|
|
1042
1050
|
})))
|
|
1043
1051
|
};
|
|
1044
|
-
e.getVisitorParamsState().set(
|
|
1052
|
+
e.getVisitorParamsState().set(se, c), s && e.getVisitorParamsState().set(fe, s), this.processFills(e, e.evaluate("fills", r), a.fills), this.processBorders(e, e.evaluate("borders", r), a.borders, !0), a.fills[0] = { type: M.Type.None }, a.fills[1] = {
|
|
1045
1053
|
type: M.Type.Pattern,
|
|
1046
1054
|
patternType: M.BuiltInSheetPattern.Gray125
|
|
1047
1055
|
}, a.borders[0] = {
|
|
@@ -1060,9 +1068,11 @@ var $ = {
|
|
|
1060
1068
|
let d = [];
|
|
1061
1069
|
this.processXFs(e, e.evaluate("cellXfs", r), d, a, u), Object.keys(d).length > 0 && (i.direct = d);
|
|
1062
1070
|
let f = this.collectHiddenXfs(e.evaluate("cellXfs", r));
|
|
1063
|
-
f.size > 0 && e.getVisitorParamsState().set(
|
|
1064
|
-
let p =
|
|
1065
|
-
|
|
1071
|
+
f.size > 0 && e.getVisitorParamsState().set(me, f);
|
|
1072
|
+
let p = this.collectXfComplements(e.evaluate("cellXfs", r));
|
|
1073
|
+
p.size > 0 && e.getVisitorParamsState().set(pe, p);
|
|
1074
|
+
let m = [];
|
|
1075
|
+
return this.processDXFs(e, e.evaluate("dxfs", r), m), this.processTableStyles(e, e.evaluate("tableStyles", r), i, m), this.processSlicerStyles(e, e.evaluate("extLst", r), i), this.processIndexColors(e, e.evaluate("colors/indexedColors", r), i), this.processMruColors(e, e.evaluate("colors/mruColors", r), i), i;
|
|
1066
1076
|
}
|
|
1067
1077
|
normalFontId(e, t) {
|
|
1068
1078
|
let n = e.evaluate("cellStyles", t)?.childNodes, r = 0;
|
|
@@ -1138,7 +1148,7 @@ var $ = {
|
|
|
1138
1148
|
let e = i.get(parseInt(o));
|
|
1139
1149
|
e && e !== A.BuiltInName.Normal && (n.named = e);
|
|
1140
1150
|
}
|
|
1141
|
-
let s = (e) => !(!a && t.hasAttribute(e)) ||
|
|
1151
|
+
let s = (e) => !(!a && t.hasAttribute(e)) || f(t.getAttribute(e)), c = (e) => !a || t.hasAttribute(e) && f(t.getAttribute(e)), l = a ? "0" : void 0;
|
|
1142
1152
|
if (s("applyFont")) {
|
|
1143
1153
|
let e = t.getAttribute("fontId") ?? l;
|
|
1144
1154
|
if (e !== void 0 && (e !== "0" || c("applyFont"))) {
|
|
@@ -1178,16 +1188,16 @@ var $ = {
|
|
|
1178
1188
|
let r = e.evaluate("protection", t);
|
|
1179
1189
|
(r || c("applyProtection")) && this.processProtection(e, r, n);
|
|
1180
1190
|
}
|
|
1181
|
-
let u =
|
|
1191
|
+
let u = f(t.getAttribute("quotePrefix") ?? "");
|
|
1182
1192
|
u && (n.quotePrefix = u);
|
|
1183
1193
|
}
|
|
1184
1194
|
processAlignment(e, t, n) {
|
|
1185
1195
|
let r = {};
|
|
1186
|
-
if (r.horizontal = t?.hasAttribute("horizontal") ? t.getAttribute("horizontal") : I.HorizontalAlignment.General, r.vertical = t?.hasAttribute("vertical") ? t.getAttribute("vertical") : I.VerticalAlignment.Bottom, r.indent = t?.hasAttribute("indent") ? parseInt(t.getAttribute("indent")) : 0, r.relativeIndent = t?.hasAttribute("relativeIndent") ? parseInt(t.getAttribute("relativeIndent")) : 0, r.overflow =
|
|
1196
|
+
if (r.horizontal = t?.hasAttribute("horizontal") ? t.getAttribute("horizontal") : I.HorizontalAlignment.General, r.vertical = t?.hasAttribute("vertical") ? t.getAttribute("vertical") : I.VerticalAlignment.Bottom, r.indent = t?.hasAttribute("indent") ? parseInt(t.getAttribute("indent")) : 0, r.relativeIndent = t?.hasAttribute("relativeIndent") ? parseInt(t.getAttribute("relativeIndent")) : 0, r.overflow = f(t?.getAttribute("wrapText") ?? "") ? I.Overflow.Wrap : I.Overflow.Visible, f(t?.getAttribute("shrinkToFit") ?? "") && (r.overflow = I.Overflow.Shrink), t?.hasAttribute("textRotation")) {
|
|
1187
1197
|
let e = parseFloat(t.getAttribute("textRotation"));
|
|
1188
1198
|
e > 0 && e <= 90 ? e = 360 - e : e > 90 && e <= 180 ? e -= 90 : e === 255 && (e = 0, r.stacked = !0), r.rotation = e;
|
|
1189
1199
|
} else r.rotation = 0;
|
|
1190
|
-
t?.hasAttribute("justifyLastLine") && (r.justifyLastLine =
|
|
1200
|
+
t?.hasAttribute("justifyLastLine") && (r.justifyLastLine = f(t.getAttribute("justifyLastLine")));
|
|
1191
1201
|
let i = t?.getAttribute("readingOrder");
|
|
1192
1202
|
return i && (i === "0" ? r.readingDirection = I.ReadingDirection.Auto : i === "1" ? r.readingDirection = I.ReadingDirection.LeftToRight : i === "2" ? r.readingDirection = I.ReadingDirection.RightToLeft : e.warn(`Invalid readingOrder '${i}'; the direction was left automatic.`, { onceKey: "xlsx.style.readingOrder" })), Object.keys(r).length > 0 && (n.alignment = r), n;
|
|
1193
1203
|
}
|
|
@@ -1201,7 +1211,26 @@ var $ = {
|
|
|
1201
1211
|
let a = i.childNodes;
|
|
1202
1212
|
for (let e = 0; e < a.length; e++) {
|
|
1203
1213
|
let n = a.item(e);
|
|
1204
|
-
n.nodeType === 1 && n.localName === "protection" &&
|
|
1214
|
+
n.nodeType === 1 && n.localName === "protection" && f(n.getAttribute("hidden") ?? "") && t.add(r);
|
|
1215
|
+
}
|
|
1216
|
+
r++;
|
|
1217
|
+
}
|
|
1218
|
+
return t;
|
|
1219
|
+
}
|
|
1220
|
+
collectXfComplements(e) {
|
|
1221
|
+
let t = /* @__PURE__ */ new Map();
|
|
1222
|
+
if (!e) return t;
|
|
1223
|
+
let n = e.childNodes, r = 0;
|
|
1224
|
+
for (let e = 0; e < n.length; e++) {
|
|
1225
|
+
let i = n.item(e);
|
|
1226
|
+
if (i.nodeType !== 1 || i.localName !== "xf") continue;
|
|
1227
|
+
let a = q(i, "extLst");
|
|
1228
|
+
if (a) {
|
|
1229
|
+
let e = a.childNodes;
|
|
1230
|
+
for (let n = 0; n < e.length; n++) {
|
|
1231
|
+
let i = q(e.item(n), "xfComplement"), a = parseInt(i?.getAttribute("i") ?? "", 10);
|
|
1232
|
+
isNaN(a) || t.set(r, a);
|
|
1233
|
+
}
|
|
1205
1234
|
}
|
|
1206
1235
|
r++;
|
|
1207
1236
|
}
|
|
@@ -1210,7 +1239,7 @@ var $ = {
|
|
|
1210
1239
|
processProtection(e, t, n) {
|
|
1211
1240
|
if (!t) return;
|
|
1212
1241
|
let r = t.getAttribute("locked");
|
|
1213
|
-
return n.protection = { alwaysUnlocked: !!r && !
|
|
1242
|
+
return n.protection = { alwaysUnlocked: !!r && !f(r) }, n;
|
|
1214
1243
|
}
|
|
1215
1244
|
processDXF(e, t, n) {
|
|
1216
1245
|
if (!t) return;
|
|
@@ -1303,7 +1332,7 @@ var $ = {
|
|
|
1303
1332
|
}
|
|
1304
1333
|
processTableStyle(e, t, n, r, i = !1) {
|
|
1305
1334
|
let a = t.getAttribute("name"), o = { name: a };
|
|
1306
|
-
t.hasAttribute("table") && (o.table =
|
|
1335
|
+
t.hasAttribute("table") && (o.table = f(t.getAttribute("table"))), t.hasAttribute("pivot") && (o.pivot = f(t.getAttribute("pivot"))), i && !o.pivot && r.unshift(null);
|
|
1307
1336
|
let s = t.childNodes, c = s.length;
|
|
1308
1337
|
for (let t = 0; t < c; t++) {
|
|
1309
1338
|
let n = s.item(t);
|
|
@@ -1345,13 +1374,13 @@ var $ = {
|
|
|
1345
1374
|
name: s,
|
|
1346
1375
|
style: r[e]
|
|
1347
1376
|
};
|
|
1348
|
-
t.getAttribute("hidden") && (c.hidden =
|
|
1377
|
+
t.getAttribute("hidden") && (c.hidden = f(t.getAttribute("hidden"))), t.getAttribute("iLevel") && (c.iLevel = parseInt(t.getAttribute("iLevel"))), o !== null && f(t.getAttribute("customBuiltin") ?? "0") && (c.customized = !0), n.push(c);
|
|
1349
1378
|
}
|
|
1350
1379
|
}
|
|
1351
1380
|
}
|
|
1352
1381
|
afterVisit(e, t, n) {}
|
|
1353
1382
|
},
|
|
1354
|
-
WorkbookVisitor: class extends
|
|
1383
|
+
WorkbookVisitor: class extends G {
|
|
1355
1384
|
visit(e, t, n) {
|
|
1356
1385
|
return this.processSheetRefs(e, e.evaluate("sheets", t), n), this.processExternalReferences(e, e.evaluate("externalReferences", t), n), this.processBookViews(e, e.evaluate("bookViews", t), n), this.processDefinedNames(e, e.evaluate("definedNames", t), n), this.processCalcPr(e, e.evaluate("calcPr", t), n), this.processPivotCaches(e, e.evaluate("pivotCaches", t), n), this.processWorkbookProtection(e, e.evaluate("workbookProtection", t), n), this.processWorkbookPr(e, e.evaluate("workbookPr", t), n), n;
|
|
1357
1386
|
}
|
|
@@ -1364,7 +1393,7 @@ var $ = {
|
|
|
1364
1393
|
if (!t) return;
|
|
1365
1394
|
let r = {};
|
|
1366
1395
|
this.processPassword(e, t, r, "workbook", "password"), this.processPassword(e, t, r, "revisions", "revisionsPassword");
|
|
1367
|
-
for (let e of
|
|
1396
|
+
for (let e of ue) r[e.key] = le(e, t.getAttribute(e.attribute));
|
|
1368
1397
|
return n.protection = r, n;
|
|
1369
1398
|
}
|
|
1370
1399
|
processCalcPr(e, t, n) {
|
|
@@ -1386,11 +1415,11 @@ var $ = {
|
|
|
1386
1415
|
processSheetRef(e, t, n) {
|
|
1387
1416
|
let r = {};
|
|
1388
1417
|
e.copyFromAttribute(t, "name", r, "name"), e.copyFromAttribute(t, "state", r, "visibility"), e.copyFromAttribute(t, "sheetId", r, "sheetId", e.INT_COPY);
|
|
1389
|
-
let i = t.getAttribute("r:id"), a = i ?
|
|
1418
|
+
let i = t.getAttribute("r:id"), a = i ? d(e.getRelationships().get(i)?.type) : null;
|
|
1390
1419
|
if (a) {
|
|
1391
1420
|
let t = e.readEmbeddedPart(i);
|
|
1392
1421
|
if (t?.xml) {
|
|
1393
|
-
let e = { part: t }, i =
|
|
1422
|
+
let e = { part: t }, i = s(t.xml), o = i ? E((e) => i.get(e)) : void 0;
|
|
1394
1423
|
o && (e.tabColor = o), r.kind = a, r.sheet = e, n.push(r);
|
|
1395
1424
|
return;
|
|
1396
1425
|
}
|
|
@@ -1620,7 +1649,7 @@ var $ = {
|
|
|
1620
1649
|
if (t.nodeType !== 1 || t.localName !== "cell") continue;
|
|
1621
1650
|
let r = t.getAttribute("r");
|
|
1622
1651
|
if (!r) continue;
|
|
1623
|
-
let a =
|
|
1652
|
+
let a = O.fastStringToCell(r);
|
|
1624
1653
|
if (a?.rowIndex === void 0 || a?.colIndex === void 0) continue;
|
|
1625
1654
|
let o = this._readCellValue(t);
|
|
1626
1655
|
o !== void 0 && n.pushAt(a.rowIndex, a.colIndex, o);
|
|
@@ -1640,7 +1669,7 @@ var $ = {
|
|
|
1640
1669
|
case "str":
|
|
1641
1670
|
default: return t;
|
|
1642
1671
|
case "e": {
|
|
1643
|
-
let e =
|
|
1672
|
+
let e = ve.getBuiltInByLabel(t);
|
|
1644
1673
|
return e ? {
|
|
1645
1674
|
t: "e",
|
|
1646
1675
|
v: e.getCode()
|
|
@@ -1684,8 +1713,8 @@ var $ = {
|
|
|
1684
1713
|
let r = {};
|
|
1685
1714
|
n[t.getAttribute("name")] = r, e.copyFromAttribute(t, "xr10:uid", r, "uid");
|
|
1686
1715
|
let i = t.getAttribute("cache"), a = e.getVisitorParamsState().get("slicerCaches"), o = i ? a?.get(i) : void 0;
|
|
1687
|
-
if (o) for (let e = 0; e <
|
|
1688
|
-
let t =
|
|
1716
|
+
if (o) for (let e = 0; e < J.length; e++) {
|
|
1717
|
+
let t = J[e];
|
|
1689
1718
|
o[t] !== void 0 && (r[t] = o[t]);
|
|
1690
1719
|
}
|
|
1691
1720
|
e.copyFromAttribute(t, "caption", r), e.copyFromAttribute(t, "startItem", r, "startItem", e.INT_COPY), e.copyFromAttribute(t, "columnCount", r, "columnCount", e.INT_COPY), e.copyFromAttribute(t, "showCaption", r, "showCaption", e.BOOLEAN_COPY), e.copyFromAttribute(t, "level", r, "level", e.INT_COPY), e.copyFromAttribute(t, "style", r), e.copyFromAttribute(t, "lockedPosition", r, "lockedPosition", e.BOOLEAN_COPY), e.copyFromAttribute(t, "rowHeight", r, "rowHeight", e.INT_COPY);
|
|
@@ -1711,7 +1740,7 @@ var $ = {
|
|
|
1711
1740
|
} else n.localName === "extLst" && (o = e.serializeElement(n) ?? void 0);
|
|
1712
1741
|
}
|
|
1713
1742
|
}
|
|
1714
|
-
let c =
|
|
1743
|
+
let c = S(r, a, o);
|
|
1715
1744
|
return n.formControl = c, c;
|
|
1716
1745
|
}
|
|
1717
1746
|
},
|
|
@@ -1720,7 +1749,7 @@ var $ = {
|
|
|
1720
1749
|
return n;
|
|
1721
1750
|
}
|
|
1722
1751
|
afterVisit(e, t, n) {
|
|
1723
|
-
for (let e of n?.movables ?? [])
|
|
1752
|
+
for (let e of n?.movables ?? []) Y(e, !1);
|
|
1724
1753
|
}
|
|
1725
1754
|
},
|
|
1726
1755
|
DrawingAnchorVisitor: class {
|
|
@@ -1740,7 +1769,7 @@ var $ = {
|
|
|
1740
1769
|
x: 0,
|
|
1741
1770
|
y: 0
|
|
1742
1771
|
};
|
|
1743
|
-
return o.x =
|
|
1772
|
+
return o.x = w(t.getAttribute(i)), o.y = w(t.getAttribute(a)), r === "from" ? n.tl = o : n.br = o, n;
|
|
1744
1773
|
}
|
|
1745
1774
|
processOffsetCoord(e, t, n, r) {
|
|
1746
1775
|
if (!t) return;
|
|
@@ -1750,26 +1779,26 @@ var $ = {
|
|
|
1750
1779
|
x: 0,
|
|
1751
1780
|
y: 0
|
|
1752
1781
|
};
|
|
1753
|
-
return e.evaluate("col", t) && (i.c = parseInt(e.evaluate("col", t).textContent)), e.evaluate("row", t) && (i.r = parseInt(e.evaluate("row", t).textContent)), e.evaluate("colOff", t) && (i.x =
|
|
1782
|
+
return e.evaluate("col", t) && (i.c = parseInt(e.evaluate("col", t).textContent)), e.evaluate("row", t) && (i.r = parseInt(e.evaluate("row", t).textContent)), e.evaluate("colOff", t) && (i.x = w(e.evaluate("colOff", t).textContent)), e.evaluate("rowOff", t) && (i.y = w(e.evaluate("rowOff", t).textContent)), r === "from" ? n.tl = i : n.br = i, n;
|
|
1754
1783
|
}
|
|
1755
1784
|
},
|
|
1756
|
-
DrawingGraphicFrameVisitor: class extends
|
|
1785
|
+
DrawingGraphicFrameVisitor: class extends H {
|
|
1757
1786
|
visit(e, t, n) {
|
|
1758
1787
|
if (!t) return;
|
|
1759
1788
|
if (this.isGroupContent(n)) {
|
|
1760
1789
|
if (e.getPath().includes("Fallback")) return {};
|
|
1761
1790
|
let { movable: r } = this.readMemberHeader(e, t, "graphicFrame"), i = e.evaluate("xfrm", t);
|
|
1762
1791
|
if (i) {
|
|
1763
|
-
|
|
1792
|
+
v(i, r);
|
|
1764
1793
|
let t = e.evaluate("off", i), n = e.evaluate("ext", i);
|
|
1765
1794
|
r.anchor = {
|
|
1766
1795
|
tl: {
|
|
1767
|
-
x:
|
|
1768
|
-
y:
|
|
1796
|
+
x: w(t?.getAttribute("x") ?? null) ?? 0,
|
|
1797
|
+
y: w(t?.getAttribute("y") ?? null) ?? 0
|
|
1769
1798
|
},
|
|
1770
1799
|
br: {
|
|
1771
|
-
x:
|
|
1772
|
-
y:
|
|
1800
|
+
x: w(n?.getAttribute("cx") ?? null) ?? 0,
|
|
1801
|
+
y: w(n?.getAttribute("cy") ?? null) ?? 0
|
|
1773
1802
|
}
|
|
1774
1803
|
};
|
|
1775
1804
|
}
|
|
@@ -1829,8 +1858,8 @@ var $ = {
|
|
|
1829
1858
|
return r;
|
|
1830
1859
|
}
|
|
1831
1860
|
},
|
|
1832
|
-
DrawingSpVisitor:
|
|
1833
|
-
DrawingPicVisitor: class extends
|
|
1861
|
+
DrawingSpVisitor: X,
|
|
1862
|
+
DrawingPicVisitor: class extends H {
|
|
1834
1863
|
visit(e, t, n) {
|
|
1835
1864
|
if (!t) return;
|
|
1836
1865
|
if (this.isGroupContent(n)) {
|
|
@@ -1849,7 +1878,7 @@ var $ = {
|
|
|
1849
1878
|
readPictureDetails(e, t, n, r, i) {
|
|
1850
1879
|
n?.resId !== void 0 && (i.resId = n.resId), n?.image && (i.image = n.image);
|
|
1851
1880
|
let a = t.getAttribute("macro");
|
|
1852
|
-
a && (i.macro = a), t.hasAttribute("fPublished") && (i.published =
|
|
1881
|
+
a && (i.macro = a), t.hasAttribute("fPublished") && (i.published = f(t.getAttribute("fPublished")));
|
|
1853
1882
|
let o = e.evaluate("nvPicPr/cNvPicPr", t);
|
|
1854
1883
|
if (o?.getAttribute) {
|
|
1855
1884
|
o.getAttribute("preferRelativeResize") === "0" && (i.noRelativeResize = !0);
|
|
@@ -1861,16 +1890,16 @@ var $ = {
|
|
|
1861
1890
|
let n = e.evaluate("blipFill", t), r = n ? e.evaluate("blip", n) : null;
|
|
1862
1891
|
if (!r) return;
|
|
1863
1892
|
if (!(r.getAttribute("r:embed") ?? r.getAttribute("embed") ?? r.getAttribute("r:link") ?? r.getAttribute("link"))) return e.warn("A picture names no image; it was not imported.", { onceKey: "xlsx.drawing.picture.noRel" }), null;
|
|
1864
|
-
let { type: i, resId: a, ...o } = new
|
|
1893
|
+
let { type: i, resId: a, ...o } = new h().processImageFill(e, n);
|
|
1865
1894
|
return !o.tile && o.stretch && Object.keys(o.stretch).length === 0 && delete o.stretch, o.extLst && Ae.test(o.extLst) && delete o.extLst, {
|
|
1866
1895
|
resId: a,
|
|
1867
1896
|
image: Object.keys(o).length > 0 ? o : void 0
|
|
1868
1897
|
};
|
|
1869
1898
|
}
|
|
1870
1899
|
},
|
|
1871
|
-
DrawingGrpSpVisitor: class extends
|
|
1900
|
+
DrawingGrpSpVisitor: class extends H {
|
|
1872
1901
|
constructor(...e) {
|
|
1873
|
-
super(...e), this._fills = new
|
|
1902
|
+
super(...e), this._fills = new h();
|
|
1874
1903
|
}
|
|
1875
1904
|
visit(e, t, n) {
|
|
1876
1905
|
if (!t) return;
|
|
@@ -1897,8 +1926,8 @@ var $ = {
|
|
|
1897
1926
|
if (c) {
|
|
1898
1927
|
let t = e.evaluate("xfrm", c);
|
|
1899
1928
|
if (t) {
|
|
1900
|
-
|
|
1901
|
-
let n =
|
|
1929
|
+
v(t, i), t.getAttribute("flipH") === "1" && (i.flipH = !0), t.getAttribute("flipV") === "1" && (i.flipV = !0);
|
|
1930
|
+
let n = Z(e, t, "off", "ext"), o = Z(e, t, "chOff", "chExt") ?? n;
|
|
1902
1931
|
o && (a.childBounds = o), r && n && (i.anchor = {
|
|
1903
1932
|
tl: {
|
|
1904
1933
|
x: n.x,
|
|
@@ -1925,7 +1954,7 @@ var $ = {
|
|
|
1925
1954
|
return a;
|
|
1926
1955
|
}
|
|
1927
1956
|
},
|
|
1928
|
-
DrawingCxnSpVisitor: class extends
|
|
1957
|
+
DrawingCxnSpVisitor: class extends X {
|
|
1929
1958
|
visit(e, t, n) {
|
|
1930
1959
|
if (t) return this.visitShape(e, t, n, "cxnSp", "nvCxnSpPr/cNvCxnSpPr/cxnSpLocks");
|
|
1931
1960
|
}
|
|
@@ -2038,75 +2067,47 @@ var $ = {
|
|
|
2038
2067
|
return n;
|
|
2039
2068
|
}
|
|
2040
2069
|
},
|
|
2041
|
-
|
|
2070
|
+
FeaturePropertyBagVisitor: class {
|
|
2042
2071
|
visit(e, t, n) {
|
|
2043
|
-
let r =
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
let n = i.item(t);
|
|
2048
|
-
if (n.nodeType === 1 && n.localName === "s") {
|
|
2049
|
-
let t = {
|
|
2050
|
-
type: n.getAttribute("t") ?? "n",
|
|
2051
|
-
keys: []
|
|
2052
|
-
};
|
|
2053
|
-
this.processKeys(e, n, t), r.push(t);
|
|
2054
|
-
}
|
|
2072
|
+
let r = [], i = t.childNodes;
|
|
2073
|
+
for (let e = 0; e < i.length; e++) {
|
|
2074
|
+
let t = i.item(e);
|
|
2075
|
+
t.nodeType === 1 && t.localName === "bag" && r.push(this._readBag(t));
|
|
2055
2076
|
}
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
for (let e = 0; e < i; e++) {
|
|
2061
|
-
let t = r.item(e);
|
|
2062
|
-
if (t.nodeType === 1 && t.localName === "k") {
|
|
2063
|
-
let e = t.getAttribute("n"), n = t.getAttribute("t");
|
|
2064
|
-
a.push([e, n]);
|
|
2065
|
-
}
|
|
2077
|
+
let a = [], o = r.find((e) => e.type === "XFComplements")?.arrays.get("MappedFeaturePropertyBags") ?? [];
|
|
2078
|
+
for (let t = 0; t < o.length; t++) {
|
|
2079
|
+
let n = r[o[t]]?.ids.get("XFControls"), i = n === void 0 ? void 0 : r[n]?.ids.get("CellControl"), s = i === void 0 ? void 0 : r[i]?.type, c = s ? je[s] : void 0;
|
|
2080
|
+
c || e.warn(`A cell format's feature '${s ?? "unknown"}' is not read; its cells keep their values.`), a.push(c ? { type: c } : null);
|
|
2066
2081
|
}
|
|
2082
|
+
let s = { controls: a };
|
|
2083
|
+
return n.featurePropertyBag = s, s;
|
|
2067
2084
|
}
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
let
|
|
2078
|
-
if (
|
|
2079
|
-
let
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2085
|
+
_readBag(e) {
|
|
2086
|
+
let t = {
|
|
2087
|
+
type: e.getAttribute("type") ?? "",
|
|
2088
|
+
ids: /* @__PURE__ */ new Map(),
|
|
2089
|
+
arrays: /* @__PURE__ */ new Map()
|
|
2090
|
+
}, n = e.childNodes;
|
|
2091
|
+
for (let e = 0; e < n.length; e++) {
|
|
2092
|
+
let r = n.item(e);
|
|
2093
|
+
if (r.nodeType !== 1) continue;
|
|
2094
|
+
let i = r.getAttribute("k") ?? "";
|
|
2095
|
+
if (r.localName === "bagId") {
|
|
2096
|
+
let e = parseInt(r.textContent ?? "", 10);
|
|
2097
|
+
isNaN(e) || t.ids.set(i, e);
|
|
2098
|
+
} else if (r.localName === "a") {
|
|
2099
|
+
let e = [], n = r.childNodes;
|
|
2100
|
+
for (let t = 0; t < n.length; t++) {
|
|
2101
|
+
let r = n.item(t);
|
|
2102
|
+
if (r.nodeType !== 1 || r.localName !== "bagId") continue;
|
|
2103
|
+
let i = parseInt(r.textContent ?? "", 10);
|
|
2104
|
+
isNaN(i) || e.push(i);
|
|
2105
|
+
}
|
|
2106
|
+
t.arrays.set(i, e);
|
|
2083
2107
|
}
|
|
2084
2108
|
}
|
|
2085
|
-
return n.richData = i, i;
|
|
2086
|
-
}
|
|
2087
|
-
mapType(e, t) {
|
|
2088
|
-
if (t.type === "_error") {
|
|
2089
|
-
let e = t.errorType;
|
|
2090
|
-
if (e) try {
|
|
2091
|
-
t = O.getBuiltInByCode(e + 1) ?? O.BuiltIn.Unknown;
|
|
2092
|
-
} catch {}
|
|
2093
|
-
}
|
|
2094
2109
|
return t;
|
|
2095
2110
|
}
|
|
2096
|
-
processValues(e, t, n, r) {
|
|
2097
|
-
let i = t.childNodes, a = i.length;
|
|
2098
|
-
r.type;
|
|
2099
|
-
let o = r.keys;
|
|
2100
|
-
for (let t = 0; t < a; t++) {
|
|
2101
|
-
let r = i.item(t);
|
|
2102
|
-
if (r.nodeType === 1 && r.localName === "v") {
|
|
2103
|
-
let i = o[t];
|
|
2104
|
-
if (!i) return void e.warn("Invalid richData");
|
|
2105
|
-
let a = i[0], s = i[1], c = r.textContent;
|
|
2106
|
-
s === "i" && (c = Number(c)), n[a] = c;
|
|
2107
|
-
}
|
|
2108
|
-
}
|
|
2109
|
-
}
|
|
2110
2111
|
},
|
|
2111
2112
|
CommentsVisitor: class {
|
|
2112
2113
|
visit(e, t, n) {
|
|
@@ -2152,7 +2153,7 @@ var $ = {
|
|
|
2152
2153
|
if (n.nodeType === 1) {
|
|
2153
2154
|
if (n.localName === "t") e.text += n.textContent ?? "";
|
|
2154
2155
|
else if (n.localName === "rPr") {
|
|
2155
|
-
let t =
|
|
2156
|
+
let t = Ne(n);
|
|
2156
2157
|
t && (e.font = t);
|
|
2157
2158
|
}
|
|
2158
2159
|
}
|
|
@@ -2179,16 +2180,16 @@ var $ = {
|
|
|
2179
2180
|
visit(e, t, n) {
|
|
2180
2181
|
if (!t) return;
|
|
2181
2182
|
let r = {};
|
|
2182
|
-
e.copyFromAttribute(t, "id", r, "id",
|
|
2183
|
+
e.copyFromAttribute(t, "id", r, "id", x);
|
|
2183
2184
|
let i = t.getAttribute("ref");
|
|
2184
|
-
e.copyFromAttribute(t, "personId", r, "personId",
|
|
2185
|
+
e.copyFromAttribute(t, "personId", r, "personId", x), e.copyFromAttribute(t, "parentId", r, "parentId", x);
|
|
2185
2186
|
let a = t.getAttribute("dT");
|
|
2186
2187
|
a && (r.dt = function(e) {
|
|
2187
2188
|
let t = /^(.*T\d{2}:\d{2}:\d{2})(?:\.(\d+))?(Z|[+-]\d{2}:?\d{2})?$/i.exec(e.trim());
|
|
2188
2189
|
if (!t) return e;
|
|
2189
2190
|
let [, n, r, i] = t;
|
|
2190
2191
|
return `${n}${r ? `.${(r + "00").substring(0, 3)}` : ""}${i ?? "Z"}`;
|
|
2191
|
-
}(a)), t.hasAttribute("done") && (r.done =
|
|
2192
|
+
}(a)), t.hasAttribute("done") && (r.done = f(t.getAttribute("done")));
|
|
2192
2193
|
let o = function(e) {
|
|
2193
2194
|
let t, n = e.childNodes;
|
|
2194
2195
|
for (let e = 0; e < n.length; e++) {
|
|
@@ -2201,8 +2202,8 @@ var $ = {
|
|
|
2201
2202
|
let r = n.getAttribute("mentionId"), a = n.getAttribute("mentionpersonId");
|
|
2202
2203
|
if (!r || !a) continue;
|
|
2203
2204
|
let o = {
|
|
2204
|
-
id:
|
|
2205
|
-
personId:
|
|
2205
|
+
id: x(r),
|
|
2206
|
+
personId: x(a)
|
|
2206
2207
|
}, s = parseInt(n.getAttribute("startIndex") ?? "", 10);
|
|
2207
2208
|
isNaN(s) || (o.startIndex = s);
|
|
2208
2209
|
let c = parseInt(n.getAttribute("length") ?? "", 10);
|
|
@@ -2224,33 +2225,33 @@ var $ = {
|
|
|
2224
2225
|
let n = i.item(t);
|
|
2225
2226
|
if (n.nodeType === 1 && n.localName === "person") {
|
|
2226
2227
|
let t = {};
|
|
2227
|
-
e.copyFromAttribute(n, "id", t, "id",
|
|
2228
|
+
e.copyFromAttribute(n, "id", t, "id", x), e.copyFromAttribute(n, "displayName", t), e.copyFromAttribute(n, "userId", t, "userId", x), e.copyFromAttribute(n, "providerId", t), r.push(t);
|
|
2228
2229
|
}
|
|
2229
2230
|
}
|
|
2230
2231
|
return r.length > 0 && (n.persons = r), r;
|
|
2231
2232
|
}
|
|
2232
2233
|
}
|
|
2233
|
-
},
|
|
2234
|
+
}, Pe = class {
|
|
2234
2235
|
constructor(e, t) {
|
|
2235
2236
|
this.path = e, this.visitor = t;
|
|
2236
2237
|
}
|
|
2237
|
-
},
|
|
2238
|
+
}, Fe = class {
|
|
2238
2239
|
constructor() {
|
|
2239
|
-
this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new $.RelsVisitor()), this.registerVisitor("cp:coreProperties", new $.CorePropertiesVisitor()), this.registerVisitor("Properties", new $.AppPropertiesVisitor()), this.registerVisitor("spPr", new $.ShapePropertiesVisitor()), this.registerVisitor("txBody", new $.ShapeTextVisitor()), this.registerVisitor("txPr", new $.TextPropertiesVisitor()), this.registerVisitor("a:theme", new $.ThemeVisitor()), this.registerVisitor("a:theme", new $.ClrSchemeVisitor(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new $.FontSchemeVisitor(), "themeElements/fontScheme"), this.registerVisitor("a:theme", new $.FmtSchemeVisitor(), "themeElements/fmtScheme"), this.registerVisitor("a:theme", new $.ObjectDefaultsVisitor(), "objectDefaults"), this.registerVisitor("autoFilter", new $.AutoFilterVisitor()), this.registerVisitor("sortState", new $.SortStateVisitor()), this.registerVisitor("s:workbook", new $.WorkbookVisitor()), this.registerVisitor("styleSheet", new $.SheetStyleVisitor()), this.registerVisitor("x14:table", new $.TableX14Visitor()), this.registerVisitor("table", new $.TableVisitor()), this.registerVisitor("externalLink", new $.ExternalLinkVisitor()), this.registerVisitor("wsDr", new $.DrawingVisitor()), this.registerVisitor("twoCellAnchor", new $.DrawingAnchorVisitor()), this.registerVisitor("oneCellAnchor", new $.DrawingAnchorVisitor()), this.registerVisitor("absoluteAnchor", new $.DrawingAnchorVisitor()), this.registerVisitor("graphicFrame", new $.DrawingGraphicFrameVisitor()), this.registerVisitor("sp", new $.DrawingSpVisitor()), this.registerVisitor("grpSp", new $.DrawingGrpSpVisitor()), this.registerVisitor("cxnSp", new $.DrawingCxnSpVisitor()), this.registerVisitor("pic", new $.DrawingPicVisitor()), this.registerVisitor("metadata", new $.MetadataVisitor()), this.registerVisitor("
|
|
2240
|
+
this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new $.RelsVisitor()), this.registerVisitor("cp:coreProperties", new $.CorePropertiesVisitor()), this.registerVisitor("Properties", new $.AppPropertiesVisitor()), this.registerVisitor("spPr", new $.ShapePropertiesVisitor()), this.registerVisitor("txBody", new $.ShapeTextVisitor()), this.registerVisitor("txPr", new $.TextPropertiesVisitor()), this.registerVisitor("a:theme", new $.ThemeVisitor()), this.registerVisitor("a:theme", new $.ClrSchemeVisitor(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new $.FontSchemeVisitor(), "themeElements/fontScheme"), this.registerVisitor("a:theme", new $.FmtSchemeVisitor(), "themeElements/fmtScheme"), this.registerVisitor("a:theme", new $.ObjectDefaultsVisitor(), "objectDefaults"), this.registerVisitor("autoFilter", new $.AutoFilterVisitor()), this.registerVisitor("sortState", new $.SortStateVisitor()), this.registerVisitor("s:workbook", new $.WorkbookVisitor()), this.registerVisitor("styleSheet", new $.SheetStyleVisitor()), this.registerVisitor("x14:table", new $.TableX14Visitor()), this.registerVisitor("table", new $.TableVisitor()), this.registerVisitor("externalLink", new $.ExternalLinkVisitor()), this.registerVisitor("wsDr", new $.DrawingVisitor()), this.registerVisitor("twoCellAnchor", new $.DrawingAnchorVisitor()), this.registerVisitor("oneCellAnchor", new $.DrawingAnchorVisitor()), this.registerVisitor("absoluteAnchor", new $.DrawingAnchorVisitor()), this.registerVisitor("graphicFrame", new $.DrawingGraphicFrameVisitor()), this.registerVisitor("sp", new $.DrawingSpVisitor()), this.registerVisitor("grpSp", new $.DrawingGrpSpVisitor()), this.registerVisitor("cxnSp", new $.DrawingCxnSpVisitor()), this.registerVisitor("pic", new $.DrawingPicVisitor()), this.registerVisitor("metadata", new $.MetadataVisitor()), this.registerVisitor("FeaturePropertyBags", new $.FeaturePropertyBagVisitor()), this.registerVisitor("comments", new $.CommentsVisitor()), this.registerVisitor("comment", new $.CommentVisitor()), this.registerVisitor("ThreadedComments", new $.ThreadedCommentsVisitor()), this.registerVisitor("threadedComment", new $.ThreadedCommentVisitor()), this.registerVisitor("threadedComment", new $.TextPropertiesVisitor("content"), "text"), this.registerVisitor("personList", new $.PersonListVisitor()), this.registerVisitor("slicerCacheDefinition", new $.SlicerCacheDefinitionVisitor()), this.registerVisitor("slicers", new $.SlicersVisitor()), this.registerVisitor("formControlPr", new $.FormControlPrVisitor());
|
|
2240
2241
|
}
|
|
2241
2242
|
registerVisitor(e, t, n = null) {
|
|
2242
2243
|
e.indexOf(":") === -1 && (e = "*:" + e);
|
|
2243
2244
|
let r = e.split(":"), i = r.length > 1 ? r[1] : r[0];
|
|
2244
2245
|
if (!n) return this.visitorsByXmlTagName.set(i, t), void this.visitorsByXmlTagName.set(e, t);
|
|
2245
2246
|
let a = this.scopedVisitorsByXmlTagName.get(i);
|
|
2246
|
-
a || (a = [], this.scopedVisitorsByXmlTagName.set(i, a), this.scopedVisitorsByXmlTagName.set(e, a)), a.push(new
|
|
2247
|
+
a || (a = [], this.scopedVisitorsByXmlTagName.set(i, a), this.scopedVisitorsByXmlTagName.set(e, a)), a.push(new Pe(n, t));
|
|
2247
2248
|
}
|
|
2248
|
-
parseDxf(e, t = "", n =
|
|
2249
|
+
parseDxf(e, t = "", n = D.EmptyObject) {
|
|
2249
2250
|
this.visitorParamsState ||= /* @__PURE__ */ new Map();
|
|
2250
2251
|
let r = this.visitorParamsState, i = r.get("processingDXFs");
|
|
2251
2252
|
r.set("processingDXFs", !0);
|
|
2252
2253
|
try {
|
|
2253
|
-
let r = new
|
|
2254
|
+
let r = new z(null, this, "/dxf", e, {}, t, n), i = {};
|
|
2254
2255
|
return new $.SheetStyleVisitor().processDXF(r, e, i), i;
|
|
2255
2256
|
} finally {
|
|
2256
2257
|
i === void 0 ? r.delete("processingDXFs") : r.set("processingDXFs", i);
|
|
@@ -2259,12 +2260,12 @@ var $ = {
|
|
|
2259
2260
|
getVisitorParamsState() {
|
|
2260
2261
|
return this.visitorParamsState;
|
|
2261
2262
|
}
|
|
2262
|
-
transform(e, t, n =
|
|
2263
|
+
transform(e, t, n = D.EmptyObject) {
|
|
2263
2264
|
let r = e.documentElement;
|
|
2264
2265
|
this.visitorParamsState && !n?.paramMap || (this.visitorParamsState = n?.paramMap ?? /* @__PURE__ */ new Map());
|
|
2265
2266
|
let i = {}, a = this.visitorsByXmlTagName.get(r.nodeName);
|
|
2266
2267
|
if (a ||= this.visitorsByXmlTagName.get(r.localName), !a) throw Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);
|
|
2267
|
-
let o = "/" + r.localName, s = new
|
|
2268
|
+
let o = "/" + r.localName, s = new z(null, this, o, r, i, t, n), c = [];
|
|
2268
2269
|
this._doWalk(a, s, c, r, i, t, n);
|
|
2269
2270
|
let l = c.length;
|
|
2270
2271
|
for (let e = 0; e < l; e++) {
|
|
@@ -2292,7 +2293,7 @@ var $ = {
|
|
|
2292
2293
|
for (; l && l !== r;) s = l.localName + "/" + s, l = l.parentNode;
|
|
2293
2294
|
let u = t.getPath() + "/" + s;
|
|
2294
2295
|
if (c.visitor) {
|
|
2295
|
-
let r = new
|
|
2296
|
+
let r = new z(t, this, u, t.getElemRoot(), t.getJsonRoot(), a, o);
|
|
2296
2297
|
this._doWalk(c.visitor, r, n, e, i, a, o);
|
|
2297
2298
|
}
|
|
2298
2299
|
};
|
|
@@ -2318,10 +2319,10 @@ var $ = {
|
|
|
2318
2319
|
if (r.nodeType !== 1) continue;
|
|
2319
2320
|
let c = r, p = c.nodeName, m = l.get(p);
|
|
2320
2321
|
m ||= (p = c.localName, l.get(p));
|
|
2321
|
-
let h = t.getPath() + "/" + p, g = new
|
|
2322
|
+
let h = t.getPath() + "/" + p, g = new z(t, this, h, u, d, a, o);
|
|
2322
2323
|
this._doWalk(m, g, n, c, s ?? i, a, o);
|
|
2323
2324
|
}
|
|
2324
2325
|
return s;
|
|
2325
2326
|
}
|
|
2326
2327
|
};
|
|
2327
|
-
export {
|
|
2328
|
+
export { Fe as DOMTransformer, z as ExecutionContext, c as NumberUtils, g as VisitorUtils };
|