anyfile-cli 0.0.0-stage → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +177 -0
- package/README.md +55 -2
- package/SKILL.md +101 -0
- package/chunks/browser-probe-5STDX455.mjs +17 -0
- package/chunks/browser-probe-F5RX44T3.mjs +24 -0
- package/chunks/chunk-2C34VMNV.mjs +108 -0
- package/chunks/chunk-3OZ56PUH.mjs +97 -0
- package/chunks/chunk-3YRWCQGV.mjs +38 -0
- package/chunks/chunk-53MJMIN4.mjs +23 -0
- package/chunks/chunk-5LOC7IST.mjs +372 -0
- package/chunks/chunk-5XTYLZF3.mjs +559 -0
- package/chunks/chunk-5ZHDYRGV.mjs +64 -0
- package/chunks/chunk-6CQL4K2K.mjs +21 -0
- package/chunks/chunk-6EVJJFOH.mjs +243 -0
- package/chunks/chunk-6NWSQGYE.mjs +68 -0
- package/chunks/chunk-7O5JLQE7.mjs +1 -0
- package/chunks/chunk-A6AQI6DF.mjs +321 -0
- package/chunks/chunk-AYF63UBE.mjs +79 -0
- package/chunks/chunk-B27PR6Q4.mjs +17 -0
- package/chunks/chunk-BP7LORL4.mjs +13 -0
- package/chunks/chunk-BVCRJLCD.mjs +109 -0
- package/chunks/chunk-CLSEE3VA.mjs +28 -0
- package/chunks/chunk-CO2ZAQIK.mjs +52 -0
- package/chunks/chunk-CQWM5GMU.mjs +167 -0
- package/chunks/chunk-CZFFYCMJ.mjs +136 -0
- package/chunks/chunk-D3CS6TIK.mjs +419 -0
- package/chunks/chunk-DJLFVMDJ.mjs +807 -0
- package/chunks/chunk-DJXVCKIO.mjs +30 -0
- package/chunks/chunk-EMXODK3K.mjs +94 -0
- package/chunks/chunk-EOJ7ZCDK.mjs +227 -0
- package/chunks/chunk-H4TBN22D.mjs +100 -0
- package/chunks/chunk-HI7TURZM.mjs +2256 -0
- package/chunks/chunk-HUSX3ZU3.mjs +58 -0
- package/chunks/chunk-IC3G2XE2.mjs +436 -0
- package/chunks/chunk-IGEGIF35.mjs +2034 -0
- package/chunks/chunk-IZGTVZHE.mjs +90 -0
- package/chunks/chunk-J4G7LUPA.mjs +117 -0
- package/chunks/chunk-JBAJW66L.mjs +4220 -0
- package/chunks/chunk-JKQUF2MM.mjs +438 -0
- package/chunks/chunk-KAMPC5TK.mjs +131 -0
- package/chunks/chunk-KSKEMJVC.mjs +145 -0
- package/chunks/chunk-LRHHRZLE.mjs +29 -0
- package/chunks/chunk-M37ZOAUG.mjs +93 -0
- package/chunks/chunk-MG7LUDXO.mjs +187 -0
- package/chunks/chunk-NGVHHTQD.mjs +125 -0
- package/chunks/chunk-NQ7J2NH6.mjs +50 -0
- package/chunks/chunk-NUMNHVSI.mjs +60 -0
- package/chunks/chunk-ORJ3DN65.mjs +58 -0
- package/chunks/chunk-QOUEBPPL.mjs +15 -0
- package/chunks/chunk-QR3Y3UKM.mjs +194 -0
- package/chunks/chunk-RFKYE7SE.mjs +50 -0
- package/chunks/chunk-SH57XOAV.mjs +33 -0
- package/chunks/chunk-TB5ISPA4.mjs +1 -0
- package/chunks/chunk-UGAU3V4V.mjs +206 -0
- package/chunks/chunk-WDN6NMVU.mjs +36 -0
- package/chunks/chunk-WWTLSPEG.mjs +3999 -0
- package/chunks/chunk-XDW56XVX.mjs +69 -0
- package/chunks/chunk-XRT7TAAY.mjs +27 -0
- package/chunks/chunk-XTW4HNIJ.mjs +418 -0
- package/chunks/chunk-YPLWNGCC.mjs +17 -0
- package/chunks/chunk-ZBR7RQQE.mjs +64 -0
- package/chunks/chunk-ZUHJIGHP.mjs +300 -0
- package/chunks/deflate-IINN6MRE.mjs +19 -0
- package/chunks/jpeg-N3DSYEAQ.mjs +964 -0
- package/chunks/jxl_oxide_wasm-3UN6G3YN.mjs +589 -0
- package/chunks/lerc-5LP7Q554.mjs +2086 -0
- package/chunks/lzw-Z2ZZBEWD.mjs +137 -0
- package/chunks/packbits-3S2JASDB.mjs +34 -0
- package/chunks/pdf.worker-PUGU2NS2.mjs +67416 -0
- package/chunks/probe-22WNVZ3I.mjs +17 -0
- package/chunks/probe-2P4CTFCY.mjs +14 -0
- package/chunks/probe-2QBNDPYK.mjs +18 -0
- package/chunks/probe-34TOVXUI.mjs +11 -0
- package/chunks/probe-3W2HOWBM.mjs +20 -0
- package/chunks/probe-42OBMD35.mjs +23 -0
- package/chunks/probe-43RVHUBG.mjs +17 -0
- package/chunks/probe-4O362IEX.mjs +18 -0
- package/chunks/probe-4WF34ZXS.mjs +11 -0
- package/chunks/probe-5ZITS3T5.mjs +40 -0
- package/chunks/probe-5ZS5DHFP.mjs +21 -0
- package/chunks/probe-62RFYKCP.mjs +14 -0
- package/chunks/probe-64JTFRH4.mjs +41 -0
- package/chunks/probe-6YJQJJ3R.mjs +518 -0
- package/chunks/probe-6YMOOV53.mjs +39 -0
- package/chunks/probe-BYBD2WAK.mjs +239 -0
- package/chunks/probe-CZZNJOHV.mjs +20 -0
- package/chunks/probe-DJMPK6HU.mjs +11 -0
- package/chunks/probe-FMWIF4LX.mjs +33 -0
- package/chunks/probe-FYPH6CYY.mjs +206 -0
- package/chunks/probe-G6PPXKBE.mjs +15 -0
- package/chunks/probe-GJ5OUOQ3.mjs +32 -0
- package/chunks/probe-H6J7TUY2.mjs +95 -0
- package/chunks/probe-IGZ47OE3.mjs +68 -0
- package/chunks/probe-IL5HO3OK.mjs +46 -0
- package/chunks/probe-INYCDZHO.mjs +27 -0
- package/chunks/probe-JFH545GO.mjs +11 -0
- package/chunks/probe-JZYDRITV.mjs +18 -0
- package/chunks/probe-K3WW5O5K.mjs +26 -0
- package/chunks/probe-KB4T466L.mjs +70 -0
- package/chunks/probe-KY7SIIXD.mjs +13 -0
- package/chunks/probe-L2P263WT.mjs +16 -0
- package/chunks/probe-LEP3RQPD.mjs +11 -0
- package/chunks/probe-M2QWULOI.mjs +119 -0
- package/chunks/probe-M7AYZBD3.mjs +35 -0
- package/chunks/probe-MEN3BMBB.mjs +22 -0
- package/chunks/probe-MNIGKDWT.mjs +163 -0
- package/chunks/probe-NFVFWB4M.mjs +56 -0
- package/chunks/probe-NJGSTL6R.mjs +161 -0
- package/chunks/probe-O73EHWT3.mjs +14 -0
- package/chunks/probe-OG2XYCG2.mjs +25 -0
- package/chunks/probe-OTKJKTNS.mjs +10 -0
- package/chunks/probe-OZKO3C2V.mjs +27 -0
- package/chunks/probe-PBL4KITG.mjs +12 -0
- package/chunks/probe-PEFZNH2T.mjs +21 -0
- package/chunks/probe-R4SSEXES.mjs +27 -0
- package/chunks/probe-RCAUVV27.mjs +29 -0
- package/chunks/probe-RPGBKGPI.mjs +20 -0
- package/chunks/probe-S2I46SEO.mjs +10 -0
- package/chunks/probe-SGDD4U4Q.mjs +165 -0
- package/chunks/probe-SPQO5LHI.mjs +9 -0
- package/chunks/probe-TBR6UGRZ.mjs +19 -0
- package/chunks/probe-TNKNILAW.mjs +21 -0
- package/chunks/probe-TVRJBPXH.mjs +48 -0
- package/chunks/probe-UESMTUQ5.mjs +33 -0
- package/chunks/probe-VDXFEZ5Q.mjs +16 -0
- package/chunks/probe-VX7JCDW6.mjs +39 -0
- package/chunks/probe-W7M55OPE.mjs +64 -0
- package/chunks/probe-XUBTIWGE.mjs +13 -0
- package/chunks/probe-ZF7KIRHO.mjs +36 -0
- package/chunks/raw-JJRPYAXO.mjs +16 -0
- package/chunks/tiff-metadata-7MWLNVW2.mjs +2990 -0
- package/chunks/webimage-D6XSCCTJ.mjs +56 -0
- package/chunks/zip-reader-YUGANW4Z.mjs +92 -0
- package/chunks/zstd-AH2S24PU.mjs +121 -0
- package/cli-main.mjs +297 -0
- package/cli.mjs +3 -0
- package/extractors/apple-plist.mjs +145 -0
- package/extractors/archive-metadata-viewer.mjs +1401 -0
- package/extractors/bittorrent-metadata.mjs +369 -0
- package/extractors/calendar-contacts.mjs +328 -0
- package/extractors/camera-raw.mjs +201 -0
- package/extractors/chm-reader.mjs +1842 -0
- package/extractors/comic-book-reader.mjs +307 -0
- package/extractors/design-source.mjs +1801 -0
- package/extractors/dev-array-viewer.mjs +825 -0
- package/extractors/dev-native-binary-viewer.mjs +1661 -0
- package/extractors/dev-source-map-viewer.mjs +416 -0
- package/extractors/dev-wasm-viewer.mjs +506 -0
- package/extractors/dicom.mjs +383 -0
- package/extractors/djvu-reader.mjs +337 -0
- package/extractors/duckdb-data.mjs +49174 -0
- package/extractors/epub-reader.mjs +222 -0
- package/extractors/excel-workbook.mjs +27057 -0
- package/extractors/fictionbook-reader.mjs +362 -0
- package/extractors/font-viewer.mjs +441 -0
- package/extractors/general-raster.mjs +444 -0
- package/extractors/hdr-image.mjs +1685 -0
- package/extractors/http-archive.mjs +306 -0
- package/extractors/ifc.mjs +341 -0
- package/extractors/iwork.mjs +640 -0
- package/extractors/microsoft-project.mjs +174 -0
- package/extractors/mind-map.mjs +607 -0
- package/extractors/ml-weights.mjs +649 -0
- package/extractors/modern-raster.mjs +620 -0
- package/extractors/ofd-reader.mjs +973 -0
- package/extractors/outlook-pst.mjs +997 -0
- package/extractors/pdfjs-pdf.mjs +32056 -0
- package/extractors/photoshop-document.mjs +17448 -0
- package/extractors/safe-svg.mjs +163 -0
- package/extractors/scientific-data.mjs +2041 -0
- package/extractors/sqlite-database.mjs +333 -0
- package/extractors/statistical-data.mjs +297 -0
- package/extractors/visio.mjs +141 -0
- package/extractors/x509-certificate.mjs +588 -0
- package/extractors/xps-reader.mjs +896 -0
- package/index.mjs +83 -0
- package/licenses/dicom-parser/1.8.21/LICENSE +21 -0
- package/licenses/libraw-wasm/1.6.0/COPYRIGHT.LibRaw +27 -0
- package/licenses/libraw-wasm/1.6.0/LICENSE.Emscripten +102 -0
- package/licenses/libraw-wasm/1.6.0/LICENSE.LibRaw-CDDL-1.0 +340 -0
- package/licenses/libraw-wasm/1.6.0/LICENSE.Little-CMS-MIT +22 -0
- package/licenses/libraw-wasm/1.6.0/LICENSE.libpng +134 -0
- package/licenses/libraw-wasm/1.6.0/LICENSE.libraw-wasm-ISC +15 -0
- package/licenses/libraw-wasm/1.6.0/LICENSE.zlib +22 -0
- package/licenses/libraw-wasm/1.6.0/NOTICE.IJG-libjpeg +49 -0
- package/licenses/libraw-wasm/1.6.0/SOURCE.md +25 -0
- package/licenses/libraw-wasm/1.6.0/THIRD_PARTY_NOTICES.md +14 -0
- package/licenses/mediabunny/1.55.3/MPL-2.0.txt +373 -0
- package/licenses/mediabunny/1.55.3/SOURCE.md +16 -0
- package/licenses/openskp/1.3.0/LICENSE +21 -0
- package/package.json +34 -4
- package/renderer-host/assets/ColladaComposer-TCm9fgZa.js +1 -0
- package/renderer-host/assets/ColladaParser-BHTzbhBz.js +3 -0
- package/renderer-host/assets/FBXLoader-D1vDnL3o.js +8 -0
- package/renderer-host/assets/agent-CKvDbj87.js +1 -0
- package/renderer-host/assets/amf-BkE--DNX.js +1 -0
- package/renderer-host/assets/animation-Dt0WW2cB.js +1 -0
- package/renderer-host/assets/archive-client-CL5yOgwH.js +1 -0
- package/renderer-host/assets/archive.worker-CcLnJ9FC.js +1 -0
- package/renderer-host/assets/audio-visualizer-CiyGNhY2.js +1 -0
- package/renderer-host/assets/basedecoder-BuG7fe0q.js +1 -0
- package/renderer-host/assets/book-source-28BQcBKR.js +1 -0
- package/renderer-host/assets/book-worker-DUt14LJO.js +1 -0
- package/renderer-host/assets/browser-C0pGRq_c.js +1 -0
- package/renderer-host/assets/client-CU2ERPtk.js +1 -0
- package/renderer-host/assets/container-inspection-ekEPWWcy.js +1 -0
- package/renderer-host/assets/data-table-OJQe3aN5.js +1 -0
- package/renderer-host/assets/decode-hBroL8C1.js +1 -0
- package/renderer-host/assets/decode-tiff-CP1xdrF_.js +5 -0
- package/renderer-host/assets/decoder-worker-B0sdTVlF.js +1 -0
- package/renderer-host/assets/decoder-worker-CBiHE971.js +3 -0
- package/renderer-host/assets/decoder-worker-Cr5oP97p.js +5 -0
- package/renderer-host/assets/decoder-worker-DIdLFebY.js +11 -0
- package/renderer-host/assets/decoder-worker-DLeuEYxq.js +1 -0
- package/renderer-host/assets/decoder.worker-BXAaF0Qj.js +1 -0
- package/renderer-host/assets/decoder.worker-yaM6uups.js +1 -0
- package/renderer-host/assets/deflate-DPjr4M2G.js +1 -0
- package/renderer-host/assets/deflate-S3QmZI-f.js +1 -0
- package/renderer-host/assets/dual-track-playback-CxjGms-W.js +1 -0
- package/renderer-host/assets/ext-searchbox-BIdon51Z.js +164 -0
- package/renderer-host/assets/ffmpeg-playback-DzCJz9Ny.js +1 -0
- package/renderer-host/assets/gltf-PozNLKNg.js +1 -0
- package/renderer-host/assets/hdf5.worker-BO3TrRup.js +1 -0
- package/renderer-host/assets/heif-worker-CC9DI3ZR.js +1 -0
- package/renderer-host/assets/id3-uzaDmDwy.js +1 -0
- package/renderer-host/assets/ifc.worker-KIbgAIsy.js +1 -0
- package/renderer-host/assets/image-load-SK3ULGWm.js +1 -0
- package/renderer-host/assets/index-DtiyOy_J.js +2 -0
- package/renderer-host/assets/jpeg-AGQ46WDa.js +1 -0
- package/renderer-host/assets/jpeg-Dm0yBuYB.js +1 -0
- package/renderer-host/assets/jszip.min-DCdQ6XWv.js +2 -0
- package/renderer-host/assets/jxl_oxide_wasm-BJKDqoXP.js +1 -0
- package/renderer-host/assets/jxl_oxide_wasm_bg-C5JqlrFv.wasm +0 -0
- package/renderer-host/assets/kernel.worker-B58X9XWu.js +1 -0
- package/renderer-host/assets/kernel.worker-BcQYKb39.js +8 -0
- package/renderer-host/assets/kernel.worker-BdWmPdqg.js +1 -0
- package/renderer-host/assets/kernel.worker-C7qxomuK.js +1 -0
- package/renderer-host/assets/kernel.worker-D88TbQnz.js +1 -0
- package/renderer-host/assets/laz-Lt10LsWd.js +1 -0
- package/renderer-host/assets/lerc-BxVqCKaH.js +3 -0
- package/renderer-host/assets/lerc-Cuor-Zm2.js +1 -0
- package/renderer-host/assets/lzw-D2FslT4L.js +1 -0
- package/renderer-host/assets/lzw-DODNa9l5.js +1 -0
- package/renderer-host/assets/mediabunny-viewer-BniHVEWJ.js +16 -0
- package/renderer-host/assets/model-Drd3vqcF.js +1 -0
- package/renderer-host/assets/obj-B3p81LL2.js +9 -0
- package/renderer-host/assets/off-QQbiKPTX.js +1 -0
- package/renderer-host/assets/ogg-probe-C2TT74FL.js +1 -0
- package/renderer-host/assets/ogg-viewer-Dc8K-tas.js +9 -0
- package/renderer-host/assets/packbits-DCimUQ1T.js +1 -0
- package/renderer-host/assets/paged-C8AQD7sX.js +319 -0
- package/renderer-host/assets/pako.esm-0UYEm1Jg.js +2 -0
- package/renderer-host/assets/pako.esm-CtVA0R7W.js +1 -0
- package/renderer-host/assets/pdf.worker.min-CHFwMXne.mjs +29 -0
- package/renderer-host/assets/ply-C3_RRA7n.js +2 -0
- package/renderer-host/assets/points.worker-CA8v75dl.js +2 -0
- package/renderer-host/assets/probe-asf-C_UpCBly.js +14 -0
- package/renderer-host/assets/range-reader-BMfLhWcp.js +1 -0
- package/renderer-host/assets/raw-A-vJRPpa.js +1 -0
- package/renderer-host/assets/resource-cache-CHocY8K3.js +1 -0
- package/renderer-host/assets/resources-6AmS6O5e.js +1 -0
- package/renderer-host/assets/rolldown-runtime-Dd_uD5pT.js +1 -0
- package/renderer-host/assets/safe-content-CWHf8jex.js +1 -0
- package/renderer-host/assets/sanitize-D56ODnaM.js +1 -0
- package/renderer-host/assets/scene-adapter-CaCLr1am.js +1 -0
- package/renderer-host/assets/scene.worker-CJViWLYo.js +24 -0
- package/renderer-host/assets/scene.worker-D7koFZY8.js +2 -0
- package/renderer-host/assets/skp-adapter-jl6q24fW.js +1 -0
- package/renderer-host/assets/skp.worker-D9ujTXFV.js +1 -0
- package/renderer-host/assets/src-1Won7FxU.js +88 -0
- package/renderer-host/assets/src-3RoHqOkA.js +7 -0
- package/renderer-host/assets/src-4zBOL6Jt.js +1 -0
- package/renderer-host/assets/src-6v8-hoR3.js +24 -0
- package/renderer-host/assets/src-8Jx9gbII.js +1 -0
- package/renderer-host/assets/src-B1WA0dRu.js +64 -0
- package/renderer-host/assets/src-B5ijbemo.js +9 -0
- package/renderer-host/assets/src-B8DH2GJe.js +17 -0
- package/renderer-host/assets/src-B9t_iEO3.js +58 -0
- package/renderer-host/assets/src-BCC58C0X.js +1 -0
- package/renderer-host/assets/src-BCwENs26.js +1 -0
- package/renderer-host/assets/src-BEirBh4c.js +27 -0
- package/renderer-host/assets/src-BHR6n7Fj.js +1 -0
- package/renderer-host/assets/src-BIlLq0QT.js +169 -0
- package/renderer-host/assets/src-BKlK1jcN.js +1 -0
- package/renderer-host/assets/src-BN0FUJhs.js +8 -0
- package/renderer-host/assets/src-BWElAdlq.js +52 -0
- package/renderer-host/assets/src-BXg11IjY.js +4 -0
- package/renderer-host/assets/src-BbBdnTjJ.js +2 -0
- package/renderer-host/assets/src-BbFZbZsL.js +2 -0
- package/renderer-host/assets/src-BdPbFRd-.js +24 -0
- package/renderer-host/assets/src-BpbGaBrT.js +182 -0
- package/renderer-host/assets/src-BwIl76_H.js +7 -0
- package/renderer-host/assets/src-C2e6QJIj.js +10 -0
- package/renderer-host/assets/src-C2gNidHF.js +989 -0
- package/renderer-host/assets/src-C9Uz3C-q.js +432 -0
- package/renderer-host/assets/src-CBUhG6W5.js +7 -0
- package/renderer-host/assets/src-CQDGi3Qa.js +10 -0
- package/renderer-host/assets/src-CRLCRg0N.js +21 -0
- package/renderer-host/assets/src-CS5rqxBy.js +10 -0
- package/renderer-host/assets/src-CWZdSJQw.js +7 -0
- package/renderer-host/assets/src-CXnpsVpU.js +27 -0
- package/renderer-host/assets/src-CnhXvqQY.js +8 -0
- package/renderer-host/assets/src-CpExg0ZA.js +9 -0
- package/renderer-host/assets/src-CrLmL3wU.js +5 -0
- package/renderer-host/assets/src-CrYEJ5uz.js +2 -0
- package/renderer-host/assets/src-D-iIkSqZ.js +222 -0
- package/renderer-host/assets/src-D6sH9uTT.js +23 -0
- package/renderer-host/assets/src-D8zHDJh_.js +10 -0
- package/renderer-host/assets/src-D9OFaPNV.js +1 -0
- package/renderer-host/assets/src-DCI_ff7c.js +1 -0
- package/renderer-host/assets/src-DCrbiTpH.js +18 -0
- package/renderer-host/assets/src-DK8DvtMd.js +115 -0
- package/renderer-host/assets/src-DWGlOVjt.js +17 -0
- package/renderer-host/assets/src-DbvEX_Ct.js +6 -0
- package/renderer-host/assets/src-Dezc2dj1.js +1 -0
- package/renderer-host/assets/src-Dh5VD1lL.js +11 -0
- package/renderer-host/assets/src-DlwABqw5.js +1 -0
- package/renderer-host/assets/src-DlxETlTh.js +44 -0
- package/renderer-host/assets/src-Dmd6BvBh.js +387 -0
- package/renderer-host/assets/src-DpgvaJNJ.js +24 -0
- package/renderer-host/assets/src-DpjRB2sv.js +1 -0
- package/renderer-host/assets/src-Dvn41FR7.js +90 -0
- package/renderer-host/assets/src-DwcPYp7X.js +1 -0
- package/renderer-host/assets/src-HUxhcDlO.js +2 -0
- package/renderer-host/assets/src-Jhqg3J8L.js +2 -0
- package/renderer-host/assets/src-MO5bLsLj.js +4126 -0
- package/renderer-host/assets/src-N8XBQaK4.js +20 -0
- package/renderer-host/assets/src-XZ_0U972.js +1 -0
- package/renderer-host/assets/src-Y6mXl4vh.js +29 -0
- package/renderer-host/assets/src-b9aXVJde.js +100 -0
- package/renderer-host/assets/src-d2U6neq8.js +37 -0
- package/renderer-host/assets/src-hCrza_Lf.js +1 -0
- package/renderer-host/assets/src-jUGjKzOV.js +1 -0
- package/renderer-host/assets/src-rJN_jaC5.js +1 -0
- package/renderer-host/assets/src-vOBd-1zk.js +5 -0
- package/renderer-host/assets/src-wrrVkfrK.js +1 -0
- package/renderer-host/assets/src-yCrAObB-.js +1 -0
- package/renderer-host/assets/src-zrBiCtay.js +7 -0
- package/renderer-host/assets/stl-adapter-CLkWHoOn.js +1 -0
- package/renderer-host/assets/stl.worker-C-anHijM.js +1 -0
- package/renderer-host/assets/three-mf-BSrcsdQD.js +2 -0
- package/renderer-host/assets/webimage-zQMH-_zR.js +1 -0
- package/renderer-host/assets/webm-14HHwfWy.js +1 -0
- package/renderer-host/assets/worker-QK2gViTu.js +1 -0
- package/renderer-host/assets/x6-dng-worker-CNf3zUP-.js +1 -0
- package/renderer-host/assets/xml.browser-CC8-XAyN.js +1 -0
- package/renderer-host/assets/zip-core-base-DD8akpjq.js +1 -0
- package/renderer-host/assets/zip-core-custom-CfPFs1lw.js +1 -0
- package/renderer-host/assets/zip-source-CLF3Hfcg.js +1 -0
- package/renderer-host/assets/zstd-CmwSLjHB.js +1 -0
- package/renderer-host/assets/zstd-i4Jwubnx.js +1 -0
- package/renderer-host/index.html +65 -0
- package/vendor-manifest.json +1433 -0
- package/worker.mjs +262 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
|
|
2
|
+
import {
|
|
3
|
+
selectMessages
|
|
4
|
+
} from "./chunk-IC3G2XE2.mjs";
|
|
5
|
+
|
|
6
|
+
// ../rendering-publication/src/types.ts
|
|
7
|
+
var CONTENT_CSP = "default-src 'none'; script-src 'none'; style-src 'unsafe-inline'; img-src blob:; font-src blob:; connect-src 'none'; frame-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'";
|
|
8
|
+
|
|
9
|
+
// ../rendering-publication/src/ui.ts
|
|
10
|
+
function publicationCopy(locale) {
|
|
11
|
+
return selectMessages(locale, {
|
|
12
|
+
en: {
|
|
13
|
+
back: "Back to text",
|
|
14
|
+
forward: "Forward",
|
|
15
|
+
previous: "Previous chapter",
|
|
16
|
+
next: "Next chapter",
|
|
17
|
+
contents: "Contents",
|
|
18
|
+
index: "Index",
|
|
19
|
+
filterIndex: "Filter index\u2026",
|
|
20
|
+
sidebar: "Navigation",
|
|
21
|
+
size: "Font size",
|
|
22
|
+
spacing: "Line height",
|
|
23
|
+
width: "Text width",
|
|
24
|
+
theme: "Theme",
|
|
25
|
+
light: "Light",
|
|
26
|
+
dark: "Dark",
|
|
27
|
+
loading: "Loading chapter\u2026",
|
|
28
|
+
invalid: "The book is damaged or uses unsupported content.",
|
|
29
|
+
missing: "A required book resource is missing.",
|
|
30
|
+
limit: "This book exceeds the safe reading resource limits.",
|
|
31
|
+
environment: "This browser does not provide the required reading features."
|
|
32
|
+
},
|
|
33
|
+
"zh-CN": {
|
|
34
|
+
back: "\u8FD4\u56DE\u6B63\u6587",
|
|
35
|
+
forward: "\u524D\u8FDB",
|
|
36
|
+
previous: "\u4E0A\u4E00\u7AE0",
|
|
37
|
+
next: "\u4E0B\u4E00\u7AE0",
|
|
38
|
+
contents: "\u76EE\u5F55",
|
|
39
|
+
index: "\u7D22\u5F15",
|
|
40
|
+
filterIndex: "\u7B5B\u9009\u7D22\u5F15\u2026",
|
|
41
|
+
sidebar: "\u5BFC\u822A\u680F",
|
|
42
|
+
size: "\u5B57\u53F7",
|
|
43
|
+
spacing: "\u884C\u9AD8",
|
|
44
|
+
width: "\u5185\u5BB9\u5BBD\u5EA6",
|
|
45
|
+
theme: "\u4E3B\u9898",
|
|
46
|
+
light: "\u6D45\u8272",
|
|
47
|
+
dark: "\u6DF1\u8272",
|
|
48
|
+
loading: "\u6B63\u5728\u52A0\u8F7D\u7AE0\u8282\u2026",
|
|
49
|
+
invalid: "\u56FE\u4E66\u5DF2\u635F\u574F\u6216\u5305\u542B\u4E0D\u652F\u6301\u7684\u5185\u5BB9\u3002",
|
|
50
|
+
missing: "\u7F3A\u5C11\u5FC5\u9700\u7684\u56FE\u4E66\u8D44\u6E90\u3002",
|
|
51
|
+
limit: "\u56FE\u4E66\u8D85\u8FC7\u5B89\u5168\u9605\u8BFB\u8D44\u6E90\u4E0A\u9650\u3002",
|
|
52
|
+
environment: "\u6D4F\u89C8\u5668\u7F3A\u5C11\u5FC5\u9700\u7684\u9605\u8BFB\u80FD\u529B\u3002"
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
CONTENT_CSP,
|
|
59
|
+
publicationCopy
|
|
60
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
+
}) : x)(function(x) {
|
|
11
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
+
});
|
|
14
|
+
var __esm = (fn, res, err) => function __init() {
|
|
15
|
+
if (err) throw err[0];
|
|
16
|
+
try {
|
|
17
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
18
|
+
} catch (e) {
|
|
19
|
+
throw err = [e], e;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
23
|
+
try {
|
|
24
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
25
|
+
} catch (e) {
|
|
26
|
+
throw mod = 0, e;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var __export = (target, all) => {
|
|
30
|
+
for (var name in all)
|
|
31
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
32
|
+
};
|
|
33
|
+
var __copyProps = (to, from, except, desc) => {
|
|
34
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
35
|
+
for (let key of __getOwnPropNames(from))
|
|
36
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
37
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
38
|
+
}
|
|
39
|
+
return to;
|
|
40
|
+
};
|
|
41
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
42
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
43
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
44
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
45
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
46
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
47
|
+
mod
|
|
48
|
+
));
|
|
49
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
__require,
|
|
53
|
+
__esm,
|
|
54
|
+
__commonJS,
|
|
55
|
+
__export,
|
|
56
|
+
__toESM,
|
|
57
|
+
__toCommonJS
|
|
58
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
|
|
2
|
+
|
|
3
|
+
// ../runtime-assets/src/index.ts
|
|
4
|
+
function importRuntime(url) {
|
|
5
|
+
return import(
|
|
6
|
+
/* webpackIgnore: true */
|
|
7
|
+
/* turbopackIgnore: true */
|
|
8
|
+
/* @vite-ignore */
|
|
9
|
+
url
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
importRuntime
|
|
15
|
+
};
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
|
|
2
|
+
|
|
3
|
+
// ../plugins/general-raster/src/probe-format.ts
|
|
4
|
+
var TIFF_VERIFIED_COMPRESSIONS = /* @__PURE__ */ new Set([1, 5, 7, 8, 32946, 32773]);
|
|
5
|
+
var TIFF_EXPERIMENTAL_COMPRESSIONS = /* @__PURE__ */ new Set([34887, 5e4, 50001]);
|
|
6
|
+
var TIFF_SUPPORTED_PHOTOMETRICS = /* @__PURE__ */ new Set([0, 1, 2, 3, 5, 6, 8]);
|
|
7
|
+
function inspectTga(bytes, fileSize) {
|
|
8
|
+
if (bytes.length < 18) return void 0;
|
|
9
|
+
const colorMapType = bytes[1];
|
|
10
|
+
const imageType = bytes[2];
|
|
11
|
+
const colorMapped = imageType === 1 || imageType === 9;
|
|
12
|
+
const trueColor = imageType === 2 || imageType === 10;
|
|
13
|
+
const grayscale = imageType === 3 || imageType === 11;
|
|
14
|
+
if (!colorMapped && !trueColor && !grayscale) return void 0;
|
|
15
|
+
if (colorMapped && colorMapType !== 1 || !colorMapped && colorMapType !== 0) return void 0;
|
|
16
|
+
const width = bytes[12] | bytes[13] << 8;
|
|
17
|
+
const height = bytes[14] | bytes[15] << 8;
|
|
18
|
+
const depth = bytes[16];
|
|
19
|
+
if (!width || !height) return void 0;
|
|
20
|
+
if (trueColor && ![15, 16, 24, 32].includes(depth)) return void 0;
|
|
21
|
+
if (grayscale && ![8, 16].includes(depth)) return void 0;
|
|
22
|
+
if (colorMapped && ![8, 16].includes(depth)) return void 0;
|
|
23
|
+
const colorMapDepth = bytes[7];
|
|
24
|
+
if (colorMapped && ![15, 16, 24, 32].includes(colorMapDepth)) return void 0;
|
|
25
|
+
const dataOffset = 18 + bytes[0] + (colorMapType ? (bytes[5] | bytes[6] << 8) * Math.ceil(colorMapDepth / 8) : 0);
|
|
26
|
+
if (dataOffset > fileSize) return void 0;
|
|
27
|
+
if (imageType < 9) {
|
|
28
|
+
const required = width * height * Math.ceil(depth / 8);
|
|
29
|
+
if (!Number.isSafeInteger(required) || dataOffset + required > fileSize) return void 0;
|
|
30
|
+
}
|
|
31
|
+
return { format: "TGA", supportLevel: 4 };
|
|
32
|
+
}
|
|
33
|
+
function pnmToken(bytes, state) {
|
|
34
|
+
while (state.position < bytes.length) {
|
|
35
|
+
if (bytes[state.position] === 35) {
|
|
36
|
+
while (state.position < bytes.length && bytes[state.position] !== 10 && bytes[state.position] !== 13) state.position += 1;
|
|
37
|
+
} else if (bytes[state.position] <= 32) state.position += 1;
|
|
38
|
+
else break;
|
|
39
|
+
}
|
|
40
|
+
const start = state.position;
|
|
41
|
+
while (state.position < bytes.length && bytes[state.position] > 32 && bytes[state.position] !== 35) state.position += 1;
|
|
42
|
+
return start === state.position ? void 0 : String.fromCharCode(...bytes.subarray(start, state.position));
|
|
43
|
+
}
|
|
44
|
+
function inspectPnm(bytes, fileSize) {
|
|
45
|
+
if (bytes.length < 3 || bytes[0] !== 80 || bytes[1] < 49 || bytes[1] > 55) return void 0;
|
|
46
|
+
const next = bytes[2];
|
|
47
|
+
if (next !== 32 && next !== 9 && next !== 10 && next !== 13 && next !== 35) return void 0;
|
|
48
|
+
const kind = bytes[1] - 48;
|
|
49
|
+
if (kind === 7) {
|
|
50
|
+
const header = new TextDecoder("ascii").decode(bytes);
|
|
51
|
+
const end = header.indexOf("ENDHDR");
|
|
52
|
+
if (end < 0) return void 0;
|
|
53
|
+
const values = new Map(header.slice(2, end).split(/\r?\n/).map((line) => line.trim()).filter((line) => line && !line.startsWith("#")).map((line) => {
|
|
54
|
+
const separator = line.search(/\s/);
|
|
55
|
+
return [line.slice(0, separator), line.slice(separator).trim()];
|
|
56
|
+
}));
|
|
57
|
+
const width2 = Number(values.get("WIDTH"));
|
|
58
|
+
const height2 = Number(values.get("HEIGHT"));
|
|
59
|
+
const depth = Number(values.get("DEPTH"));
|
|
60
|
+
const maximum2 = Number(values.get("MAXVAL"));
|
|
61
|
+
const tuple = values.get("TUPLTYPE");
|
|
62
|
+
const channelsByTuple = {
|
|
63
|
+
BLACKANDWHITE: 1,
|
|
64
|
+
GRAYSCALE: 1,
|
|
65
|
+
RGB: 3,
|
|
66
|
+
BLACKANDWHITE_ALPHA: 2,
|
|
67
|
+
GRAYSCALE_ALPHA: 2,
|
|
68
|
+
RGB_ALPHA: 4
|
|
69
|
+
};
|
|
70
|
+
if (![width2, height2, depth, maximum2].every(Number.isInteger) || width2 <= 0 || height2 <= 0 || ![1, 2, 3, 4].includes(depth) || maximum2 < 1 || maximum2 > 65535) return void 0;
|
|
71
|
+
if (tuple !== void 0 && channelsByTuple[tuple] !== depth) return void 0;
|
|
72
|
+
const newline = header.indexOf("\n", end);
|
|
73
|
+
if (newline < 0) return void 0;
|
|
74
|
+
const expected = newline + 1 + width2 * height2 * depth * (maximum2 < 256 ? 1 : 2);
|
|
75
|
+
if (!Number.isSafeInteger(expected) || expected !== fileSize) return void 0;
|
|
76
|
+
return { format: "PNM", supportLevel: tuple === void 0 ? 3 : 4 };
|
|
77
|
+
}
|
|
78
|
+
const state = { position: 0 };
|
|
79
|
+
if (pnmToken(bytes, state) !== `P${kind}`) return void 0;
|
|
80
|
+
const width = Number(pnmToken(bytes, state));
|
|
81
|
+
const height = Number(pnmToken(bytes, state));
|
|
82
|
+
const bitmap = kind === 1 || kind === 4;
|
|
83
|
+
const maximum = bitmap ? 1 : Number(pnmToken(bytes, state));
|
|
84
|
+
if (![width, height, maximum].every(Number.isInteger) || width <= 0 || height <= 0 || maximum < 1 || maximum > 65535) return void 0;
|
|
85
|
+
if (kind >= 4) {
|
|
86
|
+
if (state.position >= bytes.length || bytes[state.position] > 32) return void 0;
|
|
87
|
+
if (bytes[state.position++] === 13 && bytes[state.position] === 10) state.position += 1;
|
|
88
|
+
const channels = kind === 6 ? 3 : 1;
|
|
89
|
+
const dataBytes = kind === 4 ? Math.ceil(width / 8) * height : width * height * channels * (maximum < 256 ? 1 : 2);
|
|
90
|
+
if (!Number.isSafeInteger(dataBytes) || state.position + dataBytes !== fileSize) return void 0;
|
|
91
|
+
} else if (fileSize <= bytes.length) {
|
|
92
|
+
const samples = width * height * (kind === 3 ? 3 : 1);
|
|
93
|
+
if (!Number.isSafeInteger(samples) || samples > 64 * 1024 * 1024) return void 0;
|
|
94
|
+
for (let index = 0; index < samples; index += 1) {
|
|
95
|
+
let value;
|
|
96
|
+
if (kind === 1) {
|
|
97
|
+
while (state.position < bytes.length) {
|
|
98
|
+
const byte2 = bytes[state.position];
|
|
99
|
+
if (byte2 === 35) {
|
|
100
|
+
while (state.position < bytes.length && bytes[state.position] !== 10 && bytes[state.position] !== 13) state.position += 1;
|
|
101
|
+
} else if (byte2 <= 32) state.position += 1;
|
|
102
|
+
else break;
|
|
103
|
+
}
|
|
104
|
+
const byte = bytes[state.position++];
|
|
105
|
+
value = byte === 48 ? 0 : byte === 49 ? 1 : Number.NaN;
|
|
106
|
+
} else value = Number(pnmToken(bytes, state));
|
|
107
|
+
if (!Number.isInteger(value) || value < 0 || value > maximum) return void 0;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return { format: "PNM", supportLevel: 4 };
|
|
111
|
+
}
|
|
112
|
+
function tiffNumber(view, offset, byteLength, littleEndian) {
|
|
113
|
+
if (offset < 0 || offset + byteLength > view.byteLength) return void 0;
|
|
114
|
+
if (byteLength === 2) return view.getUint16(offset, littleEndian);
|
|
115
|
+
if (byteLength === 4) return view.getUint32(offset, littleEndian);
|
|
116
|
+
const value = view.getBigUint64(offset, littleEndian);
|
|
117
|
+
return value <= BigInt(Number.MAX_SAFE_INTEGER) ? Number(value) : void 0;
|
|
118
|
+
}
|
|
119
|
+
function tiffShortValues(view, entry, big, littleEndian, type, count) {
|
|
120
|
+
if (type !== 3 || count < 1 || count > 64) return void 0;
|
|
121
|
+
const inlineBytes = big ? 8 : 4;
|
|
122
|
+
const valueField = entry + (big ? 12 : 8);
|
|
123
|
+
const valueOffset = count * 2 <= inlineBytes ? valueField : tiffNumber(view, valueField, big ? 8 : 4, littleEndian);
|
|
124
|
+
if (valueOffset === void 0) return void 0;
|
|
125
|
+
const values = [];
|
|
126
|
+
for (let index = 0; index < count; index += 1) {
|
|
127
|
+
const value = tiffNumber(view, valueOffset + index * 2, 2, littleEndian);
|
|
128
|
+
if (value === void 0) return void 0;
|
|
129
|
+
values.push(value);
|
|
130
|
+
}
|
|
131
|
+
return values;
|
|
132
|
+
}
|
|
133
|
+
function inspectTiff(bytes) {
|
|
134
|
+
if (bytes.length < 8) return void 0;
|
|
135
|
+
const littleEndian = bytes[0] === 73 && bytes[1] === 73;
|
|
136
|
+
if (!littleEndian && !(bytes[0] === 77 && bytes[1] === 77)) return void 0;
|
|
137
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
138
|
+
const version = tiffNumber(view, 2, 2, littleEndian);
|
|
139
|
+
const big = version === 43;
|
|
140
|
+
if (version !== 42 && !big) return void 0;
|
|
141
|
+
if (big && (tiffNumber(view, 4, 2, littleEndian) !== 8 || tiffNumber(view, 6, 2, littleEndian) !== 0)) {
|
|
142
|
+
return void 0;
|
|
143
|
+
}
|
|
144
|
+
const offsetSize = big ? 8 : 4;
|
|
145
|
+
const firstIfd = tiffNumber(view, big ? 8 : 4, offsetSize, littleEndian);
|
|
146
|
+
if (firstIfd === void 0 || firstIfd === 0) return void 0;
|
|
147
|
+
const countSize = big ? 8 : 2;
|
|
148
|
+
const entrySize = big ? 20 : 12;
|
|
149
|
+
const entryCount = tiffNumber(view, firstIfd, countSize, littleEndian);
|
|
150
|
+
if (entryCount === void 0 || entryCount > 4096) return void 0;
|
|
151
|
+
let compression = 1;
|
|
152
|
+
let photometric;
|
|
153
|
+
let hasIcc = false;
|
|
154
|
+
let hasGeoMetadata = false;
|
|
155
|
+
let tiled = false;
|
|
156
|
+
let sampleLayoutUncertain = false;
|
|
157
|
+
let bitsPerSample = [1];
|
|
158
|
+
let sampleFormats = [1];
|
|
159
|
+
for (let index = 0; index < entryCount; index += 1) {
|
|
160
|
+
const entry = firstIfd + countSize + index * entrySize;
|
|
161
|
+
const tag = tiffNumber(view, entry, 2, littleEndian);
|
|
162
|
+
const type = tiffNumber(view, entry + 2, 2, littleEndian);
|
|
163
|
+
const count = tiffNumber(view, entry + 4, big ? 8 : 4, littleEndian);
|
|
164
|
+
if (tag === void 0 || type === void 0 || count === void 0) return void 0;
|
|
165
|
+
if (tag === 34675) hasIcc = true;
|
|
166
|
+
if (tag === 33550 || tag === 33922 || tag === 34264 || tag === 34735 || tag === 34736 || tag === 34737) hasGeoMetadata = true;
|
|
167
|
+
if (tag === 322 || tag === 324) tiled = true;
|
|
168
|
+
if (tag === 258 || tag === 339) {
|
|
169
|
+
const values = tiffShortValues(view, entry, big, littleEndian, type, count);
|
|
170
|
+
if (!values) sampleLayoutUncertain = true;
|
|
171
|
+
else if (tag === 258) bitsPerSample = values;
|
|
172
|
+
else sampleFormats = values;
|
|
173
|
+
}
|
|
174
|
+
if ((tag === 259 || tag === 262) && count === 1 && type === 3) {
|
|
175
|
+
const valueOffset = entry + (big ? 12 : 8);
|
|
176
|
+
const value = tiffNumber(view, valueOffset, 2, littleEndian);
|
|
177
|
+
if (value === void 0) return void 0;
|
|
178
|
+
if (tag === 259) compression = value;
|
|
179
|
+
else photometric = value;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
if (!TIFF_VERIFIED_COMPRESSIONS.has(compression) && !TIFF_EXPERIMENTAL_COMPRESSIONS.has(compression)) return void 0;
|
|
183
|
+
if (photometric !== void 0 && !TIFF_SUPPORTED_PHOTOMETRICS.has(photometric)) return void 0;
|
|
184
|
+
if (bitsPerSample.some((value) => value < 1 || value > 16) || sampleFormats.some((value) => value !== 1)) return void 0;
|
|
185
|
+
const partial = hasIcc || hasGeoMetadata || sampleLayoutUncertain || TIFF_EXPERIMENTAL_COMPRESSIONS.has(compression) || tiled && compression === 7;
|
|
186
|
+
return { format: big ? "BigTIFF" : "TIFF", supportLevel: partial ? 3 : 4 };
|
|
187
|
+
}
|
|
188
|
+
function inspectRasterHeader(bytes, fileSize) {
|
|
189
|
+
return inspectPnm(bytes, fileSize) ?? inspectTiff(bytes) ?? inspectTga(bytes, fileSize);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export {
|
|
193
|
+
inspectRasterHeader
|
|
194
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
|
|
2
|
+
|
|
3
|
+
// ../plugins/djvu/src/probe.ts
|
|
4
|
+
var PROBE_HEADER_BYTES = 64;
|
|
5
|
+
var FORM_TYPES = /* @__PURE__ */ new Set(["DJVU", "DJVM", "PM44", "BM44"]);
|
|
6
|
+
function ascii(bytes, start, length) {
|
|
7
|
+
let out = "";
|
|
8
|
+
for (let i = 0; i < length; i += 1) {
|
|
9
|
+
out += String.fromCharCode(bytes[start + i]);
|
|
10
|
+
}
|
|
11
|
+
return out;
|
|
12
|
+
}
|
|
13
|
+
function inspectDjvuHeader(bytes) {
|
|
14
|
+
if (bytes.byteLength < 12) return { valid: false };
|
|
15
|
+
let formOffset = 0;
|
|
16
|
+
if (ascii(bytes, 0, 8) === "AT&TFORM") {
|
|
17
|
+
formOffset = 4;
|
|
18
|
+
} else if (ascii(bytes, 0, 4) !== "FORM") {
|
|
19
|
+
return { valid: false };
|
|
20
|
+
}
|
|
21
|
+
if (bytes.byteLength < formOffset + 12) return { valid: false };
|
|
22
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
23
|
+
const declaredSize = view.getUint32(formOffset + 4, false);
|
|
24
|
+
if (declaredSize < 4) return { valid: false };
|
|
25
|
+
const formType = ascii(bytes, formOffset + 8, 4);
|
|
26
|
+
if (!FORM_TYPES.has(formType)) return { valid: false };
|
|
27
|
+
let indirect = false;
|
|
28
|
+
if (formType === "DJVM" && bytes.byteLength >= formOffset + 21) {
|
|
29
|
+
const firstChunk = ascii(bytes, formOffset + 12, 4);
|
|
30
|
+
if (firstChunk === "DIRM") {
|
|
31
|
+
const flags = bytes[formOffset + 20];
|
|
32
|
+
indirect = (flags & 128) === 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return { valid: true, formType, indirect };
|
|
36
|
+
}
|
|
37
|
+
async function probeDjvu({ file, signal }) {
|
|
38
|
+
if (signal.aborted) throw new DOMException("Viewer operation aborted.", "AbortError");
|
|
39
|
+
if (file.size < 16) return 0;
|
|
40
|
+
const buffer = await file.slice(0, Math.min(file.size, PROBE_HEADER_BYTES)).arrayBuffer();
|
|
41
|
+
if (signal.aborted) throw new DOMException("Viewer operation aborted.", "AbortError");
|
|
42
|
+
const header = inspectDjvuHeader(new Uint8Array(buffer));
|
|
43
|
+
if (!header.valid) return 0;
|
|
44
|
+
return header.indirect ? 2 : 4;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
inspectDjvuHeader,
|
|
49
|
+
probeDjvu
|
|
50
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
|
|
2
|
+
|
|
3
|
+
// ../plugins/stat-data/src/probe.ts
|
|
4
|
+
var HEADER_BYTES = 1024;
|
|
5
|
+
var SAS7BDAT_MAGIC = [194, 234, 129, 96, 179, 20, 17, 207, 189, 146, 8, 0, 9, 199, 49, 140, 24, 31, 16, 17];
|
|
6
|
+
var ascii = (bytes, start, length) => String.fromCharCode(...bytes.subarray(start, start + length));
|
|
7
|
+
function detectStatFormat(bytes) {
|
|
8
|
+
const head = ascii(bytes, 0, 80);
|
|
9
|
+
if (head.startsWith("$FL2") || head.startsWith("$FL3")) return "sav";
|
|
10
|
+
if (head.startsWith("<stata_dta>")) return "dta";
|
|
11
|
+
if (bytes.length >= 4 && bytes[0] >= 104 && bytes[0] <= 115 && (bytes[1] === 1 || bytes[1] === 2) && bytes[2] === 1) return "dta";
|
|
12
|
+
if (bytes.length >= 32 && bytes.subarray(0, 12).every((byte) => byte === 0) && SAS7BDAT_MAGIC.every((byte, index) => bytes[12 + index] === byte)) return "sas7bdat";
|
|
13
|
+
if (/^HEADER RECORD\*{7}LIB(?:RARY|V8 ) HEADER RECORD!{7}0{30}/.test(head)) return "xpt";
|
|
14
|
+
if (ascii(bytes, 450, 40).includes("SPSSPORT")) return "por";
|
|
15
|
+
return void 0;
|
|
16
|
+
}
|
|
17
|
+
async function readHeader(file, signal) {
|
|
18
|
+
signal.throwIfAborted();
|
|
19
|
+
const bytes = new Uint8Array(await file.slice(0, HEADER_BYTES).arrayBuffer());
|
|
20
|
+
signal.throwIfAborted();
|
|
21
|
+
return bytes;
|
|
22
|
+
}
|
|
23
|
+
async function probeStatData({ file, signal }) {
|
|
24
|
+
const format = detectStatFormat(await readHeader(file, signal));
|
|
25
|
+
return format === void 0 ? 0 : format === "por" ? 3 : 4;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
HEADER_BYTES,
|
|
30
|
+
detectStatFormat,
|
|
31
|
+
readHeader,
|
|
32
|
+
probeStatData
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
|
|
2
|
+
|
|
3
|
+
// ../plugins/calendar-contacts/src/parse.ts
|
|
4
|
+
var MAX_LINES = 2e5;
|
|
5
|
+
var MAX_VALUE_LENGTH = 32 * 1024;
|
|
6
|
+
var MAX_COMPONENT_DEPTH = 8;
|
|
7
|
+
function decodeText(bytes) {
|
|
8
|
+
const text = new TextDecoder("utf-8").decode(bytes);
|
|
9
|
+
return text.charCodeAt(0) === 65279 ? text.slice(1) : text;
|
|
10
|
+
}
|
|
11
|
+
function hasQuotedPrintableHead(line) {
|
|
12
|
+
let quoted = false;
|
|
13
|
+
let end = -1;
|
|
14
|
+
for (let index = 0; index < line.length; index += 1) {
|
|
15
|
+
const character = line[index];
|
|
16
|
+
if (character === '"') quoted = !quoted;
|
|
17
|
+
else if (character === ":" && !quoted) {
|
|
18
|
+
end = index;
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (end <= 0) return false;
|
|
23
|
+
return /;\s*(?:ENCODING\s*=\s*)?"?QUOTED-PRINTABLE"?(?=\s*(?:;|$))/i.test(line.slice(0, end));
|
|
24
|
+
}
|
|
25
|
+
function logicalLines(text) {
|
|
26
|
+
const physical = text.replace(/\r\n?/g, "\n").split("\n");
|
|
27
|
+
const lines = [];
|
|
28
|
+
let qpContinuation = false;
|
|
29
|
+
for (const line of physical) {
|
|
30
|
+
if (qpContinuation) {
|
|
31
|
+
const index = lines.length - 1;
|
|
32
|
+
lines[index] = `${lines[index].slice(0, -1)}${line}`;
|
|
33
|
+
qpContinuation = line.endsWith("=");
|
|
34
|
+
} else if (lines.length > 0 && (line.startsWith(" ") || line.startsWith(" "))) {
|
|
35
|
+
const index = lines.length - 1;
|
|
36
|
+
lines[index] = `${lines[index]}${line.slice(1)}`;
|
|
37
|
+
qpContinuation = lines[index].endsWith("=") && hasQuotedPrintableHead(lines[index]);
|
|
38
|
+
} else if (line.length > 0) {
|
|
39
|
+
lines.push(line);
|
|
40
|
+
qpContinuation = line.endsWith("=") && hasQuotedPrintableHead(line);
|
|
41
|
+
}
|
|
42
|
+
if (lines.length > MAX_LINES) break;
|
|
43
|
+
}
|
|
44
|
+
return lines;
|
|
45
|
+
}
|
|
46
|
+
function splitOutsideQuotes(text, separator) {
|
|
47
|
+
const parts = [];
|
|
48
|
+
let current = "";
|
|
49
|
+
let quoted = false;
|
|
50
|
+
for (const character of text) {
|
|
51
|
+
if (character === '"') {
|
|
52
|
+
quoted = !quoted;
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
if (character === separator && !quoted) {
|
|
56
|
+
parts.push(current);
|
|
57
|
+
current = "";
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
current += character;
|
|
61
|
+
}
|
|
62
|
+
parts.push(current);
|
|
63
|
+
return parts;
|
|
64
|
+
}
|
|
65
|
+
function unquote(value) {
|
|
66
|
+
const trimmed = value.trim();
|
|
67
|
+
return trimmed.startsWith('"') && trimmed.endsWith('"') ? trimmed.slice(1, -1) : trimmed;
|
|
68
|
+
}
|
|
69
|
+
function parseContentLine(line) {
|
|
70
|
+
let end = -1;
|
|
71
|
+
let quoted = false;
|
|
72
|
+
for (let index = 0; index < line.length; index += 1) {
|
|
73
|
+
const character = line[index];
|
|
74
|
+
if (character === '"') quoted = !quoted;
|
|
75
|
+
else if (character === ":" && !quoted) {
|
|
76
|
+
end = index;
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (end <= 0) return void 0;
|
|
81
|
+
const head = line.slice(0, end);
|
|
82
|
+
const value = line.slice(end + 1, end + 1 + MAX_VALUE_LENGTH);
|
|
83
|
+
const [rawName, ...rawParams] = splitOutsideQuotes(head, ";");
|
|
84
|
+
const name = rawName.trim().toUpperCase();
|
|
85
|
+
if (!/^[A-Z0-9-]+$/.test(name)) return void 0;
|
|
86
|
+
const params = {};
|
|
87
|
+
const add = (key, values) => {
|
|
88
|
+
params[key] = [...params[key] ?? [], ...values.filter(Boolean)];
|
|
89
|
+
};
|
|
90
|
+
for (const rawParam of rawParams) {
|
|
91
|
+
const equals = rawParam.indexOf("=");
|
|
92
|
+
if (equals < 0) {
|
|
93
|
+
add("TYPE", [unquote(rawParam)]);
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
const key = rawParam.slice(0, equals).trim().toUpperCase();
|
|
97
|
+
if (!key) continue;
|
|
98
|
+
add(key, splitOutsideQuotes(rawParam.slice(equals + 1), ",").map(unquote));
|
|
99
|
+
}
|
|
100
|
+
return { name, params, value };
|
|
101
|
+
}
|
|
102
|
+
function decodeQuotedPrintable(text, charset) {
|
|
103
|
+
const encoder = new TextEncoder();
|
|
104
|
+
const bytes = [];
|
|
105
|
+
for (let index = 0; index < text.length; index += 1) {
|
|
106
|
+
const character = text[index];
|
|
107
|
+
if (character === "=") {
|
|
108
|
+
const hex = text.slice(index + 1, index + 3);
|
|
109
|
+
if (/^[0-9a-f]{2}$/i.test(hex)) {
|
|
110
|
+
bytes.push(Number.parseInt(hex, 16));
|
|
111
|
+
index += 2;
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
if (index + 1 >= text.length) continue;
|
|
115
|
+
}
|
|
116
|
+
for (const byte of encoder.encode(character)) bytes.push(byte);
|
|
117
|
+
}
|
|
118
|
+
try {
|
|
119
|
+
return new TextDecoder(charset ?? "utf-8").decode(new Uint8Array(bytes));
|
|
120
|
+
} catch {
|
|
121
|
+
return new TextDecoder("utf-8").decode(new Uint8Array(bytes));
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
function unescapeText(value) {
|
|
125
|
+
return value.replace(/\\([\\;,nN])/g, (_, character) => character === "n" || character === "N" ? "\n" : character);
|
|
126
|
+
}
|
|
127
|
+
function splitEscaped(value, separator = ";") {
|
|
128
|
+
const parts = [];
|
|
129
|
+
let current = "";
|
|
130
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
131
|
+
const character = value[index];
|
|
132
|
+
if (character === "\\" && index + 1 < value.length) {
|
|
133
|
+
current += character + value[index + 1];
|
|
134
|
+
index += 1;
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
if (character === separator) {
|
|
138
|
+
parts.push(current);
|
|
139
|
+
current = "";
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
current += character;
|
|
143
|
+
}
|
|
144
|
+
parts.push(current);
|
|
145
|
+
return parts;
|
|
146
|
+
}
|
|
147
|
+
function decodeRawValue(raw, line) {
|
|
148
|
+
const isQuotedPrintable = line.params.ENCODING?.some((value) => value.toUpperCase() === "QUOTED-PRINTABLE") || line.params.TYPE?.some((value) => value.toUpperCase() === "QUOTED-PRINTABLE");
|
|
149
|
+
if (isQuotedPrintable) return unescapeText(decodeQuotedPrintable(raw, line.params.CHARSET?.[0]));
|
|
150
|
+
return unescapeText(raw);
|
|
151
|
+
}
|
|
152
|
+
function decodeValue(line) {
|
|
153
|
+
return decodeRawValue(line.value, line);
|
|
154
|
+
}
|
|
155
|
+
function decodeStructuredValue(line, separator = ";") {
|
|
156
|
+
return splitEscaped(line.value, separator).map((part) => decodeRawValue(part, line));
|
|
157
|
+
}
|
|
158
|
+
function parseComponentTree(lines) {
|
|
159
|
+
const root = { name: "", properties: [], children: [] };
|
|
160
|
+
const stack = [root];
|
|
161
|
+
for (const line of lines) {
|
|
162
|
+
const parsed = parseContentLine(line);
|
|
163
|
+
if (!parsed) continue;
|
|
164
|
+
if (parsed.name === "BEGIN") {
|
|
165
|
+
const component = { name: parsed.value.trim().toUpperCase(), properties: [], children: [] };
|
|
166
|
+
if (stack.length <= MAX_COMPONENT_DEPTH) {
|
|
167
|
+
stack[stack.length - 1].children.push(component);
|
|
168
|
+
stack.push(component);
|
|
169
|
+
}
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
if (parsed.name === "END") {
|
|
173
|
+
if (stack.length > 1) stack.pop();
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
stack[stack.length - 1].properties.push(parsed);
|
|
177
|
+
}
|
|
178
|
+
return root;
|
|
179
|
+
}
|
|
180
|
+
function propertiesOf(component, name) {
|
|
181
|
+
return component.properties.filter((line) => line.name === name);
|
|
182
|
+
}
|
|
183
|
+
function propertyOf(component, ...names) {
|
|
184
|
+
for (const name of names) {
|
|
185
|
+
const found = component.properties.find((line) => line.name === name);
|
|
186
|
+
if (found) return found;
|
|
187
|
+
}
|
|
188
|
+
return void 0;
|
|
189
|
+
}
|
|
190
|
+
function textOf(component, name) {
|
|
191
|
+
const line = propertiesOf(component, name)[0];
|
|
192
|
+
if (!line) return void 0;
|
|
193
|
+
const value = decodeValue(line).trim();
|
|
194
|
+
return value || void 0;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export {
|
|
198
|
+
decodeText,
|
|
199
|
+
logicalLines,
|
|
200
|
+
decodeValue,
|
|
201
|
+
decodeStructuredValue,
|
|
202
|
+
parseComponentTree,
|
|
203
|
+
propertiesOf,
|
|
204
|
+
propertyOf,
|
|
205
|
+
textOf
|
|
206
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createRequire as __anyfileCreateRequire } from "node:module"; import { dirname as __anyfileDirname } from "node:path"; import { fileURLToPath as __anyfileFileURLToPath } from "node:url"; const require = __anyfileCreateRequire(import.meta.url); const __filename = __anyfileFileURLToPath(import.meta.url); const __dirname = __anyfileDirname(__filename);
|
|
2
|
+
|
|
3
|
+
// ../plugins/pst/src/header.ts
|
|
4
|
+
function u16(bytes, offset) {
|
|
5
|
+
return bytes[offset] | bytes[offset + 1] << 8;
|
|
6
|
+
}
|
|
7
|
+
function u32(bytes, offset) {
|
|
8
|
+
return (bytes[offset] | bytes[offset + 1] << 8 | bytes[offset + 2] << 16 | bytes[offset + 3] << 24) >>> 0;
|
|
9
|
+
}
|
|
10
|
+
function u64(bytes, offset) {
|
|
11
|
+
return u32(bytes, offset) + u32(bytes, offset + 4) * 4294967296;
|
|
12
|
+
}
|
|
13
|
+
function parseHeader(bytes) {
|
|
14
|
+
if (bytes.length < 528 || bytes[0] !== 33 || bytes[1] !== 66 || bytes[2] !== 68 || bytes[3] !== 78) return null;
|
|
15
|
+
const client = u16(bytes, 8);
|
|
16
|
+
if (client !== 19795 && client !== 20307) return null;
|
|
17
|
+
const version = u16(bytes, 10);
|
|
18
|
+
if (version === 14 || version === 15) {
|
|
19
|
+
return { format: "ansi", isOst: client === 20307, cryptMethod: bytes[461], nbtRoot: u32(bytes, 188), bbtRoot: u32(bytes, 196) };
|
|
20
|
+
}
|
|
21
|
+
if (version !== 23 && version !== 36) return null;
|
|
22
|
+
return {
|
|
23
|
+
format: version === 36 ? "unicode4k" : "unicode",
|
|
24
|
+
isOst: client === 20307,
|
|
25
|
+
cryptMethod: bytes[513],
|
|
26
|
+
nbtRoot: u64(bytes, 224),
|
|
27
|
+
bbtRoot: u64(bytes, 240)
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
u16,
|
|
33
|
+
u32,
|
|
34
|
+
u64,
|
|
35
|
+
parseHeader
|
|
36
|
+
};
|