@eternalheart/vue-file-preview 1.3.11 → 1.3.13

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 (229) hide show
  1. package/README.md +27 -0
  2. package/README.zh-CN.md +27 -0
  3. package/lib/FilePreviewContent.vue.d.ts.map +1 -1
  4. package/lib/chunks/{index-DLPnWmJm.mjs → index-B2lqsdp7.mjs} +2 -2
  5. package/lib/chunks/{index-DLPnWmJm.mjs.map → index-B2lqsdp7.mjs.map} +1 -1
  6. package/lib/chunks/{index-hRgOoqVw.mjs → index-BHi1WRQZ.mjs} +2 -2
  7. package/lib/chunks/{index-hRgOoqVw.mjs.map → index-BHi1WRQZ.mjs.map} +1 -1
  8. package/lib/chunks/{index-BHPmd4HF.mjs → index-BTW1xwB9.mjs} +2 -2
  9. package/lib/chunks/{index-BHPmd4HF.mjs.map → index-BTW1xwB9.mjs.map} +1 -1
  10. package/lib/chunks/{index-C0vSFXmh.mjs → index-BvegaxQF.mjs} +2 -2
  11. package/lib/chunks/{index-C0vSFXmh.mjs.map → index-BvegaxQF.mjs.map} +1 -1
  12. package/lib/chunks/{index-C65zV1vs.mjs → index-CYt6tpQC.mjs} +2 -2
  13. package/lib/chunks/{index-C65zV1vs.mjs.map → index-CYt6tpQC.mjs.map} +1 -1
  14. package/lib/chunks/{index-t1Plo3ud.mjs → index-Cjnw238n.mjs} +2 -2
  15. package/lib/chunks/{index-t1Plo3ud.mjs.map → index-Cjnw238n.mjs.map} +1 -1
  16. package/lib/chunks/{index-BT-U9HYI.mjs → index-Ctd0JQ6K.mjs} +2 -2
  17. package/lib/chunks/{index-BT-U9HYI.mjs.map → index-Ctd0JQ6K.mjs.map} +1 -1
  18. package/lib/chunks/index-CyrFxdIJ.mjs +318 -0
  19. package/lib/chunks/index-CyrFxdIJ.mjs.map +1 -0
  20. package/lib/chunks/{index-Cu1up6RM.mjs → index-DBw8tvyb.mjs} +2 -2
  21. package/lib/chunks/{index-Cu1up6RM.mjs.map → index-DBw8tvyb.mjs.map} +1 -1
  22. package/lib/chunks/{index-BKu5DkdG.mjs → index-DEoR7aDN.mjs} +2 -2
  23. package/lib/chunks/{index-BKu5DkdG.mjs.map → index-DEoR7aDN.mjs.map} +1 -1
  24. package/lib/chunks/{index-CMgtGmRN.mjs → index-DIe0vHlt.mjs} +9 -9
  25. package/lib/chunks/{index-CMgtGmRN.mjs.map → index-DIe0vHlt.mjs.map} +1 -1
  26. package/lib/chunks/index-DT9dPz8I.mjs +279 -0
  27. package/lib/chunks/index-DT9dPz8I.mjs.map +1 -0
  28. package/lib/chunks/{index-B9RAbllH.mjs → index-DTtHrdBl.mjs} +6 -6
  29. package/lib/chunks/{index-B9RAbllH.mjs.map → index-DTtHrdBl.mjs.map} +1 -1
  30. package/lib/chunks/{index-Dln8hyPZ.mjs → index-DX_NBPzS.mjs} +2 -2
  31. package/lib/chunks/{index-Dln8hyPZ.mjs.map → index-DX_NBPzS.mjs.map} +1 -1
  32. package/lib/chunks/{index-BA-SUKkf.mjs → index-Dw1U4YqT.mjs} +2 -2
  33. package/lib/chunks/{index-BA-SUKkf.mjs.map → index-Dw1U4YqT.mjs.map} +1 -1
  34. package/lib/chunks/{index-DNFQFaF3.mjs → index-DyipSoKh.mjs} +2 -2
  35. package/lib/chunks/{index-DNFQFaF3.mjs.map → index-DyipSoKh.mjs.map} +1 -1
  36. package/lib/chunks/{index-B3-ezDVJ.mjs → index-GGGDPwxX.mjs} +2 -2
  37. package/lib/chunks/{index-B3-ezDVJ.mjs.map → index-GGGDPwxX.mjs.map} +1 -1
  38. package/lib/chunks/{index-CQFN4h-t.mjs → index-Oxwizt6-.mjs} +609 -581
  39. package/lib/chunks/index-Oxwizt6-.mjs.map +1 -0
  40. package/lib/chunks/{index-CY2vJrBJ.mjs → index-Zwl5J-Uw.mjs} +2 -2
  41. package/lib/chunks/{index-CY2vJrBJ.mjs.map → index-Zwl5J-Uw.mjs.map} +1 -1
  42. package/lib/components/NavArrows.vue.d.ts +17 -0
  43. package/lib/components/NavArrows.vue.d.ts.map +1 -0
  44. package/lib/components/ResizableSplit.vue.d.ts +17 -2
  45. package/lib/components/ResizableSplit.vue.d.ts.map +1 -1
  46. package/lib/index.cjs +32 -32
  47. package/lib/index.cjs.map +1 -1
  48. package/lib/index.css +1 -1
  49. package/lib/index.mjs +1 -1
  50. package/lib/renderers/Image/index.vue.d.ts.map +1 -1
  51. package/lib/renderers/Text/index.vue.d.ts.map +1 -1
  52. package/lib/renderers/Xml/index.vue.d.ts.map +1 -1
  53. package/lib/renderers/Zip/index.vue.d.ts.map +1 -1
  54. package/package.json +1 -1
  55. package/lib/chunks/index-CQFN4h-t.mjs.map +0 -1
  56. package/lib/chunks/index-ijv9F2cZ.mjs +0 -280
  57. package/lib/chunks/index-ijv9F2cZ.mjs.map +0 -1
  58. package/lib/chunks/index-y7gaKu36.mjs +0 -234
  59. package/lib/chunks/index-y7gaKu36.mjs.map +0 -1
  60. package/lib/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
  61. package/lib/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
  62. package/lib/pdfjs/cmaps/78-H.bcmap +0 -0
  63. package/lib/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
  64. package/lib/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
  65. package/lib/pdfjs/cmaps/78-V.bcmap +0 -0
  66. package/lib/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
  67. package/lib/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
  68. package/lib/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
  69. package/lib/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
  70. package/lib/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
  71. package/lib/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
  72. package/lib/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
  73. package/lib/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
  74. package/lib/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
  75. package/lib/pdfjs/cmaps/Add-H.bcmap +0 -0
  76. package/lib/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
  77. package/lib/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
  78. package/lib/pdfjs/cmaps/Add-V.bcmap +0 -0
  79. package/lib/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
  80. package/lib/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
  81. package/lib/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
  82. package/lib/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
  83. package/lib/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
  84. package/lib/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
  85. package/lib/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
  86. package/lib/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  87. package/lib/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
  88. package/lib/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
  89. package/lib/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
  90. package/lib/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
  91. package/lib/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
  92. package/lib/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
  93. package/lib/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  94. package/lib/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
  95. package/lib/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
  96. package/lib/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
  97. package/lib/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
  98. package/lib/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
  99. package/lib/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
  100. package/lib/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
  101. package/lib/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  102. package/lib/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
  103. package/lib/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
  104. package/lib/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
  105. package/lib/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  106. package/lib/pdfjs/cmaps/B5-H.bcmap +0 -0
  107. package/lib/pdfjs/cmaps/B5-V.bcmap +0 -0
  108. package/lib/pdfjs/cmaps/B5pc-H.bcmap +0 -0
  109. package/lib/pdfjs/cmaps/B5pc-V.bcmap +0 -0
  110. package/lib/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
  111. package/lib/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
  112. package/lib/pdfjs/cmaps/CNS1-H.bcmap +0 -0
  113. package/lib/pdfjs/cmaps/CNS1-V.bcmap +0 -0
  114. package/lib/pdfjs/cmaps/CNS2-H.bcmap +0 -0
  115. package/lib/pdfjs/cmaps/CNS2-V.bcmap +0 -3
  116. package/lib/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
  117. package/lib/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
  118. package/lib/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
  119. package/lib/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
  120. package/lib/pdfjs/cmaps/ETenms-B5-H.bcmap +0 -3
  121. package/lib/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
  122. package/lib/pdfjs/cmaps/EUC-H.bcmap +0 -0
  123. package/lib/pdfjs/cmaps/EUC-V.bcmap +0 -0
  124. package/lib/pdfjs/cmaps/Ext-H.bcmap +0 -0
  125. package/lib/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
  126. package/lib/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
  127. package/lib/pdfjs/cmaps/Ext-V.bcmap +0 -0
  128. package/lib/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
  129. package/lib/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
  130. package/lib/pdfjs/cmaps/GB-H.bcmap +0 -4
  131. package/lib/pdfjs/cmaps/GB-V.bcmap +0 -0
  132. package/lib/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
  133. package/lib/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
  134. package/lib/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
  135. package/lib/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
  136. package/lib/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
  137. package/lib/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
  138. package/lib/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
  139. package/lib/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
  140. package/lib/pdfjs/cmaps/GBT-H.bcmap +0 -0
  141. package/lib/pdfjs/cmaps/GBT-V.bcmap +0 -0
  142. package/lib/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
  143. package/lib/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
  144. package/lib/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
  145. package/lib/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
  146. package/lib/pdfjs/cmaps/H.bcmap +0 -0
  147. package/lib/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
  148. package/lib/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
  149. package/lib/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
  150. package/lib/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
  151. package/lib/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
  152. package/lib/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
  153. package/lib/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
  154. package/lib/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
  155. package/lib/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
  156. package/lib/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
  157. package/lib/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
  158. package/lib/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
  159. package/lib/pdfjs/cmaps/Hankaku.bcmap +0 -0
  160. package/lib/pdfjs/cmaps/Hiragana.bcmap +0 -0
  161. package/lib/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
  162. package/lib/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
  163. package/lib/pdfjs/cmaps/KSC-H.bcmap +0 -0
  164. package/lib/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
  165. package/lib/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
  166. package/lib/pdfjs/cmaps/KSC-V.bcmap +0 -0
  167. package/lib/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
  168. package/lib/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  169. package/lib/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  170. package/lib/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
  171. package/lib/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
  172. package/lib/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
  173. package/lib/pdfjs/cmaps/Katakana.bcmap +0 -0
  174. package/lib/pdfjs/cmaps/LICENSE +0 -36
  175. package/lib/pdfjs/cmaps/NWP-H.bcmap +0 -0
  176. package/lib/pdfjs/cmaps/NWP-V.bcmap +0 -0
  177. package/lib/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
  178. package/lib/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
  179. package/lib/pdfjs/cmaps/Roman.bcmap +0 -0
  180. package/lib/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  181. package/lib/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  182. package/lib/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  183. package/lib/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  184. package/lib/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  185. package/lib/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  186. package/lib/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  187. package/lib/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  188. package/lib/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
  189. package/lib/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
  190. package/lib/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
  191. package/lib/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
  192. package/lib/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
  193. package/lib/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
  194. package/lib/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
  195. package/lib/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
  196. package/lib/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  197. package/lib/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  198. package/lib/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  199. package/lib/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  200. package/lib/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  201. package/lib/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  202. package/lib/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  203. package/lib/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  204. package/lib/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  205. package/lib/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  206. package/lib/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  207. package/lib/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  208. package/lib/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  209. package/lib/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  210. package/lib/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  211. package/lib/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  212. package/lib/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  213. package/lib/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  214. package/lib/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  215. package/lib/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  216. package/lib/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  217. package/lib/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  218. package/lib/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  219. package/lib/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
  220. package/lib/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
  221. package/lib/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
  222. package/lib/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
  223. package/lib/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
  224. package/lib/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
  225. package/lib/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
  226. package/lib/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
  227. package/lib/pdfjs/cmaps/V.bcmap +0 -0
  228. package/lib/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
  229. package/lib/pdfjs/pdf.worker.min.mjs +0 -21
@@ -1,9 +1,9 @@
1
- import { computed as M, unref as v, provide as re, inject as ye, ref as _, watch as q, onBeforeUnmount as ee, h as O, defineComponent as te, openBlock as f, createElementBlock as b, createElementVNode as P, toDisplayString as A, defineAsyncComponent as ht, createVNode as V, createTextVNode as gt, toRef as $e, onMounted as qe, Fragment as T, renderList as B, createBlock as C, resolveDynamicComponent as Q, createCommentVNode as I, normalizeStyle as ie, onUnmounted as bt, Teleport as wt, Transition as xt, withCtx as yt } from "vue";
2
- import { ZoomOut as Oe, ZoomIn as Ue, Scan as Ft, RotateCcw as kt, RotateCw as Ct, RefreshCw as He, List as Ve, ChevronLeft as Fe, ChevronRight as ke, Minimize2 as Ze, Maximize2 as Ge, WrapText as _t, Code as Xe, Eye as Ye, FileQuestion as zt, Download as Ke, X as Rt } from "lucide-vue-next";
3
- import Mt from "jszip";
4
- const jt = "1.3.11", Tt = {
5
- version: jt
6
- }, Tn = [
1
+ import { computed as M, unref as v, provide as ie, inject as xe, ref as C, watch as A, onBeforeUnmount as G, h as O, defineComponent as X, openBlock as f, createElementBlock as b, createElementVNode as T, toDisplayString as D, defineAsyncComponent as ft, createVNode as H, createTextVNode as pt, onMounted as we, Fragment as P, normalizeStyle as ae, createCommentVNode as L, toRef as Ee, renderList as q, createBlock as F, resolveDynamicComponent as Q, onUnmounted as mt, Teleport as vt, Transition as ht, withCtx as gt } from "vue";
2
+ import { ZoomOut as Ae, ZoomIn as Be, Scan as bt, RotateCcw as xt, RotateCw as wt, RefreshCw as qe, List as Oe, ChevronLeft as ye, ChevronRight as ke, Minimize2 as Ue, Maximize2 as He, WrapText as yt, Code as Ve, Eye as Ze, FileQuestion as kt, Download as Ge, X as Ft } from "lucide-vue-next";
3
+ import Ct from "jszip";
4
+ const _t = "1.3.13", Rt = {
5
+ version: _t
6
+ }, zn = [
7
7
  "image",
8
8
  "pdf",
9
9
  "docx",
@@ -23,7 +23,7 @@ const jt = "1.3.11", Tt = {
23
23
  "text",
24
24
  "font"
25
25
  ];
26
- function Pt(e) {
26
+ function zt(e) {
27
27
  try {
28
28
  const t = new URL(e).pathname.split("/").pop() || "file";
29
29
  return decodeURIComponent(t);
@@ -32,7 +32,7 @@ function Pt(e) {
32
32
  return decodeURIComponent(t);
33
33
  }
34
34
  }
35
- function ge(e) {
35
+ function ve(e) {
36
36
  var t;
37
37
  const o = ((t = e.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "";
38
38
  return {
@@ -109,36 +109,36 @@ function ge(e) {
109
109
  zip: "application/zip"
110
110
  }[o] || "application/octet-stream";
111
111
  }
112
- function Et(e, t = 0) {
112
+ function Mt(e, t = 0) {
113
113
  if (e instanceof File)
114
114
  return {
115
115
  id: `file-${Date.now()}-${t}`,
116
116
  name: e.name,
117
117
  url: URL.createObjectURL(e),
118
- type: e.type || ge(e.name),
118
+ type: e.type || ve(e.name),
119
119
  size: e.size
120
120
  };
121
121
  if (typeof e == "string") {
122
- const o = Pt(e);
122
+ const o = zt(e);
123
123
  return {
124
124
  id: `url-${Date.now()}-${t}`,
125
125
  name: o,
126
126
  url: e,
127
- type: ge(o)
127
+ type: ve(o)
128
128
  };
129
129
  }
130
130
  return {
131
131
  id: e.id || `link-${Date.now()}-${t}`,
132
132
  name: e.name,
133
133
  url: e.url,
134
- type: e.type || ge(e.name),
134
+ type: e.type || ve(e.name),
135
135
  size: e.size
136
136
  };
137
137
  }
138
- function St(e) {
139
- return e.map((t, o) => Et(t, o));
138
+ function jt(e) {
139
+ return e.map((t, o) => Mt(t, o));
140
140
  }
141
- function $t(e) {
141
+ function Pt(e) {
142
142
  var t;
143
143
  const o = ((t = e.name.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "", n = e.type.toLowerCase();
144
144
  if (n.startsWith("image/") || [
@@ -245,7 +245,7 @@ function $t(e) {
245
245
  ];
246
246
  return n.startsWith("text/") || i.includes(o) ? "text" : "unsupported";
247
247
  }
248
- function Pn(e) {
248
+ function Mn(e) {
249
249
  var t;
250
250
  const o = ((t = e.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "";
251
251
  return {
@@ -293,7 +293,7 @@ function Pn(e) {
293
293
  txt: "text"
294
294
  }[o] || "text";
295
295
  }
296
- function En(e) {
296
+ function jn(e) {
297
297
  var t;
298
298
  const o = ((t = e.split(".").pop()) == null ? void 0 : t.toLowerCase().split("?")[0]) || "";
299
299
  return {
@@ -309,19 +309,19 @@ function En(e) {
309
309
  flv: "video/x-flv"
310
310
  }[o] || "video/mp4";
311
311
  }
312
- function Nt(e) {
312
+ function Tt(e) {
313
313
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
314
314
  }
315
- function Sn(e) {
315
+ function Pn(e) {
316
316
  if (!isFinite(e) || isNaN(e) || e < 0) return "0:00";
317
317
  const t = Math.floor(e / 60), o = Math.floor(e % 60);
318
318
  return `${t}:${o.toString().padStart(2, "0")}`;
319
319
  }
320
- function $n(e) {
320
+ function Tn(e) {
321
321
  var t;
322
322
  return (((t = e.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "") === "tsv" ? " " : ",";
323
323
  }
324
- function Nn(e, t = {}) {
324
+ function En(e, t = {}) {
325
325
  const o = t.delimiter ?? ",", n = t.firstRowAsHeader ?? !0, i = [];
326
326
  let a = [], l = "", s = !1, r = 0;
327
327
  const u = e.length;
@@ -382,7 +382,7 @@ function Nn(e, t = {}) {
382
382
  delimiter: o
383
383
  };
384
384
  }
385
- function Lt(e) {
385
+ function Et(e) {
386
386
  const t = e instanceof Uint8Array ? e : new Uint8Array(e);
387
387
  if (t.length >= 3 && t[0] === 239 && t[1] === 187 && t[2] === 191)
388
388
  return new TextDecoder("utf-8").decode(t);
@@ -400,17 +400,17 @@ function Lt(e) {
400
400
  }
401
401
  return new TextDecoder("utf-8", { fatal: !1 }).decode(t);
402
402
  }
403
- async function Ln(e, t) {
403
+ async function Sn(e, t) {
404
404
  const o = !!t && ("fetcher" in t || "init" in t || "signal" in t), n = o ? t.fetcher ?? fetch : fetch, i = o ? t.signal : void 0, a = o ? t.init : t, l = i ? { ...a, signal: i } : a, s = await n(e, l);
405
405
  if (!s.ok) throw new Error(`请求失败: ${s.status}`);
406
406
  const r = await s.arrayBuffer();
407
- return Lt(r);
407
+ return Et(r);
408
408
  }
409
- async function Wt(e, t) {
409
+ async function St(e, t) {
410
410
  if (e)
411
411
  return typeof e == "function" ? await e(t) : e;
412
412
  }
413
- function It(e, t) {
413
+ function Nt(e, t) {
414
414
  if (!e && !t) return;
415
415
  if (!e) return t;
416
416
  if (!t) return e;
@@ -423,20 +423,20 @@ function It(e, t) {
423
423
  headers: o
424
424
  };
425
425
  }
426
- function Dt(e) {
426
+ function $t(e) {
427
427
  const t = (e == null ? void 0 : e.requestHandler) ?? ((n, i) => fetch(n, i)), o = e == null ? void 0 : e.requestInit;
428
428
  return async (n, i) => {
429
- const a = await Wt(o, n), l = It(a, i);
429
+ const a = await St(o, n), l = Nt(a, i);
430
430
  return t(n, l);
431
431
  };
432
432
  }
433
- async function At(e, t = fetch, o) {
433
+ async function Lt(e, t = fetch, o) {
434
434
  const n = await t(e, o);
435
435
  if (!n.ok) throw new Error(`请求失败: ${n.status}`);
436
436
  const i = await n.blob();
437
437
  return URL.createObjectURL(i);
438
438
  }
439
- async function Bt(e, t, o = fetch, n) {
439
+ async function Wt(e, t, o = fetch, n) {
440
440
  const i = await o(e, n);
441
441
  if (!i.ok) throw new Error(`请求失败: ${i.status}`);
442
442
  const a = await i.blob(), l = URL.createObjectURL(a);
@@ -447,7 +447,7 @@ async function Bt(e, t, o = fetch, n) {
447
447
  setTimeout(() => URL.revokeObjectURL(l), 1e3);
448
448
  }
449
449
  }
450
- function Ne(e) {
450
+ function Se(e) {
451
451
  const t = e.trim().replace(",", "."), o = t.split(":").map((n) => n.trim());
452
452
  if (o.length === 3) {
453
453
  const [n, i, a] = o;
@@ -459,17 +459,17 @@ function Ne(e) {
459
459
  }
460
460
  return Number(t) || 0;
461
461
  }
462
- function Wn(e) {
462
+ function Nn(e) {
463
463
  if (!isFinite(e) || e < 0) return "00:00:00.000";
464
464
  const t = Math.floor(e * 1e3), o = t % 1e3, n = Math.floor(t / 1e3) % 60, i = Math.floor(t / 6e4) % 60, a = Math.floor(t / 36e5), l = (s, r = 2) => s.toString().padStart(r, "0");
465
465
  return `${l(a)}:${l(i)}:${l(n)}.${l(o, 3)}`;
466
466
  }
467
- const Le = /(\d{1,2}:)?\d{1,2}:\d{1,2}[.,]\d{1,3}\s*-->\s*(\d{1,2}:)?\d{1,2}:\d{1,2}[.,]\d{1,3}/, qt = /^\s*\[\d{1,2}:\d{1,2}(?:[.:]\d{1,3})?\]/;
468
- function Ot(e) {
467
+ const Ne = /(\d{1,2}:)?\d{1,2}:\d{1,2}[.,]\d{1,3}\s*-->\s*(\d{1,2}:)?\d{1,2}:\d{1,2}[.,]\d{1,3}/, It = /^\s*\[\d{1,2}:\d{1,2}(?:[.:]\d{1,3})?\]/;
468
+ function Dt(e) {
469
469
  const t = e.replace(/^\uFEFF/, "").trimStart();
470
- return /^WEBVTT/.test(t) ? "vtt" : /^<\?xml/i.test(t) || /<tt\b[^>]*>/i.test(t) ? "ttml" : /^\[Script Info\]/im.test(t) || /^Dialogue:/m.test(t) ? /ScriptType:\s*v4\.00\s*$/im.test(t) ? "ssa" : "ass" : qt.test(t) || /^\[(ti|ar|al|au|by|length|offset|re|ve):/im.test(t) ? /<\d{1,2}:\d{1,2}(?:[.:]\d{1,3})?>/.test(t) ? "elrc" : "lrc" : "srt";
470
+ return /^WEBVTT/.test(t) ? "vtt" : /^<\?xml/i.test(t) || /<tt\b[^>]*>/i.test(t) ? "ttml" : /^\[Script Info\]/im.test(t) || /^Dialogue:/m.test(t) ? /ScriptType:\s*v4\.00\s*$/im.test(t) ? "ssa" : "ass" : It.test(t) || /^\[(ti|ar|al|au|by|length|offset|re|ve):/im.test(t) ? /<\d{1,2}:\d{1,2}(?:[.:]\d{1,3})?>/.test(t) ? "elrc" : "lrc" : "srt";
471
471
  }
472
- function We(e, t) {
472
+ function $e(e, t) {
473
473
  const o = e.replace(/\r\n?/g, `
474
474
  `).replace(/^\uFEFF/, "").split(`
475
475
  `), n = [];
@@ -485,16 +485,16 @@ function We(e, t) {
485
485
  for (; a < o.length && o[a].trim() === ""; ) a++;
486
486
  if (a >= o.length) break;
487
487
  let l, s = null;
488
- if (Le.test(o[a]))
488
+ if (Ne.test(o[a]))
489
489
  s = o[a], a++;
490
- else if (l = o[a].trim() || void 0, a++, a < o.length && Le.test(o[a]))
490
+ else if (l = o[a].trim() || void 0, a++, a < o.length && Ne.test(o[a]))
491
491
  s = o[a], a++;
492
492
  else
493
493
  continue;
494
494
  if (!s) continue;
495
495
  const r = s.match(/([\d:.,]+)\s*-->\s*([\d:.,]+)/);
496
496
  if (!r) continue;
497
- const u = Ne(r[1]), d = Ne(r[2]), m = [];
497
+ const u = Se(r[1]), d = Se(r[2]), m = [];
498
498
  for (; a < o.length && o[a].trim() !== ""; )
499
499
  m.push(o[a]), a++;
500
500
  n.push({ id: l, start: u, end: d, text: m.join(`
@@ -502,7 +502,7 @@ function We(e, t) {
502
502
  }
503
503
  return { format: t, cues: n, header: i };
504
504
  }
505
- function xe(e, t, o) {
505
+ function be(e, t, o) {
506
506
  const n = Number(e), i = Number(t);
507
507
  let a = 0;
508
508
  if (o) {
@@ -511,7 +511,7 @@ function xe(e, t, o) {
511
511
  }
512
512
  return n * 60 + i + a / 1e3;
513
513
  }
514
- function Je(e, t) {
514
+ function Xe(e, t) {
515
515
  const o = /^\[(ti|ar|al|au|by|length|offset|re|ve):(.*)\]$/i.exec(e.trim());
516
516
  if (!o) return !1;
517
517
  const n = o[1].toLowerCase(), i = o[2].trim();
@@ -521,19 +521,19 @@ function Je(e, t) {
521
521
  }
522
522
  return !0;
523
523
  }
524
- function Ut(e) {
524
+ function At(e) {
525
525
  const t = e.replace(/\r\n?/g, `
526
526
  `).replace(/^\uFEFF/, "").split(`
527
527
  `), o = { metadata: {}, offsetMs: 0 }, n = /\[(\d{1,2}):(\d{1,2})(?:[.:](\d{1,3}))?\]/g, i = [];
528
528
  for (const l of t) {
529
529
  const s = l.trim();
530
- if (!s || Je(s, o)) continue;
530
+ if (!s || Xe(s, o)) continue;
531
531
  const r = [];
532
532
  let u = 0;
533
533
  n.lastIndex = 0;
534
534
  let d;
535
535
  for (; (d = n.exec(s)) !== null && d.index === u; )
536
- r.push(xe(d[1], d[2], d[3])), u = d.index + d[0].length;
536
+ r.push(be(d[1], d[2], d[3])), u = d.index + d[0].length;
537
537
  if (r.length === 0) continue;
538
538
  const m = s.slice(u).trim();
539
539
  for (const p of r)
@@ -546,19 +546,19 @@ function Ut(e) {
546
546
  return { start: r, end: d, text: l.text };
547
547
  }), metadata: o.metadata };
548
548
  }
549
- function Ht(e) {
549
+ function Bt(e) {
550
550
  const t = e.replace(/\r\n?/g, `
551
551
  `).replace(/^\uFEFF/, "").split(`
552
552
  `), o = { metadata: {}, offsetMs: 0 }, n = /\[(\d{1,2}):(\d{1,2})(?:[.:](\d{1,3}))?\]/g, i = /<(\d{1,2}):(\d{1,2})(?:[.:](\d{1,3}))?>/g, a = [];
553
553
  for (const s of t) {
554
554
  const r = s.trim();
555
- if (!r || Je(r, o)) continue;
555
+ if (!r || Xe(r, o)) continue;
556
556
  const u = [];
557
557
  let d = 0;
558
558
  n.lastIndex = 0;
559
559
  let m;
560
560
  for (; (m = n.exec(r)) !== null && m.index === d; )
561
- u.push(xe(m[1], m[2], m[3])), d = m.index + m[0].length;
561
+ u.push(be(m[1], m[2], m[3])), d = m.index + m[0].length;
562
562
  if (u.length === 0) continue;
563
563
  const p = r.slice(d);
564
564
  for (const c of u)
@@ -572,25 +572,25 @@ function Ht(e) {
572
572
  i.lastIndex = 0;
573
573
  let c;
574
574
  for (; (c = i.exec(s.raw)) !== null; ) {
575
- const S = s.raw.slice(m, c.index);
576
- p !== null && S && u.push({ start: Math.max(0, p - l), text: S }), d += S, p = xe(c[1], c[2], c[3]), m = c.index + c[0].length;
575
+ const h = s.raw.slice(m, c.index);
576
+ p !== null && h && u.push({ start: Math.max(0, p - l), text: h }), d += h, p = be(c[1], c[2], c[3]), m = c.index + c[0].length;
577
577
  }
578
578
  const w = s.raw.slice(m);
579
579
  p !== null && w && u.push({ start: Math.max(0, p - l), text: w }), d += w;
580
- const R = Math.max(0, s.start - l), $ = a[r + 1], k = $ ? Math.max(R, $.start - l) : R + 5;
580
+ const _ = Math.max(0, s.start - l), S = a[r + 1], j = S ? Math.max(_, S.start - l) : _ + 5;
581
581
  return {
582
- start: R,
583
- end: k,
582
+ start: _,
583
+ end: j,
584
584
  text: d.trim(),
585
585
  words: u.length ? u : void 0
586
586
  };
587
587
  }), metadata: o.metadata };
588
588
  }
589
- function Ie(e) {
589
+ function Le(e) {
590
590
  const t = e.trim().split(":");
591
591
  return t.length !== 3 ? 0 : Number(t[0]) * 3600 + Number(t[1]) * 60 + Number(t[2].replace(",", "."));
592
592
  }
593
- function De(e, t) {
593
+ function We(e, t) {
594
594
  const o = e.replace(/\r\n?/g, `
595
595
  `).replace(/^\uFEFF/, "").split(`
596
596
  `);
@@ -608,19 +608,19 @@ function De(e, t) {
608
608
  }
609
609
  const m = /^Format:\s*(.+)$/i.exec(u);
610
610
  if (m) {
611
- i = m[1].split(",").map((L) => L.trim());
611
+ i = m[1].split(",").map((I) => I.trim());
612
612
  continue;
613
613
  }
614
614
  const p = /^(Dialogue|Comment):\s*(.+)$/i.exec(u);
615
615
  if (!p || p[1].toLowerCase() === "comment" || i.length === 0) continue;
616
- const c = i.length, w = p[2].split(","), R = w.slice(0, c - 1), $ = w.slice(c - 1).join(","), k = {};
617
- i.forEach((L, g) => {
618
- k[L] = g === c - 1 ? $ : R[g] ?? "";
616
+ const c = i.length, w = p[2].split(","), _ = w.slice(0, c - 1), S = w.slice(c - 1).join(","), j = {};
617
+ i.forEach((I, x) => {
618
+ j[I] = x === c - 1 ? S : _[x] ?? "";
619
619
  });
620
- const S = Ie(k.Start || ""), U = Ie(k.End || ""), X = (k.Text || "").replace(/\\N/g, `
620
+ const h = Le(j.Start || ""), R = Le(j.End || ""), B = (j.Text || "").replace(/\\N/g, `
621
621
  `).replace(/\\n/g, `
622
622
  `).replace(/\\h/g, " ").replace(/\{[^}]*\}/g, "");
623
- a.push({ start: S, end: U, text: X, style: k.Style });
623
+ a.push({ start: h, end: R, text: B, style: j.Style });
624
624
  }
625
625
  return a.sort((s, r) => s.start - r.start), {
626
626
  format: t,
@@ -629,7 +629,7 @@ function De(e, t) {
629
629
  `).trim() || void 0
630
630
  };
631
631
  }
632
- function G(e) {
632
+ function Z(e) {
633
633
  const t = e.trim();
634
634
  if (!t) return 0;
635
635
  const o = /^(\d+(?:\.\d+)?)(h|m|s|ms|f|t)$/i.exec(t);
@@ -640,18 +640,18 @@ function G(e) {
640
640
  const n = t.split(":");
641
641
  return n.length === 3 ? Number(n[0]) * 3600 + Number(n[1]) * 60 + Number(n[2]) : n.length === 2 ? Number(n[0]) * 60 + Number(n[1]) : Number(t) || 0;
642
642
  }
643
- function Vt(e) {
643
+ function qt(e) {
644
644
  return e.replace(/&#x([0-9a-fA-F]+);/g, (t, o) => String.fromCharCode(parseInt(o, 16))).replace(/&#(\d+);/g, (t, o) => String.fromCharCode(Number(o))).replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&apos;/g, "'").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&");
645
645
  }
646
- function Zt(e) {
646
+ function Ot(e) {
647
647
  var t, o, n;
648
648
  const i = [], a = /<(?:[\w-]+:)?p\b([^>]*)>([\s\S]*?)<\/(?:[\w-]+:)?p\s*>/gi;
649
649
  let l;
650
650
  for (; (l = a.exec(e)) !== null; ) {
651
- const s = l[1], r = l[2], u = ((t = /\bbegin\s*=\s*["']([^"']+)["']/i.exec(s)) == null ? void 0 : t[1]) || "", d = ((o = /\bend\s*=\s*["']([^"']+)["']/i.exec(s)) == null ? void 0 : o[1]) || "", m = ((n = /\bdur\s*=\s*["']([^"']+)["']/i.exec(s)) == null ? void 0 : n[1]) || "", p = G(u);
651
+ const s = l[1], r = l[2], u = ((t = /\bbegin\s*=\s*["']([^"']+)["']/i.exec(s)) == null ? void 0 : t[1]) || "", d = ((o = /\bend\s*=\s*["']([^"']+)["']/i.exec(s)) == null ? void 0 : o[1]) || "", m = ((n = /\bdur\s*=\s*["']([^"']+)["']/i.exec(s)) == null ? void 0 : n[1]) || "", p = Z(u);
652
652
  let c;
653
- d ? c = G(d) : m ? c = p + G(m) : c = p + 5;
654
- const w = Vt(
653
+ d ? c = Z(d) : m ? c = p + Z(m) : c = p + 5;
654
+ const w = qt(
655
655
  r.replace(/<(?:[\w-]+:)?br\s*\/?>/gi, `
656
656
  `).replace(/<[^>]+>/g, "")
657
657
  ).replace(/[ \t]+/g, " ").replace(/\n /g, `
@@ -660,7 +660,7 @@ function Zt(e) {
660
660
  }
661
661
  return i.sort((s, r) => s.start - r.start), { format: "ttml", cues: i };
662
662
  }
663
- function Gt(e) {
663
+ function Ut(e) {
664
664
  const t = e.replace(/^\uFEFF/, "");
665
665
  if (typeof DOMParser < "u") {
666
666
  const o = new DOMParser().parseFromString(t, "application/xml");
@@ -669,17 +669,17 @@ function Gt(e) {
669
669
  if (n.length > 0) {
670
670
  const i = [];
671
671
  for (let a = 0; a < n.length; a++) {
672
- const l = n[a], s = l.getAttribute("begin") || "", r = l.getAttribute("end") || "", u = l.getAttribute("dur") || "", d = G(s);
672
+ const l = n[a], s = l.getAttribute("begin") || "", r = l.getAttribute("end") || "", u = l.getAttribute("dur") || "", d = Z(s);
673
673
  let m;
674
- r ? m = G(r) : u ? m = d + G(u) : m = d + 5;
674
+ r ? m = Z(r) : u ? m = d + Z(u) : m = d + 5;
675
675
  let p = "";
676
676
  l.childNodes.forEach((w) => {
677
677
  if (w.nodeType === 3)
678
678
  p += w.nodeValue || "";
679
679
  else if (w.nodeType === 1) {
680
- const R = w;
681
- (R.localName || R.tagName).toLowerCase() === "br" ? p += `
682
- ` : p += R.textContent || "";
680
+ const _ = w;
681
+ (_.localName || _.tagName).toLowerCase() === "br" ? p += `
682
+ ` : p += _.textContent || "";
683
683
  }
684
684
  });
685
685
  const c = p.replace(/[ \t]+/g, " ").replace(/\n /g, `
@@ -690,31 +690,31 @@ function Gt(e) {
690
690
  }
691
691
  }
692
692
  }
693
- return Zt(t);
693
+ return Ot(t);
694
694
  }
695
- function In(e, t) {
696
- switch (t ?? Ot(e)) {
695
+ function $n(e, t) {
696
+ switch (t ?? Dt(e)) {
697
697
  case "lrc":
698
- return Ut(e);
698
+ return At(e);
699
699
  case "elrc":
700
- return Ht(e);
700
+ return Bt(e);
701
701
  case "ass":
702
- return De(e, "ass");
702
+ return We(e, "ass");
703
703
  case "ssa":
704
- return De(e, "ssa");
704
+ return We(e, "ssa");
705
705
  case "ttml":
706
- return Gt(e);
706
+ return Ut(e);
707
707
  case "vtt":
708
- return We(e, "vtt");
708
+ return $e(e, "vtt");
709
709
  case "srt":
710
710
  default:
711
- return We(e, "srt");
711
+ return $e(e, "srt");
712
712
  }
713
713
  }
714
- async function Dn(e) {
715
- return Mt.loadAsync(e);
714
+ async function Ln(e) {
715
+ return Ct.loadAsync(e);
716
716
  }
717
- function An(e) {
717
+ function Wn(e) {
718
718
  const t = [];
719
719
  return e.forEach((o, n) => {
720
720
  var i;
@@ -729,7 +729,7 @@ function An(e) {
729
729
  });
730
730
  }), t;
731
731
  }
732
- function Bn(e) {
732
+ function In(e) {
733
733
  const t = { name: "", path: "", isDir: !0, children: [], size: 0 }, o = /* @__PURE__ */ new Map();
734
734
  o.set("", t);
735
735
  const n = (a) => {
@@ -763,16 +763,16 @@ function Bn(e) {
763
763
  };
764
764
  return i(t), t;
765
765
  }
766
- async function qn(e, t, o) {
766
+ async function Dn(e, t, o) {
767
767
  const n = e.file(t);
768
768
  if (!n) throw new Error(`ZIP entry not found: ${t}`);
769
769
  const i = await n.async("arraybuffer");
770
770
  return new Blob([i], o ? { type: o } : void 0);
771
771
  }
772
- function Xt(e) {
772
+ function Ht(e) {
773
773
  return e ? e.startsWith("#") ? e : e.length === 8 ? "#" + e.substring(2) : e.length === 6 ? "#" + e : "#000000" : "#000000";
774
774
  }
775
- const Yt = [
775
+ const Vt = [
776
776
  "FFFFFF",
777
777
  "000000",
778
778
  "E7E6E6",
@@ -783,7 +783,7 @@ const Yt = [
783
783
  "FFC000",
784
784
  "5B9BD5",
785
785
  "70AD47"
786
- ], Kt = [
786
+ ], Zt = [
787
787
  "000000",
788
788
  "FFFFFF",
789
789
  "FF0000",
@@ -849,48 +849,48 @@ const Yt = [
849
849
  "333399",
850
850
  "333333"
851
851
  ];
852
- function Jt(e, t) {
852
+ function Gt(e, t) {
853
853
  const o = parseInt(e.substring(0, 2), 16), n = parseInt(e.substring(2, 4), 16), i = parseInt(e.substring(4, 6), 16), a = (u) => t < 0 ? Math.round(u * (1 + t)) : Math.round(u + (255 - u) * t), l = Math.min(255, Math.max(0, a(o))), s = Math.min(255, Math.max(0, a(n))), r = Math.min(255, Math.max(0, a(i)));
854
854
  return l.toString(16).padStart(2, "0") + s.toString(16).padStart(2, "0") + r.toString(16).padStart(2, "0");
855
855
  }
856
- function Qt(e) {
856
+ function Xt(e) {
857
857
  if (e && e.type === "pattern" && e.pattern === "solid") {
858
858
  const t = e.fgColor;
859
859
  if (t)
860
- return Ce(t);
860
+ return Fe(t);
861
861
  }
862
862
  }
863
- function Ce(e) {
863
+ function Fe(e) {
864
864
  if (e) {
865
865
  if ("argb" in e && typeof e.argb == "string" && e.argb)
866
- return Xt(e.argb);
866
+ return Ht(e.argb);
867
867
  if ("theme" in e && typeof e.theme == "number") {
868
- const t = Yt[e.theme] || "000000", o = "tint" in e && typeof e.tint == "number" ? e.tint : 0;
869
- return "#" + (o !== 0 ? Jt(t, o) : t);
868
+ const t = Vt[e.theme] || "000000", o = "tint" in e && typeof e.tint == "number" ? e.tint : 0;
869
+ return "#" + (o !== 0 ? Gt(t, o) : t);
870
870
  }
871
871
  if ("indexed" in e && typeof e.indexed == "number") {
872
- const t = Kt[e.indexed];
872
+ const t = Zt[e.indexed];
873
873
  if (t) return "#" + t;
874
874
  }
875
875
  }
876
876
  }
877
- function eo(e) {
877
+ function Kt(e) {
878
878
  if (!e || !e.style) return;
879
- const t = Ce(e.color) || "#000000";
879
+ const t = Fe(e.color) || "#000000";
880
880
  return [e.style, t];
881
881
  }
882
- function to(e) {
882
+ function Yt(e) {
883
883
  const t = {};
884
884
  let o = !1;
885
885
  if (e.font) {
886
886
  const i = e.font;
887
887
  if ((i.name || i.size || i.bold || i.italic) && (o = !0, t.font = {}, i.name && (t.font.name = i.name), i.size && (t.font.size = i.size), i.bold && (t.font.bold = !0), i.italic && (t.font.italic = !0)), i.color) {
888
- const a = Ce(i.color);
888
+ const a = Fe(i.color);
889
889
  a && (o = !0, t.color = a);
890
890
  }
891
891
  i.underline && (o = !0, t.underline = !0), i.strike && (o = !0, t.strike = !0);
892
892
  }
893
- const n = Qt(e.fill);
893
+ const n = Xt(e.fill);
894
894
  if (n && (o = !0, t.bgcolor = n), e.alignment) {
895
895
  const i = e.alignment;
896
896
  i.horizontal && (o = !0, t.align = i.horizontal), i.vertical && (o = !0, t.valign = i.vertical), i.wrapText && (o = !0, t.textwrap = !0);
@@ -900,25 +900,25 @@ function to(e) {
900
900
  let a = !1;
901
901
  const l = ["top", "bottom", "left", "right"];
902
902
  for (const s of l) {
903
- const r = eo(e.border[s]);
903
+ const r = Kt(e.border[s]);
904
904
  r && (i[s] = r, a = !0);
905
905
  }
906
906
  a && (o = !0, t.border = i);
907
907
  }
908
908
  return o ? t : null;
909
909
  }
910
- function oo(e) {
910
+ function Jt(e) {
911
911
  return JSON.stringify(e);
912
912
  }
913
- function no(e, t, o) {
914
- const n = to(e);
913
+ function Qt(e, t, o) {
914
+ const n = Yt(e);
915
915
  if (!n) return -1;
916
- const i = oo(n), a = o.get(i);
916
+ const i = Jt(n), a = o.get(i);
917
917
  if (a !== void 0) return a;
918
918
  const l = t.length;
919
919
  return t.push(n), o.set(i, l), l;
920
920
  }
921
- function ao(e) {
921
+ function eo(e) {
922
922
  const t = e.value;
923
923
  if (t == null) return "";
924
924
  if (typeof t == "string") return t;
@@ -932,8 +932,8 @@ function ao(e) {
932
932
  }
933
933
  return typeof t == "object" && "richText" in t ? t.richText.map((o) => o.text).join("") : typeof t == "object" && "hyperlink" in t ? t.text || "" : typeof t == "object" && "error" in t ? String(t.error) : String(t);
934
934
  }
935
- function io(e) {
936
- const t = e.split(":"), o = Ae(t[0]), n = t[1] ? Ae(t[1]) : o;
935
+ function to(e) {
936
+ const t = e.split(":"), o = Ie(t[0]), n = t[1] ? Ie(t[1]) : o;
937
937
  return {
938
938
  top: o.row,
939
939
  left: o.col,
@@ -941,7 +941,7 @@ function io(e) {
941
941
  right: n.col
942
942
  };
943
943
  }
944
- function Ae(e) {
944
+ function Ie(e) {
945
945
  const t = e.match(/^([A-Z]+)(\d+)$/);
946
946
  if (!t) return { row: 1, col: 1 };
947
947
  const o = t[1], n = parseInt(t[2], 10);
@@ -950,7 +950,7 @@ function Ae(e) {
950
950
  i = i * 26 + (o.charCodeAt(a) - 64);
951
951
  return { row: n, col: i };
952
952
  }
953
- function On(e) {
953
+ function An(e) {
954
954
  const t = [];
955
955
  return e.eachSheet((o) => {
956
956
  const n = [], i = /* @__PURE__ */ new Map(), a = [], l = {}, s = {}, r = o.columnCount;
@@ -962,21 +962,21 @@ function On(e) {
962
962
  const u = /* @__PURE__ */ new Map(), d = o.model, m = (d == null ? void 0 : d.merges) || [];
963
963
  for (const p of m) {
964
964
  a.push(p);
965
- const { top: c, left: w, bottom: R, right: $ } = io(p), k = R - c, S = $ - w;
966
- u.set(`${c - 1},${w - 1}`, [k, S]);
965
+ const { top: c, left: w, bottom: _, right: S } = to(p), j = _ - c, h = S - w;
966
+ u.set(`${c - 1},${w - 1}`, [j, h]);
967
967
  }
968
968
  o.eachRow({ includeEmpty: !0 }, (p, c) => {
969
- const w = c - 1, R = {};
970
- p.eachCell({ includeEmpty: !1 }, (k, S) => {
971
- const U = S - 1;
972
- if (k.isMerged && k.master !== k) return;
973
- const X = ao(k), L = no(k, n, i), g = { text: X };
974
- L !== -1 && (g.style = L);
975
- const j = `${w},${U}`;
976
- u.has(j) && (g.merge = u.get(j)), R[String(U)] = g;
969
+ const w = c - 1, _ = {};
970
+ p.eachCell({ includeEmpty: !1 }, (j, h) => {
971
+ const R = h - 1;
972
+ if (j.isMerged && j.master !== j) return;
973
+ const B = eo(j), I = Qt(j, n, i), x = { text: B };
974
+ I !== -1 && (x.style = I);
975
+ const ee = `${w},${R}`;
976
+ u.has(ee) && (x.merge = u.get(ee)), _[String(R)] = x;
977
977
  });
978
- const $ = { cells: R };
979
- p.height && ($.height = Math.round(p.height * 1.333)), l[String(w)] = $;
978
+ const S = { cells: _ };
979
+ p.height && (S.height = Math.round(p.height * 1.333)), l[String(w)] = S;
980
980
  }), t.push({
981
981
  name: o.name,
982
982
  styles: n,
@@ -986,7 +986,7 @@ function On(e) {
986
986
  });
987
987
  }), t;
988
988
  }
989
- function Un(e, t, o = "Sheet1") {
989
+ function Bn(e, t, o = "Sheet1") {
990
990
  const n = e.length > 0, i = n ? [{ font: { bold: !0 } }] : [], a = {};
991
991
  if (n) {
992
992
  const s = {};
@@ -1002,7 +1002,7 @@ function Un(e, t, o = "Sheet1") {
1002
1002
  }), a[String(r + l)] = { cells: u };
1003
1003
  }), [{ name: o, styles: i, rows: a }];
1004
1004
  }
1005
- function Hn(e, t) {
1005
+ function qn(e, t) {
1006
1006
  var o;
1007
1007
  if (typeof window > "u") return;
1008
1008
  const n = (e == null ? void 0 : e.version) || ((o = e == null ? void 0 : e.GlobalWorkerOptions) == null ? void 0 : o.version) || "", {
@@ -1012,7 +1012,7 @@ function Hn(e, t) {
1012
1012
  } = t || {};
1013
1013
  e.GlobalWorkerOptions && (e.GlobalWorkerOptions.workerSrc = i, e.GlobalWorkerOptions.cMapUrl = a, e.GlobalWorkerOptions.cMapPacked = l);
1014
1014
  }
1015
- const lo = {
1015
+ const oo = {
1016
1016
  // ─────── common ───────
1017
1017
  "common.download": "下载",
1018
1018
  "common.close": "关闭",
@@ -1129,7 +1129,7 @@ const lo = {
1129
1129
  "font.meta.glyphs": "字形数量",
1130
1130
  "font.meta.format": "格式",
1131
1131
  "font.sample_text_placeholder": "输入自定义文本..."
1132
- }, ro = {
1132
+ }, no = {
1133
1133
  // ─────── common ───────
1134
1134
  "common.download": "Download",
1135
1135
  "common.close": "Close",
@@ -1246,25 +1246,25 @@ const lo = {
1246
1246
  "font.meta.glyphs": "Glyphs",
1247
1247
  "font.meta.format": "Format",
1248
1248
  "font.sample_text_placeholder": "Type custom text..."
1249
- }, le = {
1250
- "zh-CN": lo,
1251
- "en-US": ro
1252
- }, so = /\{(\w+)\}/g;
1253
- function uo(e, t) {
1254
- return t ? e.replace(so, (o, n) => {
1249
+ }, ne = {
1250
+ "zh-CN": oo,
1251
+ "en-US": no
1252
+ }, ao = /\{(\w+)\}/g;
1253
+ function io(e, t) {
1254
+ return t ? e.replace(ao, (o, n) => {
1255
1255
  const i = t[n];
1256
1256
  return i === void 0 ? `{${n}}` : String(i);
1257
1257
  }) : e;
1258
1258
  }
1259
- function Qe(e) {
1259
+ function Ke(e) {
1260
1260
  var t;
1261
- const o = e.fallbackLocale ?? "zh-CN", n = le[e.locale] ?? le[o] ?? le["zh-CN"], i = (t = e.messages) == null ? void 0 : t[e.locale], a = i ? { ...n, ...i } : n, l = le["zh-CN"];
1261
+ const o = e.fallbackLocale ?? "zh-CN", n = ne[e.locale] ?? ne[o] ?? ne["zh-CN"], i = (t = e.messages) == null ? void 0 : t[e.locale], a = i ? { ...n, ...i } : n, l = ne["zh-CN"];
1262
1262
  return (s, r) => {
1263
1263
  const u = a[s] ?? l[s] ?? s;
1264
- return uo(u, r);
1264
+ return io(u, r);
1265
1265
  };
1266
1266
  }
1267
- const co = {
1267
+ const lo = {
1268
1268
  // 标准图片格式
1269
1269
  jpg: "image/jpeg",
1270
1270
  jpeg: "image/jpeg",
@@ -1345,16 +1345,16 @@ const co = {
1345
1345
  ttml: "application/ttml+xml",
1346
1346
  dfxp: "application/ttml+xml"
1347
1347
  };
1348
- function fo(e) {
1348
+ function ro(e) {
1349
1349
  const t = e.toLowerCase();
1350
- return co[t] || "application/octet-stream";
1350
+ return lo[t] || "application/octet-stream";
1351
1351
  }
1352
- function po(e) {
1352
+ function so(e) {
1353
1353
  var t;
1354
1354
  const o = ((t = e.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "";
1355
- return fo(o);
1355
+ return ro(o);
1356
1356
  }
1357
- function mo(e) {
1357
+ function uo(e) {
1358
1358
  return [
1359
1359
  "image/heic",
1360
1360
  "image/heif",
@@ -1371,33 +1371,33 @@ function mo(e) {
1371
1371
  "image/jpx"
1372
1372
  ].includes(e);
1373
1373
  }
1374
- const be = /* @__PURE__ */ new Map();
1375
- async function Vn(e) {
1376
- if (be.has(e))
1377
- return be.get(e);
1378
- if (!mo(e))
1374
+ const he = /* @__PURE__ */ new Map();
1375
+ async function On(e) {
1376
+ if (he.has(e))
1377
+ return he.get(e);
1378
+ if (!uo(e))
1379
1379
  return null;
1380
1380
  try {
1381
1381
  let t = null;
1382
- return e === "image/heic" || e === "image/heif" ? t = (await import("./heicLoader-CH_raQNn-1fBLaICM.mjs")).default : e === "image/avif" ? t = (await import("./avifLoader-BP3fgcMm-BnpxLhxp.mjs")).default : e === "image/tiff" ? t = (await import("./tiffLoader-CTFKVLqJ-B84NfwhR.mjs")).default : e === "image/x-canon-cr2" || e === "image/x-nikon-nef" || e === "image/x-sony-arw" || e === "image/x-adobe-dng" || e === "image/x-fuji-raf" || e === "image/x-olympus-orf" ? t = (await import("./rawLoader-0mLvxCNp-CJmERiK7.mjs")).default : e === "image/vnd.adobe.photoshop" ? t = (await import("./psdLoader-Doxw3mWm-DVOGFSlh.mjs")).default : (e === "image/jp2" || e === "image/jpx") && (t = (await import("./jp2Loader-Bn-qPMbD-Bn-qPMbD.mjs")).default), t && be.set(e, t), t;
1382
+ return e === "image/heic" || e === "image/heif" ? t = (await import("./heicLoader-CH_raQNn-1fBLaICM.mjs")).default : e === "image/avif" ? t = (await import("./avifLoader-BP3fgcMm-BnpxLhxp.mjs")).default : e === "image/tiff" ? t = (await import("./tiffLoader-CTFKVLqJ-B84NfwhR.mjs")).default : e === "image/x-canon-cr2" || e === "image/x-nikon-nef" || e === "image/x-sony-arw" || e === "image/x-adobe-dng" || e === "image/x-fuji-raf" || e === "image/x-olympus-orf" ? t = (await import("./rawLoader-0mLvxCNp-CJmERiK7.mjs")).default : e === "image/vnd.adobe.photoshop" ? t = (await import("./psdLoader-Doxw3mWm-DVOGFSlh.mjs")).default : (e === "image/jp2" || e === "image/jpx") && (t = (await import("./jp2Loader-Bn-qPMbD-Bn-qPMbD.mjs")).default), t && he.set(e, t), t;
1383
1383
  } catch (t) {
1384
1384
  return console.warn(`Failed to load image decoder for ${e}:`, t), null;
1385
1385
  }
1386
1386
  }
1387
- async function Zn(e) {
1387
+ async function Un(e) {
1388
1388
  if (e.type && e.type !== "application/octet-stream")
1389
1389
  return e.type;
1390
- const t = po(e.name);
1390
+ const t = so(e.name);
1391
1391
  if (t !== "application/octet-stream")
1392
1392
  return t;
1393
1393
  if (e instanceof Blob || e instanceof File) {
1394
- const o = await vo(e);
1394
+ const o = await co(e);
1395
1395
  if (o !== "application/octet-stream")
1396
1396
  return o;
1397
1397
  }
1398
1398
  return "application/octet-stream";
1399
1399
  }
1400
- async function vo(e) {
1400
+ async function co(e) {
1401
1401
  try {
1402
1402
  const t = new Uint8Array(await e.slice(0, 12).arrayBuffer());
1403
1403
  if (t[4] === 102 && t[5] === 116 && t[6] === 121 && t[7] === 112) {
@@ -1418,64 +1418,64 @@ async function vo(e) {
1418
1418
  }
1419
1419
  return "application/octet-stream";
1420
1420
  }
1421
- const et = Symbol("file-preview-locale");
1422
- function ho(e, t) {
1421
+ const Ye = Symbol("file-preview-locale");
1422
+ function fo(e, t) {
1423
1423
  const o = M(() => v(e) ?? "zh-CN"), n = M(
1424
- () => Qe({ locale: o.value, messages: v(t) })
1424
+ () => Ke({ locale: o.value, messages: v(t) })
1425
1425
  );
1426
- re(et, { locale: o, t: n });
1426
+ ie(Ye, { locale: o, t: n });
1427
1427
  }
1428
- let we = null;
1429
- function go() {
1430
- return we || (we = Qe({ locale: "zh-CN" })), we;
1428
+ let ge = null;
1429
+ function po() {
1430
+ return ge || (ge = Ke({ locale: "zh-CN" })), ge;
1431
1431
  }
1432
- function _e() {
1433
- const e = ye(et, null);
1432
+ function Ce() {
1433
+ const e = xe(Ye, null);
1434
1434
  if (e) return e;
1435
- const t = M(() => "zh-CN"), o = M(() => go());
1435
+ const t = M(() => "zh-CN"), o = M(() => po());
1436
1436
  return { locale: t, t: o };
1437
1437
  }
1438
- const tt = Symbol("vfp-resolved-theme");
1439
- function bo(e) {
1438
+ const Je = Symbol("vfp-resolved-theme");
1439
+ function mo(e) {
1440
1440
  const t = M(() => v(e));
1441
- re(tt, t);
1441
+ ie(Je, t);
1442
1442
  }
1443
- function Gn() {
1444
- const e = ye(tt, null);
1443
+ function Hn() {
1444
+ const e = xe(Je, null);
1445
1445
  return e || M(() => "dark");
1446
1446
  }
1447
- const ot = Symbol("file-preview:request");
1448
- function wo(e) {
1447
+ const Qe = Symbol("file-preview:request");
1448
+ function vo(e) {
1449
1449
  const t = M(() => {
1450
1450
  const o = typeof e == "function" ? e() : e;
1451
1451
  return {
1452
- fetcher: Dt({
1452
+ fetcher: $t({
1453
1453
  requestInit: o.requestInit,
1454
1454
  requestHandler: o.requestHandler
1455
1455
  }),
1456
1456
  shouldFetchAsBlob: o.shouldFetchAsBlob
1457
1457
  };
1458
1458
  });
1459
- return re(ot, t), t;
1459
+ return ie(Qe, t), t;
1460
1460
  }
1461
- function xo() {
1461
+ function ho() {
1462
1462
  return { fetcher: (e, t) => fetch(e, t) };
1463
1463
  }
1464
- function nt() {
1465
- const e = ye(ot, void 0);
1466
- return e || M(() => xo());
1464
+ function et() {
1465
+ const e = xe(Qe, void 0);
1466
+ return e || M(() => ho());
1467
1467
  }
1468
- function yo() {
1469
- const e = nt();
1468
+ function go() {
1469
+ const e = et();
1470
1470
  return M(() => e.value.fetcher);
1471
1471
  }
1472
- function Fo(e) {
1473
- const t = nt(), o = _("");
1472
+ function bo(e) {
1473
+ const t = et(), o = C("");
1474
1474
  let n = null;
1475
1475
  const i = () => {
1476
1476
  n && (URL.revokeObjectURL(n), n = null);
1477
1477
  };
1478
- return q(
1478
+ return A(
1479
1479
  () => {
1480
1480
  var s, r;
1481
1481
  const a = e.value, l = !!(a && ((r = (s = t.value).shouldFetchAsBlob) != null && r.call(s, a)));
@@ -1491,7 +1491,7 @@ function Fo(e) {
1491
1491
  d = !0;
1492
1492
  }), o.value = "";
1493
1493
  try {
1494
- const m = await At(a.url, s);
1494
+ const m = await Lt(a.url, s);
1495
1495
  if (d) {
1496
1496
  URL.revokeObjectURL(m);
1497
1497
  return;
@@ -1502,13 +1502,13 @@ function Fo(e) {
1502
1502
  }
1503
1503
  },
1504
1504
  { immediate: !0 }
1505
- ), ee(i), M(() => {
1505
+ ), G(i), M(() => {
1506
1506
  var s, r;
1507
1507
  const a = e.value;
1508
1508
  return a ? !((r = (s = t.value).shouldFetchAsBlob) != null && r.call(s, a)) ? a.url : o.value : "";
1509
1509
  });
1510
1510
  }
1511
- const ko = (e, { attrs: t }) => O("svg", {
1511
+ const xo = (e, { attrs: t }) => O("svg", {
1512
1512
  xmlns: "http://www.w3.org/2000/svg",
1513
1513
  viewBox: "0 0 24 24",
1514
1514
  fill: "none",
@@ -1528,55 +1528,55 @@ const ko = (e, { attrs: t }) => O("svg", {
1528
1528
  stroke: "none"
1529
1529
  }, "1:1")
1530
1530
  ]);
1531
- function Co(e) {
1531
+ function wo(e) {
1532
1532
  return [
1533
1533
  {
1534
1534
  items: [
1535
- { type: "button", icon: Oe, tooltip: e.t("toolbar.zoom_out"), action: e.onZoomOut, disabled: e.zoom <= 0.01 },
1535
+ { type: "button", icon: Ae, tooltip: e.t("toolbar.zoom_out"), action: e.onZoomOut, disabled: e.zoom <= 0.01 },
1536
1536
  { type: "text", content: `${Math.round(e.zoom * 100)}%`, minWidth: "3rem" },
1537
- { type: "button", icon: Ue, tooltip: e.t("toolbar.zoom_in"), action: e.onZoomIn, disabled: e.zoom >= 10 }
1537
+ { type: "button", icon: Be, tooltip: e.t("toolbar.zoom_in"), action: e.onZoomIn, disabled: e.zoom >= 10 }
1538
1538
  ]
1539
1539
  },
1540
1540
  {
1541
1541
  items: [
1542
- { type: "button", icon: Ft, tooltip: e.t("toolbar.fit_to_window"), action: e.onFitToWidth },
1543
- { type: "button", icon: ko, tooltip: e.t("toolbar.original_size"), action: e.onOriginalSize }
1542
+ { type: "button", icon: bt, tooltip: e.t("toolbar.fit_to_window"), action: e.onFitToWidth },
1543
+ { type: "button", icon: xo, tooltip: e.t("toolbar.original_size"), action: e.onOriginalSize }
1544
1544
  ]
1545
1545
  },
1546
1546
  {
1547
1547
  items: [
1548
- { type: "button", icon: kt, tooltip: e.t("toolbar.rotate_left"), action: e.onRotateLeft },
1549
- { type: "button", icon: Ct, tooltip: e.t("toolbar.rotate_right"), action: e.onRotateRight }
1548
+ { type: "button", icon: xt, tooltip: e.t("toolbar.rotate_left"), action: e.onRotateLeft },
1549
+ { type: "button", icon: wt, tooltip: e.t("toolbar.rotate_right"), action: e.onRotateRight }
1550
1550
  ]
1551
1551
  },
1552
1552
  {
1553
1553
  items: [
1554
- { type: "button", icon: He, tooltip: e.t("toolbar.reset"), action: e.onReset }
1554
+ { type: "button", icon: qe, tooltip: e.t("toolbar.reset"), action: e.onReset }
1555
1555
  ]
1556
1556
  }
1557
1557
  ];
1558
1558
  }
1559
- function _o(e) {
1559
+ function yo(e) {
1560
1560
  return [
1561
1561
  {
1562
1562
  items: [
1563
- { type: "button", icon: Oe, tooltip: e.t("toolbar.zoom_out"), action: e.onZoomOut, disabled: e.zoom <= 0.01 },
1563
+ { type: "button", icon: Ae, tooltip: e.t("toolbar.zoom_out"), action: e.onZoomOut, disabled: e.zoom <= 0.01 },
1564
1564
  { type: "text", content: `${Math.round(e.zoom * 100)}%`, minWidth: "3rem" },
1565
- { type: "button", icon: Ue, tooltip: e.t("toolbar.zoom_in"), action: e.onZoomIn, disabled: e.zoom >= 10 }
1565
+ { type: "button", icon: Be, tooltip: e.t("toolbar.zoom_in"), action: e.onZoomIn, disabled: e.zoom >= 10 }
1566
1566
  ]
1567
1567
  },
1568
1568
  {
1569
1569
  items: [
1570
- { type: "button", icon: He, tooltip: e.t("toolbar.reset"), action: e.onReset }
1570
+ { type: "button", icon: qe, tooltip: e.t("toolbar.reset"), action: e.onReset }
1571
1571
  ]
1572
1572
  }
1573
1573
  ];
1574
1574
  }
1575
- function zo(e) {
1575
+ function ko(e) {
1576
1576
  return [
1577
1577
  {
1578
1578
  items: [
1579
- { type: "button", icon: Ve, tooltip: e.t("toolbar.toc"), action: () => {
1579
+ { type: "button", icon: Oe, tooltip: e.t("toolbar.toc"), action: () => {
1580
1580
  var t;
1581
1581
  return (t = e.epubRef) == null ? void 0 : t.toggleToc();
1582
1582
  } }
@@ -1584,7 +1584,7 @@ function zo(e) {
1584
1584
  },
1585
1585
  {
1586
1586
  items: [
1587
- { type: "button", icon: Fe, tooltip: e.t("toolbar.prev_page"), action: () => {
1587
+ { type: "button", icon: ye, tooltip: e.t("toolbar.prev_page"), action: () => {
1588
1588
  var t;
1589
1589
  return (t = e.epubRef) == null ? void 0 : t.prevPage();
1590
1590
  } },
@@ -1599,7 +1599,7 @@ function zo(e) {
1599
1599
  items: [
1600
1600
  {
1601
1601
  type: "button",
1602
- icon: e.fullWidth ? Ze : Ge,
1602
+ icon: e.fullWidth ? Ue : He,
1603
1603
  tooltip: e.fullWidth ? e.t("toolbar.normal_width") : e.t("toolbar.full_width"),
1604
1604
  action: () => {
1605
1605
  var t;
@@ -1610,11 +1610,11 @@ function zo(e) {
1610
1610
  }
1611
1611
  ];
1612
1612
  }
1613
- function Ro(e) {
1613
+ function Fo(e) {
1614
1614
  return [
1615
1615
  {
1616
1616
  items: [
1617
- { type: "button", icon: Ve, tooltip: e.t("toolbar.toc"), action: () => {
1617
+ { type: "button", icon: Oe, tooltip: e.t("toolbar.toc"), action: () => {
1618
1618
  var t;
1619
1619
  return (t = e.mobiRef) == null ? void 0 : t.toggleToc();
1620
1620
  } }
@@ -1622,7 +1622,7 @@ function Ro(e) {
1622
1622
  },
1623
1623
  {
1624
1624
  items: [
1625
- { type: "button", icon: Fe, tooltip: e.t("toolbar.prev_page"), action: () => {
1625
+ { type: "button", icon: ye, tooltip: e.t("toolbar.prev_page"), action: () => {
1626
1626
  var t;
1627
1627
  return (t = e.mobiRef) == null ? void 0 : t.prevPage();
1628
1628
  } },
@@ -1637,7 +1637,7 @@ function Ro(e) {
1637
1637
  items: [
1638
1638
  {
1639
1639
  type: "button",
1640
- icon: e.fullWidth ? Ze : Ge,
1640
+ icon: e.fullWidth ? Ue : He,
1641
1641
  tooltip: e.fullWidth ? e.t("toolbar.normal_width") : e.t("toolbar.full_width"),
1642
1642
  action: () => {
1643
1643
  var t;
@@ -1648,26 +1648,26 @@ function Ro(e) {
1648
1648
  }
1649
1649
  ];
1650
1650
  }
1651
- function Mo({ stats: e }) {
1651
+ function Co({ stats: e }) {
1652
1652
  return e ? [
1653
1653
  {
1654
1654
  items: [
1655
1655
  {
1656
1656
  type: "text",
1657
- content: `${e.files} files · ${e.dirs} dirs · ${Nt(e.size)}`,
1657
+ content: `${e.files} files · ${e.dirs} dirs · ${Tt(e.size)}`,
1658
1658
  minWidth: "10rem"
1659
1659
  }
1660
1660
  ]
1661
1661
  }
1662
1662
  ] : [];
1663
1663
  }
1664
- function jo(e) {
1664
+ function _o(e) {
1665
1665
  const t = [
1666
1666
  {
1667
1667
  items: [
1668
1668
  {
1669
1669
  type: "button",
1670
- icon: O(_t, { class: "vfp-w-4 vfp-h-4" }),
1670
+ icon: O(yt, { class: "vfp-w-4 vfp-h-4" }),
1671
1671
  tooltip: e.wordWrap ? e.t("toolbar.wrap_off") : e.t("toolbar.wrap_on"),
1672
1672
  action: e.onToggleWrap
1673
1673
  }
@@ -1678,20 +1678,20 @@ function jo(e) {
1678
1678
  items: [
1679
1679
  {
1680
1680
  type: "button",
1681
- icon: e.htmlPreview ? O(Xe, { class: "vfp-w-4 vfp-h-4" }) : O(Ye, { class: "vfp-w-4 vfp-h-4" }),
1681
+ icon: e.htmlPreview ? O(Ve, { class: "vfp-w-4 vfp-h-4" }) : O(Ze, { class: "vfp-w-4 vfp-h-4" }),
1682
1682
  tooltip: e.htmlPreview ? e.t("toolbar.source") : e.t("toolbar.preview"),
1683
1683
  action: e.onToggleHtmlPreview
1684
1684
  }
1685
1685
  ]
1686
1686
  }), t;
1687
1687
  }
1688
- function To(e) {
1688
+ function Ro(e) {
1689
1689
  return [
1690
1690
  {
1691
1691
  items: [
1692
1692
  {
1693
1693
  type: "button",
1694
- icon: e.viewMode === "preview" ? O(Xe, { class: "vfp-w-4 vfp-h-4" }) : O(Ye, { class: "vfp-w-4 vfp-h-4" }),
1694
+ icon: e.viewMode === "preview" ? O(Ve, { class: "vfp-w-4 vfp-h-4" }) : O(Ze, { class: "vfp-w-4 vfp-h-4" }),
1695
1695
  tooltip: e.viewMode === "preview" ? e.t("toolbar.source") : e.t("toolbar.preview"),
1696
1696
  action: e.onToggleViewMode
1697
1697
  }
@@ -1699,22 +1699,22 @@ function To(e) {
1699
1699
  }
1700
1700
  ];
1701
1701
  }
1702
- const Po = { class: "vfp-flex vfp-items-center vfp-justify-center vfp-w-full vfp-h-full vfp-text-fg-muted" }, Eo = { class: "vfp-flex vfp-flex-col vfp-items-center vfp-gap-3" }, So = { class: "vfp-text-sm" }, $o = /* @__PURE__ */ te({
1702
+ const zo = { class: "vfp-flex vfp-items-center vfp-justify-center vfp-w-full vfp-h-full vfp-text-fg-muted" }, Mo = { class: "vfp-flex vfp-flex-col vfp-items-center vfp-gap-3" }, jo = { class: "vfp-text-sm" }, Po = /* @__PURE__ */ X({
1703
1703
  __name: "RendererLoading",
1704
1704
  setup(e) {
1705
- const { t } = _e();
1706
- return (o, n) => (f(), b("div", Po, [
1707
- P("div", Eo, [
1708
- n[0] || (n[0] = P("div", { class: "vfp-w-8 vfp-h-8 vfp-rounded-full vfp-border-2 vfp-border-fg-muted vfp-border-t-transparent vfp-animate-spin" }, null, -1)),
1709
- P("span", So, A(v(t)("common.loading") || "Loading..."), 1)
1705
+ const { t } = Ce();
1706
+ return (o, n) => (f(), b("div", zo, [
1707
+ T("div", Mo, [
1708
+ n[0] || (n[0] = T("div", { class: "vfp-w-8 vfp-h-8 vfp-rounded-full vfp-border-2 vfp-border-fg-muted vfp-border-t-transparent vfp-animate-spin" }, null, -1)),
1709
+ T("span", jo, D(v(t)("common.loading") || "Loading..."), 1)
1710
1710
  ])
1711
1711
  ]));
1712
1712
  }
1713
- }), E = (e) => ht({
1713
+ }), E = (e) => ft({
1714
1714
  loader: e,
1715
- loadingComponent: { render: () => O($o) },
1715
+ loadingComponent: { render: () => O(Po) },
1716
1716
  delay: 0
1717
- }), No = E(() => import("./index-y7gaKu36.mjs")), Lo = E(() => import("./index-CY2vJrBJ.mjs")), Wo = E(() => import("./index-DNFQFaF3.mjs")), Io = E(() => import("./index-BKu5DkdG.mjs")), Do = E(() => import("./index-t1Plo3ud.mjs")), Ao = E(() => import("./index-DLPnWmJm.mjs")), Bo = E(() => import("./index-Dln8hyPZ.mjs")), qo = E(() => import("./index-hRgOoqVw.mjs")), Oo = E(() => import("./index-BT-U9HYI.mjs")), Uo = E(() => import("./index-C0vSFXmh.mjs")), Ho = E(() => import("./index-BA-SUKkf.mjs")), Vo = E(() => import("./index-Cu1up6RM.mjs")), Zo = E(() => import("./index-B3-ezDVJ.mjs")), Go = E(() => import("./index-CMgtGmRN.mjs")), Xo = E(() => import("./index-C65zV1vs.mjs")), Yo = E(() => import("./index-ijv9F2cZ.mjs")), Ko = E(() => import("./index-B9RAbllH.mjs")), Jo = E(() => import("./index-BHPmd4HF.mjs")), Qo = { class: "vfp-flex vfp-flex-col vfp-items-center vfp-justify-center vfp-w-full vfp-h-full vfp-p-8 vfp-gap-6" }, en = { class: "vfp-w-32 vfp-h-32 vfp-rounded-full vfp-bg-surface-2 vfp-flex vfp-items-center vfp-justify-center" }, tn = { class: "vfp-text-fg-primary vfp-text-center" }, on = { class: "vfp-text-xl vfp-font-medium vfp-mb-2" }, nn = { class: "vfp-text-fg-secondary" }, Be = /* @__PURE__ */ te({
1717
+ }), To = E(() => import("./index-DT9dPz8I.mjs")), Eo = E(() => import("./index-Zwl5J-Uw.mjs")), So = E(() => import("./index-DyipSoKh.mjs")), No = E(() => import("./index-DEoR7aDN.mjs")), $o = E(() => import("./index-Cjnw238n.mjs")), Lo = E(() => import("./index-B2lqsdp7.mjs")), Wo = E(() => import("./index-DX_NBPzS.mjs")), Io = E(() => import("./index-BHi1WRQZ.mjs")), Do = E(() => import("./index-Ctd0JQ6K.mjs")), Ao = E(() => import("./index-BvegaxQF.mjs")), Bo = E(() => import("./index-Dw1U4YqT.mjs")), qo = E(() => import("./index-DBw8tvyb.mjs")), Oo = E(() => import("./index-GGGDPwxX.mjs")), Uo = E(() => import("./index-DIe0vHlt.mjs")), Ho = E(() => import("./index-CYt6tpQC.mjs")), Vo = E(() => import("./index-CyrFxdIJ.mjs")), Zo = E(() => import("./index-DTtHrdBl.mjs")), Go = E(() => import("./index-BTW1xwB9.mjs")), Xo = { class: "vfp-flex vfp-flex-col vfp-items-center vfp-justify-center vfp-w-full vfp-h-full vfp-p-8 vfp-gap-6" }, Ko = { class: "vfp-w-32 vfp-h-32 vfp-rounded-full vfp-bg-surface-2 vfp-flex vfp-items-center vfp-justify-center" }, Yo = { class: "vfp-text-fg-primary vfp-text-center" }, Jo = { class: "vfp-text-xl vfp-font-medium vfp-mb-2" }, Qo = { class: "vfp-text-fg-secondary" }, De = /* @__PURE__ */ X({
1718
1718
  __name: "index",
1719
1719
  props: {
1720
1720
  fileName: {},
@@ -1722,35 +1722,97 @@ const Po = { class: "vfp-flex vfp-items-center vfp-justify-center vfp-w-full vfp
1722
1722
  },
1723
1723
  emits: ["download"],
1724
1724
  setup(e, { emit: t }) {
1725
- const { t: o } = _e(), n = t;
1726
- return (i, a) => (f(), b("div", Qo, [
1727
- P("div", en, [
1728
- V(v(zt), { class: "vfp-w-16 vfp-h-16 vfp-text-fg-secondary" })
1725
+ const { t: o } = Ce(), n = t;
1726
+ return (i, a) => (f(), b("div", Xo, [
1727
+ T("div", Ko, [
1728
+ H(v(kt), { class: "vfp-w-16 vfp-h-16 vfp-text-fg-secondary" })
1729
1729
  ]),
1730
- P("div", tn, [
1731
- P("p", on, A(e.fileName), 1),
1732
- P("p", nn, A(v(o)("common.unsupported_preview", { type: e.fileType })), 1)
1730
+ T("div", Yo, [
1731
+ T("p", Jo, D(e.fileName), 1),
1732
+ T("p", Qo, D(v(o)("common.unsupported_preview", { type: e.fileType })), 1)
1733
1733
  ]),
1734
- P("button", {
1734
+ T("button", {
1735
1735
  class: "vfp-flex vfp-items-center vfp-gap-2 vfp-px-6 vfp-py-3 vfp-bg-surface-2 hover:vfp-bg-surface-3 vfp-backdrop-blur-sm vfp-rounded-lg vfp-text-fg-primary vfp-font-medium vfp-transition-all",
1736
1736
  onClick: a[0] || (a[0] = (l) => n("download"))
1737
1737
  }, [
1738
- V(v(Ke), { class: "vfp-w-5 vfp-h-5" }),
1739
- gt(" " + A(v(o)("common.download")), 1)
1738
+ H(v(Ge), { class: "vfp-w-5 vfp-h-5" }),
1739
+ pt(" " + D(v(o)("common.download")), 1)
1740
1740
  ])
1741
1741
  ]));
1742
1742
  }
1743
- }), an = ["tabindex", "data-theme"], ln = {
1743
+ }), en = 2e3, tn = /* @__PURE__ */ X({
1744
+ __name: "NavArrows",
1745
+ props: {
1746
+ containerRef: {},
1747
+ hasPrev: { type: Boolean },
1748
+ hasNext: { type: Boolean },
1749
+ resetKey: {}
1750
+ },
1751
+ emits: ["prev", "next"],
1752
+ setup(e, { emit: t }) {
1753
+ const o = e, n = t, i = C(!0);
1754
+ let a = null;
1755
+ const l = () => {
1756
+ a !== null && clearTimeout(a), a = window.setTimeout(() => {
1757
+ i.value = !1;
1758
+ }, en);
1759
+ }, s = () => {
1760
+ i.value || (i.value = !0), l();
1761
+ };
1762
+ let r = null;
1763
+ const u = () => {
1764
+ r && (r.removeEventListener("mousemove", s), r = null);
1765
+ }, d = (m) => {
1766
+ r !== m && (u(), m && (m.addEventListener("mousemove", s), r = m));
1767
+ };
1768
+ return A(() => o.containerRef, (m) => d(m), { immediate: !0 }), A(() => o.resetKey, () => {
1769
+ i.value = !0, l();
1770
+ }), we(() => {
1771
+ l();
1772
+ }), G(() => {
1773
+ a !== null && clearTimeout(a), u();
1774
+ }), (m, p) => (f(), b(P, null, [
1775
+ e.hasPrev ? (f(), b("button", {
1776
+ key: 0,
1777
+ style: ae({
1778
+ opacity: i.value ? 1 : 0,
1779
+ transform: i.value ? "translateY(-50%)" : "translateY(-50%) translateX(-20px)",
1780
+ pointerEvents: i.value ? "auto" : "none",
1781
+ transition: "opacity 0.2s, transform 0.2s"
1782
+ }),
1783
+ class: "vfp-absolute vfp-z-20 vfp-left-2 md:vfp-left-4 vfp-top-1/2 vfp-w-10 vfp-h-10 md:vfp-w-12 md:vfp-h-12 vfp-rounded-full vfp-backdrop-blur-xl vfp-border vfp-flex vfp-items-center vfp-justify-center vfp-transition-colors vfp-shadow-2xl vfp-bg-surface-nav vfp-border-line hover:vfp-bg-surface-nav-hover vfp-text-fg-primary",
1784
+ onClick: p[0] || (p[0] = (c) => n("prev")),
1785
+ onMouseenter: s
1786
+ }, [
1787
+ H(v(ye), { class: "vfp-w-5 vfp-h-5 md:vfp-w-6 md:vfp-h-6" })
1788
+ ], 36)) : L("", !0),
1789
+ e.hasNext ? (f(), b("button", {
1790
+ key: 1,
1791
+ style: ae({
1792
+ opacity: i.value ? 1 : 0,
1793
+ transform: i.value ? "translateY(-50%)" : "translateY(-50%) translateX(20px)",
1794
+ pointerEvents: i.value ? "auto" : "none",
1795
+ transition: "opacity 0.2s, transform 0.2s"
1796
+ }),
1797
+ class: "vfp-absolute vfp-z-20 vfp-right-2 md:vfp-right-4 vfp-top-1/2 vfp-w-10 vfp-h-10 md:vfp-w-12 md:vfp-h-12 vfp-rounded-full vfp-backdrop-blur-xl vfp-border vfp-flex vfp-items-center vfp-justify-center vfp-transition-colors vfp-shadow-2xl vfp-bg-surface-nav vfp-border-line hover:vfp-bg-surface-nav-hover vfp-text-fg-primary",
1798
+ onClick: p[1] || (p[1] = (c) => n("next")),
1799
+ onMouseenter: s
1800
+ }, [
1801
+ H(v(ke), { class: "vfp-w-5 vfp-h-5 md:vfp-w-6 md:vfp-h-6" })
1802
+ ], 36)) : L("", !0)
1803
+ ], 64));
1804
+ }
1805
+ }), on = ["tabindex", "data-theme"], nn = {
1744
1806
  key: 0,
1745
1807
  class: "vfp-flex-shrink-0 vfp-z-10 vfp-backdrop-blur-md vfp-border-b vfp-bg-surface-toolbar vfp-border-line",
1746
1808
  style: { "padding-top": "env(safe-area-inset-top, 0px)" }
1747
- }, rn = { class: "vfp-flex vfp-items-center vfp-justify-between vfp-px-3 md:vfp-px-5 vfp-py-1.5 md:vfp-py-2.5" }, sn = { class: "vfp-flex vfp-items-center vfp-flex-1 vfp-min-w-0 vfp-mr-2 md:vfp-mr-3" }, un = { class: "vfp-font-medium vfp-text-xs md:vfp-text-sm vfp-truncate vfp-text-fg-primary" }, dn = { class: "vfp-text-xs vfp-ml-2 vfp-flex-shrink-0 vfp-text-fg-muted" }, cn = { class: "vfp-flex vfp-items-center vfp-gap-1 md:vfp-hidden vfp-flex-shrink-0" }, fn = ["data-tooltip", "disabled", "onClick"], pn = { class: "vfp-hidden md:vfp-flex vfp-items-center vfp-gap-1 vfp-flex-shrink-0" }, mn = ["data-tooltip", "disabled", "onClick"], vn = ["data-tooltip", "disabled", "onClick"], hn = {
1809
+ }, an = { class: "vfp-flex vfp-items-center vfp-justify-between vfp-px-3 md:vfp-px-5 vfp-py-1.5 md:vfp-py-2.5" }, ln = { class: "vfp-flex vfp-items-center vfp-flex-1 vfp-min-w-0 vfp-mr-2 md:vfp-mr-3" }, rn = { class: "vfp-font-medium vfp-text-xs md:vfp-text-sm vfp-truncate vfp-text-fg-primary" }, sn = { class: "vfp-text-xs vfp-ml-2 vfp-flex-shrink-0 vfp-text-fg-muted" }, un = { class: "vfp-flex vfp-items-center vfp-gap-1 md:vfp-hidden vfp-flex-shrink-0" }, dn = ["data-tooltip", "disabled", "onClick"], cn = { class: "vfp-hidden md:vfp-flex vfp-items-center vfp-gap-1 vfp-flex-shrink-0" }, fn = ["data-tooltip", "disabled", "onClick"], pn = ["data-tooltip", "disabled", "onClick"], mn = {
1748
1810
  key: 0,
1749
1811
  class: "vfp-flex vfp-items-center vfp-gap-1 vfp-px-3 vfp-pb-1.5 vfp-overflow-x-auto scrollbar-hide md:vfp-hidden"
1750
- }, gn = {
1812
+ }, vn = {
1751
1813
  key: 0,
1752
1814
  class: "vfp-w-px vfp-h-4 vfp-mx-0.5 vfp-bg-divide"
1753
- }, bn = ["data-tooltip", "disabled", "onClick"], wn = 3, xn = 2e3, yn = /* @__PURE__ */ te({
1815
+ }, hn = ["data-tooltip", "disabled", "onClick"], gn = 3, bn = /* @__PURE__ */ X({
1754
1816
  __name: "FilePreviewContent",
1755
1817
  props: {
1756
1818
  files: {},
@@ -1770,454 +1832,420 @@ const Po = { class: "vfp-flex vfp-items-center vfp-justify-center vfp-w-full vfp
1770
1832
  emits: ["navigate", "close", "custom-event"],
1771
1833
  setup(e, { emit: t }) {
1772
1834
  const o = e;
1773
- wo(() => ({
1835
+ vo(() => ({
1774
1836
  requestInit: o.requestInit,
1775
1837
  requestHandler: o.requestHandler,
1776
1838
  shouldFetchAsBlob: o.shouldFetchAsBlob
1777
1839
  }));
1778
1840
  const n = t;
1779
- ho($e(o, "locale"), $e(o, "messages"));
1780
- const { t: i } = _e(), a = _(
1841
+ fo(Ee(o, "locale"), Ee(o, "messages"));
1842
+ const { t: i } = Ce(), a = C(
1781
1843
  typeof window < "u" ? window.matchMedia("(prefers-color-scheme: dark)").matches : !0
1782
1844
  );
1783
1845
  let l = null;
1784
- q(
1846
+ A(
1785
1847
  () => o.theme,
1786
- (x) => {
1787
- if (l && (l(), l = null), x === "auto") {
1788
- const h = window.matchMedia("(prefers-color-scheme: dark)"), N = (D) => {
1789
- a.value = D.matches;
1848
+ (y) => {
1849
+ if (l && (l(), l = null), y === "auto") {
1850
+ const g = window.matchMedia("(prefers-color-scheme: dark)"), N = (W) => {
1851
+ a.value = W.matches;
1790
1852
  };
1791
- h.addEventListener("change", N), l = () => h.removeEventListener("change", N);
1853
+ g.addEventListener("change", N), l = () => g.removeEventListener("change", N);
1792
1854
  }
1793
1855
  },
1794
1856
  { immediate: !0 }
1795
- ), ee(() => {
1857
+ ), G(() => {
1796
1858
  l && l();
1797
1859
  });
1798
1860
  const s = M(
1799
1861
  () => o.theme === "auto" ? a.value ? "dark" : "light" : o.theme
1800
1862
  );
1801
- bo(s);
1802
- const r = _(1), u = _(0), d = _(1), m = _(1), p = _(0), c = _(0), w = _(0), R = _(null), $ = _(null), k = _(!0);
1803
- let S = null;
1804
- const U = () => {
1805
- k.value = !0, S !== null && clearTimeout(S), S = window.setTimeout(() => {
1806
- k.value = !1;
1807
- }, xn);
1808
- }, X = () => U(), L = M(() => St(o.files)), g = M(() => L.value[o.currentIndex]), j = Fo(g), oe = M(() => g.value && o.customRenderers.find((x) => x.test(g.value)) || null), Re = M(() => !oe.value || !g.value ? null : oe.value.render(g.value, ne.value)), F = M(() => g.value ? $t(g.value) : "unsupported"), at = (x, h) => {
1809
- if (!g.value) return;
1810
- const N = { name: x, payload: h, file: g.value };
1863
+ mo(s);
1864
+ const r = C(1), u = C(0), d = C(1), m = C(1), p = C(0), c = C(0), w = C(0), _ = C(null), S = C(null), j = M(() => jt(o.files)), h = M(() => j.value[o.currentIndex]), R = bo(h), B = M(() => h.value && o.customRenderers.find((y) => y.test(h.value)) || null), I = M(() => !B.value || !h.value ? null : B.value.render(h.value, te.value)), x = M(() => h.value ? Pt(h.value) : "unsupported"), ee = (y, g) => {
1865
+ if (!h.value) return;
1866
+ const N = { name: y, payload: g, file: h.value };
1811
1867
  n("custom-event", N);
1812
- }, ne = M(() => ({
1813
- emit: at,
1868
+ }, te = M(() => ({
1869
+ emit: ee,
1814
1870
  t: i.value,
1815
1871
  theme: s.value,
1816
1872
  locale: o.locale ?? "zh-CN"
1817
1873
  }));
1818
- re("file-preview:custom-ctx", ne), q(
1874
+ ie("file-preview:custom-ctx", te), A(
1819
1875
  () => o.currentIndex,
1820
1876
  () => {
1821
- r.value = 1, u.value = 0, d.value = 1, m.value = 1, p.value = 0, c.value = 0, w.value = 0, k.value = !0, ue.value = 0, de.value = 0, ce.value = !1, fe.value = 0, pe.value = 0, me.value = !1, ve.value = null, Y.value = !0, K.value = !1, J.value = "preview", S !== null && clearTimeout(S);
1877
+ r.value = 1, u.value = 0, d.value = 1, m.value = 1, p.value = 0, c.value = 0, w.value = 0, re.value = 0, se.value = 0, ue.value = !1, de.value = 0, ce.value = 0, fe.value = !1, pe.value = null, K.value = !0, Y.value = !1, J.value = "preview";
1822
1878
  }
1823
- ), q(
1824
- [F, p, c],
1879
+ ), A(
1880
+ [x, p, c],
1825
1881
  () => {
1826
- if (F.value === "image" && p.value > 0 && c.value > 0 && R.value) {
1827
- const x = R.value.clientWidth, h = R.value.clientHeight, N = x / p.value, D = h / c.value, Z = Math.min(N, D);
1828
- r.value = Math.max(0.01, Math.min(10, Z));
1882
+ if (x.value === "image" && p.value > 0 && c.value > 0 && _.value) {
1883
+ const y = _.value.clientWidth, g = _.value.clientHeight, N = y / p.value, W = g / c.value, V = Math.min(N, W);
1884
+ r.value = Math.max(0.01, Math.min(10, V));
1829
1885
  }
1830
1886
  }
1831
- ), q(
1832
- () => L.value.length,
1833
- (x) => {
1834
- x > 1 && U();
1835
- },
1836
- { immediate: !0 }
1837
1887
  );
1838
- const ae = (x) => {
1839
- x.key === "Escape" && o.mode === "modal" ? n("close") : x.key === "ArrowLeft" && o.currentIndex > 0 ? n("navigate", o.currentIndex - 1) : x.key === "ArrowRight" && o.currentIndex < L.value.length - 1 && n("navigate", o.currentIndex + 1);
1888
+ const oe = (y) => {
1889
+ y.key === "Escape" && o.mode === "modal" ? n("close") : y.key === "ArrowLeft" && o.currentIndex > 0 ? n("navigate", o.currentIndex - 1) : y.key === "ArrowRight" && o.currentIndex < j.value.length - 1 && n("navigate", o.currentIndex + 1);
1840
1890
  };
1841
- qe(() => {
1842
- o.mode === "modal" ? window.addEventListener("keydown", ae) : $.value && $.value.addEventListener("keydown", ae);
1843
- }), ee(() => {
1844
- S !== null && clearTimeout(S), o.mode === "modal" ? window.removeEventListener("keydown", ae) : $.value && $.value.removeEventListener("keydown", ae);
1891
+ we(() => {
1892
+ o.mode === "modal" ? window.addEventListener("keydown", oe) : S.value && S.value.addEventListener("keydown", oe);
1893
+ }), G(() => {
1894
+ o.mode === "modal" ? window.removeEventListener("keydown", oe) : S.value && S.value.removeEventListener("keydown", oe);
1845
1895
  });
1846
- const Me = () => {
1896
+ const Re = () => {
1847
1897
  r.value = Math.min(r.value + 0.1, 10);
1848
- }, je = () => {
1898
+ }, ze = () => {
1849
1899
  r.value = Math.max(r.value - 0.1, 0.01);
1850
- }, it = () => {
1900
+ }, tt = () => {
1851
1901
  u.value = u.value + 90;
1852
- }, lt = () => {
1902
+ }, ot = () => {
1853
1903
  u.value = u.value - 90;
1854
- }, rt = () => {
1855
- if (R.value && p.value > 0 && c.value > 0) {
1856
- const x = R.value.clientWidth, h = R.value.clientHeight, N = x / p.value, D = h / c.value, Z = Math.min(N, D);
1857
- r.value = Math.max(0.01, Math.min(10, Z));
1904
+ }, nt = () => {
1905
+ if (_.value && p.value > 0 && c.value > 0) {
1906
+ const y = _.value.clientWidth, g = _.value.clientHeight, N = y / p.value, W = g / c.value, V = Math.min(N, W);
1907
+ r.value = Math.max(0.01, Math.min(10, V));
1858
1908
  } else
1859
1909
  r.value = 1;
1860
1910
  u.value = 0, w.value++;
1861
- }, st = () => {
1911
+ }, at = () => {
1862
1912
  r.value = 1, u.value = 0, w.value++;
1863
- }, ut = (x) => {
1864
- r.value = x;
1865
- }, Te = () => {
1913
+ }, it = (y) => {
1914
+ r.value = y;
1915
+ }, Me = () => {
1866
1916
  r.value = 1, u.value = 0, w.value++;
1867
- }, dt = yo(), se = async () => {
1868
- if (g.value) {
1917
+ }, lt = go(), le = async () => {
1918
+ if (h.value) {
1869
1919
  if (o.onDownload) {
1870
- await o.onDownload(g.value);
1920
+ await o.onDownload(h.value);
1871
1921
  return;
1872
1922
  }
1873
1923
  try {
1874
- await Bt(g.value.url, g.value.name, dt.value);
1875
- } catch (x) {
1876
- console.error("[file-preview] download failed:", x);
1924
+ await Wt(h.value.url, h.value.name, lt.value);
1925
+ } catch (y) {
1926
+ console.error("[file-preview] download failed:", y);
1877
1927
  }
1878
1928
  }
1879
- }, ct = M(() => o.mode === "modal"), Pe = _(null), ue = _(0), de = _(0), ce = _(!1), Ee = _(null), fe = _(0), pe = _(0), me = _(!1), ft = (x, h) => {
1880
- ue.value = x, de.value = h;
1881
- }, pt = (x, h) => {
1882
- fe.value = x, pe.value = h;
1883
- }, ve = _(null), mt = (x) => {
1884
- ve.value = x;
1885
- }, Y = _(!0), K = _(!1), J = _("preview"), he = M(() => {
1886
- var x, h, N;
1887
- if (oe.value)
1888
- return ((h = (x = oe.value).getToolbarGroups) == null ? void 0 : h.call(x, g.value, ne.value)) ?? [];
1889
- if (F.value === "image")
1890
- return Co({
1929
+ }, rt = M(() => o.mode === "modal"), je = C(null), re = C(0), se = C(0), ue = C(!1), Pe = C(null), de = C(0), ce = C(0), fe = C(!1), st = (y, g) => {
1930
+ re.value = y, se.value = g;
1931
+ }, ut = (y, g) => {
1932
+ de.value = y, ce.value = g;
1933
+ }, pe = C(null), dt = (y) => {
1934
+ pe.value = y;
1935
+ }, K = C(!0), Y = C(!1), J = C("preview"), me = M(() => {
1936
+ var y, g, N;
1937
+ if (B.value)
1938
+ return ((g = (y = B.value).getToolbarGroups) == null ? void 0 : g.call(y, h.value, te.value)) ?? [];
1939
+ if (x.value === "image")
1940
+ return wo({
1891
1941
  zoom: r.value,
1892
- onZoomIn: Me,
1893
- onZoomOut: je,
1894
- onFitToWidth: rt,
1895
- onOriginalSize: st,
1896
- onRotateLeft: lt,
1897
- onRotateRight: it,
1898
- onReset: Te,
1942
+ onZoomIn: Re,
1943
+ onZoomOut: ze,
1944
+ onFitToWidth: nt,
1945
+ onOriginalSize: at,
1946
+ onRotateLeft: ot,
1947
+ onRotateRight: tt,
1948
+ onReset: Me,
1899
1949
  t: i.value
1900
1950
  });
1901
- if (F.value === "pdf")
1902
- return _o({
1951
+ if (x.value === "pdf")
1952
+ return yo({
1903
1953
  zoom: r.value,
1904
- onZoomIn: Me,
1905
- onZoomOut: je,
1906
- onReset: Te,
1954
+ onZoomIn: Re,
1955
+ onZoomOut: ze,
1956
+ onReset: Me,
1907
1957
  t: i.value
1908
1958
  });
1909
- if (F.value === "epub")
1910
- return zo({
1911
- epubRef: Pe.value,
1912
- current: ue.value,
1913
- total: de.value,
1914
- fullWidth: ce.value,
1959
+ if (x.value === "epub")
1960
+ return ko({
1961
+ epubRef: je.value,
1962
+ current: re.value,
1963
+ total: se.value,
1964
+ fullWidth: ue.value,
1915
1965
  t: i.value
1916
1966
  });
1917
- if (F.value === "mobi")
1918
- return Ro({
1919
- mobiRef: Ee.value,
1920
- current: fe.value,
1921
- total: pe.value,
1922
- fullWidth: me.value,
1967
+ if (x.value === "mobi")
1968
+ return Fo({
1969
+ mobiRef: Pe.value,
1970
+ current: de.value,
1971
+ total: ce.value,
1972
+ fullWidth: fe.value,
1923
1973
  t: i.value
1924
1974
  });
1925
- if (F.value === "zip")
1926
- return Mo({ stats: ve.value, t: i.value });
1927
- if (F.value === "text") {
1928
- const D = ((N = g.value.name.split(".").pop()) == null ? void 0 : N.toLowerCase()) || "";
1929
- return jo({
1930
- wordWrap: Y.value,
1975
+ if (x.value === "zip")
1976
+ return Co({ stats: pe.value, t: i.value });
1977
+ if (x.value === "text") {
1978
+ const W = ((N = h.value.name.split(".").pop()) == null ? void 0 : N.toLowerCase()) || "";
1979
+ return _o({
1980
+ wordWrap: K.value,
1931
1981
  onToggleWrap: () => {
1932
- Y.value = !Y.value;
1982
+ K.value = !K.value;
1933
1983
  },
1934
- isHtml: D === "html" || D === "htm",
1935
- htmlPreview: K.value,
1984
+ isHtml: W === "html" || W === "htm",
1985
+ htmlPreview: Y.value,
1936
1986
  onToggleHtmlPreview: () => {
1937
- K.value = !K.value;
1987
+ Y.value = !Y.value;
1938
1988
  },
1939
1989
  t: i.value
1940
1990
  });
1941
1991
  }
1942
- return F.value === "markdown" ? To({
1992
+ return x.value === "markdown" ? Ro({
1943
1993
  viewMode: J.value,
1944
1994
  onToggleViewMode: () => {
1945
1995
  J.value = J.value === "preview" ? "source" : "preview";
1946
1996
  },
1947
1997
  t: i.value
1948
1998
  }) : [];
1949
- }), Se = M(() => {
1950
- const x = [
1999
+ }), Te = M(() => {
2000
+ const y = [
1951
2001
  {
1952
2002
  items: [
1953
- { type: "button", icon: Ke, tooltip: i.value("common.download"), action: se }
2003
+ { type: "button", icon: Ge, tooltip: i.value("common.download"), action: le }
1954
2004
  ]
1955
2005
  }
1956
2006
  ];
1957
- return ct.value && x.push({
2007
+ return rt.value && y.push({
1958
2008
  items: [
1959
- { type: "button", icon: Rt, tooltip: i.value("common.close"), action: () => n("close") }
2009
+ { type: "button", icon: Ft, tooltip: i.value("common.close"), action: () => n("close") }
1960
2010
  ]
1961
- }), x;
1962
- }), vt = M(() => he.value.length > 0);
1963
- return (x, h) => {
1964
- var N, D, Z;
2011
+ }), y;
2012
+ }), ct = M(() => me.value.length > 0);
2013
+ return (y, g) => {
2014
+ var N, W, V;
1965
2015
  return f(), b("div", {
1966
2016
  ref_key: "rootRef",
1967
- ref: $,
2017
+ ref: S,
1968
2018
  tabindex: e.mode === "embed" ? 0 : -1,
1969
2019
  "data-theme": s.value,
1970
2020
  class: "vfp-relative vfp-w-full vfp-h-full vfp-flex vfp-flex-col vfp-overflow-hidden vfp-outline-none"
1971
2021
  }, [
1972
- e.headless ? I("", !0) : (f(), b("div", ln, [
1973
- P("div", rn, [
1974
- P("div", sn, [
1975
- P("h2", un, A((N = g.value) == null ? void 0 : N.name), 1),
1976
- P("span", dn, A(e.currentIndex + 1) + "/" + A(L.value.length), 1)
2022
+ e.headless ? L("", !0) : (f(), b("div", nn, [
2023
+ T("div", an, [
2024
+ T("div", ln, [
2025
+ T("h2", rn, D((N = h.value) == null ? void 0 : N.name), 1),
2026
+ T("span", sn, D(e.currentIndex + 1) + "/" + D(j.value.length), 1)
1977
2027
  ]),
1978
- P("div", cn, [
1979
- (f(!0), b(T, null, B(Se.value, (z, W) => (f(), b(T, {
1980
- key: "m-action-" + W
2028
+ T("div", un, [
2029
+ (f(!0), b(P, null, q(Te.value, (z, $) => (f(), b(P, {
2030
+ key: "m-action-" + $
1981
2031
  }, [
1982
- (f(!0), b(T, null, B(z.items, (y, H) => (f(), b(T, {
1983
- key: "m-action-" + W + "-" + H
2032
+ (f(!0), b(P, null, q(z.items, (k, U) => (f(), b(P, {
2033
+ key: "m-action-" + $ + "-" + U
1984
2034
  }, [
1985
- y.type === "button" ? (f(), b("button", {
2035
+ k.type === "button" ? (f(), b("button", {
1986
2036
  key: 0,
1987
2037
  class: "toolbar-btn",
1988
- "data-tooltip": y.tooltip,
1989
- disabled: y.disabled,
1990
- onClick: y.action
2038
+ "data-tooltip": k.tooltip,
2039
+ disabled: k.disabled,
2040
+ onClick: k.action
1991
2041
  }, [
1992
- (f(), C(Q(y.icon), { class: "vfp-w-4 vfp-h-4" }))
1993
- ], 8, fn)) : I("", !0)
2042
+ (f(), F(Q(k.icon), { class: "vfp-w-4 vfp-h-4" }))
2043
+ ], 8, dn)) : L("", !0)
1994
2044
  ], 64))), 128))
1995
2045
  ], 64))), 128))
1996
2046
  ]),
1997
- P("div", pn, [
1998
- (f(!0), b(T, null, B(he.value, (z, W) => (f(), b(T, {
1999
- key: "d-tool-" + W
2047
+ T("div", cn, [
2048
+ (f(!0), b(P, null, q(me.value, (z, $) => (f(), b(P, {
2049
+ key: "d-tool-" + $
2000
2050
  }, [
2001
- (f(!0), b(T, null, B(z.items, (y, H) => (f(), b(T, {
2002
- key: "d-tool-" + W + "-" + H
2051
+ (f(!0), b(P, null, q(z.items, (k, U) => (f(), b(P, {
2052
+ key: "d-tool-" + $ + "-" + U
2003
2053
  }, [
2004
- y.type === "button" ? (f(), b("button", {
2054
+ k.type === "button" ? (f(), b("button", {
2005
2055
  key: 0,
2006
2056
  class: "toolbar-btn",
2007
- "data-tooltip": y.tooltip,
2008
- disabled: y.disabled,
2009
- onClick: y.action
2057
+ "data-tooltip": k.tooltip,
2058
+ disabled: k.disabled,
2059
+ onClick: k.action
2010
2060
  }, [
2011
- (f(), C(Q(y.icon), { class: "vfp-w-4 vfp-h-4" }))
2012
- ], 8, mn)) : y.type === "text" ? (f(), b("span", {
2061
+ (f(), F(Q(k.icon), { class: "vfp-w-4 vfp-h-4" }))
2062
+ ], 8, fn)) : k.type === "text" ? (f(), b("span", {
2013
2063
  key: 1,
2014
2064
  class: "vfp-text-xs vfp-text-center vfp-font-medium vfp-tabular-nums vfp-text-fg-tertiary",
2015
- style: ie({ minWidth: y.minWidth || "auto" })
2016
- }, A(y.content), 5)) : I("", !0)
2065
+ style: ae({ minWidth: k.minWidth || "auto" })
2066
+ }, D(k.content), 5)) : L("", !0)
2017
2067
  ], 64))), 128)),
2018
- h[11] || (h[11] = P("div", { class: "vfp-w-px vfp-h-4 vfp-mx-1 vfp-bg-divide" }, null, -1))
2068
+ g[9] || (g[9] = T("div", { class: "vfp-w-px vfp-h-4 vfp-mx-1 vfp-bg-divide" }, null, -1))
2019
2069
  ], 64))), 128)),
2020
- (f(!0), b(T, null, B(Se.value, (z, W) => (f(), b(T, {
2021
- key: "d-action-" + W
2070
+ (f(!0), b(P, null, q(Te.value, (z, $) => (f(), b(P, {
2071
+ key: "d-action-" + $
2022
2072
  }, [
2023
- (f(!0), b(T, null, B(z.items, (y, H) => (f(), b(T, {
2024
- key: "d-action-" + W + "-" + H
2073
+ (f(!0), b(P, null, q(z.items, (k, U) => (f(), b(P, {
2074
+ key: "d-action-" + $ + "-" + U
2025
2075
  }, [
2026
- y.type === "button" ? (f(), b("button", {
2076
+ k.type === "button" ? (f(), b("button", {
2027
2077
  key: 0,
2028
2078
  class: "toolbar-btn",
2029
- "data-tooltip": y.tooltip,
2030
- disabled: y.disabled,
2031
- onClick: y.action
2079
+ "data-tooltip": k.tooltip,
2080
+ disabled: k.disabled,
2081
+ onClick: k.action
2032
2082
  }, [
2033
- (f(), C(Q(y.icon), { class: "vfp-w-4 vfp-h-4" }))
2034
- ], 8, vn)) : I("", !0)
2083
+ (f(), F(Q(k.icon), { class: "vfp-w-4 vfp-h-4" }))
2084
+ ], 8, pn)) : L("", !0)
2035
2085
  ], 64))), 128))
2036
2086
  ], 64))), 128))
2037
2087
  ])
2038
2088
  ]),
2039
- vt.value ? (f(), b("div", hn, [
2040
- (f(!0), b(T, null, B(he.value, (z, W) => (f(), b(T, {
2041
- key: "m-tool-" + W
2089
+ ct.value ? (f(), b("div", mn, [
2090
+ (f(!0), b(P, null, q(me.value, (z, $) => (f(), b(P, {
2091
+ key: "m-tool-" + $
2042
2092
  }, [
2043
- W > 0 ? (f(), b("div", gn)) : I("", !0),
2044
- (f(!0), b(T, null, B(z.items, (y, H) => (f(), b(T, {
2045
- key: "m-tool-" + W + "-" + H
2093
+ $ > 0 ? (f(), b("div", vn)) : L("", !0),
2094
+ (f(!0), b(P, null, q(z.items, (k, U) => (f(), b(P, {
2095
+ key: "m-tool-" + $ + "-" + U
2046
2096
  }, [
2047
- y.type === "button" ? (f(), b("button", {
2097
+ k.type === "button" ? (f(), b("button", {
2048
2098
  key: 0,
2049
2099
  class: "toolbar-btn",
2050
- "data-tooltip": y.tooltip,
2051
- disabled: y.disabled,
2052
- onClick: y.action
2100
+ "data-tooltip": k.tooltip,
2101
+ disabled: k.disabled,
2102
+ onClick: k.action
2053
2103
  }, [
2054
- (f(), C(Q(y.icon), { class: "vfp-w-4 vfp-h-4" }))
2055
- ], 8, bn)) : y.type === "text" ? (f(), b("span", {
2104
+ (f(), F(Q(k.icon), { class: "vfp-w-4 vfp-h-4" }))
2105
+ ], 8, hn)) : k.type === "text" ? (f(), b("span", {
2056
2106
  key: 1,
2057
2107
  class: "vfp-text-xs vfp-text-center vfp-font-medium vfp-tabular-nums vfp-text-fg-tertiary",
2058
- style: ie({ minWidth: y.minWidth || "auto" })
2059
- }, A(y.content), 5)) : I("", !0)
2108
+ style: ae({ minWidth: k.minWidth || "auto" })
2109
+ }, D(k.content), 5)) : L("", !0)
2060
2110
  ], 64))), 128))
2061
2111
  ], 64))), 128))
2062
- ])) : I("", !0)
2112
+ ])) : L("", !0)
2063
2113
  ])),
2064
2114
  (f(), b("div", {
2065
2115
  ref_key: "contentRef",
2066
- ref: R,
2116
+ ref: _,
2067
2117
  class: "vfp-flex-1 vfp-flex vfp-items-center vfp-justify-center vfp-overflow-auto",
2068
- onMousemove: X,
2069
- key: (D = g.value) == null ? void 0 : D.url
2118
+ key: (W = h.value) == null ? void 0 : W.url
2070
2119
  }, [
2071
- g.value ? (f(), b(T, { key: 0 }, [
2072
- Re.value ? (f(), C(Q(Re.value), {
2120
+ h.value ? (f(), b(P, { key: 0 }, [
2121
+ I.value ? (f(), F(Q(I.value), {
2073
2122
  key: 0,
2074
- file: g.value,
2075
- ctx: ne.value
2076
- }, null, 8, ["file", "ctx"])) : (f(), b(T, { key: 1 }, [
2077
- F.value === "image" ? (f(), C(v(No), {
2123
+ file: h.value,
2124
+ ctx: te.value
2125
+ }, null, 8, ["file", "ctx"])) : (f(), b(P, { key: 1 }, [
2126
+ x.value === "image" ? (f(), F(v(To), {
2078
2127
  key: 0,
2079
- url: v(j),
2128
+ url: v(R),
2080
2129
  zoom: r.value,
2081
2130
  rotation: u.value,
2082
2131
  "reset-key": w.value,
2083
- "file-size": g.value.size,
2084
- file: g.value,
2085
- onZoomChange: ut,
2086
- onNaturalWidthChange: h[0] || (h[0] = (z) => p.value = z),
2087
- onNaturalHeightChange: h[1] || (h[1] = (z) => c.value = z)
2088
- }, null, 8, ["url", "zoom", "rotation", "reset-key", "file-size", "file"])) : F.value === "pdf" ? (f(), C(v(Lo), {
2132
+ "file-size": h.value.size,
2133
+ file: h.value,
2134
+ onZoomChange: it,
2135
+ onNaturalWidthChange: g[0] || (g[0] = (z) => p.value = z),
2136
+ onNaturalHeightChange: g[1] || (g[1] = (z) => c.value = z)
2137
+ }, null, 8, ["url", "zoom", "rotation", "reset-key", "file-size", "file"])) : x.value === "pdf" ? (f(), F(v(Eo), {
2089
2138
  key: 1,
2090
- url: v(j),
2139
+ url: v(R),
2091
2140
  zoom: r.value,
2092
2141
  "current-page": d.value,
2093
- onPageChange: h[2] || (h[2] = (z) => d.value = z),
2094
- onTotalPagesChange: h[3] || (h[3] = (z) => m.value = z),
2095
- onPageWidthChange: h[4] || (h[4] = (z) => p.value = z)
2096
- }, null, 8, ["url", "zoom", "current-page"])) : F.value === "docx" ? (f(), C(v(Wo), {
2142
+ onPageChange: g[2] || (g[2] = (z) => d.value = z),
2143
+ onTotalPagesChange: g[3] || (g[3] = (z) => m.value = z),
2144
+ onPageWidthChange: g[4] || (g[4] = (z) => p.value = z)
2145
+ }, null, 8, ["url", "zoom", "current-page"])) : x.value === "docx" ? (f(), F(v(So), {
2097
2146
  key: 2,
2098
- url: v(j)
2099
- }, null, 8, ["url"])) : F.value === "xlsx" ? (f(), C(v(Io), {
2147
+ url: v(R)
2148
+ }, null, 8, ["url"])) : x.value === "xlsx" ? (f(), F(v(No), {
2100
2149
  key: 3,
2101
- url: v(j)
2102
- }, null, 8, ["url"])) : F.value === "pptx" ? (f(), C(v(Do), {
2150
+ url: v(R)
2151
+ }, null, 8, ["url"])) : x.value === "pptx" ? (f(), F(v($o), {
2103
2152
  key: 4,
2104
- url: v(j)
2105
- }, null, 8, ["url"])) : F.value === "msg" ? (f(), C(v(Ao), {
2153
+ url: v(R)
2154
+ }, null, 8, ["url"])) : x.value === "msg" ? (f(), F(v(Lo), {
2106
2155
  key: 5,
2107
- url: v(j)
2108
- }, null, 8, ["url"])) : F.value === "epub" ? (f(), C(v(Bo), {
2156
+ url: v(R)
2157
+ }, null, 8, ["url"])) : x.value === "epub" ? (f(), F(v(Wo), {
2109
2158
  key: 6,
2110
2159
  ref_key: "epubRef",
2111
- ref: Pe,
2112
- url: v(j),
2113
- onChapterChange: ft,
2114
- onFullWidthChange: h[5] || (h[5] = (z) => ce.value = z)
2115
- }, null, 8, ["url"])) : F.value === "mobi" ? (f(), C(v(qo), {
2160
+ ref: je,
2161
+ url: v(R),
2162
+ onChapterChange: st,
2163
+ onFullWidthChange: g[5] || (g[5] = (z) => ue.value = z)
2164
+ }, null, 8, ["url"])) : x.value === "mobi" ? (f(), F(v(Io), {
2116
2165
  key: 7,
2117
2166
  ref_key: "mobiRef",
2118
- ref: Ee,
2119
- url: v(j),
2120
- onChapterChange: pt,
2121
- onFullWidthChange: h[6] || (h[6] = (z) => me.value = z)
2122
- }, null, 8, ["url"])) : F.value === "video" ? (f(), C(v(Oo), {
2167
+ ref: Pe,
2168
+ url: v(R),
2169
+ onChapterChange: ut,
2170
+ onFullWidthChange: g[6] || (g[6] = (z) => fe.value = z)
2171
+ }, null, 8, ["url"])) : x.value === "video" ? (f(), F(v(Do), {
2123
2172
  key: 8,
2124
- url: v(j),
2125
- "file-name": (Z = g.value) == null ? void 0 : Z.name
2126
- }, null, 8, ["url", "file-name"])) : F.value === "audio" ? (f(), C(v(Uo), {
2173
+ url: v(R),
2174
+ "file-name": (V = h.value) == null ? void 0 : V.name
2175
+ }, null, 8, ["url", "file-name"])) : x.value === "audio" ? (f(), F(v(Ao), {
2127
2176
  key: 9,
2128
- url: v(j),
2129
- "file-name": g.value.name
2130
- }, null, 8, ["url", "file-name"])) : F.value === "markdown" ? (f(), C(v(Ho), {
2177
+ url: v(R),
2178
+ "file-name": h.value.name
2179
+ }, null, 8, ["url", "file-name"])) : x.value === "markdown" ? (f(), F(v(Bo), {
2131
2180
  key: 10,
2132
- url: v(j),
2181
+ url: v(R),
2133
2182
  "view-mode": J.value
2134
- }, null, 8, ["url", "view-mode"])) : F.value === "json" ? (f(), C(v(Vo), {
2183
+ }, null, 8, ["url", "view-mode"])) : x.value === "json" ? (f(), F(v(qo), {
2135
2184
  key: 11,
2136
- url: v(j),
2137
- "file-name": g.value.name
2138
- }, null, 8, ["url", "file-name"])) : F.value === "csv" ? (f(), C(v(Zo), {
2185
+ url: v(R),
2186
+ "file-name": h.value.name
2187
+ }, null, 8, ["url", "file-name"])) : x.value === "csv" ? (f(), F(v(Oo), {
2139
2188
  key: 12,
2140
- url: v(j),
2141
- "file-name": g.value.name
2142
- }, null, 8, ["url", "file-name"])) : F.value === "xml" ? (f(), C(v(Go), {
2189
+ url: v(R),
2190
+ "file-name": h.value.name
2191
+ }, null, 8, ["url", "file-name"])) : x.value === "xml" ? (f(), F(v(Uo), {
2143
2192
  key: 13,
2144
- url: v(j),
2145
- "file-name": g.value.name
2146
- }, null, 8, ["url", "file-name"])) : F.value === "subtitle" ? (f(), C(v(Xo), {
2193
+ url: v(R),
2194
+ "file-name": h.value.name
2195
+ }, null, 8, ["url", "file-name"])) : x.value === "subtitle" ? (f(), F(v(Ho), {
2147
2196
  key: 14,
2148
- url: v(j),
2149
- "file-name": g.value.name
2150
- }, null, 8, ["url", "file-name"])) : F.value === "zip" && o.zipNestingDepth >= wn ? (f(), C(Be, {
2197
+ url: v(R),
2198
+ "file-name": h.value.name
2199
+ }, null, 8, ["url", "file-name"])) : x.value === "zip" && o.zipNestingDepth >= gn ? (f(), F(De, {
2151
2200
  key: 15,
2152
- "file-name": g.value.name,
2153
- "file-type": g.value.type,
2154
- onDownload: se
2155
- }, null, 8, ["file-name", "file-type"])) : F.value === "zip" ? (f(), C(v(Yo), {
2201
+ "file-name": h.value.name,
2202
+ "file-type": h.value.type,
2203
+ onDownload: le
2204
+ }, null, 8, ["file-name", "file-type"])) : x.value === "zip" ? (f(), F(v(Vo), {
2156
2205
  key: 16,
2157
- url: v(j),
2206
+ url: v(R),
2158
2207
  "nesting-depth": o.zipNestingDepth,
2159
- onStatsChange: mt
2160
- }, null, 8, ["url", "nesting-depth"])) : F.value === "text" ? (f(), C(v(Ko), {
2208
+ onStatsChange: dt
2209
+ }, null, 8, ["url", "nesting-depth"])) : x.value === "text" ? (f(), F(v(Zo), {
2161
2210
  key: 17,
2162
- url: v(j),
2163
- "file-name": g.value.name,
2164
- "word-wrap": Y.value,
2165
- "html-preview": K.value
2166
- }, null, 8, ["url", "file-name", "word-wrap", "html-preview"])) : F.value === "font" ? (f(), C(v(Jo), {
2211
+ url: v(R),
2212
+ "file-name": h.value.name,
2213
+ "word-wrap": K.value,
2214
+ "html-preview": Y.value
2215
+ }, null, 8, ["url", "file-name", "word-wrap", "html-preview"])) : x.value === "font" ? (f(), F(v(Go), {
2167
2216
  key: 18,
2168
- url: v(j)
2169
- }, null, 8, ["url"])) : (f(), C(Be, {
2217
+ url: v(R)
2218
+ }, null, 8, ["url"])) : (f(), F(De, {
2170
2219
  key: 19,
2171
- "file-name": g.value.name,
2172
- "file-type": g.value.type,
2173
- onDownload: se
2220
+ "file-name": h.value.name,
2221
+ "file-type": h.value.type,
2222
+ onDownload: le
2174
2223
  }, null, 8, ["file-name", "file-type"]))
2175
2224
  ], 64))
2176
- ], 64)) : I("", !0)
2177
- ], 32)),
2178
- !e.headless && L.value.length > 1 ? (f(), b(T, { key: 1 }, [
2179
- e.currentIndex > 0 ? (f(), b("button", {
2180
- key: 0,
2181
- style: ie({
2182
- opacity: k.value ? 1 : 0,
2183
- transform: k.value ? "translateY(-50%)" : "translateY(-50%) translateX(-20px)",
2184
- pointerEvents: k.value ? "auto" : "none",
2185
- transition: "opacity 0.2s, transform 0.2s"
2186
- }),
2187
- class: "vfp-absolute vfp-z-20 vfp-left-2 md:vfp-left-4 vfp-top-1/2 vfp-w-10 vfp-h-10 md:vfp-w-12 md:vfp-h-12 vfp-rounded-full vfp-backdrop-blur-xl vfp-border vfp-flex vfp-items-center vfp-justify-center vfp-transition-colors vfp-shadow-2xl vfp-bg-surface-nav vfp-border-line hover:vfp-bg-surface-nav-hover vfp-text-fg-primary",
2188
- onClick: h[7] || (h[7] = (z) => n("navigate", e.currentIndex - 1)),
2189
- onMouseenter: h[8] || (h[8] = (z) => k.value = !0)
2190
- }, [
2191
- V(v(Fe), { class: "vfp-w-5 vfp-h-5 md:vfp-w-6 md:vfp-h-6" })
2192
- ], 36)) : I("", !0),
2193
- e.currentIndex < L.value.length - 1 ? (f(), b("button", {
2194
- key: 1,
2195
- style: ie({
2196
- opacity: k.value ? 1 : 0,
2197
- transform: k.value ? "translateY(-50%)" : "translateY(-50%) translateX(20px)",
2198
- pointerEvents: k.value ? "auto" : "none",
2199
- transition: "opacity 0.2s, transform 0.2s"
2200
- }),
2201
- class: "vfp-absolute vfp-z-20 vfp-right-2 md:vfp-right-4 vfp-top-1/2 vfp-w-10 vfp-h-10 md:vfp-w-12 md:vfp-h-12 vfp-rounded-full vfp-backdrop-blur-xl vfp-border vfp-flex vfp-items-center vfp-justify-center vfp-transition-colors vfp-shadow-2xl vfp-bg-surface-nav vfp-border-line hover:vfp-bg-surface-nav-hover vfp-text-fg-primary",
2202
- onClick: h[9] || (h[9] = (z) => n("navigate", e.currentIndex + 1)),
2203
- onMouseenter: h[10] || (h[10] = (z) => k.value = !0)
2204
- }, [
2205
- V(v(ke), { class: "vfp-w-5 vfp-h-5 md:vfp-w-6 md:vfp-h-6" })
2206
- ], 36)) : I("", !0)
2207
- ], 64)) : I("", !0)
2208
- ], 8, an);
2225
+ ], 64)) : L("", !0)
2226
+ ])),
2227
+ !e.headless && j.value.length > 1 ? (f(), F(tn, {
2228
+ key: 1,
2229
+ "container-ref": _.value,
2230
+ "has-prev": e.currentIndex > 0,
2231
+ "has-next": e.currentIndex < j.value.length - 1,
2232
+ "reset-key": e.currentIndex,
2233
+ onPrev: g[7] || (g[7] = (z) => n("navigate", e.currentIndex - 1)),
2234
+ onNext: g[8] || (g[8] = (z) => n("navigate", e.currentIndex + 1))
2235
+ }, null, 8, ["container-ref", "has-prev", "has-next", "reset-key"])) : L("", !0)
2236
+ ], 8, on);
2209
2237
  };
2210
2238
  }
2211
- }), Fn = (e, t) => {
2239
+ }), xn = (e, t) => {
2212
2240
  const o = e.__vccOpts || e;
2213
2241
  for (const [n, i] of t)
2214
2242
  o[n] = i;
2215
2243
  return o;
2216
- }, ze = /* @__PURE__ */ Fn(yn, [["__scopeId", "data-v-f26e2638"]]), Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2244
+ }, _e = /* @__PURE__ */ xn(bn, [["__scopeId", "data-v-ae1697ec"]]), Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2217
2245
  __proto__: null,
2218
- default: ze
2246
+ default: _e
2219
2247
  }, Symbol.toStringTag, { value: "Module" }));
2220
- function kn(e) {
2248
+ function wn(e) {
2221
2249
  let t = "", o = "", n = !1;
2222
2250
  const i = () => {
2223
2251
  if (n || typeof document > "u") return;
@@ -2227,13 +2255,13 @@ function kn(e) {
2227
2255
  }, a = () => {
2228
2256
  !n || typeof document > "u" || (document.body.style.overflow = t, document.body.style.paddingRight = o, n = !1);
2229
2257
  };
2230
- return qe(() => {
2258
+ return we(() => {
2231
2259
  e() && i();
2232
- }), bt(() => {
2260
+ }), mt(() => {
2233
2261
  a();
2234
2262
  }), { lock: i, unlock: a };
2235
2263
  }
2236
- const Cn = ["data-theme"], Yn = /* @__PURE__ */ te({
2264
+ const yn = ["data-theme"], Zn = /* @__PURE__ */ X({
2237
2265
  __name: "FilePreviewModal",
2238
2266
  props: {
2239
2267
  files: {},
@@ -2251,52 +2279,52 @@ const Cn = ["data-theme"], Yn = /* @__PURE__ */ te({
2251
2279
  },
2252
2280
  emits: ["close", "navigate", "custom-event"],
2253
2281
  setup(e, { emit: t }) {
2254
- const o = e, n = t, { lock: i, unlock: a } = kn(() => o.isOpen);
2255
- q(
2282
+ const o = e, n = t, { lock: i, unlock: a } = wn(() => o.isOpen);
2283
+ A(
2256
2284
  () => o.isOpen,
2257
2285
  (p) => {
2258
2286
  p ? i() : a();
2259
2287
  }
2260
2288
  );
2261
- const l = _(
2289
+ const l = C(
2262
2290
  typeof window < "u" ? window.matchMedia("(prefers-color-scheme: dark)").matches : !0
2263
2291
  );
2264
2292
  let s = null;
2265
- q(
2293
+ A(
2266
2294
  () => o.theme,
2267
2295
  (p) => {
2268
2296
  if (s && (s(), s = null), p === "auto") {
2269
- const c = window.matchMedia("(prefers-color-scheme: dark)"), w = (R) => {
2270
- l.value = R.matches;
2297
+ const c = window.matchMedia("(prefers-color-scheme: dark)"), w = (_) => {
2298
+ l.value = _.matches;
2271
2299
  };
2272
2300
  c.addEventListener("change", w), s = () => c.removeEventListener("change", w);
2273
2301
  }
2274
2302
  },
2275
2303
  { immediate: !0 }
2276
- ), ee(() => {
2304
+ ), G(() => {
2277
2305
  s && s();
2278
2306
  });
2279
2307
  const r = M(
2280
2308
  () => o.theme === "auto" ? l.value ? "dark" : "light" : o.theme
2281
2309
  ), u = () => n("close"), d = (p) => p.stopPropagation(), m = (p) => p.stopPropagation();
2282
- return (p, c) => (f(), C(wt, { to: "body" }, [
2283
- V(xt, { name: "vfp-fade" }, {
2284
- default: yt(() => [
2310
+ return (p, c) => (f(), F(vt, { to: "body" }, [
2311
+ H(ht, { name: "vfp-fade" }, {
2312
+ default: gt(() => [
2285
2313
  e.isOpen ? (f(), b("div", {
2286
2314
  key: 0,
2287
2315
  class: "vfp-root",
2288
2316
  "data-theme": r.value
2289
2317
  }, [
2290
- P("div", {
2318
+ T("div", {
2291
2319
  class: "vfp-fixed vfp-inset-0 vfp-z-[9999] vfp-flex vfp-items-center vfp-justify-center vfp-backdrop-blur-md vfp-overflow-hidden vfp-bg-surface-overlay",
2292
2320
  onClick: u,
2293
2321
  onWheel: m
2294
2322
  }, [
2295
- P("div", {
2323
+ T("div", {
2296
2324
  class: "vfp-relative vfp-w-full vfp-h-full",
2297
2325
  onClick: d
2298
2326
  }, [
2299
- V(ze, {
2327
+ H(_e, {
2300
2328
  mode: "modal",
2301
2329
  files: e.files,
2302
2330
  "current-index": e.currentIndex,
@@ -2315,13 +2343,13 @@ const Cn = ["data-theme"], Yn = /* @__PURE__ */ te({
2315
2343
  }, null, 8, ["files", "current-index", "custom-renderers", "locale", "messages", "headless", "theme", "request-init", "request-handler", "should-fetch-as-blob", "on-download"])
2316
2344
  ])
2317
2345
  ], 32)
2318
- ], 8, Cn)) : I("", !0)
2346
+ ], 8, yn)) : L("", !0)
2319
2347
  ]),
2320
2348
  _: 1
2321
2349
  })
2322
2350
  ]));
2323
2351
  }
2324
- }), _n = ["data-theme"], zn = { class: "vfp-relative vfp-w-full vfp-h-full vfp-overflow-hidden vfp-bg-surface-overlay" }, Kn = /* @__PURE__ */ te({
2352
+ }), kn = ["data-theme"], Fn = { class: "vfp-relative vfp-w-full vfp-h-full vfp-overflow-hidden vfp-bg-surface-overlay" }, Gn = /* @__PURE__ */ X({
2325
2353
  __name: "FilePreviewEmbed",
2326
2354
  props: {
2327
2355
  files: {},
@@ -2340,11 +2368,11 @@ const Cn = ["data-theme"], Yn = /* @__PURE__ */ te({
2340
2368
  },
2341
2369
  emits: ["navigate", "custom-event"],
2342
2370
  setup(e, { emit: t }) {
2343
- const o = e, n = t, i = _(
2371
+ const o = e, n = t, i = C(
2344
2372
  typeof window < "u" ? window.matchMedia("(prefers-color-scheme: dark)").matches : !0
2345
2373
  );
2346
2374
  let a = null;
2347
- q(
2375
+ A(
2348
2376
  () => o.theme,
2349
2377
  (r) => {
2350
2378
  if (a && (a(), a = null), r === "auto") {
@@ -2355,7 +2383,7 @@ const Cn = ["data-theme"], Yn = /* @__PURE__ */ te({
2355
2383
  }
2356
2384
  },
2357
2385
  { immediate: !0 }
2358
- ), ee(() => {
2386
+ ), G(() => {
2359
2387
  a && a();
2360
2388
  });
2361
2389
  const l = M(
@@ -2369,8 +2397,8 @@ const Cn = ["data-theme"], Yn = /* @__PURE__ */ te({
2369
2397
  style: s,
2370
2398
  "data-theme": l.value
2371
2399
  }, [
2372
- P("div", zn, [
2373
- V(ze, {
2400
+ T("div", Fn, [
2401
+ H(_e, {
2374
2402
  mode: "embed",
2375
2403
  files: e.files,
2376
2404
  "current-index": e.currentIndex,
@@ -2387,44 +2415,44 @@ const Cn = ["data-theme"], Yn = /* @__PURE__ */ te({
2387
2415
  onCustomEvent: u[1] || (u[1] = (d) => n("custom-event", d))
2388
2416
  }, null, 8, ["files", "current-index", "custom-renderers", "locale", "messages", "headless", "theme", "request-init", "request-handler", "should-fetch-as-blob", "on-download"])
2389
2417
  ])
2390
- ], 8, _n));
2418
+ ], 8, kn));
2391
2419
  }
2392
- }), Jn = Tt.version;
2420
+ }), Xn = Rt.version;
2393
2421
  export {
2394
- Bn as A,
2395
- Hn as B,
2396
- Nt as C,
2397
- An as D,
2398
- Ln as E,
2399
- $t as F,
2400
- Zn as G,
2401
- On as I,
2402
- et as L,
2403
- $n as M,
2404
- Wn as N,
2405
- In as P,
2406
- qn as R,
2407
- Nn as S,
2408
- Un as U,
2409
- Jn as V,
2410
- Qe as W,
2411
- Fn as _,
2412
- yo as a,
2413
- En as b,
2414
- Gn as c,
2415
- ge as d,
2416
- ze as e,
2417
- Kn as f,
2418
- Yn as g,
2419
- Et as h,
2420
- Xn as i,
2421
- Dn as j,
2422
- Sn as k,
2423
- ho as p,
2424
- Vn as q,
2425
- _e as u,
2426
- Tn as v,
2427
- St as w,
2428
- Pn as y
2422
+ In as A,
2423
+ qn as B,
2424
+ Tt as C,
2425
+ Wn as D,
2426
+ Sn as E,
2427
+ Pt as F,
2428
+ Un as G,
2429
+ An as I,
2430
+ Ye as L,
2431
+ Tn as M,
2432
+ Nn as N,
2433
+ $n as P,
2434
+ Dn as R,
2435
+ En as S,
2436
+ Bn as U,
2437
+ Xn as V,
2438
+ Ke as W,
2439
+ xn as _,
2440
+ go as a,
2441
+ jn as b,
2442
+ Hn as c,
2443
+ ve as d,
2444
+ _e as e,
2445
+ Gn as f,
2446
+ Zn as g,
2447
+ Mt as h,
2448
+ Vn as i,
2449
+ Ln as j,
2450
+ Pn as k,
2451
+ fo as p,
2452
+ On as q,
2453
+ Ce as u,
2454
+ zn as v,
2455
+ jt as w,
2456
+ Mn as y
2429
2457
  };
2430
- //# sourceMappingURL=index-CQFN4h-t.mjs.map
2458
+ //# sourceMappingURL=index-Oxwizt6-.mjs.map