@sheetxl/io-xlsx 0.8.0-beta.10 → 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.
Files changed (143) hide show
  1. package/browser/esm/{BLXcoiDAaOMjFuhw.mjs → 9dwUocbOsJuAcmKn.mjs} +3021 -1986
  2. package/browser/esm/{xc_LzCPgHn-acgFZ.mjs → BIvDjK4Zl8bWRgl8.mjs} +2 -2
  3. package/browser/esm/CcH5ITJFTMVWUJO9.mjs +6154 -0
  4. package/browser/esm/{CI_CZI5m5-KkiAK5.mjs → D8k22TSWPd_RHEpj.mjs} +1798 -1009
  5. package/browser/esm/{BKT8OBj-bhQwdg49.mjs → DKnOwucZq4z9_-r-.mjs} +47 -10
  6. package/browser/esm/{2EOdn2WRK5y1L58S.mjs → DO75RoAQTgMuVzXv.mjs} +2 -2
  7. package/browser/esm/{NQIuOQIleHC4NUW6.mjs → DVLJTjJCGqrJUa8c.mjs} +587 -705
  8. package/browser/esm/DeMZN_qj__PKo4Wh.mjs +2265 -0
  9. package/browser/esm/{DXopGe8PrLWmwGaV.mjs → DsppUz-14Z7ti9i3.mjs} +1 -1
  10. package/browser/esm/{B-jb5SuiVh5NnBG_.mjs → aUBXbTh2r0u3x4Xo.mjs} +2 -2
  11. package/browser/esm/index.mjs +2 -2
  12. package/node/esm/BmIIQODk4dBVIXA4.mjs +4455 -0
  13. package/node/esm/{CHqRP_NjPpPd7m9L.mjs → C-e5AO_4TnGywT-m.mjs} +1 -1
  14. package/node/esm/C78E45n6j2E8rruH.mjs +5694 -0
  15. package/node/esm/CDKm5s3JE_d99TJw.mjs +2369 -0
  16. package/node/esm/{BmdmvgO5Zdgx-RWo.mjs → DCaAOfuW-w_dx_qd.mjs} +2 -2
  17. package/node/esm/{O5mti2R9drFOlXc7.mjs → DSgxL0sBZtWMydVl.mjs} +2 -2
  18. package/node/esm/DXusvwW73FUDSyvD.mjs +6367 -0
  19. package/node/esm/DsyuWxk3bdGhJUQN.mjs +2346 -0
  20. package/node/esm/index.mjs +64 -27
  21. package/package.json +3 -3
  22. package/types/src/AutoFilterRules.d.ts +8 -1
  23. package/types/src/DataTableFormula.d.ts +36 -0
  24. package/types/src/DefinedNameAttributes.d.ts +8 -0
  25. package/types/src/ExcelCompat.d.ts +15 -3
  26. package/types/src/KnownFonts.d.ts +50 -0
  27. package/types/src/LegacyFormula.d.ts +13 -0
  28. package/types/src/PageLayoutAttributes.d.ts +8 -0
  29. package/types/src/Plugin.d.ts +12 -0
  30. package/types/src/ProtectionAttributes.d.ts +2 -2
  31. package/types/src/SheetKinds.d.ts +57 -0
  32. package/types/src/SheetViewAttributes.d.ts +4 -0
  33. package/types/src/SortExtent.d.ts +16 -0
  34. package/types/src/Types.d.ts +11 -0
  35. package/types/src/XlsxHeader.d.ts +19 -0
  36. package/types/src/chart/ChartExXml.d.ts +38 -0
  37. package/types/src/chart/ChartPartXml.d.ts +47 -0
  38. package/types/src/chart/ChartSpaceXml.d.ts +37 -0
  39. package/types/src/chart/_XmlTree.d.ts +34 -0
  40. package/types/src/chart/_chartCodecs.d.ts +12 -0
  41. package/types/src/chart/_chartExCodecs.d.ts +7 -0
  42. package/types/src/chart/_chartExFold.d.ts +14 -0
  43. package/types/src/chart/_chartExMarkup.d.ts +236 -0
  44. package/types/src/chart/_chartExStyle.d.ts +22 -0
  45. package/types/src/chart/_codec.d.ts +78 -0
  46. package/types/src/chart/_drawingml.d.ts +10 -0
  47. package/types/src/chart/_xml.d.ts +70 -0
  48. package/types/src/reader/CellControls.d.ts +18 -0
  49. package/types/src/reader/DocumentPropertiesRead.d.ts +16 -0
  50. package/types/src/reader/DummyFunctionUnwrap.d.ts +2 -2
  51. package/types/src/reader/HeaderStyles.d.ts +15 -0
  52. package/types/src/reader/IsoDateCell.d.ts +20 -0
  53. package/types/src/reader/LibreOfficeDataTable.d.ts +12 -0
  54. package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts +13 -1
  55. package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +3 -3
  56. package/types/src/reader/domVisitors/CommentVisitor.d.ts +2 -2
  57. package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +3 -1
  58. package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +2 -2
  59. package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +23 -8
  60. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +1 -1
  61. package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +27 -0
  62. package/types/src/reader/domVisitors/FontSchemeVisitor.d.ts +3 -2
  63. package/types/src/reader/domVisitors/ObjectDefaultsVisitor.d.ts +11 -0
  64. package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
  65. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +8 -0
  66. package/types/src/reader/domVisitors/SortStateVisitor.d.ts +2 -2
  67. package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
  68. package/types/src/reader/domVisitors/_Dxfs.d.ts +10 -0
  69. package/types/src/reader/domVisitors/index.d.ts +4 -34
  70. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +1 -0
  71. package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +46 -6
  72. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +24 -8
  73. package/types/src/richValue/ErrorRichValueHandler.d.ts +22 -0
  74. package/types/src/richValue/IRichValueHandler.d.ts +109 -0
  75. package/types/src/richValue/LocalImageRichValueHandler.d.ts +18 -0
  76. package/types/src/richValue/RichDataParts.d.ts +69 -0
  77. package/types/src/richValue/RichRecordWriter.d.ts +61 -0
  78. package/types/src/richValue/RichValueHandlers.d.ts +25 -0
  79. package/types/src/richValue/RichValueResolver.d.ts +54 -0
  80. package/types/src/richValue/WebImageRichValueHandler.d.ts +42 -0
  81. package/types/src/richValue/index.d.ts +7 -0
  82. package/types/src/utils/DrawingMLText.d.ts +2 -2
  83. package/types/src/utils/FormControls.d.ts +4 -4
  84. package/types/src/utils/SharedNames.d.ts +13 -0
  85. package/types/src/utils/SpreadsheetFont.d.ts +38 -0
  86. package/types/src/utils/VmlNoteShapes.d.ts +16 -23
  87. package/types/src/utils/VmlNoteStyle.d.ts +44 -0
  88. package/types/src/utils/VmlPrefixes.d.ts +24 -0
  89. package/types/src/writer/builder/PackageBuilder.d.ts +2 -0
  90. package/types/src/writer/builder/Types.d.ts +7 -0
  91. package/types/src/writer/emitters/CommentsEmitter.d.ts +3 -3
  92. package/types/src/writer/emitters/DrawingEmitter.d.ts +2 -2
  93. package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +18 -0
  94. package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +4 -4
  95. package/types/src/writer/emitters/PropsCoreEmitter.d.ts +7 -2
  96. package/types/src/writer/emitters/PropsCustomEmitter.d.ts +15 -0
  97. package/types/src/writer/emitters/RichValuePartsEmitters.d.ts +36 -0
  98. package/types/src/writer/emitters/RichValueRelEmitter.d.ts +12 -0
  99. package/types/src/writer/emitters/RichValueStructureEmitter.d.ts +4 -3
  100. package/types/src/writer/emitters/RichValueTypesEmitter.d.ts +3 -2
  101. package/types/src/writer/emitters/RichValueWebImageEmitter.d.ts +24 -0
  102. package/types/src/writer/emitters/SharedStringsEmitter.d.ts +6 -3
  103. package/types/src/writer/emitters/SlicerEmitter.d.ts +8 -5
  104. package/types/src/writer/emitters/StylesEmitter.d.ts +2 -0
  105. package/types/src/writer/emitters/WorkbookEmitter.d.ts +5 -0
  106. package/types/src/writer/emitters/WorksheetEmitter.d.ts +4 -3
  107. package/types/src/writer/utils/AutoFilter.d.ts +1 -1
  108. package/types/src/writer/utils/CellControlComplements.d.ts +29 -0
  109. package/types/src/writer/utils/DefaultRows.d.ts +38 -0
  110. package/types/src/writer/utils/DxfCollector.d.ts +11 -8
  111. package/types/src/writer/utils/HiddenFormulaXfs.d.ts +1 -1
  112. package/types/src/writer/utils/RichValueCollector.d.ts +81 -129
  113. package/types/src/writer/utils/SheetStyleLayout.d.ts +86 -0
  114. package/types/src/writer/utils/TextUtils.d.ts +6 -1
  115. package/types/src/writer/utils/UnsupportedFunctions.d.ts +2 -2
  116. package/browser/esm/BPmehfSqdvgsLBsB.mjs +0 -5153
  117. package/node/esm/BpxxiZ2oKPkUSfdB.mjs +0 -2486
  118. package/node/esm/CtAF486aZqYzMeLM.mjs +0 -3651
  119. package/node/esm/QS_theNoeqNGLStj.mjs +0 -5298
  120. package/node/esm/nNQ7MG89sGKwkjMA.mjs +0 -4649
  121. package/types/src/legacyChart/OOXMLMappings.d.ts +0 -8
  122. package/types/src/legacyChart/OOXMLUtils.d.ts +0 -78
  123. package/types/src/legacyChart/ToOOXMLConverter.d.ts +0 -30
  124. package/types/src/reader/domVisitors/AxisVisitor.d.ts +0 -12
  125. package/types/src/reader/domVisitors/BarChartTypeVisitor.d.ts +0 -6
  126. package/types/src/reader/domVisitors/ChartSpaceVisitor.d.ts +0 -6
  127. package/types/src/reader/domVisitors/ChartTypeVisitor.d.ts +0 -7
  128. package/types/src/reader/domVisitors/ChartVisitor.d.ts +0 -7
  129. package/types/src/reader/domVisitors/DataLabelsVisitor.d.ts +0 -8
  130. package/types/src/reader/domVisitors/DataPointVisitor.d.ts +0 -6
  131. package/types/src/reader/domVisitors/LayoutVisitor.d.ts +0 -5
  132. package/types/src/reader/domVisitors/LegendEntryVisitor.d.ts +0 -5
  133. package/types/src/reader/domVisitors/LegendVisitor.d.ts +0 -5
  134. package/types/src/reader/domVisitors/MarkerVisitor.d.ts +0 -5
  135. package/types/src/reader/domVisitors/NegativeShapeVisitor.d.ts +0 -6
  136. package/types/src/reader/domVisitors/PlotAreaVisitor.d.ts +0 -5
  137. package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts +0 -7
  138. package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts +0 -6
  139. package/types/src/reader/domVisitors/SeriesVisitor.d.ts +0 -8
  140. package/types/src/reader/domVisitors/TitleVisitor.d.ts +0 -9
  141. package/types/src/writer/emitters/ChartColorsEmitter.d.ts +0 -7
  142. package/types/src/writer/emitters/ChartEmitter.d.ts +0 -14
  143. package/types/src/writer/emitters/ChartStyleEmitter.d.ts +0 -46
@@ -1,14 +1,15 @@
1
1
  /**
2
- * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.10
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, D as t, E as n, F as r, I as i, M as a, N as o, O as s, P as c, Q as l, Qt as u, St as d, T as f, Z as p, bt as m, ct as h, h as g, j as _, k as v, lt as ee, rt as te, w as y, xt as b } from "./BLXcoiDAaOMjFuhw.mjs";
8
- import { i as x, n as ne, r as S } from "./CI_CZI5m5-KkiAK5.mjs";
9
- import { CommonUtils as C } from "@sheetxl/utils";
10
- import { AddressUtils as w, FormulaError as T, IBorders as E, ICellStyle as D, ICondition as O, IFill as k, IFont as A, IRange as re, IShape as j, ISlicerStyle as M, ITextFrame as N, ShapeStyleUtils as ie, Sort as P, Tuple as ae } from "@sheetxl/sdk";
11
- var F = class {
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
+ var xe = class {
12
13
  constructor(e) {
13
14
  this.list = e;
14
15
  }
@@ -34,14 +35,14 @@ var F = class {
34
35
  [Symbol.iterator]() {
35
36
  return this.list.values();
36
37
  }
37
- }, I = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e && e !== "0" && e !== "off" && e !== "false" && null, oe = (e) => {
38
+ }, Se = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e && e !== "0" && e !== "off" && e !== "false" && null, Ce = (e) => {
38
39
  let t = parseInt(e);
39
40
  return isNaN(t) ? null : t;
40
- }, se = (e) => {
41
+ }, we = (e) => {
41
42
  let t = parseFloat(e);
42
43
  return isNaN(t) ? null : t;
43
- }, ce = /* @__PURE__ */ new Map(), L = class {
44
- constructor(e, t, n, r, i, a = null, o = C.EmptyObject) {
44
+ }, Te = /* @__PURE__ */ new Map(), z = class {
45
+ constructor(e, t, n, r, i, a = null, o = D.EmptyObject) {
45
46
  this._fileLocation = "";
46
47
  let s = (e, t, n) => o?.getRef?.(e, t, n, o?.parsedRefs), c = (e) => o?.getRefs?.(e, o?.parsedRefs);
47
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);
@@ -53,7 +54,7 @@ var F = class {
53
54
  return this._readEmbeddedPart?.(e, this._fileLocation) ?? null;
54
55
  }
55
56
  getRelationships() {
56
- return this._getRefs?.(this._fileLocation) ?? ce;
57
+ return this._getRefs?.(this._fileLocation) ?? Te;
57
58
  }
58
59
  getPath() {
59
60
  return this.currentPath;
@@ -113,7 +114,7 @@ var F = class {
113
114
  }
114
115
  if (n = a, n.length === 0) return null;
115
116
  }
116
- return n.length === 1 ? n[0] : n.length === 0 ? null : new F(n);
117
+ return n.length === 1 ? n[0] : n.length === 0 ? null : new xe(n);
117
118
  }
118
119
  _matchesElementName(e, t) {
119
120
  return t.includes(":") ? (e.tagName || e.nodeName) === t : e.localName === t;
@@ -129,10 +130,10 @@ var F = class {
129
130
  }
130
131
  }
131
132
  getFromPath(e, t) {
132
- return C.getFromPath(e, t);
133
+ return D.getFromPath(e, t);
133
134
  }
134
135
  setToPath(e, t, n) {
135
- return C.setToPath(e, t, n);
136
+ return D.setToPath(e, t, n);
136
137
  }
137
138
  getValAttrAsString(e, t) {
138
139
  let n = this.evaluate(e, t);
@@ -153,13 +154,13 @@ var F = class {
153
154
  return n && n.hasAttribute("val") ? parseFloat(n.getAttribute("val")) ?? null : null;
154
155
  }
155
156
  get BOOLEAN_COPY() {
156
- return I;
157
+ return Se;
157
158
  }
158
159
  get INT_COPY() {
159
- return oe;
160
+ return Ce;
160
161
  }
161
162
  get FLOAT_COPY() {
162
- return se;
163
+ return we;
163
164
  }
164
165
  copyFromAttribute(e, t, n, r = t, i = null) {
165
166
  if (!e || !n || !e.hasAttribute(t)) return;
@@ -172,67 +173,123 @@ var F = class {
172
173
  }
173
174
  this.setToPath(n, r, a);
174
175
  }
175
- }, R = class {
176
- constructor(e) {
177
- this.jsonKey = e;
176
+ }, B = (e, t) => {
177
+ let n = [], r = e.childNodes, i = r.length;
178
+ for (let e = 0; e < i; e++) {
179
+ let i = r.item(e);
180
+ i.nodeType === 1 && i.localName === t && n.push(i);
178
181
  }
182
+ return n;
183
+ }, Ee = [
184
+ ["fillRef", "fill"],
185
+ ["lnRef", "stroke"],
186
+ ["effectRef", "effect"]
187
+ ], V = (e, t) => {
188
+ let n = new h(), r = {};
189
+ for (let [i, a] of Ee) {
190
+ let o = e.evaluate(i, t);
191
+ if (!o) continue;
192
+ let s = { index: parseInt(o.getAttribute("idx") ?? "0", 10) || 0 }, c = n.processAdjColor(e, o);
193
+ c && (s.color = c), r[a] = s;
194
+ }
195
+ let i = e.evaluate("fontRef", t);
196
+ if (i) {
197
+ let t = { index: i.getAttribute("idx") ?? "none" }, a = n.processAdjColor(e, i);
198
+ a && (t.color = a), r.font = t;
199
+ }
200
+ return r;
201
+ }, H = class {
179
202
  visit(e, t, n) {
180
- let r = {};
181
- return n[this.jsonKey] = r, r;
203
+ if (!t) return;
204
+ let r = e.evaluate("*/cNvPr", t);
205
+ return r.item && (r = r.item(0)), r && (e.copyFromAttribute(r, "name", n), e.copyFromAttribute(r, "descr", n, "description"), e.copyFromAttribute(r, "hidden", n, "hidden", e.BOOLEAN_COPY), this.readNonVisualDetails(e, r, n), e.copyFromAttribute(r, "id", n)), n;
182
206
  }
183
- }, z = class {
184
- visit(e, t, n) {
185
- let i = {};
186
- if (r(e, t, i, "grouping", "grouping"), a(e, t, i, "varyColors", "varyColors"), o(e, t, i, "gapWidth", "gapWidth", .01), o(e, t, i, "overlap", "overlap", .01), this.parseType(e, t, i), c(e, t, i, "bubbleScale", "bubbleScale"), a(e, t, i, "showNegBubbles", "showNegativeBubbleValues"), a(e, t, i, "sizeRepresents", "bubbleSizeRepresentsWidth"), c(e, t, i, "firstSliceAng", "startAngle"), c(e, t, i, "holeSize", "holeSize"), r(e, t, i, "scatterStyle", "scatterStyle"), this.parseAxisIds(e, t, i), Object.keys(i).length > 0) {
187
- let t = e.getVisitorParamsState().get("types");
188
- t || (e.warn("A chart type was read outside a chart; its types were started fresh.", { onceKey: "xlsx.chart.typesState" }), t = [], e.getVisitorParamsState().set("types", t)), t.push(i);
189
- }
190
- return i;
207
+ readNonVisualDetails(t, n, r) {
208
+ n.hasAttribute("title") && (r.title = n.getAttribute("title"));
209
+ let i = t.evaluate("hlinkClick", n);
210
+ i && (r.hyperlink = e(t, i));
211
+ let a = t.evaluate("hlinkHover", n);
212
+ a && (r.hoverHyperlink = e(t, a));
213
+ let o = t.evaluate("extLst", n), s = o ? t.serializeElement(o) : null;
214
+ s && (r.extLst = {
215
+ ...r.extLst,
216
+ nonVisual: s
217
+ });
191
218
  }
192
- parseType(e, t, n) {
193
- switch (t.localName) {
194
- case "areaChart":
195
- n.type = "area";
196
- break;
197
- case "bubbleChart":
198
- n.type = "bubble";
199
- break;
200
- case "doughnutChart":
201
- case "ofPieType":
202
- case "pieChart":
203
- n.type = "pie";
204
- break;
205
- case "lineChart":
206
- n.type = "line";
207
- break;
208
- case "scatterChart": n.type = "scatter";
209
- }
219
+ setContent(e, t) {
220
+ let n = e;
221
+ n.name !== void 0 && (t.name = n.name, delete n.name), n.description !== void 0 && (t.description = n.description, delete n.description);
222
+ for (let e of [
223
+ "title",
224
+ "hyperlink",
225
+ "hoverHyperlink",
226
+ "extLst"
227
+ ]) n[e] !== void 0 && (t.json && (t.json[e] = n[e]), delete n[e]);
228
+ e.content = t;
210
229
  }
211
- parseAxisIds(e, t, n) {
212
- let r = e.evaluate("axId", t);
213
- r && r.length !== 0 && (n.xAxisId = r.item(0).getAttribute("val"), n.yAxisId = r.item(1).getAttribute("val"));
230
+ isGroupContent(e) {
231
+ return Array.isArray(e?.members);
214
232
  }
215
- }, B = (e, t, n) => {
216
- if (!0 === e.getValAttrAsBoolean("invertIfNegative", t)) {
217
- if (e.evaluate("extLst/ext/invertSolidFillFmt", t)) {
218
- if (n.fill && n.fillNegative) {
219
- let t = e.getFromPath(n, "fill.solid.adjs");
220
- t && e.setToPath(n, "fillNegative.solid.adjs", t);
233
+ readMemberHeader(e, t, n) {
234
+ let r = {}, i = {
235
+ anchor: void 0,
236
+ content: {
237
+ type: n,
238
+ json: r
221
239
  }
222
- } else {
223
- let e = { val: "FFFFFF" }, t = {};
224
- t.solid = e, n.fillNegative = t;
225
- let r = { val: "000000" }, i = {};
226
- i.solid = r;
227
- let a = {};
228
- a.fill = i, n.strokeNegative = a;
240
+ }, a = e.evaluate("*/cNvPr", t);
241
+ if (a?.item && (a = a.item(0)), a) {
242
+ let n = a.getAttribute("name");
243
+ n !== null && (i.content.name = n);
244
+ let o = a.getAttribute("descr");
245
+ o && (i.content.description = o), e.copyFromAttribute(a, "hidden", i, "hidden", e.BOOLEAN_COPY), this.readNonVisualDetails(e, a, r);
246
+ let s = this.readSourceId(e, t);
247
+ s !== void 0 && (r.sourceId = s);
229
248
  }
249
+ return {
250
+ movable: i,
251
+ content: r
252
+ };
230
253
  }
231
- }, V = class {
254
+ readStyleRefs(e, t, n) {
255
+ let r = e.evaluate("style", t);
256
+ if (!r) return void (n.style = null);
257
+ let i = V(e, r), a = L.withoutDefaultStyleRefs({
258
+ ...n,
259
+ style: i
260
+ });
261
+ a && (n.style = a);
262
+ }
263
+ readLocks(e) {
264
+ let t = e?.attributes;
265
+ if (!t || t.length === 0) return;
266
+ let n = {};
267
+ for (let e = 0; e < t.length; e++) {
268
+ let r = t.item(e);
269
+ r.name.startsWith("xmlns") || (n[r.localName ?? r.name] = f(r.value));
270
+ }
271
+ return Object.keys(n).length > 0 ? n : void 0;
272
+ }
273
+ readSourceId(e, t) {
274
+ let n = e.evaluate("*/cNvPr", t);
275
+ n?.item && (n = n.item(0));
276
+ let r = n?.getAttribute?.("id"), i = r ? parseInt(r, 10) : void 0;
277
+ return i === void 0 || isNaN(i) ? void 0 : i;
278
+ }
279
+ }, De = [
280
+ ["spDef", "shape"],
281
+ ["lnDef", "line"],
282
+ ["txDef", "text"]
283
+ ], U = (e, t) => {
284
+ let n = t.getAttribute("dxfId");
285
+ if (n === null) return;
286
+ let r = parseInt(n);
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
+ }, W = (e) => e === "1" || e === "true", G = class {
232
289
  visit(e, t, n) {}
233
290
  processDataBarColor(e, t, n, r, i = "auto") {
234
291
  if (!t) return;
235
- let a = S((e) => t.getAttribute(e), i);
292
+ let a = E((e) => t.getAttribute(e), i);
236
293
  return a && (n[r] = a), n;
237
294
  }
238
295
  processFonts(e, t, n) {
@@ -248,14 +305,19 @@ var F = class {
248
305
  return n;
249
306
  }
250
307
  processFont(e, t, n) {
251
- e.getValAttrAsBoolean("b", t, !0) && (n.weight = 700), e.getValAttrAsBoolean("i", t, !0) && (n.style = A.Style.Italic), e.getValAttrAsBoolean("strike", t, !0) && (n.strike = !0);
252
- let i = e.evaluate("u", t);
253
- i && (n.underline = i.getAttribute("val") || A.UnderlineStyle.Single), r(e, t, n, "vertAlign", "verticalAlign"), n.verticalAlign === "superscript" ? n.verticalAlign = A.VerticalAlignment.Super : n.verticalAlign === "subscript" && (n.verticalAlign = A.VerticalAlignment.Sub), o(e, t, n, "sz", "size");
254
- let s = e.evaluate("color", t);
255
- this.processDataBarColor(e, s, n, "color"), n.color ||= "auto", r(e, t, n, "name", "family"), r(e, t, n, "rFont", "family");
256
- let l = e.evaluate("family", t);
257
- if (l) {
258
- let e = l.getAttribute("val");
308
+ e.getValAttrAsBoolean("b", t, !0) && (n.weight = 700), e.getValAttrAsBoolean("i", t, !0) && (n.style = N.Style.Italic), e.getValAttrAsBoolean("strike", t, !0) && (n.strike = i(!0));
309
+ let r = e.evaluate("u", t);
310
+ if (r) {
311
+ let e = r.getAttribute("val");
312
+ n.underline = _(e);
313
+ }
314
+ let s = T(e.evaluate("vertAlign", t)?.getAttribute("val"));
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");
259
321
  if (e) switch (e) {
260
322
  case "1":
261
323
  n.fallbacks = ["serif"];
@@ -272,7 +334,12 @@ var F = class {
272
334
  case "5": n.fallbacks = ["fantasy"];
273
335
  }
274
336
  }
275
- return r(e, t, n, "scheme", "scheme"), n.family !== void 0 && n.scheme === void 0 && (n.scheme = A.Scheme.None), a(e, t, n, "shadow", "shadow", !0), a(e, t, n, "outline", "outline", !0), e.getValAttrAsBoolean("condense", t, !0) && (n.letterSpacing = -1), e.getValAttrAsBoolean("extend", t, !0) && (n.letterSpacing = 1), c(e, t, n, "charset", "charset"), n;
337
+ b(n, e.evaluate("scheme", t)?.getAttribute("val")), o(e, t, n, "shadow", "shadow", !0), o(e, t, n, "outline", "outline", !0);
338
+ for (let r of ["condense", "extend"]) {
339
+ let i = a(r, !!e.getValAttrAsBoolean(r, t, !0));
340
+ i !== void 0 && (n.letterSpacing = i);
341
+ }
342
+ return p(e, t, n, "charset", "charset"), n;
276
343
  }
277
344
  processFills(e, t, n) {
278
345
  if (!t) return;
@@ -284,7 +351,7 @@ var F = class {
284
351
  return n;
285
352
  }
286
353
  processFill(e, t, n, r) {
287
- let i = { type: k.Type.None }, a = t.childNodes, o = !1, s = a.length;
354
+ let i = { type: M.Type.None }, a = t.childNodes, o = !1, s = a.length;
288
355
  for (let t = 0; !o && t < s; t++) {
289
356
  let n = a.item(t);
290
357
  n.nodeType === 1 && (n.localName === "gradientFill" ? (this.processGradientFill(e, n, i), o = !0) : n.localName === "patternFill" && (this.processPatternFill(e, n, i), o = !0));
@@ -293,17 +360,17 @@ var F = class {
293
360
  }
294
361
  processGradientFill(e, t, n) {
295
362
  if (!t) return;
296
- n.type = k.Type.Gradient;
363
+ n.type = M.Type.Gradient;
297
364
  let r = [];
298
365
  n.stops = r;
299
366
  let i = t.getAttribute("type");
300
367
  i && (n.gradientType = i);
301
368
  let a = t.hasAttribute("degree") ? parseFloat(t.getAttribute("degree")) : 0;
302
369
  (a + 90) % 360 != 0 && (n.angle = (a + 90) % 360), (t.hasAttribute("left") || t.hasAttribute("top") || t.hasAttribute("right") || t.hasAttribute("bottom")) && (n.focus = {
303
- left: H(t.getAttribute("left")),
304
- top: H(t.getAttribute("top")),
305
- right: H(t.getAttribute("right")),
306
- bottom: H(t.getAttribute("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"))
307
374
  });
308
375
  let o = t.childNodes, s = o.length;
309
376
  for (let t = 0; t < s; t++) {
@@ -319,10 +386,10 @@ var F = class {
319
386
  }
320
387
  processPatternFill(e, t, n) {
321
388
  if (!t) return;
322
- let r = e.getVisitorParamsState().get("processingDXFs"), i = t.getAttribute("patternType") || (r ? k.BuiltInSheetPattern.Solid : k.BuiltInSheetPattern.None);
323
- if (i === k.BuiltInSheetPattern.None) return { none: !0 };
324
- n.type = k.Type.Pattern, i && (n.patternType = i);
325
- let a = "foreground", o = "background", s = n.patternType === k.BuiltInSheetPattern.Solid && r, c = s ? "dk1" : "lt1", l = s ? "lt1" : "dk1";
389
+ let r = e.getVisitorParamsState().get("processingDXFs"), i = t.getAttribute("patternType") || (r ? M.BuiltInSheetPattern.Solid : M.BuiltInSheetPattern.None);
390
+ if (i === M.BuiltInSheetPattern.None) return { none: !0 };
391
+ n.type = M.Type.Pattern, i && (n.patternType = i);
392
+ let a = "foreground", o = "background", s = n.patternType === M.BuiltInSheetPattern.Solid && r, c = s ? "dk1" : "lt1", l = s ? "lt1" : "dk1";
326
393
  if (s) {
327
394
  let e = a;
328
395
  a = o, o = e;
@@ -344,26 +411,36 @@ var F = class {
344
411
  processBorder(e, t, n, r, i) {
345
412
  if (!t) return;
346
413
  let a = {};
347
- return this.processBorderStroke(e, t, a, E.Edge.Left), this.processBorderStroke(e, t, a, E.Edge.Right), i ? (a.right || a.left) && (a.vertical = a.right ? { ...a.right } : { ...a.left }) : this.processBorderStroke(e, t, a, E.Edge.Vertical), this.processBorderStroke(e, t, a, E.Edge.Top), this.processBorderStroke(e, t, a, E.Edge.Bottom), i ? (a.bottom || a.top) && (a.horizontal = a.bottom ? { ...a.bottom } : { ...a.top }) : this.processBorderStroke(e, t, a, E.Edge.Horizontal), n[r] = a, n;
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
+ let o = this.processBorderStroke(e, t, {}, "diagonal");
416
+ return o && (W(t.getAttribute("diagonalUp")) && (a.diagonalUp = { ...o }), W(t.getAttribute("diagonalDown")) && (a.diagonalDown = { ...o })), n[r] = a, n;
348
417
  }
349
418
  processBorderStroke(e, t, n, r) {
350
419
  if (!t) return;
351
420
  let i = e.evaluate(r, t);
352
421
  if (!i) return;
353
422
  let a = {};
354
- i.hasAttribute("style") ? a.style = i.getAttribute("style") : e.getVisitorParamsState().get("processingDXFs") && (a.style = E.StrokeStyle.None);
423
+ i.hasAttribute("style") ? a.style = i.getAttribute("style") : e.getVisitorParamsState().get("processingDXFs") && (a.style = k.StrokeStyle.None);
355
424
  let o = e.evaluate("color", i);
356
425
  return o && this.processDataBarColor(e, o, a, "color"), Object.keys(a).length > 0 ? n[r] = a : null;
357
426
  }
358
- }, H = (e) => {
427
+ }, K = (e) => {
359
428
  if (!e) return 0;
360
429
  let t = parseFloat(e);
361
430
  return isNaN(t) ? 0 : t;
362
- }, U = new Set(Object.values(M.ElementType).filter((e) => e !== M.ElementType.WholeTable && e !== M.ElementType.HeaderRow)), W = {
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;
439
+ }, Oe = new Set(Object.values(F.ElementType).filter((e) => e !== F.ElementType.WholeTable && e !== F.ElementType.HeaderRow)), ke = {
363
440
  auto: "auto",
364
441
  autoNoTable: "automaticExceptTables",
365
442
  manual: "manual"
366
- }, G = [
443
+ }, J = [
367
444
  "tableId",
368
445
  "columnId",
369
446
  "cacheName",
@@ -372,10 +449,10 @@ var F = class {
372
449
  "sortOrder",
373
450
  "customListSort",
374
451
  "crossFilter"
375
- ], K = (e, t) => {
452
+ ], Y = (e, t) => {
376
453
  let n = e.content, r = n?.json;
377
454
  if (r) {
378
- if (n.type === "shape" || t && n.type === "picture") {
455
+ if (n.type === "shape" || n.type === "picture") {
379
456
  let { rotation: n, flipH: i, flipV: a, bounds: o } = r;
380
457
  delete r.rotation, delete r.flipH, delete r.flipV, delete r.bounds, n !== void 0 && n !== 0 && (e.rotation = n), i && (e.flipH = !0), a && (e.flipV = !0), t && o && (e.anchor = {
381
458
  tl: {
@@ -388,130 +465,36 @@ var F = class {
388
465
  }
389
466
  });
390
467
  }
391
- if (n.type === "group") for (let e of r.members ?? []) K(e, !0);
468
+ if (n.type === "group") for (let e of r.members ?? []) Y(e, !0);
392
469
  }
393
- }, le = [
394
- ["fillRef", "fill"],
395
- ["lnRef", "stroke"],
396
- ["effectRef", "effect"]
397
- ], q = class {
398
- visit(e, t, n) {
399
- if (!t) return;
400
- let r = e.evaluate("*/cNvPr", t);
401
- return r.item && (r = r.item(0)), r && (e.copyFromAttribute(r, "name", n), e.copyFromAttribute(r, "descr", n, "description"), e.copyFromAttribute(r, "hidden", n, "hidden", e.BOOLEAN_COPY), this.readNonVisualDetails(e, r, n), e.copyFromAttribute(r, "id", n)), n;
402
- }
403
- readNonVisualDetails(e, n, r) {
404
- n.hasAttribute("title") && (r.title = n.getAttribute("title"));
405
- let i = e.evaluate("hlinkClick", n);
406
- i && (r.hyperlink = t(e, i));
407
- let a = e.evaluate("hlinkHover", n);
408
- a && (r.hoverHyperlink = t(e, a));
409
- let o = e.evaluate("extLst", n), s = o ? e.serializeElement(o) : null;
410
- s && (r.extLst = {
411
- ...r.extLst,
412
- nonVisual: s
413
- });
414
- }
415
- setContent(e, t) {
416
- let n = e;
417
- n.name !== void 0 && (t.name = n.name, delete n.name), n.description !== void 0 && (t.description = n.description, delete n.description);
418
- for (let e of [
419
- "title",
420
- "hyperlink",
421
- "hoverHyperlink",
422
- "extLst"
423
- ]) n[e] !== void 0 && (t.json && (t.json[e] = n[e]), delete n[e]);
424
- e.content = t;
425
- }
426
- isGroupContent(e) {
427
- return Array.isArray(e?.members);
428
- }
429
- readMemberHeader(e, t, n) {
430
- let r = {}, i = {
431
- anchor: void 0,
432
- content: {
433
- type: n,
434
- json: r
435
- }
436
- }, a = e.evaluate("*/cNvPr", t);
437
- if (a?.item && (a = a.item(0)), a) {
438
- let n = a.getAttribute("name");
439
- n !== null && (i.content.name = n);
440
- let o = a.getAttribute("descr");
441
- o && (i.content.description = o), e.copyFromAttribute(a, "hidden", i, "hidden", e.BOOLEAN_COPY), this.readNonVisualDetails(e, a, r);
442
- let s = this.readSourceId(e, t);
443
- s !== void 0 && (r.sourceId = s);
444
- }
445
- return {
446
- movable: i,
447
- content: r
448
- };
449
- }
450
- readStyleRefs(e, t, n) {
451
- let r = e.evaluate("style", t);
452
- if (!r) return void (n.style = null);
453
- let i = new v(), a = {};
454
- for (let [t, n] of le) {
455
- let o = e.evaluate(t, r);
456
- if (!o) continue;
457
- let s = { index: parseInt(o.getAttribute("idx") ?? "0", 10) || 0 }, c = i.processAdjColor(e, o);
458
- c && (s.color = c), a[n] = s;
459
- }
460
- let o = e.evaluate("fontRef", r);
461
- if (o) {
462
- let t = { index: o.getAttribute("idx") ?? "none" }, n = i.processAdjColor(e, o);
463
- n && (t.color = n), a.font = t;
464
- }
465
- let s = ie.withoutDefaultStyleRefs({
466
- ...n,
467
- style: a
468
- });
469
- s && (n.style = s);
470
- }
471
- readLocks(e) {
472
- let t = e?.attributes;
473
- if (!t || t.length === 0) return;
474
- let n = {};
475
- for (let e = 0; e < t.length; e++) {
476
- let r = t.item(e);
477
- r.name.startsWith("xmlns") || (n[r.localName ?? r.name] = b(r.value));
478
- }
479
- return Object.keys(n).length > 0 ? n : void 0;
480
- }
481
- readSourceId(e, t) {
482
- let n = e.evaluate("*/cNvPr", t);
483
- n?.item && (n = n.item(0));
484
- let r = n?.getAttribute?.("id"), i = r ? parseInt(r, 10) : void 0;
485
- return i === void 0 || isNaN(i) ? void 0 : i;
486
- }
487
- }, J = class extends q {
470
+ }, X = class extends H {
488
471
  visit(e, t, n) {
489
472
  if (t) return this.visitShape(e, t, n, "sp", "nvSpPr/cNvSpPr/spLocks");
490
473
  }
491
- visitShape(e, t, n, r, a) {
492
- let o = i[r];
474
+ visitShape(e, t, n, i, a) {
475
+ let o = de[i];
493
476
  if (this.isGroupContent(n)) {
494
477
  if (e.getPath().includes("Fallback")) return {};
495
- let { movable: i, content: s } = this.readMemberHeader(e, t, "shape");
496
- o !== j.Type.Shape && (s.type = o), this.readStyleRefs(e, t, s), this.readShapeDetails(e, t, r, a, s);
478
+ let { movable: r, content: s } = this.readMemberHeader(e, t, "shape");
479
+ o !== P.Type.Shape && (s.type = o), this.readShapeDetails(e, t, i, a, s), this.readStyleRefs(e, t, s);
497
480
  let c = e.evaluate(a, t);
498
- c?.hasAttribute?.("noChangeAspect") && (i.lockAspect = c.getAttribute("noChangeAspect") === "1");
481
+ c?.hasAttribute?.("noChangeAspect") && (r.lockAspect = c.getAttribute("noChangeAspect") === "1");
499
482
  let l = this.readTwinOf(e, t);
500
- return l !== void 0 && Object.assign(s, { twinOf: l }), n.members.push(i), s;
483
+ return l !== void 0 && Object.assign(s, { twinOf: l }), n.members.push(r), s;
501
484
  }
502
485
  if (e.getPath().includes("Fallback") && n.content) {
503
- let r = n.content.json;
504
- if (n.content.type === "shape" && r && (r.type ?? j.Type.Shape) === o) {
505
- let n = e.evaluate("txBody", t), i = n ? new y().readTextBody(e, n) : null;
506
- i && f(i) !== "" && (r.text = i);
486
+ let i = n.content.json;
487
+ if (n.content.type === "shape" && i && (i.type ?? P.Type.Shape) === o) {
488
+ let n = e.evaluate("txBody", t), a = n ? new r().readTextBody(e, n) : null;
489
+ a && ee(a) !== "" && (i.text = a);
507
490
  }
508
491
  return {};
509
492
  }
510
493
  n = super.visit(e, t, n);
511
494
  let s = e.evaluate(a, t);
512
495
  s?.hasAttribute?.("noChangeAspect") && (n.lockAspect = s.getAttribute("noChangeAspect") === "1");
513
- let c = o === j.Type.Shape ? {} : { type: o }, l = this.readSourceId(e, t);
514
- l !== void 0 && (c.sourceId = l), this.readStyleRefs(e, t, c), this.readShapeDetails(e, t, r, a, c);
496
+ let c = o === P.Type.Shape ? {} : { type: o }, l = this.readSourceId(e, t);
497
+ l !== void 0 && (c.sourceId = l), this.readShapeDetails(e, t, i, a, c), this.readStyleRefs(e, t, c);
515
498
  let u = this.readTwinOf(e, t);
516
499
  return u !== void 0 && Object.assign(c, { twinOf: u }), this.setContent(n, {
517
500
  type: "shape",
@@ -528,7 +511,7 @@ var F = class {
528
511
  let a = t.getAttribute("macro");
529
512
  a && (i.macro = a);
530
513
  let o = t.getAttribute("textlink");
531
- o && (i.textLink = o), t.hasAttribute("fLocksText") && (i.locksText = b(t.getAttribute("fLocksText"))), t.hasAttribute("fPublished") && (i.published = b(t.getAttribute("fPublished")));
514
+ o && (i.textLink = o), t.hasAttribute("fLocksText") && (i.locksText = f(t.getAttribute("fLocksText"))), t.hasAttribute("fPublished") && (i.published = f(t.getAttribute("fPublished")));
532
515
  let s = r.slice(0, r.lastIndexOf("/")), c = e.evaluate(s, t);
533
516
  c?.getAttribute?.("txBox") === "1" && (i.textBox = !0);
534
517
  let l = this.readLocks(e.evaluate(r, t));
@@ -543,25 +526,25 @@ var F = class {
543
526
  (n || r) && (i.connectorEnds = {}, n && (i.connectorEnds.start = n), r && (i.connectorEnds.end = r));
544
527
  }
545
528
  }
546
- }, Y = (e, t, n, r) => {
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) => {
547
530
  let i = e.evaluate(n, t), a = e.evaluate(r, t);
548
531
  return i || a ? {
549
- x: d(i?.getAttribute("x") ?? null) ?? 0,
550
- y: d(i?.getAttribute("y") ?? null) ?? 0,
551
- width: d(a?.getAttribute("cx") ?? null) ?? 0,
552
- height: d(a?.getAttribute("cy") ?? null) ?? 0
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
553
536
  } : null;
554
- }, X = "richTypes", Z = "richData", Q = (e) => {
537
+ }, je = { Checkbox: "checkbox" }, Q = (e) => {
555
538
  let t = e.getAttribute("val");
556
539
  return t !== "0" && t !== "false";
557
- }, ue = {
540
+ }, Me = {
558
541
  1: "serif",
559
542
  2: "sans-serif",
560
543
  3: "monospace",
561
544
  4: "cursive",
562
545
  5: "fantasy"
563
546
  };
564
- function de(e) {
547
+ function Ne(e) {
565
548
  let t = {}, n = e.childNodes;
566
549
  for (let e = 0; e < n.length; e++) {
567
550
  let r = n.item(e);
@@ -570,10 +553,10 @@ function de(e) {
570
553
  t.weight = Q(r) ? 700 : 400;
571
554
  break;
572
555
  case "i":
573
- t.style = Q(r) ? A.Style.Italic : A.Style.Normal;
556
+ t.style = Q(r) ? N.Style.Italic : N.Style.Normal;
574
557
  break;
575
558
  case "strike":
576
- t.strike = Q(r);
559
+ t.strike = i(Q(r));
577
560
  break;
578
561
  case "outline":
579
562
  t.outline = Q(r);
@@ -581,15 +564,18 @@ function de(e) {
581
564
  case "shadow":
582
565
  t.shadow = Q(r);
583
566
  break;
584
- case "extend":
585
- t.extend = Q(r);
567
+ case "condense":
568
+ case "extend": {
569
+ let e = a(r.localName, Q(r));
570
+ e !== void 0 && (t.letterSpacing = e);
586
571
  break;
572
+ }
587
573
  case "u":
588
- t.underline = r.getAttribute("val") || A.UnderlineStyle.Single;
574
+ t.underline = _(r.getAttribute("val"));
589
575
  break;
590
576
  case "vertAlign": {
591
- let e = r.getAttribute("val");
592
- e === "superscript" ? t.verticalAlign = A.VerticalAlignment.Super : e === "subscript" ? t.verticalAlign = A.VerticalAlignment.Sub : e === "baseline" && (t.verticalAlign = A.VerticalAlignment.Baseline);
577
+ let e = T(r.getAttribute("val"));
578
+ e !== void 0 && (t.baseline = e);
593
579
  break;
594
580
  }
595
581
  case "sz": {
@@ -603,7 +589,7 @@ function de(e) {
603
589
  break;
604
590
  }
605
591
  case "family": {
606
- let e = ue[r.getAttribute("val") ?? ""];
592
+ let e = Me[r.getAttribute("val") ?? ""];
607
593
  e && (t.fallbacks = [e]);
608
594
  break;
609
595
  }
@@ -612,18 +598,16 @@ function de(e) {
612
598
  isNaN(e) || (t.charset = e);
613
599
  break;
614
600
  }
615
- case "scheme": {
616
- let e = r.getAttribute("val");
617
- e && (t.scheme = e);
601
+ case "scheme":
602
+ b(t, r.getAttribute("val"));
618
603
  break;
619
- }
620
604
  case "color": {
621
605
  let e = r.getAttribute("rgb");
622
606
  if (e && !r.hasAttribute("theme")) {
623
607
  t.color = "#" + (e.length === 8 ? e.substring(2) : e).toUpperCase();
624
608
  break;
625
609
  }
626
- let n = S((e) => r.getAttribute(e));
610
+ let n = E((e) => r.getAttribute(e));
627
611
  n && (t.color = n);
628
612
  break;
629
613
  }
@@ -667,14 +651,37 @@ var $ = {
667
651
  },
668
652
  AppPropertiesVisitor: class {
669
653
  visit(e, t, n) {
670
- let r = [], i = t.childNodes, a = i.length;
671
- for (let t = 0; t < a; t++) {
672
- let n = i.item(t);
654
+ let r = t.childNodes, i = r.length;
655
+ for (let e = 0; e < i; e++) if (r.item(e).localName === "property") return this.visitCustom(t, n);
656
+ let a = [];
657
+ for (let t = 0; t < i; t++) {
658
+ let n = r.item(t);
673
659
  if (n.nodeType !== 1) continue;
674
- let a = this.processProperty(e, n);
675
- a && r.push(a);
660
+ let i = this.processProperty(e, n);
661
+ i && a.push(i);
676
662
  }
677
- return r.length > 0 && (n.properties = r), r;
663
+ return a.length > 0 && (n.properties = a), a;
664
+ }
665
+ visitCustom(e, t) {
666
+ let n = [], r = e.childNodes, i = r.length;
667
+ for (let e = 0; e < i; e++) {
668
+ let t = r.item(e);
669
+ if (t.nodeType !== 1 || t.localName !== "property") continue;
670
+ let i = t.getAttribute("name");
671
+ if (!i) continue;
672
+ let a = null;
673
+ for (let e = 0; e < t.childNodes.length && !a; e++) {
674
+ let n = t.childNodes.item(e);
675
+ n.nodeType === 1 && (a = n);
676
+ }
677
+ let o = {
678
+ key: i,
679
+ kind: a?.localName ?? null,
680
+ value: a?.textContent ?? ""
681
+ }, s = t.getAttribute("linkTarget");
682
+ s && (o.linkTarget = s), n.push(o);
683
+ }
684
+ return n.length > 0 && (t.custom = n), n;
678
685
  }
679
686
  processProperty(e, t) {
680
687
  if (t) return {
@@ -683,272 +690,37 @@ var $ = {
683
690
  };
684
691
  }
685
692
  },
686
- ChartSpaceVisitor: class {
687
- visit(e, t, n) {
688
- return a(e, t, n, "roundedCorners", "roundedCorners"), c(e, t, n, ".//AlternateContent/Fallback/style", "styleId"), e.getVisitorParamsState().set("types", []), e.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()), n.range = null, n;
689
- }
690
- afterVisit(e, t, n) {
691
- let r = {};
692
- n.types = r;
693
- let i = {}, a = 0, o = {}, s = 0, c = e.getVisitorParamsState().get("axes"), l = e.getVisitorParamsState().get("types"), u = l.length;
694
- for (let e = 0; e < u; e++) {
695
- let t = l[e];
696
- if (t.xAxisId) {
697
- let r = t.xAxisId, o = c.get(r);
698
- i[e + ""] = o, t.offsetXAxis = e, delete t.xAxisId, n.xAxes = i, i.length = ++a;
699
- }
700
- if (t.yAxisId) {
701
- let r = t.yAxisId, i = c.get(r);
702
- o[e + ""] = i, t.offsetYAxis = e, delete t.yAxisId, n.yAxes = o, o.length = ++s;
703
- }
704
- r[e + ""] = t;
705
- }
706
- r.length = l.length;
707
- let d = e.getVisitorParamsState().get("series");
708
- if (!d || d.length === 0) return;
709
- let f = {};
710
- n.series = f;
711
- let p = d.length;
712
- for (let e = 0; e < p; e++) f[e + ""] = d[e];
713
- f.length = p, e.getVisitorParamsState().delete("types"), e.getVisitorParamsState().delete("axes"), e.getVisitorParamsState().delete("series");
714
- }
715
- },
716
- ChartVisitor: class {
717
- visit(e, t, n) {
718
- return e.getVisitorParamsState().set("types", []), e.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()), a(e, t, n, "plotVisOnly", "plotVisOnly"), r(e, t, n, "dispBlanksAs", "dispBlanksAs"), a(e, t, n, ".//extLst/ext/dataDisplayOptions16/dispNaAsBlank", "dispNaAsBlank"), a(e, t, n, "showDLblsOverMax", "showDLblsOverMax"), n;
719
- }
720
- afterVisit(e, t, n) {
721
- try {
722
- let r = e.getValAttrAsBoolean("autoTitleDeleted", t), i = e.evaluate("title", t);
723
- e.setToPath(n, "title.shown", !(!0 === r || !i));
724
- let a = e.evaluate("legend", t);
725
- e.setToPath(n, "legend.shown", a !== null);
726
- } catch (e) {
727
- throw Error("Unexpected Error parsing Chart: " + e);
728
- }
729
- }
730
- },
731
- PlotAreaVisitor: class {
732
- visit(e, t, n) {
733
- let r = {};
734
- return n.plotArea = r, r;
735
- }
736
- },
737
- ShapePropertiesVisitor: s,
738
- BarChartTypeVisitor: class extends z {
739
- parseType(e, t, n) {
740
- let r = e.getValAttrAsString("barDir", t);
741
- r && (n.type = r === "col" ? "column" : "bar");
742
- }
743
- },
744
- ChartTypeVisitor: z,
745
- DataLabelsVisitor: class {
746
- constructor(e) {
747
- this.jsonKey = e;
748
- }
749
- visit(e, t, n) {
750
- let i = {}, o = i, s = e.getValAttrAsString("idx", t);
751
- s !== null && (o = {}, o[s] = i);
752
- let c = e.getValAttrAsBoolean("delete", t);
753
- this.parseNumFormat(e, t, i), !0 === c ? (i.showBubbleSize = !1, i.showCatName = !1, i.showLeaderLines = !1, i.showPercentage = !1, i.showSerName = !1, i.showVal = !1, i.showLegendKey = !1) : (a(e, t, i, "showBubbleSize", "showBubbleSize"), a(e, t, i, "showCatName", "showCatName"), a(e, t, i, "showLeaderLines", "showLeaderLines"), a(e, t, i, "showPercent", "showPercentage"), a(e, t, i, "showSerName", "showSerName"), a(e, t, i, "showVal", "showVal"), a(e, t, i, "showLegendKey", "showLegendKey"));
754
- let l = e.evaluate("separator", t);
755
- return l !== null && (i.separator = l.textContent), r(e, t, i, "dLblPos", "position"), n[this.jsonKey] = o, i;
756
- }
757
- parseNumFormat(e, t, n) {
758
- let r = e.evaluate("numFmt", t);
759
- r && (n.formatCode = r.getAttribute("formatCode"), r.hasAttribute("sourceLinked") && (n.sourceLinked = r.getAttribute("sourceLinked") === "1"));
760
- }
761
- },
762
- SeriesVisitor: class {
693
+ ShapePropertiesVisitor: C,
694
+ TextPropertiesVisitor: re,
695
+ ShapeTextVisitor: r,
696
+ ThemeVisitor: class {
763
697
  visit(e, t, n) {
764
- let r = {};
765
- c(e, t, r, "explosion", "explosion");
766
- let i = e.evaluate("cat/*/f", t);
767
- i ||= e.evaluate("xVal/*/f", t);
768
- let o = null;
769
- i !== null && i.firstChild !== null && (o = i.firstChild.nodeValue), i || (i = e.evaluate("cat/strLit", t), i ||= e.evaluate("cat/numLit", t), i && (o = this.parsePointsAsString(e, i))), o !== null && (r.xRange = o);
770
- let s = e.evaluate("val/*/f", t);
771
- s ||= e.evaluate("yVal/*/f", t);
772
- let l = null;
773
- s && s.firstChild && (l = s.firstChild.nodeValue), s || (s = e.evaluate("val/numLit", t), s !== null && (l = this.parsePointsAsString(e, s))), l !== null && (r.valRange = l), this.parseTitleRangeOrValue(e, t, r), c(e, t, r, "idx", "idx"), a(e, t, r, "smooth", "smooth"), r.offsetChart = e.getVisitorParamsState().get("types").length - 1;
774
- let u = e.getVisitorParamsState().get("series");
775
- return u || (u = [], e.getVisitorParamsState().set("series", u)), u.push(r), r;
776
- }
777
- parseTitleRangeOrValue(e, t, n) {
778
- let r = e.evaluate("tx/strRef/f", t);
779
- if (r !== null) {
780
- let t = r.firstChild.nodeValue;
781
- e.setToPath(n, "title.range", t);
782
- } else {
783
- let r = e.evaluate("tx/v", t);
784
- r !== null && e.setToPath(n, "title.text.simpleRun", r.firstChild.nodeValue);
785
- }
786
- }
787
- parsePointsAsString(e, t) {
788
- let n = "{", r = e.getValAttrAsInteger("ptCount", t), i = e.evaluate("pt", t), a = [];
789
- for (let n = 0; i && r && n < r; n++) {
790
- let r = null, i = e.evaluate("pt[@idx='" + n + "']/v", t);
791
- i && (r = i.textContent), a[n] = r;
792
- }
793
- for (let e = 0; e < a.length; e++) e > 0 && (n += ","), a[e] !== void 0 && (n += a[e]);
794
- return n += "}", n;
795
- }
796
- afterVisit(e, t, n) {
797
- B(e, t, n);
798
- let r = e.getFromPath(n, "points");
698
+ n.name = t.getAttribute("name"), n.objectDefaults = {};
699
+ let r = B(t, "custClrLst")[0];
799
700
  if (r) {
800
- let t = Object.keys(r);
801
- for (let i = 0; i < t.length; i++) {
802
- let a = t[i], o = e.getFromPath(r, a);
803
- if (!o) continue;
804
- let s = e.getFromPath(o, "markers");
805
- s && (e.setToPath(n, "markers.points." + a, s), delete o.markers);
701
+ let t = new h(), i = [];
702
+ for (let n of B(r, "custClr")) {
703
+ let r = t.processAdjColor(e, n);
704
+ if (!r) continue;
705
+ let a = { color: r }, o = n.getAttribute("name");
706
+ o && (a.name = o), i.push(a);
806
707
  }
708
+ i.length && (n.customColors = i);
807
709
  }
808
- }
809
- },
810
- DataPointVisitor: class {
811
- DataPointVisitor() {}
812
- visit(e, t, n) {
813
- let r = e.getFromPath(n, "points"), i = null;
814
- r ? i = r : (i = {}, e.setToPath(n, "points", i));
815
- let o = {}, s = e.getValAttrAsString("idx", t);
816
- return s !== null && (i[s] = o), a(e, t, o, "bubble3D", "bubble3D"), c(e, t, o, "explosion", "explosion"), B(e, t, o), o;
817
- }
818
- },
819
- MarkerVisitor: class {
820
- visit(e, t, n) {
821
- let r = t.parentNode.localName;
822
- if (r === "ser" || r === "dPt") {
823
- let r = {}, i = e.getValAttrAsString("size", t);
824
- i !== null && (r.size = i);
825
- let a = e.getValAttrAsString("symbol", t);
826
- return a && (r.type = a), n.markers = r, r;
827
- }
828
- return null;
829
- }
830
- },
831
- AxisVisitor: class {
832
- visit(e, t, n) {
833
- let i = {};
834
- this.parseScaling(e, t, i), o(e, t, i, "majorUnit", "majorUnits"), o(e, t, i, "minorUnit", "minorUnits"), a(e, t, i, "delete", "shown"), this.parseOrientation(e, t, i), this.parseNumFormat(e, t, i), r(e, t, i, "majorTickMark", "majorTickMarks"), r(e, t, i, "minorTickMark", "minorTickMarks"), r(e, t, i, "crosses", "crosses"), o(e, t, i, "crossesAt", "crosses"), r(e, t, i, "crossBetween", "crossBetween"), this.parseLabelAlign(e, t, i), c(e, t, i, "lblOffset", "labelOffset"), r(e, t, i, "tickLblPos", "labelPosition");
835
- let s = e.getValAttrAsInteger("noMultiLvlLbl", t);
836
- i.labelMultiLevel = s !== null && s === 0, c(e, t, i, "tickMarkSkip", "tickMarkSkip"), c(e, t, i, "tickLblSkip", "labelInterval"), this.parseDisplayCustOrBuiltInUnit(t, e, i), this.parseTimeUnits(e, t, i, "majorUnitDates", "majorTimeUnit", "majorUnit"), this.parseTimeUnits(e, t, i, "minorUnitDates", "minorTimeUnit", "minorUnit"), r(e, t, i, "baseTimeUnit", "baseUnitDates"), e.getVisitorParamsState().get("axes") || (e.warn("An axis was read outside a chart; its axes were started fresh.", { onceKey: "xlsx.chart.axesState" }), e.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()));
837
- let l = e.getValAttrAsString("axId", t);
838
- return e.getVisitorParamsState().get("axes").set(l, i), i;
839
- }
840
- parseTimeUnits(e, t, n, r, i, a) {
841
- let o = {}, s = e.getValAttrAsString(i, t);
842
- s !== null && (o.dem = s, o.amt = e.getValAttrAsString(a, t)), Object.keys(o).length > 0 && (n[r] = o);
843
- }
844
- parseDisplayCustOrBuiltInUnit(e, t, n) {
845
- let r = t.getValAttrAsString("dispUnits/builtInUnit", e);
846
- r ||= t.getValAttrAsString("dispUnits/custUnit", e), r && (n.displayUnits = r);
847
- }
848
- parseLabelAlign(e, t, n) {
849
- let r = e.getValAttrAsString("lblAlgn", t);
850
- r !== null && (r === "ctr" ? n.labelAlign = "center" : r === "l" ? n.labelAlign = "left" : r === "r" && (n.labelAlign = "right"));
851
- }
852
- parseOrientation(e, t, n) {
853
- let r = e.getValAttrAsString("AxPos", t);
854
- r !== null && (r === "b" ? n.orientation = "bottom" : r === "l" ? n.orientation = "left" : r === "r" ? n.orientation = "right" : r === "t" && (n.orientation = "top"));
855
- }
856
- parseNumFormat(e, t, n) {
857
- let r = {}, i = e.evaluate("numFmt", t);
858
- i !== null && (i.hasAttribute("formatCode") && (r.formatCode = i.getAttribute("formatCode")), i.hasAttribute("sourceLinked") && (r.sourceLinked = i.getAttribute("sourceLinked") === "1")), Object.keys(r).length > 0 && (n.labels = r);
859
- }
860
- parseScaling(e, t, n) {
861
- let r = e.getValAttrAsString("scaling/orientation", t);
862
- r !== null && (n.inverted = r !== "minMax");
863
- let i = e.getValAttrAsFloat("scaling/logBase", t);
864
- i !== null && (n.logBase = i, n.scaleType = "log"), o(e, t, n, "scaling/max", "max"), o(e, t, n, "scaling/min", "min");
865
- }
866
- afterVisit(e, t, n) {
867
- n.fill && n.labels && (n.labels.fill = n.fill, delete n.fill);
868
- let r = e.getValAttrAsBoolean("delete", t);
869
- r !== null && (e.setToPath(n, "labels.shown", !0 !== r), e.setToPath(n, "shown", !0 !== r));
870
- let i = e.getFromPath(n, "dispUnits.displayUnitsLabel");
871
- i && (e.setToPath(n, "displayUnitsLabel", i), delete n.dispUnits);
872
- let a = e.evaluate("title", t);
873
- e.setToPath(n, "title.shown", a !== null);
874
- let o = e.evaluate("minorGridlines", t);
875
- e.setToPath(n, "gridLinesMinor.shown", o !== null);
876
- let s = e.evaluate("majorGridlines", t);
877
- e.setToPath(n, "gridLinesMajor.shown", s !== null);
878
- }
879
- },
880
- TextPropertiesVisitor: n,
881
- ShapeTextVisitor: y,
882
- LegendEntryVisitor: class {
883
- visit(e, t, n) {
884
- let r = e.getVisitorParamsState().get("series"), i = e.getValAttrAsInteger("idx", t), a = i === null ? void 0 : r[i];
885
- if (a) {
886
- let n = e.getFromPath(a, "title");
887
- n || (n = {}, e.setToPath(a, "title", n));
888
- let r = n, i = e.getValAttrAsBoolean("delete", t);
889
- return i !== null && (r.shown = !i), r;
710
+ for (let e of B(t, "extLst")) for (let t of B(e, "ext")) {
711
+ if (t.getAttribute("uri") !== "{05A4C25C-085E-4340-85A3-A5531E510DB2}") continue;
712
+ let e = B(t, "themeFamily")[0], r = e?.getAttribute("id");
713
+ if (!r) continue;
714
+ let i = {
715
+ name: e.getAttribute("name") ?? "",
716
+ id: r
717
+ }, a = e.getAttribute("vid");
718
+ a && (i.vid = a), n.family = i;
890
719
  }
891
720
  return n;
892
721
  }
893
722
  },
894
- LegendVisitor: class {
895
- visit(e, t, n) {
896
- let i = {};
897
- return a(e, t, i, "overlay", "overlay"), r(e, t, i, "legendPos", "position"), n.legend = i, i;
898
- }
899
- },
900
- NegativeShapeVisitor: class extends s {
901
- visit(e, t, n) {
902
- let r = this.getFill(e, t);
903
- Object.keys(r).length > 0 && (n.fillNegative = r);
904
- let i = this.getStroke(e, t);
905
- return Object.keys(i).length > 0 && (n.strokeNegative = i), n;
906
- }
907
- },
908
- TitleVisitor: class extends n {
909
- constructor(e = "title") {
910
- super(e);
911
- }
912
- parseTitleRangeOrValue(e, t, n) {
913
- let r = e.evaluate("tx/strRef/f", t) ?? null;
914
- if (r) {
915
- let t = r.firstElementChild.nodeValue;
916
- e.setToPath(n, "range", t);
917
- }
918
- }
919
- visit(e, t, n) {
920
- let r = {};
921
- a(e, t, r, "overlay", "overlay"), n[this._jsonKey] = r;
922
- let i = e.getFromPath(r, this.getTextPath());
923
- i ||= {}, this.parseTitleRangeOrValue(e, t, r);
924
- let o = e.evaluate("txPr", t);
925
- o && this.parseTextElement(e, o, i, !1);
926
- let s = e.evaluate("tx/rich", t);
927
- return s && this.parseTextElement(e, s, i, !0), Object.keys(i).length > 0 && e.setToPath(r, "text", i), r;
928
- }
929
- afterVisit(e, t, n) {
930
- if (n?.text) {
931
- let e = n.text?.rotation ?? null;
932
- e !== null && (n.rotation = parseInt(e), delete n.title.rotation);
933
- }
934
- }
935
- },
936
- LayoutVisitor: class {
937
- visit(e, t, n) {
938
- let i = e.evaluate("manualLayout", t);
939
- if (i) {
940
- let t = {};
941
- o(e, i, t, "x", "x"), o(e, i, t, "y", "y"), o(e, i, t, "w", "w"), o(e, i, t, "h", "h"), r(e, i, t, "xMode", "xMode"), r(e, i, t, "yMode", "yMode"), r(e, i, t, "wMode", "wMode"), r(e, i, t, "hMode", "hMode"), Object.keys(t).length > 0 && (n.manualLayout = t);
942
- }
943
- return n;
944
- }
945
- },
946
- ThemeVisitor: class {
947
- visit(e, t, n) {
948
- return n.name = t.getAttribute("name"), n;
949
- }
950
- },
951
- ClrSchemeVisitor: class extends v {
723
+ ClrSchemeVisitor: class extends h {
952
724
  visit(e, t, n) {
953
725
  let r = {};
954
726
  r.name = t.getAttribute("name");
@@ -967,22 +739,50 @@ var $ = {
967
739
  visit(e, t, n) {
968
740
  let r = {};
969
741
  r.name = t.getAttribute("name");
970
- let i = e.evaluate("majorFont", t), a = this.processFontElement(e, i, {});
971
- a && (r.majorFont = a.family, a.fallbacks && (r.majorFallbacks = a.fallbacks));
972
- let o = e.evaluate("minorFont", t), s = this.processFontElement(e, o, {});
973
- return s && (r.minorFont = s.family, s.fallbacks && (r.minorFallbacks = s.fallbacks)), n.fonts = r, r;
742
+ let i = this.processFontCollection(e, e.evaluate("majorFont", t));
743
+ i && (r.major = i);
744
+ let a = this.processFontCollection(e, e.evaluate("minorFont", t));
745
+ return a && (r.minor = a), n.fonts = r, r;
974
746
  }
975
- processFontElement(e, t, n) {
747
+ processFontCollection(e, t) {
976
748
  if (!t) return;
977
- let r = e.evaluate("latin", t);
978
- if (!r) return;
979
- let i = r.getAttribute("typeface");
980
- i && (n.family = i);
981
- let a = r.getAttribute("panose");
982
- return a && (n.fallbacks = [A.getPanoseFallback(a)]), n;
749
+ let n = {}, r = e.evaluate("latin", t), i = r?.getAttribute("typeface");
750
+ i && (n.latin = i);
751
+ let a = r?.getAttribute("panose");
752
+ a && (n.panose = a);
753
+ let o = e.evaluate("ea", t)?.getAttribute("typeface");
754
+ o && (n.eastAsian = o);
755
+ let s = e.evaluate("cs", t)?.getAttribute("typeface"), c;
756
+ s && (n.complexScript = s);
757
+ let l = t.childNodes, u = l.length;
758
+ for (let e = 0; e < u; e++) {
759
+ let t = l.item(e);
760
+ if (t.nodeType !== 1 || t.localName !== "font") continue;
761
+ let n = t.getAttribute("script");
762
+ n && ((c ??= {})[n] = t.getAttribute("typeface") ?? "");
763
+ }
764
+ return c && (n.scripts = c), n;
765
+ }
766
+ },
767
+ ObjectDefaultsVisitor: class {
768
+ visit(e, t, n) {
769
+ let r = {};
770
+ for (let [n, i] of De) {
771
+ let a = e.evaluate(n, t);
772
+ a && (r[i] = this.processDefault(e, a));
773
+ }
774
+ return n.objectDefaults = r, {};
775
+ }
776
+ processDefault(e, t) {
777
+ let n = {}, i = e.evaluate("spPr", t);
778
+ i && new C().visit(e, i, n);
779
+ let a = new r().readTextBody(e, t);
780
+ (a.body || a.listStyle) && (n.text = a);
781
+ let o = e.evaluate("style", t);
782
+ return o && (n.style = V(e, o)), n;
983
783
  }
984
784
  },
985
- FmtSchemeVisitor: class extends v {
785
+ FmtSchemeVisitor: class extends h {
986
786
  visit(e, t, n) {
987
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");
988
788
  if (r && (n.fillStyleLst = r), i && (n.lnStyleLst = i), a && (n.effectStyleLst = a), o && (n.bgFillStyleLst = o), r && i && a && o) return;
@@ -1004,11 +804,11 @@ var $ = {
1004
804
  }
1005
805
  parseFillListItem(e, t) {
1006
806
  switch (t.localName) {
1007
- case "noFill": return { type: k.Type.None };
807
+ case "noFill": return { type: M.Type.None };
1008
808
  case "solidFill": {
1009
809
  let n = this.processAdjColor(e, t);
1010
810
  return n ? {
1011
- type: k.Type.Solid,
811
+ type: M.Type.Solid,
1012
812
  color: n
1013
813
  } : void 0;
1014
814
  }
@@ -1046,17 +846,19 @@ var $ = {
1046
846
  visit(e, t, n) {
1047
847
  if (!t) return;
1048
848
  let r = {}, i = [];
1049
- return this.processFilterColumns(e, t, i, n), i.length > 0 && (r.conditions = i), Object.keys(r).length > 0 && (n.filter = r), r;
849
+ return this.processFilterColumns(e, t, i, n), i.length > 0 && (r.conditions = i), Object.keys(r).length > 0 && (n.filter = r), n;
1050
850
  }
1051
851
  processColorFilter(e, t) {
1052
852
  let n = {}, r = {
1053
- operator: O.BuiltInOperatorNames.Color,
853
+ operator: j.BuiltInOperatorNames.Color,
1054
854
  param: n
1055
855
  };
1056
- return e.copyFromAttribute(t, "cellColor", n, "cellColor", e.BOOLEAN_COPY), e.copyFromAttribute(t, "dxfId", n, "styleId", e.INT_COPY), r;
856
+ e.copyFromAttribute(t, "cellColor", n, "cellColor", e.BOOLEAN_COPY);
857
+ let i = U(e, t);
858
+ return i && (n.style = i), r;
1057
859
  }
1058
860
  processCustomFilter(e, t) {
1059
- return te({
861
+ return oe({
1060
862
  operator: t.getAttribute("operator"),
1061
863
  val: t.getAttribute("val")
1062
864
  }, (t) => e.warn(t));
@@ -1065,7 +867,7 @@ var $ = {
1065
867
  let n = t.getAttribute("and"), r = n === "and" || n === "1";
1066
868
  t.getAttribute("val");
1067
869
  let i = [], a = {
1068
- operator: r ? O.BuiltInOperatorNames.And : O.BuiltInOperatorNames.Or,
870
+ operator: r ? j.BuiltInOperatorNames.And : j.BuiltInOperatorNames.Or,
1069
871
  param: i
1070
872
  }, o = t.childNodes, s = o.length;
1071
873
  for (let t = 0; t < s; t++) {
@@ -1074,10 +876,10 @@ var $ = {
1074
876
  let r = null;
1075
877
  n.localName === "customFilter" && (r = this.processCustomFilter(e, n)), r && i.push(r);
1076
878
  }
1077
- return i.length === 1 ? i[0] : l(a);
879
+ return i.length === 1 ? i[0] : ce(a);
1078
880
  }
1079
881
  processDynamicFilter(e, t) {
1080
- return p(t.getAttribute("type"));
882
+ return ne(t.getAttribute("type"));
1081
883
  }
1082
884
  processDateGroupItem(e, t) {
1083
885
  let n = {};
@@ -1088,10 +890,10 @@ var $ = {
1088
890
  }
1089
891
  processFilters(e, t) {
1090
892
  let n = {}, r = {
1091
- operator: O.BuiltInOperatorNames.InSet,
893
+ operator: j.BuiltInOperatorNames.InSet,
1092
894
  param: n
1093
895
  };
1094
- r.selector = O.BuiltInSelectorNames.Display, e.copyFromAttribute(t, "blank", n, "blank", e.BOOLEAN_COPY), e.copyFromAttribute(t, "calendarType", n, "calendarType");
896
+ r.selector = j.BuiltInSelectorNames.Display, e.copyFromAttribute(t, "blank", n, "blank", e.BOOLEAN_COPY), e.copyFromAttribute(t, "calendarType", n, "calendarType");
1095
897
  let i = [], a = [], o = t.childNodes, s = o.length;
1096
898
  for (let t = 0; t < s; t++) {
1097
899
  let n = o.item(t);
@@ -1109,14 +911,14 @@ var $ = {
1109
911
  }
1110
912
  processIcon(e, t) {
1111
913
  let n = {}, r = {
1112
- operator: O.BuiltInOperatorNames.Icon,
914
+ operator: j.BuiltInOperatorNames.Icon,
1113
915
  param: n
1114
916
  };
1115
917
  return e.copyFromAttribute(t, "iconId", n, "iconId", e.INT_COPY), e.copyFromAttribute(t, "iconSet", n), r;
1116
918
  }
1117
919
  processTop10(e, t) {
1118
920
  let n = {}, r = {
1119
- operator: O.BuiltInOperatorNames.TopN,
921
+ operator: j.BuiltInOperatorNames.TopN,
1120
922
  param: n
1121
923
  };
1122
924
  return e.copyFromAttribute(t, "filterVal", n, "filterVal", e.FLOAT_COPY), e.copyFromAttribute(t, "percent", n, "percent", e.BOOLEAN_COPY), e.copyFromAttribute(t, "top", n, "top", e.BOOLEAN_COPY), e.copyFromAttribute(t, "val", n, "limit", e.FLOAT_COPY), r;
@@ -1125,7 +927,7 @@ var $ = {
1125
927
  let n = t.childNodes;
1126
928
  for (let t = 0; t < n.length; t++) {
1127
929
  let r = n.item(t);
1128
- if (r.nodeType !== 1 || r.localName !== "ext" || u(r.getAttribute("uri")) !== u("{1AD28BCE-077C-4C59-8B6E-1921CE8616D4}")) continue;
930
+ if (r.nodeType !== 1 || r.localName !== "ext" || m(r.getAttribute("uri")) !== m("{1AD28BCE-077C-4C59-8B6E-1921CE8616D4}")) continue;
1129
931
  let i = r.childNodes;
1130
932
  for (let t = 0; t < i.length; t++) {
1131
933
  let n = i.item(t);
@@ -1151,12 +953,12 @@ var $ = {
1151
953
  if (!t) return null;
1152
954
  if (!t.hasAttribute("colId")) return;
1153
955
  let r = parseInt(t.getAttribute("colId")), i = !1;
1154
- if (t.hasAttribute("hiddenButton") && (i = b(t.getAttribute("hiddenButton"))), i && n) {
956
+ if (t.hasAttribute("hiddenButton") && (i = f(t.getAttribute("hiddenButton"))), i && n) {
1155
957
  let e = n.hiddenButtons;
1156
958
  e || (e = [], n.hiddenButtons = e), e.push(r);
1157
959
  }
1158
960
  let a = !1;
1159
- if (t.hasAttribute("showButton") && (a = b(t.getAttribute("showButton"))), a && n) {
961
+ if (t.hasAttribute("showButton") && (a = f(t.getAttribute("showButton"))), a && n) {
1160
962
  let e = n.showButtons;
1161
963
  !0 !== e && (e || (e = [], n.showButtons = e), e[r] = !0);
1162
964
  }
@@ -1180,7 +982,7 @@ var $ = {
1180
982
  visit(e, t, n) {
1181
983
  if (!t) return;
1182
984
  let r = t.getAttribute("ref"), i = {};
1183
- t.hasAttribute("caseSensitive") && (i.collatorOptions = b(t.getAttribute("caseSensitive")) ? P.CaseSensitiveOptions : P.CaseInsensitiveOptions);
985
+ t.hasAttribute("caseSensitive") && (i.collatorOptions = f(t.getAttribute("caseSensitive")) ? R.CaseSensitiveOptions : R.CaseInsensitiveOptions);
1184
986
  let a = t.getAttribute("sortMethod");
1185
987
  a != null && a !== "none" && (a === "stroke" ? i.collatorOptions = {
1186
988
  ...i.collatorOptions,
@@ -1190,63 +992,103 @@ var $ = {
1190
992
  collation: "pinyin"
1191
993
  }));
1192
994
  let o = {};
1193
- t.hasAttribute("columnSort") && b(t.getAttribute("columnSort")) && (o.axis = re.Axis.Column);
1194
- let s = w.fastStringToRange(r), c = [];
1195
- return this.processSortConditions(e, t, c, s, i), c.length > 0 && (o.sorts = c), Object.keys(c).length > 0 && (n.sort = o), o;
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);
998
+ let d = e.getVisitorParamsState().get("ref");
999
+ if (d && r) {
1000
+ let e = O.fastStringToRange(d);
1001
+ o.extent = {
1002
+ range: u(e, s),
1003
+ sorts: l.map((t) => te(e, s, t))
1004
+ };
1005
+ }
1006
+ return Object.keys(c).length > 0 && (n.sort = o), o;
1196
1007
  }
1197
- processSortCondition(e, t, n, r) {
1008
+ processSortCondition(e, t, n, r, i) {
1198
1009
  if (!t) return null;
1199
- let i = {};
1010
+ let a = {};
1200
1011
  if (!t.hasAttribute("ref")) return void e.warn("A sort condition has no ref; it was dropped.", { onceKey: "xlsx.sheet.sort.noRef" });
1201
1012
  if (t.hasAttribute("ref")) {
1202
- let e = t.getAttribute("ref"), r = w.fastStringToRange(e);
1203
- i.index = n ? r.colStart - n.colStart : r.colStart;
1013
+ let e = t.getAttribute("ref"), r = O.fastStringToRange(e);
1014
+ a.index = n ? r.colStart - n.colStart : r.colStart, i?.push(r);
1204
1015
  }
1205
- let a = { ...r };
1206
- return i.criteria = a, a.reverse = !1, t.hasAttribute("descending") && (a.reverse = b(t.getAttribute("descending"))), e.copyFromAttribute(t, "sortBy", a, "sortOn"), e.copyFromAttribute(t, "dxfId", a), e.copyFromAttribute(t, "iconSet", a), e.copyFromAttribute(t, "customList", a), i;
1016
+ let o = { ...r };
1017
+ a.criteria = o, o.reverse = !1, t.hasAttribute("descending") && (o.reverse = f(t.getAttribute("descending")));
1018
+ let s = ae(t.getAttribute("sortBy"));
1019
+ s && (o.sortOn = s);
1020
+ let c = U(e, t);
1021
+ return c && (o.style = c), e.copyFromAttribute(t, "iconSet", o), e.copyFromAttribute(t, "customList", o), a;
1207
1022
  }
1208
- processSortConditions(e, t, n, r, i) {
1023
+ processSortConditions(e, t, n, r, i, a) {
1209
1024
  if (!t) return;
1210
- let a = t.childNodes, o = a.length;
1211
- for (let t = 0; t < o; t++) {
1212
- let o = a.item(t);
1213
- if (o.nodeType === 1 && o.localName === "sortCondition") {
1214
- let t = this.processSortCondition(e, o, r, i);
1025
+ let o = t.childNodes, s = o.length;
1026
+ for (let t = 0; t < s; t++) {
1027
+ let s = o.item(t);
1028
+ if (s.nodeType === 1 && s.localName === "sortCondition") {
1029
+ let t = this.processSortCondition(e, s, r, i, a);
1215
1030
  t && n.push(t);
1216
1031
  }
1217
1032
  }
1218
1033
  }
1219
1034
  },
1220
- SheetStyleVisitor: class extends V {
1221
- visit(e, t, n) {
1222
- this.processNumFmts(e, e.evaluate("numFmts", t), null), e.getVisitorParamsState().set("colorsToProcess", /* @__PURE__ */ new Set());
1223
- let r = {
1035
+ SheetStyleVisitor: class extends G {
1036
+ visit(e, r, i) {
1037
+ this.processNumFmts(e, e.evaluate("numFmts", r), null), e.getVisitorParamsState().set("colorsToProcess", /* @__PURE__ */ new Set());
1038
+ let a = {
1224
1039
  fills: {},
1225
1040
  fonts: {},
1226
1041
  borders: {}
1042
+ }, o = e.evaluate("fonts", r);
1043
+ this.processFonts(e, o, a.fonts);
1044
+ let s = a.fonts[this.normalFontId(e, r)], c = {
1045
+ declared: ["1", "true"].includes(o?.getAttribute("x14ac:knownFonts") ?? ""),
1046
+ normalIsThemeFont: n(s?.family),
1047
+ faces: ie(Object.values(a.fonts).map((e) => ({
1048
+ ...e,
1049
+ family: t(e?.family, e?.fallbacks, null, !1).name
1050
+ })))
1227
1051
  };
1228
- this.processFonts(e, e.evaluate("fonts", t), r.fonts), this.processFills(e, e.evaluate("fills", t), r.fills), this.processBorders(e, e.evaluate("borders", t), r.borders, !0), r.fills[0] = { type: k.Type.None }, r.fills[1] = {
1229
- type: k.Type.Pattern,
1230
- patternType: k.BuiltInSheetPattern.Gray125
1231
- }, r.borders[0] = {
1232
- bottom: { style: E.StrokeStyle.None },
1233
- left: { style: E.StrokeStyle.None },
1234
- right: { style: E.StrokeStyle.None },
1235
- top: { style: E.StrokeStyle.None }
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] = {
1053
+ type: M.Type.Pattern,
1054
+ patternType: M.BuiltInSheetPattern.Gray125
1055
+ }, a.borders[0] = {
1056
+ bottom: { style: k.StrokeStyle.None },
1057
+ left: { style: k.StrokeStyle.None },
1058
+ right: { style: k.StrokeStyle.None },
1059
+ top: { style: k.StrokeStyle.None }
1236
1060
  };
1237
- let i = [];
1238
- this.processXFs(e, e.evaluate("cellStyleXfs", t), i, r, null, !1);
1239
- let a = /* @__PURE__ */ new Map();
1240
- if (i.length > 0) {
1241
- let r = [];
1242
- this.processCellStyles(e, e.evaluate("cellStyles", t), r, i, a), n.named = r;
1061
+ let l = [];
1062
+ this.processXFs(e, e.evaluate("cellStyleXfs", r), l, a, null, !1);
1063
+ let u = /* @__PURE__ */ new Map();
1064
+ if (l.length > 0) {
1065
+ let t = [];
1066
+ this.processCellStyles(e, e.evaluate("cellStyles", r), t, l, u), i.named = t;
1067
+ }
1068
+ let d = [];
1069
+ this.processXFs(e, e.evaluate("cellXfs", r), d, a, u), Object.keys(d).length > 0 && (i.direct = d);
1070
+ let f = this.collectHiddenXfs(e.evaluate("cellXfs", r));
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;
1076
+ }
1077
+ normalFontId(e, t) {
1078
+ let n = e.evaluate("cellStyles", t)?.childNodes, r = 0;
1079
+ for (let e = 0; e < (n?.length ?? 0); e++) {
1080
+ let t = n.item(e);
1081
+ if (t.nodeType === 1 && t.getAttribute("builtinId") === "0") {
1082
+ r = parseInt(t.getAttribute("xfId") ?? "0", 10) || 0;
1083
+ break;
1084
+ }
1243
1085
  }
1244
- let o = [];
1245
- this.processXFs(e, e.evaluate("cellXfs", t), o, r, a), Object.keys(o).length > 0 && (n.direct = o);
1246
- let s = this.collectHiddenXfs(e.evaluate("cellXfs", t));
1247
- s.size > 0 && e.getVisitorParamsState().set(ne, s);
1248
- let c = [];
1249
- return this.processDXFs(e, e.evaluate("dxfs", t), c), this.processTableStyles(e, e.evaluate("tableStyles", t), n, c), this.processSlicerStyles(e, e.evaluate("extLst", t), n), this.processIndexColors(e, e.evaluate("colors/indexedColors", t), n), this.processMruColors(e, e.evaluate("colors/mruColors", t), n), n;
1086
+ let i = e.evaluate("cellStyleXfs", t)?.childNodes, a = 0;
1087
+ for (let e = 0; e < (i?.length ?? 0); e++) {
1088
+ let t = i.item(e);
1089
+ if (t.nodeType === 1 && a++ === r) return parseInt(t.getAttribute("fontId") ?? "0", 10) || 0;
1090
+ }
1091
+ return 0;
1250
1092
  }
1251
1093
  processIndexColors(e, t, n) {
1252
1094
  if (!t) return;
@@ -1304,9 +1146,9 @@ var $ = {
1304
1146
  let o = t.getAttribute("xfId");
1305
1147
  if (o && i) {
1306
1148
  let e = i.get(parseInt(o));
1307
- e && e !== D.BuiltInName.Normal && (n.named = e);
1149
+ e && e !== A.BuiltInName.Normal && (n.named = e);
1308
1150
  }
1309
- let s = (e) => !(!a && t.hasAttribute(e)) || b(t.getAttribute(e)), c = (e) => !a || t.hasAttribute(e) && b(t.getAttribute(e)), l = a ? "0" : void 0;
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;
1310
1152
  if (s("applyFont")) {
1311
1153
  let e = t.getAttribute("fontId") ?? l;
1312
1154
  if (e !== void 0 && (e !== "0" || c("applyFont"))) {
@@ -1346,18 +1188,18 @@ var $ = {
1346
1188
  let r = e.evaluate("protection", t);
1347
1189
  (r || c("applyProtection")) && this.processProtection(e, r, n);
1348
1190
  }
1349
- let u = b(t.getAttribute("quotePrefix") ?? "");
1191
+ let u = f(t.getAttribute("quotePrefix") ?? "");
1350
1192
  u && (n.quotePrefix = u);
1351
1193
  }
1352
1194
  processAlignment(e, t, n) {
1353
1195
  let r = {};
1354
- if (r.horizontal = t?.hasAttribute("horizontal") ? t.getAttribute("horizontal") : N.HorizontalAlignment.General, r.vertical = t?.hasAttribute("vertical") ? t.getAttribute("vertical") : N.VerticalAlignment.Bottom, r.indent = t?.hasAttribute("indent") ? parseInt(t.getAttribute("indent")) : 0, r.relativeIndent = t?.hasAttribute("relativeIndent") ? parseInt(t.getAttribute("relativeIndent")) : 0, r.overflow = b(t?.getAttribute("wrapText") ?? "") ? N.Overflow.Wrap : N.Overflow.Visible, b(t?.getAttribute("shrinkToFit") ?? "") && (r.overflow = N.Overflow.Shrink), t?.hasAttribute("textRotation")) {
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")) {
1355
1197
  let e = parseFloat(t.getAttribute("textRotation"));
1356
1198
  e > 0 && e <= 90 ? e = 360 - e : e > 90 && e <= 180 ? e -= 90 : e === 255 && (e = 0, r.stacked = !0), r.rotation = e;
1357
1199
  } else r.rotation = 0;
1358
- t?.hasAttribute("justifyLastLine") && (r.justifyLastLine = b(t.getAttribute("justifyLastLine")));
1200
+ t?.hasAttribute("justifyLastLine") && (r.justifyLastLine = f(t.getAttribute("justifyLastLine")));
1359
1201
  let i = t?.getAttribute("readingOrder");
1360
- return i && (i === "0" ? r.readingDirection = N.ReadingDirection.Auto : i === "1" ? r.readingDirection = N.ReadingDirection.LeftToRight : i === "2" ? r.readingDirection = N.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;
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;
1361
1203
  }
1362
1204
  collectHiddenXfs(e) {
1363
1205
  let t = /* @__PURE__ */ new Set();
@@ -1369,7 +1211,26 @@ var $ = {
1369
1211
  let a = i.childNodes;
1370
1212
  for (let e = 0; e < a.length; e++) {
1371
1213
  let n = a.item(e);
1372
- n.nodeType === 1 && n.localName === "protection" && b(n.getAttribute("hidden") ?? "") && t.add(r);
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
+ }
1373
1234
  }
1374
1235
  r++;
1375
1236
  }
@@ -1378,7 +1239,7 @@ var $ = {
1378
1239
  processProtection(e, t, n) {
1379
1240
  if (!t) return;
1380
1241
  let r = t.getAttribute("locked");
1381
- return n.protection = { alwaysUnlocked: !!r && !b(r) }, n;
1242
+ return n.protection = { alwaysUnlocked: !!r && !f(r) }, n;
1382
1243
  }
1383
1244
  processDXF(e, t, n) {
1384
1245
  if (!t) return;
@@ -1461,7 +1322,7 @@ var $ = {
1461
1322
  let n = c.item(t);
1462
1323
  if (n.nodeType !== 1 || n.localName !== "slicerStyleElement") continue;
1463
1324
  let r = n.getAttribute("type");
1464
- if (!r || !U.has(r)) continue;
1325
+ if (!r || !Oe.has(r)) continue;
1465
1326
  let a = n.getAttribute("dxfId"), s = a == null ? void 0 : o[parseInt(a)];
1466
1327
  s ? i[r] = s : e.warn(`A slicer style names a format that does not exist (dxfId '${a}').`, { onceKey: "xlsx.style.slicerStyle.dxf" });
1467
1328
  }
@@ -1471,7 +1332,7 @@ var $ = {
1471
1332
  }
1472
1333
  processTableStyle(e, t, n, r, i = !1) {
1473
1334
  let a = t.getAttribute("name"), o = { name: a };
1474
- t.hasAttribute("table") && (o.table = b(t.getAttribute("table"))), t.hasAttribute("pivot") && (o.pivot = b(t.getAttribute("pivot"))), i && !o.pivot && r.unshift(null);
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);
1475
1336
  let s = t.childNodes, c = s.length;
1476
1337
  for (let t = 0; t < c; t++) {
1477
1338
  let n = s.item(t);
@@ -1505,7 +1366,7 @@ var $ = {
1505
1366
  if (t.nodeType === 1 && t.localName === "cellStyle") {
1506
1367
  let e = parseInt(t.getAttribute("xfId") ?? ""), a = t.getAttribute("name"), o = t.getAttribute("builtinId"), s = a;
1507
1368
  if (o !== null) {
1508
- let e = D.builtInNameFromId(parseInt(o));
1369
+ let e = A.builtInNameFromId(parseInt(o));
1509
1370
  e !== void 0 && (s = e);
1510
1371
  }
1511
1372
  if (i.set(e, s), !r[e]) continue;
@@ -1513,32 +1374,32 @@ var $ = {
1513
1374
  name: s,
1514
1375
  style: r[e]
1515
1376
  };
1516
- t.getAttribute("hidden") && (c.hidden = b(t.getAttribute("hidden"))), t.getAttribute("iLevel") && (c.iLevel = parseInt(t.getAttribute("iLevel"))), n.push(c);
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);
1517
1378
  }
1518
1379
  }
1519
1380
  }
1520
1381
  afterVisit(e, t, n) {}
1521
1382
  },
1522
- WorkbookVisitor: class extends V {
1383
+ WorkbookVisitor: class extends G {
1523
1384
  visit(e, t, n) {
1524
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;
1525
1386
  }
1526
1387
  processPassword(e, t, n, r = "workbook", i = "password") {
1527
1388
  if (!t) return;
1528
1389
  let a = {};
1529
- e.copyFromAttribute(t, `${r}AlgorithmName`, a, "algorithm"), e.copyFromAttribute(t, `${r}HashValue`, a, "hash"), e.copyFromAttribute(t, `${r}SaltValue`, a, "salt"), e.copyFromAttribute(t, `${r}SpinCount`, a, "spinCount", e.INT_COPY), Object.keys(a).length > 0 && (n[i] = a);
1390
+ e.copyFromAttribute(t, `${r}AlgorithmName`, a, "algorithm"), e.copyFromAttribute(t, `${r}HashValue`, a, "hash"), e.copyFromAttribute(t, `${r}SaltValue`, a, "salt"), e.copyFromAttribute(t, `${r}SpinCount`, a, "spinCount", e.INT_COPY), e.copyFromAttribute(t, `${r}Password`, a, "legacyHash"), Object.keys(a).length > 0 && (n[i] = a);
1530
1391
  }
1531
1392
  processWorkbookProtection(e, t, n) {
1532
1393
  if (!t) return;
1533
1394
  let r = {};
1534
1395
  this.processPassword(e, t, r, "workbook", "password"), this.processPassword(e, t, r, "revisions", "revisionsPassword");
1535
- for (let e of h) r[e.key] = ee(e, t.getAttribute(e.attribute));
1396
+ for (let e of ue) r[e.key] = le(e, t.getAttribute(e.attribute));
1536
1397
  return n.protection = r, n;
1537
1398
  }
1538
1399
  processCalcPr(e, t, n) {
1539
1400
  if (!t) return;
1540
1401
  let r = {};
1541
- e.copyFromAttribute(t, "calcMode", r, "calcMode", (e) => W[e] ?? null), e.copyFromAttribute(t, "fullCalcOnLoad", r, "fullCalcOnLoad", e.BOOLEAN_COPY), e.copyFromAttribute(t, "calcOnSave", r, "calcOnSave", e.BOOLEAN_COPY), e.copyFromAttribute(t, "calcCompleted", r, "calcCompleted", e.BOOLEAN_COPY), e.copyFromAttribute(t, "fullPrecision", r, "fullPrecision", e.BOOLEAN_COPY), e.copyFromAttribute(t, "forceFullCalc", r, "forceFullCalc", e.BOOLEAN_COPY), e.copyFromAttribute(t, "concurrentCalc", r, "concurrentCalc", e.BOOLEAN_COPY), e.copyFromAttribute(t, "refMode", r, "refMode"), e.copyFromAttribute(t, "iterate", r, "iterate", e.BOOLEAN_COPY), e.copyFromAttribute(t, "iterateCount", r, "maxIteration", e.INT_COPY), e.copyFromAttribute(t, "iterateDelta", r, "maxIterateChange", e.FLOAT_COPY);
1402
+ e.copyFromAttribute(t, "calcMode", r, "calcMode", (e) => ke[e] ?? null), e.copyFromAttribute(t, "fullCalcOnLoad", r, "fullCalcOnLoad", e.BOOLEAN_COPY), e.copyFromAttribute(t, "calcOnSave", r, "calcOnSave", e.BOOLEAN_COPY), e.copyFromAttribute(t, "calcCompleted", r, "calcCompleted", e.BOOLEAN_COPY), e.copyFromAttribute(t, "fullPrecision", r, "fullPrecision", e.BOOLEAN_COPY), e.copyFromAttribute(t, "forceFullCalc", r, "forceFullCalc", e.BOOLEAN_COPY), e.copyFromAttribute(t, "concurrentCalc", r, "concurrentCalc", e.BOOLEAN_COPY), e.copyFromAttribute(t, "concurrentManualCount", r, "concurrentManualCount", e.INT_COPY), e.copyFromAttribute(t, "refMode", r, "refMode"), e.copyFromAttribute(t, "iterate", r, "iterate", e.BOOLEAN_COPY), e.copyFromAttribute(t, "iterateCount", r, "maxIteration", e.INT_COPY), e.copyFromAttribute(t, "iterateDelta", r, "maxIterateChange", e.FLOAT_COPY);
1542
1403
  let i = t.getAttribute("calcId");
1543
1404
  i !== null && e.getVisitorParamsState().set("calcId", i), n.calc = r;
1544
1405
  }
@@ -1554,8 +1415,19 @@ var $ = {
1554
1415
  processSheetRef(e, t, n) {
1555
1416
  let r = {};
1556
1417
  e.copyFromAttribute(t, "name", r, "name"), e.copyFromAttribute(t, "state", r, "visibility"), e.copyFromAttribute(t, "sheetId", r, "sheetId", e.INT_COPY);
1557
- let i = t.getAttribute("r:id"), a = e.getRef(i);
1558
- a && (r.sheet = a), n.push(r);
1418
+ let i = t.getAttribute("r:id"), a = i ? d(e.getRelationships().get(i)?.type) : null;
1419
+ if (a) {
1420
+ let t = e.readEmbeddedPart(i);
1421
+ if (t?.xml) {
1422
+ let e = { part: t }, i = s(t.xml), o = i ? E((e) => i.get(e)) : void 0;
1423
+ o && (e.tabColor = o), r.kind = a, r.sheet = e, n.push(r);
1424
+ return;
1425
+ }
1426
+ e.warn(`The ${a} sheet '${r.name}' could not be read and was loaded as an empty worksheet.`), n.push(r);
1427
+ return;
1428
+ }
1429
+ let o = i ? e.getRef(i) : null;
1430
+ o && (r.sheet = o), n.push(r);
1559
1431
  }
1560
1432
  processExternalReferences(e, t, n) {
1561
1433
  if (!t) return;
@@ -1595,8 +1467,24 @@ var $ = {
1595
1467
  }
1596
1468
  processWorkbookView(e, t, n) {
1597
1469
  if (!t) return;
1598
- let r = {};
1599
- e.copyFromAttribute(t, "activeTab", r, "activeSheetId", [e.INT_COPY, (e) => e]), t.hasAttribute("activeTab") || (r.activeSheetId = 0), e.copyFromAttribute(t, "showHorizontalScroll", r, "showHorizontalScrollbar", e.BOOLEAN_COPY), e.copyFromAttribute(t, "showVerticalScroll", r, "showVerticalScrollbar", e.BOOLEAN_COPY), e.copyFromAttribute(t, "showSheetTabs", r, "showTabs", e.BOOLEAN_COPY), e.copyFromAttribute(t, "tabRatio", r, "tabRatio", [e.FLOAT_COPY, (e) => e]), Object.keys(r).length > 0 && (n.view = r);
1470
+ let r = {}, i = [
1471
+ "xWindow",
1472
+ "yWindow",
1473
+ "windowWidth",
1474
+ "windowHeight"
1475
+ ].map((e) => parseInt(t.getAttribute(e) ?? "", 10));
1476
+ if (i.some((e) => Number.isFinite(e))) {
1477
+ let [e, t, n, a] = i.map((e) => Number.isFinite(e) ? e : 0);
1478
+ r.windowBounds = {
1479
+ left: e,
1480
+ top: t,
1481
+ width: n,
1482
+ height: a
1483
+ };
1484
+ }
1485
+ e.copyFromAttribute(t, "activeTab", r, "activeSheetId", [e.INT_COPY, (e) => e]), t.hasAttribute("activeTab") || (r.activeSheetId = 0), e.copyFromAttribute(t, "showHorizontalScroll", r, "showHorizontalScrollbar", e.BOOLEAN_COPY), e.copyFromAttribute(t, "showVerticalScroll", r, "showVerticalScrollbar", e.BOOLEAN_COPY), e.copyFromAttribute(t, "showSheetTabs", r, "showTabs", e.BOOLEAN_COPY), e.copyFromAttribute(t, "tabRatio", r, "tabRatio", [e.FLOAT_COPY, (e) => e]), e.copyFromAttribute(t, "firstSheet", r, "firstTab", [e.INT_COPY, (e) => e]), e.copyFromAttribute(t, "minimized", r, "minimized", e.BOOLEAN_COPY), e.copyFromAttribute(t, "autoFilterDateGrouping", r, "autoFilterDateGrouping", e.BOOLEAN_COPY);
1486
+ let a = t.getAttribute("visibility");
1487
+ a !== "hidden" && a !== "veryHidden" || (r.visibility = a), Object.keys(r).length > 0 && (n.view = r);
1600
1488
  }
1601
1489
  processDefineName(e, t, n, r) {
1602
1490
  if (!t) return;
@@ -1606,7 +1494,13 @@ var $ = {
1606
1494
  if (!r[n]?.name) return void e.warn(`Defined name '${t.getAttribute("name")}' references a sheet with localSheetId '${n}' which does not exist.`);
1607
1495
  i.scope = r[n].name;
1608
1496
  }
1609
- e.copyFromAttribute(t, "customMenu", i), e.copyFromAttribute(t, "description", i), e.copyFromAttribute(t, "statusBar", i), e.copyFromAttribute(t, "help", i), e.copyFromAttribute(t, "shortcutKey", i), e.copyFromAttribute(t, "function", i, "function", e.BOOLEAN_COPY), e.copyFromAttribute(t, "functionGroupId", i, "functionGroupId", e.INT_COPY), e.copyFromAttribute(t, "publishToServer", i, "publishToServer", e.BOOLEAN_COPY), e.copyFromAttribute(t, "vbProcedure", i, "vbProcedure", e.BOOLEAN_COPY), e.copyFromAttribute(t, "xlm", i, "xlm", e.BOOLEAN_COPY), Object.keys(i).length > 0 && n.push(i);
1497
+ let o = {};
1498
+ for (let n of ge) e.copyFromAttribute(t, n, o);
1499
+ for (let e of he) {
1500
+ let n = t.getAttribute(e);
1501
+ n !== "1" && n !== "true" || (o[e] = !0);
1502
+ }
1503
+ e.copyFromAttribute(t, "functionGroupId", o, "functionGroupId", e.INT_COPY), Object.keys(o).length > 0 && (i.fileAttributes = o), Object.keys(i).length > 0 && n.push(i);
1610
1504
  }
1611
1505
  processDefinedNames(e, t, n) {
1612
1506
  if (!t) return;
@@ -1625,7 +1519,7 @@ var $ = {
1625
1519
  TableVisitor: class {
1626
1520
  visit(e, t, n) {
1627
1521
  let r = {};
1628
- return e.copyFromAttribute(t, "ref", n, "r"), e.getVisitorParamsState().set("ref", n.r), n.v = r, e.copyFromAttribute(t, "name", r), e.copyFromAttribute(t, "displayName", r), e.copyFromAttribute(t, "headerRowCount", r, "headerRowCount", e.INT_COPY), e.copyFromAttribute(t, "totalsRowCount", r, "totalsRowCount", e.INT_COPY), this.processTableColumns(e, t, r), this.processTableStyleInfo(e, t, r), e.copyFromAttribute(t, "id", r), e.copyFromAttribute(t, "comment", r, "description"), e.copyFromAttribute(t, "connectionId", r, "connectionId", e.INT_COPY), e.copyFromAttribute(t, "tableType", r), e.copyFromAttribute(t, "published", r, "published", e.BOOLEAN_COPY), e.copyFromAttribute(t, "insertRow", r, "insertRow", e.BOOLEAN_COPY), e.copyFromAttribute(t, "insertRowShift", r, "insertRowShift", e.BOOLEAN_COPY), r.totalsRowShown = t.getAttribute("totalsRowShown") !== "0", r;
1522
+ return e.copyFromAttribute(t, "ref", n, "r"), e.getVisitorParamsState().set("ref", n.r), n.v = r, e.copyFromAttribute(t, "name", r), e.copyFromAttribute(t, "displayName", r, "name"), e.copyFromAttribute(t, "headerRowCount", r, "headerRowCount", e.INT_COPY), e.copyFromAttribute(t, "totalsRowCount", r, "totalsRowCount", e.INT_COPY), this.processTableColumns(e, t, r), this.processTableStyleInfo(e, t, r), e.copyFromAttribute(t, "id", r), e.copyFromAttribute(t, "comment", r, "description"), e.copyFromAttribute(t, "connectionId", r, "connectionId", e.INT_COPY), e.copyFromAttribute(t, "tableType", r), e.copyFromAttribute(t, "published", r, "published", e.BOOLEAN_COPY), e.copyFromAttribute(t, "insertRow", r, "insertRow", e.BOOLEAN_COPY), e.copyFromAttribute(t, "insertRowShift", r, "insertRowShift", e.BOOLEAN_COPY), r.totalsRowShown = t.getAttribute("totalsRowShown") !== "0", r;
1629
1523
  }
1630
1524
  afterVisit(e, t, n) {
1631
1525
  let r = n.v;
@@ -1745,7 +1639,7 @@ var $ = {
1745
1639
  i.length > 0 && (n.sheetDataSet = i);
1746
1640
  }
1747
1641
  processSheetData(e, t) {
1748
- let n = new ae.Builder(), r = t.childNodes, i = r.length;
1642
+ let n = new be.Builder(), r = t.childNodes, i = r.length;
1749
1643
  for (let e = 0; e < i; e++) {
1750
1644
  let t = r.item(e);
1751
1645
  if (t.nodeType !== 1 || t.localName !== "row") continue;
@@ -1755,7 +1649,7 @@ var $ = {
1755
1649
  if (t.nodeType !== 1 || t.localName !== "cell") continue;
1756
1650
  let r = t.getAttribute("r");
1757
1651
  if (!r) continue;
1758
- let a = w.fastStringToCell(r);
1652
+ let a = O.fastStringToCell(r);
1759
1653
  if (a?.rowIndex === void 0 || a?.colIndex === void 0) continue;
1760
1654
  let o = this._readCellValue(t);
1761
1655
  o !== void 0 && n.pushAt(a.rowIndex, a.colIndex, o);
@@ -1775,7 +1669,7 @@ var $ = {
1775
1669
  case "str":
1776
1670
  default: return t;
1777
1671
  case "e": {
1778
- let e = T.getBuiltInByLabel(t);
1672
+ let e = ve.getBuiltInByLabel(t);
1779
1673
  return e ? {
1780
1674
  t: "e",
1781
1675
  v: e.getCode()
@@ -1819,8 +1713,8 @@ var $ = {
1819
1713
  let r = {};
1820
1714
  n[t.getAttribute("name")] = r, e.copyFromAttribute(t, "xr10:uid", r, "uid");
1821
1715
  let i = t.getAttribute("cache"), a = e.getVisitorParamsState().get("slicerCaches"), o = i ? a?.get(i) : void 0;
1822
- if (o) for (let e = 0; e < G.length; e++) {
1823
- let t = G[e];
1716
+ if (o) for (let e = 0; e < J.length; e++) {
1717
+ let t = J[e];
1824
1718
  o[t] !== void 0 && (r[t] = o[t]);
1825
1719
  }
1826
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);
@@ -1846,7 +1740,7 @@ var $ = {
1846
1740
  } else n.localName === "extLst" && (o = e.serializeElement(n) ?? void 0);
1847
1741
  }
1848
1742
  }
1849
- let c = g(r, a, o);
1743
+ let c = S(r, a, o);
1850
1744
  return n.formControl = c, c;
1851
1745
  }
1852
1746
  },
@@ -1855,14 +1749,19 @@ var $ = {
1855
1749
  return n;
1856
1750
  }
1857
1751
  afterVisit(e, t, n) {
1858
- for (let e of n?.movables ?? []) K(e, !1);
1752
+ for (let e of n?.movables ?? []) Y(e, !1);
1859
1753
  }
1860
1754
  },
1861
1755
  DrawingAnchorVisitor: class {
1862
1756
  visit(e, t, n) {
1863
1757
  if (!t) return;
1864
1758
  let r = {};
1865
- return e.copyFromAttribute(t, "editAs", r, "anchorType"), r.anchor = {}, t.localName === "absoluteAnchor" ? (r.anchorType = "absolute", this.processAbsoluteCoord(e, e.evaluate("xdr:pos", t), r.anchor, "from", "x", "y"), this.processAbsoluteCoord(e, e.evaluate("xdr:ext", t), r.anchor, "to", "cx", "cy")) : t.localName === "oneCellAnchor" ? (this.processOffsetCoord(e, e.evaluate("from", t), r.anchor, "from"), this.processAbsoluteCoord(e, e.evaluate("xdr:ext", t), r.anchor, "to", "cx", "cy")) : (this.processOffsetCoord(e, e.evaluate("from", t), r.anchor, "from"), this.processOffsetCoord(e, e.evaluate("to", t), r.anchor, "to")), n.movables ||= [], n.movables.push(r), r;
1759
+ e.copyFromAttribute(t, "editAs", r, "anchorType"), r.anchor = {}, t.localName === "absoluteAnchor" ? (r.anchorType = "absolute", this.processAbsoluteCoord(e, e.evaluate("pos", t), r.anchor, "from", "x", "y"), this.processAbsoluteCoord(e, e.evaluate("ext", t), r.anchor, "to", "cx", "cy")) : t.localName === "oneCellAnchor" ? (this.processOffsetCoord(e, e.evaluate("from", t), r.anchor, "from"), this.processAbsoluteCoord(e, e.evaluate("ext", t), r.anchor, "to", "cx", "cy")) : (this.processOffsetCoord(e, e.evaluate("from", t), r.anchor, "from"), this.processOffsetCoord(e, e.evaluate("to", t), r.anchor, "to"));
1760
+ let i = e.evaluate("clientData", t), a = (e) => {
1761
+ let t = i?.getAttribute(e);
1762
+ return t === "0" || t === "false";
1763
+ };
1764
+ return a("fPrintsWithSheet") && (r.noPrint = !0), a("fLocksWithSheet") && (r.unlocked = !0), n.movables ||= [], n.movables.push(r), r;
1866
1765
  }
1867
1766
  processAbsoluteCoord(e, t, n, r, i, a) {
1868
1767
  if (!t) return;
@@ -1870,7 +1769,7 @@ var $ = {
1870
1769
  x: 0,
1871
1770
  y: 0
1872
1771
  };
1873
- return o.x = d(t.getAttribute(i)), o.y = d(t.getAttribute(a)), r === "from" ? n.tl = o : n.br = o, n;
1772
+ return o.x = w(t.getAttribute(i)), o.y = w(t.getAttribute(a)), r === "from" ? n.tl = o : n.br = o, n;
1874
1773
  }
1875
1774
  processOffsetCoord(e, t, n, r) {
1876
1775
  if (!t) return;
@@ -1880,34 +1779,37 @@ var $ = {
1880
1779
  x: 0,
1881
1780
  y: 0
1882
1781
  };
1883
- 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 = d(e.evaluate("colOff", t).textContent)), e.evaluate("rowOff", t) && (i.y = d(e.evaluate("rowOff", t).textContent)), r === "from" ? n.tl = i : n.br = i, n;
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;
1884
1783
  }
1885
1784
  },
1886
- DrawingGraphicFrameVisitor: class extends q {
1785
+ DrawingGraphicFrameVisitor: class extends H {
1887
1786
  visit(e, t, n) {
1888
1787
  if (!t) return;
1889
1788
  if (this.isGroupContent(n)) {
1890
1789
  if (e.getPath().includes("Fallback")) return {};
1891
1790
  let { movable: r } = this.readMemberHeader(e, t, "graphicFrame"), i = e.evaluate("xfrm", t);
1892
1791
  if (i) {
1893
- _(i, r);
1792
+ v(i, r);
1894
1793
  let t = e.evaluate("off", i), n = e.evaluate("ext", i);
1895
1794
  r.anchor = {
1896
1795
  tl: {
1897
- x: d(t?.getAttribute("x") ?? null) ?? 0,
1898
- y: d(t?.getAttribute("y") ?? null) ?? 0
1796
+ x: w(t?.getAttribute("x") ?? null) ?? 0,
1797
+ y: w(t?.getAttribute("y") ?? null) ?? 0
1899
1798
  },
1900
1799
  br: {
1901
- x: d(n?.getAttribute("cx") ?? null) ?? 0,
1902
- y: d(n?.getAttribute("cy") ?? null) ?? 0
1800
+ x: w(n?.getAttribute("cx") ?? null) ?? 0,
1801
+ y: w(n?.getAttribute("cy") ?? null) ?? 0
1903
1802
  }
1904
1803
  };
1905
1804
  }
1906
- let a = this.readGraphic(e, t);
1805
+ let a = this.readGraphic(e, t), o = a.type === "chart" ? {
1806
+ ...r.content.json,
1807
+ ...a.json
1808
+ } : a.json;
1907
1809
  return r.content = {
1908
1810
  ...r.content,
1909
1811
  type: a.type,
1910
- json: a.json
1812
+ json: o
1911
1813
  }, n.members.push(r), a.json;
1912
1814
  }
1913
1815
  n = super.visit(e, t, n);
@@ -1933,11 +1835,17 @@ var $ = {
1933
1835
  n === "chart" ? n = "chart" : n === "slicer" && (n = "slicer"), r.type = n;
1934
1836
  let i = a.getAttribute("r:id");
1935
1837
  if (n === "chart" && i) {
1936
- let n = this.readSourceId(e, t);
1838
+ let n = this.readSourceId(e, t), a = e.readEmbeddedPart(i) ?? void 0, o;
1839
+ try {
1840
+ let t = a?.xml ? _e(a.xml) : null;
1841
+ o = t?.model, t?.lossy && e.warn("A chart states something its model does not; it is saved as it was until it is changed.", { onceKey: "xlsx.chart.lossy" });
1842
+ } catch (t) {
1843
+ e.warn(`A chart could not be read into the chart model; it is kept as its markup: ${t?.message ?? t}`, { onceKey: "xlsx.chart.model" });
1844
+ }
1937
1845
  r.json = {
1938
- xml: e.serializeElement(t) ?? void 0,
1939
1846
  sourceId: n,
1940
- part: e.readEmbeddedPart(i) ?? void 0
1847
+ part: a,
1848
+ model: o
1941
1849
  };
1942
1850
  } else if (n === "slicer") {
1943
1851
  let n = this.readSourceId(e, t);
@@ -1950,46 +1858,48 @@ var $ = {
1950
1858
  return r;
1951
1859
  }
1952
1860
  },
1953
- DrawingSpVisitor: J,
1954
- DrawingPicVisitor: class extends q {
1861
+ DrawingSpVisitor: X,
1862
+ DrawingPicVisitor: class extends H {
1955
1863
  visit(e, t, n) {
1956
1864
  if (!t) return;
1957
1865
  if (this.isGroupContent(n)) {
1958
1866
  if (e.getPath().includes("Fallback")) return {};
1959
- let { movable: r, content: i } = this.readMemberHeader(e, t, "picture"), a = this.readImageResource(e, t);
1960
- if (a == null) return {};
1961
- i.resId = a;
1962
- let o = this.readLocks(e.evaluate("nvPicPr/cNvPicPr/picLocks", t));
1963
- return o && (o.noChangeAspect !== void 0 && (r.lockAspect = o.noChangeAspect), r.locks = o), n.members.push(r), i;
1964
- }
1965
- let r = super.visit(e, t, n), i = e.evaluate("nvPicPr/cNvPicPr", t);
1966
- if (i) {
1967
- e.copyFromAttribute(t, "preferRelativeResize", r, "preferRelativeResize", e.BOOLEAN_COPY);
1968
- let n = e.evaluate("picLocks", i);
1969
- if (n) {
1970
- n.hasAttribute("noChangeAspect") && (r.lockAspect = n.getAttribute("noChangeAspect") === "1");
1971
- let t = {};
1972
- e.copyFromAttribute(n, "noChangeArrowheads", r, "noChangeArrowheads", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noChangeShapeType", r, "noChangeShapeType", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noEditPoints", r, "noEditPoints", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noAdjustHandles", r, "noAdjustHandles", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noCrop", r, "noCrop", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noGrp", r, "noGrp", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noMove", r, "noMove", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noResize", r, "noResize", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noRot", r, "noRot", e.BOOLEAN_COPY), e.copyFromAttribute(n, "noSelect", r, "noSelect", e.BOOLEAN_COPY), Object.keys(t).length > 0 && (r.locks = t);
1973
- }
1867
+ let { movable: r, content: i } = this.readMemberHeader(e, t, "picture"), a = this.readImage(e, t);
1868
+ return a ? (this.readPictureDetails(e, t, a, r, i), n.members.push(r), i) : {};
1974
1869
  }
1975
- let a = this.readImageResource(e, t);
1976
- if (a === null) return;
1977
- let o = { resId: a }, s = this.readSourceId(e, t);
1978
- return s !== void 0 && (o.sourceId = s), this.setContent(n, {
1870
+ let r = super.visit(e, t, n), i = this.readImage(e, t);
1871
+ if (i === null) return;
1872
+ let a = {}, o = this.readSourceId(e, t);
1873
+ return o !== void 0 && (a.sourceId = o), this.readPictureDetails(e, t, i, r, a), this.setContent(r, {
1979
1874
  type: "picture",
1980
- json: o
1981
- }), r;
1982
- }
1983
- readImageResource(e, t) {
1984
- let n = e.evaluate("blipFill/blip", t);
1985
- if (!n) return;
1986
- let r = n.getAttribute("r:embed") ?? n.getAttribute("embed");
1987
- return r ||= n.getAttribute("r:link") ?? n.getAttribute("link"), r ? e.getRef(r, !0) : (e.warn("A picture names no image; it was not imported.", { onceKey: "xlsx.drawing.picture.noRel" }), null);
1875
+ json: a
1876
+ }), a;
1877
+ }
1878
+ readPictureDetails(e, t, n, r, i) {
1879
+ n?.resId !== void 0 && (i.resId = n.resId), n?.image && (i.image = n.image);
1880
+ let a = t.getAttribute("macro");
1881
+ a && (i.macro = a), t.hasAttribute("fPublished") && (i.published = f(t.getAttribute("fPublished")));
1882
+ let o = e.evaluate("nvPicPr/cNvPicPr", t);
1883
+ if (o?.getAttribute) {
1884
+ o.getAttribute("preferRelativeResize") === "0" && (i.noRelativeResize = !0);
1885
+ let t = this.readLocks(e.evaluate("picLocks", o));
1886
+ t && (i.locks = t), r.lockAspect = t?.noChangeAspect ?? !1;
1887
+ }
1888
+ }
1889
+ readImage(e, t) {
1890
+ let n = e.evaluate("blipFill", t), r = n ? e.evaluate("blip", n) : null;
1891
+ if (!r) return;
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;
1893
+ let { type: i, resId: a, ...o } = new h().processImageFill(e, n);
1894
+ return !o.tile && o.stretch && Object.keys(o.stretch).length === 0 && delete o.stretch, o.extLst && Ae.test(o.extLst) && delete o.extLst, {
1895
+ resId: a,
1896
+ image: Object.keys(o).length > 0 ? o : void 0
1897
+ };
1988
1898
  }
1989
1899
  },
1990
- DrawingGrpSpVisitor: class extends q {
1900
+ DrawingGrpSpVisitor: class extends H {
1991
1901
  constructor(...e) {
1992
- super(...e), this._fills = new v();
1902
+ super(...e), this._fills = new h();
1993
1903
  }
1994
1904
  visit(e, t, n) {
1995
1905
  if (!t) return;
@@ -2016,8 +1926,8 @@ var $ = {
2016
1926
  if (c) {
2017
1927
  let t = e.evaluate("xfrm", c);
2018
1928
  if (t) {
2019
- _(t, i), t.getAttribute("flipH") === "1" && (i.flipH = !0), t.getAttribute("flipV") === "1" && (i.flipV = !0);
2020
- let n = Y(e, t, "off", "ext"), o = Y(e, t, "chOff", "chExt") ?? 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;
2021
1931
  o && (a.childBounds = o), r && n && (i.anchor = {
2022
1932
  tl: {
2023
1933
  x: n.x,
@@ -2044,7 +1954,7 @@ var $ = {
2044
1954
  return a;
2045
1955
  }
2046
1956
  },
2047
- DrawingCxnSpVisitor: class extends J {
1957
+ DrawingCxnSpVisitor: class extends X {
2048
1958
  visit(e, t, n) {
2049
1959
  if (t) return this.visitShape(e, t, n, "cxnSp", "nvCxnSpPr/cNvCxnSpPr/cxnSpLocks");
2050
1960
  }
@@ -2157,75 +2067,47 @@ var $ = {
2157
2067
  return n;
2158
2068
  }
2159
2069
  },
2160
- RichValueStructureVisitor: class {
2070
+ FeaturePropertyBagVisitor: class {
2161
2071
  visit(e, t, n) {
2162
- let r = e.getVisitorParamsState().get(X);
2163
- r || (r = [], e.getVisitorParamsState().set(X, r));
2164
- let i = t.childNodes, a = i.length;
2165
- for (let t = 0; t < a; t++) {
2166
- let n = i.item(t);
2167
- if (n.nodeType === 1 && n.localName === "s") {
2168
- let t = {
2169
- type: n.getAttribute("t") ?? "n",
2170
- keys: []
2171
- };
2172
- this.processKeys(e, n, t), r.push(t);
2173
- }
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));
2174
2076
  }
2175
- return n.richTypes = r, r;
2176
- }
2177
- processKeys(e, t, n) {
2178
- let r = t.childNodes, i = r.length, a = n.keys;
2179
- for (let e = 0; e < i; e++) {
2180
- let t = r.item(e);
2181
- if (t.nodeType === 1 && t.localName === "k") {
2182
- let e = t.getAttribute("n"), n = t.getAttribute("t");
2183
- a.push([e, n]);
2184
- }
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);
2185
2081
  }
2082
+ let s = { controls: a };
2083
+ return n.featurePropertyBag = s, s;
2186
2084
  }
2187
- },
2188
- RichValueDataVisitor: class {
2189
- visit(e, t, n) {
2190
- let r = e.getVisitorParamsState().get("richTypes");
2191
- if (!r) return void e.warn("RichValueFound but not type.");
2192
- let i = e.getVisitorParamsState().get(Z);
2193
- i || (i = [], e.getVisitorParamsState().set(Z, i));
2194
- let a = t.childNodes, o = a.length;
2195
- for (let t = 0; t < o; t++) {
2196
- let n = a.item(t);
2197
- if (n.nodeType === 1 && n.localName === "rv") {
2198
- let t = r[n.getAttribute("s")], a = { type: t.type };
2199
- this.processValues(e, n, a, t);
2200
- let o = this.mapType(e, a);
2201
- i.push(o);
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);
2202
2107
  }
2203
2108
  }
2204
- return n.richData = i, i;
2205
- }
2206
- mapType(e, t) {
2207
- if (t.type === "_error") {
2208
- let e = t.errorType;
2209
- if (e) try {
2210
- t = T.getBuiltInByCode(e + 1) ?? T.BuiltIn.Unknown;
2211
- } catch {}
2212
- }
2213
2109
  return t;
2214
2110
  }
2215
- processValues(e, t, n, r) {
2216
- let i = t.childNodes, a = i.length;
2217
- r.type;
2218
- let o = r.keys;
2219
- for (let t = 0; t < a; t++) {
2220
- let r = i.item(t);
2221
- if (r.nodeType === 1 && r.localName === "v") {
2222
- let i = o[t];
2223
- if (!i) return void e.warn("Invalid richData");
2224
- let a = i[0], s = i[1], c = r.textContent;
2225
- s === "i" && (c = Number(c)), n[a] = c;
2226
- }
2227
- }
2228
- }
2229
2111
  },
2230
2112
  CommentsVisitor: class {
2231
2113
  visit(e, t, n) {
@@ -2271,7 +2153,7 @@ var $ = {
2271
2153
  if (n.nodeType === 1) {
2272
2154
  if (n.localName === "t") e.text += n.textContent ?? "";
2273
2155
  else if (n.localName === "rPr") {
2274
- let t = de(n);
2156
+ let t = Ne(n);
2275
2157
  t && (e.font = t);
2276
2158
  }
2277
2159
  }
@@ -2307,7 +2189,7 @@ var $ = {
2307
2189
  if (!t) return e;
2308
2190
  let [, n, r, i] = t;
2309
2191
  return `${n}${r ? `.${(r + "00").substring(0, 3)}` : ""}${i ?? "Z"}`;
2310
- }(a)), t.hasAttribute("done") && (r.done = b(t.getAttribute("done")));
2192
+ }(a)), t.hasAttribute("done") && (r.done = f(t.getAttribute("done")));
2311
2193
  let o = function(e) {
2312
2194
  let t, n = e.childNodes;
2313
2195
  for (let e = 0; e < n.length; e++) {
@@ -2349,27 +2231,27 @@ var $ = {
2349
2231
  return r.length > 0 && (n.persons = r), r;
2350
2232
  }
2351
2233
  }
2352
- }, fe = class {
2234
+ }, Pe = class {
2353
2235
  constructor(e, t) {
2354
2236
  this.path = e, this.visitor = t;
2355
2237
  }
2356
- }, pe = class {
2238
+ }, Fe = class {
2357
2239
  constructor() {
2358
- 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("c:chartSpace", new $.ChartSpaceVisitor()), this.registerVisitor("c:plotArea", new $.PlotAreaVisitor()), this.registerVisitor("c:barChart", new $.BarChartTypeVisitor()), this.registerVisitor("c:doughnutChart", new $.ChartTypeVisitor()), this.registerVisitor("c:lineChart", new $.ChartTypeVisitor()), this.registerVisitor("c:ofPieType", new $.ChartTypeVisitor()), this.registerVisitor("c:pieChart", new $.ChartTypeVisitor()), this.registerVisitor("c:scatterChart", new $.ChartTypeVisitor()), this.registerVisitor("c:barChart", new $.DataLabelsVisitor("dataLabels"), "dLbls"), this.registerVisitor("c:doughnutChart", new $.DataLabelsVisitor("dataLabels"), "dLbls"), this.registerVisitor("c:lineChart", new $.DataLabelsVisitor("dataLabels"), "dLbls"), this.registerVisitor("c:ofPieType", new $.DataLabelsVisitor("dataLabels"), "dLbls"), this.registerVisitor("c:pieChart", new $.DataLabelsVisitor("dataLabels"), "dLbls"), this.registerVisitor("c:scatterChart", new $.DataLabelsVisitor("dataLabels"), "dLbls"), this.registerVisitor("c:ser", new $.SeriesVisitor()), this.registerVisitor("c:dPt", new $.DataPointVisitor()), this.registerVisitor("c:marker", new $.MarkerVisitor()), this.registerVisitor("c:catAx", new $.AxisVisitor()), this.registerVisitor("c:valAx", new $.AxisVisitor()), this.registerVisitor("c:dateAx", new $.AxisVisitor()), this.registerVisitor("c:majorGridlines", new R("gridLinesMajor")), this.registerVisitor("c:minorGridlines", new R("gridLinesMinor")), this.registerVisitor("c:chartSpace", null, "txPr"), this.registerVisitor("c:catAx", new $.TextPropertiesVisitor("labels.text"), "txPr"), this.registerVisitor("c:valAx", new $.TextPropertiesVisitor("labels.text"), "txPr"), this.registerVisitor("c:dateAx", new $.TextPropertiesVisitor("labels.text"), "txPr"), this.registerVisitor("c:legend", new $.LegendVisitor()), this.registerVisitor("c:legend", new $.TextPropertiesVisitor("labels.text"), "txPr"), this.registerVisitor("c:legendEntry", new $.LegendEntryVisitor()), this.registerVisitor("c:ser", new $.NegativeShapeVisitor(), "extLst/ext/invertSolidFillFmt/spPr"), this.registerVisitor("c:ser", new $.DataLabelsVisitor("labels"), "dLbls"), this.registerVisitor("c:dLbl", new $.DataLabelsVisitor("points")), this.registerVisitor("c:title", new $.TitleVisitor()), this.registerVisitor("c:title", null, "tx/rich"), this.registerVisitor("c:title", null, "txPr"), this.registerVisitor("c:layout", new $.LayoutVisitor()), this.registerVisitor("c:dispUnits", new R("dispUnits")), this.registerVisitor("c:dispUnitsLbl", new $.TitleVisitor("displayUnitsLabel")), this.registerVisitor("c:dispUnitsLbl", new $.TextPropertiesVisitor(), "tx/rich"), 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("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("rvStructures", new $.RichValueStructureVisitor()), this.registerVisitor("rvData", new $.RichValueDataVisitor()), 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
+ 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());
2359
2241
  }
2360
2242
  registerVisitor(e, t, n = null) {
2361
2243
  e.indexOf(":") === -1 && (e = "*:" + e);
2362
2244
  let r = e.split(":"), i = r.length > 1 ? r[1] : r[0];
2363
2245
  if (!n) return this.visitorsByXmlTagName.set(i, t), void this.visitorsByXmlTagName.set(e, t);
2364
2246
  let a = this.scopedVisitorsByXmlTagName.get(i);
2365
- a || (a = [], this.scopedVisitorsByXmlTagName.set(i, a), this.scopedVisitorsByXmlTagName.set(e, a)), a.push(new fe(n, t));
2247
+ a || (a = [], this.scopedVisitorsByXmlTagName.set(i, a), this.scopedVisitorsByXmlTagName.set(e, a)), a.push(new Pe(n, t));
2366
2248
  }
2367
- parseDxf(e, t = "", n = C.EmptyObject) {
2249
+ parseDxf(e, t = "", n = D.EmptyObject) {
2368
2250
  this.visitorParamsState ||= /* @__PURE__ */ new Map();
2369
2251
  let r = this.visitorParamsState, i = r.get("processingDXFs");
2370
2252
  r.set("processingDXFs", !0);
2371
2253
  try {
2372
- let r = new L(null, this, "/dxf", e, {}, t, n), i = {};
2254
+ let r = new z(null, this, "/dxf", e, {}, t, n), i = {};
2373
2255
  return new $.SheetStyleVisitor().processDXF(r, e, i), i;
2374
2256
  } finally {
2375
2257
  i === void 0 ? r.delete("processingDXFs") : r.set("processingDXFs", i);
@@ -2378,12 +2260,12 @@ var $ = {
2378
2260
  getVisitorParamsState() {
2379
2261
  return this.visitorParamsState;
2380
2262
  }
2381
- transform(e, t, n = C.EmptyObject) {
2263
+ transform(e, t, n = D.EmptyObject) {
2382
2264
  let r = e.documentElement;
2383
2265
  this.visitorParamsState && !n?.paramMap || (this.visitorParamsState = n?.paramMap ?? /* @__PURE__ */ new Map());
2384
2266
  let i = {}, a = this.visitorsByXmlTagName.get(r.nodeName);
2385
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.`);
2386
- let o = "/" + r.localName, s = new L(null, this, o, r, i, t, n), c = [];
2268
+ let o = "/" + r.localName, s = new z(null, this, o, r, i, t, n), c = [];
2387
2269
  this._doWalk(a, s, c, r, i, t, n);
2388
2270
  let l = c.length;
2389
2271
  for (let e = 0; e < l; e++) {
@@ -2411,7 +2293,7 @@ var $ = {
2411
2293
  for (; l && l !== r;) s = l.localName + "/" + s, l = l.parentNode;
2412
2294
  let u = t.getPath() + "/" + s;
2413
2295
  if (c.visitor) {
2414
- let r = new L(t, this, u, t.getElemRoot(), t.getJsonRoot(), a, o);
2296
+ let r = new z(t, this, u, t.getElemRoot(), t.getJsonRoot(), a, o);
2415
2297
  this._doWalk(c.visitor, r, n, e, i, a, o);
2416
2298
  }
2417
2299
  };
@@ -2437,10 +2319,10 @@ var $ = {
2437
2319
  if (r.nodeType !== 1) continue;
2438
2320
  let c = r, p = c.nodeName, m = l.get(p);
2439
2321
  m ||= (p = c.localName, l.get(p));
2440
- let h = t.getPath() + "/" + p, g = new L(t, this, h, u, d, a, o);
2322
+ let h = t.getPath() + "/" + p, g = new z(t, this, h, u, d, a, o);
2441
2323
  this._doWalk(m, g, n, c, s ?? i, a, o);
2442
2324
  }
2443
2325
  return s;
2444
2326
  }
2445
2327
  };
2446
- export { pe as DOMTransformer, L as ExecutionContext, m as NumberUtils, e as VisitorUtils };
2328
+ export { Fe as DOMTransformer, z as ExecutionContext, c as NumberUtils, g as VisitorUtils };