@sheetxl/studio-vanilla 0.4.11 → 0.4.13

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 (205) hide show
  1. package/browser/cjs/{DFspSkki779xN-Ey.cjs → -DkdmW3XP1ICRY25.cjs} +2 -2
  2. package/browser/cjs/B-KQs1Bf48nEucW7.cjs +7 -0
  3. package/browser/cjs/B1xnY7pDnbnNzknG.cjs +7 -0
  4. package/browser/cjs/B6A5w_aWHkigBc6j.cjs +7 -0
  5. package/browser/cjs/B9jxuOg1CXcmbi9J.cjs +110 -0
  6. package/browser/cjs/BAYjkr4LmsWRLoPr.cjs +7 -0
  7. package/browser/cjs/{DFtyXc7YFh9dIp74.cjs → BG2uV2RpxrfZyCuV.cjs} +1 -1
  8. package/browser/cjs/{DiBy6-IxLscyMW2y.cjs → BGCPG4Ip5ZijUQwi.cjs} +2 -2
  9. package/browser/cjs/BHTlBOQH-tPGoKgo.cjs +7 -0
  10. package/browser/cjs/BLBNzBvRVl9VLynf.cjs +7 -0
  11. package/browser/cjs/BLh6E7ER8mrM6vc_.cjs +7 -0
  12. package/browser/cjs/{CuTW2Pt-L5n-hNxV.cjs → BMaq_2S3IFrE5XeJ.cjs} +1 -1
  13. package/browser/cjs/BO7Pbclmywy-QCSV.cjs +13 -0
  14. package/browser/cjs/BPlthbyKkqCDjgxO.cjs +7 -0
  15. package/browser/cjs/BUGo0mXtBfFOmQXV.cjs +7 -0
  16. package/browser/cjs/BdHdXCz_K1djQgI4.cjs +7 -0
  17. package/browser/cjs/BfNkb1jDZkJf3wRA.cjs +7 -0
  18. package/browser/cjs/BfdQd2UEOlOc5iF3.cjs +7 -0
  19. package/browser/cjs/Bi9KvObgq_kJ_pjC.cjs +7 -0
  20. package/browser/cjs/BjPpJjnABDd3_WOZ.cjs +7 -0
  21. package/browser/cjs/BsSNzyN8kOGCKzso.cjs +7 -0
  22. package/browser/cjs/BtCcoaKKb8ZDnliG.cjs +7 -0
  23. package/browser/cjs/{DrlS1oz9Nea8Pm3j.cjs → BwHquG4sSd7OJjxz.cjs} +2 -2
  24. package/browser/cjs/{CjZbhk41S1qO_74G.cjs → BywNBbTVRYbgRbNI.cjs} +1 -1
  25. package/browser/cjs/C04Qr5P8uyQ6Vcml.cjs +7 -0
  26. package/browser/cjs/C42ZEPRmW9Wcd7tI.cjs +7 -0
  27. package/browser/cjs/{T4SHYo66xDT3l9JN.cjs → CBpt1PBR1VfBegko.cjs} +2 -2
  28. package/browser/cjs/CED8Az5C8GWF7pUT.cjs +7 -0
  29. package/browser/cjs/{BPTHTRDvNOVkUJGa.cjs → CbD4Wa5QLTdRCYcz.cjs} +2 -2
  30. package/browser/cjs/{C5FXOMLhAu_KTjVe.cjs → CbILz9Skl6lWf6yR.cjs} +1 -1
  31. package/browser/cjs/CoFQQqIzuvS9PM77.cjs +7 -0
  32. package/browser/cjs/{BlSFY6zLlebuejdV.cjs → CpDNo2Lhwr5ZHECs.cjs} +2 -2
  33. package/browser/cjs/{D3iOk-Q2tRdUeTcn.cjs → CsamfGfFsItvSgo_.cjs} +1 -1
  34. package/browser/cjs/Cx3kn5gBsQ-1bORi.cjs +7 -0
  35. package/browser/cjs/CxLvGnG44-qNI36G.cjs +7 -0
  36. package/browser/cjs/D-xyWit7jxctQCpR.cjs +7 -0
  37. package/browser/cjs/D4XQsK7d7DRctaOO.cjs +7 -0
  38. package/browser/cjs/D9rVEA1BdB0JZwhE.cjs +7 -0
  39. package/browser/cjs/DES2NmIRVZg-HXgs.cjs +7 -0
  40. package/browser/cjs/{BshvMtUxTJHj3JQN.cjs → DFxeLNhACFIHb0nv.cjs} +2 -2
  41. package/browser/cjs/DIv1SrLYeyVwcaxE.cjs +7 -0
  42. package/browser/cjs/DJ6L43osbaMzEV5K.cjs +7 -0
  43. package/browser/cjs/DMjLN_HDktNzzUB8.cjs +7 -0
  44. package/browser/cjs/DVPfPZCFjmYu3xyn.cjs +7 -0
  45. package/browser/cjs/DhSlaiQXxEOVtZkA.cjs +7 -0
  46. package/browser/cjs/{Dx-jp_LJxWbAScyA.cjs → Dh_dFnagz7dMZlGh.cjs} +1 -1
  47. package/browser/cjs/DpF6vgGka2d-RKkb.cjs +10 -0
  48. package/browser/cjs/{C7EZCTczsC-gkRcq.cjs → DtY0Jzlwnr_YKnV4.cjs} +2 -2
  49. package/browser/cjs/DwyyFI1Ix0uc0Qoz.cjs +7 -0
  50. package/browser/cjs/Dy5_viRzFls9rOzN.cjs +7 -0
  51. package/browser/cjs/GkINjQ8Te3GKi2mx.cjs +7 -0
  52. package/browser/cjs/aN3KCqswA1SdJIMq.cjs +7 -0
  53. package/browser/cjs/{BuWtGFX0HiBezGjw.cjs → hLJbgylpETByV4wc.cjs} +2 -2
  54. package/browser/cjs/index.cjs +2 -2
  55. package/browser/cjs/qumqKlVHFx89iLeu.cjs +7 -0
  56. package/browser/cjs/{BAyEOOtO-9sHQQRW.cjs → rKZjTYQ0WpTriIv6.cjs} +2 -2
  57. package/browser/cjs/xjKotAOVt3JH36U7.cjs +7 -0
  58. package/browser/cjs/ymbPxio09Fw7I2BW.cjs +7 -0
  59. package/browser/esm/2P5dQT7wZToOh-n9.mjs +7 -0
  60. package/browser/esm/4GgcUVhUmQmiv9Ha.mjs +110 -0
  61. package/browser/esm/7_x68v6PpvRDox_Z.mjs +7 -0
  62. package/browser/esm/9icgSuuzXq6mlgM8.mjs +7 -0
  63. package/browser/esm/B354iAatN9y9AIIP.mjs +7 -0
  64. package/browser/esm/B5EVyoxm3aSlAnxN.mjs +7 -0
  65. package/browser/esm/BD8rE7MUxuHXsdcf.mjs +7 -0
  66. package/browser/esm/BGFWI1a1PmU8_hCE.mjs +7 -0
  67. package/browser/esm/BI6JAQCQx1V0F2aC.mjs +7 -0
  68. package/browser/esm/BIYg30d_9HaluFFz.mjs +7 -0
  69. package/browser/esm/BKL-uyBp_OE47lXd.mjs +7 -0
  70. package/browser/esm/BMwJCtLAYUW8wExX.mjs +13 -0
  71. package/browser/esm/BNOfK-lGWF2S8vQE.mjs +7 -0
  72. package/browser/esm/Ba433v6lQUMtECiY.mjs +7 -0
  73. package/browser/esm/BbZWfDW2LUyjqUDy.mjs +7 -0
  74. package/browser/esm/C238uBmZN1XXqMUb.mjs +7 -0
  75. package/browser/esm/C34whwRkHO0lhq4-.mjs +7 -0
  76. package/browser/esm/C6FEpAqSZoW5Hgte.mjs +7 -0
  77. package/browser/esm/COlW5ULL29SUKN1Z.mjs +7 -0
  78. package/browser/esm/CRyxOj2xPj9qe9LK.mjs +7 -0
  79. package/browser/esm/CVeyOpbAhaBhDRye.mjs +7 -0
  80. package/browser/esm/CVyVvtlJuCTn4MDh.mjs +7 -0
  81. package/browser/esm/CapeIfjWq-_BHMlE.mjs +7 -0
  82. package/browser/esm/CcQqGNgK2CsgNtuD.mjs +7 -0
  83. package/browser/esm/CdZSxrk3k1Lx6G8W.mjs +7 -0
  84. package/browser/esm/CdchvB_wAbv_6Whw.mjs +7 -0
  85. package/browser/esm/{Cc_VWd0wF5-39LsI.mjs → Cf8eDl3Tu5NAWWwG.mjs} +1 -1
  86. package/browser/esm/{BXUGsC1Mo3FP8vnW.mjs → Cfq9tttQlsKvfaCr.mjs} +2 -2
  87. package/browser/esm/{BDVJ7eOPpW5FnEAP.mjs → ClR6uLJoM-xKVYEc.mjs} +1 -1
  88. package/browser/esm/Cnl_e-EYkZ3CLbi2.mjs +7 -0
  89. package/browser/esm/CtRS2ZCPF7IH_mXe.mjs +7 -0
  90. package/browser/esm/{BUSR_OK5Qi6hRPfw.mjs → CuV-bwi1vcXAqFUY.mjs} +1 -1
  91. package/browser/esm/CwVE0qelO_xgf-l1.mjs +7 -0
  92. package/browser/esm/{CFFC0SNc24a0Dxnh.mjs → D1Dzlta8ZVy08ng6.mjs} +2 -2
  93. package/browser/esm/D1TjRQiHLWhpl-dl.mjs +7 -0
  94. package/browser/esm/D8BJ-y3ulgO_ezrj.mjs +10 -0
  95. package/browser/esm/{BlGoi1_x9rUMpWMd.mjs → DTDXNEbHVnnZONNL.mjs} +1 -1
  96. package/browser/esm/DTWfi8Dl-c2s5moT.mjs +7 -0
  97. package/browser/esm/DYVBXcu1r5KRLB-1.mjs +7 -0
  98. package/browser/esm/{BGpv6Kq7eBlJy43T.mjs → DZjWyWMvr2XHQrBg.mjs} +1 -1
  99. package/browser/esm/DhHK4QmASvgAq9Xy.mjs +7 -0
  100. package/browser/esm/{PS0cqYnlMVEGOQpI.mjs → DoFV2S6Su86IN5Ul.mjs} +2 -2
  101. package/browser/esm/Dq3ybkgattcCsF_4.mjs +7 -0
  102. package/browser/esm/DqWoZ4TjweoJWX3o.mjs +7 -0
  103. package/browser/esm/DtXxHirBm16ldE1l.mjs +7 -0
  104. package/browser/esm/DtuWZG6c_8vKRSdr.mjs +7 -0
  105. package/browser/esm/FBG8XXdIMd9PfUIo.mjs +7 -0
  106. package/browser/esm/Nh7JiwvF01PblHQ0.mjs +7 -0
  107. package/browser/esm/PVYiH9vBQM6rqXI4.mjs +7 -0
  108. package/browser/esm/U5-LDZQ0qkJ2Y-p8.mjs +7 -0
  109. package/browser/esm/XhQDWZu47oe6bwHh.mjs +7 -0
  110. package/browser/esm/_BjU6TtI-mQfFpfy.mjs +7 -0
  111. package/browser/esm/{Cq8D_M0jeHLcnRjg.mjs → gOUfyCw957TzcbNB.mjs} +1 -1
  112. package/browser/esm/index.mjs +2 -2
  113. package/browser/esm/lmkbfs9sNc7f0oe5.mjs +7 -0
  114. package/browser/esm/{tFhROdVSw9KLQfUN.mjs → naa0kcRwxHEYGaQB.mjs} +2 -2
  115. package/browser/esm/qxOkQutRxmAi1vRh.mjs +7 -0
  116. package/browser/esm/tMSro0g2GM5BBTIH.mjs +7 -0
  117. package/cdn/assets/0e9wDKSn4SFxSmP5.js +27 -0
  118. package/cdn/assets/0j_nQmV1Bb0lJ6sB.js +472 -0
  119. package/cdn/assets/2mxiQm6dELsqQoX7.js +5624 -0
  120. package/cdn/assets/5XdpCWQ6AcxZ6oY1.js +10 -0
  121. package/cdn/assets/6JtXguBKwGj6dqfy.js +1577 -0
  122. package/cdn/assets/8U2WVdbZHYCBnd9L.js +23 -0
  123. package/cdn/assets/9-cIcj6CRJx5HTn9.js +10 -0
  124. package/cdn/assets/B-kFRtzNNkf4_SiP.js +1701 -0
  125. package/cdn/assets/B1Iys8a964LGNZKf.js +10 -0
  126. package/cdn/assets/B2RAJJJFkcaWUfUW.js +21 -0
  127. package/cdn/assets/BAzGoI9gE2G3F3on.js +637 -0
  128. package/cdn/assets/BBJxLS-wB_nXRnI2.js +10 -0
  129. package/cdn/assets/BDE7FUo2oiivrvBL.js +43 -0
  130. package/cdn/assets/BL6TUDSeou6wPejW.js +10 -0
  131. package/cdn/assets/BLqaorJ5Wl-1YOoy.js +3875 -0
  132. package/cdn/assets/BMiA9p1uOrwnooVT.js +10 -0
  133. package/cdn/assets/BNh9nSR83reiVMKt.js +90 -0
  134. package/cdn/assets/BQON-ToGsIBPrPkM.js +1371 -0
  135. package/cdn/assets/BUwNyHytF9St68tJ.js +10 -0
  136. package/cdn/assets/BVYDmdUGWvMG5gNK.js +241 -0
  137. package/cdn/assets/B_2bXmyji3Dr7LRM.js +50224 -0
  138. package/cdn/assets/BciokME96sykArSM.js +10 -0
  139. package/cdn/assets/BgnlshX157Ob6RLs.js +21 -0
  140. package/cdn/assets/BlYoycYtR-sUp0iC.js +27 -0
  141. package/cdn/assets/Bsa9-Itkf_SdDBM9.js +6481 -0
  142. package/cdn/assets/BwpBFv8Ks2ka07ch.js +10 -0
  143. package/cdn/assets/BxblmHGC7YxZcuak.js +10 -0
  144. package/cdn/assets/C-Z8wvIy20kJ7R-k.js +10 -0
  145. package/cdn/assets/C3EFzvmp0DcC_HAx.js +10 -0
  146. package/cdn/assets/C4vStn7wNlvrxdsp.js +10 -0
  147. package/cdn/assets/C5q0qaKi2eeDgoO8.js +10 -0
  148. package/cdn/assets/C9eQW5GKgPRmKKgJ.js +29 -0
  149. package/cdn/assets/CHTspRZD2v_dU_eV.js +22 -0
  150. package/cdn/assets/CKA4s2hlzSnrdWSD.js +10 -0
  151. package/cdn/assets/CMBDD1Mjde6UL5ep.js +84 -0
  152. package/cdn/assets/CR01MBraUPYPpwy4.js +36 -0
  153. package/cdn/assets/CT0d1P-Aav62lUvV.js +10 -0
  154. package/cdn/assets/CV8UjJPDVplXjK1E.js +49 -0
  155. package/cdn/assets/CrLrvmlJhYpNpXqR.js +10 -0
  156. package/cdn/assets/CsorxCiOoe7qX9j1.js +10 -0
  157. package/cdn/assets/CuNqTH3P8mCglRiz.js +10 -0
  158. package/cdn/assets/CwdMjMPFdIs8SAV0.js +1358 -0
  159. package/cdn/assets/D-5VYBO5_VEh6fEW.js +24 -0
  160. package/cdn/assets/DD3csu4pddGtMp3n.js +1468 -0
  161. package/cdn/assets/DFHruAftzuzBZ71r.js +393 -0
  162. package/cdn/assets/DHydjLSnijEgtpyU.js +10 -0
  163. package/cdn/assets/DPQqTIMsRLhMxPIy.js +820 -0
  164. package/cdn/assets/DUtu7r6CzW4dtW3E.js +50 -0
  165. package/cdn/assets/DXHirQMr483hJBil.js +58 -0
  166. package/cdn/assets/DXtbonLk2ESfF4Dh.js +10 -0
  167. package/cdn/assets/Dr5X-ng9wbwUWVr4.js +41 -0
  168. package/cdn/assets/DvFNLgeMJ9LdQROu.js +149 -0
  169. package/cdn/assets/Dvj7UEckqOBrgs9i.js +3947 -0
  170. package/cdn/assets/F6zW9Vj410C4yRVG.js +424 -0
  171. package/cdn/assets/Gz4u4ewyWfB-Pf-a.js +1703 -0
  172. package/cdn/assets/KDGtuIzSpkf1vsmH.js +10 -0
  173. package/cdn/assets/KtKlo5mM4kTTfFgi.js +46 -0
  174. package/cdn/assets/N3pWBoccPrTedAw-.js +12 -0
  175. package/cdn/assets/NTINjW8JjyZudT8s.js +13449 -0
  176. package/cdn/assets/R9RwlorPWfftoboH.js +2373 -0
  177. package/cdn/assets/Xwyp21e7L5fTeb_y.js +423 -0
  178. package/cdn/assets/XysyS9rk9tFdbzZh.js +2183 -0
  179. package/cdn/assets/f3_QXO8z0p-q4nJo.js +46 -0
  180. package/cdn/assets/quOP5QFyTT9soNIl.js +12 -0
  181. package/cdn/index.js +41 -37
  182. package/cdn/loader.js +1 -1
  183. package/package.json +3 -5
  184. package/browser/cjs/B0rdyyttE2Aibsag.cjs +0 -7
  185. package/browser/cjs/B2e7dDI-zKoqXpIW.cjs +0 -107
  186. package/browser/cjs/BplA5pDzOJpfTZuA.cjs +0 -7
  187. package/browser/cjs/CFcjX5-nVsgzdZ4F.cjs +0 -7
  188. package/browser/cjs/Db_Ew1r6yOMYylvA.cjs +0 -7
  189. package/browser/cjs/DgBn3aW39yjgm0X_.cjs +0 -7
  190. package/browser/cjs/SzxJv7OUs5ojl8gx.cjs +0 -7
  191. package/browser/cjs/vfUix5Di0Ro8tEID.cjs +0 -7
  192. package/browser/esm/B5kkStdEkTczERyM.mjs +0 -7
  193. package/browser/esm/B905wKzTtod-jbsD.mjs +0 -7
  194. package/browser/esm/BALnKy2Fp7fyk-lc.mjs +0 -7
  195. package/browser/esm/Bo_ZPRrOQrqOVHAF.mjs +0 -7
  196. package/browser/esm/BuURCm92KsyGHG9e.mjs +0 -7
  197. package/browser/esm/CGZ5MX7afzMxDkCe.mjs +0 -7
  198. package/browser/esm/CzmNwV9tfFYUp_gS.mjs +0 -7
  199. package/browser/esm/De6RPxc4p_jXLlT5.mjs +0 -7
  200. package/browser/esm/DlVZFM9ZR5jGyG0_.mjs +0 -7
  201. package/browser/esm/DqXxZP6yKF4U1YfY.mjs +0 -7
  202. package/browser/esm/DtmE60AvstK9u0Ta.mjs +0 -107
  203. package/browser/esm/Dz2OVgq3kxi1TkfX.mjs +0 -7
  204. package/browser/esm/QBGUD1XS5_pysBLL.mjs +0 -7
  205. package/browser/esm/uGDCdtqxjqRCo4Xn.mjs +0 -7
@@ -0,0 +1,1703 @@
1
+ import { aS as k, k as T, ab as G, f as Z, l as W, aT as C, aU as tt, aV as P, r as et, n as Y, aW as V } from "./B_2bXmyji3Dr7LRM.js";
2
+ import { c as x, b as f, r as L, t as rt, a as A, p as D, d as st } from "./DD3csu4pddGtMp3n.js";
3
+ /**
4
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.13
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
+ class ot {
10
+ constructor(t) {
11
+ this.list = t;
12
+ }
13
+ get length() {
14
+ return this.list.length;
15
+ }
16
+ item(t) {
17
+ return this.list[t];
18
+ }
19
+ forEach(t, e) {
20
+ for (let s = 0; s < this.list.length; s++) t(this.list[s], s, this);
21
+ }
22
+ }
23
+ const it = (u) => u === !0 || u === "1" || u === "on" || u === "true" || u !== !1 && u !== "0" && u !== "off" && u !== "false" && null, nt = (u) => {
24
+ const t = parseInt(u);
25
+ return isNaN(t) ? null : t;
26
+ }, lt = (u) => {
27
+ const t = parseFloat(u);
28
+ return isNaN(t) ? null : t;
29
+ }, at = /* @__PURE__ */ new Map();
30
+ class _ {
31
+ constructor(t, e, s, r, o, i = null, n) {
32
+ const l = (c, h, p) => n?.getRef?.(c, h, p, n?.parsedRefs), a = (c) => n?.getRefs?.(c, n?.parsedRefs);
33
+ this._parent = t, this.sharedShared = e, this.currentPath = s, this.elemRoot = r, this.jsonRoot = o, t ? (this._fileLocation = t._fileLocation, this._getRef = t._getRef, this._getRefs = t._getRefs) : (i && (this._fileLocation = i), l && a && (this._getRef = l), a && (this._getRefs = a), this._onWarning = n?.onWarning, this._addPerson = n?.addPerson);
34
+ }
35
+ getRef(t, e = !1) {
36
+ return this._getRef?.(t, this._fileLocation, e) ?? null;
37
+ }
38
+ getRelationships() {
39
+ return this._getRefs(this._fileLocation) ?? at;
40
+ }
41
+ getPath() {
42
+ return this.currentPath;
43
+ }
44
+ getElemRoot() {
45
+ return this.elemRoot;
46
+ }
47
+ getJsonRoot() {
48
+ return this.jsonRoot;
49
+ }
50
+ warn(t) {
51
+ this._onWarning ? this._onWarning(t) : this._parent ? this._parent?.warn?.(t) : console.warn(t);
52
+ }
53
+ addPerson(t) {
54
+ return this._addPerson ? this._addPerson(t) : this._parent ? this._parent?._addPerson?.(t) : null;
55
+ }
56
+ getVisitorParamsState() {
57
+ return this.sharedShared.getVisitorParamsState();
58
+ }
59
+ evaluate(t, e) {
60
+ if (!t) return e;
61
+ let s = [e];
62
+ const r = t.split("/");
63
+ for (let o = 0; o < r.length; o++) {
64
+ const i = r[o];
65
+ if (i === "" || i === ".") continue;
66
+ let n = [];
67
+ for (let l = 0; l < s.length; l++) {
68
+ const a = s[l], c = a.childNodes;
69
+ for (let h = 0; c && h < c.length; h++) {
70
+ const p = a.childNodes[h];
71
+ p.localName !== i && i !== "*" || n.push(p);
72
+ }
73
+ }
74
+ s = n;
75
+ }
76
+ return s.length === 1 ? s[0] : s.length === 0 ? null : new ot(s);
77
+ }
78
+ getFromPath(t, e) {
79
+ return Y.getFromPath(t, e);
80
+ }
81
+ setToPath(t, e, s) {
82
+ return Y.setToPath(t, e, s);
83
+ }
84
+ getValAttrAsString(t, e) {
85
+ let s = this.evaluate(t, e);
86
+ return s && s.hasAttribute("val") ? s.getAttribute("val") ?? null : null;
87
+ }
88
+ getValAttrAsBoolean(t, e, s = !1) {
89
+ let r = this.evaluate(t, e);
90
+ if (!r) return null;
91
+ const o = r.hasAttribute("val") ? r.getAttribute("val") : void 0;
92
+ return o == null ? s : o === "1" || o === "on" || o === "true" || o !== "0" && o !== "off" && o !== "false" && s;
93
+ }
94
+ getValAttrAsInteger(t, e) {
95
+ let s = this.evaluate(t, e);
96
+ return s && s.hasAttribute("val") ? parseInt(s.getAttribute("val")) ?? null : null;
97
+ }
98
+ getValAttrAsFloat(t, e) {
99
+ let s = this.evaluate(t, e);
100
+ return s && s.hasAttribute("val") ? parseFloat(s.getAttribute("val")) ?? null : null;
101
+ }
102
+ get BOOLEAN_COPY() {
103
+ return it;
104
+ }
105
+ get INT_COPY() {
106
+ return nt;
107
+ }
108
+ get FLOAT_COPY() {
109
+ return lt;
110
+ }
111
+ copyFromAttribute(t, e, s, r = e, o = null) {
112
+ if (!t || !s || !t.hasAttribute(e)) return;
113
+ let i = t.getAttribute(e);
114
+ if (o) {
115
+ if (Array.isArray(o)) {
116
+ for (let n = 0; n < o.length; n++)
117
+ if (i == null || (i = o[n](i), i == null)) return;
118
+ } else if (i == null || (i = o(i), i == null)) return;
119
+ }
120
+ this.setToPath(s, r, i);
121
+ }
122
+ }
123
+ class j {
124
+ constructor(t) {
125
+ this.jsonKey = t;
126
+ }
127
+ visit(t, e, s) {
128
+ const r = {};
129
+ return s[this.jsonKey] = r, r;
130
+ }
131
+ }
132
+ class ct {
133
+ visit(t, e, s) {
134
+ if (!e) return;
135
+ const r = e.childNodes;
136
+ for (let o = 0; o < r.length; o++) {
137
+ const i = r.item(o);
138
+ i.nodeType === 1 && i.localName === "Relationship" && this.processRelationship(t, i, s);
139
+ }
140
+ return s;
141
+ }
142
+ processRelationship(t, e, s) {
143
+ const r = {};
144
+ t.copyFromAttribute(e, "Target", r, "target"), t.copyFromAttribute(e, "Type", r, "type"), t.copyFromAttribute(e, "TargetMode", r, "targetMode"), s[e.getAttribute("Id")] = r;
145
+ }
146
+ }
147
+ const H = (u, t) => {
148
+ if (u || !u.hasAttribute("rot")) return;
149
+ const e = u.getAttribute("rot"), s = Y.roundAccurately(D(e), 2);
150
+ s !== -1e3 && (t.rotation = s);
151
+ }, b = (u, t, e, s, r) => {
152
+ const o = u.getValAttrAsString(s, t);
153
+ o !== null && (e[r] = o);
154
+ }, m = (u, t, e, s, r = s, o = null) => {
155
+ const i = u.getValAttrAsBoolean(s, t, o);
156
+ i !== null && (e[r] = i);
157
+ }, w = (u, t, e, s, r) => {
158
+ const o = u.getValAttrAsInteger(s, t);
159
+ o !== null && (e[r] = o);
160
+ }, y = (u, t, e, s, r, o = 1) => {
161
+ const i = u.getValAttrAsFloat(s, t);
162
+ i !== null && (e[r] = i * o);
163
+ };
164
+ class ut {
165
+ visit(t, e, s) {
166
+ return m(t, e, s, "roundedCorners", "roundedCorners"), w(t, e, s, ".//AlternateContent/Fallback/style", "styleId"), s.range = null, s;
167
+ }
168
+ afterVisit(t, e, s) {
169
+ let r = {};
170
+ s.types = r;
171
+ let o = {}, i = 0, n = {}, l = 0, a = t.getVisitorParamsState().get("axes");
172
+ const c = t.getVisitorParamsState().get("types");
173
+ for (let g = 0; g < c.length; g++) {
174
+ const d = c[g];
175
+ if (d.xAxisId) {
176
+ const v = d.xAxisId, O = a.get(v);
177
+ o[g + ""] = O, d.offsetXAxis = g, delete d.xAxisId, s.xAxes = o, o.length = ++i;
178
+ }
179
+ if (d.yAxisId) {
180
+ const v = d.yAxisId, O = a.get(v);
181
+ n[g + ""] = O, d.offsetYAxis = g, delete d.yAxisId, s.yAxes = n, n.length = ++l;
182
+ }
183
+ r[g + ""] = d;
184
+ }
185
+ r.length = c.length;
186
+ const h = t.getVisitorParamsState().get("series");
187
+ if (!h || h.length === 0) return;
188
+ const p = {};
189
+ s.series = p;
190
+ for (let g = 0; g < h.length; g++) p[g + ""] = h[g];
191
+ p.length = h.length;
192
+ }
193
+ }
194
+ class ht {
195
+ visit(t, e, s) {
196
+ return m(t, e, s, "plotVisOnly", "plotVisOnly"), b(t, e, s, "dispBlanksAs", "dispBlanksAs"), m(t, e, s, ".//extLst/ext/dataDisplayOptions16/dispNaAsBlank", "dispNaAsBlank"), m(t, e, s, "showDLblsOverMax", "showDLblsOverMax"), s;
197
+ }
198
+ afterVisit(t, e, s) {
199
+ try {
200
+ const r = t.getValAttrAsBoolean("autoTitleDeleted", e), o = t.evaluate("title", e);
201
+ t.setToPath(s, "title.shown", !(r === !0 || !o));
202
+ const i = t.evaluate("legend", e);
203
+ t.setToPath(s, "legend.shown", i !== null);
204
+ } catch (r) {
205
+ throw new Error("Unexpected Error parsing Chart: " + r);
206
+ }
207
+ }
208
+ }
209
+ class pt {
210
+ visit(t, e, s) {
211
+ let r = {};
212
+ return s.plotArea = r, r;
213
+ }
214
+ }
215
+ class I {
216
+ EnumMappings() {
217
+ }
218
+ static fromOoxmlGradientType(t) {
219
+ return t === "circle" ? "radial" : t;
220
+ }
221
+ static fromOoxmlLineCap(t) {
222
+ if (t === "rnd") return "round";
223
+ if (t === "flat") return "butt";
224
+ if (t === "sq") return "square";
225
+ throw new Error("Invalid lineCap type: " + t);
226
+ }
227
+ static fromOoxmlCompound(t) {
228
+ return t === "sng" ? "single" : t;
229
+ }
230
+ static fromOoxmlAlignment(t) {
231
+ return t === "ctr" ? "center" : t;
232
+ }
233
+ }
234
+ class J {
235
+ visit(t, e, s) {
236
+ }
237
+ processStroke(t, e, s) {
238
+ const r = {}, o = t.evaluate("ln", e);
239
+ if (o) {
240
+ o.hasAttribute("algn") && (r.align = I.fromOoxmlAlignment(o.getAttribute("algn"))), o.hasAttribute("cap") && (r.lineCap = I.fromOoxmlLineCap(o.getAttribute("cap"))), o.hasAttribute("cmpd") && (r.compound = I.fromOoxmlCompound(o.getAttribute("cmpd"))), o.hasAttribute("w") && (r.width = rt(o.getAttribute("w")));
241
+ const i = t.evaluate("miter", o);
242
+ i && (r.lineJoin = "miter", i.hasAttribute("lim") && (r.miter = parseFloat(i.getAttribute("lim")))), t.evaluate("bevel", o) && (r.lineJoin = "bevel"), t.evaluate("round", o) && (r.lineJoin = "round");
243
+ const n = t.evaluate("custDash", o);
244
+ if (n) {
245
+ const c = t.evaluate("ds", n);
246
+ if (c && c.length > 0) {
247
+ let h = "";
248
+ for (let p = 0; p < c.length; p++) {
249
+ const g = c.item(p);
250
+ h += A(g.getAttribute("d")) + "," + A(g.getAttribute("sp"));
251
+ }
252
+ r.dash = h;
253
+ }
254
+ }
255
+ const l = t.evaluate("prstDash", o);
256
+ l && l.hasAttribute("val") && (r.dash = l.getAttribute("val")), this.parseEndElement(t, o, r, "headEnd", "head"), this.parseEndElement(t, o, r, "tailEnd", "tail");
257
+ const a = this.processFill(t, o, s);
258
+ r.fill = a;
259
+ }
260
+ return r;
261
+ }
262
+ parseEndElement(t, e, s, r, o) {
263
+ const i = t.evaluate(r, e);
264
+ if (i && (i.hasAttribute("type") && (s[o + "Type"] = i.getAttribute("type")), i.hasAttribute("len") || i.hasAttribute("w"))) {
265
+ const n = i.getAttribute("len") ? i.getAttribute("len") : "med", l = i.getAttribute("w") ? i.getAttribute("w") : "med";
266
+ s[o + "Size"] = n + "-" + l;
267
+ }
268
+ }
269
+ processFill(t, e, s) {
270
+ const r = {};
271
+ if (t.evaluate("noFill", e)) return r.none = !0, r;
272
+ const o = t.evaluate("solidFill", e);
273
+ if (o) {
274
+ const a = this.processAdjColor(t, o);
275
+ return a && (r.solid = a), r;
276
+ }
277
+ const i = t.evaluate("gradFill", e);
278
+ if (i) {
279
+ i.hasAttribute("rotWithShape") && (r.isRotated = i.getAttribute("rotWithShape") === "1");
280
+ const a = this.processGradFill(t, i);
281
+ return r.gradient = a, r;
282
+ }
283
+ const n = t.evaluate("pattFill", e);
284
+ if (n) {
285
+ const a = this.processPatternFill(t, n);
286
+ return r.pattern = a, r;
287
+ }
288
+ const l = t.evaluate("blipFill", e);
289
+ if (l) {
290
+ l.hasAttribute("rotWithShape") && (r.isRotated = f(l.getAttribute("rotWithShape"))), l.hasAttribute("dpi") && (r.dpi = l.getAttribute("dpi"));
291
+ const a = this.processImageFill(t, l);
292
+ return r.image = a, r;
293
+ }
294
+ return r.none = !0, r;
295
+ }
296
+ processGradFill(t, e) {
297
+ const s = {}, r = t.evaluate("lin", e);
298
+ if (r) {
299
+ if (s.type = "linear", r.hasAttribute("ang")) {
300
+ const c = D(r.getAttribute("ang"));
301
+ s.angle = c;
302
+ }
303
+ if (r.hasAttribute("scaled")) {
304
+ const c = f(r.getAttribute("scaled"));
305
+ s.scaled = c;
306
+ }
307
+ }
308
+ const o = {};
309
+ e.hasAttribute("flip") && (o.mirror = e.getAttribute("flip")), Object.keys(o).length > 0 && (s.tile = o);
310
+ const i = t.evaluate("path", e);
311
+ if (i) {
312
+ i.hasAttribute("path") && (s.type = I.fromOoxmlGradientType(i.getAttribute("path")));
313
+ const c = t.evaluate("fillToRect", i);
314
+ c && (s.fillTo = this.getRect(c));
315
+ }
316
+ const n = t.evaluate("tileRect", e);
317
+ n && (s.tile.bounds = this.getRect(n));
318
+ const l = [], a = t.evaluate("gsLst/gs", e);
319
+ for (let c = 0; a && c < a.length; c++) {
320
+ const h = a.item(c), p = { offset: A(h.getAttribute("pos")), color: this.processAdjColor(t, h) };
321
+ l.push(p);
322
+ }
323
+ return l.length > 0 && (s.stops = l), s;
324
+ }
325
+ getRect(t) {
326
+ const e = {};
327
+ return t.hasAttribute("t") && (e.t = A(t.getAttribute("t"))), t.hasAttribute("l") && (e.l = A(t.getAttribute("l"))), t.hasAttribute("b") && (e.b = A(t.getAttribute("b"))), t.hasAttribute("r") && (e.r = A(t.getAttribute("r"))), Object.keys(e).length === 0 ? null : e;
328
+ }
329
+ processImageFill(t, e) {
330
+ return { ref: "https://www.sheetxl.com/logo-color-padded-white.jpg", tile: !1 };
331
+ }
332
+ processPatternFill(t, e) {
333
+ const s = {}, r = e.getAttribute("prst");
334
+ s.type = r;
335
+ const o = t.evaluate("bgClr", e);
336
+ if (o) {
337
+ const n = this.processAdjColor(t, o);
338
+ n && (s.background = n);
339
+ }
340
+ const i = t.evaluate("fgClr", e);
341
+ if (i) {
342
+ let n = this.processAdjColor(t, i);
343
+ n && (s.foreground = n);
344
+ }
345
+ return s;
346
+ }
347
+ processAdjColor(t, e) {
348
+ const s = t.evaluate("hslClr", e);
349
+ if (s) return this.processHslClr(t, s);
350
+ const r = t.evaluate("prstClr", e);
351
+ if (r) return this.processClrWithValAttribute(t, r);
352
+ const o = t.evaluate("schemeClr", e);
353
+ if (o) return this.processClrWithValAttribute(t, o);
354
+ const i = t.evaluate("sysClr", e);
355
+ if (i) return this.processClrWithValAttribute(t, i);
356
+ const n = t.evaluate("scrgbClr", e);
357
+ if (n) return this.processScrgbClrElement(t, n);
358
+ const l = t.evaluate("srgbClr", e);
359
+ return l ? this.processSrgbClrElement(t, l) : null;
360
+ }
361
+ processScrgbClrElement(t, e) {
362
+ let s = "lrgba(" + A(e.getAttribute("r")) + "," + A(e.getAttribute("g")) + "," + A(e.getAttribute("b")) + ")";
363
+ return s += this.processAdjustments(t, e), s;
364
+ }
365
+ processSrgbClrElement(t, e) {
366
+ let s = e.getAttribute("val");
367
+ return s += this.processAdjustments(t, e), s;
368
+ }
369
+ processHslClr(t, e) {
370
+ let s = "hsl(" + D(e.getAttribute("hue")) + "," + A(e.getAttribute("sat")) + "," + A(e.getAttribute("lum")) + ")";
371
+ return s += this.processAdjustments(t, e), s;
372
+ }
373
+ processClrWithValAttribute(t, e) {
374
+ const s = e.getAttribute("val");
375
+ if (!s) return;
376
+ let r = s;
377
+ return r += this.processAdjustments(t, e), r;
378
+ }
379
+ processAdjustments(t, e) {
380
+ let s = "";
381
+ const r = e.childNodes;
382
+ for (let o = 0; o < r.length; o++) {
383
+ const i = r.item(o);
384
+ if (i.nodeType === 1) {
385
+ let n = i.localName;
386
+ s += n === "hue" || n === "hueOff" || n === "hueMod" ? this.processAdjustmentElement(t, e, n, 6e4) : n === "gray" || n === "comp" || n === "inv" || n === "gamma" || n === "invGamma" ? this.processAdjustmentElement(t, e, n, 1) : this.processAdjustmentElement(t, e, n);
387
+ }
388
+ }
389
+ return s;
390
+ }
391
+ processAdjustmentElement(t, e, s, r = 1e3) {
392
+ const o = t.evaluate(s, e);
393
+ if (!o) return "";
394
+ const i = o.getAttribute("val");
395
+ return i ? ` ${s} ${!i || parseFloat(i) / r}` : ` ${s}`;
396
+ }
397
+ }
398
+ class M extends J {
399
+ visit(t, e, s) {
400
+ try {
401
+ const r = t.evaluate("xfrm", e);
402
+ if (r) {
403
+ H(r, s);
404
+ const l = { x: 0, y: 0, width: 0, height: 0 }, a = t.evaluate("off", r);
405
+ a && (l.x = x(a.getAttribute("x")) ?? 0, l.y = x(a.getAttribute("y")) ?? 0);
406
+ const c = t.evaluate("ext", r);
407
+ a && (l.width = x(c.getAttribute("cx")) ?? 0, l.height = x(c.getAttribute("cy")) ?? 0), s.bounds = l;
408
+ }
409
+ const o = t.evaluate("prstGeom", e);
410
+ o?.hasAttribute("prst") ? s.geometry = o?.getAttribute("prst") : t.evaluate("customGeom", e) && console.warn("customGeom not supported yet");
411
+ const i = this.processFill(t, e, s);
412
+ i && Object.keys(i).length > 0 && (s.fill = i);
413
+ const n = this.processStroke(t, e, s);
414
+ return n && Object.keys(n).length > 0 && (s.stroke = n), s;
415
+ } catch (r) {
416
+ throw console.warn(r), new Error("Unexpected Error parsing Shape Properties element");
417
+ }
418
+ }
419
+ }
420
+ class S {
421
+ visit(t, e, s) {
422
+ let r = {};
423
+ if (b(t, e, r, "grouping", "grouping"), m(t, e, r, "varyColors", "varyColors"), y(t, e, r, "gapWidth", "gapWidth", 0.01), y(t, e, r, "overlap", "overlap", 0.01), this.parseType(t, e, r), w(t, e, r, "bubbleScale", "bubbleScale"), m(t, e, r, "showNegBubbles", "showNegativeBubbleValues"), m(t, e, r, "sizeRepresents", "bubbleSizeRepresentsWidth"), w(t, e, r, "firstSliceAng", "startAngle"), w(t, e, r, "holeSize", "holeSize"), b(t, e, r, "scatterStyle", "scatterStyle"), this.parseAxisIds(t, e, r), Object.keys(r).length > 0) {
424
+ let o = t.getVisitorParamsState().get("types");
425
+ o || (o = [], t.getVisitorParamsState().set("types", o)), o.push(r);
426
+ }
427
+ return r;
428
+ }
429
+ parseType(t, e, s) {
430
+ switch (e.localName) {
431
+ case "areaChart":
432
+ s.type = "area";
433
+ break;
434
+ case "bubbleChart":
435
+ s.type = "bubble";
436
+ break;
437
+ case "doughnutChart":
438
+ case "ofPieType":
439
+ case "pieChart":
440
+ s.type = "pie";
441
+ break;
442
+ case "lineChart":
443
+ s.type = "line";
444
+ break;
445
+ case "scatterChart":
446
+ s.type = "scatter";
447
+ }
448
+ }
449
+ parseAxisIds(t, e, s) {
450
+ const r = t.evaluate("axId", e);
451
+ if (r.length === 0) return;
452
+ const o = r.item(0).getAttribute("val");
453
+ s.xAxisId = o;
454
+ const i = r.item(1).getAttribute("val");
455
+ s.yAxisId = i;
456
+ }
457
+ }
458
+ class gt extends S {
459
+ parseType(t, e, s) {
460
+ const r = t.getValAttrAsString("barDir", e);
461
+ r && (s.type = r === "col" ? "column" : "bar");
462
+ }
463
+ }
464
+ class N {
465
+ constructor(t) {
466
+ this.jsonKey = t;
467
+ }
468
+ visit(t, e, s) {
469
+ let r = {}, o = r, i = t.getValAttrAsString("idx", e);
470
+ i !== null && (o = {}, o[i] = r);
471
+ const n = t.getValAttrAsBoolean("delete", e);
472
+ this.parseNumFormat(t, e, r), n === !0 ? (r.showBubbleSize = !1, r.showCatName = !1, r.showLeaderLines = !1, r.showPercentage = !1, r.showSerName = !1, r.showVal = !1, r.showLegendKey = !1) : (m(t, e, r, "showBubbleSize", "showBubbleSize"), m(t, e, r, "showCatName", "showCatName"), m(t, e, r, "showLeaderLines", "showLeaderLines"), m(t, e, r, "showPercent", "showPercentage"), m(t, e, r, "showSerName", "showSerName"), m(t, e, r, "showVal", "showVal"), m(t, e, r, "showLegendKey", "showLegendKey"));
473
+ const l = t.evaluate("separator", e);
474
+ return l !== null && (r.separator = l.textContent), b(t, e, r, "dLblPos", "position"), s[this.jsonKey] = o, r;
475
+ }
476
+ parseNumFormat(t, e, s) {
477
+ const r = t.evaluate("numFmt", e);
478
+ if (r) {
479
+ const o = r.getAttribute("formatCode");
480
+ s.formatCode = o, r.hasAttribute("sourceLinked") && (s.sourceLinked = r.getAttribute("sourceLinked") === "1");
481
+ }
482
+ }
483
+ }
484
+ const q = (u, t, e) => {
485
+ if (u.getValAttrAsBoolean("invertIfNegative", t) === !0) if (u.evaluate("extLst/ext/invertSolidFillFmt", t)) {
486
+ if (e.fill && e.fillNegative) {
487
+ const s = u.getFromPath(e, "fill.solid.adjs");
488
+ s && u.setToPath(e, "fillNegative.solid.adjs", s);
489
+ }
490
+ } else {
491
+ const s = { val: "FFFFFF" }, r = {};
492
+ r.solid = s, e.fillNegative = r;
493
+ const o = { val: "000000" }, i = {};
494
+ i.solid = o;
495
+ const n = {};
496
+ n.fill = i, e.strokeNegative = n;
497
+ }
498
+ };
499
+ class dt {
500
+ visit(t, e, s) {
501
+ const r = {};
502
+ w(t, e, r, "explosion", "explosion");
503
+ let o = t.evaluate("cat/*/f", e);
504
+ o || (o = t.evaluate("xVal/*/f", e));
505
+ let i = null;
506
+ o !== null && o.firstChild !== null && (i = o.firstChild.nodeValue), o || (o = t.evaluate("cat/strLit", e), o || (o = t.evaluate("cat/numLit", e)), o && (i = this.parsePointsAsString(t, o))), i !== null && (r.xRange = i);
507
+ let n = t.evaluate("val/*/f", e);
508
+ n || (n = t.evaluate("yVal/*/f", e));
509
+ let l = null;
510
+ n && n.firstChild && (l = n.firstChild.nodeValue), n || (n = t.evaluate("val/numLit", e), n !== null && (l = this.parsePointsAsString(t, n))), l !== null && (r.valRange = l), this.parseTitleRangeOrValue(t, e, r), w(t, e, r, "idx", "idx"), m(t, e, r, "smooth", "smooth");
511
+ const a = t.getVisitorParamsState().get("types").length - 1;
512
+ r.offsetChart = a;
513
+ let c = t.getVisitorParamsState().get("series");
514
+ return c || (c = [], t.getVisitorParamsState().set("series", c)), c.push(r), r;
515
+ }
516
+ parseTitleRangeOrValue(t, e, s) {
517
+ const r = t.evaluate("tx/strRef/f", e);
518
+ if (r !== null) {
519
+ const o = r.firstChild.nodeValue;
520
+ t.setToPath(s, "title.range", o);
521
+ } else {
522
+ const o = t.evaluate("tx/v", e);
523
+ o !== null && t.setToPath(s, "title.text.simpleRun", o.firstChild.nodeValue);
524
+ }
525
+ }
526
+ parsePointsAsString(t, e) {
527
+ let s = "{";
528
+ const r = t.getValAttrAsInteger("ptCount", e), o = t.evaluate("pt", e), i = [];
529
+ for (let n = 0; o && r && n < r; n++) {
530
+ let l = null, a = t.evaluate("pt[@idx='" + n + "']/v", e);
531
+ a instanceof Node && (l = a.textContent), i[n] = l;
532
+ }
533
+ for (let n = 0; n < i.length; n++) n > 0 && (s += ","), i[n] !== void 0 && (s += i[n]);
534
+ return s += "}", s;
535
+ }
536
+ afterVisit(t, e, s) {
537
+ q(t, e, s);
538
+ let r = t.getFromPath(s, "points");
539
+ if (r) {
540
+ const o = Object.keys(r);
541
+ for (let i = 0; i < o.length; i++) {
542
+ const n = o[i], l = t.getFromPath(r, n);
543
+ if (!l) continue;
544
+ let a = t.getFromPath(l, "markers");
545
+ a && (t.setToPath(s, "markers.points." + n, a), delete l.markers);
546
+ }
547
+ }
548
+ }
549
+ }
550
+ class mt {
551
+ DataPointVisitor() {
552
+ }
553
+ visit(t, e, s) {
554
+ let r = t.getFromPath(s, "points"), o = null;
555
+ r ? o = r : (o = {}, t.setToPath(s, "points", o));
556
+ let i = {}, n = t.getValAttrAsString("idx", e);
557
+ return n !== null && (o[n] = i), m(t, e, i, "bubble3D", "bubble3D"), w(t, e, i, "explosion", "explosion"), q(t, e, i), i;
558
+ }
559
+ }
560
+ class bt {
561
+ visit(t, e, s) {
562
+ const r = e.parentNode.localName;
563
+ if (r === "ser" || r === "dPt") {
564
+ const o = {}, i = t.getValAttrAsString("size", e);
565
+ i !== null && (o.size = i);
566
+ const n = t.getValAttrAsString("symbol", e);
567
+ return n && (o.type = n), s.markers = o, o;
568
+ }
569
+ return null;
570
+ }
571
+ }
572
+ class R {
573
+ visit(t, e, s) {
574
+ let r = {};
575
+ this.parseScaling(t, e, r), y(t, e, r, "majorUnit", "majorUnits"), y(t, e, r, "minorUnit", "minorUnits"), m(t, e, r, "delete", "shown"), this.parseOrientation(t, e, r), this.parseNumFormat(t, e, r), b(t, e, r, "majorTickMark", "majorTickMarks"), b(t, e, r, "minorTickMark", "minorTickMarks"), b(t, e, r, "crosses", "crosses"), y(t, e, r, "crossesAt", "crosses"), b(t, e, r, "crossBetween", "crossBetween"), this.parseLabelAlign(t, e, r), w(t, e, r, "lblOffset", "labelOffset"), b(t, e, r, "tickLblPos", "labelPosition");
576
+ const o = t.getValAttrAsInteger("noMultiLvlLbl", e);
577
+ r.labelMultiLevel = o !== null && o === 0, w(t, e, r, "tickMarkSkip", "tickMarkSkip"), w(t, e, r, "tickLblSkip", "labelInterval"), this.parseDisplayCustOrBuiltInUnit(e, t, r), this.parseTimeUnits(t, e, r, "majorUnitDates", "majorTimeUnit", "majorUnit"), this.parseTimeUnits(t, e, r, "minorUnitDates", "minorTimeUnit", "minorUnit"), b(t, e, r, "baseTimeUnit", "baseUnitDates"), t.getVisitorParamsState().get("axes") || t.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map());
578
+ const i = t.getValAttrAsString("axId", e);
579
+ return t.getVisitorParamsState().get("axes").set(i, r), r;
580
+ }
581
+ parseTimeUnits(t, e, s, r, o, i) {
582
+ const n = {};
583
+ let l = t.getValAttrAsString(o, e);
584
+ if (l !== null) {
585
+ n.dem = l;
586
+ let a = t.getValAttrAsString(i, e);
587
+ n.amt = a;
588
+ }
589
+ Object.keys(n).length > 0 && (s[r] = n);
590
+ }
591
+ parseDisplayCustOrBuiltInUnit(t, e, s) {
592
+ let r = e.getValAttrAsString("dispUnits/builtInUnit", t);
593
+ r || (r = e.getValAttrAsString("dispUnits/custUnit", t)), r && (s.displayUnits = r);
594
+ }
595
+ parseLabelAlign(t, e, s) {
596
+ let r = t.getValAttrAsString("lblAlgn", e);
597
+ r !== null && (r === "ctr" ? s.labelAlign = "center" : r === "l" ? s.labelAlign = "left" : r === "r" && (s.labelAlign = "right"));
598
+ }
599
+ parseOrientation(t, e, s) {
600
+ const r = t.getValAttrAsString("AxPos", e);
601
+ r !== null && (r === "b" ? s.orientation = "bottom" : r === "l" ? s.orientation = "left" : r === "r" ? s.orientation = "right" : r === "t" && (s.orientation = "top"));
602
+ }
603
+ parseNumFormat(t, e, s) {
604
+ const r = {}, o = t.evaluate("numFmt", e);
605
+ o !== null && (o.hasAttribute("formatCode") && (r.formatCode = o.getAttribute("formatCode")), o.hasAttribute("sourceLinked") && (r.sourceLinked = o.getAttribute("sourceLinked") === "1")), Object.keys(r).length > 0 && (s.labels = r);
606
+ }
607
+ parseScaling(t, e, s) {
608
+ const r = t.getValAttrAsString("scaling/orientation", e);
609
+ r !== null && (s.inverted = r !== "minMax");
610
+ const o = t.getValAttrAsFloat("scaling/logBase", e);
611
+ o !== null && (s.logBase = o, s.scaleType = "log"), y(t, e, s, "scaling/max", "max"), y(t, e, s, "scaling/min", "min");
612
+ }
613
+ afterVisit(t, e, s) {
614
+ s.fill && s.labels && (s.labels.fill = s.fill, delete s.fill);
615
+ let r = t.getValAttrAsBoolean("delete", e);
616
+ r !== null && (t.setToPath(s, "labels.shown", r !== !0), t.setToPath(s, "shown", r !== !0));
617
+ const o = t.getFromPath(s, "dispUnits.displayUnitsLabel");
618
+ o && (t.setToPath(s, "displayUnitsLabel", o), delete s.dispUnits);
619
+ const i = t.evaluate("title", e);
620
+ t.setToPath(s, "title.shown", i !== null);
621
+ const n = t.evaluate("minorGridlines", e);
622
+ t.setToPath(s, "gridLinesMinor.shown", n !== null);
623
+ const l = t.evaluate("majorGridlines", e);
624
+ t.setToPath(s, "gridLinesMajor.shown", l !== null);
625
+ }
626
+ }
627
+ class F {
628
+ constructor(t = "text") {
629
+ this._jsonKey = t;
630
+ }
631
+ getTextPath() {
632
+ return this._jsonKey;
633
+ }
634
+ visit(t, e, s) {
635
+ let r = t.getFromPath(s, this.getTextPath());
636
+ return r || (r = {}), this.parseTextElement(t, e, r, !1), Object.keys(r).length > 0 && t.setToPath(s, this.getTextPath(), r), s;
637
+ }
638
+ parseTextElement(t, e, s, r) {
639
+ const o = t.evaluate("p/pPr/defRPr", e) ?? t.evaluate("defRPr", e);
640
+ o && (this.parseTextProperties(t, o, s), new M().visit(t, o, s));
641
+ let i = [], n = t.evaluate("p/r", e) ?? t.evaluate("r", e);
642
+ const l = (c) => {
643
+ const h = {};
644
+ let p = t.evaluate("t", c);
645
+ const g = t.evaluate("rPr", c);
646
+ g && this.parseTextProperties(t, g, h), p ? h.text = p.firstChild.textContent ?? "" : c.textContent && (h.text = c.textContent ?? ""), i.push(h);
647
+ };
648
+ if (n?.length !== void 0) for (let c = 0; n && c < n.length; c++) l(n.item(c));
649
+ else l(n || e);
650
+ i.length > 0 && (s.runs = i);
651
+ const a = t.evaluate("bodyPr", e);
652
+ a && H(a, s);
653
+ }
654
+ parseTextProperties(t, e, s) {
655
+ if (!e) return;
656
+ e.hasAttribute("sz") && (s.size = parseFloat(e.getAttribute("sz")) / 100), e.hasAttribute("b") && (s.weight = e.getAttribute("b") === "1" ? 700 : 400), e.hasAttribute("i") && (s.italic = e.getAttribute("i") === "1"), e.hasAttribute("u") && (s.underline = e.getAttribute("u")), e.hasAttribute("strike") && (s.strike = e.getAttribute("strike"));
657
+ const r = t.evaluate("latin", e);
658
+ if (r && !r.getAttribute("typeface").startsWith("+")) {
659
+ const o = s.font ?? {};
660
+ if (r.hasAttribute("typeface") && (o.family = r.getAttribute("typeface")), r.hasAttribute("panose")) {
661
+ const i = r.getAttribute("panose");
662
+ i && (o.fallbacks = [k.getPanoseFallback(i)]);
663
+ }
664
+ r.hasAttribute("pitchFamily") && (o.pitch = r.getAttribute("pitchFamily")), r.hasAttribute("charset") && (o.charset = r.getAttribute("charset")), Object.keys(o).length > 0 && (s.font = o);
665
+ }
666
+ }
667
+ }
668
+ class ft {
669
+ visit(t, e, s) {
670
+ let r = t.getVisitorParamsState().get("series")[t.getValAttrAsInteger("idx", e)];
671
+ if (r) {
672
+ let o = t.getFromPath(r, "title");
673
+ o || (o = {}, t.setToPath(r, "title", o));
674
+ let i = o, n = t.getValAttrAsBoolean("delete", e);
675
+ return n !== null && (i.shown = !n), i;
676
+ }
677
+ return s;
678
+ }
679
+ }
680
+ class At {
681
+ visit(t, e, s) {
682
+ const r = {};
683
+ return m(t, e, r, "overlay", "overlay"), b(t, e, r, "legendPos", "position"), s.legend = r, r;
684
+ }
685
+ }
686
+ class yt extends M {
687
+ visit(t, e, s) {
688
+ const r = this.processFill(t, e, s);
689
+ Object.keys(r).length > 0 && (s.fillNegative = r);
690
+ const o = this.processStroke(t, e, s);
691
+ return Object.keys(o).length > 0 && (s.strokeNegative = o), s;
692
+ }
693
+ }
694
+ class X extends F {
695
+ constructor(t = "title") {
696
+ super(t);
697
+ }
698
+ parseTitleRangeOrValue(t, e, s) {
699
+ let r = t.evaluate("tx/strRef/f", e) ?? null;
700
+ if (r) {
701
+ const o = r.firstElementChild.nodeValue;
702
+ t.setToPath(s, "range", o);
703
+ }
704
+ }
705
+ visit(t, e, s) {
706
+ const r = {};
707
+ m(t, e, r, "overlay", "overlay"), s[this._jsonKey] = r;
708
+ let o = t.getFromPath(r, this.getTextPath());
709
+ o || (o = {}), this.parseTitleRangeOrValue(t, e, r);
710
+ const i = t.evaluate("txPr", e);
711
+ i && this.parseTextElement(t, i, o, !1);
712
+ const n = t.evaluate("tx/rich", e);
713
+ return n && this.parseTextElement(t, n, o, !0), Object.keys(o).length > 0 && t.setToPath(r, this.getTextPath(), o), r;
714
+ }
715
+ afterVisit(t, e, s) {
716
+ if (s?.text) {
717
+ const r = s.text?.rotation ?? null;
718
+ r !== null && (s.rotation = parseInt(r), delete s.title.rotation);
719
+ }
720
+ }
721
+ }
722
+ class vt {
723
+ visit(t, e, s) {
724
+ const r = t.evaluate("manualLayout", e);
725
+ if (r) {
726
+ let o = {};
727
+ y(t, r, o, "x", "x"), y(t, r, o, "y", "y"), y(t, r, o, "w", "w"), y(t, r, o, "h", "h"), b(t, r, o, "xMode", "xMode"), b(t, r, o, "yMode", "yMode"), b(t, r, o, "wMode", "wMode"), b(t, r, o, "hMode", "hMode"), Object.keys(o).length > 0 && (s.manualLayout = o);
728
+ }
729
+ return s;
730
+ }
731
+ }
732
+ class Ft {
733
+ visit(t, e, s) {
734
+ return s.name = e.getAttribute("name"), s;
735
+ }
736
+ }
737
+ class Ct extends J {
738
+ visit(t, e, s) {
739
+ const r = {};
740
+ r.name = e.getAttribute("name");
741
+ const o = e.childNodes;
742
+ for (let i = 0; i < o.length; i++) {
743
+ const n = o.item(i);
744
+ if (n.nodeType === 1) {
745
+ let l = n.localName;
746
+ const a = t.evaluate(l, e), c = this.processAdjColor(t, a);
747
+ r[l] = c;
748
+ }
749
+ }
750
+ return Object.keys(r).length > 0 && (s.colors = r), r;
751
+ }
752
+ }
753
+ class wt {
754
+ visit(t, e, s) {
755
+ const r = {};
756
+ r.name = e.getAttribute("name");
757
+ const o = t.evaluate("majorFont", e), i = this.processFontElement(t, o, {});
758
+ r.majorFont = i.family, i.fallbacks && (r.majorFallbacks = i.fallbacks);
759
+ const n = t.evaluate("minorFont", e), l = this.processFontElement(t, n, {});
760
+ return r.minorFont = l.family, i.fallbacks && (r.minorFallbacks = l.fallbacks), s.fonts = r, r;
761
+ }
762
+ processFontElement(t, e, s) {
763
+ if (!e) return;
764
+ const r = t.evaluate("latin", e);
765
+ if (!r) return;
766
+ const o = r.getAttribute("typeface");
767
+ o && (s.family = o);
768
+ const i = r.getAttribute("panose");
769
+ return i && (s.fallbacks = [k.getPanoseFallback(i)]), s;
770
+ }
771
+ }
772
+ class Pt {
773
+ visit(t, e, s) {
774
+ if (!e) return;
775
+ const r = {}, o = e.getAttribute("r:id");
776
+ if (o) {
777
+ const i = t.getRef(o);
778
+ typeof i == "string" && (r.address = i);
779
+ }
780
+ return t.copyFromAttribute(e, "tooltip", r), t.copyFromAttribute(e, "history", r, "history", t.BOOLEAN_COPY), t.copyFromAttribute(e, "tgtFrame", r, "target"), s.hyperlink = r, r;
781
+ }
782
+ }
783
+ class Nt {
784
+ visit(t, e, s) {
785
+ if (!e) return;
786
+ const r = {};
787
+ return t.copyFromAttribute(e, "ref", r), this.processFilterColumns(t, e, r), Object.keys(r).length > 0 && (s.filter = r), r;
788
+ }
789
+ processColorFilter(t, e) {
790
+ const s = { type: T.Type.Color };
791
+ return t.copyFromAttribute(e, "cellColor", s, "cellColor", t.BOOLEAN_COPY), t.copyFromAttribute(e, "dxfId", s, "styleId", t.INT_COPY), s;
792
+ }
793
+ processCustomFilter(t, e) {
794
+ const s = {};
795
+ return t.copyFromAttribute(e, "operator", s, "operator", t.BOOLEAN_COPY), t.copyFromAttribute(e, "val", s, "val"), s;
796
+ }
797
+ processCustomFilters(t, e) {
798
+ const s = { type: T.Type.Custom };
799
+ t.copyFromAttribute(e, "and", s, "and", t.BOOLEAN_COPY);
800
+ const r = e.childNodes;
801
+ s.filters = [];
802
+ for (let o = 0; o < r.length; o++) {
803
+ const i = r.item(o);
804
+ if (i.nodeType !== 1) continue;
805
+ let n = null;
806
+ i.localName === "customFilter" && (n = this.processCustomFilter(t, i)), n && s.filters.push(n);
807
+ }
808
+ return s;
809
+ }
810
+ processDynamicFilter(t, e) {
811
+ const s = { type: T.Type.Dynamic };
812
+ return t.copyFromAttribute(e, "type", s, "dynamicType"), t.copyFromAttribute(e, "val", s, "val", t.INT_COPY), t.copyFromAttribute(e, "maxVal", s, "maxVal", t.INT_COPY), s;
813
+ }
814
+ processDateGroupItem(t, e) {
815
+ const s = {};
816
+ return t.copyFromAttribute(e, "dateTimeGrouping", s, "group"), t.copyFromAttribute(e, "day", s, "day", t.INT_COPY), t.copyFromAttribute(e, "hour", s, "hour", t.INT_COPY), t.copyFromAttribute(e, "minute", s, "minute", t.INT_COPY), t.copyFromAttribute(e, "month", s, "month", t.INT_COPY), t.copyFromAttribute(e, "second", s, "second", t.INT_COPY), t.copyFromAttribute(e, "year", s, "year", t.INT_COPY), s;
817
+ }
818
+ processFilterItem(t, e) {
819
+ if (e.hasAttribute("val")) return e.getAttribute("val");
820
+ }
821
+ processFilters(t, e) {
822
+ const s = { type: T.Type.Items };
823
+ t.copyFromAttribute(e, "blank", s, "blank", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calendarType", s, "calendarType");
824
+ let r = [], o = [];
825
+ const i = e.childNodes;
826
+ for (let n = 0; n < i.length; n++) {
827
+ const l = i.item(n);
828
+ if (l.nodeType === 1) {
829
+ if (l.localName === "dateGroupItem") {
830
+ const a = this.processDateGroupItem(t, l);
831
+ a && r.push(a);
832
+ } else if (l.localName === "filter") {
833
+ const a = this.processFilterItem(t, l);
834
+ a !== void 0 && o.push(a);
835
+ }
836
+ }
837
+ }
838
+ return r.length > 0 && (s.dateGroups = r), o.length > 0 && (s.items = o), s;
839
+ }
840
+ processIcon(t, e) {
841
+ const s = { type: T.Type.Icon };
842
+ return t.copyFromAttribute(e, "iconId", s, "iconId", t.INT_COPY), t.copyFromAttribute(e, "iconSet", s), s;
843
+ }
844
+ processTop10(t, e) {
845
+ const s = { type: T.Type.Top10 };
846
+ return t.copyFromAttribute(e, "filterVal", s, "filterVal", t.FLOAT_COPY), t.copyFromAttribute(e, "percent", s, "percent", t.BOOLEAN_COPY), t.copyFromAttribute(e, "top", s, "top", t.BOOLEAN_COPY), t.copyFromAttribute(e, "val", s, "val", t.FLOAT_COPY), s;
847
+ }
848
+ processFilterCriteria(t, e, s) {
849
+ if (!e) return;
850
+ const r = e.childNodes, o = [];
851
+ for (let i = 0; i < r.length; i++) {
852
+ const n = r.item(i);
853
+ if (n.nodeType !== 1) continue;
854
+ let l = null;
855
+ n.localName === "colorFilter" ? l = this.processColorFilter(t, n) : n.localName === "customFilters" ? l = this.processCustomFilters(t, n) : n.localName === "dynamicFilter" ? l = this.processDynamicFilter(t, n) : n.localName === "filters" ? l = this.processFilters(t, n) : n.localName === "iconFilter" ? l = this.processIcon(t, n) : n.localName === "top10" && (l = this.processTop10(t, n)), l && o.push(l);
856
+ }
857
+ return o.length > 0 && (s.criteria = o), o;
858
+ }
859
+ processFilterColumn(t, e) {
860
+ if (!e) return null;
861
+ const s = {};
862
+ if (!e.hasAttribute("colId")) return;
863
+ s.offset = parseInt(e.getAttribute("colId"));
864
+ let r = !1;
865
+ return e.hasAttribute("hiddenButton") && (r = f(e.getAttribute("hiddenButton"))), r && (s.hiddenButton = !0), e.hasAttribute("showButton") && (s.showButton = f(e.getAttribute("showButton"))), this.processFilterCriteria(t, e, s), s;
866
+ }
867
+ processFilterColumns(t, e, s) {
868
+ if (!e) return;
869
+ const r = e.childNodes, o = [];
870
+ for (let i = 0; i < r.length; i++) {
871
+ const n = r.item(i);
872
+ if (n.nodeType === 1 && n.localName === "filterColumn") {
873
+ const l = this.processFilterColumn(t, n);
874
+ l && o.push(l);
875
+ }
876
+ }
877
+ return o.length > 0 && (s.fields = o), o;
878
+ }
879
+ }
880
+ class Ot {
881
+ visit(t, e, s) {
882
+ if (!e) return;
883
+ const r = {};
884
+ if (t.copyFromAttribute(e, "ref", r), e.hasAttribute("caseSensitive")) {
885
+ const n = f(e.getAttribute("caseSensitive"));
886
+ r.collatorOptions = n ? G.CaseSensitiveOptions : G.CaseInsensitiveOptions;
887
+ }
888
+ const o = e.getAttribute("sortMethod");
889
+ o != null && o !== "none" && (o === "stroke" ? r.collatorOptions = { ...r.collatorOptions, collation: "stroke" } : o === "pinYin" && (r.collatorOptions = { ...r.collatorOptions, collation: "pinyin" })), e.hasAttribute("columnSort") && f(e.getAttribute("columnSort")) && (r.orientation = Z.Orientation.Column);
890
+ const i = W.fastStringToRange(r.ref);
891
+ return this.processSortConditions(t, e, r, i), Object.keys(r).length > 0 && (s.sort = r), r;
892
+ }
893
+ processSortCondition(t, e, s) {
894
+ if (!e) return null;
895
+ const r = {};
896
+ if (e.hasAttribute("ref")) {
897
+ if (e.hasAttribute("ref")) {
898
+ const o = e.getAttribute("ref"), i = W.fastStringToRange(o);
899
+ r.offset = s ? i.colStart - s.colStart : i.colStart;
900
+ }
901
+ return r.reverse = !1, e.hasAttribute("descending") && (r.reverse = f(e.getAttribute("descending"))), t.copyFromAttribute(e, "sortBy", r, "sortOn"), t.copyFromAttribute(e, "dxfId", r), t.copyFromAttribute(e, "iconSet", r), t.copyFromAttribute(e, "customList", r), r;
902
+ }
903
+ console.warn("no ref for sort conditional", t.getPath());
904
+ }
905
+ processSortConditions(t, e, s, r) {
906
+ if (!e) return;
907
+ const o = e.childNodes, i = [];
908
+ for (let n = 0; n < o.length; n++) {
909
+ const l = o.item(n);
910
+ if (l.nodeType === 1 && l.localName === "sortCondition") {
911
+ const a = this.processSortCondition(t, l, r);
912
+ a && i.push(a);
913
+ }
914
+ }
915
+ return i.length > 0 && (s.fields = i), i;
916
+ }
917
+ }
918
+ class Q {
919
+ visit(t, e, s) {
920
+ }
921
+ processDataBarColor(t, e, s, r, o = "dk1") {
922
+ if (!e) return;
923
+ const i = st((n) => e.getAttribute(n), o);
924
+ return i && (s[r] = i), s;
925
+ }
926
+ processFonts(t, e, s) {
927
+ if (!e) return;
928
+ const r = e.childNodes;
929
+ let o = 0;
930
+ for (let i = 0; i < r.length; i++) {
931
+ const n = r.item(i);
932
+ if (n.nodeType === 1 && n.localName === "font") {
933
+ const l = {};
934
+ this.processFont(t, n, l), s[o++] = l;
935
+ }
936
+ }
937
+ return s;
938
+ }
939
+ processFont(t, e, s) {
940
+ t.getValAttrAsBoolean("b", e, !0) && (s.weight = 700), t.getValAttrAsBoolean("i", e, !0) && (s.style = k.Style.Italic), t.getValAttrAsBoolean("strike", e, !0) && (s.strike = !0);
941
+ const r = t.evaluate("u", e);
942
+ if (r) {
943
+ const n = r.getAttribute("val");
944
+ s.underline = n || k.UnderlineStyle.Single;
945
+ }
946
+ b(t, e, s, "vertAlign", "verticalAlign"), s.verticalAlign === "superscript" ? s.verticalAlign = k.VerticalAlignment.Super : s.verticalAlign === "subscript" && (s.verticalAlign = k.VerticalAlignment.Sub), y(t, e, s, "sz", "size");
947
+ const o = t.evaluate("color", e);
948
+ this.processDataBarColor(t, o, s, "fill"), s.fill || (s.fill = "dk1"), b(t, e, s, "name", "family"), b(t, e, s, "rFont", "family");
949
+ const i = t.evaluate("family", e);
950
+ if (i) {
951
+ const n = i.getAttribute("val");
952
+ if (n) switch (n) {
953
+ case "1":
954
+ s.fallbacks = ["serif"];
955
+ break;
956
+ case "2":
957
+ s.fallbacks = ["sans-serif"];
958
+ break;
959
+ case "3":
960
+ s.fallbacks = ["monospace"];
961
+ break;
962
+ case "4":
963
+ s.fallbacks = ["cursive"];
964
+ break;
965
+ case "5":
966
+ s.fallbacks = ["fantasy"];
967
+ }
968
+ }
969
+ return b(t, e, s, "scheme", "scheme"), m(t, e, s, "shadow", "shadow", !0), m(t, e, s, "outline", "outline", !0), t.getValAttrAsBoolean("condense", e, !0) && (s.letterSpacing = -1), t.getValAttrAsBoolean("extend", e, !0) && (s.letterSpacing = 1), b(t, e, s, "charset", "charset"), s;
970
+ }
971
+ processFills(t, e, s) {
972
+ if (!e) return;
973
+ const r = e.childNodes;
974
+ let o = 0;
975
+ for (let i = 0; i < r.length; i++) {
976
+ const n = r.item(i);
977
+ n.nodeType === 1 && n.localName === "fill" && this.processFill(t, n, s, o++);
978
+ }
979
+ return s;
980
+ }
981
+ processFill(t, e, s, r) {
982
+ const o = { type: C.Type.None }, i = e.childNodes;
983
+ let n = !1;
984
+ for (let l = 0; !n && l < i.length; l++) {
985
+ const a = i.item(l);
986
+ a.nodeType === 1 && (a.localName === "gradientFill" ? (this.processGradientFill(t, a, o), n = !0) : a.localName === "patternFill" && (this.processPatternFill(t, a, o), n = !0));
987
+ }
988
+ return s[r] = o, s;
989
+ }
990
+ processGradientFill(t, e, s) {
991
+ if (!e) return;
992
+ s.type = C.Type.Gradient;
993
+ const r = [];
994
+ s.stops = r, s.angle = 90 + (e.hasAttribute("degree") ? parseFloat(e.getAttribute("degree")) : 0);
995
+ const o = e.getAttribute("type");
996
+ o && (s.gradientType = o);
997
+ const i = (l) => {
998
+ if (!l) return 0;
999
+ const a = parseFloat(l);
1000
+ return isNaN(a) ? 0 : a;
1001
+ };
1002
+ (e.hasAttribute("left") || e.hasAttribute("top") || e.hasAttribute("right") || e.hasAttribute("bottom")) && (s.fillTo = { left: i(e.getAttribute("left")), top: i(e.getAttribute("top")), right: i(e.getAttribute("right")), bottom: i(e.getAttribute("bottom")) });
1003
+ const n = e.childNodes;
1004
+ for (let l = 0; l < n.length; l++) {
1005
+ const a = n.item(l);
1006
+ if (a.nodeType === 1 && a.localName === "stop") {
1007
+ const c = {};
1008
+ r.push(c);
1009
+ const h = parseFloat(a.getAttribute("position"));
1010
+ c.offset = h;
1011
+ const p = t.evaluate("color", a);
1012
+ this.processDataBarColor(t, p, c, "color");
1013
+ }
1014
+ }
1015
+ return s;
1016
+ }
1017
+ processPatternFill(t, e, s) {
1018
+ if (!e) return;
1019
+ const r = t.getVisitorParamsState().get("processingDXFs"), o = e.getAttribute("patternType") || (r ? C.BuiltInSheetPattern.Solid : C.BuiltInSheetPattern.None);
1020
+ if (o === C.BuiltInSheetPattern.None) return { none: !0 };
1021
+ s.type = C.Type.Pattern, o && (s.patternType = o);
1022
+ let i, n = "foreground", l = "background";
1023
+ const a = s.patternType === C.BuiltInSheetPattern.Solid && r;
1024
+ if (a) {
1025
+ i = "lt1";
1026
+ const p = n;
1027
+ n = l, l = p;
1028
+ }
1029
+ const c = t.evaluate("fgColor", e);
1030
+ this.processDataBarColor(t, c, s, n, i);
1031
+ const h = t.evaluate("bgColor", e);
1032
+ return this.processDataBarColor(t, h, s, l, i), a && !s.foreground && (s.foreground = i), s;
1033
+ }
1034
+ processBorders(t, e, s, r) {
1035
+ if (!e) return;
1036
+ const o = e.childNodes;
1037
+ let i = 0;
1038
+ for (let n = 0; n < o.length; n++) {
1039
+ const l = o.item(n);
1040
+ l.nodeType === 1 && l.localName === "border" && this.processBorder(t, l, s, i++, r);
1041
+ }
1042
+ return s;
1043
+ }
1044
+ processBorder(t, e, s, r, o) {
1045
+ if (!e) return;
1046
+ const i = {};
1047
+ return this.processBorderStroke(t, e, i, V.Edge.Left), this.processBorderStroke(t, e, i, V.Edge.Right), o ? (i.right || i.left) && (i.right ? i.vertical = { ...i.right } : i.vertical = { ...i.left }) : this.processBorderStroke(t, e, i, V.Edge.Vertical), this.processBorderStroke(t, e, i, V.Edge.Top), this.processBorderStroke(t, e, i, V.Edge.Bottom), o ? (i.bottom || i.top) && (i.right ? i.horizontal = { ...i.bottom } : i.horizontal = { ...i.top }) : this.processBorderStroke(t, e, i, V.Edge.Horizontal), s[r] = i, s;
1048
+ }
1049
+ processBorderStroke(t, e, s, r) {
1050
+ if (!e) return;
1051
+ const o = t.evaluate(r, e);
1052
+ if (!o) return;
1053
+ const i = {};
1054
+ o.hasAttribute("style") && (i.style = o.getAttribute("style"));
1055
+ const n = t.evaluate("color", o);
1056
+ return n && this.processDataBarColor(t, n, i, "color"), Object.keys(i).length > 0 ? s[r] = i : null;
1057
+ }
1058
+ }
1059
+ class Tt extends Q {
1060
+ visit(t, e, s) {
1061
+ this.processNumFmts(t, t.evaluate("numFmts", e), null), t.getVisitorParamsState().set("colorsToProcess", /* @__PURE__ */ new Set());
1062
+ const r = { fills: {}, fonts: {}, borders: {} };
1063
+ this.processFonts(t, t.evaluate("fonts", e), r.fonts), this.processFills(t, t.evaluate("fills", e), r.fills), this.processBorders(t, t.evaluate("borders", e), r.borders, !0), r.fills[0] = { type: C.Type.None }, r.fills[1] = { type: C.Type.Pattern, patternType: C.BuiltInSheetPattern.Gray125 }, r.borders[0] = {};
1064
+ const o = [];
1065
+ this.processXFs(t, t.evaluate("cellStyleXfs", e), o, r, null, !1);
1066
+ const i = /* @__PURE__ */ new Map();
1067
+ if (o.length > 0) {
1068
+ const a = [];
1069
+ this.processCellStyles(t, t.evaluate("cellStyles", e), a, o, i), s.named = a;
1070
+ }
1071
+ const n = [];
1072
+ this.processXFs(t, t.evaluate("cellXfs", e), n, r, i), Object.keys(n).length > 0 && (s.direct = n);
1073
+ const l = [];
1074
+ return this.processDXFs(t, t.evaluate("dxfs", e), l), this.processTableStyles(t, t.evaluate("tableStyles", e), s, l), this.processIndexColors(t, t.evaluate("colors/indexedColors", e), s), this.processMruColors(t, t.evaluate("colors/mruColors", e), s), s;
1075
+ }
1076
+ processIndexColors(t, e, s) {
1077
+ if (!e) return;
1078
+ const r = [], o = e.childNodes;
1079
+ for (let i = 0; i < o.length; i++) {
1080
+ const n = o.item(i);
1081
+ if (n.nodeType === 1 && n.localName === "rgbColor") {
1082
+ const l = { color: null };
1083
+ this.processDataBarColor(t, n, l, "color"), l.color && r.push(l.color);
1084
+ }
1085
+ }
1086
+ s.indexedColors = r;
1087
+ }
1088
+ processMruColors(t, e, s) {
1089
+ if (!e) return;
1090
+ const r = [], o = e.childNodes;
1091
+ for (let i = 0; i < o.length; i++) {
1092
+ const n = o.item(i);
1093
+ if (n.nodeType === 1 && n.localName === "color") {
1094
+ const l = { color: null };
1095
+ this.processDataBarColor(t, n, l, "color"), l.color && r.push(l.color);
1096
+ }
1097
+ }
1098
+ r.length > 0 && (s.mruColors = r);
1099
+ }
1100
+ processNumFmts(t, e, s) {
1101
+ if (!e) return;
1102
+ const r = /* @__PURE__ */ new Map();
1103
+ if (t.getVisitorParamsState().set("numFmts", r), !e) return;
1104
+ const o = e.childNodes;
1105
+ for (let i = 0; i < o.length; i++) {
1106
+ const n = o.item(i);
1107
+ if (n.nodeType === 1 && n.localName === "numFmt") {
1108
+ const l = n.getAttribute("numFmtId"), a = n.getAttribute("formatCode");
1109
+ if (l && a) {
1110
+ const c = a.replace(/\\(.)/g, "$1");
1111
+ r.set(parseInt(l), c);
1112
+ }
1113
+ }
1114
+ }
1115
+ }
1116
+ processXFs(t, e, s, r, o = null, i = !0) {
1117
+ if (!e) return;
1118
+ const n = e.childNodes;
1119
+ for (let l = 0; l < n.length; l++) {
1120
+ const a = n.item(l);
1121
+ if (a.nodeType === 1 && a.localName === "xf") {
1122
+ const c = {};
1123
+ this.processXF(t, a, c, r, o, i), s.push(c);
1124
+ }
1125
+ }
1126
+ }
1127
+ processXF(t, e, s, r, o, i) {
1128
+ if (!e) return;
1129
+ const n = e.getAttribute("xfId");
1130
+ if (n && o) {
1131
+ const c = o.get(parseInt(n));
1132
+ c && c !== tt.BuiltInName.Normal && (s.named = c);
1133
+ }
1134
+ const l = (c) => !(!i && e.hasAttribute(c)) || f(e.getAttribute("applyFont"));
1135
+ if (l("applyFont")) {
1136
+ const c = r.fonts[e.getAttribute("fontId")];
1137
+ c && (s.font = c);
1138
+ }
1139
+ if (l("applyFill")) {
1140
+ const c = r.fills[e.getAttribute("fillId")];
1141
+ c && Object.keys(c).length > 0 && (s.fill = c);
1142
+ }
1143
+ if (l("applyBorder")) {
1144
+ const c = r.borders[e.getAttribute("borderId")];
1145
+ c && Object.keys(c).length > 0 && (s.border = c);
1146
+ }
1147
+ if (l("applyNumberFormat")) {
1148
+ const c = e.getAttribute("numFmtId");
1149
+ if (c) {
1150
+ const h = parseInt(c);
1151
+ let p;
1152
+ const g = t.getVisitorParamsState();
1153
+ if (g) {
1154
+ const d = g.get("numFmts");
1155
+ d && (p = d.get(h)), s.numberFormat = p ?? h;
1156
+ } else console.warn("no visitor params state");
1157
+ }
1158
+ }
1159
+ l("applyAlignment") && this.processAlignment(t, t.evaluate("alignment", e), s), l("applyProtection") && this.processProtection(t, t.evaluate("protection", e), s);
1160
+ const a = f(e.getAttribute("quotePrefix"));
1161
+ a && (s.quotePrefix = a);
1162
+ }
1163
+ processAlignment(t, e, s) {
1164
+ const r = {};
1165
+ if (e?.hasAttribute("horizontal") ? r.horizontal = e.getAttribute("horizontal") : r.horizontal = P.HorizontalAlignment.General, e?.hasAttribute("vertical") ? r.vertical = e.getAttribute("vertical") : r.vertical = P.VerticalAlignment.Bottom, e?.hasAttribute("indent") ? r.indent = parseInt(e.getAttribute("indent")) : r.indent = 0, e?.hasAttribute("relativeIndent") ? r.relativeIndent = parseInt(e.getAttribute("relativeIndent")) : r.relativeIndent = 0, f(e?.getAttribute("wrapText")) ? r.overflow = P.Overflow.Wrap : r.overflow = P.Overflow.Visible, f(e?.getAttribute("shrinkToFit")) && (r.overflow = P.Overflow.Shrink), e?.hasAttribute("textRotation")) {
1166
+ let i = parseFloat(e.getAttribute("textRotation"));
1167
+ i > 0 && i <= 90 ? i = 360 - i : i > 90 && i <= 180 ? i -= 90 : i === 255 && (i = 0, r.stacked = !0), r.rotation = i;
1168
+ } else r.rotation = 0;
1169
+ e?.hasAttribute("justifyLastLine") && (r.justifyLastLine = f(e.getAttribute("justifyLastLine")));
1170
+ const o = e?.getAttribute("readingOrder");
1171
+ return o && (o === "0" ? r.readingDirection = P.ReadingDirection.Auto : o === "1" ? r.readingDirection = P.ReadingDirection.LeftToRight : o === "2" ? r.readingDirection = P.ReadingDirection.RightToLeft : console.warn(`invalid readingOrder: ${o}`)), Object.keys(r).length > 0 && (s.alignment = r), s;
1172
+ }
1173
+ processProtection(t, e, s) {
1174
+ if (!e) return;
1175
+ const r = {}, o = e.getAttribute("locked");
1176
+ o && !f(o) && (r.edit = !0);
1177
+ const i = e.getAttribute("hidden");
1178
+ return i && f(i) && (r.formulaHidden = !0), Object.keys(r).length > 0 && (s.protection = r), s;
1179
+ }
1180
+ processDXF(t, e, s) {
1181
+ if (!e) return;
1182
+ const r = e.childNodes;
1183
+ for (let o = 0; o < r.length; o++) {
1184
+ const i = r.item(o);
1185
+ if (i.nodeType === 1 && i.localName === "font") {
1186
+ const n = {};
1187
+ this.processFont(t, i, n), s.font = n;
1188
+ } else if (i.nodeType === 1 && i.localName === "fill") {
1189
+ const n = [];
1190
+ this.processFill(t, i, n, 0), n.length > 0 && n[0] && (s.fill = n[0]);
1191
+ } else if (i.nodeType === 1 && i.localName === "border") {
1192
+ const n = [];
1193
+ this.processBorder(t, i, n, 0, !1), n.length > 0 && n[0] && (s.border = n[0]);
1194
+ }
1195
+ }
1196
+ }
1197
+ processDXFs(t, e, s) {
1198
+ if (!e) return;
1199
+ t.getVisitorParamsState().set("processingDXFs", !0);
1200
+ const r = /* @__PURE__ */ new Map();
1201
+ t.getVisitorParamsState().set("dxfs", r);
1202
+ const o = e.childNodes;
1203
+ for (let i = 0; i < o.length; i++) {
1204
+ const n = o.item(i);
1205
+ if (n.nodeType === 1 && n.localName === "dxf") {
1206
+ const l = {};
1207
+ this.processDXF(t, n, l);
1208
+ const a = s.length;
1209
+ r.set(a, l), s.push(l);
1210
+ }
1211
+ }
1212
+ t.getVisitorParamsState().delete("processingDXFs");
1213
+ }
1214
+ processTableStyle(t, e, s, r, o = !1) {
1215
+ const i = e.getAttribute("name"), n = { name: i };
1216
+ e.hasAttribute("table") && (n.table = f(e.getAttribute("table"))), e.hasAttribute("pivot") && (n.pivot = f(e.getAttribute("pivot"))), o && !n.pivot && r.unshift(null);
1217
+ const l = e.childNodes;
1218
+ for (let a = 0; a < l.length; a++) {
1219
+ const c = l.item(a);
1220
+ if (c.nodeType === 1 && c.localName === "tableStyleElement") {
1221
+ const h = c.getAttribute("type"), p = c.getAttribute("dxfId");
1222
+ let g = r?.[p];
1223
+ g || (console.warn("invalid dfx id", p), g = {}), n[h] = g;
1224
+ let d = null;
1225
+ c.hasAttribute("size") && (d = parseInt(c.getAttribute("size"))), d && !isNaN(d) && (g.size = d);
1226
+ }
1227
+ }
1228
+ delete n.name, s[i] = n;
1229
+ }
1230
+ processTableStyles(t, e, s, r, o) {
1231
+ if (!e) return;
1232
+ const i = {}, n = e.getAttribute("defaultTableStyle");
1233
+ n && (i.defaultTableStyle = n);
1234
+ const l = e.getAttribute("defaultPivotStyle");
1235
+ l && (i.defaultPivotStyle = l);
1236
+ const a = e.childNodes, c = {};
1237
+ for (let h = 0; h < a.length; h++) {
1238
+ const p = a.item(h);
1239
+ p.nodeType === 1 && p.localName === "tableStyle" && this.processTableStyle(t, p, c, r, o);
1240
+ }
1241
+ return Object.keys(c).length > 0 && (i.styles = c), Object.keys(i).length > 0 && (s.tables = i), s;
1242
+ }
1243
+ processCellStyles(t, e, s, r, o) {
1244
+ if (!e) return;
1245
+ const i = e.childNodes;
1246
+ for (let n = 0; n < i.length; n++) {
1247
+ const l = i.item(n);
1248
+ if (l.nodeType === 1 && l.localName === "cellStyle") {
1249
+ const a = parseInt(l.getAttribute("xfId")), c = l.getAttribute("name");
1250
+ if (o.set(a, c), !r[a]) continue;
1251
+ const h = { name: c, style: r[a] };
1252
+ l.getAttribute("hidden") && (h.hidden = f(l.getAttribute("hidden"))), l.getAttribute("iLevel") && (h.iLevel = parseInt(l.getAttribute("iLevel"))), s.push(h);
1253
+ }
1254
+ }
1255
+ }
1256
+ afterVisit(t, e, s) {
1257
+ }
1258
+ }
1259
+ class Vt extends Q {
1260
+ visit(t, e, s) {
1261
+ return this.processSheetRefs(t, t.evaluate("sheets", e), s), this.processBookViews(t, t.evaluate("bookViews", e), s), this.processDefinedNames(t, t.evaluate("definedNames", e), s), this.processCalcPr(t, t.evaluate("calcPr", e), s), this.processWorkbookProtection(t, t.evaluate("workbookProtection", e), s), this.processWorkbookPr(t, t.evaluate("workbookPr", e), s), s;
1262
+ }
1263
+ processPassword(t, e, s, r = "password") {
1264
+ if (!e) return;
1265
+ const o = {};
1266
+ t.copyFromAttribute(e, "algorithmName", o, "algorithmName"), t.copyFromAttribute(e, "hashValue", o, "hashValue"), t.copyFromAttribute(e, "saltValue", o, "saltValue", t.BOOLEAN_COPY), t.copyFromAttribute(e, "spinCount", o, "spinCount", t.INT_COPY), Object.keys(o).length > 0 && (s[r] = o);
1267
+ }
1268
+ processWorkbookProtection(t, e, s) {
1269
+ if (!e) return;
1270
+ const r = {};
1271
+ this.processPassword(t, t.evaluate("workbookPassword", e), r), this.processPassword(t, t.evaluate("revisionsPassword", e), r, "revisionsPassword");
1272
+ const o = (i) => i !== !0 && i !== "1" && i !== "on" && i !== "true" && (i === !1 || i === "0" || i === "off" || i === "false" || null);
1273
+ return t.copyFromAttribute(e, "lockStructure", r, "structure", o), t.copyFromAttribute(e, "lockWindows", r, "windows", o), t.copyFromAttribute(e, "lockRevision", r, "revision", o), s.protection = r, s;
1274
+ }
1275
+ processCalcPr(t, e, s) {
1276
+ e && (s.calc = {});
1277
+ }
1278
+ processSheetRefs(t, e, s) {
1279
+ if (!e) return;
1280
+ const r = [], o = e.childNodes;
1281
+ for (let i = 0; i < o.length; i++) {
1282
+ const n = o.item(i);
1283
+ n.nodeType === 1 && n.localName === "sheet" && this.processSheetRef(t, n, r);
1284
+ }
1285
+ s.sheets = r;
1286
+ }
1287
+ processSheetRef(t, e, s) {
1288
+ const r = {};
1289
+ t.copyFromAttribute(e, "name", r, "name"), t.copyFromAttribute(e, "state", r, "visibility");
1290
+ const o = e.getAttribute("r:id"), i = t.getRef(o);
1291
+ i && (r.sheet = i), s.push(r);
1292
+ }
1293
+ processBookViews(t, e, s) {
1294
+ if (!e) return;
1295
+ const r = e.childNodes;
1296
+ let o = 0;
1297
+ for (let i = 0; o < 1 && i < e.childNodes.length; i++) {
1298
+ const n = r.item(i);
1299
+ n.nodeType === 1 && n.localName === "workbookView" && (this.processWorkbookView(t, n, s), o++);
1300
+ }
1301
+ }
1302
+ processWorkbookView(t, e, s) {
1303
+ if (!e) return;
1304
+ const r = {};
1305
+ t.copyFromAttribute(e, "activeTab", r, "activeSheetId", [t.INT_COPY, (o) => o + 1]), e.hasAttribute("activeTab") || (r.activeSheetId = 1), t.copyFromAttribute(e, "showHorizontalScroll", r, "showHorizontalScrollbar", t.BOOLEAN_COPY), t.copyFromAttribute(e, "showVerticalScroll", r, "showVerticalScrollbar", t.BOOLEAN_COPY), t.copyFromAttribute(e, "showSheetTabs", r, "showTabs", t.BOOLEAN_COPY), t.copyFromAttribute(e, "tabRatio", r, "tabRatio", [t.FLOAT_COPY, (o) => o]), Object.keys(r).length > 0 && (s.view = r);
1306
+ }
1307
+ processDefineName(t, e, s, r) {
1308
+ if (!e) return;
1309
+ const o = {}, i = e.firstChild;
1310
+ if (i && i.nodeType === 3 && (o.ref = i.textContent), t.copyFromAttribute(e, "name", o), t.copyFromAttribute(e, "comment", o), t.copyFromAttribute(e, "hidden", o, "hidden", t.BOOLEAN_COPY), e.hasAttribute("localSheetId")) {
1311
+ const n = e.getAttribute("localSheetId");
1312
+ if (!r[n]?.name) return void console.warn(`Defined name '${e.getAttribute("name")}' references a sheet with localSheetId '${n}' which does not exist.`);
1313
+ o.scope = r[n].name;
1314
+ }
1315
+ t.copyFromAttribute(e, "customMenu", o), t.copyFromAttribute(e, "description", o), t.copyFromAttribute(e, "statusBar", o), t.copyFromAttribute(e, "help", o), t.copyFromAttribute(e, "shortcutKey", o), t.copyFromAttribute(e, "function", o, "function", t.BOOLEAN_COPY), t.copyFromAttribute(e, "functionGroupId", o, "functionGroupId", t.INT_COPY), t.copyFromAttribute(e, "publishToServer", o, "publishToServer", t.BOOLEAN_COPY), t.copyFromAttribute(e, "vbProcedure", o, "vbProcedure", t.BOOLEAN_COPY), t.copyFromAttribute(e, "xlm", o, "xlm", t.BOOLEAN_COPY), Object.keys(o).length > 0 && s.push(o);
1316
+ }
1317
+ processDefinedNames(t, e, s) {
1318
+ if (!e) return;
1319
+ const r = [], o = e.childNodes;
1320
+ for (let i = 0; i < o.length; i++) {
1321
+ const n = o.item(i);
1322
+ n.nodeType === 1 && n.localName === "definedName" && this.processDefineName(t, n, r, s.sheets);
1323
+ }
1324
+ r.length > 0 && (s.names = r);
1325
+ }
1326
+ processWorkbookPr(t, e, s) {
1327
+ e && t.copyFromAttribute(e, "date1904", s, "date1904", t.BOOLEAN_COPY);
1328
+ }
1329
+ afterVisit(t, e, s) {
1330
+ }
1331
+ }
1332
+ class St {
1333
+ visit(t, e, s) {
1334
+ return t.copyFromAttribute(e, "name", s), t.copyFromAttribute(e, "displayName", s), t.copyFromAttribute(e, "ref", s), t.copyFromAttribute(e, "headerRowCount", s, "headerRowCount", t.INT_COPY), t.copyFromAttribute(e, "totalsRowCount", s, "totalsRowCount", t.INT_COPY), this.processTableColumns(t, e, s), this.processTableStyleInfo(t, e, s), s;
1335
+ }
1336
+ processTableStyleInfo(t, e, s) {
1337
+ if (!e) return;
1338
+ const r = e.childNodes, o = {};
1339
+ for (let i = 0; i < r.length; i++) {
1340
+ const n = r.item(i);
1341
+ n.nodeType === 1 && n.localName === "tableStyleInfo" && (t.copyFromAttribute(n, "name", o), t.copyFromAttribute(n, "showColumnStripes", o, "showColumnStripes", t.BOOLEAN_COPY), t.copyFromAttribute(n, "showFirstColumn", o, "showFirstColumn", t.BOOLEAN_COPY), t.copyFromAttribute(n, "showLastColumn", o, "showLastColumn", t.BOOLEAN_COPY), t.copyFromAttribute(n, "showRowStripes", o, "showRowStripes", t.BOOLEAN_COPY));
1342
+ }
1343
+ Object.keys(o).length > 0 && (s.styleOptions = o);
1344
+ }
1345
+ processTableColumn(t, e, s) {
1346
+ if (!e) return null;
1347
+ const r = e.childNodes;
1348
+ for (let o = 0; o < r.length; o++) {
1349
+ const i = r.item(o);
1350
+ if (i.nodeType === 1 && i.localName === "tableColumn") {
1351
+ const n = {};
1352
+ t.copyFromAttribute(i, "name", n), t.copyFromAttribute(i, "uniqueName", n), s.push(n);
1353
+ }
1354
+ }
1355
+ return s;
1356
+ }
1357
+ processTableColumns(t, e, s) {
1358
+ const r = e.childNodes, o = [];
1359
+ for (let i = 0; i < r.length; i++) {
1360
+ const n = r.item(i);
1361
+ n.nodeType === 1 && n.localName === "tableColumns" && this.processTableColumn(t, n, o);
1362
+ }
1363
+ o.length > 0 && (s.columns = o);
1364
+ }
1365
+ }
1366
+ class kt {
1367
+ visit(t, e, s) {
1368
+ return s;
1369
+ }
1370
+ }
1371
+ class E {
1372
+ visit(t, e, s) {
1373
+ if (!e) return;
1374
+ const r = {};
1375
+ return t.copyFromAttribute(e, "editAs", r, "anchorType"), r.anchor = {}, this.processOffsetCoord(t, t.evaluate("from", e), r.anchor, "from"), this.processOffsetCoord(t, t.evaluate("to", e), r.anchor, "to"), s.movables || (s.movables = []), s.movables.push(r), r;
1376
+ }
1377
+ processOffsetCoord(t, e, s, r) {
1378
+ if (!e) return;
1379
+ const o = { c: 0, r: 0, x: 0, y: 0 };
1380
+ return t.evaluate("col", e) && (o.c = parseInt(t.evaluate("col", e).textContent)), t.evaluate("row", e) && (o.r = parseInt(t.evaluate("row", e).textContent)), t.evaluate("colOff", e) && (o.x = x(t.evaluate("colOff", e).textContent)), t.evaluate("rowOff", e) && (o.y = x(t.evaluate("rowOff", e).textContent)), r === "from" ? s.tl = o : s.br = o, s;
1381
+ }
1382
+ }
1383
+ class U {
1384
+ visit(t, e, s) {
1385
+ if (!e) return;
1386
+ const r = t.evaluate("*/cNvPr", e);
1387
+ return r && (t.copyFromAttribute(r, "name", s), t.copyFromAttribute(r, "desc", s), t.copyFromAttribute(r, "hidden", s, "hidden", t.BOOLEAN_COPY), t.copyFromAttribute(r, "id", s)), s;
1388
+ }
1389
+ }
1390
+ class xt extends U {
1391
+ visit(t, e, s) {
1392
+ if (!e) return;
1393
+ s = super.visit(t, e, s);
1394
+ const r = t.evaluate("nvGraphicFramePr/cNvGraphicFramePr", e);
1395
+ if (r) {
1396
+ const n = t.evaluate("graphicFrameLocks", r);
1397
+ if (n) {
1398
+ n.hasAttribute("noChangeAspect") && (s.lockAspect = n.getAttribute("noChangeAspect") === "1");
1399
+ const l = {};
1400
+ Object.keys(l).length > 0 && (s.locks = l);
1401
+ }
1402
+ }
1403
+ let o = { type: "graphicFrame", json: {} };
1404
+ const i = t.evaluate("graphic/graphicData", e).childNodes;
1405
+ for (let n = 0; n < i.length; n++) {
1406
+ const l = i.item(n);
1407
+ if (l.nodeType === 1) try {
1408
+ let a = l.localName;
1409
+ a === "chart" && (a = "chart"), o.type = a;
1410
+ const c = l.getAttribute("r:id");
1411
+ c && (o.json = t.getRef(c));
1412
+ } catch (a) {
1413
+ console.warn("Unable to parse graphicFrame", a);
1414
+ }
1415
+ }
1416
+ return o && (s.content = o), o;
1417
+ }
1418
+ }
1419
+ class z extends U {
1420
+ visit(t, e, s) {
1421
+ if (!e) return;
1422
+ s = super.visit(t, e, s);
1423
+ const r = t.evaluate("nvSpPr/cNvSpPr", e);
1424
+ if (r) {
1425
+ const i = t.evaluate("spLocks", r);
1426
+ if (i) {
1427
+ i.hasAttribute("noChangeAspect") && (s.lockAspect = i.getAttribute("noChangeAspect") === "1");
1428
+ const n = {};
1429
+ Object.keys(n).length > 0 && (s.locks = n);
1430
+ }
1431
+ }
1432
+ t.warn(`Unable to import '${s.name}', shapes are not supported.`);
1433
+ const o = {};
1434
+ return s.content = { type: "sp", json: o }, o;
1435
+ }
1436
+ }
1437
+ class Lt extends U {
1438
+ visit(t, e, s) {
1439
+ if (!e) return;
1440
+ const r = super.visit(t, e, s), o = t.evaluate("nvPicPr/cNvPicPr", e);
1441
+ if (o) {
1442
+ t.copyFromAttribute(e, "preferRelativeResize", r, "preferRelativeResize", t.BOOLEAN_COPY);
1443
+ const a = t.evaluate("picLocks", o);
1444
+ if (a) {
1445
+ a.hasAttribute("noChangeAspect") && (r.lockAspect = a.getAttribute("noChangeAspect") === "1");
1446
+ const c = {};
1447
+ t.copyFromAttribute(a, "noChangeArrowheads", r, "noChangeArrowheads", t.BOOLEAN_COPY), t.copyFromAttribute(a, "noChangeShapeType", r, "noChangeShapeType", t.BOOLEAN_COPY), t.copyFromAttribute(a, "noEditPoints", r, "noEditPoints", t.BOOLEAN_COPY), t.copyFromAttribute(a, "noAdjustHandles", r, "noAdjustHandles", t.BOOLEAN_COPY), t.copyFromAttribute(a, "noCrop", r, "noCrop", t.BOOLEAN_COPY), t.copyFromAttribute(a, "noGrp", r, "noGrp", t.BOOLEAN_COPY), t.copyFromAttribute(a, "noMove", r, "noMove", t.BOOLEAN_COPY), t.copyFromAttribute(a, "noResize", r, "noResize", t.BOOLEAN_COPY), t.copyFromAttribute(a, "noRot", r, "noRot", t.BOOLEAN_COPY), t.copyFromAttribute(a, "noSelect", r, "noSelect", t.BOOLEAN_COPY), Object.keys(c).length > 0 && (r.locks = c);
1448
+ }
1449
+ }
1450
+ const i = t.evaluate("blipFill/blip", e);
1451
+ let n;
1452
+ if (i) {
1453
+ const a = i.getAttribute("r:embed") ?? i.getAttribute("embed");
1454
+ if (!a) return void console.warn("no rId found for blip", i);
1455
+ n = t.getRef(a, !0);
1456
+ }
1457
+ const l = { resId: n };
1458
+ return s.content = { type: "picture", json: l }, r;
1459
+ }
1460
+ }
1461
+ class It extends z {
1462
+ visit(t, e, s) {
1463
+ if (!e) return;
1464
+ s = super.visit(t, e, s);
1465
+ const r = t.evaluate("nvGrpSpPr/cNvGrpSpPr", e);
1466
+ if (r) {
1467
+ const i = t.evaluate("grpSpLocks", r);
1468
+ if (i) {
1469
+ i.hasAttribute("noChangeAspect") && (s.lockAspect = i.getAttribute("noChangeAspect") === "1");
1470
+ const n = {};
1471
+ Object.keys(n).length > 0 && (s.locks = n);
1472
+ }
1473
+ }
1474
+ t.warn(`Unable to import '${s.name}', group shapes are not supported.`);
1475
+ const o = {};
1476
+ return s.content = { type: "grpSp", json: o }, o;
1477
+ }
1478
+ }
1479
+ class Bt extends z {
1480
+ visit(t, e, s) {
1481
+ if (!e) return;
1482
+ s = super.visit(t, e, s);
1483
+ const r = t.evaluate("nvCxnSpPr/cNvCxnSpPr", e);
1484
+ if (r) {
1485
+ const i = t.evaluate("cxnSpLocks", r);
1486
+ if (i) {
1487
+ i.hasAttribute("noChangeAspect") && (s.lockAspect = i.getAttribute("noChangeAspect") === "1");
1488
+ const n = {};
1489
+ Object.keys(n).length > 0 && (s.locks = n);
1490
+ }
1491
+ }
1492
+ t.warn(`Unable to import '${s.name}', connection shapes are not supported.`);
1493
+ const o = {};
1494
+ return s.content = { type: "cxnSp", json: o }, o;
1495
+ }
1496
+ }
1497
+ const $ = "richTypes";
1498
+ class _t {
1499
+ visit(t, e, s) {
1500
+ let r = t.getVisitorParamsState().get($);
1501
+ r || (r = [], t.getVisitorParamsState().set($, r));
1502
+ const o = e.childNodes, i = o.length;
1503
+ for (let n = 0; n < i; n++) {
1504
+ const l = o.item(n);
1505
+ if (l.nodeType === 1 && l.localName === "s") {
1506
+ const a = { type: l.getAttribute("t") ?? "n", keys: [] };
1507
+ this.processKeys(t, l, a), r.push(a);
1508
+ }
1509
+ }
1510
+ return s.richTypes = r, r;
1511
+ }
1512
+ processKeys(t, e, s) {
1513
+ const r = e.childNodes, o = r.length, i = s.keys;
1514
+ for (let n = 0; n < o; n++) {
1515
+ const l = r.item(n);
1516
+ if (l.nodeType === 1 && l.localName === "k") {
1517
+ const a = l.getAttribute("n"), c = l.getAttribute("t");
1518
+ i.push([a, c]);
1519
+ }
1520
+ }
1521
+ }
1522
+ }
1523
+ const K = "richData";
1524
+ class jt {
1525
+ visit(t, e, s) {
1526
+ let r = t.getVisitorParamsState().get("richTypes");
1527
+ if (!r) return void t.warn("RichValueFound but not type.");
1528
+ let o = t.getVisitorParamsState().get(K);
1529
+ o || (o = [], t.getVisitorParamsState().set(K, o));
1530
+ const i = e.childNodes, n = i.length;
1531
+ for (let l = 0; l < n; l++) {
1532
+ const a = i.item(l);
1533
+ if (a.nodeType === 1 && a.localName === "rv") {
1534
+ const c = r[a.getAttribute("s")], h = { type: c.type };
1535
+ this.processValues(t, a, h, c);
1536
+ const p = this.mapType(t, h);
1537
+ o.push(p);
1538
+ }
1539
+ }
1540
+ return s.richData = o, o;
1541
+ }
1542
+ mapType(t, e) {
1543
+ if (e.type === "_error") {
1544
+ const s = e.errorType;
1545
+ if (s) try {
1546
+ e = et.getBuiltInById(s + 1);
1547
+ } catch {
1548
+ }
1549
+ }
1550
+ return e;
1551
+ }
1552
+ processValues(t, e, s, r) {
1553
+ const o = e.childNodes, i = o.length;
1554
+ r.type;
1555
+ const n = r.keys;
1556
+ for (let l = 0; l < i; l++) {
1557
+ const a = o.item(l);
1558
+ if (a.nodeType === 1 && a.localName === "v") {
1559
+ const c = n[l];
1560
+ if (!c) return void t.warn("Invalid richData");
1561
+ const h = c[0], p = c[1];
1562
+ let g = a.textContent;
1563
+ p === "i" && (g = Number(g)), s[h] = g;
1564
+ }
1565
+ }
1566
+ }
1567
+ }
1568
+ class Rt {
1569
+ visit(t, e, s) {
1570
+ if (!e) return;
1571
+ const r = [];
1572
+ return this.processAuthors(t, t.evaluate("authors", e), r), r.length > 0 && (s.authors = r), s.comments = [], s;
1573
+ }
1574
+ processAuthors(t, e, s) {
1575
+ if (!e) return;
1576
+ const r = e.childNodes;
1577
+ for (let o = 0; o < r.length; o++) {
1578
+ const i = r.item(o);
1579
+ if (i.nodeType === 1 && i.localName === "author") {
1580
+ const n = i.firstChild;
1581
+ n && n.nodeType === 3 && s.push(n.textContent);
1582
+ }
1583
+ }
1584
+ }
1585
+ }
1586
+ class Et {
1587
+ visit(t, e, s) {
1588
+ if (!e) return;
1589
+ const r = {};
1590
+ return t.copyFromAttribute(e, "ref", r), t.copyFromAttribute(e, "authorId", r, "authorId", t.INT_COPY), r.asNote = !0, s.comments || (s.comments = []), s.comments.push(r), r;
1591
+ }
1592
+ }
1593
+ class Yt {
1594
+ visit(t, e, s) {
1595
+ if (!e) return;
1596
+ const r = [];
1597
+ return s.comments = r, r;
1598
+ }
1599
+ }
1600
+ class Dt {
1601
+ visit(t, e, s) {
1602
+ if (!e) return;
1603
+ const r = {};
1604
+ return t.copyFromAttribute(e, "id", r, "id", L), t.copyFromAttribute(e, "personId", r, "personId", L), t.copyFromAttribute(e, "ref", r), t.copyFromAttribute(e, "parentId", r, "parentId", L), t.copyFromAttribute(e, "dT", r), e.hasAttribute("done") && (r.done = f(e.getAttribute("done"))), s.push(r), r;
1605
+ }
1606
+ }
1607
+ class Mt {
1608
+ visit(t, e, s) {
1609
+ const r = [], o = e.childNodes;
1610
+ for (let i = 0; i < o.length; i++) {
1611
+ const n = o.item(i);
1612
+ if (n.nodeType === 1 && n.localName === "person") {
1613
+ const l = {};
1614
+ t.copyFromAttribute(n, "id", l, "id", L), t.copyFromAttribute(n, "displayName", l), t.copyFromAttribute(n, "userId", l, "userId", L), t.copyFromAttribute(n, "providerId", l), r.push(l);
1615
+ }
1616
+ }
1617
+ return r.length > 0 && (s.persons = r), r;
1618
+ }
1619
+ }
1620
+ const Ut = {};
1621
+ class zt {
1622
+ constructor(t, e) {
1623
+ this.path = t, this.visitor = e;
1624
+ }
1625
+ }
1626
+ class Xt {
1627
+ constructor() {
1628
+ this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new ct()), this.registerVisitor("spPr", new M()), this.registerVisitor("txBody", new F()), this.registerVisitor("txPr", new F()), this.registerVisitor("c:chartSpace", new ut()), this.registerVisitor("c:chartSpace", new ht(), "chart"), this.registerVisitor("c:plotArea", new pt()), this.registerVisitor("c:barChart", new gt()), this.registerVisitor("c:doughnutChart", new S()), this.registerVisitor("c:lineChart", new S()), this.registerVisitor("c:ofPieType", new S()), this.registerVisitor("c:pieChart", new S()), this.registerVisitor("c:scatterChart", new S()), this.registerVisitor("c:barChart", new N("dataLabels"), "dLbls"), this.registerVisitor("c:doughnutChart", new N("dataLabels"), "dLbls"), this.registerVisitor("c:lineChart", new N("dataLabels"), "dLbls"), this.registerVisitor("c:ofPieType", new N("dataLabels"), "dLbls"), this.registerVisitor("c:pieChart", new N("dataLabels"), "dLbls"), this.registerVisitor("c:scatterChart", new N("dataLabels"), "dLbls"), this.registerVisitor("c:ser", new dt()), this.registerVisitor("c:dPt", new mt()), this.registerVisitor("c:marker", new bt()), this.registerVisitor("c:catAx", new R()), this.registerVisitor("c:valAx", new R()), this.registerVisitor("c:dateAx", new R()), this.registerVisitor("c:majorGridlines", new j("gridLinesMajor")), this.registerVisitor("c:minorGridlines", new j("gridLinesMinor")), this.registerVisitor("c:chartSpace", null, "txPr"), this.registerVisitor("c:catAx", new F("labels.text"), "txPr"), this.registerVisitor("c:valAx", new F("labels.text"), "txPr"), this.registerVisitor("c:dateAx", new F("labels.text"), "txPr"), this.registerVisitor("c:legend", new At()), this.registerVisitor("c:legend", new F("labels.text"), "txPr"), this.registerVisitor("c:legendEntry", new ft()), this.registerVisitor("c:ser", new yt(), "extLst/ext/invertSolidFillFmt/spPr"), this.registerVisitor("c:ser", new N("labels"), "dLbls"), this.registerVisitor("c:dLbl", new N("points")), this.registerVisitor("c:title", new X()), this.registerVisitor("c:title", null, "tx/rich"), this.registerVisitor("c:title", null, "txPr"), this.registerVisitor("c:layout", new vt()), this.registerVisitor("c:dispUnits", new j("dispUnits")), this.registerVisitor("c:dispUnitsLbl", new X("displayUnitsLabel")), this.registerVisitor("c:dispUnitsLbl", new F(), "tx/rich"), this.registerVisitor("a:theme", new Ft()), this.registerVisitor("a:theme", new Ct(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new wt(), "themeElements/fontScheme"), this.registerVisitor("autoFilter", new Nt()), this.registerVisitor("sortState", new Ot()), this.registerVisitor("s:workbook", new Vt()), this.registerVisitor("styleSheet", new Tt()), this.registerVisitor("table", new St()), this.registerVisitor("hlinkClick", new Pt()), this.registerVisitor("wsDr", new kt()), this.registerVisitor("twoCellAnchor", new E()), this.registerVisitor("oneCellAnchor", new E()), this.registerVisitor("absoluteAnchor", new E()), this.registerVisitor("graphicFrame", new xt()), this.registerVisitor("sp", new z()), this.registerVisitor("grpSp", new It()), this.registerVisitor("cxnSp", new Bt()), this.registerVisitor("pic", new Lt()), this.registerVisitor("rvStructures", new _t()), this.registerVisitor("rvData", new jt()), this.registerVisitor("comments", new Rt()), this.registerVisitor("commentList", new Et(), "comment"), this.registerVisitor("comment", new F("content"), "text"), this.registerVisitor("ThreadedComments", new Yt()), this.registerVisitor("threadedComment", new Dt()), this.registerVisitor("threadedComment", new F("content"), "text"), this.registerVisitor("personList", new Mt());
1629
+ }
1630
+ registerVisitor(t, e, s = null) {
1631
+ t.indexOf(":") === -1 && (t = "*:" + t);
1632
+ const r = t.split(":"), o = r.length > 1 ? r[1] : r[0];
1633
+ if (!s) return this.visitorsByXmlTagName.set(o, e), void this.visitorsByXmlTagName.set(t, e);
1634
+ let i = this.scopedVisitorsByXmlTagName.get(o);
1635
+ i || (i = [], this.scopedVisitorsByXmlTagName.set(o, i), this.scopedVisitorsByXmlTagName.set(t, i)), i.push(new zt(s, e));
1636
+ }
1637
+ getVisitorParamsState() {
1638
+ return this.visitorParamsState;
1639
+ }
1640
+ convert(t, e, s = Ut) {
1641
+ const r = t.documentElement;
1642
+ this.visitorParamsState && !s?.paramMap || (this.visitorParamsState = s?.paramMap ?? /* @__PURE__ */ new Map());
1643
+ const o = {};
1644
+ let i = this.visitorsByXmlTagName.get(r.nodeName);
1645
+ if (i || (i = this.visitorsByXmlTagName.get(r.localName)), !i) throw new Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);
1646
+ const n = "/" + r.localName, l = new _(null, this, n, r, o, e, s), a = [];
1647
+ this._doWalk(i, l, a, r, o, e, s);
1648
+ for (let c = 0; c < a.length; c++) {
1649
+ const h = a[c];
1650
+ try {
1651
+ h.visitor?.afterVisit?.(h.context, h.elemParent, h.jsonParent);
1652
+ } catch (p) {
1653
+ console.warn(`Error in afterVisit: ${h.context.getPath()}`, p);
1654
+ }
1655
+ }
1656
+ return o;
1657
+ }
1658
+ _walkScoped(t, e, s, r, o, i, n) {
1659
+ const l = this.scopedVisitorsByXmlTagName.get(t);
1660
+ for (let a = 0; l && a < l.length; a++) {
1661
+ const c = l[a];
1662
+ let h = null;
1663
+ try {
1664
+ h = e.evaluate(c.path, r);
1665
+ } catch {
1666
+ console.warn(`"Invalid path '${c.path}' for '${t}'.`);
1667
+ }
1668
+ if (!h) continue;
1669
+ const p = (g) => {
1670
+ let d = g.localName, v = g.parentNode;
1671
+ for (; v && v !== r; ) d = v.localName + "/" + d, v = v.parentNode;
1672
+ const O = e.getPath() + "/" + d;
1673
+ if (c.visitor) {
1674
+ const B = new _(e, this, O, e.getElemRoot(), e.getJsonRoot(), i, n);
1675
+ this._doWalk(c.visitor, B, s, g, o, i, n);
1676
+ }
1677
+ };
1678
+ if (h.length > 0) {
1679
+ const g = h;
1680
+ for (let d = 0; d < g.length; d++) p(g.item(d));
1681
+ } else p(h);
1682
+ }
1683
+ }
1684
+ _doWalk(t, e, s, r, o, i, n) {
1685
+ let l = null;
1686
+ t && (s.push({ visitor: t, context: e, elemParent: r, jsonParent: o }), l = t.visit(e, r, o)), l || (l = o);
1687
+ const a = r.localName;
1688
+ this._walkScoped(a, e, s, r, l, i, n);
1689
+ const c = r.childNodes;
1690
+ for (let h = 0; h < c.length; h++) {
1691
+ const p = c.item(h);
1692
+ if (p.nodeType === 1) {
1693
+ const g = p, d = g.localName, v = this.visitorsByXmlTagName.get(d), O = e.getPath() + "/" + d, B = new _(e, this, O, e.getElemRoot(), e.getJsonRoot(), i, n);
1694
+ this._doWalk(v, B, s, g, l ?? o, i, n);
1695
+ }
1696
+ }
1697
+ return l;
1698
+ }
1699
+ }
1700
+ export {
1701
+ Xt as FromOOXMLConverter,
1702
+ Xt as default
1703
+ };