file-viewer3 1.0.26 → 2.0.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/README.en.md +7 -377
- package/README.md +8 -352
- package/dist/file-viewer3.css +1 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +27 -129
- package/dist/components/3MFLoader.js +0 -527
- package/dist/components/AMFLoader.js +0 -188
- package/dist/components/ArchiveViewer.js +0 -526
- package/dist/components/AudioViewer.js +0 -66
- package/dist/components/CadViewer.js +0 -9040
- package/dist/components/CodeViewer.js +0 -151
- package/dist/components/ColladaLoader.js +0 -2282
- package/dist/components/DrawingViewer.js +0 -295
- package/dist/components/EdaViewer.js +0 -630
- package/dist/components/EmailViewer.js +0 -276
- package/dist/components/EpubViewer.js +0 -172
- package/dist/components/FBXLoader.js +0 -1574
- package/dist/components/GLTFLoader.js +0 -1383
- package/dist/components/ImageViewer.js +0 -1519
- package/dist/components/KMZLoader.js +0 -45
- package/dist/components/MarkdownViewer.js +0 -1476
- package/dist/components/ModelViewer.js +0 -797
- package/dist/components/OBJLoader.js +0 -287
- package/dist/components/OfdViewer.js +0 -133
- package/dist/components/PCDLoader.js +0 -141
- package/dist/components/PLYLoader.js +0 -305
- package/dist/components/PdfView.js +0 -27667
- package/dist/components/PptxRender.js +0 -11217
- package/dist/components/STLLoader.js +0 -83
- package/dist/components/TDSLoader.js +0 -228
- package/dist/components/TypstViewer.js +0 -1697
- package/dist/components/USDLoader.js +0 -2526
- package/dist/components/UmdViewer.js +0 -1873
- package/dist/components/VRMLLoader.js +0 -6422
- package/dist/components/VTKLoader.js +0 -337
- package/dist/components/XYZLoader.js +0 -30
- package/dist/components/XlsxTable.js +0 -7879
- package/dist/components/__vite-browser-external.js +0 -7
- package/dist/components/_plugin-vue_export-helper.js +0 -8
- package/dist/components/ar-SA-G6X2FPQ2.js +0 -523
- package/dist/components/arc.js +0 -79
- package/dist/components/architecture-7EHR7CIX.js +0 -3
- package/dist/components/architectureDiagram-3BPJPVTR.js +0 -4096
- package/dist/components/archive.js +0 -24
- package/dist/components/asyncToGenerator.js +0 -29
- package/dist/components/audio.js +0 -19
- package/dist/components/az-AZ-76LH7QW2.js +0 -523
- package/dist/components/bash.js +0 -169
- package/dist/components/bg-BG-XCXSNQG7.js +0 -523
- package/dist/components/blockDiagram-GPEHLZMM.js +0 -3357
- package/dist/components/bn-BD-2XOGV67Q.js +0 -523
- package/dist/components/c4Diagram-AAUBKEIU.js +0 -2957
- package/dist/components/ca-ES-6MX7JW3Y.js +0 -523
- package/dist/components/cad.js +0 -23
- package/dist/components/cfb.js +0 -1174
- package/dist/components/channel.js +0 -5
- package/dist/components/chunk-2J33WTMH.js +0 -26
- package/dist/components/chunk-3OPIFGDE.js +0 -4167
- package/dist/components/chunk-4BX2VUAB.js +0 -19
- package/dist/components/chunk-55IACEB6.js +0 -9
- package/dist/components/chunk-5ZQYHXKU.js +0 -669
- package/dist/components/chunk-6U3AYISY.js +0 -624
- package/dist/components/chunk-727SXJPM.js +0 -3356
- package/dist/components/chunk-AGHRB4JF.js +0 -324
- package/dist/components/chunk-AQP2D5EJ.js +0 -2055
- package/dist/components/chunk-BSJP7CBP.js +0 -83
- package/dist/components/chunk-CSCIHK7Q.js +0 -3500
- package/dist/components/chunk-EIO257PC.js +0 -1836
- package/dist/components/chunk-FMBD7UC4.js +0 -5
- package/dist/components/chunk-K2UTITRG.js +0 -17627
- package/dist/components/chunk-KSCS5N6A.js +0 -572
- package/dist/components/chunk-L5ZTLDWV.js +0 -40
- package/dist/components/chunk-LZXEDZCA.js +0 -60
- package/dist/components/chunk-ND2GUHAM.js +0 -61
- package/dist/components/chunk-NNHCCRGN.js +0 -20425
- package/dist/components/chunk-NZK2D7GU.js +0 -68
- package/dist/components/chunk-O5CBEL6O.js +0 -1894
- package/dist/components/chunk-QZHKN3VN.js +0 -12
- package/dist/components/chunk-SRAX5OIU.js +0 -22
- package/dist/components/chunk-WU5MYG2G.js +0 -14
- package/dist/components/chunk-XPW4576I.js +0 -1146
- package/dist/components/chunk-Z3N5DIM6.js +0 -59
- package/dist/components/chunk-ZUYEQ4TG.js +0 -22
- package/dist/components/chunk.js +0 -23
- package/dist/components/classDiagram-4FO5ZUOK.js +0 -29
- package/dist/components/classDiagram-v2-Q7XG4LA2.js +0 -29
- package/dist/components/compiler.js +0 -2
- package/dist/components/core.js +0 -845
- package/dist/components/cose-bilkent-S5V4N54A.js +0 -2268
- package/dist/components/cpp.js +0 -225
- package/dist/components/cs-CZ-2BRQDIVT.js +0 -523
- package/dist/components/csharp.js +0 -260
- package/dist/components/css.js +0 -140
- package/dist/components/cytoscape.esm.js +0 -18114
- package/dist/components/da-DK-5WZEPLOC.js +0 -523
- package/dist/components/dagre-BM42HDAG.js +0 -325
- package/dist/components/dagre.js +0 -1936
- package/dist/components/de-DE-XR44H4JA.js +0 -523
- package/dist/components/defaultLocale.js +0 -201
- package/dist/components/defineProperty.js +0 -50
- package/dist/components/diagram-2AECGRRQ.js +0 -229
- package/dist/components/diagram-5GNKFQAL.js +0 -108
- package/dist/components/diagram-KO2AKTUF.js +0 -443
- package/dist/components/diagram-LMA3HP47.js +0 -139
- package/dist/components/diagram-OG6HWLK6.js +0 -541
- package/dist/components/diff.js +0 -39
- package/dist/components/directory-open-01563666.js +0 -26
- package/dist/components/directory-open-4ed118d0.js +0 -83
- package/dist/components/dist.js +0 -50
- package/dist/components/dist2.js +0 -3291
- package/dist/components/dist3.js +0 -1593
- package/dist/components/documentSearch.js +0 -378
- package/dist/components/docx-preview.js +0 -3113
- package/dist/components/drawing.js +0 -19
- package/dist/components/ebook.js +0 -16
- package/dist/components/eda.js +0 -20
- package/dist/components/el-GR-BZB4AONW.js +0 -523
- package/dist/components/email.js +0 -21
- package/dist/components/en-B4ZKOASM.js +0 -3
- package/dist/components/erDiagram-TEJ5UH35.js +0 -1719
- package/dist/components/es-ES-U4NZUMDT.js +0 -523
- package/dist/components/eu-ES-A7QVB2H4.js +0 -523
- package/dist/components/eventmodeling-FCH6USID.js +0 -3
- package/dist/components/fa-IR-HGAKTJCU.js +0 -523
- package/dist/components/fflate.module.js +0 -323
- package/dist/components/fi-FI-Z5N7JZ37.js +0 -523
- package/dist/components/file-open-002ab408.js +0 -38
- package/dist/components/file-open-7c801643.js +0 -24
- package/dist/components/file-save-3189631c.js +0 -40
- package/dist/components/file-save-745eba88.js +0 -36
- package/dist/components/flowDiagram-I6XJVG4X.js +0 -4181
- package/dist/components/fr-FR-RHASNOE6.js +0 -523
- package/dist/components/ganttDiagram-6RSMTGT7.js +0 -2182
- package/dist/components/gitGraph-WXDBUCRP.js +0 -3
- package/dist/components/gitGraphDiagram-PVQCEYII.js +0 -788
- package/dist/components/gl-ES-HMX3MZ6V.js +0 -523
- package/dist/components/global-compiler.js +0 -23
- package/dist/components/global-renderer.js +0 -23
- package/dist/components/go.js +0 -140
- package/dist/components/graphlib.js +0 -1267
- package/dist/components/he-IL-6SHJWFNN.js +0 -523
- package/dist/components/hi-IN-IWLTKZ5I.js +0 -523
- package/dist/components/hu-HU-A5ZG7DT2.js +0 -523
- package/dist/components/id-ID-SAP4L64H.js +0 -523
- package/dist/components/image-GAAHSSAO.js +0 -3
- package/dist/components/image-blob-reduce.esm.js +0 -1429
- package/dist/components/image.js +0 -17
- package/dist/components/info-J43DQDTF.js +0 -3
- package/dist/components/infoDiagram-5YYISTIA.js +0 -26
- package/dist/components/ini.js +0 -88
- package/dist/components/init.js +0 -15
- package/dist/components/ishikawaDiagram-YF4QCWOH.js +0 -718
- package/dist/components/it-IT-JPQ66NNP.js +0 -523
- package/dist/components/ja-JP-DBVTYXUO.js +0 -523
- package/dist/components/java.js +0 -169
- package/dist/components/javascript.js +0 -436
- package/dist/components/journeyDiagram-JHISSGLW.js +0 -885
- package/dist/components/json.js +0 -36
- package/dist/components/jszip.min.js +0 -3033
- package/dist/components/kaa-6HZHGXH3.js +0 -523
- package/dist/components/kab-KAB-ZGHBKWFO.js +0 -523
- package/dist/components/kanban-definition-UN3LZRKU.js +0 -986
- package/dist/components/katex.js +0 -21979
- package/dist/components/kk-KZ-P5N5QNE5.js +0 -523
- package/dist/components/km-KH-HSX4SM5Z.js +0 -523
- package/dist/components/ko-KR-MTYHY66A.js +0 -523
- package/dist/components/ku-TR-6OUDTVRD.js +0 -523
- package/dist/components/lib.js +0 -4877
- package/dist/components/libarchive.js +0 -360
- package/dist/components/linear.js +0 -289
- package/dist/components/lt-LT-XHIRWOB4.js +0 -523
- package/dist/components/lv-LV-5QDEKY6T.js +0 -523
- package/dist/components/markdown.js +0 -181
- package/dist/components/md.js +0 -17
- package/dist/components/mermaid-parser.core.js +0 -328
- package/dist/components/mindmap-definition-RKZ34NQL.js +0 -1016
- package/dist/components/model.js +0 -21
- package/dist/components/mp4.js +0 -12
- package/dist/components/mr-IN-CRQNXWMA.js +0 -523
- package/dist/components/my-MM-5M5IBNSE.js +0 -523
- package/dist/components/nb-NO-T6EIAALU.js +0 -523
- package/dist/components/nestedRender.js +0 -158
- package/dist/components/nl-NL-IS3SIHDZ.js +0 -523
- package/dist/components/nn-NO-6E72VCQL.js +0 -523
- package/dist/components/objectSpread2.js +0 -29
- package/dist/components/objectWithoutProperties.js +0 -28
- package/dist/components/oc-FR-POXYY2M6.js +0 -523
- package/dist/components/ofd.js +0 -5261
- package/dist/components/ofd2.js +0 -16
- package/dist/components/ordinal.js +0 -65
- package/dist/components/pa-IN-N4M65BXN.js +0 -523
- package/dist/components/packet-YPE3B663.js +0 -3
- package/dist/components/pdf.js +0 -24
- package/dist/components/percentages-BXMCSKIN.js +0 -3
- package/dist/components/php.js +0 -294
- package/dist/components/pica.js +0 -1009
- package/dist/components/pie-LRSECV5Y.js +0 -3
- package/dist/components/pie.js +0 -47
- package/dist/components/pieDiagram-4H26LBE5.js +0 -130
- package/dist/components/pl-PL-T2D74RX3.js +0 -523
- package/dist/components/postal-mime.js +0 -3146
- package/dist/components/pptx.js +0 -15
- package/dist/components/printLayout.js +0 -42
- package/dist/components/prod.js +0 -21770
- package/dist/components/pt-BR-5N22H2LF.js +0 -523
- package/dist/components/pt-PT-UZXXM6DQ.js +0 -523
- package/dist/components/python.js +0 -238
- package/dist/components/quadrantDiagram-W4KKPZXB.js +0 -1988
- package/dist/components/radar-GUYGQ44K.js +0 -3
- package/dist/components/renderer.js +0 -2
- package/dist/components/requirementDiagram-4Y6WPE33.js +0 -2230
- package/dist/components/ro-RO-JPDTUUEW.js +0 -523
- package/dist/components/rough.esm.js +0 -1355
- package/dist/components/roundRect.js +0 -90
- package/dist/components/ru-RU-B4JR7IUQ.js +0 -523
- package/dist/components/rust.js +0 -169
- package/dist/components/sankeyDiagram-5OEKKPKP.js +0 -972
- package/dist/components/sequenceDiagram-3UESZ5HK.js +0 -4255
- package/dist/components/shared.js +0 -175
- package/dist/components/shared2.js +0 -4
- package/dist/components/si-LK-N5RQ5JYF.js +0 -523
- package/dist/components/sk-SK-C5VTKIMK.js +0 -523
- package/dist/components/sl-SI-NN7IZMDC.js +0 -523
- package/dist/components/sourceLoading.js +0 -134
- package/dist/components/sql.js +0 -118
- package/dist/components/src.js +0 -2664
- package/dist/components/src2.js +0 -10722
- package/dist/components/stateDiagram-AJRCARHV.js +0 -217
- package/dist/components/stateDiagram-v2-BHNVJYJU.js +0 -27
- package/dist/components/subset-shared.chunk.js +0 -3
- package/dist/components/subset-worker.chunk.js +0 -21
- package/dist/components/sv-SE-XGPEYMSR.js +0 -523
- package/dist/components/ta-IN-2NMHFXQM.js +0 -523
- package/dist/components/text.js +0 -20
- package/dist/components/th-TH-HPSO5L25.js +0 -523
- package/dist/components/three.module.js +0 -13134
- package/dist/components/time.js +0 -910
- package/dist/components/timeline-definition-PNZ67QCA.js +0 -1084
- package/dist/components/tr-TR-DEFEU3FU.js +0 -523
- package/dist/components/treeView-BLDUP644.js +0 -3
- package/dist/components/treemap-LRROVOQU.js +0 -3
- package/dist/components/typescript.js +0 -521
- package/dist/components/typst.js +0 -25
- package/dist/components/uk-UA-QMV73CPH.js +0 -523
- package/dist/components/umd.js +0 -16
- package/dist/components/use.js +0 -422
- package/dist/components/util.js +0 -49
- package/dist/components/vennDiagram-CIIHVFJN.js +0 -1880
- package/dist/components/vi-VN-M7AON7JQ.js +0 -523
- package/dist/components/viewerZoom.js +0 -92
- package/dist/components/wardley-L42UT6IY.js +0 -3
- package/dist/components/wardleyDiagram-YWT4CUSO.js +0 -656
- package/dist/components/wasm-pack-shim.js +0 -1711
- package/dist/components/wasm-pack-shim2.js +0 -934
- package/dist/components/wasm.js +0 -97
- package/dist/components/word.js +0 -3055
- package/dist/components/worker-ref.js +0 -16
- package/dist/components/xlsx.js +0 -21
- package/dist/components/xml.js +0 -166
- package/dist/components/xychartDiagram-2RQKCTM6.js +0 -2015
- package/dist/components/yaml.js +0 -144
- package/dist/components/zh-CN-LNUGB5OW.js +0 -523
- package/dist/components/zh-HK-E62DVLB3.js +0 -523
- package/dist/components/zh-TW-RAJ6MFWO.js +0 -523
- package/dist/index.mjs +0 -3293
- package/dist/src/App.vue.d.ts +0 -3
- package/dist/src/compare/CompareApp.vue.d.ts +0 -3
- package/dist/src/compare/main.d.ts +0 -0
- package/dist/src/compare/useSynchronizedScroll.d.ts +0 -7
- package/dist/src/components/HelloWorld.vue.d.ts +0 -3
- package/dist/src/components/utils.d.ts +0 -4
- package/dist/src/main.d.ts +0 -0
- package/dist/src/package/common/printCapability.d.ts +0 -27
- package/dist/src/package/common/printLayout.d.ts +0 -16
- package/dist/src/package/common/sourceLoading.d.ts +0 -10
- package/dist/src/package/common/type.d.ts +0 -544
- package/dist/src/package/common/util.d.ts +0 -5
- package/dist/src/package/common/worker-ref.d.ts +0 -12
- package/dist/src/package/components/FileViewer/FileViewer.vue.d.ts +0 -75
- package/dist/src/package/components/FileViewer/exportDocumentTemplate.d.ts +0 -9
- package/dist/src/package/components/FileViewer/hooks/useViewerDocumentFeatures.d.ts +0 -29
- package/dist/src/package/components/FileViewer/hooks/useViewerExport.d.ts +0 -21
- package/dist/src/package/components/FileViewer/hooks/useViewerWatermark.d.ts +0 -8
- package/dist/src/package/components/FileViewer/hooks/useViewerZoom.d.ts +0 -34
- package/dist/src/package/components/FileViewer/index.d.ts +0 -2
- package/dist/src/package/components/FileViewer/util.d.ts +0 -3
- package/dist/src/package/index.d.ts +0 -22
- package/dist/src/package/use/documentLocation.d.ts +0 -15
- package/dist/src/package/use/documentSearch.d.ts +0 -234
- package/dist/src/package/use/index.d.ts +0 -5
- package/dist/src/package/use/loading.d.ts +0 -33
- package/dist/src/package/use/viewerZoom.d.ts +0 -42
- package/dist/src/package/use/worker.d.ts +0 -24
- package/dist/src/package/vendors/archive/ArchiveViewer.vue.d.ts +0 -9
- package/dist/src/package/vendors/archive/cache.d.ts +0 -10
- package/dist/src/package/vendors/archive/fallback.d.ts +0 -9
- package/dist/src/package/vendors/archive/index.d.ts +0 -3
- package/dist/src/package/vendors/archive/shared.d.ts +0 -24
- package/dist/src/package/vendors/audio/AudioViewer.vue.d.ts +0 -7
- package/dist/src/package/vendors/audio/index.d.ts +0 -7
- package/dist/src/package/vendors/cad/CadViewer.vue.d.ts +0 -9
- package/dist/src/package/vendors/cad/index.d.ts +0 -8
- package/dist/src/package/vendors/drawing/DrawingViewer.vue.d.ts +0 -15
- package/dist/src/package/vendors/drawing/index.d.ts +0 -7
- package/dist/src/package/vendors/ebook/EpubViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/ebook/index.d.ts +0 -7
- package/dist/src/package/vendors/eda/EdaViewer.vue.d.ts +0 -8
- package/dist/src/package/vendors/eda/index.d.ts +0 -2
- package/dist/src/package/vendors/eda/parser.d.ts +0 -77
- package/dist/src/package/vendors/email/EmailViewer.vue.d.ts +0 -10
- package/dist/src/package/vendors/email/index.d.ts +0 -2
- package/dist/src/package/vendors/image/ImageViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/image/index.d.ts +0 -4
- package/dist/src/package/vendors/md/MarkdownViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/md/index.d.ts +0 -4
- package/dist/src/package/vendors/model/ModelViewer.vue.d.ts +0 -8
- package/dist/src/package/vendors/model/index.d.ts +0 -3
- package/dist/src/package/vendors/model/shared.d.ts +0 -1
- package/dist/src/package/vendors/mp4/index.d.ts +0 -4
- package/dist/src/package/vendors/nestedRender.d.ts +0 -10
- package/dist/src/package/vendors/ofd/OfdViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/ofd/index.d.ts +0 -7
- package/dist/src/package/vendors/pdf/PdfView.vue.d.ts +0 -10
- package/dist/src/package/vendors/pdf/index.d.ts +0 -2
- package/dist/src/package/vendors/pdf/worker/index.d.ts +0 -4
- package/dist/src/package/vendors/pdf/worker/pdf.worker.d.ts +0 -0
- package/dist/src/package/vendors/pptx/PptxRender.vue.d.ts +0 -9
- package/dist/src/package/vendors/pptx/index.d.ts +0 -6
- package/dist/src/package/vendors/pptx/options.d.ts +0 -39
- package/dist/src/package/vendors/pptx/support/chart.d.ts +0 -4
- package/dist/src/package/vendors/pptx/worker/index.d.ts +0 -4
- package/dist/src/package/vendors/renders.d.ts +0 -3
- package/dist/src/package/vendors/text/CodeViewer.vue.d.ts +0 -7
- package/dist/src/package/vendors/text/index.d.ts +0 -10
- package/dist/src/package/vendors/typst/TypstViewer.vue.d.ts +0 -15
- package/dist/src/package/vendors/typst/index.d.ts +0 -8
- package/dist/src/package/vendors/umd/UmdViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/umd/index.d.ts +0 -7
- package/dist/src/package/vendors/umd/parser.d.ts +0 -30
- package/dist/src/package/vendors/word/doc.d.ts +0 -5
- package/dist/src/package/vendors/word/docx.d.ts +0 -5
- package/dist/src/package/vendors/word/docx.worker.d.ts +0 -1
- package/dist/src/package/vendors/word/index.d.ts +0 -3
- package/dist/src/package/vendors/xlsx/XlsxTable.state.d.ts +0 -80
- package/dist/src/package/vendors/xlsx/XlsxTable.view.d.ts +0 -25
- package/dist/src/package/vendors/xlsx/XlsxTable.vue.d.ts +0 -6
- package/dist/src/package/vendors/xlsx/index.d.ts +0 -6
- package/dist/src/package/vendors/xlsx/util.d.ts +0 -3
- package/dist/src/package/vendors/xlsx/worker/index.d.ts +0 -4
- package/dist/src/package/vendors/xlsx/worker/sheetjs/SheetJsModel.d.ts +0 -73
- package/dist/src/package/vendors/xlsx/worker/sheetjs/color.d.ts +0 -2
- package/dist/src/package/vendors/xlsx/worker/sheetjs/index.d.ts +0 -4
- package/dist/src/package/vendors/xlsx/worker/sheetjs/sheet.worker.d.ts +0 -1
- package/dist/style.css +0 -1
- package/dist/wasm/cad/dwfv-render.wasm +0 -0
- package/dist/wasm/cad/dwg-worker.js +0 -24
- package/dist/wasm/cad/libredwg-web.js +0 -15
- package/dist/wasm/cad/libredwg-web.wasm +0 -0
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
import { o as e } from "./chunk.js";
|
|
2
|
-
import { n as t, t as n } from "./asyncToGenerator.js";
|
|
3
|
-
import { t as r } from "./_plugin-vue_export-helper.js";
|
|
4
|
-
import { t as i } from "./nestedRender.js";
|
|
5
|
-
import { Fragment as a, computed as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, defineComponent as d, nextTick as f, normalizeClass as p, onBeforeUnmount as m, onMounted as h, openBlock as g, ref as _, renderList as v, toDisplayString as y } from "vue";
|
|
6
|
-
//#region src/package/vendors/email/EmailViewer.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
t();
|
|
8
|
-
var b = { class: "email-viewer" }, x = { class: "email-header" }, S = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "email-meta"
|
|
11
|
-
}, C = { key: 0 }, w = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "email-body"
|
|
14
|
-
}, T = { class: "email-sidebar" }, E = { class: "body-tabs" }, D = ["disabled", "onClick"], O = { class: "attachment-panel" }, k = { class: "attachment-title" }, A = ["onClick"], ee = { class: "message-panel" }, j = ["srcdoc"], M = {
|
|
15
|
-
key: 1,
|
|
16
|
-
class: "email-text"
|
|
17
|
-
}, N = {
|
|
18
|
-
key: 2,
|
|
19
|
-
class: "email-text"
|
|
20
|
-
}, P = {
|
|
21
|
-
key: 3,
|
|
22
|
-
class: "attachment-preview"
|
|
23
|
-
}, F = { class: "attachment-preview-head" }, I = {
|
|
24
|
-
key: 1,
|
|
25
|
-
class: "email-state"
|
|
26
|
-
}, L = {
|
|
27
|
-
key: 2,
|
|
28
|
-
class: "email-error"
|
|
29
|
-
}, R = /*#__PURE__*/ r(/* @__PURE__ */ d({
|
|
30
|
-
__name: "EmailViewer",
|
|
31
|
-
props: {
|
|
32
|
-
data: {},
|
|
33
|
-
type: {},
|
|
34
|
-
filename: {},
|
|
35
|
-
options: {}
|
|
36
|
-
},
|
|
37
|
-
setup(t) {
|
|
38
|
-
let r = t, d = _(null), R = _(!0), z = _("正在解析邮件..."), B = _(""), V = _("html"), H = _(null), U = _(null), W = /* @__PURE__ */ new Map(), G = [], K, q = (e) => {
|
|
39
|
-
if (!Number.isFinite(e) || e < 0) return "-";
|
|
40
|
-
if (e < 1024) return `${e} B`;
|
|
41
|
-
let t = e / 1024 / 1024;
|
|
42
|
-
return t >= 1 ? `${t.toFixed(+(t < 10))} MB` : `${(e / 1024).toFixed(+(e < 10 * 1024))} KB`;
|
|
43
|
-
}, J = (e) => e ? (Array.isArray(e) ? e : [e]).flatMap((e) => {
|
|
44
|
-
let t = e;
|
|
45
|
-
return t.group ? J(t.group) : [{
|
|
46
|
-
name: t.name || "",
|
|
47
|
-
address: t.address || t.email || ""
|
|
48
|
-
}];
|
|
49
|
-
}) : [], Y = (e) => e.map((e) => e.name && e.address ? `${e.name} <${e.address}>` : e.address || e.name || "").filter(Boolean).join(", "), X = o(() => {
|
|
50
|
-
var e;
|
|
51
|
-
let t = ((e = d.value) == null ? void 0 : e.html) || "";
|
|
52
|
-
if (!t) return "";
|
|
53
|
-
let n = t;
|
|
54
|
-
return W.forEach((e, t) => {
|
|
55
|
-
n = n.replace(RegExp(`cid:${t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}`, "gi"), e);
|
|
56
|
-
}), `<!doctype html><html><head><meta charset="utf-8"><base target="_blank"><style>body{margin:0;padding:18px;font-family:Aptos,"Segoe UI",sans-serif;line-height:1.6;color:#172033;word-break:break-word;}img{max-width:100%;height:auto;}</style></head><body>${n}</body></html>`;
|
|
57
|
-
}), Z = o(() => {
|
|
58
|
-
var e, t, n;
|
|
59
|
-
return [
|
|
60
|
-
{
|
|
61
|
-
key: "html",
|
|
62
|
-
label: "HTML",
|
|
63
|
-
disabled: !((e = d.value) != null && e.html)
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
key: "text",
|
|
67
|
-
label: "正文",
|
|
68
|
-
disabled: !((t = d.value) != null && t.text)
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
key: "headers",
|
|
72
|
-
label: "头信息",
|
|
73
|
-
disabled: !((n = d.value) != null && n.headers)
|
|
74
|
-
}
|
|
75
|
-
];
|
|
76
|
-
}), Q = function() {
|
|
77
|
-
var e = n(function* (e) {
|
|
78
|
-
if (e instanceof ArrayBuffer) return e;
|
|
79
|
-
if (e instanceof Uint8Array) {
|
|
80
|
-
let t = new Uint8Array(e.byteLength);
|
|
81
|
-
return t.set(e), t.buffer;
|
|
82
|
-
}
|
|
83
|
-
return Q(new TextEncoder().encode(e));
|
|
84
|
-
});
|
|
85
|
-
return function(t) {
|
|
86
|
-
return e.apply(this, arguments);
|
|
87
|
-
};
|
|
88
|
-
}(), te = function() {
|
|
89
|
-
var e = n(function* () {
|
|
90
|
-
var e, t;
|
|
91
|
-
let i = yield (yield import("./postal-mime.js")).default.parse(r.data, {
|
|
92
|
-
attachmentEncoding: "arraybuffer",
|
|
93
|
-
maxNestingDepth: 24,
|
|
94
|
-
maxHeadersSize: 2 * 1024 * 1024
|
|
95
|
-
}), a = i.attachments.map((e, t) => {
|
|
96
|
-
let n = typeof e.content == "string" ? e.content.length : e.content.byteLength, r = e.filename || `attachment-${t + 1}`;
|
|
97
|
-
return {
|
|
98
|
-
id: `${t}-${r}`,
|
|
99
|
-
name: r,
|
|
100
|
-
mimeType: e.mimeType,
|
|
101
|
-
size: n,
|
|
102
|
-
contentId: e.contentId,
|
|
103
|
-
load: () => Q(e.content)
|
|
104
|
-
};
|
|
105
|
-
});
|
|
106
|
-
return yield Promise.all(a.map(function() {
|
|
107
|
-
var e = n(function* (e) {
|
|
108
|
-
var t;
|
|
109
|
-
if (!e.contentId || !((t = e.mimeType) != null && t.startsWith("image/"))) return;
|
|
110
|
-
let n = yield e.load(), r = URL.createObjectURL(new Blob([n], { type: e.mimeType }));
|
|
111
|
-
G.push(r), W.set(e.contentId.replace(/[<>]/g, ""), r);
|
|
112
|
-
});
|
|
113
|
-
return function(t) {
|
|
114
|
-
return e.apply(this, arguments);
|
|
115
|
-
};
|
|
116
|
-
}())), {
|
|
117
|
-
kind: "eml",
|
|
118
|
-
subject: i.subject || r.filename,
|
|
119
|
-
from: J(i.from),
|
|
120
|
-
to: J(i.to),
|
|
121
|
-
cc: J(i.cc),
|
|
122
|
-
date: i.date,
|
|
123
|
-
text: i.text,
|
|
124
|
-
html: i.html,
|
|
125
|
-
headers: ((e = i.headerLines) == null ? void 0 : e.map((e) => e.line).join("\n")) || ((t = i.headers) == null ? void 0 : t.map((e) => `${e.originalKey}: ${e.value}`).join("\n")),
|
|
126
|
-
attachments: a
|
|
127
|
-
};
|
|
128
|
-
});
|
|
129
|
-
return function() {
|
|
130
|
-
return e.apply(this, arguments);
|
|
131
|
-
};
|
|
132
|
-
}(), ne = function() {
|
|
133
|
-
var t = n(function* () {
|
|
134
|
-
var t;
|
|
135
|
-
let i = yield import("./lib.js").then((t) => /* @__PURE__ */ e(t.default, 1)), a = new (((t = i.default) == null ? void 0 : t.default) || i.default)(r.data), o = a.getFileData(), s = (o.attachments || []).map((e, t) => {
|
|
136
|
-
let r = e.fileName || e.fileNameShort || e.name || `attachment-${t + 1}${e.extension || ""}`;
|
|
137
|
-
return {
|
|
138
|
-
id: `${t}-${r}`,
|
|
139
|
-
name: r,
|
|
140
|
-
mimeType: "application/octet-stream",
|
|
141
|
-
size: e.contentLength || e.size || 0,
|
|
142
|
-
contentId: e.pidContentId,
|
|
143
|
-
load() {
|
|
144
|
-
return n(function* () {
|
|
145
|
-
return Q(a.getAttachment(e).content);
|
|
146
|
-
})();
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
});
|
|
150
|
-
return {
|
|
151
|
-
kind: "msg",
|
|
152
|
-
subject: o.subject || r.filename,
|
|
153
|
-
from: J({
|
|
154
|
-
name: o.senderName,
|
|
155
|
-
address: o.senderEmail
|
|
156
|
-
}),
|
|
157
|
-
to: J(o.recipients || []).filter((e) => e.name || e.address),
|
|
158
|
-
cc: [],
|
|
159
|
-
date: o.messageDeliveryTime || o.clientSubmitTime || o.creationTime,
|
|
160
|
-
text: o.body,
|
|
161
|
-
html: o.html || "",
|
|
162
|
-
headers: o.headers,
|
|
163
|
-
attachments: s
|
|
164
|
-
};
|
|
165
|
-
});
|
|
166
|
-
return function() {
|
|
167
|
-
return t.apply(this, arguments);
|
|
168
|
-
};
|
|
169
|
-
}(), re = function() {
|
|
170
|
-
var e = n(function* () {
|
|
171
|
-
R.value = !0, B.value = "";
|
|
172
|
-
try {
|
|
173
|
-
d.value = r.type === "msg" ? yield ne() : yield te(), V.value = d.value.html ? "html" : d.value.text ? "text" : "headers";
|
|
174
|
-
} catch (e) {
|
|
175
|
-
console.error(e), B.value = e instanceof Error ? e.message : String(e);
|
|
176
|
-
} finally {
|
|
177
|
-
R.value = !1;
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
return function() {
|
|
181
|
-
return e.apply(this, arguments);
|
|
182
|
-
};
|
|
183
|
-
}(), $ = () => {
|
|
184
|
-
var e;
|
|
185
|
-
K == null || (e = K.unmount) == null || e.call(K), K = void 0;
|
|
186
|
-
let t = U.value;
|
|
187
|
-
if (t) for (; t.firstChild;) t.removeChild(t.firstChild);
|
|
188
|
-
}, ie = function() {
|
|
189
|
-
var e = n(function* (e) {
|
|
190
|
-
H.value = e, R.value = !0, z.value = `正在打开附件 ${e.name}...`;
|
|
191
|
-
try {
|
|
192
|
-
let t = yield e.load();
|
|
193
|
-
yield f(), $();
|
|
194
|
-
let n = U.value;
|
|
195
|
-
if (!n) return;
|
|
196
|
-
let a = document.createElement("div");
|
|
197
|
-
a.className = "email-attachment-render", n.appendChild(a), K = yield i(t, e.name.includes(".") ? e.name.slice(e.name.lastIndexOf(".") + 1).toLowerCase() : "txt", a, {
|
|
198
|
-
filename: e.name,
|
|
199
|
-
options: r.options
|
|
200
|
-
});
|
|
201
|
-
} catch (e) {
|
|
202
|
-
console.error(e), B.value = e instanceof Error ? e.message : String(e);
|
|
203
|
-
} finally {
|
|
204
|
-
R.value = !1, z.value = "正在解析邮件...";
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
return function(t) {
|
|
208
|
-
return e.apply(this, arguments);
|
|
209
|
-
};
|
|
210
|
-
}(), ae = function() {
|
|
211
|
-
var e = n(function* (e) {
|
|
212
|
-
let t = yield e.load(), n = URL.createObjectURL(new Blob([t], { type: e.mimeType || "application/octet-stream" }));
|
|
213
|
-
G.push(n);
|
|
214
|
-
let r = document.createElement("a");
|
|
215
|
-
r.href = n, r.download = e.name, document.body.appendChild(r), r.click(), r.remove();
|
|
216
|
-
});
|
|
217
|
-
return function(t) {
|
|
218
|
-
return e.apply(this, arguments);
|
|
219
|
-
};
|
|
220
|
-
}();
|
|
221
|
-
return h(() => {
|
|
222
|
-
re();
|
|
223
|
-
}), m(() => {
|
|
224
|
-
$(), G.forEach((e) => URL.revokeObjectURL(e));
|
|
225
|
-
}), (e, n) => {
|
|
226
|
-
var r, i;
|
|
227
|
-
return g(), c("section", b, [
|
|
228
|
-
l("header", x, [
|
|
229
|
-
l("span", null, y(((r = d.value) == null || (r = r.kind) == null ? void 0 : r.toUpperCase()) || t.type.toUpperCase()), 1),
|
|
230
|
-
l("h2", null, y(((i = d.value) == null ? void 0 : i.subject) || t.filename), 1),
|
|
231
|
-
d.value ? (g(), c("div", S, [
|
|
232
|
-
l("p", null, [n[1] || (n[1] = l("strong", null, "发件人", -1)), u(y(Y(d.value.from) || "-"), 1)]),
|
|
233
|
-
l("p", null, [n[2] || (n[2] = l("strong", null, "收件人", -1)), u(y(Y(d.value.to) || "-"), 1)]),
|
|
234
|
-
d.value.cc.length ? (g(), c("p", C, [n[3] || (n[3] = l("strong", null, "抄送", -1)), u(y(Y(d.value.cc)), 1)])) : s("", !0),
|
|
235
|
-
l("p", null, [n[4] || (n[4] = l("strong", null, "时间", -1)), u(y(d.value.date || "-"), 1)])
|
|
236
|
-
])) : s("", !0)
|
|
237
|
-
]),
|
|
238
|
-
d.value ? (g(), c("div", w, [l("aside", T, [l("div", E, [(g(!0), c(a, null, v(Z.value, (e) => (g(), c("button", {
|
|
239
|
-
key: e.key,
|
|
240
|
-
type: "button",
|
|
241
|
-
disabled: e.disabled,
|
|
242
|
-
class: p({ active: V.value === e.key }),
|
|
243
|
-
onClick: (t) => V.value = e.key
|
|
244
|
-
}, y(e.label), 11, D))), 128))]), l("section", O, [l("div", k, [n[5] || (n[5] = l("strong", null, "附件", -1)), l("span", null, y(d.value.attachments.length), 1)]), (g(!0), c(a, null, v(d.value.attachments, (e) => {
|
|
245
|
-
var t, n;
|
|
246
|
-
return g(), c("button", {
|
|
247
|
-
key: e.id,
|
|
248
|
-
type: "button",
|
|
249
|
-
class: p(["attachment-item", { active: ((t = H.value) == null ? void 0 : t.id) === e.id }]),
|
|
250
|
-
onClick: (t) => ie(e)
|
|
251
|
-
}, [
|
|
252
|
-
l("span", null, y(((n = e.name.split(".").pop()) == null ? void 0 : n.toUpperCase()) || "FILE"), 1),
|
|
253
|
-
l("strong", null, y(e.name), 1),
|
|
254
|
-
l("em", null, y(q(e.size)), 1)
|
|
255
|
-
], 10, A);
|
|
256
|
-
}), 128))])]), l("main", ee, [V.value === "html" && X.value ? (g(), c("iframe", {
|
|
257
|
-
key: 0,
|
|
258
|
-
class: "email-html",
|
|
259
|
-
sandbox: "",
|
|
260
|
-
srcdoc: X.value
|
|
261
|
-
}, null, 8, j)) : V.value === "text" ? (g(), c("pre", M, y(d.value.text), 1)) : (g(), c("pre", N, y(d.value.headers), 1)), H.value ? (g(), c("section", P, [l("div", F, [l("strong", null, y(H.value.name), 1), l("button", {
|
|
262
|
-
type: "button",
|
|
263
|
-
onClick: n[0] || (n[0] = (e) => ae(H.value))
|
|
264
|
-
}, "下载附件")]), l("div", {
|
|
265
|
-
ref_key: "attachmentTarget",
|
|
266
|
-
ref: U,
|
|
267
|
-
class: "attachment-target"
|
|
268
|
-
}, null, 512)])) : s("", !0)])])) : s("", !0),
|
|
269
|
-
R.value ? (g(), c("div", I, [n[6] || (n[6] = l("span", null, null, -1)), l("strong", null, y(z.value), 1)])) : s("", !0),
|
|
270
|
-
B.value ? (g(), c("div", L, [n[7] || (n[7] = l("strong", null, "邮件预览提示", -1)), l("p", null, y(B.value), 1)])) : s("", !0)
|
|
271
|
-
]);
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
}), [["__scopeId", "data-v-0989d798"]]);
|
|
275
|
-
//#endregion
|
|
276
|
-
export { R as default };
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { n as e, t } from "./asyncToGenerator.js";
|
|
2
|
-
import { t as n } from "./_plugin-vue_export-helper.js";
|
|
3
|
-
import { Fragment as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, nextTick as l, normalizeClass as u, normalizeStyle as d, onBeforeUnmount as f, onMounted as p, openBlock as m, ref as h, renderList as g, toDisplayString as _ } from "vue";
|
|
4
|
-
//#region src/package/vendors/ebook/EpubViewer.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
e();
|
|
6
|
-
var v = { class: "epub-toolbar" }, y = { class: "epub-title" }, b = { class: "epub-actions" }, x = ["disabled"], S = { class: "epub-progress" }, C = ["disabled"], w = { class: "epub-body" }, T = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "epub-toc"
|
|
9
|
-
}, E = { class: "epub-toc-head" }, D = { class: "epub-toc-list" }, O = ["onClick"], k = { class: "epub-stage-wrap" }, A = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "epub-state"
|
|
12
|
-
}, j = {
|
|
13
|
-
key: 1,
|
|
14
|
-
class: "epub-state error"
|
|
15
|
-
}, M = /*#__PURE__*/ n(/* @__PURE__ */ c({
|
|
16
|
-
__name: "EpubViewer",
|
|
17
|
-
props: { data: {} },
|
|
18
|
-
setup(e) {
|
|
19
|
-
let n = e, c = h(null), M = h("loading"), N = h(""), P = h(!0), F = h("EPUB 电子书"), I = h(""), L = h([]), R = h(""), z = h(null), B = h(!0), V = h(!1), H, U, W = !1, G, K = i(() => {
|
|
20
|
-
if (!R.value) return "";
|
|
21
|
-
let e = L.value.find((e) => e.href === R.value);
|
|
22
|
-
if (e) return e.label;
|
|
23
|
-
let t = L.value.find((e) => R.value.includes(e.href.split("#")[0]));
|
|
24
|
-
return (t == null ? void 0 : t.label) || "";
|
|
25
|
-
}), q = i(() => typeof z.value == "number" ? `${z.value}%` : K.value || "阅读中"), J = (e, t) => typeof e == "string" && e.trim() ? e.trim() : t, Y = (e, t = 0) => Array.isArray(e) ? e.flatMap((e, n) => {
|
|
26
|
-
let r = e, i = typeof r.href == "string" ? r.href : "", a = J(r.label || r.title, `章节 ${n + 1}`), o = Y(r.subitems || r.children, t + 1);
|
|
27
|
-
return i ? [{
|
|
28
|
-
depth: t,
|
|
29
|
-
href: i,
|
|
30
|
-
id: `${t}-${n}-${i}`,
|
|
31
|
-
label: a
|
|
32
|
-
}, ...o] : o;
|
|
33
|
-
}) : [], X = (e) => {
|
|
34
|
-
var t;
|
|
35
|
-
let n = e.find((e) => {
|
|
36
|
-
let t = e.label.toLowerCase();
|
|
37
|
-
return /(^|\s)(chapter|part|book|prologue|preface|introduction)\b/.test(t) || /第[一二三四五六七八九十百千0-9]+[章节回部卷篇]/.test(e.label);
|
|
38
|
-
});
|
|
39
|
-
if (n) return n.href;
|
|
40
|
-
let r = e.find((e) => {
|
|
41
|
-
let t = `${e.label} ${e.href}`.toLowerCase();
|
|
42
|
-
return !/(cover|titlepage|title-page|copyright|license|toc|contents|nav|table-of-contents|wrap0000)/.test(t);
|
|
43
|
-
});
|
|
44
|
-
return (r == null ? void 0 : r.href) || ((t = e[0]) == null ? void 0 : t.href);
|
|
45
|
-
}, Z = (e) => {
|
|
46
|
-
var t, n;
|
|
47
|
-
B.value = !!(e != null && e.atStart), V.value = !!(e != null && e.atEnd), R.value = (e == null || (t = e.start) == null ? void 0 : t.href) || "", typeof (e == null || (n = e.start) == null ? void 0 : n.percentage) == "number" && (z.value = Math.round(e.start.percentage * 100));
|
|
48
|
-
}, Q = (e) => new Promise((t) => {
|
|
49
|
-
G = window.setTimeout(t, e);
|
|
50
|
-
}), $ = () => {
|
|
51
|
-
var e, t;
|
|
52
|
-
let n = (e = c.value) == null ? void 0 : e.querySelector("iframe"), r = n == null || (t = n.contentDocument) == null ? void 0 : t.body;
|
|
53
|
-
return r ? !!(r.innerText.trim() || r.querySelector("img, svg, canvas")) : !1;
|
|
54
|
-
}, ee = function() {
|
|
55
|
-
var e = t(function* () {
|
|
56
|
-
for (let e = 0; e < 20; e++) {
|
|
57
|
-
if (W || $()) return $();
|
|
58
|
-
yield Q(100);
|
|
59
|
-
}
|
|
60
|
-
return $();
|
|
61
|
-
});
|
|
62
|
-
return function() {
|
|
63
|
-
return e.apply(this, arguments);
|
|
64
|
-
};
|
|
65
|
-
}(), te = function() {
|
|
66
|
-
var e = t(function* () {
|
|
67
|
-
M.value = "loading", yield l();
|
|
68
|
-
let e = c.value;
|
|
69
|
-
if (e) try {
|
|
70
|
-
let { default: t } = yield import("./src2.js");
|
|
71
|
-
if (W) return;
|
|
72
|
-
H = t(n.data.slice(0), {
|
|
73
|
-
openAs: "binary",
|
|
74
|
-
replacements: "blobUrl"
|
|
75
|
-
}), U = H.renderTo(e, {
|
|
76
|
-
allowScriptedContent: !1,
|
|
77
|
-
flow: "scrolled",
|
|
78
|
-
height: "100%",
|
|
79
|
-
manager: "continuous",
|
|
80
|
-
resizeOnOrientationChange: !0,
|
|
81
|
-
spread: "none",
|
|
82
|
-
width: "100%"
|
|
83
|
-
}), U.themes.default({
|
|
84
|
-
body: {
|
|
85
|
-
color: "#172033",
|
|
86
|
-
fontFamily: "Georgia, \"Times New Roman\", serif",
|
|
87
|
-
lineHeight: "1.72",
|
|
88
|
-
padding: "0 8px"
|
|
89
|
-
},
|
|
90
|
-
img: { maxWidth: "100%" },
|
|
91
|
-
html: {
|
|
92
|
-
height: "auto",
|
|
93
|
-
overflow: "auto"
|
|
94
|
-
}
|
|
95
|
-
}), U.on("relocated", Z), yield H.ready;
|
|
96
|
-
let r = yield H.loaded.metadata.catch(() => void 0);
|
|
97
|
-
F.value = J(r == null ? void 0 : r.title, F.value), I.value = J(r == null ? void 0 : r.creator, "");
|
|
98
|
-
let i = yield H.loaded.navigation.catch(() => void 0);
|
|
99
|
-
L.value = Y(i == null ? void 0 : i.toc);
|
|
100
|
-
let a = X(L.value);
|
|
101
|
-
if (yield U.display(a), !(yield ee())) throw Error("EPUB 正文渲染未完成,请刷新后重试");
|
|
102
|
-
if (W) return;
|
|
103
|
-
M.value = "ready", H.locations.generate(1200).catch(() => void 0);
|
|
104
|
-
} catch (e) {
|
|
105
|
-
console.error(e), N.value = e instanceof Error ? e.message : String(e), M.value = "error";
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
return function() {
|
|
109
|
-
return e.apply(this, arguments);
|
|
110
|
-
};
|
|
111
|
-
}(), ne = function() {
|
|
112
|
-
var e = t(function* () {
|
|
113
|
-
yield U == null ? void 0 : U.prev();
|
|
114
|
-
});
|
|
115
|
-
return function() {
|
|
116
|
-
return e.apply(this, arguments);
|
|
117
|
-
};
|
|
118
|
-
}(), re = function() {
|
|
119
|
-
var e = t(function* () {
|
|
120
|
-
yield U == null ? void 0 : U.next();
|
|
121
|
-
});
|
|
122
|
-
return function() {
|
|
123
|
-
return e.apply(this, arguments);
|
|
124
|
-
};
|
|
125
|
-
}(), ie = function() {
|
|
126
|
-
var e = t(function* (e) {
|
|
127
|
-
yield U == null ? void 0 : U.display(e.href), P.value = !1;
|
|
128
|
-
});
|
|
129
|
-
return function(t) {
|
|
130
|
-
return e.apply(this, arguments);
|
|
131
|
-
};
|
|
132
|
-
}();
|
|
133
|
-
return p(te), f(() => {
|
|
134
|
-
W = !0, G !== void 0 && (clearTimeout(G), G = void 0), U && (U.off("relocated", Z), U.destroy(), U = void 0), H == null || H.destroy(), H = void 0;
|
|
135
|
-
}), (e, t) => (m(), o("div", { class: u(["epub-viewer", { "epub-viewer--toc-hidden": !P.value }]) }, [s("div", v, [
|
|
136
|
-
s("button", {
|
|
137
|
-
type: "button",
|
|
138
|
-
class: u(["epub-icon-button", { active: P.value }]),
|
|
139
|
-
title: "目录",
|
|
140
|
-
onClick: t[0] || (t[0] = (e) => P.value = !P.value)
|
|
141
|
-
}, [...t[1] || (t[1] = [s("span", null, null, -1)])], 2),
|
|
142
|
-
s("div", y, [s("strong", null, _(F.value), 1), s("span", null, _(I.value || q.value), 1)]),
|
|
143
|
-
s("div", b, [
|
|
144
|
-
s("button", {
|
|
145
|
-
type: "button",
|
|
146
|
-
class: "epub-button",
|
|
147
|
-
disabled: M.value !== "ready" || B.value,
|
|
148
|
-
onClick: ne
|
|
149
|
-
}, " 上一页 ", 8, x),
|
|
150
|
-
s("span", S, _(q.value), 1),
|
|
151
|
-
s("button", {
|
|
152
|
-
type: "button",
|
|
153
|
-
class: "epub-button",
|
|
154
|
-
disabled: M.value !== "ready" || V.value,
|
|
155
|
-
onClick: re
|
|
156
|
-
}, " 下一页 ", 8, C)
|
|
157
|
-
])
|
|
158
|
-
]), s("div", w, [P.value ? (m(), o("aside", T, [s("div", E, [t[2] || (t[2] = s("strong", null, "目录", -1)), s("span", null, _(L.value.length) + " 项", 1)]), s("div", D, [(m(!0), o(r, null, g(L.value, (e) => (m(), o("button", {
|
|
159
|
-
key: e.id,
|
|
160
|
-
type: "button",
|
|
161
|
-
class: u(["epub-toc-item", { active: e.href === R.value }]),
|
|
162
|
-
style: d({ paddingLeft: `${12 + e.depth * 14}px` }),
|
|
163
|
-
onClick: (t) => ie(e)
|
|
164
|
-
}, _(e.label), 15, O))), 128))])])) : a("", !0), s("main", k, [s("div", {
|
|
165
|
-
ref_key: "stage",
|
|
166
|
-
ref: c,
|
|
167
|
-
class: "epub-stage"
|
|
168
|
-
}, null, 512), M.value === "loading" ? (m(), o("div", A, "正在解析 EPUB...")) : M.value === "error" ? (m(), o("div", j, _(N.value), 1)) : a("", !0)])])], 2));
|
|
169
|
-
}
|
|
170
|
-
}), [["__scopeId", "data-v-8f8a2b3b"]]);
|
|
171
|
-
//#endregion
|
|
172
|
-
export { M as default };
|