file-viewer3 1.0.8 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +160 -0
- package/README.en.md +390 -0
- package/README.md +306 -89
- package/dist/components/3MFLoader.js +527 -0
- package/dist/components/AMFLoader.js +188 -0
- package/dist/components/ArchiveViewer.js +526 -0
- package/dist/components/AudioViewer.js +66 -0
- package/dist/components/CadViewer.js +9040 -0
- package/dist/components/CodeViewer.js +151 -0
- package/dist/components/ColladaLoader.js +2282 -0
- package/dist/components/DrawingViewer.js +295 -0
- package/dist/components/EdaViewer.js +630 -0
- package/dist/components/EmailViewer.js +276 -0
- package/dist/components/EpubViewer.js +172 -0
- package/dist/components/FBXLoader.js +1574 -0
- package/dist/components/GLTFLoader.js +1383 -0
- package/dist/components/ImageViewer.js +1516 -1895
- package/dist/components/KMZLoader.js +45 -0
- package/dist/components/MarkdownViewer.js +1456 -1557
- package/dist/components/ModelViewer.js +797 -0
- package/dist/components/OBJLoader.js +287 -0
- package/dist/components/OfdViewer.js +133 -0
- package/dist/components/PCDLoader.js +141 -0
- package/dist/components/PLYLoader.js +305 -0
- package/dist/components/PdfView.js +27662 -21655
- package/dist/components/PptxRender.js +11170 -21118
- package/dist/components/STLLoader.js +83 -0
- package/dist/components/TDSLoader.js +228 -0
- package/dist/components/TypstViewer.js +1697 -0
- package/dist/components/USDLoader.js +2526 -0
- package/dist/components/UmdViewer.js +1873 -0
- package/dist/components/VRMLLoader.js +6422 -0
- package/dist/components/VTKLoader.js +337 -0
- package/dist/components/XYZLoader.js +30 -0
- package/dist/components/XlsxTable.js +7871 -69873
- package/dist/components/__vite-browser-external.js +7 -0
- package/dist/components/_plugin-vue_export-helper.js +8 -0
- package/dist/components/ar-SA-G6X2FPQ2.js +523 -0
- package/dist/components/arc.js +79 -0
- package/dist/components/architecture-7EHR7CIX.js +3 -0
- package/dist/components/architectureDiagram-3BPJPVTR.js +4096 -0
- package/dist/components/archive.js +24 -0
- package/dist/components/asyncToGenerator.js +29 -0
- package/dist/components/audio.js +19 -0
- package/dist/components/az-AZ-76LH7QW2.js +523 -0
- package/dist/components/bash.js +169 -0
- package/dist/components/bg-BG-XCXSNQG7.js +523 -0
- package/dist/components/blockDiagram-GPEHLZMM.js +3357 -0
- package/dist/components/bn-BD-2XOGV67Q.js +523 -0
- package/dist/components/c4Diagram-AAUBKEIU.js +2957 -0
- package/dist/components/ca-ES-6MX7JW3Y.js +523 -0
- package/dist/components/cad.js +23 -0
- package/dist/components/cfb.js +1174 -0
- package/dist/components/channel.js +5 -0
- package/dist/components/chunk-2J33WTMH.js +26 -0
- package/dist/components/chunk-3OPIFGDE.js +4167 -0
- package/dist/components/chunk-4BX2VUAB.js +19 -0
- package/dist/components/chunk-55IACEB6.js +9 -0
- package/dist/components/chunk-5ZQYHXKU.js +669 -0
- package/dist/components/chunk-6U3AYISY.js +624 -0
- package/dist/components/chunk-727SXJPM.js +3356 -0
- package/dist/components/chunk-AGHRB4JF.js +324 -0
- package/dist/components/chunk-AQP2D5EJ.js +2055 -0
- package/dist/components/chunk-BSJP7CBP.js +83 -0
- package/dist/components/chunk-CSCIHK7Q.js +3500 -0
- package/dist/components/chunk-EIO257PC.js +1836 -0
- package/dist/components/chunk-FMBD7UC4.js +5 -0
- package/dist/components/chunk-K2UTITRG.js +17627 -0
- package/dist/components/chunk-KSCS5N6A.js +572 -0
- package/dist/components/chunk-L5ZTLDWV.js +40 -0
- package/dist/components/chunk-LZXEDZCA.js +60 -0
- package/dist/components/chunk-ND2GUHAM.js +61 -0
- package/dist/components/chunk-NNHCCRGN.js +20425 -0
- package/dist/components/chunk-NZK2D7GU.js +68 -0
- package/dist/components/chunk-O5CBEL6O.js +1894 -0
- package/dist/components/chunk-QZHKN3VN.js +12 -0
- package/dist/components/chunk-SRAX5OIU.js +22 -0
- package/dist/components/chunk-WU5MYG2G.js +14 -0
- package/dist/components/chunk-XPW4576I.js +1146 -0
- package/dist/components/chunk-Z3N5DIM6.js +59 -0
- package/dist/components/chunk-ZUYEQ4TG.js +22 -0
- package/dist/components/chunk.js +23 -0
- package/dist/components/classDiagram-4FO5ZUOK.js +29 -0
- package/dist/components/classDiagram-v2-Q7XG4LA2.js +29 -0
- package/dist/components/compiler.js +2 -0
- package/dist/components/core.js +845 -0
- package/dist/components/cose-bilkent-S5V4N54A.js +2268 -0
- package/dist/components/cpp.js +225 -0
- package/dist/components/cs-CZ-2BRQDIVT.js +523 -0
- package/dist/components/csharp.js +260 -0
- package/dist/components/css.js +140 -0
- package/dist/components/cytoscape.esm.js +18114 -0
- package/dist/components/da-DK-5WZEPLOC.js +523 -0
- package/dist/components/dagre-BM42HDAG.js +325 -0
- package/dist/components/dagre.js +1936 -0
- package/dist/components/de-DE-XR44H4JA.js +523 -0
- package/dist/components/defaultLocale.js +201 -0
- package/dist/components/defineProperty.js +50 -0
- package/dist/components/diagram-2AECGRRQ.js +229 -0
- package/dist/components/diagram-5GNKFQAL.js +108 -0
- package/dist/components/diagram-KO2AKTUF.js +443 -0
- package/dist/components/diagram-LMA3HP47.js +139 -0
- package/dist/components/diagram-OG6HWLK6.js +541 -0
- package/dist/components/diff.js +39 -0
- package/dist/components/directory-open-01563666.js +26 -0
- package/dist/components/directory-open-4ed118d0.js +83 -0
- package/dist/components/dist.js +50 -0
- package/dist/components/dist2.js +3291 -0
- package/dist/components/dist3.js +1593 -0
- package/dist/components/documentSearch.js +378 -0
- package/dist/components/docx-preview.js +3113 -0
- package/dist/components/drawing.js +19 -0
- package/dist/components/ebook.js +16 -0
- package/dist/components/eda.js +20 -0
- package/dist/components/el-GR-BZB4AONW.js +523 -0
- package/dist/components/email.js +21 -0
- package/dist/components/en-B4ZKOASM.js +3 -0
- package/dist/components/erDiagram-TEJ5UH35.js +1719 -0
- package/dist/components/es-ES-U4NZUMDT.js +523 -0
- package/dist/components/eu-ES-A7QVB2H4.js +523 -0
- package/dist/components/eventmodeling-FCH6USID.js +3 -0
- package/dist/components/fa-IR-HGAKTJCU.js +523 -0
- package/dist/components/fflate.module.js +323 -0
- package/dist/components/fi-FI-Z5N7JZ37.js +523 -0
- package/dist/components/file-open-002ab408.js +38 -0
- package/dist/components/file-open-7c801643.js +24 -0
- package/dist/components/file-save-3189631c.js +40 -0
- package/dist/components/file-save-745eba88.js +36 -0
- package/dist/components/flowDiagram-I6XJVG4X.js +4181 -0
- package/dist/components/fr-FR-RHASNOE6.js +523 -0
- package/dist/components/ganttDiagram-6RSMTGT7.js +2182 -0
- package/dist/components/gitGraph-WXDBUCRP.js +3 -0
- package/dist/components/gitGraphDiagram-PVQCEYII.js +788 -0
- package/dist/components/gl-ES-HMX3MZ6V.js +523 -0
- package/dist/components/global-compiler.js +23 -0
- package/dist/components/global-renderer.js +23 -0
- package/dist/components/go.js +140 -0
- package/dist/components/graphlib.js +1267 -0
- package/dist/components/he-IL-6SHJWFNN.js +523 -0
- package/dist/components/hi-IN-IWLTKZ5I.js +523 -0
- package/dist/components/hu-HU-A5ZG7DT2.js +523 -0
- package/dist/components/id-ID-SAP4L64H.js +523 -0
- package/dist/components/image-GAAHSSAO.js +3 -0
- package/dist/components/image-blob-reduce.esm.js +1429 -0
- package/dist/components/image.js +17 -0
- package/dist/components/info-J43DQDTF.js +3 -0
- package/dist/components/infoDiagram-5YYISTIA.js +26 -0
- package/dist/components/ini.js +88 -0
- package/dist/components/init.js +15 -0
- package/dist/components/ishikawaDiagram-YF4QCWOH.js +718 -0
- package/dist/components/it-IT-JPQ66NNP.js +523 -0
- package/dist/components/ja-JP-DBVTYXUO.js +523 -0
- package/dist/components/java.js +169 -0
- package/dist/components/javascript.js +436 -0
- package/dist/components/journeyDiagram-JHISSGLW.js +885 -0
- package/dist/components/json.js +36 -0
- package/dist/components/jszip.min.js +3033 -0
- package/dist/components/kaa-6HZHGXH3.js +523 -0
- package/dist/components/kab-KAB-ZGHBKWFO.js +523 -0
- package/dist/components/kanban-definition-UN3LZRKU.js +986 -0
- package/dist/components/katex.js +21979 -0
- package/dist/components/kk-KZ-P5N5QNE5.js +523 -0
- package/dist/components/km-KH-HSX4SM5Z.js +523 -0
- package/dist/components/ko-KR-MTYHY66A.js +523 -0
- package/dist/components/ku-TR-6OUDTVRD.js +523 -0
- package/dist/components/lib.js +4877 -0
- package/dist/components/libarchive.js +360 -0
- package/dist/components/linear.js +289 -0
- package/dist/components/lt-LT-XHIRWOB4.js +523 -0
- package/dist/components/lv-LV-5QDEKY6T.js +523 -0
- package/dist/components/markdown.js +181 -0
- package/dist/components/md.js +17 -0
- package/dist/components/mermaid-parser.core.js +328 -0
- package/dist/components/mindmap-definition-RKZ34NQL.js +1016 -0
- package/dist/components/model.js +21 -0
- package/dist/components/mp4.js +12 -0
- package/dist/components/mr-IN-CRQNXWMA.js +523 -0
- package/dist/components/my-MM-5M5IBNSE.js +523 -0
- package/dist/components/nb-NO-T6EIAALU.js +523 -0
- package/dist/components/nestedRender.js +158 -0
- package/dist/components/nl-NL-IS3SIHDZ.js +523 -0
- package/dist/components/nn-NO-6E72VCQL.js +523 -0
- package/dist/components/objectSpread2.js +29 -0
- package/dist/components/objectWithoutProperties.js +28 -0
- package/dist/components/oc-FR-POXYY2M6.js +523 -0
- package/dist/components/ofd.js +5261 -0
- package/dist/components/ofd2.js +16 -0
- package/dist/components/ordinal.js +65 -0
- package/dist/components/pa-IN-N4M65BXN.js +523 -0
- package/dist/components/packet-YPE3B663.js +3 -0
- package/dist/components/pdf.js +24 -0
- package/dist/components/percentages-BXMCSKIN.js +3 -0
- package/dist/components/php.js +294 -0
- package/dist/components/pica.js +1009 -0
- package/dist/components/pie-LRSECV5Y.js +3 -0
- package/dist/components/pie.js +47 -0
- package/dist/components/pieDiagram-4H26LBE5.js +130 -0
- package/dist/components/pl-PL-T2D74RX3.js +523 -0
- package/dist/components/postal-mime.js +3146 -0
- package/dist/components/pptx.js +15 -0
- package/dist/components/printLayout.js +42 -0
- package/dist/components/prod.js +21770 -0
- package/dist/components/pt-BR-5N22H2LF.js +523 -0
- package/dist/components/pt-PT-UZXXM6DQ.js +523 -0
- package/dist/components/python.js +238 -0
- package/dist/components/quadrantDiagram-W4KKPZXB.js +1988 -0
- package/dist/components/radar-GUYGQ44K.js +3 -0
- package/dist/components/renderer.js +2 -0
- package/dist/components/requirementDiagram-4Y6WPE33.js +2230 -0
- package/dist/components/ro-RO-JPDTUUEW.js +523 -0
- package/dist/components/rough.esm.js +1355 -0
- package/dist/components/roundRect.js +90 -0
- package/dist/components/ru-RU-B4JR7IUQ.js +523 -0
- package/dist/components/rust.js +169 -0
- package/dist/components/sankeyDiagram-5OEKKPKP.js +972 -0
- package/dist/components/sequenceDiagram-3UESZ5HK.js +4255 -0
- package/dist/components/shared.js +175 -0
- package/dist/components/shared2.js +4 -0
- package/dist/components/si-LK-N5RQ5JYF.js +523 -0
- package/dist/components/sk-SK-C5VTKIMK.js +523 -0
- package/dist/components/sl-SI-NN7IZMDC.js +523 -0
- package/dist/components/sourceLoading.js +134 -0
- package/dist/components/sql.js +118 -0
- package/dist/components/src.js +2664 -0
- package/dist/components/src2.js +10722 -0
- package/dist/components/stateDiagram-AJRCARHV.js +217 -0
- package/dist/components/stateDiagram-v2-BHNVJYJU.js +27 -0
- package/dist/components/subset-shared.chunk.js +3 -0
- package/dist/components/subset-worker.chunk.js +21 -0
- package/dist/components/sv-SE-XGPEYMSR.js +523 -0
- package/dist/components/ta-IN-2NMHFXQM.js +523 -0
- package/dist/components/text.js +20 -0
- package/dist/components/th-TH-HPSO5L25.js +523 -0
- package/dist/components/three.module.js +13134 -0
- package/dist/components/time.js +910 -0
- package/dist/components/timeline-definition-PNZ67QCA.js +1084 -0
- package/dist/components/tr-TR-DEFEU3FU.js +523 -0
- package/dist/components/treeView-BLDUP644.js +3 -0
- package/dist/components/treemap-LRROVOQU.js +3 -0
- package/dist/components/typescript.js +521 -0
- package/dist/components/typst.js +25 -0
- package/dist/components/uk-UA-QMV73CPH.js +523 -0
- package/dist/components/umd.js +16 -0
- package/dist/components/use.js +422 -0
- package/dist/components/util.js +49 -0
- package/dist/components/vennDiagram-CIIHVFJN.js +1880 -0
- package/dist/components/vi-VN-M7AON7JQ.js +523 -0
- package/dist/components/viewerZoom.js +92 -0
- package/dist/components/wardley-L42UT6IY.js +3 -0
- package/dist/components/wardleyDiagram-YWT4CUSO.js +656 -0
- package/dist/components/wasm-pack-shim.js +1711 -0
- package/dist/components/wasm-pack-shim2.js +934 -0
- package/dist/components/wasm.js +97 -0
- package/dist/components/word.js +3055 -0
- package/dist/components/worker-ref.js +15 -20
- package/dist/components/xlsx.js +21 -0
- package/dist/components/xml.js +166 -0
- package/dist/components/xychartDiagram-2RQKCTM6.js +2015 -0
- package/dist/components/yaml.js +144 -0
- package/dist/components/zh-CN-LNUGB5OW.js +523 -0
- package/dist/components/zh-HK-E62DVLB3.js +523 -0
- package/dist/components/zh-TW-RAJ6MFWO.js +523 -0
- package/dist/file-viewer3.css +2 -0
- package/dist/index.mjs +3292 -5
- package/dist/src/App.vue.d.ts +3 -0
- package/dist/src/compare/CompareApp.vue.d.ts +3 -0
- package/dist/src/compare/main.d.ts +0 -0
- package/dist/src/compare/useSynchronizedScroll.d.ts +7 -0
- package/dist/src/components/HelloWorld.vue.d.ts +3 -0
- package/dist/src/components/utils.d.ts +4 -0
- package/dist/src/main.d.ts +0 -0
- package/dist/src/package/common/printCapability.d.ts +27 -0
- package/dist/src/package/common/printLayout.d.ts +16 -0
- package/dist/src/package/common/sourceLoading.d.ts +10 -0
- package/dist/src/package/common/type.d.ts +522 -8
- package/dist/src/package/common/worker-ref.d.ts +1 -1
- package/dist/src/package/components/FileViewer/FileViewer.vue.d.ts +74 -24
- package/dist/src/package/components/FileViewer/exportDocumentTemplate.d.ts +9 -0
- package/dist/src/package/components/FileViewer/hooks/useViewerDocumentFeatures.d.ts +29 -0
- package/dist/src/package/components/FileViewer/hooks/useViewerExport.d.ts +21 -0
- package/dist/src/package/components/FileViewer/hooks/useViewerWatermark.d.ts +8 -0
- package/dist/src/package/components/FileViewer/hooks/useViewerZoom.d.ts +34 -0
- package/dist/src/package/components/FileViewer/index.d.ts +1 -1
- package/dist/src/package/components/FileViewer/util.d.ts +2 -1
- package/dist/src/package/index.d.ts +14 -4
- package/dist/src/package/use/documentLocation.d.ts +15 -0
- package/dist/src/package/use/documentSearch.d.ts +234 -0
- package/dist/src/package/use/index.d.ts +4 -0
- package/dist/src/package/use/loading.d.ts +33 -0
- package/dist/src/package/use/viewerZoom.d.ts +42 -0
- package/dist/src/package/use/worker.d.ts +2 -2
- package/dist/src/package/vendors/archive/ArchiveViewer.vue.d.ts +9 -0
- package/dist/src/package/vendors/archive/cache.d.ts +10 -0
- package/dist/src/package/vendors/archive/fallback.d.ts +9 -0
- package/dist/src/package/vendors/archive/index.d.ts +3 -0
- package/dist/src/package/vendors/archive/shared.d.ts +24 -0
- package/dist/src/package/vendors/audio/AudioViewer.vue.d.ts +7 -0
- package/dist/src/package/vendors/audio/index.d.ts +7 -0
- package/dist/src/package/vendors/cad/CadViewer.vue.d.ts +9 -0
- package/dist/src/package/vendors/cad/index.d.ts +8 -0
- package/dist/src/package/vendors/drawing/DrawingViewer.vue.d.ts +15 -0
- package/dist/src/package/vendors/drawing/index.d.ts +7 -0
- package/dist/src/package/vendors/ebook/EpubViewer.vue.d.ts +6 -0
- package/dist/src/package/vendors/ebook/index.d.ts +7 -0
- package/dist/src/package/vendors/eda/EdaViewer.vue.d.ts +8 -0
- package/dist/src/package/vendors/eda/index.d.ts +2 -0
- package/dist/src/package/vendors/eda/parser.d.ts +77 -0
- package/dist/src/package/vendors/email/EmailViewer.vue.d.ts +10 -0
- package/dist/src/package/vendors/email/index.d.ts +2 -0
- package/dist/src/package/vendors/image/ImageViewer.vue.d.ts +6 -13
- package/dist/src/package/vendors/image/index.d.ts +1 -1
- package/dist/src/package/vendors/md/MarkdownViewer.vue.d.ts +6 -13
- package/dist/src/package/vendors/md/index.d.ts +1 -1
- package/dist/src/package/vendors/model/ModelViewer.vue.d.ts +8 -0
- package/dist/src/package/vendors/model/index.d.ts +3 -0
- package/dist/src/package/vendors/model/shared.d.ts +1 -0
- package/dist/src/package/vendors/nestedRender.d.ts +10 -0
- package/dist/src/package/vendors/ofd/OfdViewer.vue.d.ts +6 -0
- package/dist/src/package/vendors/ofd/index.d.ts +7 -0
- package/dist/src/package/vendors/pdf/PdfView.vue.d.ts +10 -13
- package/dist/src/package/vendors/pdf/index.d.ts +2 -1
- package/dist/src/package/vendors/pdf/worker/pdf.worker.d.ts +0 -0
- package/dist/src/package/vendors/pptx/PptxRender.vue.d.ts +9 -81
- package/dist/src/package/vendors/pptx/index.d.ts +1 -1
- package/dist/src/package/vendors/renders.d.ts +1 -1
- package/dist/src/package/vendors/text/CodeViewer.vue.d.ts +7 -13
- package/dist/src/package/vendors/text/index.d.ts +6 -2
- package/dist/src/package/vendors/typst/TypstViewer.vue.d.ts +15 -0
- package/dist/src/package/vendors/typst/index.d.ts +8 -0
- package/dist/src/package/vendors/umd/UmdViewer.vue.d.ts +6 -0
- package/dist/src/package/vendors/umd/index.d.ts +7 -0
- package/dist/src/package/vendors/umd/parser.d.ts +30 -0
- package/dist/src/package/vendors/word/doc.d.ts +5 -0
- package/dist/src/package/vendors/word/docx.d.ts +5 -0
- package/dist/src/package/vendors/word/docx.worker.d.ts +1 -0
- package/dist/src/package/vendors/word/index.d.ts +3 -0
- package/dist/src/package/vendors/xlsx/XlsxTable.state.d.ts +80 -0
- package/dist/src/package/vendors/xlsx/XlsxTable.view.d.ts +25 -0
- package/dist/src/package/vendors/xlsx/XlsxTable.vue.d.ts +6 -21
- package/dist/src/package/vendors/xlsx/index.d.ts +3 -2
- package/dist/src/package/vendors/xlsx/util.d.ts +0 -5
- package/dist/src/package/vendors/xlsx/worker/index.d.ts +4 -6
- package/dist/src/package/vendors/xlsx/worker/sheetjs/SheetJsModel.d.ts +73 -0
- package/dist/src/package/vendors/xlsx/worker/sheetjs/sheet.worker.d.ts +1 -0
- package/dist/style.css +1 -57
- package/dist/wasm/cad/dwfv-render.wasm +0 -0
- package/dist/wasm/cad/dwg-worker.js +24 -0
- package/dist/wasm/cad/libredwg-web.js +15 -0
- package/dist/wasm/cad/libredwg-web.wasm +0 -0
- package/package.json +118 -42
- package/.vscode/extensions.json +0 -3
- package/dist/components/_commonjs-dynamic-modules.js +0 -6
- package/dist/components/_commonjsHelpers.js +0 -36
- package/dist/components/docx-preview.min.js +0 -5287
- package/dist/components/index.js +0 -1717
- package/dist/favicon.ico +0 -0
- package/dist/index.umd.js +0 -436
- package/dist/src/package/vendors/docx/index.d.ts +0 -4
- package/dist/src/package/vendors/xlsx/render.d.ts +0 -6
- package/dist/src/package/vendors/xlsx/worker/xls/SheetJsModel.d.ts +0 -36
- package/dist/src/package/vendors/xlsx/worker/xlsx/ExcelJsModel.d.ts +0 -39
- package/dist/src/package/vendors/xlsx/worker/xlsx/context.d.ts +0 -7
- package/dist/src/package/vendors/xlsx/worker/xlsx/index.d.ts +0 -4
- package/dist/src/package/vendors/xlsx/worker/xlsx/util.d.ts +0 -10
- package/dist/worker/pdf.worker.js +0 -66
- package/dist/worker/pptx.worker.js +0 -21
- package/dist/worker/sheet.worker.js +0 -38
- package/dist/worker/xlsx.worker.js +0 -65
- /package/dist/src/package/vendors/xlsx/worker/{xlsx → sheetjs}/color.d.ts +0 -0
- /package/dist/src/package/vendors/xlsx/worker/{xls → sheetjs}/index.d.ts +0 -0
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
import { n as e, t } from "./objectWithoutProperties.js";
|
|
2
|
+
import { n, t as r } from "./objectSpread2.js";
|
|
3
|
+
import { n as i, t as a } from "./asyncToGenerator.js";
|
|
4
|
+
import { computed as o, nextTick as s, onBeforeUnmount as c, reactive as l, shallowRef as u } from "vue";
|
|
5
|
+
//#region src/package/use/documentLocation.ts
|
|
6
|
+
var d = (/* @__PURE__ */ "[data-viewer-anchor-id],.pdfViewer .page,.docx-wrapper section,.docx p,.docx li,.docx table,.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6,.markdown-body p,.markdown-body li,.markdown-body pre,.markdown-body table,article h1,article h2,article h3,article h4,article h5,article h6,article p,article li,article pre,article table,pre code,p,li,tr,h1,h2,h3,h4,h5,h6,pre,table".split(",")).join(","), f = [
|
|
7
|
+
".viewer-actions",
|
|
8
|
+
".viewer-watermark",
|
|
9
|
+
".state-panel",
|
|
10
|
+
".pdf-toolbar",
|
|
11
|
+
".pdf-nav-pane",
|
|
12
|
+
".flyfish-search-match"
|
|
13
|
+
].join(","), p = 1200, m = 160, h = (e) => typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/["\\]/g, "\\$&"), g = (e, t = 160) => {
|
|
14
|
+
let n = e.replace(/\s+/g, " ").trim();
|
|
15
|
+
return n.length > t ? `${n.slice(0, t - 1)}…` : n;
|
|
16
|
+
}, _ = (e) => {
|
|
17
|
+
let t = e.getBoundingClientRect();
|
|
18
|
+
return t.width > 0 || t.height > 0;
|
|
19
|
+
}, v = (e) => !!e.closest(f), y = (e) => {
|
|
20
|
+
let t = e.closest("[data-page-number], [data-page]"), n = (t == null ? void 0 : t.dataset.pageNumber) || (t == null ? void 0 : t.dataset.page), r = n ? Number.parseInt(n, 10) : NaN;
|
|
21
|
+
return Number.isFinite(r) ? r : void 0;
|
|
22
|
+
}, b = (e) => e.matches(".pdfViewer .page, [data-page-number], [data-page]") ? "page" : e.matches("p, li, tr, pre, code") ? "line" : "block", x = (e, t) => {
|
|
23
|
+
let n = e.parentElement;
|
|
24
|
+
for (; n;) {
|
|
25
|
+
if (t.has(n)) return !0;
|
|
26
|
+
n = n.parentElement;
|
|
27
|
+
}
|
|
28
|
+
return !1;
|
|
29
|
+
}, S = (e) => {
|
|
30
|
+
if (!e) return [];
|
|
31
|
+
let t = e.getBoundingClientRect(), n = /* @__PURE__ */ new Set(), r = [];
|
|
32
|
+
return Array.from(e.querySelectorAll(d)).forEach((i) => {
|
|
33
|
+
if (v(i) || !_(i)) return;
|
|
34
|
+
let a = g(i.textContent || "", 1e3);
|
|
35
|
+
if (!a || x(i, n) && !i.matches("p, li, tr, pre, code")) return;
|
|
36
|
+
n.add(i);
|
|
37
|
+
let o = i.dataset.viewerAnchorId || `viewer-anchor-${r.length + 1}`;
|
|
38
|
+
i.dataset.viewerAnchorId = o, i.dataset.viewerLine = String(r.length + 1);
|
|
39
|
+
let s = i.getBoundingClientRect();
|
|
40
|
+
r.push({
|
|
41
|
+
id: o,
|
|
42
|
+
index: r.length,
|
|
43
|
+
line: r.length + 1,
|
|
44
|
+
type: b(i),
|
|
45
|
+
label: g(a, 96),
|
|
46
|
+
text: a,
|
|
47
|
+
page: y(i),
|
|
48
|
+
top: s.top - t.top + e.scrollTop,
|
|
49
|
+
left: s.left - t.left + e.scrollLeft,
|
|
50
|
+
width: s.width,
|
|
51
|
+
height: s.height
|
|
52
|
+
});
|
|
53
|
+
}), r;
|
|
54
|
+
}, C = (e, t, n) => {
|
|
55
|
+
if (!e) return null;
|
|
56
|
+
let r = e.closest("[data-viewer-anchor-id]");
|
|
57
|
+
if (r != null && r.dataset.viewerAnchorId) {
|
|
58
|
+
let e = t.find((e) => e.id === r.dataset.viewerAnchorId);
|
|
59
|
+
if (e) return e;
|
|
60
|
+
}
|
|
61
|
+
if (!n) return null;
|
|
62
|
+
let i = n.getBoundingClientRect(), a = e.getBoundingClientRect().top - i.top + n.scrollTop, o = null;
|
|
63
|
+
for (let e of t) {
|
|
64
|
+
if (e.top <= a + 1) {
|
|
65
|
+
o = e;
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
return o;
|
|
71
|
+
}, w = (e, t) => {
|
|
72
|
+
if (!e || !t.length) return null;
|
|
73
|
+
let n = e.scrollTop + e.clientHeight * .42, r = t[0];
|
|
74
|
+
for (let e of t) {
|
|
75
|
+
if (e.top <= n) {
|
|
76
|
+
r = e;
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
return r;
|
|
82
|
+
}, T = (e, t) => {
|
|
83
|
+
if (!e || t == null) return !1;
|
|
84
|
+
let n = typeof t == "object" ? `[data-viewer-anchor-id="${h(t.id)}"]` : typeof t == "number" ? `[data-viewer-line="${t}"]` : `[data-viewer-anchor-id="${h(t)}"]`, r = e.querySelector(n);
|
|
85
|
+
return r ? (r.scrollIntoView({
|
|
86
|
+
block: "center",
|
|
87
|
+
inline: "nearest"
|
|
88
|
+
}), !0) : typeof t == "object" ? (e.scrollTo({
|
|
89
|
+
top: Math.max(0, t.top - e.clientHeight * .18),
|
|
90
|
+
left: Math.max(0, Math.min(t.left, e.scrollWidth - e.clientWidth)),
|
|
91
|
+
behavior: "smooth"
|
|
92
|
+
}), !0) : !1;
|
|
93
|
+
}, E = (e, t) => {
|
|
94
|
+
var n;
|
|
95
|
+
if (t === !1) return [];
|
|
96
|
+
let r = typeof t == "object" ? t : {};
|
|
97
|
+
if (r.enabled === !1 || r.collectText === !1) return [];
|
|
98
|
+
let i = Math.max(200, r.chunkSize || p), a = Math.max(0, Math.min(i - 1, (n = r.chunkOverlap) == null ? m : n)), o = Math.max(0, r.maxTextLength || 0), s = [];
|
|
99
|
+
return e.forEach((e) => {
|
|
100
|
+
let t = o ? e.text.slice(0, o) : e.text;
|
|
101
|
+
if (!t) return;
|
|
102
|
+
if (t.length <= i) {
|
|
103
|
+
s.push({
|
|
104
|
+
id: `${e.id}-chunk-1`,
|
|
105
|
+
text: t,
|
|
106
|
+
anchor: e,
|
|
107
|
+
startLine: e.line,
|
|
108
|
+
endLine: e.line
|
|
109
|
+
});
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
let n = 0, r = 1;
|
|
113
|
+
for (; n < t.length;) {
|
|
114
|
+
let o = t.slice(n, n + i);
|
|
115
|
+
if (s.push({
|
|
116
|
+
id: `${e.id}-chunk-${r}`,
|
|
117
|
+
text: o,
|
|
118
|
+
anchor: e,
|
|
119
|
+
startLine: e.line,
|
|
120
|
+
endLine: e.line
|
|
121
|
+
}), n + i >= t.length) break;
|
|
122
|
+
n += i - a, r += 1;
|
|
123
|
+
}
|
|
124
|
+
}), s;
|
|
125
|
+
};
|
|
126
|
+
e(), n(), i();
|
|
127
|
+
var D = ["element"], O = "flyfish-search-match", k = "flyfish-search-match--active", A = 1e3, j = [
|
|
128
|
+
"script",
|
|
129
|
+
"style",
|
|
130
|
+
"textarea",
|
|
131
|
+
"input",
|
|
132
|
+
"select",
|
|
133
|
+
"button",
|
|
134
|
+
".viewer-actions",
|
|
135
|
+
".viewer-watermark",
|
|
136
|
+
".state-panel",
|
|
137
|
+
".pdf-toolbar",
|
|
138
|
+
".pdf-nav-pane",
|
|
139
|
+
".flyfish-search-match",
|
|
140
|
+
".textLayer",
|
|
141
|
+
".annotationLayer",
|
|
142
|
+
".xfaLayer",
|
|
143
|
+
"svg",
|
|
144
|
+
"canvas",
|
|
145
|
+
"iframe",
|
|
146
|
+
"video",
|
|
147
|
+
"audio"
|
|
148
|
+
].join(","), M = /* @__PURE__ */ new WeakMap(), N = (e, t) => {
|
|
149
|
+
M.set(e, t), e.__flyfishViewerSearchProvider = t;
|
|
150
|
+
}, P = (e) => {
|
|
151
|
+
e && (M.delete(e), delete e.__flyfishViewerSearchProvider);
|
|
152
|
+
}, F = (e) => e === !1 ? { enabled: !1 } : e === !0 || e === void 0 ? {} : e, I = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), L = (e) => e.replace(/\s+/g, " ").trim(), R = (e, t) => {
|
|
153
|
+
let n = t.wholeWord ? `\\b${I(e)}\\b` : I(e);
|
|
154
|
+
return new RegExp(n, t.caseSensitive ? "g" : "gi");
|
|
155
|
+
}, z = (e) => e.map((e) => {
|
|
156
|
+
let { element: n } = e;
|
|
157
|
+
return t(e, D);
|
|
158
|
+
}), B = (e = "") => ({
|
|
159
|
+
query: e,
|
|
160
|
+
total: 0,
|
|
161
|
+
currentIndex: -1,
|
|
162
|
+
current: null,
|
|
163
|
+
matches: []
|
|
164
|
+
}), V = (e) => {
|
|
165
|
+
let t = e.parentNode;
|
|
166
|
+
if (t) {
|
|
167
|
+
for (; e.firstChild;) t.insertBefore(e.firstChild, e);
|
|
168
|
+
t.removeChild(e), t.normalize();
|
|
169
|
+
}
|
|
170
|
+
}, H = (e, t) => {
|
|
171
|
+
let n = e.parentElement;
|
|
172
|
+
return !n || n.closest(j) ? !0 : !t.contains(n) || !e.data.trim();
|
|
173
|
+
}, U = (e) => {
|
|
174
|
+
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_TEXT, { acceptNode(t) {
|
|
175
|
+
return H(t, e) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
176
|
+
} }), r = n.nextNode();
|
|
177
|
+
for (; r;) t.push(r), r = n.nextNode();
|
|
178
|
+
return t;
|
|
179
|
+
}, W = (e, t, n) => {
|
|
180
|
+
let i = o(() => F(t == null ? void 0 : t())), d = u([]), f = u([]), p = /* @__PURE__ */ new Set(), m = l({
|
|
181
|
+
query: "",
|
|
182
|
+
total: 0,
|
|
183
|
+
currentIndex: -1,
|
|
184
|
+
current: null,
|
|
185
|
+
matches: []
|
|
186
|
+
}), h = null, g = !1, _ = null, v = !1, y = () => {
|
|
187
|
+
let e = z(f.value);
|
|
188
|
+
m.total = e.length, m.currentIndex = e.length ? Math.max(0, Math.min(m.currentIndex, e.length - 1)) : -1, m.current = m.currentIndex >= 0 ? e[m.currentIndex] : null, m.matches = e;
|
|
189
|
+
}, b = (e) => (m.query = e.query, m.total = e.total, m.currentIndex = e.currentIndex, m.current = e.current ? r({}, e.current) : null, m.matches = e.matches.map((e) => r({}, e)), m), x = () => {
|
|
190
|
+
var t;
|
|
191
|
+
let n = (t = e.value) == null ? void 0 : t.querySelector("[data-viewer-search-provider]");
|
|
192
|
+
return n && (M.get(n) || n.__flyfishViewerSearchProvider) || null;
|
|
193
|
+
}, w = function() {
|
|
194
|
+
var e = a(function* (e, t = m.query) {
|
|
195
|
+
var n;
|
|
196
|
+
let r = x();
|
|
197
|
+
return r ? (T(), b((yield e(r)) || ((n = r.getState) == null ? void 0 : n.call(r)) || B(t))) : null;
|
|
198
|
+
});
|
|
199
|
+
return function(t) {
|
|
200
|
+
return e.apply(this, arguments);
|
|
201
|
+
};
|
|
202
|
+
}(), T = () => {
|
|
203
|
+
Array.from(p).forEach(V), p.clear(), f.value = [], m.total = 0, m.currentIndex = -1, m.current = null, m.matches = [];
|
|
204
|
+
}, E = () => {
|
|
205
|
+
h == null || h.disconnect(), h = null;
|
|
206
|
+
}, D = () => {
|
|
207
|
+
E(), !(!g || !e.value || typeof MutationObserver > "u") && (h = new MutationObserver(K), h.observe(e.value, {
|
|
208
|
+
childList: !0,
|
|
209
|
+
subtree: !0,
|
|
210
|
+
characterData: !0
|
|
211
|
+
}));
|
|
212
|
+
}, j = () => {
|
|
213
|
+
!g || typeof window > "u" || window.setTimeout(D, 0);
|
|
214
|
+
}, N = (e) => {
|
|
215
|
+
if (Math.max(0, e.scrollHeight - e.clientHeight) <= 2) return !1;
|
|
216
|
+
if (typeof window > "u") return !0;
|
|
217
|
+
let t = window.getComputedStyle(e), n = t.overflowY || t.overflow;
|
|
218
|
+
return [
|
|
219
|
+
"auto",
|
|
220
|
+
"scroll",
|
|
221
|
+
"overlay",
|
|
222
|
+
"visible"
|
|
223
|
+
].includes(n);
|
|
224
|
+
}, P = (t) => {
|
|
225
|
+
let r = e.value, i = n == null ? void 0 : n();
|
|
226
|
+
if (i && (i === t || i.contains(t))) return i;
|
|
227
|
+
let a = t.parentElement;
|
|
228
|
+
for (; a;) {
|
|
229
|
+
if (N(a)) return a;
|
|
230
|
+
if (a === r) break;
|
|
231
|
+
a = a.parentElement;
|
|
232
|
+
}
|
|
233
|
+
return r;
|
|
234
|
+
}, I = (e) => {
|
|
235
|
+
let t = P(e);
|
|
236
|
+
if (!t) {
|
|
237
|
+
e.scrollIntoView({
|
|
238
|
+
block: "center",
|
|
239
|
+
inline: "nearest"
|
|
240
|
+
});
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
let n = t.scrollLeft, r = t.getBoundingClientRect(), i = e.getBoundingClientRect(), a = i.top - r.top + t.scrollTop - t.clientHeight / 2 + i.height / 2, o = Math.max(0, t.scrollHeight - t.clientHeight);
|
|
244
|
+
t.scrollTo({
|
|
245
|
+
top: Math.max(0, Math.min(a, o)),
|
|
246
|
+
left: n,
|
|
247
|
+
behavior: "auto"
|
|
248
|
+
}), t.scrollLeft = n;
|
|
249
|
+
}, H = (e, t = !0) => {
|
|
250
|
+
let n = f.value;
|
|
251
|
+
if (!n.length) return y(), m;
|
|
252
|
+
let r = (e % n.length + n.length) % n.length;
|
|
253
|
+
n.forEach((e) => {
|
|
254
|
+
e.element.classList.remove(i.value.activeClassName || k);
|
|
255
|
+
});
|
|
256
|
+
let a = n[r];
|
|
257
|
+
return a.element.classList.add(i.value.activeClassName || k), m.currentIndex = r, y(), t && I(a.element), m;
|
|
258
|
+
}, W = (t, n, r, a) => {
|
|
259
|
+
var o;
|
|
260
|
+
let s = t.data, c = 0, l, u = document.createDocumentFragment(), f = !1;
|
|
261
|
+
for (n.lastIndex = 0; (l = n.exec(s)) && a.length < r;) {
|
|
262
|
+
if (!l[0]) {
|
|
263
|
+
n.lastIndex += 1;
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
l.index > c && u.appendChild(document.createTextNode(s.slice(c, l.index)));
|
|
267
|
+
let r = document.createElement("mark");
|
|
268
|
+
r.className = i.value.className || O, r.textContent = l[0], r.dataset.searchMatchId = `viewer-search-match-${a.length + 1}`, p.add(r), u.appendChild(r), f = !0;
|
|
269
|
+
let o = C(t.parentElement, d.value, e.value);
|
|
270
|
+
a.push({
|
|
271
|
+
id: r.dataset.searchMatchId,
|
|
272
|
+
index: a.length,
|
|
273
|
+
text: l[0],
|
|
274
|
+
anchor: o,
|
|
275
|
+
line: o == null ? void 0 : o.line,
|
|
276
|
+
page: o == null ? void 0 : o.page,
|
|
277
|
+
element: r
|
|
278
|
+
}), c = l.index + l[0].length;
|
|
279
|
+
}
|
|
280
|
+
f && (c < s.length && u.appendChild(document.createTextNode(s.slice(c))), (o = t.parentNode) == null || o.replaceChild(u, t));
|
|
281
|
+
}, G = function() {
|
|
282
|
+
var t = a(function* (t, n = 0) {
|
|
283
|
+
let r = L(t);
|
|
284
|
+
m.query = r, E(), v = !0;
|
|
285
|
+
try {
|
|
286
|
+
if (T(), !r || i.value.enabled === !1 || !e.value) return (yield w((e) => {
|
|
287
|
+
var t;
|
|
288
|
+
return (t = e.clear) == null ? void 0 : t.call(e);
|
|
289
|
+
}, r)) || m;
|
|
290
|
+
let t = yield w((e) => e.search(r, i.value), r);
|
|
291
|
+
if (t) return t;
|
|
292
|
+
yield s(), d.value = S(e.value);
|
|
293
|
+
let a = R(r, i.value), o = Math.max(1, i.value.maxMatches || A), c = [], l = U(e.value);
|
|
294
|
+
for (let e of l) {
|
|
295
|
+
if (c.length >= o) break;
|
|
296
|
+
W(e, a, o, c);
|
|
297
|
+
}
|
|
298
|
+
f.value = c, y(), c.length && H(n, !0);
|
|
299
|
+
} finally {
|
|
300
|
+
v = !1, j();
|
|
301
|
+
}
|
|
302
|
+
return m;
|
|
303
|
+
});
|
|
304
|
+
return function(e) {
|
|
305
|
+
return t.apply(this, arguments);
|
|
306
|
+
};
|
|
307
|
+
}(), K = () => {
|
|
308
|
+
var e;
|
|
309
|
+
!m.query || v || i.value.enabled === !1 || (_ !== null && window.clearTimeout(_), _ = window.setTimeout(() => {
|
|
310
|
+
_ = null, G(m.query, Math.max(0, m.currentIndex));
|
|
311
|
+
}, (e = i.value.debounce) == null ? 180 : e));
|
|
312
|
+
}, q = () => {
|
|
313
|
+
g = !0, D();
|
|
314
|
+
}, J = function() {
|
|
315
|
+
var t = a(function* () {
|
|
316
|
+
return yield s(), d.value = S(e.value), d.value;
|
|
317
|
+
});
|
|
318
|
+
return function() {
|
|
319
|
+
return t.apply(this, arguments);
|
|
320
|
+
};
|
|
321
|
+
}(), Y = function() {
|
|
322
|
+
var e = a(function* (e) {
|
|
323
|
+
return G(e, 0);
|
|
324
|
+
});
|
|
325
|
+
return function(t) {
|
|
326
|
+
return e.apply(this, arguments);
|
|
327
|
+
};
|
|
328
|
+
}(), X = function() {
|
|
329
|
+
var e = a(function* () {
|
|
330
|
+
return (yield w((e) => {
|
|
331
|
+
var t, n;
|
|
332
|
+
return ((t = e.next) == null ? void 0 : t.call(e)) || ((n = e.getState) == null ? void 0 : n.call(e));
|
|
333
|
+
})) || H(m.currentIndex + 1);
|
|
334
|
+
});
|
|
335
|
+
return function() {
|
|
336
|
+
return e.apply(this, arguments);
|
|
337
|
+
};
|
|
338
|
+
}(), Z = function() {
|
|
339
|
+
var e = a(function* () {
|
|
340
|
+
return (yield w((e) => {
|
|
341
|
+
var t, n;
|
|
342
|
+
return ((t = e.previous) == null ? void 0 : t.call(e)) || ((n = e.getState) == null ? void 0 : n.call(e));
|
|
343
|
+
})) || H(m.currentIndex - 1);
|
|
344
|
+
});
|
|
345
|
+
return function() {
|
|
346
|
+
return e.apply(this, arguments);
|
|
347
|
+
};
|
|
348
|
+
}(), Q = function() {
|
|
349
|
+
var e = a(function* () {
|
|
350
|
+
m.query = "", E(), v = !0;
|
|
351
|
+
try {
|
|
352
|
+
return T(), (yield w((e) => {
|
|
353
|
+
var t;
|
|
354
|
+
return (t = e.clear) == null ? void 0 : t.call(e);
|
|
355
|
+
}, "")) || m;
|
|
356
|
+
} finally {
|
|
357
|
+
v = !1, j();
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
return function() {
|
|
361
|
+
return e.apply(this, arguments);
|
|
362
|
+
};
|
|
363
|
+
}();
|
|
364
|
+
return c(() => {
|
|
365
|
+
g = !1, E(), _ !== null && (window.clearTimeout(_), _ = null), T();
|
|
366
|
+
}), {
|
|
367
|
+
anchors: d,
|
|
368
|
+
state: m,
|
|
369
|
+
observe: q,
|
|
370
|
+
refreshAnchors: J,
|
|
371
|
+
search: Y,
|
|
372
|
+
next: X,
|
|
373
|
+
previous: Z,
|
|
374
|
+
clear: Q
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
//#endregion
|
|
378
|
+
export { w as a, E as i, P as n, T as o, W as r, N as t };
|