@fiduswriter/document 0.1.0-alpha.4 → 0.1.0-alpha.6
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/dist/bibliography/common.d.ts +9 -91
- package/dist/bibliography/common.d.ts.map +1 -1
- package/dist/bibliography/common.js +3 -2
- package/dist/bibliography/common.js.map +1 -1
- package/dist/bibliography/csl_bib.d.ts +1 -1
- package/dist/bibliography/csl_bib.d.ts.map +1 -1
- package/dist/bibliography/csl_bib.js +7 -7
- package/dist/bibliography/csl_bib.js.map +1 -1
- package/dist/citations/citeproc_sys.d.ts +9 -10
- package/dist/citations/citeproc_sys.d.ts.map +1 -1
- package/dist/citations/citeproc_sys.js +6 -1
- package/dist/citations/citeproc_sys.js.map +1 -1
- package/dist/citations/format.d.ts +33 -16
- package/dist/citations/format.d.ts.map +1 -1
- package/dist/citations/format.js +29 -4
- package/dist/citations/format.js.map +1 -1
- package/dist/editor/e2ee/encryptor.d.ts +35 -35
- package/dist/editor/e2ee/encryptor.d.ts.map +1 -1
- package/dist/editor/e2ee/encryptor.js +31 -31
- package/dist/editor/e2ee/encryptor.js.map +1 -1
- package/dist/exporter/docx/citations.d.ts +27 -17
- package/dist/exporter/docx/citations.d.ts.map +1 -1
- package/dist/exporter/docx/citations.js +24 -7
- package/dist/exporter/docx/citations.js.map +1 -1
- package/dist/exporter/docx/comments.d.ts +15 -11
- package/dist/exporter/docx/comments.d.ts.map +1 -1
- package/dist/exporter/docx/comments.js +47 -14
- package/dist/exporter/docx/comments.js.map +1 -1
- package/dist/exporter/docx/footnotes.d.ts +36 -31
- package/dist/exporter/docx/footnotes.d.ts.map +1 -1
- package/dist/exporter/docx/footnotes.js +46 -12
- package/dist/exporter/docx/footnotes.js.map +1 -1
- package/dist/exporter/docx/images.d.ts +23 -12
- package/dist/exporter/docx/images.d.ts.map +1 -1
- package/dist/exporter/docx/images.js +35 -20
- package/dist/exporter/docx/images.js.map +1 -1
- package/dist/exporter/docx/index.d.ts +11 -17
- package/dist/exporter/docx/index.d.ts.map +1 -1
- package/dist/exporter/docx/index.js +15 -7
- package/dist/exporter/docx/index.js.map +1 -1
- package/dist/exporter/docx/lists.d.ts +27 -22
- package/dist/exporter/docx/lists.d.ts.map +1 -1
- package/dist/exporter/docx/lists.js +77 -30
- package/dist/exporter/docx/lists.js.map +1 -1
- package/dist/exporter/docx/math.d.ts +9 -9
- package/dist/exporter/docx/math.d.ts.map +1 -1
- package/dist/exporter/docx/math.js +22 -5
- package/dist/exporter/docx/math.js.map +1 -1
- package/dist/exporter/docx/metadata.d.ts +12 -9
- package/dist/exporter/docx/metadata.d.ts.map +1 -1
- package/dist/exporter/docx/metadata.js +59 -26
- package/dist/exporter/docx/metadata.js.map +1 -1
- package/dist/exporter/docx/rels.d.ts +14 -12
- package/dist/exporter/docx/rels.d.ts.map +1 -1
- package/dist/exporter/docx/rels.js +37 -22
- package/dist/exporter/docx/rels.js.map +1 -1
- package/dist/exporter/docx/render.d.ts +17 -15
- package/dist/exporter/docx/render.d.ts.map +1 -1
- package/dist/exporter/docx/render.js +37 -31
- package/dist/exporter/docx/render.js.map +1 -1
- package/dist/exporter/docx/richtext.d.ts +8 -8
- package/dist/exporter/docx/richtext.d.ts.map +1 -1
- package/dist/exporter/docx/richtext.js +61 -43
- package/dist/exporter/docx/richtext.js.map +1 -1
- package/dist/exporter/docx/tables.d.ts +11 -9
- package/dist/exporter/docx/tables.d.ts.map +1 -1
- package/dist/exporter/docx/tables.js +16 -10
- package/dist/exporter/docx/tables.js.map +1 -1
- package/dist/exporter/docx/tools.d.ts +3 -2
- package/dist/exporter/docx/tools.d.ts.map +1 -1
- package/dist/exporter/docx/tools.js +3 -3
- package/dist/exporter/docx/tools.js.map +1 -1
- package/dist/exporter/epub/index.d.ts +11 -3
- package/dist/exporter/epub/index.d.ts.map +1 -1
- package/dist/exporter/epub/index.js +10 -3
- package/dist/exporter/epub/index.js.map +1 -1
- package/dist/exporter/epub/templates.d.ts +62 -31
- package/dist/exporter/epub/templates.d.ts.map +1 -1
- package/dist/exporter/epub/templates.js +1 -1
- package/dist/exporter/epub/templates.js.map +1 -1
- package/dist/exporter/epub/tools.d.ts +12 -4
- package/dist/exporter/epub/tools.d.ts.map +1 -1
- package/dist/exporter/epub/tools.js +14 -13
- package/dist/exporter/epub/tools.js.map +1 -1
- package/dist/exporter/html/citations.d.ts +17 -15
- package/dist/exporter/html/citations.d.ts.map +1 -1
- package/dist/exporter/html/citations.js +37 -18
- package/dist/exporter/html/citations.js.map +1 -1
- package/dist/exporter/html/convert.d.ts +20 -70
- package/dist/exporter/html/convert.d.ts.map +1 -1
- package/dist/exporter/html/convert.js +74 -42
- package/dist/exporter/html/convert.js.map +1 -1
- package/dist/exporter/html/index.d.ts +55 -52
- package/dist/exporter/html/index.d.ts.map +1 -1
- package/dist/exporter/html/index.js +23 -3
- package/dist/exporter/html/index.js.map +1 -1
- package/dist/exporter/html/templates.d.ts +23 -9
- package/dist/exporter/html/templates.d.ts.map +1 -1
- package/dist/exporter/html/templates.js +1 -1
- package/dist/exporter/html/templates.js.map +1 -1
- package/dist/exporter/html/tools.d.ts +1 -1
- package/dist/exporter/html/tools.d.ts.map +1 -1
- package/dist/exporter/html/tools.js +2 -2
- package/dist/exporter/html/tools.js.map +1 -1
- package/dist/exporter/jats/bibliography.d.ts +2 -1
- package/dist/exporter/jats/bibliography.d.ts.map +1 -1
- package/dist/exporter/jats/bibliography.js +57 -52
- package/dist/exporter/jats/bibliography.js.map +1 -1
- package/dist/exporter/jats/citations.d.ts +13 -11
- package/dist/exporter/jats/citations.d.ts.map +1 -1
- package/dist/exporter/jats/citations.js +28 -6
- package/dist/exporter/jats/citations.js.map +1 -1
- package/dist/exporter/jats/convert.d.ts +24 -28
- package/dist/exporter/jats/convert.d.ts.map +1 -1
- package/dist/exporter/jats/convert.js +53 -36
- package/dist/exporter/jats/convert.js.map +1 -1
- package/dist/exporter/jats/index.d.ts +21 -15
- package/dist/exporter/jats/index.d.ts.map +1 -1
- package/dist/exporter/jats/index.js +21 -5
- package/dist/exporter/jats/index.js.map +1 -1
- package/dist/exporter/jats/templates.d.ts +17 -15
- package/dist/exporter/jats/templates.d.ts.map +1 -1
- package/dist/exporter/jats/templates.js.map +1 -1
- package/dist/exporter/jats/text.d.ts +3 -2
- package/dist/exporter/jats/text.d.ts.map +1 -1
- package/dist/exporter/jats/text.js +4 -4
- package/dist/exporter/jats/text.js.map +1 -1
- package/dist/exporter/latex/convert.d.ts +12 -15
- package/dist/exporter/latex/convert.d.ts.map +1 -1
- package/dist/exporter/latex/convert.js +70 -54
- package/dist/exporter/latex/convert.js.map +1 -1
- package/dist/exporter/latex/escape_latex.d.ts +1 -1
- package/dist/exporter/latex/escape_latex.d.ts.map +1 -1
- package/dist/exporter/latex/escape_latex.js +1 -1
- package/dist/exporter/latex/escape_latex.js.map +1 -1
- package/dist/exporter/latex/index.d.ts +20 -19
- package/dist/exporter/latex/index.d.ts.map +1 -1
- package/dist/exporter/latex/index.js +15 -5
- package/dist/exporter/latex/index.js.map +1 -1
- package/dist/exporter/latex/readme.d.ts +1 -1
- package/dist/exporter/latex/readme.d.ts.map +1 -1
- package/dist/exporter/latex/readme.js +2 -2
- package/dist/exporter/latex/readme.js.map +1 -1
- package/dist/exporter/native/copy.d.ts +30 -0
- package/dist/exporter/native/copy.d.ts.map +1 -0
- package/dist/exporter/native/copy.js +151 -0
- package/dist/exporter/native/copy.js.map +1 -0
- package/dist/exporter/native/file.d.ts +12 -0
- package/dist/exporter/native/file.d.ts.map +1 -0
- package/dist/exporter/native/file.js +38 -0
- package/dist/exporter/native/file.js.map +1 -0
- package/dist/exporter/native/index.d.ts +5 -0
- package/dist/exporter/native/index.d.ts.map +1 -0
- package/dist/exporter/native/index.js +5 -0
- package/dist/exporter/native/index.js.map +1 -0
- package/dist/exporter/native/revision.d.ts +18 -0
- package/dist/exporter/native/revision.d.ts.map +1 -0
- package/dist/exporter/native/revision.js +39 -0
- package/dist/exporter/native/revision.js.map +1 -0
- package/dist/exporter/native/shrink.d.ts +29 -14
- package/dist/exporter/native/shrink.d.ts.map +1 -1
- package/dist/exporter/native/shrink.js +27 -18
- package/dist/exporter/native/shrink.js.map +1 -1
- package/dist/exporter/native/zip.d.ts +25 -0
- package/dist/exporter/native/zip.d.ts.map +1 -0
- package/dist/exporter/native/zip.js +56 -0
- package/dist/exporter/native/zip.js.map +1 -0
- package/dist/exporter/odt/citations.d.ts +18 -15
- package/dist/exporter/odt/citations.d.ts.map +1 -1
- package/dist/exporter/odt/citations.js +21 -4
- package/dist/exporter/odt/citations.js.map +1 -1
- package/dist/exporter/odt/footnotes.d.ts +25 -19
- package/dist/exporter/odt/footnotes.d.ts.map +1 -1
- package/dist/exporter/odt/footnotes.js +23 -6
- package/dist/exporter/odt/footnotes.js.map +1 -1
- package/dist/exporter/odt/images.d.ts +23 -11
- package/dist/exporter/odt/images.d.ts.map +1 -1
- package/dist/exporter/odt/images.js +34 -26
- package/dist/exporter/odt/images.js.map +1 -1
- package/dist/exporter/odt/index.d.ts +12 -18
- package/dist/exporter/odt/index.d.ts.map +1 -1
- package/dist/exporter/odt/index.js +16 -7
- package/dist/exporter/odt/index.js.map +1 -1
- package/dist/exporter/odt/math.d.ts +10 -8
- package/dist/exporter/odt/math.d.ts.map +1 -1
- package/dist/exporter/odt/math.js +27 -4
- package/dist/exporter/odt/math.js.map +1 -1
- package/dist/exporter/odt/metadata.d.ts +13 -9
- package/dist/exporter/odt/metadata.d.ts.map +1 -1
- package/dist/exporter/odt/metadata.js +36 -15
- package/dist/exporter/odt/metadata.js.map +1 -1
- package/dist/exporter/odt/render.d.ts +17 -15
- package/dist/exporter/odt/render.d.ts.map +1 -1
- package/dist/exporter/odt/render.js +25 -18
- package/dist/exporter/odt/render.js.map +1 -1
- package/dist/exporter/odt/richtext.d.ts +9 -9
- package/dist/exporter/odt/richtext.d.ts.map +1 -1
- package/dist/exporter/odt/richtext.js +55 -40
- package/dist/exporter/odt/richtext.js.map +1 -1
- package/dist/exporter/odt/styles.d.ts +29 -21
- package/dist/exporter/odt/styles.d.ts.map +1 -1
- package/dist/exporter/odt/styles.js +44 -22
- package/dist/exporter/odt/styles.js.map +1 -1
- package/dist/exporter/odt/track.d.ts +14 -7
- package/dist/exporter/odt/track.d.ts.map +1 -1
- package/dist/exporter/odt/track.js +7 -0
- package/dist/exporter/odt/track.js.map +1 -1
- package/dist/exporter/pandoc/citations.d.ts +20 -14
- package/dist/exporter/pandoc/citations.d.ts.map +1 -1
- package/dist/exporter/pandoc/citations.js +18 -4
- package/dist/exporter/pandoc/citations.js.map +1 -1
- package/dist/exporter/pandoc/convert.d.ts +10 -29
- package/dist/exporter/pandoc/convert.d.ts.map +1 -1
- package/dist/exporter/pandoc/convert.js +45 -40
- package/dist/exporter/pandoc/convert.js.map +1 -1
- package/dist/exporter/pandoc/index.d.ts +20 -33
- package/dist/exporter/pandoc/index.d.ts.map +1 -1
- package/dist/exporter/pandoc/index.js +20 -8
- package/dist/exporter/pandoc/index.js.map +1 -1
- package/dist/exporter/pandoc/readme.d.ts +1 -1
- package/dist/exporter/pandoc/readme.d.ts.map +1 -1
- package/dist/exporter/pandoc/readme.js +0 -1
- package/dist/exporter/pandoc/readme.js.map +1 -1
- package/dist/exporter/pandoc/tools.d.ts +21 -5
- package/dist/exporter/pandoc/tools.d.ts.map +1 -1
- package/dist/exporter/pandoc/tools.js +2 -2
- package/dist/exporter/pandoc/tools.js.map +1 -1
- package/dist/exporter/print/index.d.ts +18 -7
- package/dist/exporter/print/index.d.ts.map +1 -1
- package/dist/exporter/print/index.js +12 -10
- package/dist/exporter/print/index.js.map +1 -1
- package/dist/exporter/tools/doc_content.d.ts +5 -6
- package/dist/exporter/tools/doc_content.d.ts.map +1 -1
- package/dist/exporter/tools/doc_content.js +17 -16
- package/dist/exporter/tools/doc_content.js.map +1 -1
- package/dist/exporter/tools/svg.d.ts +7 -1
- package/dist/exporter/tools/svg.d.ts.map +1 -1
- package/dist/exporter/tools/svg.js.map +1 -1
- package/dist/exporter/tools/xml.d.ts +39 -38
- package/dist/exporter/tools/xml.d.ts.map +1 -1
- package/dist/exporter/tools/xml.js +82 -55
- package/dist/exporter/tools/xml.js.map +1 -1
- package/dist/exporter/tools/xml_zip.d.ts +15 -14
- package/dist/exporter/tools/xml_zip.d.ts.map +1 -1
- package/dist/exporter/tools/xml_zip.js +8 -2
- package/dist/exporter/tools/xml_zip.js.map +1 -1
- package/dist/exporter/tools/zip.d.ts +28 -14
- package/dist/exporter/tools/zip.d.ts.map +1 -1
- package/dist/exporter/tools/zip.js +13 -6
- package/dist/exporter/tools/zip.js.map +1 -1
- package/dist/exporter/tools/zotero_csl.d.ts +19 -6
- package/dist/exporter/tools/zotero_csl.d.ts.map +1 -1
- package/dist/exporter/tools/zotero_csl.js +9 -9
- package/dist/exporter/tools/zotero_csl.js.map +1 -1
- package/dist/importer/citations.d.ts +25 -22
- package/dist/importer/citations.d.ts.map +1 -1
- package/dist/importer/citations.js +1 -49
- package/dist/importer/citations.js.map +1 -1
- package/dist/importer/docx/citations.d.ts +8 -30
- package/dist/importer/docx/citations.d.ts.map +1 -1
- package/dist/importer/docx/citations.js +1 -26
- package/dist/importer/docx/citations.js.map +1 -1
- package/dist/importer/docx/convert.d.ts +38 -116
- package/dist/importer/docx/convert.d.ts.map +1 -1
- package/dist/importer/docx/convert.js +99 -82
- package/dist/importer/docx/convert.js.map +1 -1
- package/dist/importer/docx/helpers.d.ts +1 -1
- package/dist/importer/docx/helpers.d.ts.map +1 -1
- package/dist/importer/docx/helpers.js +1 -1
- package/dist/importer/docx/helpers.js.map +1 -1
- package/dist/importer/docx/index.d.ts +27 -0
- package/dist/importer/docx/index.d.ts.map +1 -0
- package/dist/importer/docx/index.js +77 -0
- package/dist/importer/docx/index.js.map +1 -0
- package/dist/importer/docx/omml2mathml.d.ts +2 -3
- package/dist/importer/docx/omml2mathml.d.ts.map +1 -1
- package/dist/importer/docx/omml2mathml.js +23 -116
- package/dist/importer/docx/omml2mathml.js.map +1 -1
- package/dist/importer/docx/parse.d.ts +22 -131
- package/dist/importer/docx/parse.d.ts.map +1 -1
- package/dist/importer/docx/parse.js +73 -55
- package/dist/importer/docx/parse.js.map +1 -1
- package/dist/importer/native/extract_template.d.ts +6 -0
- package/dist/importer/native/extract_template.d.ts.map +1 -0
- package/dist/importer/native/extract_template.js +80 -0
- package/dist/importer/native/extract_template.js.map +1 -0
- package/dist/importer/native/file.d.ts +37 -0
- package/dist/importer/native/file.d.ts.map +1 -0
- package/dist/importer/native/file.js +162 -0
- package/dist/importer/native/file.js.map +1 -0
- package/dist/importer/native/get_images.d.ts +18 -8
- package/dist/importer/native/get_images.d.ts.map +1 -1
- package/dist/importer/native/get_images.js +39 -45
- package/dist/importer/native/get_images.js.map +1 -1
- package/dist/importer/native/importer.d.ts +41 -0
- package/dist/importer/native/importer.d.ts.map +1 -0
- package/dist/importer/native/importer.js +170 -0
- package/dist/importer/native/importer.js.map +1 -0
- package/dist/importer/native/index.d.ts +7 -0
- package/dist/importer/native/index.d.ts.map +1 -0
- package/dist/importer/native/index.js +7 -0
- package/dist/importer/native/index.js.map +1 -0
- package/dist/importer/native/update.d.ts +5 -4
- package/dist/importer/native/update.d.ts.map +1 -1
- package/dist/importer/native/update.js +4 -3
- package/dist/importer/native/update.js.map +1 -1
- package/dist/importer/native/update_template.d.ts +12 -0
- package/dist/importer/native/update_template.d.ts.map +1 -0
- package/dist/importer/native/update_template.js +19 -0
- package/dist/importer/native/update_template.js.map +1 -0
- package/dist/importer/odt/citations.d.ts +7 -27
- package/dist/importer/odt/citations.d.ts.map +1 -1
- package/dist/importer/odt/citations.js +0 -22
- package/dist/importer/odt/citations.js.map +1 -1
- package/dist/importer/odt/convert.d.ts +53 -237
- package/dist/importer/odt/convert.d.ts.map +1 -1
- package/dist/importer/odt/convert.js +162 -138
- package/dist/importer/odt/convert.js.map +1 -1
- package/dist/importer/odt/index.d.ts +30 -0
- package/dist/importer/odt/index.d.ts.map +1 -0
- package/dist/importer/odt/index.js +124 -0
- package/dist/importer/odt/index.js.map +1 -0
- package/dist/importer/pandoc/convert.d.ts +25 -77
- package/dist/importer/pandoc/convert.d.ts.map +1 -1
- package/dist/importer/pandoc/convert.js +65 -52
- package/dist/importer/pandoc/convert.js.map +1 -1
- package/dist/importer/pandoc/helpers.d.ts +4 -3
- package/dist/importer/pandoc/helpers.d.ts.map +1 -1
- package/dist/importer/pandoc/helpers.js +24 -26
- package/dist/importer/pandoc/helpers.js.map +1 -1
- package/dist/importer/pandoc/index.d.ts +31 -0
- package/dist/importer/pandoc/index.d.ts.map +1 -0
- package/dist/importer/pandoc/index.js +114 -0
- package/dist/importer/pandoc/index.js.map +1 -0
- package/dist/importer/registry.d.ts +21 -0
- package/dist/importer/registry.d.ts.map +1 -0
- package/dist/importer/registry.js +41 -0
- package/dist/importer/registry.js.map +1 -0
- package/dist/importer/zip_analyzer.d.ts +27 -21
- package/dist/importer/zip_analyzer.d.ts.map +1 -1
- package/dist/importer/zip_analyzer.js +10 -5
- package/dist/importer/zip_analyzer.js.map +1 -1
- package/dist/mathlive/opf_includes.d.ts +1 -1
- package/dist/mathlive/opf_includes.d.ts.map +1 -1
- package/dist/mathlive/opf_includes.js.map +1 -1
- package/dist/schema/common/annotate.d.ts +37 -49
- package/dist/schema/common/annotate.d.ts.map +1 -1
- package/dist/schema/common/annotate.js +2 -2
- package/dist/schema/common/annotate.js.map +1 -1
- package/dist/schema/common/base.d.ts +63 -81
- package/dist/schema/common/base.d.ts.map +1 -1
- package/dist/schema/common/base.js.map +1 -1
- package/dist/schema/common/citation.d.ts +23 -22
- package/dist/schema/common/citation.d.ts.map +1 -1
- package/dist/schema/common/citation.js +4 -5
- package/dist/schema/common/citation.js.map +1 -1
- package/dist/schema/common/equation.d.ts +13 -14
- package/dist/schema/common/equation.d.ts.map +1 -1
- package/dist/schema/common/equation.js +1 -1
- package/dist/schema/common/equation.js.map +1 -1
- package/dist/schema/common/figure.d.ts +72 -93
- package/dist/schema/common/figure.d.ts.map +1 -1
- package/dist/schema/common/figure.js +11 -9
- package/dist/schema/common/figure.js.map +1 -1
- package/dist/schema/common/heading.d.ts +8 -32
- package/dist/schema/common/heading.d.ts.map +1 -1
- package/dist/schema/common/heading.js +2 -2
- package/dist/schema/common/heading.js.map +1 -1
- package/dist/schema/common/index.d.ts +2 -2
- package/dist/schema/common/index.d.ts.map +1 -1
- package/dist/schema/common/index.js.map +1 -1
- package/dist/schema/common/list.d.ts +52 -72
- package/dist/schema/common/list.d.ts.map +1 -1
- package/dist/schema/common/list.js +3 -3
- package/dist/schema/common/list.js.map +1 -1
- package/dist/schema/common/reference.d.ts +51 -59
- package/dist/schema/common/reference.d.ts.map +1 -1
- package/dist/schema/common/reference.js +5 -5
- package/dist/schema/common/reference.js.map +1 -1
- package/dist/schema/common/table.d.ts +59 -75
- package/dist/schema/common/table.d.ts.map +1 -1
- package/dist/schema/common/table.js +3 -2
- package/dist/schema/common/table.js.map +1 -1
- package/dist/schema/common/track.d.ts +83 -97
- package/dist/schema/common/track.d.ts.map +1 -1
- package/dist/schema/common/track.js +18 -17
- package/dist/schema/common/track.js.map +1 -1
- package/dist/schema/convert.d.ts +2 -2
- package/dist/schema/convert.d.ts.map +1 -1
- package/dist/schema/convert.js +2 -2
- package/dist/schema/convert.js.map +1 -1
- package/dist/schema/document/content.d.ts +95 -122
- package/dist/schema/document/content.d.ts.map +1 -1
- package/dist/schema/document/content.js +9 -9
- package/dist/schema/document/content.js.map +1 -1
- package/dist/schema/document/index.d.ts +173 -257
- package/dist/schema/document/index.d.ts.map +1 -1
- package/dist/schema/document/index.js.map +1 -1
- package/dist/schema/document/structure.d.ts +149 -258
- package/dist/schema/document/structure.d.ts.map +1 -1
- package/dist/schema/document/structure.js +2 -2
- package/dist/schema/document/structure.js.map +1 -1
- package/dist/schema/export.d.ts +4 -877
- package/dist/schema/export.d.ts.map +1 -1
- package/dist/schema/export.js +1 -0
- package/dist/schema/export.js.map +1 -1
- package/dist/schema/footnotes.d.ts +110 -155
- package/dist/schema/footnotes.d.ts.map +1 -1
- package/dist/schema/footnotes.js +4 -2
- package/dist/schema/footnotes.js.map +1 -1
- package/dist/schema/footnotes_convert.d.ts +3 -3
- package/dist/schema/footnotes_convert.d.ts.map +1 -1
- package/dist/schema/footnotes_convert.js +10 -6
- package/dist/schema/footnotes_convert.js.map +1 -1
- package/dist/schema/i18n.d.ts +3 -534
- package/dist/schema/i18n.d.ts.map +1 -1
- package/dist/schema/i18n.js +1 -0
- package/dist/schema/i18n.js.map +1 -1
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/mini_json.d.ts +3 -4
- package/dist/schema/mini_json.d.ts.map +1 -1
- package/dist/schema/mini_json.js +2 -0
- package/dist/schema/mini_json.js.map +1 -1
- package/dist/schema/text.d.ts +2 -1
- package/dist/schema/text.d.ts.map +1 -1
- package/dist/schema/text.js +1 -1
- package/dist/schema/text.js.map +1 -1
- package/dist/types.d.ts +167 -8
- package/dist/types.d.ts.map +1 -1
- package/package.json +24 -1
- package/src/bibliography/{common.js → common.ts} +15 -12
- package/src/bibliography/{csl_bib.js → csl_bib.ts} +16 -15
- package/src/citations/{citeproc_sys.js → citeproc_sys.ts} +26 -6
- package/src/citations/{format.js → format.ts} +80 -24
- package/src/editor/e2ee/{encryptor.js → encryptor.ts} +76 -44
- package/src/exporter/docx/{citations.js → citations.ts} +51 -23
- package/src/exporter/docx/{comments.js → comments.ts} +69 -26
- package/src/exporter/docx/{footnotes.js → footnotes.ts} +81 -42
- package/src/exporter/docx/images.ts +128 -0
- package/src/exporter/docx/{index.js → index.ts} +48 -25
- package/src/exporter/docx/{lists.js → lists.ts} +89 -46
- package/src/exporter/docx/{math.js → math.ts} +29 -9
- package/src/exporter/docx/{metadata.js → metadata.ts} +78 -42
- package/src/exporter/docx/{rels.js → rels.ts} +71 -50
- package/src/exporter/docx/{render.js → render.ts} +124 -87
- package/src/exporter/docx/{richtext.js → richtext.ts} +107 -84
- package/src/exporter/docx/{tables.js → tables.ts} +33 -23
- package/src/exporter/docx/{tools.js → tools.ts} +4 -3
- package/src/exporter/epub/{index.js → index.ts} +44 -15
- package/src/exporter/epub/{templates.js → templates.ts} +71 -7
- package/src/exporter/epub/{tools.js → tools.ts} +31 -25
- package/src/exporter/html/{citations.js → citations.ts} +79 -31
- package/src/exporter/html/{convert.js → convert.ts} +118 -71
- package/src/exporter/html/{index.js → index.ts} +63 -29
- package/src/exporter/html/{templates.js → templates.ts} +22 -2
- package/src/exporter/html/{tools.js → tools.ts} +9 -6
- package/src/exporter/jats/bibliography.ts +199 -0
- package/src/exporter/jats/{citations.js → citations.ts} +56 -20
- package/src/exporter/jats/{convert.js → convert.ts} +72 -53
- package/src/exporter/jats/index.ts +132 -0
- package/src/exporter/jats/{templates.js → templates.ts} +19 -3
- package/src/exporter/jats/{text.js → text.ts} +8 -6
- package/src/exporter/latex/{convert.js → convert.ts} +160 -125
- package/src/exporter/latex/{escape_latex.js → escape_latex.ts} +1 -1
- package/src/exporter/latex/{index.js → index.ts} +27 -12
- package/src/exporter/latex/{readme.js → readme.ts} +2 -2
- package/src/exporter/native/copy.ts +231 -0
- package/src/exporter/native/file.ts +65 -0
- package/src/exporter/native/index.ts +4 -0
- package/src/exporter/native/revision.ts +76 -0
- package/src/exporter/native/{shrink.js → shrink.ts} +64 -29
- package/src/exporter/native/zip.ts +85 -0
- package/src/exporter/odt/{citations.js → citations.ts} +35 -15
- package/src/exporter/odt/{footnotes.js → footnotes.ts} +53 -30
- package/src/exporter/odt/images.ts +135 -0
- package/src/exporter/odt/{index.js → index.ts} +49 -27
- package/src/exporter/odt/{math.js → math.ts} +38 -9
- package/src/exporter/odt/{metadata.js → metadata.ts} +54 -29
- package/src/exporter/odt/{render.js → render.ts} +89 -60
- package/src/exporter/odt/{richtext.js → richtext.ts} +102 -72
- package/src/exporter/odt/{styles.js → styles.ts} +98 -66
- package/src/exporter/odt/{track.js → track.ts} +22 -6
- package/src/exporter/pandoc/{citations.js → citations.ts} +31 -15
- package/src/exporter/pandoc/{convert.js → convert.ts} +98 -79
- package/src/exporter/pandoc/{index.js → index.ts} +36 -13
- package/src/exporter/pandoc/{readme.js → readme.ts} +0 -1
- package/src/exporter/pandoc/{tools.js → tools.ts} +28 -5
- package/src/exporter/print/{index.js → index.ts} +38 -19
- package/src/exporter/tools/{doc_content.js → doc_content.ts} +34 -24
- package/src/exporter/tools/{svg.js → svg.ts} +9 -3
- package/src/exporter/tools/{xml.js → xml.ts} +187 -138
- package/src/exporter/tools/{xml_zip.js → xml_zip.ts} +19 -11
- package/src/exporter/tools/{zip.js → zip.ts} +35 -11
- package/src/exporter/tools/{zotero_csl.js → zotero_csl.ts} +35 -18
- package/src/global.d.ts +2 -0
- package/src/importer/citations.ts +116 -0
- package/src/importer/docx/{citations.js → citations.ts} +22 -37
- package/src/importer/docx/{convert.js → convert.ts} +176 -141
- package/src/importer/docx/{helpers.js → helpers.ts} +1 -1
- package/src/importer/docx/index.ts +124 -0
- package/src/importer/docx/{omml2mathml.js → omml2mathml.ts} +154 -176
- package/src/importer/docx/{parse.js → parse.ts} +103 -81
- package/src/importer/native/extract_template.ts +83 -0
- package/src/importer/native/file.ts +282 -0
- package/src/importer/native/get_images.ts +82 -0
- package/src/importer/native/importer.ts +244 -0
- package/src/importer/native/index.ts +6 -0
- package/src/importer/native/{update.js → update.ts} +13 -5
- package/src/importer/native/update_template.ts +32 -0
- package/src/importer/odt/{citations.js → citations.ts} +17 -29
- package/src/importer/odt/{convert.js → convert.ts} +261 -237
- package/src/importer/odt/index.ts +202 -0
- package/src/importer/pandoc/{convert.js → convert.ts} +116 -94
- package/src/importer/pandoc/{helpers.js → helpers.ts} +24 -12
- package/src/importer/pandoc/index.ts +171 -0
- package/src/importer/registry.ts +69 -0
- package/src/importer/{zip_analyzer.js → zip_analyzer.ts} +44 -18
- package/src/mathlive/{opf_includes.js → opf_includes.ts} +1 -1
- package/src/modules.d.ts +40 -0
- package/src/schema/common/{annotate.js → annotate.ts} +10 -8
- package/src/schema/common/{base.js → base.ts} +12 -10
- package/src/schema/common/{citation.js → citation.ts} +17 -8
- package/src/schema/common/{equation.js → equation.ts} +6 -4
- package/src/schema/common/{figure.js → figure.ts} +43 -23
- package/src/schema/common/{heading.js → heading.ts} +7 -5
- package/src/schema/common/{list.js → list.ts} +15 -13
- package/src/schema/common/{reference.js → reference.ts} +14 -12
- package/src/schema/common/{table.js → table.ts} +16 -14
- package/src/schema/common/{track.js → track.ts} +42 -31
- package/src/schema/{convert.js → convert.ts} +6 -2
- package/src/schema/document/{content.js → content.ts} +22 -20
- package/src/schema/document/{structure.js → structure.ts} +15 -9
- package/src/schema/{export.js → export.ts} +4 -2
- package/src/schema/{footnotes.js → footnotes.ts} +11 -8
- package/src/schema/{footnotes_convert.js → footnotes_convert.ts} +11 -8
- package/src/schema/{i18n.js → i18n.ts} +7 -1
- package/src/schema/{mini_json.js → mini_json.ts} +11 -12
- package/src/schema/{text.js → text.ts} +6 -2
- package/src/types.ts +185 -7
- package/src/exporter/docx/images.js +0 -101
- package/src/exporter/jats/bibliography.js +0 -183
- package/src/exporter/jats/index.js +0 -92
- package/src/exporter/odt/images.js +0 -115
- package/src/importer/citations.js +0 -129
- package/src/importer/native/get_images.js +0 -76
- /package/src/schema/common/{index.js → index.ts} +0 -0
- /package/src/schema/document/{index.js → index.ts} +0 -0
- /package/src/schema/{index.js → index.ts} +0 -0
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { HTMLExporter } from "../html/index.js";
|
|
2
|
+
import type { BibDB, CSL, ExportDoc, ImageDB } from "../../types.js";
|
|
3
|
+
export declare class EpubExporter extends HTMLExporter {
|
|
3
4
|
documentFileName: string;
|
|
5
|
+
lang: string;
|
|
6
|
+
shortLang: string;
|
|
7
|
+
constructor(doc: ExportDoc, bibDB: BibDB, imageDB: ImageDB, csl: CSL, updated: any, documentStyles: Array<{
|
|
8
|
+
slug: string;
|
|
9
|
+
contents: string;
|
|
10
|
+
documentstylefile_set: Array<[string, string]>;
|
|
11
|
+
}>);
|
|
12
|
+
createZip(): Promise<void>;
|
|
4
13
|
prefixFiles(): void;
|
|
5
14
|
createEPUBFiles(): void;
|
|
6
15
|
createOPF(): string;
|
|
7
16
|
createNCX(): string;
|
|
8
17
|
createNav(): string;
|
|
9
18
|
}
|
|
10
|
-
import { HTMLExporter } from "../html/index.js";
|
|
11
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exporter/epub/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exporter/epub/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,EAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,gBAAgB,CAAA;AAelE,qBAAa,YAAa,SAAQ,YAAY;IAC1C,gBAAgB,EAAE,MAAM,CAAA;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;gBAGb,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,GAAG,EACZ,cAAc,EAAE,KAAK,CAAC;QAClB,IAAI,EAAE,MAAM,CAAA;QACZ,QAAQ,EAAE,MAAM,CAAA;QAChB,qBAAqB,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;KACjD,CAAC;IAeN,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAM1B,WAAW,IAAI,IAAI;IAanB,eAAe,IAAI,IAAI;IAsBvB,SAAS,IAAI,MAAM;IA6DnB,SAAS,IAAI,MAAM;IAUnB,SAAS,IAAI,MAAM;CAUtB"}
|
|
@@ -3,6 +3,9 @@ import { HTMLExporter } from "../html/index.js";
|
|
|
3
3
|
import { containerTemplate, navTemplate, ncxTemplate, opfTemplate } from "./templates.js";
|
|
4
4
|
import { buildHierarchy, getFontMimeType, getImageMimeType, getTimestamp } from "./tools.js";
|
|
5
5
|
export class EpubExporter extends HTMLExporter {
|
|
6
|
+
documentFileName;
|
|
7
|
+
lang;
|
|
8
|
+
shortLang;
|
|
6
9
|
constructor(doc, bibDB, imageDB, csl, updated, documentStyles) {
|
|
7
10
|
super(doc, bibDB, imageDB, csl, updated, documentStyles, {
|
|
8
11
|
xhtml: true,
|
|
@@ -10,8 +13,11 @@ export class EpubExporter extends HTMLExporter {
|
|
|
10
13
|
});
|
|
11
14
|
// Overriden properties
|
|
12
15
|
this.documentFileName = "document.xhtml";
|
|
16
|
+
this.contentFileName = "document.xhtml";
|
|
13
17
|
this.fileEnding = "epub";
|
|
14
18
|
this.mimeType = "application/epub+zip";
|
|
19
|
+
this.lang = doc.settings.language || "en-US";
|
|
20
|
+
this.shortLang = this.lang.split("-")[0];
|
|
15
21
|
}
|
|
16
22
|
createZip() {
|
|
17
23
|
this.prefixFiles();
|
|
@@ -50,7 +56,7 @@ export class EpubExporter extends HTMLExporter {
|
|
|
50
56
|
.filter(file => file.mimeType);
|
|
51
57
|
const styleSheets = this.textFiles.filter(file => file.filename.endsWith(".css"));
|
|
52
58
|
// Extract authors and keywords from metaData
|
|
53
|
-
const
|
|
59
|
+
const rawAuthors = this.converter.metaData.authors.map(({ attrs: author }) => {
|
|
54
60
|
if (author.firstname || author.lastname) {
|
|
55
61
|
const nameParts = [];
|
|
56
62
|
if (author.firstname) {
|
|
@@ -65,13 +71,14 @@ export class EpubExporter extends HTMLExporter {
|
|
|
65
71
|
return author.institution;
|
|
66
72
|
}
|
|
67
73
|
});
|
|
74
|
+
const authors = rawAuthors.filter((author) => typeof author === "string");
|
|
68
75
|
return opfTemplate({
|
|
69
76
|
language: this.lang,
|
|
70
77
|
title: this.docTitle,
|
|
71
78
|
authors,
|
|
72
79
|
keywords: this.converter.metaData.keywords,
|
|
73
80
|
idType: "fidus",
|
|
74
|
-
id: this.doc.id,
|
|
81
|
+
id: String(this.doc.id),
|
|
75
82
|
date: timestamp.slice(0, 10),
|
|
76
83
|
modified: timestamp,
|
|
77
84
|
styleSheets,
|
|
@@ -86,7 +93,7 @@ export class EpubExporter extends HTMLExporter {
|
|
|
86
93
|
shortLang: this.shortLang,
|
|
87
94
|
title: this.docTitle,
|
|
88
95
|
idType: "fidus",
|
|
89
|
-
id: this.doc.id,
|
|
96
|
+
id: String(this.doc.id),
|
|
90
97
|
toc: buildHierarchy(this.converter.metaData.toc)
|
|
91
98
|
});
|
|
92
99
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/exporter/epub/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/exporter/epub/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAA;AAG7C,OAAO,EACH,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,WAAW,EACd,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACH,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,YAAY,EACf,MAAM,YAAY,CAAA;AAEnB,MAAM,OAAO,YAAa,SAAQ,YAAY;IAC1C,gBAAgB,CAAQ;IACxB,IAAI,CAAQ;IACZ,SAAS,CAAQ;IAEjB,YACI,GAAc,EACd,KAAY,EACZ,OAAgB,EAChB,GAAQ,EACR,OAAY,EACZ,cAIE;QAEF,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,cAAc,EAAE;YACrD,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,IAAI;SACb,CAAC,CAAA;QACF,uBAAuB;QACvB,IAAI,CAAC,g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|
+
interface EpubImage {
|
|
2
|
+
filename: string;
|
|
3
|
+
mimeType: string;
|
|
4
|
+
coverImage?: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface EpubFile {
|
|
7
|
+
filename: string;
|
|
8
|
+
mimeType: string;
|
|
9
|
+
}
|
|
10
|
+
interface EpubStyleSheet {
|
|
11
|
+
filename: string;
|
|
12
|
+
}
|
|
13
|
+
interface EpubTocItem {
|
|
14
|
+
id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
docNum?: number;
|
|
17
|
+
link?: string;
|
|
18
|
+
children: EpubTocItem[];
|
|
19
|
+
}
|
|
20
|
+
interface OpfTemplateOptions {
|
|
21
|
+
id: string;
|
|
22
|
+
idType: string;
|
|
23
|
+
title: string;
|
|
24
|
+
language: string;
|
|
25
|
+
authors: string[];
|
|
26
|
+
keywords: string[];
|
|
27
|
+
date: string;
|
|
28
|
+
modified: string;
|
|
29
|
+
images: EpubImage[];
|
|
30
|
+
fontFiles: EpubFile[];
|
|
31
|
+
styleSheets: EpubStyleSheet[];
|
|
32
|
+
math: boolean;
|
|
33
|
+
copyright?: {
|
|
34
|
+
holder?: string;
|
|
35
|
+
year?: number;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/** A template for the OPF file of an epub. */
|
|
39
|
+
export declare const opfTemplate: ({ id, idType, title, language, authors, keywords, date, modified, images, fontFiles, styleSheets, math, copyright }: OpfTemplateOptions) => string;
|
|
40
|
+
/** A template for the container XML of an epub file. */
|
|
41
|
+
export declare const containerTemplate: () => string;
|
|
42
|
+
interface NcxTemplateOptions {
|
|
43
|
+
shortLang: string;
|
|
44
|
+
idType: string;
|
|
45
|
+
id: string;
|
|
46
|
+
title: string;
|
|
47
|
+
toc: EpubTocItem[];
|
|
48
|
+
}
|
|
49
|
+
/** A template of the NCX file of an epub. */
|
|
50
|
+
export declare const ncxTemplate: ({ shortLang, idType, id, title, toc }: NcxTemplateOptions) => string;
|
|
51
|
+
/** A template for each list item in the navMap of an epub's NCX file. */
|
|
52
|
+
export declare const ncxItemTemplate: ({ item }: {
|
|
53
|
+
item: EpubTocItem;
|
|
54
|
+
}) => string;
|
|
55
|
+
interface NavTemplateOptions {
|
|
56
|
+
shortLang: string;
|
|
57
|
+
toc: EpubTocItem[];
|
|
58
|
+
styleSheets: EpubStyleSheet[];
|
|
59
|
+
}
|
|
60
|
+
/** A template for an epub's navigation document. */
|
|
61
|
+
export declare const navTemplate: ({ shortLang, toc, styleSheets }: NavTemplateOptions) => string;
|
|
62
|
+
export {};
|
|
32
63
|
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/exporter/epub/templates.
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/exporter/epub/templates.ts"],"names":[],"mappings":"AAIA,UAAU,SAAS;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,UAAU,QAAQ;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,cAAc;IACpB,QAAQ,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,WAAW;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,WAAW,EAAE,CAAA;CAC1B;AAED,UAAU,kBAAkB;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,SAAS,EAAE,CAAA;IACnB,SAAS,EAAE,QAAQ,EAAE,CAAA;IACrB,WAAW,EAAE,cAAc,EAAE,CAAA;IAC7B,IAAI,EAAE,OAAO,CAAA;IACb,SAAS,CAAC,EAAE;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAC,CAAA;CAC/C;AAED,8CAA8C;AAC9C,eAAO,MAAM,WAAW,GAAI,qHAczB,kBAAkB,KAAG,MA+Cb,CAAA;AAEX,wDAAwD;AACxD,eAAO,MAAM,iBAAiB,QAAO,MAMxB,CAAA;AAEb,UAAU,kBAAkB;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,6CAA6C;AAC7C,eAAO,MAAM,WAAW,GAAI,uCAMzB,kBAAkB,KAAG,MAajB,CAAA;AAEP,yEAAyE;AACzE,eAAO,MAAM,eAAe,GAAI,UAAQ;IAAC,IAAI,EAAE,WAAW,CAAA;CAAC,KAAG,MAKxC,CAAA;AAoBtB,UAAU,kBAAkB;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,GAAG,EAAE,WAAW,EAAE,CAAA;IAClB,WAAW,EAAE,cAAc,EAAE,CAAA;CAChC;AAED,oDAAoD;AACpD,eAAO,MAAM,WAAW,GAAI,iCAIzB,kBAAkB,KAAG,MAoBhB,CAAA"}
|
|
@@ -35,7 +35,7 @@ ${images
|
|
|
35
35
|
<itemref idref="t1" />
|
|
36
36
|
</spine>
|
|
37
37
|
</package>`;
|
|
38
|
-
/** A template for the
|
|
38
|
+
/** A template for the container XML of an epub file. */
|
|
39
39
|
export const containerTemplate = () => `<?xml version="1.0" encoding="UTF-8"?>
|
|
40
40
|
<container xmlns="urn:oasis:names:tc:opendocument:xmlns:container" version="1.0">
|
|
41
41
|
<rootfiles>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../src/exporter/epub/templates.
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../src/exporter/epub/templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,WAAW,CAAA;AAEpC,OAAO,EAAC,mBAAmB,EAAC,MAAM,gCAAgC,CAAA;AAyClE,8CAA8C;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EACxB,EAAE,EACF,MAAM,EACN,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,SAAS,EACT,WAAW,EACX,IAAI,EACJ,SAAS,EACQ,EAAU,EAAE,CAC7B;iFAC6E,MAAM,eAAe,QAAQ;;6BAEjF,MAAM,KAAK,EAAE;wBAClB,UAAU,CAAC,KAAK,CAAC;EACvC,OAAO;KACJ,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,mBAAmB,UAAU,CAAC,MAAM,CAAC,iBAAiB,CAAC;KACrE,IAAI,CAAC,EAAE,CAAC,GAAG,QAAQ;KACnB,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,mBAAmB,UAAU,CAAC,OAAO,CAAC,iBAAiB,CAAC;KACvE,IAAI,CAAC,EAAE,CAAC;uBACU,QAAQ;mBACZ,IAAI;UACb,SAAS,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAgB,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,IAAI,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;4CAC3H,QAAQ;;;;;EAKlD,MAAM;KACH,GAAG,CACA,CAAC,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AAS;;;;UAI1E,WAAW;KACR,GAAG,CACA,KAAK,CAAC,EAAE,CACJ,gDAAgD,KAAK,CAAC,QAAQ,QAAQ,CAC7E;KACA,IAAI,CAAC,EAAE,CAAC;;;;;EAKnB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,eAAe,CAAC,EAAC,IAAI,EAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;;;;QAI3C,CAAA"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
export function getTimestamp(date:
|
|
2
|
-
export function getFontMimeType(filename:
|
|
3
|
-
export function getImageMimeType(filename:
|
|
4
|
-
export
|
|
1
|
+
export declare function getTimestamp(date: Date): string;
|
|
2
|
+
export declare function getFontMimeType(filename: string): string | null;
|
|
3
|
+
export declare function getImageMimeType(filename: string): string | null;
|
|
4
|
+
export interface HierarchyItem extends Record<string, unknown> {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
level: number;
|
|
8
|
+
link?: string;
|
|
9
|
+
docNum?: number;
|
|
10
|
+
children: HierarchyItem[];
|
|
11
|
+
}
|
|
12
|
+
export declare function buildHierarchy(flatList: HierarchyItem[]): HierarchyItem[];
|
|
5
13
|
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/exporter/epub/tools.
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/exporter/epub/tools.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAyB/C;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAe/D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAoBhE;AAED,MAAM,WAAW,aAAc,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC1D,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,aAAa,EAAE,CAAA;CAC5B;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE,CA0BzE"}
|
|
@@ -3,22 +3,22 @@ export function getTimestamp(date) {
|
|
|
3
3
|
let minute = date.getUTCMinutes();
|
|
4
4
|
let hour = date.getUTCHours();
|
|
5
5
|
let day = date.getUTCDate();
|
|
6
|
-
let month = date.getUTCMonth() + 1; //January is 0!
|
|
6
|
+
let month = date.getUTCMonth() + 1; // January is 0!
|
|
7
7
|
const year = date.getUTCFullYear();
|
|
8
8
|
if (second < 10) {
|
|
9
|
-
second = "0" + second;
|
|
9
|
+
second = Number("0" + second);
|
|
10
10
|
}
|
|
11
11
|
if (minute < 10) {
|
|
12
|
-
minute = "0" + minute;
|
|
12
|
+
minute = Number("0" + minute);
|
|
13
13
|
}
|
|
14
14
|
if (hour < 10) {
|
|
15
|
-
hour = "0" + hour;
|
|
15
|
+
hour = Number("0" + hour);
|
|
16
16
|
}
|
|
17
17
|
if (day < 10) {
|
|
18
|
-
day = "0" + day;
|
|
18
|
+
day = Number("0" + day);
|
|
19
19
|
}
|
|
20
20
|
if (month < 10) {
|
|
21
|
-
month = "0" + month;
|
|
21
|
+
month = Number("0" + month);
|
|
22
22
|
}
|
|
23
23
|
return `${year}-${month}-${day}T${hour}:${minute}:${second}Z`;
|
|
24
24
|
}
|
|
@@ -32,9 +32,9 @@ export function getFontMimeType(filename) {
|
|
|
32
32
|
eot: "application/vnd.ms-fontobject"
|
|
33
33
|
};
|
|
34
34
|
// Extract the file extension from the filename
|
|
35
|
-
const extension = filename.split(".").pop()
|
|
35
|
+
const extension = filename.split(".").pop()?.toLowerCase();
|
|
36
36
|
// Check if the extension matches a known font type and return the MIME type
|
|
37
|
-
return fontMimeTypes[extension] || null
|
|
37
|
+
return extension ? fontMimeTypes[extension] || null : null;
|
|
38
38
|
}
|
|
39
39
|
export function getImageMimeType(filename) {
|
|
40
40
|
// Define a mapping of image file extensions to MIME types
|
|
@@ -51,9 +51,9 @@ export function getImageMimeType(filename) {
|
|
|
51
51
|
avif: "image/avif"
|
|
52
52
|
};
|
|
53
53
|
// Extract the file extension from the filename
|
|
54
|
-
const extension = filename.split(".").pop()
|
|
54
|
+
const extension = filename.split(".").pop()?.toLowerCase();
|
|
55
55
|
// Check if the extension matches a known image type and return the MIME type
|
|
56
|
-
return imageMimeTypes[extension] || null
|
|
56
|
+
return extension ? imageMimeTypes[extension] || null : null;
|
|
57
57
|
}
|
|
58
58
|
export function buildHierarchy(flatList) {
|
|
59
59
|
const hierarchy = [];
|
|
@@ -62,17 +62,18 @@ export function buildHierarchy(flatList) {
|
|
|
62
62
|
// Ensure there's an array for the current level in the map
|
|
63
63
|
levelMap[item.level] = levelMap[item.level] || [];
|
|
64
64
|
// Add the current item to its level in the map
|
|
65
|
-
|
|
65
|
+
const itemWithChildren = { ...item, children: [] };
|
|
66
|
+
levelMap[item.level].push(itemWithChildren);
|
|
66
67
|
if (item.level === 0) {
|
|
67
68
|
// Top-level items are added directly to the hierarchy
|
|
68
|
-
hierarchy.push(
|
|
69
|
+
hierarchy.push(itemWithChildren);
|
|
69
70
|
}
|
|
70
71
|
else {
|
|
71
72
|
// Non-top-level items are added as children of the last item at the previous level
|
|
72
73
|
const parentLevel = levelMap[item.level - 1];
|
|
73
74
|
if (parentLevel) {
|
|
74
75
|
const parent = parentLevel[parentLevel.length - 1];
|
|
75
|
-
parent.children.push(
|
|
76
|
+
parent.children.push(itemWithChildren);
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../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KAAK,CAAC,IAAI,EAAE,CAAA;QAEjD,+CAA+C;QAC/C,MAAM,gBAAgB,GAAkB,EAAC,GAAG,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAC,CAAA;QAC/D,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;QAE3C,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC;YACnB,sDAAsD;YACtD,SAAS,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;QACpC,CAAC;aAAM,CAAC;YACJ,mFAAmF;YACnF,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;YAC5C,IAAI,WAAW,EAAE,CAAC;gBACd,MAAM,MAAM,GAAG,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;gBAClD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;YAC1C,CAAC;QACL,CAAC;IACL,CAAC,CAAC,CAAA;IAEF,OAAO,SAAS,CAAA;AACpB,CAAC"}
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { FormatCitations } from "../../citations/format.js";
|
|
2
|
+
import type { BibDB, CSL, DocSettings } from "../../types.js";
|
|
3
|
+
export declare class HTMLExporterCitations {
|
|
4
|
+
docSettings: DocSettings;
|
|
5
|
+
bibDB: BibDB;
|
|
6
|
+
csl: CSL;
|
|
7
|
+
citationTexts: string[];
|
|
8
|
+
citFm: FormatCitations | false;
|
|
8
9
|
bibHTML: string;
|
|
9
10
|
bibCSS: string;
|
|
10
|
-
htmlIdConvert:
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
htmlIdConvert: Record<string, number>;
|
|
12
|
+
citInfos: Record<string, unknown>[];
|
|
13
|
+
constructor(docSettings: DocSettings, bibDB: BibDB, csl: CSL);
|
|
14
|
+
init(citInfos: Record<string, unknown>[]): Promise<{
|
|
15
|
+
type: string;
|
|
13
16
|
bibCSS: string;
|
|
14
17
|
bibHTML: string;
|
|
15
|
-
citationTexts:
|
|
18
|
+
citationTexts: string[];
|
|
16
19
|
}>;
|
|
17
|
-
citInfos: any;
|
|
18
20
|
getOutput(): {
|
|
19
|
-
type:
|
|
21
|
+
type: string;
|
|
20
22
|
bibCSS: string;
|
|
21
23
|
bibHTML: string;
|
|
22
|
-
citationTexts:
|
|
24
|
+
citationTexts: string[];
|
|
23
25
|
};
|
|
24
26
|
formatCitations(): Promise<void>;
|
|
25
|
-
assembleBib(): void;
|
|
27
|
+
assembleBib(citFm: FormatCitations, bibliography: import("../../types.js").BibliographyResult): void;
|
|
26
28
|
}
|
|
27
29
|
//# sourceMappingURL=citations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"citations.d.ts","sourceRoot":"","sources":["../../../src/exporter/html/citations.
|
|
1
|
+
{"version":3,"file":"citations.d.ts","sourceRoot":"","sources":["../../../src/exporter/html/citations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAA;AAEzD,OAAO,KAAK,EAAC,KAAK,EAAE,GAAG,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAA;AAc3D,qBAAa,qBAAqB;IAC9B,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,EAAE,KAAK,CAAA;IACZ,GAAG,EAAE,GAAG,CAAA;IAER,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,KAAK,EAAE,eAAe,GAAG,KAAK,CAAA;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACrC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;gBAEvB,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG;IAatD,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC;QACrD,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,MAAM,CAAA;QACf,aAAa,EAAE,MAAM,EAAE,CAAA;KAC1B,CAAC;IASF,SAAS,IAAI;QACT,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,MAAM,CAAA;QACf,aAAa,EAAE,MAAM,EAAE,CAAA;KAC1B;IAWK,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IA+EtC,WAAW,CAAC,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,OAAO,gBAAgB,EAAE,kBAAkB,GAAG,IAAI;CAgBvG"}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import { FormatCitations } from "../../citations/format.js";
|
|
2
1
|
import { escapeText } from "fwtoolkit";
|
|
2
|
+
import { FormatCitations } from "../../citations/format.js";
|
|
3
3
|
import { BIBLIOGRAPHY_HEADERS } from "../../schema/i18n.js";
|
|
4
4
|
export class HTMLExporterCitations {
|
|
5
|
+
docSettings;
|
|
6
|
+
bibDB;
|
|
7
|
+
csl;
|
|
8
|
+
citationTexts;
|
|
9
|
+
citFm;
|
|
10
|
+
bibHTML;
|
|
11
|
+
bibCSS;
|
|
12
|
+
htmlIdConvert;
|
|
13
|
+
citInfos;
|
|
5
14
|
constructor(docSettings, bibDB, csl) {
|
|
6
15
|
this.docSettings = docSettings;
|
|
7
16
|
this.bibDB = bibDB;
|
|
@@ -11,6 +20,7 @@ export class HTMLExporterCitations {
|
|
|
11
20
|
this.bibHTML = "";
|
|
12
21
|
this.bibCSS = "";
|
|
13
22
|
this.htmlIdConvert = {};
|
|
23
|
+
this.citInfos = [];
|
|
14
24
|
}
|
|
15
25
|
async init(citInfos) {
|
|
16
26
|
this.citInfos = citInfos;
|
|
@@ -31,7 +41,10 @@ export class HTMLExporterCitations {
|
|
|
31
41
|
// Citations are highly interdependent -- so we need to format them all
|
|
32
42
|
// together before laying out the document.
|
|
33
43
|
async formatCitations() {
|
|
34
|
-
|
|
44
|
+
if (!this.csl.getStyle) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const citationstyle = await this.csl.getStyle(this.docSettings.citationstyle || "");
|
|
35
48
|
const modStyle = JSON.parse(JSON.stringify(citationstyle));
|
|
36
49
|
const citationLayout = modStyle.children
|
|
37
50
|
.find(section => section.name === "citation")
|
|
@@ -40,14 +53,19 @@ export class HTMLExporterCitations {
|
|
|
40
53
|
citationLayout.prefix = "{{prefix}}";
|
|
41
54
|
citationLayout.suffix = "{{suffix}}";
|
|
42
55
|
citationLayout.delimiter = "{{delimiter}}";
|
|
43
|
-
|
|
44
|
-
|
|
56
|
+
const citFm = new FormatCitations(this.csl, this.citInfos, modStyle, "", this.bibDB, false, this.docSettings.language);
|
|
57
|
+
this.citFm = citFm;
|
|
58
|
+
await citFm.init();
|
|
45
59
|
// We need to add links to the bibliography items. And there may be more than one work cited
|
|
46
60
|
// so we need to first split, then add the links and eventually put the citation back together
|
|
47
61
|
// again.
|
|
48
62
|
// The IDs used in the html bibliography are 1 and up in this order
|
|
49
|
-
|
|
50
|
-
|
|
63
|
+
const bibliography = citFm.bibliography;
|
|
64
|
+
if (!bibliography) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
bibliography[0].entry_ids.forEach((id, index) => (this.htmlIdConvert[id] = index + 1));
|
|
68
|
+
this.citationTexts = citFm.citationTexts.map((ref, index) => {
|
|
51
69
|
const content = ref
|
|
52
70
|
.split("{{delimiter}}")
|
|
53
71
|
.map((citationText, conIndex) => {
|
|
@@ -63,29 +81,30 @@ export class HTMLExporterCitations {
|
|
|
63
81
|
suffixSplit.pop()
|
|
64
82
|
: "";
|
|
65
83
|
citationText = suffixSplit[0];
|
|
66
|
-
const
|
|
84
|
+
const sortedItems = (citFm.citations[index].sortedItems);
|
|
85
|
+
const citId = sortedItems[conIndex][1].id;
|
|
67
86
|
const htmlId = this.htmlIdConvert[citId];
|
|
68
87
|
return `${prefix}<a class="bibliography" href="#ref-${htmlId}">${citationText}</a>${suffix}`;
|
|
69
88
|
})
|
|
70
89
|
.join(origCitationLayout.delimiter || "");
|
|
71
90
|
return content;
|
|
72
91
|
});
|
|
73
|
-
if (
|
|
74
|
-
|
|
75
|
-
this.assembleBib();
|
|
92
|
+
if (bibliography?.length &&
|
|
93
|
+
bibliography[0].entry_ids.length) {
|
|
94
|
+
this.assembleBib(citFm, bibliography);
|
|
76
95
|
}
|
|
77
96
|
}
|
|
78
|
-
assembleBib() {
|
|
79
|
-
const bibliographyHeader = this.docSettings.bibliography_header[this.docSettings.language] ||
|
|
80
|
-
BIBLIOGRAPHY_HEADERS[this.docSettings.language];
|
|
81
|
-
let bibHTML = `<h1 class="doc-bibliography-header">${escapeText(bibliographyHeader)}</h1>`;
|
|
82
|
-
bibHTML +=
|
|
83
|
-
bibHTML +=
|
|
97
|
+
assembleBib(citFm, bibliography) {
|
|
98
|
+
const bibliographyHeader = this.docSettings.bibliography_header?.[this.docSettings.language || "en-US"] ||
|
|
99
|
+
BIBLIOGRAPHY_HEADERS[this.docSettings.language || "en-US"];
|
|
100
|
+
let bibHTML = `<h1 class="doc-bibliography-header">${escapeText(bibliographyHeader || "Bibliography")}</h1>`;
|
|
101
|
+
bibHTML += bibliography[0].bibstart;
|
|
102
|
+
bibHTML += bibliography[1]
|
|
84
103
|
.map((reference, index) => `<div id="ref-${index + 1}">${reference}</div>`)
|
|
85
104
|
.join("");
|
|
86
|
-
bibHTML +=
|
|
105
|
+
bibHTML += bibliography[0].bibend;
|
|
87
106
|
this.bibHTML = bibHTML;
|
|
88
|
-
this.bibCSS =
|
|
107
|
+
this.bibCSS = citFm.bibCSS;
|
|
89
108
|
}
|
|
90
109
|
}
|
|
91
110
|
//# sourceMappingURL=citations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"citations.js","sourceRoot":"","sources":["../../../src/exporter/html/citations.
|
|
1
|
+
{"version":3,"file":"citations.js","sourceRoot":"","sources":["../../../src/exporter/html/citations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,WAAW,CAAA;AAEpC,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAA;AAezD,MAAM,OAAO,qBAAqB;IAC9B,WAAW,CAAa;IACxB,KAAK,CAAO;IACZ,GAAG,CAAK;IAER,aAAa,CAAU;IACvB,KAAK,CAAyB;IAC9B,OAAO,CAAQ;IACf,MAAM,CAAQ;IACd,aAAa,CAAwB;IACrC,QAAQ,CAA2B;IAEnC,YAAY,WAAwB,EAAE,KAAY,EAAE,GAAQ;QACxD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QAEd,IAAI,CAAC,aAAa,GAAG,EAAE,CAAA;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;QACjB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAA;QAChB,IAAI,CAAC,aAAa,GAAG,EAAE,CAAA;QACvB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,QAAmC;QAM1C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC,SAAS,EAAE,CAAA;QAC3B,CAAC;QACD,MAAM,IAAI,CAAC,eA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