@sheetxl/io-xlsx 0.8.0-beta.17 → 0.8.0-beta.19
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/{DcMn-jMfEKpjhLbo.mjs → CEeTYNM_rwqsc-b6.mjs} +219 -219
- package/browser/esm/{AWuwwrCTwDE4BQGH.mjs → CiFeCAvntwei-3n-.mjs} +1098 -1033
- package/browser/esm/{v62NoYBoJsLBOx4t.mjs → CjbzUeeBPVVgBCe0.mjs} +1 -1
- package/browser/esm/{Claqh8OFs-oOlRgt.mjs → D-mGgx8e1t9LWTmB.mjs} +35 -35
- package/browser/esm/{BLH_fdMkhqCfGkFY.mjs → DD7kFqbkEtNMfi_p.mjs} +2555 -2450
- package/browser/esm/{BNcdhezQHA9IHqw0.mjs → DHDDP7TLXxGyopem.mjs} +4 -4
- package/browser/esm/{D-Am_xNiOPyhux5g.mjs → DLha0mZV3sGaIvf4.mjs} +2 -2
- package/browser/esm/{DzhKyRH8kCAq3RME.mjs → DjzJJMTBNL5XRlhs.mjs} +2 -2
- package/browser/esm/{DMSfJNobVqxFPB5z.mjs → DsyDZ-uLhZDvLk1P.mjs} +1667 -1640
- package/browser/esm/{DkPeYeIMvBK8Eah9.mjs → Libo9ivfHnsOxY-8.mjs} +2 -2
- package/browser/esm/{clykE4nUirU2W3vs.mjs → _oFFEu-K4yOqpchk.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/node/esm/{DzvOmNedQaxRP8vP.mjs → BGFKsZnCfmAU7Ebq.mjs} +1693 -1587
- package/node/esm/{C6lGe8n0PfRCbm1A.mjs → BKAFVfa5OXMQhTHy.mjs} +35 -35
- package/node/esm/{CxWtlje55fg8xrWp.mjs → BaiYXSeY70uC6mEf.mjs} +199 -199
- package/node/esm/{-uXTHNC2553Wwb9i.mjs → DRcXWsAsYDb2XGvQ.mjs} +2 -2
- package/node/esm/{YeqmZZ0sTX1KjGuk.mjs → DgBShdz1WVK7Hfdt.mjs} +2 -2
- package/node/esm/{DzJgqbx-KLtMlyhJ.mjs → Dp7MGfTHrlnWHSyn.mjs} +1336 -1271
- package/node/esm/{BhL3ux1VNOQEm_LA.mjs → DzRJquA2f4l2jQPf.mjs} +1 -1
- package/node/esm/{CYECv2Dos3ESL0dz.mjs → bq28CyzkFVMXb382.mjs} +1818 -1791
- package/node/esm/index.mjs +4 -4
- package/package.json +3 -3
- package/types/src/OOXMLExtensions.d.ts +5 -0
- package/types/src/SparklineGroups.d.ts +52 -0
|
@@ -1,12 +1,12 @@
|
|
|
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.19
|
|
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 {
|
|
8
|
-
import { a as z, i as G, n as W, r as $ } from "./
|
|
9
|
-
import { c as H, l as U, o as K, r as q, s as J } from "./
|
|
7
|
+
import { $n as t, A as e, Ar as o, B as s, Ct as r, Dt as i, F as n, Ht as l, I as a, L as u, M as d, N as h, Nt as p, P as m, R as f, Sr as g, St as b, Tt as y, Ut as A, V as v, Wt as N, bt as F, dn as C, er as S, fn as x, gt as T, in as w, j as P, jr as I, jt as k, k as O, mn as V, r as _, rn as B, t as D, v as E, vt as R, wt as j, xt as Y, yn as X, z as M } from "./BGFKsZnCfmAU7Ebq.mjs";
|
|
8
|
+
import { a as z, i as G, n as W, r as $ } from "./Dp7MGfTHrlnWHSyn.mjs";
|
|
9
|
+
import { c as H, l as U, o as K, r as q, s as J } from "./BKAFVfa5OXMQhTHy.mjs";
|
|
10
10
|
import { CommonUtils as Z } from "@sheetxl/utils";
|
|
11
11
|
import { AddressUtils as Q, FormulaError as tt, IBorders as et, ICellStyle as ot, ICondition as st, IFill as rt, IFont as it, IRange as nt, IShape as lt, ISlicerStyle as at, ITextFrame as ct, ShapeStyleUtils as ut, Sort as dt, Tuple as ht } from "@sheetxl/sdk";
|
|
12
12
|
var pt = class {
|
|
@@ -188,7 +188,7 @@ var pt = class {
|
|
|
188
188
|
["lnRef", "stroke"],
|
|
189
189
|
["effectRef", "effect"]
|
|
190
190
|
], Nt = (t, e) => {
|
|
191
|
-
const o = new
|
|
191
|
+
const o = new m(), s = {};
|
|
192
192
|
for (const [r, i] of vt) {
|
|
193
193
|
const n = t.evaluate(r, e);
|
|
194
194
|
if (!n) continue;
|
|
@@ -270,7 +270,7 @@ var pt = class {
|
|
|
270
270
|
const o = {};
|
|
271
271
|
for (let t = 0; t < e.length; t++) {
|
|
272
272
|
const s = e.item(t);
|
|
273
|
-
s.name.startsWith("xmlns") || (o[s.localName ?? s.name] =
|
|
273
|
+
s.name.startsWith("xmlns") || (o[s.localName ?? s.name] = A(s.value));
|
|
274
274
|
}
|
|
275
275
|
return Object.keys(o).length > 0 ? o : void 0;
|
|
276
276
|
}
|
|
@@ -291,10 +291,10 @@ var pt = class {
|
|
|
291
291
|
return t.getVisitorParamsState().get("dxfs")?.get(s) || (t.warn(`A color filter or sort names a format that does not exist (dxfId '${o}').`), {});
|
|
292
292
|
}, xt = (t) => "1" === t || "true" === t, Tt = class {
|
|
293
293
|
visit(t, e, o) {}
|
|
294
|
-
processDataBarColor(
|
|
295
|
-
if (!
|
|
296
|
-
const
|
|
297
|
-
return
|
|
294
|
+
processDataBarColor(e, o, s, r, i = "auto") {
|
|
295
|
+
if (!o) return;
|
|
296
|
+
const n = t((t) => o.getAttribute(t), i);
|
|
297
|
+
return n && (s[r] = n), s;
|
|
298
298
|
}
|
|
299
299
|
processFonts(t, e, o) {
|
|
300
300
|
if (!e) return;
|
|
@@ -310,42 +310,42 @@ var pt = class {
|
|
|
310
310
|
}
|
|
311
311
|
return o;
|
|
312
312
|
}
|
|
313
|
-
processFont(t,
|
|
314
|
-
t.getValAttrAsBoolean("b",
|
|
315
|
-
const
|
|
316
|
-
if (
|
|
317
|
-
const t =
|
|
318
|
-
|
|
319
|
-
}
|
|
320
|
-
const
|
|
321
|
-
void 0 !==
|
|
322
|
-
const
|
|
323
|
-
this.processDataBarColor(t,
|
|
324
|
-
const
|
|
325
|
-
if (
|
|
326
|
-
const t =
|
|
313
|
+
processFont(t, e, o) {
|
|
314
|
+
t.getValAttrAsBoolean("b", e, !0) && (o.weight = 700), t.getValAttrAsBoolean("i", e, !0) && (o.style = it.Style.Italic), t.getValAttrAsBoolean("strike", e, !0) && (o.strike = j(!0));
|
|
315
|
+
const i = t.evaluate("u", e);
|
|
316
|
+
if (i) {
|
|
317
|
+
const t = i.getAttribute("val");
|
|
318
|
+
o.underline = y(t);
|
|
319
|
+
}
|
|
320
|
+
const n = Y(t.evaluate("vertAlign", e)?.getAttribute("val"));
|
|
321
|
+
void 0 !== n && (o.baseline = n), f(t, e, o, "sz", "size");
|
|
322
|
+
const l = t.evaluate("color", e);
|
|
323
|
+
this.processDataBarColor(t, l, o, "color"), o.color || (o.color = "auto"), s(t, e, o, "name", "family"), s(t, e, o, "rFont", "family");
|
|
324
|
+
const a = t.evaluate("family", e);
|
|
325
|
+
if (a) {
|
|
326
|
+
const t = a.getAttribute("val");
|
|
327
327
|
if (t) switch (t) {
|
|
328
328
|
case "1":
|
|
329
|
-
|
|
329
|
+
o.fallbacks = ["serif"];
|
|
330
330
|
break;
|
|
331
331
|
case "2":
|
|
332
|
-
|
|
332
|
+
o.fallbacks = ["sans-serif"];
|
|
333
333
|
break;
|
|
334
334
|
case "3":
|
|
335
|
-
|
|
335
|
+
o.fallbacks = ["monospace"];
|
|
336
336
|
break;
|
|
337
337
|
case "4":
|
|
338
|
-
|
|
338
|
+
o.fallbacks = ["cursive"];
|
|
339
339
|
break;
|
|
340
|
-
case "5":
|
|
340
|
+
case "5": o.fallbacks = ["fantasy"];
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
|
|
344
|
-
for (const
|
|
345
|
-
const
|
|
346
|
-
void 0 !==
|
|
343
|
+
b(o, t.evaluate("scheme", e)?.getAttribute("val")), u(t, e, o, "shadow", "shadow", !0), u(t, e, o, "outline", "outline", !0);
|
|
344
|
+
for (const s of ["condense", "extend"]) {
|
|
345
|
+
const i = r(s, !!t.getValAttrAsBoolean(s, e, !0));
|
|
346
|
+
void 0 !== i && (o.letterSpacing = i);
|
|
347
347
|
}
|
|
348
|
-
return M(t,
|
|
348
|
+
return M(t, e, o, "charset", "charset"), o;
|
|
349
349
|
}
|
|
350
350
|
processFills(t, e, o) {
|
|
351
351
|
if (!e) return;
|
|
@@ -496,31 +496,31 @@ var pt = class {
|
|
|
496
496
|
visit(t, e, o) {
|
|
497
497
|
if (e) return this.visitShape(t, e, o, "sp", "nvSpPr/cNvSpPr/spLocks");
|
|
498
498
|
}
|
|
499
|
-
visitShape(
|
|
500
|
-
const n =
|
|
499
|
+
visitShape(t, o, s, r, i) {
|
|
500
|
+
const n = v[r];
|
|
501
501
|
if (this.isGroupContent(s)) {
|
|
502
|
-
if (
|
|
503
|
-
const { movable:
|
|
504
|
-
n !== lt.Type.Shape && (l.type = n), this.readShapeDetails(
|
|
505
|
-
const a =
|
|
506
|
-
a?.hasAttribute?.("noChangeAspect") && (
|
|
507
|
-
const c = this.readTwinOf(
|
|
508
|
-
return void 0 !== c && Object.assign(l, { twinOf: c }), s.members.push(
|
|
509
|
-
}
|
|
510
|
-
if (
|
|
502
|
+
if (t.getPath().includes("Fallback")) return {};
|
|
503
|
+
const { movable: e, content: l } = this.readMemberHeader(t, o, "shape");
|
|
504
|
+
n !== lt.Type.Shape && (l.type = n), this.readShapeDetails(t, o, r, i, l), this.readStyleRefs(t, o, l);
|
|
505
|
+
const a = t.evaluate(i, o);
|
|
506
|
+
a?.hasAttribute?.("noChangeAspect") && (e.lockAspect = "1" === a.getAttribute("noChangeAspect"));
|
|
507
|
+
const c = this.readTwinOf(t, o);
|
|
508
|
+
return void 0 !== c && Object.assign(l, { twinOf: c }), s.members.push(e), l;
|
|
509
|
+
}
|
|
510
|
+
if (t.getPath().includes("Fallback") && s.content) {
|
|
511
511
|
const r = s.content.json;
|
|
512
512
|
if ("shape" === s.content.type && r && (r.type ?? lt.Type.Shape) === n) {
|
|
513
|
-
const s =
|
|
514
|
-
i && "" !==
|
|
513
|
+
const s = t.evaluate("txBody", o), i = s ? new O().readTextBody(t, s) : null;
|
|
514
|
+
i && "" !== e(i) && (r.text = i);
|
|
515
515
|
}
|
|
516
516
|
return {};
|
|
517
517
|
}
|
|
518
|
-
s = super.visit(
|
|
519
|
-
const l =
|
|
518
|
+
s = super.visit(t, o, s);
|
|
519
|
+
const l = t.evaluate(i, o);
|
|
520
520
|
l?.hasAttribute?.("noChangeAspect") && (s.lockAspect = "1" === l.getAttribute("noChangeAspect"));
|
|
521
|
-
const a = n === lt.Type.Shape ? {} : { type: n }, c = this.readSourceId(
|
|
522
|
-
void 0 !== c && (a.sourceId = c), this.readShapeDetails(
|
|
523
|
-
const u = this.readTwinOf(
|
|
521
|
+
const a = n === lt.Type.Shape ? {} : { type: n }, c = this.readSourceId(t, o);
|
|
522
|
+
void 0 !== c && (a.sourceId = c), this.readShapeDetails(t, o, r, i, a), this.readStyleRefs(t, o, a);
|
|
523
|
+
const u = this.readTwinOf(t, o);
|
|
524
524
|
return void 0 !== u && Object.assign(a, { twinOf: u }), this.setContent(s, {
|
|
525
525
|
type: "shape",
|
|
526
526
|
json: a
|
|
@@ -536,7 +536,7 @@ var pt = class {
|
|
|
536
536
|
const i = e.getAttribute("macro");
|
|
537
537
|
i && (r.macro = i);
|
|
538
538
|
const n = e.getAttribute("textlink");
|
|
539
|
-
n && (r.textLink = n), e.hasAttribute("fLocksText") && (r.locksText =
|
|
539
|
+
n && (r.textLink = n), e.hasAttribute("fLocksText") && (r.locksText = A(e.getAttribute("fLocksText"))), e.hasAttribute("fPublished") && (r.published = A(e.getAttribute("fPublished")));
|
|
540
540
|
const l = s.slice(0, s.lastIndexOf("/")), a = t.evaluate(l, e);
|
|
541
541
|
"1" === a?.getAttribute?.("txBox") && (r.textBox = !0);
|
|
542
542
|
const c = this.readLocks(t.evaluate(s, e));
|
|
@@ -554,10 +554,10 @@ var pt = class {
|
|
|
554
554
|
}, Lt = /^<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>$/, Dt = (t, e, o, s) => {
|
|
555
555
|
const r = t.evaluate(o, e), i = t.evaluate(s, e);
|
|
556
556
|
return r || i ? {
|
|
557
|
-
x:
|
|
558
|
-
y:
|
|
559
|
-
width:
|
|
560
|
-
height:
|
|
557
|
+
x: N(r?.getAttribute("x") ?? null) ?? 0,
|
|
558
|
+
y: N(r?.getAttribute("y") ?? null) ?? 0,
|
|
559
|
+
width: N(i?.getAttribute("cx") ?? null) ?? 0,
|
|
560
|
+
height: N(i?.getAttribute("cy") ?? null) ?? 0
|
|
561
561
|
} : null;
|
|
562
562
|
}, Et = { Checkbox: "checkbox" };
|
|
563
563
|
var Rt = (t) => {
|
|
@@ -570,76 +570,76 @@ var Rt = (t) => {
|
|
|
570
570
|
4: "cursive",
|
|
571
571
|
5: "fantasy"
|
|
572
572
|
};
|
|
573
|
-
function Yt(
|
|
574
|
-
const
|
|
575
|
-
for (let
|
|
576
|
-
const
|
|
577
|
-
if (1 ===
|
|
573
|
+
function Yt(e) {
|
|
574
|
+
const o = {}, s = e.childNodes;
|
|
575
|
+
for (let e = 0; e < s.length; e++) {
|
|
576
|
+
const i = s.item(e);
|
|
577
|
+
if (1 === i.nodeType) switch (i.localName) {
|
|
578
578
|
case "b":
|
|
579
|
-
|
|
579
|
+
o.weight = Rt(i) ? 700 : 400;
|
|
580
580
|
break;
|
|
581
581
|
case "i":
|
|
582
|
-
|
|
582
|
+
o.style = Rt(i) ? it.Style.Italic : it.Style.Normal;
|
|
583
583
|
break;
|
|
584
584
|
case "strike":
|
|
585
|
-
|
|
585
|
+
o.strike = j(Rt(i));
|
|
586
586
|
break;
|
|
587
587
|
case "outline":
|
|
588
|
-
|
|
588
|
+
o.outline = Rt(i);
|
|
589
589
|
break;
|
|
590
590
|
case "shadow":
|
|
591
|
-
|
|
591
|
+
o.shadow = Rt(i);
|
|
592
592
|
break;
|
|
593
593
|
case "condense":
|
|
594
594
|
case "extend": {
|
|
595
|
-
const t =
|
|
596
|
-
void 0 !== t && (
|
|
595
|
+
const t = r(i.localName, Rt(i));
|
|
596
|
+
void 0 !== t && (o.letterSpacing = t);
|
|
597
597
|
break;
|
|
598
598
|
}
|
|
599
599
|
case "u":
|
|
600
|
-
|
|
600
|
+
o.underline = y(i.getAttribute("val"));
|
|
601
601
|
break;
|
|
602
602
|
case "vertAlign": {
|
|
603
|
-
const t =
|
|
604
|
-
void 0 !== t && (
|
|
603
|
+
const t = Y(i.getAttribute("val"));
|
|
604
|
+
void 0 !== t && (o.baseline = t);
|
|
605
605
|
break;
|
|
606
606
|
}
|
|
607
607
|
case "sz": {
|
|
608
|
-
const t = parseFloat(
|
|
609
|
-
isNaN(t) || (
|
|
608
|
+
const t = parseFloat(i.getAttribute("val") ?? "");
|
|
609
|
+
isNaN(t) || (o.size = t);
|
|
610
610
|
break;
|
|
611
611
|
}
|
|
612
612
|
case "rFont": {
|
|
613
|
-
const t =
|
|
614
|
-
t && (
|
|
613
|
+
const t = i.getAttribute("val");
|
|
614
|
+
t && (o.family = t);
|
|
615
615
|
break;
|
|
616
616
|
}
|
|
617
617
|
case "family": {
|
|
618
|
-
const t = jt[
|
|
619
|
-
t && (
|
|
618
|
+
const t = jt[i.getAttribute("val") ?? ""];
|
|
619
|
+
t && (o.fallbacks = [t]);
|
|
620
620
|
break;
|
|
621
621
|
}
|
|
622
622
|
case "charset": {
|
|
623
|
-
const t = parseInt(
|
|
624
|
-
isNaN(t) || (
|
|
623
|
+
const t = parseInt(i.getAttribute("val") ?? "", 10);
|
|
624
|
+
isNaN(t) || (o.charset = t);
|
|
625
625
|
break;
|
|
626
626
|
}
|
|
627
627
|
case "scheme":
|
|
628
|
-
|
|
628
|
+
b(o, i.getAttribute("val"));
|
|
629
629
|
break;
|
|
630
630
|
case "color": {
|
|
631
|
-
const
|
|
632
|
-
if (
|
|
633
|
-
|
|
631
|
+
const e = i.getAttribute("rgb");
|
|
632
|
+
if (e && !i.hasAttribute("theme")) {
|
|
633
|
+
o.color = "#" + (8 === e.length ? e.substring(2) : e).toUpperCase();
|
|
634
634
|
break;
|
|
635
635
|
}
|
|
636
|
-
const
|
|
637
|
-
|
|
636
|
+
const s = t((t) => i.getAttribute(t));
|
|
637
|
+
s && (o.color = s);
|
|
638
638
|
break;
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
return Object.keys(
|
|
642
|
+
return Object.keys(o).length > 0 ? o : null;
|
|
643
643
|
}
|
|
644
644
|
var Xt = {
|
|
645
645
|
RelsVisitor: class {
|
|
@@ -718,14 +718,14 @@ var Xt = {
|
|
|
718
718
|
}
|
|
719
719
|
},
|
|
720
720
|
ShapePropertiesVisitor: h,
|
|
721
|
-
TextPropertiesVisitor:
|
|
722
|
-
ShapeTextVisitor:
|
|
721
|
+
TextPropertiesVisitor: P,
|
|
722
|
+
ShapeTextVisitor: O,
|
|
723
723
|
ThemeVisitor: class {
|
|
724
724
|
visit(t, e, o) {
|
|
725
725
|
o.name = e.getAttribute("name"), o.objectDefaults = {};
|
|
726
726
|
const s = At(e, "custClrLst")[0];
|
|
727
727
|
if (s) {
|
|
728
|
-
const e = new
|
|
728
|
+
const e = new m(), r = [];
|
|
729
729
|
for (const o of At(s, "custClr")) {
|
|
730
730
|
const s = e.processAdjColor(t, o);
|
|
731
731
|
if (!s) continue;
|
|
@@ -747,7 +747,7 @@ var Xt = {
|
|
|
747
747
|
return o;
|
|
748
748
|
}
|
|
749
749
|
},
|
|
750
|
-
ClrSchemeVisitor: class extends
|
|
750
|
+
ClrSchemeVisitor: class extends m {
|
|
751
751
|
visit(t, e, o) {
|
|
752
752
|
const s = {};
|
|
753
753
|
s.name = e.getAttribute("name");
|
|
@@ -805,13 +805,13 @@ var Xt = {
|
|
|
805
805
|
processDefault(t, e) {
|
|
806
806
|
const o = {}, s = t.evaluate("spPr", e);
|
|
807
807
|
s && new h().visit(t, s, o);
|
|
808
|
-
const r = new
|
|
808
|
+
const r = new O().readTextBody(t, e);
|
|
809
809
|
(r.body || r.listStyle) && (o.text = r);
|
|
810
810
|
const i = t.evaluate("style", e);
|
|
811
811
|
return i && (o.style = Nt(t, i)), o;
|
|
812
812
|
}
|
|
813
813
|
},
|
|
814
|
-
FmtSchemeVisitor: class extends
|
|
814
|
+
FmtSchemeVisitor: class extends m {
|
|
815
815
|
visit(t, e, o) {
|
|
816
816
|
const s = this.parseFillList(t, e, "fillStyleLst"), r = this.parseLnList(t, e, "lnStyleLst"), i = this.parseEffectStyleList(t, e, "effectStyleLst"), n = this.parseFillList(t, e, "bgFillStyleLst");
|
|
817
817
|
if (s && (o.fillStyleLst = s), r && (o.lnStyleLst = r), i && (o.effectStyleLst = i), n && (o.bgFillStyleLst = n), s && r && i && n) return;
|
|
@@ -887,7 +887,7 @@ var Xt = {
|
|
|
887
887
|
return r && (o.style = r), s;
|
|
888
888
|
}
|
|
889
889
|
processCustomFilter(t, e) {
|
|
890
|
-
return
|
|
890
|
+
return X({
|
|
891
891
|
operator: e.getAttribute("operator"),
|
|
892
892
|
val: e.getAttribute("val")
|
|
893
893
|
}, (e) => t.warn(e));
|
|
@@ -905,10 +905,10 @@ var Xt = {
|
|
|
905
905
|
let s = null;
|
|
906
906
|
"customFilter" === o.localName && (s = this.processCustomFilter(t, o)), s && r.push(s);
|
|
907
907
|
}
|
|
908
|
-
return 1 === r.length ? r[0] :
|
|
908
|
+
return 1 === r.length ? r[0] : x(i);
|
|
909
909
|
}
|
|
910
910
|
processDynamicFilter(t, e) {
|
|
911
|
-
return
|
|
911
|
+
return C(e.getAttribute("type"), e.getAttribute("val"), e.getAttribute("maxVal"));
|
|
912
912
|
}
|
|
913
913
|
processDateGroupItem(t, e) {
|
|
914
914
|
const o = {};
|
|
@@ -958,7 +958,7 @@ var Xt = {
|
|
|
958
958
|
for (let e = 0; e < o.length; e++) {
|
|
959
959
|
const s = o.item(e);
|
|
960
960
|
if (1 !== s.nodeType || "ext" !== s.localName) continue;
|
|
961
|
-
if (
|
|
961
|
+
if (g(s.getAttribute("uri")) !== g("{1AD28BCE-077C-4C59-8B6E-1921CE8616D4}")) continue;
|
|
962
962
|
const r = s.childNodes;
|
|
963
963
|
for (let e = 0; e < r.length; e++) {
|
|
964
964
|
const o = r.item(e);
|
|
@@ -987,12 +987,12 @@ var Xt = {
|
|
|
987
987
|
if (!e.hasAttribute("colId")) return;
|
|
988
988
|
const s = parseInt(e.getAttribute("colId"));
|
|
989
989
|
let r = !1;
|
|
990
|
-
if (e.hasAttribute("hiddenButton") && (r =
|
|
990
|
+
if (e.hasAttribute("hiddenButton") && (r = A(e.getAttribute("hiddenButton"))), r && o) {
|
|
991
991
|
let t = o.hiddenButtons;
|
|
992
992
|
t || (t = [], o.hiddenButtons = t), t.push(s);
|
|
993
993
|
}
|
|
994
994
|
let i = !1;
|
|
995
|
-
if (e.hasAttribute("showButton") && (i =
|
|
995
|
+
if (e.hasAttribute("showButton") && (i = A(e.getAttribute("showButton"))), i && o) {
|
|
996
996
|
let t = o.showButtons;
|
|
997
997
|
!0 !== t && (t || (t = [], o.showButtons = t), t[s] = !0);
|
|
998
998
|
}
|
|
@@ -1015,29 +1015,29 @@ var Xt = {
|
|
|
1015
1015
|
SortStateVisitor: class {
|
|
1016
1016
|
visit(t, e, o) {
|
|
1017
1017
|
if (!e) return;
|
|
1018
|
-
const s = e.getAttribute("ref"),
|
|
1019
|
-
e.hasAttribute("caseSensitive") && (
|
|
1020
|
-
const
|
|
1021
|
-
null !=
|
|
1022
|
-
...
|
|
1018
|
+
const s = e.getAttribute("ref"), r = {};
|
|
1019
|
+
e.hasAttribute("caseSensitive") && (r.collatorOptions = A(e.getAttribute("caseSensitive")) ? dt.CaseSensitiveOptions : dt.CaseInsensitiveOptions);
|
|
1020
|
+
const i = e.getAttribute("sortMethod");
|
|
1021
|
+
null != i && "none" !== i && ("stroke" === i ? r.collatorOptions = {
|
|
1022
|
+
...r.collatorOptions,
|
|
1023
1023
|
collation: "stroke"
|
|
1024
|
-
} : "pinYin" ===
|
|
1025
|
-
...
|
|
1024
|
+
} : "pinYin" === i && (r.collatorOptions = {
|
|
1025
|
+
...r.collatorOptions,
|
|
1026
1026
|
collation: "pinyin"
|
|
1027
1027
|
}));
|
|
1028
|
-
const
|
|
1029
|
-
e.hasAttribute("columnSort") &&
|
|
1030
|
-
const
|
|
1031
|
-
this.processSortConditions(t, e,
|
|
1032
|
-
const
|
|
1033
|
-
if (
|
|
1034
|
-
const t = Q.fastStringToRange(
|
|
1035
|
-
|
|
1036
|
-
range:
|
|
1037
|
-
sorts:
|
|
1028
|
+
const n = {};
|
|
1029
|
+
e.hasAttribute("columnSort") && A(e.getAttribute("columnSort")) && (n.axis = nt.Axis.Column);
|
|
1030
|
+
const l = Q.fastStringToRange(s), a = [], c = [];
|
|
1031
|
+
this.processSortConditions(t, e, a, l, r, c), a.length > 0 && (n.sorts = a);
|
|
1032
|
+
const u = t.getVisitorParamsState().get("ref");
|
|
1033
|
+
if (u && s) {
|
|
1034
|
+
const t = Q.fastStringToRange(u);
|
|
1035
|
+
n.extent = {
|
|
1036
|
+
range: p(t, l),
|
|
1037
|
+
sorts: c.map((e) => k(t, l, e))
|
|
1038
1038
|
};
|
|
1039
1039
|
}
|
|
1040
|
-
return Object.keys(
|
|
1040
|
+
return Object.keys(a).length > 0 && (o.sort = n), n;
|
|
1041
1041
|
}
|
|
1042
1042
|
processSortCondition(t, e, o, s, r) {
|
|
1043
1043
|
if (!e) return null;
|
|
@@ -1048,8 +1048,8 @@ var Xt = {
|
|
|
1048
1048
|
i.index = o ? s.colStart - o.colStart : s.colStart, r?.push(s);
|
|
1049
1049
|
}
|
|
1050
1050
|
const n = { ...s };
|
|
1051
|
-
i.criteria = n, n.reverse = !1, e.hasAttribute("descending") && (n.reverse =
|
|
1052
|
-
const l =
|
|
1051
|
+
i.criteria = n, n.reverse = !1, e.hasAttribute("descending") && (n.reverse = A(e.getAttribute("descending")));
|
|
1052
|
+
const l = V(e.getAttribute("sortBy"));
|
|
1053
1053
|
l && (n.sortOn = l);
|
|
1054
1054
|
const a = St(t, e);
|
|
1055
1055
|
return a && (n.style = a), t.copyFromAttribute(e, "iconSet", n), t.copyFromAttribute(e, "customList", n), i;
|
|
@@ -1075,15 +1075,15 @@ var Xt = {
|
|
|
1075
1075
|
borders: {}
|
|
1076
1076
|
}, r = t.evaluate("fonts", e);
|
|
1077
1077
|
this.processFonts(t, r, s.fonts);
|
|
1078
|
-
const
|
|
1078
|
+
const n = s.fonts[this.normalFontId(t, e)], l = {
|
|
1079
1079
|
declared: ["1", "true"].includes(r?.getAttribute("x14ac:knownFonts") ?? ""),
|
|
1080
|
-
normalIsThemeFont:
|
|
1080
|
+
normalIsThemeFont: F(n?.family),
|
|
1081
1081
|
faces: _(Object.values(s.fonts).map((t) => ({
|
|
1082
1082
|
...t,
|
|
1083
|
-
family:
|
|
1083
|
+
family: i(t?.family, t?.fallbacks, null, !1).name
|
|
1084
1084
|
})))
|
|
1085
1085
|
};
|
|
1086
|
-
t.getVisitorParamsState().set(
|
|
1086
|
+
t.getVisitorParamsState().set(D, l), n && t.getVisitorParamsState().set(z, n), this.processFills(t, t.evaluate("fills", e), s.fills), this.processBorders(t, t.evaluate("borders", e), s.borders, !0), s.fills[0] = { type: rt.Type.None }, s.fills[1] = {
|
|
1087
1087
|
type: rt.Type.Pattern,
|
|
1088
1088
|
patternType: rt.BuiltInSheetPattern.Gray125
|
|
1089
1089
|
}, s.borders[0] = {
|
|
@@ -1092,23 +1092,23 @@ var Xt = {
|
|
|
1092
1092
|
right: { style: et.StrokeStyle.None },
|
|
1093
1093
|
top: { style: et.StrokeStyle.None }
|
|
1094
1094
|
};
|
|
1095
|
-
const
|
|
1096
|
-
this.processXFs(t, t.evaluate("cellStyleXfs", e),
|
|
1097
|
-
const
|
|
1098
|
-
if (
|
|
1095
|
+
const a = [];
|
|
1096
|
+
this.processXFs(t, t.evaluate("cellStyleXfs", e), a, s, null, !1);
|
|
1097
|
+
const c = /* @__PURE__ */ new Map();
|
|
1098
|
+
if (a.length > 0) {
|
|
1099
1099
|
const s = [];
|
|
1100
|
-
this.processCellStyles(t, t.evaluate("cellStyles", e), s,
|
|
1101
|
-
}
|
|
1102
|
-
const
|
|
1103
|
-
this.processXFs(t, t.evaluate("cellXfs", e),
|
|
1104
|
-
const
|
|
1105
|
-
|
|
1106
|
-
const
|
|
1107
|
-
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1110
|
-
const
|
|
1111
|
-
return this.processDXFs(t, t.evaluate("dxfs", e),
|
|
1100
|
+
this.processCellStyles(t, t.evaluate("cellStyles", e), s, a, c), o.named = s;
|
|
1101
|
+
}
|
|
1102
|
+
const u = [];
|
|
1103
|
+
this.processXFs(t, t.evaluate("cellXfs", e), u, s, c), Object.keys(u).length > 0 && (o.direct = u);
|
|
1104
|
+
const d = this.collectHiddenXfs(t.evaluate("cellXfs", e));
|
|
1105
|
+
d.size > 0 && t.getVisitorParamsState().set(G, d);
|
|
1106
|
+
const h = this.collectPivotButtonXfs(t.evaluate("cellXfs", e));
|
|
1107
|
+
h.size > 0 && t.getVisitorParamsState().set($, h);
|
|
1108
|
+
const p = this.collectXfComplements(t.evaluate("cellXfs", e));
|
|
1109
|
+
p.size > 0 && t.getVisitorParamsState().set(W, p);
|
|
1110
|
+
const m = [];
|
|
1111
|
+
return this.processDXFs(t, t.evaluate("dxfs", e), m), this.processTableStyles(t, t.evaluate("tableStyles", e), o, m), this.processSlicerStyles(t, t.evaluate("extLst", e), o), this.processIndexColors(t, t.evaluate("colors/indexedColors", e), o), this.processMruColors(t, t.evaluate("colors/mruColors", e), o), o;
|
|
1112
1112
|
}
|
|
1113
1113
|
normalFontId(t, e) {
|
|
1114
1114
|
const o = t.evaluate("cellStyles", e)?.childNodes;
|
|
@@ -1186,30 +1186,30 @@ var Xt = {
|
|
|
1186
1186
|
const t = r.get(parseInt(n));
|
|
1187
1187
|
t && t !== ot.BuiltInName.Normal && (o.named = t);
|
|
1188
1188
|
}
|
|
1189
|
-
const l = (t) => !(!i && e.hasAttribute(t)) ||
|
|
1189
|
+
const l = (t) => !(!i && e.hasAttribute(t)) || A(e.getAttribute(t)), a = (t) => !i || e.hasAttribute(t) && A(e.getAttribute(t)), c = "0", u = i ? c : void 0;
|
|
1190
1190
|
if (l("applyFont")) {
|
|
1191
|
-
const t = e.getAttribute("fontId") ??
|
|
1191
|
+
const t = e.getAttribute("fontId") ?? u;
|
|
1192
1192
|
if (void 0 !== t && (t !== c || a("applyFont"))) {
|
|
1193
1193
|
const e = s.fonts[t];
|
|
1194
1194
|
void 0 !== e && (o.font = e);
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
1197
|
if (l("applyFill")) {
|
|
1198
|
-
const t = e.getAttribute("fillId") ??
|
|
1198
|
+
const t = e.getAttribute("fillId") ?? u;
|
|
1199
1199
|
if (void 0 !== t && (t !== c || a("applyFill"))) {
|
|
1200
1200
|
const e = s.fills[t];
|
|
1201
1201
|
void 0 !== e && Object.keys(e).length > 0 && (o.fill = e);
|
|
1202
1202
|
}
|
|
1203
1203
|
}
|
|
1204
1204
|
if (l("applyBorder")) {
|
|
1205
|
-
const t = e.getAttribute("borderId") ??
|
|
1205
|
+
const t = e.getAttribute("borderId") ?? u;
|
|
1206
1206
|
if (void 0 !== t && (t !== c || a("applyBorder"))) {
|
|
1207
1207
|
const e = s.borders[t];
|
|
1208
1208
|
void 0 !== e && (o.borders = e);
|
|
1209
1209
|
}
|
|
1210
1210
|
}
|
|
1211
1211
|
if (l("applyNumberFormat")) {
|
|
1212
|
-
const s = e.getAttribute("numFmtId") ??
|
|
1212
|
+
const s = e.getAttribute("numFmtId") ?? u;
|
|
1213
1213
|
if (void 0 !== s && (s !== c || a("applyNumberFormat"))) {
|
|
1214
1214
|
const e = parseInt(s);
|
|
1215
1215
|
let r;
|
|
@@ -1228,16 +1228,16 @@ var Xt = {
|
|
|
1228
1228
|
const s = t.evaluate("protection", e);
|
|
1229
1229
|
(s || a("applyProtection")) && this.processProtection(t, s, o);
|
|
1230
1230
|
}
|
|
1231
|
-
const
|
|
1232
|
-
|
|
1231
|
+
const d = A(e.getAttribute("quotePrefix") ?? "");
|
|
1232
|
+
d && (o.quotePrefix = d);
|
|
1233
1233
|
}
|
|
1234
1234
|
processAlignment(t, e, o) {
|
|
1235
1235
|
const s = {};
|
|
1236
|
-
if (e?.hasAttribute("horizontal") ? s.horizontal = e.getAttribute("horizontal") : s.horizontal = ct.HorizontalAlignment.General, e?.hasAttribute("vertical") ? s.vertical = e.getAttribute("vertical") : s.vertical = ct.VerticalAlignment.Bottom, e?.hasAttribute("indent") ? s.indent = parseInt(e.getAttribute("indent")) : s.indent = 0, e?.hasAttribute("relativeIndent") ? s.relativeIndent = parseInt(e.getAttribute("relativeIndent")) : s.relativeIndent = 0,
|
|
1236
|
+
if (e?.hasAttribute("horizontal") ? s.horizontal = e.getAttribute("horizontal") : s.horizontal = ct.HorizontalAlignment.General, e?.hasAttribute("vertical") ? s.vertical = e.getAttribute("vertical") : s.vertical = ct.VerticalAlignment.Bottom, e?.hasAttribute("indent") ? s.indent = parseInt(e.getAttribute("indent")) : s.indent = 0, e?.hasAttribute("relativeIndent") ? s.relativeIndent = parseInt(e.getAttribute("relativeIndent")) : s.relativeIndent = 0, A(e?.getAttribute("wrapText") ?? "") ? s.overflow = ct.Overflow.Wrap : s.overflow = ct.Overflow.Visible, A(e?.getAttribute("shrinkToFit") ?? "") && (s.overflow = ct.Overflow.Shrink), e?.hasAttribute("textRotation")) {
|
|
1237
1237
|
let t = parseFloat(e.getAttribute("textRotation"));
|
|
1238
1238
|
t > 0 && t <= 90 ? t = 360 - t : t > 90 && t <= 180 ? t -= 90 : 255 === t && (t = 0, s.stacked = !0), s.rotation = t;
|
|
1239
1239
|
} else s.rotation = 0;
|
|
1240
|
-
e?.hasAttribute("justifyLastLine") && (s.justifyLastLine =
|
|
1240
|
+
e?.hasAttribute("justifyLastLine") && (s.justifyLastLine = A(e.getAttribute("justifyLastLine")));
|
|
1241
1241
|
const r = e?.getAttribute("readingOrder");
|
|
1242
1242
|
return r && ("0" === r ? s.readingDirection = ct.ReadingDirection.Auto : "1" === r ? s.readingDirection = ct.ReadingDirection.LeftToRight : "2" === r ? s.readingDirection = ct.ReadingDirection.RightToLeft : t.warn(`Invalid readingOrder '${r}'; the direction was left automatic.`, { onceKey: "xlsx.style.readingOrder" })), Object.keys(s).length > 0 && (o.alignment = s), o;
|
|
1243
1243
|
}
|
|
@@ -1252,7 +1252,7 @@ var Xt = {
|
|
|
1252
1252
|
const i = r.childNodes;
|
|
1253
1253
|
for (let t = 0; t < i.length; t++) {
|
|
1254
1254
|
const o = i.item(t);
|
|
1255
|
-
1 === o.nodeType && "protection" === o.localName &&
|
|
1255
|
+
1 === o.nodeType && "protection" === o.localName && A(o.getAttribute("hidden") ?? "") && e.add(s);
|
|
1256
1256
|
}
|
|
1257
1257
|
s++;
|
|
1258
1258
|
}
|
|
@@ -1265,7 +1265,7 @@ var Xt = {
|
|
|
1265
1265
|
let s = 0;
|
|
1266
1266
|
for (let t = 0; t < o.length; t++) {
|
|
1267
1267
|
const r = o.item(t);
|
|
1268
|
-
1 === r.nodeType && "xf" === r.localName && (
|
|
1268
|
+
1 === r.nodeType && "xf" === r.localName && (A(r.getAttribute("pivotButton") ?? "") && e.add(s), s++);
|
|
1269
1269
|
}
|
|
1270
1270
|
return e;
|
|
1271
1271
|
}
|
|
@@ -1292,7 +1292,7 @@ var Xt = {
|
|
|
1292
1292
|
processProtection(t, e, o) {
|
|
1293
1293
|
if (!e) return;
|
|
1294
1294
|
const s = e.getAttribute("locked");
|
|
1295
|
-
return o.protection = { alwaysUnlocked: !!s && !
|
|
1295
|
+
return o.protection = { alwaysUnlocked: !!s && !A(s) }, o;
|
|
1296
1296
|
}
|
|
1297
1297
|
processDXF(t, e, o) {
|
|
1298
1298
|
if (!e) return;
|
|
@@ -1386,7 +1386,7 @@ var Xt = {
|
|
|
1386
1386
|
}
|
|
1387
1387
|
processTableStyle(t, e, o, s, r = !1) {
|
|
1388
1388
|
const i = e.getAttribute("name"), n = { name: i };
|
|
1389
|
-
e.hasAttribute("table") && (n.table =
|
|
1389
|
+
e.hasAttribute("table") && (n.table = A(e.getAttribute("table"))), n.pivot = !e.hasAttribute("pivot") || A(e.getAttribute("pivot")), r && !n.pivot && s.unshift(null);
|
|
1390
1390
|
const l = e.childNodes, a = l.length;
|
|
1391
1391
|
for (let e = 0; e < a; e++) {
|
|
1392
1392
|
const o = l.item(e);
|
|
@@ -1430,7 +1430,7 @@ var Xt = {
|
|
|
1430
1430
|
name: l,
|
|
1431
1431
|
style: s[t]
|
|
1432
1432
|
};
|
|
1433
|
-
e.getAttribute("hidden") && (a.hidden =
|
|
1433
|
+
e.getAttribute("hidden") && (a.hidden = A(e.getAttribute("hidden"))), e.getAttribute("iLevel") && (a.iLevel = parseInt(e.getAttribute("iLevel"))), null !== n && A(e.getAttribute("customBuiltin") ?? "0") && (a.customized = !0), o.push(a);
|
|
1434
1434
|
}
|
|
1435
1435
|
}
|
|
1436
1436
|
}
|
|
@@ -1449,7 +1449,7 @@ var Xt = {
|
|
|
1449
1449
|
if (!e) return;
|
|
1450
1450
|
const s = {};
|
|
1451
1451
|
this.processPassword(t, e, s, "workbook", "password"), this.processPassword(t, e, s, "revisions", "revisionsPassword");
|
|
1452
|
-
for (const t of
|
|
1452
|
+
for (const t of T) s[t.key] = R(t, e.getAttribute(t.attribute));
|
|
1453
1453
|
return o.protection = s, o;
|
|
1454
1454
|
}
|
|
1455
1455
|
processCalcPr(t, e, o) {
|
|
@@ -1468,22 +1468,22 @@ var Xt = {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
o.sheets = s;
|
|
1470
1470
|
}
|
|
1471
|
-
processSheetRef(
|
|
1472
|
-
const
|
|
1473
|
-
|
|
1474
|
-
const
|
|
1475
|
-
if (
|
|
1476
|
-
const
|
|
1477
|
-
if (
|
|
1478
|
-
const
|
|
1479
|
-
|
|
1471
|
+
processSheetRef(e, s, r) {
|
|
1472
|
+
const i = {};
|
|
1473
|
+
e.copyFromAttribute(s, "name", i, "name"), e.copyFromAttribute(s, "state", i, "visibility"), e.copyFromAttribute(s, "sheetId", i, "sheetId", e.INT_COPY);
|
|
1474
|
+
const n = s.getAttribute("r:id"), l = n ? I(e.getRelationships().get(n)?.type) : null;
|
|
1475
|
+
if (l) {
|
|
1476
|
+
const s = e.readEmbeddedPart(n);
|
|
1477
|
+
if (s?.xml) {
|
|
1478
|
+
const e = { part: s }, n = o(s.xml), a = n ? t((t) => n.get(t)) : void 0;
|
|
1479
|
+
a && (e.tabColor = a), i.kind = l, i.sheet = e, r.push(i);
|
|
1480
1480
|
return;
|
|
1481
1481
|
}
|
|
1482
|
-
|
|
1482
|
+
e.warn(`The ${l} sheet '${i.name}' could not be read and was loaded as an empty worksheet.`), r.push(i);
|
|
1483
1483
|
return;
|
|
1484
1484
|
}
|
|
1485
|
-
const
|
|
1486
|
-
|
|
1485
|
+
const a = n ? e.getRef(n) : null;
|
|
1486
|
+
a && (i.sheet = a), r.push(i);
|
|
1487
1487
|
}
|
|
1488
1488
|
processExternalReferences(t, e, o) {
|
|
1489
1489
|
if (!e) return;
|
|
@@ -1499,7 +1499,7 @@ var Xt = {
|
|
|
1499
1499
|
}
|
|
1500
1500
|
processPivotCaches(t, e, o) {
|
|
1501
1501
|
if (!e) return;
|
|
1502
|
-
const s = [], r = t.evaluate("workbookPr", e.parentNode)?.getAttribute?.("date1904"), i = "1" === r || "true" === r, n =
|
|
1502
|
+
const s = [], r = t.evaluate("workbookPr", e.parentNode)?.getAttribute?.("date1904"), i = "1" === r || "true" === r, n = B(t.getVisitorParamsState().get("numFmts"), void 0), l = e.childNodes, a = l.length;
|
|
1503
1503
|
for (let e = 0; e < a; e++) {
|
|
1504
1504
|
const o = l.item(e);
|
|
1505
1505
|
if (1 !== o.nodeType || "pivotCache" !== o.localName) continue;
|
|
@@ -1507,7 +1507,7 @@ var Xt = {
|
|
|
1507
1507
|
if (isNaN(r) || !a) continue;
|
|
1508
1508
|
const c = t.readEmbeddedPart(a);
|
|
1509
1509
|
if (!c) continue;
|
|
1510
|
-
const u = K(c, i, (t) => n.numberFormat(t)), d = !u && c.xml ?
|
|
1510
|
+
const u = K(c, i, (t) => n.numberFormat(t)), d = !u && c.xml ? w(c.xml, n) : void 0, h = !u && c.xml ? J(c.xml) : void 0;
|
|
1511
1511
|
s.push({
|
|
1512
1512
|
cacheId: r,
|
|
1513
1513
|
part: c,
|
|
@@ -1912,7 +1912,7 @@ var Xt = {
|
|
|
1912
1912
|
x: 0,
|
|
1913
1913
|
y: 0
|
|
1914
1914
|
};
|
|
1915
|
-
return n.x =
|
|
1915
|
+
return n.x = N(e.getAttribute(r)), n.y = N(e.getAttribute(i)), "from" === s ? o.tl = n : o.br = n, o;
|
|
1916
1916
|
}
|
|
1917
1917
|
processOffsetCoord(t, e, o, s) {
|
|
1918
1918
|
if (!e) return;
|
|
@@ -1922,7 +1922,7 @@ var Xt = {
|
|
|
1922
1922
|
x: 0,
|
|
1923
1923
|
y: 0
|
|
1924
1924
|
};
|
|
1925
|
-
return t.evaluate("col", e) && (r.c = parseInt(t.evaluate("col", e).textContent)), t.evaluate("row", e) && (r.r = parseInt(t.evaluate("row", e).textContent)), t.evaluate("colOff", e) && (r.x =
|
|
1925
|
+
return t.evaluate("col", e) && (r.c = parseInt(t.evaluate("col", e).textContent)), t.evaluate("row", e) && (r.r = parseInt(t.evaluate("row", e).textContent)), t.evaluate("colOff", e) && (r.x = N(t.evaluate("colOff", e).textContent)), t.evaluate("rowOff", e) && (r.y = N(t.evaluate("rowOff", e).textContent)), "from" === s ? o.tl = r : o.br = r, o;
|
|
1926
1926
|
}
|
|
1927
1927
|
},
|
|
1928
1928
|
DrawingGraphicFrameVisitor: class extends Ft {
|
|
@@ -1932,27 +1932,27 @@ var Xt = {
|
|
|
1932
1932
|
if (t.getPath().includes("Fallback")) return {};
|
|
1933
1933
|
const { movable: s } = this.readMemberHeader(t, e, "graphicFrame"), r = t.evaluate("xfrm", e);
|
|
1934
1934
|
if (r) {
|
|
1935
|
-
|
|
1935
|
+
a(r, s);
|
|
1936
1936
|
const e = t.evaluate("off", r), o = t.evaluate("ext", r);
|
|
1937
1937
|
s.anchor = {
|
|
1938
1938
|
tl: {
|
|
1939
|
-
x:
|
|
1940
|
-
y:
|
|
1939
|
+
x: N(e?.getAttribute("x") ?? null) ?? 0,
|
|
1940
|
+
y: N(e?.getAttribute("y") ?? null) ?? 0
|
|
1941
1941
|
},
|
|
1942
1942
|
br: {
|
|
1943
|
-
x:
|
|
1944
|
-
y:
|
|
1943
|
+
x: N(o?.getAttribute("cx") ?? null) ?? 0,
|
|
1944
|
+
y: N(o?.getAttribute("cy") ?? null) ?? 0
|
|
1945
1945
|
}
|
|
1946
1946
|
};
|
|
1947
1947
|
}
|
|
1948
|
-
const i = this.readGraphic(t, e),
|
|
1948
|
+
const i = this.readGraphic(t, e), n = "chart" === i.type ? {
|
|
1949
1949
|
...s.content.json,
|
|
1950
1950
|
...i.json
|
|
1951
1951
|
} : i.json;
|
|
1952
1952
|
return s.content = {
|
|
1953
1953
|
...s.content,
|
|
1954
1954
|
type: i.type,
|
|
1955
|
-
json:
|
|
1955
|
+
json: n
|
|
1956
1956
|
}, o.members.push(s), i.json;
|
|
1957
1957
|
}
|
|
1958
1958
|
o = super.visit(t, e, o);
|
|
@@ -2022,7 +2022,7 @@ var Xt = {
|
|
|
2022
2022
|
readPictureDetails(t, e, o, s, r) {
|
|
2023
2023
|
void 0 !== o?.resId && (r.resId = o.resId), o?.image && (r.image = o.image);
|
|
2024
2024
|
const i = e.getAttribute("macro");
|
|
2025
|
-
i && (r.macro = i), e.hasAttribute("fPublished") && (r.published =
|
|
2025
|
+
i && (r.macro = i), e.hasAttribute("fPublished") && (r.published = A(e.getAttribute("fPublished")));
|
|
2026
2026
|
const n = t.evaluate("nvPicPr/cNvPicPr", e);
|
|
2027
2027
|
if (n?.getAttribute) {
|
|
2028
2028
|
"0" === n.getAttribute("preferRelativeResize") && (r.noRelativeResize = !0);
|
|
@@ -2034,7 +2034,7 @@ var Xt = {
|
|
|
2034
2034
|
const o = t.evaluate("blipFill", e), s = o ? t.evaluate("blip", o) : null;
|
|
2035
2035
|
if (!s) return;
|
|
2036
2036
|
if (!(s.getAttribute("r:embed") ?? s.getAttribute("embed") ?? s.getAttribute("r:link") ?? s.getAttribute("link"))) return t.warn("A picture names no image; it was not imported.", { onceKey: "xlsx.drawing.picture.noRel" }), null;
|
|
2037
|
-
const { type: r, resId: i, ...n } = new
|
|
2037
|
+
const { type: r, resId: i, ...n } = new m().processImageFill(t, o);
|
|
2038
2038
|
return !n.tile && n.stretch && 0 === Object.keys(n.stretch).length && delete n.stretch, n.extLst && Lt.test(n.extLst) && delete n.extLst, {
|
|
2039
2039
|
resId: i,
|
|
2040
2040
|
image: Object.keys(n).length > 0 ? n : void 0
|
|
@@ -2043,7 +2043,7 @@ var Xt = {
|
|
|
2043
2043
|
},
|
|
2044
2044
|
DrawingGrpSpVisitor: class extends Ft {
|
|
2045
2045
|
constructor(...t) {
|
|
2046
|
-
super(...t), this._fills = new
|
|
2046
|
+
super(...t), this._fills = new m();
|
|
2047
2047
|
}
|
|
2048
2048
|
visit(t, e, o) {
|
|
2049
2049
|
if (!e) return;
|
|
@@ -2063,17 +2063,17 @@ var Xt = {
|
|
|
2063
2063
|
});
|
|
2064
2064
|
}
|
|
2065
2065
|
i.members = [];
|
|
2066
|
-
const
|
|
2067
|
-
|
|
2068
|
-
const
|
|
2069
|
-
|
|
2066
|
+
const n = t.evaluate("nvGrpSpPr/cNvGrpSpPr/grpSpLocks", e);
|
|
2067
|
+
n?.hasAttribute?.("noChangeAspect") && (r.lockAspect = "1" === n.getAttribute("noChangeAspect"));
|
|
2068
|
+
const l = this.readLocks(n);
|
|
2069
|
+
l && (i.locks = l);
|
|
2070
2070
|
const c = t.evaluate("grpSpPr", e);
|
|
2071
2071
|
if (c) {
|
|
2072
2072
|
const e = t.evaluate("xfrm", c);
|
|
2073
2073
|
if (e) {
|
|
2074
|
-
|
|
2075
|
-
const o = Dt(t, e, "off", "ext"),
|
|
2076
|
-
|
|
2074
|
+
a(e, r), "1" === e.getAttribute("flipH") && (r.flipH = !0), "1" === e.getAttribute("flipV") && (r.flipV = !0);
|
|
2075
|
+
const o = Dt(t, e, "off", "ext"), n = Dt(t, e, "chOff", "chExt") ?? o;
|
|
2076
|
+
n && (i.childBounds = n), s && o && (r.anchor = {
|
|
2077
2077
|
tl: {
|
|
2078
2078
|
x: o.x,
|
|
2079
2079
|
y: o.y
|
|
@@ -2086,9 +2086,9 @@ var Xt = {
|
|
|
2086
2086
|
}
|
|
2087
2087
|
const o = this._fills.getFill(t, c);
|
|
2088
2088
|
o && Object.keys(o).length > 0 && (i.fill = o);
|
|
2089
|
-
const
|
|
2090
|
-
|
|
2091
|
-
const
|
|
2089
|
+
const n = this._fills.getEffects(t, c);
|
|
2090
|
+
n && (i.effects = n);
|
|
2091
|
+
const l = t.evaluate("scene3d", c), u = l ? t.serializeElement(l) : null;
|
|
2092
2092
|
u && (i.scene3d = u);
|
|
2093
2093
|
const d = t.evaluate("extLst", c), h = d ? t.serializeElement(d) : null;
|
|
2094
2094
|
h && (i.extLst = {
|
|
@@ -2327,16 +2327,16 @@ var Xt = {
|
|
|
2327
2327
|
visit(t, e, o) {
|
|
2328
2328
|
if (!e) return;
|
|
2329
2329
|
const s = {};
|
|
2330
|
-
t.copyFromAttribute(e, "id", s, "id",
|
|
2330
|
+
t.copyFromAttribute(e, "id", s, "id", S);
|
|
2331
2331
|
const r = e.getAttribute("ref");
|
|
2332
|
-
t.copyFromAttribute(e, "personId", s, "personId",
|
|
2332
|
+
t.copyFromAttribute(e, "personId", s, "personId", S), t.copyFromAttribute(e, "parentId", s, "parentId", S);
|
|
2333
2333
|
const i = e.getAttribute("dT");
|
|
2334
2334
|
i && (s.dt = function(t) {
|
|
2335
2335
|
const e = /^(.*T\d{2}:\d{2}:\d{2})(?:\.(\d+))?(Z|[+-]\d{2}:?\d{2})?$/i.exec(t.trim());
|
|
2336
2336
|
if (!e) return t;
|
|
2337
2337
|
const [, o, s, r] = e;
|
|
2338
2338
|
return `${o}${s ? `.${(s + "00").substring(0, 3)}` : ""}${r ?? "Z"}`;
|
|
2339
|
-
}(i)), e.hasAttribute("done") && (s.done =
|
|
2339
|
+
}(i)), e.hasAttribute("done") && (s.done = A(e.getAttribute("done")));
|
|
2340
2340
|
const n = function(t) {
|
|
2341
2341
|
let e;
|
|
2342
2342
|
const o = t.childNodes;
|
|
@@ -2350,12 +2350,12 @@ var Xt = {
|
|
|
2350
2350
|
const s = o.getAttribute("mentionId"), i = o.getAttribute("mentionpersonId");
|
|
2351
2351
|
if (!s || !i) continue;
|
|
2352
2352
|
const n = {
|
|
2353
|
-
id:
|
|
2354
|
-
personId:
|
|
2353
|
+
id: S(s),
|
|
2354
|
+
personId: S(i)
|
|
2355
2355
|
}, l = parseInt(o.getAttribute("startIndex") ?? "", 10);
|
|
2356
2356
|
isNaN(l) || (n.startIndex = l);
|
|
2357
|
-
const
|
|
2358
|
-
isNaN(
|
|
2357
|
+
const a = parseInt(o.getAttribute("length") ?? "", 10);
|
|
2358
|
+
isNaN(a) || (n.length = a), (e ??= []).push(n);
|
|
2359
2359
|
}
|
|
2360
2360
|
}
|
|
2361
2361
|
return e;
|
|
@@ -2373,7 +2373,7 @@ var Xt = {
|
|
|
2373
2373
|
const o = r.item(e);
|
|
2374
2374
|
if (1 === o.nodeType && "person" === o.localName) {
|
|
2375
2375
|
const e = {};
|
|
2376
|
-
t.copyFromAttribute(o, "id", e, "id",
|
|
2376
|
+
t.copyFromAttribute(o, "id", e, "id", S), t.copyFromAttribute(o, "displayName", e), t.copyFromAttribute(o, "userId", e, "userId", S), t.copyFromAttribute(o, "providerId", e), s.push(e);
|
|
2377
2377
|
}
|
|
2378
2378
|
}
|
|
2379
2379
|
return s.length > 0 && (o.persons = s), s;
|
|
@@ -2476,4 +2476,4 @@ var Xt = {
|
|
|
2476
2476
|
return l;
|
|
2477
2477
|
}
|
|
2478
2478
|
};
|
|
2479
|
-
export { zt as DOMTransformer, yt as ExecutionContext, l as NumberUtils,
|
|
2479
|
+
export { zt as DOMTransformer, yt as ExecutionContext, l as NumberUtils, n as VisitorUtils };
|