@l1yp/file-viewer 0.1.0

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.
Files changed (373) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +134 -0
  3. package/dist/FileViewer.js +7 -0
  4. package/dist/FileViewer.vue.d.ts +37 -0
  5. package/dist/FileViewer.vue_vue_type_script_setup_true_lang.js +103 -0
  6. package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
  7. package/dist/components/AppxViewer.js +7 -0
  8. package/dist/components/AppxViewer.vue.d.ts +18 -0
  9. package/dist/components/AppxViewer.vue_vue_type_script_setup_true_lang.js +174 -0
  10. package/dist/components/ArchiveBrowser.js +7 -0
  11. package/dist/components/ArchiveBrowser.vue.d.ts +18 -0
  12. package/dist/components/ArchiveBrowser.vue_vue_type_script_setup_true_lang.js +279 -0
  13. package/dist/components/AudioViewer.js +7 -0
  14. package/dist/components/AudioViewer.vue.d.ts +21 -0
  15. package/dist/components/AudioViewer.vue_vue_type_script_setup_true_lang.js +201 -0
  16. package/dist/components/BinObjBrowser.js +7 -0
  17. package/dist/components/BinObjBrowser.vue.d.ts +19 -0
  18. package/dist/components/BinObjBrowser.vue_vue_type_script_setup_true_lang.js +141 -0
  19. package/dist/components/CertViewer.js +7 -0
  20. package/dist/components/CertViewer.vue.d.ts +17 -0
  21. package/dist/components/CertViewer.vue_vue_type_script_setup_true_lang.js +251 -0
  22. package/dist/components/ClassViewer.js +7 -0
  23. package/dist/components/ClassViewer.vue.d.ts +15 -0
  24. package/dist/components/ClassViewer.vue_vue_type_script_setup_true_lang.js +164 -0
  25. package/dist/components/CodeBlock.js +7 -0
  26. package/dist/components/CodeBlock.vue.d.ts +17 -0
  27. package/dist/components/CodeBlock.vue_vue_type_script_setup_true_lang.js +79 -0
  28. package/dist/components/CodeView.js +7 -0
  29. package/dist/components/CodeView.vue.d.ts +21 -0
  30. package/dist/components/CodeView.vue_vue_type_script_setup_true_lang.js +180 -0
  31. package/dist/components/CsvViewer.js +7 -0
  32. package/dist/components/CsvViewer.vue.d.ts +26 -0
  33. package/dist/components/CsvViewer.vue_vue_type_script_setup_true_lang.js +187 -0
  34. package/dist/components/DicomViewer.js +7 -0
  35. package/dist/components/DicomViewer.vue.d.ts +30 -0
  36. package/dist/components/DicomViewer.vue_vue_type_script_setup_true_lang.js +362 -0
  37. package/dist/components/DocxViewer.js +7 -0
  38. package/dist/components/DocxViewer.vue.d.ts +19 -0
  39. package/dist/components/DocxViewer.vue_vue_type_script_setup_true_lang.js +59 -0
  40. package/dist/components/DrawioViewer.js +7 -0
  41. package/dist/components/DrawioViewer.vue.d.ts +16 -0
  42. package/dist/components/DrawioViewer.vue_vue_type_script_setup_true_lang.js +38 -0
  43. package/dist/components/DxfViewer.js +7 -0
  44. package/dist/components/DxfViewer.vue.d.ts +14 -0
  45. package/dist/components/DxfViewer.vue_vue_type_script_setup_true_lang.js +239 -0
  46. package/dist/components/EbookViewer.js +7 -0
  47. package/dist/components/EbookViewer.vue.d.ts +22 -0
  48. package/dist/components/EbookViewer.vue_vue_type_script_setup_true_lang.js +170 -0
  49. package/dist/components/EmlViewer.js +7 -0
  50. package/dist/components/EmlViewer.vue.d.ts +21 -0
  51. package/dist/components/EmlViewer.vue_vue_type_script_setup_true_lang.js +193 -0
  52. package/dist/components/EplViewer.js +7 -0
  53. package/dist/components/EplViewer.vue.d.ts +19 -0
  54. package/dist/components/EplViewer.vue_vue_type_script_setup_true_lang.js +201 -0
  55. package/dist/components/FileViewerBody.js +7 -0
  56. package/dist/components/FileViewerBody.vue.d.ts +47 -0
  57. package/dist/components/FileViewerBody.vue_vue_type_script_setup_true_lang.js +599 -0
  58. package/dist/components/FileViewerPanel.js +7 -0
  59. package/dist/components/FileViewerPanel.vue.d.ts +3 -0
  60. package/dist/components/FileViewerPanel.vue_vue_type_script_setup_true_lang.js +207 -0
  61. package/dist/components/FontViewer.js +7 -0
  62. package/dist/components/FontViewer.vue.d.ts +17 -0
  63. package/dist/components/FontViewer.vue_vue_type_script_setup_true_lang.js +120 -0
  64. package/dist/components/FrontmatterCard.js +7 -0
  65. package/dist/components/FrontmatterCard.vue.d.ts +11 -0
  66. package/dist/components/FrontmatterCard.vue_vue_type_script_setup_true_lang.js +30 -0
  67. package/dist/components/GeoViewer.js +7 -0
  68. package/dist/components/GeoViewer.vue.d.ts +17 -0
  69. package/dist/components/GeoViewer.vue_vue_type_script_setup_true_lang.js +255 -0
  70. package/dist/components/HarViewer.js +7 -0
  71. package/dist/components/HarViewer.vue.d.ts +20 -0
  72. package/dist/components/HarViewer.vue_vue_type_script_setup_true_lang.js +322 -0
  73. package/dist/components/HexViewer.js +7 -0
  74. package/dist/components/HexViewer.vue.d.ts +22 -0
  75. package/dist/components/HexViewer.vue_vue_type_script_setup_true_lang.js +121 -0
  76. package/dist/components/HprofViewer.js +7 -0
  77. package/dist/components/HprofViewer.vue.d.ts +27 -0
  78. package/dist/components/HprofViewer.vue_vue_type_script_setup_true_lang.js +561 -0
  79. package/dist/components/ImageLightbox.js +7 -0
  80. package/dist/components/ImageLightbox.vue.d.ts +3 -0
  81. package/dist/components/ImageLightbox.vue_vue_type_script_setup_true_lang.js +86 -0
  82. package/dist/components/InlineText.d.ts +29 -0
  83. package/dist/components/InlineText.js +21 -0
  84. package/dist/components/JksViewer.js +7 -0
  85. package/dist/components/JksViewer.vue.d.ts +22 -0
  86. package/dist/components/JksViewer.vue_vue_type_script_setup_true_lang.js +353 -0
  87. package/dist/components/JsonlViewer.js +7 -0
  88. package/dist/components/JsonlViewer.vue.d.ts +15 -0
  89. package/dist/components/JsonlViewer.vue_vue_type_script_setup_true_lang.js +103 -0
  90. package/dist/components/LogViewer.js +7 -0
  91. package/dist/components/LogViewer.vue.d.ts +29 -0
  92. package/dist/components/LogViewer.vue_vue_type_script_setup_true_lang.js +670 -0
  93. package/dist/components/LrcViewer.js +7 -0
  94. package/dist/components/LrcViewer.vue.d.ts +17 -0
  95. package/dist/components/LrcViewer.vue_vue_type_script_setup_true_lang.js +106 -0
  96. package/dist/components/MarkdownTable.js +7 -0
  97. package/dist/components/MarkdownTable.vue.d.ts +19 -0
  98. package/dist/components/MarkdownTable.vue_vue_type_script_setup_true_lang.js +71 -0
  99. package/dist/components/MarkdownText.d.ts +30 -0
  100. package/dist/components/MarkdownText.js +21 -0
  101. package/dist/components/MhtViewer.js +7 -0
  102. package/dist/components/MhtViewer.vue.d.ts +22 -0
  103. package/dist/components/MhtViewer.vue_vue_type_script_setup_true_lang.js +112 -0
  104. package/dist/components/MindMapView.js +7 -0
  105. package/dist/components/MindMapView.vue.d.ts +23 -0
  106. package/dist/components/MindMapView.vue_vue_type_script_setup_true_lang.js +337 -0
  107. package/dist/components/MissingDependency.js +7 -0
  108. package/dist/components/MissingDependency.vue.d.ts +17 -0
  109. package/dist/components/MissingDependency.vue_vue_type_script_setup_true_lang.js +37 -0
  110. package/dist/components/ModelViewer.js +7 -0
  111. package/dist/components/ModelViewer.vue.d.ts +18 -0
  112. package/dist/components/ModelViewer.vue_vue_type_script_setup_true_lang.js +157 -0
  113. package/dist/components/MsiViewer.js +7 -0
  114. package/dist/components/MsiViewer.vue.d.ts +19 -0
  115. package/dist/components/MsiViewer.vue_vue_type_script_setup_true_lang.js +136 -0
  116. package/dist/components/NotebookViewer.js +7 -0
  117. package/dist/components/NotebookViewer.vue.d.ts +20 -0
  118. package/dist/components/NotebookViewer.vue_vue_type_script_setup_true_lang.js +125 -0
  119. package/dist/components/PdfViewer.js +7 -0
  120. package/dist/components/PdfViewer.vue.d.ts +19 -0
  121. package/dist/components/PdfViewer.vue_vue_type_script_setup_true_lang.js +114 -0
  122. package/dist/components/PptxViewer.js +7 -0
  123. package/dist/components/PptxViewer.vue.d.ts +20 -0
  124. package/dist/components/PptxViewer.vue_vue_type_script_setup_true_lang.js +73 -0
  125. package/dist/components/PsdViewer.js +7 -0
  126. package/dist/components/PsdViewer.vue.d.ts +15 -0
  127. package/dist/components/PsdViewer.vue_vue_type_script_setup_true_lang.js +218 -0
  128. package/dist/components/QmcAudioViewer.js +7 -0
  129. package/dist/components/QmcAudioViewer.vue.d.ts +18 -0
  130. package/dist/components/QmcAudioViewer.vue_vue_type_script_setup_true_lang.js +92 -0
  131. package/dist/components/RasterViewer.js +7 -0
  132. package/dist/components/RasterViewer.vue.d.ts +21 -0
  133. package/dist/components/RasterViewer.vue_vue_type_script_setup_true_lang.js +161 -0
  134. package/dist/components/RtfViewer.js +7 -0
  135. package/dist/components/RtfViewer.vue.d.ts +21 -0
  136. package/dist/components/RtfViewer.vue_vue_type_script_setup_true_lang.js +66 -0
  137. package/dist/components/SevenZipBrowser.js +7 -0
  138. package/dist/components/SevenZipBrowser.vue.d.ts +13 -0
  139. package/dist/components/SevenZipBrowser.vue_vue_type_script_setup_true_lang.js +366 -0
  140. package/dist/components/SqliteViewer.js +7 -0
  141. package/dist/components/SqliteViewer.vue.d.ts +18 -0
  142. package/dist/components/SqliteViewer.vue_vue_type_script_setup_true_lang.js +186 -0
  143. package/dist/components/SubtitleViewer.js +7 -0
  144. package/dist/components/SubtitleViewer.vue.d.ts +15 -0
  145. package/dist/components/SubtitleViewer.vue_vue_type_script_setup_true_lang.js +48 -0
  146. package/dist/components/XlsxChart.js +7 -0
  147. package/dist/components/XlsxChart.vue.d.ts +14 -0
  148. package/dist/components/XlsxChart.vue_vue_type_script_setup_true_lang.js +240 -0
  149. package/dist/components/XlsxViewer.js +7 -0
  150. package/dist/components/XlsxViewer.vue.d.ts +22 -0
  151. package/dist/components/XlsxViewer.vue_vue_type_script_setup_true_lang.js +814 -0
  152. package/dist/components/XmindViewer.js +7 -0
  153. package/dist/components/XmindViewer.vue.d.ts +13 -0
  154. package/dist/components/XmindViewer.vue_vue_type_script_setup_true_lang.js +48 -0
  155. package/dist/components/ZipBrowser.js +7 -0
  156. package/dist/components/ZipBrowser.vue.d.ts +14 -0
  157. package/dist/components/ZipBrowser.vue_vue_type_script_setup_true_lang.js +326 -0
  158. package/dist/components/ZoomImage.js +7 -0
  159. package/dist/components/ZoomImage.vue.d.ts +29 -0
  160. package/dist/components/ZoomImage.vue_vue_type_script_setup_true_lang.js +147 -0
  161. package/dist/components/epl/EplCodeBlock.js +7 -0
  162. package/dist/components/epl/EplCodeBlock.vue.d.ts +15 -0
  163. package/dist/components/epl/EplCodeBlock.vue_vue_type_script_setup_true_lang.js +72 -0
  164. package/dist/components/epl/EplDoc.js +7 -0
  165. package/dist/components/epl/EplDoc.vue.d.ts +19 -0
  166. package/dist/components/epl/EplDoc.vue_vue_type_script_setup_true_lang.js +327 -0
  167. package/dist/components/epl/EplMethod.js +7 -0
  168. package/dist/components/epl/EplMethod.vue.d.ts +14 -0
  169. package/dist/components/epl/EplMethod.vue_vue_type_script_setup_true_lang.js +100 -0
  170. package/dist/components/epl/EplResource.js +7 -0
  171. package/dist/components/epl/EplResource.vue.d.ts +15 -0
  172. package/dist/components/epl/EplResource.vue_vue_type_script_setup_true_lang.js +204 -0
  173. package/dist/components/epl/EplTree.js +7 -0
  174. package/dist/components/epl/EplTree.vue.d.ts +27 -0
  175. package/dist/components/epl/EplTree.vue_vue_type_script_setup_true_lang.js +123 -0
  176. package/dist/components/epl/EplVarTable.js +7 -0
  177. package/dist/components/epl/EplVarTable.vue.d.ts +21 -0
  178. package/dist/components/epl/EplVarTable.vue_vue_type_script_setup_true_lang.js +60 -0
  179. package/dist/components/epl/docTypes.d.ts +12 -0
  180. package/dist/components/epl/numbering.d.ts +21 -0
  181. package/dist/components/epl/numbering.js +14 -0
  182. package/dist/components/icons/Icon.js +7 -0
  183. package/dist/components/icons/Icon.vue.d.ts +14 -0
  184. package/dist/components/icons/Icon.vue_vue_type_script_setup_true_lang.js +33 -0
  185. package/dist/components/icons/iconPaths.d.ts +60 -0
  186. package/dist/components/icons/iconPaths.js +54 -0
  187. package/dist/components/optionalViewer.d.ts +14 -0
  188. package/dist/components/optionalViewer.js +37 -0
  189. package/dist/components/ui/ClampBlock.d.ts +82 -0
  190. package/dist/components/ui/ClampBlock.js +63 -0
  191. package/dist/composables/useFileViewer.d.ts +428 -0
  192. package/dist/composables/useFileViewer.js +27 -0
  193. package/dist/composables/useLightbox.d.ts +33 -0
  194. package/dist/composables/useLightbox.js +17 -0
  195. package/dist/composables/useLogRules.d.ts +47 -0
  196. package/dist/composables/useLogRules.js +74 -0
  197. package/dist/index.d.ts +44 -0
  198. package/dist/index.js +30 -0
  199. package/dist/lib/aes.d.ts +25 -0
  200. package/dist/lib/aes.js +99 -0
  201. package/dist/lib/appx.d.ts +66 -0
  202. package/dist/lib/appx.js +112 -0
  203. package/dist/lib/archive.d.ts +29 -0
  204. package/dist/lib/asn1.d.ts +47 -0
  205. package/dist/lib/asn1.js +122 -0
  206. package/dist/lib/binobj.d.ts +69 -0
  207. package/dist/lib/binobj.js +430 -0
  208. package/dist/lib/brotli.d.ts +14 -0
  209. package/dist/lib/brotli.js +16 -0
  210. package/dist/lib/bzip2.d.ts +14 -0
  211. package/dist/lib/bzip2.js +161 -0
  212. package/dist/lib/classfile.d.ts +72 -0
  213. package/dist/lib/classfile.js +210 -0
  214. package/dist/lib/codePreview.d.ts +22 -0
  215. package/dist/lib/codePreview.js +27 -0
  216. package/dist/lib/codefold.d.ts +14 -0
  217. package/dist/lib/codefold.js +30 -0
  218. package/dist/lib/codeformat.d.ts +21 -0
  219. package/dist/lib/codeformat.js +130 -0
  220. package/dist/lib/csv.d.ts +19 -0
  221. package/dist/lib/csv.js +74 -0
  222. package/dist/lib/des.d.ts +17 -0
  223. package/dist/lib/des.js +928 -0
  224. package/dist/lib/diagram.d.ts +5 -0
  225. package/dist/lib/diagram.js +479 -0
  226. package/dist/lib/dicom.d.ts +69 -0
  227. package/dist/lib/dicom.js +442 -0
  228. package/dist/lib/dicomCodecs.d.ts +28 -0
  229. package/dist/lib/dicomCodecs.js +156 -0
  230. package/dist/lib/dicomRender.d.ts +46 -0
  231. package/dist/lib/dicomRender.js +114 -0
  232. package/dist/lib/dxf.d.ts +86 -0
  233. package/dist/lib/dxf.js +399 -0
  234. package/dist/lib/eml.d.ts +40 -0
  235. package/dist/lib/eml.js +46 -0
  236. package/dist/lib/encoding.d.ts +28 -0
  237. package/dist/lib/encoding.js +44 -0
  238. package/dist/lib/epl/code/ast.d.ts +150 -0
  239. package/dist/lib/epl/code/codeDataParser.d.ts +3 -0
  240. package/dist/lib/epl/code/codeDataParser.js +330 -0
  241. package/dist/lib/epl/code/codeLines.d.ts +20 -0
  242. package/dist/lib/epl/code/codeLines.js +191 -0
  243. package/dist/lib/epl/code/structures.d.ts +86 -0
  244. package/dist/lib/epl/code/textCode.d.ts +29 -0
  245. package/dist/lib/epl/code/textCode.js +150 -0
  246. package/dist/lib/epl/code/variable.d.ts +25 -0
  247. package/dist/lib/epl/eplDocument.d.ts +21 -0
  248. package/dist/lib/epl/eplDocument.js +36 -0
  249. package/dist/lib/epl/imageList.d.ts +28 -0
  250. package/dist/lib/epl/imageList.js +66 -0
  251. package/dist/lib/epl/index.d.ts +53 -0
  252. package/dist/lib/epl/index.js +45 -0
  253. package/dist/lib/epl/io/binaryReader.d.ts +56 -0
  254. package/dist/lib/epl/io/binaryReader.js +119 -0
  255. package/dist/lib/epl/io/encoding.d.ts +16 -0
  256. package/dist/lib/epl/io/encoding.js +27 -0
  257. package/dist/lib/epl/model/eplSystemId.d.ts +64 -0
  258. package/dist/lib/epl/model/eplSystemId.js +16 -0
  259. package/dist/lib/epl/model/section.d.ts +46 -0
  260. package/dist/lib/epl/names/eplLibData.js +39 -0
  261. package/dist/lib/epl/names/idToNameMap.d.ts +33 -0
  262. package/dist/lib/epl/names/idToNameMap.js +130 -0
  263. package/dist/lib/epl/names/libNameProvider.d.ts +15 -0
  264. package/dist/lib/epl/names/libNameProvider.js +18 -0
  265. package/dist/lib/epl/program.d.ts +120 -0
  266. package/dist/lib/epl/program.js +134 -0
  267. package/dist/lib/epl/projectFileReader.d.ts +23 -0
  268. package/dist/lib/epl/projectFileReader.js +65 -0
  269. package/dist/lib/epl/sections/code.d.ts +20 -0
  270. package/dist/lib/epl/sections/esystemInfo.d.ts +14 -0
  271. package/dist/lib/epl/sections/losable.d.ts +11 -0
  272. package/dist/lib/epl/sections/projectConfig.d.ts +23 -0
  273. package/dist/lib/epl/sections/resource.d.ts +57 -0
  274. package/dist/lib/fb2.d.ts +14 -0
  275. package/dist/lib/fb2.js +62 -0
  276. package/dist/lib/fileType.d.ts +315 -0
  277. package/dist/lib/fileType.js +800 -0
  278. package/dist/lib/fonts.d.ts +8 -0
  279. package/dist/lib/fonts.js +4 -0
  280. package/dist/lib/format.d.ts +16 -0
  281. package/dist/lib/format.js +38 -0
  282. package/dist/lib/frontmatter.d.ts +13 -0
  283. package/dist/lib/frontmatter.js +23 -0
  284. package/dist/lib/geo.d.ts +30 -0
  285. package/dist/lib/geo.js +235 -0
  286. package/dist/lib/har.d.ts +171 -0
  287. package/dist/lib/har.js +397 -0
  288. package/dist/lib/highlight.d.ts +18 -0
  289. package/dist/lib/highlight.js +34 -0
  290. package/dist/lib/highlightLangs.d.ts +15 -0
  291. package/dist/lib/highlightLangs.js +93 -0
  292. package/dist/lib/hprof.d.ts +211 -0
  293. package/dist/lib/hprof.js +709 -0
  294. package/dist/lib/ipynb.d.ts +48 -0
  295. package/dist/lib/ipynb.js +130 -0
  296. package/dist/lib/jks.d.ts +86 -0
  297. package/dist/lib/jks.js +167 -0
  298. package/dist/lib/jsonl.d.ts +29 -0
  299. package/dist/lib/jsonl.js +24 -0
  300. package/dist/lib/lrc.d.ts +32 -0
  301. package/dist/lib/lrc.js +84 -0
  302. package/dist/lib/lzma.d.ts +70 -0
  303. package/dist/lib/lzma.js +204 -0
  304. package/dist/lib/markdown/blocks.d.ts +9 -0
  305. package/dist/lib/markdown/blocks.js +221 -0
  306. package/dist/lib/markdown/index.d.ts +3 -0
  307. package/dist/lib/markdown/inline.d.ts +33 -0
  308. package/dist/lib/markdown/inline.js +84 -0
  309. package/dist/lib/markdown/math.d.ts +5 -0
  310. package/dist/lib/markdown/math.js +25 -0
  311. package/dist/lib/markdown/segmentize.d.ts +11 -0
  312. package/dist/lib/markdown/segmentize.js +28 -0
  313. package/dist/lib/markdown/styles.d.ts +26 -0
  314. package/dist/lib/markdown/styles.js +135 -0
  315. package/dist/lib/mht.d.ts +51 -0
  316. package/dist/lib/mht.js +122 -0
  317. package/dist/lib/midi.d.ts +28 -0
  318. package/dist/lib/midi.js +84 -0
  319. package/dist/lib/mime.d.ts +82 -0
  320. package/dist/lib/mime.js +151 -0
  321. package/dist/lib/mindmap.d.ts +51 -0
  322. package/dist/lib/mindmap.js +113 -0
  323. package/dist/lib/mobi.d.ts +15 -0
  324. package/dist/lib/mobi.js +68 -0
  325. package/dist/lib/msi.d.ts +50 -0
  326. package/dist/lib/msi.js +332 -0
  327. package/dist/lib/optionalDep.d.ts +26 -0
  328. package/dist/lib/optionalDep.js +20 -0
  329. package/dist/lib/pkcs12.d.ts +56 -0
  330. package/dist/lib/pkcs12.js +356 -0
  331. package/dist/lib/qmc.d.ts +50 -0
  332. package/dist/lib/qmc.js +213 -0
  333. package/dist/lib/rar.d.ts +16 -0
  334. package/dist/lib/rar.js +40 -0
  335. package/dist/lib/rawPreview.d.ts +12 -0
  336. package/dist/lib/rawPreview.js +54 -0
  337. package/dist/lib/rc2.d.ts +12 -0
  338. package/dist/lib/rc2.js +298 -0
  339. package/dist/lib/resolveInput.d.ts +22 -0
  340. package/dist/lib/resolveInput.js +55 -0
  341. package/dist/lib/rtf.d.ts +53 -0
  342. package/dist/lib/rtf.js +413 -0
  343. package/dist/lib/sevenZip.d.ts +82 -0
  344. package/dist/lib/sevenZip.js +395 -0
  345. package/dist/lib/sha1.d.ts +24 -0
  346. package/dist/lib/sha1.js +53 -0
  347. package/dist/lib/sha256.d.ts +21 -0
  348. package/dist/lib/sha256.js +119 -0
  349. package/dist/lib/speechAudio.d.ts +36 -0
  350. package/dist/lib/speechAudio.js +85 -0
  351. package/dist/lib/sqlite.d.ts +38 -0
  352. package/dist/lib/sqlite.js +104 -0
  353. package/dist/lib/subtitle.d.ts +26 -0
  354. package/dist/lib/subtitle.js +99 -0
  355. package/dist/lib/tarball.d.ts +20 -0
  356. package/dist/lib/tarball.js +248 -0
  357. package/dist/lib/viewerFormats.d.ts +35 -0
  358. package/dist/lib/viewerFormats.js +83 -0
  359. package/dist/lib/viewerKind.d.ts +36 -0
  360. package/dist/lib/viewerKind.js +233 -0
  361. package/dist/lib/x509.d.ts +68 -0
  362. package/dist/lib/x509.js +267 -0
  363. package/dist/lib/xlsx.d.ts +55 -0
  364. package/dist/lib/xlsx.js +321 -0
  365. package/dist/lib/xlsxCharts.d.ts +34 -0
  366. package/dist/lib/xlsxCharts.js +152 -0
  367. package/dist/lib/xmind.d.ts +6 -0
  368. package/dist/lib/xmind.js +124 -0
  369. package/dist/lib/zip.d.ts +56 -0
  370. package/dist/lib/zip.js +169 -0
  371. package/dist/style.css +2 -0
  372. package/dist/types.d.ts +42 -0
  373. package/package.json +128 -0
@@ -0,0 +1,561 @@
1
+ import { formatBytes as e } from "../lib/format.js";
2
+ import t from "./icons/Icon.js";
3
+ import { Hprof as n, HprofParseError as r, decodeStringValue as i } from "../lib/hprof.js";
4
+ import { Fragment as a, computed as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, normalizeClass as p, normalizeStyle as ee, onBeforeUnmount as te, onMounted as ne, openBlock as m, ref as h, renderList as g, toDisplayString as _, unref as v, vModelText as re, watch as y, withDirectives as ie, withKeys as ae } from "vue";
5
+ //#region src/components/HprofViewer.vue?vue&type=script&setup=true&lang.ts
6
+ var oe = { class: "hp" }, se = {
7
+ key: 0,
8
+ class: "hp__confirm"
9
+ }, ce = ["title"], le = { class: "hp__confirm-sub" }, ue = {
10
+ key: 1,
11
+ class: "hp__progress"
12
+ }, de = { class: "hp__progress-label" }, fe = { class: "hp__bar" }, pe = {
13
+ key: 2,
14
+ class: "hp__msg hp__msg--error"
15
+ }, me = { class: "hp__crumb" }, he = { class: "hp__crumb-name" }, ge = { class: "hp__crumb-cls" }, _e = { class: "hp__objid" }, ve = {
16
+ key: 0,
17
+ class: "hp__progress hp__progress--inline"
18
+ }, ye = {
19
+ key: 1,
20
+ class: "hp__list"
21
+ }, be = {
22
+ key: 0,
23
+ class: "hp__fields hp__fields--detail"
24
+ }, xe = {
25
+ key: 0,
26
+ class: "hp__nofields"
27
+ }, Se = { class: "hp__fkey" }, Ce = ["onClick"], we = {
28
+ key: 0,
29
+ class: "hp__annot"
30
+ }, Te = { key: 1 }, Ee = {
31
+ key: 1,
32
+ class: "hp__arr"
33
+ }, De = { class: "hp__arrmeta" }, Oe = {
34
+ key: 0,
35
+ class: "hp__arrtext"
36
+ }, ke = {
37
+ key: 1,
38
+ class: "hp__arrhex"
39
+ }, Ae = {
40
+ key: 2,
41
+ class: "hp__arrels"
42
+ }, je = {
43
+ key: 3,
44
+ class: "hp__nofields"
45
+ }, Me = {
46
+ key: 2,
47
+ class: "hp__arr"
48
+ }, Ne = { class: "hp__arrmeta" }, Pe = { class: "hp__arrels hp__arrels--obj" }, Fe = ["onClick"], Ie = { class: "hp__eli" }, Le = {
49
+ key: 0,
50
+ class: "hp__annot"
51
+ }, Re = {
52
+ key: 1,
53
+ class: "hp__arrel"
54
+ }, ze = { class: "hp__eli" }, Be = {
55
+ key: 0,
56
+ class: "hp__nofields"
57
+ }, Ve = {
58
+ key: 3,
59
+ class: "hp__arr"
60
+ }, He = { class: "hp__arrmeta" }, Ue = { class: "hp__meta" }, We = { class: "hp__metakey" }, Ge = { class: "hp__metaval" }, Ke = { class: "hp__search" }, qe = { class: "hp__thead" }, Je = {
61
+ key: 0,
62
+ class: "hp__arrow"
63
+ }, Ye = {
64
+ key: 0,
65
+ class: "hp__arrow"
66
+ }, Xe = {
67
+ key: 0,
68
+ class: "hp__arrow"
69
+ }, Ze = { class: "hp__list" }, Qe = {
70
+ key: 0,
71
+ class: "hp__msg"
72
+ }, $e = ["title", "onClick"], et = { class: "hp__name" }, tt = { class: "hp__num" }, nt = { class: "hp__num hp__num--bytes" }, rt = {
73
+ key: 1,
74
+ class: "hp__more"
75
+ }, it = { class: "hp__crumb" }, at = ["title"], ot = { class: "hp__classbar" }, st = { class: "hp__classcount" }, ct = {
76
+ key: 0,
77
+ class: "hp__tag",
78
+ title: "为控制内存只加载了前若干个;用搜索缩小范围"
79
+ }, lt = {
80
+ key: 1,
81
+ class: "hp__tag"
82
+ }, ut = { class: "hp__search hp__search--row" }, dt = {
83
+ key: 0,
84
+ class: "hp__hint"
85
+ }, ft = {
86
+ key: 1,
87
+ class: "hp__jumpmsg"
88
+ }, pt = {
89
+ key: 2,
90
+ class: "hp__progress hp__progress--inline"
91
+ }, mt = { class: "hp__progress-label" }, ht = { class: "hp__bar" }, gt = { class: "hp__list" }, _t = {
92
+ key: 0,
93
+ class: "hp__msg"
94
+ }, vt = ["onClick"], yt = { class: "hp__objid" }, bt = { class: "hp__objsize" }, xt = { class: "hp__objprev" }, St = {
95
+ key: 0,
96
+ class: "hp__detail"
97
+ }, Ct = {
98
+ key: 0,
99
+ class: "hp__arr"
100
+ }, wt = {
101
+ key: 0,
102
+ class: "hp__arrtext"
103
+ }, Tt = {
104
+ key: 1,
105
+ class: "hp__arrhex"
106
+ }, Et = ["onClick"], Dt = { class: "hp__eli" }, Ot = {
107
+ key: 1,
108
+ class: "hp__arrel"
109
+ }, kt = { class: "hp__eli" }, At = {
110
+ key: 3,
111
+ class: "hp__nofields"
112
+ }, jt = {
113
+ key: 1,
114
+ class: "hp__fields"
115
+ }, Mt = {
116
+ key: 0,
117
+ class: "hp__nofields"
118
+ }, Nt = { class: "hp__fkey" }, Pt = { class: "hp__str" }, Ft = ["onClick"], It = ["onClick"], Lt = { key: 2 }, Rt = {
119
+ key: 0,
120
+ class: "hp__pager"
121
+ }, zt = ["disabled"], Bt = { class: "hp__pageinfo" }, Vt = ["disabled"], Ht = 20 * 1024 * 1024, b = 2e3, x = 50, Ut = "java/lang/String", S = /*@__PURE__*/ f({
122
+ __name: "HprofViewer",
123
+ props: {
124
+ url: {},
125
+ name: {},
126
+ size: {}
127
+ },
128
+ setup(f) {
129
+ let S = f, C = h("loading"), w = h(""), T = h(0), E = h(null), D = h("overview");
130
+ function Wt() {
131
+ E.value = null, D.value = "overview", j.value = "", w.value = "", T.value = 0, J.value = [], S.size != null && S.size <= Ht ? O() : C.value = "confirm";
132
+ }
133
+ async function O() {
134
+ C.value = "loading", w.value = "", T.value = 0;
135
+ try {
136
+ let e = await fetch(S.url);
137
+ if (!e.ok) throw Error(`HTTP ${e.status}`);
138
+ let t = await e.blob();
139
+ E.value = await n.parse(t, (e, t) => {
140
+ T.value = t ? e / t : 1;
141
+ }), C.value = "ready";
142
+ } catch (e) {
143
+ w.value = e instanceof r || e instanceof Error ? e.message : String(e), C.value = "error";
144
+ }
145
+ }
146
+ let k = o(() => Math.round(T.value * 100)), A = o(() => E.value?.summary ?? null), Gt = o(() => {
147
+ let t = A.value;
148
+ if (!t) return [];
149
+ let n = Number(t.timestamp);
150
+ return [
151
+ {
152
+ label: "对象总数",
153
+ value: t.instanceCount.toLocaleString()
154
+ },
155
+ {
156
+ label: "类数量",
157
+ value: t.classCount.toLocaleString()
158
+ },
159
+ {
160
+ label: "Shallow 大小",
161
+ value: e(t.heapBytes)
162
+ },
163
+ {
164
+ label: "GC Roots",
165
+ value: t.gcRoots.toLocaleString()
166
+ },
167
+ {
168
+ label: "字符串常量",
169
+ value: t.stringCount.toLocaleString()
170
+ },
171
+ {
172
+ label: "ID 宽度",
173
+ value: `${t.idSize} 字节`
174
+ },
175
+ {
176
+ label: "转储时间",
177
+ value: n > 0 ? new Date(n).toLocaleString() : "—"
178
+ },
179
+ {
180
+ label: "文件大小",
181
+ value: e(t.fileSize)
182
+ }
183
+ ];
184
+ }), j = h(""), M = h("bytes"), N = h(!1);
185
+ function P(e) {
186
+ M.value === e ? N.value = !N.value : (M.value = e, N.value = e === "name");
187
+ }
188
+ let F = o(() => {
189
+ let e = A.value?.rows ?? [], t = j.value.trim().toLowerCase(), n = t ? e.filter((e) => e.name.toLowerCase().includes(t)) : e, r = N.value ? 1 : -1, i = M.value;
190
+ return [...n].sort((e, t) => i === "name" ? r * e.name.localeCompare(t.name) : i === "count" ? r * (e.count - t.count) || t.bytes - e.bytes : r * (e.bytes - t.bytes) || t.count - e.count);
191
+ }), Kt = o(() => F.value.slice(0, b)), qt = o(() => F.value.length > b), I = h(null), L = h(!1), R = h([]), Jt = h(0), Yt = h(!1), z = h(""), B = h(null), V = h(1), H = h(/* @__PURE__ */ new Set());
192
+ async function Xt(e) {
193
+ !e.target || !E.value || (I.value = e, D.value = "class", z.value = "", B.value = null, V.value = 1, H.value = /* @__PURE__ */ new Set(), J.value = [], K.value = /* @__PURE__ */ new Map(), await Zt(e.target, ""));
194
+ }
195
+ async function Zt(e, t) {
196
+ if (E.value) {
197
+ L.value = !0, T.value = 0;
198
+ try {
199
+ let n = await E.value.collect(e, {
200
+ filter: t || void 0,
201
+ onProgress: (e, t) => {
202
+ T.value = t ? e / t : 1;
203
+ }
204
+ });
205
+ R.value = n.rows, Jt.value = n.total, Yt.value = n.truncated, B.value = t || null, V.value = 1, H.value = /* @__PURE__ */ new Set(), K.value = /* @__PURE__ */ new Map();
206
+ } catch (e) {
207
+ w.value = e instanceof Error ? e.message : String(e), C.value = "error";
208
+ } finally {
209
+ L.value = !1;
210
+ }
211
+ }
212
+ }
213
+ function Qt() {
214
+ D.value = "overview", I.value = null, R.value = [], J.value = [];
215
+ }
216
+ let U = o(() => {
217
+ let e = z.value.trim().toLowerCase();
218
+ return !e || e === B.value?.toLowerCase() ? R.value : R.value.filter((t) => $t(t, e));
219
+ });
220
+ function $t(e, t) {
221
+ if (e.id.includes(t) || e.fields.some((e) => (e.name + "=" + e.value).toLowerCase().includes(t))) return !0;
222
+ let n = e.array;
223
+ return !!(n && (n.text && n.text.toLowerCase().includes(t) || n.hex && n.hex.includes(t) || n.elements?.some((e) => e.value.toLowerCase().includes(t))));
224
+ }
225
+ let en = o(() => Yt.value && z.value.trim().length > 0 && z.value.trim().toLowerCase() !== (B.value ?? "").toLowerCase());
226
+ function tn() {
227
+ I.value?.target && Zt(I.value.target, z.value.trim());
228
+ }
229
+ function nn() {
230
+ z.value = "", I.value?.target && B.value != null && Zt(I.value.target, "");
231
+ }
232
+ let W = o(() => Math.max(1, Math.ceil(U.value.length / x))), rn = o(() => {
233
+ let e = (V.value - 1) * x;
234
+ return U.value.slice(e, e + x);
235
+ });
236
+ y(U, () => {
237
+ V.value > W.value && (V.value = W.value);
238
+ });
239
+ function an() {
240
+ V.value > 1 && V.value--;
241
+ }
242
+ function on() {
243
+ V.value < W.value && V.value++;
244
+ }
245
+ function sn(e) {
246
+ let t = new Set(H.value);
247
+ t.has(e) ? t.delete(e) : t.add(e), H.value = t;
248
+ }
249
+ let G = o(() => {
250
+ let e = R.value[0];
251
+ if (!e) return !1;
252
+ let t = e.fields.some((e) => e.name === "value" && (e.kind === "ref" || e.kind === "null")), n = e.fields.some((e) => e.name === "coder");
253
+ return t && (I.value?.name === Ut || n);
254
+ }), K = h(/* @__PURE__ */ new Map()), q = h(!1);
255
+ function cn(e) {
256
+ return K.value.get(e.id);
257
+ }
258
+ async function ln() {
259
+ if (!E.value || !G.value) return;
260
+ let e = [];
261
+ for (let t of rn.value) {
262
+ if (K.value.has(t.id)) continue;
263
+ let n = t.fields.find((e) => e.name === "value");
264
+ if (!n || n.kind !== "ref" || !n.refId) {
265
+ K.value.set(t.id, (n?.kind, ""));
266
+ continue;
267
+ }
268
+ let r = t.fields.find((e) => e.name === "coder"), i = r ? parseInt(r.value, 10) : null;
269
+ e.push({
270
+ instId: t.id,
271
+ refId: n.refId,
272
+ coder: Number.isNaN(i) ? null : i
273
+ });
274
+ }
275
+ if (e.length) {
276
+ q.value = !0;
277
+ try {
278
+ let t = await E.value.resolveObjects(new Set(e.map((e) => e.refId))), n = new Map(K.value);
279
+ for (let r of e) {
280
+ let e = t.get(r.refId);
281
+ n.set(r.instId, e && e.kind === "primArray" ? i(e.rawBytes, e.elemType, r.coder) : "");
282
+ }
283
+ K.value = n;
284
+ } catch {} finally {
285
+ q.value = !1;
286
+ }
287
+ }
288
+ }
289
+ y([rn, G], () => void ln());
290
+ function un(e) {
291
+ if (e.array) return dn(e.array);
292
+ if (G.value) {
293
+ let t = cn(e);
294
+ if (t !== void 0) return t === "" ? "\"\"" : `"${$(_n(t, 160))}"`;
295
+ }
296
+ return e.fields.length ? e.fields.slice(0, 4).map((e) => `${e.name}=${e.value}`).join(", ") + (e.fields.length > 4 ? ", …" : "") : "";
297
+ }
298
+ function dn(e) {
299
+ let t = `(${e.length})`;
300
+ return e.text == null ? e.elements ? `${t} ` + e.elements.slice(0, 8).map((e) => e.value).join(", ") : e.hex ? `${t} ${e.hex}` : t : `${t} "${$(_n(e.text, 160))}"`;
301
+ }
302
+ let J = h([]), fn = h(!1), Y = h(""), X = o(() => J.value.length ? J.value[J.value.length - 1] : null);
303
+ async function Z(e) {
304
+ if (!(!e || !E.value)) {
305
+ Y.value = "", fn.value = !0;
306
+ try {
307
+ let t = (await E.value.resolveObjects(new Set([e]))).get(e);
308
+ t ? J.value = [...J.value, t] : Y.value = `#${e} 未找到(可能已被回收或不在本转储中)`;
309
+ } catch (e) {
310
+ Y.value = e instanceof Error ? e.message : String(e);
311
+ } finally {
312
+ fn.value = !1;
313
+ }
314
+ }
315
+ }
316
+ function pn() {
317
+ J.value = J.value.slice(0, -1), Y.value = "";
318
+ }
319
+ function mn() {
320
+ J.value = [], Y.value = "";
321
+ }
322
+ let hn = h(/* @__PURE__ */ new Map());
323
+ y(X, async (e) => {
324
+ if (hn.value = /* @__PURE__ */ new Map(), !e || !E.value) return;
325
+ let t = /* @__PURE__ */ new Set();
326
+ if (e.kind === "instance") for (let n of e.fields) n.kind === "ref" && n.refId && t.add(n.refId);
327
+ if (e.kind === "objArray" && e.array.elements) for (let n of e.array.elements) n.kind === "ref" && n.refId && t.add(n.refId);
328
+ if (!t.size) return;
329
+ let n = e, r = await E.value.resolveObjects(t);
330
+ if (X.value !== n) return;
331
+ let i = /* @__PURE__ */ new Map();
332
+ for (let [e, t] of r) i.set(e, gn(t));
333
+ hn.value = i;
334
+ });
335
+ function Q(e) {
336
+ return e ? hn.value.get(e) : void 0;
337
+ }
338
+ function gn(e) {
339
+ return e.kind === "class" ? "class " + e.className : e.kind === "instance" ? e.className : e.kind === "primArray" ? e.array.text == null ? `${e.className}[${e.length}]` : `${e.className} "${$(_n(e.array.text, 60))}"` : `${e.className.replace(/\[\]$/, "")}[${e.length}]`;
340
+ }
341
+ function _n(e, t) {
342
+ return e.length > t ? e.slice(0, t) + "…" : e;
343
+ }
344
+ function $(e) {
345
+ return e.replace(/\s+/g, " ");
346
+ }
347
+ return ne(Wt), y(() => S.url, Wt), te(() => {
348
+ E.value = null;
349
+ }), (n, r) => (m(), c("div", oe, [C.value === "confirm" ? (m(), c("div", se, [
350
+ d(t, {
351
+ name: "code",
352
+ size: 32
353
+ }),
354
+ l("p", {
355
+ class: "hp__confirm-title",
356
+ title: f.name
357
+ }, _(f.name), 9, ce),
358
+ l("p", le, _(f.size == null ? "文件大小未知" : `文件较大(${v(e)(f.size)})`) + ",解析堆转储需将整个文件下载到浏览器(流式解析、内存可控)。 ", 1),
359
+ l("button", {
360
+ type: "button",
361
+ class: "hp__btn",
362
+ onClick: O
363
+ }, "加载并解析")
364
+ ])) : C.value === "loading" ? (m(), c("div", ue, [l("p", de, "正在解析堆转储… " + _(k.value) + "%", 1), l("div", fe, [l("div", {
365
+ class: "hp__bar-fill",
366
+ style: ee({ width: k.value + "%" })
367
+ }, null, 4)])])) : C.value === "error" ? (m(), c("div", pe, [l("p", null, _(w.value), 1), l("button", {
368
+ type: "button",
369
+ class: "hp__retry",
370
+ onClick: O
371
+ }, "重试")])) : C.value === "ready" && A.value ? (m(), c(a, { key: 3 }, [X.value ? (m(), c(a, { key: 0 }, [l("div", me, [
372
+ l("button", {
373
+ type: "button",
374
+ class: "hp__back",
375
+ onClick: pn
376
+ }, [d(t, {
377
+ name: "chevronLeft",
378
+ size: 14
379
+ }), r[6] ||= u(" 返回 ", -1)]),
380
+ l("span", he, [l("span", ge, _(X.value.className), 1), l("span", _e, "#" + _(X.value.id), 1)]),
381
+ l("button", {
382
+ type: "button",
383
+ class: "hp__ghostbtn hp__crumb-close",
384
+ title: "回到列表",
385
+ onClick: mn
386
+ }, " 列表 ")
387
+ ]), fn.value ? (m(), c("div", ve, [...r[7] ||= [l("p", { class: "hp__progress-label" }, "正在解析对象…", -1)]])) : (m(), c("div", ye, [X.value.kind === "instance" ? (m(), c("dl", be, [X.value.fields.length ? s("", !0) : (m(), c("p", xe, "(无字段或无法解析布局)")), (m(!0), c(a, null, g(X.value.fields, (e, t) => (m(), c(a, { key: t }, [l("dt", Se, _(e.name), 1), l("dd", { class: p(["hp__fval", { "hp__fval--null": e.kind === "null" }]) }, [e.kind === "ref" ? (m(), c(a, { key: 0 }, [l("button", {
388
+ type: "button",
389
+ class: "hp__reflink",
390
+ onClick: (t) => Z(e.refId)
391
+ }, _(e.value), 9, Ce), Q(e.refId) ? (m(), c("span", we, "→ " + _(Q(e.refId)), 1)) : s("", !0)], 64)) : (m(), c("span", Te, _(e.value), 1))], 2)], 64))), 128))])) : X.value.kind === "primArray" ? (m(), c("div", Ee, [
392
+ l("div", De, _(X.value.className) + " · 长度 " + _(X.value.length.toLocaleString()), 1),
393
+ X.value.array.text == null ? s("", !0) : (m(), c("pre", Oe, _(X.value.array.text), 1)),
394
+ X.value.array.hex ? (m(), c("div", ke, _(X.value.array.hex), 1)) : s("", !0),
395
+ X.value.array.elements ? (m(), c("div", Ae, [(m(!0), c(a, null, g(X.value.array.elements, (e, t) => (m(), c("span", {
396
+ key: t,
397
+ class: "hp__arrel"
398
+ }, _(e.value), 1))), 128))])) : s("", !0),
399
+ X.value.array.truncated ? (m(), c("p", je, " (预览已截断,仅显示前若干项) ")) : s("", !0)
400
+ ])) : X.value.kind === "objArray" ? (m(), c("div", Me, [
401
+ l("div", Ne, _(X.value.className) + " · 长度 " + _(X.value.length.toLocaleString()), 1),
402
+ l("div", Pe, [(m(!0), c(a, null, g(X.value.array.elements ?? [], (e, t) => (m(), c(a, { key: t }, [e.kind === "ref" ? (m(), c("button", {
403
+ key: 0,
404
+ type: "button",
405
+ class: "hp__reflink hp__reflink--el",
406
+ onClick: (t) => Z(e.refId)
407
+ }, [
408
+ l("span", Ie, "[" + _(e.name) + "]", 1),
409
+ u(" " + _(e.value) + " ", 1),
410
+ Q(e.refId) ? (m(), c("span", Le, "→ " + _(Q(e.refId)), 1)) : s("", !0)
411
+ ], 8, Fe)) : (m(), c("span", Re, [l("span", ze, "[" + _(e.name) + "]", 1), u(" " + _(e.value), 1)]))], 64))), 128))]),
412
+ X.value.array.truncated ? (m(), c("p", Be, " (预览已截断,仅显示前若干项) ")) : s("", !0)
413
+ ])) : (m(), c("div", Ve, [l("div", He, "类对象:" + _(X.value.className), 1), r[8] ||= l("p", { class: "hp__nofields" }, "这是一个 Class 对象。返回列表可在类直方图中查看它的实例。", -1)]))]))], 64)) : D.value === "overview" ? (m(), c(a, { key: 1 }, [
414
+ l("dl", Ue, [(m(!0), c(a, null, g(Gt.value, (e) => (m(), c(a, { key: e.label }, [l("dt", We, _(e.label), 1), l("dd", Ge, _(e.value), 1)], 64))), 128))]),
415
+ l("div", Ke, [ie(l("input", {
416
+ "onUpdate:modelValue": r[0] ||= (e) => j.value = e,
417
+ type: "search",
418
+ class: "hp__input",
419
+ placeholder: "搜索类名…"
420
+ }, null, 512), [[re, j.value]])]),
421
+ l("div", qe, [
422
+ l("button", {
423
+ type: "button",
424
+ class: "hp__th hp__th--name",
425
+ onClick: r[1] ||= (e) => P("name")
426
+ }, [r[9] ||= u(" 类名", -1), M.value === "name" ? (m(), c("span", Je, _(N.value ? "▲" : "▼"), 1)) : s("", !0)]),
427
+ l("button", {
428
+ type: "button",
429
+ class: "hp__th hp__th--num",
430
+ onClick: r[2] ||= (e) => P("count")
431
+ }, [r[10] ||= u(" 实例数", -1), M.value === "count" ? (m(), c("span", Ye, _(N.value ? "▲" : "▼"), 1)) : s("", !0)]),
432
+ l("button", {
433
+ type: "button",
434
+ class: "hp__th hp__th--num",
435
+ onClick: r[3] ||= (e) => P("bytes")
436
+ }, [r[11] ||= u(" Shallow", -1), M.value === "bytes" ? (m(), c("span", Xe, _(N.value ? "▲" : "▼"), 1)) : s("", !0)])
437
+ ]),
438
+ l("div", Ze, [
439
+ F.value.length === 0 ? (m(), c("p", Qe, "无匹配类")) : s("", !0),
440
+ (m(!0), c(a, null, g(Kt.value, (n, r) => (m(), c("button", {
441
+ key: r,
442
+ type: "button",
443
+ class: "hp__row",
444
+ title: `查看 ${n.name} 的对象列表`,
445
+ onClick: (e) => Xt(n)
446
+ }, [
447
+ l("span", et, _(n.name), 1),
448
+ l("span", tt, _(n.count.toLocaleString()), 1),
449
+ l("span", nt, _(v(e)(n.bytes)), 1),
450
+ d(t, {
451
+ name: "chevronRight",
452
+ size: 14,
453
+ class: "hp__chev"
454
+ })
455
+ ], 8, $e))), 128)),
456
+ qt.value ? (m(), c("p", rt, " 仅显示前 " + _(b) + " 个类,输入关键词缩小范围(共 " + _(F.value.length) + " 个) ", 1)) : s("", !0)
457
+ ])
458
+ ], 64)) : I.value ? (m(), c(a, { key: 2 }, [
459
+ l("div", it, [l("button", {
460
+ type: "button",
461
+ class: "hp__back",
462
+ onClick: Qt
463
+ }, [d(t, {
464
+ name: "chevronLeft",
465
+ size: 14
466
+ }), r[12] ||= u(" 类列表 ", -1)]), l("span", {
467
+ class: "hp__crumb-name",
468
+ title: I.value.name
469
+ }, _(I.value.name), 9, at)]),
470
+ l("div", ot, [
471
+ l("span", st, [u(" 共 " + _(Jt.value.toLocaleString()) + " 个实例", 1), B.value ? (m(), c(a, { key: 0 }, [u(" 匹配「" + _(B.value) + "」", 1)], 64)) : s("", !0)]),
472
+ Yt.value ? (m(), c("span", ct, " 已加载前 " + _(R.value.length.toLocaleString()) + " 个 ", 1)) : s("", !0),
473
+ q.value ? (m(), c("span", lt, "解析字符串…")) : s("", !0)
474
+ ]),
475
+ l("div", ut, [ie(l("input", {
476
+ "onUpdate:modelValue": r[4] ||= (e) => z.value = e,
477
+ type: "search",
478
+ class: "hp__input",
479
+ placeholder: "过滤 id / 字段值 / 内容…",
480
+ onKeydown: r[5] ||= ae((e) => en.value && tn(), ["enter"])
481
+ }, null, 544), [[re, z.value]]), B.value ? (m(), c("button", {
482
+ key: 0,
483
+ type: "button",
484
+ class: "hp__ghostbtn",
485
+ title: "清除全文搜索",
486
+ onClick: nn
487
+ }, " 清除 ")) : s("", !0)]),
488
+ en.value ? (m(), c("p", dt, [u(" 过滤仅作用于已加载的 " + _(R.value.length.toLocaleString()) + " 个。 ", 1), l("button", {
489
+ type: "button",
490
+ class: "hp__link",
491
+ onClick: tn
492
+ }, " 在全部 " + _(Jt.value.toLocaleString()) + " 个实例中搜索「" + _(z.value.trim()) + "」 ", 1)])) : s("", !0),
493
+ Y.value ? (m(), c("p", ft, _(Y.value), 1)) : s("", !0),
494
+ L.value ? (m(), c("div", pt, [l("p", mt, "正在扫描对象… " + _(k.value) + "%", 1), l("div", ht, [l("div", {
495
+ class: "hp__bar-fill",
496
+ style: ee({ width: k.value + "%" })
497
+ }, null, 4)])])) : (m(), c(a, { key: 3 }, [l("div", gt, [U.value.length === 0 ? (m(), c("p", _t, "无匹配对象")) : s("", !0), (m(!0), c(a, null, g(rn.value, (n) => (m(), c("div", {
498
+ key: n.id,
499
+ class: "hp__obj"
500
+ }, [l("button", {
501
+ type: "button",
502
+ class: "hp__objhead",
503
+ onClick: (e) => sn(n.id)
504
+ }, [
505
+ d(t, {
506
+ name: H.value.has(n.id) ? "chevronDown" : "chevronRight",
507
+ size: 13,
508
+ class: "hp__objchev"
509
+ }, null, 8, ["name"]),
510
+ l("span", yt, "#" + _(n.id), 1),
511
+ l("span", bt, _(v(e)(n.size)), 1),
512
+ l("span", xt, _(un(n)), 1)
513
+ ], 8, vt), H.value.has(n.id) ? (m(), c("div", St, [n.array ? (m(), c("div", Ct, [
514
+ n.array.text == null ? s("", !0) : (m(), c("pre", wt, _(n.array.text), 1)),
515
+ n.array.hex ? (m(), c("div", Tt, _(n.array.hex), 1)) : s("", !0),
516
+ n.array.elements ? (m(), c("div", {
517
+ key: 2,
518
+ class: p(["hp__arrels", { "hp__arrels--obj": n.array.elemClassName }])
519
+ }, [(m(!0), c(a, null, g(n.array.elements, (e, t) => (m(), c(a, { key: t }, [e.kind === "ref" ? (m(), c("button", {
520
+ key: 0,
521
+ type: "button",
522
+ class: "hp__reflink hp__reflink--el",
523
+ onClick: (t) => Z(e.refId)
524
+ }, [l("span", Dt, "[" + _(e.name) + "]", 1), u(" " + _(e.value), 1)], 8, Et)) : (m(), c("span", Ot, [l("span", kt, "[" + _(e.name) + "]", 1), u(" " + _(e.value), 1)]))], 64))), 128))], 2)) : s("", !0),
525
+ n.array.truncated ? (m(), c("p", At, " (预览已截断,完整长度 " + _(n.array.length.toLocaleString()) + ") ", 1)) : s("", !0)
526
+ ])) : (m(), c("dl", jt, [n.fields.length ? s("", !0) : (m(), c("p", Mt, " (无法解析字段布局,仅显示 id 与大小) ")), (m(!0), c(a, null, g(n.fields, (e, t) => (m(), c(a, { key: t }, [l("dt", Nt, _(e.name), 1), l("dd", { class: p(["hp__fval", { "hp__fval--null": e.kind === "null" }]) }, [G.value && e.name === "value" && cn(n) !== void 0 ? (m(), c(a, { key: 0 }, [l("span", Pt, "\"" + _(cn(n)) + "\"", 1), e.kind === "ref" ? (m(), c("button", {
527
+ key: 0,
528
+ type: "button",
529
+ class: "hp__reflink hp__reflink--sm",
530
+ onClick: (t) => Z(e.refId)
531
+ }, _(e.value), 9, Ft)) : s("", !0)], 64)) : e.kind === "ref" ? (m(), c("button", {
532
+ key: 1,
533
+ type: "button",
534
+ class: "hp__reflink",
535
+ onClick: (t) => Z(e.refId)
536
+ }, _(e.value), 9, It)) : (m(), c("span", Lt, _(e.value), 1))], 2)], 64))), 128))]))])) : s("", !0)]))), 128))]), W.value > 1 ? (m(), c("div", Rt, [
537
+ l("button", {
538
+ type: "button",
539
+ class: "hp__pagebtn",
540
+ disabled: V.value <= 1,
541
+ onClick: an
542
+ }, [d(t, {
543
+ name: "chevronLeft",
544
+ size: 14
545
+ })], 8, zt),
546
+ l("span", Bt, "第 " + _(V.value) + " / " + _(W.value) + " 页", 1),
547
+ l("button", {
548
+ type: "button",
549
+ class: "hp__pagebtn",
550
+ disabled: V.value >= W.value,
551
+ onClick: on
552
+ }, [d(t, {
553
+ name: "chevronRight",
554
+ size: 14
555
+ })], 8, Vt)
556
+ ])) : s("", !0)], 64))
557
+ ], 64)) : s("", !0)], 64)) : s("", !0)]));
558
+ }
559
+ });
560
+ //#endregion
561
+ export { S as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./ImageLightbox.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/ImageLightbox.vue
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-edff5d07"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,86 @@
1
+ import { fileExt as e } from "../lib/fileType.js";
2
+ import t from "./icons/Icon.js";
3
+ import { useLightbox as n } from "../composables/useLightbox.js";
4
+ import r from "./ZoomImage.js";
5
+ import { Fragment as i, Teleport as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createVNode as d, defineComponent as f, onBeforeUnmount as p, openBlock as m, ref as h, toDisplayString as g, unref as _, watch as v } from "vue";
6
+ //#region src/components/ImageLightbox.vue?vue&type=script&setup=true&lang.ts
7
+ var y = {
8
+ key: 0,
9
+ class: "lightbox"
10
+ }, b = {
11
+ key: 0,
12
+ class: "lightbox__msg"
13
+ }, x = {
14
+ key: 1,
15
+ class: "lightbox__msg"
16
+ }, S = ["src"], C = /*@__PURE__*/ f({
17
+ __name: "ImageLightbox",
18
+ setup(f) {
19
+ let { current: C, close: w } = n(), T = {
20
+ mp4: "video/mp4",
21
+ m4v: "video/mp4",
22
+ webm: "video/webm",
23
+ ogv: "video/ogg",
24
+ mov: "video/quicktime",
25
+ mkv: "video/x-matroska",
26
+ avi: "video/x-msvideo"
27
+ }, E = o(() => C.value?.kind === "video"), D = h(null), O = h(""), k = h(!1), A = h("");
28
+ function j(e) {
29
+ e.key === "Escape" ? w() : E.value || (e.key === "+" || e.key === "=" ? D.value?.zoomIn() : e.key === "-" || e.key === "_" ? D.value?.zoomOut() : e.key === "0" && D.value?.fit());
30
+ }
31
+ function M() {
32
+ O.value &&= (URL.revokeObjectURL(O.value), "");
33
+ }
34
+ async function N(t) {
35
+ k.value = !0, A.value = "";
36
+ try {
37
+ let n = await fetch(t.src);
38
+ if (!n.ok) throw Error(`HTTP ${n.status}`);
39
+ let r = await n.blob(), i = T[e(t.alt || "")] || "video/mp4", a = URL.createObjectURL(new Blob([r], { type: i }));
40
+ C.value === t ? O.value = a : URL.revokeObjectURL(a);
41
+ } catch (e) {
42
+ C.value === t && (A.value = e instanceof Error ? e.message : String(e));
43
+ } finally {
44
+ C.value === t && (k.value = !1);
45
+ }
46
+ }
47
+ return v(C, (e) => {
48
+ typeof window > "u" || (e ? (window.addEventListener("keydown", j), document.body.style.overflow = "hidden") : (window.removeEventListener("keydown", j), document.body.style.overflow = ""), M(), A.value = "", k.value = !1, e?.kind === "video" && N(e));
49
+ }), p(() => {
50
+ typeof window < "u" && (window.removeEventListener("keydown", j), document.body.style.overflow = ""), M();
51
+ }), (e, n) => (m(), s(a, { to: "body" }, [_(C) ? (m(), l("div", y, [u("button", {
52
+ type: "button",
53
+ class: "lightbox__close",
54
+ title: "关闭 (Esc)",
55
+ "aria-label": "关闭",
56
+ onClick: n[0] ||= (...e) => _(w) && _(w)(...e)
57
+ }, [d(t, {
58
+ name: "close",
59
+ size: 22,
60
+ "stroke-width": 2.2
61
+ })]), E.value ? (m(), l(i, { key: 0 }, [k.value ? (m(), l("p", b, "加载视频中…")) : A.value ? (m(), l("p", x, "视频加载失败:" + g(A.value), 1)) : O.value ? (m(), l("video", {
62
+ key: 2,
63
+ class: "lightbox__video",
64
+ src: O.value,
65
+ controls: "",
66
+ autoplay: "",
67
+ playsinline: ""
68
+ }, null, 8, S)) : c("", !0)], 64)) : (m(), s(r, {
69
+ key: 1,
70
+ ref_key: "zoomImg",
71
+ ref: D,
72
+ class: "lightbox__zoom",
73
+ src: _(C).src,
74
+ alt: _(C).alt || "",
75
+ long: _(C).long,
76
+ onEmptyClick: _(w)
77
+ }, null, 8, [
78
+ "src",
79
+ "alt",
80
+ "long",
81
+ "onEmptyClick"
82
+ ]))])) : c("", !0)]));
83
+ }
84
+ });
85
+ //#endregion
86
+ export { C as default };