@sheetxl/io-xlsx 0.7.23-beta.1

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 (340) hide show
  1. package/LICENSE.md +11 -0
  2. package/README.md +23 -0
  3. package/browser/cjs/5QaWZ2tRVhz1rf3W.cjs +1 -0
  4. package/browser/cjs/B6sirGz6w-Bm7Ofo.cjs +1 -0
  5. package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +1 -0
  6. package/browser/cjs/BE7AtU1GCShmJ8Yu.cjs +1 -0
  7. package/browser/cjs/CIpMN7SDVREKQUQE.cjs +6 -0
  8. package/browser/cjs/Chkqh5BZ-MJjAcPF.cjs +5 -0
  9. package/browser/cjs/D-8WoJkvdPf-79sB.cjs +2 -0
  10. package/browser/cjs/D5Y4KQhKdukOkjvA.cjs +2 -0
  11. package/browser/cjs/DWkuoJSgvcXJTdN1.cjs +1 -0
  12. package/browser/cjs/index.cjs +1 -0
  13. package/browser/cjs/sEmMmxaNBSY_o-Zb.cjs +1 -0
  14. package/browser/cjs/xQ6-wbTw5UzZUM1Y.cjs +1 -0
  15. package/browser/esm/B20zuEvdeypuSU5s.mjs +3851 -0
  16. package/browser/esm/BVAAJynubTdvPOQA.mjs +24 -0
  17. package/browser/esm/CLo2oPoIised6GbD.mjs +3617 -0
  18. package/browser/esm/COSdjubnJ_UgB-Gr.mjs +111 -0
  19. package/browser/esm/CS1t46OUALKkZxTa.mjs +494 -0
  20. package/browser/esm/CS8eRkAhoCN8KdGO.mjs +52 -0
  21. package/browser/esm/CcXnQZ4Fk_nkbq2G.mjs +99 -0
  22. package/browser/esm/Ch5gA6g56cOtRvJA.mjs +2193 -0
  23. package/browser/esm/DRuB-nlH4kq_OQJ5.mjs +196 -0
  24. package/browser/esm/DoKP-E832M9vPWgU.mjs +4675 -0
  25. package/browser/esm/XoDWB6uCJVrra-pE.mjs +2623 -0
  26. package/browser/esm/index.mjs +8 -0
  27. package/licenses/dependencies.txt +60 -0
  28. package/node/esm/B3Hb3GSFs_FIoXoI.mjs +209 -0
  29. package/node/esm/BqwG-e5ddQ45fg8w.mjs +2702 -0
  30. package/node/esm/C81WoKHbCRwhcHWd.mjs +2413 -0
  31. package/node/esm/CIzCy_gyysEIa_HI.mjs +3700 -0
  32. package/node/esm/CL8002u21KKQkkL0.mjs +108 -0
  33. package/node/esm/DF893ovKIDS88O7b.mjs +2237 -0
  34. package/node/esm/DTuPlHBTHnbLGvxd.mjs +504 -0
  35. package/node/esm/DVJuJqAXDwgA-ge8.mjs +118 -0
  36. package/node/esm/index.mjs +52 -0
  37. package/package.json +55 -0
  38. package/types/index.d.ts +2 -0
  39. package/types/src/ConditionalFormatRules.d.ts +86 -0
  40. package/types/src/ConditionalFormatRules.d.ts.map +1 -0
  41. package/types/src/DataValidationRules.d.ts +59 -0
  42. package/types/src/DataValidationRules.d.ts.map +1 -0
  43. package/types/src/ExcelCompat.d.ts +142 -0
  44. package/types/src/ExcelCompat.d.ts.map +1 -0
  45. package/types/src/ExcelFunctionFacts.d.ts +375 -0
  46. package/types/src/ExcelFunctionFacts.d.ts.map +1 -0
  47. package/types/src/ExcelReservedNames.d.ts +67 -0
  48. package/types/src/ExcelReservedNames.d.ts.map +1 -0
  49. package/types/src/LegacyFormula.d.ts +74 -0
  50. package/types/src/LegacyFormula.d.ts.map +1 -0
  51. package/types/src/OOXMLEscape.d.ts +28 -0
  52. package/types/src/OOXMLEscape.d.ts.map +1 -0
  53. package/types/src/OOXMLExtensions.d.ts +53 -0
  54. package/types/src/OOXMLExtensions.d.ts.map +1 -0
  55. package/types/src/OperandLiterals.d.ts +34 -0
  56. package/types/src/OperandLiterals.d.ts.map +1 -0
  57. package/types/src/Plugin.d.ts +16 -0
  58. package/types/src/Plugin.d.ts.map +1 -0
  59. package/types/src/SourcePackage.d.ts +76 -0
  60. package/types/src/SourcePackage.d.ts.map +1 -0
  61. package/types/src/Types.d.ts +44 -0
  62. package/types/src/Types.d.ts.map +1 -0
  63. package/types/src/cfb/CompoundFileReader.d.ts +73 -0
  64. package/types/src/cfb/CompoundFileReader.d.ts.map +1 -0
  65. package/types/src/cfb/CompoundFileWriter.d.ts +57 -0
  66. package/types/src/cfb/CompoundFileWriter.d.ts.map +1 -0
  67. package/types/src/cfb/index.d.ts +3 -0
  68. package/types/src/cfb/index.d.ts.map +1 -0
  69. package/types/src/index.d.ts +3 -0
  70. package/types/src/index.d.ts.map +1 -0
  71. package/types/src/legacyChart/OOXMLMappings.d.ts +8 -0
  72. package/types/src/legacyChart/OOXMLMappings.d.ts.map +1 -0
  73. package/types/src/legacyChart/OOXMLUtils.d.ts +78 -0
  74. package/types/src/legacyChart/OOXMLUtils.d.ts.map +1 -0
  75. package/types/src/legacyChart/ToOOXMLConverter.d.ts +30 -0
  76. package/types/src/legacyChart/ToOOXMLConverter.d.ts.map +1 -0
  77. package/types/src/offcrypto/AgileCrypto.d.ts +85 -0
  78. package/types/src/offcrypto/AgileCrypto.d.ts.map +1 -0
  79. package/types/src/offcrypto/EncryptionInfo.d.ts +109 -0
  80. package/types/src/offcrypto/EncryptionInfo.d.ts.map +1 -0
  81. package/types/src/offcrypto/LazyOffCryptoEncryption.d.ts +18 -0
  82. package/types/src/offcrypto/LazyOffCryptoEncryption.d.ts.map +1 -0
  83. package/types/src/offcrypto/OffCryptoEncryption.d.ts +15 -0
  84. package/types/src/offcrypto/OffCryptoEncryption.d.ts.map +1 -0
  85. package/types/src/offcrypto/index.d.ts +5 -0
  86. package/types/src/offcrypto/index.d.ts.map +1 -0
  87. package/types/src/reader/DummyFunctionUnwrap.d.ts +58 -0
  88. package/types/src/reader/DummyFunctionUnwrap.d.ts.map +1 -0
  89. package/types/src/reader/ReaderProfiler.d.ts +45 -0
  90. package/types/src/reader/ReaderProfiler.d.ts.map +1 -0
  91. package/types/src/reader/ReaderUtils.d.ts +66 -0
  92. package/types/src/reader/ReaderUtils.d.ts.map +1 -0
  93. package/types/src/reader/XLSXReader.d.ts +11 -0
  94. package/types/src/reader/XLSXReader.d.ts.map +1 -0
  95. package/types/src/reader/ZipReader.d.ts +62 -0
  96. package/types/src/reader/ZipReader.d.ts.map +1 -0
  97. package/types/src/reader/dom/DOMTransformer.d.ts +22 -0
  98. package/types/src/reader/dom/DOMTransformer.d.ts.map +1 -0
  99. package/types/src/reader/dom/DefaultVisitor.d.ts +8 -0
  100. package/types/src/reader/dom/DefaultVisitor.d.ts.map +1 -0
  101. package/types/src/reader/dom/ExecutionContext.d.ts +78 -0
  102. package/types/src/reader/dom/ExecutionContext.d.ts.map +1 -0
  103. package/types/src/reader/dom/NumberUtils.d.ts +17 -0
  104. package/types/src/reader/dom/NumberUtils.d.ts.map +1 -0
  105. package/types/src/reader/dom/Types.d.ts +27 -0
  106. package/types/src/reader/dom/Types.d.ts.map +1 -0
  107. package/types/src/reader/dom/VisitContext.d.ts +10 -0
  108. package/types/src/reader/dom/VisitContext.d.ts.map +1 -0
  109. package/types/src/reader/dom/Visitor.d.ts +23 -0
  110. package/types/src/reader/dom/Visitor.d.ts.map +1 -0
  111. package/types/src/reader/dom/VisitorUtils.d.ts +16 -0
  112. package/types/src/reader/dom/VisitorUtils.d.ts.map +1 -0
  113. package/types/src/reader/dom/index.d.ts +7 -0
  114. package/types/src/reader/dom/index.d.ts.map +1 -0
  115. package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts +11 -0
  116. package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts.map +1 -0
  117. package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +25 -0
  118. package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts.map +1 -0
  119. package/types/src/reader/domVisitors/AxisVisitor.d.ts +12 -0
  120. package/types/src/reader/domVisitors/AxisVisitor.d.ts.map +1 -0
  121. package/types/src/reader/domVisitors/BarChartTypeVisitor.d.ts +6 -0
  122. package/types/src/reader/domVisitors/BarChartTypeVisitor.d.ts.map +1 -0
  123. package/types/src/reader/domVisitors/ChartSpaceVisitor.d.ts +6 -0
  124. package/types/src/reader/domVisitors/ChartSpaceVisitor.d.ts.map +1 -0
  125. package/types/src/reader/domVisitors/ChartTypeVisitor.d.ts +7 -0
  126. package/types/src/reader/domVisitors/ChartTypeVisitor.d.ts.map +1 -0
  127. package/types/src/reader/domVisitors/ChartVisitor.d.ts +7 -0
  128. package/types/src/reader/domVisitors/ChartVisitor.d.ts.map +1 -0
  129. package/types/src/reader/domVisitors/ClrSchemeVisitor.d.ts +7 -0
  130. package/types/src/reader/domVisitors/ClrSchemeVisitor.d.ts.map +1 -0
  131. package/types/src/reader/domVisitors/ColorContainerVisitor.d.ts +37 -0
  132. package/types/src/reader/domVisitors/ColorContainerVisitor.d.ts.map +1 -0
  133. package/types/src/reader/domVisitors/CommentVisitor.d.ts +6 -0
  134. package/types/src/reader/domVisitors/CommentVisitor.d.ts.map +1 -0
  135. package/types/src/reader/domVisitors/CommentsVisitor.d.ts +7 -0
  136. package/types/src/reader/domVisitors/CommentsVisitor.d.ts.map +1 -0
  137. package/types/src/reader/domVisitors/CorePropertiesVisitor.d.ts +11 -0
  138. package/types/src/reader/domVisitors/CorePropertiesVisitor.d.ts.map +1 -0
  139. package/types/src/reader/domVisitors/DataLabelsVisitor.d.ts +8 -0
  140. package/types/src/reader/domVisitors/DataLabelsVisitor.d.ts.map +1 -0
  141. package/types/src/reader/domVisitors/DataPointVisitor.d.ts +6 -0
  142. package/types/src/reader/domVisitors/DataPointVisitor.d.ts.map +1 -0
  143. package/types/src/reader/domVisitors/DrawingAnchorVisitor.d.ts +8 -0
  144. package/types/src/reader/domVisitors/DrawingAnchorVisitor.d.ts.map +1 -0
  145. package/types/src/reader/domVisitors/DrawingCxnSpVisitor.d.ts +7 -0
  146. package/types/src/reader/domVisitors/DrawingCxnSpVisitor.d.ts.map +1 -0
  147. package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +6 -0
  148. package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts.map +1 -0
  149. package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +7 -0
  150. package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts.map +1 -0
  151. package/types/src/reader/domVisitors/DrawingGrpSpVisitor.d.ts +7 -0
  152. package/types/src/reader/domVisitors/DrawingGrpSpVisitor.d.ts.map +1 -0
  153. package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +7 -0
  154. package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts.map +1 -0
  155. package/types/src/reader/domVisitors/DrawingSpVisitor.d.ts +7 -0
  156. package/types/src/reader/domVisitors/DrawingSpVisitor.d.ts.map +1 -0
  157. package/types/src/reader/domVisitors/DrawingVisitor.d.ts +5 -0
  158. package/types/src/reader/domVisitors/DrawingVisitor.d.ts.map +1 -0
  159. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +32 -0
  160. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts.map +1 -0
  161. package/types/src/reader/domVisitors/FmtSchemeVisitor.d.ts +22 -0
  162. package/types/src/reader/domVisitors/FmtSchemeVisitor.d.ts.map +1 -0
  163. package/types/src/reader/domVisitors/FontSchemeVisitor.d.ts +7 -0
  164. package/types/src/reader/domVisitors/FontSchemeVisitor.d.ts.map +1 -0
  165. package/types/src/reader/domVisitors/HyperlinkVisitor.d.ts +6 -0
  166. package/types/src/reader/domVisitors/HyperlinkVisitor.d.ts.map +1 -0
  167. package/types/src/reader/domVisitors/LayoutVisitor.d.ts +5 -0
  168. package/types/src/reader/domVisitors/LayoutVisitor.d.ts.map +1 -0
  169. package/types/src/reader/domVisitors/LegendEntryVisitor.d.ts +5 -0
  170. package/types/src/reader/domVisitors/LegendEntryVisitor.d.ts.map +1 -0
  171. package/types/src/reader/domVisitors/LegendVisitor.d.ts +5 -0
  172. package/types/src/reader/domVisitors/LegendVisitor.d.ts.map +1 -0
  173. package/types/src/reader/domVisitors/MarkerVisitor.d.ts +5 -0
  174. package/types/src/reader/domVisitors/MarkerVisitor.d.ts.map +1 -0
  175. package/types/src/reader/domVisitors/MetadataVisitor.d.ts +104 -0
  176. package/types/src/reader/domVisitors/MetadataVisitor.d.ts.map +1 -0
  177. package/types/src/reader/domVisitors/NegativeShapeVisitor.d.ts +6 -0
  178. package/types/src/reader/domVisitors/NegativeShapeVisitor.d.ts.map +1 -0
  179. package/types/src/reader/domVisitors/OOXMLVisitorUtils.d.ts +3 -0
  180. package/types/src/reader/domVisitors/OOXMLVisitorUtils.d.ts.map +1 -0
  181. package/types/src/reader/domVisitors/PersonListVisitor.d.ts +5 -0
  182. package/types/src/reader/domVisitors/PersonListVisitor.d.ts.map +1 -0
  183. package/types/src/reader/domVisitors/PlotAreaVisitor.d.ts +5 -0
  184. package/types/src/reader/domVisitors/PlotAreaVisitor.d.ts.map +1 -0
  185. package/types/src/reader/domVisitors/PresetTableStylesVisitor.d.ts +8 -0
  186. package/types/src/reader/domVisitors/PresetTableStylesVisitor.d.ts.map +1 -0
  187. package/types/src/reader/domVisitors/RelsVisitor.d.ts +9 -0
  188. package/types/src/reader/domVisitors/RelsVisitor.d.ts.map +1 -0
  189. package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts +7 -0
  190. package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts.map +1 -0
  191. package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts +6 -0
  192. package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts.map +1 -0
  193. package/types/src/reader/domVisitors/SeriesVisitor.d.ts +8 -0
  194. package/types/src/reader/domVisitors/SeriesVisitor.d.ts.map +1 -0
  195. package/types/src/reader/domVisitors/ShapePropertiesVisitor.d.ts +6 -0
  196. package/types/src/reader/domVisitors/ShapePropertiesVisitor.d.ts.map +1 -0
  197. package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +28 -0
  198. package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts.map +1 -0
  199. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +20 -0
  200. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts.map +1 -0
  201. package/types/src/reader/domVisitors/SlicerCacheDefinitionVisitor.d.ts +6 -0
  202. package/types/src/reader/domVisitors/SlicerCacheDefinitionVisitor.d.ts.map +1 -0
  203. package/types/src/reader/domVisitors/SlicersVisitor.d.ts +7 -0
  204. package/types/src/reader/domVisitors/SlicersVisitor.d.ts.map +1 -0
  205. package/types/src/reader/domVisitors/SortStateVisitor.d.ts +8 -0
  206. package/types/src/reader/domVisitors/SortStateVisitor.d.ts.map +1 -0
  207. package/types/src/reader/domVisitors/TableVisitor.d.ts +10 -0
  208. package/types/src/reader/domVisitors/TableVisitor.d.ts.map +1 -0
  209. package/types/src/reader/domVisitors/TableX14Visitor.d.ts +6 -0
  210. package/types/src/reader/domVisitors/TableX14Visitor.d.ts.map +1 -0
  211. package/types/src/reader/domVisitors/TextPropertiesVisitor.d.ts +11 -0
  212. package/types/src/reader/domVisitors/TextPropertiesVisitor.d.ts.map +1 -0
  213. package/types/src/reader/domVisitors/ThemeVisitor.d.ts +6 -0
  214. package/types/src/reader/domVisitors/ThemeVisitor.d.ts.map +1 -0
  215. package/types/src/reader/domVisitors/ThreadedCommentVisitor.d.ts +9 -0
  216. package/types/src/reader/domVisitors/ThreadedCommentVisitor.d.ts.map +1 -0
  217. package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +6 -0
  218. package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts.map +1 -0
  219. package/types/src/reader/domVisitors/TitleVisitor.d.ts +9 -0
  220. package/types/src/reader/domVisitors/TitleVisitor.d.ts.map +1 -0
  221. package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +30 -0
  222. package/types/src/reader/domVisitors/WorkbookVisitor.d.ts.map +1 -0
  223. package/types/src/reader/domVisitors/index.d.ts +101 -0
  224. package/types/src/reader/domVisitors/index.d.ts.map +1 -0
  225. package/types/src/reader/sax/SaxParser.d.ts +34 -0
  226. package/types/src/reader/sax/SaxParser.d.ts.map +1 -0
  227. package/types/src/reader/sax/SaxVisitor.d.ts +59 -0
  228. package/types/src/reader/sax/SaxVisitor.d.ts.map +1 -0
  229. package/types/src/reader/sax/Saxes.d.ts +641 -0
  230. package/types/src/reader/sax/Saxes.d.ts.map +1 -0
  231. package/types/src/reader/sax/index.d.ts +3 -0
  232. package/types/src/reader/sax/index.d.ts.map +1 -0
  233. package/types/src/reader/sax/xmlchars/xml/1.0/ed4.d.ts +32 -0
  234. package/types/src/reader/sax/xmlchars/xml/1.0/ed4.d.ts.map +1 -0
  235. package/types/src/reader/sax/xmlchars/xml/1.0/ed5.d.ts +52 -0
  236. package/types/src/reader/sax/xmlchars/xml/1.0/ed5.d.ts.map +1 -0
  237. package/types/src/reader/sax/xmlchars/xml/1.1/ed2.d.ts +74 -0
  238. package/types/src/reader/sax/xmlchars/xml/1.1/ed2.d.ts.map +1 -0
  239. package/types/src/reader/sax/xmlchars/xmlns/1.0/ed3.d.ts +29 -0
  240. package/types/src/reader/sax/xmlchars/xmlns/1.0/ed3.d.ts.map +1 -0
  241. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +54 -0
  242. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts.map +1 -0
  243. package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +22 -0
  244. package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts.map +1 -0
  245. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +25 -0
  246. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts.map +1 -0
  247. package/types/src/vba/CompoundDocumentCompression.d.ts +37 -0
  248. package/types/src/vba/CompoundDocumentCompression.d.ts.map +1 -0
  249. package/types/src/vba/VBAProject.d.ts +47 -0
  250. package/types/src/vba/VBAProject.d.ts.map +1 -0
  251. package/types/src/vba/index.d.ts +3 -0
  252. package/types/src/vba/index.d.ts.map +1 -0
  253. package/types/src/writer/XLSXWriter.d.ts +4 -0
  254. package/types/src/writer/XLSXWriter.d.ts.map +1 -0
  255. package/types/src/writer/builder/ContentTypes.d.ts +18 -0
  256. package/types/src/writer/builder/ContentTypes.d.ts.map +1 -0
  257. package/types/src/writer/builder/Emitter.d.ts +25 -0
  258. package/types/src/writer/builder/Emitter.d.ts.map +1 -0
  259. package/types/src/writer/builder/EmitterRegistry.d.ts +29 -0
  260. package/types/src/writer/builder/EmitterRegistry.d.ts.map +1 -0
  261. package/types/src/writer/builder/OpcXmlUtils.d.ts +26 -0
  262. package/types/src/writer/builder/OpcXmlUtils.d.ts.map +1 -0
  263. package/types/src/writer/builder/PackageBuilder.d.ts +148 -0
  264. package/types/src/writer/builder/PackageBuilder.d.ts.map +1 -0
  265. package/types/src/writer/builder/PartWriter.d.ts +24 -0
  266. package/types/src/writer/builder/PartWriter.d.ts.map +1 -0
  267. package/types/src/writer/builder/RelationshipSet.d.ts +18 -0
  268. package/types/src/writer/builder/RelationshipSet.d.ts.map +1 -0
  269. package/types/src/writer/builder/Types.d.ts +311 -0
  270. package/types/src/writer/builder/Types.d.ts.map +1 -0
  271. package/types/src/writer/builder/Utils.d.ts +63 -0
  272. package/types/src/writer/builder/Utils.d.ts.map +1 -0
  273. package/types/src/writer/builder/XmlWriter.d.ts +3 -0
  274. package/types/src/writer/builder/XmlWriter.d.ts.map +1 -0
  275. package/types/src/writer/builder/ZipBackend.d.ts +21 -0
  276. package/types/src/writer/builder/ZipBackend.d.ts.map +1 -0
  277. package/types/src/writer/builder/_Types.d.ts +102 -0
  278. package/types/src/writer/builder/_Types.d.ts.map +1 -0
  279. package/types/src/writer/builder/index.d.ts +6 -0
  280. package/types/src/writer/builder/index.d.ts.map +1 -0
  281. package/types/src/writer/emitters/ChartColorsEmitter.d.ts +7 -0
  282. package/types/src/writer/emitters/ChartColorsEmitter.d.ts.map +1 -0
  283. package/types/src/writer/emitters/ChartEmitter.d.ts +14 -0
  284. package/types/src/writer/emitters/ChartEmitter.d.ts.map +1 -0
  285. package/types/src/writer/emitters/ChartStyleEmitter.d.ts +46 -0
  286. package/types/src/writer/emitters/ChartStyleEmitter.d.ts.map +1 -0
  287. package/types/src/writer/emitters/DrawingEmitter.d.ts +15 -0
  288. package/types/src/writer/emitters/DrawingEmitter.d.ts.map +1 -0
  289. package/types/src/writer/emitters/MetadataEmitter.d.ts +8 -0
  290. package/types/src/writer/emitters/MetadataEmitter.d.ts.map +1 -0
  291. package/types/src/writer/emitters/PropsAppEmitter.d.ts +12 -0
  292. package/types/src/writer/emitters/PropsAppEmitter.d.ts.map +1 -0
  293. package/types/src/writer/emitters/PropsCoreEmitter.d.ts +7 -0
  294. package/types/src/writer/emitters/PropsCoreEmitter.d.ts.map +1 -0
  295. package/types/src/writer/emitters/RichValueEmitter.d.ts +8 -0
  296. package/types/src/writer/emitters/RichValueEmitter.d.ts.map +1 -0
  297. package/types/src/writer/emitters/RichValueStructureEmitter.d.ts +28 -0
  298. package/types/src/writer/emitters/RichValueStructureEmitter.d.ts.map +1 -0
  299. package/types/src/writer/emitters/RichValueTypesEmitter.d.ts +10 -0
  300. package/types/src/writer/emitters/RichValueTypesEmitter.d.ts.map +1 -0
  301. package/types/src/writer/emitters/SharedStringsEmitter.d.ts +13 -0
  302. package/types/src/writer/emitters/SharedStringsEmitter.d.ts.map +1 -0
  303. package/types/src/writer/emitters/StylesEmitter.d.ts +17 -0
  304. package/types/src/writer/emitters/StylesEmitter.d.ts.map +1 -0
  305. package/types/src/writer/emitters/TableEmitter.d.ts +14 -0
  306. package/types/src/writer/emitters/TableEmitter.d.ts.map +1 -0
  307. package/types/src/writer/emitters/ThemeEmitter.d.ts +16 -0
  308. package/types/src/writer/emitters/ThemeEmitter.d.ts.map +1 -0
  309. package/types/src/writer/emitters/WorkbookEmitter.d.ts +11 -0
  310. package/types/src/writer/emitters/WorkbookEmitter.d.ts.map +1 -0
  311. package/types/src/writer/emitters/WorksheetEmitter.d.ts +18 -0
  312. package/types/src/writer/emitters/WorksheetEmitter.d.ts.map +1 -0
  313. package/types/src/writer/emitters/index.d.ts +3 -0
  314. package/types/src/writer/emitters/index.d.ts.map +1 -0
  315. package/types/src/writer/utils/AutoFilter.d.ts +15 -0
  316. package/types/src/writer/utils/AutoFilter.d.ts.map +1 -0
  317. package/types/src/writer/utils/ColorUtils.d.ts +46 -0
  318. package/types/src/writer/utils/ColorUtils.d.ts.map +1 -0
  319. package/types/src/writer/utils/DrawMLUtils.d.ts +26 -0
  320. package/types/src/writer/utils/DrawMLUtils.d.ts.map +1 -0
  321. package/types/src/writer/utils/DummyFunction.d.ts +66 -0
  322. package/types/src/writer/utils/DummyFunction.d.ts.map +1 -0
  323. package/types/src/writer/utils/DxfCollector.d.ts +22 -0
  324. package/types/src/writer/utils/DxfCollector.d.ts.map +1 -0
  325. package/types/src/writer/utils/ExtLstUtils.d.ts +3 -0
  326. package/types/src/writer/utils/ExtLstUtils.d.ts.map +1 -0
  327. package/types/src/writer/utils/IDUtils.d.ts +2 -0
  328. package/types/src/writer/utils/IDUtils.d.ts.map +1 -0
  329. package/types/src/writer/utils/MetadataCollector.d.ts +146 -0
  330. package/types/src/writer/utils/MetadataCollector.d.ts.map +1 -0
  331. package/types/src/writer/utils/ProtectionUtils.d.ts +3 -0
  332. package/types/src/writer/utils/ProtectionUtils.d.ts.map +1 -0
  333. package/types/src/writer/utils/RichValueCollector.d.ts +200 -0
  334. package/types/src/writer/utils/RichValueCollector.d.ts.map +1 -0
  335. package/types/src/writer/utils/TextUtils.d.ts +8 -0
  336. package/types/src/writer/utils/TextUtils.d.ts.map +1 -0
  337. package/types/src/writer/utils/UnsupportedFunctions.d.ts +19 -0
  338. package/types/src/writer/utils/UnsupportedFunctions.d.ts.map +1 -0
  339. package/types/src/writer/utils/VersionUtils.d.ts +26 -0
  340. package/types/src/writer/utils/VersionUtils.d.ts.map +1 -0
@@ -0,0 +1,2237 @@
1
+ /**
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.7.23-beta.1
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { a as t, d as e, f as s, i as r, m as o, n as i, o as n, p as l, r as a, t as c } from "./CL8002u21KKQkkL0.mjs";
8
+ import { CommonUtils as u } from "@sheetxl/utils";
9
+ import { AddressUtils as h, FormulaError as p, IBorder as d, ICondition as g, IEffect as m, IFill as b, IFont as A, IRange as f, IStyle as y, ITextFrame as v, Sort as N, Tuple as F } from "@sheetxl/sdk";
10
+ var C = class {
11
+ constructor(t) {
12
+ this.list = t;
13
+ }
14
+ get length() {
15
+ return this.list.length;
16
+ }
17
+ item(t) {
18
+ return this.list[t];
19
+ }
20
+ forEach(t, e) {
21
+ const s = this.list, r = s.length;
22
+ for (let e = 0; e < r; e++) t(s[e], e, this);
23
+ }
24
+ entries() {
25
+ return this.list.entries();
26
+ }
27
+ keys() {
28
+ return this.list.keys();
29
+ }
30
+ values() {
31
+ return this.list.values();
32
+ }
33
+ [Symbol.iterator]() {
34
+ return this.list.values();
35
+ }
36
+ }, w = (t) => !0 === t || "1" === t || "on" === t || "true" === t || !1 !== t && "0" !== t && "off" !== t && "false" !== t && null, S = (t) => {
37
+ const e = parseInt(t);
38
+ return isNaN(e) ? null : e;
39
+ }, P = (t) => {
40
+ const e = parseFloat(t);
41
+ return isNaN(e) ? null : e;
42
+ }, T = /* @__PURE__ */ new Map(), O = class {
43
+ constructor(t, e, s, r, o, i = null, n = u.EmptyObject) {
44
+ this._fileLocation = "";
45
+ const l = (t, e, s) => n?.getRef?.(t, e, s, n?.parsedRefs), a = (t) => n?.getRefs?.(t, n?.parsedRefs);
46
+ 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, this._serializeElement = t._serializeElement) : (i && (this._fileLocation = i), n?.getRef && (this._getRef = l), n?.getRefs && (this._getRefs = a), this._onWarning = n?.onWarning, this._addPerson = n?.addPerson, this._serializeElement = n?.serializeElement);
47
+ }
48
+ getRef(t, e = !1) {
49
+ return this._getRef?.(t, this._fileLocation, e) ?? null;
50
+ }
51
+ getRelationships() {
52
+ return this._getRefs?.(this._fileLocation) ?? T;
53
+ }
54
+ getPath() {
55
+ return this.currentPath;
56
+ }
57
+ getFileLocation() {
58
+ return this._fileLocation;
59
+ }
60
+ getElemRoot() {
61
+ return this.elemRoot;
62
+ }
63
+ getJsonRoot() {
64
+ return this.jsonRoot;
65
+ }
66
+ warn(t) {
67
+ this._onWarning ? this._onWarning(t) : this._parent ? this._parent?.warn?.(t) : console.warn(t);
68
+ }
69
+ serializeElement(t) {
70
+ return this._serializeElement?.(t) ?? null;
71
+ }
72
+ addPerson(t) {
73
+ return "string" == typeof t && (t = { displayName: t }), this._addPerson ? this._addPerson(t) : this._parent ? this._parent?._addPerson?.(t) ?? null : null;
74
+ }
75
+ getVisitorParamsState() {
76
+ return this.sharedShared.getVisitorParamsState();
77
+ }
78
+ evaluate(t, e) {
79
+ if (!t) return e;
80
+ let s = [e];
81
+ const r = t.split("/"), o = r.length;
82
+ for (let t = 0; t < o; t++) {
83
+ const e = r[t];
84
+ if ("" === e || "." === e) continue;
85
+ const i = [], n = ("*" === e || "**" === e) && !(t === o - 1);
86
+ for (const o of s) if (o) if (n) {
87
+ const e = r[t + 1];
88
+ e && "" !== e && "." !== e && (this._findDescendants(o, e, i), t++);
89
+ } else if ("*" === e || "**" === e) {
90
+ if (!o.childNodes) continue;
91
+ const t = o.childNodes, e = t.length;
92
+ for (let s = 0; s < e; s++) {
93
+ const e = t[s];
94
+ 1 === e.nodeType && i.push(e);
95
+ }
96
+ } else {
97
+ if (!o.childNodes) continue;
98
+ const t = o.childNodes, s = t.length;
99
+ for (let r = 0; r < s; r++) {
100
+ const s = t[r];
101
+ if (1 !== s.nodeType) continue;
102
+ const o = s;
103
+ this._matchesElementName(o, e) && i.push(o);
104
+ }
105
+ }
106
+ if (s = i, 0 === s.length) return null;
107
+ }
108
+ return 1 === s.length ? s[0] : 0 === s.length ? null : new C(s);
109
+ }
110
+ _matchesElementName(t, e) {
111
+ return e.includes(":") ? (t.tagName || t.nodeName) === e : t.localName === e;
112
+ }
113
+ _findDescendants(t, e, s) {
114
+ if (!t || !t.childNodes) return;
115
+ const r = t.childNodes, o = r.length;
116
+ for (let t = 0; t < o; t++) {
117
+ const o = r[t];
118
+ if (1 !== o.nodeType) continue;
119
+ const i = o;
120
+ this._matchesElementName(i, e) && s.push(i), this._findDescendants(i, e, s);
121
+ }
122
+ }
123
+ getFromPath(t, e) {
124
+ return u.getFromPath(t, e);
125
+ }
126
+ setToPath(t, e, s) {
127
+ return u.setToPath(t, e, s);
128
+ }
129
+ getValAttrAsString(t, e) {
130
+ let s = this.evaluate(t, e);
131
+ return s && s.hasAttribute("val") ? s.getAttribute("val") ?? null : null;
132
+ }
133
+ getValAttrAsBoolean(t, e, s = !1) {
134
+ let r = this.evaluate(t, e);
135
+ if (!r) return null;
136
+ const o = r.hasAttribute("val") ? r.getAttribute("val") : void 0;
137
+ return null == o ? s : "1" === o || "on" === o || "true" === o || "0" !== o && "off" !== o && "false" !== o && s;
138
+ }
139
+ getValAttrAsInteger(t, e) {
140
+ let s = this.evaluate(t, e);
141
+ return s && s.hasAttribute("val") ? parseInt(s.getAttribute("val")) ?? null : null;
142
+ }
143
+ getValAttrAsFloat(t, e) {
144
+ let s = this.evaluate(t, e);
145
+ return s && s.hasAttribute("val") ? parseFloat(s.getAttribute("val")) ?? null : null;
146
+ }
147
+ get BOOLEAN_COPY() {
148
+ return w;
149
+ }
150
+ get INT_COPY() {
151
+ return S;
152
+ }
153
+ get FLOAT_COPY() {
154
+ return P;
155
+ }
156
+ copyFromAttribute(t, e, s, r = e, o = null) {
157
+ if (!t || !s || !t.hasAttribute(e)) return;
158
+ let i = t.getAttribute(e);
159
+ if (o) if (Array.isArray(o)) {
160
+ const t = o.length;
161
+ for (let e = 0; e < t; e++) {
162
+ if (null == i) return;
163
+ if (i = o[e](i), null == i) return;
164
+ }
165
+ } else {
166
+ if (null == i) return;
167
+ if (i = o(i), null == i) return;
168
+ }
169
+ this.setToPath(s, r, i);
170
+ }
171
+ }, x = o({
172
+ isBlank: () => _,
173
+ isNotBlank: () => E,
174
+ length: () => R,
175
+ parseRotation: () => k,
176
+ parseValAttrAsBoolean: () => I,
177
+ parseValAttrAsFloat: () => B,
178
+ parseValAttrAsInteger: () => L,
179
+ parseValAttrAsString: () => V
180
+ }), k = (t, e) => {
181
+ if (!t || !t.hasAttribute("rot")) return;
182
+ const s = t.getAttribute("rot"), r = u.roundAccurately(i(s), 2);
183
+ -1e3 !== r && (e.rotation = r);
184
+ }, V = (t, e, s, r, o) => {
185
+ const i = t.getValAttrAsString(r, e);
186
+ null !== i && (s[o] = i);
187
+ }, I = (t, e, s, r, o = r, i = null) => {
188
+ const n = t.getValAttrAsBoolean(r, e, i);
189
+ null !== n && (s[o] = n);
190
+ }, L = (t, e, s, r, o) => {
191
+ const i = t.getValAttrAsInteger(r, e);
192
+ null !== i && (s[o] = i);
193
+ }, B = (t, e, s, r, o, i = 1) => {
194
+ const n = t.getValAttrAsFloat(r, e);
195
+ null !== n && (s[o] = n * i);
196
+ }, _ = (t) => !t || 0 === t.trim().length, E = (t) => !_(t), R = (t) => t?.length ?? 0, j = class {
197
+ constructor(t) {
198
+ this.jsonKey = t;
199
+ }
200
+ visit(t, e, s) {
201
+ const r = {};
202
+ return s[this.jsonKey] = r, r;
203
+ }
204
+ }, Y = class {
205
+ visit(t, e, s) {}
206
+ getStroke(t, e) {
207
+ const s = t.evaluate("ln", e);
208
+ return s ? this.parseLn(t, s) : {};
209
+ }
210
+ parseLn(t, e) {
211
+ const s = {};
212
+ e.hasAttribute("algn") && (s.align = e.getAttribute("algn")), e.hasAttribute("cap") && (s.lineCap = M(e.getAttribute("cap"))), e.hasAttribute("cmpd") && (s.compound = e.getAttribute("cmpd")), e.hasAttribute("w") && (s.width = n(e.getAttribute("w")));
213
+ const o = t.evaluate("miter", e);
214
+ o && (s.lineJoin = "miter", o.hasAttribute("lim") && (s.miterLimit = parseFloat(o.getAttribute("lim")) / 1e5)), t.evaluate("bevel", e) && (s.lineJoin = "bevel"), t.evaluate("round", e) && (s.lineJoin = "round");
215
+ const i = t.evaluate("custDash", e);
216
+ if (i) {
217
+ const e = t.evaluate("ds", i);
218
+ if (e && e.length > 0) {
219
+ const t = [];
220
+ for (let s = 0; s < e.length; s++) {
221
+ const o = e.item(s);
222
+ t.push(r(o.getAttribute("d") ?? "")), t.push(r(o.getAttribute("sp") ?? ""));
223
+ }
224
+ s.dash = t;
225
+ }
226
+ }
227
+ const l = t.evaluate("prstDash", e);
228
+ l && l.hasAttribute("val") && (s.dash = l.getAttribute("val")), this.parseEndElement(t, e, s, "headEnd", "head"), this.parseEndElement(t, e, s, "tailEnd", "tail");
229
+ const a = this.getFill(t, e);
230
+ return a && (s.fill = a), s;
231
+ }
232
+ parseEndElement(t, e, s, r, o) {
233
+ const i = t.evaluate(r, e);
234
+ if (i && (i.hasAttribute("type") && (s[o + "Type"] = i.getAttribute("type")), i.hasAttribute("len") || i.hasAttribute("w"))) {
235
+ const t = i.getAttribute("len") || "med", e = i.getAttribute("w") || "med";
236
+ s[o + "Size"] = t + "-" + e;
237
+ }
238
+ }
239
+ getEffects(t, e) {
240
+ const s = t.evaluate("effectLst", e);
241
+ if (!s) return null;
242
+ const r = [], o = s.childNodes, i = o.length;
243
+ for (let e = 0; e < i; e++) {
244
+ const s = o.item(e);
245
+ if (1 !== s.nodeType) continue;
246
+ const i = this.processEffectElement(t, s, s.localName);
247
+ if (void 0 === i) return;
248
+ r.push(i);
249
+ }
250
+ return r;
251
+ }
252
+ processEffectElement(t, e, s) {
253
+ switch (s) {
254
+ case "outerShdw": {
255
+ const s = {
256
+ type: m.Type.OuterShadow,
257
+ color: this.processAdjColor(t, e)
258
+ };
259
+ return e.hasAttribute("dist") && (s.distance = n(e.getAttribute("dist"))), e.hasAttribute("dir") && (s.angle = i(e.getAttribute("dir"))), e.hasAttribute("blurRad") && (s.blur = n(e.getAttribute("blurRad"))), e.hasAttribute("algn") && (s.alignment = e.getAttribute("algn")), e.hasAttribute("rotWithShape") && (s.isRotatedWithShape = a(e.getAttribute("rotWithShape"))), e.hasAttribute("sx") && (s.scaleX = r(e.getAttribute("sx"))), e.hasAttribute("sy") && (s.scaleY = r(e.getAttribute("sy"))), e.hasAttribute("kx") && (s.skewX = i(e.getAttribute("kx"))), e.hasAttribute("ky") && (s.skewY = i(e.getAttribute("ky"))), s;
260
+ }
261
+ case "innerShdw": {
262
+ const s = {
263
+ type: m.Type.InnerShadow,
264
+ color: this.processAdjColor(t, e)
265
+ };
266
+ return e.hasAttribute("dist") && (s.distance = n(e.getAttribute("dist"))), e.hasAttribute("dir") && (s.angle = i(e.getAttribute("dir"))), e.hasAttribute("blurRad") && (s.blur = n(e.getAttribute("blurRad"))), s;
267
+ }
268
+ case "prstShdw": {
269
+ const s = {
270
+ type: m.Type.PresetShadow,
271
+ color: this.processAdjColor(t, e),
272
+ preset: e.getAttribute("prst") ?? void 0
273
+ };
274
+ return e.hasAttribute("dist") && (s.distance = n(e.getAttribute("dist"))), e.hasAttribute("dir") && (s.angle = i(e.getAttribute("dir"))), s;
275
+ }
276
+ case "glow": {
277
+ const s = {
278
+ type: m.Type.Glow,
279
+ color: this.processAdjColor(t, e)
280
+ };
281
+ return e.hasAttribute("rad") && (s.radius = n(e.getAttribute("rad"))), s;
282
+ }
283
+ case "softEdge": {
284
+ const t = { type: m.Type.SoftEdge };
285
+ return e.hasAttribute("rad") && (t.radius = n(e.getAttribute("rad"))), t;
286
+ }
287
+ case "reflection": {
288
+ const t = { type: m.Type.Reflection };
289
+ return e.hasAttribute("blurRad") && (t.blur = n(e.getAttribute("blurRad"))), e.hasAttribute("dist") && (t.distance = n(e.getAttribute("dist"))), e.hasAttribute("dir") && (t.angle = i(e.getAttribute("dir"))), e.hasAttribute("fadeDir") && (t.fadeAngle = i(e.getAttribute("fadeDir"))), e.hasAttribute("stA") && (t.startAlpha = r(e.getAttribute("stA"))), e.hasAttribute("stPos") && (t.startPosition = r(e.getAttribute("stPos"))), e.hasAttribute("endA") && (t.endAlpha = r(e.getAttribute("endA"))), e.hasAttribute("endPos") && (t.endPosition = r(e.getAttribute("endPos"))), e.hasAttribute("sx") && (t.scaleX = r(e.getAttribute("sx"))), e.hasAttribute("sy") && (t.scaleY = r(e.getAttribute("sy"))), e.hasAttribute("kx") && (t.skewX = i(e.getAttribute("kx"))), e.hasAttribute("ky") && (t.skewY = i(e.getAttribute("ky"))), e.hasAttribute("algn") && (t.alignment = e.getAttribute("algn")), e.hasAttribute("rotWithShape") && (t.isRotatedWithShape = a(e.getAttribute("rotWithShape"))), t;
290
+ }
291
+ default: return;
292
+ }
293
+ }
294
+ getFill(t, e) {
295
+ if (t.evaluate("noFill", e)) return { type: b.Type.None };
296
+ const s = t.evaluate("solidFill", e);
297
+ if (s) {
298
+ const e = this.processAdjColor(t, s);
299
+ if (e) return {
300
+ type: b.Type.Solid,
301
+ color: e
302
+ };
303
+ }
304
+ const r = t.evaluate("gradFill", e);
305
+ if (r) return this.processGradFill(t, r);
306
+ const o = t.evaluate("pattFill", e);
307
+ if (o) return this.processPatternFill(t, o);
308
+ const i = t.evaluate("blipFill", e);
309
+ return i ? this.processImageFill(t, i) : null;
310
+ }
311
+ processGradFill(t, e) {
312
+ const s = { type: b.Type.Gradient };
313
+ e.hasAttribute("rotWithShape") && (s.isRotatedWithShape = "1" === e.getAttribute("rotWithShape"));
314
+ const o = t.evaluate("lin", e);
315
+ o && (s.gradientType = b.GradientType.Linear, o.hasAttribute("ang") && (s.angle = i(o.getAttribute("ang"))), o.hasAttribute("scaled") && (s.scaled = a(o.getAttribute("scaled"))));
316
+ const n = {};
317
+ e.hasAttribute("flip") && (n.mirror = e.getAttribute("flip")), Object.keys(n).length > 0 && (s.tile = n);
318
+ const l = t.evaluate("path", e);
319
+ if (l) {
320
+ l.hasAttribute("path") && (s.gradientType = D(l.getAttribute("path")));
321
+ const e = t.evaluate("fillToRect", l);
322
+ e && (s.focus = this.getRect(e));
323
+ }
324
+ const c = t.evaluate("tileRect", e);
325
+ c && (s.tile || (s.tile = {}), s.tile.bounds = this.getRect(c));
326
+ const u = [], h = t.evaluate("gsLst/gs", e), p = h ? h.length : 0;
327
+ for (let e = 0; e < p; e++) {
328
+ const s = h.item(e), o = {
329
+ offset: r(s.getAttribute("pos") ?? ""),
330
+ color: this.processAdjColor(t, s)
331
+ };
332
+ u.push(o);
333
+ }
334
+ return u.length > 0 && (s.stops = u), s;
335
+ }
336
+ getRect(t) {
337
+ const e = {};
338
+ return t.hasAttribute("t") && (e.t = r(t.getAttribute("t"))), t.hasAttribute("l") && (e.l = r(t.getAttribute("l"))), t.hasAttribute("b") && (e.b = r(t.getAttribute("b"))), t.hasAttribute("r") && (e.r = r(t.getAttribute("r"))), 0 === Object.keys(e).length ? null : e;
339
+ }
340
+ processImageFill(t, e) {
341
+ const s = { type: b.Type.Image };
342
+ return e.hasAttribute("rotWithShape") && (s.isRotatedWithShape = a(e.getAttribute("rotWithShape"))), e.hasAttribute("dpi") && (s.dpi = e.getAttribute("dpi")), s.ref = "https://www.sheetxl.com/logo-color-padded-white.jpg", s.tile = !1, s;
343
+ }
344
+ processPatternFill(t, e) {
345
+ const s = { type: b.Type.Pattern };
346
+ s.patternType = e.getAttribute("prst");
347
+ const r = t.evaluate("bgClr", e);
348
+ if (r) {
349
+ const e = this.processAdjColor(t, r);
350
+ e && (s.background = e);
351
+ }
352
+ const o = t.evaluate("fgClr", e);
353
+ if (o) {
354
+ let e = this.processAdjColor(t, o);
355
+ e && (s.foreground = e);
356
+ }
357
+ return s;
358
+ }
359
+ processAdjColor(t, e) {
360
+ const s = t.evaluate("hslClr", e);
361
+ if (s) return this.processHslClr(t, s);
362
+ const r = t.evaluate("prstClr", e);
363
+ if (r) return this.processClrWithValAttribute(t, r);
364
+ const o = t.evaluate("schemeClr", e);
365
+ if (o) return this.processClrWithValAttribute(t, o);
366
+ const i = t.evaluate("sysClr", e);
367
+ if (i) {
368
+ let e = this.processClrWithValAttribute(t, i);
369
+ const s = i.getAttribute("lastClr");
370
+ return e && s && (e += ` lastClr ${s}`), e;
371
+ }
372
+ const n = t.evaluate("scrgbClr", e);
373
+ if (n) return this.processScrgbClrElement(t, n);
374
+ const l = t.evaluate("srgbClr", e);
375
+ return l ? this.processSrgbClrElement(t, l) : null;
376
+ }
377
+ processScrgbClrElement(t, e) {
378
+ let s = "lrgba(" + r(e.getAttribute("r") ?? "") + "," + r(e.getAttribute("g") ?? "") + "," + r(e.getAttribute("b") ?? "") + ")";
379
+ return s += this.processAdjustments(t, e), s;
380
+ }
381
+ processSrgbClrElement(t, e) {
382
+ let s = e.getAttribute("val");
383
+ return s += this.processAdjustments(t, e), s;
384
+ }
385
+ processHslClr(t, e) {
386
+ let s = "hsl(" + i(e.getAttribute("hue") ?? "") + "," + r(e.getAttribute("sat") ?? "") + "," + r(e.getAttribute("lum") ?? "") + ")";
387
+ return s += this.processAdjustments(t, e), s;
388
+ }
389
+ processClrWithValAttribute(t, e) {
390
+ const s = e.getAttribute("val");
391
+ if (!s) return null;
392
+ let r = s;
393
+ return r += this.processAdjustments(t, e), r;
394
+ }
395
+ processAdjustments(t, e) {
396
+ let s = "";
397
+ const r = e.childNodes, o = r.length;
398
+ for (let e = 0; e < o; e++) {
399
+ const o = r.item(e);
400
+ if (1 === o.nodeType) {
401
+ let e = o.localName;
402
+ s += "hue" === e || "hueOff" === e || "hueMod" === e ? this.processAdjustmentElement(t, o, e, 6e4) : "gray" === e || "comp" === e || "inv" === e || "gamma" === e || "invGamma" === e ? this.processAdjustmentElement(t, o, e, 1) : "alpha" === e || "alphaOff" === e || "alphaMod" === e ? this.processAdjustmentElement(t, o, e, 1e5) : this.processAdjustmentElement(t, o, e);
403
+ }
404
+ }
405
+ return s;
406
+ }
407
+ processAdjustmentElement(t, e, s, r = 1e3) {
408
+ const o = e.getAttribute("val");
409
+ return o ? ` ${s} ${!o || parseFloat(o) / r}` : ` ${s}`;
410
+ }
411
+ }, D = (t) => "circle" === t ? "radial" : t, M = (t) => {
412
+ if ("rnd" === t) return "round";
413
+ if ("flat" === t) return "butt";
414
+ if ("sq" === t) return "square";
415
+ throw new Error("Invalid lineCap type: " + t);
416
+ }, z = class extends Y {
417
+ visit(e, s, r) {
418
+ try {
419
+ const o = e.evaluate("xfrm", s);
420
+ if (o) {
421
+ k(o, r);
422
+ const s = {
423
+ x: 0,
424
+ y: 0,
425
+ width: 0,
426
+ height: 0
427
+ }, i = e.evaluate("off", o);
428
+ i && (s.x = t(i.getAttribute("x")) ?? 0, s.y = t(i.getAttribute("y")) ?? 0);
429
+ const n = e.evaluate("ext", o);
430
+ i && (s.width = t(n.getAttribute("cx")) ?? 0, s.height = t(n.getAttribute("cy")) ?? 0), r.bounds = s;
431
+ }
432
+ const i = e.evaluate("prstGeom", s);
433
+ i?.hasAttribute("prst") ? r.geometry = i?.getAttribute("prst") : e.evaluate("customGeom", s) && console.warn("customGeom not supported yet");
434
+ const n = this.getFill(e, s);
435
+ n && Object.keys(n).length > 0 && (r.fill = n);
436
+ const l = this.getStroke(e, s);
437
+ return l && Object.keys(l).length > 0 && (r.stroke = l), r;
438
+ } catch (t) {
439
+ console.warn(t);
440
+ }
441
+ }
442
+ }, U = class {
443
+ visit(t, e, s) {
444
+ let r = {};
445
+ if (V(t, e, r, "grouping", "grouping"), I(t, e, r, "varyColors", "varyColors"), B(t, e, r, "gapWidth", "gapWidth", .01), B(t, e, r, "overlap", "overlap", .01), this.parseType(t, e, r), L(t, e, r, "bubbleScale", "bubbleScale"), I(t, e, r, "showNegBubbles", "showNegativeBubbleValues"), I(t, e, r, "sizeRepresents", "bubbleSizeRepresentsWidth"), L(t, e, r, "firstSliceAng", "startAngle"), L(t, e, r, "holeSize", "holeSize"), V(t, e, r, "scatterStyle", "scatterStyle"), this.parseAxisIds(t, e, r), Object.keys(r).length > 0) {
446
+ let e = t.getVisitorParamsState().get("types");
447
+ e || (console.warn("Uninitialized types array in ChartTypeVisitor"), e = [], t.getVisitorParamsState().set("types", e)), e.push(r);
448
+ }
449
+ return r;
450
+ }
451
+ parseType(t, e, s) {
452
+ switch (e.localName) {
453
+ case "areaChart":
454
+ s.type = "area";
455
+ break;
456
+ case "bubbleChart":
457
+ s.type = "bubble";
458
+ break;
459
+ case "doughnutChart":
460
+ case "ofPieType":
461
+ case "pieChart":
462
+ s.type = "pie";
463
+ break;
464
+ case "lineChart":
465
+ s.type = "line";
466
+ break;
467
+ case "scatterChart": s.type = "scatter";
468
+ }
469
+ }
470
+ parseAxisIds(t, e, s) {
471
+ const r = t.evaluate("axId", e);
472
+ r && 0 !== r.length && (s.xAxisId = r.item(0).getAttribute("val"), s.yAxisId = r.item(1).getAttribute("val"));
473
+ }
474
+ }, W = (t, e, s) => {
475
+ if (!0 === t.getValAttrAsBoolean("invertIfNegative", e)) if (t.evaluate("extLst/ext/invertSolidFillFmt", e)) {
476
+ if (s.fill && s.fillNegative) {
477
+ const e = t.getFromPath(s, "fill.solid.adjs");
478
+ e && t.setToPath(s, "fillNegative.solid.adjs", e);
479
+ }
480
+ } else {
481
+ const t = { val: "FFFFFF" }, e = {};
482
+ e.solid = t, s.fillNegative = e;
483
+ const r = { val: "000000" }, o = {};
484
+ o.solid = r;
485
+ const i = {};
486
+ i.fill = o, s.strokeNegative = i;
487
+ }
488
+ }, G = class extends Y {
489
+ constructor(t = "text") {
490
+ super(), this._jsonKey = t;
491
+ }
492
+ getTextPath() {
493
+ return this._jsonKey;
494
+ }
495
+ visit(t, e, s) {
496
+ let r = t.getFromPath(s, this.getTextPath());
497
+ return r || (r = {}), this.parseTextElement(t, e, r, !1), Object.keys(r).length > 0 && t.setToPath(s, this.getTextPath(), r), s;
498
+ }
499
+ parseTextElement(t, e, s, r) {
500
+ const o = t.evaluate("p/pPr/defRPr", e) ?? t.evaluate("defRPr", e);
501
+ o && (this.parseTextProperties(t, o, s), new z().visit(t, o, s));
502
+ const i = s.runs ?? [], n = t.evaluate("p/r", e) ?? t.evaluate("r", e), l = (e) => {
503
+ const s = {};
504
+ let r = t.evaluate("t", e);
505
+ const o = t.evaluate("rPr", e);
506
+ o && this.parseTextProperties(t, o, s), r && r.firstChild ? s.text = r.firstChild.textContent ?? "" : e.textContent && (s.text = e.textContent ?? ""), Object.keys(s).length > 0 && i.push(s);
507
+ };
508
+ if (void 0 !== n?.length) for (let t = 0; n && t < n.length; t++) l(n.item(t));
509
+ else l(n || e);
510
+ i.length > 0 && (s.runs = i);
511
+ const a = t.evaluate("bodyPr", e);
512
+ a && k(a, s);
513
+ }
514
+ parseTextProperties(t, e, s) {
515
+ if (!e) return;
516
+ e.hasAttribute("sz") && (s.size = parseFloat(e.getAttribute("sz")) / 100), e.hasAttribute("b") && (s.weight = "1" === e.getAttribute("b") ? 700 : 400), e.hasAttribute("i") && (s.italic = "1" === e.getAttribute("i")), e.hasAttribute("u") && (s.underline = e.getAttribute("u")), e.hasAttribute("strike") && (s.strike = e.getAttribute("strike"));
517
+ const r = this.getFill(t, e);
518
+ r && Object.keys(r).length > 0 && (s.color = r);
519
+ const o = t.evaluate("latin", e);
520
+ if (o && !o.getAttribute("typeface").startsWith("+")) {
521
+ const t = s.font ?? {};
522
+ if (o.hasAttribute("typeface") && (t.family = o.getAttribute("typeface")), o.hasAttribute("panose")) {
523
+ const e = o.getAttribute("panose");
524
+ e && (t.fallbacks = [A.getPanoseFallback(e)]);
525
+ }
526
+ o.hasAttribute("pitchFamily") && (t.pitch = o.getAttribute("pitchFamily")), o.hasAttribute("charset") && (t.charset = o.getAttribute("charset")), Object.keys(t).length > 0 && (s.font = t);
527
+ }
528
+ }
529
+ }, X = class {
530
+ visit(t, e, s) {}
531
+ processDataBarColor(t, s, r, o, i = "auto") {
532
+ if (!s) return;
533
+ const n = e((t) => s.getAttribute(t), i);
534
+ return n && (r[o] = n), r;
535
+ }
536
+ processFonts(t, e, s) {
537
+ if (!e) return;
538
+ const r = e.childNodes;
539
+ let o = 0;
540
+ const i = r.length;
541
+ for (let e = 0; e < i; e++) {
542
+ const i = r.item(e);
543
+ if (1 === i.nodeType && "font" === i.localName) {
544
+ const e = {};
545
+ this.processFont(t, i, e), s[o++] = e;
546
+ }
547
+ }
548
+ return s;
549
+ }
550
+ processFont(t, e, s) {
551
+ t.getValAttrAsBoolean("b", e, !0) && (s.weight = 700), t.getValAttrAsBoolean("i", e, !0) && (s.style = A.Style.Italic), t.getValAttrAsBoolean("strike", e, !0) && (s.strike = !0);
552
+ const r = t.evaluate("u", e);
553
+ r && (s.underline = r.getAttribute("val") || A.UnderlineStyle.Single), V(t, e, s, "vertAlign", "verticalAlign"), "superscript" === s.verticalAlign ? s.verticalAlign = A.VerticalAlignment.Super : "subscript" === s.verticalAlign && (s.verticalAlign = A.VerticalAlignment.Sub), B(t, e, s, "sz", "size");
554
+ const o = t.evaluate("color", e);
555
+ this.processDataBarColor(t, o, s, "color"), s.color || (s.color = "auto"), V(t, e, s, "name", "family"), V(t, e, s, "rFont", "family");
556
+ const i = t.evaluate("family", e);
557
+ if (i) {
558
+ const t = i.getAttribute("val");
559
+ if (t) switch (t) {
560
+ case "1":
561
+ s.fallbacks = ["serif"];
562
+ break;
563
+ case "2":
564
+ s.fallbacks = ["sans-serif"];
565
+ break;
566
+ case "3":
567
+ s.fallbacks = ["monospace"];
568
+ break;
569
+ case "4":
570
+ s.fallbacks = ["cursive"];
571
+ break;
572
+ case "5": s.fallbacks = ["fantasy"];
573
+ }
574
+ }
575
+ return V(t, e, s, "scheme", "scheme"), I(t, e, s, "shadow", "shadow", !0), I(t, e, s, "outline", "outline", !0), t.getValAttrAsBoolean("condense", e, !0) && (s.letterSpacing = -1), t.getValAttrAsBoolean("extend", e, !0) && (s.letterSpacing = 1), L(t, e, s, "charset", "charset"), s;
576
+ }
577
+ processFills(t, e, s) {
578
+ if (!e) return;
579
+ const r = e.childNodes;
580
+ let o = 0;
581
+ const i = r.length;
582
+ for (let e = 0; e < i; e++) {
583
+ const i = r.item(e);
584
+ 1 === i.nodeType && "fill" === i.localName && this.processFill(t, i, s, o++);
585
+ }
586
+ return s;
587
+ }
588
+ processFill(t, e, s, r) {
589
+ const o = { type: b.Type.None }, i = e.childNodes;
590
+ let n = !1;
591
+ const l = i.length;
592
+ for (let e = 0; !n && e < l; e++) {
593
+ const s = i.item(e);
594
+ 1 === s.nodeType && ("gradientFill" === s.localName ? (this.processGradientFill(t, s, o), n = !0) : "patternFill" === s.localName && (this.processPatternFill(t, s, o), n = !0));
595
+ }
596
+ return s[r] = o, s;
597
+ }
598
+ processGradientFill(t, e, s) {
599
+ if (!e) return;
600
+ s.type = b.Type.Gradient;
601
+ const r = [];
602
+ s.stops = r;
603
+ const o = e.getAttribute("type");
604
+ o && (s.gradientType = o);
605
+ const i = e.hasAttribute("degree") ? parseFloat(e.getAttribute("degree")) : 0;
606
+ (i + 90) % 360 != 0 && (s.angle = (i + 90) % 360), (e.hasAttribute("left") || e.hasAttribute("top") || e.hasAttribute("right") || e.hasAttribute("bottom")) && (s.focus = {
607
+ left: $(e.getAttribute("left")),
608
+ top: $(e.getAttribute("top")),
609
+ right: $(e.getAttribute("right")),
610
+ bottom: $(e.getAttribute("bottom"))
611
+ });
612
+ const n = e.childNodes, l = n.length;
613
+ for (let e = 0; e < l; e++) {
614
+ const s = n.item(e);
615
+ if (1 === s.nodeType && "stop" === s.localName) {
616
+ const e = {};
617
+ r.push(e), e.offset = parseFloat(s.getAttribute("position") ?? "");
618
+ const o = t.evaluate("color", s);
619
+ this.processDataBarColor(t, o, e, "color");
620
+ }
621
+ }
622
+ return s;
623
+ }
624
+ processPatternFill(t, e, s) {
625
+ if (!e) return;
626
+ const r = t.getVisitorParamsState().get("processingDXFs"), o = e.getAttribute("patternType") || (r ? b.BuiltInSheetPattern.Solid : b.BuiltInSheetPattern.None);
627
+ if (o === b.BuiltInSheetPattern.None) return { none: !0 };
628
+ s.type = b.Type.Pattern, o && (s.patternType = o);
629
+ let i = "foreground", n = "background";
630
+ const l = s.patternType === b.BuiltInSheetPattern.Solid && r;
631
+ let a = l ? "dk1" : "lt1", c = l ? "lt1" : "dk1";
632
+ if (l) {
633
+ const t = i;
634
+ i = n, n = t;
635
+ }
636
+ const u = t.evaluate("fgColor", e);
637
+ this.processDataBarColor(t, u, s, i, a);
638
+ const h = t.evaluate("bgColor", e);
639
+ return this.processDataBarColor(t, h, s, n, c), l && (s.foreground || (s.foreground = "lt1"), s.background || (s.background = "dk1")), s;
640
+ }
641
+ processBorders(t, e, s, r) {
642
+ if (!e) return;
643
+ const o = e.childNodes;
644
+ let i = 0;
645
+ const n = o.length;
646
+ for (let e = 0; e < n; e++) {
647
+ const n = o.item(e);
648
+ 1 === n.nodeType && "border" === n.localName && this.processBorder(t, n, s, i++, r);
649
+ }
650
+ return s;
651
+ }
652
+ processBorder(t, e, s, r, o) {
653
+ if (!e) return;
654
+ const i = {};
655
+ return this.processBorderStroke(t, e, i, d.Edge.Left), this.processBorderStroke(t, e, i, d.Edge.Right), o ? (i.right || i.left) && (i.right ? i.vertical = { ...i.right } : i.vertical = { ...i.left }) : this.processBorderStroke(t, e, i, d.Edge.Vertical), this.processBorderStroke(t, e, i, d.Edge.Top), this.processBorderStroke(t, e, i, d.Edge.Bottom), o ? (i.bottom || i.top) && (i.bottom ? i.horizontal = { ...i.bottom } : i.horizontal = { ...i.top }) : this.processBorderStroke(t, e, i, d.Edge.Horizontal), s[r] = i, s;
656
+ }
657
+ processBorderStroke(t, e, s, r) {
658
+ if (!e) return;
659
+ const o = t.evaluate(r, e);
660
+ if (!o) return;
661
+ const i = {};
662
+ o.hasAttribute("style") ? i.style = o.getAttribute("style") : t.getVisitorParamsState().get("processingDXFs") && (i.style = d.StrokeStyle.None);
663
+ const n = t.evaluate("color", o);
664
+ return n && this.processDataBarColor(t, n, i, "color"), Object.keys(i).length > 0 ? s[r] = i : null;
665
+ }
666
+ }, $ = (t) => {
667
+ if (!t) return 0;
668
+ const e = parseFloat(t);
669
+ return isNaN(e) ? 0 : e;
670
+ }, K = class {
671
+ visit(t, e, s) {
672
+ if (!e) return;
673
+ let r = t.evaluate("*/cNvPr", e);
674
+ return r.item && (r = r.item(0)), r && (t.copyFromAttribute(r, "name", s), t.copyFromAttribute(r, "descr", s, "description"), t.copyFromAttribute(r, "hidden", s, "hidden", t.BOOLEAN_COPY), t.copyFromAttribute(r, "id", s)), s;
675
+ }
676
+ }, H = class extends K {
677
+ visit(t, e, s) {
678
+ if (!e) return;
679
+ if (t.getPath().includes("Fallback") && s.content) return s;
680
+ s = super.visit(t, e, s);
681
+ const r = t.evaluate("nvSpPr/cNvSpPr", e);
682
+ if (r) {
683
+ const e = t.evaluate("spLocks", r);
684
+ if (e) {
685
+ e.hasAttribute("noChangeAspect") && (s.lockAspect = "1" === e.getAttribute("noChangeAspect"));
686
+ const t = {};
687
+ Object.keys(t).length > 0 && (s.locks = t);
688
+ }
689
+ }
690
+ t.warn(`'${s.name}' is not editable; imported as a fixed drawing.`);
691
+ let o = t.evaluate("*/cNvPr", e);
692
+ o?.item && (o = o.item(0));
693
+ const i = o?.getAttribute?.("id"), n = i ? parseInt(i, 10) : void 0, l = {
694
+ type: "sp",
695
+ xml: t.serializeElement(e) ?? void 0,
696
+ sourceId: void 0 === n || isNaN(n) ? void 0 : n
697
+ };
698
+ return s.content = {
699
+ type: "sp",
700
+ json: l
701
+ }, l;
702
+ }
703
+ }, q = "richTypes", J = "richData", Q = class {
704
+ visit(t, e, s) {
705
+ if (!e) return;
706
+ const r = e.childNodes, o = r.length;
707
+ for (let e = 0; e < o; e++) {
708
+ const o = r.item(e);
709
+ 1 === o.nodeType && "Relationship" === o.localName && this.processRelationship(t, o, s);
710
+ }
711
+ return s;
712
+ }
713
+ processRelationship(t, e, s) {
714
+ const r = {};
715
+ t.copyFromAttribute(e, "Target", r, "target"), t.copyFromAttribute(e, "Type", r, "type"), t.copyFromAttribute(e, "TargetMode", r, "targetMode");
716
+ s[e.getAttribute("Id")] = r;
717
+ }
718
+ }, Z = class {
719
+ visit(t, e, s) {
720
+ const r = [], o = e.childNodes, i = o.length;
721
+ for (let e = 0; e < i; e++) {
722
+ const s = o.item(e);
723
+ if (1 !== s.nodeType) continue;
724
+ const i = this.processProperty(t, s);
725
+ i && r.push(i);
726
+ }
727
+ return r.length > 0 && (s.properties = r), r;
728
+ }
729
+ processProperty(t, e) {
730
+ if (e) return e.getAttribute("xsi:type"), {
731
+ key: e.localName,
732
+ value: e.textContent || ""
733
+ };
734
+ }
735
+ }, tt = class {
736
+ visit(t, e, s) {
737
+ const r = [], o = e.childNodes, i = o.length;
738
+ for (let e = 0; e < i; e++) {
739
+ const s = o.item(e);
740
+ if (1 !== s.nodeType) continue;
741
+ const i = this.processProperty(t, s);
742
+ i && r.push(i);
743
+ }
744
+ return r.length > 0 && (s.properties = r), r;
745
+ }
746
+ processProperty(t, e) {
747
+ if (e) return {
748
+ key: e.localName,
749
+ value: e.textContent || ""
750
+ };
751
+ }
752
+ }, et = class {
753
+ visit(t, e, s) {
754
+ return I(t, e, s, "roundedCorners", "roundedCorners"), L(t, e, s, ".//AlternateContent/Fallback/style", "styleId"), t.getVisitorParamsState().set("types", []), t.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()), s.range = null, s;
755
+ }
756
+ afterVisit(t, e, s) {
757
+ let r = {};
758
+ s.types = r;
759
+ let o = {}, i = 0, n = {}, l = 0, a = t.getVisitorParamsState().get("axes");
760
+ const c = t.getVisitorParamsState().get("types"), u = c.length;
761
+ for (let t = 0; t < u; t++) {
762
+ const e = c[t];
763
+ if (e.xAxisId) {
764
+ const r = e.xAxisId, n = a.get(r);
765
+ o[t + ""] = n, e.offsetXAxis = t, delete e.xAxisId, s.xAxes = o, o.length = ++i;
766
+ }
767
+ if (e.yAxisId) {
768
+ const r = e.yAxisId, o = a.get(r);
769
+ n[t + ""] = o, e.offsetYAxis = t, delete e.yAxisId, s.yAxes = n, n.length = ++l;
770
+ }
771
+ r[t + ""] = e;
772
+ }
773
+ r.length = c.length;
774
+ const h = t.getVisitorParamsState().get("series");
775
+ if (!h || 0 === h.length) return;
776
+ const p = {};
777
+ s.series = p;
778
+ const d = h.length;
779
+ for (let t = 0; t < d; t++) p[t + ""] = h[t];
780
+ p.length = d, t.getVisitorParamsState().delete("types"), t.getVisitorParamsState().delete("axes"), t.getVisitorParamsState().delete("series");
781
+ }
782
+ }, st = class {
783
+ visit(t, e, s) {
784
+ let r = {};
785
+ return s.plotArea = r, r;
786
+ }
787
+ }, rt = z, ot = class extends U {
788
+ parseType(t, e, s) {
789
+ const r = t.getValAttrAsString("barDir", e);
790
+ r && (s.type = "col" === r ? "column" : "bar");
791
+ }
792
+ }, it = U, nt = class {
793
+ constructor(t) {
794
+ this.jsonKey = t;
795
+ }
796
+ visit(t, e, s) {
797
+ let r = {}, o = r, i = t.getValAttrAsString("idx", e);
798
+ null !== i && (o = {}, o[i] = r);
799
+ const n = t.getValAttrAsBoolean("delete", e);
800
+ this.parseNumFormat(t, e, r), !0 === n ? (r.showBubbleSize = !1, r.showCatName = !1, r.showLeaderLines = !1, r.showPercentage = !1, r.showSerName = !1, r.showVal = !1, r.showLegendKey = !1) : (I(t, e, r, "showBubbleSize", "showBubbleSize"), I(t, e, r, "showCatName", "showCatName"), I(t, e, r, "showLeaderLines", "showLeaderLines"), I(t, e, r, "showPercent", "showPercentage"), I(t, e, r, "showSerName", "showSerName"), I(t, e, r, "showVal", "showVal"), I(t, e, r, "showLegendKey", "showLegendKey"));
801
+ const l = t.evaluate("separator", e);
802
+ return null !== l && (r.separator = l.textContent), V(t, e, r, "dLblPos", "position"), s[this.jsonKey] = o, r;
803
+ }
804
+ parseNumFormat(t, e, s) {
805
+ const r = t.evaluate("numFmt", e);
806
+ r && (s.formatCode = r.getAttribute("formatCode"), r.hasAttribute("sourceLinked") && (s.sourceLinked = "1" === r.getAttribute("sourceLinked")));
807
+ }
808
+ }, lt = class {
809
+ visit(t, e, s) {
810
+ const r = {};
811
+ L(t, e, r, "explosion", "explosion");
812
+ let o = t.evaluate("cat/*/f", e);
813
+ o || (o = t.evaluate("xVal/*/f", e));
814
+ let i = null;
815
+ null !== o && null !== o.firstChild && (i = o.firstChild.nodeValue), o || (o = t.evaluate("cat/strLit", e), o || (o = t.evaluate("cat/numLit", e)), o && (i = this.parsePointsAsString(t, o))), null !== i && (r.xRange = i);
816
+ let n = t.evaluate("val/*/f", e);
817
+ n || (n = t.evaluate("yVal/*/f", e));
818
+ let l = null;
819
+ n && n.firstChild && (l = n.firstChild.nodeValue), n || (n = t.evaluate("val/numLit", e), null !== n && (l = this.parsePointsAsString(t, n))), null !== l && (r.valRange = l), this.parseTitleRangeOrValue(t, e, r), L(t, e, r, "idx", "idx"), I(t, e, r, "smooth", "smooth"), r.offsetChart = t.getVisitorParamsState().get("types").length - 1;
820
+ let a = t.getVisitorParamsState().get("series");
821
+ return a || (a = [], t.getVisitorParamsState().set("series", a)), a.push(r), r;
822
+ }
823
+ parseTitleRangeOrValue(t, e, s) {
824
+ const r = t.evaluate("tx/strRef/f", e);
825
+ if (null !== r) {
826
+ const e = r.firstChild.nodeValue;
827
+ t.setToPath(s, "title.range", e);
828
+ } else {
829
+ const r = t.evaluate("tx/v", e);
830
+ null !== r && t.setToPath(s, "title.text.simpleRun", r.firstChild.nodeValue);
831
+ }
832
+ }
833
+ parsePointsAsString(t, e) {
834
+ let s = "{";
835
+ const r = t.getValAttrAsInteger("ptCount", e), o = t.evaluate("pt", e), i = [];
836
+ for (let s = 0; o && r && s < r; s++) {
837
+ let r = null;
838
+ const o = t.evaluate("pt[@idx='" + s + "']/v", e);
839
+ o && (r = o.textContent), i[s] = r;
840
+ }
841
+ for (let t = 0; t < i.length; t++) t > 0 && (s += ","), void 0 !== i[t] && (s += i[t]);
842
+ return s += "}", s;
843
+ }
844
+ afterVisit(t, e, s) {
845
+ W(t, e, s);
846
+ let r = t.getFromPath(s, "points");
847
+ if (r) {
848
+ const e = Object.keys(r);
849
+ for (let o = 0; o < e.length; o++) {
850
+ const i = e[o], n = t.getFromPath(r, i);
851
+ if (!n) continue;
852
+ let l = t.getFromPath(n, "markers");
853
+ l && (t.setToPath(s, "markers.points." + i, l), delete n.markers);
854
+ }
855
+ }
856
+ }
857
+ }, at = class {
858
+ DataPointVisitor() {}
859
+ visit(t, e, s) {
860
+ let r = t.getFromPath(s, "points"), o = null;
861
+ r ? o = r : (o = {}, t.setToPath(s, "points", o));
862
+ let i = {}, n = t.getValAttrAsString("idx", e);
863
+ return null !== n && (o[n] = i), I(t, e, i, "bubble3D", "bubble3D"), L(t, e, i, "explosion", "explosion"), W(t, e, i), i;
864
+ }
865
+ }, ct = class {
866
+ visit(t, e, s) {
867
+ const r = e.parentNode.localName;
868
+ if ("ser" === r || "dPt" === r) {
869
+ const r = {}, o = t.getValAttrAsString("size", e);
870
+ null !== o && (r.size = o);
871
+ const i = t.getValAttrAsString("symbol", e);
872
+ return i && (r.type = i), s.markers = r, r;
873
+ }
874
+ return null;
875
+ }
876
+ }, ut = class {
877
+ visit(t, e, s) {
878
+ let r = {};
879
+ this.parseScaling(t, e, r), B(t, e, r, "majorUnit", "majorUnits"), B(t, e, r, "minorUnit", "minorUnits"), I(t, e, r, "delete", "shown"), this.parseOrientation(t, e, r), this.parseNumFormat(t, e, r), V(t, e, r, "majorTickMark", "majorTickMarks"), V(t, e, r, "minorTickMark", "minorTickMarks"), V(t, e, r, "crosses", "crosses"), B(t, e, r, "crossesAt", "crosses"), V(t, e, r, "crossBetween", "crossBetween"), this.parseLabelAlign(t, e, r), L(t, e, r, "lblOffset", "labelOffset"), V(t, e, r, "tickLblPos", "labelPosition");
880
+ const o = t.getValAttrAsInteger("noMultiLvlLbl", e);
881
+ r.labelMultiLevel = null !== o && 0 === o, L(t, e, r, "tickMarkSkip", "tickMarkSkip"), L(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"), V(t, e, r, "baseTimeUnit", "baseUnitDates"), t.getVisitorParamsState().get("axes") || (console.warn("Uninitialized axes map in AxisVisitor"), t.getVisitorParamsState().set("axes", /* @__PURE__ */ new Map()));
882
+ const i = t.getValAttrAsString("axId", e);
883
+ return t.getVisitorParamsState().get("axes").set(i, r), r;
884
+ }
885
+ parseTimeUnits(t, e, s, r, o, i) {
886
+ const n = {};
887
+ let l = t.getValAttrAsString(o, e);
888
+ null !== l && (n.dem = l, n.amt = t.getValAttrAsString(i, e)), Object.keys(n).length > 0 && (s[r] = n);
889
+ }
890
+ parseDisplayCustOrBuiltInUnit(t, e, s) {
891
+ let r = e.getValAttrAsString("dispUnits/builtInUnit", t);
892
+ r || (r = e.getValAttrAsString("dispUnits/custUnit", t)), r && (s.displayUnits = r);
893
+ }
894
+ parseLabelAlign(t, e, s) {
895
+ let r = t.getValAttrAsString("lblAlgn", e);
896
+ null !== r && ("ctr" === r ? s.labelAlign = "center" : "l" === r ? s.labelAlign = "left" : "r" === r && (s.labelAlign = "right"));
897
+ }
898
+ parseOrientation(t, e, s) {
899
+ const r = t.getValAttrAsString("AxPos", e);
900
+ null !== r && ("b" === r ? s.orientation = "bottom" : "l" === r ? s.orientation = "left" : "r" === r ? s.orientation = "right" : "t" === r && (s.orientation = "top"));
901
+ }
902
+ parseNumFormat(t, e, s) {
903
+ const r = {}, o = t.evaluate("numFmt", e);
904
+ null !== o && (o.hasAttribute("formatCode") && (r.formatCode = o.getAttribute("formatCode")), o.hasAttribute("sourceLinked") && (r.sourceLinked = "1" === o.getAttribute("sourceLinked"))), Object.keys(r).length > 0 && (s.labels = r);
905
+ }
906
+ parseScaling(t, e, s) {
907
+ const r = t.getValAttrAsString("scaling/orientation", e);
908
+ null !== r && (s.inverted = "minMax" !== r);
909
+ const o = t.getValAttrAsFloat("scaling/logBase", e);
910
+ null !== o && (s.logBase = o, s.scaleType = "log"), B(t, e, s, "scaling/max", "max"), B(t, e, s, "scaling/min", "min");
911
+ }
912
+ afterVisit(t, e, s) {
913
+ s.fill && s.labels && (s.labels.fill = s.fill, delete s.fill);
914
+ let r = t.getValAttrAsBoolean("delete", e);
915
+ null !== r && (t.setToPath(s, "labels.shown", !0 !== r), t.setToPath(s, "shown", !0 !== r));
916
+ const o = t.getFromPath(s, "dispUnits.displayUnitsLabel");
917
+ o && (t.setToPath(s, "displayUnitsLabel", o), delete s.dispUnits);
918
+ const i = t.evaluate("title", e);
919
+ t.setToPath(s, "title.shown", null !== i);
920
+ const n = t.evaluate("minorGridlines", e);
921
+ t.setToPath(s, "gridLinesMinor.shown", null !== n);
922
+ const l = t.evaluate("majorGridlines", e);
923
+ t.setToPath(s, "gridLinesMajor.shown", null !== l);
924
+ }
925
+ }, ht = G, pt = class {
926
+ visit(t, e, s) {
927
+ const r = t.getVisitorParamsState().get("series");
928
+ let o = t.getValAttrAsInteger("idx", e), i = null !== o ? r[o] : void 0;
929
+ if (i) {
930
+ let s = t.getFromPath(i, "title");
931
+ s || (s = {}, t.setToPath(i, "title", s));
932
+ let r = s, o = t.getValAttrAsBoolean("delete", e);
933
+ return null !== o && (r.shown = !o), r;
934
+ }
935
+ return s;
936
+ }
937
+ }, dt = class {
938
+ visit(t, e, s) {
939
+ const r = {};
940
+ return I(t, e, r, "overlay", "overlay"), V(t, e, r, "legendPos", "position"), s.legend = r, r;
941
+ }
942
+ }, gt = class extends z {
943
+ visit(t, e, s) {
944
+ const r = this.getFill(t, e);
945
+ Object.keys(r).length > 0 && (s.fillNegative = r);
946
+ const o = this.getStroke(t, e);
947
+ return Object.keys(o).length > 0 && (s.strokeNegative = o), s;
948
+ }
949
+ }, mt = class extends G {
950
+ constructor(t = "title") {
951
+ super(t);
952
+ }
953
+ parseTitleRangeOrValue(t, e, s) {
954
+ let r = t.evaluate("tx/strRef/f", e) ?? null;
955
+ if (r) {
956
+ const e = r.firstElementChild.nodeValue;
957
+ t.setToPath(s, "range", e);
958
+ }
959
+ }
960
+ visit(t, e, s) {
961
+ const r = {};
962
+ I(t, e, r, "overlay", "overlay"), s[this._jsonKey] = r;
963
+ let o = t.getFromPath(r, this.getTextPath());
964
+ o || (o = {}), this.parseTitleRangeOrValue(t, e, r);
965
+ const i = t.evaluate("txPr", e);
966
+ i && this.parseTextElement(t, i, o, !1);
967
+ const n = t.evaluate("tx/rich", e);
968
+ return n && this.parseTextElement(t, n, o, !0), Object.keys(o).length > 0 && t.setToPath(r, "text", o), r;
969
+ }
970
+ afterVisit(t, e, s) {
971
+ if (s?.text) {
972
+ const t = s.text?.rotation ?? null;
973
+ null !== t && (s.rotation = parseInt(t), delete s.title.rotation);
974
+ }
975
+ }
976
+ }, bt = class {
977
+ visit(t, e, s) {
978
+ const r = t.evaluate("manualLayout", e);
979
+ if (r) {
980
+ let e = {};
981
+ B(t, r, e, "x", "x"), B(t, r, e, "y", "y"), B(t, r, e, "w", "w"), B(t, r, e, "h", "h"), V(t, r, e, "xMode", "xMode"), V(t, r, e, "yMode", "yMode"), V(t, r, e, "wMode", "wMode"), V(t, r, e, "hMode", "hMode"), Object.keys(e).length > 0 && (s.manualLayout = e);
982
+ }
983
+ return s;
984
+ }
985
+ }, At = class {
986
+ visit(t, e, s) {
987
+ return s.name = e.getAttribute("name"), s;
988
+ }
989
+ }, ft = class extends Y {
990
+ visit(t, e, s) {
991
+ const r = {};
992
+ r.name = e.getAttribute("name");
993
+ const o = e.childNodes, i = o.length;
994
+ for (let s = 0; s < i; s++) {
995
+ const i = o.item(s);
996
+ if (1 === i.nodeType) {
997
+ let s = i.localName;
998
+ const o = t.evaluate(s, e);
999
+ r[s] = this.processAdjColor(t, o);
1000
+ }
1001
+ }
1002
+ return Object.keys(r).length > 0 && (s.colors = r), r;
1003
+ }
1004
+ }, yt = class {
1005
+ visit(t, e, s) {
1006
+ const r = {};
1007
+ r.name = e.getAttribute("name");
1008
+ const o = t.evaluate("majorFont", e), i = this.processFontElement(t, o, {});
1009
+ i && (r.majorFont = i.family, i.fallbacks && (r.majorFallbacks = i.fallbacks));
1010
+ const n = t.evaluate("minorFont", e), l = this.processFontElement(t, n, {});
1011
+ return l && (r.minorFont = l.family, l.fallbacks && (r.minorFallbacks = l.fallbacks)), s.fonts = r, r;
1012
+ }
1013
+ processFontElement(t, e, s) {
1014
+ if (!e) return;
1015
+ const r = t.evaluate("latin", e);
1016
+ if (!r) return;
1017
+ const o = r.getAttribute("typeface");
1018
+ o && (s.family = o);
1019
+ const i = r.getAttribute("panose");
1020
+ return i && (s.fallbacks = [A.getPanoseFallback(i)]), s;
1021
+ }
1022
+ }, vt = class extends Y {
1023
+ visit(t, e, s) {
1024
+ const r = this.parseFillList(t, e, "fillStyleLst"), o = this.parseLnList(t, e, "lnStyleLst"), i = this.parseEffectStyleList(t, e, "effectStyleLst"), n = this.parseFillList(t, e, "bgFillStyleLst");
1025
+ if (r && o && i && n) return s.fillStyleLst = r, s.lnStyleLst = o, s.effectStyleLst = i, void (s.bgFillStyleLst = n);
1026
+ const l = t.serializeElement(e);
1027
+ l && (s.formatSchemeXml = l);
1028
+ }
1029
+ parseFillList(t, e, s) {
1030
+ const r = t.evaluate(s, e);
1031
+ if (!r) return;
1032
+ const o = [], i = r.childNodes, n = i.length;
1033
+ for (let e = 0; e < n; e++) {
1034
+ const s = i.item(e);
1035
+ if (1 !== s.nodeType) continue;
1036
+ const r = this.parseFillListItem(t, s);
1037
+ if (void 0 === r) return;
1038
+ o.push(r);
1039
+ }
1040
+ return o;
1041
+ }
1042
+ parseFillListItem(t, e) {
1043
+ switch (e.localName) {
1044
+ case "noFill": return { type: b.Type.None };
1045
+ case "solidFill": {
1046
+ const s = this.processAdjColor(t, e);
1047
+ return s ? {
1048
+ type: b.Type.Solid,
1049
+ color: s
1050
+ } : void 0;
1051
+ }
1052
+ case "gradFill": return this.processGradFill(t, e);
1053
+ case "pattFill": return this.processPatternFill(t, e);
1054
+ default: return;
1055
+ }
1056
+ }
1057
+ parseLnList(t, e, s) {
1058
+ const r = t.evaluate(s, e);
1059
+ if (!r) return;
1060
+ const o = [], i = r.childNodes, n = i.length;
1061
+ for (let e = 0; e < n; e++) {
1062
+ const s = i.item(e);
1063
+ if (1 === s.nodeType) {
1064
+ if (t.evaluate("headEnd", s) || t.evaluate("tailEnd", s)) return;
1065
+ o.push(this.parseLn(t, s));
1066
+ }
1067
+ }
1068
+ return o;
1069
+ }
1070
+ parseEffectStyleList(t, e, s) {
1071
+ const r = t.evaluate(s, e);
1072
+ if (!r) return;
1073
+ const o = [], i = r.childNodes, n = i.length;
1074
+ for (let e = 0; e < n; e++) {
1075
+ const s = i.item(e);
1076
+ if (1 !== s.nodeType) continue;
1077
+ if (t.evaluate("scene3d", s) || t.evaluate("sp3d", s)) return;
1078
+ const r = this.getEffects(t, s);
1079
+ if (void 0 === r) return;
1080
+ o.push(r ?? []);
1081
+ }
1082
+ return o;
1083
+ }
1084
+ }, Nt = class {
1085
+ visit(t, e, s) {
1086
+ if (!e) return;
1087
+ const r = {}, o = e.getAttribute("r:id");
1088
+ if (o) {
1089
+ const e = t.getRef(o);
1090
+ "string" == typeof e && (r.address = e);
1091
+ }
1092
+ return t.copyFromAttribute(e, "tooltip", r, "screenTip"), t.copyFromAttribute(e, "history", r, "history", t.BOOLEAN_COPY), t.copyFromAttribute(e, "tgtFrame", r, "target"), s.hyperlink = r, r;
1093
+ }
1094
+ }, Ft = class {
1095
+ visit(t, e, s) {
1096
+ if (!e) return;
1097
+ const r = {}, o = [];
1098
+ return this.processFilterColumns(t, e, o, s), o.length > 0 && (r.conditions = o), Object.keys(r).length > 0 && (s.filter = r), r;
1099
+ }
1100
+ processColorFilter(t, e) {
1101
+ const s = {}, r = {
1102
+ operator: g.BuiltInOperatorNames.Color,
1103
+ param: s
1104
+ };
1105
+ return t.copyFromAttribute(e, "cellColor", s, "cellColor", t.BOOLEAN_COPY), t.copyFromAttribute(e, "dxfId", s, "styleId", t.INT_COPY), r;
1106
+ }
1107
+ processCustomFilter(t, e) {
1108
+ return {
1109
+ operator: e.getAttribute("operator"),
1110
+ param: e.getAttribute("val")
1111
+ };
1112
+ }
1113
+ processCustomFilters(t, e) {
1114
+ const s = e.getAttribute("and"), r = "and" === s || "1" === s;
1115
+ e.getAttribute("val");
1116
+ const o = [], i = {
1117
+ operator: r ? g.BuiltInOperatorNames.And : g.BuiltInOperatorNames.Or,
1118
+ param: o
1119
+ }, n = e.childNodes, l = n.length;
1120
+ for (let e = 0; e < l; e++) {
1121
+ const s = n.item(e);
1122
+ if (1 !== s.nodeType) continue;
1123
+ let r = null;
1124
+ "customFilter" === s.localName && (r = this.processCustomFilter(t, s)), r && o.push(r);
1125
+ }
1126
+ return i;
1127
+ }
1128
+ processDynamicFilter(t, e) {
1129
+ const s = {}, r = {
1130
+ operator: g.BuiltInOperatorNames.TimePeriod,
1131
+ param: s
1132
+ };
1133
+ let o = e.getAttribute("type");
1134
+ return "aboveAverage" === o ? o = g.AverageType.Above : "belowAverage" === o && (o = g.AverageType.Below), Object.values(g.AverageType).includes(o) ? (r.operator = g.BuiltInOperatorNames.Average, t.copyFromAttribute(e, "val", s, "stdDevs", t.INT_COPY)) : t.copyFromAttribute(e, "val", s, "anchorDate", t.INT_COPY), t.copyFromAttribute(e, "type", s, "operator"), t.copyFromAttribute(e, "maxVal", s, "maxVal", t.INT_COPY), r;
1135
+ }
1136
+ processDateGroupItem(t, e) {
1137
+ const s = {};
1138
+ 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;
1139
+ }
1140
+ processFilterItem(t, e) {
1141
+ if (e.hasAttribute("val")) return e.getAttribute("val");
1142
+ }
1143
+ processFilters(t, e) {
1144
+ const s = {}, r = {
1145
+ operator: g.BuiltInOperatorNames.InSet,
1146
+ param: s
1147
+ };
1148
+ t.copyFromAttribute(e, "blank", r, "blank", t.BOOLEAN_COPY), t.copyFromAttribute(e, "calendarType", r, "calendarType");
1149
+ let o = [], i = [];
1150
+ const n = e.childNodes, l = n.length;
1151
+ for (let e = 0; e < l; e++) {
1152
+ const s = n.item(e);
1153
+ if (1 === s.nodeType) {
1154
+ if ("dateGroupItem" === s.localName) {
1155
+ const e = this.processDateGroupItem(t, s);
1156
+ e && o.push(e);
1157
+ } else if ("filter" === s.localName) {
1158
+ const e = this.processFilterItem(t, s);
1159
+ void 0 !== e && i.push(e);
1160
+ }
1161
+ }
1162
+ }
1163
+ return o.length > 0 && (s.dateGroups = o), i.length > 0 && (s.items = i), r;
1164
+ }
1165
+ processIcon(t, e) {
1166
+ const s = {}, r = {
1167
+ operator: g.BuiltInOperatorNames.Icon,
1168
+ param: s
1169
+ };
1170
+ return t.copyFromAttribute(e, "iconId", s, "iconId", t.INT_COPY), t.copyFromAttribute(e, "iconSet", s), r;
1171
+ }
1172
+ processTop10(t, e) {
1173
+ const s = {}, r = {
1174
+ operator: g.BuiltInOperatorNames.TopN,
1175
+ param: s
1176
+ };
1177
+ 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), r;
1178
+ }
1179
+ processFilterCriteria(t, e) {
1180
+ if (!e) return;
1181
+ const s = e.childNodes;
1182
+ let r;
1183
+ const o = s.length;
1184
+ for (let e = 0; e < o; e++) {
1185
+ const o = s.item(e);
1186
+ 1 === o.nodeType && ("colorFilter" === o.localName ? r = this.processColorFilter(t, o) : "customFilters" === o.localName ? r = this.processCustomFilters(t, o) : "dynamicFilter" === o.localName ? r = this.processDynamicFilter(t, o) : "filters" === o.localName ? r = this.processFilters(t, o) : "iconFilter" === o.localName ? r = this.processIcon(t, o) : "top10" === o.localName && (r = this.processTop10(t, o)));
1187
+ }
1188
+ return r;
1189
+ }
1190
+ processFilterColumn(t, e, s) {
1191
+ if (!e) return null;
1192
+ if (!e.hasAttribute("colId")) return;
1193
+ const r = parseInt(e.getAttribute("colId"));
1194
+ let o = !1;
1195
+ if (e.hasAttribute("hiddenButton") && (o = a(e.getAttribute("hiddenButton"))), o && s) {
1196
+ let t = s.hiddenButtons;
1197
+ t || (t = [], s.hiddenButtons = t), t.push(r);
1198
+ }
1199
+ let i = !1;
1200
+ if (e.hasAttribute("showButton") && (i = a(e.getAttribute("showButton"))), i && s) {
1201
+ let t = s.showButtons;
1202
+ !0 !== t && (t || (t = [], s.showButtons = t), t[r] = !0);
1203
+ }
1204
+ const n = this.processFilterCriteria(t, e);
1205
+ return n ? (n.index = r, n) : null;
1206
+ }
1207
+ processFilterColumns(t, e, s, r) {
1208
+ if (!e) return;
1209
+ const o = e.childNodes, i = o.length;
1210
+ for (let e = 0; e < i; e++) {
1211
+ const i = o.item(e);
1212
+ if (1 === i.nodeType && "filterColumn" === i.localName) {
1213
+ const e = this.processFilterColumn(t, i, r);
1214
+ e && s.push(e);
1215
+ }
1216
+ }
1217
+ return s;
1218
+ }
1219
+ }, Ct = class {
1220
+ visit(t, e, s) {
1221
+ if (!e) return;
1222
+ const r = e.getAttribute("ref"), o = {};
1223
+ e.hasAttribute("caseSensitive") && (o.collatorOptions = a(e.getAttribute("caseSensitive")) ? N.CaseSensitiveOptions : N.CaseInsensitiveOptions);
1224
+ const i = e.getAttribute("sortMethod");
1225
+ null != i && "none" !== i && ("stroke" === i ? o.collatorOptions = {
1226
+ ...o.collatorOptions,
1227
+ collation: "stroke"
1228
+ } : "pinYin" === i && (o.collatorOptions = {
1229
+ ...o.collatorOptions,
1230
+ collation: "pinyin"
1231
+ }));
1232
+ const n = {};
1233
+ e.hasAttribute("columnSort") && a(e.getAttribute("columnSort")) && (n.axis = f.Axis.Column);
1234
+ const l = h.fastStringToRange(r), c = [];
1235
+ return this.processSortConditions(t, e, c, l, o), c.length > 0 && (n.sorts = c), Object.keys(c).length > 0 && (s.sort = n), n;
1236
+ }
1237
+ processSortCondition(t, e, s, r) {
1238
+ if (!e) return null;
1239
+ const o = {};
1240
+ if (!e.hasAttribute("ref")) return void console.warn("no ref for sort conditional", t.getPath());
1241
+ if (e.hasAttribute("ref")) {
1242
+ const t = e.getAttribute("ref"), r = h.fastStringToRange(t);
1243
+ o.index = s ? r.colStart - s.colStart : r.colStart;
1244
+ }
1245
+ const i = { ...r };
1246
+ return o.criteria = i, i.reverse = !1, e.hasAttribute("descending") && (i.reverse = a(e.getAttribute("descending"))), t.copyFromAttribute(e, "sortBy", i, "sortOn"), t.copyFromAttribute(e, "dxfId", i), t.copyFromAttribute(e, "iconSet", i), t.copyFromAttribute(e, "customList", i), o;
1247
+ }
1248
+ processSortConditions(t, e, s, r, o) {
1249
+ if (!e) return;
1250
+ const i = e.childNodes, n = i.length;
1251
+ for (let e = 0; e < n; e++) {
1252
+ const n = i.item(e);
1253
+ if (1 === n.nodeType && "sortCondition" === n.localName) {
1254
+ const e = this.processSortCondition(t, n, r, o);
1255
+ e && s.push(e);
1256
+ }
1257
+ }
1258
+ }
1259
+ }, wt = class extends X {
1260
+ visit(t, e, s) {
1261
+ this.processNumFmts(t, t.evaluate("numFmts", e), null), t.getVisitorParamsState().set("colorsToProcess", /* @__PURE__ */ new Set());
1262
+ const r = {
1263
+ fills: {},
1264
+ fonts: {},
1265
+ borders: {}
1266
+ };
1267
+ 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: b.Type.None }, r.fills[1] = {
1268
+ type: b.Type.Pattern,
1269
+ patternType: b.BuiltInSheetPattern.Gray125
1270
+ }, r.borders[0] = {
1271
+ bottom: { style: d.StrokeStyle.None },
1272
+ left: { style: d.StrokeStyle.None },
1273
+ right: { style: d.StrokeStyle.None },
1274
+ top: { style: d.StrokeStyle.None }
1275
+ };
1276
+ const o = [];
1277
+ this.processXFs(t, t.evaluate("cellStyleXfs", e), o, r, null, !1);
1278
+ const i = /* @__PURE__ */ new Map();
1279
+ if (o.length > 0) {
1280
+ const r = [];
1281
+ this.processCellStyles(t, t.evaluate("cellStyles", e), r, o, i), s.named = r;
1282
+ }
1283
+ const n = [];
1284
+ this.processXFs(t, t.evaluate("cellXfs", e), n, r, i), Object.keys(n).length > 0 && (s.direct = n);
1285
+ const l = [];
1286
+ 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;
1287
+ }
1288
+ processIndexColors(t, e, s) {
1289
+ if (!e) return;
1290
+ const r = [], o = e.childNodes, i = o.length;
1291
+ for (let e = 0; e < i; e++) {
1292
+ const s = o.item(e);
1293
+ if (1 === s.nodeType && "rgbColor" === s.localName) {
1294
+ const e = { color: null };
1295
+ this.processDataBarColor(t, s, e, "color"), e.color && r.push(e.color);
1296
+ }
1297
+ }
1298
+ s.indexedColors = r;
1299
+ }
1300
+ processMruColors(t, e, s) {
1301
+ if (!e) return;
1302
+ const r = [], o = e.childNodes, i = o.length;
1303
+ for (let e = 0; e < i; e++) {
1304
+ const s = o.item(e);
1305
+ if (1 === s.nodeType && "color" === s.localName) {
1306
+ const e = { color: null };
1307
+ this.processDataBarColor(t, s, e, "color"), e.color && r.push(e.color);
1308
+ }
1309
+ }
1310
+ r.length > 0 && (s.mruColors = r);
1311
+ }
1312
+ processNumFmts(t, e, s) {
1313
+ if (!e) return;
1314
+ const r = /* @__PURE__ */ new Map();
1315
+ if (t.getVisitorParamsState().set("numFmts", r), !e) return;
1316
+ const o = e.childNodes, i = o.length;
1317
+ for (let t = 0; t < i; t++) {
1318
+ const e = o.item(t);
1319
+ if (1 === e.nodeType && "numFmt" === e.localName) {
1320
+ const t = e.getAttribute("numFmtId"), s = e.getAttribute("formatCode");
1321
+ if (t && s) {
1322
+ const e = s;
1323
+ r.set(parseInt(t), e);
1324
+ }
1325
+ }
1326
+ }
1327
+ }
1328
+ processXFs(t, e, s, r, o = null, i = !0) {
1329
+ if (!e) return;
1330
+ const n = e.childNodes, l = n.length;
1331
+ for (let e = 0; e < l; e++) {
1332
+ const l = n.item(e);
1333
+ if (1 === l.nodeType && "xf" === l.localName) {
1334
+ const e = {};
1335
+ this.processXF(t, l, e, r, o, i), s.push(e);
1336
+ }
1337
+ }
1338
+ }
1339
+ processXF(t, e, s, r, o, i) {
1340
+ if (!e) return;
1341
+ const n = e.getAttribute("xfId");
1342
+ if (n && o) {
1343
+ const t = o.get(parseInt(n));
1344
+ t && t !== y.BuiltInName.Normal && (s.named = t);
1345
+ }
1346
+ const l = (t) => !(!i && e.hasAttribute(t)) || a(e.getAttribute(t)), c = (t) => !i || e.hasAttribute(t) && a(e.getAttribute(t)), u = "0", h = i ? u : void 0;
1347
+ if (l("applyFont")) {
1348
+ const t = e.getAttribute("fontId") ?? h;
1349
+ if (void 0 !== t && (t !== u || c("applyFont"))) {
1350
+ const e = r.fonts[t];
1351
+ void 0 !== e && (s.font = e);
1352
+ }
1353
+ }
1354
+ if (l("applyFill")) {
1355
+ const t = e.getAttribute("fillId") ?? h;
1356
+ if (void 0 !== t && (t !== u || c("applyFill"))) {
1357
+ const e = r.fills[t];
1358
+ void 0 !== e && Object.keys(e).length > 0 && (s.fill = e);
1359
+ }
1360
+ }
1361
+ if (l("applyBorder")) {
1362
+ const t = e.getAttribute("borderId") ?? h;
1363
+ if (void 0 !== t && (t !== u || c("applyBorder"))) {
1364
+ const e = r.borders[t];
1365
+ void 0 !== e && (s.border = e);
1366
+ }
1367
+ }
1368
+ if (l("applyNumberFormat")) {
1369
+ const r = e.getAttribute("numFmtId") ?? h;
1370
+ if (void 0 !== r && (r !== u || c("applyNumberFormat"))) {
1371
+ const e = parseInt(r);
1372
+ let o;
1373
+ const i = t.getVisitorParamsState();
1374
+ if (i) {
1375
+ const t = i.get("numFmts");
1376
+ t && (o = t.get(e)), s.numberFormat = o ?? e;
1377
+ } else console.warn("no visitor params state");
1378
+ }
1379
+ }
1380
+ if (l("applyAlignment")) {
1381
+ const r = t.evaluate("alignment", e);
1382
+ (r || c("applyAlignment")) && this.processAlignment(t, r, s);
1383
+ }
1384
+ if (l("applyProtection")) {
1385
+ const r = t.evaluate("protection", e);
1386
+ (r || c("applyProtection")) && this.processProtection(t, r, s);
1387
+ }
1388
+ const p = a(e.getAttribute("quotePrefix") ?? "");
1389
+ p && (s.quotePrefix = p);
1390
+ }
1391
+ processAlignment(t, e, s) {
1392
+ const r = {};
1393
+ if (e?.hasAttribute("horizontal") ? r.horizontal = e.getAttribute("horizontal") : r.horizontal = v.HorizontalAlignment.General, e?.hasAttribute("vertical") ? r.vertical = e.getAttribute("vertical") : r.vertical = v.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, a(e?.getAttribute("wrapText") ?? "") ? r.overflow = v.Overflow.Wrap : r.overflow = v.Overflow.Visible, a(e?.getAttribute("shrinkToFit") ?? "") && (r.overflow = v.Overflow.Shrink), e?.hasAttribute("textRotation")) {
1394
+ let t = parseFloat(e.getAttribute("textRotation"));
1395
+ t > 0 && t <= 90 ? t = 360 - t : t > 90 && t <= 180 ? t -= 90 : 255 === t && (t = 0, r.stacked = !0), r.rotation = t;
1396
+ } else r.rotation = 0;
1397
+ e?.hasAttribute("justifyLastLine") && (r.justifyLastLine = a(e.getAttribute("justifyLastLine")));
1398
+ const o = e?.getAttribute("readingOrder");
1399
+ return o && ("0" === o ? r.readingDirection = v.ReadingDirection.Auto : "1" === o ? r.readingDirection = v.ReadingDirection.LeftToRight : "2" === o ? r.readingDirection = v.ReadingDirection.RightToLeft : console.warn(`invalid readingOrder: ${o}`)), Object.keys(r).length > 0 && (s.alignment = r), s;
1400
+ }
1401
+ processProtection(t, e, s) {
1402
+ if (!e) return;
1403
+ const r = {}, o = e.getAttribute("locked");
1404
+ o && !a(o) && (r.edit = !0);
1405
+ const i = e.getAttribute("hidden");
1406
+ return i && a(i) && (r.formulaHidden = !0), Object.keys(r).length > 0 && (s.protection = r), s;
1407
+ }
1408
+ processDXF(t, e, s) {
1409
+ if (!e) return;
1410
+ const r = e.childNodes, o = r.length;
1411
+ for (let e = 0; e < o; e++) {
1412
+ const o = r.item(e);
1413
+ if (1 === o.nodeType && "font" === o.localName) {
1414
+ const e = {};
1415
+ this.processFont(t, o, e), s.font = e;
1416
+ } else if (1 === o.nodeType && "fill" === o.localName) {
1417
+ const e = [];
1418
+ this.processFill(t, o, e, 0), e.length > 0 && e[0] && (s.fill = e[0]);
1419
+ } else if (1 === o.nodeType && "border" === o.localName) {
1420
+ const e = [];
1421
+ this.processBorder(t, o, e, 0, !1), e.length > 0 && e[0] && (s.border = e[0]);
1422
+ } else if (1 === o.nodeType && "numFmt" === o.localName) {
1423
+ const t = o.getAttribute("formatCode");
1424
+ if (t) s.numberFormat = t;
1425
+ else {
1426
+ const t = o.getAttribute("numFmtId");
1427
+ t && (s.numberFormat = Number(t));
1428
+ }
1429
+ } else 1 === o.nodeType && "alignment" === o.localName && this.processAlignment(t, o, s);
1430
+ }
1431
+ }
1432
+ processDXFs(t, e, s) {
1433
+ if (!e) return;
1434
+ t.getVisitorParamsState().set("processingDXFs", !0);
1435
+ const r = /* @__PURE__ */ new Map();
1436
+ t.getVisitorParamsState().set("dxfs", r);
1437
+ const o = e.childNodes, i = o.length;
1438
+ for (let e = 0; e < i; e++) {
1439
+ const i = o.item(e);
1440
+ if (1 === i.nodeType && "dxf" === i.localName) {
1441
+ const e = {};
1442
+ this.processDXF(t, i, e);
1443
+ const o = s.length;
1444
+ r.set(o, e), s.push(e);
1445
+ }
1446
+ }
1447
+ t.getVisitorParamsState().delete("processingDXFs");
1448
+ }
1449
+ processTableStyle(t, e, s, r, o = !1) {
1450
+ const i = e.getAttribute("name"), n = { name: i };
1451
+ e.hasAttribute("table") && (n.table = a(e.getAttribute("table"))), e.hasAttribute("pivot") && (n.pivot = a(e.getAttribute("pivot"))), o && !n.pivot && r.unshift(null);
1452
+ const l = e.childNodes, c = l.length;
1453
+ for (let t = 0; t < c; t++) {
1454
+ const e = l.item(t);
1455
+ if (1 === e.nodeType && "tableStyleElement" === e.localName) {
1456
+ const t = e.getAttribute("type"), s = e.getAttribute("dxfId");
1457
+ let o = null != s ? r?.[s] : void 0;
1458
+ o || (console.warn("invalid dfx id", s), o = {}), n[t] = o;
1459
+ let i = null;
1460
+ e.hasAttribute("size") && (i = parseInt(e.getAttribute("size"))), i && !isNaN(i) && (o.size = i);
1461
+ }
1462
+ }
1463
+ delete n.name, s[i] = n;
1464
+ }
1465
+ processTableStyles(t, e, s, r, o) {
1466
+ if (!e) return;
1467
+ const i = {}, n = e.getAttribute("defaultTableStyle");
1468
+ n && (i.defaultTableStyle = n);
1469
+ const l = e.getAttribute("defaultPivotStyle");
1470
+ l && (i.defaultPivotStyle = l);
1471
+ const a = e.childNodes, c = {}, u = a.length;
1472
+ for (let e = 0; e < u; e++) {
1473
+ const s = a.item(e);
1474
+ 1 === s.nodeType && "tableStyle" === s.localName && this.processTableStyle(t, s, c, r, o);
1475
+ }
1476
+ return Object.keys(c).length > 0 && (i.styles = c), Object.keys(i).length > 0 && (s.tables = i), s;
1477
+ }
1478
+ processCellStyles(t, e, s, r, o) {
1479
+ if (!e) return;
1480
+ const i = e.childNodes, n = i.length;
1481
+ for (let t = 0; t < n; t++) {
1482
+ const e = i.item(t);
1483
+ if (1 === e.nodeType && "cellStyle" === e.localName) {
1484
+ const t = parseInt(e.getAttribute("xfId") ?? ""), i = e.getAttribute("name"), n = e.getAttribute("builtinId");
1485
+ let l = i;
1486
+ if (null !== n) {
1487
+ const t = y.builtInNameFromId(parseInt(n));
1488
+ void 0 !== t && (l = t);
1489
+ }
1490
+ if (o.set(t, l), !r[t]) continue;
1491
+ const c = {
1492
+ name: l,
1493
+ style: r[t]
1494
+ };
1495
+ e.getAttribute("hidden") && (c.hidden = a(e.getAttribute("hidden"))), e.getAttribute("iLevel") && (c.iLevel = parseInt(e.getAttribute("iLevel"))), s.push(c);
1496
+ }
1497
+ }
1498
+ }
1499
+ afterVisit(t, e, s) {}
1500
+ }, St = class extends X {
1501
+ visit(t, e, s) {
1502
+ return this.processSheetRefs(t, t.evaluate("sheets", e), s), this.processExternalReferences(t, t.evaluate("externalReferences", 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;
1503
+ }
1504
+ processPassword(t, e, s, r = "workbook", o = "password") {
1505
+ if (!e) return;
1506
+ const i = {};
1507
+ t.copyFromAttribute(e, `${r}AlgorithmName`, i, "algorithm"), t.copyFromAttribute(e, `${r}HashValue`, i, "hash"), t.copyFromAttribute(e, `${r}SaltValue`, i, "salt"), t.copyFromAttribute(e, `${r}SpinCount`, i, "spinCount", t.INT_COPY), Object.keys(i).length > 0 && (s[o] = i);
1508
+ }
1509
+ processWorkbookProtection(t, e, s) {
1510
+ if (!e) return;
1511
+ const r = {};
1512
+ return this.processPassword(t, e, r, "workbook", "password"), this.processPassword(t, e, r, "revisions", "revisionsPassword"), t.copyFromAttribute(e, "lockStructure", r, "structure", t.BOOLEAN_COPY), t.copyFromAttribute(e, "lockWindows", r, "windows", t.BOOLEAN_COPY), t.copyFromAttribute(e, "lockRevision", r, "revision", t.BOOLEAN_COPY), s.protection = r, s;
1513
+ }
1514
+ processCalcPr(t, e, s) {
1515
+ e && (s.calc = {});
1516
+ }
1517
+ processSheetRefs(t, e, s) {
1518
+ if (!e) return;
1519
+ const r = [], o = e.childNodes, i = o.length;
1520
+ for (let e = 0; e < i; e++) {
1521
+ const s = o.item(e);
1522
+ 1 === s.nodeType && "sheet" === s.localName && this.processSheetRef(t, s, r);
1523
+ }
1524
+ s.sheets = r;
1525
+ }
1526
+ processSheetRef(t, e, s) {
1527
+ const r = {};
1528
+ t.copyFromAttribute(e, "name", r, "name"), t.copyFromAttribute(e, "state", r, "visibility");
1529
+ const o = e.getAttribute("r:id"), i = t.getRef(o);
1530
+ i && (r.sheet = i), s.push(r);
1531
+ }
1532
+ processExternalReferences(t, e, s) {
1533
+ if (!e) return;
1534
+ const r = [], o = e.childNodes, i = o.length;
1535
+ for (let e = 0; e < i; e++) {
1536
+ const s = o.item(e);
1537
+ if (1 === s.nodeType && "externalReference" === s.localName) {
1538
+ const e = s.getAttribute("r:id"), o = e ? t.getRef(e) : null;
1539
+ r.push(o ?? null);
1540
+ }
1541
+ }
1542
+ r.length > 0 && (s.externalBooks = r);
1543
+ }
1544
+ processBookViews(t, e, s) {
1545
+ if (!e) return;
1546
+ const r = e.childNodes;
1547
+ let o = 0;
1548
+ const i = r.length;
1549
+ for (let e = 0; o < 1 && e < i; e++) {
1550
+ const i = r.item(e);
1551
+ 1 === i.nodeType && "workbookView" === i.localName && (this.processWorkbookView(t, i, s), o++);
1552
+ }
1553
+ }
1554
+ processWorkbookView(t, e, s) {
1555
+ if (!e) return;
1556
+ const r = {};
1557
+ t.copyFromAttribute(e, "activeTab", r, "activeSheetId", [t.INT_COPY, (t) => t]), e.hasAttribute("activeTab") || (r.activeSheetId = 0), 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, (t) => t]), Object.keys(r).length > 0 && (s.view = r);
1558
+ }
1559
+ processDefineName(t, e, s, r) {
1560
+ if (!e) return;
1561
+ const o = {}, i = e.firstChild;
1562
+ if (i && 3 === i.nodeType && (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")) {
1563
+ const t = e.getAttribute("localSheetId");
1564
+ if (!r[t]?.name) return void console.warn(`Defined name '${e.getAttribute("name")}' references a sheet with localSheetId '${t}' which does not exist.`);
1565
+ o.scope = r[t].name;
1566
+ }
1567
+ 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);
1568
+ }
1569
+ processDefinedNames(t, e, s) {
1570
+ if (!e) return;
1571
+ const r = [], o = e.childNodes, i = o.length;
1572
+ for (let e = 0; e < i; e++) {
1573
+ const i = o.item(e);
1574
+ 1 === i.nodeType && "definedName" === i.localName && this.processDefineName(t, i, r, s.sheets);
1575
+ }
1576
+ r.length > 0 && (s.names = r);
1577
+ }
1578
+ processWorkbookPr(t, e, s) {
1579
+ e && t.copyFromAttribute(e, "date1904", s, "date1904", t.BOOLEAN_COPY);
1580
+ }
1581
+ afterVisit(t, e, s) {}
1582
+ }, Pt = class {
1583
+ visit(t, e, s) {
1584
+ const r = {};
1585
+ return t.copyFromAttribute(e, "ref", s, "r"), t.getVisitorParamsState().set("ref", s.r), s.v = r, t.copyFromAttribute(e, "name", r), t.copyFromAttribute(e, "displayName", r), t.copyFromAttribute(e, "headerRowCount", r, "headerRowCount", t.INT_COPY), t.copyFromAttribute(e, "totalsRowCount", r, "totalsRowCount", t.INT_COPY), this.processTableColumns(t, e, r), this.processTableStyleInfo(t, e, r), t.copyFromAttribute(e, "id", r), t.copyFromAttribute(e, "comment", r, "description"), t.copyFromAttribute(e, "connectionId", r, "connectionId", t.INT_COPY), t.copyFromAttribute(e, "tableType", r), t.copyFromAttribute(e, "published", r, "published", t.BOOLEAN_COPY), t.copyFromAttribute(e, "insertRow", r, "insertRow", t.BOOLEAN_COPY), t.copyFromAttribute(e, "insertRowShift", r, "insertRowShift", t.BOOLEAN_COPY), t.copyFromAttribute(e, "totalsRowShown", r, "totalsRowShown", t.BOOLEAN_COPY), r;
1586
+ }
1587
+ afterVisit(t, e, s) {
1588
+ const r = s.v;
1589
+ if (t.evaluate("autoFilter", e)) {
1590
+ if (Array.isArray(r.hiddenButtons)) {
1591
+ const t = r.hiddenButtons.length;
1592
+ 0 === t ? r.hiddenButtons = !1 : t === r.columns?.length && (r.hiddenButtons = !0);
1593
+ }
1594
+ } else r.hiddenButtons = !0, r.showButtons = !1;
1595
+ return r;
1596
+ }
1597
+ processTableStyleInfo(t, e, s) {
1598
+ if (!e) return;
1599
+ const r = e.childNodes, o = {}, i = r.length;
1600
+ for (let e = 0; e < i; e++) {
1601
+ const s = r.item(e);
1602
+ 1 === s.nodeType && "tableStyleInfo" === s.localName && (t.copyFromAttribute(s, "name", o), t.copyFromAttribute(s, "showColumnStripes", o, "showColumnStripes", t.BOOLEAN_COPY), t.copyFromAttribute(s, "showFirstColumn", o, "showFirstColumn", t.BOOLEAN_COPY), t.copyFromAttribute(s, "showLastColumn", o, "showLastColumn", t.BOOLEAN_COPY), t.copyFromAttribute(s, "showRowStripes", o, "showRowStripes", t.BOOLEAN_COPY));
1603
+ }
1604
+ Object.keys(o).length > 0 && (s.style = o);
1605
+ }
1606
+ processTableColumn(t, e, s) {
1607
+ if (!e) return null;
1608
+ const r = e.childNodes, o = r.length;
1609
+ for (let e = 0; e < o; e++) {
1610
+ const o = r.item(e);
1611
+ if (1 === o.nodeType && "tableColumn" === o.localName) {
1612
+ const e = {};
1613
+ t.copyFromAttribute(o, "name", e), t.copyFromAttribute(o, "id", e), t.copyFromAttribute(o, "uniqueName", e), t.copyFromAttribute(o, "queryTableFieldId", e), t.copyFromAttribute(o, "totalsRowLabel", e);
1614
+ let r = o.getAttribute("totalsRowFunction");
1615
+ if (null !== r) if ("custom" === r) {
1616
+ const s = t.evaluate("totalsRowFormula", o);
1617
+ s && (e.totalsRowFormula = s.textContent);
1618
+ } else e.totalsRowFormula = r;
1619
+ t.copyFromAttribute(o, "totalsRowLabel", e), s.push(e);
1620
+ }
1621
+ }
1622
+ return s;
1623
+ }
1624
+ processTableColumns(t, e, s) {
1625
+ const r = e.childNodes, o = [], i = r.length;
1626
+ for (let e = 0; e < i; e++) {
1627
+ const s = r.item(e);
1628
+ 1 === s.nodeType && "tableColumns" === s.localName && this.processTableColumn(t, s, o);
1629
+ }
1630
+ o.length > 0 && (s.columns = o);
1631
+ }
1632
+ }, Tt = class {
1633
+ visit(t, e, s) {
1634
+ const r = t.getVisitorParamsState().get("ref");
1635
+ if (r) {
1636
+ const s = t.getVisitorParamsState().get("descriptions");
1637
+ s && (s.add(r, e.getAttribute("altText")), s.add(r, e.getAttribute("altTextSummary")));
1638
+ }
1639
+ return t.copyFromAttribute(e, "altText", s), t.copyFromAttribute(e, "altTextSummary", s), s;
1640
+ }
1641
+ }, Ot = class {
1642
+ visit(t, e, s) {
1643
+ const r = e.childNodes, o = r.length;
1644
+ let i = null;
1645
+ for (let t = 0; t < o; t++) {
1646
+ const e = r.item(t);
1647
+ if (1 === e.nodeType) {
1648
+ "externalBook" === e.localName && (i = e);
1649
+ break;
1650
+ }
1651
+ }
1652
+ return i ? (e.getAttribute("mc:Ignorable") && (s.mceIgnorable = !0), s.sheetNames = [], this.processSheetNames(t, i, s), this.processDefinedNames(t, i, s), this.processSheetDataSet(t, i, s), s) : s;
1653
+ }
1654
+ processSheetNames(t, e, s) {
1655
+ const r = this._findChild(e, "sheetNames");
1656
+ if (!r) return;
1657
+ const o = r.childNodes, i = o.length;
1658
+ for (let t = 0; t < i; t++) {
1659
+ const e = o.item(t);
1660
+ 1 === e.nodeType && "sheetName" === e.localName && s.sheetNames.push(e.getAttribute("val") ?? "");
1661
+ }
1662
+ }
1663
+ processDefinedNames(t, e, s) {
1664
+ const r = this._findChild(e, "definedNames");
1665
+ if (!r) return;
1666
+ const o = [], i = r.childNodes, n = i.length;
1667
+ for (let t = 0; t < n; t++) {
1668
+ const e = i.item(t);
1669
+ if (1 !== e.nodeType || "definedName" !== e.localName) continue;
1670
+ const s = e.getAttribute("name");
1671
+ if (!s) continue;
1672
+ const r = {
1673
+ name: s,
1674
+ refersTo: e.getAttribute("refersTo") ?? ""
1675
+ }, n = e.getAttribute("sheetId");
1676
+ null !== n && (r.sheetIndex = parseInt(n, 10)), o.push(r);
1677
+ }
1678
+ o.length > 0 && (s.definedNames = o);
1679
+ }
1680
+ processSheetDataSet(t, e, s) {
1681
+ const r = this._findChild(e, "sheetDataSet");
1682
+ if (!r) return;
1683
+ const o = [], i = r.childNodes, n = i.length;
1684
+ for (let e = 0; e < n; e++) {
1685
+ const s = i.item(e);
1686
+ if (1 !== s.nodeType || "sheetData" !== s.localName) continue;
1687
+ const r = s.getAttribute("sheetId");
1688
+ if (null === r) continue;
1689
+ const n = this.processSheetData(t, s);
1690
+ n.sheetIndex = parseInt(r, 10), "1" === s.getAttribute("refreshError") && (n.refreshError = !0), o.push(n);
1691
+ }
1692
+ o.length > 0 && (s.sheetDataSet = o);
1693
+ }
1694
+ processSheetData(t, e) {
1695
+ const s = new F.Builder(), r = e.childNodes, o = r.length;
1696
+ for (let t = 0; t < o; t++) {
1697
+ const e = r.item(t);
1698
+ if (1 !== e.nodeType || "row" !== e.localName) continue;
1699
+ const o = e.childNodes, i = o.length;
1700
+ for (let t = 0; t < i; t++) {
1701
+ const e = o.item(t);
1702
+ if (1 !== e.nodeType || "cell" !== e.localName) continue;
1703
+ const r = e.getAttribute("r");
1704
+ if (!r) continue;
1705
+ const i = h.fastStringToCell(r);
1706
+ if (void 0 === i?.rowIndex || void 0 === i?.colIndex) continue;
1707
+ const n = this._readCellValue(e);
1708
+ void 0 !== n && s.pushAt(i.rowIndex, i.colIndex, n);
1709
+ }
1710
+ }
1711
+ return {
1712
+ sheetIndex: -1,
1713
+ data: s.build()?.tuples ?? []
1714
+ };
1715
+ }
1716
+ _readCellValue(t) {
1717
+ const e = this._findChild(t, "v")?.textContent?.trim();
1718
+ if (void 0 !== e && "" !== e) switch (t.getAttribute("t")) {
1719
+ case null:
1720
+ case "n": return parseFloat(e);
1721
+ case "b": return "1" === e || "true" === e;
1722
+ case "str":
1723
+ default: return e;
1724
+ case "e": {
1725
+ const t = p.getBuiltInByLabel(e);
1726
+ return t ? {
1727
+ t: "e",
1728
+ v: t.getCode()
1729
+ } : e;
1730
+ }
1731
+ }
1732
+ }
1733
+ _findChild(t, e) {
1734
+ const s = t.childNodes, r = s.length;
1735
+ for (let t = 0; t < r; t++) {
1736
+ const r = s.item(t);
1737
+ if (1 === r.nodeType && r.localName === e) return r;
1738
+ }
1739
+ return null;
1740
+ }
1741
+ }, xt = class {
1742
+ visit(t, e, s) {
1743
+ t.copyFromAttribute(e, "name", s), t.copyFromAttribute(e, "sourceName", s);
1744
+ const r = t.evaluate("*/tableSlicerCache", e);
1745
+ return r ? (t.copyFromAttribute(r, "tableId", s), t.copyFromAttribute(r, "column", s, "columnId"), t.copyFromAttribute(r, "crossFilter", s), s) : (console.warn("SlicerCacheDefinitionVisitor: missing tableSlicerCache element"), s);
1746
+ }
1747
+ }, kt = class {
1748
+ visit(t, e, s) {
1749
+ let r = s.slicers;
1750
+ r || (r = {}, s.slicers = r);
1751
+ const o = e.childNodes, i = o.length;
1752
+ for (let e = 0; e < i; e++) {
1753
+ const s = o.item(e);
1754
+ 1 === s.nodeType && "slicer" === s.localName && this.processSlicer(t, s, r);
1755
+ }
1756
+ return r;
1757
+ }
1758
+ processSlicer(t, e, s) {
1759
+ if (!e) return;
1760
+ const r = {};
1761
+ s[e.getAttribute("name")] = r;
1762
+ const o = e.getAttribute("cache"), i = t.getVisitorParamsState().get("slicerCaches");
1763
+ if (o) {
1764
+ const t = i.get(o);
1765
+ t && (r.columnId = t.columnId, r.tableId = t.tableId);
1766
+ }
1767
+ t.copyFromAttribute(e, "caption", r), t.copyFromAttribute(e, "startItem", r, "startItem", t.INT_COPY), t.copyFromAttribute(e, "columnCount", r, "columnCount", t.INT_COPY), t.copyFromAttribute(e, "showCaption", r, "showCaption", t.BOOLEAN_COPY), t.copyFromAttribute(e, "level", r, "level", t.INT_COPY), t.copyFromAttribute(e, "style", r), t.copyFromAttribute(e, "locked", r, "locked", t.BOOLEAN_COPY), t.copyFromAttribute(e, "rowHeight", r, "rowHeight", t.INT_COPY);
1768
+ }
1769
+ }, Vt = class {
1770
+ visit(t, e, s) {
1771
+ return s;
1772
+ }
1773
+ }, It = class {
1774
+ visit(t, e, s) {
1775
+ if (!e) return;
1776
+ const r = {};
1777
+ return t.copyFromAttribute(e, "editAs", r, "anchorType"), r.anchor = {}, "absoluteAnchor" === e.localName ? (r.anchorType = "absolute", this.processAbsoluteCoord(t, t.evaluate("xdr:pos", e), r.anchor, "from", "x", "y"), this.processAbsoluteCoord(t, t.evaluate("xdr:ext", e), r.anchor, "to", "cx", "cy")) : "oneCellAnchor" === e.localName ? (this.processOffsetCoord(t, t.evaluate("from", e), r.anchor, "from"), this.processAbsoluteCoord(t, t.evaluate("xdr:ext", e), r.anchor, "to", "cx", "cy")) : (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;
1778
+ }
1779
+ processAbsoluteCoord(e, s, r, o, i, n) {
1780
+ if (!s) return;
1781
+ const l = {
1782
+ x: 0,
1783
+ y: 0
1784
+ };
1785
+ return l.x = t(s.getAttribute(i)), l.y = t(s.getAttribute(n)), "from" === o ? r.tl = l : r.br = l, r;
1786
+ }
1787
+ processOffsetCoord(e, s, r, o) {
1788
+ if (!s) return;
1789
+ const i = {
1790
+ c: 0,
1791
+ r: 0,
1792
+ x: 0,
1793
+ y: 0
1794
+ };
1795
+ return e.evaluate("col", s) && (i.c = parseInt(e.evaluate("col", s).textContent)), e.evaluate("row", s) && (i.r = parseInt(e.evaluate("row", s).textContent)), e.evaluate("colOff", s) && (i.x = t(e.evaluate("colOff", s).textContent)), e.evaluate("rowOff", s) && (i.y = t(e.evaluate("rowOff", s).textContent)), "from" === o ? r.tl = i : r.br = i, r;
1796
+ }
1797
+ }, Lt = class extends K {
1798
+ visit(t, e, s) {
1799
+ if (!e) return;
1800
+ s = super.visit(t, e, s);
1801
+ const r = t.evaluate("nvGraphicFramePr/cNvGraphicFramePr", e);
1802
+ if (r) {
1803
+ const e = t.evaluate("graphicFrameLocks", r);
1804
+ if (e) {
1805
+ e.hasAttribute("noChangeAspect") && (s.lockAspect = "1" === e.getAttribute("noChangeAspect"));
1806
+ const t = {};
1807
+ Object.keys(t).length > 0 && (s.locks = t);
1808
+ }
1809
+ }
1810
+ let o = {
1811
+ type: "graphicFrame",
1812
+ json: {}
1813
+ };
1814
+ const i = t.evaluate("graphic/graphicData", e).childNodes, n = i.length;
1815
+ for (let s = 0; s < n; s++) {
1816
+ const r = i.item(s);
1817
+ if (1 === r.nodeType) try {
1818
+ let s = r.localName;
1819
+ "chart" === s ? s = "chart" : "slicer" === s && (s = "slicer"), o.type = s;
1820
+ const i = r.getAttribute("r:id");
1821
+ if ("chart" === s && i) {
1822
+ let s = t.evaluate("*/cNvPr", e);
1823
+ s?.item && (s = s.item(0));
1824
+ const r = s?.getAttribute?.("id"), n = r ? parseInt(r, 10) : void 0, a = t.getRelationships().get(i);
1825
+ let c;
1826
+ if (a?.target) {
1827
+ const e = t.getFileLocation(), s = e.slice(0, e.lastIndexOf("/") + 1);
1828
+ c = l(a.target.startsWith("/") ? a.target : s + a.target);
1829
+ }
1830
+ o.json = {
1831
+ xml: t.serializeElement(e) ?? void 0,
1832
+ sourceId: void 0 === n || isNaN(n) ? void 0 : n,
1833
+ chartRelId: i,
1834
+ chartTargetPath: c
1835
+ };
1836
+ } else i && (o.json = t.getRef(i));
1837
+ } catch (t) {
1838
+ console.warn("Unable to parse graphicFrame", t);
1839
+ }
1840
+ }
1841
+ return o && (s.content = o), o;
1842
+ }
1843
+ }, Bt = H, _t = class extends K {
1844
+ visit(t, e, s) {
1845
+ if (!e) return;
1846
+ const r = super.visit(t, e, s), o = t.evaluate("nvPicPr/cNvPicPr", e);
1847
+ if (o) {
1848
+ t.copyFromAttribute(e, "preferRelativeResize", r, "preferRelativeResize", t.BOOLEAN_COPY);
1849
+ const s = t.evaluate("picLocks", o);
1850
+ if (s) {
1851
+ s.hasAttribute("noChangeAspect") && (r.lockAspect = "1" === s.getAttribute("noChangeAspect"));
1852
+ const e = {};
1853
+ t.copyFromAttribute(s, "noChangeArrowheads", r, "noChangeArrowheads", t.BOOLEAN_COPY), t.copyFromAttribute(s, "noChangeShapeType", r, "noChangeShapeType", t.BOOLEAN_COPY), t.copyFromAttribute(s, "noEditPoints", r, "noEditPoints", t.BOOLEAN_COPY), t.copyFromAttribute(s, "noAdjustHandles", r, "noAdjustHandles", t.BOOLEAN_COPY), t.copyFromAttribute(s, "noCrop", r, "noCrop", t.BOOLEAN_COPY), t.copyFromAttribute(s, "noGrp", r, "noGrp", t.BOOLEAN_COPY), t.copyFromAttribute(s, "noMove", r, "noMove", t.BOOLEAN_COPY), t.copyFromAttribute(s, "noResize", r, "noResize", t.BOOLEAN_COPY), t.copyFromAttribute(s, "noRot", r, "noRot", t.BOOLEAN_COPY), t.copyFromAttribute(s, "noSelect", r, "noSelect", t.BOOLEAN_COPY), Object.keys(e).length > 0 && (r.locks = e);
1854
+ }
1855
+ }
1856
+ const i = t.evaluate("blipFill/blip", e);
1857
+ let n;
1858
+ if (i) {
1859
+ let e;
1860
+ if (e = i.getAttribute("r:embed") ?? i.getAttribute("embed"), e || (e = i.getAttribute("r:link") ?? i.getAttribute("link")), !e) return void console.warn("no rId found for blip", i);
1861
+ n = t.getRef(e, !0);
1862
+ }
1863
+ return s.content = {
1864
+ type: "picture",
1865
+ json: { resId: n }
1866
+ }, r;
1867
+ }
1868
+ }, Et = class extends H {
1869
+ visit(t, e, s) {
1870
+ if (!e) return;
1871
+ s = super.visit(t, e, s);
1872
+ const r = t.evaluate("nvGrpSpPr/cNvGrpSpPr", e);
1873
+ if (r) {
1874
+ const e = t.evaluate("grpSpLocks", r);
1875
+ if (e) {
1876
+ e.hasAttribute("noChangeAspect") && (s.lockAspect = "1" === e.getAttribute("noChangeAspect"));
1877
+ const t = {};
1878
+ Object.keys(t).length > 0 && (s.locks = t);
1879
+ }
1880
+ }
1881
+ t.warn(`Unable to import '${s.name}', group shapes are not supported.`);
1882
+ const o = {};
1883
+ return s.content = {
1884
+ type: "grpSp",
1885
+ json: o
1886
+ }, o;
1887
+ }
1888
+ }, Rt = class extends H {
1889
+ visit(t, e, s) {
1890
+ if (!e) return;
1891
+ s = super.visit(t, e, s);
1892
+ const r = t.evaluate("nvCxnSpPr/cNvCxnSpPr", e);
1893
+ if (r) {
1894
+ const e = t.evaluate("cxnSpLocks", r);
1895
+ if (e) {
1896
+ e.hasAttribute("noChangeAspect") && (s.lockAspect = "1" === e.getAttribute("noChangeAspect"));
1897
+ const t = {};
1898
+ Object.keys(t).length > 0 && (s.locks = t);
1899
+ }
1900
+ }
1901
+ t.warn(`'${s.name}' is not editable; imported as a fixed drawing.`);
1902
+ let o = t.evaluate("*/cNvPr", e);
1903
+ o?.item && (o = o.item(0));
1904
+ const i = o?.getAttribute?.("id"), n = i ? parseInt(i, 10) : void 0, l = {
1905
+ type: "cxnSp",
1906
+ xml: t.serializeElement(e) ?? void 0,
1907
+ sourceId: void 0 === n || isNaN(n) ? void 0 : n
1908
+ };
1909
+ return s.content = {
1910
+ type: "cxnSp",
1911
+ json: l
1912
+ }, l;
1913
+ }
1914
+ }, jt = class {
1915
+ visit(t, e, s) {
1916
+ const r = [], o = /* @__PURE__ */ new Map(), i = {
1917
+ cells: [],
1918
+ values: []
1919
+ }, n = e.childNodes;
1920
+ for (let t = 0; t < n.length; t++) {
1921
+ const e = n.item(t);
1922
+ if (1 === e.nodeType) switch (e.localName) {
1923
+ case "metadataTypes":
1924
+ this._parseMetadataTypes(e, r, o);
1925
+ break;
1926
+ case "futureMetadata":
1927
+ this._attachFutureMetadata(e, o);
1928
+ break;
1929
+ case "cellMetadata":
1930
+ this._resolveBlocks(e, r, i.cells);
1931
+ break;
1932
+ case "valueMetadata": this._resolveBlocks(e, r, i.values);
1933
+ }
1934
+ }
1935
+ return s.metadata = i, i;
1936
+ }
1937
+ _parseMetadataTypes(t, e, s) {
1938
+ const r = t.childNodes;
1939
+ for (let t = 0; t < r.length; t++) {
1940
+ const o = r.item(t);
1941
+ if (1 === o.nodeType && "metadataType" === o.localName) {
1942
+ const t = this._parseMetadataType(o);
1943
+ e.push(t), s.set(t.name, t);
1944
+ }
1945
+ }
1946
+ }
1947
+ _parseMetadataType(t) {
1948
+ const e = {
1949
+ name: t.getAttribute("name") ?? "",
1950
+ _blocks: []
1951
+ }, s = t.getAttribute("minSupportedVersion");
1952
+ null != s && (e.minSupportedVersion = Number(s));
1953
+ for (const s of [
1954
+ "copy",
1955
+ "pasteAll",
1956
+ "pasteValues",
1957
+ "merge",
1958
+ "splitFirst",
1959
+ "splitAll",
1960
+ "rowColShift",
1961
+ "clearFormats",
1962
+ "clearComments",
1963
+ "assign",
1964
+ "coerce",
1965
+ "cellMeta",
1966
+ "adjust",
1967
+ "trans",
1968
+ "delete",
1969
+ "edit"
1970
+ ]) "1" === t.getAttribute(s) && (e[s] = !0);
1971
+ return e;
1972
+ }
1973
+ _attachFutureMetadata(t, e) {
1974
+ const s = t.getAttribute("name") ?? "", r = e.get(s);
1975
+ if (!r) return;
1976
+ const o = t.childNodes;
1977
+ for (let t = 0; t < o.length; t++) {
1978
+ const e = o.item(t);
1979
+ 1 === e.nodeType && "bk" === e.localName && r._blocks.push(this._parseFutureBlock(e));
1980
+ }
1981
+ }
1982
+ _parseFutureBlock(t) {
1983
+ const e = {}, s = t.childNodes;
1984
+ for (let t = 0; t < s.length; t++) {
1985
+ const r = s.item(t);
1986
+ if (1 !== r.nodeType || "extLst" !== r.localName) continue;
1987
+ const o = r.childNodes;
1988
+ for (let t = 0; t < o.length; t++) {
1989
+ const s = o.item(t);
1990
+ if (1 !== s.nodeType || "ext" !== s.localName) continue;
1991
+ const r = s.childNodes;
1992
+ for (let t = 0; t < r.length; t++) {
1993
+ const s = r.item(t);
1994
+ 1 === s.nodeType && ("dynamicArrayProperties" === s.localName ? (e.fDynamic = "1" === s.getAttribute("fDynamic"), e.fCollapsed = "1" === s.getAttribute("fCollapsed")) : "rvb" === s.localName && (e.richValueIndex = Number(s.getAttribute("i") ?? "0")));
1995
+ }
1996
+ }
1997
+ }
1998
+ return e;
1999
+ }
2000
+ _resolveBlocks(t, e, s) {
2001
+ const r = t.childNodes;
2002
+ for (let t = 0; t < r.length; t++) {
2003
+ const o = r.item(t);
2004
+ 1 === o.nodeType && "bk" === o.localName && s.push(this._resolveBlock(o, e));
2005
+ }
2006
+ }
2007
+ _resolveBlock(t, e) {
2008
+ const s = /* @__PURE__ */ new Map(), r = t.childNodes;
2009
+ for (let t = 0; t < r.length; t++) {
2010
+ const o = r.item(t);
2011
+ if (1 !== o.nodeType || "rc" !== o.localName) continue;
2012
+ const i = Number(o.getAttribute("t")), n = Number(o.getAttribute("v")), l = e[i - 1];
2013
+ if (!l) continue;
2014
+ const { _blocks: a, ...c } = l, u = { ...c };
2015
+ for (const t of Object.keys(u)) void 0 === u[t] && delete u[t];
2016
+ const h = a[n];
2017
+ h && (void 0 !== h.fDynamic && (u.fDynamic = h.fDynamic, u.fCollapsed = h.fCollapsed ?? !1), void 0 !== h.richValueIndex && (u.richValueIndex = h.richValueIndex)), s.set(l.name, u);
2018
+ }
2019
+ return s;
2020
+ }
2021
+ }, Yt = class {
2022
+ visit(t, e, s) {
2023
+ let r = t.getVisitorParamsState().get(q);
2024
+ r || (r = [], t.getVisitorParamsState().set(q, r));
2025
+ const o = e.childNodes, i = o.length;
2026
+ for (let e = 0; e < i; e++) {
2027
+ const s = o.item(e);
2028
+ if (1 === s.nodeType && "s" === s.localName) {
2029
+ const e = {
2030
+ type: s.getAttribute("t") ?? "n",
2031
+ keys: []
2032
+ };
2033
+ this.processKeys(t, s, e), r.push(e);
2034
+ }
2035
+ }
2036
+ return s.richTypes = r, r;
2037
+ }
2038
+ processKeys(t, e, s) {
2039
+ const r = e.childNodes, o = r.length, i = s.keys;
2040
+ for (let t = 0; t < o; t++) {
2041
+ const e = r.item(t);
2042
+ if (1 === e.nodeType && "k" === e.localName) {
2043
+ const t = e.getAttribute("n"), s = e.getAttribute("t");
2044
+ i.push([t, s]);
2045
+ }
2046
+ }
2047
+ }
2048
+ }, Dt = class {
2049
+ visit(t, e, s) {
2050
+ let r = t.getVisitorParamsState().get("richTypes");
2051
+ if (!r) return void t.warn("RichValueFound but not type.");
2052
+ let o = t.getVisitorParamsState().get(J);
2053
+ o || (o = [], t.getVisitorParamsState().set(J, o));
2054
+ const i = e.childNodes, n = i.length;
2055
+ for (let e = 0; e < n; e++) {
2056
+ const s = i.item(e);
2057
+ if (1 === s.nodeType && "rv" === s.localName) {
2058
+ const e = r[s.getAttribute("s")], i = { type: e.type };
2059
+ this.processValues(t, s, i, e);
2060
+ const n = this.mapType(t, i);
2061
+ o.push(n);
2062
+ }
2063
+ }
2064
+ return s.richData = o, o;
2065
+ }
2066
+ mapType(t, e) {
2067
+ if ("_error" === e.type) {
2068
+ const t = e.errorType;
2069
+ if (t) try {
2070
+ e = p.getBuiltInByCode(t + 1) ?? p.BuiltIn.Unknown;
2071
+ } catch (t) {}
2072
+ }
2073
+ return e;
2074
+ }
2075
+ processValues(t, e, s, r) {
2076
+ const o = e.childNodes, i = o.length;
2077
+ r.type;
2078
+ const n = r.keys;
2079
+ for (let e = 0; e < i; e++) {
2080
+ const r = o.item(e);
2081
+ if (1 === r.nodeType && "v" === r.localName) {
2082
+ const o = n[e];
2083
+ if (!o) return void t.warn("Invalid richData");
2084
+ const i = o[0], l = o[1];
2085
+ let a = r.textContent;
2086
+ "i" === l && (a = Number(a)), s[i] = a;
2087
+ }
2088
+ }
2089
+ }
2090
+ }, Mt = class {
2091
+ visit(t, e, s) {
2092
+ if (!e) return;
2093
+ const r = [];
2094
+ this.processAuthors(t, t.evaluate("authors", e), r), r.length > 0 && (s.authors = r);
2095
+ const o = [];
2096
+ return s.comments = o, o;
2097
+ }
2098
+ processAuthors(t, e, s) {
2099
+ if (!e) return;
2100
+ const r = e.childNodes, o = r.length;
2101
+ for (let t = 0; t < o; t++) {
2102
+ const e = r.item(t);
2103
+ if (1 === e.nodeType && "author" === e.localName) {
2104
+ const t = e.firstChild;
2105
+ t && 3 === t.nodeType && s.push(t.textContent);
2106
+ }
2107
+ }
2108
+ }
2109
+ }, zt = class {
2110
+ visit(t, e, s) {
2111
+ if (!e) return;
2112
+ const r = {}, o = e.getAttribute("ref");
2113
+ t.copyFromAttribute(e, "authorId", r, "personId", t.INT_COPY), r.asNote = !0;
2114
+ const i = {
2115
+ r: o,
2116
+ v: r
2117
+ };
2118
+ return s.push(i), r;
2119
+ }
2120
+ }, Ut = class {
2121
+ visit(t, e, s) {
2122
+ if (!e) return;
2123
+ const r = [];
2124
+ return s.comments = r, r;
2125
+ }
2126
+ }, Wt = class {
2127
+ visit(t, e, r) {
2128
+ if (!e) return;
2129
+ const o = {};
2130
+ t.copyFromAttribute(e, "id", o, "id", s);
2131
+ const i = e.getAttribute("ref");
2132
+ t.copyFromAttribute(e, "personId", o, "personId", s), t.copyFromAttribute(e, "parentId", o, "parentId", s), t.copyFromAttribute(e, "dT", o), e.hasAttribute("done") && (o.done = a(e.getAttribute("done")));
2133
+ const n = {
2134
+ r: i,
2135
+ v: o
2136
+ };
2137
+ return r.push(n), o;
2138
+ }
2139
+ }, Gt = class {
2140
+ visit(t, e, r) {
2141
+ const o = [], i = e.childNodes, n = i.length;
2142
+ for (let e = 0; e < n; e++) {
2143
+ const r = i.item(e);
2144
+ if (1 === r.nodeType && "person" === r.localName) {
2145
+ const e = {};
2146
+ t.copyFromAttribute(r, "id", e, "id", s), t.copyFromAttribute(r, "displayName", e), t.copyFromAttribute(r, "userId", e, "userId", s), t.copyFromAttribute(r, "providerId", e), o.push(e);
2147
+ }
2148
+ }
2149
+ return o.length > 0 && (r.persons = o), o;
2150
+ }
2151
+ }, Xt = class {
2152
+ constructor(t, e) {
2153
+ this.path = t, this.visitor = e;
2154
+ }
2155
+ }, $t = class {
2156
+ constructor() {
2157
+ this.visitorsByXmlTagName = /* @__PURE__ */ new Map(), this.scopedVisitorsByXmlTagName = /* @__PURE__ */ new Map(), this.visitorParamsState = null, this.registerVisitor("Relationships", new Q()), this.registerVisitor("cp:coreProperties", new Z()), this.registerVisitor("Properties", new tt()), this.registerVisitor("spPr", new rt()), this.registerVisitor("txBody", new ht()), this.registerVisitor("txPr", new ht()), this.registerVisitor("c:chartSpace", new et()), this.registerVisitor("c:plotArea", new st()), this.registerVisitor("c:barChart", new ot()), this.registerVisitor("c:doughnutChart", new it()), this.registerVisitor("c:lineChart", new it()), this.registerVisitor("c:ofPieType", new it()), this.registerVisitor("c:pieChart", new it()), this.registerVisitor("c:scatterChart", new it()), this.registerVisitor("c:barChart", new nt("dataLabels"), "dLbls"), this.registerVisitor("c:doughnutChart", new nt("dataLabels"), "dLbls"), this.registerVisitor("c:lineChart", new nt("dataLabels"), "dLbls"), this.registerVisitor("c:ofPieType", new nt("dataLabels"), "dLbls"), this.registerVisitor("c:pieChart", new nt("dataLabels"), "dLbls"), this.registerVisitor("c:scatterChart", new nt("dataLabels"), "dLbls"), this.registerVisitor("c:ser", new lt()), this.registerVisitor("c:dPt", new at()), this.registerVisitor("c:marker", new ct()), this.registerVisitor("c:catAx", new ut()), this.registerVisitor("c:valAx", new ut()), this.registerVisitor("c:dateAx", new ut()), 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 ht("labels.text"), "txPr"), this.registerVisitor("c:valAx", new ht("labels.text"), "txPr"), this.registerVisitor("c:dateAx", new ht("labels.text"), "txPr"), this.registerVisitor("c:legend", new dt()), this.registerVisitor("c:legend", new ht("labels.text"), "txPr"), this.registerVisitor("c:legendEntry", new pt()), this.registerVisitor("c:ser", new gt(), "extLst/ext/invertSolidFillFmt/spPr"), this.registerVisitor("c:ser", new nt("labels"), "dLbls"), this.registerVisitor("c:dLbl", new nt("points")), this.registerVisitor("c:title", new mt()), this.registerVisitor("c:title", null, "tx/rich"), this.registerVisitor("c:title", null, "txPr"), this.registerVisitor("c:layout", new bt()), this.registerVisitor("c:dispUnits", new j("dispUnits")), this.registerVisitor("c:dispUnitsLbl", new mt("displayUnitsLabel")), this.registerVisitor("c:dispUnitsLbl", new ht(), "tx/rich"), this.registerVisitor("a:theme", new At()), this.registerVisitor("a:theme", new ft(), "themeElements/clrScheme"), this.registerVisitor("a:theme", new yt(), "themeElements/fontScheme"), this.registerVisitor("a:theme", new vt(), "themeElements/fmtScheme"), this.registerVisitor("autoFilter", new Ft()), this.registerVisitor("sortState", new Ct()), this.registerVisitor("s:workbook", new St()), this.registerVisitor("styleSheet", new wt()), this.registerVisitor("x14:table", new Tt()), this.registerVisitor("table", new Pt()), this.registerVisitor("externalLink", new Ot()), this.registerVisitor("hlinkClick", new Nt()), this.registerVisitor("wsDr", new Vt()), this.registerVisitor("twoCellAnchor", new It()), this.registerVisitor("oneCellAnchor", new It()), this.registerVisitor("absoluteAnchor", new It()), this.registerVisitor("graphicFrame", new Lt()), this.registerVisitor("sp", new Bt()), this.registerVisitor("grpSp", new Et()), this.registerVisitor("cxnSp", new Rt()), this.registerVisitor("pic", new _t()), this.registerVisitor("metadata", new jt()), this.registerVisitor("rvStructures", new Yt()), this.registerVisitor("rvData", new Dt()), this.registerVisitor("comments", new Mt()), this.registerVisitor("comment", new zt()), this.registerVisitor("comment", new ht("content"), "text"), this.registerVisitor("ThreadedComments", new Ut()), this.registerVisitor("threadedComment", new Wt()), this.registerVisitor("threadedComment", new ht("content"), "text"), this.registerVisitor("personList", new Gt()), this.registerVisitor("slicerCacheDefinition", new xt()), this.registerVisitor("slicers", new kt());
2158
+ }
2159
+ registerVisitor(t, e, s = null) {
2160
+ -1 === t.indexOf(":") && (t = "*:" + t);
2161
+ const r = t.split(":"), o = r.length > 1 ? r[1] : r[0];
2162
+ if (!s) return this.visitorsByXmlTagName.set(o, e), void this.visitorsByXmlTagName.set(t, e);
2163
+ let i = this.scopedVisitorsByXmlTagName.get(o);
2164
+ i || (i = [], this.scopedVisitorsByXmlTagName.set(o, i), this.scopedVisitorsByXmlTagName.set(t, i)), i.push(new Xt(s, e));
2165
+ }
2166
+ getVisitorParamsState() {
2167
+ return this.visitorParamsState;
2168
+ }
2169
+ transform(t, e, s = u.EmptyObject) {
2170
+ const r = t.documentElement;
2171
+ this.visitorParamsState && !s?.paramMap || (this.visitorParamsState = s?.paramMap ?? /* @__PURE__ */ new Map());
2172
+ const o = {};
2173
+ let i = this.visitorsByXmlTagName.get(r.nodeName);
2174
+ 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.`);
2175
+ const n = "/" + r.localName, l = new O(null, this, n, r, o, e, s), a = [];
2176
+ this._doWalk(i, l, a, r, o, e, s);
2177
+ const c = a.length;
2178
+ for (let t = 0; t < c; t++) {
2179
+ const e = a[t];
2180
+ try {
2181
+ e.visitor?.afterVisit?.(e.context, e.elemParent, e.jsonParent);
2182
+ } catch (t) {
2183
+ console.warn(`Error in afterVisit: ${e.context.getPath()}`, t);
2184
+ }
2185
+ }
2186
+ return o;
2187
+ }
2188
+ _walkScoped(t, e, s, r, o, i, n) {
2189
+ const l = this.scopedVisitorsByXmlTagName.get(t), a = l ? l.length : 0;
2190
+ for (let c = 0; c < a; c++) {
2191
+ const a = l[c];
2192
+ let u = null;
2193
+ try {
2194
+ u = e.evaluate(a.path, r);
2195
+ } catch (e) {
2196
+ console.warn(`"Invalid path '${a.path}' for '${t}'.`);
2197
+ }
2198
+ if (!u) continue;
2199
+ const h = (t) => {
2200
+ let l = t.localName, c = t.parentNode;
2201
+ for (; c && c !== r;) l = c.localName + "/" + l, c = c.parentNode;
2202
+ const u = e.getPath() + "/" + l;
2203
+ if (a.visitor) {
2204
+ const r = new O(e, this, u, e.getElemRoot(), e.getJsonRoot(), i, n);
2205
+ this._doWalk(a.visitor, r, s, t, o, i, n);
2206
+ }
2207
+ };
2208
+ if (u.length > 0) {
2209
+ const t = u, e = t.length;
2210
+ for (let s = 0; s < e; s++) h(t.item(s));
2211
+ } else h(u);
2212
+ }
2213
+ }
2214
+ _doWalk(t, e, s, r, o, i, n) {
2215
+ let l = null;
2216
+ t && (s.push({
2217
+ visitor: t,
2218
+ context: e,
2219
+ elemParent: r,
2220
+ jsonParent: o
2221
+ }), l = t.visit(e, r, o)), l || (l = o);
2222
+ const a = r.localName;
2223
+ this._walkScoped(a, e, s, r, l, i, n);
2224
+ const c = this.visitorsByXmlTagName, u = e.getElemRoot(), h = e.getJsonRoot(), p = r.childNodes, d = p.length;
2225
+ for (let t = 0; t < d; t++) {
2226
+ const r = p.item(t);
2227
+ if (1 !== r.nodeType) continue;
2228
+ const a = r;
2229
+ let d = a.nodeName, g = c.get(d);
2230
+ g || (d = a.localName, g = c.get(d));
2231
+ const m = e.getPath() + "/" + d, b = new O(e, this, m, u, h, i, n);
2232
+ this._doWalk(g, b, s, a, l ?? o, i, n);
2233
+ }
2234
+ return l;
2235
+ }
2236
+ };
2237
+ export { $t as DOMTransformer, O as ExecutionContext, c as NumberUtils, x as VisitorUtils };