file-viewer3 1.0.8 → 1.0.25

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 (430) hide show
  1. package/LICENSE +160 -0
  2. package/README.en.md +390 -0
  3. package/README.md +306 -89
  4. package/dist/_headers +22 -0
  5. package/dist/assets/3MFLoader--yjh7udp.js +1 -0
  6. package/dist/assets/AMFLoader-C0y7NIAO.js +1 -0
  7. package/dist/assets/ArchiveViewer-6AvBZVl3.js +2 -0
  8. package/dist/assets/ArchiveViewer-B2pHxHFv.css +1 -0
  9. package/dist/assets/AudioViewer-0CSMvCtp.css +1 -0
  10. package/dist/assets/AudioViewer-6a_DDcur.js +1 -0
  11. package/dist/assets/CadViewer-A9PKtCth.css +1 -0
  12. package/dist/assets/CadViewer-D94LUXKO.js +110 -0
  13. package/dist/assets/CodeViewer-BdZGsbFh.js +2 -0
  14. package/dist/assets/CodeViewer-CR2CsPRi.css +1 -0
  15. package/dist/assets/ColladaLoader-DTiuvWJL.js +3 -0
  16. package/dist/assets/DrawingViewer-BplS278E.js +2 -0
  17. package/dist/assets/DrawingViewer-DXiF5YWV.css +1 -0
  18. package/dist/assets/EdaViewer-BXH1Jmwr.js +8 -0
  19. package/dist/assets/EdaViewer-CKf1YQnh.css +1 -0
  20. package/dist/assets/EmailViewer-BsBKZ_A5.js +4 -0
  21. package/dist/assets/EmailViewer-BwvGE4ns.css +1 -0
  22. package/dist/assets/EpubViewer-Cci0l1Vm.css +1 -0
  23. package/dist/assets/EpubViewer-DlGzr8_x.js +2 -0
  24. package/dist/assets/FBXLoader-Bj34Z_uf.js +1 -0
  25. package/dist/assets/GLTFLoader-BNUIXeRP.js +1 -0
  26. package/dist/assets/ImageViewer-BKp7YpMs.css +10 -0
  27. package/dist/assets/ImageViewer-D1Yc0jYg.js +1 -0
  28. package/dist/assets/KMZLoader-DTmXWzX_.js +1 -0
  29. package/dist/assets/MarkdownViewer-CIljbLlu.css +1 -0
  30. package/dist/assets/MarkdownViewer-CRi0rhWw.js +64 -0
  31. package/dist/assets/ModelViewer-C4ir9AyI.css +1 -0
  32. package/dist/assets/ModelViewer-yxcVdLzz.js +2 -0
  33. package/dist/assets/OBJLoader-DW4Mv-mq.js +5 -0
  34. package/dist/assets/OfdViewer-DbkG1-Bp.js +2 -0
  35. package/dist/assets/OfdViewer-Ulv-WZWh.css +1 -0
  36. package/dist/assets/PCDLoader-CHA1g8rk.js +3 -0
  37. package/dist/assets/PLYLoader-DwTzA-Dg.js +2 -0
  38. package/dist/assets/PdfView-_Uu48dkU.js +558 -0
  39. package/dist/assets/PdfView-fKwbB_8j.css +1 -0
  40. package/dist/assets/PptxRender-BNoW_9_0.css +1 -0
  41. package/dist/assets/PptxRender-myCCfHiR.js +32 -0
  42. package/dist/assets/STLLoader-Bt7FMgMu.js +1 -0
  43. package/dist/assets/TDSLoader-D__OhSS9.js +1 -0
  44. package/dist/assets/TypstViewer-4dMAIp9x.js +60 -0
  45. package/dist/assets/TypstViewer-BgYR02wU.css +1 -0
  46. package/dist/assets/USDLoader-BovI5HgZ.js +6 -0
  47. package/dist/assets/UmdViewer-BfIWw5dV.js +3 -0
  48. package/dist/assets/UmdViewer-DpObj56a.css +1 -0
  49. package/dist/assets/VRMLLoader-_VxVXPvX.js +140 -0
  50. package/dist/assets/VTKLoader-BfnzBXsa.js +3 -0
  51. package/dist/assets/XYZLoader-DbQZs-aZ.js +2 -0
  52. package/dist/assets/XlsxTable-CKmWT6Iw.js +5 -0
  53. package/dist/assets/XlsxTable-Ccp_ksQc.css +1 -0
  54. package/dist/assets/__vite-browser-external-j1Zxnfxm.js +1 -0
  55. package/dist/assets/ar-SA-G6X2FPQ2-h0GtAVoD.js +10 -0
  56. package/dist/assets/arc-C_eH0vTw.js +1 -0
  57. package/dist/assets/architecture-7EHR7CIX-nPLvVkG5.js +1 -0
  58. package/dist/assets/architectureDiagram-3BPJPVTR-Cx8fJaC_.js +36 -0
  59. package/dist/assets/archive-D-0w4Z7t.js +2 -0
  60. package/dist/assets/audio-IkwcqgJA.js +2 -0
  61. package/dist/assets/az-AZ-76LH7QW2-D_aQ-6Zd.js +1 -0
  62. package/dist/assets/bash-LmRjUKlR.js +1 -0
  63. package/dist/assets/bg-BG-XCXSNQG7-H7Czia1L.js +5 -0
  64. package/dist/assets/blockDiagram-GPEHLZMM-v3Efy6dm.js +132 -0
  65. package/dist/assets/bn-BD-2XOGV67Q-f6ymEr9g.js +5 -0
  66. package/dist/assets/c4Diagram-AAUBKEIU-BdstYnMv.js +10 -0
  67. package/dist/assets/ca-ES-6MX7JW3Y-DTzyqWmS.js +8 -0
  68. package/dist/assets/cad-DFnQbJJO.js +2 -0
  69. package/dist/assets/cfb-Bv6fOQ4m.js +11 -0
  70. package/dist/assets/channel-C66J400U.js +1 -0
  71. package/dist/assets/chunk-2J33WTMH-BoyKZPbs.js +1 -0
  72. package/dist/assets/chunk-3OPIFGDE-a_QAVzsM.js +62 -0
  73. package/dist/assets/chunk-4BX2VUAB-DZj4_o2K.js +1 -0
  74. package/dist/assets/chunk-55IACEB6-C7hP08Mf.js +1 -0
  75. package/dist/assets/chunk-5ZQYHXKU-DBQ_7Zc2.js +2 -0
  76. package/dist/assets/chunk-6U3AYISY-C6-Mtja1.js +12 -0
  77. package/dist/assets/chunk-727SXJPM-BVNP_kQ-.js +206 -0
  78. package/dist/assets/chunk-AGHRB4JF-DrBKq3qz.js +1 -0
  79. package/dist/assets/chunk-AQP2D5EJ-0N6k4ROT.js +231 -0
  80. package/dist/assets/chunk-BSJP7CBP-b8olRIQO.js +1 -0
  81. package/dist/assets/chunk-CSCIHK7Q-B5j-yHKS.js +124 -0
  82. package/dist/assets/chunk-EIO257PC-C6qii-N9.js +22 -0
  83. package/dist/assets/chunk-FMBD7UC4-CBBZh2UU.js +15 -0
  84. package/dist/assets/chunk-K2UTITRG-Cx4xt2xV.js +35 -0
  85. package/dist/assets/chunk-KSCS5N6A-Dwg0HTxH.js +10 -0
  86. package/dist/assets/chunk-L5ZTLDWV-BPuCpePB.js +1 -0
  87. package/dist/assets/chunk-LZXEDZCA-CvLuVK3G.js +2 -0
  88. package/dist/assets/chunk-ND2GUHAM-CWJPhGEg.js +1 -0
  89. package/dist/assets/chunk-NNHCCRGN-DlpIbxXb.js +159 -0
  90. package/dist/assets/chunk-NZK2D7GU-DuaLWEa1.js +1 -0
  91. package/dist/assets/chunk-O5CBEL6O-dK2KeDfH.js +70 -0
  92. package/dist/assets/chunk-QZHKN3VN-4Bf82riF.js +1 -0
  93. package/dist/assets/chunk-SRAX5OIU-BhbLEiib.js +1 -0
  94. package/dist/assets/chunk-WU5MYG2G-DLkui5D2.js +1 -0
  95. package/dist/assets/chunk-XPW4576I-BvXQTKbm.js +32 -0
  96. package/dist/assets/chunk-Z3N5DIM6-D9TMVU7m.js +1 -0
  97. package/dist/assets/chunk-ZUYEQ4TG-BzFOpW--.js +7 -0
  98. package/dist/assets/classDiagram-4FO5ZUOK-DKj6zlra.js +1 -0
  99. package/dist/assets/classDiagram-v2-Q7XG4LA2-DKj6zlra.js +1 -0
  100. package/dist/assets/compare-BA1y8ff-.css +1 -0
  101. package/dist/assets/compare-QN3IusOj.js +1 -0
  102. package/dist/assets/compiler-qgJWLAtm.js +1 -0
  103. package/dist/assets/core-S5OLGxXP.js +3 -0
  104. package/dist/assets/cose-bilkent-S5V4N54A-CslZOqNN.js +1 -0
  105. package/dist/assets/cpp-V0F2hNk9.js +1 -0
  106. package/dist/assets/cs-CZ-2BRQDIVT-BRw0NNL_.js +11 -0
  107. package/dist/assets/csharp-GZmu99Fo.js +1 -0
  108. package/dist/assets/css-D5l_8KUR.js +1 -0
  109. package/dist/assets/cytoscape.esm-C8YCVR3_.js +321 -0
  110. package/dist/assets/da-DK-5WZEPLOC-q5u_UoZe.js +5 -0
  111. package/dist/assets/dagre-BM42HDAG-D6fpH9H3.js +4 -0
  112. package/dist/assets/dagre-Bx709z4p.js +1 -0
  113. package/dist/assets/de-DE-XR44H4JA-B79lsSt9.js +8 -0
  114. package/dist/assets/defaultLocale-C8Fc0cco.js +1 -0
  115. package/dist/assets/diagram-2AECGRRQ-DGviV3zF.js +43 -0
  116. package/dist/assets/diagram-5GNKFQAL-D8edmK5r.js +10 -0
  117. package/dist/assets/diagram-KO2AKTUF-DonC_-9l.js +3 -0
  118. package/dist/assets/diagram-LMA3HP47-T0-OD5uV.js +24 -0
  119. package/dist/assets/diagram-OG6HWLK6-BsRJiZE3.js +24 -0
  120. package/dist/assets/diff-CJb8JxGC.js +1 -0
  121. package/dist/assets/directory-open-01563666-D4xXyWb_.js +1 -0
  122. package/dist/assets/directory-open-4ed118d0-1i309Asm.js +1 -0
  123. package/dist/assets/dist-ND9DUPs_.js +1 -0
  124. package/dist/assets/dist-S-2Hyh3N.js +1 -0
  125. package/dist/assets/dist-jshluroQ.js +27 -0
  126. package/dist/assets/docx-preview-CAHEyNQy.js +20 -0
  127. package/dist/assets/drawing-B3sCN7BX.js +2 -0
  128. package/dist/assets/ebook-DDycOGR3.js +2 -0
  129. package/dist/assets/eda-JxVOVy9j.js +2 -0
  130. package/dist/assets/el-GR-BZB4AONW-DVV0CNhT.js +10 -0
  131. package/dist/assets/email-D9tCfCzQ.js +2 -0
  132. package/dist/assets/en-B4ZKOASM-CpbJugBW.js +1 -0
  133. package/dist/assets/erDiagram-TEJ5UH35-O-dDoXsU.js +85 -0
  134. package/dist/assets/es-ES-U4NZUMDT-DUvN9FXg.js +9 -0
  135. package/dist/assets/eu-ES-A7QVB2H4-DV6UAZB_.js +11 -0
  136. package/dist/assets/eventmodeling-FCH6USID-BONfeu8r.js +1 -0
  137. package/dist/assets/fa-IR-HGAKTJCU-0ql2xhuq.js +8 -0
  138. package/dist/assets/fflate.module-BIQmJeC9.js +1 -0
  139. package/dist/assets/fi-FI-Z5N7JZ37-CxtRUMtw.js +6 -0
  140. package/dist/assets/file-open-002ab408-BHUWm0Sh.js +1 -0
  141. package/dist/assets/file-open-7c801643-DZtJT5zp.js +1 -0
  142. package/dist/assets/file-save-3189631c-CO9S4HFW.js +1 -0
  143. package/dist/assets/file-save-745eba88-Bwdfz6OZ.js +1 -0
  144. package/dist/assets/flowDiagram-I6XJVG4X-DsWkZiFB.js +162 -0
  145. package/dist/assets/fr-FR-RHASNOE6-CLi1nCBA.js +9 -0
  146. package/dist/assets/ganttDiagram-6RSMTGT7-r5IfYmu1.js +292 -0
  147. package/dist/assets/gitGraph-WXDBUCRP-BPjRwtiT.js +1 -0
  148. package/dist/assets/gitGraphDiagram-PVQCEYII-DGYT-2sl.js +106 -0
  149. package/dist/assets/gl-ES-HMX3MZ6V-NMLOwshd.js +10 -0
  150. package/dist/assets/global-compiler-D1EEBbpA.js +1 -0
  151. package/dist/assets/global-renderer-AKzBLvRw.js +1 -0
  152. package/dist/assets/go-B-PCS5zA.js +1 -0
  153. package/dist/assets/graphlib-B8gBHxth.js +1 -0
  154. package/dist/assets/he-IL-6SHJWFNN-BWPkP_3r.js +10 -0
  155. package/dist/assets/hi-IN-IWLTKZ5I-KNyxys-k.js +4 -0
  156. package/dist/assets/hu-HU-A5ZG7DT2-BjcxkVW9.js +7 -0
  157. package/dist/assets/id-ID-SAP4L64H-B-oUkzcH.js +10 -0
  158. package/dist/assets/image-6zdrB4g6.js +2 -0
  159. package/dist/assets/image-GAAHSSAO-7tK5sChZ.js +1 -0
  160. package/dist/assets/image-blob-reduce.esm-NzmDxm1v.js +2 -0
  161. package/dist/assets/info-J43DQDTF-sQY7EXUc.js +1 -0
  162. package/dist/assets/infoDiagram-5YYISTIA-Dzg1KIdJ.js +2 -0
  163. package/dist/assets/ini-B1CroMsf.js +1 -0
  164. package/dist/assets/init-D6jRqBbL.js +1 -0
  165. package/dist/assets/ishikawaDiagram-YF4QCWOH-C4gAmRlT.js +70 -0
  166. package/dist/assets/it-IT-JPQ66NNP-Bwud0QsX.js +11 -0
  167. package/dist/assets/ja-JP-DBVTYXUO-DgNQ5bjg.js +8 -0
  168. package/dist/assets/java-ChVphriW.js +1 -0
  169. package/dist/assets/javascript-w9aIBC1S.js +1 -0
  170. package/dist/assets/journeyDiagram-JHISSGLW-ofw85AZe.js +139 -0
  171. package/dist/assets/json-DS4EA3dC.js +1 -0
  172. package/dist/assets/jszip.min-C7VJhIfM.js +2 -0
  173. package/dist/assets/kaa-6HZHGXH3-BMz8LTXv.js +1 -0
  174. package/dist/assets/kab-KAB-ZGHBKWFO-B9w0Zir8.js +8 -0
  175. package/dist/assets/kanban-definition-UN3LZRKU-CljG07f4.js +89 -0
  176. package/dist/assets/katex-Vhh-h91d.js +257 -0
  177. package/dist/assets/kk-KZ-P5N5QNE5-2tUcaoKh.js +1 -0
  178. package/dist/assets/km-KH-HSX4SM5Z-_kaSqGhJ.js +11 -0
  179. package/dist/assets/ko-KR-MTYHY66A-CIjaox2B.js +9 -0
  180. package/dist/assets/ku-TR-6OUDTVRD-CkLMAwgC.js +9 -0
  181. package/dist/assets/lib-CxFoY_GP.js +6 -0
  182. package/dist/assets/libarchive-DknIq1tb.js +1 -0
  183. package/dist/assets/libarchive-DxGirPmi.wasm +0 -0
  184. package/dist/assets/linear-DAeDjlp3.js +1 -0
  185. package/dist/assets/logo-DG62cSZK.png +0 -0
  186. package/dist/assets/lt-LT-XHIRWOB4-BsH7UAds.js +3 -0
  187. package/dist/assets/lv-LV-5QDEKY6T-DH8to9BS.js +7 -0
  188. package/dist/assets/main-B8S7RFzE.js +4 -0
  189. package/dist/assets/main-BZ1u3qpM.css +1 -0
  190. package/dist/assets/markdown-C8bVcNXx.js +1 -0
  191. package/dist/assets/md-OHaN-Ra2.js +2 -0
  192. package/dist/assets/mermaid-parser.core-DX-qibXo.js +4 -0
  193. package/dist/assets/mindmap-definition-RKZ34NQL-5NZ4x9hJ.js +96 -0
  194. package/dist/assets/model-B6Ua5SnP.js +2 -0
  195. package/dist/assets/mp4-Dho29Zd7.js +1 -0
  196. package/dist/assets/mr-IN-CRQNXWMA-BrKaFNSo.js +13 -0
  197. package/dist/assets/my-MM-5M5IBNSE-BZSEmctA.js +1 -0
  198. package/dist/assets/nb-NO-T6EIAALU-6a9gavJA.js +10 -0
  199. package/dist/assets/nestedRender-vUCW8qgY.js +3 -0
  200. package/dist/assets/nl-NL-IS3SIHDZ-uxPhLMYz.js +8 -0
  201. package/dist/assets/nn-NO-6E72VCQL-D4PNCwHO.js +8 -0
  202. package/dist/assets/oc-FR-POXYY2M6-C7kpaHdZ.js +8 -0
  203. package/dist/assets/ofd-CM51fmds.js +2 -0
  204. package/dist/assets/ofd-CsX4S_yH.js +6 -0
  205. package/dist/assets/ordinal-hYBb2elL.js +1 -0
  206. package/dist/assets/pa-IN-N4M65BXN-DudflUsb.js +4 -0
  207. package/dist/assets/package-BuR3Qm_h.css +1 -0
  208. package/dist/assets/package-DbhUOWuO.js +296 -0
  209. package/dist/assets/packet-YPE3B663-zJFiRlih.js +1 -0
  210. package/dist/assets/pdf-CZTifdsT.js +2 -0
  211. package/dist/assets/percentages-BXMCSKIN-DuKjcyNK.js +1 -0
  212. package/dist/assets/php-5k5YNuRS.js +2 -0
  213. package/dist/assets/pica-W1nY7k4k.js +2 -0
  214. package/dist/assets/pie-CZr-MxNa.js +1 -0
  215. package/dist/assets/pie-LRSECV5Y-ChrxPon2.js +1 -0
  216. package/dist/assets/pieDiagram-4H26LBE5-rqS9xOI6.js +30 -0
  217. package/dist/assets/pl-PL-T2D74RX3-BjwyDbo2.js +9 -0
  218. package/dist/assets/postal-mime-kkzCFkih.js +29 -0
  219. package/dist/assets/pptx-HCi3sDR0.js +2 -0
  220. package/dist/assets/printLayout-D2pf0W9y.js +24 -0
  221. package/dist/assets/prod-CAexHIHC.js +149 -0
  222. package/dist/assets/pt-BR-5N22H2LF-dhO4g53z.js +9 -0
  223. package/dist/assets/pt-PT-UZXXM6DQ-B0FVw5E6.js +9 -0
  224. package/dist/assets/python-DwhXSSGr.js +1 -0
  225. package/dist/assets/quadrantDiagram-W4KKPZXB-CvbA748i.js +7 -0
  226. package/dist/assets/radar-GUYGQ44K-Ch58tAlJ.js +1 -0
  227. package/dist/assets/reactivity.esm-bundler-Bfmlzvr-.js +1 -0
  228. package/dist/assets/renderer-69XMfifI.js +1 -0
  229. package/dist/assets/requirementDiagram-4Y6WPE33-Ek_Wtky1.js +84 -0
  230. package/dist/assets/ro-RO-JPDTUUEW-CRyQ9zJm.js +11 -0
  231. package/dist/assets/rough.esm-CIepY_sA.js +1 -0
  232. package/dist/assets/roundRect-D01gJrlt.js +1 -0
  233. package/dist/assets/ru-RU-B4JR7IUQ-Ccj6OqLf.js +9 -0
  234. package/dist/assets/runtime-core.esm-bundler-CR6OOEFf.js +1 -0
  235. package/dist/assets/rust-Dk33Kfe-.js +1 -0
  236. package/dist/assets/sankeyDiagram-5OEKKPKP-D3gZ6xE7.js +40 -0
  237. package/dist/assets/sequenceDiagram-3UESZ5HK-C5489xFA.js +162 -0
  238. package/dist/assets/si-LK-N5RQ5JYF-BwS2qaTv.js +1 -0
  239. package/dist/assets/sk-SK-C5VTKIMK-ly1tHoOw.js +6 -0
  240. package/dist/assets/sl-SI-NN7IZMDC-iZiOFm2y.js +6 -0
  241. package/dist/assets/sql-DWRKyvJ-.js +1 -0
  242. package/dist/assets/src-BrOGWJpF.js +1 -0
  243. package/dist/assets/src-D_n3k0l_.js +5 -0
  244. package/dist/assets/stateDiagram-AJRCARHV-1hoVbE34.js +1 -0
  245. package/dist/assets/stateDiagram-v2-BHNVJYJU-CZmypPHd.js +1 -0
  246. package/dist/assets/style-x1XGuNl0.css +1 -0
  247. package/dist/assets/subset-shared.chunk-CK2m59fy.js +1 -0
  248. package/dist/assets/subset-worker.chunk-B5G7hWyg.js +1 -0
  249. package/dist/assets/sv-SE-XGPEYMSR-BNpkY1PO.js +10 -0
  250. package/dist/assets/ta-IN-2NMHFXQM-DsldkrWk.js +9 -0
  251. package/dist/assets/text-CMp0EW11.js +2 -0
  252. package/dist/assets/th-TH-HPSO5L25-AVrKqKOh.js +2 -0
  253. package/dist/assets/three.module-BFsVh7r1.js +4104 -0
  254. package/dist/assets/time-B8nkukJS.js +1 -0
  255. package/dist/assets/timeline-definition-PNZ67QCA-CfMKM_FS.js +120 -0
  256. package/dist/assets/tr-TR-DEFEU3FU-DYarL0Oa.js +7 -0
  257. package/dist/assets/treeView-BLDUP644-CGGdcSoP.js +1 -0
  258. package/dist/assets/treemap-LRROVOQU-C3Zg5qig.js +1 -0
  259. package/dist/assets/typescript-BvteI6YB.js +1 -0
  260. package/dist/assets/typst-DOlgRigg.js +2 -0
  261. package/dist/assets/typst_ts_renderer_bg-DRRWm1TP.wasm +0 -0
  262. package/dist/assets/uk-UA-QMV73CPH-D36-a0jl.js +6 -0
  263. package/dist/assets/umd-r51rBtd2.js +2 -0
  264. package/dist/assets/vennDiagram-CIIHVFJN-GrdHiqIf.js +34 -0
  265. package/dist/assets/vi-VN-M7AON7JQ-zdUBY1Fz.js +5 -0
  266. package/dist/assets/wardley-L42UT6IY-ilBO1QYS.js +1 -0
  267. package/dist/assets/wardleyDiagram-YWT4CUSO-Cgr3uPws.js +78 -0
  268. package/dist/assets/wasm-C3ukMqzA.js +1 -0
  269. package/dist/assets/wasm-pack-shim-BShYmbRf.js +1 -0
  270. package/dist/assets/wasm-pack-shim-BnuNh1z7.js +1 -0
  271. package/dist/assets/word-DQCwLNG7.js +150 -0
  272. package/dist/assets/worker-bundle-Dx5mKZOL.js +6 -0
  273. package/dist/assets/worker-ref-BbTnHTC-.js +1 -0
  274. package/dist/assets/xlsx-B1qUDXfb.js +2 -0
  275. package/dist/assets/xlsx-ff7ER-JZ.png +0 -0
  276. package/dist/assets/xml-DasnpDVC.js +1 -0
  277. package/dist/assets/xychartDiagram-2RQKCTM6-BwoaSxOF.js +7 -0
  278. package/dist/assets/yaml-1XF8XcZB.js +1 -0
  279. package/dist/assets/zh-CN-LNUGB5OW-WQ7J6JkH.js +10 -0
  280. package/dist/assets/zh-HK-E62DVLB3-BoGXaBos.js +1 -0
  281. package/dist/assets/zh-TW-RAJ6MFWO-DZQOFop7.js +9 -0
  282. package/dist/compare.html +21 -0
  283. package/dist/example/README.md +137 -0
  284. package/dist/example/SOURCES.md +49 -0
  285. package/dist/example/app.log +13 -0
  286. package/dist/example/archive.tar.gz +0 -0
  287. package/dist/example/archive.zip +0 -0
  288. package/dist/example/audio.mp3 +0 -0
  289. package/dist/example/audio.ogg +0 -0
  290. package/dist/example/book.epub +0 -0
  291. package/dist/example/book.umd +0 -0
  292. package/dist/example/change.diff +40 -0
  293. package/dist/example/code.cjs +38 -0
  294. package/dist/example/code.css +64 -0
  295. package/dist/example/code.java +55 -0
  296. package/dist/example/code.js +55 -0
  297. package/dist/example/code.jsx +43 -0
  298. package/dist/example/code.mjs +36 -0
  299. package/dist/example/code.py +56 -0
  300. package/dist/example/code.ts +78 -0
  301. package/dist/example/code.tsx +36 -0
  302. package/dist/example/component.vue +68 -0
  303. package/dist/example/config.yaml +48 -0
  304. package/dist/example/config.yml +25 -0
  305. package/dist/example/data.json +50 -0
  306. package/dist/example/data.xml +47 -0
  307. package/dist/example/drawing.dxf +22186 -0
  308. package/dist/example/embedded.html +316 -0
  309. package/dist/example/excel.fods +0 -0
  310. package/dist/example/excel.numbers +0 -0
  311. package/dist/example/excel.ods +0 -0
  312. package/dist/example/excel.xls +0 -0
  313. package/dist/example/excel.xlsb +0 -0
  314. package/dist/example/excel.xlsm +0 -0
  315. package/dist/example/excel.xlsx +0 -0
  316. package/dist/example/flow.excalidraw +1 -0
  317. package/dist/example/index.php +44 -0
  318. package/dist/example/main.c +39 -0
  319. package/dist/example/main.cpp +50 -0
  320. package/dist/example/main.go +55 -0
  321. package/dist/example/main.h +22 -0
  322. package/dist/example/main.hpp +28 -0
  323. package/dist/example/main.rs +36 -0
  324. package/dist/example/markdown.md +84 -0
  325. package/dist/example/model.gltf +66 -0
  326. package/dist/example/model.obj +10 -0
  327. package/dist/example/model.ply +18 -0
  328. package/dist/example/model.step +9 -0
  329. package/dist/example/model.stl +30 -0
  330. package/dist/example/module.cc +36 -0
  331. package/dist/example/notes.markdown +15 -0
  332. package/dist/example/ofd.ofd +0 -0
  333. package/dist/example/page.htm +29 -0
  334. package/dist/example/page.html +33 -0
  335. package/dist/example/pdf.pdf +9125 -3
  336. package/dist/example/pic.bmp +0 -0
  337. package/dist/example/pic.gif +0 -0
  338. package/dist/example/pic.jpeg +0 -0
  339. package/dist/example/pic.jpg +0 -0
  340. package/dist/example/pic.png +0 -0
  341. package/dist/example/pic.tif +0 -0
  342. package/dist/example/pic.tiff +0 -0
  343. package/dist/example/pic.webp +0 -0
  344. package/dist/example/ppt.pptx +0 -0
  345. package/dist/example/process.drawio +249 -0
  346. package/dist/example/program.cs +42 -0
  347. package/dist/example/query.sql +30 -0
  348. package/dist/example/report.typ +90 -0
  349. package/dist/example/sample.dra +0 -0
  350. package/dist/example/sample.dwg +0 -0
  351. package/dist/example/sample.eml +46 -0
  352. package/dist/example/sample.msg +0 -0
  353. package/dist/example/sample.olb +0 -0
  354. package/dist/example/samples/apache/blocks_and_tables.dwf +0 -0
  355. package/dist/example/samples/autodesk/house.dwfx +0 -0
  356. package/dist/example/samples/autodesk/robot-arm.dwfx +0 -0
  357. package/dist/example/script.bash +36 -0
  358. package/dist/example/script.sh +24 -0
  359. package/dist/example/settings.ini +23 -0
  360. package/dist/example/table.csv +4 -0
  361. package/dist/example/template.dot +0 -0
  362. package/dist/example/test.doc +0 -0
  363. package/dist/example/text.txt +3 -0
  364. package/dist/example/vector.svg +6 -0
  365. package/dist/example/video.mp4 +0 -0
  366. package/dist/example/word.docx +0 -0
  367. package/dist/index.html +302 -0
  368. package/dist/vendor/libarchive/libarchive.wasm +0 -0
  369. package/dist/vendor/libarchive/worker-bundle.js +6 -0
  370. package/dist/wasm/cad/dwfv-render.wasm +0 -0
  371. package/dist/wasm/cad/dwg-worker.js +24 -0
  372. package/dist/wasm/cad/libredwg-web.js +15 -0
  373. package/dist/wasm/cad/libredwg-web.wasm +0 -0
  374. package/package.json +118 -42
  375. package/.vscode/extensions.json +0 -3
  376. package/dist/components/ImageViewer.js +0 -1898
  377. package/dist/components/MarkdownViewer.js +0 -1577
  378. package/dist/components/PdfView.js +0 -21660
  379. package/dist/components/PptxRender.js +0 -21165
  380. package/dist/components/XlsxTable.js +0 -69881
  381. package/dist/components/_commonjs-dynamic-modules.js +0 -6
  382. package/dist/components/_commonjsHelpers.js +0 -36
  383. package/dist/components/docx-preview.min.js +0 -5287
  384. package/dist/components/index.js +0 -1717
  385. package/dist/components/worker-ref.js +0 -21
  386. package/dist/index.mjs +0 -6
  387. package/dist/index.umd.js +0 -436
  388. package/dist/src/package/common/type.d.ts +0 -30
  389. package/dist/src/package/common/util.d.ts +0 -5
  390. package/dist/src/package/common/worker-ref.d.ts +0 -12
  391. package/dist/src/package/components/FileViewer/FileViewer.vue.d.ts +0 -25
  392. package/dist/src/package/components/FileViewer/index.d.ts +0 -2
  393. package/dist/src/package/components/FileViewer/util.d.ts +0 -2
  394. package/dist/src/package/index.d.ts +0 -12
  395. package/dist/src/package/use/index.d.ts +0 -1
  396. package/dist/src/package/use/worker.d.ts +0 -24
  397. package/dist/src/package/vendors/docx/index.d.ts +0 -4
  398. package/dist/src/package/vendors/image/ImageViewer.vue.d.ts +0 -13
  399. package/dist/src/package/vendors/image/index.d.ts +0 -4
  400. package/dist/src/package/vendors/md/MarkdownViewer.vue.d.ts +0 -13
  401. package/dist/src/package/vendors/md/index.d.ts +0 -4
  402. package/dist/src/package/vendors/mp4/index.d.ts +0 -4
  403. package/dist/src/package/vendors/pdf/PdfView.vue.d.ts +0 -13
  404. package/dist/src/package/vendors/pdf/index.d.ts +0 -1
  405. package/dist/src/package/vendors/pdf/worker/index.d.ts +0 -4
  406. package/dist/src/package/vendors/pptx/PptxRender.vue.d.ts +0 -81
  407. package/dist/src/package/vendors/pptx/index.d.ts +0 -6
  408. package/dist/src/package/vendors/pptx/options.d.ts +0 -39
  409. package/dist/src/package/vendors/pptx/support/chart.d.ts +0 -4
  410. package/dist/src/package/vendors/pptx/worker/index.d.ts +0 -4
  411. package/dist/src/package/vendors/renders.d.ts +0 -3
  412. package/dist/src/package/vendors/text/CodeViewer.vue.d.ts +0 -13
  413. package/dist/src/package/vendors/text/index.d.ts +0 -6
  414. package/dist/src/package/vendors/xlsx/XlsxTable.vue.d.ts +0 -21
  415. package/dist/src/package/vendors/xlsx/index.d.ts +0 -5
  416. package/dist/src/package/vendors/xlsx/render.d.ts +0 -6
  417. package/dist/src/package/vendors/xlsx/util.d.ts +0 -8
  418. package/dist/src/package/vendors/xlsx/worker/index.d.ts +0 -6
  419. package/dist/src/package/vendors/xlsx/worker/xls/SheetJsModel.d.ts +0 -36
  420. package/dist/src/package/vendors/xlsx/worker/xls/index.d.ts +0 -4
  421. package/dist/src/package/vendors/xlsx/worker/xlsx/ExcelJsModel.d.ts +0 -39
  422. package/dist/src/package/vendors/xlsx/worker/xlsx/color.d.ts +0 -2
  423. package/dist/src/package/vendors/xlsx/worker/xlsx/context.d.ts +0 -7
  424. package/dist/src/package/vendors/xlsx/worker/xlsx/index.d.ts +0 -4
  425. package/dist/src/package/vendors/xlsx/worker/xlsx/util.d.ts +0 -10
  426. package/dist/style.css +0 -57
  427. package/dist/worker/pdf.worker.js +0 -66
  428. package/dist/worker/pptx.worker.js +0 -21
  429. package/dist/worker/sheet.worker.js +0 -38
  430. package/dist/worker/xlsx.worker.js +0 -65
@@ -1,1898 +0,0 @@
1
- import { defineComponent as Ee, ref as Ve, watch as yt, nextTick as wt, onMounted as Fe, onUnmounted as Me, openBlock as ft, createElementBlock as St, renderSlot as Ye, computed as We, createBlock as Xe, unref as Tt, withCtx as qe, Fragment as He, renderList as Ue } from "vue";
2
- import { _ as Be } from "./index.js";
3
- /*!
4
- * Viewer.js v1.11.3
5
- * https://fengyuanchen.github.io/viewerjs
6
- *
7
- * Copyright 2015-present Chen Fengyuan
8
- * Released under the MIT license
9
- *
10
- * Date: 2023-03-05T07:01:17.741Z
11
- */
12
- function jt(e, t) {
13
- var i = Object.keys(e);
14
- if (Object.getOwnPropertySymbols) {
15
- var r = Object.getOwnPropertySymbols(e);
16
- t && (r = r.filter(function(n) {
17
- return Object.getOwnPropertyDescriptor(e, n).enumerable;
18
- })), i.push.apply(i, r);
19
- }
20
- return i;
21
- }
22
- function Ct(e) {
23
- for (var t = 1; t < arguments.length; t++) {
24
- var i = arguments[t] != null ? arguments[t] : {};
25
- t % 2 ? jt(Object(i), !0).forEach(function(r) {
26
- Ze(e, r, i[r]);
27
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(i)) : jt(Object(i)).forEach(function(r) {
28
- Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(i, r));
29
- });
30
- }
31
- return e;
32
- }
33
- function Ot(e) {
34
- return Ot = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
35
- return typeof t;
36
- } : function(t) {
37
- return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
38
- }, Ot(e);
39
- }
40
- function Ke(e, t) {
41
- if (!(e instanceof t))
42
- throw new TypeError("Cannot call a class as a function");
43
- }
44
- function Vt(e, t) {
45
- for (var i = 0; i < t.length; i++) {
46
- var r = t[i];
47
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, _e(r.key), r);
48
- }
49
- }
50
- function Ge(e, t, i) {
51
- return t && Vt(e.prototype, t), i && Vt(e, i), Object.defineProperty(e, "prototype", {
52
- writable: !1
53
- }), e;
54
- }
55
- function Ze(e, t, i) {
56
- return t = _e(t), t in e ? Object.defineProperty(e, t, {
57
- value: i,
58
- enumerable: !0,
59
- configurable: !0,
60
- writable: !0
61
- }) : e[t] = i, e;
62
- }
63
- function Je(e, t) {
64
- if (typeof e != "object" || e === null)
65
- return e;
66
- var i = e[Symbol.toPrimitive];
67
- if (i !== void 0) {
68
- var r = i.call(e, t || "default");
69
- if (typeof r != "object")
70
- return r;
71
- throw new TypeError("@@toPrimitive must return a primitive value.");
72
- }
73
- return (t === "string" ? String : Number)(e);
74
- }
75
- function _e(e) {
76
- var t = Je(e, "string");
77
- return typeof t == "symbol" ? t : String(t);
78
- }
79
- var Ft = {
80
- /**
81
- * Enable a modal backdrop, specify `static` for a backdrop
82
- * which doesn't close the modal on click.
83
- * @type {boolean}
84
- */
85
- backdrop: !0,
86
- /**
87
- * Show the button on the top-right of the viewer.
88
- * @type {boolean}
89
- */
90
- button: !0,
91
- /**
92
- * Show the navbar.
93
- * @type {boolean | number}
94
- */
95
- navbar: !0,
96
- /**
97
- * Specify the visibility and the content of the title.
98
- * @type {boolean | number | Function | Array}
99
- */
100
- title: !0,
101
- /**
102
- * Show the toolbar.
103
- * @type {boolean | number | Object}
104
- */
105
- toolbar: !0,
106
- /**
107
- * Custom class name(s) to add to the viewer's root element.
108
- * @type {string}
109
- */
110
- className: "",
111
- /**
112
- * Define where to put the viewer in modal mode.
113
- * @type {string | Element}
114
- */
115
- container: "body",
116
- /**
117
- * Filter the images for viewing. Return true if the image is viewable.
118
- * @type {Function}
119
- */
120
- filter: null,
121
- /**
122
- * Enable to request fullscreen when play.
123
- * {@link https://developer.mozilla.org/en-US/docs/Web/API/FullscreenOptions}
124
- * @type {boolean|FullscreenOptions}
125
- */
126
- fullscreen: !0,
127
- /**
128
- * Define the extra attributes to inherit from the original image.
129
- * @type {Array}
130
- */
131
- inheritedAttributes: ["crossOrigin", "decoding", "isMap", "loading", "referrerPolicy", "sizes", "srcset", "useMap"],
132
- /**
133
- * Define the initial coverage of the viewing image.
134
- * @type {number}
135
- */
136
- initialCoverage: 0.9,
137
- /**
138
- * Define the initial index of the image for viewing.
139
- * @type {number}
140
- */
141
- initialViewIndex: 0,
142
- /**
143
- * Enable inline mode.
144
- * @type {boolean}
145
- */
146
- inline: !1,
147
- /**
148
- * The amount of time to delay between automatically cycling an image when playing.
149
- * @type {number}
150
- */
151
- interval: 5e3,
152
- /**
153
- * Enable keyboard support.
154
- * @type {boolean}
155
- */
156
- keyboard: !0,
157
- /**
158
- * Focus the viewer when initialized.
159
- * @type {boolean}
160
- */
161
- focus: !0,
162
- /**
163
- * Indicate if show a loading spinner when load image or not.
164
- * @type {boolean}
165
- */
166
- loading: !0,
167
- /**
168
- * Indicate if enable loop viewing or not.
169
- * @type {boolean}
170
- */
171
- loop: !0,
172
- /**
173
- * Min width of the viewer in inline mode.
174
- * @type {number}
175
- */
176
- minWidth: 200,
177
- /**
178
- * Min height of the viewer in inline mode.
179
- * @type {number}
180
- */
181
- minHeight: 100,
182
- /**
183
- * Enable to move the image.
184
- * @type {boolean}
185
- */
186
- movable: !0,
187
- /**
188
- * Enable to rotate the image.
189
- * @type {boolean}
190
- */
191
- rotatable: !0,
192
- /**
193
- * Enable to scale the image.
194
- * @type {boolean}
195
- */
196
- scalable: !0,
197
- /**
198
- * Enable to zoom the image.
199
- * @type {boolean}
200
- */
201
- zoomable: !0,
202
- /**
203
- * Enable to zoom the current image by dragging on the touch screen.
204
- * @type {boolean}
205
- */
206
- zoomOnTouch: !0,
207
- /**
208
- * Enable to zoom the image by wheeling mouse.
209
- * @type {boolean}
210
- */
211
- zoomOnWheel: !0,
212
- /**
213
- * Enable to slide to the next or previous image by swiping on the touch screen.
214
- * @type {boolean}
215
- */
216
- slideOnTouch: !0,
217
- /**
218
- * Indicate if toggle the image size between its natural size
219
- * and initial size when double click on the image or not.
220
- * @type {boolean}
221
- */
222
- toggleOnDblclick: !0,
223
- /**
224
- * Show the tooltip with image ratio (percentage) when zoom in or zoom out.
225
- * @type {boolean}
226
- */
227
- tooltip: !0,
228
- /**
229
- * Enable CSS3 Transition for some special elements.
230
- * @type {boolean}
231
- */
232
- transition: !0,
233
- /**
234
- * Define the CSS `z-index` value of viewer in modal mode.
235
- * @type {number}
236
- */
237
- zIndex: 2015,
238
- /**
239
- * Define the CSS `z-index` value of viewer in inline mode.
240
- * @type {number}
241
- */
242
- zIndexInline: 0,
243
- /**
244
- * Define the ratio when zoom the image by wheeling mouse.
245
- * @type {number}
246
- */
247
- zoomRatio: 0.1,
248
- /**
249
- * Define the min ratio of the image when zoom out.
250
- * @type {number}
251
- */
252
- minZoomRatio: 0.01,
253
- /**
254
- * Define the max ratio of the image when zoom in.
255
- * @type {number}
256
- */
257
- maxZoomRatio: 100,
258
- /**
259
- * Define where to get the original image URL for viewing.
260
- * @type {string | Function}
261
- */
262
- url: "src",
263
- /**
264
- * Event shortcuts.
265
- * @type {Function}
266
- */
267
- ready: null,
268
- show: null,
269
- shown: null,
270
- hide: null,
271
- hidden: null,
272
- view: null,
273
- viewed: null,
274
- move: null,
275
- moved: null,
276
- rotate: null,
277
- rotated: null,
278
- scale: null,
279
- scaled: null,
280
- zoom: null,
281
- zoomed: null,
282
- play: null,
283
- stop: null
284
- }, Qe = '<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>', pt = typeof window < "u" && typeof window.document < "u", V = pt ? window : {}, G = pt && V.document.documentElement ? "ontouchstart" in V.document.documentElement : !1, Lt = pt ? "PointerEvent" in V : !1, v = "viewer", dt = "move", Se = "switch", it = "zoom", ot = "".concat(v, "-active"), ti = "".concat(v, "-close"), vt = "".concat(v, "-fade"), It = "".concat(v, "-fixed"), ei = "".concat(v, "-fullscreen"), Mt = "".concat(v, "-fullscreen-exit"), Y = "".concat(v, "-hide"), ii = "".concat(v, "-hide-md-down"), ri = "".concat(v, "-hide-sm-down"), ni = "".concat(v, "-hide-xs-down"), L = "".concat(v, "-in"), rt = "".concat(v, "-invisible"), Z = "".concat(v, "-loading"), ai = "".concat(v, "-move"), Yt = "".concat(v, "-open"), q = "".concat(v, "-show"), O = "".concat(v, "-transition"), J = "click", At = "dblclick", Wt = "dragstart", Xt = "focusin", qt = "keydown", $ = "load", W = "error", si = G ? "touchend touchcancel" : "mouseup", oi = G ? "touchmove" : "mousemove", li = G ? "touchstart" : "mousedown", Ht = Lt ? "pointerdown" : li, Ut = Lt ? "pointermove" : oi, Bt = Lt ? "pointerup pointercancel" : si, Kt = "resize", k = "transitionend", Gt = "wheel", Zt = "ready", Jt = "show", Qt = "shown", te = "hide", ee = "hidden", ie = "view", nt = "viewed", re = "move", ne = "moved", ae = "rotate", se = "rotated", oe = "scale", le = "scaled", ue = "zoom", he = "zoomed", ce = "play", fe = "stop", mt = "".concat(v, "Action"), $t = /\s\s*/, lt = ["zoom-in", "zoom-out", "one-to-one", "reset", "prev", "play", "next", "rotate-left", "rotate-right", "flip-horizontal", "flip-vertical"];
285
- function at(e) {
286
- return typeof e == "string";
287
- }
288
- var ui = Number.isNaN || V.isNaN;
289
- function _(e) {
290
- return typeof e == "number" && !ui(e);
291
- }
292
- function U(e) {
293
- return typeof e > "u";
294
- }
295
- function Q(e) {
296
- return Ot(e) === "object" && e !== null;
297
- }
298
- var hi = Object.prototype.hasOwnProperty;
299
- function B(e) {
300
- if (!Q(e))
301
- return !1;
302
- try {
303
- var t = e.constructor, i = t.prototype;
304
- return t && i && hi.call(i, "isPrototypeOf");
305
- } catch {
306
- return !1;
307
- }
308
- }
309
- function p(e) {
310
- return typeof e == "function";
311
- }
312
- function y(e, t) {
313
- if (e && p(t))
314
- if (Array.isArray(e) || _(e.length)) {
315
- var i = e.length, r;
316
- for (r = 0; r < i && t.call(e, e[r], r, e) !== !1; r += 1)
317
- ;
318
- } else
319
- Q(e) && Object.keys(e).forEach(function(n) {
320
- t.call(e, e[n], n, e);
321
- });
322
- return e;
323
- }
324
- var C = Object.assign || function(t) {
325
- for (var i = arguments.length, r = new Array(i > 1 ? i - 1 : 0), n = 1; n < i; n++)
326
- r[n - 1] = arguments[n];
327
- return Q(t) && r.length > 0 && r.forEach(function(a) {
328
- Q(a) && Object.keys(a).forEach(function(s) {
329
- t[s] = a[s];
330
- });
331
- }), t;
332
- }, ci = /^(?:width|height|left|top|marginLeft|marginTop)$/;
333
- function z(e, t) {
334
- var i = e.style;
335
- y(t, function(r, n) {
336
- ci.test(n) && _(r) && (r += "px"), i[n] = r;
337
- });
338
- }
339
- function fi(e) {
340
- return at(e) ? e.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;") : e;
341
- }
342
- function H(e, t) {
343
- return !e || !t ? !1 : e.classList ? e.classList.contains(t) : e.className.indexOf(t) > -1;
344
- }
345
- function f(e, t) {
346
- if (!(!e || !t)) {
347
- if (_(e.length)) {
348
- y(e, function(r) {
349
- f(r, t);
350
- });
351
- return;
352
- }
353
- if (e.classList) {
354
- e.classList.add(t);
355
- return;
356
- }
357
- var i = e.className.trim();
358
- i ? i.indexOf(t) < 0 && (e.className = "".concat(i, " ").concat(t)) : e.className = t;
359
- }
360
- }
361
- function m(e, t) {
362
- if (!(!e || !t)) {
363
- if (_(e.length)) {
364
- y(e, function(i) {
365
- m(i, t);
366
- });
367
- return;
368
- }
369
- if (e.classList) {
370
- e.classList.remove(t);
371
- return;
372
- }
373
- e.className.indexOf(t) >= 0 && (e.className = e.className.replace(t, ""));
374
- }
375
- }
376
- function st(e, t, i) {
377
- if (t) {
378
- if (_(e.length)) {
379
- y(e, function(r) {
380
- st(r, t, i);
381
- });
382
- return;
383
- }
384
- i ? f(e, t) : m(e, t);
385
- }
386
- }
387
- var di = /([a-z\d])([A-Z])/g;
388
- function kt(e) {
389
- return e.replace(di, "$1-$2").toLowerCase();
390
- }
391
- function K(e, t) {
392
- return Q(e[t]) ? e[t] : e.dataset ? e.dataset[t] : e.getAttribute("data-".concat(kt(t)));
393
- }
394
- function xt(e, t, i) {
395
- Q(i) ? e[t] = i : e.dataset ? e.dataset[t] = i : e.setAttribute("data-".concat(kt(t)), i);
396
- }
397
- var Oe = function() {
398
- var e = !1;
399
- if (pt) {
400
- var t = !1, i = function() {
401
- }, r = Object.defineProperty({}, "once", {
402
- get: function() {
403
- return e = !0, t;
404
- },
405
- /**
406
- * This setter can fix a `TypeError` in strict mode
407
- * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only}
408
- * @param {boolean} value - The value to set
409
- */
410
- set: function(a) {
411
- t = a;
412
- }
413
- });
414
- V.addEventListener("test", i, r), V.removeEventListener("test", i, r);
415
- }
416
- return e;
417
- }();
418
- function b(e, t, i) {
419
- var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, n = i;
420
- t.trim().split($t).forEach(function(a) {
421
- if (!Oe) {
422
- var s = e.listeners;
423
- s && s[a] && s[a][i] && (n = s[a][i], delete s[a][i], Object.keys(s[a]).length === 0 && delete s[a], Object.keys(s).length === 0 && delete e.listeners);
424
- }
425
- e.removeEventListener(a, n, r);
426
- });
427
- }
428
- function d(e, t, i) {
429
- var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, n = i;
430
- t.trim().split($t).forEach(function(a) {
431
- if (r.once && !Oe) {
432
- var s = e.listeners, l = s === void 0 ? {} : s;
433
- n = function() {
434
- delete l[a][i], e.removeEventListener(a, n, r);
435
- for (var o = arguments.length, u = new Array(o), c = 0; c < o; c++)
436
- u[c] = arguments[c];
437
- i.apply(e, u);
438
- }, l[a] || (l[a] = {}), l[a][i] && e.removeEventListener(a, l[a][i], r), l[a][i] = n, e.listeners = l;
439
- }
440
- e.addEventListener(a, n, r);
441
- });
442
- }
443
- function A(e, t, i, r) {
444
- var n;
445
- return p(Event) && p(CustomEvent) ? n = new CustomEvent(t, Ct({
446
- bubbles: !0,
447
- cancelable: !0,
448
- detail: i
449
- }, r)) : (n = document.createEvent("CustomEvent"), n.initCustomEvent(t, !0, !0, i)), e.dispatchEvent(n);
450
- }
451
- function vi(e) {
452
- var t = e.getBoundingClientRect();
453
- return {
454
- left: t.left + (window.pageXOffset - document.documentElement.clientLeft),
455
- top: t.top + (window.pageYOffset - document.documentElement.clientTop)
456
- };
457
- }
458
- function gt(e) {
459
- var t = e.rotate, i = e.scaleX, r = e.scaleY, n = e.translateX, a = e.translateY, s = [];
460
- _(n) && n !== 0 && s.push("translateX(".concat(n, "px)")), _(a) && a !== 0 && s.push("translateY(".concat(a, "px)")), _(t) && t !== 0 && s.push("rotate(".concat(t, "deg)")), _(i) && i !== 1 && s.push("scaleX(".concat(i, ")")), _(r) && r !== 1 && s.push("scaleY(".concat(r, ")"));
461
- var l = s.length ? s.join(" ") : "none";
462
- return {
463
- WebkitTransform: l,
464
- msTransform: l,
465
- transform: l
466
- };
467
- }
468
- function gi(e) {
469
- return at(e) ? decodeURIComponent(e.replace(/^.*\//, "").replace(/[?&#].*$/, "")) : "";
470
- }
471
- var Et = V.navigator && /(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i.test(V.navigator.userAgent);
472
- function Ie(e, t, i) {
473
- var r = document.createElement("img");
474
- if (e.naturalWidth && !Et)
475
- return i(e.naturalWidth, e.naturalHeight), r;
476
- var n = document.body || document.documentElement;
477
- return r.onload = function() {
478
- i(r.width, r.height), Et || n.removeChild(r);
479
- }, y(t.inheritedAttributes, function(a) {
480
- var s = e.getAttribute(a);
481
- s !== null && r.setAttribute(a, s);
482
- }), r.src = e.src, Et || (r.style.cssText = "left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;", n.appendChild(r)), r;
483
- }
484
- function ut(e) {
485
- switch (e) {
486
- case 2:
487
- return ni;
488
- case 3:
489
- return ri;
490
- case 4:
491
- return ii;
492
- default:
493
- return "";
494
- }
495
- }
496
- function mi(e) {
497
- var t = Ct({}, e), i = [];
498
- return y(e, function(r, n) {
499
- delete t[n], y(t, function(a) {
500
- var s = Math.abs(r.startX - a.startX), l = Math.abs(r.startY - a.startY), h = Math.abs(r.endX - a.endX), o = Math.abs(r.endY - a.endY), u = Math.sqrt(s * s + l * l), c = Math.sqrt(h * h + o * o), g = (c - u) / u;
501
- i.push(g);
502
- });
503
- }), i.sort(function(r, n) {
504
- return Math.abs(r) < Math.abs(n);
505
- }), i[0];
506
- }
507
- function ht(e, t) {
508
- var i = e.pageX, r = e.pageY, n = {
509
- endX: i,
510
- endY: r
511
- };
512
- return t ? n : Ct({
513
- timeStamp: Date.now(),
514
- startX: i,
515
- startY: r
516
- }, n);
517
- }
518
- function pi(e) {
519
- var t = 0, i = 0, r = 0;
520
- return y(e, function(n) {
521
- var a = n.startX, s = n.startY;
522
- t += a, i += s, r += 1;
523
- }), t /= r, i /= r, {
524
- pageX: t,
525
- pageY: i
526
- };
527
- }
528
- var bi = {
529
- render: function() {
530
- this.initContainer(), this.initViewer(), this.initList(), this.renderViewer();
531
- },
532
- initBody: function() {
533
- var t = this.element.ownerDocument, i = t.body || t.documentElement;
534
- this.body = i, this.scrollbarWidth = window.innerWidth - t.documentElement.clientWidth, this.initialBodyPaddingRight = i.style.paddingRight, this.initialBodyComputedPaddingRight = window.getComputedStyle(i).paddingRight;
535
- },
536
- initContainer: function() {
537
- this.containerData = {
538
- width: window.innerWidth,
539
- height: window.innerHeight
540
- };
541
- },
542
- initViewer: function() {
543
- var t = this.options, i = this.parent, r;
544
- t.inline && (r = {
545
- width: Math.max(i.offsetWidth, t.minWidth),
546
- height: Math.max(i.offsetHeight, t.minHeight)
547
- }, this.parentData = r), (this.fulled || !r) && (r = this.containerData), this.viewerData = C({}, r);
548
- },
549
- renderViewer: function() {
550
- this.options.inline && !this.fulled && z(this.viewer, this.viewerData);
551
- },
552
- initList: function() {
553
- var t = this, i = this.element, r = this.options, n = this.list, a = [];
554
- n.innerHTML = "", y(this.images, function(s, l) {
555
- var h = s.src, o = s.alt || gi(h), u = t.getImageURL(s);
556
- if (h || u) {
557
- var c = document.createElement("li"), g = document.createElement("img");
558
- y(r.inheritedAttributes, function(I) {
559
- var S = s.getAttribute(I);
560
- S !== null && g.setAttribute(I, S);
561
- }), r.navbar && (g.src = h || u), g.alt = o, g.setAttribute("data-original-url", u || h), c.setAttribute("data-index", l), c.setAttribute("data-viewer-action", "view"), c.setAttribute("role", "button"), r.keyboard && c.setAttribute("tabindex", 0), c.appendChild(g), n.appendChild(c), a.push(c);
562
- }
563
- }), this.items = a, y(a, function(s) {
564
- var l = s.firstElementChild, h, o;
565
- xt(l, "filled", !0), r.loading && f(s, Z), d(l, $, h = function(c) {
566
- b(l, W, o), r.loading && m(s, Z), t.loadImage(c);
567
- }, {
568
- once: !0
569
- }), d(l, W, o = function() {
570
- b(l, $, h), r.loading && m(s, Z);
571
- }, {
572
- once: !0
573
- });
574
- }), r.transition && d(i, nt, function() {
575
- f(n, O);
576
- }, {
577
- once: !0
578
- });
579
- },
580
- renderList: function() {
581
- var t = this.index, i = this.items[t];
582
- if (i) {
583
- var r = i.nextElementSibling, n = parseInt(window.getComputedStyle(r || i).marginLeft, 10), a = i.offsetWidth, s = a + n;
584
- z(this.list, C({
585
- width: s * this.length - n
586
- }, gt({
587
- translateX: (this.viewerData.width - a) / 2 - s * t
588
- })));
589
- }
590
- },
591
- resetList: function() {
592
- var t = this.list;
593
- t.innerHTML = "", m(t, O), z(t, gt({
594
- translateX: 0
595
- }));
596
- },
597
- initImage: function(t) {
598
- var i = this, r = this.options, n = this.image, a = this.viewerData, s = this.footer.offsetHeight, l = a.width, h = Math.max(a.height - s, s), o = this.imageData || {}, u;
599
- this.imageInitializing = {
600
- abort: function() {
601
- u.onload = null;
602
- }
603
- }, u = Ie(n, r, function(c, g) {
604
- var I = c / g, S = Math.max(0, Math.min(1, r.initialCoverage)), E = l, x = h;
605
- i.imageInitializing = !1, h * I > l ? x = l / I : E = h * I, S = _(S) ? S : 0.9, E = Math.min(E * S, c), x = Math.min(x * S, g);
606
- var D = (l - E) / 2, N = (h - x) / 2, T = {
607
- left: D,
608
- top: N,
609
- x: D,
610
- y: N,
611
- width: E,
612
- height: x,
613
- oldRatio: 1,
614
- ratio: E / c,
615
- aspectRatio: I,
616
- naturalWidth: c,
617
- naturalHeight: g
618
- }, R = C({}, T);
619
- r.rotatable && (T.rotate = o.rotate || 0, R.rotate = 0), r.scalable && (T.scaleX = o.scaleX || 1, T.scaleY = o.scaleY || 1, R.scaleX = 1, R.scaleY = 1), i.imageData = T, i.initialImageData = R, t && t();
620
- });
621
- },
622
- renderImage: function(t) {
623
- var i = this, r = this.image, n = this.imageData;
624
- if (z(r, C({
625
- width: n.width,
626
- height: n.height,
627
- // XXX: Not to use translateX/Y to avoid image shaking when zooming
628
- marginLeft: n.x,
629
- marginTop: n.y
630
- }, gt(n))), t)
631
- if ((this.viewing || this.moving || this.rotating || this.scaling || this.zooming) && this.options.transition && H(r, O)) {
632
- var a = function() {
633
- i.imageRendering = !1, t();
634
- };
635
- this.imageRendering = {
636
- abort: function() {
637
- b(r, k, a);
638
- }
639
- }, d(r, k, a, {
640
- once: !0
641
- });
642
- } else
643
- t();
644
- },
645
- resetImage: function() {
646
- if (this.viewing || this.viewed) {
647
- var t = this.image;
648
- this.viewing && this.viewing.abort(), t.parentNode.removeChild(t), this.image = null;
649
- }
650
- }
651
- }, yi = {
652
- bind: function() {
653
- var t = this.options, i = this.viewer, r = this.canvas, n = this.element.ownerDocument;
654
- d(i, J, this.onClick = this.click.bind(this)), d(i, Wt, this.onDragStart = this.dragstart.bind(this)), d(r, Ht, this.onPointerDown = this.pointerdown.bind(this)), d(n, Ut, this.onPointerMove = this.pointermove.bind(this)), d(n, Bt, this.onPointerUp = this.pointerup.bind(this)), d(n, qt, this.onKeyDown = this.keydown.bind(this)), d(window, Kt, this.onResize = this.resize.bind(this)), t.zoomable && t.zoomOnWheel && d(i, Gt, this.onWheel = this.wheel.bind(this), {
655
- passive: !1,
656
- capture: !0
657
- }), t.toggleOnDblclick && d(r, At, this.onDblclick = this.dblclick.bind(this));
658
- },
659
- unbind: function() {
660
- var t = this.options, i = this.viewer, r = this.canvas, n = this.element.ownerDocument;
661
- b(i, J, this.onClick), b(i, Wt, this.onDragStart), b(r, Ht, this.onPointerDown), b(n, Ut, this.onPointerMove), b(n, Bt, this.onPointerUp), b(n, qt, this.onKeyDown), b(window, Kt, this.onResize), t.zoomable && t.zoomOnWheel && b(i, Gt, this.onWheel, {
662
- passive: !1,
663
- capture: !0
664
- }), t.toggleOnDblclick && b(r, At, this.onDblclick);
665
- }
666
- }, wi = {
667
- click: function(t) {
668
- var i = this.options, r = this.imageData, n = t.target, a = K(n, mt);
669
- switch (!a && n.localName === "img" && n.parentElement.localName === "li" && (n = n.parentElement, a = K(n, mt)), G && t.isTrusted && n === this.canvas && clearTimeout(this.clickCanvasTimeout), a) {
670
- case "mix":
671
- this.played ? this.stop() : i.inline ? this.fulled ? this.exit() : this.full() : this.hide();
672
- break;
673
- case "hide":
674
- this.pointerMoved || this.hide();
675
- break;
676
- case "view":
677
- this.view(K(n, "index"));
678
- break;
679
- case "zoom-in":
680
- this.zoom(0.1, !0);
681
- break;
682
- case "zoom-out":
683
- this.zoom(-0.1, !0);
684
- break;
685
- case "one-to-one":
686
- this.toggle();
687
- break;
688
- case "reset":
689
- this.reset();
690
- break;
691
- case "prev":
692
- this.prev(i.loop);
693
- break;
694
- case "play":
695
- this.play(i.fullscreen);
696
- break;
697
- case "next":
698
- this.next(i.loop);
699
- break;
700
- case "rotate-left":
701
- this.rotate(-90);
702
- break;
703
- case "rotate-right":
704
- this.rotate(90);
705
- break;
706
- case "flip-horizontal":
707
- this.scaleX(-r.scaleX || -1);
708
- break;
709
- case "flip-vertical":
710
- this.scaleY(-r.scaleY || -1);
711
- break;
712
- default:
713
- this.played && this.stop();
714
- }
715
- },
716
- dblclick: function(t) {
717
- t.preventDefault(), this.viewed && t.target === this.image && (G && t.isTrusted && clearTimeout(this.doubleClickImageTimeout), this.toggle(t.isTrusted ? t : t.detail && t.detail.originalEvent));
718
- },
719
- load: function() {
720
- var t = this;
721
- this.timeout && (clearTimeout(this.timeout), this.timeout = !1);
722
- var i = this.element, r = this.options, n = this.image, a = this.index, s = this.viewerData;
723
- m(n, rt), r.loading && m(this.canvas, Z), n.style.cssText = "height:0;" + "margin-left:".concat(s.width / 2, "px;") + "margin-top:".concat(s.height / 2, "px;") + "max-width:none!important;position:relative;width:0;", this.initImage(function() {
724
- st(n, ai, r.movable), st(n, O, r.transition), t.renderImage(function() {
725
- t.viewed = !0, t.viewing = !1, p(r.viewed) && d(i, nt, r.viewed, {
726
- once: !0
727
- }), A(i, nt, {
728
- originalImage: t.images[a],
729
- index: a,
730
- image: n
731
- }, {
732
- cancelable: !1
733
- });
734
- });
735
- });
736
- },
737
- loadImage: function(t) {
738
- var i = t.target, r = i.parentNode, n = r.offsetWidth || 30, a = r.offsetHeight || 50, s = !!K(i, "filled");
739
- Ie(i, this.options, function(l, h) {
740
- var o = l / h, u = n, c = a;
741
- a * o > n ? s ? u = a * o : c = n / o : s ? c = n / o : u = a * o, z(i, C({
742
- width: u,
743
- height: c
744
- }, gt({
745
- translateX: (n - u) / 2,
746
- translateY: (a - c) / 2
747
- })));
748
- });
749
- },
750
- keydown: function(t) {
751
- var i = this.options;
752
- if (i.keyboard) {
753
- var r = t.keyCode || t.which || t.charCode;
754
- switch (r) {
755
- case 13:
756
- this.viewer.contains(t.target) && this.click(t);
757
- break;
758
- }
759
- if (this.fulled)
760
- switch (r) {
761
- case 27:
762
- this.played ? this.stop() : i.inline ? this.fulled && this.exit() : this.hide();
763
- break;
764
- case 32:
765
- this.played && this.stop();
766
- break;
767
- case 37:
768
- this.played && this.playing ? this.playing.prev() : this.prev(i.loop);
769
- break;
770
- case 38:
771
- t.preventDefault(), this.zoom(i.zoomRatio, !0);
772
- break;
773
- case 39:
774
- this.played && this.playing ? this.playing.next() : this.next(i.loop);
775
- break;
776
- case 40:
777
- t.preventDefault(), this.zoom(-i.zoomRatio, !0);
778
- break;
779
- case 48:
780
- case 49:
781
- t.ctrlKey && (t.preventDefault(), this.toggle());
782
- break;
783
- }
784
- }
785
- },
786
- dragstart: function(t) {
787
- t.target.localName === "img" && t.preventDefault();
788
- },
789
- pointerdown: function(t) {
790
- var i = this.options, r = this.pointers, n = t.buttons, a = t.button;
791
- if (this.pointerMoved = !1, !(!this.viewed || this.showing || this.viewing || this.hiding || (t.type === "mousedown" || t.type === "pointerdown" && t.pointerType === "mouse") && // No primary button (Usually the left button)
792
- (_(n) && n !== 1 || _(a) && a !== 0 || t.ctrlKey))) {
793
- t.preventDefault(), t.changedTouches ? y(t.changedTouches, function(l) {
794
- r[l.identifier] = ht(l);
795
- }) : r[t.pointerId || 0] = ht(t);
796
- var s = i.movable ? dt : !1;
797
- i.zoomOnTouch && i.zoomable && Object.keys(r).length > 1 ? s = it : i.slideOnTouch && (t.pointerType === "touch" || t.type === "touchstart") && this.isSwitchable() && (s = Se), i.transition && (s === dt || s === it) && m(this.image, O), this.action = s;
798
- }
799
- },
800
- pointermove: function(t) {
801
- var i = this.pointers, r = this.action;
802
- !this.viewed || !r || (t.preventDefault(), t.changedTouches ? y(t.changedTouches, function(n) {
803
- C(i[n.identifier] || {}, ht(n, !0));
804
- }) : C(i[t.pointerId || 0] || {}, ht(t, !0)), this.change(t));
805
- },
806
- pointerup: function(t) {
807
- var i = this, r = this.options, n = this.action, a = this.pointers, s;
808
- t.changedTouches ? y(t.changedTouches, function(l) {
809
- s = a[l.identifier], delete a[l.identifier];
810
- }) : (s = a[t.pointerId || 0], delete a[t.pointerId || 0]), n && (t.preventDefault(), r.transition && (n === dt || n === it) && f(this.image, O), this.action = !1, G && n !== it && s && Date.now() - s.timeStamp < 500 && (clearTimeout(this.clickCanvasTimeout), clearTimeout(this.doubleClickImageTimeout), r.toggleOnDblclick && this.viewed && t.target === this.image ? this.imageClicked ? (this.imageClicked = !1, this.doubleClickImageTimeout = setTimeout(function() {
811
- A(i.image, At, {
812
- originalEvent: t
813
- });
814
- }, 50)) : (this.imageClicked = !0, this.doubleClickImageTimeout = setTimeout(function() {
815
- i.imageClicked = !1;
816
- }, 500)) : (this.imageClicked = !1, r.backdrop && r.backdrop !== "static" && t.target === this.canvas && (this.clickCanvasTimeout = setTimeout(function() {
817
- A(i.canvas, J, {
818
- originalEvent: t
819
- });
820
- }, 50)))));
821
- },
822
- resize: function() {
823
- var t = this;
824
- if (!(!this.isShown || this.hiding) && (this.fulled && (this.close(), this.initBody(), this.open()), this.initContainer(), this.initViewer(), this.renderViewer(), this.renderList(), this.viewed && this.initImage(function() {
825
- t.renderImage();
826
- }), this.played)) {
827
- if (this.options.fullscreen && this.fulled && !(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement)) {
828
- this.stop();
829
- return;
830
- }
831
- y(this.player.getElementsByTagName("img"), function(i) {
832
- d(i, $, t.loadImage.bind(t), {
833
- once: !0
834
- }), A(i, $);
835
- });
836
- }
837
- },
838
- wheel: function(t) {
839
- var i = this;
840
- if (this.viewed && (t.preventDefault(), !this.wheeling)) {
841
- this.wheeling = !0, setTimeout(function() {
842
- i.wheeling = !1;
843
- }, 50);
844
- var r = Number(this.options.zoomRatio) || 0.1, n = 1;
845
- t.deltaY ? n = t.deltaY > 0 ? 1 : -1 : t.wheelDelta ? n = -t.wheelDelta / 120 : t.detail && (n = t.detail > 0 ? 1 : -1), this.zoom(-n * r, !0, null, t);
846
- }
847
- }
848
- }, Ti = {
849
- /** Show the viewer (only available in modal mode)
850
- * @param {boolean} [immediate=false] - Indicates if show the viewer immediately or not.
851
- * @returns {Viewer} this
852
- */
853
- show: function() {
854
- var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, i = this.element, r = this.options;
855
- if (r.inline || this.showing || this.isShown || this.showing)
856
- return this;
857
- if (!this.ready)
858
- return this.build(), this.ready && this.show(t), this;
859
- if (p(r.show) && d(i, Jt, r.show, {
860
- once: !0
861
- }), A(i, Jt) === !1 || !this.ready)
862
- return this;
863
- this.hiding && this.transitioning.abort(), this.showing = !0, this.open();
864
- var n = this.viewer;
865
- if (m(n, Y), n.setAttribute("role", "dialog"), n.setAttribute("aria-labelledby", this.title.id), n.setAttribute("aria-modal", !0), n.removeAttribute("aria-hidden"), r.transition && !t) {
866
- var a = this.shown.bind(this);
867
- this.transitioning = {
868
- abort: function() {
869
- b(n, k, a), m(n, L);
870
- }
871
- }, f(n, O), n.initialOffsetWidth = n.offsetWidth, d(n, k, a, {
872
- once: !0
873
- }), f(n, L);
874
- } else
875
- f(n, L), this.shown();
876
- return this;
877
- },
878
- /**
879
- * Hide the viewer (only available in modal mode)
880
- * @param {boolean} [immediate=false] - Indicates if hide the viewer immediately or not.
881
- * @returns {Viewer} this
882
- */
883
- hide: function() {
884
- var t = this, i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, r = this.element, n = this.options;
885
- if (n.inline || this.hiding || !(this.isShown || this.showing))
886
- return this;
887
- if (p(n.hide) && d(r, te, n.hide, {
888
- once: !0
889
- }), A(r, te) === !1)
890
- return this;
891
- this.showing && this.transitioning.abort(), this.hiding = !0, this.played ? this.stop() : this.viewing && this.viewing.abort();
892
- var a = this.viewer, s = this.image, l = function() {
893
- m(a, L), t.hidden();
894
- };
895
- if (n.transition && !i) {
896
- var h = function u(c) {
897
- c && c.target === a && (b(a, k, u), t.hidden());
898
- }, o = function() {
899
- H(a, O) ? (d(a, k, h), m(a, L)) : l();
900
- };
901
- this.transitioning = {
902
- abort: function() {
903
- t.viewed && H(s, O) ? b(s, k, o) : H(a, O) && b(a, k, h);
904
- }
905
- }, this.viewed && H(s, O) ? (d(s, k, o, {
906
- once: !0
907
- }), this.zoomTo(0, !1, null, null, !0)) : o();
908
- } else
909
- l();
910
- return this;
911
- },
912
- /**
913
- * View one of the images with image's index
914
- * @param {number} index - The index of the image to view.
915
- * @returns {Viewer} this
916
- */
917
- view: function() {
918
- var t = this, i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.options.initialViewIndex;
919
- if (i = Number(i) || 0, this.hiding || this.played || i < 0 || i >= this.length || this.viewed && i === this.index)
920
- return this;
921
- if (!this.isShown)
922
- return this.index = i, this.show();
923
- this.viewing && this.viewing.abort();
924
- var r = this.element, n = this.options, a = this.title, s = this.canvas, l = this.items[i], h = l.querySelector("img"), o = K(h, "originalUrl"), u = h.getAttribute("alt"), c = document.createElement("img");
925
- if (y(n.inheritedAttributes, function(x) {
926
- var D = h.getAttribute(x);
927
- D !== null && c.setAttribute(x, D);
928
- }), c.src = o, c.alt = u, p(n.view) && d(r, ie, n.view, {
929
- once: !0
930
- }), A(r, ie, {
931
- originalImage: this.images[i],
932
- index: i,
933
- image: c
934
- }) === !1 || !this.isShown || this.hiding || this.played)
935
- return this;
936
- var g = this.items[this.index];
937
- g && (m(g, ot), g.removeAttribute("aria-selected")), f(l, ot), l.setAttribute("aria-selected", !0), n.focus && l.focus(), this.image = c, this.viewed = !1, this.index = i, this.imageData = {}, f(c, rt), n.loading && f(s, Z), s.innerHTML = "", s.appendChild(c), this.renderList(), a.innerHTML = "";
938
- var I = function() {
939
- var D = t.imageData, N = Array.isArray(n.title) ? n.title[1] : n.title;
940
- a.innerHTML = fi(p(N) ? N.call(t, c, D) : "".concat(u, " (").concat(D.naturalWidth, " × ").concat(D.naturalHeight, ")"));
941
- }, S, E;
942
- return d(r, nt, I, {
943
- once: !0
944
- }), this.viewing = {
945
- abort: function() {
946
- b(r, nt, I), c.complete ? t.imageRendering ? t.imageRendering.abort() : t.imageInitializing && t.imageInitializing.abort() : (c.src = "", b(c, $, S), t.timeout && clearTimeout(t.timeout));
947
- }
948
- }, c.complete ? this.load() : (d(c, $, S = function() {
949
- b(c, W, E), t.load();
950
- }, {
951
- once: !0
952
- }), d(c, W, E = function() {
953
- b(c, $, S), t.timeout && (clearTimeout(t.timeout), t.timeout = !1), m(c, rt), n.loading && m(t.canvas, Z);
954
- }, {
955
- once: !0
956
- }), this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(function() {
957
- m(c, rt), t.timeout = !1;
958
- }, 1e3)), this;
959
- },
960
- /**
961
- * View the previous image
962
- * @param {boolean} [loop=false] - Indicate if view the last one
963
- * when it is the first one at present.
964
- * @returns {Viewer} this
965
- */
966
- prev: function() {
967
- var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, i = this.index - 1;
968
- return i < 0 && (i = t ? this.length - 1 : 0), this.view(i), this;
969
- },
970
- /**
971
- * View the next image
972
- * @param {boolean} [loop=false] - Indicate if view the first one
973
- * when it is the last one at present.
974
- * @returns {Viewer} this
975
- */
976
- next: function() {
977
- var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, i = this.length - 1, r = this.index + 1;
978
- return r > i && (r = t ? 0 : i), this.view(r), this;
979
- },
980
- /**
981
- * Move the image with relative offsets.
982
- * @param {number} x - The moving distance in the horizontal direction.
983
- * @param {number} [y=x] The moving distance in the vertical direction.
984
- * @returns {Viewer} this
985
- */
986
- move: function(t) {
987
- var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t, r = this.imageData;
988
- return this.moveTo(U(t) ? t : r.x + Number(t), U(i) ? i : r.y + Number(i)), this;
989
- },
990
- /**
991
- * Move the image to an absolute point.
992
- * @param {number} x - The new position in the horizontal direction.
993
- * @param {number} [y=x] - The new position in the vertical direction.
994
- * @param {Event} [_originalEvent=null] - The original event if any.
995
- * @returns {Viewer} this
996
- */
997
- moveTo: function(t) {
998
- var i = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, a = this.element, s = this.options, l = this.imageData;
999
- if (t = Number(t), r = Number(r), this.viewed && !this.played && s.movable) {
1000
- var h = l.x, o = l.y, u = !1;
1001
- if (_(t) ? u = !0 : t = h, _(r) ? u = !0 : r = o, u) {
1002
- if (p(s.move) && d(a, re, s.move, {
1003
- once: !0
1004
- }), A(a, re, {
1005
- x: t,
1006
- y: r,
1007
- oldX: h,
1008
- oldY: o,
1009
- originalEvent: n
1010
- }) === !1)
1011
- return this;
1012
- l.x = t, l.y = r, l.left = t, l.top = r, this.moving = !0, this.renderImage(function() {
1013
- i.moving = !1, p(s.moved) && d(a, ne, s.moved, {
1014
- once: !0
1015
- }), A(a, ne, {
1016
- x: t,
1017
- y: r,
1018
- oldX: h,
1019
- oldY: o,
1020
- originalEvent: n
1021
- }, {
1022
- cancelable: !1
1023
- });
1024
- });
1025
- }
1026
- }
1027
- return this;
1028
- },
1029
- /**
1030
- * Rotate the image with a relative degree.
1031
- * @param {number} degree - The rotate degree.
1032
- * @returns {Viewer} this
1033
- */
1034
- rotate: function(t) {
1035
- return this.rotateTo((this.imageData.rotate || 0) + Number(t)), this;
1036
- },
1037
- /**
1038
- * Rotate the image to an absolute degree.
1039
- * @param {number} degree - The rotate degree.
1040
- * @returns {Viewer} this
1041
- */
1042
- rotateTo: function(t) {
1043
- var i = this, r = this.element, n = this.options, a = this.imageData;
1044
- if (t = Number(t), _(t) && this.viewed && !this.played && n.rotatable) {
1045
- var s = a.rotate;
1046
- if (p(n.rotate) && d(r, ae, n.rotate, {
1047
- once: !0
1048
- }), A(r, ae, {
1049
- degree: t,
1050
- oldDegree: s
1051
- }) === !1)
1052
- return this;
1053
- a.rotate = t, this.rotating = !0, this.renderImage(function() {
1054
- i.rotating = !1, p(n.rotated) && d(r, se, n.rotated, {
1055
- once: !0
1056
- }), A(r, se, {
1057
- degree: t,
1058
- oldDegree: s
1059
- }, {
1060
- cancelable: !1
1061
- });
1062
- });
1063
- }
1064
- return this;
1065
- },
1066
- /**
1067
- * Scale the image on the x-axis.
1068
- * @param {number} scaleX - The scale ratio on the x-axis.
1069
- * @returns {Viewer} this
1070
- */
1071
- scaleX: function(t) {
1072
- return this.scale(t, this.imageData.scaleY), this;
1073
- },
1074
- /**
1075
- * Scale the image on the y-axis.
1076
- * @param {number} scaleY - The scale ratio on the y-axis.
1077
- * @returns {Viewer} this
1078
- */
1079
- scaleY: function(t) {
1080
- return this.scale(this.imageData.scaleX, t), this;
1081
- },
1082
- /**
1083
- * Scale the image.
1084
- * @param {number} scaleX - The scale ratio on the x-axis.
1085
- * @param {number} [scaleY=scaleX] - The scale ratio on the y-axis.
1086
- * @returns {Viewer} this
1087
- */
1088
- scale: function(t) {
1089
- var i = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t, n = this.element, a = this.options, s = this.imageData;
1090
- if (t = Number(t), r = Number(r), this.viewed && !this.played && a.scalable) {
1091
- var l = s.scaleX, h = s.scaleY, o = !1;
1092
- if (_(t) ? o = !0 : t = l, _(r) ? o = !0 : r = h, o) {
1093
- if (p(a.scale) && d(n, oe, a.scale, {
1094
- once: !0
1095
- }), A(n, oe, {
1096
- scaleX: t,
1097
- scaleY: r,
1098
- oldScaleX: l,
1099
- oldScaleY: h
1100
- }) === !1)
1101
- return this;
1102
- s.scaleX = t, s.scaleY = r, this.scaling = !0, this.renderImage(function() {
1103
- i.scaling = !1, p(a.scaled) && d(n, le, a.scaled, {
1104
- once: !0
1105
- }), A(n, le, {
1106
- scaleX: t,
1107
- scaleY: r,
1108
- oldScaleX: l,
1109
- oldScaleY: h
1110
- }, {
1111
- cancelable: !1
1112
- });
1113
- });
1114
- }
1115
- }
1116
- return this;
1117
- },
1118
- /**
1119
- * Zoom the image with a relative ratio.
1120
- * @param {number} ratio - The target ratio.
1121
- * @param {boolean} [showTooltip=false] - Indicates whether to show the tooltip.
1122
- * @param {Object} [pivot] - The pivot point coordinate for zooming.
1123
- * @param {Event} [_originalEvent=null] - The original event if any.
1124
- * @returns {Viewer} this
1125
- */
1126
- zoom: function(t) {
1127
- var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, a = this.imageData;
1128
- return t = Number(t), t < 0 ? t = 1 / (1 - t) : t = 1 + t, this.zoomTo(a.width * t / a.naturalWidth, i, r, n), this;
1129
- },
1130
- /**
1131
- * Zoom the image to an absolute ratio.
1132
- * @param {number} ratio - The target ratio.
1133
- * @param {boolean} [showTooltip] - Indicates whether to show the tooltip.
1134
- * @param {Object} [pivot] - The pivot point coordinate for zooming.
1135
- * @param {Event} [_originalEvent=null] - The original event if any.
1136
- * @param {Event} [_zoomable=false] - Indicates if the current zoom is available or not.
1137
- * @returns {Viewer} this
1138
- */
1139
- zoomTo: function(t) {
1140
- var i = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, l = this.element, h = this.options, o = this.pointers, u = this.imageData, c = u.x, g = u.y, I = u.width, S = u.height, E = u.naturalWidth, x = u.naturalHeight;
1141
- if (t = Math.max(0, t), _(t) && this.viewed && !this.played && (s || h.zoomable)) {
1142
- if (!s) {
1143
- var D = Math.max(0.01, h.minZoomRatio), N = Math.min(100, h.maxZoomRatio);
1144
- t = Math.min(Math.max(t, D), N);
1145
- }
1146
- if (a)
1147
- switch (a.type) {
1148
- case "wheel":
1149
- h.zoomRatio >= 0.055 && t > 0.95 && t < 1.05 && (t = 1);
1150
- break;
1151
- case "pointermove":
1152
- case "touchmove":
1153
- case "mousemove":
1154
- t > 0.99 && t < 1.01 && (t = 1);
1155
- break;
1156
- }
1157
- var T = E * t, R = x * t, F = T - I, P = R - S, M = u.ratio;
1158
- if (p(h.zoom) && d(l, ue, h.zoom, {
1159
- once: !0
1160
- }), A(l, ue, {
1161
- ratio: t,
1162
- oldRatio: M,
1163
- originalEvent: a
1164
- }) === !1)
1165
- return this;
1166
- if (this.zooming = !0, a) {
1167
- var tt = vi(this.viewer), X = o && Object.keys(o).length > 0 ? pi(o) : {
1168
- pageX: a.pageX,
1169
- pageY: a.pageY
1170
- };
1171
- u.x -= F * ((X.pageX - tt.left - c) / I), u.y -= P * ((X.pageY - tt.top - g) / S);
1172
- } else
1173
- B(n) && _(n.x) && _(n.y) ? (u.x -= F * ((n.x - c) / I), u.y -= P * ((n.y - g) / S)) : (u.x -= F / 2, u.y -= P / 2);
1174
- u.left = u.x, u.top = u.y, u.width = T, u.height = R, u.oldRatio = M, u.ratio = t, this.renderImage(function() {
1175
- i.zooming = !1, p(h.zoomed) && d(l, he, h.zoomed, {
1176
- once: !0
1177
- }), A(l, he, {
1178
- ratio: t,
1179
- oldRatio: M,
1180
- originalEvent: a
1181
- }, {
1182
- cancelable: !1
1183
- });
1184
- }), r && this.tooltip();
1185
- }
1186
- return this;
1187
- },
1188
- /**
1189
- * Play the images
1190
- * @param {boolean|FullscreenOptions} [fullscreen=false] - Indicate if request fullscreen or not.
1191
- * @returns {Viewer} this
1192
- */
1193
- play: function() {
1194
- var t = this, i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
1195
- if (!this.isShown || this.played)
1196
- return this;
1197
- var r = this.element, n = this.options;
1198
- if (p(n.play) && d(r, ce, n.play, {
1199
- once: !0
1200
- }), A(r, ce) === !1)
1201
- return this;
1202
- var a = this.player, s = this.loadImage.bind(this), l = [], h = 0, o = 0;
1203
- if (this.played = !0, this.onLoadWhenPlay = s, i && this.requestFullscreen(i), f(a, q), y(this.items, function(g, I) {
1204
- var S = g.querySelector("img"), E = document.createElement("img");
1205
- E.src = K(S, "originalUrl"), E.alt = S.getAttribute("alt"), E.referrerPolicy = S.referrerPolicy, h += 1, f(E, vt), st(E, O, n.transition), H(g, ot) && (f(E, L), o = I), l.push(E), d(E, $, s, {
1206
- once: !0
1207
- }), a.appendChild(E);
1208
- }), _(n.interval) && n.interval > 0) {
1209
- var u = function g() {
1210
- clearTimeout(t.playing.timeout), m(l[o], L), o -= 1, o = o >= 0 ? o : h - 1, f(l[o], L), t.playing.timeout = setTimeout(g, n.interval);
1211
- }, c = function g() {
1212
- clearTimeout(t.playing.timeout), m(l[o], L), o += 1, o = o < h ? o : 0, f(l[o], L), t.playing.timeout = setTimeout(g, n.interval);
1213
- };
1214
- h > 1 && (this.playing = {
1215
- prev: u,
1216
- next: c,
1217
- timeout: setTimeout(c, n.interval)
1218
- });
1219
- }
1220
- return this;
1221
- },
1222
- // Stop play
1223
- stop: function() {
1224
- var t = this;
1225
- if (!this.played)
1226
- return this;
1227
- var i = this.element, r = this.options;
1228
- if (p(r.stop) && d(i, fe, r.stop, {
1229
- once: !0
1230
- }), A(i, fe) === !1)
1231
- return this;
1232
- var n = this.player;
1233
- return clearTimeout(this.playing.timeout), this.playing = !1, this.played = !1, y(n.getElementsByTagName("img"), function(a) {
1234
- b(a, $, t.onLoadWhenPlay);
1235
- }), m(n, q), n.innerHTML = "", this.exitFullscreen(), this;
1236
- },
1237
- // Enter modal mode (only available in inline mode)
1238
- full: function() {
1239
- var t = this, i = this.options, r = this.viewer, n = this.image, a = this.list;
1240
- return !this.isShown || this.played || this.fulled || !i.inline ? this : (this.fulled = !0, this.open(), f(this.button, Mt), i.transition && (m(a, O), this.viewed && m(n, O)), f(r, It), r.setAttribute("role", "dialog"), r.setAttribute("aria-labelledby", this.title.id), r.setAttribute("aria-modal", !0), r.removeAttribute("style"), z(r, {
1241
- zIndex: i.zIndex
1242
- }), i.focus && this.enforceFocus(), this.initContainer(), this.viewerData = C({}, this.containerData), this.renderList(), this.viewed && this.initImage(function() {
1243
- t.renderImage(function() {
1244
- i.transition && setTimeout(function() {
1245
- f(n, O), f(a, O);
1246
- }, 0);
1247
- });
1248
- }), this);
1249
- },
1250
- // Exit modal mode (only available in inline mode)
1251
- exit: function() {
1252
- var t = this, i = this.options, r = this.viewer, n = this.image, a = this.list;
1253
- return !this.isShown || this.played || !this.fulled || !i.inline ? this : (this.fulled = !1, this.close(), m(this.button, Mt), i.transition && (m(a, O), this.viewed && m(n, O)), i.focus && this.clearEnforceFocus(), r.removeAttribute("role"), r.removeAttribute("aria-labelledby"), r.removeAttribute("aria-modal"), m(r, It), z(r, {
1254
- zIndex: i.zIndexInline
1255
- }), this.viewerData = C({}, this.parentData), this.renderViewer(), this.renderList(), this.viewed && this.initImage(function() {
1256
- t.renderImage(function() {
1257
- i.transition && setTimeout(function() {
1258
- f(n, O), f(a, O);
1259
- }, 0);
1260
- });
1261
- }), this);
1262
- },
1263
- // Show the current ratio of the image with percentage
1264
- tooltip: function() {
1265
- var t = this, i = this.options, r = this.tooltipBox, n = this.imageData;
1266
- return !this.viewed || this.played || !i.tooltip ? this : (r.textContent = "".concat(Math.round(n.ratio * 100), "%"), this.tooltipping ? clearTimeout(this.tooltipping) : i.transition ? (this.fading && A(r, k), f(r, q), f(r, vt), f(r, O), r.removeAttribute("aria-hidden"), r.initialOffsetWidth = r.offsetWidth, f(r, L)) : (f(r, q), r.removeAttribute("aria-hidden")), this.tooltipping = setTimeout(function() {
1267
- i.transition ? (d(r, k, function() {
1268
- m(r, q), m(r, vt), m(r, O), r.setAttribute("aria-hidden", !0), t.fading = !1;
1269
- }, {
1270
- once: !0
1271
- }), m(r, L), t.fading = !0) : (m(r, q), r.setAttribute("aria-hidden", !0)), t.tooltipping = !1;
1272
- }, 1e3), this);
1273
- },
1274
- /**
1275
- * Toggle the image size between its current size and natural size
1276
- * @param {Event} [_originalEvent=null] - The original event if any.
1277
- * @returns {Viewer} this
1278
- */
1279
- toggle: function() {
1280
- var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
1281
- return this.imageData.ratio === 1 ? this.zoomTo(this.imageData.oldRatio, !0, null, t) : this.zoomTo(1, !0, null, t), this;
1282
- },
1283
- // Reset the image to its initial state
1284
- reset: function() {
1285
- return this.viewed && !this.played && (this.imageData = C({}, this.initialImageData), this.renderImage()), this;
1286
- },
1287
- // Update viewer when images changed
1288
- update: function() {
1289
- var t = this, i = this.element, r = this.options, n = this.isImg;
1290
- if (n && !i.parentNode)
1291
- return this.destroy();
1292
- var a = [];
1293
- if (y(n ? [i] : i.querySelectorAll("img"), function(o) {
1294
- p(r.filter) ? r.filter.call(t, o) && a.push(o) : t.getImageURL(o) && a.push(o);
1295
- }), !a.length)
1296
- return this;
1297
- if (this.images = a, this.length = a.length, this.ready) {
1298
- var s = [];
1299
- if (y(this.items, function(o, u) {
1300
- var c = o.querySelector("img"), g = a[u];
1301
- g && c ? (g.src !== c.src || g.alt !== c.alt) && s.push(u) : s.push(u);
1302
- }), z(this.list, {
1303
- width: "auto"
1304
- }), this.initList(), this.isShown)
1305
- if (this.length) {
1306
- if (this.viewed) {
1307
- var l = s.indexOf(this.index);
1308
- if (l >= 0)
1309
- this.viewed = !1, this.view(Math.max(Math.min(this.index - l, this.length - 1), 0));
1310
- else {
1311
- var h = this.items[this.index];
1312
- f(h, ot), h.setAttribute("aria-selected", !0);
1313
- }
1314
- }
1315
- } else
1316
- this.image = null, this.viewed = !1, this.index = 0, this.imageData = {}, this.canvas.innerHTML = "", this.title.innerHTML = "";
1317
- } else
1318
- this.build();
1319
- return this;
1320
- },
1321
- // Destroy the viewer
1322
- destroy: function() {
1323
- var t = this.element, i = this.options;
1324
- return t[v] ? (this.destroyed = !0, this.ready ? (this.played && this.stop(), i.inline ? (this.fulled && this.exit(), this.unbind()) : this.isShown ? (this.viewing && (this.imageRendering ? this.imageRendering.abort() : this.imageInitializing && this.imageInitializing.abort()), this.hiding && this.transitioning.abort(), this.hidden()) : this.showing && (this.transitioning.abort(), this.hidden()), this.ready = !1, this.viewer.parentNode.removeChild(this.viewer)) : i.inline && (this.delaying ? this.delaying.abort() : this.initializing && this.initializing.abort()), i.inline || b(t, J, this.onStart), t[v] = void 0, this) : this;
1325
- }
1326
- }, Ei = {
1327
- getImageURL: function(t) {
1328
- var i = this.options.url;
1329
- return at(i) ? i = t.getAttribute(i) : p(i) ? i = i.call(this, t) : i = "", i;
1330
- },
1331
- enforceFocus: function() {
1332
- var t = this;
1333
- this.clearEnforceFocus(), d(document, Xt, this.onFocusin = function(i) {
1334
- var r = t.viewer, n = i.target;
1335
- if (!(n === document || n === r || r.contains(n))) {
1336
- for (; n; ) {
1337
- if (n.getAttribute("tabindex") !== null || n.getAttribute("aria-modal") === "true")
1338
- return;
1339
- n = n.parentElement;
1340
- }
1341
- r.focus();
1342
- }
1343
- });
1344
- },
1345
- clearEnforceFocus: function() {
1346
- this.onFocusin && (b(document, Xt, this.onFocusin), this.onFocusin = null);
1347
- },
1348
- open: function() {
1349
- var t = this.body;
1350
- f(t, Yt), this.scrollbarWidth > 0 && (t.style.paddingRight = "".concat(this.scrollbarWidth + (parseFloat(this.initialBodyComputedPaddingRight) || 0), "px"));
1351
- },
1352
- close: function() {
1353
- var t = this.body;
1354
- m(t, Yt), this.scrollbarWidth > 0 && (t.style.paddingRight = this.initialBodyPaddingRight);
1355
- },
1356
- shown: function() {
1357
- var t = this.element, i = this.options, r = this.viewer;
1358
- this.fulled = !0, this.isShown = !0, this.render(), this.bind(), this.showing = !1, i.focus && (r.focus(), this.enforceFocus()), p(i.shown) && d(t, Qt, i.shown, {
1359
- once: !0
1360
- }), A(t, Qt) !== !1 && this.ready && this.isShown && !this.hiding && this.view(this.index);
1361
- },
1362
- hidden: function() {
1363
- var t = this.element, i = this.options, r = this.viewer;
1364
- i.fucus && this.clearEnforceFocus(), this.fulled = !1, this.viewed = !1, this.isShown = !1, this.close(), this.unbind(), f(r, Y), r.removeAttribute("role"), r.removeAttribute("aria-labelledby"), r.removeAttribute("aria-modal"), r.setAttribute("aria-hidden", !0), this.resetList(), this.resetImage(), this.hiding = !1, this.destroyed || (p(i.hidden) && d(t, ee, i.hidden, {
1365
- once: !0
1366
- }), A(t, ee, null, {
1367
- cancelable: !1
1368
- }));
1369
- },
1370
- requestFullscreen: function(t) {
1371
- var i = this.element.ownerDocument;
1372
- if (this.fulled && !(i.fullscreenElement || i.webkitFullscreenElement || i.mozFullScreenElement || i.msFullscreenElement)) {
1373
- var r = i.documentElement;
1374
- r.requestFullscreen ? B(t) ? r.requestFullscreen(t) : r.requestFullscreen() : r.webkitRequestFullscreen ? r.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT) : r.mozRequestFullScreen ? r.mozRequestFullScreen() : r.msRequestFullscreen && r.msRequestFullscreen();
1375
- }
1376
- },
1377
- exitFullscreen: function() {
1378
- var t = this.element.ownerDocument;
1379
- this.fulled && (t.fullscreenElement || t.webkitFullscreenElement || t.mozFullScreenElement || t.msFullscreenElement) && (t.exitFullscreen ? t.exitFullscreen() : t.webkitExitFullscreen ? t.webkitExitFullscreen() : t.mozCancelFullScreen ? t.mozCancelFullScreen() : t.msExitFullscreen && t.msExitFullscreen());
1380
- },
1381
- change: function(t) {
1382
- var i = this.options, r = this.pointers, n = r[Object.keys(r)[0]];
1383
- if (n) {
1384
- var a = n.endX - n.startX, s = n.endY - n.startY;
1385
- switch (this.action) {
1386
- case dt:
1387
- (a !== 0 || s !== 0) && (this.pointerMoved = !0, this.move(a, s, t));
1388
- break;
1389
- case it:
1390
- this.zoom(mi(r), !1, null, t);
1391
- break;
1392
- case Se: {
1393
- this.action = "switched";
1394
- var l = Math.abs(a);
1395
- l > 1 && l > Math.abs(s) && (this.pointers = {}, a > 1 ? this.prev(i.loop) : a < -1 && this.next(i.loop));
1396
- break;
1397
- }
1398
- }
1399
- y(r, function(h) {
1400
- h.startX = h.endX, h.startY = h.endY;
1401
- });
1402
- }
1403
- },
1404
- isSwitchable: function() {
1405
- var t = this.imageData, i = this.viewerData;
1406
- return this.length > 1 && t.x >= 0 && t.y >= 0 && t.width <= i.width && t.height <= i.height;
1407
- }
1408
- }, _i = V.Viewer, Si = function(e) {
1409
- return function() {
1410
- return e += 1, e;
1411
- };
1412
- }(-1), Ae = /* @__PURE__ */ function() {
1413
- function e(t) {
1414
- var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1415
- if (Ke(this, e), !t || t.nodeType !== 1)
1416
- throw new Error("The first argument is required and must be an element.");
1417
- this.element = t, this.options = C({}, Ft, B(i) && i), this.action = !1, this.fading = !1, this.fulled = !1, this.hiding = !1, this.imageClicked = !1, this.imageData = {}, this.index = this.options.initialViewIndex, this.isImg = !1, this.isShown = !1, this.length = 0, this.moving = !1, this.played = !1, this.playing = !1, this.pointers = {}, this.ready = !1, this.rotating = !1, this.scaling = !1, this.showing = !1, this.timeout = !1, this.tooltipping = !1, this.viewed = !1, this.viewing = !1, this.wheeling = !1, this.zooming = !1, this.pointerMoved = !1, this.id = Si(), this.init();
1418
- }
1419
- return Ge(e, [{
1420
- key: "init",
1421
- value: function() {
1422
- var i = this, r = this.element, n = this.options;
1423
- if (!r[v]) {
1424
- r[v] = this, n.focus && !n.keyboard && (n.focus = !1);
1425
- var a = r.localName === "img", s = [];
1426
- if (y(a ? [r] : r.querySelectorAll("img"), function(o) {
1427
- p(n.filter) ? n.filter.call(i, o) && s.push(o) : i.getImageURL(o) && s.push(o);
1428
- }), this.isImg = a, this.length = s.length, this.images = s, this.initBody(), U(document.createElement(v).style.transition) && (n.transition = !1), n.inline) {
1429
- var l = 0, h = function() {
1430
- if (l += 1, l === i.length) {
1431
- var u;
1432
- i.initializing = !1, i.delaying = {
1433
- abort: function() {
1434
- clearTimeout(u);
1435
- }
1436
- }, u = setTimeout(function() {
1437
- i.delaying = !1, i.build();
1438
- }, 0);
1439
- }
1440
- };
1441
- this.initializing = {
1442
- abort: function() {
1443
- y(s, function(u) {
1444
- u.complete || (b(u, $, h), b(u, W, h));
1445
- });
1446
- }
1447
- }, y(s, function(o) {
1448
- if (o.complete)
1449
- h();
1450
- else {
1451
- var u, c;
1452
- d(o, $, u = function() {
1453
- b(o, W, c), h();
1454
- }, {
1455
- once: !0
1456
- }), d(o, W, c = function() {
1457
- b(o, $, u), h();
1458
- }, {
1459
- once: !0
1460
- });
1461
- }
1462
- });
1463
- } else
1464
- d(r, J, this.onStart = function(o) {
1465
- var u = o.target;
1466
- u.localName === "img" && (!p(n.filter) || n.filter.call(i, u)) && i.view(i.images.indexOf(u));
1467
- });
1468
- }
1469
- }
1470
- }, {
1471
- key: "build",
1472
- value: function() {
1473
- if (!this.ready) {
1474
- var i = this.element, r = this.options, n = i.parentNode, a = document.createElement("div");
1475
- a.innerHTML = Qe;
1476
- var s = a.querySelector(".".concat(v, "-container")), l = s.querySelector(".".concat(v, "-title")), h = s.querySelector(".".concat(v, "-toolbar")), o = s.querySelector(".".concat(v, "-navbar")), u = s.querySelector(".".concat(v, "-button")), c = s.querySelector(".".concat(v, "-canvas"));
1477
- if (this.parent = n, this.viewer = s, this.title = l, this.toolbar = h, this.navbar = o, this.button = u, this.canvas = c, this.footer = s.querySelector(".".concat(v, "-footer")), this.tooltipBox = s.querySelector(".".concat(v, "-tooltip")), this.player = s.querySelector(".".concat(v, "-player")), this.list = s.querySelector(".".concat(v, "-list")), s.id = "".concat(v).concat(this.id), l.id = "".concat(v, "Title").concat(this.id), f(l, r.title ? ut(Array.isArray(r.title) ? r.title[0] : r.title) : Y), f(o, r.navbar ? ut(r.navbar) : Y), st(u, Y, !r.button), r.keyboard && u.setAttribute("tabindex", 0), r.backdrop && (f(s, "".concat(v, "-backdrop")), !r.inline && r.backdrop !== "static" && xt(c, mt, "hide")), at(r.className) && r.className && r.className.split($t).forEach(function(T) {
1478
- f(s, T);
1479
- }), r.toolbar) {
1480
- var g = document.createElement("ul"), I = B(r.toolbar), S = lt.slice(0, 3), E = lt.slice(7, 9), x = lt.slice(9);
1481
- I || f(h, ut(r.toolbar)), y(I ? r.toolbar : lt, function(T, R) {
1482
- var F = I && B(T), P = I ? kt(R) : T, M = F && !U(T.show) ? T.show : T;
1483
- if (!(!M || !r.zoomable && S.indexOf(P) !== -1 || !r.rotatable && E.indexOf(P) !== -1 || !r.scalable && x.indexOf(P) !== -1)) {
1484
- var tt = F && !U(T.size) ? T.size : T, X = F && !U(T.click) ? T.click : T, j = document.createElement("li");
1485
- r.keyboard && j.setAttribute("tabindex", 0), j.setAttribute("role", "button"), f(j, "".concat(v, "-").concat(P)), p(X) || xt(j, mt, P), _(M) && f(j, ut(M)), ["small", "large"].indexOf(tt) !== -1 ? f(j, "".concat(v, "-").concat(tt)) : P === "play" && f(j, "".concat(v, "-large")), p(X) && d(j, J, X), g.appendChild(j);
1486
- }
1487
- }), h.appendChild(g);
1488
- } else
1489
- f(h, Y);
1490
- if (!r.rotatable) {
1491
- var D = h.querySelectorAll('li[class*="rotate"]');
1492
- f(D, rt), y(D, function(T) {
1493
- h.appendChild(T);
1494
- });
1495
- }
1496
- if (r.inline)
1497
- f(u, ei), z(s, {
1498
- zIndex: r.zIndexInline
1499
- }), window.getComputedStyle(n).position === "static" && z(n, {
1500
- position: "relative"
1501
- }), n.insertBefore(s, i.nextSibling);
1502
- else {
1503
- f(u, ti), f(s, It), f(s, vt), f(s, Y), z(s, {
1504
- zIndex: r.zIndex
1505
- });
1506
- var N = r.container;
1507
- at(N) && (N = i.ownerDocument.querySelector(N)), N || (N = this.body), N.appendChild(s);
1508
- }
1509
- if (r.inline && (this.render(), this.bind(), this.isShown = !0), this.ready = !0, p(r.ready) && d(i, Zt, r.ready, {
1510
- once: !0
1511
- }), A(i, Zt) === !1) {
1512
- this.ready = !1;
1513
- return;
1514
- }
1515
- this.ready && r.inline && this.view(this.index);
1516
- }
1517
- }
1518
- /**
1519
- * Get the no conflict viewer class.
1520
- * @returns {Viewer} The viewer class.
1521
- */
1522
- }], [{
1523
- key: "noConflict",
1524
- value: function() {
1525
- return window.Viewer = _i, e;
1526
- }
1527
- /**
1528
- * Change the default options.
1529
- * @param {Object} options - The new default options.
1530
- */
1531
- }, {
1532
- key: "setDefaults",
1533
- value: function(i) {
1534
- C(Ft, B(i) && i);
1535
- }
1536
- }]), e;
1537
- }();
1538
- C(Ae.prototype, bi, yi, wi, Ti, Ei);
1539
- /*!
1540
- * v-viewer v3.0.11
1541
- * https://github.com/mirari/v-viewer#readme
1542
- *
1543
- * Copyright 2022 mirari
1544
- * Released under the MIT license
1545
- *
1546
- * Date: 2022-10-25T08:49:33.301Z
1547
- */
1548
- var ct = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1549
- function Oi(e) {
1550
- return e;
1551
- }
1552
- var xe = Oi;
1553
- function Ii(e, t, i) {
1554
- switch (i.length) {
1555
- case 0:
1556
- return e.call(t);
1557
- case 1:
1558
- return e.call(t, i[0]);
1559
- case 2:
1560
- return e.call(t, i[0], i[1]);
1561
- case 3:
1562
- return e.call(t, i[0], i[1], i[2]);
1563
- }
1564
- return e.apply(t, i);
1565
- }
1566
- var Ai = Ii, xi = Ai, de = Math.max;
1567
- function Di(e, t, i) {
1568
- return t = de(t === void 0 ? e.length - 1 : t, 0), function() {
1569
- for (var r = arguments, n = -1, a = de(r.length - t, 0), s = Array(a); ++n < a; )
1570
- s[n] = r[t + n];
1571
- n = -1;
1572
- for (var l = Array(t + 1); ++n < t; )
1573
- l[n] = r[n];
1574
- return l[t] = i(s), xi(e, this, l);
1575
- };
1576
- }
1577
- var Ni = Di;
1578
- function Ci(e) {
1579
- return function() {
1580
- return e;
1581
- };
1582
- }
1583
- var Li = Ci, $i = typeof ct == "object" && ct && ct.Object === Object && ct, De = $i, ki = De, zi = typeof self == "object" && self && self.Object === Object && self, Pi = ki || zi || Function("return this")(), zt = Pi, Ri = zt, ji = Ri.Symbol, Ne = ji, ve = Ne, Ce = Object.prototype, Vi = Ce.hasOwnProperty, Fi = Ce.toString, et = ve ? ve.toStringTag : void 0;
1584
- function Mi(e) {
1585
- var t = Vi.call(e, et), i = e[et];
1586
- try {
1587
- e[et] = void 0;
1588
- var r = !0;
1589
- } catch {
1590
- }
1591
- var n = Fi.call(e);
1592
- return r && (t ? e[et] = i : delete e[et]), n;
1593
- }
1594
- var Yi = Mi, Wi = Object.prototype, Xi = Wi.toString;
1595
- function qi(e) {
1596
- return Xi.call(e);
1597
- }
1598
- var Hi = qi, ge = Ne, Ui = Yi, Bi = Hi, Ki = "[object Null]", Gi = "[object Undefined]", me = ge ? ge.toStringTag : void 0;
1599
- function Zi(e) {
1600
- return e == null ? e === void 0 ? Gi : Ki : me && me in Object(e) ? Ui(e) : Bi(e);
1601
- }
1602
- var Pt = Zi;
1603
- function Ji(e) {
1604
- var t = typeof e;
1605
- return e != null && (t == "object" || t == "function");
1606
- }
1607
- var bt = Ji, Qi = Pt, tr = bt, er = "[object AsyncFunction]", ir = "[object Function]", rr = "[object GeneratorFunction]", nr = "[object Proxy]";
1608
- function ar(e) {
1609
- if (!tr(e))
1610
- return !1;
1611
- var t = Qi(e);
1612
- return t == ir || t == rr || t == er || t == nr;
1613
- }
1614
- var Le = ar, sr = zt, or = sr["__core-js_shared__"], lr = or, _t = lr, pe = function() {
1615
- var e = /[^.]+$/.exec(_t && _t.keys && _t.keys.IE_PROTO || "");
1616
- return e ? "Symbol(src)_1." + e : "";
1617
- }();
1618
- function ur(e) {
1619
- return !!pe && pe in e;
1620
- }
1621
- var hr = ur, cr = Function.prototype, fr = cr.toString;
1622
- function dr(e) {
1623
- if (e != null) {
1624
- try {
1625
- return fr.call(e);
1626
- } catch {
1627
- }
1628
- try {
1629
- return e + "";
1630
- } catch {
1631
- }
1632
- }
1633
- return "";
1634
- }
1635
- var vr = dr, gr = Le, mr = hr, pr = bt, br = vr, yr = /[\\^$.*+?()[\]{}|]/g, wr = /^\[object .+?Constructor\]$/, Tr = Function.prototype, Er = Object.prototype, _r = Tr.toString, Sr = Er.hasOwnProperty, Or = RegExp("^" + _r.call(Sr).replace(yr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
1636
- function Ir(e) {
1637
- if (!pr(e) || mr(e))
1638
- return !1;
1639
- var t = gr(e) ? Or : wr;
1640
- return t.test(br(e));
1641
- }
1642
- var Ar = Ir;
1643
- function xr(e, t) {
1644
- return e == null ? void 0 : e[t];
1645
- }
1646
- var Dr = xr, Nr = Ar, Cr = Dr;
1647
- function Lr(e, t) {
1648
- var i = Cr(e, t);
1649
- return Nr(i) ? i : void 0;
1650
- }
1651
- var $r = Lr, kr = $r, zr = function() {
1652
- try {
1653
- var e = kr(Object, "defineProperty");
1654
- return e({}, "", {}), e;
1655
- } catch {
1656
- }
1657
- }(), Pr = zr, Rr = Li, be = Pr, jr = xe, Vr = be ? function(e, t) {
1658
- return be(e, "toString", {
1659
- configurable: !0,
1660
- enumerable: !1,
1661
- value: Rr(t),
1662
- writable: !0
1663
- });
1664
- } : jr, Fr = Vr, Mr = 800, Yr = 16, Wr = Date.now;
1665
- function Xr(e) {
1666
- var t = 0, i = 0;
1667
- return function() {
1668
- var r = Wr(), n = Yr - (r - i);
1669
- if (i = r, n > 0) {
1670
- if (++t >= Mr)
1671
- return arguments[0];
1672
- } else
1673
- t = 0;
1674
- return e.apply(void 0, arguments);
1675
- };
1676
- }
1677
- var qr = Xr, Hr = Fr, Ur = qr, Br = Ur(Hr), Kr = Br, Gr = xe, Zr = Ni, Jr = Kr;
1678
- function Qr(e, t) {
1679
- return Jr(Zr(e, t, Gr), e + "");
1680
- }
1681
- var tn = Qr;
1682
- function en(e, t) {
1683
- return e === t || e !== e && t !== t;
1684
- }
1685
- var $e = en, rn = 9007199254740991;
1686
- function nn(e) {
1687
- return typeof e == "number" && e > -1 && e % 1 == 0 && e <= rn;
1688
- }
1689
- var ke = nn, an = Le, sn = ke;
1690
- function on(e) {
1691
- return e != null && sn(e.length) && !an(e);
1692
- }
1693
- var ze = on, ln = 9007199254740991, un = /^(?:0|[1-9]\d*)$/;
1694
- function hn(e, t) {
1695
- var i = typeof e;
1696
- return t = t ?? ln, !!t && (i == "number" || i != "symbol" && un.test(e)) && e > -1 && e % 1 == 0 && e < t;
1697
- }
1698
- var Pe = hn, cn = $e, fn = ze, dn = Pe, vn = bt;
1699
- function gn(e, t, i) {
1700
- if (!vn(i))
1701
- return !1;
1702
- var r = typeof t;
1703
- return (r == "number" ? fn(i) && dn(t, i.length) : r == "string" && t in i) ? cn(i[t], e) : !1;
1704
- }
1705
- var mn = gn;
1706
- function pn(e, t) {
1707
- for (var i = -1, r = Array(e); ++i < e; )
1708
- r[i] = t(i);
1709
- return r;
1710
- }
1711
- var bn = pn;
1712
- function yn(e) {
1713
- return e != null && typeof e == "object";
1714
- }
1715
- var Rt = yn, wn = Pt, Tn = Rt, En = "[object Arguments]";
1716
- function _n(e) {
1717
- return Tn(e) && wn(e) == En;
1718
- }
1719
- var Sn = _n, ye = Sn, On = Rt, Re = Object.prototype, In = Re.hasOwnProperty, An = Re.propertyIsEnumerable, xn = ye(function() {
1720
- return arguments;
1721
- }()) ? ye : function(e) {
1722
- return On(e) && In.call(e, "callee") && !An.call(e, "callee");
1723
- }, Dn = xn, Nn = Array.isArray, Cn = Nn, Dt = { exports: {} };
1724
- function Ln() {
1725
- return !1;
1726
- }
1727
- var $n = Ln;
1728
- (function(e, t) {
1729
- var i = zt, r = $n, n = t && !t.nodeType && t, a = n && !0 && e && !e.nodeType && e, s = a && a.exports === n, l = s ? i.Buffer : void 0, h = l ? l.isBuffer : void 0, o = h || r;
1730
- e.exports = o;
1731
- })(Dt, Dt.exports);
1732
- var kn = Pt, zn = ke, Pn = Rt, Rn = "[object Arguments]", jn = "[object Array]", Vn = "[object Boolean]", Fn = "[object Date]", Mn = "[object Error]", Yn = "[object Function]", Wn = "[object Map]", Xn = "[object Number]", qn = "[object Object]", Hn = "[object RegExp]", Un = "[object Set]", Bn = "[object String]", Kn = "[object WeakMap]", Gn = "[object ArrayBuffer]", Zn = "[object DataView]", Jn = "[object Float32Array]", Qn = "[object Float64Array]", ta = "[object Int8Array]", ea = "[object Int16Array]", ia = "[object Int32Array]", ra = "[object Uint8Array]", na = "[object Uint8ClampedArray]", aa = "[object Uint16Array]", sa = "[object Uint32Array]", w = {};
1733
- w[Jn] = w[Qn] = w[ta] = w[ea] = w[ia] = w[ra] = w[na] = w[aa] = w[sa] = !0;
1734
- w[Rn] = w[jn] = w[Gn] = w[Vn] = w[Zn] = w[Fn] = w[Mn] = w[Yn] = w[Wn] = w[Xn] = w[qn] = w[Hn] = w[Un] = w[Bn] = w[Kn] = !1;
1735
- function oa(e) {
1736
- return Pn(e) && zn(e.length) && !!w[kn(e)];
1737
- }
1738
- var la = oa;
1739
- function ua(e) {
1740
- return function(t) {
1741
- return e(t);
1742
- };
1743
- }
1744
- var ha = ua, Nt = { exports: {} };
1745
- (function(e, t) {
1746
- var i = De, r = t && !t.nodeType && t, n = r && !0 && e && !e.nodeType && e, a = n && n.exports === r, s = a && i.process, l = function() {
1747
- try {
1748
- var h = n && n.require && n.require("util").types;
1749
- return h || s && s.binding && s.binding("util");
1750
- } catch {
1751
- }
1752
- }();
1753
- e.exports = l;
1754
- })(Nt, Nt.exports);
1755
- var ca = la, fa = ha, we = Nt.exports, Te = we && we.isTypedArray, da = Te ? fa(Te) : ca, va = da, ga = bn, ma = Dn, pa = Cn, ba = Dt.exports, ya = Pe, wa = va, Ta = Object.prototype, Ea = Ta.hasOwnProperty;
1756
- function _a(e, t) {
1757
- var i = pa(e), r = !i && ma(e), n = !i && !r && ba(e), a = !i && !r && !n && wa(e), s = i || r || n || a, l = s ? ga(e.length, String) : [], h = l.length;
1758
- for (var o in e)
1759
- (t || Ea.call(e, o)) && !(s && (o == "length" || n && (o == "offset" || o == "parent") || a && (o == "buffer" || o == "byteLength" || o == "byteOffset") || ya(o, h))) && l.push(o);
1760
- return l;
1761
- }
1762
- var Sa = _a, Oa = Object.prototype;
1763
- function Ia(e) {
1764
- var t = e && e.constructor, i = typeof t == "function" && t.prototype || Oa;
1765
- return e === i;
1766
- }
1767
- var Aa = Ia;
1768
- function xa(e) {
1769
- var t = [];
1770
- if (e != null)
1771
- for (var i in Object(e))
1772
- t.push(i);
1773
- return t;
1774
- }
1775
- var Da = xa, Na = bt, Ca = Aa, La = Da, $a = Object.prototype, ka = $a.hasOwnProperty;
1776
- function za(e) {
1777
- if (!Na(e))
1778
- return La(e);
1779
- var t = Ca(e), i = [];
1780
- for (var r in e)
1781
- r == "constructor" && (t || !ka.call(e, r)) || i.push(r);
1782
- return i;
1783
- }
1784
- var Pa = za, Ra = Sa, ja = Pa, Va = ze;
1785
- function Fa(e) {
1786
- return Va(e) ? Ra(e, !0) : ja(e);
1787
- }
1788
- var Ma = Fa, Ya = tn, Wa = $e, Xa = mn, qa = Ma, je = Object.prototype, Ha = je.hasOwnProperty;
1789
- Ya(function(e, t) {
1790
- e = Object(e);
1791
- var i = -1, r = t.length, n = r > 2 ? t[2] : void 0;
1792
- for (n && Xa(t[0], t[1], n) && (r = 1); ++i < r; )
1793
- for (var a = t[i], s = qa(a), l = -1, h = s.length; ++l < h; ) {
1794
- var o = s[l], u = e[o];
1795
- (u === void 0 || Wa(u, je[o]) && !Ha.call(e, o)) && (e[o] = a[o]);
1796
- }
1797
- return e;
1798
- });
1799
- const Ua = typeof window < "u" && window !== null;
1800
- Ba();
1801
- function Ba() {
1802
- return Ua && "IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype ? ("isIntersecting" in window.IntersectionObserverEntry.prototype || Object.defineProperty(window.IntersectionObserverEntry.prototype, "isIntersecting", {
1803
- get() {
1804
- return this.intersectionRatio > 0;
1805
- }
1806
- }), !0) : !1;
1807
- }
1808
- var Ka = (e, t) => {
1809
- const i = e.__vccOpts || e;
1810
- for (const [r, n] of t)
1811
- i[r] = n;
1812
- return i;
1813
- };
1814
- const Ga = Ee({
1815
- name: "Viewer",
1816
- props: {
1817
- images: {
1818
- type: Array,
1819
- default: () => []
1820
- },
1821
- rebuild: {
1822
- type: Boolean,
1823
- default: !1
1824
- },
1825
- trigger: {
1826
- type: Object,
1827
- default: null
1828
- },
1829
- options: {
1830
- type: Object,
1831
- default: () => null
1832
- }
1833
- },
1834
- emits: ["inited"],
1835
- setup(e, { emit: t }) {
1836
- let i;
1837
- const r = Ve();
1838
- function n() {
1839
- i = new Ae(r.value, e.options), t("inited", i);
1840
- }
1841
- function a() {
1842
- i && i.destroy();
1843
- }
1844
- function s() {
1845
- a(), n();
1846
- }
1847
- function l() {
1848
- i ? (i.update(), t("inited", i)) : n();
1849
- }
1850
- function h() {
1851
- e.rebuild ? s() : l();
1852
- }
1853
- const o = { deep: !0 };
1854
- return yt(() => e.images, () => wt(() => h()), o), yt(() => e.trigger, () => wt(() => h()), o), yt(() => e.options, () => wt(() => s()), o), Fe(() => n()), Me(() => a()), {
1855
- root: r,
1856
- createViewer: n,
1857
- rebuildViewer: s,
1858
- updateViewer: l,
1859
- destroyViewer: a
1860
- };
1861
- }
1862
- }), Za = { ref: "root" };
1863
- function Ja(e, t, i, r, n, a) {
1864
- return ft(), St("div", Za, [
1865
- Ye(e.$slots, "default", {
1866
- images: e.images,
1867
- options: e.options
1868
- })
1869
- ], 512);
1870
- }
1871
- var Qa = /* @__PURE__ */ Ka(Ga, [["render", Ja]]);
1872
- const ts = ["src"], es = /* @__PURE__ */ Ee({
1873
- __name: "ImageViewer",
1874
- props: {
1875
- image: null
1876
- },
1877
- setup(e) {
1878
- const t = e, i = We(() => t.image ? [{ src: t.image, index: 0 }] : []);
1879
- return (r, n) => (ft(), Xe(Tt(Qa), {
1880
- images: Tt(i),
1881
- style: { height: "100%" }
1882
- }, {
1883
- default: qe(() => [
1884
- (ft(!0), St(He, null, Ue(Tt(i), (a) => (ft(), St("img", {
1885
- alt: "图片",
1886
- src: a.src,
1887
- key: a.index,
1888
- class: "image"
1889
- }, null, 8, ts))), 128))
1890
- ]),
1891
- _: 1
1892
- }, 8, ["images"]));
1893
- }
1894
- });
1895
- const ns = /* @__PURE__ */ Be(es, [["__scopeId", "data-v-b0f61c51"]]);
1896
- export {
1897
- ns as default
1898
- };