@sheetxl/io-xlsx 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/esm/{B8BxPvkHiX4hcIlm.mjs → B7FIgKFyHincEoTQ.mjs} +1290 -1289
- package/browser/esm/{-fdNB43HUPxYWJ_R.mjs → BDkqo2SKzINJJB0-.mjs} +898 -898
- package/browser/esm/{BOq9DL07jEaKHuIM.mjs → BP2eZDr6dZ7gP02Z.mjs} +4 -4
- package/browser/esm/{vodnBCtDjw8qycsS.mjs → BQw8xcZ6k06Tq6lY.mjs} +2 -2
- package/browser/esm/{CbR2WXJw8AmmbFY-.mjs → BUaKY12tmPZDwfZx.mjs} +1 -1
- package/browser/esm/{CKeoydawnx6JqzIh.mjs → Ck5-R8xrLh89G56Q.mjs} +2 -2
- package/browser/esm/{DWL__gLKpzWgIAgP.mjs → CvaZql_oqszNei5v.mjs} +1 -1
- package/browser/esm/{yHnVx36dSghP3233.mjs → CzWmtWMV9HfkBne5.mjs} +193 -174
- package/browser/esm/{DxkJJ65lFs0Fg6YW.mjs → Di9ttuWnx0eCbSUA.mjs} +2 -2
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{BjtXA8Q58TjpX90f.mjs → lqWdqDnIKZxyet1d.mjs} +2 -2
- package/browser/esm/{7zN_b2s0BRH9UClF.mjs → vlyPCdsYGtutUTnn.mjs} +1443 -1426
- package/node/esm/{CufzeuvvI4_JrCZt.mjs → B2uSae_kN-7PrVjI.mjs} +370 -370
- package/node/esm/{DsfZ2R68TKJ5FFKz.mjs → BO3IZgkfKGIGMKYd.mjs} +1444 -1442
- package/node/esm/{Bun4U-VOiQ4A-B9o.mjs → CLdbYG5SCBndfk-q.mjs} +2 -2
- package/node/esm/{BzKl-VdTNvl6702Y.mjs → CtKLRPHWl5-_lwfr.mjs} +1521 -1505
- package/node/esm/{DLq4doP565FaG1oh.mjs → CzEwnjXK_YIWXQQh.mjs} +2 -2
- package/node/esm/{BRjPLGDja5nIYqeX.mjs → D4thYKlDAXXgB-tC.mjs} +2 -2
- package/node/esm/{CJzOPo9n5d81oTwp.mjs → DmYe7T4XtIyt-qdA.mjs} +221 -201
- package/node/esm/{B74b9YqT29KIKqCT.mjs → bUN-BbKU7oHGJmVh.mjs} +1 -1
- package/node/esm/index.mjs +4 -4
- package/package.json +3 -3
- package/types/src/OOXMLExtensions.d.ts +7 -0
- package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +5 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v1.0.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v1.0.4
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: SheetXL EULA — https://www.sheetxl.com/eula
|
|
6
6
|
*/
|
|
7
|
-
import { $n as t, A as e,
|
|
8
|
-
import { a as
|
|
9
|
-
import { c as
|
|
10
|
-
import { CommonUtils as
|
|
11
|
-
import { AddressUtils as
|
|
12
|
-
var
|
|
7
|
+
import { $n as t, A as e, B as o, Ct as s, Dt as r, F as i, Ht as n, I as l, L as c, M as u, Mr as d, N as h, Nr as p, Nt as m, P as f, R as g, St as b, Tt as y, Ut as A, V as v, Wt as N, ar as F, bt as C, dn as S, er as x, fn as T, gt as w, in as P, j as I, jt as k, k as O, mn as _, r as B, rn as L, t as D, v as E, vt as R, wr as j, wt as Y, xt as M, yn as X, z } from "./CtKLRPHWl5-_lwfr.mjs";
|
|
8
|
+
import { a as G, i as W, n as $, r as H } from "./B2uSae_kN-7PrVjI.mjs";
|
|
9
|
+
import { c as U, l as K, o as q, r as J, s as Z } from "./CLdbYG5SCBndfk-q.mjs";
|
|
10
|
+
import { CommonUtils as Q } from "@sheetxl/utils";
|
|
11
|
+
import { AddressUtils as tt, FormulaError as et, IBorders as ot, ICellStyle as st, ICondition as rt, IFill as it, IFont as nt, IRange as lt, IShape as at, ISlicerStyle as ct, ITextFrame as ut, ShapeStyleUtils as dt, Sort as ht, Tuple as pt } from "@sheetxl/sdk";
|
|
12
|
+
var mt = class {
|
|
13
13
|
constructor(t) {
|
|
14
14
|
this.list = t;
|
|
15
15
|
}
|
|
@@ -35,14 +35,14 @@ var pt = class {
|
|
|
35
35
|
[Symbol.iterator]() {
|
|
36
36
|
return this.list.values();
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, ft = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t && "0" !== t && "off" !== t && "false" !== t && null, gt = (t) => {
|
|
39
39
|
const e = parseInt(t);
|
|
40
40
|
return isNaN(e) ? null : e;
|
|
41
|
-
},
|
|
41
|
+
}, bt = (t) => {
|
|
42
42
|
const e = parseFloat(t);
|
|
43
43
|
return isNaN(e) ? null : e;
|
|
44
|
-
},
|
|
45
|
-
constructor(t, e, o, s, r, i = null, n =
|
|
44
|
+
}, yt = /* @__PURE__ */ new Map(), At = class {
|
|
45
|
+
constructor(t, e, o, s, r, i = null, n = Q.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 pt = class {
|
|
|
54
54
|
return this._readEmbeddedPart?.(t, this._fileLocation) ?? null;
|
|
55
55
|
}
|
|
56
56
|
getRelationships() {
|
|
57
|
-
return this._getRefs?.(this._fileLocation) ??
|
|
57
|
+
return this._getRefs?.(this._fileLocation) ?? yt;
|
|
58
58
|
}
|
|
59
59
|
getPath() {
|
|
60
60
|
return this.currentPath;
|
|
@@ -113,7 +113,7 @@ var pt = 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
|
|
116
|
+
return 1 === o.length ? o[0] : 0 === o.length ? null : new mt(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 pt = class {
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
getFromPath(t, e) {
|
|
132
|
-
return
|
|
132
|
+
return Q.getFromPath(t, e);
|
|
133
133
|
}
|
|
134
134
|
setToPath(t, e, o) {
|
|
135
|
-
return
|
|
135
|
+
return Q.setToPath(t, e, o);
|
|
136
136
|
}
|
|
137
137
|
getValAttrAsString(t, e) {
|
|
138
138
|
let o = this.evaluate(t, e);
|
|
@@ -153,13 +153,13 @@ var pt = class {
|
|
|
153
153
|
return o && o.hasAttribute("val") ? parseFloat(o.getAttribute("val")) ?? null : null;
|
|
154
154
|
}
|
|
155
155
|
get BOOLEAN_COPY() {
|
|
156
|
-
return
|
|
156
|
+
return ft;
|
|
157
157
|
}
|
|
158
158
|
get INT_COPY() {
|
|
159
|
-
return
|
|
159
|
+
return gt;
|
|
160
160
|
}
|
|
161
161
|
get FLOAT_COPY() {
|
|
162
|
-
return
|
|
162
|
+
return bt;
|
|
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 pt = class {
|
|
|
176
176
|
}
|
|
177
177
|
this.setToPath(o, s, i);
|
|
178
178
|
}
|
|
179
|
-
},
|
|
179
|
+
}, vt = (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
|
-
},
|
|
186
|
+
}, Nt = [
|
|
187
187
|
["fillRef", "fill"],
|
|
188
188
|
["lnRef", "stroke"],
|
|
189
189
|
["effectRef", "effect"]
|
|
190
|
-
],
|
|
191
|
-
const o = new
|
|
192
|
-
for (const [r, i] of
|
|
190
|
+
], Ft = (t, e) => {
|
|
191
|
+
const o = new f(), s = {};
|
|
192
|
+
for (const [r, i] of Nt) {
|
|
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 pt = class {
|
|
|
201
201
|
i && (e.color = i), s.font = e;
|
|
202
202
|
}
|
|
203
203
|
return s;
|
|
204
|
-
},
|
|
204
|
+
}, Ct = class {
|
|
205
205
|
visit(t, e, o) {
|
|
206
206
|
if (!e) return;
|
|
207
207
|
let s = t.evaluate("*/cNvPr", e);
|
|
@@ -210,9 +210,9 @@ var pt = class {
|
|
|
210
210
|
readNonVisualDetails(t, e, o) {
|
|
211
211
|
e.hasAttribute("title") && (o.title = e.getAttribute("title"));
|
|
212
212
|
const s = t.evaluate("hlinkClick", e);
|
|
213
|
-
s && (o.hyperlink =
|
|
213
|
+
s && (o.hyperlink = u(t, s));
|
|
214
214
|
const r = t.evaluate("hlinkHover", e);
|
|
215
|
-
r && (o.hoverHyperlink =
|
|
215
|
+
r && (o.hoverHyperlink = u(t, r));
|
|
216
216
|
const i = t.evaluate("extLst", e), n = i ? t.serializeElement(i) : null;
|
|
217
217
|
n && (o.extLst = {
|
|
218
218
|
...o.extLst,
|
|
@@ -258,7 +258,7 @@ var pt = 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 =
|
|
261
|
+
const r = Ft(t, s), i = dt.withoutDefaultStyleRefs({
|
|
262
262
|
...o,
|
|
263
263
|
style: r
|
|
264
264
|
});
|
|
@@ -280,16 +280,16 @@ var pt = 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
|
-
},
|
|
283
|
+
}, St = [
|
|
284
284
|
["spDef", "shape"],
|
|
285
285
|
["lnDef", "line"],
|
|
286
286
|
["txDef", "text"]
|
|
287
|
-
],
|
|
287
|
+
], xt = (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
|
-
},
|
|
292
|
+
}, Tt = (t) => "1" === t || "true" === t, wt = class {
|
|
293
293
|
visit(t, e, o) {}
|
|
294
294
|
processDataBarColor(e, o, s, r, i = "auto") {
|
|
295
295
|
if (!o) return;
|
|
@@ -310,42 +310,42 @@ var pt = class {
|
|
|
310
310
|
}
|
|
311
311
|
return o;
|
|
312
312
|
}
|
|
313
|
-
processFont(t, e,
|
|
314
|
-
t.getValAttrAsBoolean("b", e, !0) && (
|
|
313
|
+
processFont(t, e, r) {
|
|
314
|
+
t.getValAttrAsBoolean("b", e, !0) && (r.weight = 700), t.getValAttrAsBoolean("i", e, !0) && (r.style = nt.Style.Italic), t.getValAttrAsBoolean("strike", e, !0) && (r.strike = Y(!0));
|
|
315
315
|
const i = t.evaluate("u", e);
|
|
316
316
|
if (i) {
|
|
317
317
|
const t = i.getAttribute("val");
|
|
318
|
-
|
|
318
|
+
r.underline = y(t);
|
|
319
319
|
}
|
|
320
|
-
const n =
|
|
321
|
-
void 0 !== n && (
|
|
320
|
+
const n = M(t.evaluate("vertAlign", e)?.getAttribute("val"));
|
|
321
|
+
void 0 !== n && (r.baseline = n), g(t, e, r, "sz", "size");
|
|
322
322
|
const l = t.evaluate("color", e);
|
|
323
|
-
this.processDataBarColor(t, l,
|
|
323
|
+
this.processDataBarColor(t, l, r, "color"), r.color || (r.color = "auto"), o(t, e, r, "name", "family"), o(t, e, r, "rFont", "family");
|
|
324
324
|
const a = t.evaluate("family", e);
|
|
325
325
|
if (a) {
|
|
326
326
|
const t = a.getAttribute("val");
|
|
327
327
|
if (t) switch (t) {
|
|
328
328
|
case "1":
|
|
329
|
-
|
|
329
|
+
r.fallbacks = ["serif"];
|
|
330
330
|
break;
|
|
331
331
|
case "2":
|
|
332
|
-
|
|
332
|
+
r.fallbacks = ["sans-serif"];
|
|
333
333
|
break;
|
|
334
334
|
case "3":
|
|
335
|
-
|
|
335
|
+
r.fallbacks = ["monospace"];
|
|
336
336
|
break;
|
|
337
337
|
case "4":
|
|
338
|
-
|
|
338
|
+
r.fallbacks = ["cursive"];
|
|
339
339
|
break;
|
|
340
|
-
case "5":
|
|
340
|
+
case "5": r.fallbacks = ["fantasy"];
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
b(
|
|
344
|
-
for (const
|
|
345
|
-
const i =
|
|
346
|
-
void 0 !== i && (
|
|
343
|
+
b(r, t.evaluate("scheme", e)?.getAttribute("val")), c(t, e, r, "shadow", "shadow", !0), c(t, e, r, "outline", "outline", !0);
|
|
344
|
+
for (const o of ["condense", "extend"]) {
|
|
345
|
+
const i = s(o, !!t.getValAttrAsBoolean(o, e, !0));
|
|
346
|
+
void 0 !== i && (r.letterSpacing = i);
|
|
347
347
|
}
|
|
348
|
-
return
|
|
348
|
+
return z(t, e, r, "charset", "charset"), r;
|
|
349
349
|
}
|
|
350
350
|
processFills(t, e, o) {
|
|
351
351
|
if (!e) return;
|
|
@@ -359,7 +359,7 @@ var pt = class {
|
|
|
359
359
|
return o;
|
|
360
360
|
}
|
|
361
361
|
processFill(t, e, o, s) {
|
|
362
|
-
const r = { type:
|
|
362
|
+
const r = { type: it.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 pt = class {
|
|
|
370
370
|
}
|
|
371
371
|
processGradientFill(t, e, o) {
|
|
372
372
|
if (!e) return;
|
|
373
|
-
o.type =
|
|
373
|
+
o.type = it.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:
|
|
381
|
-
top:
|
|
382
|
-
right:
|
|
383
|
-
bottom:
|
|
380
|
+
left: Pt(e.getAttribute("left")),
|
|
381
|
+
top: Pt(e.getAttribute("top")),
|
|
382
|
+
right: Pt(e.getAttribute("right")),
|
|
383
|
+
bottom: Pt(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 pt = 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 ?
|
|
400
|
-
if (r ===
|
|
401
|
-
o.type =
|
|
399
|
+
const s = t.getVisitorParamsState().get("processingDXFs"), r = e.getAttribute("patternType") || (s ? it.BuiltInSheetPattern.Solid : it.BuiltInSheetPattern.None);
|
|
400
|
+
if (r === it.BuiltInSheetPattern.None) return { none: !0 };
|
|
401
|
+
o.type = it.Type.Pattern, r && (o.patternType = r);
|
|
402
402
|
let i = "foreground", n = "background";
|
|
403
|
-
const l = o.patternType ===
|
|
403
|
+
const l = o.patternType === it.BuiltInSheetPattern.Solid && s;
|
|
404
404
|
if (l) {
|
|
405
405
|
const t = i;
|
|
406
406
|
i = n, n = t;
|
|
@@ -424,24 +424,24 @@ var pt = class {
|
|
|
424
424
|
processBorder(t, e, o, s, r) {
|
|
425
425
|
if (!e) return;
|
|
426
426
|
const i = {};
|
|
427
|
-
this.processBorderStroke(t, e, i,
|
|
427
|
+
this.processBorderStroke(t, e, i, ot.Edge.Left), this.processBorderStroke(t, e, i, ot.Edge.Right), r ? (i.right || i.left) && (i.right ? i.vertical = { ...i.right } : i.vertical = { ...i.left }) : this.processBorderStroke(t, e, i, ot.Edge.Vertical), this.processBorderStroke(t, e, i, ot.Edge.Top), this.processBorderStroke(t, e, i, ot.Edge.Bottom), r ? (i.bottom || i.top) && (i.bottom ? i.horizontal = { ...i.bottom } : i.horizontal = { ...i.top }) : this.processBorderStroke(t, e, i, ot.Edge.Horizontal);
|
|
428
428
|
const n = this.processBorderStroke(t, e, {}, "diagonal");
|
|
429
|
-
return n && (
|
|
429
|
+
return n && (Tt(e.getAttribute("diagonalUp")) && (i.diagonalUp = { ...n }), Tt(e.getAttribute("diagonalDown")) && (i.diagonalDown = { ...n })), o[s] = i, o;
|
|
430
430
|
}
|
|
431
431
|
processBorderStroke(t, e, o, s) {
|
|
432
432
|
if (!e) return;
|
|
433
433
|
const r = t.evaluate(s, e);
|
|
434
434
|
if (!r) return;
|
|
435
435
|
const i = {};
|
|
436
|
-
r.hasAttribute("style") ? i.style = r.getAttribute("style") : t.getVisitorParamsState().get("processingDXFs") && (i.style =
|
|
436
|
+
r.hasAttribute("style") ? i.style = r.getAttribute("style") : t.getVisitorParamsState().get("processingDXFs") && (i.style = ot.StrokeStyle.None);
|
|
437
437
|
const n = t.evaluate("color", r);
|
|
438
438
|
return n && this.processDataBarColor(t, n, i, "color"), Object.keys(i).length > 0 ? o[s] = i : null;
|
|
439
439
|
}
|
|
440
|
-
},
|
|
440
|
+
}, Pt = (t) => {
|
|
441
441
|
if (!t) return 0;
|
|
442
442
|
const e = parseFloat(t);
|
|
443
443
|
return isNaN(e) ? 0 : e;
|
|
444
|
-
},
|
|
444
|
+
}, It = (t, e) => {
|
|
445
445
|
if (!t || 1 !== t.nodeType) return null;
|
|
446
446
|
const o = t.childNodes;
|
|
447
447
|
for (let t = 0; t < o.length; t++) {
|
|
@@ -449,11 +449,11 @@ var pt = class {
|
|
|
449
449
|
if (1 === s.nodeType && s.localName === e) return s;
|
|
450
450
|
}
|
|
451
451
|
return null;
|
|
452
|
-
},
|
|
452
|
+
}, kt = new Set(Object.values(ct.ElementType).filter((t) => t !== ct.ElementType.WholeTable && t !== ct.ElementType.HeaderRow)), Ot = {
|
|
453
453
|
auto: "auto",
|
|
454
454
|
autoNoTable: "automaticExceptTables",
|
|
455
455
|
manual: "manual"
|
|
456
|
-
},
|
|
456
|
+
}, Vt = [
|
|
457
457
|
"tableId",
|
|
458
458
|
"columnId",
|
|
459
459
|
"cacheName",
|
|
@@ -468,12 +468,12 @@ var pt = class {
|
|
|
468
468
|
"tabular",
|
|
469
469
|
"pivotData",
|
|
470
470
|
"showMissing"
|
|
471
|
-
],
|
|
471
|
+
], _t = /* @__PURE__ */ new Set([
|
|
472
472
|
"name",
|
|
473
473
|
"xr10:uid",
|
|
474
474
|
"cache",
|
|
475
475
|
"caption"
|
|
476
|
-
]),
|
|
476
|
+
]), Bt = (t, e) => {
|
|
477
477
|
const o = t.content, s = o?.json;
|
|
478
478
|
if (s) {
|
|
479
479
|
if ("shape" === o.type || "picture" === o.type) {
|
|
@@ -489,9 +489,9 @@ var pt = class {
|
|
|
489
489
|
}
|
|
490
490
|
});
|
|
491
491
|
}
|
|
492
|
-
if ("group" === o.type) for (const t of s.members ?? [])
|
|
492
|
+
if ("group" === o.type) for (const t of s.members ?? []) Bt(t, !0);
|
|
493
493
|
}
|
|
494
|
-
},
|
|
494
|
+
}, Lt = class extends Ct {
|
|
495
495
|
visit(t, e, o) {
|
|
496
496
|
if (e) return this.visitShape(t, e, o, "sp", "nvSpPr/cNvSpPr/spLocks");
|
|
497
497
|
}
|
|
@@ -500,7 +500,7 @@ var pt = class {
|
|
|
500
500
|
if (this.isGroupContent(s)) {
|
|
501
501
|
if (t.getPath().includes("Fallback")) return {};
|
|
502
502
|
const { movable: e, content: l } = this.readMemberHeader(t, o, "shape");
|
|
503
|
-
n !==
|
|
503
|
+
n !== at.Type.Shape && (l.type = n), this.readShapeDetails(t, o, r, i, l), this.readStyleRefs(t, o, l);
|
|
504
504
|
const a = t.evaluate(i, o);
|
|
505
505
|
a?.hasAttribute?.("noChangeAspect") && (e.lockAspect = "1" === a.getAttribute("noChangeAspect"));
|
|
506
506
|
const c = this.readTwinOf(t, o);
|
|
@@ -508,7 +508,7 @@ var pt = class {
|
|
|
508
508
|
}
|
|
509
509
|
if (t.getPath().includes("Fallback") && s.content) {
|
|
510
510
|
const r = s.content.json;
|
|
511
|
-
if ("shape" === s.content.type && r && (r.type ??
|
|
511
|
+
if ("shape" === s.content.type && r && (r.type ?? at.Type.Shape) === n) {
|
|
512
512
|
const s = t.evaluate("txBody", o), i = s ? new O().readTextBody(t, s) : null;
|
|
513
513
|
i && "" !== e(i) && (r.text = i);
|
|
514
514
|
}
|
|
@@ -517,7 +517,7 @@ var pt = class {
|
|
|
517
517
|
s = super.visit(t, o, s);
|
|
518
518
|
const l = t.evaluate(i, o);
|
|
519
519
|
l?.hasAttribute?.("noChangeAspect") && (s.lockAspect = "1" === l.getAttribute("noChangeAspect"));
|
|
520
|
-
const a = n ===
|
|
520
|
+
const a = n === at.Type.Shape ? {} : { type: n }, c = this.readSourceId(t, o);
|
|
521
521
|
void 0 !== c && (a.sourceId = c), this.readShapeDetails(t, o, r, i, a), this.readStyleRefs(t, o, a);
|
|
522
522
|
const u = this.readTwinOf(t, o);
|
|
523
523
|
return void 0 !== u && Object.assign(a, { twinOf: u }), this.setContent(s, {
|
|
@@ -550,7 +550,7 @@ var pt = class {
|
|
|
550
550
|
(o || s) && (r.connectorEnds = {}, o && (r.connectorEnds.start = o), s && (r.connectorEnds.end = s));
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
-
},
|
|
553
|
+
}, Dt = /^<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>$/, Et = (t, e, o, s) => {
|
|
554
554
|
const r = t.evaluate(o, e), i = t.evaluate(s, e);
|
|
555
555
|
return r || i ? {
|
|
556
556
|
x: N(r?.getAttribute("x") ?? null) ?? 0,
|
|
@@ -558,40 +558,40 @@ var pt = class {
|
|
|
558
558
|
width: N(i?.getAttribute("cx") ?? null) ?? 0,
|
|
559
559
|
height: N(i?.getAttribute("cy") ?? null) ?? 0
|
|
560
560
|
} : null;
|
|
561
|
-
},
|
|
562
|
-
var
|
|
561
|
+
}, Rt = { Checkbox: "checkbox" };
|
|
562
|
+
var jt = (t) => {
|
|
563
563
|
const e = t.getAttribute("val");
|
|
564
564
|
return "0" !== e && "false" !== e;
|
|
565
|
-
},
|
|
565
|
+
}, Yt = {
|
|
566
566
|
1: "serif",
|
|
567
567
|
2: "sans-serif",
|
|
568
568
|
3: "monospace",
|
|
569
569
|
4: "cursive",
|
|
570
570
|
5: "fantasy"
|
|
571
571
|
};
|
|
572
|
-
function
|
|
573
|
-
const o = {},
|
|
574
|
-
for (let e = 0; e <
|
|
575
|
-
const i =
|
|
572
|
+
function Mt(e) {
|
|
573
|
+
const o = {}, r = e.childNodes;
|
|
574
|
+
for (let e = 0; e < r.length; e++) {
|
|
575
|
+
const i = r.item(e);
|
|
576
576
|
if (1 === i.nodeType) switch (i.localName) {
|
|
577
577
|
case "b":
|
|
578
|
-
o.weight =
|
|
578
|
+
o.weight = jt(i) ? 700 : 400;
|
|
579
579
|
break;
|
|
580
580
|
case "i":
|
|
581
|
-
o.style =
|
|
581
|
+
o.style = jt(i) ? nt.Style.Italic : nt.Style.Normal;
|
|
582
582
|
break;
|
|
583
583
|
case "strike":
|
|
584
|
-
o.strike =
|
|
584
|
+
o.strike = Y(jt(i));
|
|
585
585
|
break;
|
|
586
586
|
case "outline":
|
|
587
|
-
o.outline =
|
|
587
|
+
o.outline = jt(i);
|
|
588
588
|
break;
|
|
589
589
|
case "shadow":
|
|
590
|
-
o.shadow =
|
|
590
|
+
o.shadow = jt(i);
|
|
591
591
|
break;
|
|
592
592
|
case "condense":
|
|
593
593
|
case "extend": {
|
|
594
|
-
const t =
|
|
594
|
+
const t = s(i.localName, jt(i));
|
|
595
595
|
void 0 !== t && (o.letterSpacing = t);
|
|
596
596
|
break;
|
|
597
597
|
}
|
|
@@ -599,7 +599,7 @@ function Yt(e) {
|
|
|
599
599
|
o.underline = y(i.getAttribute("val"));
|
|
600
600
|
break;
|
|
601
601
|
case "vertAlign": {
|
|
602
|
-
const t =
|
|
602
|
+
const t = M(i.getAttribute("val"));
|
|
603
603
|
void 0 !== t && (o.baseline = t);
|
|
604
604
|
break;
|
|
605
605
|
}
|
|
@@ -614,7 +614,7 @@ function Yt(e) {
|
|
|
614
614
|
break;
|
|
615
615
|
}
|
|
616
616
|
case "family": {
|
|
617
|
-
const t =
|
|
617
|
+
const t = Yt[i.getAttribute("val") ?? ""];
|
|
618
618
|
t && (o.fallbacks = [t]);
|
|
619
619
|
break;
|
|
620
620
|
}
|
|
@@ -717,15 +717,15 @@ var Xt = {
|
|
|
717
717
|
}
|
|
718
718
|
},
|
|
719
719
|
ShapePropertiesVisitor: h,
|
|
720
|
-
TextPropertiesVisitor:
|
|
720
|
+
TextPropertiesVisitor: I,
|
|
721
721
|
ShapeTextVisitor: O,
|
|
722
722
|
ThemeVisitor: class {
|
|
723
723
|
visit(t, e, o) {
|
|
724
724
|
o.name = e.getAttribute("name"), o.objectDefaults = {};
|
|
725
|
-
const s =
|
|
725
|
+
const s = vt(e, "custClrLst")[0];
|
|
726
726
|
if (s) {
|
|
727
|
-
const e = new
|
|
728
|
-
for (const o of
|
|
727
|
+
const e = new f(), r = [];
|
|
728
|
+
for (const o of vt(s, "custClr")) {
|
|
729
729
|
const s = e.processAdjColor(t, o);
|
|
730
730
|
if (!s) continue;
|
|
731
731
|
const i = { color: s }, n = o.getAttribute("name");
|
|
@@ -733,9 +733,9 @@ var Xt = {
|
|
|
733
733
|
}
|
|
734
734
|
r.length && (o.customColors = r);
|
|
735
735
|
}
|
|
736
|
-
for (const t of
|
|
736
|
+
for (const t of vt(e, "extLst")) for (const e of vt(t, "ext")) {
|
|
737
737
|
if ("{05A4C25C-085E-4340-85A3-A5531E510DB2}" !== e.getAttribute("uri")) continue;
|
|
738
|
-
const t =
|
|
738
|
+
const t = vt(e, "themeFamily")[0], s = t?.getAttribute("id");
|
|
739
739
|
if (!s) continue;
|
|
740
740
|
const r = {
|
|
741
741
|
name: t.getAttribute("name") ?? "",
|
|
@@ -746,7 +746,7 @@ var Xt = {
|
|
|
746
746
|
return o;
|
|
747
747
|
}
|
|
748
748
|
},
|
|
749
|
-
ClrSchemeVisitor: class extends
|
|
749
|
+
ClrSchemeVisitor: class extends f {
|
|
750
750
|
visit(t, e, o) {
|
|
751
751
|
const s = {};
|
|
752
752
|
s.name = e.getAttribute("name");
|
|
@@ -795,7 +795,7 @@ var Xt = {
|
|
|
795
795
|
ObjectDefaultsVisitor: class {
|
|
796
796
|
visit(t, e, o) {
|
|
797
797
|
const s = {};
|
|
798
|
-
for (const [o, r] of
|
|
798
|
+
for (const [o, r] of St) {
|
|
799
799
|
const i = t.evaluate(o, e);
|
|
800
800
|
i && (s[r] = this.processDefault(t, i));
|
|
801
801
|
}
|
|
@@ -807,10 +807,10 @@ var Xt = {
|
|
|
807
807
|
const r = new O().readTextBody(t, e);
|
|
808
808
|
(r.body || r.listStyle) && (o.text = r);
|
|
809
809
|
const i = t.evaluate("style", e);
|
|
810
|
-
return i && (o.style =
|
|
810
|
+
return i && (o.style = Ft(t, i)), o;
|
|
811
811
|
}
|
|
812
812
|
},
|
|
813
|
-
FmtSchemeVisitor: class extends
|
|
813
|
+
FmtSchemeVisitor: class extends f {
|
|
814
814
|
visit(t, e, o) {
|
|
815
815
|
const s = this.parseFillList(t, e, "fillStyleLst"), r = this.parseLnList(t, e, "lnStyleLst"), i = this.parseEffectStyleList(t, e, "effectStyleLst"), n = this.parseFillList(t, e, "bgFillStyleLst");
|
|
816
816
|
if (s && (o.fillStyleLst = s), r && (o.lnStyleLst = r), i && (o.effectStyleLst = i), n && (o.bgFillStyleLst = n), s && r && i && n) return;
|
|
@@ -832,11 +832,11 @@ var Xt = {
|
|
|
832
832
|
}
|
|
833
833
|
parseFillListItem(t, e) {
|
|
834
834
|
switch (e.localName) {
|
|
835
|
-
case "noFill": return { type:
|
|
835
|
+
case "noFill": return { type: it.Type.None };
|
|
836
836
|
case "solidFill": {
|
|
837
837
|
const o = this.processAdjColor(t, e);
|
|
838
838
|
return o ? {
|
|
839
|
-
type:
|
|
839
|
+
type: it.Type.Solid,
|
|
840
840
|
color: o
|
|
841
841
|
} : void 0;
|
|
842
842
|
}
|
|
@@ -878,11 +878,11 @@ var Xt = {
|
|
|
878
878
|
}
|
|
879
879
|
processColorFilter(t, e) {
|
|
880
880
|
const o = {}, s = {
|
|
881
|
-
operator:
|
|
881
|
+
operator: rt.BuiltInOperatorNames.Color,
|
|
882
882
|
param: o
|
|
883
883
|
};
|
|
884
884
|
t.copyFromAttribute(e, "cellColor", o, "cellColor", t.BOOLEAN_COPY);
|
|
885
|
-
const r =
|
|
885
|
+
const r = xt(t, e);
|
|
886
886
|
return r && (o.style = r), s;
|
|
887
887
|
}
|
|
888
888
|
processCustomFilter(t, e) {
|
|
@@ -895,7 +895,7 @@ var Xt = {
|
|
|
895
895
|
const o = e.getAttribute("and"), s = "and" === o || "1" === o;
|
|
896
896
|
e.getAttribute("val");
|
|
897
897
|
const r = [], i = {
|
|
898
|
-
operator: s ?
|
|
898
|
+
operator: s ? rt.BuiltInOperatorNames.And : rt.BuiltInOperatorNames.Or,
|
|
899
899
|
param: r
|
|
900
900
|
}, n = e.childNodes, l = n.length;
|
|
901
901
|
for (let e = 0; e < l; e++) {
|
|
@@ -904,10 +904,10 @@ var Xt = {
|
|
|
904
904
|
let s = null;
|
|
905
905
|
"customFilter" === o.localName && (s = this.processCustomFilter(t, o)), s && r.push(s);
|
|
906
906
|
}
|
|
907
|
-
return 1 === r.length ? r[0] :
|
|
907
|
+
return 1 === r.length ? r[0] : T(i);
|
|
908
908
|
}
|
|
909
909
|
processDynamicFilter(t, e) {
|
|
910
|
-
return
|
|
910
|
+
return S(e.getAttribute("type"), e.getAttribute("val"), e.getAttribute("maxVal"));
|
|
911
911
|
}
|
|
912
912
|
processDateGroupItem(t, e) {
|
|
913
913
|
const o = {};
|
|
@@ -918,10 +918,10 @@ var Xt = {
|
|
|
918
918
|
}
|
|
919
919
|
processFilters(t, e) {
|
|
920
920
|
const o = {}, s = {
|
|
921
|
-
operator:
|
|
921
|
+
operator: rt.BuiltInOperatorNames.InSet,
|
|
922
922
|
param: o
|
|
923
923
|
};
|
|
924
|
-
s.selector =
|
|
924
|
+
s.selector = rt.BuiltInSelectorNames.Display, t.copyFromAttribute(e, "blank", o, "blank", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calendarType", o, "calendarType");
|
|
925
925
|
let r = [], i = [];
|
|
926
926
|
const n = e.childNodes, l = n.length;
|
|
927
927
|
for (let e = 0; e < l; e++) {
|
|
@@ -940,14 +940,14 @@ var Xt = {
|
|
|
940
940
|
}
|
|
941
941
|
processIcon(t, e) {
|
|
942
942
|
const o = {}, s = {
|
|
943
|
-
operator:
|
|
943
|
+
operator: rt.BuiltInOperatorNames.Icon,
|
|
944
944
|
param: o
|
|
945
945
|
};
|
|
946
946
|
return t.copyFromAttribute(e, "iconId", o, "iconId", t.INT_COPY), t.copyFromAttribute(e, "iconSet", o), s;
|
|
947
947
|
}
|
|
948
948
|
processTop10(t, e) {
|
|
949
949
|
const o = {}, s = {
|
|
950
|
-
operator:
|
|
950
|
+
operator: rt.BuiltInOperatorNames.TopN,
|
|
951
951
|
param: o
|
|
952
952
|
};
|
|
953
953
|
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;
|
|
@@ -957,7 +957,7 @@ var Xt = {
|
|
|
957
957
|
for (let e = 0; e < o.length; e++) {
|
|
958
958
|
const s = o.item(e);
|
|
959
959
|
if (1 !== s.nodeType || "ext" !== s.localName) continue;
|
|
960
|
-
if (
|
|
960
|
+
if (j(s.getAttribute("uri")) !== j("{1AD28BCE-077C-4C59-8B6E-1921CE8616D4}")) continue;
|
|
961
961
|
const r = s.childNodes;
|
|
962
962
|
for (let e = 0; e < r.length; e++) {
|
|
963
963
|
const o = r.item(e);
|
|
@@ -1015,7 +1015,7 @@ var Xt = {
|
|
|
1015
1015
|
visit(t, e, o) {
|
|
1016
1016
|
if (!e) return;
|
|
1017
1017
|
const s = e.getAttribute("ref"), r = {};
|
|
1018
|
-
e.hasAttribute("caseSensitive") && (r.collatorOptions = A(e.getAttribute("caseSensitive")) ?
|
|
1018
|
+
e.hasAttribute("caseSensitive") && (r.collatorOptions = A(e.getAttribute("caseSensitive")) ? ht.CaseSensitiveOptions : ht.CaseInsensitiveOptions);
|
|
1019
1019
|
const i = e.getAttribute("sortMethod");
|
|
1020
1020
|
null != i && "none" !== i && ("stroke" === i ? r.collatorOptions = {
|
|
1021
1021
|
...r.collatorOptions,
|
|
@@ -1025,14 +1025,14 @@ var Xt = {
|
|
|
1025
1025
|
collation: "pinyin"
|
|
1026
1026
|
}));
|
|
1027
1027
|
const n = {};
|
|
1028
|
-
e.hasAttribute("columnSort") && A(e.getAttribute("columnSort")) && (n.axis =
|
|
1029
|
-
const l =
|
|
1028
|
+
e.hasAttribute("columnSort") && A(e.getAttribute("columnSort")) && (n.axis = lt.Axis.Column);
|
|
1029
|
+
const l = tt.fastStringToRange(s), a = [], c = [];
|
|
1030
1030
|
this.processSortConditions(t, e, a, l, r, c), a.length > 0 && (n.sorts = a);
|
|
1031
1031
|
const u = t.getVisitorParamsState().get("ref");
|
|
1032
1032
|
if (u && s) {
|
|
1033
|
-
const t =
|
|
1033
|
+
const t = tt.fastStringToRange(u);
|
|
1034
1034
|
n.extent = {
|
|
1035
|
-
range:
|
|
1035
|
+
range: m(t, l),
|
|
1036
1036
|
sorts: c.map((e) => k(t, l, e))
|
|
1037
1037
|
};
|
|
1038
1038
|
}
|
|
@@ -1043,14 +1043,14 @@ var Xt = {
|
|
|
1043
1043
|
const i = {};
|
|
1044
1044
|
if (!e.hasAttribute("ref")) return void t.warn("A sort condition has no ref; it was dropped.", { onceKey: "xlsx.sheet.sort.noRef" });
|
|
1045
1045
|
if (e.hasAttribute("ref")) {
|
|
1046
|
-
const t = e.getAttribute("ref"), s =
|
|
1046
|
+
const t = e.getAttribute("ref"), s = tt.fastStringToRange(t);
|
|
1047
1047
|
i.index = o ? s.colStart - o.colStart : s.colStart, r?.push(s);
|
|
1048
1048
|
}
|
|
1049
1049
|
const n = { ...s };
|
|
1050
1050
|
i.criteria = n, n.reverse = !1, e.hasAttribute("descending") && (n.reverse = A(e.getAttribute("descending")));
|
|
1051
|
-
const l =
|
|
1051
|
+
const l = _(e.getAttribute("sortBy"));
|
|
1052
1052
|
l && (n.sortOn = l);
|
|
1053
|
-
const a =
|
|
1053
|
+
const a = xt(t, e);
|
|
1054
1054
|
return a && (n.style = a), t.copyFromAttribute(e, "iconSet", n), t.copyFromAttribute(e, "customList", n), i;
|
|
1055
1055
|
}
|
|
1056
1056
|
processSortConditions(t, e, o, s, r, i) {
|
|
@@ -1065,31 +1065,31 @@ var Xt = {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
1067
|
},
|
|
1068
|
-
SheetStyleVisitor: class extends
|
|
1068
|
+
SheetStyleVisitor: class extends wt {
|
|
1069
1069
|
visit(t, e, o) {
|
|
1070
1070
|
this.processNumFmts(t, t.evaluate("numFmts", e), null), t.getVisitorParamsState().set("colorsToProcess", /* @__PURE__ */ new Set());
|
|
1071
1071
|
const s = {
|
|
1072
1072
|
fills: {},
|
|
1073
1073
|
fonts: {},
|
|
1074
1074
|
borders: {}
|
|
1075
|
-
},
|
|
1076
|
-
this.processFonts(t,
|
|
1075
|
+
}, i = t.evaluate("fonts", e);
|
|
1076
|
+
this.processFonts(t, i, s.fonts);
|
|
1077
1077
|
const n = s.fonts[this.normalFontId(t, e)], l = {
|
|
1078
|
-
declared: ["1", "true"].includes(
|
|
1079
|
-
normalIsThemeFont:
|
|
1080
|
-
faces:
|
|
1078
|
+
declared: ["1", "true"].includes(i?.getAttribute("x14ac:knownFonts") ?? ""),
|
|
1079
|
+
normalIsThemeFont: C(n?.family),
|
|
1080
|
+
faces: B(Object.values(s.fonts).map((t) => ({
|
|
1081
1081
|
...t,
|
|
1082
|
-
family:
|
|
1082
|
+
family: r(t?.family, t?.fallbacks, null, !1).name
|
|
1083
1083
|
})))
|
|
1084
1084
|
};
|
|
1085
|
-
t.getVisitorParamsState().set(D, l), n && t.getVisitorParamsState().set(
|
|
1086
|
-
type:
|
|
1087
|
-
patternType:
|
|
1085
|
+
t.getVisitorParamsState().set(D, l), n && t.getVisitorParamsState().set(G, n), this.processFills(t, t.evaluate("fills", e), s.fills), this.processBorders(t, t.evaluate("borders", e), s.borders, !0), s.fills[0] = { type: it.Type.None }, s.fills[1] = {
|
|
1086
|
+
type: it.Type.Pattern,
|
|
1087
|
+
patternType: it.BuiltInSheetPattern.Gray125
|
|
1088
1088
|
}, s.borders[0] = {
|
|
1089
|
-
bottom: { style:
|
|
1090
|
-
left: { style:
|
|
1091
|
-
right: { style:
|
|
1092
|
-
top: { style:
|
|
1089
|
+
bottom: { style: ot.StrokeStyle.None },
|
|
1090
|
+
left: { style: ot.StrokeStyle.None },
|
|
1091
|
+
right: { style: ot.StrokeStyle.None },
|
|
1092
|
+
top: { style: ot.StrokeStyle.None }
|
|
1093
1093
|
};
|
|
1094
1094
|
const a = [];
|
|
1095
1095
|
this.processXFs(t, t.evaluate("cellStyleXfs", e), a, s, null, !1);
|
|
@@ -1101,11 +1101,11 @@ var Xt = {
|
|
|
1101
1101
|
const u = [];
|
|
1102
1102
|
this.processXFs(t, t.evaluate("cellXfs", e), u, s, c), Object.keys(u).length > 0 && (o.direct = u);
|
|
1103
1103
|
const d = this.collectHiddenXfs(t.evaluate("cellXfs", e));
|
|
1104
|
-
d.size > 0 && t.getVisitorParamsState().set(
|
|
1104
|
+
d.size > 0 && t.getVisitorParamsState().set(W, d);
|
|
1105
1105
|
const h = this.collectPivotButtonXfs(t.evaluate("cellXfs", e));
|
|
1106
|
-
h.size > 0 && t.getVisitorParamsState().set(
|
|
1106
|
+
h.size > 0 && t.getVisitorParamsState().set(H, h);
|
|
1107
1107
|
const p = this.collectXfComplements(t.evaluate("cellXfs", e));
|
|
1108
|
-
p.size > 0 && t.getVisitorParamsState().set(
|
|
1108
|
+
p.size > 0 && t.getVisitorParamsState().set($, p);
|
|
1109
1109
|
const m = [];
|
|
1110
1110
|
return this.processDXFs(t, t.evaluate("dxfs", e), m), this.processTableStyles(t, t.evaluate("tableStyles", e), o, m), this.processSlicerStyles(t, t.evaluate("extLst", e), o), this.processIndexColors(t, t.evaluate("colors/indexedColors", e), o), this.processMruColors(t, t.evaluate("colors/mruColors", e), o), o;
|
|
1111
1111
|
}
|
|
@@ -1183,7 +1183,7 @@ var Xt = {
|
|
|
1183
1183
|
const n = e.getAttribute("xfId");
|
|
1184
1184
|
if (n && r) {
|
|
1185
1185
|
const t = r.get(parseInt(n));
|
|
1186
|
-
t && t !==
|
|
1186
|
+
t && t !== st.BuiltInName.Normal && (o.named = t);
|
|
1187
1187
|
}
|
|
1188
1188
|
const l = (t) => !(!i && e.hasAttribute(t)) || A(e.getAttribute(t)), a = (t) => !i || e.hasAttribute(t) && A(e.getAttribute(t)), c = "0", u = i ? c : void 0;
|
|
1189
1189
|
if (l("applyFont")) {
|
|
@@ -1232,13 +1232,13 @@ var Xt = {
|
|
|
1232
1232
|
}
|
|
1233
1233
|
processAlignment(t, e, o) {
|
|
1234
1234
|
const s = {};
|
|
1235
|
-
if (e?.hasAttribute("horizontal") ? s.horizontal = e.getAttribute("horizontal") : s.horizontal =
|
|
1235
|
+
if (e?.hasAttribute("horizontal") ? s.horizontal = e.getAttribute("horizontal") : s.horizontal = ut.HorizontalAlignment.General, e?.hasAttribute("vertical") ? s.vertical = e.getAttribute("vertical") : s.vertical = ut.VerticalAlignment.Bottom, e?.hasAttribute("indent") ? s.indent = parseInt(e.getAttribute("indent")) : s.indent = 0, e?.hasAttribute("relativeIndent") ? s.relativeIndent = parseInt(e.getAttribute("relativeIndent")) : s.relativeIndent = 0, A(e?.getAttribute("wrapText") ?? "") ? s.overflow = ut.Overflow.Wrap : s.overflow = ut.Overflow.Visible, A(e?.getAttribute("shrinkToFit") ?? "") && (s.overflow = ut.Overflow.Shrink), e?.hasAttribute("textRotation")) {
|
|
1236
1236
|
let t = parseFloat(e.getAttribute("textRotation"));
|
|
1237
1237
|
t > 0 && t <= 90 ? t = 360 - t : t > 90 && t <= 180 ? t -= 90 : 255 === t && (t = 0, s.stacked = !0), s.rotation = t;
|
|
1238
1238
|
} else s.rotation = 0;
|
|
1239
1239
|
e?.hasAttribute("justifyLastLine") && (s.justifyLastLine = A(e.getAttribute("justifyLastLine")));
|
|
1240
1240
|
const r = e?.getAttribute("readingOrder");
|
|
1241
|
-
return r && ("0" === r ? s.readingDirection =
|
|
1241
|
+
return r && ("0" === r ? s.readingDirection = ut.ReadingDirection.Auto : "1" === r ? s.readingDirection = ut.ReadingDirection.LeftToRight : "2" === r ? s.readingDirection = ut.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;
|
|
1242
1242
|
}
|
|
1243
1243
|
collectHiddenXfs(t) {
|
|
1244
1244
|
const e = /* @__PURE__ */ new Set();
|
|
@@ -1276,11 +1276,11 @@ var Xt = {
|
|
|
1276
1276
|
for (let t = 0; t < o.length; t++) {
|
|
1277
1277
|
const r = o.item(t);
|
|
1278
1278
|
if (1 !== r.nodeType || "xf" !== r.localName) continue;
|
|
1279
|
-
const i =
|
|
1279
|
+
const i = It(r, "extLst");
|
|
1280
1280
|
if (i) {
|
|
1281
1281
|
const t = i.childNodes;
|
|
1282
1282
|
for (let o = 0; o < t.length; o++) {
|
|
1283
|
-
const r =
|
|
1283
|
+
const r = It(t.item(o), "xfComplement"), i = parseInt(r?.getAttribute("i") ?? "", 10);
|
|
1284
1284
|
isNaN(i) || e.set(s, i);
|
|
1285
1285
|
}
|
|
1286
1286
|
}
|
|
@@ -1375,7 +1375,7 @@ var Xt = {
|
|
|
1375
1375
|
const o = a.item(e);
|
|
1376
1376
|
if (1 !== o.nodeType || "slicerStyleElement" !== o.localName) continue;
|
|
1377
1377
|
const s = o.getAttribute("type");
|
|
1378
|
-
if (!s || !
|
|
1378
|
+
if (!s || !kt.has(s)) continue;
|
|
1379
1379
|
const i = o.getAttribute("dxfId"), l = null != i ? n[parseInt(i)] : void 0;
|
|
1380
1380
|
l ? r[s] = l : t.warn(`A slicer style names a format that does not exist (dxfId '${i}').`, { onceKey: "xlsx.style.slicerStyle.dxf" });
|
|
1381
1381
|
}
|
|
@@ -1421,7 +1421,7 @@ var Xt = {
|
|
|
1421
1421
|
const t = parseInt(e.getAttribute("xfId") ?? ""), i = e.getAttribute("name"), n = e.getAttribute("builtinId");
|
|
1422
1422
|
let l = i;
|
|
1423
1423
|
if (null !== n) {
|
|
1424
|
-
const t =
|
|
1424
|
+
const t = st.builtInNameFromId(parseInt(n));
|
|
1425
1425
|
void 0 !== t && (l = t);
|
|
1426
1426
|
}
|
|
1427
1427
|
if (r.set(t, l), !s[t]) continue;
|
|
@@ -1435,9 +1435,9 @@ var Xt = {
|
|
|
1435
1435
|
}
|
|
1436
1436
|
afterVisit(t, e, o) {}
|
|
1437
1437
|
},
|
|
1438
|
-
WorkbookVisitor: class extends
|
|
1438
|
+
WorkbookVisitor: class extends wt {
|
|
1439
1439
|
visit(t, e, o) {
|
|
1440
|
-
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;
|
|
1440
|
+
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), this.processCompatibilityVersion(e, o), o;
|
|
1441
1441
|
}
|
|
1442
1442
|
processPassword(t, e, o, s = "workbook", r = "password") {
|
|
1443
1443
|
if (!e) return;
|
|
@@ -1448,13 +1448,13 @@ var Xt = {
|
|
|
1448
1448
|
if (!e) return;
|
|
1449
1449
|
const s = {};
|
|
1450
1450
|
this.processPassword(t, e, s, "workbook", "password"), this.processPassword(t, e, s, "revisions", "revisionsPassword");
|
|
1451
|
-
for (const t of
|
|
1451
|
+
for (const t of w) s[t.key] = R(t, e.getAttribute(t.attribute));
|
|
1452
1452
|
return o.protection = s, o;
|
|
1453
1453
|
}
|
|
1454
1454
|
processCalcPr(t, e, o) {
|
|
1455
1455
|
if (!e) return;
|
|
1456
1456
|
const s = {};
|
|
1457
|
-
t.copyFromAttribute(e, "calcMode", s, "calcMode", (t) =>
|
|
1457
|
+
t.copyFromAttribute(e, "calcMode", s, "calcMode", (t) => Ot[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);
|
|
1458
1458
|
const r = e.getAttribute("calcId");
|
|
1459
1459
|
null !== r && t.getVisitorParamsState().set("calcId", r), o.calc = s;
|
|
1460
1460
|
}
|
|
@@ -1467,22 +1467,22 @@ var Xt = {
|
|
|
1467
1467
|
}
|
|
1468
1468
|
o.sheets = s;
|
|
1469
1469
|
}
|
|
1470
|
-
processSheetRef(e,
|
|
1471
|
-
const
|
|
1472
|
-
e.copyFromAttribute(
|
|
1473
|
-
const
|
|
1474
|
-
if (
|
|
1475
|
-
const
|
|
1476
|
-
if (
|
|
1477
|
-
const e = { part:
|
|
1478
|
-
|
|
1470
|
+
processSheetRef(e, o, s) {
|
|
1471
|
+
const r = {};
|
|
1472
|
+
e.copyFromAttribute(o, "name", r, "name"), e.copyFromAttribute(o, "state", r, "visibility"), e.copyFromAttribute(o, "sheetId", r, "sheetId", e.INT_COPY);
|
|
1473
|
+
const i = o.getAttribute("r:id"), n = i ? p(e.getRelationships().get(i)?.type) : null;
|
|
1474
|
+
if (n) {
|
|
1475
|
+
const o = e.readEmbeddedPart(i);
|
|
1476
|
+
if (o?.xml) {
|
|
1477
|
+
const e = { part: o }, i = d(o.xml), l = i ? t((t) => i.get(t)) : void 0;
|
|
1478
|
+
l && (e.tabColor = l), r.kind = n, r.sheet = e, s.push(r);
|
|
1479
1479
|
return;
|
|
1480
1480
|
}
|
|
1481
|
-
e.warn(`The ${
|
|
1481
|
+
e.warn(`The ${n} sheet '${r.name}' could not be read and was loaded as an empty worksheet.`), s.push(r);
|
|
1482
1482
|
return;
|
|
1483
1483
|
}
|
|
1484
|
-
const
|
|
1485
|
-
|
|
1484
|
+
const l = i ? e.getRef(i) : null;
|
|
1485
|
+
l && (r.sheet = l), s.push(r);
|
|
1486
1486
|
}
|
|
1487
1487
|
processExternalReferences(t, e, o) {
|
|
1488
1488
|
if (!e) return;
|
|
@@ -1498,7 +1498,7 @@ var Xt = {
|
|
|
1498
1498
|
}
|
|
1499
1499
|
processPivotCaches(t, e, o) {
|
|
1500
1500
|
if (!e) return;
|
|
1501
|
-
const s = [], r = t.evaluate("workbookPr", e.parentNode)?.getAttribute?.("date1904"), i = "1" === r || "true" === r, n =
|
|
1501
|
+
const s = [], r = t.evaluate("workbookPr", e.parentNode)?.getAttribute?.("date1904"), i = "1" === r || "true" === r, n = L(t.getVisitorParamsState().get("numFmts"), void 0), l = e.childNodes, a = l.length;
|
|
1502
1502
|
for (let e = 0; e < a; e++) {
|
|
1503
1503
|
const o = l.item(e);
|
|
1504
1504
|
if (1 !== o.nodeType || "pivotCache" !== o.localName) continue;
|
|
@@ -1506,7 +1506,7 @@ var Xt = {
|
|
|
1506
1506
|
if (isNaN(r) || !a) continue;
|
|
1507
1507
|
const c = t.readEmbeddedPart(a);
|
|
1508
1508
|
if (!c) continue;
|
|
1509
|
-
const u =
|
|
1509
|
+
const u = q(c, i, (t) => n.numberFormat(t)), d = !u && c.xml ? P(c.xml, n) : void 0, h = !u && c.xml ? Z(c.xml) : void 0;
|
|
1510
1510
|
s.push({
|
|
1511
1511
|
cacheId: r,
|
|
1512
1512
|
part: c,
|
|
@@ -1557,8 +1557,8 @@ var Xt = {
|
|
|
1557
1557
|
r.scope = s[o].name;
|
|
1558
1558
|
}
|
|
1559
1559
|
const n = {};
|
|
1560
|
-
for (const o of
|
|
1561
|
-
for (const t of
|
|
1560
|
+
for (const o of K) t.copyFromAttribute(e, o, n);
|
|
1561
|
+
for (const t of U) {
|
|
1562
1562
|
const o = e.getAttribute(t);
|
|
1563
1563
|
"1" !== o && "true" !== o || (n[t] = !0);
|
|
1564
1564
|
}
|
|
@@ -1573,6 +1573,26 @@ var Xt = {
|
|
|
1573
1573
|
}
|
|
1574
1574
|
s.length > 0 && (o.names = s);
|
|
1575
1575
|
}
|
|
1576
|
+
processCompatibilityVersion(t, e) {
|
|
1577
|
+
let o = 1;
|
|
1578
|
+
const s = j(F), r = t.childNodes;
|
|
1579
|
+
for (let t = r.length - 1; t >= 0; t--) {
|
|
1580
|
+
const e = r.item(t);
|
|
1581
|
+
if (1 !== e.nodeType || "extLst" !== e.localName) continue;
|
|
1582
|
+
const i = e.childNodes;
|
|
1583
|
+
for (let t = 0; t < i.length; t++) {
|
|
1584
|
+
const e = i.item(t);
|
|
1585
|
+
if (1 !== e.nodeType || j(e.getAttribute("uri")) !== s) continue;
|
|
1586
|
+
const r = e.childNodes;
|
|
1587
|
+
for (let t = 0; t < r.length; t++) {
|
|
1588
|
+
const e = r.item(t);
|
|
1589
|
+
1 === e.nodeType && "version" === e.localName && Number(e.getAttribute("setVersion")) >= 2 && (o = 2);
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
break;
|
|
1593
|
+
}
|
|
1594
|
+
1 === o && (e.compatibilityVersion = 1);
|
|
1595
|
+
}
|
|
1576
1596
|
processWorkbookPr(t, e, o) {
|
|
1577
1597
|
if (!e) return;
|
|
1578
1598
|
t.copyFromAttribute(e, "date1904", o, "date1904", t.BOOLEAN_COPY), t.copyFromAttribute(e, "codeName", o, "codeName"), t.copyFromAttribute(e, "updateLinks", o, "updateLinks");
|
|
@@ -1703,7 +1723,7 @@ var Xt = {
|
|
|
1703
1723
|
r.length > 0 && (o.sheetDataSet = r);
|
|
1704
1724
|
}
|
|
1705
1725
|
processSheetData(t, e) {
|
|
1706
|
-
const o = new
|
|
1726
|
+
const o = new pt.Builder(), s = e.childNodes, r = s.length;
|
|
1707
1727
|
for (let t = 0; t < r; t++) {
|
|
1708
1728
|
const e = s.item(t);
|
|
1709
1729
|
if (1 !== e.nodeType || "row" !== e.localName) continue;
|
|
@@ -1713,7 +1733,7 @@ var Xt = {
|
|
|
1713
1733
|
if (1 !== e.nodeType || "cell" !== e.localName) continue;
|
|
1714
1734
|
const s = e.getAttribute("r");
|
|
1715
1735
|
if (!s) continue;
|
|
1716
|
-
const i =
|
|
1736
|
+
const i = tt.fastStringToCell(s);
|
|
1717
1737
|
if (void 0 === i?.rowIndex || void 0 === i?.colIndex) continue;
|
|
1718
1738
|
const n = this._readCellValue(e);
|
|
1719
1739
|
void 0 !== n && o.pushAt(i.rowIndex, i.colIndex, n);
|
|
@@ -1733,7 +1753,7 @@ var Xt = {
|
|
|
1733
1753
|
case "str":
|
|
1734
1754
|
default: return e;
|
|
1735
1755
|
case "e": {
|
|
1736
|
-
const t =
|
|
1756
|
+
const t = et.getBuiltInByLabel(e);
|
|
1737
1757
|
return t ? {
|
|
1738
1758
|
t: "e",
|
|
1739
1759
|
v: t.getCode()
|
|
@@ -1820,8 +1840,8 @@ var Xt = {
|
|
|
1820
1840
|
const s = {};
|
|
1821
1841
|
o[e.getAttribute("name")] = s, t.copyFromAttribute(e, "xr10:uid", s, "uid");
|
|
1822
1842
|
const r = e.getAttribute("cache"), i = t.getVisitorParamsState().get("slicerCaches"), n = r ? i?.get(r) : void 0;
|
|
1823
|
-
if (n) for (let t = 0; t <
|
|
1824
|
-
const e =
|
|
1843
|
+
if (n) for (let t = 0; t < Vt.length; t++) {
|
|
1844
|
+
const e = Vt[t];
|
|
1825
1845
|
void 0 !== n[e] && (s[e] = n[e]);
|
|
1826
1846
|
}
|
|
1827
1847
|
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);
|
|
@@ -1842,15 +1862,15 @@ var Xt = {
|
|
|
1842
1862
|
const s = {};
|
|
1843
1863
|
o[e.getAttribute("name")] = s, t.copyFromAttribute(e, "xr10:uid", s, "uid");
|
|
1844
1864
|
const r = e.getAttribute("cache"), i = t.getVisitorParamsState().get("slicerCaches"), n = r ? i?.get(r) : void 0;
|
|
1845
|
-
if (n) for (let t = 0; t <
|
|
1846
|
-
const e =
|
|
1865
|
+
if (n) for (let t = 0; t < Vt.length; t++) {
|
|
1866
|
+
const e = Vt[t];
|
|
1847
1867
|
void 0 !== n[e] && (s[e] = n[e]);
|
|
1848
1868
|
}
|
|
1849
1869
|
t.copyFromAttribute(e, "caption", s);
|
|
1850
1870
|
const l = {};
|
|
1851
1871
|
for (let t = 0; t < e.attributes.length; t++) {
|
|
1852
1872
|
const o = e.attributes.item(t);
|
|
1853
|
-
|
|
1873
|
+
_t.has(o.name) || o.name.startsWith("xmlns") || (l[o.name] = o.value);
|
|
1854
1874
|
}
|
|
1855
1875
|
s.timelineAttributes = l;
|
|
1856
1876
|
let a = "";
|
|
@@ -1891,7 +1911,7 @@ var Xt = {
|
|
|
1891
1911
|
return o;
|
|
1892
1912
|
}
|
|
1893
1913
|
afterVisit(t, e, o) {
|
|
1894
|
-
for (const t of o?.movables ?? [])
|
|
1914
|
+
for (const t of o?.movables ?? []) Bt(t, !1);
|
|
1895
1915
|
}
|
|
1896
1916
|
},
|
|
1897
1917
|
DrawingAnchorVisitor: class {
|
|
@@ -1924,14 +1944,14 @@ var Xt = {
|
|
|
1924
1944
|
return t.evaluate("col", e) && (r.c = parseInt(t.evaluate("col", e).textContent)), t.evaluate("row", e) && (r.r = parseInt(t.evaluate("row", e).textContent)), t.evaluate("colOff", e) && (r.x = N(t.evaluate("colOff", e).textContent)), t.evaluate("rowOff", e) && (r.y = N(t.evaluate("rowOff", e).textContent)), "from" === s ? o.tl = r : o.br = r, o;
|
|
1925
1945
|
}
|
|
1926
1946
|
},
|
|
1927
|
-
DrawingGraphicFrameVisitor: class extends
|
|
1947
|
+
DrawingGraphicFrameVisitor: class extends Ct {
|
|
1928
1948
|
visit(t, e, o) {
|
|
1929
1949
|
if (!e) return;
|
|
1930
1950
|
if (this.isGroupContent(o)) {
|
|
1931
1951
|
if (t.getPath().includes("Fallback")) return {};
|
|
1932
1952
|
const { movable: s } = this.readMemberHeader(t, e, "graphicFrame"), r = t.evaluate("xfrm", e);
|
|
1933
1953
|
if (r) {
|
|
1934
|
-
|
|
1954
|
+
l(r, s);
|
|
1935
1955
|
const e = t.evaluate("off", r), o = t.evaluate("ext", r);
|
|
1936
1956
|
s.anchor = {
|
|
1937
1957
|
tl: {
|
|
@@ -1980,7 +2000,7 @@ var Xt = {
|
|
|
1980
2000
|
const o = this.readSourceId(t, e), i = t.readEmbeddedPart(r) ?? void 0;
|
|
1981
2001
|
let n;
|
|
1982
2002
|
try {
|
|
1983
|
-
const e = i?.xml ?
|
|
2003
|
+
const e = i?.xml ? J(i.xml) : null;
|
|
1984
2004
|
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" });
|
|
1985
2005
|
} catch (e) {
|
|
1986
2006
|
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" });
|
|
@@ -2001,8 +2021,8 @@ var Xt = {
|
|
|
2001
2021
|
return s;
|
|
2002
2022
|
}
|
|
2003
2023
|
},
|
|
2004
|
-
DrawingSpVisitor:
|
|
2005
|
-
DrawingPicVisitor: class extends
|
|
2024
|
+
DrawingSpVisitor: Lt,
|
|
2025
|
+
DrawingPicVisitor: class extends Ct {
|
|
2006
2026
|
visit(t, e, o) {
|
|
2007
2027
|
if (!e) return;
|
|
2008
2028
|
if (this.isGroupContent(o)) {
|
|
@@ -2033,16 +2053,16 @@ var Xt = {
|
|
|
2033
2053
|
const o = t.evaluate("blipFill", e), s = o ? t.evaluate("blip", o) : null;
|
|
2034
2054
|
if (!s) return;
|
|
2035
2055
|
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;
|
|
2036
|
-
const { type: r, resId: i, ...n } = new
|
|
2037
|
-
return !n.tile && n.stretch && 0 === Object.keys(n.stretch).length && delete n.stretch, n.extLst &&
|
|
2056
|
+
const { type: r, resId: i, ...n } = new f().processImageFill(t, o);
|
|
2057
|
+
return !n.tile && n.stretch && 0 === Object.keys(n.stretch).length && delete n.stretch, n.extLst && Dt.test(n.extLst) && delete n.extLst, {
|
|
2038
2058
|
resId: i,
|
|
2039
2059
|
image: Object.keys(n).length > 0 ? n : void 0
|
|
2040
2060
|
};
|
|
2041
2061
|
}
|
|
2042
2062
|
},
|
|
2043
|
-
DrawingGrpSpVisitor: class extends
|
|
2063
|
+
DrawingGrpSpVisitor: class extends Ct {
|
|
2044
2064
|
constructor(...t) {
|
|
2045
|
-
super(...t), this._fills = new
|
|
2065
|
+
super(...t), this._fills = new f();
|
|
2046
2066
|
}
|
|
2047
2067
|
visit(t, e, o) {
|
|
2048
2068
|
if (!e) return;
|
|
@@ -2064,14 +2084,14 @@ var Xt = {
|
|
|
2064
2084
|
i.members = [];
|
|
2065
2085
|
const n = t.evaluate("nvGrpSpPr/cNvGrpSpPr/grpSpLocks", e);
|
|
2066
2086
|
n?.hasAttribute?.("noChangeAspect") && (r.lockAspect = "1" === n.getAttribute("noChangeAspect"));
|
|
2067
|
-
const
|
|
2068
|
-
|
|
2087
|
+
const a = this.readLocks(n);
|
|
2088
|
+
a && (i.locks = a);
|
|
2069
2089
|
const c = t.evaluate("grpSpPr", e);
|
|
2070
2090
|
if (c) {
|
|
2071
2091
|
const e = t.evaluate("xfrm", c);
|
|
2072
2092
|
if (e) {
|
|
2073
|
-
|
|
2074
|
-
const o =
|
|
2093
|
+
l(e, r), "1" === e.getAttribute("flipH") && (r.flipH = !0), "1" === e.getAttribute("flipV") && (r.flipV = !0);
|
|
2094
|
+
const o = Et(t, e, "off", "ext"), n = Et(t, e, "chOff", "chExt") ?? o;
|
|
2075
2095
|
n && (i.childBounds = n), s && o && (r.anchor = {
|
|
2076
2096
|
tl: {
|
|
2077
2097
|
x: o.x,
|
|
@@ -2087,7 +2107,7 @@ var Xt = {
|
|
|
2087
2107
|
o && Object.keys(o).length > 0 && (i.fill = o);
|
|
2088
2108
|
const n = this._fills.getEffects(t, c);
|
|
2089
2109
|
n && (i.effects = n);
|
|
2090
|
-
const
|
|
2110
|
+
const a = t.evaluate("scene3d", c), u = a ? t.serializeElement(a) : null;
|
|
2091
2111
|
u && (i.scene3d = u);
|
|
2092
2112
|
const d = t.evaluate("extLst", c), h = d ? t.serializeElement(d) : null;
|
|
2093
2113
|
h && (i.extLst = {
|
|
@@ -2098,7 +2118,7 @@ var Xt = {
|
|
|
2098
2118
|
return i;
|
|
2099
2119
|
}
|
|
2100
2120
|
},
|
|
2101
|
-
DrawingCxnSpVisitor: class extends
|
|
2121
|
+
DrawingCxnSpVisitor: class extends Lt {
|
|
2102
2122
|
visit(t, e, o) {
|
|
2103
2123
|
if (e) return this.visitShape(t, e, o, "cxnSp", "nvCxnSpPr/cNvCxnSpPr/cxnSpLocks");
|
|
2104
2124
|
}
|
|
@@ -2220,7 +2240,7 @@ var Xt = {
|
|
|
2220
2240
|
}
|
|
2221
2241
|
const i = [], n = s.find((t) => "XFComplements" === t.type)?.arrays.get("MappedFeaturePropertyBags") ?? [];
|
|
2222
2242
|
for (let e = 0; e < n.length; e++) {
|
|
2223
|
-
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 ?
|
|
2243
|
+
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 ? Rt[l] : void 0;
|
|
2224
2244
|
a || t.warn(`A cell format's feature '${l ?? "unknown"}' is not read; its cells keep their values.`), i.push(a ? { type: a } : null);
|
|
2225
2245
|
}
|
|
2226
2246
|
const l = { controls: i };
|
|
@@ -2299,7 +2319,7 @@ var Xt = {
|
|
|
2299
2319
|
if (1 === o.nodeType) {
|
|
2300
2320
|
if ("t" === o.localName) t.text += o.textContent ?? "";
|
|
2301
2321
|
else if ("rPr" === o.localName) {
|
|
2302
|
-
const e =
|
|
2322
|
+
const e = Mt(o);
|
|
2303
2323
|
e && (t.font = e);
|
|
2304
2324
|
}
|
|
2305
2325
|
}
|
|
@@ -2326,9 +2346,9 @@ var Xt = {
|
|
|
2326
2346
|
visit(t, e, o) {
|
|
2327
2347
|
if (!e) return;
|
|
2328
2348
|
const s = {};
|
|
2329
|
-
t.copyFromAttribute(e, "id", s, "id",
|
|
2349
|
+
t.copyFromAttribute(e, "id", s, "id", x);
|
|
2330
2350
|
const r = e.getAttribute("ref");
|
|
2331
|
-
t.copyFromAttribute(e, "personId", s, "personId",
|
|
2351
|
+
t.copyFromAttribute(e, "personId", s, "personId", x), t.copyFromAttribute(e, "parentId", s, "parentId", x);
|
|
2332
2352
|
const i = e.getAttribute("dT");
|
|
2333
2353
|
i && (s.dt = function(t) {
|
|
2334
2354
|
const e = /^(.*T\d{2}:\d{2}:\d{2})(?:\.(\d+))?(Z|[+-]\d{2}:?\d{2})?$/i.exec(t.trim());
|
|
@@ -2349,8 +2369,8 @@ var Xt = {
|
|
|
2349
2369
|
const s = o.getAttribute("mentionId"), i = o.getAttribute("mentionpersonId");
|
|
2350
2370
|
if (!s || !i) continue;
|
|
2351
2371
|
const n = {
|
|
2352
|
-
id:
|
|
2353
|
-
personId:
|
|
2372
|
+
id: x(s),
|
|
2373
|
+
personId: x(i)
|
|
2354
2374
|
}, l = parseInt(o.getAttribute("startIndex") ?? "", 10);
|
|
2355
2375
|
isNaN(l) || (n.startIndex = l);
|
|
2356
2376
|
const a = parseInt(o.getAttribute("length") ?? "", 10);
|
|
@@ -2372,17 +2392,17 @@ var Xt = {
|
|
|
2372
2392
|
const o = r.item(e);
|
|
2373
2393
|
if (1 === o.nodeType && "person" === o.localName) {
|
|
2374
2394
|
const e = {};
|
|
2375
|
-
t.copyFromAttribute(o, "id", e, "id",
|
|
2395
|
+
t.copyFromAttribute(o, "id", e, "id", x), t.copyFromAttribute(o, "displayName", e), t.copyFromAttribute(o, "userId", e, "userId", x), t.copyFromAttribute(o, "providerId", e), s.push(e);
|
|
2376
2396
|
}
|
|
2377
2397
|
}
|
|
2378
2398
|
return s.length > 0 && (o.persons = s), s;
|
|
2379
2399
|
}
|
|
2380
2400
|
}
|
|
2381
|
-
},
|
|
2401
|
+
}, zt = class {
|
|
2382
2402
|
constructor(t, e) {
|
|
2383
2403
|
this.path = t, this.visitor = e;
|
|
2384
2404
|
}
|
|
2385
|
-
},
|
|
2405
|
+
}, Gt = class {
|
|
2386
2406
|
constructor() {
|
|
2387
2407
|
this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new Xt.RelsVisitor()), this.registerVisitor("cp:coreProperties", new Xt.CorePropertiesVisitor()), this.registerVisitor("Properties", new Xt.AppPropertiesVisitor()), this.registerVisitor("spPr", new Xt.ShapePropertiesVisitor()), this.registerVisitor("txBody", new Xt.ShapeTextVisitor()), this.registerVisitor("txPr", new Xt.TextPropertiesVisitor()), this.registerVisitor("a:theme", new Xt.ThemeVisitor()), this.registerVisitor("a:theme", new Xt.ClrSchemeVisitor(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new Xt.FontSchemeVisitor(), "themeElements/fontScheme"), this.registerVisitor("a:theme", new Xt.FmtSchemeVisitor(), "themeElements/fmtScheme"), this.registerVisitor("a:theme", new Xt.ObjectDefaultsVisitor(), "objectDefaults"), this.registerVisitor("autoFilter", new Xt.AutoFilterVisitor()), this.registerVisitor("sortState", new Xt.SortStateVisitor()), this.registerVisitor("s:workbook", new Xt.WorkbookVisitor()), this.registerVisitor("styleSheet", new Xt.SheetStyleVisitor()), this.registerVisitor("x14:table", new Xt.TableX14Visitor()), this.registerVisitor("table", new Xt.TableVisitor()), this.registerVisitor("externalLink", new Xt.ExternalLinkVisitor()), this.registerVisitor("wsDr", new Xt.DrawingVisitor()), this.registerVisitor("twoCellAnchor", new Xt.DrawingAnchorVisitor()), this.registerVisitor("oneCellAnchor", new Xt.DrawingAnchorVisitor()), this.registerVisitor("absoluteAnchor", new Xt.DrawingAnchorVisitor()), this.registerVisitor("graphicFrame", new Xt.DrawingGraphicFrameVisitor()), this.registerVisitor("sp", new Xt.DrawingSpVisitor()), this.registerVisitor("grpSp", new Xt.DrawingGrpSpVisitor()), this.registerVisitor("cxnSp", new Xt.DrawingCxnSpVisitor()), this.registerVisitor("pic", new Xt.DrawingPicVisitor()), this.registerVisitor("metadata", new Xt.MetadataVisitor()), this.registerVisitor("FeaturePropertyBags", new Xt.FeaturePropertyBagVisitor()), this.registerVisitor("comments", new Xt.CommentsVisitor()), this.registerVisitor("comment", new Xt.CommentVisitor()), this.registerVisitor("ThreadedComments", new Xt.ThreadedCommentsVisitor()), this.registerVisitor("threadedComment", new Xt.ThreadedCommentVisitor()), this.registerVisitor("threadedComment", new Xt.TextPropertiesVisitor("content"), "text"), this.registerVisitor("personList", new Xt.PersonListVisitor()), this.registerVisitor("slicerCacheDefinition", new Xt.SlicerCacheDefinitionVisitor()), this.registerVisitor("slicers", new Xt.SlicersVisitor()), this.registerVisitor("timelineCacheDefinition", new Xt.SlicerCacheDefinitionVisitor()), this.registerVisitor("timelines", new Xt.TimelinesVisitor()), this.registerVisitor("formControlPr", new Xt.FormControlPrVisitor());
|
|
2388
2408
|
}
|
|
@@ -2391,14 +2411,14 @@ var Xt = {
|
|
|
2391
2411
|
const s = t.split(":"), r = s.length > 1 ? s[1] : s[0];
|
|
2392
2412
|
if (!o) return this.visitorsByXmlTagName.set(r, e), void this.visitorsByXmlTagName.set(t, e);
|
|
2393
2413
|
let i = this.scopedVisitorsByXmlTagName.get(r);
|
|
2394
|
-
i || (i = [], this.scopedVisitorsByXmlTagName.set(r, i), this.scopedVisitorsByXmlTagName.set(t, i)), i.push(new
|
|
2414
|
+
i || (i = [], this.scopedVisitorsByXmlTagName.set(r, i), this.scopedVisitorsByXmlTagName.set(t, i)), i.push(new zt(o, e));
|
|
2395
2415
|
}
|
|
2396
|
-
parseDxf(t, e = "", o =
|
|
2416
|
+
parseDxf(t, e = "", o = Q.EmptyObject) {
|
|
2397
2417
|
this.visitorParamsState || (this.visitorParamsState = /* @__PURE__ */ new Map());
|
|
2398
2418
|
const s = this.visitorParamsState, r = s.get("processingDXFs");
|
|
2399
2419
|
s.set("processingDXFs", !0);
|
|
2400
2420
|
try {
|
|
2401
|
-
const s = new
|
|
2421
|
+
const s = new At(null, this, "/dxf", t, {}, e, o), r = {};
|
|
2402
2422
|
return new Xt.SheetStyleVisitor().processDXF(s, t, r), r;
|
|
2403
2423
|
} finally {
|
|
2404
2424
|
void 0 === r ? s.delete("processingDXFs") : s.set("processingDXFs", r);
|
|
@@ -2407,13 +2427,13 @@ var Xt = {
|
|
|
2407
2427
|
getVisitorParamsState() {
|
|
2408
2428
|
return this.visitorParamsState;
|
|
2409
2429
|
}
|
|
2410
|
-
transform(t, e, o =
|
|
2430
|
+
transform(t, e, o = Q.EmptyObject) {
|
|
2411
2431
|
const s = t.documentElement;
|
|
2412
2432
|
this.visitorParamsState && !o?.paramMap || (this.visitorParamsState = o?.paramMap ?? /* @__PURE__ */ new Map());
|
|
2413
2433
|
const r = {};
|
|
2414
2434
|
let i = this.visitorsByXmlTagName.get(s.nodeName);
|
|
2415
2435
|
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.`);
|
|
2416
|
-
const n = "/" + s.localName, l = new
|
|
2436
|
+
const n = "/" + s.localName, l = new At(null, this, n, s, r, e, o), a = [];
|
|
2417
2437
|
this._doWalk(i, l, a, s, r, e, o);
|
|
2418
2438
|
const c = a.length;
|
|
2419
2439
|
for (let t = 0; t < c; t++) {
|
|
@@ -2442,7 +2462,7 @@ var Xt = {
|
|
|
2442
2462
|
for (; c && c !== s;) l = c.localName + "/" + l, c = c.parentNode;
|
|
2443
2463
|
const u = e.getPath() + "/" + l;
|
|
2444
2464
|
if (a.visitor) {
|
|
2445
|
-
const s = new
|
|
2465
|
+
const s = new At(e, this, u, e.getElemRoot(), e.getJsonRoot(), i, n);
|
|
2446
2466
|
this._doWalk(a.visitor, s, o, t, r, i, n);
|
|
2447
2467
|
}
|
|
2448
2468
|
};
|
|
@@ -2469,10 +2489,10 @@ var Xt = {
|
|
|
2469
2489
|
const a = s;
|
|
2470
2490
|
let p = a.nodeName, m = c.get(p);
|
|
2471
2491
|
m || (p = a.localName, m = c.get(p));
|
|
2472
|
-
const f = e.getPath() + "/" + p, g = new
|
|
2492
|
+
const f = e.getPath() + "/" + p, g = new At(e, this, f, u, d, i, n);
|
|
2473
2493
|
this._doWalk(m, g, o, a, l ?? r, i, n);
|
|
2474
2494
|
}
|
|
2475
2495
|
return l;
|
|
2476
2496
|
}
|
|
2477
2497
|
};
|
|
2478
|
-
export {
|
|
2498
|
+
export { Gt as DOMTransformer, At as ExecutionContext, n as NumberUtils, i as VisitorUtils };
|