@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,3617 @@
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 "./CS8eRkAhoCN8KdGO.mjs";
8
+ import { E as e, F as t, H as n, I as r, L as i, N as a, R as o, T as s, U as c, V as l, W as u, c as d, d as f, g as p, i as m, k as h, m as g, n as _, s as v, t as y, v as b, w as x, x as ee, y as te } from "./DoKP-E832M9vPWgU.mjs";
9
+ import { AddressUtils as S, BufferUtils as C, Color as w, CommonUtils as T, CoordUtils as ne, FormulaError as re, IColor as E, ICondition as D, IConditionalFormat as O, IEffect as k, IFill as A, ISheet as j, IStroke as M, IStyle as N, ITextFrame as P, LicenseManager as ie, NumberFormat as F, ScalarType as I } from "@sheetxl/sdk";
10
+ var L = class {
11
+ constructor(e) {
12
+ this._kind = e.kind, this._contentType = e.contentType, this._relTypeUri = e.relTypeUri, this._path = e.path;
13
+ }
14
+ get kind() {
15
+ return this._kind;
16
+ }
17
+ get contentType() {
18
+ return this._contentType;
19
+ }
20
+ get relTypeUri() {
21
+ return this._relTypeUri;
22
+ }
23
+ getPath(e) {
24
+ return typeof this._path == "function" ? this._path(e) : this._path;
25
+ }
26
+ }, R = class e {
27
+ constructor(e, t, n) {
28
+ this.zipWriter = e, this.outputKind = t, this.outWritable = n;
29
+ }
30
+ static createUint8Array(t) {
31
+ let n = new o(new u(), t);
32
+ return new e(n, "uint8array");
33
+ }
34
+ static createBlob(t) {
35
+ let n = new o(new l("application/zip"), t);
36
+ return new e(n, "blob");
37
+ }
38
+ static createWritableStream(t, n) {
39
+ let r = new o(t, n);
40
+ return new e(r, "writable", t);
41
+ }
42
+ async add(e, t, r) {
43
+ let i = function(e) {
44
+ let t = e.replace(/\\/g, "/").trim();
45
+ for (; t.startsWith("/");) t = t.slice(1);
46
+ return t;
47
+ }(e), a = {
48
+ level: r?.level,
49
+ password: r?.password,
50
+ encryptionStrength: r?.encryptionStrength,
51
+ zipCrypto: r?.zipCrypto,
52
+ lastModDate: r?.lastModDate,
53
+ keepOrder: r?.keepOrder,
54
+ uncompressedSize: r?.uncompressedSize,
55
+ dataDescriptor: r?.dataDescriptor,
56
+ passThrough: r?.passThrough,
57
+ compressionMethod: r?.compressionMethod,
58
+ signature: r?.signature
59
+ };
60
+ if (typeof t == "string") return void await this.zipWriter.add(i, new n(t), a);
61
+ if (t instanceof Uint8Array || ArrayBuffer.isView(t) || t && typeof t.byteLength == "number" && typeof t.byteOffset == "number") {
62
+ try {
63
+ await this.zipWriter.add(i, new c(t), a);
64
+ } catch (e) {
65
+ throw console.log("Error adding Uint8Array source to zip:", i, a), e;
66
+ }
67
+ return;
68
+ }
69
+ let o = (s = t) && typeof s.getReader == "function" ? t : function(e) {
70
+ let t = e[Symbol.asyncIterator]();
71
+ return new ReadableStream({
72
+ async pull(e) {
73
+ let { value: n, done: r } = await t.next();
74
+ r ? e.close() : e.enqueue(n);
75
+ },
76
+ async cancel(e) {
77
+ if (typeof t.return == "function") try {
78
+ await t.return(e);
79
+ } catch {}
80
+ }
81
+ });
82
+ }(t);
83
+ var s;
84
+ await this.zipWriter.add(i, o, a);
85
+ }
86
+ async close(e) {
87
+ let t = e?.comment, n = await this.zipWriter.close(t, {});
88
+ return this.outputKind === "writable" ? this.outWritable ?? n : n;
89
+ }
90
+ };
91
+ function ae(e) {
92
+ let t = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), n = (e) => t(e).replace(/"/g, "&quot;"), r = (e) => {
93
+ if (!e) return "";
94
+ let t = "";
95
+ for (let [r, i] of Object.entries(e)) i !== void 0 && !1 !== i && (t += !0 === i ? ` ${r}="1"` : ` ${r}="${n(String(i))}"`);
96
+ return t;
97
+ }, i = new TextEncoder(), a = "", o = () => {
98
+ a &&= (e.write(i.encode(a)), "");
99
+ }, s = (e) => {
100
+ a += e, a.length > 65536 && o();
101
+ }, c = [], l = null, u = [], d = !0;
102
+ return {
103
+ decl() {
104
+ s("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
105
+ },
106
+ pushDefaultNamespace(e) {
107
+ c.push(e), l = e;
108
+ },
109
+ getDefaultNamespace: () => c.length > 0 ? c[c.length - 1] : null,
110
+ popDefaultNamespace() {
111
+ c.length > 0 && (c.pop(), l = c.length > 0 ? c[c.length - 1] : null);
112
+ },
113
+ start(e, t) {
114
+ d && u.push({
115
+ tag: e,
116
+ attrs: t,
117
+ bufferPos: a.length
118
+ });
119
+ let n = e;
120
+ l && e.indexOf(":") === -1 && (n = `${l}:${e}`), s(`<${n}${r(t)}>`);
121
+ },
122
+ empty(e, t) {
123
+ let n = e;
124
+ l && e.indexOf(":") === -1 && (n = `${l}:${e}`), s(`<${n}${r(t)}/>`);
125
+ },
126
+ text(e) {
127
+ s(t(String(e)));
128
+ },
129
+ raw(e) {
130
+ s(e);
131
+ },
132
+ end(e) {
133
+ let t;
134
+ if (d) {
135
+ if (u.length === 0) throw Error(`XML Writer: Unexpected end tag </${e}> - no matching start tag`);
136
+ if (t = u[u.length - 1], t.tag !== e) throw Error(`XML Writer: End tag </${e}> does not match start tag <${t.tag}>`);
137
+ }
138
+ let n = e;
139
+ if (l && e.indexOf(":") === -1 && (n = `${l}:${e}`), d) {
140
+ let e = a.length, i = `<${n}${r(t.attrs)}>`.length;
141
+ e === t.bufferPos + i ? (a = a.slice(0, t.bufferPos), s(`<${n}${r(t.attrs)}/>`)) : s(`</${n}>`), u.pop();
142
+ } else s(`</${n}>`);
143
+ },
144
+ close() {
145
+ o();
146
+ },
147
+ setValidationDisabled(e) {
148
+ d = !e;
149
+ }
150
+ };
151
+ }
152
+ function oe(e) {
153
+ switch (e.kind) {
154
+ case "bytes": return e.bytes;
155
+ case "text": return e.text;
156
+ case "stream": return e.stream;
157
+ case "xmlStream": {
158
+ let t = [], n = ae({ write: (e) => t.push(e) });
159
+ return e.writeXml(n), n.close(), function(e) {
160
+ let t = 0;
161
+ for (let n of e) t += n.byteLength;
162
+ let n = new Uint8Array(t), r = 0;
163
+ for (let t of e) n.set(t, r), r += t.byteLength;
164
+ return n;
165
+ }(t);
166
+ }
167
+ case "xmlStreamed": return e.write();
168
+ }
169
+ }
170
+ function se(e) {
171
+ let t = z(e);
172
+ if (!t) return "_rels/.rels";
173
+ let n = t.lastIndexOf("/"), r = n >= 0 ? t.slice(0, n) : "";
174
+ return `${r ? `${r}/_rels` : "_rels"}/${n >= 0 ? t.slice(n + 1) : t}.rels`;
175
+ }
176
+ function z(e) {
177
+ let t = (e ?? "").replace(/\\/g, "/").trim();
178
+ for (; t.startsWith("/");) t = t.slice(1);
179
+ return t;
180
+ }
181
+ function ce(e) {
182
+ let t = /^rId(\d+)$/.exec(e);
183
+ return t ? parseInt(t[1], 10) : 2 ** 53 - 1;
184
+ }
185
+ function B(e) {
186
+ return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/"/g, "&quot;").replace(/>/g, "&gt;");
187
+ }
188
+ function le(e, t, n, r = !1) {
189
+ let i = t;
190
+ if (t.startsWith("/")) i = t.slice(1);
191
+ else {
192
+ if (!e) throw Error(`Relative path "${t}" cannot be used at root level. Use an absolute path starting with "/" (e.g., "/xl/workbook.xml").`);
193
+ i = (e.includes("/") ? e.slice(0, e.lastIndexOf("/") + 1) : "") + t;
194
+ }
195
+ if (i = ue(i), !i.includes("{n}")) {
196
+ if (!r && n.has(i)) throw Error(`Path already existing path: ${i}`);
197
+ return i;
198
+ }
199
+ let a, o = 1;
200
+ do
201
+ if (a = i.replace(/{n}/g, String(o)), o++, o > 1e4) throw Error(`Failed to resolve path template "${t}" after 10000 attempts. This likely indicates a bug or an impossible constraint.`);
202
+ while (n.has(a));
203
+ return a;
204
+ }
205
+ function ue(e) {
206
+ let t = e.split("/"), n = [];
207
+ for (let r of t) if (r !== "" && r !== ".") if (r === "..") {
208
+ if (n.length === 0) throw Error(`Invalid path: too many ".." segments in "${e}"`);
209
+ n.pop();
210
+ } else n.push(r);
211
+ return n.join("/");
212
+ }
213
+ function de(e, t) {
214
+ if (!e) return t;
215
+ let n = e.includes("/") ? e.slice(0, e.lastIndexOf("/")) : "", r = n ? n.split("/") : [], i = t.split("/"), a = 0, o = Math.min(r.length, i.length - 1);
216
+ for (let e = 0; e < o && r[e] === i[e]; e++) a++;
217
+ let s = r.length - a;
218
+ return "../".repeat(s) + i.slice(a).join("/");
219
+ }
220
+ function fe(e) {
221
+ return new TextEncoder().encode(e);
222
+ }
223
+ function pe(e, t) {
224
+ return function(e, t = " ") {
225
+ let n = "", r = 0, i = e.split(/(<[^>]+>)/g).filter(Boolean);
226
+ for (let e = 0; e < i.length; e++) {
227
+ let a = i[e];
228
+ if (a.trim()) if (a.startsWith("<?")) n += a + "\n";
229
+ else if (a.startsWith("</")) r--, r < 0 && console.warn(`XML formatting warning: negative indentation depth: ${a}`), n += t.repeat(Math.max(r, 0)) + a + "\n";
230
+ else if (a.startsWith("<")) {
231
+ let e = a.endsWith("/>");
232
+ n += t.repeat(r) + a + "\n", e || r++;
233
+ } else n += t.repeat(r) + a.trim() + "\n";
234
+ }
235
+ return n;
236
+ }(function(e) {
237
+ return new TextDecoder("utf-8").decode(e);
238
+ }(e), t);
239
+ }
240
+ var me = /&(amp|lt|gt|quot|apos|#x[0-9a-fA-F]+|#[0-9]+);/g;
241
+ function he(e, t) {
242
+ switch (t) {
243
+ case "amp": return "&";
244
+ case "lt": return "<";
245
+ case "gt": return ">";
246
+ case "quot": return "\"";
247
+ case "apos": return "'";
248
+ default: return t.startsWith("#x") ? String.fromCodePoint(parseInt(t.slice(2), 16)) : t.startsWith("#") ? String.fromCodePoint(parseInt(t.slice(1), 10)) : e;
249
+ }
250
+ }
251
+ function ge(e) {
252
+ return e.replace(me, he);
253
+ }
254
+ function _e(e) {
255
+ let t = {}, n = /([A-Za-z_:][-A-Za-z0-9_:.]*)\s*=\s*"([^"]*)"/g, r;
256
+ for (; r = n.exec(e);) t[r[1]] = ge(r[2]);
257
+ return t;
258
+ }
259
+ function ve(e, t) {
260
+ let n = [], r = RegExp(`<${t}\\b([^>]*)/?>`, "g"), i;
261
+ for (; i = r.exec(e);) n.push(_e(i[1]));
262
+ return n;
263
+ }
264
+ function ye(e) {
265
+ return ve(new TextDecoder("utf-8").decode(e), "Relationship").filter((e) => e.Type && e.Target).map((e) => ({
266
+ type: e.Type,
267
+ target: e.Target,
268
+ external: e.TargetMode === "External"
269
+ }));
270
+ }
271
+ var be = class {
272
+ constructor(e) {
273
+ this.rels = [], this.usedIds = /* @__PURE__ */ new Set(), this.nextId = 1, this.sourcePart = z(e);
274
+ }
275
+ add(e, t, n) {
276
+ let r = n?.idHint && !this.usedIds.has(n.idHint) ? n.idHint : void 0;
277
+ if (!r) do
278
+ r = "rId" + this.nextId++;
279
+ while (this.usedIds.has(r));
280
+ let i = /^rId(\d+)$/.exec(r);
281
+ return i && (this.nextId = Math.max(this.nextId, parseInt(i[1], 10) + 1)), this.usedIds.add(r), this.rels.push({
282
+ id: r,
283
+ type: e,
284
+ target: t,
285
+ targetMode: n?.external ? "External" : void 0
286
+ }), r;
287
+ }
288
+ list() {
289
+ return this.rels;
290
+ }
291
+ toXmlBytes() {
292
+ let e = [...this.rels].sort((e, t) => ce(t.id) - ce(e.id) || e.id.localeCompare(t.id)), t = [];
293
+ t.push("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"), t.push(`<Relationships xmlns="${xe}">`);
294
+ for (let n of e) {
295
+ let e = [
296
+ `Id="${B(n.id)}"`,
297
+ `Type="${B(n.type)}"`,
298
+ `Target="${B(n.target)}"`
299
+ ];
300
+ n.targetMode === "External" && e.push("TargetMode=\"External\""), t.push(`<Relationship ${e.join(" ")}/>`);
301
+ }
302
+ return t.push("</Relationships>"), fe(t.join(""));
303
+ }
304
+ }, xe = "http://schemas.openxmlformats.org/package/2006/relationships", Se = class {
305
+ constructor() {
306
+ this._defaultsSet = /* @__PURE__ */ new Set(), this._overridesSet = /* @__PURE__ */ new Set(), this._defaults = [], this._overrides = [];
307
+ }
308
+ addDefault(e, t) {
309
+ let n = function(e) {
310
+ let t = (e ?? "").trim().toLowerCase();
311
+ return t.startsWith(".") && (t = t.slice(1)), t;
312
+ }(e);
313
+ this._defaultsSet.has(n) || (this._defaultsSet.add(n), this._defaults.push({
314
+ key: n,
315
+ content: t
316
+ }));
317
+ }
318
+ addOverride(e, t) {
319
+ let n = function(e) {
320
+ let t = (e ?? "").replace(/\\/g, "/").trim();
321
+ return t.startsWith("/") || (t = "/" + t), t;
322
+ }(e);
323
+ this._overridesSet.has(n) || (this._overridesSet.add(n), this._overrides.push({
324
+ key: n,
325
+ content: t
326
+ }));
327
+ }
328
+ toXmlBytes() {
329
+ let e = [];
330
+ e.push("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"), e.push(`<Types xmlns="${Ce}">`);
331
+ let t = this._defaults.reverse();
332
+ this.addDefault("rels", "application/vnd.openxmlformats-package.relationships+xml"), this.addDefault("xml", "application/xml");
333
+ for (let { key: n, content: r } of t) e.push(`<Default Extension="${B(n)}" ContentType="${B(r)}"/>`);
334
+ let n = this._overrides;
335
+ for (let { key: t, content: r } of n) e.push(`<Override PartName="${B(t)}" ContentType="${B(r)}"/>`);
336
+ return e.push("</Types>"), fe(e.join(""));
337
+ }
338
+ }, Ce = "http://schemas.openxmlformats.org/package/2006/content-types", we = class {
339
+ constructor(e) {
340
+ this.parts = [], this.relsRoot = new be(""), this.relsByPart = /* @__PURE__ */ new Map(), this.contentTypes = new Se(), this.zip = e;
341
+ }
342
+ addContentType(e, t) {
343
+ let n = z(e);
344
+ this.contentTypes.addOverride("/" + n, t);
345
+ }
346
+ addDefaultType(e, t) {
347
+ this.contentTypes.addDefault(e, t);
348
+ }
349
+ addPart(e, t, n, r) {
350
+ let i = z(e);
351
+ this.parts.push({
352
+ path: i,
353
+ body: t,
354
+ optionsZip: r
355
+ }), n && this.contentTypes.addOverride("/" + i, n);
356
+ }
357
+ rels(e) {
358
+ let t = z(e || "");
359
+ if (!t) return this.relsRoot;
360
+ let n = this.relsByPart.get(t);
361
+ return n || (n = new be(t), this.relsByPart.set(t, n)), n;
362
+ }
363
+ async emit() {
364
+ let e = [...this.parts].sort((e, t) => e.path.localeCompare(t.path));
365
+ for (let t of e) {
366
+ let e = oe(t.body);
367
+ await this.zip.add(t.path, e, t.optionsZip);
368
+ }
369
+ let t = this.relsRoot.toXmlBytes();
370
+ await this.zip.add("_rels/.rels", t, {});
371
+ let n = [...this.relsByPart.values()].sort((e, t) => e.sourcePart.localeCompare(t.sourcePart));
372
+ for (let e of n) {
373
+ let t = se(e.sourcePart), n = e.toXmlBytes();
374
+ await this.zip.add(t, n, {});
375
+ }
376
+ let r = this.contentTypes.toXmlBytes();
377
+ await this.zip.add("[Content_Types].xml", r, {});
378
+ }
379
+ async build(e) {
380
+ return await this.emit(), await this.zip.close(e);
381
+ }
382
+ }, Te = /* @__PURE__ */ new Set(["xl/calcChain.xml"]), Ee = [
383
+ /^xl\/drawings\/vmlDrawing\d+\.vml$/i,
384
+ /^xl\/ctrlProps\//i,
385
+ /^xl\/slicers\//i,
386
+ /^xl\/slicerCaches\//i,
387
+ /^xl\/pivotCache\//i,
388
+ /^xl\/pivotTables\//i
389
+ ];
390
+ function De(e) {
391
+ return Ee.some((t) => t.test(e));
392
+ }
393
+ function Oe(e) {
394
+ return e === "[Content_Types].xml" || ke.test(e);
395
+ }
396
+ var ke = /^(?:(.*)\/)?_rels\/(.*)\.rels$/;
397
+ function Ae(e) {
398
+ if (e === "_rels/.rels") return "";
399
+ let t = ke.exec(e);
400
+ if (!t) return null;
401
+ let n = t[1] ?? "", r = t[2];
402
+ return n ? `${n}/${r}` : r;
403
+ }
404
+ var je = class {
405
+ constructor(e, t, n) {
406
+ this._queue = [], this._scheduledByNodeKey = /* @__PURE__ */ new Map(), this._nodesByPath = /* @__PURE__ */ new Map(), this._writtenPaths = /* @__PURE__ */ new Set(), this._explicitRelTargets = /* @__PURE__ */ new Set(), this._partWriter = new we(e), this._registry = t, this._options = n ?? {}, this._mapState = this._options.mapState ?? /* @__PURE__ */ new Map(), this._sourcePackage = this._options.sourcePackage ?? null;
407
+ }
408
+ async waitEmit() {
409
+ let e = this._queue;
410
+ for (; e.length;) {
411
+ let t = e.shift();
412
+ await this._processPart(t);
413
+ }
414
+ }
415
+ async build(e) {
416
+ return await this.waitEmit(), this._passthroughSourceParts(), await this._partWriter.build(e ?? {});
417
+ }
418
+ _passthroughSourceParts() {
419
+ let e = this._sourcePackage;
420
+ if (!e) return;
421
+ let t = new Set(this._writtenPaths), n = e.hasStructuralChange(), r = [];
422
+ for (let i of e.getNames()) t.has(i) || Te.has(i) || Oe(i) || n && De(i) || r.push(i);
423
+ let i = new Set(t);
424
+ for (let e of r) i.add(e);
425
+ let a = e.getPart("[Content_Types].xml"), o = a ? function(e) {
426
+ let t = new TextDecoder("utf-8").decode(e), n = ve(t, "Default").map((e) => ({
427
+ ext: (e.Extension ?? "").toLowerCase(),
428
+ contentType: e.ContentType ?? ""
429
+ })).filter((e) => e.ext && e.contentType), r = /* @__PURE__ */ new Map();
430
+ for (let e of ve(t, "Override")) e.PartName && e.ContentType && r.set(e.PartName, e.ContentType);
431
+ return {
432
+ defaults: n,
433
+ overrides: r
434
+ };
435
+ }(a.data) : null;
436
+ if (o) for (let { ext: e, contentType: t } of o.defaults) this._partWriter.addDefaultType(e, t);
437
+ for (let t of r) {
438
+ let n = e.getPart(t), r = o?.overrides.get("/" + t);
439
+ n.raw ? this._partWriter.addPart(t, {
440
+ kind: "bytes",
441
+ bytes: n.raw.compressedData
442
+ }, r, {
443
+ passThrough: !0,
444
+ compressionMethod: n.raw.compressionMethod,
445
+ signature: n.raw.signature,
446
+ uncompressedSize: n.uncompressedSize
447
+ }) : this._partWriter.addPart(t, {
448
+ kind: "bytes",
449
+ bytes: n.data
450
+ }, r), this._writtenPaths.add(t);
451
+ }
452
+ for (let n of e.getNames()) {
453
+ if (n === "[Content_Types].xml" || !Oe(n)) continue;
454
+ let r = Ae(n);
455
+ r !== null && (r === "" || i.has(r)) && this._mergeSourceRelsInto(r, e.getPart(n).data, t, i);
456
+ }
457
+ }
458
+ _mergeSourceRelsInto(e, t, n, r) {
459
+ let i = this._partWriter.rels(e), a = e.includes("/") ? e.slice(0, e.lastIndexOf("/")) : "";
460
+ for (let o of ye(t)) {
461
+ if (o.external) {
462
+ i.add(o.type, o.target, { external: !0 });
463
+ continue;
464
+ }
465
+ let t = ue((a ? a + "/" : "") + o.target);
466
+ n.has(t) || this._explicitRelTargets.has(`${e}::${t}`) || (r.has(t) ? i.add(o.type, o.target) : console.warn(`Dropping preserved relationship to missing part '${t}'`, e || "(root)"));
467
+ }
468
+ }
469
+ addPart(e, t, n) {
470
+ return this._addPartInternal("", e, t, n);
471
+ }
472
+ _addPartInternal(e, t, n, r) {
473
+ let i = this._registry.get(t);
474
+ if (!i) throw Error(`No emitter registered for kind '${t}'.`);
475
+ let a = r ?? i.getPath?.(n);
476
+ if (!a) throw Error("No path provided in either argument or emitter.");
477
+ let o = this._writtenPaths, s = le(e, a, o), c = `${t}:${s}`, l = this._scheduledByNodeKey.get(c);
478
+ if (!l) {
479
+ let e, r = new Promise((t) => {
480
+ e = t;
481
+ });
482
+ l = {
483
+ kind: t,
484
+ key: c,
485
+ payload: n,
486
+ path: s,
487
+ contentType: i.contentType,
488
+ promise: r,
489
+ resolve: e
490
+ }, this._scheduledByNodeKey.set(c, l), this._queue.push(l);
491
+ }
492
+ let u = this._nodesByPath.get(e);
493
+ u || (u = /* @__PURE__ */ new Set(), this._nodesByPath.set(e, u)), u.add(c), !i.contentType || i.relTypeUri || e || this._partWriter.rels("").add("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", s);
494
+ let d = null;
495
+ if (i.relTypeUri) {
496
+ let t = de(e, l.path);
497
+ d = this._partWriter.rels(e).add(i.relTypeUri, t);
498
+ }
499
+ return o.add(s), {
500
+ path: s,
501
+ contentTypeUri: i.contentType,
502
+ relId: d
503
+ };
504
+ }
505
+ addBinary(e, t, n, r, i = !1) {
506
+ return this._addBinaryInternal("", e, t, n, r, i);
507
+ }
508
+ _addBinaryInternal(e, t, n, r, i, a = !1) {
509
+ if (!i) throw Error("No path provided for binary.");
510
+ if (!n) throw Error("No content type provided for binary.");
511
+ let o = this._writtenPaths, s = le(e, i, o, a), c = null;
512
+ if (r) {
513
+ let t = de(e, s);
514
+ c = this._partWriter.rels(e).add(r, t);
515
+ }
516
+ if (e || this._partWriter.rels("").add("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", s), !o.has(s)) {
517
+ let e = s.split(".").pop() || "";
518
+ e && this._partWriter.addDefaultType(e, n), this._partWriter.addPart(s, {
519
+ kind: "bytes",
520
+ bytes: t
521
+ }, void 0, {
522
+ level: 0,
523
+ uncompressedSize: t.byteLength,
524
+ dataDescriptor: !1
525
+ }), o.add(s);
526
+ }
527
+ return {
528
+ path: s,
529
+ contentTypeUri: n,
530
+ relId: c
531
+ };
532
+ }
533
+ _forkPreservedPart(e, t, n, r, i) {
534
+ let a = this._sourcePackage;
535
+ if (!a) return null;
536
+ let o = a.getPart(t);
537
+ if (!o) return null;
538
+ let s = new Set(this._writtenPaths);
539
+ for (let e of a.getNames()) s.add(e);
540
+ let c = le(e, i, s), l = this._addBinaryInternal(e, o.data, n, r, "/" + c), u = a.getPart(se(t));
541
+ if (u) {
542
+ let e = this._partWriter.rels(l.path);
543
+ for (let t of ye(u.data)) e.add(t.type, t.target, t.external ? { external: !0 } : void 0);
544
+ }
545
+ return l;
546
+ }
547
+ async _waitForDescendants(e) {
548
+ let t = this._nodesByPath.get(e);
549
+ if (!t || t.size === 0) return;
550
+ let n = [];
551
+ for (let e of t) {
552
+ let t = this._scheduledByNodeKey.get(e);
553
+ if (t) {
554
+ let e = this._processPart(t);
555
+ n.push(e);
556
+ }
557
+ }
558
+ await Promise.all(n);
559
+ }
560
+ async _processPart(e) {
561
+ if (e.processed) return e.promise;
562
+ e.processed = !0;
563
+ let t = this._registry.get(e.kind), n = e.path;
564
+ this._partWriter.addContentType(e.path, e.contentType);
565
+ try {
566
+ let r = [], i = { write: (e) => {
567
+ r.push(e);
568
+ } }, a;
569
+ await t.emit(e.payload, {
570
+ getXMLWriter: () => a || (a = ae(i), a),
571
+ addPart: (e, t, r) => this._addPartInternal(n, e, t, r),
572
+ addBinary: (e, t, r, i, a = !1) => this._addBinaryInternal(n, e, t, r, i, a),
573
+ addExternal: (e, t) => ({
574
+ path: t,
575
+ contentTypeUri: null,
576
+ relId: this._partWriter.rels(n).add(e, t, { external: !0 })
577
+ }),
578
+ addPreservedRelationship: (e, t, r) => {
579
+ let i = de(n, t), a = this._partWriter.rels(n).add(e, i, { idHint: r });
580
+ return this._explicitRelTargets.add(`${n}::${t}`), a;
581
+ },
582
+ forkPreservedPart: (e, t, r, i) => this._forkPreservedPart(n, e, t, r, i),
583
+ waitEmit: () => this._waitForDescendants(e.path),
584
+ getPath: () => e.path,
585
+ getSharedStates: () => this._mapState,
586
+ warn: (e, t) => {
587
+ console.warn(e, t);
588
+ }
589
+ });
590
+ let o = function(e) {
591
+ let t = 0;
592
+ for (let n of e) t += n.byteLength;
593
+ let n = new Uint8Array(t), r = 0;
594
+ for (let t of e) n.set(t, r), r += t.byteLength;
595
+ return n;
596
+ }(r), s = this._options.onPartEmitted;
597
+ s && await s(e.kind, e.path, o), Me && (console.log(`\n=== ${e.path} ===`), console.log(pe(o))), this._partWriter.addPart(e.path, {
598
+ kind: "bytes",
599
+ bytes: o
600
+ }, e.contentType);
601
+ } catch (t) {
602
+ throw this._options.onPartError?.(e.kind, e.path, t), t;
603
+ } finally {
604
+ this._nodesByPath.delete(e.path), this._scheduledByNodeKey.delete(e.key), e.resolve();
605
+ }
606
+ }
607
+ }, Me = !1, Ne = class {
608
+ constructor() {
609
+ this.map = /* @__PURE__ */ new Map();
610
+ }
611
+ register(e) {
612
+ if (this.map.has(e.kind)) throw Error(`Duplicate part kind: ${e.kind}`);
613
+ this.map.set(e.kind, e);
614
+ }
615
+ get(e) {
616
+ let t = this.map.get(e);
617
+ if (!t) throw Error(`Unknown part kind: ${e}`);
618
+ return t;
619
+ }
620
+ has(e) {
621
+ return this.map.has(e);
622
+ }
623
+ };
624
+ function Pe(e, t, n) {
625
+ e && (e.algorithm && (t[n ? `${n}AlgorithmName` : "algorithmName"] = e.algorithm), e.hash && (t[n ? `${n}HashValue` : "hashValue"] = e.hash), e.salt && (t[n ? `${n}SaltValue` : "saltValue"] = e.salt), e.spinCount !== void 0 && (t[n ? `${n}SpinCount` : "spinCount"] = e.spinCount));
626
+ }
627
+ var Fe = class {
628
+ constructor() {
629
+ this._daprFMBks = [], this._daprFMBkMap = /* @__PURE__ */ new Map(), this._rvFMBks = [], this._rvFMBkMap = /* @__PURE__ */ new Map(), this._valueMeta = [];
630
+ }
631
+ registerArrayCell(e) {
632
+ let t = +!!e, n = `1,${t}`, r = this._daprFMBkMap.get(n);
633
+ return r === void 0 && (r = this._daprFMBks.length, this._daprFMBks.push({
634
+ fDynamic: 1,
635
+ fCollapsed: t
636
+ }), this._daprFMBkMap.set(n, r)), r + 1;
637
+ }
638
+ registerRichValueCell(e) {
639
+ let t = this._rvFMBkMap.get(e);
640
+ t === void 0 && (t = this._rvFMBks.length, this._rvFMBks.push(e), this._rvFMBkMap.set(e, t));
641
+ let n = this._valueMeta.length;
642
+ return this._valueMeta.push(t), n + 1;
643
+ }
644
+ hasCellMeta() {
645
+ return this._daprFMBks.length > 0;
646
+ }
647
+ hasValueMeta() {
648
+ return this._valueMeta.length > 0;
649
+ }
650
+ hasAny() {
651
+ return this.hasCellMeta() || this.hasValueMeta();
652
+ }
653
+ getDAPRFutureMetadataBlocks() {
654
+ return this._daprFMBks;
655
+ }
656
+ getRVFutureMetadataBlocks() {
657
+ return this._rvFMBks;
658
+ }
659
+ getValueMeta() {
660
+ return this._valueMeta;
661
+ }
662
+ }, Ie = class {
663
+ constructor(e, t = console.warn) {
664
+ this._entries = [], this._keyMap = /* @__PURE__ */ new Map(), this._metaCollector = e, this._onWarn = t;
665
+ }
666
+ add(e) {
667
+ if (e == null) return this._onWarn?.("RichValueCollector.add: null/undefined value — falling back to #UNKNOWN!"), this._registerFallback();
668
+ if (re.isError(e)) {
669
+ let t = e.getCode(), n = this._register(`_error:${t}`, { errorType: "" + (t - 1) }, Le);
670
+ return this._metaCollector.registerRichValueCell(n);
671
+ }
672
+ return e.isIRichData && e.getType(), this._onWarn?.("RichValueCollector.add: unsupported rich value type — falling back to #UNKNOWN!", e), this._registerFallback();
673
+ }
674
+ _registerFallback() {
675
+ let e = this._register("_error:fallback", { errorType: re.Code.Unknown - 1 }, Le);
676
+ return this._metaCollector.registerRichValueCell(e);
677
+ }
678
+ _register(e, t, n) {
679
+ let r = this._keyMap.get(e);
680
+ return r === void 0 && (r = this._entries.length, this._entries.push({
681
+ handler: n,
682
+ rawValue: t
683
+ }), this._keyMap.set(e, r)), r;
684
+ }
685
+ getCount() {
686
+ return this._entries.length;
687
+ }
688
+ hasAny() {
689
+ return this._entries.length > 0;
690
+ }
691
+ getEntries() {
692
+ return this._entries;
693
+ }
694
+ uniqueHandlers() {
695
+ let e = /* @__PURE__ */ new Set(), t = [];
696
+ for (let n of this._entries) e.has(n.handler) || (e.add(n.handler), t.push(n.handler));
697
+ return t;
698
+ }
699
+ handlerStructureIndex(e) {
700
+ let t = 0, n = /* @__PURE__ */ new Set();
701
+ for (let r of this._entries) if (!n.has(r.handler)) {
702
+ if (r.handler === e) return t;
703
+ n.add(r.handler), t++;
704
+ }
705
+ return -1;
706
+ }
707
+ }, Le = new class {
708
+ constructor(e, t) {
709
+ this.type = e, this.props = t;
710
+ }
711
+ getValues(e) {
712
+ return this.props.map(([t, , n = ""]) => {
713
+ let r = e?.[t];
714
+ return r == null ? n : "" + r;
715
+ });
716
+ }
717
+ }("_error", [[
718
+ "errorType",
719
+ "i",
720
+ ""
721
+ ], [
722
+ "subType",
723
+ "i",
724
+ "0"
725
+ ]]);
726
+ function V(e, t, n, r) {
727
+ if (!n) return;
728
+ let i = typeof n == "string" ? t.parseColor(n) : n;
729
+ r && e.start(r);
730
+ let a = i.getType(), o = i.getVal(), s = i.getAdjustments(), c = s && s.length > 0;
731
+ switch (a) {
732
+ case "scheme":
733
+ c ? (e.start("schemeClr", { val: o }), H(e, s), e.end("schemeClr")) : e.empty("schemeClr", { val: o });
734
+ break;
735
+ case "named":
736
+ if (w.isSystem(o)) {
737
+ let t = i.getLastColor() ?? i.getBaseColor().toHex().toString(!1).replace("#", "");
738
+ c ? (e.start("sysClr", {
739
+ val: o,
740
+ lastClr: t
741
+ }), H(e, s), e.end("sysClr")) : e.empty("sysClr", {
742
+ val: o,
743
+ lastClr: t
744
+ });
745
+ } else c ? (e.start("prstClr", { val: o }), H(e, s), e.end("prstClr")) : e.empty("prstClr", { val: o });
746
+ break;
747
+ case "auto": {
748
+ let t = i.getLastColor() ?? i.getBaseColor().toHex().toString(!1).replace("#", "");
749
+ c ? (e.start("sysClr", {
750
+ val: "windowText",
751
+ lastClr: t
752
+ }), H(e, s), e.end("sysClr")) : e.empty("sysClr", {
753
+ val: "windowText",
754
+ lastClr: t
755
+ });
756
+ break;
757
+ }
758
+ case "index":
759
+ c ? (e.start("srgbClr", { val: o }), H(e, s), e.end("srgbClr")) : e.empty("srgbClr", { val: o });
760
+ break;
761
+ case "hsl":
762
+ let t = i.toHex().toString();
763
+ c ? (e.start("srgbClr", { val: t }), H(e, s), e.end("srgbClr")) : e.empty("srgbClr", { val: t });
764
+ break;
765
+ case "rgb":
766
+ case "lrgb":
767
+ let n = i.toHex().toString();
768
+ c ? (e.start("srgbClr", { val: n }), H(e, s), e.end("srgbClr")) : e.empty("srgbClr", { val: n });
769
+ break;
770
+ case "hex":
771
+ let r = o.replace("#", "").toUpperCase();
772
+ c ? (e.start("srgbClr", { val: r }), H(e, s), e.end("srgbClr")) : e.empty("srgbClr", { val: r });
773
+ break;
774
+ default:
775
+ let a = o.replace("#", "").toUpperCase();
776
+ e.empty("srgbClr", { val: a });
777
+ }
778
+ r && e.end(r);
779
+ }
780
+ function H(e, t) {
781
+ if (t && t.length !== 0) for (let n of t) for (let [t, r] of Object.entries(n)) {
782
+ if (r == null) continue;
783
+ let n = t;
784
+ if (n) if (typeof r == "boolean") e.empty(n);
785
+ else {
786
+ let i;
787
+ if (t === "alpha" || t === "alphaOff" || t === "alphaMod") i = Math.round(1e5 * r);
788
+ else {
789
+ if (t === "eTint") {
790
+ if (r < 0) {
791
+ e.empty("shade", { val: Math.round(1e5 * (1 + r)).toString() });
792
+ continue;
793
+ }
794
+ e.empty("tint", { val: Math.round(1e5 * r).toString() });
795
+ continue;
796
+ }
797
+ i = Math.round(1e3 * r);
798
+ }
799
+ e.empty(n, { val: i.toString() });
800
+ }
801
+ }
802
+ }
803
+ function U(e, t, n, r, i = !1, a = !1) {
804
+ if (!n) return;
805
+ let o = typeof n == "string" ? t.parseColor(n) : n, s = () => {
806
+ e.empty(r, { rgb: We(o.toHex().toString(!0)) });
807
+ }, c = o.getAdjustments(), l = c && c.length > 0, u = o.getType();
808
+ if (u !== E.Type.Auto) {
809
+ if (u === E.Type.Scheme) {
810
+ let t = o.getVal(), n = Re[t] ?? t, i = Ve.get(n);
811
+ if (i === void 0 && n !== "phClr") return console.warn(`Color scheme not in theme. schemeVal=${t} themeKey=${n}`), s();
812
+ let a = {};
813
+ if (a.theme = i, l) {
814
+ if (!function(e) {
815
+ for (let t of e) switch (Object.keys(t)[0]) {
816
+ case E.AdjustmentType.Tint:
817
+ case E.AdjustmentType.ETint:
818
+ case E.AdjustmentType.Shade:
819
+ case E.AdjustmentType.Lum:
820
+ case E.AdjustmentType.LumOff:
821
+ case E.AdjustmentType.LumMod:
822
+ case E.AdjustmentType.Alpha:
823
+ case E.AdjustmentType.AlphaOff:
824
+ case E.AdjustmentType.AlphaMod: continue;
825
+ default: return !1;
826
+ }
827
+ return !0;
828
+ }(c)) return s();
829
+ let e = c.length === 1 ? c[0][E.AdjustmentType.ETint] : void 0, t;
830
+ if (e !== void 0) t = He(e);
831
+ else {
832
+ let e = o.getBaseColor().toHex().toString(!0), n = o.toHex().toString(!0);
833
+ t = He(function(e, t) {
834
+ let n = W(e, 0, 255), r = W(t, 0, 255);
835
+ return Math.abs(r - n) < 1e-9 ? 0 : r < n ? n <= 1e-9 ? -1 : W(r / n - 1, -1, 0) : 255 - n <= 1e-9 ? 0 : W((r - n) / (255 - n), 0, 1);
836
+ }(Ue(e), Ue(n)));
837
+ }
838
+ t !== 0 && (a.tint = t);
839
+ }
840
+ e.empty(r, a);
841
+ return;
842
+ }
843
+ if (u === E.Type.Index) {
844
+ let t = o.getVal(), n = t.substring(5, t.length);
845
+ e.empty(r, { indexed: Number(n) });
846
+ return;
847
+ }
848
+ return s();
849
+ }
850
+ e.empty(r, { auto: 1 });
851
+ }
852
+ var Re = {
853
+ bg1: "lt1",
854
+ tx1: "dk1",
855
+ bg2: "lt2",
856
+ tx2: "dk2",
857
+ accent1: "accent1",
858
+ accent2: "accent2",
859
+ accent3: "accent3",
860
+ accent4: "accent4",
861
+ accent5: "accent5",
862
+ accent6: "accent6",
863
+ hlink: "hlink",
864
+ folHlink: "folHlink"
865
+ }, ze = Object.freeze([
866
+ "lt1",
867
+ "dk1",
868
+ "lt2",
869
+ "dk2",
870
+ "accent1",
871
+ "accent2",
872
+ "accent3",
873
+ "accent4",
874
+ "accent5",
875
+ "accent6",
876
+ "hlink",
877
+ "folHlink"
878
+ ]), Be = Object.freeze([
879
+ "dk1",
880
+ "lt1",
881
+ "dk2",
882
+ "lt2",
883
+ "accent1",
884
+ "accent2",
885
+ "accent3",
886
+ "accent4",
887
+ "accent5",
888
+ "accent6",
889
+ "hlink",
890
+ "folHlink"
891
+ ]), Ve = new Map(ze.map((e, t) => [e, t]));
892
+ function W(e, t, n) {
893
+ return Math.max(t, Math.min(n, e));
894
+ }
895
+ function He(e) {
896
+ let t = W(e, -1, 1);
897
+ return Math.abs(t) < 1e-12 ? 0 : t;
898
+ }
899
+ function Ue(e) {
900
+ let t = function(e) {
901
+ let t = e.replace(/^#/, "").toUpperCase();
902
+ if (t.length === 8) return t.slice(2);
903
+ if (t.length === 6) return t;
904
+ throw Error(`Invalid hex: ${e}`);
905
+ }(e), n = parseInt(t.slice(0, 2), 16) / 255, r = parseInt(t.slice(2, 4), 16) / 255, i = parseInt(t.slice(4, 6), 16) / 255;
906
+ return (Math.max(n, r, i) + Math.min(n, r, i)) / 2 * 255;
907
+ }
908
+ function We(e) {
909
+ let t = e.replace(/^#/, "").toUpperCase();
910
+ if (t.length === 8) return t;
911
+ if (t.length === 6) return "FF" + t;
912
+ throw Error(`Invalid hex: ${e}`);
913
+ }
914
+ function Ge(e, t = !1) {
915
+ let n = e;
916
+ return n.length === 8 && (n = n.substring(2, 8)), n.length === 6 && (n = (t ? "00" : "FF") + n), n.toUpperCase();
917
+ }
918
+ var Ke = (e, t, n, r, i, a) => {
919
+ let o = r.sorts, s = o ? o.length : 0;
920
+ if (s === 0) return;
921
+ let c = {};
922
+ if (s > 0) {
923
+ let e = o[0].criteria?.collatorOptions;
924
+ e && (c.caseSensitive = typeof e != "object" || Array.isArray(e) || e.sensitivity !== "case" && e.sensitivity !== "variant" ? "0" : "1");
925
+ }
926
+ c.ref = n.getRange().toString(), c["xmlns:xlrd2"] = "http://schemas.microsoft.com/office/spreadsheetml/2017/richdata2", t.start("sortState", c);
927
+ for (let e = 0; e < s; e++) {
928
+ let n = o[e], r = n.criteria ?? {}, s = n.index + a.colStart, c = {};
929
+ r.reverse && (c.descending = "1"), c.ref = i.getIntersect({
930
+ colStart: s,
931
+ rowStart: a.rowStart,
932
+ colEnd: s,
933
+ rowEnd: a.rowEnd
934
+ }).toString(), r.sortOn && (c.sortBy = r.sortOn), r.dxfId !== void 0 && (c.dxfId = r.dxfId), r.iconSet !== void 0 && (c.iconSet = r.iconSet), r.customList !== void 0 && (c.customList = r.customList), t.empty("sortCondition", c);
935
+ }
936
+ t.end("sortState");
937
+ }, qe = (e, t, n, r, i = !1) => {
938
+ let a = n.getRange();
939
+ n.isShowTotals() && (a = a.getResizeBy(-1, 0));
940
+ let o = a.getCoords(), s = r.sort, c = r.filter, l = c ? c.conditions : void 0, u = l ? l.length : 0, d = r.hiddenButtons, f = {};
941
+ f.ref = a.toString();
942
+ let p, m = [];
943
+ for (let e = 0; e < u; e++) {
944
+ let t = l[e];
945
+ m[t.index] = { ...t };
946
+ }
947
+ if (Array.isArray(d) && d.length > 0) {
948
+ let e = d.length;
949
+ p = Array(d[e - 1]);
950
+ for (let t = 0; t < e; t++) p[d[t]] = !0;
951
+ }
952
+ if (m || d || p || i) {
953
+ let c = 0;
954
+ r.columns ? c = r.columns.length : i && (c = a.getColumnCount()), t.start("autoFilter", f);
955
+ for (let n = 0; n < c; n++) {
956
+ let r = !0 === d || !0 === p?.[n], i = m[n];
957
+ (i || r) && Ye(e, t, n, i, r);
958
+ }
959
+ s && i && Ke(0, t, n, s, a, o), t.end("autoFilter");
960
+ } else t.empty("autoFilter", f);
961
+ s && !i && Ke(0, t, n, s, a, o);
962
+ }, Je = (e, t, n, r) => {
963
+ let i = {};
964
+ switch (n) {
965
+ case G.Equal:
966
+ i.operator = "equal";
967
+ break;
968
+ case G.GreaterThan:
969
+ i.operator = "greaterThan";
970
+ break;
971
+ case G.GreaterThanOrEqual:
972
+ i.operator = "greaterThanOrEqual";
973
+ break;
974
+ case G.LessThan:
975
+ i.operator = "lessThan";
976
+ break;
977
+ case G.LessThanOrEqual:
978
+ i.operator = "lessThanOrEqual";
979
+ break;
980
+ case G.NotEqual: i.operator = "notEqual";
981
+ }
982
+ i.val = "" + r, t.empty("customFilter", i);
983
+ }, Ye = (e, t, n, r, i) => {
984
+ let a = {};
985
+ a.colId = "" + n, i && (a.hiddenButton = "1"), r ? (t.start("filterColumn", a), ((e, t, n) => {
986
+ let r = n.operator;
987
+ if (r !== D.BuiltInOperatorNames.Expression) if (r !== D.BuiltInOperatorNames.Unique) {
988
+ if (r === D.BuiltInOperatorNames.Color) {
989
+ let e = n.param, r = {};
990
+ e.cellColor !== void 0 && (r.cellColor = e.cellColor ? "1" : "0"), e.styleId !== void 0 && (r.dxfId = e.styleId), t.empty("colorFilter", r);
991
+ }
992
+ if (Xe(r)) if (r === "between") {
993
+ let e = n.param;
994
+ t.start("customFilters", { and: "1" }), Je(0, t, G.GreaterThanOrEqual, e.from), Je(0, t, G.LessThanOrEqual, e.to), t.end("customFilters");
995
+ } else if (r === D.BuiltInOperatorNames.Not) {
996
+ let t = n.param;
997
+ Xe(t.operator) || e.warn("Not rule with non-comparison criteria not supported in OOXML", t);
998
+ } else if (r === D.BuiltInOperatorNames.And || r === D.BuiltInOperatorNames.Or) {
999
+ let i = n.param, a = i.length;
1000
+ if (a > 0) {
1001
+ let n = {};
1002
+ r === D.BuiltInOperatorNames.And && a > 1 && (n.and = "1"), t.start("customFilters", n);
1003
+ for (let t = 0; t < a; t++) {
1004
+ let n = i[t];
1005
+ Xe(n.operator) || e.warn("Only Comparison criteria supported in Union conditions for Table AutoFilters", n);
1006
+ }
1007
+ t.end("customFilters");
1008
+ }
1009
+ } else Xe(r) && (t.start("customFilters"), Je(0, t, n.operator, n.param), t.end("customFilters"));
1010
+ if (r === D.BuiltInOperatorNames.TimePeriod) {
1011
+ let e = n.param, r = {};
1012
+ e.type && (r.type = e.type), e.anchorDate !== void 0 && (r.val = "" + e.anchorDate), e.maxVal !== void 0 && (r.maxVal = "" + e.maxVal), t.empty("dynamicFilter", r);
1013
+ }
1014
+ if (r === D.BuiltInOperatorNames.Average) {
1015
+ let e = n.param, r = {}, i = e.type;
1016
+ i && (i === D.AverageType.Above ? r.type = "aboveAverage" : i === D.AverageType.Below && (r.type = "belowAverage")), e.stdDevs !== void 0 && (r.val = "" + e.stdDevs), t.empty("dynamicFilter", r);
1017
+ }
1018
+ if (r === D.BuiltInOperatorNames.InSet) {
1019
+ let e = n.param;
1020
+ if (e.dateGroups) {
1021
+ let n = e.dateGroups, r = n.length;
1022
+ t.start("dateGroupItem");
1023
+ for (let e = 0; e < r; e++) {
1024
+ let r = n[e], i = {};
1025
+ r.day !== void 0 && (i.day = "" + r.day), r.hour !== void 0 && (i.hour = "" + r.hour), r.minute !== void 0 && (i.minute = "" + r.minute), r.second !== void 0 && (i.second = "" + r.second), r.year !== void 0 && (i.year = "" + r.year), r.month !== void 0 && (i.month = "" + r.month), i.dateTimeGrouping = r.group, t.empty("dateGroupItem", i);
1026
+ }
1027
+ t.end("dateGroupItem");
1028
+ }
1029
+ if (e.items) {
1030
+ let n = e.items, r = n.length;
1031
+ t.start("filters");
1032
+ for (let e = 0; e < r; e++) {
1033
+ let r = n[e];
1034
+ t.empty("filter", { val: "" + r });
1035
+ }
1036
+ t.end("filters");
1037
+ }
1038
+ }
1039
+ if (r === D.BuiltInOperatorNames.Icon) {
1040
+ let e = n.param, r = {};
1041
+ e.iconSet !== void 0 && (r.iconSet = e.iconSet), e.iconId !== void 0 && (r.iconId = "" + e.iconId), t.empty("iconFilter", r);
1042
+ }
1043
+ if (r === D.BuiltInOperatorNames.TopN) {
1044
+ let e = n.param, r = {};
1045
+ e.percent && (r.percent = "1"), e.top !== void 0 && (r.top = e.top ? "1" : "0"), e.limit !== void 0 && (r.val = "" + e.limit), e.filterVal !== void 0 && (r.filterVal = "" + e.filterVal), t.empty("top10", r);
1046
+ }
1047
+ } else e.warn("Unique conditions not supported in Table AutoFilters", n);
1048
+ else e.warn("Expression conditions not supported in Table AutoFilters", n);
1049
+ })(e, t, r), t.end("filterColumn")) : t.empty("filterColumn", a);
1050
+ }, Xe = (e) => e === D.BuiltInOperatorNames.GreaterThan || e === D.BuiltInOperatorNames.GreaterThanEqualTo || e === D.BuiltInOperatorNames.LessThan || e === D.BuiltInOperatorNames.LessThanEqualTo || e === D.BuiltInOperatorNames.EqualTo || e === D.BuiltInOperatorNames.And || e === D.BuiltInOperatorNames.Or || e === D.BuiltInOperatorNames.Not || e === "between", G = {
1051
+ Equal: "equal",
1052
+ GreaterThan: "greaterThan",
1053
+ GreaterThanOrEqual: "greaterThanOrEqual",
1054
+ LessThan: "lessThan",
1055
+ LessThanOrEqual: "lessThanOrEqual",
1056
+ NotEqual: "notEqual"
1057
+ }, Ze = "16.0000", Qe = 1048575, $e = 16383, et = class {
1058
+ constructor() {
1059
+ this._dxfs = [], this._byKey = /* @__PURE__ */ new Map();
1060
+ }
1061
+ add(e) {
1062
+ let t = JSON.stringify(e), n = this._byKey.get(t);
1063
+ return n === void 0 && (n = this._dxfs.length, this._dxfs.push(e), this._byKey.set(t, n)), n;
1064
+ }
1065
+ getDxfs() {
1066
+ return this._dxfs;
1067
+ }
1068
+ getCount() {
1069
+ return this._dxfs.length;
1070
+ }
1071
+ }, tt = "cfDxfs", nt = {
1072
+ names: /* @__PURE__ */ new Set(),
1073
+ perFormula: [],
1074
+ affects: () => !1
1075
+ }, rt = 1048576, it = (e, t, n) => {
1076
+ if (!n) return [];
1077
+ let r = 0;
1078
+ for (let i = 0; i < n.length; i++) {
1079
+ let a = n[i][0], o = t.getRange(a).getCoords();
1080
+ if (r += (o.rowEnd - o.rowStart + 1) * (o.colEnd - o.colStart + 1), r > rt) return e.warn(`Direct styles cover more than ${rt} cells; not writing the styles from '${a}' on. A range that size belongs in a column or row style.`), n.slice(0, i);
1081
+ }
1082
+ return n;
1083
+ };
1084
+ function at(e, t) {
1085
+ let n = t.type;
1086
+ n === O.ColorStopType.AutoMin ? n = O.ColorStopType.Min : n === O.ColorStopType.AutoMax && (n = O.ColorStopType.Max), e.empty("cfvo", {
1087
+ type: n,
1088
+ val: t.value,
1089
+ gte: t.exclusive ? "0" : void 0
1090
+ });
1091
+ }
1092
+ function ot(e, t) {
1093
+ let n = {
1094
+ type: t.type,
1095
+ gte: t.exclusive ? "0" : void 0
1096
+ };
1097
+ t.value === void 0 ? e.empty("x14:cfvo", n) : (e.start("x14:cfvo", n), e.start("xm:f"), e.text(t.value), e.end("xm:f"), e.end("x14:cfvo"));
1098
+ }
1099
+ var st = /* @__PURE__ */ new Set([
1100
+ N.IconSet.Arrows3,
1101
+ N.IconSet.ArrowsGray3,
1102
+ N.IconSet.Flags3,
1103
+ N.IconSet.Signs3,
1104
+ N.IconSet.Symbols3,
1105
+ N.IconSet.Symbols3_2,
1106
+ N.IconSet.TrafficLights3,
1107
+ N.IconSet.TrafficLights3_2,
1108
+ N.IconSet.Arrows4,
1109
+ N.IconSet.ArrowsGray4,
1110
+ N.IconSet.Rating4,
1111
+ N.IconSet.RedToBlack4,
1112
+ N.IconSet.TrafficLights4,
1113
+ N.IconSet.Arrows5,
1114
+ N.IconSet.ArrowsGray5,
1115
+ N.IconSet.Quarters5,
1116
+ N.IconSet.Rating5
1117
+ ]);
1118
+ function ct(e) {
1119
+ return (e.icon?.length ?? 0) > 0 || e.iconSet !== void 0 && !st.has(e.iconSet);
1120
+ }
1121
+ function lt(e, t, n, r, i, a, o, s, c) {
1122
+ let l = r.scale, u = l ? { type: l.type } : p(r.condition, i, (t) => e.warn(t));
1123
+ if (!u) return r.condition || e.warn("Skipping conditional format with neither a condition nor a scale."), !1;
1124
+ r.ext && e.warn("Conditional format extension payload is not written to xlsx; it will be lost.");
1125
+ let d = {
1126
+ type: u.type,
1127
+ dxfId: r.style && Object.keys(r.style).length > 0 ? s.add(r.style) : void 0,
1128
+ priority: o,
1129
+ stopIfTrue: K(r.stopIfTrue),
1130
+ aboveAverage: K(u.aboveAverage),
1131
+ equalAverage: K(u.equalAverage),
1132
+ stdDev: u.stdDev,
1133
+ bottom: K(u.bottom),
1134
+ percent: K(u.percent),
1135
+ rank: u.rank,
1136
+ operator: u.operator,
1137
+ text: u.text,
1138
+ timePeriod: u.timePeriod
1139
+ }, m;
1140
+ l?.type === O.ScaleType.DataBar && function(e) {
1141
+ if (e.gradient || e.borderColor || e.negativeFillColor || e.negativeBorderColor || e.axisColor || e.axisPosition || e.direction) return !0;
1142
+ let t = e.stops, n = t ? t.length : 0;
1143
+ for (let e = 0; e < n; e++) {
1144
+ let n = t[e].type;
1145
+ if (n === O.ColorStopType.AutoMin || n === O.ColorStopType.AutoMax) return !0;
1146
+ }
1147
+ return !1;
1148
+ }(l) && (m = f(T.uuidV4), c.push({
1149
+ guid: m,
1150
+ sqref: a,
1151
+ priority: o,
1152
+ scale: l
1153
+ }));
1154
+ let h = u.formulas, g = h ? h.length : 0;
1155
+ if (g === 0 && !l) return t.empty("cfRule", d), !0;
1156
+ t.start("cfRule", d);
1157
+ for (let e = 0; e < g; e++) t.start("formula"), t.text(h[e]), t.end("formula");
1158
+ if (l?.type === O.ScaleType.ColorScale) {
1159
+ let e = l.stops ?? [];
1160
+ t.start("colorScale");
1161
+ for (let n = 0; n < e.length; n++) at(t, e[n]);
1162
+ for (let r = 0; r < e.length; r++) U(t, n, e[r].color, "color");
1163
+ t.end("colorScale");
1164
+ } else if (l?.type === O.ScaleType.DataBar) {
1165
+ let e = l.stops ?? [];
1166
+ t.start("dataBar", {
1167
+ minLength: l.minLength,
1168
+ maxLength: l.maxLength,
1169
+ showValue: K(l.showValue)
1170
+ });
1171
+ for (let n = 0; n < e.length; n++) at(t, e[n]);
1172
+ l.color && U(t, n, l.color, "color"), t.end("dataBar");
1173
+ } else if (l?.type === O.ScaleType.IconSet) {
1174
+ let e = l.stops ?? [];
1175
+ t.start("iconSet", {
1176
+ iconSet: l.iconSet,
1177
+ reverse: K(l.reverse),
1178
+ showValue: K(l.showValue)
1179
+ });
1180
+ for (let n = 0; n < e.length; n++) at(t, e[n]);
1181
+ t.end("iconSet");
1182
+ }
1183
+ return m && (t.start("extLst"), t.start("ext", {
1184
+ uri: y,
1185
+ "xmlns:x14": v
1186
+ }), t.start("x14:id"), t.text(m), t.end("x14:id"), t.end("ext"), t.end("extLst")), t.end("cfRule"), !0;
1187
+ }
1188
+ function ut(e) {
1189
+ return e.split(" ")[0].split(":")[0];
1190
+ }
1191
+ function dt(e) {
1192
+ if (typeof e == "string") return e.split(",").join(" ");
1193
+ if (Array.isArray(e)) {
1194
+ let t = [];
1195
+ for (let n = 0; n < e.length; n++) {
1196
+ let r = S.rangeToString(e[n]);
1197
+ r && t.push(r);
1198
+ }
1199
+ return t.length > 0 ? t.join(" ") : null;
1200
+ }
1201
+ return S.rangeToString(e);
1202
+ }
1203
+ function K(e) {
1204
+ if (e !== void 0) return e ? "1" : "0";
1205
+ }
1206
+ function ft(e) {
1207
+ if (typeof e != "string") return !1;
1208
+ let t = !1;
1209
+ for (let n = 0; n < e.length; n++) {
1210
+ let r = e[n];
1211
+ if (r === "\"") t = !t;
1212
+ else if (r === "!" && !t) return !0;
1213
+ }
1214
+ return !1;
1215
+ }
1216
+ var pt = {
1217
+ r: void 0,
1218
+ s: void 0,
1219
+ t: void 0,
1220
+ cm: void 0,
1221
+ vm: void 0
1222
+ }, mt = {
1223
+ r: void 0,
1224
+ s: void 0,
1225
+ customFormat: void 0,
1226
+ hidden: void 0,
1227
+ ht: void 0,
1228
+ customHeight: void 0,
1229
+ "x14ac:dyDescent": "0.25",
1230
+ outlineLevel: void 0,
1231
+ collapsed: void 0
1232
+ }, ht = {
1233
+ t: void 0,
1234
+ aca: void 0,
1235
+ ref: void 0,
1236
+ ca: void 0,
1237
+ si: void 0
1238
+ }, gt = {
1239
+ t: "shared",
1240
+ aca: void 0,
1241
+ ref: void 0,
1242
+ ca: void 0,
1243
+ si: void 0
1244
+ }, _t = {
1245
+ t: "array",
1246
+ aca: void 0,
1247
+ ref: void 0,
1248
+ ca: void 0,
1249
+ si: void 0
1250
+ };
1251
+ function q(e, t, n, r, i = !1, a = !1) {
1252
+ let o = r.getTheme();
1253
+ if (i && t.start("fill"), typeof n == "string" && (n = {
1254
+ type: A.Type.Solid,
1255
+ color: n
1256
+ }), n.type === A.Type.None) i ? t.empty("patternFill", { patternType: "none" }) : t.empty("noFill");
1257
+ else if (n.type === A.Type.Solid) {
1258
+ let e = n;
1259
+ i ? t.start("patternFill", { patternType: "solid" }) : t.start("solidFill"), e.color && (i ? U(t, o, e.color, "fgColor") : V(t, o, e.color)), i ? t.end("patternFill") : t.end("solidFill");
1260
+ } else if (n.type === A.Type.Pattern) {
1261
+ let e = n, r = e.patternType || "solid";
1262
+ t.start("patternFill", { patternType: r }), e.foreground && (i ? U(t, o, a ? e.background : e.foreground, "fgColor") : V(t, o, a ? e.background : e.foreground)), e.background && (i ? U(t, o, a ? e.foreground : e.background, "bgColor") : V(t, o, a ? e.foreground : e.background)), t.end("patternFill");
1263
+ } else if (n.type === A.Type.Gradient && i) {
1264
+ let e = n, r = {}, i = e.gradientType;
1265
+ if (i !== A.GradientType.Path && i !== A.GradientType.Linear || (r.type = i), e.angle !== void 0) {
1266
+ let t = (e.angle - 90) % 360;
1267
+ t !== 0 && (r.degree = String(t));
1268
+ }
1269
+ let a = e.focus;
1270
+ a && (a.left && (r.left = String(a.left)), a.right && (r.right = String(a.right)), a.top && (r.top = String(a.top)), a.bottom && (r.bottom = String(a.bottom))), t.start("gradientFill", r);
1271
+ let s = e.stops;
1272
+ if (s && s.length > 0) for (let e of s) {
1273
+ let n, r = 0;
1274
+ if (typeof e == "string" || typeof e == "object" && !("offset" in e)) n = e, r = 0;
1275
+ else {
1276
+ let t = e;
1277
+ r = t.offset || 0, n = t.color;
1278
+ }
1279
+ t.start("stop", { position: String(r) }), n && U(t, o, n, "color"), t.end("stop");
1280
+ }
1281
+ t.end("gradientFill");
1282
+ } else if (n.type === A.Type.Gradient) {
1283
+ let e = n, r = {};
1284
+ e.isRotatedWithShape !== void 0 && (r.rotWithShape = e.isRotatedWithShape ? "1" : "0"), t.start("gradFill", r), t.start("gsLst");
1285
+ let i = e.stops;
1286
+ if (i && i.length > 0) for (let e of i) {
1287
+ let n, r = 0;
1288
+ if (typeof e == "string" || typeof e == "object" && !("offset" in e)) n = e;
1289
+ else {
1290
+ let t = e;
1291
+ r = t.offset || 0, n = t.color;
1292
+ }
1293
+ t.start("gs", { pos: String(T.roundAccurately(1e3 * r, 0)) }), n && V(t, o, n), t.end("gs");
1294
+ }
1295
+ t.end("gsLst");
1296
+ let a = e.gradientType;
1297
+ if (a && a !== A.GradientType.Linear) {
1298
+ let n = a === "radial" ? "circle" : a;
1299
+ t.start("path", { path: n });
1300
+ let r = e.focus;
1301
+ if (r) {
1302
+ let e = {};
1303
+ r.t !== void 0 && (e.t = String(T.roundAccurately(1e3 * r.t, 0))), r.l !== void 0 && (e.l = String(T.roundAccurately(1e3 * r.l, 0))), r.b !== void 0 && (e.b = String(T.roundAccurately(1e3 * r.b, 0))), r.r !== void 0 && (e.r = String(T.roundAccurately(1e3 * r.r, 0))), t.empty("fillToRect", e);
1304
+ }
1305
+ t.end("path");
1306
+ } else {
1307
+ let n = {};
1308
+ e.angle !== void 0 && (n.ang = String(T.roundAccurately(6e4 * e.angle, 0)));
1309
+ let r = e.scaled;
1310
+ r !== void 0 && (n.scaled = r ? "1" : "0"), t.empty("lin", n);
1311
+ }
1312
+ t.end("gradFill");
1313
+ } else i ? t.empty("patternFill", { patternType: "none" }) : t.empty("noFill");
1314
+ i && t.end("fill");
1315
+ }
1316
+ var vt = (e, t, n, r) => {
1317
+ if (!n) return t.start("ln"), t.empty("noFill"), void t.end("ln");
1318
+ typeof n == "string" && (n = { fill: n });
1319
+ let i = n, a = {};
1320
+ if (i.width !== void 0 && (a.w = String(J(i.width))), i.lineCap !== void 0 && (a.cap = yt(i.lineCap)), i.compound !== void 0 && (a.cmpd = i.compound), i.align !== void 0 && (a.algn = i.align), t.start("ln", a), q(0, t, i.fill ?? Ct, r), Array.isArray(i.dash)) {
1321
+ t.start("custDash");
1322
+ for (let e = 0; e < i.dash.length; e += 2) t.empty("ds", {
1323
+ d: String(T.roundAccurately(1e3 * i.dash[e], 0)),
1324
+ sp: String(T.roundAccurately(1e3 * (i.dash[e + 1] ?? 0), 0))
1325
+ });
1326
+ t.end("custDash");
1327
+ } else typeof i.dash == "string" && t.empty("prstDash", { val: i.dash });
1328
+ if (i.lineJoin === M.LineJoin.Round) t.empty("round");
1329
+ else if (i.lineJoin === M.LineJoin.Bevel) t.empty("bevel");
1330
+ else if (i.lineJoin === M.LineJoin.Miter) {
1331
+ let e = {};
1332
+ i.miterLimit !== void 0 && (e.lim = String(T.roundAccurately(1e5 * i.miterLimit, 0))), t.empty("miter", e);
1333
+ }
1334
+ t.end("ln");
1335
+ }, yt = (e) => e === "round" ? "rnd" : e === "butt" ? "flat" : e === "square" ? "sq" : e, bt = (e, t, n, r = void 0, i = !1) => {
1336
+ if (!n || !(n.fill || n.stroke || n.effects?.length || i)) return;
1337
+ let a = e.getXMLWriter();
1338
+ r && a.start(r), a.pushDefaultNamespace("a"), n.fill && q(0, a, n.fill, t), n.stroke && vt(0, a, n.stroke, t), n.effects?.length ? xt(e, a, t.getTheme(), n.effects) : i && a.empty("effectLst"), a.popDefaultNamespace(), r && a.end(r);
1339
+ }, xt = (e, t, n, r) => {
1340
+ t.start("effectLst");
1341
+ for (let e of r) St(t, n, e);
1342
+ t.end("effectLst");
1343
+ }, St = (e, t, n) => {
1344
+ switch (n.type) {
1345
+ case k.Type.OuterShadow: {
1346
+ let r = n, i = {};
1347
+ r.blur !== void 0 && (i.blurRad = String(J(r.blur))), r.distance !== void 0 && (i.dist = String(J(r.distance))), r.angle !== void 0 && (i.dir = String(X(r.angle))), r.alignment !== void 0 && (i.algn = r.alignment), r.isRotatedWithShape !== void 0 && (i.rotWithShape = r.isRotatedWithShape ? "1" : "0"), r.scaleX !== void 0 && (i.sx = String(T.roundAccurately(1e3 * r.scaleX, 0))), r.scaleY !== void 0 && (i.sy = String(T.roundAccurately(1e3 * r.scaleY, 0))), r.skewX !== void 0 && (i.kx = String(X(r.skewX))), r.skewY !== void 0 && (i.ky = String(X(r.skewY))), e.start("outerShdw", i), V(e, t, r.color), e.end("outerShdw");
1348
+ break;
1349
+ }
1350
+ case k.Type.InnerShadow: {
1351
+ let r = n, i = {};
1352
+ r.blur !== void 0 && (i.blurRad = String(J(r.blur))), r.distance !== void 0 && (i.dist = String(J(r.distance))), r.angle !== void 0 && (i.dir = String(X(r.angle))), e.start("innerShdw", i), V(e, t, r.color), e.end("innerShdw");
1353
+ break;
1354
+ }
1355
+ case k.Type.PresetShadow: {
1356
+ let r = n, i = { prst: r.preset };
1357
+ r.distance !== void 0 && (i.dist = String(J(r.distance))), r.angle !== void 0 && (i.dir = String(X(r.angle))), e.start("prstShdw", i), V(e, t, r.color), e.end("prstShdw");
1358
+ break;
1359
+ }
1360
+ case k.Type.Glow: {
1361
+ let r = n, i = {};
1362
+ r.radius !== void 0 && (i.rad = String(J(r.radius))), e.start("glow", i), V(e, t, r.color), e.end("glow");
1363
+ break;
1364
+ }
1365
+ case k.Type.SoftEdge: {
1366
+ let t = n, r = {};
1367
+ t.radius !== void 0 && (r.rad = String(J(t.radius))), e.empty("softEdge", r);
1368
+ break;
1369
+ }
1370
+ case k.Type.Reflection: {
1371
+ let t = n, r = {};
1372
+ t.blur !== void 0 && (r.blurRad = String(J(t.blur))), t.distance !== void 0 && (r.dist = String(J(t.distance))), t.angle !== void 0 && (r.dir = String(X(t.angle))), t.fadeAngle !== void 0 && (r.fadeDir = String(X(t.fadeAngle))), t.startAlpha !== void 0 && (r.stA = String(T.roundAccurately(1e3 * t.startAlpha, 0))), t.startPosition !== void 0 && (r.stPos = String(T.roundAccurately(1e3 * t.startPosition, 0))), t.endAlpha !== void 0 && (r.endA = String(T.roundAccurately(1e3 * t.endAlpha, 0))), t.endPosition !== void 0 && (r.endPos = String(T.roundAccurately(1e3 * t.endPosition, 0))), t.scaleX !== void 0 && (r.sx = String(T.roundAccurately(1e3 * t.scaleX, 0))), t.scaleY !== void 0 && (r.sy = String(T.roundAccurately(1e3 * t.scaleY, 0))), t.skewX !== void 0 && (r.kx = String(X(t.skewX))), t.skewY !== void 0 && (r.ky = String(X(t.skewY))), t.alignment !== void 0 && (r.algn = t.alignment), t.isRotatedWithShape !== void 0 && (r.rotWithShape = t.isRotatedWithShape ? "1" : "0"), e.empty("reflection", r);
1373
+ break;
1374
+ }
1375
+ }
1376
+ }, Ct = { type: "none" }, wt = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", Tt = {
1377
+ mime: "image/png",
1378
+ ext: "png"
1379
+ }, J = (e = 0) => T.roundAccurately(12700 * e, 0), Y = (e = 0) => T.roundAccurately(9525 * e, 0), X = (e) => 6e4 * e, Et = (e = 0) => T.roundAccurately(100 * e, 2);
1380
+ function Dt(e, t, n, r) {
1381
+ n && (t.start(r), t.empty("latin", { typeface: n }), t.empty("ea", { typeface: "" }), t.empty("cs", { typeface: "" }), t.end(r));
1382
+ }
1383
+ var Ot = [
1384
+ "font",
1385
+ "fill",
1386
+ "border",
1387
+ "numberFormat",
1388
+ "alignment"
1389
+ ];
1390
+ function kt(e, t, n) {
1391
+ if (t) {
1392
+ if (t.named) {
1393
+ let r = t.named, i = r.toLowerCase(), a = n.namedStyleMap;
1394
+ if (!a.has(i)) {
1395
+ a.set(i, "" + a.size);
1396
+ let t = e.getNamed(r).toJSON();
1397
+ kt(e, t.style ?? T.EmptyObject, n), n.namedStyles.push(t);
1398
+ }
1399
+ }
1400
+ t.font && function(e, t, n) {
1401
+ if (!t) return;
1402
+ let r = C.JSONStableStringify(t), i = n.fontMap;
1403
+ if (!i.has(r)) {
1404
+ let e = i.size;
1405
+ i.set(r, "" + e), n.fonts.push(t);
1406
+ }
1407
+ }(0, t.font, n), t.fill && function(e, t, n) {
1408
+ if (!t) return;
1409
+ let r = C.JSONStableStringify(t), i = n.fillMap;
1410
+ if (!i.has(r) && typeof t == "object" && t.type) {
1411
+ let e = i.size;
1412
+ i.set(r, "" + e), n.fills.push(t);
1413
+ }
1414
+ }(0, t.fill, n), t.border && function(e, t, n) {
1415
+ if (!t) return;
1416
+ let r = C.JSONStableStringify(t), i = n.borderMap;
1417
+ if (!i.has(r)) {
1418
+ let e = i.size;
1419
+ i.set(r, "" + e), n.borders.push(t);
1420
+ }
1421
+ }(0, t.border, n), t.numberFormat !== void 0 && function(e, t, n) {
1422
+ if (!t) return;
1423
+ let r = F.toBuiltInID(t), i = n.numFmtMap;
1424
+ if (!i.has(r)) {
1425
+ let e = 0;
1426
+ typeof r == "number" ? e = r : (e = n.numFmtsCustom.length + Ft, n.numFmtsCustom.push(r)), i.set(t, "" + e);
1427
+ }
1428
+ }(0, t.numberFormat, n);
1429
+ }
1430
+ }
1431
+ function At(e, t, n) {
1432
+ if (!t) return;
1433
+ let r = t.name.toLowerCase();
1434
+ n.namedStyleMap.has(r) || (n.namedStyleMap.set(r, "" + n.namedStyleMap.size), n.namedStyles.push(t), kt(e, t.style, n));
1435
+ }
1436
+ function jt(e, t, n, r, i = !1) {
1437
+ let a = r.getDefaultFontSize(), o = r.getTheme().getFontScheme().getMinorFont() ?? "Calibri", s = r.getNormal().getFont().getColor();
1438
+ t.start("font"), n.weight && n.weight >= 700 && t.empty("b"), n.style && n.style !== "normal" && t.empty("i"), n.strike && t.empty("strike"), n.underline && t.empty("u", { val: n.underline }), n.outline && t.empty("outline"), n.shadow && t.empty("shadow"), n.extend && t.empty("extend");
1439
+ let c = n.verticalAlign;
1440
+ c && (c === "super" && (c = "superscript"), c === "sub" && (c = "subscript"), t.empty("vertAlign", { val: c })), i ? n.size !== void 0 && t.empty("sz", { val: String(n.size) }) : t.empty("sz", { val: String(n.size ?? a) }), U(t, r.getTheme(), n.color ?? s, "color", !i);
1441
+ let l = !i || n.family && n.family !== o;
1442
+ if (l && (t.empty("name", { val: n.family ?? o }), n.fallbacks && n.fallbacks.length > 0)) {
1443
+ let e = n.fallbacks;
1444
+ e.includes("serif") ? t.empty("family", { val: 1 }) : e.includes("sans-serif") ? t.empty("family", { val: 2 }) : e.includes("monospace") ? t.empty("family", { val: 3 }) : e.includes("cursive") ? t.empty("family", { val: 4 }) : e.includes("fantasy") && t.empty("family", { val: 5 });
1445
+ }
1446
+ n.charset !== void 0 && n.charset !== null && t.empty("charset", { val: String(n.charset) });
1447
+ let u = n.scheme ?? (n.family === void 0 ? "minor" : void 0);
1448
+ l && u !== void 0 && u !== "none" && t.empty("scheme", { val: u }), t.end("font");
1449
+ }
1450
+ function Z(e, t, n, r, i, a = !1) {
1451
+ if (!i || i.style === "none" || !i.style) return void (a && !i || t.empty(r));
1452
+ t.start(r, { style: i.style });
1453
+ let o = i.color;
1454
+ o && U(t, n, o, "color", !a, a), t.end(r);
1455
+ }
1456
+ function Mt(e, t, n, r, i = !1) {
1457
+ let a = {};
1458
+ i ? (a.diagonalUp = "0", a.diagonalDown = "0") : (n.diagonalUp && (a.diagonalUp = "1"), n.diagonalDown && (a.diagonalDown = "1")), t.start("border", a), Z(0, t, r, "left", n.left, i), Z(0, t, r, "right", n.right, i), Z(0, t, r, "top", n.top, i), Z(0, t, r, "bottom", n.bottom, i), i ? (Z(0, t, r, "vertical", n.vertical, i), Z(0, t, r, "horizontal", n.horizontal, i)) : Z(0, t, r, "diagonal", n.diagonalUp ?? n.diagonalDown, i), t.end("border");
1459
+ }
1460
+ function Nt(e, t, n, r = !1) {
1461
+ let i = {};
1462
+ n.horizontal && n.horizontal !== P.HorizontalAlignment.General && (i.horizontal = n.horizontal), n.vertical && n.vertical !== P.VerticalAlignment.Bottom && (i.vertical = n.vertical);
1463
+ let a = n.rotation;
1464
+ n.stacked && (i.textRotation = "255", a = 0), a && (a >= 270 && a < 360 ? a = 360 - a : a > 0 && a <= 90 && (a += 90), i.textRotation = String(a));
1465
+ let o = n.overflow;
1466
+ switch (o === P.Overflow.Wrap && (i.wrapText = "1"), n.indent && (i.indent = "" + n.indent), n.relativeIndent && (i.relativeIndent = "" + n.relativeIndent), n.justifyLastLine && (i.justifyLastLine = "1"), o === P.Overflow.Shrink && (i.shrinkToFit = "1"), n.readingDirection) {
1467
+ case P.ReadingDirection.Auto: break;
1468
+ case P.ReadingDirection.LeftToRight:
1469
+ i.readingOrder = "1";
1470
+ break;
1471
+ case P.ReadingDirection.RightToLeft: i.readingOrder = "2";
1472
+ }
1473
+ return Object.keys(i).length > 0 ? i : null;
1474
+ }
1475
+ function Pt(e, t, n, r, i, a) {
1476
+ let o = {}, s = null, c = r.named;
1477
+ c && (s = n.getNamed(c).toJSON().style);
1478
+ let l = r.font ?? s?.font, u = l ? i.fontMap.get(C.JSONStableStringify(l)) ?? 0 : 0, d = r.fill ?? s?.fill, f = d ? i.fillMap.get(C.JSONStableStringify(d)) ?? 0 : 0, p = r.border ?? s?.border, m = p ? i.borderMap.get(C.JSONStableStringify(p)) ?? 0 : 0, h = r.numberFormat ?? s?.numberFormat;
1479
+ if (o.numFmtId = (h === void 0 ? void 0 : i.numFmtMap.get(h)) ?? "0", o.fontId = String(u), o.fillId = String(f), o.borderId = String(m), a) {
1480
+ let e = r.named ?? N.BuiltInName.Normal;
1481
+ o.xfId = i.namedStyleMap.get(e.toLowerCase());
1482
+ }
1483
+ let g = null, _ = r.alignment ?? s?.alignment;
1484
+ _ && (g = Nt(0, 0, _)), r.font && (o.applyFont = "1"), r.fill && (o.applyFill = "1"), r.numberFormat && (o.applyNumberFormat = "1"), r.border && (o.applyBorder = "1"), g && (o.applyAlignment = "1"), r.quotePrefix && (o.quotePrefix = "1"), g ? (t.start("xf", o), g && t.empty("alignment", g), t.end("xf")) : t.empty("xf", o);
1485
+ }
1486
+ var Ft = 164, It = Object.freeze([
1487
+ "wholeTable",
1488
+ "headerRow",
1489
+ "totalRow",
1490
+ "firstColumn",
1491
+ "lastColumn",
1492
+ "firstRowStripe",
1493
+ "secondRowStripe",
1494
+ "firstColumnStripe",
1495
+ "secondColumnStripe",
1496
+ "firstHeaderCell",
1497
+ "lastHeaderCell",
1498
+ "firstTotalCell",
1499
+ "lastTotalCell"
1500
+ ]), Lt = (e) => e.toISOString().split(".")[0] + "Z", Rt = (e, t, n) => {
1501
+ switch (t) {
1502
+ case "creator":
1503
+ e.start("dc:creator"), e.text(n), e.end("dc:creator");
1504
+ break;
1505
+ case "lastModifiedBy":
1506
+ e.start("cp:lastModifiedBy"), e.text(n), e.end("cp:lastModifiedBy");
1507
+ break;
1508
+ case "created":
1509
+ e.start("dcterms:created", { "xsi:type": "dcterms:W3CDTF" }), e.text(n), e.end("dcterms:created");
1510
+ break;
1511
+ case "modified": e.start("dcterms:modified", { "xsi:type": "dcterms:W3CDTF" }), e.text(n), e.end("dcterms:modified");
1512
+ }
1513
+ }, Q = (e, t, n, r) => {
1514
+ t.start(n), t.text(r), t.end(n);
1515
+ }, zt = (e, t, n) => {
1516
+ let r = n.getSheets().getItems({ visibility: j.Visibility.Hidden }).map((e) => e.getName()), i = n.getNames().getItems({ type: "formula" }).filter((e) => !!e.getRanges?.()).map((e) => e.getName());
1517
+ t.start("HeadingPairs"), t.start("vt:vector", {
1518
+ size: i.length > 0 ? "4" : "2",
1519
+ baseType: "variant"
1520
+ }), t.start("vt:variant"), t.start("vt:lpstr"), t.text("Worksheets"), t.end("vt:lpstr"), t.end("vt:variant"), t.start("vt:variant"), t.start("vt:i4"), t.text("" + r.length), t.end("vt:i4"), t.end("vt:variant"), i.length > 0 && (t.start("vt:variant"), t.start("vt:lpstr"), t.text("Named Ranges"), t.end("vt:lpstr"), t.end("vt:variant"), t.start("vt:variant"), t.start("vt:i4"), t.text("" + i.length), t.end("vt:i4"), t.end("vt:variant")), t.end("vt:vector"), t.end("HeadingPairs"), t.start("TitlesOfParts"), t.start("vt:vector", {
1521
+ size: "" + (r.length + i.length),
1522
+ baseType: "lpstr"
1523
+ });
1524
+ for (let e of r) t.start("vt:lpstr"), t.text(e), t.end("vt:lpstr");
1525
+ for (let e of i) t.start("vt:lpstr"), t.text(e), t.end("vt:lpstr");
1526
+ t.end("vt:vector"), t.end("TitlesOfParts");
1527
+ }, Bt = {
1528
+ minSupportedVersion: "120000",
1529
+ copy: "1",
1530
+ pasteAll: "1",
1531
+ pasteValues: "1",
1532
+ merge: "1",
1533
+ splitFirst: "1",
1534
+ rowColShift: "1",
1535
+ clearFormats: "1",
1536
+ clearComments: "1",
1537
+ assign: "1",
1538
+ coerce: "1"
1539
+ }, Vt = (e, t, n = T.EmptyArray) => {
1540
+ if (!t) return { ...n };
1541
+ let { text: r, runs: i, color: a, size: o, kern: s, weight: c, style: l, b: u, i: d, spc: f, baseline: p, ...m } = t, h = {
1542
+ ...n,
1543
+ ...m
1544
+ };
1545
+ return o !== void 0 && (h.sz = "" + Et(o)), u !== void 0 && (h.b = u ? "1" : "0"), c !== void 0 && (h.b = c > 500 ? "1" : "0"), d !== void 0 && (h.i = d ? "1" : "0"), l !== void 0 && (h.i = l === "italic" ? "1" : "0"), s !== void 0 && (h.kern = "" + Et(s)), f !== void 0 && (h.spc = "" + Et(f)), p !== void 0 && (h.baseline = "" + Et(p)), h;
1546
+ }, Ht = (e, t, n) => {
1547
+ if (!n) return;
1548
+ let r = e.getXMLWriter();
1549
+ r.start("txBody"), r.pushDefaultNamespace("a"), Wt(e, t, {
1550
+ vertOverflow: "clip",
1551
+ horzOverflow: "clip",
1552
+ rtlCol: "0",
1553
+ anchor: "ctr"
1554
+ }), r.empty("lstStyle"), ((e, t, n) => {
1555
+ if (!n) return;
1556
+ let r = e.getXMLWriter();
1557
+ r.pushDefaultNamespace("a"), typeof n == "string" && (n = { runs: [{ text: n }] }), r.start("p"), r.empty("pPr", { algn: "ctr" });
1558
+ let i = Vt(0, n, {
1559
+ ...Gt,
1560
+ size: t.getDefaultFontSize()
1561
+ }), a = n?.runs, o = a ? a.length : 0;
1562
+ if (o > 0) for (let e = 0; e < o; e++) {
1563
+ let n = a[e];
1564
+ r.start("r", {});
1565
+ let i = Vt(0, n, Gt), o = n.color;
1566
+ o ? (r.start("rPr", i), q(0, r, o, t), r.end("rPr")) : r.empty("rPr", i), r.start("t"), r.text(n?.text ?? ""), r.end("t"), r.end("r");
1567
+ }
1568
+ else r.empty("endParaRPr", i);
1569
+ r.end("p"), r.popDefaultNamespace();
1570
+ })(e, t, n), r.popDefaultNamespace(), r.end("txBody");
1571
+ }, Ut = (e, t, n) => {
1572
+ if (!n) return;
1573
+ let r = e.getXMLWriter(), i = Vt(0, n);
1574
+ r.empty("defRPr", i);
1575
+ }, Wt = (e, t, n) => {
1576
+ if (!n) return;
1577
+ let r = e.getXMLWriter(), { spAutoFit: i, ...a } = n;
1578
+ i ? (r.start("bodyPr", a), r.empty("spAutoFit"), r.end("bodyPr")) : r.empty("bodyPr", a);
1579
+ }, Gt = Object.freeze({ lang: "en-US" }), Kt = (e, t) => {
1580
+ if (t.length !== 0) {
1581
+ e.start("a:extLst");
1582
+ for (let n of t) {
1583
+ let t = {}, r = n[0];
1584
+ r && (t.uri = r), e.start("a:ext", t), e.empty(n[1], n[2]), e.end("a:ext");
1585
+ }
1586
+ e.end("a:extLst");
1587
+ }
1588
+ }, qt = async (e, t, n, r, i) => {
1589
+ let a = e.getSharedStates(), o = r.getContent().getResource(), s = await o.getExternalURI(), c;
1590
+ if (s) c = e.addExternal(wt, s);
1591
+ else if (c = n.get(o), !c) {
1592
+ let t = a.get("imagesWritten");
1593
+ t || (t = /* @__PURE__ */ new Map(), a.set("imagesWritten", t));
1594
+ let r = t.get(o);
1595
+ if (!r) {
1596
+ let e = await o.toBuffer();
1597
+ r = {
1598
+ bytes: new Uint8Array(e),
1599
+ type: await o.getType() ?? Tt,
1600
+ index: t.size + 1
1601
+ }, t.set(o, r);
1602
+ }
1603
+ c = e.addBinary(r.bytes, r.type.mime, wt, `../media/image${r.index}.${r.type.ext}`, !0), n.set(o, c);
1604
+ }
1605
+ let l = { "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships" };
1606
+ s ? l["r:link"] = c.relId : l["r:embed"] = c.relId;
1607
+ let u = [];
1608
+ s || u.push([
1609
+ "{28A0092B-C50C-407E-A947-70E740481C1C}",
1610
+ "a14:useLocalDpi",
1611
+ {
1612
+ "xmlns:a14": "http://schemas.microsoft.com/office/drawing/2010/main",
1613
+ val: "0"
1614
+ }
1615
+ ]);
1616
+ let d = e.getXMLWriter();
1617
+ d.start("pic"), d.start("nvPicPr"), nn(e, d, r, i, t), an(e, d, r, i), d.end("nvPicPr"), d.start("blipFill"), d.start("a:blip", l), Kt(d, u), d.end("a:blip"), d.start("a:stretch"), d.empty("a:fillRect"), d.end("a:stretch"), d.end("blipFill"), en(e, t, n, r, i), d.end("pic");
1618
+ }, Jt = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart", Yt = async (e, t, n, r, i, a) => {
1619
+ let o = i.content?.json, s = o?.xml, c = o?.chartRelId, l = o?.chartTargetPath;
1620
+ if (!s || !c || !l) return $(e, t, n, r, i);
1621
+ let u = e.getSharedStates(), d, f = u.get("claimedChartTargets");
1622
+ if (f || (f = /* @__PURE__ */ new Set(), u.set("claimedChartTargets", f)), f.has(l)) {
1623
+ let a = e.forkPreservedPart(l, "application/vnd.openxmlformats-officedocument.drawingml.chart+xml", Jt, "../charts/chart{n}.xml");
1624
+ if (!a?.relId) return $(e, t, n, r, i);
1625
+ d = a.relId;
1626
+ } else f.add(l), d = e.addPreservedRelationship(Jt, l, c);
1627
+ let p = d === c ? s : s.replace(`r:id="${c}"`, `r:id="${d}"`);
1628
+ a !== void 0 && typeof o?.sourceId == "number" && (p = p.replace(`cNvPr id="${o.sourceId}"`, `cNvPr id="${a}"`)), e.getXMLWriter().raw(p);
1629
+ }, Xt = async (e, t, n, r, i) => $(e, t, n, r, i), Zt = async (e, t, n, r, i) => $(e, t, n, r, i), Qt = async (e, t, n, r, i) => $(e, t, n, r, i), $t = async (e, t, n, r, i, a) => {
1630
+ let o = i.content?.json, s = o?.xml;
1631
+ if (!s) return $(e, t, n, r, i);
1632
+ let c = a !== void 0 && typeof o?.sourceId == "number" ? s.replace(`cNvPr id="${o.sourceId}"`, `cNvPr id="${a}"`) : s;
1633
+ e.getXMLWriter().raw(c);
1634
+ }, $ = async (e, t, n, r, i) => {
1635
+ (async (e, t, n, r, i) => {
1636
+ let a = e.getXMLWriter(), o = {}, s = i.content?.json, c = s?.type ?? "sp", l = t.getStyles();
1637
+ c === "cxnSp" ? (o.macro = "", a.start("cxnSp", o), a.start("nvCxnSpPr"), nn(e, a, r, i, t), rn(e, a, r, i, t), a.start("cNvCxnSpPr"), a.empty("a:stCnx", {
1638
+ id: "0",
1639
+ idx: "0"
1640
+ }), a.end("cNvCxnSpPr"), a.end("nvCxnSpPr"), en(e, t, n, r, i), tn(e, t, n, r, i), Ht(e, l, s?.text), a.end("cxnSp")) : c === "grpSp" || (o.macro = "", o.textlink = "", a.start("sp", o), a.start("nvSpPr"), nn(e, a, r, i, t), rn(e, a, r, i, t), a.end("nvSpPr"), en(e, t, n, r, i), tn(e, t, n, r, i), Ht(e, l, s?.text), a.end("sp"));
1641
+ })(e, t, n, r, {
1642
+ ...i,
1643
+ content: {
1644
+ type: "shape",
1645
+ json: {
1646
+ fill: "bg1",
1647
+ stroke: {
1648
+ width: 2,
1649
+ fill: "red"
1650
+ },
1651
+ text: { runs: [{
1652
+ text: "Unsupported Type: " + (i.content?.type ?? "unknown"),
1653
+ color: "tx1"
1654
+ }] }
1655
+ }
1656
+ }
1657
+ });
1658
+ }, en = (e, t, n, r, i) => {
1659
+ let a = e.getXMLWriter(), o = i.content?.json, s = o?.geometry ?? "rect", c = t.getStyles();
1660
+ a.start("spPr"), a.pushDefaultNamespace("a"), on(a, r, i), a.start("prstGeom", { prst: s }), a.empty("avLst"), a.end("prstGeom"), bt(e, c, o), a.popDefaultNamespace(), a.end("spPr");
1661
+ }, tn = (e, t, n, r, i) => {
1662
+ let a = e.getXMLWriter();
1663
+ a.start("style"), a.pushDefaultNamespace("a"), a.start("lnRef", { idx: "1" }), a.start("schemeClr", { val: "accent1" }), a.empty("shade", { val: "15000" }), a.end("schemeClr"), a.end("lnRef"), a.start("fillRef", { idx: "1" }), a.empty("schemeClr", { val: "accent1" }), a.end("fillRef"), a.start("effectRef", { idx: "0" }), a.empty("schemeClr", { val: "accent1" }), a.end("effectRef"), a.start("fontRef", { idx: "minor" }), a.empty("schemeClr", { val: "lt1" }), a.end("fontRef"), a.popDefaultNamespace(), a.end("style");
1664
+ }, nn = (e, t, n, r, i) => {
1665
+ let a = e.getSharedStates(), o = a.get("uniqueIdCounter");
1666
+ o || (o = /* @__PURE__ */ new Map(), a.set("uniqueIdCounter", o));
1667
+ let s = o.get(i) ?? 1;
1668
+ s++, o.set(i, s);
1669
+ let c = {
1670
+ id: "" + s,
1671
+ name: r.name
1672
+ };
1673
+ r.description && (c.descr = r.description), r.hidden && (c.hidden = "1");
1674
+ let l = [];
1675
+ l.push([
1676
+ "{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}",
1677
+ "a16:creationId",
1678
+ {
1679
+ "xmlns:a16": "http://schemas.microsoft.com/office/drawing/2014/main",
1680
+ id: `{${T.uuidV4().toUpperCase()}}`
1681
+ }
1682
+ ]), t.start("cNvPr", c), Kt(t, l), t.end("cNvPr");
1683
+ }, rn = (e, t, n, r, i) => {
1684
+ t.empty("cNvSpPr");
1685
+ }, an = (e, t, n, r) => {
1686
+ let i = {};
1687
+ if (r.lockAspect && (i.noChangeAspect = "1"), r.locks) for (let e of Object.keys(r.locks)) !0 === r.locks[e] && (i[e] = "1");
1688
+ t.start("cNvPicPr", {}), t.empty("a:picLocks", i), t.end("cNvPicPr");
1689
+ }, on = (e, t, n) => {
1690
+ let r = t.getBounds(), i = {}, a = n.rotation;
1691
+ a !== void 0 && a !== 0 && (i.rot = "" + X(a)), e.start("xfrm", i), e.start("off", {
1692
+ x: Y(r.x),
1693
+ y: Y(r.y)
1694
+ }), e.end("off"), e.start("ext", {
1695
+ cx: Y(r.width),
1696
+ cy: Y(r.height)
1697
+ }), e.end("ext"), e.end("xfrm");
1698
+ }, sn = (e, t, n) => {
1699
+ e.start(t), e.start("col"), e.text(n.c ?? 0), e.end("col"), e.start("colOff"), e.text(Y(n.x)), e.end("colOff"), e.start("row"), e.text(n.r ?? 0), e.end("row"), e.start("rowOff"), e.text(Y(n.y)), e.end("rowOff"), e.end(t);
1700
+ }, cn = 0, ln = (e, t, n, r) => {
1701
+ let i = r.columns, a = i ? i.length : 0;
1702
+ if (a !== 0) {
1703
+ t.start("tableColumns", { count: a });
1704
+ for (let e = 0; e < a; e++) {
1705
+ let n = i[e];
1706
+ typeof n == "string" && (n = { name: n });
1707
+ let r = {};
1708
+ r.id = e + 1, r.name = n.name ?? `Column${e + 1}`;
1709
+ let a = null, o = n.totalsRowFormula;
1710
+ o && (typeof o == "number" && (o = fn.get(o)), o && !dn.has(o.toLowerCase()) && (a = o, o = "custom"), o && (r.totalsRowFunction = o)), n.totalsRowLabel && (r.totalsRowLabel = n.totalsRowLabel), a ? (t.start("tableColumn", r), t.start("totalsRowFormula"), t.text(a), t.end("totalsRowFormula"), t.end("tableColumn")) : t.empty("tableColumn", r);
1711
+ }
1712
+ t.end("tableColumns");
1713
+ }
1714
+ }, un = (e, t, n, r) => {
1715
+ let i = {
1716
+ name: n.getStyle().getName(),
1717
+ showFirstColumn: n.isShowHighlightFirstColumn() ? "1" : "0",
1718
+ showLastColumn: n.isShowHighlightLastColumn() ? "1" : "0",
1719
+ showRowStripes: n.isShowBandedRows() ? "1" : "0",
1720
+ showColumnStripes: n.isShowBandedColumns() ? "1" : "0"
1721
+ };
1722
+ t.empty("tableStyleInfo", i);
1723
+ }, dn = /* @__PURE__ */ new Map([
1724
+ ["average", 101],
1725
+ ["countnums", 102],
1726
+ ["count", 103],
1727
+ ["max", 104],
1728
+ ["min", 105],
1729
+ ["product", 106],
1730
+ ["stddev", 107],
1731
+ ["stddevp", 108],
1732
+ ["sum", 109],
1733
+ ["var", 110]
1734
+ ]), fn = /* @__PURE__ */ new Map();
1735
+ dn.forEach((e, t) => {
1736
+ fn.set(e, t);
1737
+ });
1738
+ var pn = (e, t, n, r) => {
1739
+ t.start("mc:AlternateContent", { "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006" }), t.start("mc:Choice", {
1740
+ Requires: "c14",
1741
+ "xmlns:c14": "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"
1742
+ }), t.empty("c14:style", { val: "102" }), t.end("mc:Choice"), t.start("mc:Fallback"), t.empty("c:style", { val: "2" }), t.end("mc:Fallback"), t.end("mc:AlternateContent");
1743
+ }, mn = (e, t, n, r, i) => {
1744
+ t.start("chart"), ((e, t, n, r, i) => {
1745
+ t.start("title"), t.empty("overlay", { val: "0" }), bt(e, n, i, "spPr", !0), t.end("title"), t.empty("autoTitleDeleted", { val: "0" });
1746
+ })(e, t, n, 0, i), ((e, t, n, r, i) => {
1747
+ t.start("plotArea"), t.empty("layout"), bt(e, n, i, "spPr", !0), t.end("plotArea");
1748
+ })(e, t, n, 0, i), t.empty("plotVisOnly", { val: "1" }), t.empty("dispBlanksAs", { val: "gap" }), t.empty("showDLblsOverMax", { val: "0" }), t.end("chart");
1749
+ }, hn = (e, t, n, r) => {
1750
+ t.start("printSettings"), t.empty("headerFooter"), t.empty("pageMargins", {
1751
+ b: "0.75",
1752
+ l: "0.7",
1753
+ r: "0.7",
1754
+ t: "0.75",
1755
+ header: "0.3",
1756
+ footer: "0.3"
1757
+ }), t.empty("pageSetup"), t.end("printSettings");
1758
+ }, gn = (e, t, n, r, i, a = "0") => {
1759
+ let o = i?.color, s = { idx: i?.idx ?? a };
1760
+ o === void 0 ? t.empty(r, s) : (t.start(r, s), o === "auto" ? t.empty("styleClr", { val: "auto" }) : (t.pushDefaultNamespace("a"), V(t, n.getTheme(), o), t.popDefaultNamespace()), t.end(r));
1761
+ }, _n = (e, t, n, r) => {
1762
+ let i = n.length;
1763
+ for (let a = 0; a < i; a++) {
1764
+ let i = n[a];
1765
+ i.empty ? t.empty(i.type, i.mods) : (t.start(i.type, i.mods), gn(0, t, r, "lnRef", i.lineRef, "0"), gn(0, t, r, "fillRef", i.fillRef, "0"), gn(0, t, r, "effectRef", i.effectRef, "0"), gn(0, t, r, "fontRef", i.fontRef, "minor"), bt(e, r, i, "spPr"), Ut(e, 0, i.defRPr), Wt(e, r, i.bodyPr), t.end(i.type));
1766
+ }
1767
+ }, vn = Object.freeze([
1768
+ {
1769
+ type: "axisTitle",
1770
+ fontRef: { color: "tx1 lumMod 65 lumOff 35" },
1771
+ defRPr: {
1772
+ size: 10,
1773
+ kern: 12
1774
+ }
1775
+ },
1776
+ {
1777
+ type: "categoryAxis",
1778
+ fontRef: { color: "tx1 lumMod 65 lumOff 35" },
1779
+ stroke: {
1780
+ width: .75,
1781
+ cap: "flat",
1782
+ cmpd: "sng",
1783
+ algn: "ctr",
1784
+ round: !0,
1785
+ fill: "tx1 lumMod 15 lumOff 85"
1786
+ },
1787
+ defRPr: {
1788
+ size: 9,
1789
+ kern: 12
1790
+ }
1791
+ },
1792
+ {
1793
+ type: "chartArea",
1794
+ mods: { mods: "allowNoFillOverride allowNoLineOverride" },
1795
+ fontRef: { color: "tx1" },
1796
+ fill: {
1797
+ type: "solid",
1798
+ color: "bg1"
1799
+ },
1800
+ stroke: {
1801
+ width: .75,
1802
+ cap: "flat",
1803
+ cmpd: "sng",
1804
+ algn: "ctr",
1805
+ round: !0,
1806
+ fill: "tx1 lumMod 15 lumOff 85"
1807
+ },
1808
+ defRPr: {
1809
+ size: 10,
1810
+ kern: 12
1811
+ }
1812
+ },
1813
+ {
1814
+ type: "dataLabel",
1815
+ fontRef: { color: "tx1 lumMod 75 lumOff 25" },
1816
+ defRPr: {
1817
+ size: 9,
1818
+ kern: 12
1819
+ }
1820
+ },
1821
+ {
1822
+ type: "dataLabelCallout",
1823
+ fontRef: { color: "dk1 lumMod 65 lumOff 35" },
1824
+ fill: {
1825
+ type: "solid",
1826
+ color: "lt1"
1827
+ },
1828
+ stroke: { fill: "dk1 lumMod 25 lumOff 75" },
1829
+ defRPr: {
1830
+ size: 9,
1831
+ kern: 12
1832
+ },
1833
+ bodyPr: {
1834
+ rot: "0",
1835
+ spcFirstLastPara: "1",
1836
+ vertOverflow: "clip",
1837
+ horzOverflow: "clip",
1838
+ vert: "horz",
1839
+ wrap: "square",
1840
+ lIns: "36576",
1841
+ tIns: "18288",
1842
+ rIns: "36576",
1843
+ bIns: "18288",
1844
+ anchor: "ctr",
1845
+ anchorCtr: "1",
1846
+ spAutoFit: "true"
1847
+ }
1848
+ },
1849
+ {
1850
+ type: "dataPoint",
1851
+ fillRef: {
1852
+ idx: "1",
1853
+ color: "auto"
1854
+ },
1855
+ fontRef: { color: "tx1" }
1856
+ },
1857
+ {
1858
+ type: "dataPoint3D",
1859
+ fillRef: {
1860
+ idx: "1",
1861
+ color: "auto"
1862
+ },
1863
+ fontRef: { color: "tx1" }
1864
+ },
1865
+ {
1866
+ type: "dataPointLine",
1867
+ lineRef: { color: "auto" },
1868
+ fillRef: { idx: "1" },
1869
+ fontRef: { color: "tx1" },
1870
+ stroke: {
1871
+ width: 2.25,
1872
+ cap: "rnd",
1873
+ fill: "phClr",
1874
+ round: !0
1875
+ }
1876
+ },
1877
+ {
1878
+ type: "dataPointMarker",
1879
+ lineRef: { color: "auto" },
1880
+ fillRef: {
1881
+ idx: "1",
1882
+ color: "auto"
1883
+ },
1884
+ fontRef: { color: "tx1" },
1885
+ stroke: {
1886
+ width: .75,
1887
+ fill: "phClr"
1888
+ }
1889
+ },
1890
+ {
1891
+ type: "dataPointMarkerLayout",
1892
+ mods: {
1893
+ symbol: "circle",
1894
+ size: "5"
1895
+ },
1896
+ empty: !0
1897
+ },
1898
+ {
1899
+ type: "dataPointWireframe",
1900
+ lineRef: { color: "auto" },
1901
+ fillRef: { idx: "1" },
1902
+ fontRef: { color: "tx1" },
1903
+ stroke: {
1904
+ width: .75,
1905
+ cap: "rnd",
1906
+ fill: "phClr",
1907
+ round: !0
1908
+ }
1909
+ },
1910
+ {
1911
+ type: "dataTable",
1912
+ fontRef: { color: "tx1 lumMod 65 lumOff 35" },
1913
+ fill: { type: "none" },
1914
+ stroke: {
1915
+ width: .75,
1916
+ cap: "flat",
1917
+ cmpd: "sng",
1918
+ algn: "ctr",
1919
+ round: !0,
1920
+ fill: "tx1 lumMod 15 lumOff 85"
1921
+ },
1922
+ defRPr: {
1923
+ size: 9,
1924
+ kern: 12
1925
+ }
1926
+ },
1927
+ {
1928
+ type: "downBar",
1929
+ fontRef: { color: "tx1" },
1930
+ fill: {
1931
+ type: "solid",
1932
+ color: "dk1 lumMod 75 lumOff 25"
1933
+ },
1934
+ stroke: {
1935
+ width: .75,
1936
+ cap: "flat",
1937
+ cmpd: "sng",
1938
+ algn: "ctr",
1939
+ round: !0,
1940
+ fill: "tx1 lumMod 65 lumOff 35"
1941
+ }
1942
+ },
1943
+ {
1944
+ type: "dropLine",
1945
+ fontRef: { color: "tx1" },
1946
+ stroke: {
1947
+ width: .75,
1948
+ cap: "flat",
1949
+ cmpd: "sng",
1950
+ algn: "ctr",
1951
+ round: !0,
1952
+ fill: "tx1 lumMod 35 lumOff 65"
1953
+ }
1954
+ },
1955
+ {
1956
+ type: "errorBar",
1957
+ fontRef: { color: "tx1" },
1958
+ stroke: {
1959
+ width: .75,
1960
+ cap: "flat",
1961
+ cmpd: "sng",
1962
+ algn: "ctr",
1963
+ round: !0,
1964
+ fill: "tx1 lumMod 65 lumOff 35"
1965
+ }
1966
+ },
1967
+ {
1968
+ type: "floor",
1969
+ fontRef: { color: "tx1" },
1970
+ fill: { type: "none" },
1971
+ stroke: {}
1972
+ },
1973
+ {
1974
+ type: "gridlineMajor",
1975
+ fontRef: { color: "tx1" },
1976
+ stroke: {
1977
+ width: .75,
1978
+ cap: "flat",
1979
+ cmpd: "sng",
1980
+ algn: "ctr",
1981
+ round: !0,
1982
+ fill: "tx1 lumMod 15 lumOff 85"
1983
+ }
1984
+ },
1985
+ {
1986
+ type: "gridlineMinor",
1987
+ fontRef: { color: "tx1" },
1988
+ stroke: {
1989
+ width: .75,
1990
+ cap: "flat",
1991
+ cmpd: "sng",
1992
+ algn: "ctr",
1993
+ round: !0,
1994
+ fill: "tx1 lumMod 5 lumOff 95"
1995
+ }
1996
+ },
1997
+ {
1998
+ type: "hiLoLine",
1999
+ fontRef: { color: "tx1" },
2000
+ stroke: {
2001
+ width: .75,
2002
+ cap: "flat",
2003
+ cmpd: "sng",
2004
+ algn: "ctr",
2005
+ round: !0,
2006
+ fill: "tx1 lumMod 50 lumOff 50"
2007
+ }
2008
+ },
2009
+ {
2010
+ type: "leaderLine",
2011
+ fontRef: { color: "tx1" },
2012
+ stroke: {
2013
+ width: .75,
2014
+ cap: "flat",
2015
+ cmpd: "sng",
2016
+ algn: "ctr",
2017
+ round: !0,
2018
+ fill: "tx1 lumMod 35 lumOff 65"
2019
+ }
2020
+ },
2021
+ {
2022
+ type: "legend",
2023
+ fontRef: { color: "tx1 lumMod 65 lumOff 35" },
2024
+ defRPr: {
2025
+ size: 9,
2026
+ kern: 12
2027
+ }
2028
+ },
2029
+ {
2030
+ type: "plotArea",
2031
+ mods: { mods: "allowNoFillOverride allowNoLineOverride" },
2032
+ fontRef: { color: "tx1" }
2033
+ },
2034
+ {
2035
+ type: "plotArea3D",
2036
+ mods: { mods: "allowNoFillOverride allowNoLineOverride" },
2037
+ fontRef: { color: "tx1" }
2038
+ },
2039
+ {
2040
+ type: "seriesAxis",
2041
+ fontRef: { color: "tx1 lumMod 65 lumOff 35" },
2042
+ defRPr: {
2043
+ size: 9,
2044
+ kern: 12
2045
+ }
2046
+ },
2047
+ {
2048
+ type: "seriesLine",
2049
+ fontRef: { color: "tx1" },
2050
+ stroke: {
2051
+ width: .75,
2052
+ cap: "flat",
2053
+ cmpd: "sng",
2054
+ algn: "ctr",
2055
+ round: !0,
2056
+ fill: "tx1 lumMod 35 lumOff 65"
2057
+ }
2058
+ },
2059
+ {
2060
+ type: "title",
2061
+ fontRef: { color: "tx1 lumMod 65 lumOff 35" },
2062
+ defRPr: {
2063
+ size: 14,
2064
+ b: !1,
2065
+ kern: 12,
2066
+ spc: 0,
2067
+ baseline: 0
2068
+ }
2069
+ },
2070
+ {
2071
+ type: "trendline",
2072
+ lineRef: { color: "auto" },
2073
+ fontRef: { color: "tx1" },
2074
+ stroke: {
2075
+ width: 1.5,
2076
+ cap: "rnd",
2077
+ fill: "phClr",
2078
+ prstDash: "sysDot"
2079
+ }
2080
+ },
2081
+ {
2082
+ type: "trendlineLabel",
2083
+ fontRef: { color: "tx1 lumMod 65 lumOff 35" },
2084
+ defRPr: {
2085
+ size: 9,
2086
+ kern: 12
2087
+ }
2088
+ },
2089
+ {
2090
+ type: "upBar",
2091
+ fontRef: { color: "tx1" },
2092
+ fill: {
2093
+ type: "solid",
2094
+ color: "lt1"
2095
+ },
2096
+ stroke: {
2097
+ width: .75,
2098
+ cap: "flat",
2099
+ cmpd: "sng",
2100
+ algn: "ctr",
2101
+ round: !0,
2102
+ fill: "tx1 lumMod 65 lumOff 35"
2103
+ }
2104
+ },
2105
+ {
2106
+ type: "valueAxis",
2107
+ fontRef: { color: "tx1 lumMod 65 lumOff 35" },
2108
+ defRPr: {
2109
+ size: 9,
2110
+ kern: 12
2111
+ }
2112
+ },
2113
+ {
2114
+ type: "wall",
2115
+ fontRef: { color: "tx1" },
2116
+ fill: { type: "none" },
2117
+ stroke: {}
2118
+ }
2119
+ ]), yn = (e, t, n) => {
2120
+ let r = n.length;
2121
+ for (let e = 0; e < r; e++) {
2122
+ let r = n[e], i = {}, a = r[0], o = r[1];
2123
+ a || o ? (t.start("variation", i), a && t.empty("a:lumMod", { val: a }), o && t.empty("a:lumOff", { val: o }), t.end("variation")) : t.empty("variation", i);
2124
+ }
2125
+ }, bn = Object.freeze([
2126
+ [0, 0],
2127
+ [6e4, 0],
2128
+ [8e4, 2e4],
2129
+ [8e4, 0],
2130
+ [6e4, 4e4],
2131
+ [5e4, 0],
2132
+ [7e4, 3e4],
2133
+ [7e4, 0],
2134
+ [5e4, 5e4]
2135
+ ]), xn = [
2136
+ new class extends L {
2137
+ constructor() {
2138
+ super({
2139
+ kind: "workbook",
2140
+ contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",
2141
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",
2142
+ path: "/xl/workbook.xml"
2143
+ });
2144
+ }
2145
+ async emit(e, t) {
2146
+ let n = t.getXMLWriter();
2147
+ n.decl(), n.start("workbook", {
2148
+ xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
2149
+ "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
2150
+ "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006",
2151
+ "mc:Ignorable": "x15 xr xr6 xr10 xr2",
2152
+ "xmlns:x15": "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main",
2153
+ "xmlns:xr": "http://schemas.microsoft.com/office/spreadsheetml/2014/revision",
2154
+ "xmlns:xr6": "http://schemas.microsoft.com/office/spreadsheetml/2016/revision6",
2155
+ "xmlns:xr10": "http://schemas.microsoft.com/office/spreadsheetml/2016/revision10",
2156
+ "xmlns:xr2": "http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"
2157
+ });
2158
+ let r = /* @__PURE__ */ new Set(), a = e.getCalculation().getNamedFormulas().getItems();
2159
+ for (let e = 0; e < a.length; e++) r.add(a[e].getName().toUpperCase());
2160
+ let o = i(r), s = await e.toJSON({
2161
+ ignoreData: !0,
2162
+ ignoreResources: !0,
2163
+ includeHeaderStyles: !0,
2164
+ formulaTransform: o,
2165
+ splitDirectBorders: !0
2166
+ });
2167
+ (function(e, t, n) {
2168
+ let r = {};
2169
+ n.getRuntime().isDate1904() && (r.date1904 = "1"), t.empty("workbookPr", r);
2170
+ })(0, n, e), function(e, t, n, r) {
2171
+ let i = r.protection;
2172
+ if (!i) return;
2173
+ let a = {};
2174
+ Pe(i.password ?? {}, a, "workbook"), Pe(i.revisionsPassword ?? {}, a, "revisions"), i.structure && (a.lockStructure = "1"), i.windows && (a.lockWindows = "1"), i.revision && (a.lockRevision = "1"), t.empty("workbookProtection", a);
2175
+ }(0, n, 0, s), function(e, t, n) {
2176
+ t.start("bookViews");
2177
+ let r = n.getView(), i = {};
2178
+ r.isShowHorizontalScrollbar() || (i.showHorizontalScroll = "0"), r.isShowVerticalScrollbar() || (i.showVerticalScroll = "0"), r.isShowTabs() || (i.showSheetTabs = "0");
2179
+ let a = r.getTabRatio();
2180
+ a !== 600 && (i.tabRatio = a);
2181
+ let o = n.getSelectedSheet().getIndex();
2182
+ o !== 0 && (i.activeTab = "" + o), t.empty("workbookView", i), t.end("bookViews");
2183
+ }(0, n, e, s.view), n.start("sheets");
2184
+ let c = t.getSharedStates();
2185
+ c.set("formulaTransform", o);
2186
+ let l = e.getStrings().beginPersist();
2187
+ c.set("persistStrings", l);
2188
+ let u = new Fe();
2189
+ c.set("metaCollector", u);
2190
+ let d = new Ie(u, t.warn.bind(t));
2191
+ c.set("persistRichTypes", d);
2192
+ try {
2193
+ let r = e.getSheets().getItems({ visibility: j.Visibility.VeryHidden }), i = s.sheets, a = e.getSelectedSheet(), o = r.length;
2194
+ for (let e = 0; e < o; e++) {
2195
+ let o = r[e], s = "" + (o.getIndex() + 1), c = {
2196
+ name: o.getName(),
2197
+ sheetId: s
2198
+ }, u = o.getVisibility();
2199
+ u === "hidden" ? c.state = "hidden" : u === "veryHidden" && (c.state = "veryHidden");
2200
+ let d = i[e].sheet;
2201
+ c["r:id"] = t.addPart("worksheet", {
2202
+ model: o,
2203
+ isSelected: a === o,
2204
+ json: d,
2205
+ persistStrings: l
2206
+ }).relId, n.empty("sheet", c);
2207
+ }
2208
+ await t.waitEmit();
2209
+ let u = e.getTheme();
2210
+ t.addPart("theme", {
2211
+ model: u,
2212
+ json: s.theme
2213
+ }), await t.waitEmit(), t.addPart("styles", {
2214
+ styles: e.getStyles(),
2215
+ theme: e.getTheme(),
2216
+ json: s.styles
2217
+ }), await t.waitEmit();
2218
+ let d = await l.toJSONAsync();
2219
+ d && d.length > 0 && (t.addPart("sharedStrings", {
2220
+ model: d,
2221
+ json: d
2222
+ }), await t.waitEmit());
2223
+ let f = c.get("persistRichTypes");
2224
+ f?.hasAny() && (t.addPart("richValue", f), t.addPart("richValueStructure", f), t.addPart("richValueTypes", null), await t.waitEmit());
2225
+ let p = c.get("metaCollector");
2226
+ p?.hasAny() && (t.addPart("metadata", p), await t.waitEmit()), c.delete("persistRichTypes"), c.delete("metaCollector"), c.delete("persistStrings");
2227
+ } catch (e) {
2228
+ throw e;
2229
+ } finally {
2230
+ l.endPersist();
2231
+ }
2232
+ n.end("sheets"), function(e, t, n, r, i) {
2233
+ let a = r.names, o = a ? a.length : 0;
2234
+ if (o === 0) return;
2235
+ let s = n.getCalculation().getNamedFormulas(), c = /* @__PURE__ */ new Map(), l = n.getSheets().getItems({ visibility: j.Visibility.VeryHidden });
2236
+ for (let e = 0; e < l.length; e++) c.set(l[e].getName().toLowerCase(), e);
2237
+ t.start("definedNames");
2238
+ for (let n = 0; n < o; n++) {
2239
+ let r = a[n], o = { name: r.name };
2240
+ if (r.comment && (o.comment = r.comment), r.scope) {
2241
+ let t = c.get(r.scope.toLowerCase());
2242
+ t === void 0 ? e.warn(`Defined name '${r.name}' is scoped to unknown sheet '${r.scope}'; writing it as global.`) : o.localSheetId = "" + t;
2243
+ }
2244
+ r.hidden && (o.hidden = "1");
2245
+ let l = r.ref, u = s.getItems({
2246
+ name: r.name,
2247
+ scope: r.scope ?? null
2248
+ })[0];
2249
+ u && (l = u.getExpression({ formulaTransform: i })), t.start("definedName", o), t.text(l), t.end("definedName");
2250
+ }
2251
+ t.end("definedNames");
2252
+ }(t, n, e, s, o), n.end("workbook"), n.close();
2253
+ }
2254
+ }(),
2255
+ new class extends L {
2256
+ constructor() {
2257
+ super({
2258
+ kind: "worksheet",
2259
+ contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",
2260
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",
2261
+ path: () => "/xl/worksheets/sheet{n}.xml"
2262
+ });
2263
+ }
2264
+ async emit(n, i) {
2265
+ let o = i.getXMLWriter(), c = n.model, l = n.json;
2266
+ o.decl(), o.start("worksheet", {
2267
+ xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
2268
+ "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
2269
+ "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006",
2270
+ "mc:Ignorable": "x14ac",
2271
+ "xmlns:x14ac": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"
2272
+ }), function(e, t, n) {
2273
+ let r = n.getTabColor();
2274
+ r && (t.start("sheetPr"), r && U(t, n.getStyles().getTheme(), r, "tabColor", !1), t.end("sheetPr"));
2275
+ }(0, o, c), function(e, t, n, r) {
2276
+ let i = n.getUsedRange({ features: [] }), a = i ? i.getCoords() : null, o = Qe, s = $e, c = r.directStyles, l = c ? c.length : 0;
2277
+ for (let e = 0; e < l; e++) {
2278
+ let t = n.getRange(c[e][0]).getCoords();
2279
+ if (t.colEnd === s) {
2280
+ let e = a?.colStart ?? 0;
2281
+ t = {
2282
+ ...t,
2283
+ colStart: e,
2284
+ colEnd: e
2285
+ };
2286
+ }
2287
+ if (t.rowEnd === o) {
2288
+ let e = a?.rowStart ?? 0;
2289
+ t = {
2290
+ ...t,
2291
+ rowStart: e,
2292
+ rowEnd: e
2293
+ };
2294
+ }
2295
+ a = ne.unionRanges(a, t);
2296
+ }
2297
+ let u = r.merges, d = u ? u.length : 0;
2298
+ for (let e = 0; e < d; e++) {
2299
+ let t = n.getRange(u[e]).getCoords();
2300
+ t.colEnd === s && (t = { ...a }, t.colStart = a?.colStart ?? 0, t.colEnd = t.colStart), t.rowEnd === o && (t = { ...t }, t.rowStart = a?.rowStart ?? 0, t.rowEnd = t.rowStart), a = ne.unionRanges(a, t);
2301
+ }
2302
+ let f = "A1";
2303
+ a && (i = n.getRange(a), f = a.colStart === a.colEnd && a.rowStart === a.rowEnd ? i.getAddress() : `${i.getIntersect({
2304
+ colStart: a.colStart,
2305
+ rowStart: a.rowStart,
2306
+ colEnd: a.colStart,
2307
+ rowEnd: a.rowStart
2308
+ }).getAddress()}:${i.getIntersect({
2309
+ colStart: a.colEnd,
2310
+ rowStart: a.rowEnd,
2311
+ colEnd: a.colEnd,
2312
+ rowEnd: a.rowEnd
2313
+ }).getAddress()}`), t.empty("dimension", { ref: f });
2314
+ }(0, o, c, l), function(e, t, n, r, i) {
2315
+ let a = n.getView(), o = a.getTopLeft(), s = n.getRowHeaders().getIndex(o.top), c = n.getColumnHeaders().getIndex(o.left), l = S.cellToString({
2316
+ colIndex: c,
2317
+ rowIndex: s
2318
+ });
2319
+ t.start("sheetViews");
2320
+ let u = {};
2321
+ a.isShowFormulas() && (u.showFormulas = "1"), a.isShowColumnGridlines() || a.isShowRowGridlines() || (u.showGridLines = "0"), a.isShowColumnHeaders() || a.isShowRowHeaders() || (u.showRowColHeaders = "0"), a.isShowZeros() || (u.showZeros = "0"), a.isRightToLeft() && (u.rightToLeft = "1"), i && (u.tabSelected = "1"), l !== "A1" && (u.topLeftCell = l);
2322
+ let d = a.getZoomScale();
2323
+ d !== 100 && (u.zoomScale = d, u.zoomScaleNormal = d);
2324
+ let f = a.getGridLineColor();
2325
+ if (f) {
2326
+ u.defaultGridColor = "0";
2327
+ let e = f.toRGBA(), t = e.red, r = e.green, i = e.blue, a = n.getStyles().getIndexedColors(), o = a.length, s = 0, c = Number.MAX_VALUE;
2328
+ for (let e = 0; e < o; e++) {
2329
+ let n = a[e].toRGBA(), o = (t - n.red) ** 2 + (r - n.green) ** 2 + (i - n.blue) ** 2;
2330
+ o < c && (c = o, s = e);
2331
+ }
2332
+ u.colorId = "" + s;
2333
+ }
2334
+ u.workbookViewId = "0";
2335
+ let p = n.getSelection().getCoords(), m = S.cellToString(p.cell), h = {}, g = a.getFreezePanes(), _ = g.coords ?? {}, v = _.colIndex ?? 0, y = _.rowIndex ?? 0;
2336
+ if (v > 0 || y > 0) {
2337
+ let e = g.topLeft ?? {}, r = e.top ?? 0, i = e.left ?? 0, a = n.getRowHeaders().getIndex(r), s = n.getColumnHeaders().getIndex(i), c = v - s, l = y - a, d = Math.max(v, n.getColumnHeaders().getIndex(o.left + n.getColumnHeaders().getOffset(v) - i)), f = Math.max(y, n.getRowHeaders().getIndex(o.top + n.getRowHeaders().getOffset(y) - r)), p = S.cellToString({
2338
+ colIndex: s,
2339
+ rowIndex: a
2340
+ });
2341
+ p === "A1" ? delete u.topLeftCell : u.topLeftCell = p, t.start("sheetView", u);
2342
+ let m = {};
2343
+ if (c > 0 && (m.xSplit = c), l > 0 && (m.ySplit = l), m.topLeftCell = S.cellToString({
2344
+ colIndex: d,
2345
+ rowIndex: f
2346
+ }), m.state = "frozen", v === 0) {
2347
+ m.activePane = "bottomLeft", t.empty("pane", m);
2348
+ let e = S.cellToString({
2349
+ colIndex: d,
2350
+ rowIndex: a
2351
+ });
2352
+ e !== "A1" && t.empty("selection", {
2353
+ activeCell: e,
2354
+ sqref: e
2355
+ }), h.pane = "bottomLeft";
2356
+ } else if (y === 0) {
2357
+ m.activePane = "topRight", t.empty("pane", m);
2358
+ let e = S.cellToString({
2359
+ colIndex: s,
2360
+ rowIndex: f
2361
+ });
2362
+ e !== "A1" && t.empty("selection", {
2363
+ activeCell: e,
2364
+ sqref: e
2365
+ }), h.pane = "topRight";
2366
+ } else {
2367
+ m.activePane = "bottomRight", t.empty("pane", m), p !== "A1" && t.empty("selection", {
2368
+ activeCell: p,
2369
+ sqref: p
2370
+ });
2371
+ let e = S.cellToString({
2372
+ colIndex: d,
2373
+ rowIndex: a
2374
+ });
2375
+ t.empty("selection", {
2376
+ pane: "topRight",
2377
+ activeCell: e,
2378
+ sqref: e
2379
+ });
2380
+ let n = S.cellToString({
2381
+ colIndex: s,
2382
+ rowIndex: f
2383
+ });
2384
+ t.empty("selection", {
2385
+ pane: "bottomLeft",
2386
+ activeCell: n,
2387
+ sqref: n
2388
+ }), h.pane = "bottomRight";
2389
+ }
2390
+ } else t.start("sheetView", u);
2391
+ h.activeCell = m;
2392
+ let b = p.ranges, x = b ? b.length : 0;
2393
+ if (x > 0) {
2394
+ let e = "";
2395
+ for (let t = 0; t < x; t++) {
2396
+ let n = b[t];
2397
+ t > 0 && (e += " "), e += S.rangeToString(n);
2398
+ }
2399
+ h.sqref = e, (p.rangeIndex ?? 0) > 0 && (h.activeCellId = "" + p.rangeIndex);
2400
+ } else m === "A1" ? h = null : h.sqref = m;
2401
+ h && t.empty("selection", h), t.end("sheetView"), t.end("sheetViews");
2402
+ }(0, o, c, 0, n.isSelected), function(e, t, n, r) {
2403
+ let i = r.defaultColSize, a = r.defaultRowSize, o = {};
2404
+ i !== void 0 && (o.defaultColWidth = i), o.defaultRowHeight = a ?? .75 * n.getRowHeaders().getDefaultSize(), a !== void 0 && (o.customHeight = "1"), o["x14ac:dyDescent"] = "0.25", t.empty("sheetFormatPr", o);
2405
+ }(0, o, c, l), function(e, t, n, r) {
2406
+ let i = r.cols ? S.refsToRuns(r.cols, !0) : null, a = i ? i.length : 0;
2407
+ n.getEntireRange().getColumnEnd();
2408
+ let o = n.getColumnHeaders().getDefaultSizeNative();
2409
+ if (a > 0) {
2410
+ t.start("cols");
2411
+ for (let e = 0; e < a; e++) {
2412
+ let n = i[e], r = n.min + 1, a = 16384;
2413
+ if (r > a) continue;
2414
+ let s = {
2415
+ min: r,
2416
+ max: Math.min(n.max + 1, a)
2417
+ }, c = n.value, l = c.sz;
2418
+ l === void 0 ? s.width = o : l !== 0 && (s.width = Math.round(256 * l) / 256), c.s && (s.style = c.s), c.h !== void 0 && (s.hidden = 1), c.csz && (s.customWidth = 1), c.l !== void 0 && (s.outlineLevel = c.l), c.cl !== void 0 && (s.collapsed = 1), t.empty("col", s);
2419
+ }
2420
+ t.end("cols");
2421
+ }
2422
+ }(0, o, c, l), function(n, i, o, c, l) {
2423
+ let u = n.getSharedStates(), d = u.get("persistStrings"), f = u.get("metaCollector"), p = u.get("persistRichTypes"), m = u.get("formulaTransform"), h = 0, g = 0, _ = o.getUsedRange(), v = 0, y = c.rows ? S.refsToRuns(c.rows, !1) : null, x = y ? y.length : 0, C = y?.[x - 1]?.max ?? -1, w = c.cols ? S.refsToRuns(c.cols, !0) : null, T = w ? w.length : 0, ne = w?.[T - 1]?.max ?? -1;
2424
+ if (_ || x > 0) {
2425
+ let u = .75, _ = c.defaultRowSize ?? o.getRowHeaders().getDefaultSize() * u, x = o.getStyles().getNormal().getBestFit().height * u, T = (e, t) => {
2426
+ let n = mt;
2427
+ if (n.r = "" + (e + 1), n.s = void 0, n.customFormat = void 0, n.hidden = void 0, n.ht = void 0, n.customHeight = void 0, n.outlineLevel = void 0, n.collapsed = void 0, !t) return n;
2428
+ let r = t.value;
2429
+ r.s !== void 0 && (n.s = "" + r.s, n.customFormat = "1"), r.h && (n.hidden = "1");
2430
+ let i = r.csz ?? !1, a = r.sz ?? _;
2431
+ return (a !== x || i) && (n.ht = "" + a), i && (n.customHeight = "1"), r.l !== void 0 && (n.outlineLevel = "" + r.l), r.cl !== void 0 && (n.collapsed = "" + r.cl), n;
2432
+ }, E = 0, D = y?.[E] ?? null, O = D?.min ?? 2 ** 53 - 1, k = D?.max ?? 2 ** 53 - 1, A = D?.value?.s, j = -1, M = 0, N = w?.[M] ?? null, P = N?.min ?? 2 ** 53 - 1, ie = N?.max ?? 2 ** 53 - 1, F = N?.value?.s, L = (e, t = !1) => {
2433
+ if (j !== e) {
2434
+ for (j !== -1 && (i.end("row"), M !== 0 && (M = 0, N = w?.[M] ?? null, P = N?.min ?? 2 ** 53 - 1, ie = N?.max ?? 2 ** 53 - 1, F = N?.value?.s)); j + 1 <= e;) {
2435
+ j++, D && j > k && (D = y[++E] ?? null, D ? (O = D.min, k = D.max, A = D.value?.s) : (O = 2 ** 53 - 1, k = 2 ** 53 - 1, A = void 0)), j < O && j < e && (j = D ? Math.min(O, e) : e);
2436
+ let n = j < e || t && j === e, r = T(j, D && j >= O && j <= k ? D : null);
2437
+ n ? i.empty("row", r) : i.start("row", r);
2438
+ }
2439
+ if (e < j) {
2440
+ let t = T(e, null);
2441
+ i.start("row", t);
2442
+ }
2443
+ }
2444
+ };
2445
+ i.setValidationDisabled(!0), i.start("sheetData");
2446
+ let R = [];
2447
+ R.push(it(n, o, c.directStyles));
2448
+ let ae = c.formulas, oe = ae ? ae.length : 0;
2449
+ if (oe > 0) {
2450
+ let n = /* @__PURE__ */ new Map();
2451
+ if (l.names.size > 0 && c.formulaArray) for (let e of c.formulaArray) try {
2452
+ let t = o.getRange(e[0]).getCoords();
2453
+ n.set(`${t.rowStart},${t.colStart}`, t);
2454
+ } catch {}
2455
+ let i = [];
2456
+ if (c.formulaArray) for (let e of c.formulaArray) try {
2457
+ i.push(o.getRange(e[0]).getCoords());
2458
+ } catch {}
2459
+ let u = (e) => {
2460
+ for (let t = 0; t < i.length; t++) {
2461
+ let n = i[t];
2462
+ if (n.rowStart <= e.rowEnd && n.rowEnd >= e.rowStart && n.colStart <= e.colEnd && n.colEnd >= e.colStart) return !0;
2463
+ }
2464
+ return !1;
2465
+ }, d = a(() => o.getCalculation()), f = (e) => {
2466
+ if (!e) return;
2467
+ let t;
2468
+ return e.getExpression({ formulaTransform: (e, n) => {
2469
+ n === void 0 && (t = e);
2470
+ } }), t;
2471
+ }, p = [];
2472
+ for (let i = 0; i < oe; i++) {
2473
+ let a = ae[i];
2474
+ try {
2475
+ let c = a[0], h = o.getRange(c), g = h.getCoords(), _ = a[1], y = null, b = f(h.getCell().getFormula()), x = !!b && t(b, d), ee = r(b);
2476
+ if (l.affects(i)) {
2477
+ y = null, x = !1;
2478
+ let t = (e, t, n) => {
2479
+ let r = {
2480
+ rowStart: e,
2481
+ colStart: t,
2482
+ rowEnd: e,
2483
+ colEnd: t
2484
+ };
2485
+ p.push([r, {
2486
+ coords: r,
2487
+ formula: n,
2488
+ sharedId: null,
2489
+ ref: S.rangeToString(r),
2490
+ isDynamicRange: !1,
2491
+ isWrapped: !0
2492
+ }]);
2493
+ }, r = n.get(`${g.rowStart},${g.colStart}`), i = r !== void 0 && (r.rowEnd > r.rowStart || r.colEnd > r.colStart), a = !1;
2494
+ if (i) {
2495
+ let n = s(_, h.getCell().getValue());
2496
+ if (n !== null) for (let i = r.rowStart; i <= r.rowEnd; i++) for (let s = r.colStart; s <= r.colEnd; s++) {
2497
+ if (i === r.rowStart && s === r.colStart) {
2498
+ t(i, s, n), a = !0;
2499
+ continue;
2500
+ }
2501
+ let c = e(o.getRange(S.rangeToString({
2502
+ rowStart: i,
2503
+ colStart: s,
2504
+ rowEnd: i,
2505
+ colEnd: s
2506
+ })).getCell().getValue());
2507
+ c !== null && t(i, s, c);
2508
+ }
2509
+ } else {
2510
+ let e = h.getCells();
2511
+ for (let n = 0; n < e.length; n++) {
2512
+ let r = e[n];
2513
+ for (let e = 0; e < r.length; e++) {
2514
+ let i = r[e], o = s(i.getFormula()?.getExpression() ?? _, i.getValue());
2515
+ o !== null && (t(g.rowStart + n, g.colStart + e, o), a = !0);
2516
+ }
2517
+ }
2518
+ }
2519
+ if (a) continue;
2520
+ }
2521
+ let te = _.indexOf("!") !== -1 || _.indexOf("[") !== -1, C;
2522
+ if (x || h.isSingleCell() || te || u(g) || (y = "" + v++), y === null && !h.isSingleCell()) {
2523
+ C = [];
2524
+ let e = h.getCells();
2525
+ for (let t = 0; t < e.length; t++) {
2526
+ let n = e[t], r = Array(n.length);
2527
+ for (let e = 0; e < n.length; e++) t === 0 && e === 0 || (r[e] = n[e].getFormula()?.getExpression({ formulaTransform: m }) ?? void 0);
2528
+ C.push(r);
2529
+ }
2530
+ }
2531
+ let w = [g, {
2532
+ coords: g,
2533
+ formula: _,
2534
+ sharedId: y,
2535
+ ref: c,
2536
+ isDynamicRange: x,
2537
+ isExcelVolatile: ee,
2538
+ memberTexts: C
2539
+ }];
2540
+ p.push(w);
2541
+ } catch (e) {
2542
+ console.warn(`Failed to parse formula: ${a[1]}`, e);
2543
+ continue;
2544
+ }
2545
+ }
2546
+ R.push(p);
2547
+ } else R.push([]);
2548
+ let se = c.volatile, z = se ? se.length : 0;
2549
+ if (z > 0) {
2550
+ let e = Array(z);
2551
+ for (let t = 0; t < z; t++) {
2552
+ let n = se[t];
2553
+ try {
2554
+ e[t] = [o.getRange(n).getCoords(), !0];
2555
+ } catch (e) {
2556
+ console.warn(`Failed to parse volatile: ${n}`, e);
2557
+ continue;
2558
+ }
2559
+ }
2560
+ R.push(e);
2561
+ } else R.push([]);
2562
+ let ce = c.formulaArray, B = ce ? ce.length : 0;
2563
+ if (B > 0) {
2564
+ let e = Array(B);
2565
+ for (let t = 0; t < B; t++) {
2566
+ let n = ce[t];
2567
+ try {
2568
+ let r = n[0];
2569
+ e[t] = [o.getRange(r).getCoords(), {
2570
+ ref: r,
2571
+ kind: n[1] ?? "dynamic"
2572
+ }];
2573
+ } catch (e) {
2574
+ console.warn(`Failed to parse formula array: ${n}`, e);
2575
+ continue;
2576
+ }
2577
+ }
2578
+ R.push(e);
2579
+ } else R.push([]);
2580
+ o.getEntireRange().forEach((e, t) => {
2581
+ let r = t.getCoords(), a = r.rowIndex, o = r.colIndex;
2582
+ j !== a && L(a);
2583
+ let s = t.getInjectedReference(0);
2584
+ if (s === void 0 && A !== void 0 && a >= O && a <= k && (s = A), s === void 0) {
2585
+ for (; o <= ne && o > ie;) M++, N = w?.[M] ?? null, P = N?.min ?? 2 ** 53 - 1, ie = N?.max ?? 2 ** 53 - 1, F = N?.value?.s;
2586
+ F !== void 0 && o >= P && o <= ie && (s = F);
2587
+ }
2588
+ let c = t.getType(), l = null;
2589
+ oe > 0 && (l = t.getInjectedReference(1) ?? null);
2590
+ let u = !1;
2591
+ z > 0 && (u = t.getInjectedReference(2) ?? !1);
2592
+ let m = null;
2593
+ B > 0 && (m = t.getInjectedReference(3) ?? null);
2594
+ let _ = m?.kind === "dynamicSpillError", v = m?.kind === "static", y = pt;
2595
+ y.r = t.getAddress(), y.s = void 0, y.t = void 0, y.cm = void 0, y.vm = void 0, s !== void 0 && s !== 0 && (y.s = "" + s);
2596
+ let x = null, S = null;
2597
+ switch (c) {
2598
+ case I.Boolean:
2599
+ x = e ? "1" : "0", S = "b";
2600
+ break;
2601
+ case I.Error:
2602
+ let t = e.getCode();
2603
+ if (S = "e", t > 7) x = re.BuiltIn.Value.getLabel(), y.vm = "" + p.add(e);
2604
+ else if (t < 1) {
2605
+ let t;
2606
+ S = "s", l ? (t = "=" + l.formula, l = null) : t = "" + e.getLabel(), x = "" + d.add(t), h++;
2607
+ } else x = "" + e.getLabel();
2608
+ break;
2609
+ case I.Number:
2610
+ x = "" + e, S = null;
2611
+ break;
2612
+ case I.String:
2613
+ x = e, l ? (S = "str", x = e) : (S = "s", x = "" + d.add(x), h++);
2614
+ break;
2615
+ case I.RichData: S = "e", x = re.BuiltIn.Value.getLabel(), y.vm = "" + p.add(e);
2616
+ }
2617
+ S && (y.t = S);
2618
+ let C = !l?.isWrapped && (m !== null || (l?.isDynamicRange ?? !1));
2619
+ if (l !== null || x !== null) {
2620
+ if (C && l !== null && !v && (y.cm = "" + f.registerArrayCell(_)), i.start("c", y), l) {
2621
+ let e = l.memberTexts?.[a - l.coords.rowStart]?.[o - l.coords.colStart] ?? l.formula, t, n = null, r = l.sharedId;
2622
+ if (r) {
2623
+ t = gt;
2624
+ let e = l.coords;
2625
+ e.colStart === o && e.rowStart === a ? (t.ref = l.ref, t.si = r, n = l.formula) : (t.ref = void 0, t.si = r);
2626
+ } else C ? (t = _t, t.aca = _ ? "1" : void 0, t.ref = _ ? y.r : m?.ref ?? y.r, n = e) : (t = ht, n = e);
2627
+ t.ca = u || _ || l.isExcelVolatile ? "1" : void 0, n ? (i.start("f", t), i.text(n), i.end("f")) : i.empty("f", t);
2628
+ }
2629
+ x !== null && (S === "str" && x ? (i.start("v", te.test(x) ? b : void 0), i.text(ee(x))) : (i.start("v"), x && i.text(x)), i.end("v")), i.end("c");
2630
+ } else g++ < rt ? i.empty("c", y) : g === 1048577 && n.warn(`Reached ${rt} style-only cells at '${y.r}'; not writing the rest.`);
2631
+ }, {
2632
+ injectReferences: R,
2633
+ features: []
2634
+ }), j !== -1 && j >= C ? i.end("row") : L(C, !0), i.end("sheetData"), i.setValidationDisabled(!1);
2635
+ } else i.empty("sheetData");
2636
+ if (h > 0) {
2637
+ let e = u.get("stringsCount") ?? 0;
2638
+ u.set("stringsCount", e + h);
2639
+ }
2640
+ }(i, o, c, l, await (async (e, t) => {
2641
+ let n = t ? t.length : 0;
2642
+ if (n === 0) return nt;
2643
+ let r = /* @__PURE__ */ new Set(), i = Array(n);
2644
+ for (let a = 0; a < n; a++) {
2645
+ i[a] = null;
2646
+ try {
2647
+ let n = e.getRange(t[a][0]).getCell().getFormula()?.getTokens();
2648
+ if (!n) continue;
2649
+ let o = null;
2650
+ for (let e = 0; e < n.length; e++) {
2651
+ let t = n[e], i = null;
2652
+ t.type === "function" ? i = String(t.value) : t.type === "named" && n[e + 1]?.type === "paren" && n[e + 1].value === "(" && (i = String(t.value?.name ?? "")), i && (i = i.toUpperCase(), r.add(i), (o ??= /* @__PURE__ */ new Set()).add(i));
2653
+ }
2654
+ i[a] = o;
2655
+ } catch {}
2656
+ }
2657
+ let a = e.getWorkbook();
2658
+ if (!a) return nt;
2659
+ let o = await x(a, r);
2660
+ return o.size === 0 ? nt : {
2661
+ names: o,
2662
+ perFormula: i,
2663
+ affects: (e) => {
2664
+ let t = i[e];
2665
+ if (!t) return !1;
2666
+ for (let e of t) if (o.has(e)) return !0;
2667
+ return !1;
2668
+ }
2669
+ };
2670
+ })(c, l.formulas)), function(e, t, n, r) {
2671
+ let i = r.protection;
2672
+ if (!i) return;
2673
+ let a = {};
2674
+ Pe(i.password ?? {}, a), a.sheet = "1";
2675
+ let o = (e, t, n) => {
2676
+ let r = i[e];
2677
+ r !== void 0 && r !== t && (a[n ?? e] = r ? "1" : "0");
2678
+ };
2679
+ o("objects", "0"), o("scenarios", "0"), o("formatCells", "0"), o("formatColumns", "0"), o("formatRows", "0"), o("insertColumns", "0"), o("insertRows", "0"), o("insertHyperlinks", "0"), o("deleteColumns", "0"), o("deleteRows", "0"), o("selectLockedCells", "1"), o("sort", "0"), o("autoTable", "0", "autoFilter"), o("pivotTables", "0"), o("selectUnlockedCells", "1"), t.empty("sheetProtection", a);
2680
+ }(0, o, 0, l), function(e, t, n, r) {
2681
+ let i = r.protectedRanges, a = i ? i.length : 0;
2682
+ if (a === 0) return;
2683
+ let o = [];
2684
+ for (let t = 0; t < a; t++) {
2685
+ let n = i[t], r, a;
2686
+ Array.isArray(n) ? (r = n[0], a = n[1]) : (r = n.r, a = n.v);
2687
+ let s = dt(r);
2688
+ if (!s || !a) {
2689
+ e.warn("Skipping protectedRange with no range.");
2690
+ continue;
2691
+ }
2692
+ if (!a.name) {
2693
+ e.warn("Skipping protectedRange with no name.");
2694
+ continue;
2695
+ }
2696
+ let c = {};
2697
+ Pe(a.password ?? {}, c), c.sqref = s, c.name = a.name, a.securityDescriptor && (c.securityDescriptor = a.securityDescriptor), o.push(c);
2698
+ }
2699
+ if (o.length !== 0) {
2700
+ t.start("protectedRanges");
2701
+ for (let e = 0; e < o.length; e++) t.empty("protectedRange", o[e]);
2702
+ t.end("protectedRanges");
2703
+ }
2704
+ }(i, o, 0, l);
2705
+ let u = l.autoTable;
2706
+ if (u) {
2707
+ let e, t = u;
2708
+ e = Array.isArray(t) ? t[1] : t.v, qe(i, o, c.getAutoTable(), e, !0);
2709
+ }
2710
+ (function(e, t, n, r) {
2711
+ let i = r.merges ? r.merges.length : 0;
2712
+ if (i > 0) {
2713
+ t.start("mergeCells", { count: i });
2714
+ for (let e = 0; e < i; e++) {
2715
+ let n = r.merges[e], i = typeof n == "string" ? n : S.rangeToString(n);
2716
+ t.empty("mergeCell", { ref: i });
2717
+ }
2718
+ t.end("mergeCells");
2719
+ }
2720
+ })(0, o, 0, l);
2721
+ let p = function(e, t, n, r) {
2722
+ let i = [], a = r.conditionals, o = a ? a.length : 0;
2723
+ if (o === 0) return i;
2724
+ let s = e.getSharedStates(), c = s.get(tt);
2725
+ c || (c = new et(), s.set(tt, c));
2726
+ let l = n.getStyles().getTheme(), u = null, d = 0;
2727
+ for (let n = 0; n < o; n++) {
2728
+ let r = a[n], o, s;
2729
+ Array.isArray(r) ? (o = r[0], s = r[1]) : (o = r.r, s = r.v);
2730
+ let p = dt(o);
2731
+ p && s ? s.scale?.type === O.ScaleType.IconSet && ct(s.scale) ? (d++, i.push({
2732
+ guid: f(T.uuidV4),
2733
+ sqref: p,
2734
+ priority: d,
2735
+ scale: s.scale
2736
+ })) : (p !== u && (u !== null && t.end("conditionalFormatting"), t.start("conditionalFormatting", {
2737
+ sqref: p,
2738
+ pivot: s.pivot ? "1" : void 0
2739
+ }), u = p), lt(e, t, l, s, ut(p), p, d + 1, c, i) && d++) : e.warn("Skipping conditionalFormatting with no range.");
2740
+ }
2741
+ return u !== null && t.end("conditionalFormatting"), i;
2742
+ }(i, o, c, l), h = function(e, t, n, r) {
2743
+ let i = [], a = r.validations, o = a ? a.length : 0;
2744
+ if (o === 0) return i;
2745
+ let s = [];
2746
+ for (let t = 0; t < o; t++) {
2747
+ let n = a[t], r, o;
2748
+ Array.isArray(n) ? (r = n[0], o = n[1]) : (r = n.r, o = n.v);
2749
+ let c = dt(r);
2750
+ if (!c || !o) {
2751
+ e.warn?.("Skipping dataValidation with no range.");
2752
+ continue;
2753
+ }
2754
+ o.ext && e.warn("DataValidation extension payload is not written to xlsx; it will be lost.");
2755
+ let { type: l, operator: u, formula1: d, formula2: f } = g(o.condition, (t) => e.warn(t)) ?? {}, p = {
2756
+ type: l,
2757
+ operator: u,
2758
+ allowBlank: K(o.condition?.includeBlanks ?? !1),
2759
+ showDropDown: o.hideDropdown ? "1" : void 0,
2760
+ showInputMessage: K(o.showPromptMessage),
2761
+ showErrorMessage: K(o.showAlertMessage),
2762
+ errorStyle: o.alertStyle ?? "information",
2763
+ errorTitle: o.alertTitle,
2764
+ error: o.alert,
2765
+ promptTitle: o.promptTitle,
2766
+ prompt: o.prompt,
2767
+ imeMode: o.imeMode
2768
+ };
2769
+ ft(d) || ft(f) ? i.push({
2770
+ attrs: p,
2771
+ formula1: d,
2772
+ formula2: f,
2773
+ sqref: c
2774
+ }) : (p.sqref = c, s.push({
2775
+ attrs: p,
2776
+ formula1: d,
2777
+ formula2: f
2778
+ }));
2779
+ }
2780
+ if (s.length === 0) return i;
2781
+ t.start("dataValidations", { count: s.length });
2782
+ for (let e = 0; e < s.length; e++) {
2783
+ let { attrs: n, formula1: r, formula2: i } = s[e];
2784
+ r !== void 0 || i !== void 0 ? (t.start("dataValidation", n), r !== void 0 && (t.start("formula1"), t.text(r), t.end("formula1")), i !== void 0 && (t.start("formula2"), t.text(i), t.end("formula2")), t.end("dataValidation")) : t.empty("dataValidation", n);
2785
+ }
2786
+ return t.end("dataValidations"), i;
2787
+ }(i, o, 0, l);
2788
+ (function(e, t, n, r) {
2789
+ let i = r.hyperlinks, a = i ? i.length : 0;
2790
+ if (a !== 0) {
2791
+ t.start("hyperlinks");
2792
+ for (let n = 0; n < a; n++) {
2793
+ let r, a, o = i[n];
2794
+ Array.isArray(o) ? (a = o[0], r = o[1]) : (a = o.r, r = o.v), typeof r == "string" && (r = { address: r });
2795
+ let s = r.address ?? "", c = s.indexOf("#"), l = c === -1 ? s : s.substring(0, c), u = c === -1 ? "" : s.substring(c + 1), d = {};
2796
+ d.ref = a, l && (d["r:id"] = e.addExternal("http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", l).relId), u && (d.location = u), r.screenTip && (d.tooltip = r.screenTip), t.empty("hyperlink", d);
2797
+ }
2798
+ t.end("hyperlinks");
2799
+ }
2800
+ })(i, o, 0, l), function(e, t, n, r) {
2801
+ let i = r.pageMargins;
2802
+ t.empty("pageMargins", {
2803
+ left: i?.left ?? .7,
2804
+ right: i?.right ?? .7,
2805
+ top: i?.top ?? .75,
2806
+ bottom: i?.bottom ?? .75,
2807
+ header: i?.header ?? .3,
2808
+ footer: i?.footer ?? .3
2809
+ });
2810
+ }(0, o, 0, l), function(e, t, n, r) {
2811
+ let i = r.movables;
2812
+ if ((i ? i.length : 0) === 0 || !i.some((e) => {
2813
+ let t = e.content?.type;
2814
+ if (t === "picture" || t === "chart") return !0;
2815
+ if (t === "shape") {
2816
+ let t = e.content?.json?.type;
2817
+ return t === "sp" || t === "cxnSp";
2818
+ }
2819
+ return !1;
2820
+ })) return;
2821
+ let a = n.getMovables().getItems(), o = e.addPart("drawing", {
2822
+ sheet: n,
2823
+ movables: a,
2824
+ jsonMovables: i,
2825
+ resources: n.getResources()
2826
+ });
2827
+ t.empty("drawing", { "r:id": o.relId });
2828
+ }(i, o, c, l), function(e, t, n, r) {
2829
+ let i = r.tables, a = i ? i.length : 0;
2830
+ if (a === 0) return;
2831
+ let o = n.getTables().getItems();
2832
+ t.start("tableParts", { count: a });
2833
+ for (let n = 0; n < a; n++) {
2834
+ let r, a, s = i[n];
2835
+ Array.isArray(s) ? (a = s[0], r = s[1]) : (a = s.r, r = s.v);
2836
+ let c = e.addPart("table", {
2837
+ json: r,
2838
+ model: o[n],
2839
+ ref: a
2840
+ }), l = {};
2841
+ l["r:id"] = c.relId, t.empty("tablePart", l);
2842
+ }
2843
+ t.end("tableParts");
2844
+ }(i, o, c, l), function(e, t, n, r, i) {
2845
+ if (r.length === 0 && i.length === 0) return;
2846
+ let a = n.getStyles().getTheme();
2847
+ if (t.start("extLst"), r.length > 0) {
2848
+ t.start("ext", {
2849
+ uri: _,
2850
+ "xmlns:x14": v
2851
+ }), t.start("x14:conditionalFormattings");
2852
+ for (let e = 0; e < r.length; e++) {
2853
+ let { guid: n, sqref: i, priority: o, scale: s } = r[e];
2854
+ if (t.start("x14:conditionalFormatting", { "xmlns:xm": d }), s.type === O.ScaleType.DataBar) {
2855
+ t.start("x14:cfRule", {
2856
+ type: "dataBar",
2857
+ id: n
2858
+ }), t.start("x14:dataBar", {
2859
+ minLength: s.minLength,
2860
+ maxLength: s.maxLength,
2861
+ gradient: s.gradient ? void 0 : "0",
2862
+ border: s.borderColor ? "1" : void 0,
2863
+ direction: s.direction,
2864
+ negativeBarColorSameAsPositive: s.negativeFillColor ? "0" : "1",
2865
+ negativeBarBorderColorSameAsPositive: s.negativeBorderColor ? "0" : void 0,
2866
+ axisPosition: s.axisPosition
2867
+ });
2868
+ let e = s.stops ?? [];
2869
+ if (e.length === 0) ot(t, { type: O.ColorStopType.AutoMin }), ot(t, { type: O.ColorStopType.AutoMax });
2870
+ else for (let n = 0; n < e.length; n++) ot(t, e[n]);
2871
+ s.borderColor && U(t, a, s.borderColor, "x14:borderColor"), s.negativeFillColor && U(t, a, s.negativeFillColor, "x14:negativeFillColor"), s.negativeBorderColor && U(t, a, s.negativeBorderColor, "x14:negativeBorderColor"), s.axisColor && U(t, a, s.axisColor, "x14:axisColor"), t.end("x14:dataBar"), t.end("x14:cfRule");
2872
+ } else {
2873
+ t.start("x14:cfRule", {
2874
+ type: "iconSet",
2875
+ priority: o,
2876
+ id: n
2877
+ }), t.start("x14:iconSet", {
2878
+ iconSet: s.iconSet,
2879
+ reverse: K(s.reverse),
2880
+ showValue: K(s.showValue),
2881
+ custom: (s.icon?.length ?? 0) > 0 ? "1" : void 0
2882
+ });
2883
+ let e = s.stops ?? [];
2884
+ for (let n = 0; n < e.length; n++) ot(t, e[n]);
2885
+ let r = s.icon ?? [];
2886
+ for (let e = 0; e < r.length; e++) t.empty("x14:cfIcon", {
2887
+ iconSet: r[e].set,
2888
+ iconId: r[e].id
2889
+ });
2890
+ t.end("x14:iconSet"), t.end("x14:cfRule");
2891
+ }
2892
+ t.start("xm:sqref"), t.text(i), t.end("xm:sqref"), t.end("x14:conditionalFormatting");
2893
+ }
2894
+ t.end("x14:conditionalFormattings"), t.end("ext");
2895
+ }
2896
+ if (i.length > 0) {
2897
+ t.start("ext", {
2898
+ uri: m,
2899
+ "xmlns:x14": v
2900
+ }), t.start("x14:dataValidations", {
2901
+ "xmlns:xm": d,
2902
+ count: i.length
2903
+ });
2904
+ for (let e = 0; e < i.length; e++) {
2905
+ let { attrs: n, formula1: r, formula2: a, sqref: o } = i[e];
2906
+ t.start("x14:dataValidation", n), r !== void 0 && (t.start("x14:formula1"), t.start("xm:f"), t.text(r), t.end("xm:f"), t.end("x14:formula1")), a !== void 0 && (t.start("x14:formula2"), t.start("xm:f"), t.text(a), t.end("xm:f"), t.end("x14:formula2")), t.start("xm:sqref"), t.text(o), t.end("xm:sqref"), t.end("x14:dataValidation");
2907
+ }
2908
+ t.end("x14:dataValidations"), t.end("ext");
2909
+ }
2910
+ t.end("extLst");
2911
+ }(0, o, c, p, h), o.end("worksheet"), o.close();
2912
+ }
2913
+ }(),
2914
+ new class extends L {
2915
+ constructor() {
2916
+ super({
2917
+ kind: "sharedStrings",
2918
+ contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",
2919
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",
2920
+ path: "/xl/sharedStrings.xml"
2921
+ });
2922
+ }
2923
+ async emit(e, t) {
2924
+ let n = t.getXMLWriter(), r = e.json, i = r ? r.length : 0, a = t.getSharedStates().get("stringsCount") ?? 0;
2925
+ n.decl(), n.start("sst", {
2926
+ xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
2927
+ count: a,
2928
+ uniqueCount: i
2929
+ });
2930
+ for (let e = 0; e < i; e++) {
2931
+ let t = r[e];
2932
+ n.start("si");
2933
+ let i = te.test(t) ? b : void 0;
2934
+ n.start("t", i), n.text(ee(t)), n.end("t"), n.end("si");
2935
+ }
2936
+ n.end("sst"), n.close();
2937
+ }
2938
+ }(),
2939
+ new class extends L {
2940
+ constructor() {
2941
+ super({
2942
+ kind: "theme",
2943
+ contentType: "application/vnd.openxmlformats-officedocument.theme+xml",
2944
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",
2945
+ path: "/xl/theme/theme{n}.xml"
2946
+ });
2947
+ }
2948
+ async emit(e, t) {
2949
+ let n = t.getXMLWriter(), r = e.model, i = e.json;
2950
+ n.decl(), n.pushDefaultNamespace("a"), n.start("theme", {
2951
+ "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main",
2952
+ name: r.getName() || "Office Theme"
2953
+ }), n.start("themeElements"), function(e, t, n, r) {
2954
+ let i = n?.getColorScheme();
2955
+ if (i) {
2956
+ t.start(r, { name: i.getName() || "Office" });
2957
+ for (let e of Be) t.start(e), V(t, n, i["get" + e.charAt(0).toUpperCase() + e.slice(1)]()), t.end(e);
2958
+ t.end(r);
2959
+ }
2960
+ }(0, n, r, "clrScheme"), function(e, t, n, r) {
2961
+ n && (t.start(r, { name: n.getName() || "Office" }), Dt(e, t, n.getMajorFont() || "Calibri Light", "majorFont"), Dt(e, t, n.getMinorFont() || "Calibri", "minorFont"), t.end(r));
2962
+ }(t, n, r.getFontScheme(), "fontScheme"), function(e, t, n, r, i) {
2963
+ if (i?.fillStyleLst && i?.lnStyleLst && i?.effectStyleLst && i?.bgFillStyleLst) return void function(e, t, n, r, i) {
2964
+ let a = { getTheme: () => r };
2965
+ t.start(n, { name: "Office" }), t.start("fillStyleLst");
2966
+ for (let e of i.fillStyleLst) q(0, t, e, a);
2967
+ t.end("fillStyleLst"), t.start("lnStyleLst");
2968
+ for (let e of i.lnStyleLst) vt(0, t, e, a);
2969
+ t.end("lnStyleLst"), t.start("effectStyleLst");
2970
+ for (let n of i.effectStyleLst) t.start("effectStyle"), n.length > 0 ? xt(e, t, r, n) : t.empty("effectLst"), t.end("effectStyle");
2971
+ t.end("effectStyleLst"), t.start("bgFillStyleLst");
2972
+ for (let e of i.bgFillStyleLst) q(0, t, e, a);
2973
+ t.end("bgFillStyleLst"), t.end(n);
2974
+ }(e, t, n, r, i);
2975
+ if (i?.formatSchemeXml) return void t.raw(i.formatSchemeXml);
2976
+ t.start(n, { name: "Office" }), function(e, t) {
2977
+ t.start("fillStyleLst"), t.start("solidFill"), t.empty("schemeClr", { val: "phClr" }), t.end("solidFill"), t.start("gradFill", { rotWithShape: "1" }), t.start("gsLst"), t.start("gs", { pos: "0" }), t.start("schemeClr", { val: "phClr" }), t.empty("tint", { val: "50000" }), t.empty("satMod", { val: "300000" }), t.end("schemeClr"), t.end("gs"), t.start("gs", { pos: "35000" }), t.start("schemeClr", { val: "phClr" }), t.empty("tint", { val: "37000" }), t.empty("satMod", { val: "300000" }), t.end("schemeClr"), t.end("gs"), t.start("gs", { pos: "100000" }), t.start("schemeClr", { val: "phClr" }), t.empty("tint", { val: "15000" }), t.empty("satMod", { val: "350000" }), t.end("schemeClr"), t.end("gs"), t.end("gsLst"), t.empty("lin", {
2978
+ ang: "16200000",
2979
+ scaled: "1"
2980
+ }), t.end("gradFill"), t.start("gradFill", { rotWithShape: "1" }), t.start("gsLst"), t.start("gs", { pos: "0" }), t.start("schemeClr", { val: "phClr" }), t.empty("shade", { val: "51000" }), t.empty("satMod", { val: "130000" }), t.end("schemeClr"), t.end("gs"), t.start("gs", { pos: "80000" }), t.start("schemeClr", { val: "phClr" }), t.empty("shade", { val: "93000" }), t.empty("satMod", { val: "130000" }), t.end("schemeClr"), t.end("gs"), t.start("gs", { pos: "100000" }), t.start("schemeClr", { val: "phClr" }), t.empty("shade", { val: "94000" }), t.empty("satMod", { val: "135000" }), t.end("schemeClr"), t.end("gs"), t.end("gsLst"), t.empty("lin", {
2981
+ ang: "16200000",
2982
+ scaled: "0"
2983
+ }), t.end("gradFill"), t.end("fillStyleLst");
2984
+ }(0, t), function(e, t) {
2985
+ t.start("lnStyleLst");
2986
+ let n = [
2987
+ 9525,
2988
+ 25400,
2989
+ 38100
2990
+ ];
2991
+ for (let e = 0; e < 3; e++) t.start("ln", {
2992
+ w: n[e].toString(),
2993
+ cap: "flat",
2994
+ cmpd: "sng",
2995
+ algn: "ctr"
2996
+ }), t.start("solidFill"), t.start("schemeClr", { val: "phClr" }), t.empty("shade", { val: "95000" }), t.empty("satMod", { val: "105000" }), t.end("schemeClr"), t.end("solidFill"), t.empty("prstDash", { val: "solid" }), t.end("ln");
2997
+ t.end("lnStyleLst");
2998
+ }(0, t), function(e, t) {
2999
+ t.start("effectStyleLst");
3000
+ for (let e = 0; e < 3; e++) t.start("effectStyle"), t.start("effectLst"), e === 2 && (t.start("outerShdw", {
3001
+ blurRad: "40000",
3002
+ dist: "20000",
3003
+ dir: "5400000",
3004
+ rotWithShape: "0"
3005
+ }), t.start("srgbClr", { val: "000000" }), t.empty("alpha", { val: "38000" }), t.end("srgbClr"), t.end("outerShdw")), t.end("effectLst"), t.end("effectStyle");
3006
+ t.end("effectStyleLst");
3007
+ }(0, t), function(e, t) {
3008
+ t.start("bgFillStyleLst"), t.start("solidFill"), t.empty("schemeClr", { val: "phClr" }), t.end("solidFill"), t.start("gradFill", { rotWithShape: "1" }), t.start("gsLst"), t.start("gs", { pos: "0" }), t.start("schemeClr", { val: "phClr" }), t.empty("tint", { val: "40000" }), t.empty("satMod", { val: "350000" }), t.end("schemeClr"), t.end("gs"), t.start("gs", { pos: "40000" }), t.start("schemeClr", { val: "phClr" }), t.empty("tint", { val: "45000" }), t.empty("shade", { val: "99000" }), t.empty("satMod", { val: "350000" }), t.end("schemeClr"), t.end("gs"), t.start("gs", { pos: "100000" }), t.start("schemeClr", { val: "phClr" }), t.empty("shade", { val: "20000" }), t.empty("satMod", { val: "255000" }), t.end("schemeClr"), t.end("gs"), t.end("gsLst"), t.empty("path", { path: "circle" }), t.empty("fillToRect", {
3009
+ l: "50000",
3010
+ t: "-80000",
3011
+ r: "50000",
3012
+ b: "180000"
3013
+ }), t.end("gradFill"), t.start("gradFill", { rotWithShape: "1" }), t.start("gsLst"), t.start("gs", { pos: "0" }), t.start("schemeClr", { val: "phClr" }), t.empty("tint", { val: "80000" }), t.empty("satMod", { val: "300000" }), t.end("schemeClr"), t.end("gs"), t.start("gs", { pos: "100000" }), t.start("schemeClr", { val: "phClr" }), t.empty("shade", { val: "30000" }), t.empty("satMod", { val: "200000" }), t.end("schemeClr"), t.end("gs"), t.end("gsLst"), t.empty("path", { path: "circle" }), t.empty("fillToRect", {
3014
+ l: "50000",
3015
+ t: "50000",
3016
+ r: "50000",
3017
+ b: "50000"
3018
+ }), t.end("gradFill"), t.end("bgFillStyleLst");
3019
+ }(0, t), t.end(n);
3020
+ }(t, n, "fmtScheme", r, i), n.end("themeElements"), n.start("objectDefaults"), n.end("objectDefaults"), n.start("extraClrSchemeLst"), n.end("extraClrSchemeLst"), n.end("theme"), n.close();
3021
+ }
3022
+ }(),
3023
+ new class extends L {
3024
+ constructor() {
3025
+ super({
3026
+ kind: "styles",
3027
+ contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",
3028
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",
3029
+ path: "/xl/styles.xml"
3030
+ });
3031
+ }
3032
+ async emit(e, t) {
3033
+ let n = t.getXMLWriter(), r = e.json, i = (e.theme, e.styles);
3034
+ n.decl(), n.start("styleSheet", {
3035
+ xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
3036
+ "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006",
3037
+ "mc:Ignorable": "x14ac x16r2 xr",
3038
+ "xmlns:x14ac": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac",
3039
+ "xmlns:x16r2": "http://schemas.microsoft.com/office/spreadsheetml/2015/02/main",
3040
+ "xmlns:xr": "http://schemas.microsoft.com/office/spreadsheetml/2014/revision"
3041
+ });
3042
+ let a = function(e, t) {
3043
+ let n = t?.direct;
3044
+ n && n.length !== 0 || (n = [{}]);
3045
+ let r = n.length, i = Array(r);
3046
+ for (let t = 0; t < r; t++) {
3047
+ let r = t === 0 ? {
3048
+ ...n[t],
3049
+ named: N.BuiltInName.Normal
3050
+ } : n[t], a = e.resolve(r), o = {};
3051
+ r.named !== void 0 && (o.named = r.named), r.quotePrefix !== void 0 && (o.quotePrefix = r.quotePrefix);
3052
+ for (let e = 0; e < Ot.length; e++) {
3053
+ let t = Ot[e];
3054
+ if (r[t] === void 0 && t !== "alignment") continue;
3055
+ let n = a?.[t] ?? r[t];
3056
+ n !== void 0 && (o[t] = n);
3057
+ }
3058
+ i[t] = o;
3059
+ }
3060
+ return i;
3061
+ }(i, r), o = function(e, t, n) {
3062
+ let r = {
3063
+ fontMap: /* @__PURE__ */ new Map(),
3064
+ fonts: [],
3065
+ fillMap: /* @__PURE__ */ new Map(),
3066
+ fills: [],
3067
+ borderMap: /* @__PURE__ */ new Map(),
3068
+ borders: [],
3069
+ numFmtMap: /* @__PURE__ */ new Map(),
3070
+ numFmtsCustom: [],
3071
+ namedStyleMap: /* @__PURE__ */ new Map(),
3072
+ namedStyles: []
3073
+ };
3074
+ (function(e, t) {
3075
+ let n = (e.getNamed(N.BuiltInName.Normal).toJSON().style ?? {}).font ?? {};
3076
+ t.fontMap.set(C.JSONStableStringify(n), "0"), t.fonts.push(n);
3077
+ })(e, r), function(e) {
3078
+ let t = { type: "none" };
3079
+ e.fillMap.set(C.JSONStableStringify(t), "0"), e.fills.push(t);
3080
+ let n = {
3081
+ type: "pattern",
3082
+ patternType: "gray125"
3083
+ };
3084
+ e.fillMap.set(C.JSONStableStringify(n), "1"), e.fills.push(n);
3085
+ }(r), function(e) {
3086
+ let t = {
3087
+ bottom: { style: "none" },
3088
+ left: { style: "none" },
3089
+ right: { style: "none" },
3090
+ top: { style: "none" }
3091
+ };
3092
+ e.borderMap.set(C.JSONStableStringify(t), "0"), e.borders.push(t);
3093
+ }(r), function(e, t) {
3094
+ At(e, e.getNamed(N.BuiltInName.Normal).toJSON(), t);
3095
+ }(e, r);
3096
+ let i = t?.named ?? T.EmptyArray;
3097
+ for (let t of i) At(e, t, r);
3098
+ for (let t of n) kt(e, t, r);
3099
+ return r;
3100
+ }(i, r, a), s = t.getSharedStates().get(tt), c = function(e, t = 0) {
3101
+ let n = e?.tables;
3102
+ if (!n) return null;
3103
+ let r = n.styles;
3104
+ if (!r) return null;
3105
+ let i = [], a = /* @__PURE__ */ new Map(), o = Object.keys(r), s = [...It].reverse();
3106
+ for (let e of o) {
3107
+ let n = r[e];
3108
+ for (let r of s) {
3109
+ let o = n[r];
3110
+ if (!o) continue;
3111
+ let s = {};
3112
+ if (o.font && (s.font = o.font), o.fill && (s.fill = o.fill), o.border && (s.border = o.border), o.numberFormat !== void 0 && (s.numberFormat = o.numberFormat), Object.keys(s).length === 0) continue;
3113
+ let c = t + i.length;
3114
+ i.push(s);
3115
+ let l = `${e}:${r}`;
3116
+ a.set(l, c);
3117
+ }
3118
+ }
3119
+ return {
3120
+ dxfs: i,
3121
+ dxfIndexMap: a
3122
+ };
3123
+ }(r, s?.getCount() ?? 0);
3124
+ (function(e, t, n) {
3125
+ let r = n.numFmtsCustom, i = r.length;
3126
+ if (i !== 0) {
3127
+ t.start("numFmts", { count: String(i) });
3128
+ for (let e = 0; e < i; e++) {
3129
+ let n = r[e];
3130
+ t.empty("numFmt", {
3131
+ numFmtId: String(e + Ft),
3132
+ formatCode: n
3133
+ });
3134
+ }
3135
+ t.end("numFmts");
3136
+ }
3137
+ })(0, n, o), function(e, t, n, r) {
3138
+ let i = r.fonts, a = i.length;
3139
+ t.start("fonts", {
3140
+ count: String(a),
3141
+ "x14ac:knownFonts": "1"
3142
+ });
3143
+ for (let r of i) jt(e, t, r, n);
3144
+ t.end("fonts");
3145
+ }(t, n, i, o), function(e, t, n, r) {
3146
+ let i = r.fills, a = i.length;
3147
+ t.start("fills", { count: String(a) });
3148
+ for (let e of i) q(0, t, e, n, !0);
3149
+ t.end("fills");
3150
+ }(0, n, i, o), function(e, t, n, r) {
3151
+ let i = r.borders, a = i.length;
3152
+ t.start("borders", { count: String(a) });
3153
+ let o = n.getTheme();
3154
+ for (let n of i) Mt(e, t, n, o, !1);
3155
+ t.end("borders");
3156
+ }(t, n, i, o), function(e, t, n, r, i) {
3157
+ let a = i.namedStyles, o = a.length;
3158
+ t.start("cellStyleXfs", { count: String(o) });
3159
+ for (let r of a) Pt(e, t, n, r.style ?? T.EmptyObject, i, !1);
3160
+ t.end("cellStyleXfs");
3161
+ }(t, n, i, 0, o), function(e, t, n, r, i) {
3162
+ let a = r.length;
3163
+ t.start("cellXfs", { count: String(a) });
3164
+ for (let o = 0; o < a; o++) Pt(e, t, n, r[o], i, !0);
3165
+ t.end("cellXfs");
3166
+ }(t, n, i, a, o), function(e, t, n, r, i) {
3167
+ let a = i.namedStyles, o = a.length;
3168
+ t.start("cellStyles", { count: String(o) });
3169
+ let s = i.namedStyleMap;
3170
+ for (let e = 0; e < o; e++) {
3171
+ let r = a[e], i = r.name, o = i.toLowerCase(), c = {
3172
+ name: i,
3173
+ xfId: s.get(o)
3174
+ };
3175
+ r.hidden && (c.hidden = "1"), r.iLevel && (c.iLevel = String(r.iLevel));
3176
+ let l = null;
3177
+ l = o === N.BuiltInName.Normal.toLowerCase() ? 0 : n.getNamed(i).getBuiltInID(), l !== null && (c.builtinId = String(l), c.customBuiltin = "1"), t.empty("cellStyle", c);
3178
+ }
3179
+ t.end("cellStyles");
3180
+ }(0, n, i, 0, o), function(e, t, n, r, i) {
3181
+ let a = [...i?.getDxfs() ?? [], ...r?.dxfs ?? []];
3182
+ if (a.length === 0) return void t.empty("dxfs", { count: "0" });
3183
+ let o = n.getTheme();
3184
+ t.start("dxfs", { count: String(a.length) });
3185
+ let s = Ft;
3186
+ for (let r of a) {
3187
+ if (t.start("dxf"), r.font && jt(e, t, r.font, n, !0), r.numberFormat !== void 0 && r.numberFormat !== null) {
3188
+ let e = F.toBuiltInID(r.numberFormat), n = typeof e == "number", i = n ? F.builtInFormat(e) : String(e);
3189
+ i && t.empty("numFmt", {
3190
+ numFmtId: String(n ? e : s++),
3191
+ formatCode: i
3192
+ });
3193
+ }
3194
+ if (r.fill && q(0, t, r.fill, n, !0, !0), r.alignment) {
3195
+ let n = Nt(e, t, r.alignment, !0);
3196
+ n && t.empty("alignment", n);
3197
+ }
3198
+ r.border && Mt(e, t, r.border, o, !0), t.end("dxf");
3199
+ }
3200
+ t.end("dxfs");
3201
+ }(t, n, i, c, s), function(e, t, n, r, i) {
3202
+ let a = r?.tables, o = a?.styles ?? null, s = o ? Object.keys(o) : null, c = s ? s.length : 0, l = {
3203
+ count: String(c),
3204
+ defaultTableStyle: a?.defaultTableStyle ?? "TableStyleMedium2",
3205
+ defaultPivotStyle: a?.defaultPivotStyle ?? "PivotStyleLight16"
3206
+ };
3207
+ if (c === 0) return void t.empty("tableStyles", l);
3208
+ t.start("tableStyles", l);
3209
+ for (let e of s) {
3210
+ let n = o[e], r = [];
3211
+ for (let e of It) {
3212
+ let t = n[e];
3213
+ t && r.push([e, t]);
3214
+ }
3215
+ let a = {
3216
+ name: e,
3217
+ pivot: n.pivot ? "1" : "0",
3218
+ count: String(r.length)
3219
+ };
3220
+ t.start("tableStyle", a);
3221
+ for (let [n, a] of r) {
3222
+ let r = `${e}:${n}`, o = i?.dxfIndexMap.get(r) ?? "0", s = {};
3223
+ s.type = n, a.size !== void 0 && (s.size = String(a.size)), s.dxfId = String(o), t.empty("tableStyleElement", s);
3224
+ }
3225
+ t.end("tableStyle");
3226
+ }
3227
+ t.end("tableStyles");
3228
+ }(0, n, 0, r, c), function(e, t, n, r) {
3229
+ let i = r?.indexedColors && r.indexedColors.length > 0, a = r?.mruColors && r.mruColors.length > 0;
3230
+ if (!(!i && !a)) {
3231
+ if (t.start("colors"), i) {
3232
+ t.start("indexedColors");
3233
+ for (let e of r.indexedColors) {
3234
+ let n = Ge(e, !0);
3235
+ t.empty("rgbColor", { rgb: n });
3236
+ }
3237
+ t.end("indexedColors");
3238
+ }
3239
+ if (a) {
3240
+ t.start("mruColors");
3241
+ for (let e of r.mruColors) {
3242
+ let n = Ge(e);
3243
+ t.empty("color", { rgb: n });
3244
+ }
3245
+ t.end("mruColors");
3246
+ }
3247
+ t.end("colors");
3248
+ }
3249
+ }(0, n, 0, r), function(e, t) {
3250
+ t.start("extLst"), t.start("ext", {
3251
+ uri: "{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}",
3252
+ "xmlns:x14": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"
3253
+ }), t.empty("x14:slicerStyles", { defaultSlicerStyle: "SlicerStyleLight1" }), t.end("ext"), t.start("ext", {
3254
+ uri: "{9260A510-F301-46a8-8635-F512D64BE5F5}",
3255
+ "xmlns:x15": "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"
3256
+ }), t.empty("x15:timelineStyles", { defaultTimelineStyle: "TimeSlicerStyleLight1" }), t.end("ext"), t.end("extLst");
3257
+ }(0, n), n.end("styleSheet"), n.close();
3258
+ }
3259
+ }(),
3260
+ new class extends L {
3261
+ constructor() {
3262
+ super({
3263
+ kind: "propsCore",
3264
+ contentType: "application/vnd.openxmlformats-package.core-properties+xml",
3265
+ relTypeUri: "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",
3266
+ path: "/docProps/core.xml"
3267
+ });
3268
+ }
3269
+ async emit(e, t) {
3270
+ let n = t.getXMLWriter();
3271
+ n.decl(), n.start("cp:coreProperties", {
3272
+ "xmlns:cp": "http://schemas.openxmlformats.org/package/2006/metadata/core-properties",
3273
+ "xmlns:dc": "http://purl.org/dc/elements/1.1/",
3274
+ "xmlns:dcterms": "http://purl.org/dc/terms/",
3275
+ "xmlns:dcmitype": "http://purl.org/dc/dcmitype/",
3276
+ "xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance"
3277
+ });
3278
+ let r = /* @__PURE__ */ new Date(), i = [
3279
+ ["creator", "SheetXL"],
3280
+ ["lastModifiedBy", "SheetXL"],
3281
+ ["created", Lt(r)],
3282
+ ["modified", Lt(r)]
3283
+ ];
3284
+ for (let e of i) Rt(n, e[0], e[1]);
3285
+ n.end("cp:coreProperties"), n.close();
3286
+ }
3287
+ }(),
3288
+ new class extends L {
3289
+ constructor() {
3290
+ super({
3291
+ kind: "propsApp",
3292
+ contentType: "application/vnd.openxmlformats-officedocument.extended-properties+xml",
3293
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",
3294
+ path: "/docProps/app.xml"
3295
+ });
3296
+ }
3297
+ async emit(e, t) {
3298
+ let n = t.getXMLWriter(), r = e.model, i = await ie.getDetails(), a = function(e) {
3299
+ if (!e || typeof e != "string") return Ze;
3300
+ if (e === "local" || e === "dev" || e === "development") return "00.0000";
3301
+ let t = e.match(/^(\d+)(?:\.(\d+))?(?:\.(\d+))?/);
3302
+ if (!t) return Ze;
3303
+ let n = parseInt(t[1], 10), r = parseInt(t[2] || "0", 10);
3304
+ return n > 99 || r > 9999 ? Ze : `${n.toString()}.${r.toString().padStart(4, "0")}`;
3305
+ }(i.getBuildVersion()), o = i.getLicensee() || "";
3306
+ n.setValidationDisabled(!0), n.decl(), n.start("Properties", {
3307
+ xmlns: "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",
3308
+ "xmlns:vt": "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"
3309
+ }), Q(t, n, "Application", "SheetXL"), Q(t, n, "DocSecurity", "0"), Q(t, n, "ScaleCrop", "false"), zt(t, n, r), Q(t, n, "Company", o), Q(t, n, "LinksUpToDate", "false"), Q(t, n, "SharedDoc", "false"), Q(t, n, "HyperlinksChanged", "false"), Q(t, n, "AppVersion", a), n.end("Properties"), n.close();
3310
+ }
3311
+ }(),
3312
+ new class extends L {
3313
+ constructor() {
3314
+ super({
3315
+ kind: "metadata",
3316
+ contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",
3317
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",
3318
+ path: "/xl/metadata.xml"
3319
+ });
3320
+ }
3321
+ emit(e, t) {
3322
+ let n = t.getXMLWriter(), r = e.hasCellMeta(), i = e.hasValueMeta(), a = e.getDAPRFutureMetadataBlocks(), o = e.getRVFutureMetadataBlocks(), s = e.getValueMeta(), c = 0, l = 0, u = 0;
3323
+ r && (c = ++u), i && (l = ++u);
3324
+ let d = { xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main" };
3325
+ if (r && (d["xmlns:xda"] = "http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray"), i && (d["xmlns:xlrd"] = "http://schemas.microsoft.com/office/spreadsheetml/2017/richdata"), n.decl(), n.start("metadata", d), n.start("metadataTypes", { count: u }), r && n.empty("metadataType", {
3326
+ name: "XLDAPR",
3327
+ ...Bt,
3328
+ cellMeta: "1"
3329
+ }), i && n.empty("metadataType", {
3330
+ name: "XLRICHVALUE",
3331
+ ...Bt
3332
+ }), n.end("metadataTypes"), r) {
3333
+ n.start("futureMetadata", {
3334
+ name: "XLDAPR",
3335
+ count: a.length
3336
+ });
3337
+ for (let e of a) n.start("bk"), n.start("extLst"), n.start("ext", { uri: "{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}" }), n.empty("xda:dynamicArrayProperties", {
3338
+ fDynamic: e.fDynamic,
3339
+ fCollapsed: e.fCollapsed
3340
+ }), n.end("ext"), n.end("extLst"), n.end("bk");
3341
+ n.end("futureMetadata");
3342
+ }
3343
+ if (i) {
3344
+ n.start("futureMetadata", {
3345
+ name: "XLRICHVALUE",
3346
+ count: o.length
3347
+ });
3348
+ for (let e of o) n.start("bk"), n.start("extLst"), n.start("ext", { uri: "{3e2802c4-a4d2-4d8b-9148-e3be6c30e623}" }), n.empty("xlrd:rvb", { i: e }), n.end("ext"), n.end("extLst"), n.end("bk");
3349
+ n.end("futureMetadata");
3350
+ }
3351
+ if (r) {
3352
+ n.start("cellMetadata", { count: a.length });
3353
+ for (let e = 0; e < a.length; e++) n.start("bk"), n.empty("rc", {
3354
+ t: c,
3355
+ v: e
3356
+ }), n.end("bk");
3357
+ n.end("cellMetadata");
3358
+ }
3359
+ if (i) {
3360
+ n.start("valueMetadata", { count: s.length });
3361
+ for (let e of s) n.start("bk"), n.empty("rc", {
3362
+ t: l,
3363
+ v: e
3364
+ }), n.end("bk");
3365
+ n.end("valueMetadata");
3366
+ }
3367
+ n.end("metadata"), n.close();
3368
+ }
3369
+ }(),
3370
+ new class extends L {
3371
+ constructor() {
3372
+ super({
3373
+ kind: "richValue",
3374
+ contentType: "application/vnd.ms-excel.rdrichvalue+xml",
3375
+ relTypeUri: "http://schemas.microsoft.com/office/2017/06/relationships/rdRichValue",
3376
+ path: "./richData/rdrichvalue.xml"
3377
+ });
3378
+ }
3379
+ async emit(e, t) {
3380
+ let n = t.getXMLWriter(), r = e.getEntries(), i = r.length;
3381
+ n.decl(), n.start("rvData", {
3382
+ xmlns: "http://schemas.microsoft.com/office/spreadsheetml/2017/richdata",
3383
+ count: i
3384
+ });
3385
+ for (let t of r) {
3386
+ let r = e.handlerStructureIndex(t.handler);
3387
+ n.start("rv", { s: r });
3388
+ let i = t.handler.getValues(t.rawValue);
3389
+ for (let e of i) n.start("v"), n.text(e), n.end("v");
3390
+ n.end("rv");
3391
+ }
3392
+ n.end("rvData"), n.close();
3393
+ }
3394
+ }(),
3395
+ new class extends L {
3396
+ constructor() {
3397
+ super({
3398
+ kind: "richValueStructure",
3399
+ contentType: "application/vnd.ms-excel.rdrichvaluestructure+xml",
3400
+ relTypeUri: "http://schemas.microsoft.com/office/2017/06/relationships/rdRichValueStructure",
3401
+ path: "./richData/rdrichvaluestructure.xml"
3402
+ });
3403
+ }
3404
+ async emit(e, t) {
3405
+ let n = t.getXMLWriter(), r = e.uniqueHandlers(), i = r.length;
3406
+ n.decl(), n.start("rvStructures", {
3407
+ xmlns: "http://schemas.microsoft.com/office/spreadsheetml/2017/richdata",
3408
+ count: i
3409
+ });
3410
+ for (let e of r) {
3411
+ n.start("s", { t: e.type });
3412
+ for (let [t, r] of e.props) n.empty("k", {
3413
+ n: t,
3414
+ t: r
3415
+ });
3416
+ n.end("s");
3417
+ }
3418
+ n.end("rvStructures"), n.close();
3419
+ }
3420
+ }(),
3421
+ new class extends L {
3422
+ constructor() {
3423
+ super({
3424
+ kind: "richValueTypes",
3425
+ contentType: "application/vnd.ms-excel.rdrichvaluetypes+xml",
3426
+ relTypeUri: "http://schemas.microsoft.com/office/2017/06/relationships/rdRichValueTypes",
3427
+ path: "./richData/rdRichValueTypes.xml"
3428
+ });
3429
+ }
3430
+ async emit(e, t) {
3431
+ let n = t.getXMLWriter();
3432
+ n.decl(), n.start("rvTypesInfo", {
3433
+ xmlns: "http://schemas.microsoft.com/office/spreadsheetml/2017/richdata2",
3434
+ "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006",
3435
+ "mc:Ignorable": "x",
3436
+ "xmlns:x": "http://schemas.openxmlformats.org/spreadsheetml/2006/main"
3437
+ });
3438
+ let r = [
3439
+ ["_self", ["ExcludeFromFile", "ExcludeFromCalcComparison"]],
3440
+ ["_DisplayString", ["ExcludeFromCalcComparison"]],
3441
+ ["_Flags", ["ExcludeFromCalcComparison"]],
3442
+ ["_Format", ["ExcludeFromCalcComparison"]],
3443
+ ["_SubLabel", ["ExcludeFromCalcComparison"]],
3444
+ ["_Attribution", ["ExcludeFromCalcComparison"]],
3445
+ ["_Icons", ["ExcludeFromCalcComparison"]],
3446
+ ["_Display", ["ExcludeFromCalcComparison"]],
3447
+ ["_CanonicalPropertyNames", ["ExcludeFromCalcComparison"]],
3448
+ ["_ClassificationId", ["ExcludeFromCalcComparison"]]
3449
+ ];
3450
+ n.start("global"), n.start("keyFlags");
3451
+ for (let [e, t] of r) {
3452
+ n.start("key", { name: e });
3453
+ for (let e of t) n.empty("flag", {
3454
+ name: e,
3455
+ value: "1"
3456
+ });
3457
+ n.end("key");
3458
+ }
3459
+ n.end("keyFlags"), n.end("global"), n.end("rvTypesInfo"), n.close();
3460
+ }
3461
+ }(),
3462
+ new class extends L {
3463
+ constructor() {
3464
+ super({
3465
+ kind: "drawing",
3466
+ contentType: "application/vnd.openxmlformats-officedocument.drawing+xml",
3467
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",
3468
+ path: "../drawings/drawing{n}.xml"
3469
+ });
3470
+ }
3471
+ async emit(e, t) {
3472
+ let n = t.getXMLWriter();
3473
+ n.decl(), n.pushDefaultNamespace("xdr"), n.start("wsDr", {
3474
+ "xmlns:xdr": "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",
3475
+ "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main"
3476
+ });
3477
+ let r = /* @__PURE__ */ new Map(), i = e.sheet, a = e.movables, o = e.jsonMovables, s = o ? o.length : 0, c = 0;
3478
+ for (let e = 0; e < s; e++) {
3479
+ let t = o[e].content?.json?.sourceId;
3480
+ typeof t == "number" && t > c && (c = t);
3481
+ }
3482
+ let l = /* @__PURE__ */ new Map(), u;
3483
+ if (c > 0) {
3484
+ let e = t.getSharedStates();
3485
+ u = e.get("uniqueIdCounter"), u || (u = /* @__PURE__ */ new Map(), e.set("uniqueIdCounter", u)), u.set(i, Math.max(u.get(i) ?? 1, c));
3486
+ let n = /* @__PURE__ */ new Set();
3487
+ for (let e = 0; e < s; e++) {
3488
+ let t = o[e].content?.json?.sourceId;
3489
+ if (typeof t == "number") if (n.has(t)) {
3490
+ let t = u.get(i) + 1;
3491
+ u.set(i, t), l.set(o[e], t);
3492
+ } else n.add(t);
3493
+ }
3494
+ }
3495
+ for (let e = 0; e < s; e++) {
3496
+ let s = o[e], c = a[e], u = s.content?.type;
3497
+ switch (n.start("twoCellAnchor", { editAs: s.anchorType || "twoCell" }), sn(n, "from", s.anchor.tl), sn(n, "to", s.anchor.br), u) {
3498
+ case "picture":
3499
+ await qt(t, i, r, c, s);
3500
+ break;
3501
+ case "chart":
3502
+ await Yt(t, i, r, c, s, l.get(s));
3503
+ break;
3504
+ case "shape":
3505
+ await $t(t, i, r, c, s, l.get(s));
3506
+ break;
3507
+ case "smartArt":
3508
+ await Xt(t, i, r, c, s);
3509
+ break;
3510
+ case "slicer":
3511
+ await Zt(t, i, r, c, s);
3512
+ break;
3513
+ case "graphicFrame":
3514
+ await Qt(t, i, r, c, s);
3515
+ break;
3516
+ default: await $(t, i, r, c, s);
3517
+ }
3518
+ n.empty("clientData"), n.end("twoCellAnchor");
3519
+ }
3520
+ n.end("wsDr"), n.close();
3521
+ }
3522
+ }(),
3523
+ new class extends L {
3524
+ constructor() {
3525
+ super({
3526
+ kind: "table",
3527
+ contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml",
3528
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",
3529
+ path: "../tables/table{n}.xml"
3530
+ });
3531
+ }
3532
+ async emit(e, t) {
3533
+ let n = t.getXMLWriter();
3534
+ n.decl();
3535
+ let r = {
3536
+ xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
3537
+ "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006",
3538
+ "mc:Ignorable": "xr xr3",
3539
+ "xmlns:xr": "http://schemas.microsoft.com/office/spreadsheetml/2014/revision",
3540
+ "xmlns:xr3": "http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"
3541
+ }, i = e.json, a = e.model;
3542
+ a.isShowHeaders(), r.id = ++cn, r.name = i.name?.trim(), r.displayName = i.description ?? i.name, r.ref = e.ref, i.headerRowCount !== 1 && (r.headerRowCount = i.headerRowCount), i.totalsRowCount !== 0 && (r.totalsRowCount = i.totalsRowCount), a.isShowTotals() || (r.totalsRowShown = "0"), n.start("table", r), a.isShowHeaders() && qe(t, n, a, i), ln(t, n, a, i), un(t, n, a, i), n.end("table"), n.close();
3543
+ }
3544
+ }(),
3545
+ new class extends L {
3546
+ constructor() {
3547
+ super({
3548
+ kind: "chart",
3549
+ contentType: "application/vnd.openxmlformats-officedocument.drawingml.chart+xml",
3550
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",
3551
+ path: "../charts/chart{n}.xml"
3552
+ });
3553
+ }
3554
+ async emit(e, t) {
3555
+ let n = t.getXMLWriter();
3556
+ n.decl(), n.pushDefaultNamespace("c"), n.start("chartSpace", {
3557
+ "xmlns:c": "http://schemas.openxmlformats.org/drawingml/2006/chart",
3558
+ "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main",
3559
+ "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
3560
+ "xmlns:c16r2": "http://schemas.microsoft.com/office/drawing/2015/06/chart"
3561
+ }), n.empty("date1904", { val: "0" }), n.empty("lang", { val: "en-US" }), n.empty("roundedCorners", { val: "0" }), pn(t, n, e.model, e.json), mn(t, n, e.styles, e.model, e.json), hn(t, n, e.model, e.json), n.end("chartSpace"), n.popDefaultNamespace(), n.close(), t.addPart("chartStyle", { styles: e.styles }), t.addPart("chartColors", { styles: e.styles });
3562
+ }
3563
+ }(),
3564
+ new class extends L {
3565
+ constructor() {
3566
+ super({
3567
+ kind: "chartStyle",
3568
+ contentType: "application/vnd.ms-office.chartstyle+xml",
3569
+ relTypeUri: "http://schemas.microsoft.com/office/2011/relationships/chartStyle",
3570
+ path: "./style{n}.xml"
3571
+ });
3572
+ }
3573
+ async emit(e, t) {
3574
+ let n = t.getXMLWriter();
3575
+ n.pushDefaultNamespace("cs"), n.start("chartStyle", {
3576
+ "xmlns:cs": "http://schemas.microsoft.com/office/drawing/2012/chartStyle",
3577
+ "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main",
3578
+ id: "297"
3579
+ }), _n(t, n, vn, e.styles), n.end("chartStyle"), n.close();
3580
+ }
3581
+ }(),
3582
+ new class extends L {
3583
+ constructor() {
3584
+ super({
3585
+ kind: "chartColors",
3586
+ contentType: "application/vnd.ms-office.chartcolorstyle+xml",
3587
+ relTypeUri: "http://schemas.microsoft.com/office/2011/relationships/chartColorStyle",
3588
+ path: "./colors{n}.xml"
3589
+ });
3590
+ }
3591
+ async emit(e, t) {
3592
+ let n = t.getXMLWriter();
3593
+ n.pushDefaultNamespace("cs"), n.start("cs:colorStyle", {
3594
+ "xmlns:cs": "http://schemas.microsoft.com/office/drawing/2012/chartStyle",
3595
+ "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main",
3596
+ meth: "cycle",
3597
+ id: "10"
3598
+ }), n.empty("a:schemeClr", { val: "accent1" }), n.empty("a:schemeClr", { val: "accent2" }), n.empty("a:schemeClr", { val: "accent3" }), n.empty("a:schemeClr", { val: "accent4" }), n.empty("a:schemeClr", { val: "accent5" }), n.empty("a:schemeClr", { val: "accent6" }), yn(t, n, bn), n.end("cs:colorStyle"), n.close();
3599
+ }
3600
+ }()
3601
+ ], Sn = async (e, t) => {
3602
+ let n = new Ne();
3603
+ for (let e of xn) n.register(e);
3604
+ let r = Cn, i = R.createUint8Array({
3605
+ lastModDate: new Date(1899, 11, 29, 19, 0, 0),
3606
+ level: r
3607
+ }), a = e.getOrigin(), o = t?.format === "Excel" ? h(a) : null, s = /* @__PURE__ */ new Map(), c = new je(i, n, {
3608
+ strictDuplicateChildren: !0,
3609
+ onPartEmitted: t?.onPartEmitted,
3610
+ mapState: s,
3611
+ sourcePackage: o
3612
+ });
3613
+ c.addPart("workbook", e, "/xl/workbook.xml"), await c.waitEmit(), c.addPart("propsCore", {}), c.addPart("propsApp", { model: e });
3614
+ let l = await c.build();
3615
+ return l.byteOffset === 0 && l.byteLength === l.buffer.byteLength ? l.buffer : l.slice().buffer;
3616
+ }, Cn = 1;
3617
+ export { Sn as writeXLSX };