@sheetxl/io-xlsx 0.8.0-beta.11 → 0.8.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/browser/esm/{Cv3R6fGatARKedSn.mjs → 9dwUocbOsJuAcmKn.mjs} +2514 -2058
  2. package/browser/esm/{CZ9I80og75SDRjv0.mjs → BIvDjK4Zl8bWRgl8.mjs} +2 -2
  3. package/browser/esm/{DatIA9fZbEPjW4bh.mjs → CcH5ITJFTMVWUJO9.mjs} +1810 -1294
  4. package/browser/esm/{yveeVJ6hKDI5KDEz.mjs → D8k22TSWPd_RHEpj.mjs} +1182 -1002
  5. package/browser/esm/{DICL6ecj9BdJv8aX.mjs → DKnOwucZq4z9_-r-.mjs} +4 -4
  6. package/browser/esm/{Bs0EzhdU8WgGfPzf.mjs → DO75RoAQTgMuVzXv.mjs} +2 -2
  7. package/browser/esm/{BiDqExNXiY7ykk8E.mjs → DVLJTjJCGqrJUa8c.mjs} +200 -199
  8. package/browser/esm/{CLWsOc6DO8l1G_LF.mjs → DeMZN_qj__PKo4Wh.mjs} +816 -764
  9. package/browser/esm/{CuAXx5i4uqTz-mMY.mjs → DsppUz-14Z7ti9i3.mjs} +1 -1
  10. package/browser/esm/{CzFYJPxmLyKgEKF0.mjs → aUBXbTh2r0u3x4Xo.mjs} +2 -2
  11. package/browser/esm/index.mjs +2 -2
  12. package/node/esm/{ipiyzn5Pfohw2afB.mjs → BmIIQODk4dBVIXA4.mjs} +1280 -1096
  13. package/node/esm/{CxlSbH7mmnEEsqmX.mjs → C-e5AO_4TnGywT-m.mjs} +1 -1
  14. package/node/esm/{DScqM1V4wPntNP6-.mjs → C78E45n6j2E8rruH.mjs} +2044 -1585
  15. package/node/esm/{Bpqm_PpGLpdjL47-.mjs → CDKm5s3JE_d99TJw.mjs} +242 -241
  16. package/node/esm/{CAJxmJdobUbzpUz5.mjs → DCaAOfuW-w_dx_qd.mjs} +2 -2
  17. package/node/esm/{fopiRR7OiVoEiF7B.mjs → DSgxL0sBZtWMydVl.mjs} +2 -2
  18. package/node/esm/DXusvwW73FUDSyvD.mjs +6367 -0
  19. package/node/esm/{B9Zn6H1RV07Ob377.mjs → DsyuWxk3bdGhJUQN.mjs} +512 -460
  20. package/node/esm/index.mjs +4 -4
  21. package/package.json +3 -3
  22. package/types/src/DataTableFormula.d.ts +36 -0
  23. package/types/src/chart/ChartSpaceXml.d.ts +2 -1
  24. package/types/src/chart/_chartCodecs.d.ts +2 -0
  25. package/types/src/reader/CellControls.d.ts +18 -0
  26. package/types/src/reader/LibreOfficeDataTable.d.ts +3 -2
  27. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +1 -1
  28. package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +27 -0
  29. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +6 -0
  30. package/types/src/reader/domVisitors/index.d.ts +2 -4
  31. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +1 -0
  32. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +14 -3
  33. package/types/src/richValue/ErrorRichValueHandler.d.ts +22 -0
  34. package/types/src/richValue/IRichValueHandler.d.ts +109 -0
  35. package/types/src/richValue/LocalImageRichValueHandler.d.ts +18 -0
  36. package/types/src/richValue/RichDataParts.d.ts +69 -0
  37. package/types/src/richValue/RichRecordWriter.d.ts +61 -0
  38. package/types/src/richValue/RichValueHandlers.d.ts +25 -0
  39. package/types/src/richValue/RichValueResolver.d.ts +54 -0
  40. package/types/src/richValue/WebImageRichValueHandler.d.ts +42 -0
  41. package/types/src/richValue/index.d.ts +7 -0
  42. package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +18 -0
  43. package/types/src/writer/emitters/RichValuePartsEmitters.d.ts +36 -0
  44. package/types/src/writer/emitters/RichValueRelEmitter.d.ts +12 -0
  45. package/types/src/writer/emitters/RichValueStructureEmitter.d.ts +4 -3
  46. package/types/src/writer/emitters/RichValueTypesEmitter.d.ts +3 -2
  47. package/types/src/writer/emitters/RichValueWebImageEmitter.d.ts +24 -0
  48. package/types/src/writer/emitters/SlicerEmitter.d.ts +5 -2
  49. package/types/src/writer/emitters/StylesEmitter.d.ts +2 -0
  50. package/types/src/writer/utils/CellControlComplements.d.ts +29 -0
  51. package/types/src/writer/utils/RichValueCollector.d.ts +81 -129
  52. package/types/src/writer/utils/SheetStyleLayout.d.ts +18 -5
  53. package/node/esm/DD-yXSBzvDYy0TX5.mjs +0 -5842
  54. package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts +0 -7
  55. package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts +0 -6
@@ -1,15 +1,15 @@
1
1
  /**
2
- * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.11
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 t, At as e, Ct as o, D as s, Dt as r, Et as i, F as n, Ht as l, I as a, In as c, It as u, L as h, Ln as p, M as m, N as f, O as g, On as b, Ot as y, P as A, Pt as v, R as N, Tt as F, Ut as C, Wt as S, dn as T, et as w, g as P, j as I, k, r as V, rt as O, st as _, t as L, tt as B, un as D, wt as E, xt as R, yt as j, z as Y } from "./DScqM1V4wPntNP6-.mjs";
8
- import { n as M, r as X } from "./ipiyzn5Pfohw2afB.mjs";
9
- import { a as z, o as G, r as W } from "./B9Zn6H1RV07Ob377.mjs";
10
- import { CommonUtils as $ } from "@sheetxl/utils";
11
- import { AddressUtils as H, FormulaError as K, IBorders as U, ICellStyle as q, ICondition as J, IFill as Z, IFont as Q, IRange as tt, IShape as et, ISlicerStyle as ot, ITextFrame as st, ShapeStyleUtils as rt, Sort as it, Tuple as nt } from "@sheetxl/sdk";
12
- var lt = class {
7
+ import { A as t, At as e, Ct as o, D as s, Dt as r, Et as i, F as n, Gn as l, Gt as a, I as c, In as u, It as d, Kt as h, L as p, M as m, N as f, O as g, Ot as b, P as y, Pt as A, R as v, Tt as F, Wn as C, et as x, g as w, j as T, k as P, qt as I, r as k, rt as O, st as V, t as _, tt as B, vn as L, wt as D, xt as E, yn as R, yt as j, z as Y } from "./C78E45n6j2E8rruH.mjs";
8
+ import { i as X, n as M, r as z } from "./BmIIQODk4dBVIXA4.mjs";
9
+ import { a as G, o as W, r as $ } from "./DsyuWxk3bdGhJUQN.mjs";
10
+ import { CommonUtils as H } from "@sheetxl/utils";
11
+ import { AddressUtils as K, FormulaError as U, IBorders as q, ICellStyle as J, ICondition as Z, IFill as Q, IFont as tt, IRange as et, IShape as ot, ISlicerStyle as st, ITextFrame as rt, ShapeStyleUtils as it, Sort as nt, Tuple as lt } from "@sheetxl/sdk";
12
+ var at = class {
13
13
  constructor(t) {
14
14
  this.list = t;
15
15
  }
@@ -35,14 +35,14 @@ var lt = class {
35
35
  [Symbol.iterator]() {
36
36
  return this.list.values();
37
37
  }
38
- }, at = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t && "0" !== t && "off" !== t && "false" !== t && null, ct = (t) => {
38
+ }, ct = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t && "0" !== t && "off" !== t && "false" !== t && null, ut = (t) => {
39
39
  const e = parseInt(t);
40
40
  return isNaN(e) ? null : e;
41
- }, ut = (t) => {
41
+ }, dt = (t) => {
42
42
  const e = parseFloat(t);
43
43
  return isNaN(e) ? null : e;
44
- }, dt = /* @__PURE__ */ new Map(), ht = class {
45
- constructor(t, e, o, s, r, i = null, n = $.EmptyObject) {
44
+ }, ht = /* @__PURE__ */ new Map(), pt = class {
45
+ constructor(t, e, o, s, r, i = null, n = H.EmptyObject) {
46
46
  this._fileLocation = "";
47
47
  const l = (t, e, o) => n?.getRef?.(t, e, o, n?.parsedRefs), a = (t) => n?.getRefs?.(t, n?.parsedRefs);
48
48
  this._parent = t, this.sharedShared = e, this.currentPath = o, this.elemRoot = s, this.jsonRoot = r, t ? (this._fileLocation = t._fileLocation, this._getRef = t._getRef, this._getRefs = t._getRefs, this._serializeElement = t._serializeElement, this._readEmbeddedPart = t._readEmbeddedPart) : (i && (this._fileLocation = i), n?.getRef && (this._getRef = l), n?.getRefs && (this._getRefs = a), this._onWarning = n?.onWarning, this._addPerson = n?.addPerson, this._serializeElement = n?.serializeElement, this._readEmbeddedPart = n?.readEmbeddedPart);
@@ -54,7 +54,7 @@ var lt = class {
54
54
  return this._readEmbeddedPart?.(t, this._fileLocation) ?? null;
55
55
  }
56
56
  getRelationships() {
57
- return this._getRefs?.(this._fileLocation) ?? dt;
57
+ return this._getRefs?.(this._fileLocation) ?? ht;
58
58
  }
59
59
  getPath() {
60
60
  return this.currentPath;
@@ -113,7 +113,7 @@ var lt = class {
113
113
  }
114
114
  if (o = i, 0 === o.length) return null;
115
115
  }
116
- return 1 === o.length ? o[0] : 0 === o.length ? null : new lt(o);
116
+ return 1 === o.length ? o[0] : 0 === o.length ? null : new at(o);
117
117
  }
118
118
  _matchesElementName(t, e) {
119
119
  return e.includes(":") ? (t.tagName || t.nodeName) === e : t.localName === e;
@@ -129,10 +129,10 @@ var lt = class {
129
129
  }
130
130
  }
131
131
  getFromPath(t, e) {
132
- return $.getFromPath(t, e);
132
+ return H.getFromPath(t, e);
133
133
  }
134
134
  setToPath(t, e, o) {
135
- return $.setToPath(t, e, o);
135
+ return H.setToPath(t, e, o);
136
136
  }
137
137
  getValAttrAsString(t, e) {
138
138
  let o = this.evaluate(t, e);
@@ -153,13 +153,13 @@ var lt = class {
153
153
  return o && o.hasAttribute("val") ? parseFloat(o.getAttribute("val")) ?? null : null;
154
154
  }
155
155
  get BOOLEAN_COPY() {
156
- return at;
156
+ return ct;
157
157
  }
158
158
  get INT_COPY() {
159
- return ct;
159
+ return ut;
160
160
  }
161
161
  get FLOAT_COPY() {
162
- return ut;
162
+ return dt;
163
163
  }
164
164
  copyFromAttribute(t, e, o, s = e, r = null) {
165
165
  if (!t || !o || !t.hasAttribute(e)) return;
@@ -176,20 +176,20 @@ var lt = class {
176
176
  }
177
177
  this.setToPath(o, s, i);
178
178
  }
179
- }, pt = (t, e) => {
179
+ }, mt = (t, e) => {
180
180
  const o = [], s = t.childNodes, r = s.length;
181
181
  for (let t = 0; t < r; t++) {
182
182
  const r = s.item(t);
183
183
  1 === r.nodeType && r.localName === e && o.push(r);
184
184
  }
185
185
  return o;
186
- }, mt = [
186
+ }, ft = [
187
187
  ["fillRef", "fill"],
188
188
  ["lnRef", "stroke"],
189
189
  ["effectRef", "effect"]
190
- ], ft = (t, e) => {
190
+ ], gt = (t, e) => {
191
191
  const o = new m(), s = {};
192
- for (const [r, i] of mt) {
192
+ for (const [r, i] of ft) {
193
193
  const n = t.evaluate(r, e);
194
194
  if (!n) continue;
195
195
  const l = { index: parseInt(n.getAttribute("idx") ?? "0", 10) || 0 }, a = o.processAdjColor(t, n);
@@ -201,7 +201,7 @@ var lt = class {
201
201
  i && (e.color = i), s.font = e;
202
202
  }
203
203
  return s;
204
- }, gt = class {
204
+ }, bt = class {
205
205
  visit(t, e, o) {
206
206
  if (!e) return;
207
207
  let s = t.evaluate("*/cNvPr", e);
@@ -258,7 +258,7 @@ var lt = class {
258
258
  readStyleRefs(t, e, o) {
259
259
  const s = t.evaluate("style", e);
260
260
  if (!s) return void (o.style = null);
261
- const r = ft(t, s), i = rt.withoutDefaultStyleRefs({
261
+ const r = gt(t, s), i = it.withoutDefaultStyleRefs({
262
262
  ...o,
263
263
  style: r
264
264
  });
@@ -270,7 +270,7 @@ var lt = class {
270
270
  const o = {};
271
271
  for (let t = 0; t < e.length; t++) {
272
272
  const s = e.item(t);
273
- s.name.startsWith("xmlns") || (o[s.localName ?? s.name] = C(s.value));
273
+ s.name.startsWith("xmlns") || (o[s.localName ?? s.name] = h(s.value));
274
274
  }
275
275
  return Object.keys(o).length > 0 ? o : void 0;
276
276
  }
@@ -280,20 +280,20 @@ var lt = class {
280
280
  const s = o?.getAttribute?.("id"), r = s ? parseInt(s, 10) : void 0;
281
281
  return void 0 === r || isNaN(r) ? void 0 : r;
282
282
  }
283
- }, bt = [
283
+ }, yt = [
284
284
  ["spDef", "shape"],
285
285
  ["lnDef", "line"],
286
286
  ["txDef", "text"]
287
- ], yt = (t, e) => {
287
+ ], At = (t, e) => {
288
288
  const o = e.getAttribute("dxfId");
289
289
  if (null === o) return;
290
290
  const s = parseInt(o);
291
291
  return t.getVisitorParamsState().get("dxfs")?.get(s) || (t.warn(`A color filter or sort names a format that does not exist (dxfId '${o}').`), {});
292
- }, At = (t) => "1" === t || "true" === t, vt = class {
292
+ }, vt = (t) => "1" === t || "true" === t, Nt = class {
293
293
  visit(t, e, o) {}
294
294
  processDataBarColor(t, e, o, s, r = "auto") {
295
295
  if (!e) return;
296
- const i = D((t) => e.getAttribute(t), r);
296
+ const i = L((t) => e.getAttribute(t), r);
297
297
  return i && (o[s] = i), o;
298
298
  }
299
299
  processFonts(t, e, o) {
@@ -311,16 +311,16 @@ var lt = class {
311
311
  return o;
312
312
  }
313
313
  processFont(t, e, o) {
314
- t.getValAttrAsBoolean("b", e, !0) && (o.weight = 700), t.getValAttrAsBoolean("i", e, !0) && (o.style = Q.Style.Italic), t.getValAttrAsBoolean("strike", e, !0) && (o.strike = r(!0));
314
+ t.getValAttrAsBoolean("b", e, !0) && (o.weight = 700), t.getValAttrAsBoolean("i", e, !0) && (o.style = tt.Style.Italic), t.getValAttrAsBoolean("strike", e, !0) && (o.strike = r(!0));
315
315
  const s = t.evaluate("u", e);
316
316
  if (s) {
317
317
  const t = s.getAttribute("val");
318
- o.underline = y(t);
318
+ o.underline = b(t);
319
319
  }
320
- const l = E(t.evaluate("vertAlign", e)?.getAttribute("val"));
321
- void 0 !== l && (o.baseline = l), a(t, e, o, "sz", "size");
322
- const c = t.evaluate("color", e);
323
- this.processDataBarColor(t, c, o, "color"), o.color || (o.color = "auto"), N(t, e, o, "name", "family"), N(t, e, o, "rFont", "family");
320
+ const l = D(t.evaluate("vertAlign", e)?.getAttribute("val"));
321
+ void 0 !== l && (o.baseline = l), c(t, e, o, "sz", "size");
322
+ const a = t.evaluate("color", e);
323
+ this.processDataBarColor(t, a, o, "color"), o.color || (o.color = "auto"), v(t, e, o, "name", "family"), v(t, e, o, "rFont", "family");
324
324
  const u = t.evaluate("family", e);
325
325
  if (u) {
326
326
  const t = u.getAttribute("val");
@@ -345,7 +345,7 @@ var lt = class {
345
345
  const r = i(s, !!t.getValAttrAsBoolean(s, e, !0));
346
346
  void 0 !== r && (o.letterSpacing = r);
347
347
  }
348
- return h(t, e, o, "charset", "charset"), o;
348
+ return p(t, e, o, "charset", "charset"), o;
349
349
  }
350
350
  processFills(t, e, o) {
351
351
  if (!e) return;
@@ -359,7 +359,7 @@ var lt = class {
359
359
  return o;
360
360
  }
361
361
  processFill(t, e, o, s) {
362
- const r = { type: Z.Type.None }, i = e.childNodes;
362
+ const r = { type: Q.Type.None }, i = e.childNodes;
363
363
  let n = !1;
364
364
  const l = i.length;
365
365
  for (let e = 0; !n && e < l; e++) {
@@ -370,17 +370,17 @@ var lt = class {
370
370
  }
371
371
  processGradientFill(t, e, o) {
372
372
  if (!e) return;
373
- o.type = Z.Type.Gradient;
373
+ o.type = Q.Type.Gradient;
374
374
  const s = [];
375
375
  o.stops = s;
376
376
  const r = e.getAttribute("type");
377
377
  r && (o.gradientType = r);
378
378
  const i = e.hasAttribute("degree") ? parseFloat(e.getAttribute("degree")) : 0;
379
379
  (i + 90) % 360 != 0 && (o.angle = (i + 90) % 360), (e.hasAttribute("left") || e.hasAttribute("top") || e.hasAttribute("right") || e.hasAttribute("bottom")) && (o.focus = {
380
- left: Nt(e.getAttribute("left")),
381
- top: Nt(e.getAttribute("top")),
382
- right: Nt(e.getAttribute("right")),
383
- bottom: Nt(e.getAttribute("bottom"))
380
+ left: Ft(e.getAttribute("left")),
381
+ top: Ft(e.getAttribute("top")),
382
+ right: Ft(e.getAttribute("right")),
383
+ bottom: Ft(e.getAttribute("bottom"))
384
384
  });
385
385
  const n = e.childNodes, l = n.length;
386
386
  for (let e = 0; e < l; e++) {
@@ -396,11 +396,11 @@ var lt = class {
396
396
  }
397
397
  processPatternFill(t, e, o) {
398
398
  if (!e) return;
399
- const s = t.getVisitorParamsState().get("processingDXFs"), r = e.getAttribute("patternType") || (s ? Z.BuiltInSheetPattern.Solid : Z.BuiltInSheetPattern.None);
400
- if (r === Z.BuiltInSheetPattern.None) return { none: !0 };
401
- o.type = Z.Type.Pattern, r && (o.patternType = r);
399
+ const s = t.getVisitorParamsState().get("processingDXFs"), r = e.getAttribute("patternType") || (s ? Q.BuiltInSheetPattern.Solid : Q.BuiltInSheetPattern.None);
400
+ if (r === Q.BuiltInSheetPattern.None) return { none: !0 };
401
+ o.type = Q.Type.Pattern, r && (o.patternType = r);
402
402
  let i = "foreground", n = "background";
403
- const l = o.patternType === Z.BuiltInSheetPattern.Solid && s;
403
+ const l = o.patternType === Q.BuiltInSheetPattern.Solid && s;
404
404
  let a = l ? "dk1" : "lt1", c = l ? "lt1" : "dk1";
405
405
  if (l) {
406
406
  const t = i;
@@ -425,28 +425,36 @@ var lt = class {
425
425
  processBorder(t, e, o, s, r) {
426
426
  if (!e) return;
427
427
  const i = {};
428
- this.processBorderStroke(t, e, i, U.Edge.Left), this.processBorderStroke(t, e, i, U.Edge.Right), r ? (i.right || i.left) && (i.right ? i.vertical = { ...i.right } : i.vertical = { ...i.left }) : this.processBorderStroke(t, e, i, U.Edge.Vertical), this.processBorderStroke(t, e, i, U.Edge.Top), this.processBorderStroke(t, e, i, U.Edge.Bottom), r ? (i.bottom || i.top) && (i.bottom ? i.horizontal = { ...i.bottom } : i.horizontal = { ...i.top }) : this.processBorderStroke(t, e, i, U.Edge.Horizontal);
428
+ this.processBorderStroke(t, e, i, q.Edge.Left), this.processBorderStroke(t, e, i, q.Edge.Right), r ? (i.right || i.left) && (i.right ? i.vertical = { ...i.right } : i.vertical = { ...i.left }) : this.processBorderStroke(t, e, i, q.Edge.Vertical), this.processBorderStroke(t, e, i, q.Edge.Top), this.processBorderStroke(t, e, i, q.Edge.Bottom), r ? (i.bottom || i.top) && (i.bottom ? i.horizontal = { ...i.bottom } : i.horizontal = { ...i.top }) : this.processBorderStroke(t, e, i, q.Edge.Horizontal);
429
429
  const n = this.processBorderStroke(t, e, {}, "diagonal");
430
- return n && (At(e.getAttribute("diagonalUp")) && (i.diagonalUp = { ...n }), At(e.getAttribute("diagonalDown")) && (i.diagonalDown = { ...n })), o[s] = i, o;
430
+ return n && (vt(e.getAttribute("diagonalUp")) && (i.diagonalUp = { ...n }), vt(e.getAttribute("diagonalDown")) && (i.diagonalDown = { ...n })), o[s] = i, o;
431
431
  }
432
432
  processBorderStroke(t, e, o, s) {
433
433
  if (!e) return;
434
434
  const r = t.evaluate(s, e);
435
435
  if (!r) return;
436
436
  const i = {};
437
- r.hasAttribute("style") ? i.style = r.getAttribute("style") : t.getVisitorParamsState().get("processingDXFs") && (i.style = U.StrokeStyle.None);
437
+ r.hasAttribute("style") ? i.style = r.getAttribute("style") : t.getVisitorParamsState().get("processingDXFs") && (i.style = q.StrokeStyle.None);
438
438
  const n = t.evaluate("color", r);
439
439
  return n && this.processDataBarColor(t, n, i, "color"), Object.keys(i).length > 0 ? o[s] = i : null;
440
440
  }
441
- }, Nt = (t) => {
441
+ }, Ft = (t) => {
442
442
  if (!t) return 0;
443
443
  const e = parseFloat(t);
444
444
  return isNaN(e) ? 0 : e;
445
- }, Ft = new Set(Object.values(ot.ElementType).filter((t) => t !== ot.ElementType.WholeTable && t !== ot.ElementType.HeaderRow)), Ct = {
445
+ }, Ct = (t, e) => {
446
+ if (!t || 1 !== t.nodeType) return null;
447
+ const o = t.childNodes;
448
+ for (let t = 0; t < o.length; t++) {
449
+ const s = o.item(t);
450
+ if (1 === s.nodeType && s.localName === e) return s;
451
+ }
452
+ return null;
453
+ }, St = new Set(Object.values(st.ElementType).filter((t) => t !== st.ElementType.WholeTable && t !== st.ElementType.HeaderRow)), xt = {
446
454
  auto: "auto",
447
455
  autoNoTable: "automaticExceptTables",
448
456
  manual: "manual"
449
- }, St = [
457
+ }, wt = [
450
458
  "tableId",
451
459
  "columnId",
452
460
  "cacheName",
@@ -455,7 +463,7 @@ var lt = class {
455
463
  "sortOrder",
456
464
  "customListSort",
457
465
  "crossFilter"
458
- ], xt = (t, e) => {
466
+ ], Tt = (t, e) => {
459
467
  const o = t.content, s = o?.json;
460
468
  if (s) {
461
469
  if ("shape" === o.type || "picture" === o.type) {
@@ -471,9 +479,9 @@ var lt = class {
471
479
  }
472
480
  });
473
481
  }
474
- if ("group" === o.type) for (const t of s.members ?? []) xt(t, !0);
482
+ if ("group" === o.type) for (const t of s.members ?? []) Tt(t, !0);
475
483
  }
476
- }, Tt = class extends gt {
484
+ }, Pt = class extends bt {
477
485
  visit(t, e, o) {
478
486
  if (e) return this.visitShape(t, e, o, "sp", "nvSpPr/cNvSpPr/spLocks");
479
487
  }
@@ -482,7 +490,7 @@ var lt = class {
482
490
  if (this.isGroupContent(o)) {
483
491
  if (t.getPath().includes("Fallback")) return {};
484
492
  const { movable: s, content: l } = this.readMemberHeader(t, e, "shape");
485
- n !== et.Type.Shape && (l.type = n), this.readShapeDetails(t, e, r, i, l), this.readStyleRefs(t, e, l);
493
+ n !== ot.Type.Shape && (l.type = n), this.readShapeDetails(t, e, r, i, l), this.readStyleRefs(t, e, l);
486
494
  const a = t.evaluate(i, e);
487
495
  a?.hasAttribute?.("noChangeAspect") && (s.lockAspect = "1" === a.getAttribute("noChangeAspect"));
488
496
  const c = this.readTwinOf(t, e);
@@ -490,7 +498,7 @@ var lt = class {
490
498
  }
491
499
  if (t.getPath().includes("Fallback") && o.content) {
492
500
  const r = o.content.json;
493
- if ("shape" === o.content.type && r && (r.type ?? et.Type.Shape) === n) {
501
+ if ("shape" === o.content.type && r && (r.type ?? ot.Type.Shape) === n) {
494
502
  const o = t.evaluate("txBody", e), i = o ? new s().readTextBody(t, o) : null;
495
503
  i && "" !== g(i) && (r.text = i);
496
504
  }
@@ -499,7 +507,7 @@ var lt = class {
499
507
  o = super.visit(t, e, o);
500
508
  const l = t.evaluate(i, e);
501
509
  l?.hasAttribute?.("noChangeAspect") && (o.lockAspect = "1" === l.getAttribute("noChangeAspect"));
502
- const a = n === et.Type.Shape ? {} : { type: n }, c = this.readSourceId(t, e);
510
+ const a = n === ot.Type.Shape ? {} : { type: n }, c = this.readSourceId(t, e);
503
511
  void 0 !== c && (a.sourceId = c), this.readShapeDetails(t, e, r, i, a), this.readStyleRefs(t, e, a);
504
512
  const u = this.readTwinOf(t, e);
505
513
  return void 0 !== u && Object.assign(a, { twinOf: u }), this.setContent(o, {
@@ -517,7 +525,7 @@ var lt = class {
517
525
  const i = e.getAttribute("macro");
518
526
  i && (r.macro = i);
519
527
  const n = e.getAttribute("textlink");
520
- n && (r.textLink = n), e.hasAttribute("fLocksText") && (r.locksText = C(e.getAttribute("fLocksText"))), e.hasAttribute("fPublished") && (r.published = C(e.getAttribute("fPublished")));
528
+ n && (r.textLink = n), e.hasAttribute("fLocksText") && (r.locksText = h(e.getAttribute("fLocksText"))), e.hasAttribute("fPublished") && (r.published = h(e.getAttribute("fPublished")));
521
529
  const l = s.slice(0, s.lastIndexOf("/")), a = t.evaluate(l, e);
522
530
  "1" === a?.getAttribute?.("txBox") && (r.textBox = !0);
523
531
  const c = this.readLocks(t.evaluate(s, e));
@@ -532,26 +540,26 @@ var lt = class {
532
540
  (o || s) && (r.connectorEnds = {}, o && (r.connectorEnds.start = o), s && (r.connectorEnds.end = s));
533
541
  }
534
542
  }
535
- }, wt = /^<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>$/, Pt = (t, e, o, s) => {
543
+ }, It = /^<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>$/, kt = (t, e, o, s) => {
536
544
  const r = t.evaluate(o, e), i = t.evaluate(s, e);
537
545
  return r || i ? {
538
- x: S(r?.getAttribute("x") ?? null) ?? 0,
539
- y: S(r?.getAttribute("y") ?? null) ?? 0,
540
- width: S(i?.getAttribute("cx") ?? null) ?? 0,
541
- height: S(i?.getAttribute("cy") ?? null) ?? 0
546
+ x: I(r?.getAttribute("x") ?? null) ?? 0,
547
+ y: I(r?.getAttribute("y") ?? null) ?? 0,
548
+ width: I(i?.getAttribute("cx") ?? null) ?? 0,
549
+ height: I(i?.getAttribute("cy") ?? null) ?? 0
542
550
  } : null;
543
- }, It = "richTypes", kt = "richData";
551
+ }, Ot = { Checkbox: "checkbox" };
544
552
  var Vt = (t) => {
545
553
  const e = t.getAttribute("val");
546
554
  return "0" !== e && "false" !== e;
547
- }, Ot = {
555
+ }, _t = {
548
556
  1: "serif",
549
557
  2: "sans-serif",
550
558
  3: "monospace",
551
559
  4: "cursive",
552
560
  5: "fantasy"
553
561
  };
554
- function _t(t) {
562
+ function Bt(t) {
555
563
  const e = {}, o = t.childNodes;
556
564
  for (let t = 0; t < o.length; t++) {
557
565
  const s = o.item(t);
@@ -560,7 +568,7 @@ function _t(t) {
560
568
  e.weight = Vt(s) ? 700 : 400;
561
569
  break;
562
570
  case "i":
563
- e.style = Vt(s) ? Q.Style.Italic : Q.Style.Normal;
571
+ e.style = Vt(s) ? tt.Style.Italic : tt.Style.Normal;
564
572
  break;
565
573
  case "strike":
566
574
  e.strike = r(Vt(s));
@@ -578,10 +586,10 @@ function _t(t) {
578
586
  break;
579
587
  }
580
588
  case "u":
581
- e.underline = y(s.getAttribute("val"));
589
+ e.underline = b(s.getAttribute("val"));
582
590
  break;
583
591
  case "vertAlign": {
584
- const t = E(s.getAttribute("val"));
592
+ const t = D(s.getAttribute("val"));
585
593
  void 0 !== t && (e.baseline = t);
586
594
  break;
587
595
  }
@@ -596,7 +604,7 @@ function _t(t) {
596
604
  break;
597
605
  }
598
606
  case "family": {
599
- const t = Ot[s.getAttribute("val") ?? ""];
607
+ const t = _t[s.getAttribute("val") ?? ""];
600
608
  t && (e.fallbacks = [t]);
601
609
  break;
602
610
  }
@@ -614,7 +622,7 @@ function _t(t) {
614
622
  e.color = "#" + (8 === t.length ? t.substring(2) : t).toUpperCase();
615
623
  break;
616
624
  }
617
- const o = D((t) => s.getAttribute(t));
625
+ const o = L((t) => s.getAttribute(t));
618
626
  o && (e.color = o);
619
627
  break;
620
628
  }
@@ -698,16 +706,16 @@ var Lt = {
698
706
  };
699
707
  }
700
708
  },
701
- ShapePropertiesVisitor: I,
702
- TextPropertiesVisitor: k,
709
+ ShapePropertiesVisitor: T,
710
+ TextPropertiesVisitor: P,
703
711
  ShapeTextVisitor: s,
704
712
  ThemeVisitor: class {
705
713
  visit(t, e, o) {
706
714
  o.name = e.getAttribute("name"), o.objectDefaults = {};
707
- const s = pt(e, "custClrLst")[0];
715
+ const s = mt(e, "custClrLst")[0];
708
716
  if (s) {
709
717
  const e = new m(), r = [];
710
- for (const o of pt(s, "custClr")) {
718
+ for (const o of mt(s, "custClr")) {
711
719
  const s = e.processAdjColor(t, o);
712
720
  if (!s) continue;
713
721
  const i = { color: s }, n = o.getAttribute("name");
@@ -715,9 +723,9 @@ var Lt = {
715
723
  }
716
724
  r.length && (o.customColors = r);
717
725
  }
718
- for (const t of pt(e, "extLst")) for (const e of pt(t, "ext")) {
726
+ for (const t of mt(e, "extLst")) for (const e of mt(t, "ext")) {
719
727
  if ("{05A4C25C-085E-4340-85A3-A5531E510DB2}" !== e.getAttribute("uri")) continue;
720
- const t = pt(e, "themeFamily")[0], s = t?.getAttribute("id");
728
+ const t = mt(e, "themeFamily")[0], s = t?.getAttribute("id");
721
729
  if (!s) continue;
722
730
  const r = {
723
731
  name: t.getAttribute("name") ?? "",
@@ -777,7 +785,7 @@ var Lt = {
777
785
  ObjectDefaultsVisitor: class {
778
786
  visit(t, e, o) {
779
787
  const s = {};
780
- for (const [o, r] of bt) {
788
+ for (const [o, r] of yt) {
781
789
  const i = t.evaluate(o, e);
782
790
  i && (s[r] = this.processDefault(t, i));
783
791
  }
@@ -785,11 +793,11 @@ var Lt = {
785
793
  }
786
794
  processDefault(t, e) {
787
795
  const o = {}, r = t.evaluate("spPr", e);
788
- r && new I().visit(t, r, o);
796
+ r && new T().visit(t, r, o);
789
797
  const i = new s().readTextBody(t, e);
790
798
  (i.body || i.listStyle) && (o.text = i);
791
799
  const n = t.evaluate("style", e);
792
- return n && (o.style = ft(t, n)), o;
800
+ return n && (o.style = gt(t, n)), o;
793
801
  }
794
802
  },
795
803
  FmtSchemeVisitor: class extends m {
@@ -814,11 +822,11 @@ var Lt = {
814
822
  }
815
823
  parseFillListItem(t, e) {
816
824
  switch (e.localName) {
817
- case "noFill": return { type: Z.Type.None };
825
+ case "noFill": return { type: Q.Type.None };
818
826
  case "solidFill": {
819
827
  const o = this.processAdjColor(t, e);
820
828
  return o ? {
821
- type: Z.Type.Solid,
829
+ type: Q.Type.Solid,
822
830
  color: o
823
831
  } : void 0;
824
832
  }
@@ -860,15 +868,15 @@ var Lt = {
860
868
  }
861
869
  processColorFilter(t, e) {
862
870
  const o = {}, s = {
863
- operator: J.BuiltInOperatorNames.Color,
871
+ operator: Z.BuiltInOperatorNames.Color,
864
872
  param: o
865
873
  };
866
874
  t.copyFromAttribute(e, "cellColor", o, "cellColor", t.BOOLEAN_COPY);
867
- const r = yt(t, e);
875
+ const r = At(t, e);
868
876
  return r && (o.style = r), s;
869
877
  }
870
878
  processCustomFilter(t, e) {
871
- return _({
879
+ return V({
872
880
  operator: e.getAttribute("operator"),
873
881
  val: e.getAttribute("val")
874
882
  }, (e) => t.warn(e));
@@ -877,7 +885,7 @@ var Lt = {
877
885
  const o = e.getAttribute("and"), s = "and" === o || "1" === o;
878
886
  e.getAttribute("val");
879
887
  const r = [], i = {
880
- operator: s ? J.BuiltInOperatorNames.And : J.BuiltInOperatorNames.Or,
888
+ operator: s ? Z.BuiltInOperatorNames.And : Z.BuiltInOperatorNames.Or,
881
889
  param: r
882
890
  }, n = e.childNodes, l = n.length;
883
891
  for (let e = 0; e < l; e++) {
@@ -889,7 +897,7 @@ var Lt = {
889
897
  return 1 === r.length ? r[0] : B(i);
890
898
  }
891
899
  processDynamicFilter(t, e) {
892
- return w(e.getAttribute("type"));
900
+ return x(e.getAttribute("type"));
893
901
  }
894
902
  processDateGroupItem(t, e) {
895
903
  const o = {};
@@ -900,10 +908,10 @@ var Lt = {
900
908
  }
901
909
  processFilters(t, e) {
902
910
  const o = {}, s = {
903
- operator: J.BuiltInOperatorNames.InSet,
911
+ operator: Z.BuiltInOperatorNames.InSet,
904
912
  param: o
905
913
  };
906
- s.selector = J.BuiltInSelectorNames.Display, t.copyFromAttribute(e, "blank", o, "blank", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calendarType", o, "calendarType");
914
+ s.selector = Z.BuiltInSelectorNames.Display, t.copyFromAttribute(e, "blank", o, "blank", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calendarType", o, "calendarType");
907
915
  let r = [], i = [];
908
916
  const n = e.childNodes, l = n.length;
909
917
  for (let e = 0; e < l; e++) {
@@ -922,14 +930,14 @@ var Lt = {
922
930
  }
923
931
  processIcon(t, e) {
924
932
  const o = {}, s = {
925
- operator: J.BuiltInOperatorNames.Icon,
933
+ operator: Z.BuiltInOperatorNames.Icon,
926
934
  param: o
927
935
  };
928
936
  return t.copyFromAttribute(e, "iconId", o, "iconId", t.INT_COPY), t.copyFromAttribute(e, "iconSet", o), s;
929
937
  }
930
938
  processTop10(t, e) {
931
939
  const o = {}, s = {
932
- operator: J.BuiltInOperatorNames.TopN,
940
+ operator: Z.BuiltInOperatorNames.TopN,
933
941
  param: o
934
942
  };
935
943
  return t.copyFromAttribute(e, "filterVal", o, "filterVal", t.FLOAT_COPY), t.copyFromAttribute(e, "percent", o, "percent", t.BOOLEAN_COPY), t.copyFromAttribute(e, "top", o, "top", t.BOOLEAN_COPY), t.copyFromAttribute(e, "val", o, "limit", t.FLOAT_COPY), s;
@@ -939,7 +947,7 @@ var Lt = {
939
947
  for (let e = 0; e < o.length; e++) {
940
948
  const s = o.item(e);
941
949
  if (1 !== s.nodeType || "ext" !== s.localName) continue;
942
- if (b(s.getAttribute("uri")) !== b("{1AD28BCE-077C-4C59-8B6E-1921CE8616D4}")) continue;
950
+ if (u(s.getAttribute("uri")) !== u("{1AD28BCE-077C-4C59-8B6E-1921CE8616D4}")) continue;
943
951
  const r = s.childNodes;
944
952
  for (let e = 0; e < r.length; e++) {
945
953
  const o = r.item(e);
@@ -968,12 +976,12 @@ var Lt = {
968
976
  if (!e.hasAttribute("colId")) return;
969
977
  const s = parseInt(e.getAttribute("colId"));
970
978
  let r = !1;
971
- if (e.hasAttribute("hiddenButton") && (r = C(e.getAttribute("hiddenButton"))), r && o) {
979
+ if (e.hasAttribute("hiddenButton") && (r = h(e.getAttribute("hiddenButton"))), r && o) {
972
980
  let t = o.hiddenButtons;
973
981
  t || (t = [], o.hiddenButtons = t), t.push(s);
974
982
  }
975
983
  let i = !1;
976
- if (e.hasAttribute("showButton") && (i = C(e.getAttribute("showButton"))), i && o) {
984
+ if (e.hasAttribute("showButton") && (i = h(e.getAttribute("showButton"))), i && o) {
977
985
  let t = o.showButtons;
978
986
  !0 !== t && (t || (t = [], o.showButtons = t), t[s] = !0);
979
987
  }
@@ -997,7 +1005,7 @@ var Lt = {
997
1005
  visit(t, e, o) {
998
1006
  if (!e) return;
999
1007
  const s = e.getAttribute("ref"), r = {};
1000
- e.hasAttribute("caseSensitive") && (r.collatorOptions = C(e.getAttribute("caseSensitive")) ? it.CaseSensitiveOptions : it.CaseInsensitiveOptions);
1008
+ e.hasAttribute("caseSensitive") && (r.collatorOptions = h(e.getAttribute("caseSensitive")) ? nt.CaseSensitiveOptions : nt.CaseInsensitiveOptions);
1001
1009
  const i = e.getAttribute("sortMethod");
1002
1010
  null != i && "none" !== i && ("stroke" === i ? r.collatorOptions = {
1003
1011
  ...r.collatorOptions,
@@ -1007,15 +1015,15 @@ var Lt = {
1007
1015
  collation: "pinyin"
1008
1016
  }));
1009
1017
  const n = {};
1010
- e.hasAttribute("columnSort") && C(e.getAttribute("columnSort")) && (n.axis = tt.Axis.Column);
1011
- const l = H.fastStringToRange(s), a = [], c = [];
1018
+ e.hasAttribute("columnSort") && h(e.getAttribute("columnSort")) && (n.axis = et.Axis.Column);
1019
+ const l = K.fastStringToRange(s), a = [], c = [];
1012
1020
  this.processSortConditions(t, e, a, l, r, c), a.length > 0 && (n.sorts = a);
1013
- const d = t.getVisitorParamsState().get("ref");
1014
- if (d && s) {
1015
- const t = H.fastStringToRange(d);
1021
+ const u = t.getVisitorParamsState().get("ref");
1022
+ if (u && s) {
1023
+ const t = K.fastStringToRange(u);
1016
1024
  n.extent = {
1017
- range: u(t, l),
1018
- sorts: c.map((e) => v(t, l, e))
1025
+ range: d(t, l),
1026
+ sorts: c.map((e) => A(t, l, e))
1019
1027
  };
1020
1028
  }
1021
1029
  return Object.keys(a).length > 0 && (o.sort = n), n;
@@ -1025,14 +1033,14 @@ var Lt = {
1025
1033
  const i = {};
1026
1034
  if (!e.hasAttribute("ref")) return void t.warn("A sort condition has no ref; it was dropped.", { onceKey: "xlsx.sheet.sort.noRef" });
1027
1035
  if (e.hasAttribute("ref")) {
1028
- const t = e.getAttribute("ref"), s = H.fastStringToRange(t);
1036
+ const t = e.getAttribute("ref"), s = K.fastStringToRange(t);
1029
1037
  i.index = o ? s.colStart - o.colStart : s.colStart, r?.push(s);
1030
1038
  }
1031
1039
  const n = { ...s };
1032
- i.criteria = n, n.reverse = !1, e.hasAttribute("descending") && (n.reverse = C(e.getAttribute("descending")));
1040
+ i.criteria = n, n.reverse = !1, e.hasAttribute("descending") && (n.reverse = h(e.getAttribute("descending")));
1033
1041
  const l = O(e.getAttribute("sortBy"));
1034
1042
  l && (n.sortOn = l);
1035
- const a = yt(t, e);
1043
+ const a = At(t, e);
1036
1044
  return a && (n.style = a), t.copyFromAttribute(e, "iconSet", n), t.copyFromAttribute(e, "customList", n), i;
1037
1045
  }
1038
1046
  processSortConditions(t, e, o, s, r, i) {
@@ -1047,7 +1055,7 @@ var Lt = {
1047
1055
  }
1048
1056
  }
1049
1057
  },
1050
- SheetStyleVisitor: class extends vt {
1058
+ SheetStyleVisitor: class extends Nt {
1051
1059
  visit(t, s, r) {
1052
1060
  this.processNumFmts(t, t.evaluate("numFmts", s), null), t.getVisitorParamsState().set("colorsToProcess", /* @__PURE__ */ new Set());
1053
1061
  const i = {
@@ -1059,19 +1067,19 @@ var Lt = {
1059
1067
  const l = i.fonts[this.normalFontId(t, s)], a = {
1060
1068
  declared: ["1", "true"].includes(n?.getAttribute("x14ac:knownFonts") ?? ""),
1061
1069
  normalIsThemeFont: o(l?.family),
1062
- faces: V(Object.values(i.fonts).map((t) => ({
1070
+ faces: k(Object.values(i.fonts).map((t) => ({
1063
1071
  ...t,
1064
1072
  family: e(t?.family, t?.fallbacks, null, !1).name
1065
1073
  })))
1066
1074
  };
1067
- t.getVisitorParamsState().set(L, a), l && t.getVisitorParamsState().set(X, l), this.processFills(t, t.evaluate("fills", s), i.fills), this.processBorders(t, t.evaluate("borders", s), i.borders, !0), i.fills[0] = { type: Z.Type.None }, i.fills[1] = {
1068
- type: Z.Type.Pattern,
1069
- patternType: Z.BuiltInSheetPattern.Gray125
1075
+ t.getVisitorParamsState().set(_, a), l && t.getVisitorParamsState().set(X, l), this.processFills(t, t.evaluate("fills", s), i.fills), this.processBorders(t, t.evaluate("borders", s), i.borders, !0), i.fills[0] = { type: Q.Type.None }, i.fills[1] = {
1076
+ type: Q.Type.Pattern,
1077
+ patternType: Q.BuiltInSheetPattern.Gray125
1070
1078
  }, i.borders[0] = {
1071
- bottom: { style: U.StrokeStyle.None },
1072
- left: { style: U.StrokeStyle.None },
1073
- right: { style: U.StrokeStyle.None },
1074
- top: { style: U.StrokeStyle.None }
1079
+ bottom: { style: q.StrokeStyle.None },
1080
+ left: { style: q.StrokeStyle.None },
1081
+ right: { style: q.StrokeStyle.None },
1082
+ top: { style: q.StrokeStyle.None }
1075
1083
  };
1076
1084
  const c = [];
1077
1085
  this.processXFs(t, t.evaluate("cellStyleXfs", s), c, i, null, !1);
@@ -1083,9 +1091,11 @@ var Lt = {
1083
1091
  const d = [];
1084
1092
  this.processXFs(t, t.evaluate("cellXfs", s), d, i, u), Object.keys(d).length > 0 && (r.direct = d);
1085
1093
  const h = this.collectHiddenXfs(t.evaluate("cellXfs", s));
1086
- h.size > 0 && t.getVisitorParamsState().set(M, h);
1087
- const p = [];
1088
- return this.processDXFs(t, t.evaluate("dxfs", s), p), this.processTableStyles(t, t.evaluate("tableStyles", s), r, p), this.processSlicerStyles(t, t.evaluate("extLst", s), r), this.processIndexColors(t, t.evaluate("colors/indexedColors", s), r), this.processMruColors(t, t.evaluate("colors/mruColors", s), r), r;
1094
+ h.size > 0 && t.getVisitorParamsState().set(z, h);
1095
+ const p = this.collectXfComplements(t.evaluate("cellXfs", s));
1096
+ p.size > 0 && t.getVisitorParamsState().set(M, p);
1097
+ const m = [];
1098
+ return this.processDXFs(t, t.evaluate("dxfs", s), m), this.processTableStyles(t, t.evaluate("tableStyles", s), r, m), this.processSlicerStyles(t, t.evaluate("extLst", s), r), this.processIndexColors(t, t.evaluate("colors/indexedColors", s), r), this.processMruColors(t, t.evaluate("colors/mruColors", s), r), r;
1089
1099
  }
1090
1100
  normalFontId(t, e) {
1091
1101
  const o = t.evaluate("cellStyles", e)?.childNodes;
@@ -1161,9 +1171,9 @@ var Lt = {
1161
1171
  const n = e.getAttribute("xfId");
1162
1172
  if (n && r) {
1163
1173
  const t = r.get(parseInt(n));
1164
- t && t !== q.BuiltInName.Normal && (o.named = t);
1174
+ t && t !== J.BuiltInName.Normal && (o.named = t);
1165
1175
  }
1166
- const l = (t) => !(!i && e.hasAttribute(t)) || C(e.getAttribute(t)), a = (t) => !i || e.hasAttribute(t) && C(e.getAttribute(t)), c = "0", u = i ? c : void 0;
1176
+ const l = (t) => !(!i && e.hasAttribute(t)) || h(e.getAttribute(t)), a = (t) => !i || e.hasAttribute(t) && h(e.getAttribute(t)), c = "0", u = i ? c : void 0;
1167
1177
  if (l("applyFont")) {
1168
1178
  const t = e.getAttribute("fontId") ?? u;
1169
1179
  if (void 0 !== t && (t !== c || a("applyFont"))) {
@@ -1205,18 +1215,18 @@ var Lt = {
1205
1215
  const s = t.evaluate("protection", e);
1206
1216
  (s || a("applyProtection")) && this.processProtection(t, s, o);
1207
1217
  }
1208
- const d = C(e.getAttribute("quotePrefix") ?? "");
1218
+ const d = h(e.getAttribute("quotePrefix") ?? "");
1209
1219
  d && (o.quotePrefix = d);
1210
1220
  }
1211
1221
  processAlignment(t, e, o) {
1212
1222
  const s = {};
1213
- if (e?.hasAttribute("horizontal") ? s.horizontal = e.getAttribute("horizontal") : s.horizontal = st.HorizontalAlignment.General, e?.hasAttribute("vertical") ? s.vertical = e.getAttribute("vertical") : s.vertical = st.VerticalAlignment.Bottom, e?.hasAttribute("indent") ? s.indent = parseInt(e.getAttribute("indent")) : s.indent = 0, e?.hasAttribute("relativeIndent") ? s.relativeIndent = parseInt(e.getAttribute("relativeIndent")) : s.relativeIndent = 0, C(e?.getAttribute("wrapText") ?? "") ? s.overflow = st.Overflow.Wrap : s.overflow = st.Overflow.Visible, C(e?.getAttribute("shrinkToFit") ?? "") && (s.overflow = st.Overflow.Shrink), e?.hasAttribute("textRotation")) {
1223
+ if (e?.hasAttribute("horizontal") ? s.horizontal = e.getAttribute("horizontal") : s.horizontal = rt.HorizontalAlignment.General, e?.hasAttribute("vertical") ? s.vertical = e.getAttribute("vertical") : s.vertical = rt.VerticalAlignment.Bottom, e?.hasAttribute("indent") ? s.indent = parseInt(e.getAttribute("indent")) : s.indent = 0, e?.hasAttribute("relativeIndent") ? s.relativeIndent = parseInt(e.getAttribute("relativeIndent")) : s.relativeIndent = 0, h(e?.getAttribute("wrapText") ?? "") ? s.overflow = rt.Overflow.Wrap : s.overflow = rt.Overflow.Visible, h(e?.getAttribute("shrinkToFit") ?? "") && (s.overflow = rt.Overflow.Shrink), e?.hasAttribute("textRotation")) {
1214
1224
  let t = parseFloat(e.getAttribute("textRotation"));
1215
1225
  t > 0 && t <= 90 ? t = 360 - t : t > 90 && t <= 180 ? t -= 90 : 255 === t && (t = 0, s.stacked = !0), s.rotation = t;
1216
1226
  } else s.rotation = 0;
1217
- e?.hasAttribute("justifyLastLine") && (s.justifyLastLine = C(e.getAttribute("justifyLastLine")));
1227
+ e?.hasAttribute("justifyLastLine") && (s.justifyLastLine = h(e.getAttribute("justifyLastLine")));
1218
1228
  const r = e?.getAttribute("readingOrder");
1219
- return r && ("0" === r ? s.readingDirection = st.ReadingDirection.Auto : "1" === r ? s.readingDirection = st.ReadingDirection.LeftToRight : "2" === r ? s.readingDirection = st.ReadingDirection.RightToLeft : t.warn(`Invalid readingOrder '${r}'; the direction was left automatic.`, { onceKey: "xlsx.style.readingOrder" })), Object.keys(s).length > 0 && (o.alignment = s), o;
1229
+ return r && ("0" === r ? s.readingDirection = rt.ReadingDirection.Auto : "1" === r ? s.readingDirection = rt.ReadingDirection.LeftToRight : "2" === r ? s.readingDirection = rt.ReadingDirection.RightToLeft : t.warn(`Invalid readingOrder '${r}'; the direction was left automatic.`, { onceKey: "xlsx.style.readingOrder" })), Object.keys(s).length > 0 && (o.alignment = s), o;
1220
1230
  }
1221
1231
  collectHiddenXfs(t) {
1222
1232
  const e = /* @__PURE__ */ new Set();
@@ -1229,7 +1239,27 @@ var Lt = {
1229
1239
  const i = r.childNodes;
1230
1240
  for (let t = 0; t < i.length; t++) {
1231
1241
  const o = i.item(t);
1232
- 1 === o.nodeType && "protection" === o.localName && C(o.getAttribute("hidden") ?? "") && e.add(s);
1242
+ 1 === o.nodeType && "protection" === o.localName && h(o.getAttribute("hidden") ?? "") && e.add(s);
1243
+ }
1244
+ s++;
1245
+ }
1246
+ return e;
1247
+ }
1248
+ collectXfComplements(t) {
1249
+ const e = /* @__PURE__ */ new Map();
1250
+ if (!t) return e;
1251
+ const o = t.childNodes;
1252
+ let s = 0;
1253
+ for (let t = 0; t < o.length; t++) {
1254
+ const r = o.item(t);
1255
+ if (1 !== r.nodeType || "xf" !== r.localName) continue;
1256
+ const i = Ct(r, "extLst");
1257
+ if (i) {
1258
+ const t = i.childNodes;
1259
+ for (let o = 0; o < t.length; o++) {
1260
+ const r = Ct(t.item(o), "xfComplement"), i = parseInt(r?.getAttribute("i") ?? "", 10);
1261
+ isNaN(i) || e.set(s, i);
1262
+ }
1233
1263
  }
1234
1264
  s++;
1235
1265
  }
@@ -1238,7 +1268,7 @@ var Lt = {
1238
1268
  processProtection(t, e, o) {
1239
1269
  if (!e) return;
1240
1270
  const s = e.getAttribute("locked");
1241
- return o.protection = { alwaysUnlocked: !!s && !C(s) }, o;
1271
+ return o.protection = { alwaysUnlocked: !!s && !h(s) }, o;
1242
1272
  }
1243
1273
  processDXF(t, e, o) {
1244
1274
  if (!e) return;
@@ -1322,7 +1352,7 @@ var Lt = {
1322
1352
  const o = a.item(e);
1323
1353
  if (1 !== o.nodeType || "slicerStyleElement" !== o.localName) continue;
1324
1354
  const s = o.getAttribute("type");
1325
- if (!s || !Ft.has(s)) continue;
1355
+ if (!s || !St.has(s)) continue;
1326
1356
  const i = o.getAttribute("dxfId"), l = null != i ? n[parseInt(i)] : void 0;
1327
1357
  l ? r[s] = l : t.warn(`A slicer style names a format that does not exist (dxfId '${i}').`, { onceKey: "xlsx.style.slicerStyle.dxf" });
1328
1358
  }
@@ -1332,7 +1362,7 @@ var Lt = {
1332
1362
  }
1333
1363
  processTableStyle(t, e, o, s, r = !1) {
1334
1364
  const i = e.getAttribute("name"), n = { name: i };
1335
- e.hasAttribute("table") && (n.table = C(e.getAttribute("table"))), e.hasAttribute("pivot") && (n.pivot = C(e.getAttribute("pivot"))), r && !n.pivot && s.unshift(null);
1365
+ e.hasAttribute("table") && (n.table = h(e.getAttribute("table"))), e.hasAttribute("pivot") && (n.pivot = h(e.getAttribute("pivot"))), r && !n.pivot && s.unshift(null);
1336
1366
  const l = e.childNodes, a = l.length;
1337
1367
  for (let e = 0; e < a; e++) {
1338
1368
  const o = l.item(e);
@@ -1368,7 +1398,7 @@ var Lt = {
1368
1398
  const t = parseInt(e.getAttribute("xfId") ?? ""), i = e.getAttribute("name"), n = e.getAttribute("builtinId");
1369
1399
  let l = i;
1370
1400
  if (null !== n) {
1371
- const t = q.builtInNameFromId(parseInt(n));
1401
+ const t = J.builtInNameFromId(parseInt(n));
1372
1402
  void 0 !== t && (l = t);
1373
1403
  }
1374
1404
  if (r.set(t, l), !s[t]) continue;
@@ -1376,13 +1406,13 @@ var Lt = {
1376
1406
  name: l,
1377
1407
  style: s[t]
1378
1408
  };
1379
- e.getAttribute("hidden") && (a.hidden = C(e.getAttribute("hidden"))), e.getAttribute("iLevel") && (a.iLevel = parseInt(e.getAttribute("iLevel"))), null !== n && C(e.getAttribute("customBuiltin") ?? "0") && (a.customized = !0), o.push(a);
1409
+ e.getAttribute("hidden") && (a.hidden = h(e.getAttribute("hidden"))), e.getAttribute("iLevel") && (a.iLevel = parseInt(e.getAttribute("iLevel"))), null !== n && h(e.getAttribute("customBuiltin") ?? "0") && (a.customized = !0), o.push(a);
1380
1410
  }
1381
1411
  }
1382
1412
  }
1383
1413
  afterVisit(t, e, o) {}
1384
1414
  },
1385
- WorkbookVisitor: class extends vt {
1415
+ WorkbookVisitor: class extends Nt {
1386
1416
  visit(t, e, o) {
1387
1417
  return this.processSheetRefs(t, t.evaluate("sheets", e), o), this.processExternalReferences(t, t.evaluate("externalReferences", e), o), this.processBookViews(t, t.evaluate("bookViews", e), o), this.processDefinedNames(t, t.evaluate("definedNames", e), o), this.processCalcPr(t, t.evaluate("calcPr", e), o), this.processPivotCaches(t, t.evaluate("pivotCaches", e), o), this.processWorkbookProtection(t, t.evaluate("workbookProtection", e), o), this.processWorkbookPr(t, t.evaluate("workbookPr", e), o), o;
1388
1418
  }
@@ -1395,13 +1425,13 @@ var Lt = {
1395
1425
  if (!e) return;
1396
1426
  const s = {};
1397
1427
  this.processPassword(t, e, s, "workbook", "password"), this.processPassword(t, e, s, "revisions", "revisionsPassword");
1398
- for (const t of j) s[t.key] = R(t, e.getAttribute(t.attribute));
1428
+ for (const t of j) s[t.key] = E(t, e.getAttribute(t.attribute));
1399
1429
  return o.protection = s, o;
1400
1430
  }
1401
1431
  processCalcPr(t, e, o) {
1402
1432
  if (!e) return;
1403
1433
  const s = {};
1404
- t.copyFromAttribute(e, "calcMode", s, "calcMode", (t) => Ct[t] ?? null), t.copyFromAttribute(e, "fullCalcOnLoad", s, "fullCalcOnLoad", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calcOnSave", s, "calcOnSave", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calcCompleted", s, "calcCompleted", t.BOOLEAN_COPY), t.copyFromAttribute(e, "fullPrecision", s, "fullPrecision", t.BOOLEAN_COPY), t.copyFromAttribute(e, "forceFullCalc", s, "forceFullCalc", t.BOOLEAN_COPY), t.copyFromAttribute(e, "concurrentCalc", s, "concurrentCalc", t.BOOLEAN_COPY), t.copyFromAttribute(e, "concurrentManualCount", s, "concurrentManualCount", t.INT_COPY), t.copyFromAttribute(e, "refMode", s, "refMode"), t.copyFromAttribute(e, "iterate", s, "iterate", t.BOOLEAN_COPY), t.copyFromAttribute(e, "iterateCount", s, "maxIteration", t.INT_COPY), t.copyFromAttribute(e, "iterateDelta", s, "maxIterateChange", t.FLOAT_COPY);
1434
+ t.copyFromAttribute(e, "calcMode", s, "calcMode", (t) => xt[t] ?? null), t.copyFromAttribute(e, "fullCalcOnLoad", s, "fullCalcOnLoad", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calcOnSave", s, "calcOnSave", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calcCompleted", s, "calcCompleted", t.BOOLEAN_COPY), t.copyFromAttribute(e, "fullPrecision", s, "fullPrecision", t.BOOLEAN_COPY), t.copyFromAttribute(e, "forceFullCalc", s, "forceFullCalc", t.BOOLEAN_COPY), t.copyFromAttribute(e, "concurrentCalc", s, "concurrentCalc", t.BOOLEAN_COPY), t.copyFromAttribute(e, "concurrentManualCount", s, "concurrentManualCount", t.INT_COPY), t.copyFromAttribute(e, "refMode", s, "refMode"), t.copyFromAttribute(e, "iterate", s, "iterate", t.BOOLEAN_COPY), t.copyFromAttribute(e, "iterateCount", s, "maxIteration", t.INT_COPY), t.copyFromAttribute(e, "iterateDelta", s, "maxIterateChange", t.FLOAT_COPY);
1405
1435
  const r = e.getAttribute("calcId");
1406
1436
  null !== r && t.getVisitorParamsState().set("calcId", r), o.calc = s;
1407
1437
  }
@@ -1417,11 +1447,11 @@ var Lt = {
1417
1447
  processSheetRef(t, e, o) {
1418
1448
  const s = {};
1419
1449
  t.copyFromAttribute(e, "name", s, "name"), t.copyFromAttribute(e, "state", s, "visibility"), t.copyFromAttribute(e, "sheetId", s, "sheetId", t.INT_COPY);
1420
- const r = e.getAttribute("r:id"), i = r ? p(t.getRelationships().get(r)?.type) : null;
1450
+ const r = e.getAttribute("r:id"), i = r ? l(t.getRelationships().get(r)?.type) : null;
1421
1451
  if (i) {
1422
1452
  const e = t.readEmbeddedPart(r);
1423
1453
  if (e?.xml) {
1424
- const t = { part: e }, r = c(e.xml), n = r ? D((t) => r.get(t)) : void 0;
1454
+ const t = { part: e }, r = C(e.xml), n = r ? L((t) => r.get(t)) : void 0;
1425
1455
  n && (t.tabColor = n), s.kind = i, s.sheet = t, o.push(s);
1426
1456
  return;
1427
1457
  }
@@ -1499,8 +1529,8 @@ var Lt = {
1499
1529
  r.scope = s[o].name;
1500
1530
  }
1501
1531
  const n = {};
1502
- for (const o of G) t.copyFromAttribute(e, o, n);
1503
- for (const t of z) {
1532
+ for (const o of W) t.copyFromAttribute(e, o, n);
1533
+ for (const t of G) {
1504
1534
  const o = e.getAttribute(t);
1505
1535
  "1" !== o && "true" !== o || (n[t] = !0);
1506
1536
  }
@@ -1642,7 +1672,7 @@ var Lt = {
1642
1672
  r.length > 0 && (o.sheetDataSet = r);
1643
1673
  }
1644
1674
  processSheetData(t, e) {
1645
- const o = new nt.Builder(), s = e.childNodes, r = s.length;
1675
+ const o = new lt.Builder(), s = e.childNodes, r = s.length;
1646
1676
  for (let t = 0; t < r; t++) {
1647
1677
  const e = s.item(t);
1648
1678
  if (1 !== e.nodeType || "row" !== e.localName) continue;
@@ -1652,7 +1682,7 @@ var Lt = {
1652
1682
  if (1 !== e.nodeType || "cell" !== e.localName) continue;
1653
1683
  const s = e.getAttribute("r");
1654
1684
  if (!s) continue;
1655
- const i = H.fastStringToCell(s);
1685
+ const i = K.fastStringToCell(s);
1656
1686
  if (void 0 === i?.rowIndex || void 0 === i?.colIndex) continue;
1657
1687
  const n = this._readCellValue(e);
1658
1688
  void 0 !== n && o.pushAt(i.rowIndex, i.colIndex, n);
@@ -1672,7 +1702,7 @@ var Lt = {
1672
1702
  case "str":
1673
1703
  default: return e;
1674
1704
  case "e": {
1675
- const t = K.getBuiltInByLabel(e);
1705
+ const t = U.getBuiltInByLabel(e);
1676
1706
  return t ? {
1677
1707
  t: "e",
1678
1708
  v: t.getCode()
@@ -1716,8 +1746,8 @@ var Lt = {
1716
1746
  const s = {};
1717
1747
  o[e.getAttribute("name")] = s, t.copyFromAttribute(e, "xr10:uid", s, "uid");
1718
1748
  const r = e.getAttribute("cache"), i = t.getVisitorParamsState().get("slicerCaches"), n = r ? i?.get(r) : void 0;
1719
- if (n) for (let t = 0; t < St.length; t++) {
1720
- const e = St[t];
1749
+ if (n) for (let t = 0; t < wt.length; t++) {
1750
+ const e = wt[t];
1721
1751
  void 0 !== n[e] && (s[e] = n[e]);
1722
1752
  }
1723
1753
  t.copyFromAttribute(e, "caption", s), t.copyFromAttribute(e, "startItem", s, "startItem", t.INT_COPY), t.copyFromAttribute(e, "columnCount", s, "columnCount", t.INT_COPY), t.copyFromAttribute(e, "showCaption", s, "showCaption", t.BOOLEAN_COPY), t.copyFromAttribute(e, "level", s, "level", t.INT_COPY), t.copyFromAttribute(e, "style", s), t.copyFromAttribute(e, "lockedPosition", s, "lockedPosition", t.BOOLEAN_COPY), t.copyFromAttribute(e, "rowHeight", s, "rowHeight", t.INT_COPY);
@@ -1743,7 +1773,7 @@ var Lt = {
1743
1773
  }
1744
1774
  } else "extLst" === o.localName && (n = t.serializeElement(o) ?? void 0);
1745
1775
  }
1746
- const a = P(s, i, n);
1776
+ const a = w(s, i, n);
1747
1777
  return o.formControl = a, a;
1748
1778
  }
1749
1779
  },
@@ -1752,7 +1782,7 @@ var Lt = {
1752
1782
  return o;
1753
1783
  }
1754
1784
  afterVisit(t, e, o) {
1755
- for (const t of o?.movables ?? []) xt(t, !1);
1785
+ for (const t of o?.movables ?? []) Tt(t, !1);
1756
1786
  }
1757
1787
  },
1758
1788
  DrawingAnchorVisitor: class {
@@ -1772,7 +1802,7 @@ var Lt = {
1772
1802
  x: 0,
1773
1803
  y: 0
1774
1804
  };
1775
- return n.x = S(e.getAttribute(r)), n.y = S(e.getAttribute(i)), "from" === s ? o.tl = n : o.br = n, o;
1805
+ return n.x = I(e.getAttribute(r)), n.y = I(e.getAttribute(i)), "from" === s ? o.tl = n : o.br = n, o;
1776
1806
  }
1777
1807
  processOffsetCoord(t, e, o, s) {
1778
1808
  if (!e) return;
@@ -1782,26 +1812,26 @@ var Lt = {
1782
1812
  x: 0,
1783
1813
  y: 0
1784
1814
  };
1785
- return t.evaluate("col", e) && (r.c = parseInt(t.evaluate("col", e).textContent)), t.evaluate("row", e) && (r.r = parseInt(t.evaluate("row", e).textContent)), t.evaluate("colOff", e) && (r.x = S(t.evaluate("colOff", e).textContent)), t.evaluate("rowOff", e) && (r.y = S(t.evaluate("rowOff", e).textContent)), "from" === s ? o.tl = r : o.br = r, o;
1815
+ return t.evaluate("col", e) && (r.c = parseInt(t.evaluate("col", e).textContent)), t.evaluate("row", e) && (r.r = parseInt(t.evaluate("row", e).textContent)), t.evaluate("colOff", e) && (r.x = I(t.evaluate("colOff", e).textContent)), t.evaluate("rowOff", e) && (r.y = I(t.evaluate("rowOff", e).textContent)), "from" === s ? o.tl = r : o.br = r, o;
1786
1816
  }
1787
1817
  },
1788
- DrawingGraphicFrameVisitor: class extends gt {
1818
+ DrawingGraphicFrameVisitor: class extends bt {
1789
1819
  visit(t, e, o) {
1790
1820
  if (!e) return;
1791
1821
  if (this.isGroupContent(o)) {
1792
1822
  if (t.getPath().includes("Fallback")) return {};
1793
1823
  const { movable: s } = this.readMemberHeader(t, e, "graphicFrame"), r = t.evaluate("xfrm", e);
1794
1824
  if (r) {
1795
- A(r, s);
1825
+ y(r, s);
1796
1826
  const e = t.evaluate("off", r), o = t.evaluate("ext", r);
1797
1827
  s.anchor = {
1798
1828
  tl: {
1799
- x: S(e?.getAttribute("x") ?? null) ?? 0,
1800
- y: S(e?.getAttribute("y") ?? null) ?? 0
1829
+ x: I(e?.getAttribute("x") ?? null) ?? 0,
1830
+ y: I(e?.getAttribute("y") ?? null) ?? 0
1801
1831
  },
1802
1832
  br: {
1803
- x: S(o?.getAttribute("cx") ?? null) ?? 0,
1804
- y: S(o?.getAttribute("cy") ?? null) ?? 0
1833
+ x: I(o?.getAttribute("cx") ?? null) ?? 0,
1834
+ y: I(o?.getAttribute("cy") ?? null) ?? 0
1805
1835
  }
1806
1836
  };
1807
1837
  }
@@ -1841,7 +1871,7 @@ var Lt = {
1841
1871
  const o = this.readSourceId(t, e), i = t.readEmbeddedPart(r) ?? void 0;
1842
1872
  let n;
1843
1873
  try {
1844
- const e = i?.xml ? W(i.xml) : null;
1874
+ const e = i?.xml ? $(i.xml) : null;
1845
1875
  n = e?.model, e?.lossy && t.warn("A chart states something its model does not; it is saved as it was until it is changed.", { onceKey: "xlsx.chart.lossy" });
1846
1876
  } catch (e) {
1847
1877
  t.warn(`A chart could not be read into the chart model; it is kept as its markup: ${e?.message ?? e}`, { onceKey: "xlsx.chart.model" });
@@ -1862,8 +1892,8 @@ var Lt = {
1862
1892
  return s;
1863
1893
  }
1864
1894
  },
1865
- DrawingSpVisitor: Tt,
1866
- DrawingPicVisitor: class extends gt {
1895
+ DrawingSpVisitor: Pt,
1896
+ DrawingPicVisitor: class extends bt {
1867
1897
  visit(t, e, o) {
1868
1898
  if (!e) return;
1869
1899
  if (this.isGroupContent(o)) {
@@ -1882,7 +1912,7 @@ var Lt = {
1882
1912
  readPictureDetails(t, e, o, s, r) {
1883
1913
  void 0 !== o?.resId && (r.resId = o.resId), o?.image && (r.image = o.image);
1884
1914
  const i = e.getAttribute("macro");
1885
- i && (r.macro = i), e.hasAttribute("fPublished") && (r.published = C(e.getAttribute("fPublished")));
1915
+ i && (r.macro = i), e.hasAttribute("fPublished") && (r.published = h(e.getAttribute("fPublished")));
1886
1916
  const n = t.evaluate("nvPicPr/cNvPicPr", e);
1887
1917
  if (n?.getAttribute) {
1888
1918
  "0" === n.getAttribute("preferRelativeResize") && (r.noRelativeResize = !0);
@@ -1895,13 +1925,13 @@ var Lt = {
1895
1925
  if (!s) return;
1896
1926
  if (!(s.getAttribute("r:embed") ?? s.getAttribute("embed") ?? s.getAttribute("r:link") ?? s.getAttribute("link"))) return t.warn("A picture names no image; it was not imported.", { onceKey: "xlsx.drawing.picture.noRel" }), null;
1897
1927
  const { type: r, resId: i, ...n } = new m().processImageFill(t, o);
1898
- return !n.tile && n.stretch && 0 === Object.keys(n.stretch).length && delete n.stretch, n.extLst && wt.test(n.extLst) && delete n.extLst, {
1928
+ return !n.tile && n.stretch && 0 === Object.keys(n.stretch).length && delete n.stretch, n.extLst && It.test(n.extLst) && delete n.extLst, {
1899
1929
  resId: i,
1900
1930
  image: Object.keys(n).length > 0 ? n : void 0
1901
1931
  };
1902
1932
  }
1903
1933
  },
1904
- DrawingGrpSpVisitor: class extends gt {
1934
+ DrawingGrpSpVisitor: class extends bt {
1905
1935
  constructor(...t) {
1906
1936
  super(...t), this._fills = new m();
1907
1937
  }
@@ -1931,8 +1961,8 @@ var Lt = {
1931
1961
  if (a) {
1932
1962
  const e = t.evaluate("xfrm", a);
1933
1963
  if (e) {
1934
- A(e, r), "1" === e.getAttribute("flipH") && (r.flipH = !0), "1" === e.getAttribute("flipV") && (r.flipV = !0);
1935
- const o = Pt(t, e, "off", "ext"), n = Pt(t, e, "chOff", "chExt") ?? o;
1964
+ y(e, r), "1" === e.getAttribute("flipH") && (r.flipH = !0), "1" === e.getAttribute("flipV") && (r.flipV = !0);
1965
+ const o = kt(t, e, "off", "ext"), n = kt(t, e, "chOff", "chExt") ?? o;
1936
1966
  n && (i.childBounds = n), s && o && (r.anchor = {
1937
1967
  tl: {
1938
1968
  x: o.x,
@@ -1959,7 +1989,7 @@ var Lt = {
1959
1989
  return i;
1960
1990
  }
1961
1991
  },
1962
- DrawingCxnSpVisitor: class extends Tt {
1992
+ DrawingCxnSpVisitor: class extends Pt {
1963
1993
  visit(t, e, o) {
1964
1994
  if (e) return this.visitShape(t, e, o, "cxnSp", "nvCxnSpPr/cNvCxnSpPr/cxnSpLocks");
1965
1995
  }
@@ -2072,76 +2102,47 @@ var Lt = {
2072
2102
  return o;
2073
2103
  }
2074
2104
  },
2075
- RichValueStructureVisitor: class {
2105
+ FeaturePropertyBagVisitor: class {
2076
2106
  visit(t, e, o) {
2077
- let s = t.getVisitorParamsState().get(It);
2078
- s || (s = [], t.getVisitorParamsState().set(It, s));
2079
- const r = e.childNodes, i = r.length;
2080
- for (let e = 0; e < i; e++) {
2081
- const o = r.item(e);
2082
- if (1 === o.nodeType && "s" === o.localName) {
2083
- const e = {
2084
- type: o.getAttribute("t") ?? "n",
2085
- keys: []
2086
- };
2087
- this.processKeys(t, o, e), s.push(e);
2088
- }
2107
+ const s = [], r = e.childNodes;
2108
+ for (let t = 0; t < r.length; t++) {
2109
+ const e = r.item(t);
2110
+ 1 === e.nodeType && "bag" === e.localName && s.push(this._readBag(e));
2089
2111
  }
2090
- return o.richTypes = s, s;
2091
- }
2092
- processKeys(t, e, o) {
2093
- const s = e.childNodes, r = s.length, i = o.keys;
2094
- for (let t = 0; t < r; t++) {
2095
- const e = s.item(t);
2096
- if (1 === e.nodeType && "k" === e.localName) {
2097
- const t = e.getAttribute("n"), o = e.getAttribute("t");
2098
- i.push([t, o]);
2099
- }
2112
+ const i = [], n = s.find((t) => "XFComplements" === t.type)?.arrays.get("MappedFeaturePropertyBags") ?? [];
2113
+ for (let e = 0; e < n.length; e++) {
2114
+ const o = s[n[e]]?.ids.get("XFControls"), r = void 0 !== o ? s[o]?.ids.get("CellControl") : void 0, l = void 0 !== r ? s[r]?.type : void 0, a = l ? Ot[l] : void 0;
2115
+ a || t.warn(`A cell format's feature '${l ?? "unknown"}' is not read; its cells keep their values.`), i.push(a ? { type: a } : null);
2100
2116
  }
2117
+ const l = { controls: i };
2118
+ return o.featurePropertyBag = l, l;
2101
2119
  }
2102
- },
2103
- RichValueDataVisitor: class {
2104
- visit(t, e, o) {
2105
- let s = t.getVisitorParamsState().get("richTypes");
2106
- if (!s) return void t.warn("RichValueFound but not type.");
2107
- let r = t.getVisitorParamsState().get(kt);
2108
- r || (r = [], t.getVisitorParamsState().set(kt, r));
2109
- const i = e.childNodes, n = i.length;
2110
- for (let e = 0; e < n; e++) {
2111
- const o = i.item(e);
2112
- if (1 === o.nodeType && "rv" === o.localName) {
2113
- const e = s[o.getAttribute("s")], i = { type: e.type };
2114
- this.processValues(t, o, i, e);
2115
- const n = this.mapType(t, i);
2116
- r.push(n);
2120
+ _readBag(t) {
2121
+ const e = {
2122
+ type: t.getAttribute("type") ?? "",
2123
+ ids: /* @__PURE__ */ new Map(),
2124
+ arrays: /* @__PURE__ */ new Map()
2125
+ }, o = t.childNodes;
2126
+ for (let t = 0; t < o.length; t++) {
2127
+ const s = o.item(t);
2128
+ if (1 !== s.nodeType) continue;
2129
+ const r = s.getAttribute("k") ?? "";
2130
+ if ("bagId" === s.localName) {
2131
+ const t = parseInt(s.textContent ?? "", 10);
2132
+ isNaN(t) || e.ids.set(r, t);
2133
+ } else if ("a" === s.localName) {
2134
+ const t = [], o = s.childNodes;
2135
+ for (let e = 0; e < o.length; e++) {
2136
+ const s = o.item(e);
2137
+ if (1 !== s.nodeType || "bagId" !== s.localName) continue;
2138
+ const r = parseInt(s.textContent ?? "", 10);
2139
+ isNaN(r) || t.push(r);
2140
+ }
2141
+ e.arrays.set(r, t);
2117
2142
  }
2118
2143
  }
2119
- return o.richData = r, r;
2120
- }
2121
- mapType(t, e) {
2122
- if ("_error" === e.type) {
2123
- const t = e.errorType;
2124
- if (t) try {
2125
- e = K.getBuiltInByCode(t + 1) ?? K.BuiltIn.Unknown;
2126
- } catch (t) {}
2127
- }
2128
2144
  return e;
2129
2145
  }
2130
- processValues(t, e, o, s) {
2131
- const r = e.childNodes, i = r.length;
2132
- s.type;
2133
- const n = s.keys;
2134
- for (let e = 0; e < i; e++) {
2135
- const s = r.item(e);
2136
- if (1 === s.nodeType && "v" === s.localName) {
2137
- const r = n[e];
2138
- if (!r) return void t.warn("Invalid richData");
2139
- const i = r[0], l = r[1];
2140
- let a = s.textContent;
2141
- "i" === l && (a = Number(a)), o[i] = a;
2142
- }
2143
- }
2144
- }
2145
2146
  },
2146
2147
  CommentsVisitor: class {
2147
2148
  visit(t, e, o) {
@@ -2189,7 +2190,7 @@ var Lt = {
2189
2190
  if (1 === o.nodeType) {
2190
2191
  if ("t" === o.localName) t.text += o.textContent ?? "";
2191
2192
  else if ("rPr" === o.localName) {
2192
- const e = _t(o);
2193
+ const e = Bt(o);
2193
2194
  e && (t.font = e);
2194
2195
  }
2195
2196
  }
@@ -2216,16 +2217,16 @@ var Lt = {
2216
2217
  visit(t, e, o) {
2217
2218
  if (!e) return;
2218
2219
  const s = {};
2219
- t.copyFromAttribute(e, "id", s, "id", T);
2220
+ t.copyFromAttribute(e, "id", s, "id", R);
2220
2221
  const r = e.getAttribute("ref");
2221
- t.copyFromAttribute(e, "personId", s, "personId", T), t.copyFromAttribute(e, "parentId", s, "parentId", T);
2222
+ t.copyFromAttribute(e, "personId", s, "personId", R), t.copyFromAttribute(e, "parentId", s, "parentId", R);
2222
2223
  const i = e.getAttribute("dT");
2223
2224
  i && (s.dt = function(t) {
2224
2225
  const e = /^(.*T\d{2}:\d{2}:\d{2})(?:\.(\d+))?(Z|[+-]\d{2}:?\d{2})?$/i.exec(t.trim());
2225
2226
  if (!e) return t;
2226
2227
  const [, o, s, r] = e;
2227
2228
  return `${o}${s ? `.${(s + "00").substring(0, 3)}` : ""}${r ?? "Z"}`;
2228
- }(i)), e.hasAttribute("done") && (s.done = C(e.getAttribute("done")));
2229
+ }(i)), e.hasAttribute("done") && (s.done = h(e.getAttribute("done")));
2229
2230
  const n = function(t) {
2230
2231
  let e;
2231
2232
  const o = t.childNodes;
@@ -2239,8 +2240,8 @@ var Lt = {
2239
2240
  const s = o.getAttribute("mentionId"), i = o.getAttribute("mentionpersonId");
2240
2241
  if (!s || !i) continue;
2241
2242
  const n = {
2242
- id: T(s),
2243
- personId: T(i)
2243
+ id: R(s),
2244
+ personId: R(i)
2244
2245
  }, l = parseInt(o.getAttribute("startIndex") ?? "", 10);
2245
2246
  isNaN(l) || (n.startIndex = l);
2246
2247
  const a = parseInt(o.getAttribute("length") ?? "", 10);
@@ -2262,33 +2263,33 @@ var Lt = {
2262
2263
  const o = r.item(e);
2263
2264
  if (1 === o.nodeType && "person" === o.localName) {
2264
2265
  const e = {};
2265
- t.copyFromAttribute(o, "id", e, "id", T), t.copyFromAttribute(o, "displayName", e), t.copyFromAttribute(o, "userId", e, "userId", T), t.copyFromAttribute(o, "providerId", e), s.push(e);
2266
+ t.copyFromAttribute(o, "id", e, "id", R), t.copyFromAttribute(o, "displayName", e), t.copyFromAttribute(o, "userId", e, "userId", R), t.copyFromAttribute(o, "providerId", e), s.push(e);
2266
2267
  }
2267
2268
  }
2268
2269
  return s.length > 0 && (o.persons = s), s;
2269
2270
  }
2270
2271
  }
2271
- }, Bt = class {
2272
+ }, Dt = class {
2272
2273
  constructor(t, e) {
2273
2274
  this.path = t, this.visitor = e;
2274
2275
  }
2275
- }, Dt = class {
2276
+ }, Et = class {
2276
2277
  constructor() {
2277
- this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new Lt.RelsVisitor()), this.registerVisitor("cp:coreProperties", new Lt.CorePropertiesVisitor()), this.registerVisitor("Properties", new Lt.AppPropertiesVisitor()), this.registerVisitor("spPr", new Lt.ShapePropertiesVisitor()), this.registerVisitor("txBody", new Lt.ShapeTextVisitor()), this.registerVisitor("txPr", new Lt.TextPropertiesVisitor()), this.registerVisitor("a:theme", new Lt.ThemeVisitor()), this.registerVisitor("a:theme", new Lt.ClrSchemeVisitor(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new Lt.FontSchemeVisitor(), "themeElements/fontScheme"), this.registerVisitor("a:theme", new Lt.FmtSchemeVisitor(), "themeElements/fmtScheme"), this.registerVisitor("a:theme", new Lt.ObjectDefaultsVisitor(), "objectDefaults"), this.registerVisitor("autoFilter", new Lt.AutoFilterVisitor()), this.registerVisitor("sortState", new Lt.SortStateVisitor()), this.registerVisitor("s:workbook", new Lt.WorkbookVisitor()), this.registerVisitor("styleSheet", new Lt.SheetStyleVisitor()), this.registerVisitor("x14:table", new Lt.TableX14Visitor()), this.registerVisitor("table", new Lt.TableVisitor()), this.registerVisitor("externalLink", new Lt.ExternalLinkVisitor()), this.registerVisitor("wsDr", new Lt.DrawingVisitor()), this.registerVisitor("twoCellAnchor", new Lt.DrawingAnchorVisitor()), this.registerVisitor("oneCellAnchor", new Lt.DrawingAnchorVisitor()), this.registerVisitor("absoluteAnchor", new Lt.DrawingAnchorVisitor()), this.registerVisitor("graphicFrame", new Lt.DrawingGraphicFrameVisitor()), this.registerVisitor("sp", new Lt.DrawingSpVisitor()), this.registerVisitor("grpSp", new Lt.DrawingGrpSpVisitor()), this.registerVisitor("cxnSp", new Lt.DrawingCxnSpVisitor()), this.registerVisitor("pic", new Lt.DrawingPicVisitor()), this.registerVisitor("metadata", new Lt.MetadataVisitor()), this.registerVisitor("rvStructures", new Lt.RichValueStructureVisitor()), this.registerVisitor("rvData", new Lt.RichValueDataVisitor()), this.registerVisitor("comments", new Lt.CommentsVisitor()), this.registerVisitor("comment", new Lt.CommentVisitor()), this.registerVisitor("ThreadedComments", new Lt.ThreadedCommentsVisitor()), this.registerVisitor("threadedComment", new Lt.ThreadedCommentVisitor()), this.registerVisitor("threadedComment", new Lt.TextPropertiesVisitor("content"), "text"), this.registerVisitor("personList", new Lt.PersonListVisitor()), this.registerVisitor("slicerCacheDefinition", new Lt.SlicerCacheDefinitionVisitor()), this.registerVisitor("slicers", new Lt.SlicersVisitor()), this.registerVisitor("formControlPr", new Lt.FormControlPrVisitor());
2278
+ this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new Lt.RelsVisitor()), this.registerVisitor("cp:coreProperties", new Lt.CorePropertiesVisitor()), this.registerVisitor("Properties", new Lt.AppPropertiesVisitor()), this.registerVisitor("spPr", new Lt.ShapePropertiesVisitor()), this.registerVisitor("txBody", new Lt.ShapeTextVisitor()), this.registerVisitor("txPr", new Lt.TextPropertiesVisitor()), this.registerVisitor("a:theme", new Lt.ThemeVisitor()), this.registerVisitor("a:theme", new Lt.ClrSchemeVisitor(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new Lt.FontSchemeVisitor(), "themeElements/fontScheme"), this.registerVisitor("a:theme", new Lt.FmtSchemeVisitor(), "themeElements/fmtScheme"), this.registerVisitor("a:theme", new Lt.ObjectDefaultsVisitor(), "objectDefaults"), this.registerVisitor("autoFilter", new Lt.AutoFilterVisitor()), this.registerVisitor("sortState", new Lt.SortStateVisitor()), this.registerVisitor("s:workbook", new Lt.WorkbookVisitor()), this.registerVisitor("styleSheet", new Lt.SheetStyleVisitor()), this.registerVisitor("x14:table", new Lt.TableX14Visitor()), this.registerVisitor("table", new Lt.TableVisitor()), this.registerVisitor("externalLink", new Lt.ExternalLinkVisitor()), this.registerVisitor("wsDr", new Lt.DrawingVisitor()), this.registerVisitor("twoCellAnchor", new Lt.DrawingAnchorVisitor()), this.registerVisitor("oneCellAnchor", new Lt.DrawingAnchorVisitor()), this.registerVisitor("absoluteAnchor", new Lt.DrawingAnchorVisitor()), this.registerVisitor("graphicFrame", new Lt.DrawingGraphicFrameVisitor()), this.registerVisitor("sp", new Lt.DrawingSpVisitor()), this.registerVisitor("grpSp", new Lt.DrawingGrpSpVisitor()), this.registerVisitor("cxnSp", new Lt.DrawingCxnSpVisitor()), this.registerVisitor("pic", new Lt.DrawingPicVisitor()), this.registerVisitor("metadata", new Lt.MetadataVisitor()), this.registerVisitor("FeaturePropertyBags", new Lt.FeaturePropertyBagVisitor()), this.registerVisitor("comments", new Lt.CommentsVisitor()), this.registerVisitor("comment", new Lt.CommentVisitor()), this.registerVisitor("ThreadedComments", new Lt.ThreadedCommentsVisitor()), this.registerVisitor("threadedComment", new Lt.ThreadedCommentVisitor()), this.registerVisitor("threadedComment", new Lt.TextPropertiesVisitor("content"), "text"), this.registerVisitor("personList", new Lt.PersonListVisitor()), this.registerVisitor("slicerCacheDefinition", new Lt.SlicerCacheDefinitionVisitor()), this.registerVisitor("slicers", new Lt.SlicersVisitor()), this.registerVisitor("formControlPr", new Lt.FormControlPrVisitor());
2278
2279
  }
2279
2280
  registerVisitor(t, e, o = null) {
2280
2281
  -1 === t.indexOf(":") && (t = "*:" + t);
2281
2282
  const s = t.split(":"), r = s.length > 1 ? s[1] : s[0];
2282
2283
  if (!o) return this.visitorsByXmlTagName.set(r, e), void this.visitorsByXmlTagName.set(t, e);
2283
2284
  let i = this.scopedVisitorsByXmlTagName.get(r);
2284
- i || (i = [], this.scopedVisitorsByXmlTagName.set(r, i), this.scopedVisitorsByXmlTagName.set(t, i)), i.push(new Bt(o, e));
2285
+ i || (i = [], this.scopedVisitorsByXmlTagName.set(r, i), this.scopedVisitorsByXmlTagName.set(t, i)), i.push(new Dt(o, e));
2285
2286
  }
2286
- parseDxf(t, e = "", o = $.EmptyObject) {
2287
+ parseDxf(t, e = "", o = H.EmptyObject) {
2287
2288
  this.visitorParamsState || (this.visitorParamsState = /* @__PURE__ */ new Map());
2288
2289
  const s = this.visitorParamsState, r = s.get("processingDXFs");
2289
2290
  s.set("processingDXFs", !0);
2290
2291
  try {
2291
- const s = new ht(null, this, "/dxf", t, {}, e, o), r = {};
2292
+ const s = new pt(null, this, "/dxf", t, {}, e, o), r = {};
2292
2293
  return new Lt.SheetStyleVisitor().processDXF(s, t, r), r;
2293
2294
  } finally {
2294
2295
  void 0 === r ? s.delete("processingDXFs") : s.set("processingDXFs", r);
@@ -2297,13 +2298,13 @@ var Lt = {
2297
2298
  getVisitorParamsState() {
2298
2299
  return this.visitorParamsState;
2299
2300
  }
2300
- transform(t, e, o = $.EmptyObject) {
2301
+ transform(t, e, o = H.EmptyObject) {
2301
2302
  const s = t.documentElement;
2302
2303
  this.visitorParamsState && !o?.paramMap || (this.visitorParamsState = o?.paramMap ?? /* @__PURE__ */ new Map());
2303
2304
  const r = {};
2304
2305
  let i = this.visitorsByXmlTagName.get(s.nodeName);
2305
2306
  if (i || (i = this.visitorsByXmlTagName.get(s.localName)), !i) throw new Error(`A visitor for the root element: '${s.nodeName}' or '${s.localName}' must be registered.`);
2306
- const n = "/" + s.localName, l = new ht(null, this, n, s, r, e, o), a = [];
2307
+ const n = "/" + s.localName, l = new pt(null, this, n, s, r, e, o), a = [];
2307
2308
  this._doWalk(i, l, a, s, r, e, o);
2308
2309
  const c = a.length;
2309
2310
  for (let t = 0; t < c; t++) {
@@ -2332,7 +2333,7 @@ var Lt = {
2332
2333
  for (; c && c !== s;) l = c.localName + "/" + l, c = c.parentNode;
2333
2334
  const u = e.getPath() + "/" + l;
2334
2335
  if (a.visitor) {
2335
- const s = new ht(e, this, u, e.getElemRoot(), e.getJsonRoot(), i, n);
2336
+ const s = new pt(e, this, u, e.getElemRoot(), e.getJsonRoot(), i, n);
2336
2337
  this._doWalk(a.visitor, s, o, t, r, i, n);
2337
2338
  }
2338
2339
  };
@@ -2359,10 +2360,10 @@ var Lt = {
2359
2360
  const a = s;
2360
2361
  let p = a.nodeName, m = c.get(p);
2361
2362
  m || (p = a.localName, m = c.get(p));
2362
- const f = e.getPath() + "/" + p, g = new ht(e, this, f, u, d, i, n);
2363
+ const f = e.getPath() + "/" + p, g = new pt(e, this, f, u, d, i, n);
2363
2364
  this._doWalk(m, g, o, a, l ?? r, i, n);
2364
2365
  }
2365
2366
  return l;
2366
2367
  }
2367
2368
  };
2368
- export { Dt as DOMTransformer, ht as ExecutionContext, l as NumberUtils, f as VisitorUtils };
2369
+ export { Et as DOMTransformer, pt as ExecutionContext, a as NumberUtils, f as VisitorUtils };