@sheetxl/studio-vanilla 0.4.11 → 0.4.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 (96) hide show
  1. package/browser/cjs/{BlSFY6zLlebuejdV.cjs → B35OZ0mE8aINQPP9.cjs} +2 -2
  2. package/browser/cjs/{DiBy6-IxLscyMW2y.cjs → BPzEQNENF-gEBkg9.cjs} +2 -2
  3. package/browser/cjs/{C7EZCTczsC-gkRcq.cjs → BUokV6yuzE-_8MyK.cjs} +2 -2
  4. package/browser/cjs/{T4SHYo66xDT3l9JN.cjs → BeZHmOKfa37mFNAu.cjs} +2 -2
  5. package/browser/cjs/{BplA5pDzOJpfTZuA.cjs → BflJ_0gT9lQtDvY_.cjs} +2 -2
  6. package/browser/cjs/{DFspSkki779xN-Ey.cjs → BwN8vKi5o3-PbIMo.cjs} +2 -2
  7. package/browser/cjs/{D3iOk-Q2tRdUeTcn.cjs → C3OizZPVuxO2fjSG.cjs} +1 -1
  8. package/browser/cjs/{BshvMtUxTJHj3JQN.cjs → CBL6KkiWI2RPflEN.cjs} +2 -2
  9. package/browser/cjs/CN6-6xpZMpFqSS8M.cjs +7 -0
  10. package/browser/cjs/{vfUix5Di0Ro8tEID.cjs → CTrEV_UpxC0W6cZZ.cjs} +2 -2
  11. package/browser/cjs/{CFcjX5-nVsgzdZ4F.cjs → CU30GVjjFXl44vEU.cjs} +1 -1
  12. package/browser/cjs/{DgBn3aW39yjgm0X_.cjs → CZWBxvUXzfpn_zmc.cjs} +2 -2
  13. package/browser/cjs/{DrlS1oz9Nea8Pm3j.cjs → Ccs2ouvlLekaLGH0.cjs} +2 -2
  14. package/browser/cjs/{B0rdyyttE2Aibsag.cjs → Ce-8L4Viq3I_6j0i.cjs} +2 -2
  15. package/browser/cjs/{SzxJv7OUs5ojl8gx.cjs → CtNjLzIHB8WX63Bl.cjs} +2 -2
  16. package/browser/cjs/{Dx-jp_LJxWbAScyA.cjs → DAHpsyykuPBkoh-Z.cjs} +1 -1
  17. package/browser/cjs/{B2e7dDI-zKoqXpIW.cjs → DJbKKxeeTEHHA1gR.cjs} +20 -20
  18. package/browser/cjs/{CjZbhk41S1qO_74G.cjs → D_VQzwC1zzTJyKtG.cjs} +1 -1
  19. package/browser/cjs/{Db_Ew1r6yOMYylvA.cjs → GrsZZ_mEdsM5dEMA.cjs} +2 -2
  20. package/browser/cjs/{BPTHTRDvNOVkUJGa.cjs → JKEGlXjMwGnXk_Gv.cjs} +2 -2
  21. package/browser/cjs/{C5FXOMLhAu_KTjVe.cjs → L1iE_VcelYZIy0wI.cjs} +1 -1
  22. package/browser/cjs/{DFtyXc7YFh9dIp74.cjs → Q_VvA-yUQx3xFKiJ.cjs} +1 -1
  23. package/browser/cjs/{BAyEOOtO-9sHQQRW.cjs → fTGpiXzFm3K_u2Fm.cjs} +2 -2
  24. package/browser/cjs/{CuTW2Pt-L5n-hNxV.cjs → hwDUzorB6aCvH1eL.cjs} +1 -1
  25. package/browser/cjs/index.cjs +2 -2
  26. package/browser/cjs/{BuWtGFX0HiBezGjw.cjs → no5c2H18QD2qmOH6.cjs} +2 -2
  27. package/browser/esm/{BALnKy2Fp7fyk-lc.mjs → B4Mm5gczpI_k2zzN.mjs} +2 -2
  28. package/browser/esm/{BXUGsC1Mo3FP8vnW.mjs → B8ISUdOxsJMYWzNN.mjs} +2 -2
  29. package/browser/esm/{BGpv6Kq7eBlJy43T.mjs → BnJiF38TGudjoHzT.mjs} +1 -1
  30. package/browser/esm/Bts4nCgfCAUpTfxz.mjs +7 -0
  31. package/browser/esm/{DtmE60AvstK9u0Ta.mjs → C3cyAbIH8Qc8MIFN.mjs} +20 -20
  32. package/browser/esm/C4jlaVv8bELgiHyE.mjs +7 -0
  33. package/browser/esm/{CFFC0SNc24a0Dxnh.mjs → CYIhGb86r-kKOrP5.mjs} +2 -2
  34. package/browser/esm/{B905wKzTtod-jbsD.mjs → CcpskguvlvemArQn.mjs} +2 -2
  35. package/browser/esm/CeRfALx1iU5fqOUg.mjs +7 -0
  36. package/browser/esm/CfYWmP_Hots5f0f6.mjs +7 -0
  37. package/browser/esm/CkarbqNx_lhlBnw7.mjs +7 -0
  38. package/browser/esm/D2PlWNQjrTgf6GuR.mjs +7 -0
  39. package/browser/esm/{Cc_VWd0wF5-39LsI.mjs → D3KNxvnrwR6_fTJE.mjs} +1 -1
  40. package/browser/esm/{Bo_ZPRrOQrqOVHAF.mjs → DIJyH94oCzUnlcNZ.mjs} +2 -2
  41. package/browser/esm/{De6RPxc4p_jXLlT5.mjs → DVAG1NxFe3cMjLE1.mjs} +1 -1
  42. package/browser/esm/DVqga7g7j0FUiM6p.mjs +7 -0
  43. package/browser/esm/{PS0cqYnlMVEGOQpI.mjs → DcX8yGEBX6qi9RCe.mjs} +2 -2
  44. package/browser/esm/{BUSR_OK5Qi6hRPfw.mjs → DeXfOSxGE_Ez7DZq.mjs} +1 -1
  45. package/browser/esm/{Cq8D_M0jeHLcnRjg.mjs → DzgM_rkwyIHsCb6I.mjs} +1 -1
  46. package/browser/esm/{BDVJ7eOPpW5FnEAP.mjs → M4hZ25330e96seUM.mjs} +1 -1
  47. package/browser/esm/Qp2Toeh_EbJH_f_6.mjs +7 -0
  48. package/browser/esm/SAyRTPVprOHZ8Up8.mjs +7 -0
  49. package/browser/esm/_ft7JYO6QdDbIu3d.mjs +7 -0
  50. package/browser/esm/{BlGoi1_x9rUMpWMd.mjs → dpdy0BU4GGI5lZrX.mjs} +1 -1
  51. package/browser/esm/index.mjs +2 -2
  52. package/browser/esm/{tFhROdVSw9KLQfUN.mjs → oLCocGFRAwsVsOSE.mjs} +2 -2
  53. package/cdn/assets/7_O6nILzn1fSVvkO.js +13449 -0
  54. package/cdn/assets/B3kbBB6oxKBErwzn.js +27 -0
  55. package/cdn/assets/BB66NDz7S3ocEfRB.js +150 -0
  56. package/cdn/assets/BCK7yhx9JfzU2rF0.js +22 -0
  57. package/cdn/assets/BSAH88RG1oubICau.js +84 -0
  58. package/cdn/assets/BT5EcMEFBsphczwC.js +1469 -0
  59. package/cdn/assets/BcWoqhD_sX85c7Mh.js +1701 -0
  60. package/cdn/assets/BoOefjrM4kZ-YXxa.js +90 -0
  61. package/cdn/assets/BtweFYnoj_aEfydW.js +1371 -0
  62. package/cdn/assets/Bv0Xb6DdcQbPYJKo.js +24 -0
  63. package/cdn/assets/CC-S4NMYhLg3WgqO.js +3875 -0
  64. package/cdn/assets/CJhyHcQcrhbtC33r.js +50 -0
  65. package/cdn/assets/CUc6gRjjRGTFWSHD.js +50 -0
  66. package/cdn/assets/CfObTzh8pGdd8D23.js +2183 -0
  67. package/cdn/assets/CiY3HumGDc_5bMtR.js +58 -0
  68. package/cdn/assets/CpPLN0-hDsTIFHZV.js +46 -0
  69. package/cdn/assets/Cq94woVmlxhjWVRI.js +21 -0
  70. package/cdn/assets/CsjftXmSYQRHNKdq.js +41 -0
  71. package/cdn/assets/DBL4jY0AVc53RGNm.js +637 -0
  72. package/cdn/assets/DDW1WJ2IM_9ZUfKm.js +36 -0
  73. package/cdn/assets/DJQOS9qxVAlpgDMt.js +1704 -0
  74. package/cdn/assets/DWJE3K3jMKMTCi3o.js +393 -0
  75. package/cdn/assets/D_5RgqgwXsoqLJDR.js +241 -0
  76. package/cdn/assets/DfmaL8DmDaFAv8M_.js +6481 -0
  77. package/cdn/assets/DgLPO_EQ9DYoGgec.js +423 -0
  78. package/cdn/assets/DkS6quwH1okWaho6.js +46 -0
  79. package/cdn/assets/DxMu6URURFWj9aXM.js +2373 -0
  80. package/cdn/assets/Jhm2DAcrfAqiM-Y-.js +26490 -0
  81. package/cdn/assets/MRBi3juXAW0lA_mj.js +1358 -0
  82. package/cdn/assets/dk2teWHDODYNarJY.js +27 -0
  83. package/cdn/assets/phYz0vGgqIEQ2hco.js +12 -0
  84. package/cdn/assets/qA23x9VVBL9R4qxN.js +43 -0
  85. package/cdn/index.js +41 -37
  86. package/cdn/loader.js +1 -1
  87. package/package.json +3 -3
  88. package/browser/esm/B5kkStdEkTczERyM.mjs +0 -7
  89. package/browser/esm/BuURCm92KsyGHG9e.mjs +0 -7
  90. package/browser/esm/CGZ5MX7afzMxDkCe.mjs +0 -7
  91. package/browser/esm/CzmNwV9tfFYUp_gS.mjs +0 -7
  92. package/browser/esm/DlVZFM9ZR5jGyG0_.mjs +0 -7
  93. package/browser/esm/DqXxZP6yKF4U1YfY.mjs +0 -7
  94. package/browser/esm/Dz2OVgq3kxi1TkfX.mjs +0 -7
  95. package/browser/esm/QBGUD1XS5_pysBLL.mjs +0 -7
  96. package/browser/esm/uGDCdtqxjqRCo4Xn.mjs +0 -7
@@ -0,0 +1,1469 @@
1
+ import { NumberFormat as Ht, ScalarType as Ft, ResourceCollection as Ss, Tuple as Cs, IAutoFilter as Gt, AddressUtils as at, CoordUtils as Pe, FormulaError as ks, IRange as As, CommonUtils as ss, Theme as Es, JSONStableStringify as Ds, Workbook as Ps, IColor as Os, OutOfBoundsError as Is } from "@sheetxl/sdk";
2
+ import { _ as hs } from "./Jhm2DAcrfAqiM-Y-.js";
3
+ /**
4
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.12
5
+ *
6
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
7
+ * License: The license can be found at https://www.sheetxl.com/license.
8
+ */
9
+ const is = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿", Vs = new RegExp(`^[${is}][-${is}.0-9·̀-ͯ‿-⁀]*$`, "u");
10
+ function us(i) {
11
+ return i >= 65 && i <= 90 || i >= 97 && i <= 122 || i === 58 || i === 95 || i === 8204 || i === 8205 || i >= 192 && i <= 214 || i >= 216 && i <= 246 || i >= 248 && i <= 767 || i >= 880 && i <= 893 || i >= 895 && i <= 8191 || i >= 8304 && i <= 8591 || i >= 11264 && i <= 12271 || i >= 12289 && i <= 55295 || i >= 63744 && i <= 64975 || i >= 65008 && i <= 65533 || i >= 65536 && i <= 983039;
12
+ }
13
+ const os = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿", Ls = new RegExp(`^[${os}][-${os}.0-9·̀-ͯ‿-⁀]*$`, "u");
14
+ function ds(i) {
15
+ return i >= 65 && i <= 90 || i === 95 || i >= 97 && i <= 122 || i >= 192 && i <= 214 || i >= 216 && i <= 246 || i >= 248 && i <= 767 || i >= 880 && i <= 893 || i >= 895 && i <= 8191 || i >= 8204 && i <= 8205 || i >= 8304 && i <= 8591 || i >= 11264 && i <= 12271 || i >= 12289 && i <= 55295 || i >= 63744 && i <= 64975 || i >= 65008 && i <= 65533 || i >= 65536 && i <= 983039;
16
+ }
17
+ const q = function(i) {
18
+ return i === 32 || i === 10 || i === 13 || i === 9;
19
+ }, Ns = function(i) {
20
+ return i >= 32 && i <= 55295 || i === 10 || i === 13 || i === 9 || i >= 57344 && i <= 65533 || i >= 65536 && i <= 1114111;
21
+ }, ce = us, rs = function(i) {
22
+ return us(i) || i >= 48 && i <= 57 || i === 45 || i === 46 || i === 183 || i >= 768 && i <= 879 || i >= 8255 && i <= 8256;
23
+ }, ps = [32, 10, 13, 9], Rs = Vs, $s = function(i) {
24
+ return i >= 1 && i <= 55295 || i >= 57344 && i <= 65533 || i >= 65536 && i <= 1114111;
25
+ }, Ms = ds, js = function(i) {
26
+ return ds(i) || i === 45 || i === 46 || i >= 48 && i <= 57 || i === 183 || i >= 768 && i <= 879 || i >= 8255 && i <= 8256;
27
+ }, Hs = Ls, ye = "http://www.w3.org/XML/1998/namespace", Kt = "http://www.w3.org/2000/xmlns/", Fs = { __proto__: null, xml: ye, xmlns: Kt }, Xs = { __proto__: null, amp: "&", gt: ">", lt: "<", quot: '"', apos: "'" }, O = -1, lt = -2, B = 13, Xt = 33, it = 10, vt = 60, Jt = 61, M = 62, F = 63, Qt = 93, Te = (i) => i === 34 || i === 39, gs = [34, 39], Bs = [...gs, 91, M], Ws = [...gs, vt, Qt], _s = [Jt, F, ...ps], qs = [...ps, M, 38, vt];
28
+ function Oe(i, t, s) {
29
+ switch (t) {
30
+ case "xml":
31
+ s !== ye && i.fail(`xml prefix must be bound to ${ye}.`);
32
+ break;
33
+ case "xmlns":
34
+ s !== Kt && i.fail(`xmlns prefix must be bound to ${Kt}.`);
35
+ }
36
+ switch (s) {
37
+ case Kt:
38
+ i.fail(t === "" ? `the default namespace may not be set to ${s}.` : `may not assign a prefix (even "xmlns") to the URI ${Kt}.`);
39
+ break;
40
+ case ye:
41
+ switch (t) {
42
+ case "xml":
43
+ break;
44
+ case "":
45
+ i.fail(`the default namespace may not be set to ${s}.`);
46
+ break;
47
+ default:
48
+ i.fail("may not assign the xml namespace to another prefix.");
49
+ }
50
+ }
51
+ }
52
+ const zs = (i) => Hs.test(i), Us = (i) => Rs.test(i), ns = { xmldecl: "xmldeclHandler", text: "textHandler", processinginstruction: "piHandler", doctype: "doctypeHandler", comment: "commentHandler", opentagstart: "openTagStartHandler", attribute: "attributeHandler", opentag: "openTagHandler", closetag: "closeTagHandler", cdata: "cdataHandler", error: "errorHandler", end: "endHandler", ready: "readyHandler" };
53
+ class Gs {
54
+ constructor(t) {
55
+ this.i = 0, this.prevI = 0, this.opt = t ?? {}, this.fragmentOpt = !!this.opt.fragment;
56
+ const s = this.xmlnsOpt = !!this.opt.xmlns;
57
+ if (this.trackPosition = this.opt.position !== !1, this.fileName = this.opt.fileName, s) {
58
+ this.nameStartCheck = Ms, this.nameCheck = js, this.isName = zs, this.processAttribs = this.processAttribsNS, this.pushAttrib = this.pushAttribNS, this.ns = { __proto__: null, ...Fs };
59
+ const o = this.opt.additionalNamespaces;
60
+ o != null && (function(n, a) {
61
+ for (const c of Object.keys(a)) Oe(n, c, a[c]);
62
+ }(this, o), Object.assign(this.ns, o));
63
+ } else this.nameStartCheck = ce, this.nameCheck = rs, this.isName = Us, this.processAttribs = this.processAttribsPlain, this.pushAttrib = this.pushAttribPlain;
64
+ this.stateTable = [this.sBegin, this.sBeginWhitespace, this.sDoctype, this.sDoctypeQuote, this.sDTD, this.sDTDQuoted, this.sDTDOpenWaka, this.sDTDOpenWakaBang, this.sDTDComment, this.sDTDCommentEnding, this.sDTDCommentEnded, this.sDTDPI, this.sDTDPIEnding, this.sText, this.sEntity, this.sOpenWaka, this.sOpenWakaBang, this.sComment, this.sCommentEnding, this.sCommentEnded, this.sCData, this.sCDataEnding, this.sCDataEnding2, this.sPIFirstChar, this.sPIRest, this.sPIBody, this.sPIEnding, this.sXMLDeclNameStart, this.sXMLDeclName, this.sXMLDeclEq, this.sXMLDeclValueStart, this.sXMLDeclValue, this.sXMLDeclSeparator, this.sXMLDeclEnding, this.sOpenTag, this.sOpenTagSlash, this.sAttrib, this.sAttribName, this.sAttribNameSawWhite, this.sAttribValue, this.sAttribValueQuoted, this.sAttribValueClosed, this.sAttribValueUnquoted, this.sCloseTag, this.sCloseTagSawWhite], this._init();
65
+ }
66
+ get closed() {
67
+ return this._closed;
68
+ }
69
+ _init() {
70
+ this.openWakaBang = "", this.text = "", this.name = "", this.piTarget = "", this.entity = "", this.q = null, this.tags = [], this.tag = null, this.topNS = null, this.chunk = "", this.chunkPosition = 0, this.i = 0, this.prevI = 0, this.carriedFromPrevious = void 0, this.forbiddenState = 0, this.attribList = [];
71
+ const { fragmentOpt: t } = this;
72
+ this.state = t ? B : 0, this.reportedTextBeforeRoot = this.reportedTextAfterRoot = this.closedRoot = this.sawRoot = t, this.xmlDeclPossible = !t, this.xmlDeclExpects = ["version"], this.entityReturnState = void 0;
73
+ let { defaultXMLVersion: s } = this.opt;
74
+ if (s === void 0) {
75
+ if (this.opt.forceXMLVersion === !0) throw new Error("forceXMLVersion set but defaultXMLVersion is not set");
76
+ s = "1.0";
77
+ }
78
+ this.setXMLVersion(s), this.positionAtNewLine = 0, this.doctype = !1, this._closed = !1, this.xmlDecl = { version: void 0, encoding: void 0, standalone: void 0 }, this.line = 1, this.column = 0, this.ENTITIES = Object.create(Xs), this.readyHandler?.();
79
+ }
80
+ get position() {
81
+ return this.chunkPosition + this.i;
82
+ }
83
+ get columnIndex() {
84
+ return this.position - this.positionAtNewLine;
85
+ }
86
+ on(t, s) {
87
+ this[ns[t]] = s;
88
+ }
89
+ off(t) {
90
+ this[ns[t]] = void 0;
91
+ }
92
+ makeError(t) {
93
+ let s = this.fileName ?? "";
94
+ return this.trackPosition && (s.length > 0 && (s += ":"), s += `${this.line}:${this.column}`), s.length > 0 && (s += ": "), new Error(s + t);
95
+ }
96
+ fail(t) {
97
+ const s = this.makeError(t), o = this.errorHandler;
98
+ if (o === void 0) throw s;
99
+ return o(s), this;
100
+ }
101
+ write(t) {
102
+ if (this.closed) return this.fail("cannot write after close; assign an onready handler.");
103
+ let s = !1;
104
+ t === null ? (s = !0, t = "") : typeof t == "object" && (t = t.toString()), this.carriedFromPrevious !== void 0 && (t = `${this.carriedFromPrevious}${t}`, this.carriedFromPrevious = void 0);
105
+ let o = t.length;
106
+ const n = t.charCodeAt(o - 1);
107
+ !s && (n === 13 || n >= 55296 && n <= 56319) && (this.carriedFromPrevious = t[o - 1], o--, t = t.slice(0, o));
108
+ const { stateTable: a } = this;
109
+ for (this.chunk = t, this.i = 0; this.i < o; ) a[this.state].call(this);
110
+ return this.chunkPosition += o, s ? this.end() : this;
111
+ }
112
+ close() {
113
+ return this.write(null);
114
+ }
115
+ getCode10() {
116
+ const t = this.chunk, s = this.i;
117
+ if (this.prevI = s, this.i++, s >= t.length) return O;
118
+ const o = t.charCodeAt(s);
119
+ if (this.column++, o < 55296) {
120
+ if (o >= 32 || o === 9) return o;
121
+ switch (o) {
122
+ case it:
123
+ return this.line++, this.column = 0, this.positionAtNewLine = this.position, it;
124
+ case 13:
125
+ return t.charCodeAt(s + 1) === it && (this.i = s + 2), this.line++, this.column = 0, this.positionAtNewLine = this.position, lt;
126
+ default:
127
+ return this.fail("disallowed character."), o;
128
+ }
129
+ }
130
+ if (o > 56319) return o >= 57344 && o <= 65533 || this.fail("disallowed character."), o;
131
+ const n = 65536 + 1024 * (o - 55296) + (t.charCodeAt(s + 1) - 56320);
132
+ return this.i = s + 2, n > 1114111 && this.fail("disallowed character."), n;
133
+ }
134
+ getCode11() {
135
+ const { chunk: t, i: s } = this;
136
+ if (this.prevI = s, this.i = s + 1, s >= t.length) return O;
137
+ const o = t.charCodeAt(s);
138
+ if (this.column++, o < 55296) {
139
+ if (o > 31 && o < 127 || o > 159 && o !== 8232 || o === 9) return o;
140
+ switch (o) {
141
+ case it:
142
+ return this.line++, this.column = 0, this.positionAtNewLine = this.position, it;
143
+ case 13: {
144
+ const a = t.charCodeAt(s + 1);
145
+ a !== it && a !== 133 || (this.i = s + 2);
146
+ }
147
+ case 133:
148
+ case 8232:
149
+ return this.line++, this.column = 0, this.positionAtNewLine = this.position, lt;
150
+ default:
151
+ return this.fail("disallowed character."), o;
152
+ }
153
+ }
154
+ if (o > 56319) return o >= 57344 && o <= 65533 || this.fail("disallowed character."), o;
155
+ const n = 65536 + 1024 * (o - 55296) + (t.charCodeAt(s + 1) - 56320);
156
+ return this.i = s + 2, n > 1114111 && this.fail("disallowed character."), n;
157
+ }
158
+ getCodeNorm() {
159
+ const t = this.getCode();
160
+ return t === lt ? it : t;
161
+ }
162
+ unget() {
163
+ this.i = this.prevI, this.column--;
164
+ }
165
+ captureTo(t) {
166
+ let { i: s } = this;
167
+ const { chunk: o } = this;
168
+ for (; ; ) {
169
+ const n = this.getCode(), a = n === lt, c = a ? it : n;
170
+ if (c === O || t.includes(c)) return this.text += o.slice(s, this.prevI), c;
171
+ a && (this.text += `${o.slice(s, this.prevI)}
172
+ `, s = this.i);
173
+ }
174
+ }
175
+ captureToChar(t) {
176
+ let { i: s } = this;
177
+ const { chunk: o } = this;
178
+ for (; ; ) {
179
+ let n = this.getCode();
180
+ switch (n) {
181
+ case lt:
182
+ this.text += `${o.slice(s, this.prevI)}
183
+ `, s = this.i, n = it;
184
+ break;
185
+ case O:
186
+ return this.text += o.slice(s), !1;
187
+ }
188
+ if (n === t) return this.text += o.slice(s, this.prevI), !0;
189
+ }
190
+ }
191
+ captureNameChars() {
192
+ const { chunk: t, i: s } = this;
193
+ for (; ; ) {
194
+ const o = this.getCode();
195
+ if (o === O) return this.name += t.slice(s), O;
196
+ if (!rs(o)) return this.name += t.slice(s, this.prevI), o === lt ? it : o;
197
+ }
198
+ }
199
+ skipSpaces() {
200
+ for (; ; ) {
201
+ const t = this.getCodeNorm();
202
+ if (t === O || !q(t)) return t;
203
+ }
204
+ }
205
+ setXMLVersion(t) {
206
+ this.currentXMLVersion = t, t === "1.0" ? (this.isChar = Ns, this.getCode = this.getCode10) : (this.isChar = $s, this.getCode = this.getCode11);
207
+ }
208
+ sBegin() {
209
+ this.chunk.charCodeAt(0) === 65279 && (this.i++, this.column++), this.state = 1;
210
+ }
211
+ sBeginWhitespace() {
212
+ const t = this.i, s = this.skipSpaces();
213
+ switch (this.prevI !== t && (this.xmlDeclPossible = !1), s) {
214
+ case vt:
215
+ if (this.state = 15, this.text.length !== 0) throw new Error("no-empty text at start");
216
+ break;
217
+ case O:
218
+ break;
219
+ default:
220
+ this.unget(), this.state = B, this.xmlDeclPossible = !1;
221
+ }
222
+ }
223
+ sDoctype() {
224
+ const t = this.captureTo(Bs);
225
+ switch (t) {
226
+ case M:
227
+ this.doctypeHandler?.(this.text), this.text = "", this.state = B, this.doctype = !0;
228
+ break;
229
+ case O:
230
+ break;
231
+ default:
232
+ this.text += String.fromCodePoint(t), t === 91 ? this.state = 4 : Te(t) && (this.state = 3, this.q = t);
233
+ }
234
+ }
235
+ sDoctypeQuote() {
236
+ const t = this.q;
237
+ this.captureToChar(t) && (this.text += String.fromCodePoint(t), this.q = null, this.state = 2);
238
+ }
239
+ sDTD() {
240
+ const t = this.captureTo(Ws);
241
+ t !== O && (this.text += String.fromCodePoint(t), t === Qt ? this.state = 2 : t === vt ? this.state = 6 : Te(t) && (this.state = 5, this.q = t));
242
+ }
243
+ sDTDQuoted() {
244
+ const t = this.q;
245
+ this.captureToChar(t) && (this.text += String.fromCodePoint(t), this.state = 4, this.q = null);
246
+ }
247
+ sDTDOpenWaka() {
248
+ const t = this.getCodeNorm();
249
+ switch (this.text += String.fromCodePoint(t), t) {
250
+ case 33:
251
+ this.state = 7, this.openWakaBang = "";
252
+ break;
253
+ case F:
254
+ this.state = 11;
255
+ break;
256
+ default:
257
+ this.state = 4;
258
+ }
259
+ }
260
+ sDTDOpenWakaBang() {
261
+ const t = String.fromCodePoint(this.getCodeNorm()), s = this.openWakaBang += t;
262
+ this.text += t, s !== "-" && (this.state = s === "--" ? 8 : 4, this.openWakaBang = "");
263
+ }
264
+ sDTDComment() {
265
+ this.captureToChar(45) && (this.text += "-", this.state = 9);
266
+ }
267
+ sDTDCommentEnding() {
268
+ const t = this.getCodeNorm();
269
+ this.text += String.fromCodePoint(t), this.state = t === 45 ? 10 : 8;
270
+ }
271
+ sDTDCommentEnded() {
272
+ const t = this.getCodeNorm();
273
+ this.text += String.fromCodePoint(t), t === M ? this.state = 4 : (this.fail("malformed comment."), this.state = 8);
274
+ }
275
+ sDTDPI() {
276
+ this.captureToChar(F) && (this.text += "?", this.state = 12);
277
+ }
278
+ sDTDPIEnding() {
279
+ const t = this.getCodeNorm();
280
+ this.text += String.fromCodePoint(t), t === M && (this.state = 4);
281
+ }
282
+ sText() {
283
+ this.tags.length !== 0 ? this.handleTextInRoot() : this.handleTextOutsideRoot();
284
+ }
285
+ sEntity() {
286
+ let { i: t } = this;
287
+ const { chunk: s } = this;
288
+ t: for (; ; ) switch (this.getCode()) {
289
+ case lt:
290
+ this.entity += `${s.slice(t, this.prevI)}
291
+ `, t = this.i;
292
+ break;
293
+ case 59: {
294
+ const { entityReturnState: o } = this, n = this.entity + s.slice(t, this.prevI);
295
+ let a;
296
+ this.state = o, n === "" ? (this.fail("empty entity name."), a = "&;") : (a = this.parseEntity(n), this.entity = ""), o === B && this.textHandler === void 0 || (this.text += a);
297
+ break t;
298
+ }
299
+ case O:
300
+ this.entity += s.slice(t);
301
+ break t;
302
+ }
303
+ }
304
+ sOpenWaka() {
305
+ const t = this.getCode();
306
+ if (ce(t)) this.state = 34, this.unget(), this.xmlDeclPossible = !1;
307
+ else switch (t) {
308
+ case 47:
309
+ this.state = 43, this.xmlDeclPossible = !1;
310
+ break;
311
+ case 33:
312
+ this.state = 16, this.openWakaBang = "", this.xmlDeclPossible = !1;
313
+ break;
314
+ case F:
315
+ this.state = 23;
316
+ break;
317
+ default:
318
+ this.fail("disallowed character in tag name"), this.state = B, this.xmlDeclPossible = !1;
319
+ }
320
+ }
321
+ sOpenWakaBang() {
322
+ switch (this.openWakaBang += String.fromCodePoint(this.getCodeNorm()), this.openWakaBang) {
323
+ case "[CDATA[":
324
+ this.sawRoot || this.reportedTextBeforeRoot || (this.fail("text data outside of root node."), this.reportedTextBeforeRoot = !0), this.closedRoot && !this.reportedTextAfterRoot && (this.fail("text data outside of root node."), this.reportedTextAfterRoot = !0), this.state = 20, this.openWakaBang = "";
325
+ break;
326
+ case "--":
327
+ this.state = 17, this.openWakaBang = "";
328
+ break;
329
+ case "DOCTYPE":
330
+ this.state = 2, (this.doctype || this.sawRoot) && this.fail("inappropriately located doctype declaration."), this.openWakaBang = "";
331
+ break;
332
+ default:
333
+ this.openWakaBang.length >= 7 && this.fail("incorrect syntax.");
334
+ }
335
+ }
336
+ sComment() {
337
+ this.captureToChar(45) && (this.state = 18);
338
+ }
339
+ sCommentEnding() {
340
+ const t = this.getCodeNorm();
341
+ t === 45 ? (this.state = 19, this.commentHandler?.(this.text), this.text = "") : (this.text += `-${String.fromCodePoint(t)}`, this.state = 17);
342
+ }
343
+ sCommentEnded() {
344
+ const t = this.getCodeNorm();
345
+ t !== M ? (this.fail("malformed comment."), this.text += `--${String.fromCodePoint(t)}`, this.state = 17) : this.state = B;
346
+ }
347
+ sCData() {
348
+ this.captureToChar(Qt) && (this.state = 21);
349
+ }
350
+ sCDataEnding() {
351
+ const t = this.getCodeNorm();
352
+ t === Qt ? this.state = 22 : (this.text += `]${String.fromCodePoint(t)}`, this.state = 20);
353
+ }
354
+ sCDataEnding2() {
355
+ const t = this.getCodeNorm();
356
+ switch (t) {
357
+ case M:
358
+ this.cdataHandler?.(this.text), this.text = "", this.state = B;
359
+ break;
360
+ case Qt:
361
+ this.text += "]";
362
+ break;
363
+ default:
364
+ this.text += `]]${String.fromCodePoint(t)}`, this.state = 20;
365
+ }
366
+ }
367
+ sPIFirstChar() {
368
+ const t = this.getCodeNorm();
369
+ this.nameStartCheck(t) ? (this.piTarget += String.fromCodePoint(t), this.state = 24) : t === F || q(t) ? (this.fail("processing instruction without a target."), this.state = t === F ? 26 : 25) : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(t), this.state = 24);
370
+ }
371
+ sPIRest() {
372
+ const { chunk: t, i: s } = this;
373
+ for (; ; ) {
374
+ const o = this.getCodeNorm();
375
+ if (o === O) return void (this.piTarget += t.slice(s));
376
+ if (!this.nameCheck(o)) {
377
+ this.piTarget += t.slice(s, this.prevI);
378
+ const n = o === F;
379
+ n || q(o) ? this.piTarget === "xml" ? (this.xmlDeclPossible || this.fail("an XML declaration must be at the start of the document."), this.state = n ? Xt : 27) : this.state = n ? 26 : 25 : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(o));
380
+ break;
381
+ }
382
+ }
383
+ }
384
+ sPIBody() {
385
+ if (this.text.length === 0) {
386
+ const t = this.getCodeNorm();
387
+ t === F ? this.state = 26 : q(t) || (this.text = String.fromCodePoint(t));
388
+ } else this.captureToChar(F) && (this.state = 26);
389
+ }
390
+ sPIEnding() {
391
+ const t = this.getCodeNorm();
392
+ if (t === M) {
393
+ const { piTarget: s } = this;
394
+ s.toLowerCase() === "xml" && this.fail("the XML declaration must appear at the start of the document."), this.piHandler?.({ target: s, body: this.text }), this.piTarget = this.text = "", this.state = B;
395
+ } else t === F ? this.text += "?" : (this.text += `?${String.fromCodePoint(t)}`, this.state = 25);
396
+ this.xmlDeclPossible = !1;
397
+ }
398
+ sXMLDeclNameStart() {
399
+ const t = this.skipSpaces();
400
+ t !== F ? t !== O && (this.state = 28, this.name = String.fromCodePoint(t)) : this.state = Xt;
401
+ }
402
+ sXMLDeclName() {
403
+ const t = this.captureTo(_s);
404
+ if (t === F) return this.state = Xt, this.name += this.text, this.text = "", void this.fail("XML declaration is incomplete.");
405
+ if (q(t) || t === Jt) {
406
+ if (this.name += this.text, this.text = "", !this.xmlDeclExpects.includes(this.name)) switch (this.name.length) {
407
+ case 0:
408
+ this.fail("did not expect any more name/value pairs.");
409
+ break;
410
+ case 1:
411
+ this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);
412
+ break;
413
+ default:
414
+ this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`);
415
+ }
416
+ this.state = t === Jt ? 30 : 29;
417
+ }
418
+ }
419
+ sXMLDeclEq() {
420
+ const t = this.getCodeNorm();
421
+ if (t === F) return this.state = Xt, void this.fail("XML declaration is incomplete.");
422
+ q(t) || (t !== Jt && this.fail("value required."), this.state = 30);
423
+ }
424
+ sXMLDeclValueStart() {
425
+ const t = this.getCodeNorm();
426
+ if (t === F) return this.state = Xt, void this.fail("XML declaration is incomplete.");
427
+ q(t) || (Te(t) ? this.q = t : (this.fail("value must be quoted."), this.q = 32), this.state = 31);
428
+ }
429
+ sXMLDeclValue() {
430
+ const t = this.captureTo([this.q, F]);
431
+ if (t === F) return this.state = Xt, this.text = "", void this.fail("XML declaration is incomplete.");
432
+ if (t === O) return;
433
+ const s = this.text;
434
+ switch (this.text = "", this.name) {
435
+ case "version": {
436
+ this.xmlDeclExpects = ["encoding", "standalone"];
437
+ const o = s;
438
+ this.xmlDecl.version = o, /^1\.[0-9]+$/.test(o) ? this.opt.forceXMLVersion || this.setXMLVersion(o) : this.fail("version number must match /^1\\.[0-9]+$/.");
439
+ break;
440
+ }
441
+ case "encoding":
442
+ /^[A-Za-z][A-Za-z0-9._-]*$/.test(s) || this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."), this.xmlDeclExpects = ["standalone"], this.xmlDecl.encoding = s;
443
+ break;
444
+ case "standalone":
445
+ s !== "yes" && s !== "no" && this.fail('standalone value must match "yes" or "no".'), this.xmlDeclExpects = [], this.xmlDecl.standalone = s;
446
+ }
447
+ this.name = "", this.state = 32;
448
+ }
449
+ sXMLDeclSeparator() {
450
+ const t = this.getCodeNorm();
451
+ t !== F ? (q(t) || (this.fail("whitespace required."), this.unget()), this.state = 27) : this.state = Xt;
452
+ }
453
+ sXMLDeclEnding() {
454
+ this.getCodeNorm() === M ? (this.piTarget !== "xml" ? this.fail("processing instructions are not allowed before root.") : this.name !== "version" && this.xmlDeclExpects.includes("version") && this.fail("XML declaration must contain a version."), this.xmldeclHandler?.(this.xmlDecl), this.name = "", this.piTarget = this.text = "", this.state = B) : this.fail("The character ? is disallowed anywhere in XML declarations."), this.xmlDeclPossible = !1;
455
+ }
456
+ sOpenTag() {
457
+ const t = this.captureNameChars();
458
+ if (t === O) return;
459
+ const s = this.tag = { name: this.name, attributes: /* @__PURE__ */ Object.create(null) };
460
+ switch (this.name = "", this.xmlnsOpt && (this.topNS = s.ns = /* @__PURE__ */ Object.create(null)), this.openTagStartHandler?.(s), this.sawRoot = !0, !this.fragmentOpt && this.closedRoot && this.fail("documents may contain only one root."), t) {
461
+ case M:
462
+ this.openTag();
463
+ break;
464
+ case 47:
465
+ this.state = 35;
466
+ break;
467
+ default:
468
+ q(t) || this.fail("disallowed character in tag name."), this.state = 36;
469
+ }
470
+ }
471
+ sOpenTagSlash() {
472
+ this.getCode() === M ? this.openSelfClosingTag() : (this.fail("forward-slash in opening tag not followed by >."), this.state = 36);
473
+ }
474
+ sAttrib() {
475
+ const t = this.skipSpaces();
476
+ t !== O && (ce(t) ? (this.unget(), this.state = 37) : t === M ? this.openTag() : t === 47 ? this.state = 35 : this.fail("disallowed character in attribute name."));
477
+ }
478
+ sAttribName() {
479
+ const t = this.captureNameChars();
480
+ t === Jt ? this.state = 39 : q(t) ? this.state = 38 : t === M ? (this.fail("attribute without value."), this.pushAttrib(this.name, this.name), this.name = this.text = "", this.openTag()) : t !== O && this.fail("disallowed character in attribute name.");
481
+ }
482
+ sAttribNameSawWhite() {
483
+ const t = this.skipSpaces();
484
+ switch (t) {
485
+ case O:
486
+ return;
487
+ case Jt:
488
+ this.state = 39;
489
+ break;
490
+ default:
491
+ this.fail("attribute without value."), this.text = "", this.name = "", t === M ? this.openTag() : ce(t) ? (this.unget(), this.state = 37) : (this.fail("disallowed character in attribute name."), this.state = 36);
492
+ }
493
+ }
494
+ sAttribValue() {
495
+ const t = this.getCodeNorm();
496
+ Te(t) ? (this.q = t, this.state = 40) : q(t) || (this.fail("unquoted attribute value."), this.state = 42, this.unget());
497
+ }
498
+ sAttribValueQuoted() {
499
+ const { q: t, chunk: s } = this;
500
+ let { i: o } = this;
501
+ for (; ; ) switch (this.getCode()) {
502
+ case t:
503
+ return this.pushAttrib(this.name, this.text + s.slice(o, this.prevI)), this.name = this.text = "", this.q = null, void (this.state = 41);
504
+ case 38:
505
+ return this.text += s.slice(o, this.prevI), this.state = 14, void (this.entityReturnState = 40);
506
+ case it:
507
+ case lt:
508
+ case 9:
509
+ this.text += `${s.slice(o, this.prevI)} `, o = this.i;
510
+ break;
511
+ case vt:
512
+ return this.text += s.slice(o, this.prevI), void this.fail("disallowed character.");
513
+ case O:
514
+ return void (this.text += s.slice(o));
515
+ }
516
+ }
517
+ sAttribValueClosed() {
518
+ const t = this.getCodeNorm();
519
+ q(t) ? this.state = 36 : t === M ? this.openTag() : t === 47 ? this.state = 35 : ce(t) ? (this.fail("no whitespace between attributes."), this.unget(), this.state = 37) : this.fail("disallowed character in attribute name.");
520
+ }
521
+ sAttribValueUnquoted() {
522
+ const t = this.captureTo(qs);
523
+ switch (t) {
524
+ case 38:
525
+ this.state = 14, this.entityReturnState = 42;
526
+ break;
527
+ case vt:
528
+ this.fail("disallowed character.");
529
+ break;
530
+ case O:
531
+ break;
532
+ default:
533
+ this.text.includes("]]>") && this.fail('the string "]]>" is disallowed in char data.'), this.pushAttrib(this.name, this.text), this.name = this.text = "", t === M ? this.openTag() : this.state = 36;
534
+ }
535
+ }
536
+ sCloseTag() {
537
+ const t = this.captureNameChars();
538
+ t === M ? this.closeTag() : q(t) ? this.state = 44 : t !== O && this.fail("disallowed character in closing tag.");
539
+ }
540
+ sCloseTagSawWhite() {
541
+ switch (this.skipSpaces()) {
542
+ case M:
543
+ this.closeTag();
544
+ break;
545
+ case O:
546
+ break;
547
+ default:
548
+ this.fail("disallowed character in closing tag.");
549
+ }
550
+ }
551
+ handleTextInRoot() {
552
+ let { i: t, forbiddenState: s } = this;
553
+ const { chunk: o, textHandler: n } = this;
554
+ t: for (; ; ) switch (this.getCode()) {
555
+ case vt:
556
+ if (this.state = 15, n !== void 0) {
557
+ const { text: a } = this, c = o.slice(t, this.prevI);
558
+ a.length !== 0 ? (n(a + c), this.text = "") : c.length !== 0 && n(c);
559
+ }
560
+ s = 0;
561
+ break t;
562
+ case 38:
563
+ this.state = 14, this.entityReturnState = B, n !== void 0 && (this.text += o.slice(t, this.prevI)), s = 0;
564
+ break t;
565
+ case Qt:
566
+ switch (s) {
567
+ case 0:
568
+ s = 1;
569
+ break;
570
+ case 1:
571
+ s = 2;
572
+ break;
573
+ case 2:
574
+ break;
575
+ default:
576
+ throw new Error("impossible state");
577
+ }
578
+ break;
579
+ case M:
580
+ s === 2 && this.fail('the string "]]>" is disallowed in char data.'), s = 0;
581
+ break;
582
+ case lt:
583
+ n !== void 0 && (this.text += `${o.slice(t, this.prevI)}
584
+ `), t = this.i, s = 0;
585
+ break;
586
+ case O:
587
+ n !== void 0 && (this.text += o.slice(t));
588
+ break t;
589
+ default:
590
+ s = 0;
591
+ }
592
+ this.forbiddenState = s;
593
+ }
594
+ handleTextOutsideRoot() {
595
+ let { i: t } = this;
596
+ const { chunk: s, textHandler: o } = this;
597
+ let n = !1;
598
+ t: for (; ; ) {
599
+ const a = this.getCode();
600
+ switch (a) {
601
+ case vt:
602
+ if (this.state = 15, o !== void 0) {
603
+ const { text: c } = this, m = s.slice(t, this.prevI);
604
+ c.length !== 0 ? (o(c + m), this.text = "") : m.length !== 0 && o(m);
605
+ }
606
+ break t;
607
+ case 38:
608
+ this.state = 14, this.entityReturnState = B, o !== void 0 && (this.text += s.slice(t, this.prevI)), n = !0;
609
+ break t;
610
+ case lt:
611
+ o !== void 0 && (this.text += `${s.slice(t, this.prevI)}
612
+ `), t = this.i;
613
+ break;
614
+ case O:
615
+ o !== void 0 && (this.text += s.slice(t));
616
+ break t;
617
+ default:
618
+ q(a) || (n = !0);
619
+ }
620
+ }
621
+ n && (this.sawRoot || this.reportedTextBeforeRoot || (this.fail("text data outside of root node."), this.reportedTextBeforeRoot = !0), this.closedRoot && !this.reportedTextAfterRoot && (this.fail("text data outside of root node."), this.reportedTextAfterRoot = !0));
622
+ }
623
+ pushAttribNS(t, s) {
624
+ const { prefix: o, local: n } = this.qname(t), a = { name: t, prefix: o, local: n, value: s };
625
+ if (this.attribList.push(a), this.attributeHandler?.(a), o === "xmlns") {
626
+ const c = s.trim();
627
+ this.currentXMLVersion === "1.0" && c === "" && this.fail("invalid attempt to undefine prefix in XML 1.0"), this.topNS[n] = c, Oe(this, n, c);
628
+ } else if (t === "xmlns") {
629
+ const c = s.trim();
630
+ this.topNS[""] = c, Oe(this, "", c);
631
+ }
632
+ }
633
+ pushAttribPlain(t, s) {
634
+ const o = { name: t, value: s };
635
+ this.attribList.push(o), this.attributeHandler?.(o);
636
+ }
637
+ end() {
638
+ this.sawRoot || this.fail("document must contain a root element.");
639
+ const { tags: t } = this;
640
+ for (; t.length > 0; ) {
641
+ const o = t.pop();
642
+ this.fail(`unclosed tag: ${o.name}`);
643
+ }
644
+ this.state !== 0 && this.state !== B && this.fail("unexpected end.");
645
+ const { text: s } = this;
646
+ return s.length !== 0 && (this.textHandler?.(s), this.text = ""), this._closed = !0, this.endHandler?.(), this._init(), this;
647
+ }
648
+ resolve(t) {
649
+ let s = this.topNS[t];
650
+ if (s !== void 0) return s;
651
+ const { tags: o } = this;
652
+ for (let n = o.length - 1; n >= 0; n--) if (s = o[n].ns[t], s !== void 0) return s;
653
+ return s = this.ns[t], s !== void 0 ? s : this.opt.resolvePrefix?.(t);
654
+ }
655
+ qname(t) {
656
+ const s = t.indexOf(":");
657
+ if (s === -1) return { prefix: "", local: t };
658
+ const o = t.slice(s + 1), n = t.slice(0, s);
659
+ return (n === "" || o === "" || o.includes(":")) && this.fail(`malformed name: ${t}.`), { prefix: n, local: o };
660
+ }
661
+ processAttribsNS() {
662
+ const { attribList: t } = this, s = this.tag;
663
+ {
664
+ const { prefix: a, local: c } = this.qname(s.name);
665
+ s.prefix = a, s.local = c;
666
+ const m = s.uri = this.resolve(a) ?? "";
667
+ a !== "" && (a === "xmlns" && this.fail('tags may not have "xmlns" as prefix.'), m === "" && (this.fail(`unbound namespace prefix: ${JSON.stringify(a)}.`), s.uri = a));
668
+ }
669
+ if (t.length === 0) return;
670
+ const { attributes: o } = s, n = /* @__PURE__ */ new Set();
671
+ for (const a of t) {
672
+ const { name: c, prefix: m, local: v } = a;
673
+ let b, x;
674
+ m === "" ? (b = c === "xmlns" ? Kt : "", x = c) : (b = this.resolve(m), b === void 0 && (this.fail(`unbound namespace prefix: ${JSON.stringify(m)}.`), b = m), x = `{${b}}${v}`), n.has(x) && this.fail(`duplicate attribute: ${x}.`), n.add(x), a.uri = b, o[c] = a;
675
+ }
676
+ this.attribList = [];
677
+ }
678
+ processAttribsPlain() {
679
+ const { attribList: t } = this, s = this.tag.attributes;
680
+ for (const { name: o, value: n } of t) s[o] !== void 0 && this.fail(`duplicate attribute: ${o}.`), s[o] = n;
681
+ this.attribList = [];
682
+ }
683
+ openTag() {
684
+ this.processAttribs();
685
+ const { tags: t } = this, s = this.tag;
686
+ s.isSelfClosing = !1, this.openTagHandler?.(s), t.push(s), this.state = B, this.name = "";
687
+ }
688
+ openSelfClosingTag() {
689
+ this.processAttribs();
690
+ const { tags: t } = this, s = this.tag;
691
+ s.isSelfClosing = !0, this.openTagHandler?.(s), this.closeTagHandler?.(s), (this.tag = t[t.length - 1] ?? null) === null && (this.closedRoot = !0), this.state = B, this.name = "";
692
+ }
693
+ closeTag() {
694
+ const { tags: t, name: s } = this;
695
+ if (this.state = B, this.name = "", s === "") return this.fail("weird empty close tag."), void (this.text += "</>");
696
+ const o = this.closeTagHandler;
697
+ let n = t.length;
698
+ for (; n-- > 0; ) {
699
+ const a = this.tag = t.pop();
700
+ if (this.topNS = a.ns, o?.(a), a.name === s) break;
701
+ this.fail("unexpected close tag.");
702
+ }
703
+ n === 0 ? this.closedRoot = !0 : n < 0 && (this.fail(`unmatched closing tag: ${s}.`), this.text += `</${s}>`);
704
+ }
705
+ parseEntity(t) {
706
+ if (t[0] !== "#") {
707
+ const o = this.ENTITIES[t];
708
+ return o !== void 0 ? o : (this.fail(this.isName(t) ? "undefined entity." : "disallowed character in entity name."), `&${t};`);
709
+ }
710
+ let s = NaN;
711
+ return t[1] === "x" && /^#x[0-9a-f]+$/i.test(t) ? s = parseInt(t.slice(2), 16) : /^#[0-9]+$/.test(t) && (s = parseInt(t.slice(1), 10)), this.isChar(s) ? String.fromCodePoint(s) : (this.fail("malformed character entity."), `&${t};`);
712
+ }
713
+ }
714
+ var Ie, yt;
715
+ (yt = Ie || (Ie = {})).Events = { XmlDecl: "xmldecl", Text: "text", ProcessingInstruction: "processinginstruction", Doctype: "doctype", Comment: "comment", OpenTagStart: "opentagstart", Attribute: "attribute", OpenTag: "opentag", CloseTag: "closetag", CDdata: "cdata", Error: "error", End: "end", Ready: "ready" }, yt.parseStream = async (i, t, s) => {
716
+ const o = new Gs({ position: !1, ...s });
717
+ let n;
718
+ if (t.onOpenTagStart && o.on(yt.Events.OpenTagStart, t.onOpenTagStart), t.onOpenTag && o.on(yt.Events.OpenTag, t.onOpenTag), t.onCloseTag && o.on(yt.Events.CloseTag, t.onCloseTag), t.onAttribute && o.on(yt.Events.Attribute, t.onAttribute), t.onText && o.on(yt.Events.Text, t.onText), t.onError && o.on(yt.Events.Error, t.onError), t.onEnd) {
719
+ t.onEnd;
720
+ const a = () => {
721
+ n = t.onEnd();
722
+ };
723
+ o.on(yt.Events.End, a);
724
+ }
725
+ for (; ; ) {
726
+ const { value: a, done: c } = await i.read();
727
+ if (c) break;
728
+ o.write(a);
729
+ }
730
+ return o.close(), n;
731
+ };
732
+ const w = (i) => i === !0 || i === "1" || i === "on" || i === "true" || i !== !1 && i !== "0" && i !== "off" && i !== "false" && null, A = (i) => {
733
+ const t = parseInt(i);
734
+ return isNaN(t) ? null : t;
735
+ }, ct = (i) => {
736
+ const t = parseFloat(i);
737
+ return isNaN(t) ? null : t;
738
+ }, k = null;
739
+ class Zs {
740
+ constructor() {
741
+ this._registeredVisitors = /* @__PURE__ */ new Map();
742
+ }
743
+ registerVisitor(t) {
744
+ this._registeredVisitors.set(t.from, t);
745
+ }
746
+ createEventHandler(t, s, o) {
747
+ const n = this._registeredVisitors, a = [];
748
+ let c = null, m = null, v = null, b = null;
749
+ const x = [], E = { key: null, source: t };
750
+ let y = null, u = !1;
751
+ const D = (T, f) => {
752
+ let I = v.attributes[T];
753
+ if (f) {
754
+ if (Array.isArray(f)) {
755
+ for (let H = 0; H < f.length; H++)
756
+ if (I == null || (I = f[H](I), I == null)) return;
757
+ } else if (I == null || (I = f(I), I == null)) return;
758
+ }
759
+ return I;
760
+ }, g = { getSource: () => y.source, setSource: (T) => {
761
+ y.source = T;
762
+ }, setKey: (T) => {
763
+ y.key = T;
764
+ }, getFrom: () => v, getAttribute: (T, f) => D(T, f) ?? null, hasAttribute: (T) => g.getAttribute(T) !== null, getParent: () => x[x.length - 2].source, getPath: () => {
765
+ const T = [];
766
+ for (let f = 0; f < a.length; f++) T.push(a[f].local);
767
+ return T.join("\\");
768
+ }, parseAttribute: D, copyToObject: (T, f, I, H) => {
769
+ const W = D(H ?? f, I);
770
+ W !== void 0 && (T[f] = W);
771
+ }, copyTo: (T, f, I) => {
772
+ const H = D(I ?? T, f);
773
+ H !== void 0 && (y.source[T] = H);
774
+ }, warn: (T) => {
775
+ o ? o?.(T) : console.warn(T);
776
+ } };
777
+ return { onOpenTag: (T) => {
778
+ let f = T.name;
779
+ const I = f.indexOf(":");
780
+ I !== -1 && (f = f.slice(I + 1));
781
+ const H = n.get(f);
782
+ if (c = { local: f, visitor: H, tag: T, destination: null }, u) return a.push(c), m = f, void (v = T);
783
+ b = c?.visitor ?? null, H && (y = a.length === 0 ? E : b?.to !== null ? { key: null, source: {} } : null, c.destination = y, y && x.push(y)), a.push(c), m = f, v = T, u = b?.to === null, b?.openTag?.(g);
784
+ }, onCloseTag: (T) => {
785
+ let f = T.name;
786
+ const I = f.indexOf(":");
787
+ if (I !== -1 && (f = f.slice(I + 1)), f !== m) throw new Error(`mismatch open/close tag: '${f}'/'${m}'`);
788
+ u || b?.closeTag?.(g);
789
+ const H = a.pop() ?? null;
790
+ c = a[a.length - 1] ?? null;
791
+ const W = H?.destination;
792
+ if (W) {
793
+ x.pop(), y = x[x.length - 1] ?? E;
794
+ const ht = H.visitor;
795
+ ht && ht.to && W.source !== void 0 && (Array.isArray(ht.to) ? y.source.push ? y.source.push(W.source) : o?.(`Unable to parse array for ${ht.from} at ${g.getPath()}`) : W.key ? y.source[W.key] = W.source : typeof ht.to == "string" && (y.source[ht.to] = W.source));
796
+ }
797
+ m = c?.local ?? null, v = c?.tag ?? null, b = c?.visitor ?? null, u = !c?.destination;
798
+ }, onText: (T) => {
799
+ b?.text?.(T, g);
800
+ }, onEnd: s };
801
+ }
802
+ }
803
+ const as = (i, t, s, o = null) => {
804
+ if (!i) return null;
805
+ let n = i;
806
+ n.startsWith("/") && (n = n.substring(1));
807
+ let a = o?.parsedRefs?.get(i);
808
+ if (a !== void 0) return a;
809
+ const c = t(n);
810
+ if (!c) return null;
811
+ let m = c.content;
812
+ try {
813
+ s && (m = s(m));
814
+ } catch (v) {
815
+ console.warn(v);
816
+ }
817
+ return o?.parsedRefs?.set(i, m), m;
818
+ }, Ve = (i, t, s, o, n = null) => {
819
+ if (!i) return null;
820
+ let a = i;
821
+ a.startsWith("/") && (a = a.substring(1));
822
+ let c = n?.parsedRefs?.get(i);
823
+ if (c !== void 0) return c;
824
+ const m = t(a);
825
+ if (!m) return null;
826
+ const v = m.content;
827
+ try {
828
+ const b = new TextDecoder().decode(v), x = s.parseFromString(b, "text/xml"), E = o.convert(x, i, n);
829
+ return n?.parsedRefs?.set(i, E), E;
830
+ } catch (b) {
831
+ console.warn(b);
832
+ }
833
+ return null;
834
+ }, Zt = (i, t, s, o, n = null) => {
835
+ const a = /* @__PURE__ */ new Map();
836
+ let c = t.Directory[i];
837
+ const m = c ? c.length : 0;
838
+ for (let v = 0; v < m; v++) {
839
+ const b = c[v];
840
+ if (!b) continue;
841
+ let x = b;
842
+ x.startsWith("/") && (x = x.substring(1));
843
+ const E = Ve(x, (y) => t.files[y], s, o, n);
844
+ a.set(x, E);
845
+ }
846
+ return a;
847
+ }, Js = ["lt1", "dk1", "lt2", "dk2", "accent1", "accent2", "accent3", "accent4", "accent5", "accent6", "hlink", "folHlink"], ls = (i, t = "dk1") => {
848
+ let s;
849
+ const o = i("auto");
850
+ o === void 0 || o !== "1" && o !== "true" || (s = t);
851
+ const n = i("indexed");
852
+ n && (s = `index${n}`);
853
+ const a = i("rgb");
854
+ a && (s = a.toLowerCase(), a.length !== 8 || a.startsWith("FF") || (s = "FF" + a.substring(2, a.length)));
855
+ const c = i("theme");
856
+ c && (s = Js[c]);
857
+ let m = i("tint");
858
+ if (m && (s += ` ${Os.AdjustmentType.ETint} ${parseFloat(m)}`), s) return s;
859
+ }, Qs = (i) => i && i.replace(/^\{([\s\S]+)\}$/, "$1"), ii = (i) => i ? hs.roundAccurately(parseFloat(i) / 12700, 4) : null, oi = (i) => i ? hs.roundAccurately(parseFloat(i) / 9525, 1) : null, ri = (i) => parseFloat(i) / 1e3, ni = (i) => parseFloat(i) / 6e4, Ks = (i) => i === "true" || i === "1";
860
+ class Bt {
861
+ static {
862
+ this.Collapsed = 1;
863
+ }
864
+ static {
865
+ this.CustomFormat = 2;
866
+ }
867
+ static {
868
+ this.CustomHeight = 4;
869
+ }
870
+ static {
871
+ this.Hidden = 8;
872
+ }
873
+ static {
874
+ this.Ht = 16;
875
+ }
876
+ static {
877
+ this.OutlineLevel = 32;
878
+ }
879
+ static {
880
+ this.Ph = 64;
881
+ }
882
+ static {
883
+ this.R = 128;
884
+ }
885
+ static {
886
+ this.S = 256;
887
+ }
888
+ static {
889
+ this.Spans = 512;
890
+ }
891
+ static {
892
+ this.ThickBot = 1024;
893
+ }
894
+ static {
895
+ this.ThickTop = 2048;
896
+ }
897
+ }
898
+ const Ys = (i, t, s) => {
899
+ if (i[0].value[0] === i[1].value[0]) return t;
900
+ }, cs = { colStart: 0, colEnd: 0, rowStart: 0, rowEnd: 0 }, ai = Object.freeze(Object.defineProperty({ __proto__: null, fromBufferXLSX: async (i, t) => {
901
+ const { password: s, onWarning: o, createWorkbookOptions: n = {}, ...a } = t ?? {}, c = import("./7_O6nILzn1fSVvkO.js"), m = import("./DJQOS9qxVAlpgDMt.js");
902
+ let v = null;
903
+ try {
904
+ v = new DOMParser();
905
+ } catch {
906
+ }
907
+ let b = null;
908
+ v || (b = import("./MRBi3juXAW0lA_mj.js").then((u) => u.i));
909
+ let x = null, E = null, y = null;
910
+ try {
911
+ const u = await Promise.all([c, m, b]);
912
+ x = u[0], E = u[1], y = u[2];
913
+ } catch (u) {
914
+ throw new Error("Unable to load XLSX parser.", { cause: u });
915
+ }
916
+ try {
917
+ const u = x.read(i, { type: "array", sheets: [], cellStyles: !1, bookFiles: !0 });
918
+ if (!u.Directory) throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
919
+ u.Directory.richstructure = ["/xl/richData/rdrichvaluestructure.xml"], u.Directory.richdata = ["/xl/richData/rdrichvalue.xml"];
920
+ const D = new E.FromOOXMLConverter(), g = v ?? new y.DOMParser(), T = n?.resources ?? new Ss(), f = T.beginPersist(), I = {}, H = /* @__PURE__ */ new Set(), W = /* @__PURE__ */ new Map();
921
+ W.set("richTypes", []);
922
+ const ht = /* @__PURE__ */ new Map(), Le = [], he = (P) => u.files[P], be = (P, z) => {
923
+ const K = P.lastIndexOf("/"), ut = P.substring(0, K + 1) + "_rels/" + P.substring(K + 1, P.length) + ".rels";
924
+ let dt = z.get(ut);
925
+ return dt || (dt = ((R, Se, Ce, ke, Wt = null) => {
926
+ if (!R) return null;
927
+ const _t = Ve(R, Se, Ce, ke, Wt);
928
+ if (!_t) return null;
929
+ const Y = /* @__PURE__ */ new Map(), pt = Object.keys(_t), Ct = pt.length;
930
+ for (let xt = 0; xt < Ct; xt++) {
931
+ const kt = pt[xt], Yt = _t[kt];
932
+ Y.set(kt, Yt);
933
+ }
934
+ return Y;
935
+ })(ut, he, g, D, bt), z.set(ut, dt)), dt;
936
+ }, ue = (P, z, K, ut = ht) => {
937
+ let dt = be(z, ut).get(P), R = dt?.target;
938
+ if (!R) return null;
939
+ if (dt.targetMode === "External") return dt.target;
940
+ const Se = z.lastIndexOf("/"), Ce = z.substring(0, Se + 1);
941
+ R.startsWith("/") || (R = Ce + R), R = ((_t) => {
942
+ const Y = _t.split(/\/+/);
943
+ return Y.reduce((Ct, xt, kt) => (xt === "." ? Ct.splice(kt, 1) : xt === ".." && Ct.splice(kt - 1, 2), Ct), Y).join("/");
944
+ })(R);
945
+ const ke = D?.getVisitorParamsState().get("dxfs");
946
+ let Wt = ut.get(R);
947
+ if (!Wt)
948
+ if (dt.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet") {
949
+ const Y = {};
950
+ Wt = Y;
951
+ const pt = async () => {
952
+ const Ct = ((V, U, ee, _, G, Z, tt) => {
953
+ const h = new Zs(), J = new Cs.TransposedBuilder();
954
+ let j = null;
955
+ h.registerVisitor({ from: "autoFilter", to: "filter", openTag: (e) => {
956
+ e.copyTo("ref", k);
957
+ } }), h.registerVisitor({ from: "conditionalFormatting", to: {}, openTag: (e) => {
958
+ const r = e.getParent();
959
+ r.conditionals || (r.conditionals = []), r.conditionals.push(e.getSource());
960
+ const l = e.getAttribute("sqref");
961
+ l && (e.getSource().ref = l.split(" ").join(",")), e.copyTo("pivot", w);
962
+ }, closeTag: (e) => {
963
+ const r = e.getSource();
964
+ if (r.rule) {
965
+ const l = Object.keys(r.rule);
966
+ for (let d = 0; d < l.length; d++) {
967
+ const S = l[d];
968
+ S !== "rule" && (r[S] = r.rule[S]);
969
+ }
970
+ }
971
+ delete r.rule;
972
+ } }), h.registerVisitor({ from: "cfRule", to: "rule", openTag: (e) => {
973
+ const r = e.getParent();
974
+ e.copyToObject(r, "type", k), e.copyToObject(r, "priority", A), e.copyToObject(r, "stopIfTrue", w);
975
+ const l = e.getAttribute("dxfId", A);
976
+ if (l !== null) {
977
+ let d = _?.get(l);
978
+ d || (Z?.(`Unable to load conditional color. Invalid dxfI: '${l}' at '${e.getPath()}'.`), d = {}), r.style = d;
979
+ }
980
+ e.copyToObject(r, "aboveAverage", w), e.copyToObject(r, "equalAverage", w), e.copyToObject(r, "stdDev", A), e.copyToObject(r, "bottom", w), e.copyToObject(r, "percent", w), e.copyToObject(r, "rank", A), e.copyToObject(r, "operator", k), e.copyToObject(r, "text", k), e.copyToObject(r, "timePeriod", k);
981
+ } }), h.registerVisitor({ from: "colorScale", to: "colorScale" }), h.registerVisitor({ from: "dataBar", to: "dataBar", openTag: (e) => {
982
+ e.copyTo("maxLength", A), e.copyTo("minLength", A), e.copyTo("showValue", w);
983
+ } }), h.registerVisitor({ from: "iconSet", to: "iconSet", openTag: (e) => {
984
+ e.copyTo("iconSet", k), e.copyTo("reverse", w), e.copyTo("showValue", w);
985
+ } }), h.registerVisitor({ from: "formula", to: null, text: (e, r) => {
986
+ const l = r.getParent();
987
+ let d = l.formulas;
988
+ d || (d = [], l.formulas = d), d.push(e);
989
+ } }), h.registerVisitor({ from: "cfvo", to: {}, openTag: (e) => {
990
+ const r = e.getParent();
991
+ r.conditions || (r.conditions = []), r.conditions.push(e.getSource()), e.copyTo("type", k), e.copyTo("value", ct, "val"), e.copyTo("gte", w);
992
+ } }), h.registerVisitor({ from: "color", to: {}, openTag: (e) => {
993
+ const r = e.getParent();
994
+ r.colors || (r.colors = []);
995
+ const l = ls((d) => e.getAttribute(d));
996
+ r.colors.push(l);
997
+ } }), h.registerVisitor({ from: "filterColumn", to: "filterColumn", openTag: (e) => {
998
+ const r = e.getParent();
999
+ r.fields || (r.fields = []), r.fields.push(e.getSource()), e.copyTo("offset", A, "colId"), e.copyTo("hiddenButton", w), e.copyTo("showButton", w);
1000
+ } }), h.registerVisitor({ from: "colorFilter", to: "colorFilter", openTag: (e) => {
1001
+ const r = e.getParent();
1002
+ r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Gt.Type.Color, e.copyTo("cellColor", w), e.copyTo("styleId", A, "dxfId");
1003
+ } }), h.registerVisitor({ from: "dynamicFilter", to: "dynamicFilter", openTag: (e) => {
1004
+ const r = e.getParent();
1005
+ r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Gt.Type.Dynamic, e.copyTo("dynamicType", k, "type"), e.copyTo("val", ct), e.copyTo("maxVal", ct, "maxVal");
1006
+ } }), h.registerVisitor({ from: "iconFilter", to: "iconFilter", openTag: (e) => {
1007
+ const r = e.getParent();
1008
+ r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Gt.Type.Icon, e.copyTo("iconId", A), e.copyTo("iconSet", k);
1009
+ } }), h.registerVisitor({ from: "top10", to: "top10", openTag: (e) => {
1010
+ const r = e.getParent();
1011
+ r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Gt.Type.Top10, e.copyTo("filterVal", ct), e.copyTo("percent", w), e.copyTo("top", w), e.copyTo("val", ct);
1012
+ } }), h.registerVisitor({ from: "filters", to: "filters", openTag: (e) => {
1013
+ const r = e.getParent();
1014
+ r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Gt.Type.Items, e.copyTo("blank", w), e.copyTo("calendarType", k);
1015
+ } }), h.registerVisitor({ from: "dateGroupItem", to: "dateGroupItem", openTag: (e) => {
1016
+ const r = e.getParent();
1017
+ r.dateGroups || (r.dateGroups = []), r.dateGroups.push(e.getSource()), e.copyTo("group", k, "dateTimeGrouping"), e.copyTo("day", A), e.copyTo("hour", A), e.copyTo("minute", A), e.copyTo("month", A), e.copyTo("second", A), e.copyTo("year", A);
1018
+ } }), h.registerVisitor({ from: "filter", to: "filter", openTag: (e) => {
1019
+ const r = e.getParent();
1020
+ r.items || (r.items = []), r.items.push(e.getAttribute("val", ct));
1021
+ } }), h.registerVisitor({ from: "customFilters", to: "customFilters", openTag: (e) => {
1022
+ const r = e.getParent();
1023
+ r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Gt.Type.Custom, e.copyTo("and", w);
1024
+ } }), h.registerVisitor({ from: "customFilter", to: "customFilter", openTag: (e) => {
1025
+ const r = e.getParent();
1026
+ r.filters || (r.filters = []), r.filters.push(e.getSource()), e.copyTo("operator", k), e.copyTo("value", ct, "val");
1027
+ } }), h.registerVisitor({ from: "sortState", to: "sort", openTag: (e) => {
1028
+ e.copyTo("ref", k);
1029
+ } }), h.registerVisitor({ from: "sortCondition", to: "sortCondition", openTag: (e) => {
1030
+ const r = e.getParent();
1031
+ r.fields || (r.fields = []);
1032
+ const l = e.getSource();
1033
+ r.fields.push(l), e.copyTo("sortOn", k, "sortBy"), e.copyTo("dxfId", k, "sortBy"), e.copyTo("iconSet", k), e.copyTo("customList", k);
1034
+ const d = e.getAttribute("ref");
1035
+ if (d) {
1036
+ const S = at.fastStringToRange(d, cs).colStart, gt = at.fastStringToRange(r.ref, cs), ot = gt.colStart;
1037
+ l.offset = gt ? S - ot : S;
1038
+ }
1039
+ l.reverse = e.getAttribute("descending", w) ?? !1;
1040
+ } }), h.registerVisitor({ from: "AlternateContent", to: null });
1041
+ const fe = (e) => {
1042
+ j = e.getSource(), e.copyTo("topLeft", k, "topLeftCell");
1043
+ const r = Ks(e.getAttribute("defaultGridColor")), l = e.getAttribute("colorId");
1044
+ l === null || r || (e.getSource().gridLineColor = "index" + parseFloat(l)), e.copyTo("showZeros", w), e.copyTo("showFormulas", w), e.copyTo("zoomScale", A), e.copyTo("showRowHeaders", w, "showRowColHeaders"), e.copyTo("showColumnHeaders", w, "showRowColHeaders"), e.copyTo("showRowGridlines", w, "showGridLines"), e.copyTo("showColumnGridlines", w, "showGridLines");
1045
+ };
1046
+ h.registerVisitor({ from: "sheetView", to: "view", openTag: (e) => {
1047
+ fe(e);
1048
+ }, closeTag: () => {
1049
+ j = null;
1050
+ } }), h.registerVisitor({ from: "customSheetViews", to: "customSheetViews", openTag: (e) => {
1051
+ e.setSource([]);
1052
+ } }), h.registerVisitor({ from: "customSheetView", to: [], openTag: (e) => {
1053
+ fe(e);
1054
+ }, closeTag: () => {
1055
+ j = null;
1056
+ } }), h.registerVisitor({ from: "selection", to: "selection", openTag: (e) => {
1057
+ if (!j) return;
1058
+ e.copyTo("cell", k, "activeCell"), e.copyTo("rangeIndex", A, "activeCellId");
1059
+ const r = e.getAttribute("activeCell"), l = e.getAttribute("sqref");
1060
+ l && l !== r && (e.getSource().ranges = l.split(" "));
1061
+ } }), h.registerVisitor({ from: "pane", to: "pane", openTag: (e) => {
1062
+ if (j && e.getAttribute("state") === "frozen") {
1063
+ const r = {};
1064
+ j.freezePanes = r, e.copyToObject(r, "topLeft", k, "topLeftCell");
1065
+ const l = j.topLeft ? at.fastStringToCell(j.topLeft) : { colIndex: 0, rowIndex: 0 }, d = { colIndex: 0, rowIndex: 0 };
1066
+ e.copyToObject(d, "colIndex", A, "xSplit"), e.copyToObject(d, "rowIndex", A, "ySplit");
1067
+ const S = { colIndex: l.colIndex + d.colIndex, rowIndex: l.rowIndex + d.rowIndex };
1068
+ r.coords = at.cellToString(S);
1069
+ }
1070
+ } }), h.registerVisitor({ from: "tabColor", to: null, openTag: (e) => {
1071
+ const r = ls((l) => e.getAttribute(l));
1072
+ r && (V.tabColor = r);
1073
+ } }), h.registerVisitor({ from: "pageSetUpPr", to: "pageSetUpPr", openTag: (e) => {
1074
+ } }), h.registerVisitor({ from: "outlinePr", to: "outlinePr", openTag: (e) => {
1075
+ } }), h.registerVisitor({ from: "pageMargins", to: "pageMargins", openTag: (e) => {
1076
+ } }), h.registerVisitor({ from: "pageSetup", to: "pageSetup", openTag: (e) => {
1077
+ } }), h.registerVisitor({ from: "printOptions", to: "printOptions", openTag: (e) => {
1078
+ } }), h.registerVisitor({ from: "mergeCells", to: "merges", openTag: (e) => {
1079
+ e.setSource([]);
1080
+ } }), h.registerVisitor({ from: "mergeCell", to: [], openTag: (e) => {
1081
+ const r = e.getAttribute("ref");
1082
+ e.setSource(r);
1083
+ } }), h.registerVisitor({ from: "hyperlinks", to: "hyperlinks", openTag: (e) => {
1084
+ e.setSource([]);
1085
+ } }), h.registerVisitor({ from: "hyperlink", to: [], openTag: (e) => {
1086
+ const r = e.getAttribute("r:id"), l = e.getAttribute("ref");
1087
+ if (!l) return void console.warn("No ref found for hyperlink");
1088
+ e.setKey(l);
1089
+ let d = r ? U(r) : "";
1090
+ if (typeof d != "string") return void console.warn("Invalid address ", d);
1091
+ const S = e.getAttribute("location");
1092
+ d.endsWith("\\") && (d = d.substring(0, d.length - 1));
1093
+ const gt = e.getAttribute("location");
1094
+ if (gt && (S && S !== gt && console.warn("display and location are different", S, gt), d += "#" + gt), !d) return void console.warn("No address found for hyperlink. r:id", r);
1095
+ let ot;
1096
+ const At = e.getAttribute("tooltip");
1097
+ ot = At ? { address: d, tooltip: At } : d, e.setSource({ r: l, v: ot });
1098
+ } }), h.registerVisitor({ from: "drawing", to: "movables", openTag: (e) => {
1099
+ const r = e.getAttribute("r:id");
1100
+ if (!r) return;
1101
+ const l = U(r);
1102
+ l ? e.setSource(l.movables) : console.warn("no drawing found for rId", r);
1103
+ } }), h.registerVisitor({ from: "tableParts", to: "tables", openTag: (e) => {
1104
+ e.setSource([]);
1105
+ } }), h.registerVisitor({ from: "tablePart", to: [], openTag: (e) => {
1106
+ const r = e.getAttribute("r:id");
1107
+ if (!r) return;
1108
+ const l = U(r);
1109
+ l ? e.setSource(l) : console.warn("no table found for rId", r);
1110
+ } }), h.registerVisitor({ from: "worksheet", to: "worksheet", openTag: (e) => {
1111
+ } }), h.registerVisitor({ from: "sheetProtection", to: "protection", openTag: (e) => {
1112
+ let r = !1;
1113
+ if (e.hasAttribute("sheet") && w(e.getAttribute("sheet")) && (r = !0), !r) return void e.setSource(void 0);
1114
+ const l = (S) => S === !0 || S === "1" || S === "on" || S === "true" || S === !1 || S === "0" || S === "off" || S === "false" || null;
1115
+ e.copyTo("autoFilter", l), e.copyTo("deleteColumns", l), e.copyTo("formatCells", l), e.copyTo("formatColumns", l), e.copyTo("formatRows", l), e.copyTo("insertColumns", l), e.copyTo("insertHyperlinks", l), e.copyTo("insertRows", l), e.copyTo("objects", l), e.copyTo("pivotTables", l), e.copyTo("scenarios", l), e.copyTo("selectUnlockedCells", l), e.copyTo("selectUnlockedCells", l), e.copyTo("sort", l);
1116
+ const d = {};
1117
+ e.copyToObject(d, "hash", k, "hashValue"), e.copyToObject(d, "algorithm", k, "algorithmName"), e.copyToObject(d, "salt", k, "saltValue"), e.copyToObject(d, "spinCount", A), Object.keys(d).length > 0 && (e.getSource().password = d);
1118
+ } }), h.registerVisitor({ from: "protectedRanges", to: "protectedRanges", openTag: (e) => {
1119
+ e.setSource({});
1120
+ } }), h.registerVisitor({ from: "protectedRange", to: {}, openTag: (e) => {
1121
+ const r = e.getAttribute("sqref");
1122
+ e.setKey(r), e.copyTo("name"), e.copyTo("securityDescriptor");
1123
+ const l = {};
1124
+ e.copyToObject(l, "hash", k, "hashValue"), e.copyToObject(l, "algorithm", k, "algorithmName"), e.copyToObject(l, "salt", k, "saltValue"), e.copyToObject(l, "spinCount", A), Object.keys(l).length > 0 && (e.getSource().password = l);
1125
+ } }), h.registerVisitor({ from: "sheetFormatPr", to: "sheetFormatPr", openTag: (e) => {
1126
+ e.copyToObject(V, "defaultColSize", ct, "defaultColWidth"), e.copyToObject(V, "outlineLevelCol", A, "outlineLevelCol");
1127
+ const r = e.getAttribute("customHeight");
1128
+ r !== "1" && r !== "true" || e.copyToObject(V, "defaultRowSize", ct, "defaultRowHeight"), e.copyToObject(V, "outlineLevelRow", A, "outlineLevelRow");
1129
+ } }), h.registerVisitor({ from: "cols", to: "cols", openTag: (e) => {
1130
+ e.setSource([]);
1131
+ } }), h.registerVisitor({ from: "col", to: [], openTag: (e) => {
1132
+ e.copyTo("min", (r) => parseInt(r) - 1), e.copyTo("max", (r) => parseInt(r) - 1), e.copyTo("sz", ct, "width"), e.copyTo("cs", w, "customWidth"), e.copyTo("h", w, "hidden"), e.copyTo("l", A, "outlineLevel"), e.copyTo("s", A, "style");
1133
+ } }), h.registerVisitor({ from: "oleObjects", to: null, openTag: (e) => {
1134
+ e.warn("'OLE Objects' are not supported.");
1135
+ } });
1136
+ let se = null;
1137
+ const ws = { onOpenTag: (e) => {
1138
+ se === null && (se = "");
1139
+ }, onText: (e) => {
1140
+ se += e;
1141
+ }, onEnd: () => {
1142
+ const e = ee(se);
1143
+ return se = null, e;
1144
+ }, onError: (e) => {
1145
+ } };
1146
+ return ((e, r, l, d, S, gt) => {
1147
+ let ot = !1, At = !1, qt = [], zt = !1, Et = null, ie = null, me = null, rt = null, Fe = null, Xe = null;
1148
+ const vs = gt?.get("richData") ?? [], Be = at.normalizeA1ToR1C1, We = Pe.createConflatingRanges(), _e = /* @__PURE__ */ new Map(), Ae = [];
1149
+ let oe = null;
1150
+ const qe = Pe.createConflatingRanges();
1151
+ let re, Dt = !1, X = -1, Q = -1, ft = null, ne = null;
1152
+ const Ee = [];
1153
+ let De = null, ze = -2, mt = 0, Ut = "", Pt = "", Ot = "", It = "", Vt = "", Lt = "", Nt = "", Ue = "", Ge = "", Ze = "", Je = "", Qe = "", Ke = "", Ye = "", Tt = !0, Rt = null;
1154
+ return { ...l, onEnd: () => {
1155
+ Ee.length > 0 && (r.rows = Ee);
1156
+ let p = We.done(Ys);
1157
+ const C = p.length;
1158
+ if (C > 0) {
1159
+ const $ = new Array(C);
1160
+ for (let L = 0; L < C; L++) {
1161
+ const nt = p[L], $t = at.rangeToString(nt), Mt = nt.value[1], ae = at.resolveRelativeToA1(Mt, nt.rowStart, nt.colStart);
1162
+ $[L] = [$t, ae];
1163
+ }
1164
+ r.formulas = $;
1165
+ }
1166
+ const et = qe.done(!0), N = et.length;
1167
+ if (N > 0) {
1168
+ const $ = new Array(N);
1169
+ for (let L = 0; L < N; L++) {
1170
+ const nt = et[L], $t = at.rangeToString(nt);
1171
+ $[L] = $t;
1172
+ }
1173
+ r.volatile = $;
1174
+ }
1175
+ if (Ae.length > 0 && (r.dynamicArray = [...Ae]), qt.length > 0) {
1176
+ qt.sort(Pe.createRangeComparator(As.Orientation.Column));
1177
+ const $ = [];
1178
+ let L = null, nt = -1, $t = -1, Mt = -1, ae = -1, wt = null;
1179
+ const ts = qt.length;
1180
+ ts > 0 && (L = qt[0], nt = L.colStart, $t = L.colEnd, Mt = L.rowEnd, ae = L.value, $.push(L));
1181
+ for (let jt = 1; jt < ts; jt++) wt = qt[jt], ae !== wt.value || nt !== wt.colStart || $t !== wt.colEnd || Mt + 1 !== wt.rowEnd ? ($.push(wt), L = wt, nt = L.colStart, $t = L.colEnd, Mt = L.rowEnd, ae = L.value) : (Mt = wt.rowEnd, L.rowEnd = Mt);
1182
+ let es = [];
1183
+ for (let jt = 0; jt < $.length; jt++) {
1184
+ const le = $[jt];
1185
+ es.push({ r: { colStart: le.colStart, colEnd: le.colEnd, rowStart: le.rowStart, rowEnd: le.rowEnd }, v: le.value });
1186
+ }
1187
+ r.directStyles = es;
1188
+ }
1189
+ const st = e.build();
1190
+ if (st) {
1191
+ const $ = st.tuples;
1192
+ r.data = $;
1193
+ }
1194
+ l?.onEnd?.();
1195
+ }, onOpenTag: (p) => {
1196
+ let C = p.name;
1197
+ const et = C.indexOf(":");
1198
+ if (et !== -1 && (C = C.slice(et + 1)), re) {
1199
+ const N = p.attributes;
1200
+ switch (C) {
1201
+ case "v":
1202
+ At = !0;
1203
+ break;
1204
+ case "f":
1205
+ switch (N.t ?? null) {
1206
+ case null:
1207
+ case "normal":
1208
+ zt = !0;
1209
+ break;
1210
+ case "shared":
1211
+ const st = N.si;
1212
+ ie = N.ref, Et = st;
1213
+ break;
1214
+ case "array":
1215
+ zt = !0, ie = N.ref, oe = [ie, !1];
1216
+ break;
1217
+ case "datatable":
1218
+ zt = !0, ie = N.ref, zt = !0;
1219
+ }
1220
+ N.ca !== void 0 && qe.append(X, Q);
1221
+ break;
1222
+ case "is":
1223
+ return void (Dt = !0);
1224
+ }
1225
+ return void (Dt && S?.onOpenTag(p));
1226
+ }
1227
+ if (ot) {
1228
+ if (C === "c") {
1229
+ re = p;
1230
+ const N = p.attributes.r;
1231
+ Q = at.fastStringToCol(N);
1232
+ const st = p.attributes.t;
1233
+ st === void 0 ? ne = null : (ne = st, ne === "str" && (Dt = !0));
1234
+ let $ = p.attributes.s;
1235
+ $ !== void 0 && ($ = parseInt($), Rt && Rt.value === $ && Rt.colEnd + 1 === Q ? Rt.colEnd = Q : (Rt = { colStart: Q, rowStart: X, colEnd: Q, rowEnd: X, value: $ }, qt.push(Rt)));
1236
+ }
1237
+ } else {
1238
+ if (C === "row") {
1239
+ ot = !0;
1240
+ const N = p.attributes.r;
1241
+ if (X = parseInt(N) - 1, mt = 0, Pt = p.attributes.customHeight, Pt !== void 0 && (mt |= Bt.CustomHeight), Pt !== Ge && (Tt = !0, Ge = Pt), Ut = p.attributes.ht, Ut !== void 0 && (mt |= Bt.Ht), Ut !== Ue && (Tt = !0, Ue = Ut), Ot = p.attributes.hidden, Ot !== void 0 && (mt |= Bt.Hidden), Ot !== Ze && (Tt = !0, Ze = Ot), Vt = p.attributes.s, Vt !== void 0 && (mt |= Bt.S), Vt !== Qe && (Tt = !0, Qe = Vt), It = p.attributes.customFormat, It !== void 0 && (mt |= Bt.CustomFormat), It !== Je && (Tt = !0, Je = It), Lt = p.attributes.outlineLevel, Lt !== void 0 && (mt |= Bt.OutlineLevel), Lt !== Ke && (Tt = !0, Ke = Lt), Nt = p.attributes.collapsed, Nt !== void 0 && (mt |= Bt.Collapsed), Nt !== Ye && (Tt = !0, Ye = Nt), mt !== 0) if (ze + 1 !== X || Tt) {
1242
+ const st = Pt !== void 0 && (Pt === "1" || Pt === "true"), $ = It !== void 0 && (It === "1" || It === "true");
1243
+ De = { min: X, max: X, sz: st && Ut !== void 0 ? parseFloat(Ut) : -1, csz: st, h: Ot !== void 0 && (Ot === "1" || Ot === "true"), s: st && Vt !== void 0 && Vt !== "0" ? parseInt(Vt) : 0, cs: $, l: Lt === void 0 || Lt === "0" ? 0 : parseInt(Lt), cl: Nt !== void 0 && (Nt === "1" || Nt === "true") }, Ee.push(De);
1244
+ } else De.max = X;
1245
+ return ze = X, void (Tt = !1);
1246
+ }
1247
+ l?.onOpenTag(p);
1248
+ }
1249
+ }, onCloseTag: (p) => {
1250
+ if (re) {
1251
+ let C = p.name;
1252
+ const et = C.indexOf(":");
1253
+ if (et !== -1 && (C = C.slice(et + 1)), Dt) if (C === "is" || C === "v") {
1254
+ const N = S?.onEnd();
1255
+ N !== null && e.addValue(X, Q, "" + N);
1256
+ } else S?.onCloseTag?.(p);
1257
+ return At && (At = !1), void (C === "c" && (re = null, Dt = !1));
1258
+ }
1259
+ if (ot) return ot = !1, void (Rt = null);
1260
+ l?.onCloseTag(p);
1261
+ }, onText: (p) => {
1262
+ if (p = p.trim(), At) {
1263
+ switch (ft = null, ne) {
1264
+ case null:
1265
+ case "n":
1266
+ ft = parseFloat(p);
1267
+ break;
1268
+ case "b":
1269
+ ft = p === "1" || p === "true";
1270
+ break;
1271
+ case "s":
1272
+ ft = p;
1273
+ break;
1274
+ case "e":
1275
+ if (p === "#VALUE!") {
1276
+ const et = re.attributes.vm;
1277
+ if (et !== void 0) {
1278
+ const N = vs[parseInt(et) - 1];
1279
+ if (N && N.isFormulaError) {
1280
+ ft = { t: Ft.Error, v: N.getCode() };
1281
+ break;
1282
+ }
1283
+ }
1284
+ }
1285
+ const C = ks.getBuiltInByLabel(p);
1286
+ C ? ft = { t: Ft.Error, v: C.getCode() } : (ft = p, d?.(`Unknown formula error '${p}' in cell ${at.cellToString({ colIndex: Q, rowIndex: X })}`));
1287
+ break;
1288
+ case "str":
1289
+ case "inlineStr":
1290
+ Dt = !0;
1291
+ }
1292
+ ft !== null && e.addValue(X, Q, ft);
1293
+ }
1294
+ if (oe && (ne === "e" && (oe[1] = !0), Ae.push(oe), oe = null), Et) if (Fe === Et) rt = Xe;
1295
+ else {
1296
+ if (rt = _e.get(Et), !rt) {
1297
+ const C = [];
1298
+ me = Be(p, X, Q, C), rt = [me, C, p], _e.set(Et, rt);
1299
+ }
1300
+ Fe = Et, Xe = rt;
1301
+ }
1302
+ if (zt) {
1303
+ const C = [];
1304
+ me = Be(p, X, Q, C), rt = [me, C, p];
1305
+ }
1306
+ if (rt) return We.append(X, Q, rt), rt = null, zt = !1, Et = null, void (ie = null);
1307
+ Dt ? S?.onText(p) : ot || l?.onText(p);
1308
+ } };
1309
+ })(J, V, h.createEventHandler(V, () => {
1310
+ }, Z), Z, ws, tt);
1311
+ })(Y, (V, U = !1) => ue(V, R, U) ?? null, ms, ke, 0, (V) => {
1312
+ o && (V = R + ": " + V, o?.(V));
1313
+ }, W), xt = as(R, he), kt = await (async (V, U = 8388608) => {
1314
+ await (async () => {
1315
+ if (typeof ReadableStream > "u") if (typeof window > "u") {
1316
+ const { ReadableStream: Z } = await import("./BcWoqhD_sX85c7Mh.js");
1317
+ globalThis.ReadableStream = Z;
1318
+ } else console.warn("Browser does not support ReadableStream; consider loading a polyfill.");
1319
+ })();
1320
+ const ee = new TextDecoder("utf-8");
1321
+ let _ = 0;
1322
+ const G = V instanceof Uint8Array ? V : new Uint8Array(V);
1323
+ return new ReadableStream({ pull(Z) {
1324
+ if (_ >= G.byteLength) return void Z.close();
1325
+ const tt = G.subarray(_, Math.min(_ + U, G.byteLength)), h = ee.decode(tt, { stream: _ + U < G.byteLength });
1326
+ Z.enqueue(h), _ += tt.length;
1327
+ } }).getReader();
1328
+ })(xt);
1329
+ try {
1330
+ await Ie.parseStream(kt, Ct, { xmlns: !1 });
1331
+ } catch (V) {
1332
+ throw console.warn(`Error parsing sheet: '${R}'`, V), new Error(`Error parsing sheet: '${R}'`, { cause: V });
1333
+ }
1334
+ const Yt = be(R, ut);
1335
+ let te, He = /* @__PURE__ */ new Map();
1336
+ if (Yt) {
1337
+ const V = "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";
1338
+ let U;
1339
+ Yt.forEach((_, G) => {
1340
+ _.type === V && (te = ue(G, R, !1, ut)?.comments, te && te.forEach((tt) => {
1341
+ He.set(tt.id, tt);
1342
+ }));
1343
+ });
1344
+ const ee = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
1345
+ if (Yt.forEach((_, G) => {
1346
+ _.type === ee && (U = ue(G, R, !1, ut));
1347
+ }), U || te) {
1348
+ const _ = te ?? [], G = U?.comments;
1349
+ if (G) {
1350
+ const Z = U?.authors;
1351
+ for (let tt = 0; tt < G.length; tt++) {
1352
+ const h = G[tt];
1353
+ let J = h.authorId !== void 0 ? Z[h.authorId] : void 0;
1354
+ if ((!J || J.startsWith("tc=")) && (J = Qs(J.substring(3)), He.has(J))) continue;
1355
+ let j = pe.get(J);
1356
+ j || (j = $e.get(J)), j || (j = { id: ss.uuidV4(), displayName: J }, $e.set(j.displayName, j), pe.set(j.id, j)), J = j?.id ?? null;
1357
+ const fe = { id: ss.uuidV4(), personId: J, ref: h.ref, done: !1, asNote: !0, content: h.content };
1358
+ _.push(fe);
1359
+ }
1360
+ }
1361
+ Y.comments = _;
1362
+ }
1363
+ }
1364
+ };
1365
+ Le.push(pt());
1366
+ } else Wt = K ? as(R, he, (Y) => {
1367
+ const pt = T.add({ buffer: Y });
1368
+ return pt.addReference(I), H.add(pt), f.toResourceId(pt);
1369
+ }, bt) : Ve(R, he, g, D, bt);
1370
+ return Wt;
1371
+ }, bt = { paramMap: W, getRefs: be, getRef: ue, parsedRefs: ht, onWarning: o, addPerson: (P) => null }, de = [];
1372
+ let xe = 0;
1373
+ u.Strings && (xe = parseInt(u.Strings.Unique ?? u.Strings.length ?? 0));
1374
+ const fs = u.Strings ?? [];
1375
+ for (let P = 0; P < xe; P++) de.push(fs[P]?.t ?? "");
1376
+ const Ne = /* @__PURE__ */ new Map();
1377
+ let Re = xe;
1378
+ const ms = (P) => {
1379
+ const z = Ne.get(P);
1380
+ if (z !== void 0) return z;
1381
+ const K = Re;
1382
+ return Ne.set(P, Re++), de.push(P), K;
1383
+ }, pe = (Zt("richstructure", u, g, D, bt), Zt("richdata", u, g, D, bt), /* @__PURE__ */ new Map()), $e = /* @__PURE__ */ new Map(), Me = Zt("people", u, g, D);
1384
+ let St = null;
1385
+ if (Me.size > 0 && (St = Me.entries().next()?.value?.[1]?.persons, St)) {
1386
+ const P = St.length;
1387
+ for (let z = 0; z < P; z++) {
1388
+ const K = St[z];
1389
+ pe.set(K.id, K), pe.set(K.displayName, K);
1390
+ }
1391
+ }
1392
+ const we = Zt("themes", u, g, D, bt);
1393
+ let je = null;
1394
+ if (we && we.entries) {
1395
+ let P = we.entries().next();
1396
+ P?.value?.[1] && (je = P.value[1]);
1397
+ }
1398
+ const Ts = new Es(je);
1399
+ let ge = Zt("styles", u, g, D, bt).entries().next()?.value[1];
1400
+ ge && (ge = JSON.parse(Ds(ge)));
1401
+ const ys = Zt("workbooks", u, g, D, bt);
1402
+ await Promise.all(Le);
1403
+ const ve = { ...ys.entries().next().value[1], styles: ge, theme: Ts.toJSON() };
1404
+ de.length > 0 && (ve.strings = de), St && St.length > 0 && (ve.people = St);
1405
+ const bs = { ...n, resources: T, json: ve }, xs = new Ps(bs);
1406
+ return H.forEach((P) => {
1407
+ P.deleteReference(I);
1408
+ }), f.endPersist(), xs;
1409
+ } catch (u) {
1410
+ let D = "Unable to parse XLSX.";
1411
+ throw u instanceof Is && (D = "Unable to open XLSX. There are too many rows or columns."), new Error(D, { cause: u });
1412
+ }
1413
+ }, toBufferXLSX: async (i, t) => {
1414
+ const s = await import("./7_O6nILzn1fSVvkO.js"), o = await i.toJSON(!0), n = s.utils.book_new();
1415
+ for (let a = 0; a < o.sheets.length; a++) {
1416
+ const c = o.sheets[a], m = s.utils.json_to_sheet([{}]);
1417
+ s.utils.book_append_sheet(n, m, c.name);
1418
+ const v = c.sheet, b = i.getSheetAt(a), x = b.getUsedRange();
1419
+ if (x ? (m["!ref"] = x.getA1(), x.forEach((E, y) => {
1420
+ const u = { t: "z" }, D = y.getCell().getStyle();
1421
+ if (!D.isNormal()) {
1422
+ let g = D.getNumberFormat();
1423
+ g !== Ht.Type.General && (g === Ht.Type.ShortDate ? g = "m/d/yyyy" : g === Ht.Type.MediumDate ? g = "d-mmm-yy" : g === Ht.Type.LongDate ? g = "[$-x-sysdate]dddd, mmmm dd, yyyy" : g === Ht.Type.ShortTime ? g = "h:mm" : g === Ht.Type.MediumTime ? g = "h:mm AM/PM" : g === Ht.Type.LongTime && (g = "h:mm:ss AM/PM"), u.z = g);
1424
+ }
1425
+ if (E !== null) switch (y.getType()) {
1426
+ case Ft.Number:
1427
+ u.t = "n", u.v = E;
1428
+ break;
1429
+ case Ft.String:
1430
+ u.t = "s", u.v = E;
1431
+ break;
1432
+ case Ft.Boolean:
1433
+ u.t = "b", u.v = E;
1434
+ break;
1435
+ case Ft.Error:
1436
+ u.t = "e", u.v = E.toString();
1437
+ case Ft.RichData:
1438
+ }
1439
+ m[y.getA1()] = u;
1440
+ })) : m["!ref"] = "A1:A1", v.merges?.length > 0) {
1441
+ const E = [];
1442
+ m["!merges"] = E;
1443
+ for (let y = 0; y < v.merges.length; y++) E.push(s.utils.decode_range(v.merges[y]));
1444
+ }
1445
+ if (v.cols?.length > 0) {
1446
+ const E = [];
1447
+ m["!cols"] = E;
1448
+ const y = v.cols, u = { width: v.defaultColSize ?? b.getColumnWidthAsFontUnit(b.getColumnHeaders().getDefaultSize()) };
1449
+ for (let D = 0; D < y.length; D++) {
1450
+ const g = y[D];
1451
+ for (let f = E.length; f <= g.min - 1; f++) E.push(u);
1452
+ const T = {};
1453
+ g.sz !== void 0 && (T.width = g.sz), g.h !== void 0 && (T.hidden = g.h), g.l !== void 0 && (T.level = g.l);
1454
+ for (let f = g.min; f <= g.max; f++) E.push(T);
1455
+ }
1456
+ }
1457
+ }
1458
+ return s.write(n, { type: "array", bookType: "xlsx" }), s.write(n, { type: "array", bookType: "xlsx" });
1459
+ } }, Symbol.toStringTag, { value: "Module" }));
1460
+ export {
1461
+ ri as a,
1462
+ Ks as b,
1463
+ oi as c,
1464
+ ls as d,
1465
+ ai as i,
1466
+ ni as p,
1467
+ Qs as r,
1468
+ ii as t
1469
+ };