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