comp-hub 0.25.17 → 0.25.18

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 (296) hide show
  1. package/dist/website/container/assets/{index-YhvDyci9.css → index-DZmjDb-3.css} +1 -1
  2. package/dist/website/container/index.html +2 -2
  3. package/dist/website/item/assets/@chenglou-BKD48OEU.js +4 -0
  4. package/dist/website/item/assets/@ctrl-C4Rzlq_k.js +1 -0
  5. package/dist/website/item/assets/@element-plus-5HYzMPHH.js +1 -0
  6. package/dist/website/item/assets/@floating-ui-BOzNIQbj.js +1 -0
  7. package/dist/website/item/assets/@iconify-BPgeTBo_.js +1 -0
  8. package/dist/website/item/assets/@iconify-vue-r3R3CCwl.js +1 -0
  9. package/dist/website/item/assets/@intlify-Dtb6NmBn.js +3 -0
  10. package/dist/website/item/assets/@profoundlogic-Dbp5Yy6B.js +5 -0
  11. package/dist/website/item/assets/@sxzz-CUumdR8o.js +1 -0
  12. package/dist/website/item/assets/@vue-C9QaczuC.js +1 -0
  13. package/dist/website/item/assets/@vueuse-C7-4JdfM.js +1 -0
  14. package/dist/website/item/assets/_plugin-vue_export-helper-BvSI8h28.js +12 -0
  15. package/dist/website/item/assets/async-validator-Cp9QasH9.js +12 -0
  16. package/dist/website/item/assets/axios-B8_nURbH.js +9 -0
  17. package/dist/website/item/assets/birpc-l0sNRNKZ.js +1 -0
  18. package/dist/website/item/assets/css-tree-BLHriVLA.js +12 -0
  19. package/dist/website/item/assets/dayjs-Z3PInbbQ.js +1 -0
  20. package/dist/website/item/assets/diff-l0sNRNKZ.js +1 -0
  21. package/dist/website/item/assets/diff2html-DT_q3g7v.js +101 -0
  22. package/dist/website/item/assets/{index-C3Gu6wLz.css → element-plus-Cfuf6lH-.css} +1 -1
  23. package/dist/website/item/assets/element-plus-DBucBpWn.js +39 -0
  24. package/dist/website/item/assets/highlight.js-l0sNRNKZ.js +1 -0
  25. package/dist/website/item/assets/hookable-l0sNRNKZ.js +1 -0
  26. package/dist/website/item/assets/idb-Dob3nYDb.js +1 -0
  27. package/dist/website/item/assets/index-6jb9FmNT.js +1 -0
  28. package/dist/website/item/assets/index-BGH8m-F2.js +1 -0
  29. package/dist/website/item/assets/index-BI_-2dUB.js +1 -0
  30. package/dist/website/item/assets/index-BpT42u6b.js +1 -0
  31. package/dist/website/item/assets/index-BqfcJOru.js +1 -0
  32. package/dist/website/item/assets/index-BwZfV1A2.js +1 -0
  33. package/dist/website/item/assets/index-CRGAlkC4.js +1 -0
  34. package/dist/website/item/assets/index-CUQTn5cW.js +2 -0
  35. package/dist/website/item/assets/index-DMv3RrWi.js +1 -0
  36. package/dist/website/item/assets/index-D__3WVgB.js +1 -0
  37. package/dist/website/item/assets/index-DeU4xv9o.js +1 -0
  38. package/dist/website/item/assets/index-DjpSekiX.js +1 -0
  39. package/dist/website/item/assets/index-ZnytBXEa.css +1 -0
  40. package/dist/website/item/assets/index-jliYxAXa.js +1 -0
  41. package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-BP6wylOE.js +1 -0
  42. package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-BXDFpHny.js +1 -0
  43. package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-BpSg0Jae.js +1 -0
  44. package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-DfVSdoBY.js +1 -0
  45. package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-DjzNSY_4.js +1 -0
  46. package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-Na9slT-l.js +1 -0
  47. package/dist/website/item/assets/lodash-es-3Olcxijv.js +1 -0
  48. package/dist/website/item/assets/lodash-unified-l0sNRNKZ.js +1 -0
  49. package/dist/website/item/assets/lz-string--7IMPK6S.js +1 -0
  50. package/dist/website/item/assets/memoize-one-BdPwpGay.js +1 -0
  51. package/dist/website/item/assets/normalize-wheel-es-BikNlmlf.js +1 -0
  52. package/dist/website/item/assets/perfect-debounce-l0sNRNKZ.js +1 -0
  53. package/dist/website/item/assets/pinia-Bzt0Q3uQ.js +1 -0
  54. package/dist/website/item/assets/prettier-l0sNRNKZ.js +1 -0
  55. package/dist/website/item/assets/source-map-js-B_zWzY07.js +1 -0
  56. package/dist/website/item/assets/useCompAttrs-C9FX019z.js +1 -0
  57. package/dist/website/item/assets/useCompAttrsLocal-ThVku9Cv.js +1 -0
  58. package/dist/website/item/assets/vue-i18n-DuHeSxKy.js +1 -0
  59. package/dist/website/item/assets/vue-l0sNRNKZ.js +1 -0
  60. package/dist/website/item/assets/vue-router-DPdvYShe.js +1 -0
  61. package/dist/website/item/index.html +21 -2
  62. package/dist/website/main/assets/@chenglou-BKD48OEU.js +4 -0
  63. package/dist/website/main/assets/@ctrl-C4Rzlq_k.js +1 -0
  64. package/dist/website/main/assets/@element-plus-MEP8kzQo.js +1 -0
  65. package/dist/website/main/assets/@floating-ui-BOzNIQbj.js +1 -0
  66. package/dist/website/main/assets/@form-create-feqGS1Jj.js +7 -0
  67. package/dist/website/main/assets/@iconify-C373lf0G.js +1 -0
  68. package/dist/website/main/assets/@iconify-vue-CB77QM-F.css +1 -0
  69. package/dist/website/main/assets/@iconify-vue-sb5-HV-8.js +1 -0
  70. package/dist/website/main/assets/@intlify-Dtb6NmBn.js +3 -0
  71. package/dist/website/main/assets/@nanostores-cuv3rP3V.js +1 -0
  72. package/dist/website/main/assets/@profoundlogic-Dbp5Yy6B.js +5 -0
  73. package/dist/website/main/assets/@socket.io-Dkula2eQ.js +1 -0
  74. package/dist/website/main/assets/@sxzz-CUumdR8o.js +1 -0
  75. package/dist/website/main/assets/@tanstack-B1C-iDkv.js +1 -0
  76. package/dist/website/main/assets/@transloadit-C1Ht0DUJ.js +1 -0
  77. package/dist/website/main/assets/@uppy-CVofWm7v.js +6 -0
  78. package/dist/website/main/assets/@viselect-CfuubPTw.js +1 -0
  79. package/dist/website/main/assets/@vue-fhDHgfUd.js +1 -0
  80. package/dist/website/main/assets/@vueuse-BzQM40cp.js +1 -0
  81. package/dist/website/main/assets/{index-Bn5vi5XZ.css → @xterm-DFuMZ0ql.css} +1 -1
  82. package/dist/website/main/assets/@xterm-DUvcnV0i.js +9 -0
  83. package/dist/website/main/assets/async-validator-Cp9QasH9.js +12 -0
  84. package/dist/website/main/assets/axios-CGPwGRlm.js +9 -0
  85. package/dist/website/main/assets/birpc-l0sNRNKZ.js +1 -0
  86. package/dist/website/main/assets/charenc-DuOFFKym.js +1 -0
  87. package/dist/website/main/assets/crypt-C-Yx0DM0.js +1 -0
  88. package/dist/website/main/assets/css-tree-l0sNRNKZ.js +1 -0
  89. package/dist/website/main/assets/dayjs-CODj3Ey3.js +1 -0
  90. package/dist/website/main/assets/diff-Czv1d0yF.js +13 -0
  91. package/dist/website/main/assets/diff2html-B2pszkCz.js +107 -0
  92. package/dist/website/main/assets/diff2html-BgE3edmZ.css +1 -0
  93. package/dist/website/main/assets/disable-devtool-D3c1TvAN.js +2 -0
  94. package/dist/website/main/assets/eastasianwidth-BD_cvthz.js +1 -0
  95. package/dist/website/main/assets/element-plus-BhtJKS0K.js +39 -0
  96. package/dist/website/main/assets/element-plus-CGVDl28_.css +1 -0
  97. package/dist/website/main/assets/engine.io-client-DI6V2dVR.js +1 -0
  98. package/dist/website/main/assets/engine.io-parser-DPmA-eyr.js +1 -0
  99. package/dist/website/main/assets/highlight-ZgkIHsf0.css +1 -0
  100. package/dist/website/main/assets/highlight.js-Bwl2mRDt.js +3 -0
  101. package/dist/website/main/assets/hookable-l0sNRNKZ.js +1 -0
  102. package/dist/website/main/assets/idb-Dob3nYDb.js +1 -0
  103. package/dist/website/main/assets/index-4HcRtHFq.js +1 -0
  104. package/dist/website/main/assets/index-B5Bwrnd-.js +5 -0
  105. package/dist/website/main/assets/index-BDXZ4YLt.js +1 -0
  106. package/dist/website/main/assets/index-BQWQEa7O.css +1 -0
  107. package/dist/website/main/assets/index-B_LYOd1t.js +1 -0
  108. package/dist/website/main/assets/index-Bb2JsGT0.js +1 -0
  109. package/dist/website/main/assets/index-BhuSlCh5.js +1 -0
  110. package/dist/website/main/assets/index-BoRu8JTf.js +1 -0
  111. package/dist/website/main/assets/index-BspcDgbz.js +1 -0
  112. package/dist/website/main/assets/index-C3llr0fI.js +1 -0
  113. package/dist/website/main/assets/index-CUFPwy3j.js +1 -0
  114. package/dist/website/main/assets/index-CZOyLdFS.js +1 -0
  115. package/dist/website/main/assets/index-Cc1ww5-S.css +1 -0
  116. package/dist/website/main/assets/index-CeIHQ-n9.js +2 -0
  117. package/dist/website/main/assets/index-CeKI74UL.css +1 -0
  118. package/dist/website/main/assets/index-Ck53ravL.js +1 -0
  119. package/dist/website/main/assets/index-CvX4ROQv.js +1 -0
  120. package/dist/website/main/assets/index-Cy4Bopc2.js +1 -0
  121. package/dist/website/main/assets/index-D7gG_u1W.css +1 -0
  122. package/dist/website/main/assets/index-DPOCYlI9.js +1 -0
  123. package/dist/website/main/assets/index-DULniEhb.js +1 -0
  124. package/dist/website/main/assets/index-DYDRL9IM.js +1 -0
  125. package/dist/website/main/assets/index-DYr8op9I.js +2 -0
  126. package/dist/website/main/assets/index-DYzYK94h.js +1 -0
  127. package/dist/website/main/assets/index-DuAc5XJp.js +1 -0
  128. package/dist/website/main/assets/index-Dy7LCL85.js +1 -0
  129. package/dist/website/main/assets/index-Dztu-Acq.js +1 -0
  130. package/dist/website/main/assets/index-Pi6tlbT4.js +4 -0
  131. package/dist/website/main/assets/index-aKfjhWt0.js +1 -0
  132. package/dist/website/main/assets/index-bJcpxaVy.js +1 -0
  133. package/dist/website/main/assets/index-kfXJiyp1.js +1 -0
  134. package/dist/website/main/assets/index-lBMHAV8o.js +1 -0
  135. package/dist/website/main/assets/index-qQdfohcs.js +1 -0
  136. package/dist/website/main/assets/index-rbkKq4oE.js +1 -0
  137. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-C8gdKJNc.js +1 -0
  138. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CCmKpzaE.js +1 -0
  139. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CgWidmAh.js +1 -0
  140. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CoufeP0j.js +2 -0
  141. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-Cpe0QxkJ.js +1 -0
  142. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CqPOOcKs.js +1 -0
  143. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-js27NZ7Q.js +1 -0
  144. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-DPWsMIUB.js +1 -0
  145. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-MdS0xY-J.js +7 -0
  146. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-y99hKbpl.js +1 -0
  147. package/dist/website/main/assets/is-buffer-BmA-AeVY.js +1 -0
  148. package/dist/website/main/assets/js-cookie-C2b7Ongr.js +1 -0
  149. package/dist/website/main/assets/lodash-DSEObR3Z.js +1 -0
  150. package/dist/website/main/assets/lodash-es-3Dei55BW.js +1 -0
  151. package/dist/website/main/assets/lodash-unified-l0sNRNKZ.js +1 -0
  152. package/dist/website/main/assets/lz-string-DrDDIr3t.js +1 -0
  153. package/dist/website/main/assets/marked-Ds7eXWqI.js +59 -0
  154. package/dist/website/main/assets/md5-BFcmaCA5.js +1 -0
  155. package/dist/website/main/assets/memoize-one-BdPwpGay.js +1 -0
  156. package/dist/website/main/assets/mime-match-DPWGxner.js +1 -0
  157. package/dist/website/main/assets/mitt-BN3yQH3p.js +1 -0
  158. package/dist/website/main/assets/namespace-emitter-D_6Athvt.js +1 -0
  159. package/dist/website/main/assets/nanoid-DKwX7yNB.js +1 -0
  160. package/dist/website/main/assets/nanostores-Bxb5zCO9.js +1 -0
  161. package/dist/website/main/assets/normalize-wheel-es-BikNlmlf.js +1 -0
  162. package/dist/website/main/assets/nprogress-BgDCIyLK.css +1 -0
  163. package/dist/website/main/assets/nprogress-DvYEeNZi.js +1 -0
  164. package/dist/website/main/assets/overlayscrollbars-B4ARb2Jg.js +1 -0
  165. package/dist/website/main/assets/path-browserify-VLxTPTS7.js +1 -0
  166. package/dist/website/main/assets/perfect-debounce-l0sNRNKZ.js +1 -0
  167. package/dist/website/main/assets/pinia-Dbinmd9o.js +1 -0
  168. package/dist/website/main/assets/preact-l0sNRNKZ.js +1 -0
  169. package/dist/website/main/assets/prettier-CXANtD9v.js +184 -0
  170. package/dist/website/main/assets/socket.io-client-6WpCnOvu.js +1 -0
  171. package/dist/website/main/assets/socket.io-parser-dKdiPQ_0.js +1 -0
  172. package/dist/website/main/assets/source-map-js-l0sNRNKZ.js +1 -0
  173. package/dist/website/main/assets/useCacheOssStore-B0MOdXBT.js +1 -0
  174. package/dist/website/main/assets/useCompEditStore-BPtseuS3.js +1 -0
  175. package/dist/website/main/assets/useCompEditStore-D1y6qk1p.css +1 -0
  176. package/dist/website/main/assets/useCompMetaLocalStore-CTrw6UOk.js +1 -0
  177. package/dist/website/main/assets/useCompMetaStore-CZbYI0xK.js +1 -0
  178. package/dist/website/main/assets/useKeyword-C1kuAWZi.js +1 -0
  179. package/dist/website/main/assets/useTeamHeaders-3RiOUcY_.js +1 -0
  180. package/dist/website/main/assets/useVscodeOpen-8UEdd_uq.js +1 -0
  181. package/dist/website/main/assets/vanilla-lazyload-CwDt0XVP.js +1 -0
  182. package/dist/website/main/assets/vue-advanced-cropper-B8N2632q.js +3 -0
  183. package/dist/website/main/assets/vue-demi-l0sNRNKZ.js +1 -0
  184. package/dist/website/main/assets/vue-i18n-Cl4PTbxU.js +1 -0
  185. package/dist/website/main/assets/vue-l0sNRNKZ.js +1 -0
  186. package/dist/website/main/assets/vue-router-Dq9LltUm.js +1 -0
  187. package/dist/website/main/assets/vue-sonner-tR0c75Mk.js +1 -0
  188. package/dist/website/main/assets/vuefinder-5wO4Y5ID.js +1 -0
  189. package/dist/website/main/assets/wildcard-Cd63L__x.js +1 -0
  190. package/dist/website/main/index.html +56 -2
  191. package/package.json +3 -2
  192. package/dist/website/item/assets/_plugin-vue_export-helper-ClmlufYy.js +0 -147
  193. package/dist/website/item/assets/index-A2e72bYf.js +0 -1
  194. package/dist/website/item/assets/index-B2r8sxRR.js +0 -1
  195. package/dist/website/item/assets/index-C6NEN46F.js +0 -1
  196. package/dist/website/item/assets/index-CXfvRuh5.js +0 -1
  197. package/dist/website/item/assets/index-CYfmDfPu.js +0 -13
  198. package/dist/website/item/assets/index-Ckv5tLxs.js +0 -1
  199. package/dist/website/item/assets/index-Cl6uqF-x.js +0 -1
  200. package/dist/website/item/assets/index-CmgpBuUf.js +0 -1
  201. package/dist/website/item/assets/index-CncfqGDl.js +0 -1
  202. package/dist/website/item/assets/index-DgLkaw9e.js +0 -1
  203. package/dist/website/item/assets/index-DuvgRKuL.js +0 -1
  204. package/dist/website/item/assets/index-IbpmdLUc.js +0 -1
  205. package/dist/website/item/assets/index-sGVojTNg.js +0 -1
  206. package/dist/website/item/assets/index-uCZVfQfS.js +0 -1
  207. package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-BLB7nimS.js +0 -1
  208. package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-BYSmp_n8.js +0 -1
  209. package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-BYzW_ITp.js +0 -1
  210. package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-BhO5mDgb.js +0 -1
  211. package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-CFCH0Q76.js +0 -1
  212. package/dist/website/item/assets/index.vue_vue_type_script_setup_true_lang-SpXIpkkp.js +0 -1
  213. package/dist/website/item/assets/useCompAttrs-BL-bjaqx.js +0 -1
  214. package/dist/website/item/assets/useCompAttrsLocal-Bsj1Z8J3.js +0 -1
  215. package/dist/website/main/assets/cloud-upload-Cs5rs0fe.js +0 -1
  216. package/dist/website/main/assets/cloud-upload-j3Y0taC9.css +0 -1
  217. package/dist/website/main/assets/el-card-BAyktVMS.css +0 -1
  218. package/dist/website/main/assets/el-dropdown-item-BeIfAqTO.css +0 -1
  219. package/dist/website/main/assets/el-empty-S7fQQ3B8.css +0 -1
  220. package/dist/website/main/assets/el-link-CPQZ-olG.css +0 -1
  221. package/dist/website/main/assets/el-link-CYRikDCA.js +0 -1
  222. package/dist/website/main/assets/el-loading-Dq8WDDkr.css +0 -1
  223. package/dist/website/main/assets/el-table-column-B3ZEEuPD.css +0 -1
  224. package/dist/website/main/assets/el-table-column-R6urXTXE.js +0 -1
  225. package/dist/website/main/assets/en-C_Tot-hO.js +0 -1
  226. package/dist/website/main/assets/home-rounded-B4KVwSYb.css +0 -1
  227. package/dist/website/main/assets/home-rounded-B6ip0c7y.js +0 -1
  228. package/dist/website/main/assets/index-9cW7WZJA.js +0 -1
  229. package/dist/website/main/assets/index-B-U892j4.js +0 -1
  230. package/dist/website/main/assets/index-B6mD6Kkg.js +0 -1
  231. package/dist/website/main/assets/index-BGMqZ6s6.js +0 -1
  232. package/dist/website/main/assets/index-Bud_dtZv.js +0 -1
  233. package/dist/website/main/assets/index-BxyUlJIo.js +0 -1
  234. package/dist/website/main/assets/index-C1gpYuZp.js +0 -1
  235. package/dist/website/main/assets/index-C2bAlTIv.js +0 -4
  236. package/dist/website/main/assets/index-CDNB051F.js +0 -1
  237. package/dist/website/main/assets/index-CNq68i9N.js +0 -1
  238. package/dist/website/main/assets/index-CS-qmP9q.js +0 -1
  239. package/dist/website/main/assets/index-CWkqV3b7.js +0 -1
  240. package/dist/website/main/assets/index-C_6TIEqJ.css +0 -1
  241. package/dist/website/main/assets/index-CaxXecF0.js +0 -1
  242. package/dist/website/main/assets/index-CbOuvPyn.js +0 -1
  243. package/dist/website/main/assets/index-CgNgaeRC.css +0 -1
  244. package/dist/website/main/assets/index-ChNPGeka.js +0 -1
  245. package/dist/website/main/assets/index-CjHODTEb.js +0 -1
  246. package/dist/website/main/assets/index-Cpt-ElYb.js +0 -1
  247. package/dist/website/main/assets/index-Cqeo6XX0.js +0 -1
  248. package/dist/website/main/assets/index-CrjnxYdq.js +0 -1
  249. package/dist/website/main/assets/index-DMmk1-uH.js +0 -2
  250. package/dist/website/main/assets/index-DOlF0Z_P.css +0 -1
  251. package/dist/website/main/assets/index-DPvzUGF_.js +0 -2
  252. package/dist/website/main/assets/index-Dj51p5I8.css +0 -1
  253. package/dist/website/main/assets/index-DvpUuDIq.js +0 -1
  254. package/dist/website/main/assets/index-Dwbqz_We.js +0 -1
  255. package/dist/website/main/assets/index-DwsxPrpM.js +0 -1
  256. package/dist/website/main/assets/index-IFbOrHc6.js +0 -1
  257. package/dist/website/main/assets/index-JZJBRbnu.js +0 -1
  258. package/dist/website/main/assets/index-YQrh68OP.js +0 -361
  259. package/dist/website/main/assets/index-d6c7G8Rn.js +0 -1
  260. package/dist/website/main/assets/index-q7_pRGD0.js +0 -8
  261. package/dist/website/main/assets/index-r4XZ4Nw3.js +0 -1
  262. package/dist/website/main/assets/index-ze19z7zX.js +0 -1
  263. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-6wuGCBaO.js +0 -2
  264. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-BHtswZUO.js +0 -1
  265. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-Bu8jevdr.js +0 -1
  266. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CUQttXIa.js +0 -1
  267. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CqTNk_HH.js +0 -1
  268. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-DDwXMaNL.js +0 -1
  269. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-DOAvJ6sA.js +0 -1
  270. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-CAzxiMOC.js +0 -59
  271. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-Cl1itFTX.js +0 -1
  272. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-DRm0zssd.js +0 -15
  273. package/dist/website/main/assets/kid-star-D1M-aC1C.css +0 -1
  274. package/dist/website/main/assets/kid-star-DCy2yzJb.js +0 -1
  275. package/dist/website/main/assets/md5-CtJDyuNs.js +0 -1
  276. package/dist/website/main/assets/settings-BMRZp14Y.js +0 -1
  277. package/dist/website/main/assets/settings-BhagQj3w.css +0 -1
  278. package/dist/website/main/assets/supervised-user-circle-CZYpyCV4.css +0 -1
  279. package/dist/website/main/assets/supervised-user-circle-v2VKksba.js +0 -1
  280. package/dist/website/main/assets/sync-saved-locally-rounded-BKS18Cgx.js +0 -1
  281. package/dist/website/main/assets/sync-saved-locally-rounded-wbwASI26.css +0 -1
  282. package/dist/website/main/assets/terminal-CysD-avl.js +0 -1
  283. package/dist/website/main/assets/terminal-DFt3N_TH.css +0 -1
  284. package/dist/website/main/assets/useCacheOssStore-E3m2bF9c.js +0 -1
  285. package/dist/website/main/assets/useCompEditStore-N2mMMlha.css +0 -1
  286. package/dist/website/main/assets/useCompEditStore-eTcWHaeG.js +0 -1
  287. package/dist/website/main/assets/useCompMetaLocalStore-BwKMTij9.js +0 -1
  288. package/dist/website/main/assets/useCompMetaStore-BWz1ZyX_.js +0 -1
  289. package/dist/website/main/assets/useKeyword-Dmz0UrKO.js +0 -1
  290. package/dist/website/main/assets/useTeamHeaders-kK4p3F9Z.js +0 -1
  291. package/dist/website/main/assets/useVscodeOpen-Bwp8Sbsw.js +0 -1
  292. package/dist/website/main/assets/zhCN-0_iHo67e.js +0 -1
  293. /package/dist/website/container/assets/{index-DY_KlG_O.js → index-C0I-xtR-.js} +0 -0
  294. /package/dist/website/item/assets/{_plugin-vue_export-helper-8dCw6Y2Z.css → @iconify-vue-8dCw6Y2Z.css} +0 -0
  295. /package/dist/website/main/assets/{v4-EwEgHOG0.js → uuid-EwEgHOG0.js} +0 -0
  296. /package/dist/website/main/assets/{index-m9r9dfRk.css → vuefinder-m9r9dfRk.css} +0 -0
@@ -0,0 +1 @@
1
+ import{p as ee,b as ve,O as d,P as R,V as oe,W as o,u as l,a1 as L,S as v,a3 as w,a2 as ue,a as P,k as H,i as pt,$ as pe,as as st,aB as We,U as N,n as ze,ad as ie,M as Ce,ar as dt,a8 as ke,w as ne,F as ua,am as He,an as je,m as _t,ab as Ya,Y as te,a0 as ca,a5 as qa,T as ht,X as Pe,K as ce,af as me,ao as gt,aC as Dt,ap as Ft,Z as Ae,au as Ne,a4 as $e,j as va,e as Ga,c as Qa,aD as pa,a9 as Wa,aE as Ja,aj as ma,H as Xa}from"./@vue-fhDHgfUd.js";import{t as Za}from"./mitt-BN3yQH3p.js";import{u as Y,p as fa}from"./@nanostores-cuv3rP3V.js";import{t as vt,T as el}from"./vue-sonner-tR0c75Mk.js";import{Q as tl}from"./@tanstack-B1C-iDkv.js";import{f as al}from"./vue-advanced-cropper-B8N2632q.js";import{g as _a}from"./vanilla-lazyload-CwDt0XVP.js";import{O as at,$ as ll}from"./overlayscrollbars-B4ARb2Jg.js";import{c as Je,a as Ot,o as lt,f as ot,s as nt}from"./@floating-ui-BOzNIQbj.js";import{P as ol}from"./@viselect-CfuubPTw.js";import{X as nl,U as il,z as rl,e as sl}from"./@uppy-CVofWm7v.js";import{c as Re,a as Me}from"./nanostores-Bxb5zCO9.js";const zt=new Map,It=Symbol("ServiceContainerId");function dl(t,e){zt.set(t,e)}function ul(t){zt.delete(t)}function Z(t){const e=t??pt(It);if(!e)throw new Error("No VueFinder app instance found. Make sure VueFinder component is mounted and provide the id explicitly or use within a VueFinder component tree.");const a=zt.get(e);if(!a)throw new Error(`VueFinder app instance with id "${e}" was not found. Make sure the VueFinder component with id="${e}" is mounted.`);return a}function cl(t){const e=localStorage.getItem(t+"_storage"),a=_t(JSON.parse(e??"{}"));ne(a,n);function n(){Object.keys(a).length?localStorage.setItem(t+"_storage",JSON.stringify(a)):localStorage.removeItem(t+"_storage")}function i(u,c){a[u]=c}function s(u){delete a[u]}function r(){Object.keys(a).forEach(u=>s(u))}return{getStore:(u,c=null)=>u in a?a[u]:c,setStore:i,removeStore:s,clearStore:r}}function Ee(t,e="An error occurred"){if(!t)return e;if(typeof t=="string")return t||e;if(t instanceof Error)return t.message||e;if(typeof t=="object"&&t!==null){const a=t;if(typeof a.message=="string"&&a.message)return a.message;if(typeof a.error=="string"&&a.error)return a.error}return e}function vl(t,e){return fa(t,e,{encode:JSON.stringify,decode:JSON.parse})}function pl(t){if(!t?.config?.get)return!0;try{return!!t.config.get("notificationsEnabled")}catch{return!0}}function Qe(t,e,a){const n={type:e,message:a};if(t?.emitter?.emit?.("vf-notify",n),!!pl(t))switch(e){case"success":vt.success(a);break;case"error":vt.error(a);break;case"warning":vt.warning(a);break;default:vt.info(a);break}}function Te(t){return{success(e){Qe(t,"success",e)},error(e){Qe(t,"error",e)},info(e){Qe(t,"info",e)},warning(e){Qe(t,"warning",e)},emit(e,a){Qe(t,e,a)}}}const Mt=new Map;async function Et(t,e){const a=e[t];return typeof a=="function"?(await a()).default:a}function ml(t,e,a,n,i){const s=Te({emitter:a,config:i}),r="vuefinder_locale",u="global";let c;if(Mt.has(u))c=Mt.get(u),e&&e!==c.get()&&c.set(e);else{const _=localStorage.getItem(r)?JSON.parse(localStorage.getItem(r)):null;c=vl(r,e||_||"en"),Mt.set(u,c)}const p="vuefinder_translations",h=_=>{try{const M=localStorage.getItem(p);if(M)return JSON.parse(M)[_]||null}catch{}return null},y=(_,M)=>{try{const T=localStorage.getItem(p),D=T?JSON.parse(T):{};D[_]=M,localStorage.setItem(p,JSON.stringify(D))}catch{}},m=Y(c),x=String(m.value),C=h(x),k=P(C||{});let b=!1;!C&&Object.keys(n).length>0&&Et(x,n).then(_=>{k.value=_,y(x,_)}).catch(()=>{}),ne(m,async(_,M)=>{if(M&&_===M)return;if(!b){b=!0;const D=h(String(_));if(D)k.value=D;else if(Object.keys(n).length>0)try{const I=await Et(String(_),n);k.value=I,y(String(_),I)}catch{}return}const T=h(String(_));if(T)k.value=T;else try{const D=await Et(String(_),n);k.value=D,y(String(_),D)}catch(D){const I=Ee(D,"Locale cannot be loaded!");s.error(I);return}Object.values(n).length>1&&(s.success("The language is set to "+_),a.emit("vf-language-saved"))},{immediate:!1});const F=(_,...M)=>M.length?F(_=_.replace("%s",String(M.shift())),...M):_;function g(_,...M){return k.value&&Object.prototype.hasOwnProperty.call(k.value,_)?F(k.value[_]||_,...M):F(_,...M)}const f=H({get:()=>m.value,set:_=>{c.set(_)}});return _t({t:g,locale:f,localeAtom:c})}const fl=["edit","newfile","newfolder","preview","archive","unarchive","search","rename","upload","delete","fullscreen","download","language","move","copy","history","theme","pinned"],ha={simple:{search:!0,preview:!0,rename:!0,upload:!0,delete:!0,newfile:!0,newfolder:!0,download:!0},advanced:fl.reduce((t,e)=>(t[e]=!0,t),{})};function Jt(){return ha.advanced}function ga(t){return t?t==="simple"||t==="advanced"?{...ha[t]}:{...Jt(),...t}:Jt()}const _l="4.1.2";function Bt(t,e,a,n,i){return e=Math,a=e.log,n=1024,i=a(t)/a(n)|0,(t/e.pow(n,i)).toFixed(0)+" "+(i?"KMGTPEZY"[--i]+"iB":"B")}function wa(t,e,a,n,i){return e=Math,a=e.log,n=1e3,i=a(t)/a(n)|0,(t/e.pow(n,i)).toFixed(0)+" "+(i?"KMGTPEZY"[--i]+"B":"B")}function hl(t){if(typeof t=="number")return t;const e={k:1,m:2,g:3,t:4},a=/(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(t);if(!a)return 0;const n=parseFloat(a[1]||"0"),i=(a[2]||"").toLowerCase(),s=e[i]??0;return Math.round(n*Math.pow(1024,s))}function gl(t){const e=va(null),a=P(!1),n=P(),i=P(!1);return{visible:a,type:e,data:n,open:(s,r=null)=>{t.get("fullScreen")||(document.querySelector("body").style.overflow="hidden"),a.value=!0,e.value=s,n.value=r},close:()=>{t.get("fullScreen")||(document.querySelector("body").style.overflow=""),a.value=!1,e.value=null},setEditMode:s=>{i.value=s},editMode:i}}const mt={view:"grid",theme:"silver",fullScreen:!1,showTreeView:!1,showHiddenFiles:!0,metricUnits:!1,showThumbnails:!0,persist:!1,path:"",pinnedFolders:[],notificationsEnabled:!0,expandTreeByDefault:!1,expandedTreePaths:[]},ft={initialPath:null,maxFileSize:null,loadingIndicator:"circular",showMenuBar:!0,showToolbar:!0,gridItemWidth:96,gridItemHeight:80,gridItemGap:8,gridIconSize:48,listItemHeight:32,listItemGap:2,listIconSize:16,notificationPosition:"bottom-center",notificationDuration:3e3,notificationVisibleToasts:4,notificationRichColors:!0},wl=new Set(Object.keys(ft));function yl(t){return t||"silver"}function ya(t){return wl.has(t)}function Xt(t){const e={},a={},n=t;for(const i in n)if(ya(i))a[i]=n[i];else if(i in mt){const s=i;e[s]=n[i]}return{persistenceConfig:e,nonPersistenceConfig:a}}function Zt(t,e){const a={...mt,...e,...t};return a.theme=yl(a.theme),a}function ea(t,e){return{...ft,...e,...t}}const bl=(t,e={})=>{const a=`vuefinder_config_${t}`,{persistenceConfig:n,nonPersistenceConfig:i}=Xt(e),s=Zt(n,mt),r=ea(i,ft),u=fa(a,s,{encode:JSON.stringify,decode:JSON.parse}),c=Me(r),p=Re([u,c],(C,k)=>({...C,...k})),h=(C={})=>{const k=u.get(),b=c.get(),{persistenceConfig:F,nonPersistenceConfig:g}=Xt(C),f=Zt(F,k),_=ea(g,b);u.set(f),c.set(_)},y=C=>ya(C)?c.get()[C]:u.get()[C],m=()=>({...u.get(),...c.get()}),x=(C,k)=>{const b=u.get();typeof C=="object"&&C!==null?u.set({...b,...C}):u.set({...b,[C]:k})};return{state:p,init:h,get:y,set:x,toggle:C=>{const k=u.get();x(C,!k[C])},all:m,reset:()=>{u.set({...mt}),c.set({...ft})}}};function kl(t,e){if(typeof t=="string"&&typeof e=="string")return t.toLowerCase().localeCompare(e.toLowerCase());const a=Number(t)||0,n=Number(e)||0;return a===n?0:a<n?-1:1}const xl=()=>{const t=Me(""),e=Me([]),a=Me(!1),n=Me([]),i=Me({active:!1,column:"",order:""}),s=Me({kind:"all",showHidden:!1}),r=Me(new Set),u=Me({type:"copy",path:"",items:new Set}),c=Me(null),p=Me(0),h=Me(!1),y=Me([]),m=Me(-1),x=Re([t],U=>{const j=(U??"").trim(),X=j.indexOf("://"),le=X>=0?j.slice(0,X):"",Se=(X>=0?j.slice(X+3):j).split("/").filter(Boolean);let he="";const Ye=Se.map(Ue=>(he=he?`${he}/${Ue}`:Ue,{basename:Ue,name:Ue,path:le?`${le}://${he}`:he,type:"dir"}));return{storage:le,breadcrumb:Ye,path:j}}),C=Re([n,i,s],(U,j,X)=>{let le=U;X.kind==="files"?le=le.filter(Le=>Le.type==="file"):X.kind==="folders"&&(le=le.filter(Le=>Le.type==="dir")),X.showHidden||(le=le.filter(Le=>!Le.basename.startsWith(".")));const{active:Se,column:he,order:Ye}=j;if(!Se||!he)return le;const Ue=Ye==="asc"?1:-1;return le.slice().sort((Le,Ct)=>kl(Le[he],Ct[he])*Ue)}),k=Re([n,r],(U,j)=>j.size===0?[]:U.filter(X=>j.has(X.path))),b=(U,j)=>{const X=t.get();if((j??!0)&&X!==U){const le=y.get(),Se=m.get();Se<le.length-1&&le.splice(Se+1),le.length===0&&X&&le.push(X),le.push(U),y.set([...le]),m.set(le.length-1)}t.set(U)},F=U=>{n.set(U??[])},g=U=>{e.set(U??[])},f=(U,j)=>{i.set({active:!0,column:U,order:j})},_=U=>{const j=i.get();j.active&&j.column===U?i.set({active:j.order==="asc",column:U,order:"desc"}):i.set({active:!0,column:U,order:"asc"})},M=()=>{i.set({active:!1,column:"",order:""})},T=(U,j)=>{s.set({kind:U,showHidden:j})},D=()=>{s.set({kind:"all",showHidden:!1})},I=(U,j="multiple")=>{const X=new Set(r.get());j==="single"&&X.clear(),X.add(U),r.set(X)},$=(U,j="multiple")=>{const X=new Set(r.get());j==="single"&&X.clear(),U.forEach(le=>X.add(le)),r.set(X)},W=U=>{const j=new Set(r.get());j.delete(U),r.set(j)},z=U=>r.get().has(U),K=(U,j="multiple")=>{const X=new Set(r.get());X.has(U)?X.delete(U):(j==="single"&&X.clear(),X.add(U)),r.set(X)},A=(U="multiple",j)=>{if(U==="single"){const X=n.get()[0];if(X){const le=X.path;r.set(new Set([le])),p.set(1)}}else{if(j?.selectionFilterType||j?.selectionFilterMimeIncludes&&j.selectionFilterMimeIncludes.length>0){const X=n.get().filter(le=>{const Se=j.selectionFilterType,he=j.selectionFilterMimeIncludes;return Se==="files"&&le.type==="dir"||Se==="dirs"&&le.type==="file"?!1:he&&Array.isArray(he)&&he.length>0&&le.type!=="dir"?le.mime_type?he.some(Ye=>le.mime_type?.startsWith(Ye)):!1:!0}).map(le=>le.path);r.set(new Set(X))}else{const X=new Set(n.get().map(le=>le.path));r.set(X)}ae(r.get().size)}},G=()=>{r.set(new Set),p.set(0)},q=U=>{const j=new Set(U??[]);r.set(j),p.set(j.size)},ae=U=>{p.set(U)},O=U=>{h.set(!!U)},E=()=>h.get(),S=(U,j)=>{const X=n.get().filter(le=>j.has(le.path));u.set({type:U,path:x.get().path,items:new Set(X)})},B=U=>Re([u],j=>j.type==="cut"&&Array.from(j.items).some(X=>X.path===U)),V=U=>Re([u],j=>j.type==="copy"&&Array.from(j.items).some(X=>X.path===U)),Q=U=>{const j=B(U);return Y(j).value??!1},se=U=>{const j=V(U);return Y(j).value??!1},fe=()=>{u.set({type:"copy",path:"",items:new Set})},xe=()=>u.get(),we=U=>{c.set(U)},Ge=()=>c.get(),Ke=()=>{c.set(null)},ye=()=>{const U=y.get(),j=m.get();if(j>0){const X=j-1,le=U[X];le&&(m.set(X),b(le,!1))}},J=()=>{const U=y.get(),j=m.get();if(j<U.length-1){const X=j+1,le=U[X];le&&(m.set(X),b(le,!1))}},re=Re([m],U=>U>0),de=Re([y,m],(U,j)=>j<U.length-1);return{files:n,storages:e,currentPath:t,sort:i,filter:s,selectedKeys:r,selectedCount:p,loading:h,draggedItem:c,clipboardItems:u,path:x,sortedFiles:C,selectedItems:k,setPath:b,setFiles:F,setStorages:g,setSort:f,toggleSort:_,clearSort:M,setFilter:T,clearFilter:D,select:I,selectMultiple:$,deselect:W,toggleSelect:K,selectAll:A,isSelected:z,clearSelection:G,setSelection:q,setSelectedCount:ae,setLoading:O,isLoading:E,setClipboard:S,createIsCut:B,createIsCopied:V,isCut:Q,isCopied:se,clearClipboard:fe,getClipboard:xe,setDraggedItem:we,getDraggedItem:Ge,clearDraggedItem:Ke,setReadOnly:U=>{a.set(U)},getReadOnly:()=>a.get(),isReadOnly:U=>a.get()?!0:U.read_only??!1,goBack:ye,goForward:J,canGoBack:re,canGoForward:de,navigationHistory:y,historyIndex:m}};class Cl{validateParam(e,a){if(e==null)throw new Error(`${a} is required`)}validatePath(e){if(!e)throw new Error("Path must be a non-empty string")}parsePath(e){if(!e)return{};if(e.includes("://")){const[a,...n]=e.split("://");return{storage:a,path:n.join("://")}}return{path:e}}combinePath(e,a){return e&&a?`${e}://${a}`:a||""}}function ta(t,e,a){const n=`HTTP ${e}: ${a}`;if(!t)return n;try{const i=JSON.parse(t);if(i.message)return i.message;if(i.error){if(typeof i.error=="string")return i.error;if(i.error.message)return i.error.message}if(i.errors&&Array.isArray(i.errors)&&i.errors.length>0){const s=i.errors.map(r=>r.message).filter(r=>!!r);if(s.length>0)return s.join(", ")}return i.detail?i.detail:i.title?i.title:t}catch{return t||n}}class ba extends Cl{config;static DEFAULT_URLS={list:"",upload:"/upload",delete:"/delete",rename:"/rename",copy:"/copy",move:"/move",archive:"/archive",unarchive:"/unarchive",createFile:"/create-file",createFolder:"/create-folder",preview:"/preview",download:"/download",search:"/search",save:"/save"};constructor(e){super();const a={...ba.DEFAULT_URLS,...e.url||{}};this.config={...e,baseURL:e.baseURL||"",url:a}}setBaseURL(e){this.config.baseURL=e||""}setToken(e){this.config.token=e}configureUploader(e,a){const n=this.getHeaders();delete n["Content-Type"],e.use(nl,{endpoint:`${this.config.baseURL}${this.config.url.upload}`,fieldName:"file",bundle:!1,headers:n,formData:!0}),e.on("upload",()=>{const i=a.getTargetPath();e.getFiles().forEach(s=>{e.setFileMeta(s.id,{path:i})})})}getHeaders(){const e={"Content-Type":"application/json",...this.config.headers};return this.config.token&&(e.Authorization=`Bearer ${this.config.token}`),e}async request(e,a={}){const n=`${this.config.baseURL}${e}`,i=await fetch(n,{...a,headers:{...this.getHeaders(),...a.headers}});if(!i.ok){const s=await i.text(),r=ta(s,i.status,i.statusText);throw new Error(r)}return(i.headers.get("content-type")||"").includes("application/json")?await i.json():await i.text()}async list(e){const a=new URLSearchParams;e?.path&&a.append("path",e.path);const n=a.toString()?`${this.config.url.list}?${a.toString()}`:this.config.url.list;return await this.request(n,{method:"GET"})}async delete(e){return this.validateParam(e.items,"items"),this.validateParam(e.path,"path"),await this.request(this.config.url.delete,{method:"POST",body:JSON.stringify({path:e.path,items:e.items})})}async rename(e){return this.validateParam(e.path,"path"),this.validateParam(e.item,"item"),this.validateParam(e.name,"name"),this.validatePath(e.path),await this.request(this.config.url.rename,{method:"POST",body:JSON.stringify({path:e.path,item:e.item,name:e.name})})}async copy(e){return this.validateParam(e.sources,"sources"),this.validateParam(e.destination,"destination"),e.path&&this.validatePath(e.path),await this.request(this.config.url.copy,{method:"POST",body:JSON.stringify({sources:e.sources,destination:e.destination,path:e.path})})}async move(e){return this.validateParam(e.sources,"sources"),this.validateParam(e.destination,"destination"),e.path&&this.validatePath(e.path),await this.request(this.config.url.move,{method:"POST",body:JSON.stringify({sources:e.sources,destination:e.destination,path:e.path})})}async archive(e){return this.validateParam(e.items,"items"),this.validateParam(e.name,"name"),this.validateParam(e.path,"path"),await this.request(this.config.url.archive,{method:"POST",body:JSON.stringify({items:e.items,path:e.path,name:e.name})})}async unarchive(e){return this.validateParam(e.item,"item"),this.validateParam(e.path,"path"),await this.request(this.config.url.unarchive,{method:"POST",body:JSON.stringify({item:e.item,path:e.path})})}async createFile(e){return this.validateParam(e.name,"name"),this.validateParam(e.path,"path"),await this.request(this.config.url.createFile,{method:"POST",body:JSON.stringify({path:e.path,name:e.name})})}async createFolder(e){return this.validateParam(e.name,"name"),this.validateParam(e.path,"path"),await this.request(this.config.url.createFolder,{method:"POST",body:JSON.stringify({path:e.path,name:e.name})})}getPreviewUrl(e){this.validatePath(e.path);const a=new URLSearchParams({path:e.path});return`${this.config.baseURL}${this.config.url.preview}?${a.toString()}`}async getContent(e){this.validatePath(e.path);const a=new URLSearchParams({path:e.path}),n=`${this.config.baseURL}${this.config.url.preview}?${a.toString()}`,i=await fetch(n,{headers:this.getHeaders()});if(!i.ok){const s=await i.text(),r=ta(s,i.status,i.statusText);throw new Error(r)}return{content:await i.text(),mimeType:i.headers.get("Content-Type")||void 0}}getDownloadUrl(e){this.validatePath(e.path);const a=new URLSearchParams({path:e.path});return`${this.config.baseURL}${this.config.url.download}?${a.toString()}`}async search(e){const a=this.config.url.search,n=new URLSearchParams;e.path&&n.set("path",e.path),e.filter&&n.set("filter",e.filter),e.deep&&n.set("deep","1"),e.size&&e.size!=="all"&&n.set("size",e.size);const i=n.toString()?`${a}?${n.toString()}`:a;return(await this.request(i,{method:"GET"})).files||[]}async save(e){return this.validateParam(e.path,"path"),await this.request(this.config.url.save,{method:"POST",body:JSON.stringify({path:e.path,content:e.content}),headers:this.getHeaders()})}}const aa={list:t=>["adapter","list",t],search:(t,e,a,n)=>["adapter","search",t,e,a,n],delete:t=>["adapter","delete",t],rename:()=>["adapter","rename"],copy:()=>["adapter","copy"],move:()=>["adapter","move"],archive:()=>["adapter","archive"],unarchive:()=>["adapter","unarchive"],createFile:()=>["adapter","createFile"],createFolder:()=>["adapter","createFolder"]};class Sl{driver;queryClient;config;onBeforeOpen;onAfterOpen;constructor(e,a={}){this.driver=e,this.onBeforeOpen=a.onBeforeOpen,this.onAfterOpen=a.onAfterOpen,this.queryClient=a.queryClient||new tl({defaultOptions:{queries:{refetchOnWindowFocus:a.refetchOnWindowFocus??!1,staleTime:a.staleTime??300*1e3,retry:a.retry??2},mutations:{retry:a.retry??1}}}),this.config={queryClient:this.queryClient,refetchOnWindowFocus:a.refetchOnWindowFocus??!1,staleTime:a.staleTime??300*1e3,cacheTime:a.cacheTime??600*1e3,retry:a.retry??2,onBeforeOpen:this.onBeforeOpen??(()=>{}),onAfterOpen:this.onAfterOpen??(()=>{})}}getDriver(){return this.driver}getQueryClient(){return this.queryClient}async list(e){const a=aa.list(e);return await this.queryClient.fetchQuery({queryKey:a,queryFn:()=>this.driver.list({path:e}),staleTime:this.config.staleTime})}async open(e){this.onBeforeOpen&&this.onBeforeOpen();const a=await this.list(e);return this.onAfterOpen&&this.onAfterOpen(a),a}async delete(e){const a=await this.driver.delete(e);return this.invalidateListQueries(),a}async rename(e){const a=await this.driver.rename(e);return this.invalidateListQueries(),a}async copy(e){const a=await this.driver.copy(e);return this.invalidateListQueries(),a}async move(e){const a=await this.driver.move(e);return this.invalidateListQueries(),a}async archive(e){const a=await this.driver.archive(e);return this.invalidateListQueries(),a}async unarchive(e){const a=await this.driver.unarchive(e);return this.invalidateListQueries(),a}async createFile(e){const a=await this.driver.createFile(e);return this.invalidateListQueries(),a}async createFolder(e){const a=await this.driver.createFolder(e);return this.invalidateListQueries(),a}async getContent(e){const a=["adapter","content",e.path];return await this.queryClient.fetchQuery({queryKey:a,queryFn:()=>this.driver.getContent(e),staleTime:this.config.staleTime})}getPreviewUrl(e){return this.driver.getPreviewUrl(e)}getDownloadUrl(e){return this.driver.getDownloadUrl(e)}async search(e){const a=aa.search(e.path,e.filter,e.deep,e.size);return await this.queryClient.fetchQuery({queryKey:a,queryFn:()=>this.driver.search(e),staleTime:this.config.staleTime})}async save(e){const a=await this.driver.save(e);return this.invalidateListQueries(),a}invalidateListQueries(){this.queryClient.invalidateQueries({queryKey:["adapter"],exact:!1})}invalidateListQuery(e){this.queryClient.invalidateQueries({queryKey:["adapter","list",e],exact:!0})}clearCache(){this.queryClient.clear()}}function Fl(t){const e=Y(t.state);return{current:H(()=>e.value.theme||"silver"),set:a=>{t.set("theme",a)}}}const Ml=(t,e)=>{const a=cl(t.id??"vf"),n=Za(),i=e.i18n,s=t.locale??e.locale,r=bl(t.id??"vf",t.config??{}),u=xl();if(!t.driver)throw new Error("Driver is required for VueFinder");const c=new Sl(t.driver);return _t({version:_l,config:r,theme:(()=>{const p=Fl(r);return{current:p.current,set:p.set}})(),fs:u,root:null,debug:t.debug??!1,emitter:n,storage:a,i18n:ml(a,s,n,i,r),modal:gl(r),adapter:Ya(c),features:ga(t.features),selectionMode:t.selectionMode||"multiple",selectionFilterType:H(()=>t.selectionFilterType||"both"),selectionFilterMimeIncludes:H(()=>t.selectionFilterMimeIncludes||[]),treeViewData:[],filesize:r.get("metricUnits")?wa:Bt,contextMenuItems:t.contextMenuItems,customUploader:t.customUploader})},El=["data-theme"],Tl={class:"vuefinder__modal-layout__container"},Dl={class:"vuefinder__modal-layout__content"},Il={key:0,class:"vuefinder__modal-layout__footer"},Al={key:0,class:"vuefinder__modal-drag-overlay"},Pl={class:"vuefinder__modal-drag-message"},De=ee({__name:"ModalLayout",props:{showDragOverlay:{type:Boolean},dragOverlayText:{}},setup(t){const e=P(null),a=Z();a.config;const n=t;ve(()=>{const s=document.querySelector(".v-f-modal input");s&&s.focus(),ze(()=>{if(document.querySelector(".v-f-modal input")&&window.innerWidth<768&&e.value){const r=e.value.getBoundingClientRect().bottom+16;window.scrollTo({top:r,left:0,behavior:"smooth"})}})});const i=s=>{s.target.classList.contains("vuefinder__modal-layout__wrapper")&&(s.preventDefault(),s.stopPropagation())};return(s,r)=>(d(),v("div",{"data-theme":l(a).theme.current,class:"vuefinder__themer vuefinder__modal-layout","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",tabindex:"0",onKeyup:r[1]||(r[1]=dt(u=>l(a).modal.close(),["esc"]))},[r[2]||(r[2]=o("div",{class:"vuefinder__modal-layout__overlay"},null,-1)),o("div",Tl,[o("div",{class:"vuefinder__modal-layout__wrapper",onContextmenu:i,onMousedown:r[0]||(r[0]=ie(u=>l(a).modal.close(),["self"]))},[o("div",{ref_key:"modalBody",ref:e,class:"vuefinder__modal-layout__body"},[o("div",Dl,[Ce(s.$slots,"default")]),s.$slots.buttons?(d(),v("div",Il,[Ce(s.$slots,"buttons")])):L("",!0)],512)],32)]),n.showDragOverlay?(d(),v("div",Al,[o("div",Pl,w(n.dragOverlayText||"Drag and drop the files/folders to here."),1)])):L("",!0)],40,El))}}),Ol={class:"vuefinder__modal-header"},zl={class:"vuefinder__modal-header__icon-container"},Bl={id:"modal-title",class:"vuefinder__modal-header__title"},Ie=ee({__name:"ModalHeader",props:{title:{},icon:{}},setup(t){return(e,a)=>(d(),v("div",Ol,[o("div",zl,[(d(),R(ca(t.icon),{class:"vuefinder__modal-header__icon"}))]),o("div",Bl,w(t.title),1)]))}}),Ll={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.8",viewBox:"0 0 24 24"};function Vl(t,e){return d(),v("svg",Ll,[...e[0]||(e[0]=[o("circle",{cx:"12",cy:"12",r:"9"},null,-1),o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 8.2h.01M10.75 11.25H12v4.5m0 0h1.25m-1.25 0h-2"},null,-1)])])}const ka={render:Vl},$l={class:"vuefinder__about-modal__content"},Ul={class:"vuefinder__about-modal__main"},Rl={class:"vuefinder__about-modal__tab-content"},Nl={class:"vuefinder__about-modal__lead"},Hl={class:"vuefinder__about-modal__description"},jl={class:"vuefinder__about-modal__links"},Kl={href:"https://vuefinder.ozdemir.be",class:"vuefinder__about-modal__link-btn",target:"_blank",rel:"noopener noreferrer"},Yl={class:"vuefinder__about-modal__meta"},ql={class:"vuefinder__about-modal__meta-item"},Gl={class:"vuefinder__about-modal__meta-label"},Ql={class:"vuefinder__about-modal__meta-value"},Wl={class:"vuefinder__about-modal__meta-item"},Jl={class:"vuefinder__about-modal__meta-label"},xa=ee({__name:"ModalAbout",setup(t){const e=Z(),{t:a}=e.i18n;return(n,i)=>(d(),R(De,null,{buttons:oe(()=>[o("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:i[0]||(i[0]=s=>l(e).modal.close())},w(l(a)("Close")),1)]),default:oe(()=>[o("div",$l,[N(Ie,{icon:l(ka),title:"Vuefinder "+l(e).version},null,8,["icon","title"]),o("div",Ul,[o("div",Rl,[o("div",Nl,w(l(a)("A modern, customizable file manager component built for Vue.")),1),o("div",Hl,w(l(a)("If you like it, please follow and ⭐ star on GitHub.")),1),o("div",jl,[o("a",Kl,w(l(a)("Project Home")),1),i[1]||(i[1]=o("a",{href:"https://github.com/n1crack/vuefinder",class:"vuefinder__about-modal__link-btn",target:"_blank",rel:"noopener noreferrer"}," GitHub ",-1))]),o("div",Yl,[o("div",ql,[o("span",Gl,w(l(a)("Version")),1),o("span",Ql,w(l(e).version),1)]),o("div",Wl,[o("span",Jl,w(l(a)("License")),1),i[2]||(i[2]=o("span",{class:"vuefinder__about-modal__meta-value"},"MIT",-1))])])])])])]),_:1}))}}),Xl={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function Zl(t,e){return d(),v("svg",Xl,[...e[0]||(e[0]=[o("path",{d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21q.512.078 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48 48 0 0 0-3.478-.397m-12 .562q.51-.089 1.022-.165m0 0a48 48 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a52 52 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a49 49 0 0 0-7.5 0"},null,-1)])])}const Ca={render:Zl},eo={class:"vuefinder__delete-modal__content"},to={class:"vuefinder__delete-modal__form"},ao={class:"vuefinder__delete-modal__description"},lo={class:"vuefinder__delete-modal__files vf-scrollbar"},oo={key:0,class:"vuefinder__delete-modal__icon vuefinder__delete-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},no={key:1,class:"vuefinder__delete-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},io={class:"vuefinder__delete-modal__file-name"},ro={class:"vuefinder__delete-modal__confirmation"},so={class:"vuefinder__delete-modal__confirmation-label"},uo={class:"vuefinder__delete-modal__confirmation-text"},co=["disabled"],wt=ee({__name:"ModalDelete",setup(t){const e=Z(),a=Te(e),{t:n}=e.i18n,i=e.fs,s=Y(i.path),r=P(e.modal.data.items),u=P(!1),c=()=>{r.value.length&&u.value&&e.adapter.delete({path:s.value.path,items:r.value.map(({path:p,type:h})=>({path:p,type:h}))}).then(p=>{a.success(n("Files deleted.")),e.fs.setFiles(p.files),e.modal.close()}).catch(p=>{a.error(Ee(p,n("Failed to delete files")))})};return(p,h)=>(d(),R(De,null,{buttons:oe(()=>[o("div",ro,[o("label",so,[pe(o("input",{"onUpdate:modelValue":h[0]||(h[0]=y=>u.value=y),type:"checkbox",class:"vuefinder__delete-modal__checkbox"},null,512),[[gt,u.value]]),o("span",uo,w(l(n)("I'm sure delete it, This action cannot be undone.")),1)])]),o("button",{type:"button",class:"vf-btn vf-btn-danger",disabled:!u.value,onClick:c},w(l(n)("Yes, Delete!")),9,co),o("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:h[1]||(h[1]=y=>l(e).modal.close())},w(l(n)("Cancel")),1)]),default:oe(()=>[o("div",null,[N(Ie,{icon:l(Ca),title:l(n)("Delete files")},null,8,["icon","title"]),o("div",eo,[o("div",to,[o("p",ao,w(l(n)("Are you sure you want to delete these files?")),1),o("div",lo,[(d(!0),v(ce,null,me(r.value,y=>(d(),v("p",{key:y.path,class:"vuefinder__delete-modal__file"},[y.type==="dir"?(d(),v("svg",oo,[...h[2]||(h[2]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(d(),v("svg",no,[...h[3]||(h[3]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),o("span",io,w(y.basename),1)]))),128))])])])])]),_:1}))}}),vo={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function po(t,e){return d(),v("svg",vo,[...e[0]||(e[0]=[o("path",{d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"},null,-1)])])}const Sa={render:po},mo={class:"vuefinder__rename-modal__content"},fo={class:"vuefinder__rename-modal__item"},_o={class:"vuefinder__rename-modal__item-info"},ho={key:0,class:"vuefinder__rename-modal__icon vuefinder__rename-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},go={key:1,class:"vuefinder__rename-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},wo={class:"vuefinder__rename-modal__item-name"},yt=ee({__name:"ModalRename",setup(t){const e=Z(),a=Te(e),{t:n}=e.i18n,i=e.fs,s=Y(i.path),r=P(e.modal.data.items[0]),u=P(r.value.basename),c=()=>{u.value!=r.value.basename&&e.adapter.rename({path:s.value.path,item:r.value.path,name:u.value}).then(p=>{a.success(n("%s is renamed.",u.value)),e.fs.setFiles(p.files),e.modal.close()}).catch(p=>{a.error(Ee(p,n("Failed to rename")))})};return(p,h)=>(d(),R(De,null,{buttons:oe(()=>[o("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:c},w(l(n)("Rename")),1),o("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:h[1]||(h[1]=y=>l(e).modal.close())},w(l(n)("Cancel")),1)]),default:oe(()=>[o("div",null,[N(Ie,{icon:l(Sa),title:l(n)("Rename")},null,8,["icon","title"]),o("div",mo,[o("div",fo,[o("p",_o,[r.value.type==="dir"?(d(),v("svg",ho,[...h[2]||(h[2]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(d(),v("svg",go,[...h[3]||(h[3]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),o("span",wo,w(r.value.basename),1)]),pe(o("input",{"onUpdate:modelValue":h[0]||(h[0]=y=>u.value=y),class:"vuefinder__rename-modal__input",placeholder:"Name",type:"text",onKeyup:dt(c,["enter"])},null,544),[[st,u.value]])])])])]),_:1}))}});function Oe(){const t=Z(),e=H(()=>t.features);return{enabled:a=>e.value[a]??!1}}const yo={class:"vuefinder__text-preview"},bo={class:"vuefinder__text-preview__header"},ko=["title"],xo={class:"vuefinder__text-preview__actions"},Co={key:0,class:"vuefinder__text-preview__content"},So={key:1},Fo=ee({__name:"Text",emits:["success"],setup(t,{emit:e}){const a=e,n=P(""),i=P(""),s=P(null),r=P(!1),u=Z(),c=Te(u),{enabled:p}=Oe(),{t:h}=u.i18n;ve(async()=>{try{const x=await u.adapter.getContent({path:u.modal.data.item.path});n.value=x.content,a("success")}catch(x){Ee(x,"Failed to load text content"),a("success")}});const y=()=>{r.value=!r.value,i.value=n.value,u.modal.setEditMode(r.value)},m=async()=>{try{const x=u.modal.data.item.path;await u.adapter.save({path:x,content:i.value}),n.value=i.value,c.success(h("Updated.")),a("success"),r.value=!r.value}catch(x){c.error(Ee(x,h("Failed to save file")))}};return(x,C)=>(d(),v("div",yo,[o("div",bo,[o("div",{id:"modal-title",class:"vuefinder__text-preview__title",title:l(u).modal.data.item.path},w(l(u).modal.data.item.basename),9,ko),o("div",xo,[r.value?(d(),v("button",{key:0,class:"vuefinder__text-preview__save-button",onClick:m},w(l(h)("Save")),1)):L("",!0),l(p)("edit")?(d(),v("button",{key:1,class:"vuefinder__text-preview__edit-button",onClick:C[0]||(C[0]=k=>y())},w(r.value?l(h)("Cancel"):l(h)("Edit")),1)):L("",!0)])]),o("div",null,[r.value?(d(),v("div",So,[pe(o("textarea",{ref_key:"editInput",ref:s,"onUpdate:modelValue":C[1]||(C[1]=k=>i.value=k),class:"vuefinder__text-preview__textarea",name:"text",cols:"30",rows:"10"},null,512),[[st,i.value]])])):(d(),v("pre",Co,w(n.value),1))])]))}}),Lt=async(t,e)=>{if(e){if(e.isFile){const a=await new Promise(n=>{e.file(n)});t(e,a)}if(e.isDirectory){const a=e.createReader(),n=await new Promise(i=>{a.readEntries(i)});for(const i of n)await Lt(t,i)}}},ge={PENDING:0,CANCELED:1,UPLOADING:2,ERROR:3,DONE:10};function Fa(t){const e=Z(),{t:a}=e.i18n,n=e.fs,i=Y(n.path),s=e.config,r=P({QUEUE_ENTRY_STATUS:ge}),u=P(null),c=P(null),p=P(null),h=P(null),y=P(null),m=P([]),x=P(""),C=P(!1),k=P(!1),b=P(null);let F;const g=O=>{O.preventDefault(),O.stopPropagation(),k.value=!0},f=O=>{O.preventDefault(),O.stopPropagation(),k.value=!0},_=O=>{O.preventDefault(),O.stopPropagation(),(!O.relatedTarget||O.relatedTarget===document.body)&&(k.value=!1)},M=O=>{O.preventDefault(),O.stopPropagation(),k.value=!1;const E=/^[/\\](.+)/,S=O.dataTransfer;S&&(S.items&&S.items.length?Array.from(S.items).forEach(B=>{if(B.kind==="file"){const V=B.webkitGetAsEntry?.();if(V)Lt((Q,se)=>{const fe=E.exec(Q?.fullPath||"");D(se,fe?fe[1]:se.name)},V);else{const Q=B.getAsFile?.();Q&&D(Q)}}}):S.files&&S.files.length&&Array.from(S.files).forEach(B=>D(B)))},T=O=>m.value.findIndex(E=>E.id===O),D=(O,E)=>F.addFile({name:E||O.name,type:O.type,data:O,source:"Local"}),I=O=>O.status===ge.DONE?"text-green-600":O.status===ge.ERROR||O.status===ge.CANCELED?"text-red-600":"",$=O=>O.status===ge.DONE?"✓":O.status===ge.ERROR||O.status===ge.CANCELED?"!":"...",W=()=>h.value?.click(),z=()=>e.modal.close(),K=O=>{if(C.value||!m.value.filter(E=>E.status!==ge.DONE).length){C.value||(x.value=a("Please select file to upload first."));return}x.value="",b.value=O||i.value,F.upload()},A=()=>{F.cancelAll(),m.value.forEach(O=>{O.status!==ge.DONE&&(O.status=ge.CANCELED,O.statusName=a("Canceled"))}),C.value=!1},G=O=>{C.value||(F.removeFile(O.id),m.value.splice(T(O.id),1))},q=O=>{if(!C.value)if(F.cancelAll(),O){const E=m.value.filter(S=>S.status!==ge.DONE);m.value=[],E.forEach(S=>D(S.originalFile,S.name))}else m.value=[]},ae=O=>{O.forEach(E=>{D(E)})};return ve(()=>{F=new il({debug:e.debug,restrictions:{maxFileSize:hl(s.get("maxFileSize")??"10mb")},locale:e.i18n.t("uppy"),onBeforeFileAdded:(B,V)=>{if(V[B.id]!=null){const Q=T(B.id);m.value[Q]?.status===ge.PENDING&&(x.value=F.i18n("noDuplicates",{fileName:B.name})),m.value=m.value.filter(se=>se.id!==B.id)}return m.value.push({id:B.id,name:B.name,size:e.filesize(B.size),status:ge.PENDING,statusName:a("Pending upload"),percent:null,originalFile:B.data}),!0}});const O={getTargetPath:()=>(b.value||i.value).path};if(t)t(F,O);else if(e.adapter.getDriver().configureUploader)e.adapter.getDriver().configureUploader(F,O);else throw new Error("No uploader configured");F.on("restriction-failed",(B,V)=>{const Q=m.value[T(B.id)];Q&&G(Q),x.value=V.message}),F.on("upload-start",B=>{B.forEach(V=>{const Q=m.value[T(V.id)];Q&&(Q.status=ge.UPLOADING,Q.statusName=a("Uploading"),Q.percent="0%")})}),F.on("upload-progress",(B,V)=>{const Q=V.bytesTotal??1,se=Math.floor(V.bytesUploaded/Q*100),fe=T(B.id);fe!==-1&&m.value[fe]&&(m.value[fe].percent=`${se}%`)}),F.on("upload-success",B=>{const V=m.value[T(B.id)];V&&(V.status=ge.DONE,V.statusName=a("Done"))}),F.on("upload-error",(B,V)=>{const Q=m.value[T(B.id)];Q&&(Q.percent=null,Q.status=ge.ERROR,Q.statusName=V?.isNetworkError?a("Network Error, Unable establish connection to the server or interrupted."):V?.message||a("Unknown Error"))}),F.on("error",B=>{x.value=B.message,C.value=!1}),F.on("complete",B=>{C.value=!1;const V=b.value||i.value;e.adapter.invalidateListQuery(V.path),e.adapter.open(V.path);const Q=m.value.filter(se=>se.status===ge.DONE&&B.successful.includes(se.id)).map(se=>se.name);e.emitter.emit("vf-upload-complete",Q)}),h.value?.addEventListener("click",()=>c.value?.click()),y.value?.addEventListener("click",()=>p.value?.click());const E={capture:!0};document.addEventListener("dragover",g,E),document.addEventListener("dragenter",f,E),document.addEventListener("dragleave",_,E),document.addEventListener("drop",M,E);const S=B=>{const V=B.target,Q=V.files;if(Q){for(const se of Q)D(se);V.value=""}};c.value?.addEventListener("change",S),p.value?.addEventListener("change",S)}),ke(()=>{const O={capture:!0};document.removeEventListener("dragover",g,O),document.removeEventListener("dragenter",f,O),document.removeEventListener("dragleave",_,O),document.removeEventListener("drop",M,O)}),{container:u,internalFileInput:c,internalFolderInput:p,pickFiles:h,pickFolders:y,queue:m,message:x,uploading:C,hasFilesInDropArea:k,definitions:r,openFileSelector:W,upload:K,cancel:A,remove:G,clear:q,close:z,getClassNameForEntry:I,getIconForEntry:$,addExternalFiles:ae}}const Mo={class:"vuefinder__image-preview"},Eo={class:"vuefinder__image-preview__header"},To=["title"],Do={class:"vuefinder__image-preview__actions"},Io={class:"vuefinder__image-preview__image-container"},Ao=["src"],Po=ee({name:"ImagePreview",__name:"Image",emits:["success"],setup(t,{emit:e}){const a=e,n=Z(),i=Te(n),{enabled:s}=Oe(),{t:r}=n.i18n,u=P(!1),c=P(n.modal.data.item.previewUrl??n.adapter.getPreviewUrl({path:n.modal.data.item.path})),p=P(c.value),{addExternalFiles:h,upload:y,queue:m}=Fa(n.customUploader),x=n.fs,C=Y(x.path),k=We("cropperRef"),b=async()=>{u.value=!u.value,n.modal.setEditMode(u.value)},F=async()=>{const g=k.value?.getResult({size:{width:795,height:341},fillColor:"#ffffff"})?.canvas;if(!g)return;let f=g;if(g.width>1200||g.height>1200){const I=Math.min(1200/g.width,1200/g.height),$=document.createElement("canvas");$.width=Math.floor(g.width*I),$.height=Math.floor(g.height*I);const W=$.getContext("2d");W&&(W.drawImage(g,0,0,$.width,$.height),f=$)}const _=n.modal.data.item.basename,M=_.split(".").pop()?.toLowerCase()||"jpg",T=M==="png"?"image/png":M==="gif"?"image/gif":"image/jpeg",D=await new Promise(I=>{f.toBlob($=>I($),T)});if(!D){i.error(r("Failed to save image"));return}try{const I=new File([D],_,{type:T}),$=n.modal.data.item.path.split("/");$.pop();const W={path:$.join("/")||(C.value?.path??"")};h([I]),await new Promise(G=>setTimeout(G,100));const z=m.value.find(G=>G.name===I.name);if(!z)throw new Error("File was not added to upload queue");y(W);let K=0;for(;K<150;){await new Promise(q=>setTimeout(q,200));const G=m.value.find(q=>q.id===z.id);if(G?.status===ge.DONE)break;if(G?.status===ge.ERROR)throw new Error(G.statusName||"Upload failed");K++}i.success(r("Updated.")),await fetch(c.value,{cache:"reload",mode:"no-cors"});const A=n.root?.querySelector?.('[data-src="'+c.value+'"]');A&&A instanceof HTMLElement&&_a.resetStatus(A),n.emitter.emit("vf-refresh-thumbnails"),await b(),a("success")}catch(I){i.error(Ee(I,r("Failed to save image")))}};return ve(()=>{a("success")}),(g,f)=>(d(),v("div",Mo,[o("div",Eo,[o("h3",{id:"modal-title",class:"vuefinder__image-preview__title",title:l(n).modal.data.item.path},w(l(n).modal.data.item.basename),9,To),o("div",Do,[u.value?(d(),v("button",{key:0,class:"vuefinder__image-preview__crop-button",onClick:F},w(l(r)("Crop")),1)):L("",!0),l(s)("edit")?(d(),v("button",{key:1,class:"vuefinder__image-preview__edit-button",onClick:f[0]||(f[0]=_=>b())},w(u.value?l(r)("Cancel"):l(r)("Edit")),1)):L("",!0)])]),o("div",Io,[u.value?(d(),R(l(al),{key:1,ref_key:"cropperRef",ref:k,class:"h-full w-full",crossorigin:"anonymous",src:p.value,"auto-zoom":!0,priority:"image",transitions:!0},null,8,["src"])):(d(),v("img",{key:0,style:{},src:l(n).modal.data.item.previewUrl??l(n).adapter.getPreviewUrl({path:l(n).modal.data.item.path}),class:"vuefinder__image-preview__image h-full w-full"},null,8,Ao))])]))}}),Oo={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function zo(t,e){return d(),v("svg",Oo,[...e[0]||(e[0]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1)])])}const it={render:zo},Bo={class:"vuefinder__default-preview"},Lo={class:"vuefinder__default-preview__content"},Vo={class:"vuefinder__default-preview__header"},$o=["title"],Uo={class:"vuefinder__default-preview__icon-container"},Ro=["title"],No=ee({__name:"Default",emits:["success"],setup(t,{emit:e}){const a=Z(),n=e;return ve(()=>{n("success")}),(i,s)=>(d(),v("div",Bo,[o("div",Lo,[o("div",Vo,[o("h3",{id:"modal-title",class:"vuefinder__default-preview__title",title:l(a).modal.data.item.path},w(l(a).modal.data.item.basename),9,$o)]),o("div",Uo,[N(l(it),{class:"vuefinder__default-preview__file-icon"}),o("div",{id:"modal-title",class:"vuefinder__default-preview__file-name",title:l(a).modal.data.item.path},w(l(a).modal.data.item.basename),9,Ro)])])]))}}),Ho={class:"vuefinder__video-preview"},jo=["title"],Ko={class:"vuefinder__video-preview__video",preload:"metadata",controls:""},Yo=["src"],qo=ee({__name:"Video",emits:["success"],setup(t,{emit:e}){const a=Z(),n=e,i=()=>a.adapter.getPreviewUrl({path:a.modal.data.item.path});return ve(()=>{n("success")}),(s,r)=>(d(),v("div",Ho,[o("h3",{id:"modal-title",class:"vuefinder__video-preview__title",title:l(a).modal.data.item.path},w(l(a).modal.data.item.basename),9,jo),o("div",null,[o("video",Ko,[o("source",{src:i(),type:"video/mp4"},null,8,Yo),r[0]||(r[0]=ue(" Your browser does not support the video tag. ",-1))])])]))}}),Go={class:"vuefinder__audio-preview"},Qo=["title"],Wo={class:"vuefinder__audio-preview__audio",controls:""},Jo=["src"],Xo=ee({__name:"Audio",emits:["success"],setup(t,{emit:e}){const a=e,n=Z(),i=()=>{const s=Z();return s.adapter.getPreviewUrl({path:s.modal.data.item.path})};return ve(()=>{a("success")}),(s,r)=>(d(),v("div",Go,[o("h3",{id:"modal-title",class:"vuefinder__audio-preview__title",title:l(n).modal.data.item.path},w(l(n).modal.data.item.basename),9,Qo),o("div",null,[o("audio",Wo,[o("source",{src:i(),type:"audio/mpeg"},null,8,Jo),r[0]||(r[0]=ue(" Your browser does not support the audio element. ",-1))])])]))}}),Zo={class:"vuefinder__pdf-preview"},en=["title"],tn=["data"],an=["src"],ln=ee({__name:"Pdf",emits:["success"],setup(t,{emit:e}){const a=Z(),n=e,i=()=>{const s=Z();return s.adapter.getPreviewUrl({path:s.modal.data.item.path})};return ve(()=>{n("success")}),(s,r)=>(d(),v("div",Zo,[o("h3",{id:"modal-title",class:"vuefinder__pdf-preview__title",title:l(a).modal.data.item.path},w(l(a).modal.data.item.basename),9,en),o("div",null,[o("object",{class:"vuefinder__pdf-preview__object",data:i(),type:"application/pdf",width:"100%",height:"100%"},[o("iframe",{class:"vuefinder__pdf-preview__iframe",src:i(),width:"100%",height:"100%"}," Your browser does not support PDFs ",8,an)],8,tn)])]))}});function on(t,e=null){return new Date(t*1e3).toLocaleString(e??navigator.language??"en-US")}const nn={key:0,class:"vuefinder__preview-modal__nav-overlay"},rn=["disabled","title"],sn=["disabled","title"],dn={class:"vuefinder__preview-modal__content"},un={key:0},cn={class:"vuefinder__preview-modal__loading"},vn={key:0,class:"vuefinder__preview-modal__loading-indicator"},pn={class:"vuefinder__preview-modal__details"},mn={class:"font-bold"},fn={class:"pl-2 font-bold"},_n={key:0,class:"vuefinder__preview-modal__note"},hn=["download","href"],ut=ee({__name:"ModalPreview",setup(t){const e=Z(),{enabled:a}=Oe(),{t:n}=e.i18n,i=P(!1),s=g=>{const f=(g||"").split("/").pop()||"",_=f.lastIndexOf(".");return _>=0?f.slice(_+1).toLowerCase():""},r=(g,f)=>f?g==="image"?new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]).has(f):g==="video"?new Set(["mp4","webm","ogg","ogv","mov","m4v"]).has(f):g==="audio"?new Set(["mp3","wav","ogg","oga","m4a","flac","aac"]).has(f):g==="text"?new Set(["txt","md","json","js","ts","css","scss","html","xml","csv","log","yml","yaml"]).has(f):g==="application/pdf"?f==="pdf":!1:!1,u=g=>{const f=e.modal.data.item.mime_type;if(f&&typeof f=="string")return f.startsWith(g);const _=s(e.modal.data.item.path);return r(g,_)},c=a("preview");c||(i.value=!0);const p=H(()=>e.modal.data.item),h=Y(e.fs.sortedFiles),y=H(()=>h.value.filter(g=>g.type==="file")),m=H(()=>y.value.findIndex(g=>g.path===p.value.path)),x=H(()=>m.value>0),C=H(()=>m.value<y.value.length-1),k=()=>{if(e.modal.editMode||!x.value)return;const g=y.value[m.value-1];g&&(e.fs.clearSelection(),e.fs.select(g.path),e.modal.data.item=g)},b=()=>{if(e.modal.editMode||!C.value)return;const g=y.value[m.value+1];g&&(e.fs.clearSelection(),e.fs.select(g.path),e.modal.data.item=g)},F=g=>{if(g.key==="Escape"){g.preventDefault(),g.stopPropagation(),e.modal.close();return}(g.key==="ArrowLeft"||g.key==="ArrowRight")&&(g.preventDefault(),g.stopPropagation(),g.key==="ArrowLeft"?k():b())};return ve(()=>{const g=document.querySelector(".vuefinder__preview-modal");g&&g.focus()}),(g,f)=>(d(),R(De,null,{buttons:oe(()=>[o("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:f[6]||(f[6]=_=>l(e).modal.close())},w(l(n)("Close")),1),l(a)("download")?(d(),v("a",{key:0,target:"_blank",class:"vf-btn vf-btn-primary",download:l(e).adapter.getDownloadUrl(l(e).modal.data.item),href:l(e).adapter.getDownloadUrl(l(e).modal.data.item)},w(l(n)("Download")),9,hn)):L("",!0)]),default:oe(()=>[o("div",{class:"vuefinder__preview-modal",tabindex:"0",onKeydown:F},[l(e).modal.editMode?L("",!0):(d(),v("div",nn,[o("button",{disabled:!x.value,class:"vuefinder__preview-modal__nav-side vuefinder__preview-modal__nav-side--left",title:l(n)("Previous file"),onClick:k},[...f[7]||(f[7]=[o("svg",{class:"vuefinder__preview-modal__nav-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[o("polyline",{points:"15,18 9,12 15,6"})],-1)])],8,rn),o("button",{disabled:!C.value,class:"vuefinder__preview-modal__nav-side vuefinder__preview-modal__nav-side--right",title:l(n)("Next file"),onClick:b},[...f[8]||(f[8]=[o("svg",{class:"vuefinder__preview-modal__nav-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[o("polyline",{points:"9,18 15,12 9,6"})],-1)])],8,sn)])),o("div",dn,[l(c)?(d(),v("div",un,[u("text")?(d(),R(Fo,{key:`text-${p.value.path}`,onSuccess:f[0]||(f[0]=_=>i.value=!0)})):u("image")?(d(),R(Po,{key:`image-${p.value.path}`,onSuccess:f[1]||(f[1]=_=>i.value=!0)})):u("video")?(d(),R(qo,{key:`video-${p.value.path}`,onSuccess:f[2]||(f[2]=_=>i.value=!0)})):u("audio")?(d(),R(Xo,{key:`audio-${p.value.path}`,onSuccess:f[3]||(f[3]=_=>i.value=!0)})):u("application/pdf")?(d(),R(ln,{key:`pdf-${p.value.path}`,onSuccess:f[4]||(f[4]=_=>i.value=!0)})):(d(),R(No,{key:`default-${p.value.path}`,onSuccess:f[5]||(f[5]=_=>i.value=!0)}))])):L("",!0),o("div",cn,[i.value===!1?(d(),v("div",vn,[f[9]||(f[9]=o("svg",{class:"vuefinder__preview-modal__spinner",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[o("circle",{class:"vuefinder__preview-modal__spinner-circle",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),o("path",{class:"vuefinder__preview-modal__spinner-path",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),o("span",null,w(l(n)("Loading")),1)])):L("",!0)])])],32),o("div",pn,[o("div",null,[o("span",mn,w(l(n)("File Size"))+": ",1),ue(w(l(e).filesize(l(e).modal.data.item.file_size)),1)]),o("div",null,[o("span",fn,w(l(n)("Last Modified"))+": ",1),ue(" "+w(l(on)(l(e).modal.data.item.last_modified)),1)])]),l(a)("download")?(d(),v("div",_n,[o("span",null,w(l(n)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)),1)])):L("",!0)]),_:1}))}}),gn={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"};function wn(t,e){return d(),v("svg",gn,[...e[0]||(e[0]=[o("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),o("path",{d:"M13 19H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4l3 3h7a2 2 0 0 1 2 2v4M16 22l5-5M21 21.5V17h-4.5"},null,-1)])])}const yn={render:wn},bn={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function kn(t,e){return d(),v("svg",bn,[...e[0]||(e[0]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M8 16H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v2m-6 12h8a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-8a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2"},null,-1)])])}const Vt={render:kn},xn={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function Cn(t,e){return d(),v("svg",xn,[...e[0]||(e[0]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-6l-2-2H5a2 2 0 0 0-2 2"},null,-1)])])}const Be={render:Cn},Sn={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"};function Fn(t,e){return d(),v("svg",Sn,[...e[0]||(e[0]=[o("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),o("path",{d:"M12 5v14M5 12h14"},null,-1)])])}const bt={render:Fn},Mn={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"};function En(t,e){return d(),v("svg",Mn,[...e[0]||(e[0]=[o("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),o("path",{d:"M5 12h14"},null,-1)])])}const kt={render:En},Tn={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"h-5 w-5",viewBox:"0 0 24 24"};function Dn(t,e){return d(),v("svg",Tn,[...e[0]||(e[0]=[o("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),o("path",{d:"m15 4.5-4 4L7 10l-1.5 1.5 7 7L14 17l1.5-4 4-4M9 15l-4.5 4.5M14.5 4 20 9.5"},null,-1)])])}const $t={render:Dn},In={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function An(t,e){return d(),v("svg",In,[...e[0]||(e[0]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"},null,-1)])])}const Ut={render:An},Pn={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"};function On(t,e){return d(),v("svg",Pn,[...e[0]||(e[0]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 9.776q.168-.026.344-.026h15.812q.176 0 .344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776"},null,-1)])])}const Rt={render:On},zn={class:"vuefinder__modal-tree__folder-item"},Bn={class:"vuefinder__modal-tree__folder-content"},Ln={key:1,class:"vuefinder__modal-tree__folder-spacer"},Vn={class:"vuefinder__modal-tree__folder-text"},$n={key:0,class:"vuefinder__modal-tree__subfolders"},Un={key:0,class:"vuefinder__modal-tree__more-note"},Rn=300,Nn=ee({__name:"ModalTreeFolderItem",props:{folder:{},storage:{},modelValue:{},expandedFolders:{},modalTreeData:{},currentPath:{}},emits:["update:modelValue","selectAndClose","toggleFolder"],setup(t,{emit:e}){const a=Z(),{t:n}=a.i18n,i=a.fs,s=P({}),r=t,u=e;Y(i.path);const c=H(()=>{const D=`${r.storage}:${r.folder.path}`;return r.expandedFolders[D]||!1}),p=H(()=>r.modelValue?.path===r.folder.path),h=H(()=>r.currentPath?.path===r.folder.path),y=H(()=>r.modalTreeData[r.folder.path]||[]),m=H(()=>{const D=y.value,I=s.value[r.folder.path]||50;return D.length>I?D.slice(0,I):D}),x=H(()=>y.value.length),C=H(()=>s.value[r.folder.path]||50),k=H(()=>x.value>C.value),b=()=>{s.value[r.folder.path]=(C.value||50)+50},F=H(()=>y.value.length>0||r.folder.type==="dir"),g=()=>{u("toggleFolder",r.storage,r.folder.path)},f=()=>{u("update:modelValue",r.folder)},_=()=>{u("update:modelValue",r.folder),u("selectAndClose",r.folder)};let M=0;const T=()=>{const D=Date.now();D-M<Rn?_():f(),M=D};return(D,I)=>{const $=ma("ModalTreeFolderItem",!0);return d(),v("div",zn,[o("div",Bn,[F.value?(d(),v("div",{key:0,class:"vuefinder__modal-tree__folder-toggle",onClick:g},[c.value?(d(),R(l(kt),{key:1,class:"vuefinder__modal-tree__folder-toggle-icon"})):(d(),R(l(bt),{key:0,class:"vuefinder__modal-tree__folder-toggle-icon"}))])):(d(),v("div",Ln)),o("div",{class:te(["vuefinder__modal-tree__folder-link",{"vuefinder__modal-tree__folder-link--selected":p.value,"vuefinder__modal-tree__folder-link--current":h.value}]),onClick:f,onDblclick:_,onTouchend:T},[c.value?(d(),R(l(Rt),{key:1,class:"vuefinder__item-icon__folder--open vuefinder__modal-tree__folder-icon"})):(d(),R(l(Be),{key:0,class:"vuefinder__modal-tree__folder-icon vuefinder__item-icon__folder"})),o("span",Vn,w(t.folder.basename),1)],34)]),c.value&&F.value?(d(),v("div",$n,[(d(!0),v(ce,null,me(m.value,W=>(d(),R($,{key:W.path,folder:W,storage:t.storage,"model-value":t.modelValue,"expanded-folders":t.expandedFolders,"modal-tree-data":t.modalTreeData,"current-path":t.currentPath,"onUpdate:modelValue":I[0]||(I[0]=z=>D.$emit("update:modelValue",z)),onSelectAndClose:I[1]||(I[1]=z=>D.$emit("selectAndClose",z)),onToggleFolder:I[2]||(I[2]=(z,K)=>D.$emit("toggleFolder",z,K))},null,8,["folder","storage","model-value","expanded-folders","modal-tree-data","current-path"]))),128)),k.value?(d(),v("div",Un,[o("div",{class:"vuefinder__modal-tree__load-more",onClick:b},w(l(n)("load more")),1)])):L("",!0)])):L("",!0)])}}}),Hn={class:"vuefinder__modal-tree"},jn={class:"vuefinder__modal-tree__header"},Kn={class:"vuefinder__modal-tree__title"},Yn={key:0,class:"vuefinder__modal-tree__section"},qn={class:"vuefinder__modal-tree__section-title"},Gn={class:"vuefinder__modal-tree__list"},Qn=["onClick","onDblclick","onTouchend"],Wn={class:"vuefinder__modal-tree__text"},Jn={class:"vuefinder__modal-tree__text-storage"},Xn={class:"vuefinder__modal-tree__section-title"},Zn={class:"vuefinder__modal-tree__list"},ei={class:"vuefinder__modal-tree__storage-item"},ti={class:"vuefinder__modal-tree__storage-content"},ai=["onClick"],li=["onClick","onDblclick","onTouchend"],oi={class:"vuefinder__modal-tree__storage-text"},ni={key:0,class:"vuefinder__modal-tree__subfolders"},ii={key:0,class:"vuefinder__modal-tree__more-note"},ri=["onClick"],la=300,Nt=ee({__name:"ModalTreeSelector",props:{modelValue:{},showPinnedFolders:{type:Boolean},currentPath:{}},emits:["update:modelValue","selectAndClose"],setup(t,{emit:e}){const a=Z(),{t:n}=a.i18n,i=a.fs,s=a.config,r=e,u=Y(i.sortedFiles),c=Y(i.storages),p=H(()=>c.value||[]),h=Y(i.path),y=P(null),m=P({}),x=P({}),C=P({});ne(u,A=>{const G=A.filter(ae=>ae.type==="dir"),q=h.value?.path||"";q&&(x.value[q]=G.map(ae=>({...ae,type:"dir"})))});const k=(A,G)=>{const q=`${A}:${G}`;m.value={...m.value,[q]:!m.value[q]},m.value[q]&&!x.value[G]&&a.adapter.list(G).then(ae=>{const O=(ae.files||[]).filter(E=>E.type==="dir");x.value[G]=O.map(E=>({...E,type:"dir"}))})},b=A=>x.value[A]||[],F=A=>C.value[A]||50,g=A=>{const G=b(A),q=F(A);return G.length>q?G.slice(0,q):G},f=A=>b(A).length,_=A=>f(A)>F(A),M=A=>{C.value[A]=F(A)+50},T=A=>{A&&r("update:modelValue",A)},D=A=>{A&&(r("update:modelValue",A),r("selectAndClose",A))},I=A=>{const G={storage:A,path:A+"://",basename:A,type:"dir",extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public",dir:A+"://"};r("update:modelValue",G)},$=A=>{const G={storage:A,path:A+"://",basename:A,type:"dir",extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public",dir:A+"://"};r("update:modelValue",G),r("selectAndClose",G)};let W=0;const z=A=>{if(!A)return;const G=Date.now();G-W<la?D(A):T(A),W=G},K=A=>{const G=Date.now();G-W<la?$(A):I(A),W=G};return ve(()=>{y.value&&at(y.value,{overflow:{x:"hidden"},scrollbars:{theme:"vf-scrollbars-theme"}})}),(A,G)=>(d(),v("div",Hn,[o("div",jn,[o("div",Kn,w(l(n)("Select Target Folder")),1)]),o("div",{ref_key:"modalContentElement",ref:y,class:"vuefinder__modal-tree__content"},[t.showPinnedFolders&&l(a).features.pinned&&l(s).get("pinnedFolders").length?(d(),v("div",Yn,[o("div",qn,w(l(n)("Pinned Folders")),1),o("div",Gn,[(d(!0),v(ce,null,me(l(s).get("pinnedFolders"),q=>(d(),v("div",{key:q.path,class:te(["vuefinder__modal-tree__item",{"vuefinder__modal-tree__item--selected":t.modelValue?.path===q.path}]),onClick:ae=>T(q),onDblclick:ae=>D(q),onTouchend:ae=>z(q)},[N(l(Be),{class:"vuefinder__modal-tree__icon vuefinder__item-icon__folder"}),o("div",Wn,w(q.basename),1),o("div",Jn,w(q.storage),1),N(l($t),{class:"vuefinder__modal-tree__icon vuefinder__modal-tree__icon--pin"})],42,Qn))),128))])])):L("",!0),o("div",Xn,w(l(n)("Storages")),1),(d(!0),v(ce,null,me(p.value,q=>(d(),v("div",{key:q,class:"vuefinder__modal-tree__section"},[o("div",Zn,[o("div",ei,[o("div",ti,[o("div",{class:"vuefinder__modal-tree__storage-toggle",onClick:ie(ae=>k(q,q+"://"),["stop"])},[m.value[`${q}:${q}://`]?(d(),R(l(kt),{key:1,class:"vuefinder__modal-tree__toggle-icon"})):(d(),R(l(bt),{key:0,class:"vuefinder__modal-tree__toggle-icon"}))],8,ai),o("div",{class:te(["vuefinder__modal-tree__storage-link",{"vuefinder__modal-tree__storage-link--selected":t.modelValue?.path===q+"://"}]),onClick:ae=>I(q),onDblclick:ae=>$(q),onTouchend:ae=>K(q)},[N(l(Ut),{class:"vuefinder__modal-tree__storage-icon"}),o("span",oi,w(q),1)],42,li)]),m.value[`${q}:${q}://`]?(d(),v("div",ni,[(d(!0),v(ce,null,me(g(q+"://"),ae=>(d(),R(Nn,{key:ae.path,folder:ae,storage:q,"model-value":t.modelValue,"expanded-folders":m.value,"modal-tree-data":x.value,"current-path":t.currentPath,"onUpdate:modelValue":T,onSelectAndClose:D,onToggleFolder:k},null,8,["folder","storage","model-value","expanded-folders","modal-tree-data","current-path"]))),128)),_(q+"://")?(d(),v("div",ii,[o("div",{class:"vuefinder__modal-tree__load-more",onClick:ae=>M(q+"://")},w(l(n)("load more")),9,ri)])):L("",!0)])):L("",!0)])])]))),128))],512)]))}}),si=["title"],At=ee({__name:"Message",props:{error:{type:Boolean}},emits:["hidden"],setup(t,{emit:e}){const a=e,n=Z(),{t:i}=n.i18n,s=P(!1),r=P(null),u=P(r.value?.innerHTML);ne(u,()=>s.value=!1);const c=()=>{a("hidden"),s.value=!0};return(p,h)=>(d(),v("div",null,[s.value?L("",!0):(d(),v("div",{key:0,ref_key:"strMessage",ref:r,class:te(["vuefinder__message",t.error?"vuefinder__message--error":"vuefinder__message--success"])},[Ce(p.$slots,"default"),o("div",{class:"vuefinder__message__close",title:l(i)("Close"),onClick:c},[...h[0]||(h[0]=[o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__message__icon"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,si)],2))]))}}),di={class:"vuefinder__move-modal__content"},ui={class:"vuefinder__move-modal__description"},ci={class:"vuefinder__move-modal__files vf-scrollbar"},vi={class:"vuefinder__move-modal__file-name"},pi={class:"vuefinder__move-modal__target-title"},mi={class:"vuefinder__move-modal__target-container"},fi={class:"vuefinder__move-modal__target-path"},_i={class:"vuefinder__move-modal__target-storage"},hi={key:0,class:"vuefinder__move-modal__destination-folder"},gi={class:"vuefinder__move-modal__target-badge"},wi={key:0,class:"vuefinder__move-modal__options"},yi={class:"vuefinder__move-modal__checkbox-label"},bi={class:"vuefinder__move-modal__checkbox-text"},ki=["disabled"],xi={class:"vuefinder__move-modal__selected-items"},Ma=ee({__name:"ModalTransfer",props:{copy:{type:Boolean}},setup(t){const e=Z(),a=Te(e),{enabled:n}=Oe(),{t:i}=e.i18n,s=t,r=P(e.modal.data.items.from),u=P(e.modal.data.items.to),c=P(""),p=P(s.copy||!n("move")),h=H(()=>p.value?"copy":"move"),y=P(!1),m=Y(e.fs.path),x=H(()=>p.value?i("Copy files"):i("Move files")),C=H(()=>p.value?i("Are you sure you want to copy these files?"):i("Are you sure you want to move these files?")),k=H(()=>p.value?i("Yes, Copy!"):i("Yes, Move!")),b=T=>{T&&(u.value=T)},F=T=>{T&&(u.value=T,y.value=!1)},g=H(()=>{const T=u.value;return T?r.value.some(D=>!!(T.path===D.path||D.path.startsWith(T.path+"/")||D.type==="dir"&&T.path.startsWith(D.path+"/"))):!0}),f=H(()=>{if(!g.value)return"";const T=u.value;return T?r.value.find(D=>T.path===D.path||D.path.startsWith(T.path+"/")||D.type==="dir"&&T.path.startsWith(D.path+"/"))?i("Cannot move/copy item to itself or its parent/child directory"):i("Invalid destination directory"):i("Please select a destination directory")}),_=()=>{const T=u.value.path;if(!T)return{storage:"local",path:""};if(T.endsWith("://"))return{storage:T.replace("://",""),path:""};const D=T.split("://");return{storage:D[0]||"local",path:D[1]||""}},M=async()=>{if(r.value.length)try{const{files:T}=await e.adapter[h.value]({path:m.value.path,sources:r.value.map(({path:D})=>D),destination:u.value.path});e.fs.setFiles(T),e.modal.close()}catch(T){a.error(Ee(T,i("Failed to transfer files")))}};return(T,D)=>(d(),R(De,null,{buttons:oe(()=>[o("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:g.value,onClick:M},w(k.value),9,ki),o("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:D[4]||(D[4]=I=>l(e).modal.close())},w(l(i)("Cancel")),1),o("div",xi,w(l(i)("%s item(s) selected.",r.value.length)),1)]),default:oe(()=>[o("div",null,[N(Ie,{icon:p.value?l(Vt):l(yn),title:x.value},null,8,["icon","title"]),o("div",di,[o("p",ui,w(C.value),1),o("div",ci,[(d(!0),v(ce,null,me(r.value,I=>(d(),v("div",{key:I.path,class:"vuefinder__move-modal__file"},[o("div",null,[I.type==="dir"?(d(),R(l(Be),{key:0,class:"vuefinder__move-modal__icon vuefinder__move-modal__icon--dir"})):(d(),R(l(it),{key:1,class:"vuefinder__move-modal__icon"}))]),o("div",vi,w(I.path),1)]))),128))]),o("h4",pi,w(l(i)("Target Directory")),1),o("div",mi,[o("div",{class:"vuefinder__move-modal__target-display",onClick:D[0]||(D[0]=I=>y.value=!y.value)},[o("div",fi,[o("span",_i,w(_().storage)+"://",1),_().path?(d(),v("span",hi,w(_().path),1)):L("",!0)]),o("span",gi,w(l(i)("Browse")),1)])]),o("div",{class:te(["vuefinder__move-modal__tree-selector",y.value?"vuefinder__move-modal__tree-selector--expanded":"vuefinder__move-modal__tree-selector--collapsed"])},[N(Nt,{modelValue:u.value,"onUpdate:modelValue":[D[1]||(D[1]=I=>u.value=I),b],"show-pinned-folders":!0,onSelectAndClose:F},null,8,["modelValue"])],2),l(n)("copy")&&l(n)("move")?(d(),v("div",wi,[o("label",yi,[pe(o("input",{"onUpdate:modelValue":D[2]||(D[2]=I=>p.value=I),type:"checkbox",class:"vuefinder__move-modal__checkbox"},null,512),[[gt,p.value]]),o("span",bi,w(l(i)("Create a copy instead of moving")),1)])])):L("",!0),f.value?(d(),R(At,{key:1,error:""},{default:oe(()=>[ue(w(f.value),1)]),_:1})):L("",!0),c.value.length&&!f.value?(d(),R(At,{key:2,error:"",onHidden:D[3]||(D[3]=I=>c.value="")},{default:oe(()=>[ue(w(c.value),1)]),_:1})):L("",!0)])])]),_:1}))}}),Xe=ee({__name:"ModalMove",setup(t){return(e,a)=>(d(),R(Ma,{copy:!1}))}}),Ht=ee({__name:"ModalCopy",setup(t){return(e,a)=>(d(),R(Ma,{copy:!0}))}}),Ci=(t,e=0,a=!1)=>{let n;return(...i)=>{a&&!n&&t(...i),clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}},Ea=(t,e,a)=>{const n=P(t);return Qa((i,s)=>({get(){return i(),n.value},set:Ci(r=>{n.value=r,s()},e,!1)}))},Si={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function Fi(t,e){return d(),v("svg",Si,[...e[0]||(e[0]=[o("path",{d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607"},null,-1)])])}const jt={render:Fi},Mi={xmlns:"http://www.w3.org/2000/svg",fill:"none",class:"animate-spin p-0.5 h-5 w-5 text-white ml-auto",viewBox:"0 0 24 24"};function Ei(t,e){return d(),v("svg",Mi,[...e[0]||(e[0]=[o("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",class:"opacity-25 stroke-blue-900"},null,-1),o("path",{fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12zm2 5.291A7.96 7.96 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938z",class:"opacity-75"},null,-1)])])}const xt={render:Ei},Ti={class:"vuefinder__search-modal__search-input"},Di=["value","placeholder","disabled"],Ii={key:0,class:"vuefinder__search-modal__loading"},Ai=ee({name:"SearchInput",__name:"SearchInput",props:{modelValue:{},isSearching:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue","keydown"],setup(t,{expose:e,emit:a}){const n=a,i=Z(),{t:s}=i.i18n,r=P(null),u=p=>{const h=p.target;n("update:modelValue",h.value)},c=p=>{n("keydown",p)};return e({focus:()=>{r.value&&r.value.focus()}}),(p,h)=>(d(),v("div",Ti,[N(l(jt),{class:"vuefinder__search-modal__search-icon"}),o("input",{ref_key:"searchInput",ref:r,value:t.modelValue,type:"text",placeholder:l(s)("Search files"),disabled:t.disabled,class:"vuefinder__search-modal__input",onKeydown:c,onKeyup:h[0]||(h[0]=ie(()=>{},["stop"])),onInput:u},null,40,Di),t.isSearching?(d(),v("div",Ii,[N(l(xt),{class:"vuefinder__search-modal__loading-icon"})])):L("",!0)]))}}),Pi={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"};function Oi(t,e){return d(),v("svg",Pi,[...e[0]||(e[0]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87q.11.06.22.127c.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a8 8 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a7 7 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a7 7 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a7 7 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124q.108-.066.22-.128c.332-.183.582-.495.644-.869z"},null,-1),o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0"},null,-1)])])}const Ta={render:Oi},zi=["disabled","title"],Bi=["data-theme"],Li={class:"vuefinder__search-modal__dropdown-content"},Vi={class:"vuefinder__search-modal__dropdown-section"},$i={class:"vuefinder__search-modal__dropdown-title"},Ui={class:"vuefinder__search-modal__dropdown-options"},Ri={key:0,class:"vuefinder__search-modal__dropdown-option-check"},Ni={key:0,class:"vuefinder__search-modal__dropdown-option-check"},Hi={key:0,class:"vuefinder__search-modal__dropdown-option-check"},ji={key:0,class:"vuefinder__search-modal__dropdown-option-check"},Ki=ee({name:"SearchOptionsDropdown",__name:"SearchOptionsDropdown",props:{visible:{type:Boolean},disabled:{type:Boolean,default:!1},sizeFilter:{},selectedOption:{}},emits:["update:visible","update:sizeFilter","update:selectedOption","keydown"],setup(t,{expose:e,emit:a}){const n=t,i=a,s=Z(),{t:r}=s.i18n,u=P(null),c=P(null);let p=null;const h=k=>{if(i("update:selectedOption",k),k.startsWith("size-")){const b=k.split("-")[1];i("update:sizeFilter",b)}},y=async()=>{n.disabled||(n.visible?(i("update:visible",!1),p&&(p(),p=null)):(i("update:visible",!0),await ze(),await m()))},m=async()=>{if(!(!u.value||!c.value)&&(await ze(),!(!u.value||!c.value))){Object.assign(c.value.style,{position:"fixed",zIndex:"10001",opacity:"0",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"});try{const{x:k,y:b}=await Je(u.value,c.value,{placement:"bottom-start",strategy:"fixed",middleware:[lt(8),ot({padding:16}),nt({padding:16})]});Object.assign(c.value.style,{left:`${k}px`,top:`${b}px`}),requestAnimationFrame(()=>{c.value&&Object.assign(c.value.style,{opacity:"1",transform:"translateY(0)"})})}catch(k){console.warn("Floating UI initial positioning error:",k);return}try{p=Ot(u.value,c.value,async()=>{if(!(!u.value||!c.value))try{const{x:k,y:b}=await Je(u.value,c.value,{placement:"bottom-start",strategy:"fixed",middleware:[lt(8),ot({padding:16}),nt({padding:16})]});Object.assign(c.value.style,{left:`${k}px`,top:`${b}px`})}catch(k){console.warn("Floating UI positioning error:",k)}})}catch(k){console.warn("Floating UI autoUpdate setup error:",k),p=null}}},x=k=>{if(!n.visible)return;const b=["size-all","size-small","size-medium","size-large"],F=b.findIndex(g=>g===n.selectedOption);if(k.key==="ArrowDown"){k.preventDefault();const g=(F+1)%b.length;i("update:selectedOption",b[g]||null)}else if(k.key==="ArrowUp"){k.preventDefault();const g=F<=0?b.length-1:F-1;i("update:selectedOption",b[g]||null)}else k.key==="Enter"?(k.preventDefault(),n.selectedOption?.startsWith("size-")&&i("update:sizeFilter",n.selectedOption.split("-")[1])):k.key==="Escape"&&(k.preventDefault(),i("update:visible",!1),p&&(p(),p=null))},C=()=>{p&&(p(),p=null)};return ne(()=>n.visible,k=>{!k&&p&&(p(),p=null)}),ke(()=>{C()}),e({cleanup:C}),(k,b)=>(d(),v(ce,null,[o("button",{ref_key:"dropdownBtn",ref:u,class:te(["vuefinder__search-modal__dropdown-btn",{"vuefinder__search-modal__dropdown-btn--active":t.visible}]),disabled:t.disabled,title:l(r)("Search Options"),onClick:ie(y,["stop"])},[N(l(Ta),{class:"vuefinder__search-modal__dropdown-icon"})],10,zi),(d(),R(ht,{to:"body"},[t.visible?(d(),v("div",{key:0,ref_key:"dropdownContent",ref:c,class:"vuefinder__themer vuefinder__search-modal__dropdown vuefinder__search-modal__dropdown--visible","data-theme":l(s).theme.current,tabindex:"-1",onClick:b[4]||(b[4]=ie(()=>{},["stop"])),onKeydown:x},[o("div",Li,[o("div",Vi,[o("div",$i,w(l(r)("File Size")),1),o("div",Ui,[o("div",{class:te(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":t.sizeFilter==="all"}]),onClick:b[0]||(b[0]=ie(F=>h("size-all"),["stop"]))},[o("span",null,w(l(r)("All Files")),1),t.sizeFilter==="all"?(d(),v("div",Ri,[...b[5]||(b[5]=[o("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[o("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):L("",!0)],2),o("div",{class:te(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":t.sizeFilter==="small"}]),onClick:b[1]||(b[1]=ie(F=>h("size-small"),["stop"]))},[o("span",null,w(l(r)("Small (< 1MB)")),1),t.sizeFilter==="small"?(d(),v("div",Ni,[...b[6]||(b[6]=[o("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[o("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):L("",!0)],2),o("div",{class:te(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":t.sizeFilter==="medium"}]),onClick:b[2]||(b[2]=ie(F=>h("size-medium"),["stop"]))},[o("span",null,w(l(r)("Medium (1-10MB)")),1),t.sizeFilter==="medium"?(d(),v("div",Hi,[...b[7]||(b[7]=[o("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[o("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):L("",!0)],2),o("div",{class:te(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":t.sizeFilter==="large"}]),onClick:b[3]||(b[3]=ie(F=>h("size-large"),["stop"]))},[o("span",null,w(l(r)("Large (> 10MB)")),1),t.sizeFilter==="large"?(d(),v("div",ji,[...b[8]||(b[8]=[o("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[o("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):L("",!0)],2)])])])],40,Bi)):L("",!0)]))],64))}});function Da(t,e=40){const a=t.match(/^([^:]+:\/\/)(.*)$/);if(!a)return t;const n=a[1],i=a[2]??"",s=i.split("/").filter(Boolean),r=s.pop();if(!r)return n+i;let u=`${n}${s.join("/")}${s.length?"/":""}${r}`;if(u.length<=e)return u;const c=r.split(/\.(?=[^\.]+$)/),p=c[0]??"",h=c[1]??"",y=p.length>10?`${p.slice(0,6)}...${p.slice(-5)}`:p,m=h?`${y}.${h}`:y;return u=`${n}${s.join("/")}${s.length?"/":""}${m}`,u.length>e&&(u=`${n}.../${m}`),u}async function Ia(t){try{await navigator.clipboard.writeText(t)}catch{const e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}}async function rt(t){await Ia(t)}async function Yi(t){await Ia(t)}const qi={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 448 512"};function Gi(t,e){return d(),v("svg",qi,[...e[0]||(e[0]=[o("path",{d:"M8 256a56 56 0 1 1 112 0 56 56 0 1 1-112 0m160 0a56 56 0 1 1 112 0 56 56 0 1 1-112 0m216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112"},null,-1)])])}const Aa={render:Gi},Qi=["title"],Wi={class:"vuefinder__search-modal__result-icon"},Ji={class:"vuefinder__search-modal__result-content"},Xi={class:"vuefinder__search-modal__result-name"},Zi={key:0,class:"vuefinder__search-modal__result-size"},er=["title"],tr=["title"],ar=["data-item-dropdown","data-theme"],lr={class:"vuefinder__search-modal__item-dropdown-content"},or=ee({name:"SearchResultItem",__name:"SearchResultItem",props:{item:{},index:{},selectedIndex:{},expandedPaths:{},activeDropdown:{},selectedItemDropdownOption:{}},emits:["select","selectWithDropdown","togglePathExpansion","toggleItemDropdown","update:selectedItemDropdownOption","copyPath","openContainingFolder","preview"],setup(t,{emit:e}){const a=t,n=e,i=Z(),{t:s}=i.i18n,r=P(null);let u=null,c=null,p=[],h=null;ne(()=>a.activeDropdown,D=>{u&&(u(),u=null),c&&(p.forEach(I=>{I===window?window.removeEventListener("scroll",c,!0):I.removeEventListener("scroll",c,!0)}),c=null,p=[]),h&&(document.removeEventListener("mousedown",h,!0),document.removeEventListener("touchstart",h,!0),h=null),D===a.item.path&&r.value&&ze(()=>{F(a.item.path,r.value),m(),x()})});const y=D=>{const I=[];let $=D;for(;$&&$!==document.body&&$!==document.documentElement;){const W=window.getComputedStyle($),z=W.overflow+W.overflowX+W.overflowY;(z.includes("scroll")||z.includes("auto"))&&I.push($),$=$.parentElement}return I},m=()=>{if(a.activeDropdown!==a.item.path)return;const D=y(r.value);p=[window,...D],c=()=>{a.activeDropdown===a.item.path&&n("toggleItemDropdown",a.item.path,new MouseEvent("click"))};const I=c;I&&p.forEach($=>{$===window?window.addEventListener("scroll",I,!0):$.addEventListener("scroll",I,!0)})},x=()=>{a.activeDropdown===a.item.path&&(h=D=>{if(a.activeDropdown!==a.item.path)return;const I=D.target;if(!I)return;const $=document.querySelector(`[data-item-dropdown="${a.item.path}"]`);if($&&$.contains(I)||r.value&&r.value.contains(I))return;const W=i.root;if(W&&W.contains(I)){n("toggleItemDropdown",a.item.path,new MouseEvent("click"));return}const z=document.querySelector(".vuefinder__modal-layout");if(z&&z.contains(I)){n("toggleItemDropdown",a.item.path,new MouseEvent("click"));return}n("toggleItemDropdown",a.item.path,new MouseEvent("click"))},setTimeout(()=>{h&&(document.addEventListener("mousedown",h,!0),document.addEventListener("touchstart",h,!0))},100))};ke(()=>{u&&(u(),u=null),c&&(p.forEach(D=>{D===window?window.removeEventListener("scroll",c,!0):D.removeEventListener("scroll",c,!0)}),c=null,p=[]),h&&(document.removeEventListener("mousedown",h,!0),document.removeEventListener("touchstart",h,!0),h=null)});const C=D=>a.expandedPaths.has(D),k=D=>D.type==="dir"||!D.file_size?"":Bt(D.file_size),b=(D,I)=>{I.stopPropagation(),n("toggleItemDropdown",D,I)},F=async(D,I)=>{const $=document.querySelector(`[data-item-dropdown="${D}"]`);if(!(!$||!I)&&(await ze(),!(!$||!I))){Object.assign($.style,{position:"fixed",zIndex:"10001",opacity:"0",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"});try{const{x:W,y:z}=await Je(I,$,{placement:"left-start",strategy:"fixed",middleware:[lt(8),ot({padding:16}),nt({padding:16})]});Object.assign($.style,{left:`${W}px`,top:`${z}px`}),requestAnimationFrame(()=>{$&&Object.assign($.style,{opacity:"1",transform:"translateY(0)"})})}catch(W){console.warn("Floating UI initial positioning error:",W);return}try{u=Ot(I,$,async()=>{if(!(!I||!$))try{const{x:W,y:z}=await Je(I,$,{placement:"left-start",strategy:"fixed",middleware:[lt(8),ot({padding:16}),nt({padding:16})]});Object.assign($.style,{left:`${W}px`,top:`${z}px`})}catch(W){console.warn("Floating UI positioning error:",W)}})}catch(W){console.warn("Floating UI autoUpdate setup error:",W),u=null}}},g=D=>{n("update:selectedItemDropdownOption",D)},f=async D=>{await rt(D.path),n("copyPath",D)},_=D=>{n("openContainingFolder",D)},M=D=>{n("preview",D)},T=D=>{if(!a.activeDropdown)return;const I=["copy-path","open-folder","preview"],$=a.selectedItemDropdownOption,W=I.findIndex(z=>$?.includes(z));if(D.key==="ArrowDown"){D.preventDefault();const z=(W+1)%I.length;n("update:selectedItemDropdownOption",`${I[z]||""}-${a.activeDropdown}`)}else if(D.key==="ArrowUp"){D.preventDefault();const z=W<=0?I.length-1:W-1;n("update:selectedItemDropdownOption",`${I[z]||""}-${a.activeDropdown}`)}else D.key==="Enter"?(D.preventDefault(),$&&($.includes("copy-path")?f(a.item):$.includes("open-folder")?_(a.item):$.includes("preview")&&M(a.item))):D.key==="Escape"&&(D.preventDefault(),n("update:selectedItemDropdownOption",null))};return(D,I)=>(d(),v("div",{class:te(["vuefinder__search-modal__result-item",{"vuefinder__search-modal__result-item--selected":t.index===t.selectedIndex}]),title:t.item.basename,onClick:I[9]||(I[9]=$=>n("select",t.index))},[o("div",Wi,[t.item.type==="dir"?(d(),R(l(Be),{key:0})):(d(),R(l(it),{key:1}))]),o("div",Ji,[o("div",Xi,[ue(w(t.item.basename)+" ",1),k(t.item)?(d(),v("span",Zi,w(k(t.item)),1)):L("",!0)]),o("div",{class:"vuefinder__search-modal__result-path",title:t.item.path,onClick:I[0]||(I[0]=ie($=>{n("select",t.index),n("togglePathExpansion",t.item.path)},["stop"]))},w(C(t.item.path)?t.item.path:l(Da)(t.item.path)),9,er)]),o("button",{ref_key:"buttonElementRef",ref:r,class:"vuefinder__search-modal__result-actions",title:l(s)("More actions"),onClick:I[1]||(I[1]=$=>{n("selectWithDropdown",t.index),b(t.item.path,$)})},[N(l(Aa),{class:"vuefinder__search-modal__result-actions-icon"})],8,tr),(d(),R(ht,{to:"body"},[t.activeDropdown===t.item.path?(d(),v("div",{key:0,"data-item-dropdown":t.item.path,class:"vuefinder__themer vuefinder__search-modal__item-dropdown vuefinder__search-modal__item-dropdown--visible","data-theme":l(i).theme.current,tabindex:"-1",onClick:I[8]||(I[8]=ie(()=>{},["stop"])),onKeydown:T},[o("div",lr,[o("div",{class:te(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":t.selectedItemDropdownOption===`copy-path-${t.item.path}`}]),onClick:I[2]||(I[2]=$=>{g(`copy-path-${t.item.path}`),f(t.item)}),onFocus:I[3]||(I[3]=$=>g(`copy-path-${t.item.path}`))},[N(l(Vt),{class:"vuefinder__search-modal__item-dropdown-icon"}),o("span",null,w(l(s)("Copy Path")),1)],34),o("div",{class:te(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":t.selectedItemDropdownOption===`open-folder-${t.item.path}`}]),onClick:I[4]||(I[4]=$=>{g(`open-folder-${t.item.path}`),_(t.item)}),onFocus:I[5]||(I[5]=$=>g(`open-folder-${t.item.path}`))},[N(l(Be),{class:"vuefinder__search-modal__item-dropdown-icon"}),o("span",null,w(l(s)("Open Containing Folder")),1)],34),o("div",{class:te(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":t.selectedItemDropdownOption===`preview-${t.item.path}`}]),onClick:I[6]||(I[6]=$=>{g(`preview-${t.item.path}`),M(t.item)}),onFocus:I[7]||(I[7]=$=>g(`preview-${t.item.path}`))},[N(l(it),{class:"vuefinder__search-modal__item-dropdown-icon"}),o("span",null,w(l(s)("Preview")),1)],34)])],40,ar)):L("",!0)]))],10,Qi))}}),nr={key:0,class:"vuefinder__search-modal__searching"},ir={class:"vuefinder__search-modal__loading-icon"},rr={key:1,class:"vuefinder__search-modal__no-results"},sr={key:2,class:"vuefinder__search-modal__results-list"},dr={class:"vuefinder__search-modal__results-header"},qe=60,oa=5,ur=ee({name:"SearchResultsList",__name:"SearchResultsList",props:{searchResults:{},isSearching:{type:Boolean},selectedIndex:{},expandedPaths:{},activeDropdown:{},selectedItemDropdownOption:{},resultsEnter:{type:Boolean}},emits:["selectResultItem","selectResultItemWithDropdown","togglePathExpansion","toggleItemDropdown","update:selectedItemDropdownOption","copyPath","openContainingFolder","preview"],setup(t,{expose:e,emit:a}){const n=t,i=a,s=Z(),{t:r}=s.i18n,u=We("scrollableContainer"),c=H(()=>n.searchResults.length>0),p=H(()=>n.searchResults.length),h=P(0),y=P(600),m=H(()=>n.searchResults.length*qe),x=H(()=>{const f=Math.max(0,Math.floor(h.value/qe)-oa),_=Math.min(n.searchResults.length,Math.ceil((h.value+y.value)/qe)+oa);return{start:f,end:_}}),C=H(()=>{const{start:f,end:_}=x.value;return n.searchResults.slice(f,_).map((M,T)=>({item:M,index:f+T,top:(f+T)*qe}))}),k=f=>{const _=f.target;h.value=_.scrollTop},b=()=>{u.value&&(y.value=u.value.clientHeight)},F=()=>{if(n.selectedIndex>=0&&u.value){const f=n.selectedIndex*qe,_=f+qe,M=u.value.scrollTop,T=u.value.clientHeight,D=M+T;let I=M;f<M?I=f:_>D&&(I=_-T),I!==M&&u.value.scrollTo({top:I,behavior:"smooth"})}},g=()=>{u.value&&(u.value.scrollTop=0,h.value=0)};return ve(()=>{b(),window.addEventListener("resize",b)}),ke(()=>{window.removeEventListener("resize",b)}),ne(()=>u.value,()=>{b()}),e({scrollSelectedIntoView:F,resetScroll:g,getContainerHeight:()=>y.value,scrollTop:()=>h.value}),(f,_)=>(d(),v("div",{class:te(["vuefinder__search-modal__results",{"vuefinder__search-modal__results--enter":t.resultsEnter}])},[t.isSearching?(d(),v("div",nr,[o("div",ir,[N(l(xt),{class:"vuefinder__search-modal__loading-icon"})]),o("span",null,w(l(r)("Searching...")),1)])):c.value?(d(),v("div",sr,[o("div",dr,[o("span",null,w(l(r)("Found %s results",p.value)),1)]),o("div",{ref_key:"scrollableContainer",ref:u,class:"vuefinder__search-modal__results-scrollable",onScroll:k},[o("div",{class:"vuefinder__search-modal__results-items",style:Pe({height:`${m.value}px`,position:"relative"})},[(d(!0),v(ce,null,me(C.value,M=>(d(),v("div",{key:M.item.path,style:Pe({position:"absolute",top:`${M.top}px`,left:"0",width:"100%",height:`${qe}px`})},[N(or,{item:M.item,index:M.index,"selected-index":t.selectedIndex,"expanded-paths":t.expandedPaths,"active-dropdown":t.activeDropdown,"selected-item-dropdown-option":t.selectedItemDropdownOption,onSelect:_[0]||(_[0]=T=>i("selectResultItem",T)),onSelectWithDropdown:_[1]||(_[1]=T=>i("selectResultItemWithDropdown",T)),onTogglePathExpansion:_[2]||(_[2]=T=>i("togglePathExpansion",T)),onToggleItemDropdown:_[3]||(_[3]=(T,D)=>i("toggleItemDropdown",T,D)),"onUpdate:selectedItemDropdownOption":_[4]||(_[4]=T=>i("update:selectedItemDropdownOption",T)),onCopyPath:_[5]||(_[5]=T=>i("copyPath",T)),onOpenContainingFolder:_[6]||(_[6]=T=>i("openContainingFolder",T)),onPreview:_[7]||(_[7]=T=>i("preview",T))},null,8,["item","index","selected-index","expanded-paths","active-dropdown","selected-item-dropdown-option"])],4))),128))],4)],544)])):(d(),v("div",rr,[o("span",null,w(l(r)("No results found")),1)]))],2))}}),cr={class:"vuefinder__search-modal"},vr={class:"vuefinder__search-modal__content"},pr={class:"vuefinder__search-modal__search-bar"},mr={class:"vuefinder__search-modal__search-location"},fr=["title"],_r=["disabled"],hr={key:0,class:"vuefinder__search-modal__folder-selector"},gr={class:"vuefinder__search-modal__folder-selector-content"},wr={key:1,class:"vuefinder__search-modal__instructions"},yr={class:"vuefinder__search-modal__instructions-text"},Kt=ee({name:"ModalSearch",__name:"ModalSearch",setup(t){const e=Z(),a=Te(e),{t:n}=e.i18n,i=e.fs,s=P(null),r=P(null),u=P(null),c=Ea("",300),p=P([]),h=P(!1),y=P(-1),m=P(!1),x=P(!1),C=P(null),k=P("all"),b=P(!1),F=P(`size-${k.value}`),g=P(null),f=P(new Set),_=P(null),M=Y(i.path),T=S=>{f.value.has(S)?f.value.delete(S):f.value.add(S)},D=(S,B)=>{B&&typeof B.stopPropagation=="function"&&B.stopPropagation(),_.value===S?_.value=null:_.value=S},I=()=>{_.value=null},$=S=>{try{const B=S.dir||`${S.storage}://`;e.adapter.open(B),e.modal.close(),I()}catch{a.error(n("Failed to open containing folder"))}},W=S=>{e.modal.open(ut,{storage:M?.value?.storage??"local",item:S}),I()},z=S=>{y.value=S,I()},K=S=>{y.value=S},A=async S=>{await rt(S.path),I()};ne(c,async S=>{S.trim()?(await G(S.trim()),y.value=0):(p.value=[],h.value=!1,y.value=-1)}),ne(k,async S=>{F.value=`size-${S}`,c.value.trim()&&!x.value&&(await G(c.value.trim()),y.value=0)}),ne(b,async()=>{c.value.trim()&&!x.value&&(await G(c.value.trim()),y.value=0)});const G=async S=>{if(S){h.value=!0;try{const B=C.value?.path||M?.value?.path,V=await e.adapter.search({path:B,filter:S,deep:b.value,size:k.value});p.value=V||[],h.value=!1}catch(B){a.error(Ee(B,n("Search failed"))),p.value=[],h.value=!1}}};ve(()=>{document.addEventListener("click",E),F.value=`size-${k.value}`});const q=()=>{x.value?(x.value=!1,c.value.trim()&&(G(c.value.trim()),y.value=0)):(m.value=!1,x.value=!0)},ae=S=>{S&&(C.value=S)},O=S=>{S&&(ae(S),x.value=!1,c.value.trim()&&(G(c.value.trim()),y.value=0))};ke(()=>{document.removeEventListener("click",E),r.value&&r.value.cleanup()});const E=S=>{const B=S.target;if(m.value&&(B.closest(".vuefinder__search-modal__dropdown")||(m.value=!1,ze(()=>{s.value&&s.value.focus()}))),_.value){const V=B.closest(".vuefinder__search-modal__item-dropdown"),Q=B.closest(".vuefinder__search-modal__result-item");!V&&!Q&&I()}};return(S,B)=>(d(),R(De,{class:"vuefinder__search-modal-layout"},{default:oe(()=>[o("div",cr,[N(Ie,{icon:l(jt),title:l(n)("Search files")},null,8,["icon","title"]),o("div",vr,[o("div",pr,[N(Ai,{ref_key:"searchInputRef",ref:s,modelValue:l(c),"onUpdate:modelValue":B[0]||(B[0]=V=>Ga(c)?c.value=V:null),"is-searching":h.value,disabled:x.value},null,8,["modelValue","is-searching","disabled"]),N(Ki,{ref_key:"searchOptionsDropdownRef",ref:r,visible:m.value,"onUpdate:visible":B[1]||(B[1]=V=>m.value=V),"size-filter":k.value,"onUpdate:sizeFilter":B[2]||(B[2]=V=>k.value=V),"selected-option":F.value,"onUpdate:selectedOption":B[3]||(B[3]=V=>F.value=V),disabled:x.value},null,8,["visible","size-filter","selected-option","disabled"])]),o("div",{class:"vuefinder__search-modal__options",onClick:B[7]||(B[7]=ie(()=>{},["stop"]))},[o("div",mr,[o("button",{class:te(["vuefinder__search-modal__location-btn",{"vuefinder__search-modal__location-btn--open":x.value}]),onClick:ie(q,["stop"])},[N(l(Be),{class:"vuefinder__search-modal__location-icon"}),o("span",{class:"vuefinder__search-modal__location-text",title:C.value?.path||l(M).path},w(l(Da)(C.value?.path||l(M).path)),9,fr),B[10]||(B[10]=o("svg",{class:"vuefinder__search-modal__location-arrow",viewBox:"0 0 16 16",fill:"currentColor"},[o("path",{d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})],-1))],2)]),o("label",{class:"vuefinder__search-modal__deep-search",onClick:B[6]||(B[6]=ie(()=>{},["stop"]))},[pe(o("input",{"onUpdate:modelValue":B[4]||(B[4]=V=>b.value=V),type:"checkbox",disabled:x.value,class:"vuefinder__search-modal__checkbox",onClick:B[5]||(B[5]=ie(()=>{},["stop"]))},null,8,_r),[[gt,b.value]]),o("span",null,w(l(n)("Include subfolders")),1)])]),x.value?(d(),v("div",hr,[o("div",gr,[N(Nt,{modelValue:C.value,"onUpdate:modelValue":[B[8]||(B[8]=V=>C.value=V),ae],"show-pinned-folders":!0,"current-path":l(M),onSelectAndClose:O},null,8,["modelValue","current-path"])])])):L("",!0),!l(c).trim()&&!x.value?(d(),v("div",wr,[o("p",yr,w(l(n)("Start typing to search files. Use options to filter or include subfolders.")),1)])):L("",!0),l(c).trim()&&!x.value?(d(),R(ur,{key:2,ref_key:"searchResultsListRef",ref:u,"search-results":p.value,"is-searching":h.value,"selected-index":y.value,"expanded-paths":f.value,"active-dropdown":_.value,"selected-item-dropdown-option":g.value,"results-enter":!0,onSelectResultItem:z,onSelectResultItemWithDropdown:K,onTogglePathExpansion:T,onToggleItemDropdown:D,"onUpdate:selectedItemDropdownOption":B[9]||(B[9]=V=>g.value=V),onCopyPath:A,onOpenContainingFolder:$,onPreview:W},null,8,["search-results","is-searching","selected-index","expanded-paths","active-dropdown","selected-item-dropdown-option"])):L("",!0)])])]),_:1}))}}),br={props:{on:{type:String,required:!0}},setup(t,{emit:e,slots:a}){const n=Z(),i=P(!1),{t:s}=n.i18n;let r=null;const u=()=>{r&&clearTimeout(r),i.value=!0,r=setTimeout(()=>{i.value=!1},2e3)};return ve(()=>{n.emitter.on(t.on,u)}),ke(()=>{r&&clearTimeout(r)}),{shown:i,t:s}}},kr=(t,e)=>{const a=t.__vccOpts||t;for(const[n,i]of e)a[n]=i;return a},xr={key:1};function Cr(t,e,a,n,i,s){return d(),v("div",{class:te(["vuefinder__action-message",{"vuefinder__action-message--hidden":!n.shown}])},[t.$slots.default?Ce(t.$slots,"default",{key:0}):(d(),v("span",xr,w(n.t("Saved.")),1))],2)}const na=kr(br,[["render",Cr]]),Sr=[{name:"silver",displayName:"Silver"},{name:"valorite",displayName:"Valorite"},{name:"midnight",displayName:"Midnight"},{name:"latte",displayName:"Latte"},{name:"rose",displayName:"Rose"},{name:"mythril",displayName:"Mythril"},{name:"lime",displayName:"lime"},{name:"sky",displayName:"Sky"},{name:"ocean",displayName:"Oceanic"},{name:"palenight",displayName:"Palenight"},{name:"arctic",displayName:"Arctic"},{name:"code",displayName:"Code"}],Fr={class:"vuefinder__settings-modal__content"},Mr={class:"vuefinder__settings-modal__main"},Er={class:"vuefinder__settings-modal__sections"},Tr={key:0,class:"vuefinder__settings-modal__section"},Dr={for:"theme",class:"vuefinder__settings-modal__label"},Ir={class:"vuefinder__settings-modal__input-group"},Ar=["value"],Pr=["value"],Or={key:1,class:"vuefinder__settings-modal__section"},zr={for:"language",class:"vuefinder__settings-modal__label"},Br={class:"vuefinder__settings-modal__input-group"},Lr=["value"],Vr={class:"vuefinder__settings-modal__reset-section"},$r={class:"vuefinder__settings-modal__reset-content"},Ur={class:"vuefinder__settings-modal__reset-title"},Rr={class:"vuefinder__settings-modal__reset-description"},Pa=ee({__name:"ModalSettings",setup(t){const e=Z(),{enabled:a}=Oe(),n=e.config,{clearStore:i}=e.storage,{t:s,localeAtom:r}=e.i18n,u=Y(r),c=H({get:()=>String(u.value||"en"),set:k=>r.set(k||"en")}),p=Y(n.state),h=H(()=>p.value.theme||"silver"),y=async()=>{n.reset(),i(),localStorage.removeItem("vuefinder_locale"),localStorage.removeItem("vuefinder_translations"),location.reload()},m=k=>{n.set("theme",k),e.emitter.emit("vf-theme-saved")},{i18n:x}=pt("VueFinderOptions"),C=Object.fromEntries(Object.entries({ar:"Arabic (العربيّة)",zhCN:"Chinese-Simplified (简体中文)",zhTW:"Chinese-Traditional (繁體中文)",nl:"Dutch (Nederlands)",en:"English",fr:"French (Français)",de:"German (Deutsch)",he:"Hebrew (עִברִית)",hi:"Hindi (हिंदी)",it:"Italian (Italiano)",ja:"Japanese (日本語)",fa:"Persian (فارسی)",pl:"Polish (Polski)",pt:"Portuguese (Português)",ru:"Russian (Pусский)",es:"Spanish (Español)",sv:"Swedish (Svenska)",tr:"Turkish (Türkçe)"}).filter(([k])=>Object.keys(x).includes(k)));return(k,b)=>(d(),R(De,null,{buttons:oe(()=>[o("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:b[2]||(b[2]=F=>l(e).modal.close())},w(l(s)("Close")),1)]),default:oe(()=>[o("div",Fr,[N(Ie,{icon:l(Ta),title:l(s)("Settings")},null,8,["icon","title"]),o("div",Mr,[o("div",Er,[l(a)("theme")?(d(),v("div",Tr,[o("label",Dr,[ue(w(l(s)("Theme"))+" ",1),N(na,{class:"vuefinder__settings-modal__message",on:"vf-theme-saved"},{default:oe(()=>[ue(w(l(s)("Saved.")),1)]),_:1})]),o("div",Ir,[o("select",{id:"theme",value:h.value,class:"vuefinder__settings-modal__select",onChange:b[0]||(b[0]=F=>m(F.target?.value))},[(d(!0),v(ce,null,me(l(Sr),F=>(d(),v("option",{key:F.name,value:F.name},w(F.displayName),9,Pr))),128))],40,Ar)])])):L("",!0),Object.keys(l(C)).length>1?(d(),v("div",Or,[o("label",zr,[ue(w(l(s)("Language"))+" ",1),N(na,{class:"vuefinder__settings-modal__message",on:"vf-language-saved"},{default:oe(()=>[ue(w(l(s)("Saved.")),1)]),_:1})]),o("div",Br,[pe(o("select",{id:"language","onUpdate:modelValue":b[1]||(b[1]=F=>c.value=F),class:"vuefinder__settings-modal__select"},[(d(!0),v(ce,null,me(l(C),(F,g)=>(d(),v("option",{key:g,value:g},w(F),9,Lr))),128))],512),[[Dt,c.value]])])])):L("",!0)]),o("div",Vr,[o("div",$r,[o("div",Ur,w(l(s)("Reset")),1),o("div",Rr,w(l(s)("Reset all settings to default")),1)]),o("button",{type:"button",class:"vuefinder__settings-modal__reset-button",onClick:y},w(l(s)("Reset Settings")),1)])])])]),_:1}))}}),Fe={ESCAPE:"Escape",DELETE:"Delete",ENTER:"Enter",BACKSLASH:"Backslash",KEY_A:"KeyA",KEY_E:"KeyE",KEY_F:"KeyF",SPACE:"Space",KEY_C:"KeyC",KEY_X:"KeyX",KEY_V:"KeyV",KEY_S:"KeyS",KEY_R:"KeyR"};function Nr(){const t=Z(),e=Te(t),a=t.fs,n=t.config,{enabled:i}=Oe(),s=Y(a.path),r=Y(a.selectedItems),u=c=>{if(c.code===Fe.ESCAPE&&(t.modal.close(),t.root.focus()),!t.modal.visible){if(c.metaKey&&c.code===Fe.KEY_R&&!c.shiftKey&&(t.adapter.invalidateListQuery(s.value.path),t.adapter.open(s.value.path),c.preventDefault()),c.metaKey&&c.shiftKey&&c.code===Fe.KEY_R&&i("rename")&&r.value.length===1&&(t.modal.open(yt,{items:r.value}),c.preventDefault()),c.code===Fe.DELETE&&r.value.length!==0&&t.modal.open(wt,{items:r.value}),c.metaKey&&c.code===Fe.BACKSLASH&&t.modal.open(xa),c.metaKey&&c.code===Fe.KEY_F&&i("search")&&(t.modal.open(Kt),c.preventDefault()),c.metaKey&&c.code===Fe.KEY_E&&(n.toggle("showTreeView"),c.preventDefault()),c.metaKey&&c.code===Fe.KEY_S&&(t.modal.open(Pa),c.preventDefault()),c.metaKey&&c.code===Fe.ENTER&&(n.toggle("fullScreen"),t.root.focus()),c.metaKey&&c.code===Fe.KEY_A&&(a.selectAll(t.selectionMode||"multiple",t),c.preventDefault()),c.code===Fe.SPACE&&r.value.length===1&&r.value[0]?.type!=="dir"&&t.modal.open(ut,{storage:a.path.get().storage,item:r.value[0]}),c.metaKey&&c.code===Fe.KEY_C&&i("copy")){if(r.value.length===0){e.error(t.i18n.t("No items selected"));return}a.setClipboard("copy",new Set(r.value.map(p=>p.path))),e.success(r.value.length===1?t.i18n.t("Item copied to clipboard"):t.i18n.t("%s items copied to clipboard",r.value.length)),c.preventDefault()}if(c.metaKey&&c.code===Fe.KEY_X&&i("copy")){if(r.value.length===0){e.error(t.i18n.t("No items selected"));return}a.setClipboard("cut",new Set(r.value.map(p=>p.path))),e.success(r.value.length===1?t.i18n.t("Item cut to clipboard"):t.i18n.t("%s items cut to clipboard",r.value.length)),c.preventDefault()}if(c.metaKey&&c.code===Fe.KEY_V&&i("copy")){if(a.getClipboard().items.size===0){e.error(t.i18n.t("No items in clipboard"));return}if(a.getClipboard().path===a.path.get().path){e.error(t.i18n.t("Cannot paste items to the same directory"));return}if(a.getClipboard().type==="cut"){t.modal.open(Xe,{items:{from:Array.from(a.getClipboard().items),to:a.path.get()}}),a.clearClipboard();return}if(a.getClipboard().type==="copy"){t.modal.open(Ht,{items:{from:Array.from(a.getClipboard().items),to:a.path.get()}});return}c.preventDefault()}}};ve(async()=>{if(await ze(),!t.root){console.warn("app.root is not available. Event listeners will not be attached.");return}t.root.addEventListener("keydown",u)}),ua(()=>{t.root&&t.root.removeEventListener("keydown",u)})}function Hr(){const t=P(!1),e=P([]);return{isDraggingExternal:t,externalFiles:e,handleDragEnter:a=>{a.preventDefault(),a.stopPropagation();const n=a.dataTransfer?.items;n&&Array.from(n).some(i=>i.kind==="file")&&(t.value=!0,a.isExternalDrag=!0)},handleDragOver:a=>{t.value&&a.dataTransfer&&(a.dataTransfer.dropEffect="copy",a.preventDefault(),a.stopPropagation())},handleDragLeave:a=>{a.preventDefault();const n=a.currentTarget.getBoundingClientRect(),i=a.clientX,s=a.clientY;(i<n.left||i>n.right||s<n.top||s>n.bottom)&&(t.value=!1)},handleDrop:async a=>{a.preventDefault(),a.stopPropagation(),t.value=!1;const n=a.dataTransfer?.items;if(n){const i=Array.from(n).filter(s=>s.kind==="file");if(i.length>0){e.value=[];for(const s of i){const r=s.webkitGetAsEntry?.();if(r)await Lt((u,c)=>{e.value.push({name:c.name,size:c.size,type:c.type,lastModified:new Date(c.lastModified),file:c})},r);else{const u=s.getAsFile();u&&e.value.push({name:u.name,size:u.size,type:u.type,lastModified:new Date(u.lastModified),file:u})}}return e.value}}return[]},clearExternalFiles:()=>{e.value=[]}}}const jr={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function Kr(t,e){return d(),v("svg",jr,[...e[0]||(e[0]=[o("path",{d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44z"},null,-1)])])}const Oa={render:Kr},Yr={class:"vuefinder__new-folder-modal__content"},qr={class:"vuefinder__new-folder-modal__form"},Gr={class:"vuefinder__new-folder-modal__description"},Qr=["placeholder"],Yt=ee({__name:"ModalNewFolder",setup(t){const e=Z(),a=Te(e),{t:n}=e.i18n,i=e.fs,s=Y(i.path),r=P(""),u=()=>{r.value!==""&&e.adapter.createFolder({path:s.value.path,name:r.value}).then(c=>{a.success(n("%s is created.",r.value)),e.fs.setFiles(c.files),e.modal.close()}).catch(c=>{a.error(Ee(c,n("Failed to create folder")))})};return(c,p)=>(d(),R(De,null,{buttons:oe(()=>[o("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:u},w(l(n)("Create")),1),o("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:p[1]||(p[1]=h=>l(e).modal.close())},w(l(n)("Cancel")),1)]),default:oe(()=>[o("div",null,[N(Ie,{icon:l(Oa),title:l(n)("New Folder")},null,8,["icon","title"]),o("div",Yr,[o("div",qr,[o("p",Gr,w(l(n)("Create a new folder")),1),pe(o("input",{"onUpdate:modelValue":p[0]||(p[0]=h=>r.value=h),class:"vuefinder__new-folder-modal__input",placeholder:l(n)("Folder Name"),type:"text",autofocus:"",onKeyup:dt(u,["enter"])},null,40,Qr),[[st,r.value]])])])])]),_:1}))}}),Wr={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function Jr(t,e){return d(),v("svg",Wr,[...e[0]||(e[0]=[o("path",{d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9"},null,-1)])])}const za={render:Jr},Xr={class:"vuefinder__new-file-modal__content"},Zr={class:"vuefinder__new-file-modal__form"},es={class:"vuefinder__new-file-modal__description"},ts=["placeholder"],Ba=ee({__name:"ModalNewFile",setup(t){const e=Z(),a=Te(e),{t:n}=e.i18n,i=e.fs,s=Y(i.path),r=P(""),u=()=>{r.value!==""&&e.adapter.createFile({path:s.value.path,name:r.value}).then(c=>{a.success(n("%s is created.",r.value)),e.fs.setFiles(c.files),e.modal.close()}).catch(c=>{a.error(Ee(c,n("Failed to create file")))})};return(c,p)=>(d(),R(De,null,{buttons:oe(()=>[o("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:u},w(l(n)("Create")),1),o("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:p[1]||(p[1]=h=>l(e).modal.close())},w(l(n)("Cancel")),1)]),default:oe(()=>[o("div",null,[N(Ie,{icon:l(za),title:l(n)("New File")},null,8,["icon","title"]),o("div",Xr,[o("div",Zr,[o("p",es,w(l(n)("Create a new file")),1),pe(o("input",{"onUpdate:modelValue":p[0]||(p[0]=h=>r.value=h),class:"vuefinder__new-file-modal__input",placeholder:l(n)("File Name"),type:"text",onKeyup:dt(u,["enter"])},null,40,ts),[[st,r.value]])])])])]),_:1}))}}),as={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function ls(t,e){return d(),v("svg",as,[...e[0]||(e[0]=[o("path",{d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"},null,-1)])])}const La={render:ls};function Pt(t,e=14){const a=`((?=([\\w\\W]{0,${e}}))([\\w\\W]{${e+1},})([\\w\\W]{8,}))`;return t.replace(new RegExp(a),"$2..$4")}const os={class:"vuefinder__upload-modal__content relative"},ns={class:"vuefinder__upload-modal__target-section"},is={class:"vuefinder__upload-modal__target-label"},rs={class:"vuefinder__upload-modal__target-container"},ss={class:"vuefinder__upload-modal__target-path"},ds={class:"vuefinder__upload-modal__target-storage"},us={key:0,class:"vuefinder__upload-modal__target-folder"},cs={class:"vuefinder__upload-modal__target-badge"},vs={class:"vuefinder__upload-modal__drag-hint"},ps={class:"vuefinder__upload-modal__file-list vf-scrollbar"},ms=["textContent"],fs={class:"vuefinder__upload-modal__file-info"},_s={class:"vuefinder__upload-modal__file-name hidden md:block"},hs={class:"vuefinder__upload-modal__file-name md:hidden"},gs={key:0,class:"ml-auto"},ws=["title","disabled","onClick"],ys={key:0,class:"py-2"},bs=["aria-expanded"],ks={key:0,class:"vuefinder__upload-actions__menu absolute right-0 bottom-full left-0 mb-2"},xs=["disabled"],Cs=["aria-expanded"],Ss={key:0,class:"vuefinder__upload-actions__menu"},qt=ee({__name:"ModalUpload",setup(t){const e=Z(),{t:a}=e.i18n,n=e.fs,i=Y(n.path),s=P(i.value),r=P(!1),u=()=>{const O=s.value.path;if(!O)return{storage:"local",path:""};if(O.endsWith("://"))return{storage:O.replace("://",""),path:""};const E=O.split("://");return{storage:E[0]||"local",path:E[1]||""}},c=O=>{O&&(s.value=O)},p=O=>{O&&(s.value=O,r.value=!1)},{container:h,internalFileInput:y,internalFolderInput:m,pickFiles:x,queue:C,message:k,uploading:b,hasFilesInDropArea:F,definitions:g,openFileSelector:f,upload:_,cancel:M,remove:T,clear:D,close:I,getClassNameForEntry:$,getIconForEntry:W,addExternalFiles:z}=Fa(e.customUploader),K=()=>{_(s.value)};ve(()=>{e.emitter.on("vf-external-files-dropped",O=>{z(O)})}),ke(()=>{e.emitter.off("vf-external-files-dropped")});const A=P(!1),G=P(null),q=P(null),ae=O=>{if(!A.value)return;const E=O.target,S=G.value?.contains(E)??!1,B=q.value?.contains(E)??!1;!S&&!B&&(A.value=!1)};return ve(()=>document.addEventListener("click",ae)),ke(()=>document.removeEventListener("click",ae)),(O,E)=>(d(),R(De,{"show-drag-overlay":l(F),"drag-overlay-text":l(a)("Drag and drop the files/folders to here.")},{buttons:oe(()=>[o("div",{ref_key:"actionsMenuMobileRef",ref:G,class:"relative mb-2 w-full sm:hidden"},[o("div",{class:te(["vuefinder__upload-actions","vuefinder__upload-actions--block",A.value?"vuefinder__upload-actions--ring":""])},[o("button",{type:"button",class:"vuefinder__upload-actions__main",onClick:E[3]||(E[3]=S=>l(f)())},w(l(a)("Select Files")),1),o("button",{type:"button",class:"vuefinder__upload-actions__trigger","aria-haspopup":"menu","aria-expanded":A.value?"true":"false",onClick:E[4]||(E[4]=ie(S=>A.value=!A.value,["stop"]))},[...E[17]||(E[17]=[o("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},[o("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z","clip-rule":"evenodd"})],-1)])],8,bs)],2),A.value?(d(),v("div",ks,[o("div",{class:"vuefinder__upload-actions__item",onClick:E[5]||(E[5]=S=>{l(f)(),A.value=!1})},w(l(a)("Select Files")),1),o("div",{class:"vuefinder__upload-actions__item",onClick:E[6]||(E[6]=S=>{l(m)?.click(),A.value=!1})},w(l(a)("Select Folders")),1),E[18]||(E[18]=o("div",{class:"vuefinder__upload-actions__separator"},null,-1)),o("div",{class:te(["vuefinder__upload-actions__item",l(b)?"disabled":""]),onClick:E[7]||(E[7]=S=>l(b)?null:(l(D)(!1),A.value=!1))},w(l(a)("Clear all")),3),o("div",{class:te(["vuefinder__upload-actions__item",l(b)?"disabled":""]),onClick:E[8]||(E[8]=S=>l(b)?null:(l(D)(!0),A.value=!1))},w(l(a)("Clear only successful")),3)])):L("",!0)],512),o("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:l(b)||!l(C).length,onClick:ie(K,["prevent"])},w(l(a)("Upload")),9,xs),l(b)?(d(),v("button",{key:0,type:"button",class:"vf-btn vf-btn-secondary",onClick:E[9]||(E[9]=ie((...S)=>l(M)&&l(M)(...S),["prevent"]))},w(l(a)("Cancel")),1)):(d(),v("button",{key:1,type:"button",class:"vf-btn vf-btn-secondary",onClick:E[10]||(E[10]=ie((...S)=>l(I)&&l(I)(...S),["prevent"]))},w(l(a)("Close")),1)),o("div",{ref_key:"actionsMenuDesktopRef",ref:q,class:"relative mr-auto hidden sm:block"},[o("div",{class:te(["vuefinder__upload-actions",A.value?"vuefinder__upload-actions--ring":""])},[o("button",{ref_key:"pickFiles",ref:x,type:"button",class:"vuefinder__upload-actions__main"},w(l(a)("Select Files")),513),o("button",{type:"button",class:"vuefinder__upload-actions__trigger","aria-haspopup":"menu","aria-expanded":A.value?"true":"false",onClick:E[11]||(E[11]=ie(S=>A.value=!A.value,["stop"]))},[...E[19]||(E[19]=[o("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},[o("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z","clip-rule":"evenodd"})],-1)])],8,Cs)],2),A.value?(d(),v("div",Ss,[o("div",{class:"vuefinder__upload-actions__item",onClick:E[12]||(E[12]=S=>{l(f)(),A.value=!1})},w(l(a)("Select Files")),1),o("div",{class:"vuefinder__upload-actions__item",onClick:E[13]||(E[13]=S=>{l(m)?.click(),A.value=!1})},w(l(a)("Select Folders")),1),E[20]||(E[20]=o("div",{class:"vuefinder__upload-actions__separator"},null,-1)),o("div",{class:te(["vuefinder__upload-actions__item",l(b)?"disabled":""]),onClick:E[14]||(E[14]=S=>l(b)?null:(l(D)(!1),A.value=!1))},w(l(a)("Clear all")),3),o("div",{class:te(["vuefinder__upload-actions__item",l(b)?"disabled":""]),onClick:E[15]||(E[15]=S=>l(b)?null:(l(D)(!0),A.value=!1))},w(l(a)("Clear only successful")),3)])):L("",!0)],512)]),default:oe(()=>[o("div",null,[N(Ie,{icon:l(La),title:l(a)("Upload Files")},null,8,["icon","title"]),o("div",os,[o("div",ns,[o("div",is,w(l(a)("Target Directory")),1),o("div",rs,[o("div",{class:"vuefinder__upload-modal__target-display",onClick:E[0]||(E[0]=S=>r.value=!r.value)},[o("div",ss,[o("span",ds,w(u().storage)+"://",1),u().path?(d(),v("span",us,w(u().path),1)):L("",!0)]),o("span",cs,w(l(a)("Browse")),1)])]),o("div",{class:te(["vuefinder__upload-modal__tree-selector",r.value?"vuefinder__upload-modal__tree-selector--expanded":"vuefinder__upload-modal__tree-selector--collapsed"])},[N(Nt,{modelValue:s.value,"onUpdate:modelValue":[E[1]||(E[1]=S=>s.value=S),c],"show-pinned-folders":!0,onSelectAndClose:p},null,8,["modelValue"])],2)]),o("div",vs,w(l(a)("You can drag & drop files anywhere while this modal is open.")),1),o("div",{ref_key:"container",ref:h,class:"hidden"},null,512),o("div",ps,[(d(!0),v(ce,null,me(l(C),S=>(d(),v("div",{key:S.id,class:"vuefinder__upload-modal__file-entry"},[o("span",{class:te(["vuefinder__upload-modal__file-icon",l($)(S)])},[o("span",{class:"vuefinder__upload-modal__file-icon-text",textContent:w(l(W)(S))},null,8,ms)],2),o("div",fs,[o("div",_s,w(l(Pt)(S.name,40))+" ("+w(S.size)+") ",1),o("div",hs,w(l(Pt)(S.name,16))+" ("+w(S.size)+") ",1),o("div",{class:te(["vuefinder__upload-modal__file-status",l($)(S)])},[ue(w(S.statusName)+" ",1),S.status===l(g).QUEUE_ENTRY_STATUS.UPLOADING?(d(),v("b",gs,w(S.percent),1)):L("",!0)],2)]),o("button",{type:"button",class:te(["vuefinder__upload-modal__file-remove",l(b)?"disabled":""]),title:l(a)("Delete"),disabled:l(b),onClick:B=>l(T)(S)},[...E[16]||(E[16]=[o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__upload-modal__file-remove-icon"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],10,ws)]))),128)),l(C).length?L("",!0):(d(),v("div",ys,w(l(a)("No files selected!")),1))]),l(k).length?(d(),R(At,{key:0,error:"",onHidden:E[2]||(E[2]=S=>k.value="")},{default:oe(()=>[ue(w(l(k)),1)]),_:1})):L("",!0)])]),o("input",{ref_key:"internalFileInput",ref:y,type:"file",multiple:"",class:"hidden"},null,512),o("input",{ref_key:"internalFolderInput",ref:m,type:"file",multiple:"",webkitdirectory:"",class:"hidden"},null,512)]),_:1},8,["show-drag-overlay","drag-overlay-text"]))}}),Fs={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"};function Ms(t,e){return d(),v("svg",Fs,[...e[0]||(e[0]=[o("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m6 4.125 2.25 2.25m0 0 2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125"},null,-1)])])}const Va={render:Ms},Es={class:"vuefinder__unarchive-modal__content"},Ts={class:"vuefinder__unarchive-modal__items"},Ds={key:0,class:"vuefinder__unarchive-modal__icon vuefinder__unarchive-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Is={key:1,class:"vuefinder__unarchive-modal__icon vuefinder__unarchive-modal__icon--file",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},As={class:"vuefinder__unarchive-modal__item-name"},Ps={class:"vuefinder__unarchive-modal__info"},Gt=ee({__name:"ModalUnarchive",setup(t){const e=Z(),a=Te(e),n=e.fs,i=Y(n.path),{t:s}=e.i18n,r=P(e.modal.data.items[0]),u=P([]),c=()=>{e.adapter.unarchive({item:r.value.path,path:i.value.path}).then(p=>{a.success(s("The file unarchived.")),e.fs.setFiles(p.files),e.modal.close()}).catch(p=>{a.error(Ee(p,s("Failed to unarchive")))})};return(p,h)=>(d(),R(De,null,{buttons:oe(()=>[o("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:c},w(l(s)("Unarchive")),1),o("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:h[0]||(h[0]=y=>l(e).modal.close())},w(l(s)("Cancel")),1)]),default:oe(()=>[o("div",null,[N(Ie,{icon:l(Va),title:l(s)("Unarchive")},null,8,["icon","title"]),o("div",Es,[o("div",Ts,[(d(!0),v(ce,null,me(u.value,y=>(d(),v("p",{key:y.path,class:"vuefinder__unarchive-modal__item"},[y.type==="dir"?(d(),v("svg",Ds,[...h[1]||(h[1]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(d(),v("svg",Is,[...h[2]||(h[2]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),o("span",As,w(y.basename),1)]))),128)),o("p",Ps,w(l(s)("The archive will be unarchived at"))+" ("+w(l(i).path)+") ",1)])])])]),_:1}))}}),Os={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function zs(t,e){return d(),v("svg",Os,[...e[0]||(e[0]=[o("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125"},null,-1)])])}const $a={render:zs},Bs={class:"vuefinder__archive-modal__content"},Ls={class:"vuefinder__archive-modal__form"},Vs={class:"vuefinder__archive-modal__files vf-scrollbar"},$s={key:0,class:"vuefinder__archive-modal__icon vuefinder__archive-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Us={key:1,class:"vuefinder__archive-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},Rs={class:"vuefinder__archive-modal__file-name"},Ns=["placeholder"],Qt=ee({__name:"ModalArchive",setup(t){const e=Z(),a=Te(e),{t:n}=e.i18n,i=e.fs,s=Y(i.path),r=P(""),u=P(e.modal.data.items),c=()=>{u.value.length&&e.adapter.archive({path:s.value.path,items:u.value.map(({path:p,type:h})=>({path:p,type:h})),name:r.value}).then(p=>{a.success(n("The file(s) archived.")),e.fs.setFiles(p.files),e.modal.close()}).catch(p=>{a.error(Ee(p,n("Failed to archive files")))})};return(p,h)=>(d(),R(De,null,{buttons:oe(()=>[o("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:c},w(l(n)("Archive")),1),o("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:h[1]||(h[1]=y=>l(e).modal.close())},w(l(n)("Cancel")),1)]),default:oe(()=>[o("div",null,[N(Ie,{icon:l($a),title:l(n)("Archive the files")},null,8,["icon","title"]),o("div",Bs,[o("div",Ls,[o("div",Vs,[(d(!0),v(ce,null,me(u.value,y=>(d(),v("p",{key:y.path,class:"vuefinder__archive-modal__file"},[y.type==="dir"?(d(),v("svg",$s,[...h[2]||(h[2]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(d(),v("svg",Us,[...h[3]||(h[3]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),o("span",Rs,w(y.basename),1)]))),128))]),pe(o("input",{"onUpdate:modelValue":h[0]||(h[0]=y=>r.value=y),class:"vuefinder__archive-modal__input",placeholder:l(n)("Archive name. (.zip file will be created)"),type:"text",onKeyup:dt(c,["enter"])},null,40,Ns),[[st,r.value]])])])])]),_:1}))}}),Hs={class:"vuefinder__about-modal__content"},js={class:"vuefinder__about-modal__main"},Ks={class:"vuefinder__about-modal__shortcuts"},Ys={class:"vuefinder__about-modal__shortcut"},qs={key:0,class:"vuefinder__about-modal__shortcut"},Gs={key:1,class:"vuefinder__about-modal__shortcut"},Qs={class:"vuefinder__about-modal__shortcut"},Ws={class:"vuefinder__about-modal__shortcut"},Js={key:2,class:"vuefinder__about-modal__shortcut"},Xs={key:3,class:"vuefinder__about-modal__shortcut"},Zs={key:4,class:"vuefinder__about-modal__shortcut"},ed={key:5,class:"vuefinder__about-modal__shortcut"},td={class:"vuefinder__about-modal__shortcut"},ad={class:"vuefinder__about-modal__shortcut"},ld={key:6,class:"vuefinder__about-modal__shortcut"},od={key:7,class:"vuefinder__about-modal__shortcut"},nd=ee({__name:"ModalShortcuts",setup(t){const e=Z(),{enabled:a}=Oe(),{t:n}=e.i18n;return(i,s)=>(d(),R(De,null,{buttons:oe(()=>[o("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:s[0]||(s[0]=r=>l(e).modal.close())},w(l(n)("Close")),1)]),default:oe(()=>[o("div",Hs,[N(Ie,{icon:l(ka),title:l(n)("Shortcuts")},null,8,["icon","title"]),o("div",js,[o("div",Ks,[o("div",Ys,[o("div",null,w(l(n)("Refresh")),1),s[1]||(s[1]=o("div",null,[o("kbd",null,"⌘"),ue(" + "),o("kbd",null,"R")],-1))]),l(a)("rename")?(d(),v("div",qs,[o("div",null,w(l(n)("Rename")),1),s[2]||(s[2]=o("div",null,[o("kbd",null,"⌘"),ue(" + "),o("kbd",null,"Shift"),ue(" + "),o("kbd",null,"R")],-1))])):L("",!0),l(a)("delete")?(d(),v("div",Gs,[o("div",null,w(l(n)("Delete")),1),s[3]||(s[3]=o("kbd",null,"Del",-1))])):L("",!0),o("div",Qs,[o("div",null,w(l(n)("Escape")),1),s[4]||(s[4]=o("kbd",null,"Esc",-1))]),o("div",Ws,[o("div",null,w(l(n)("Select All")),1),s[5]||(s[5]=o("div",null,[o("kbd",null,"⌘"),ue(" + "),o("kbd",null,"A")],-1))]),l(a)("copy")?(d(),v("div",Js,[o("div",null,w(l(n)("Cut")),1),s[6]||(s[6]=o("div",null,[o("kbd",null,"⌘"),ue(" + "),o("kbd",null,"X")],-1))])):L("",!0),l(a)("copy")?(d(),v("div",Xs,[o("div",null,w(l(n)("Copy")),1),s[7]||(s[7]=o("div",null,[o("kbd",null,"⌘"),ue(" + "),o("kbd",null,"C")],-1))])):L("",!0),l(a)("copy")?(d(),v("div",Zs,[o("div",null,w(l(n)("Paste")),1),s[8]||(s[8]=o("div",null,[o("kbd",null,"⌘"),ue(" + "),o("kbd",null,"V")],-1))])):L("",!0),l(a)("search")?(d(),v("div",ed,[o("div",null,w(l(n)("Search")),1),s[9]||(s[9]=o("div",null,[o("kbd",null,"⌘"),ue(" + "),o("kbd",null,"F")],-1))])):L("",!0),o("div",td,[o("div",null,w(l(n)("Toggle Sidebar")),1),s[10]||(s[10]=o("div",null,[o("kbd",null,"⌘"),ue(" + "),o("kbd",null,"E")],-1))]),o("div",ad,[o("div",null,w(l(n)("Open Settings")),1),s[11]||(s[11]=o("div",null,[o("kbd",null,"⌘"),ue(" + "),o("kbd",null,"S")],-1))]),l(a)("fullscreen")?(d(),v("div",ld,[o("div",null,w(l(n)("Toggle Full Screen")),1),s[12]||(s[12]=o("div",null,[o("kbd",null,"⌘"),ue(" + "),o("kbd",null,"Enter")],-1))])):L("",!0),l(a)("preview")?(d(),v("div",od,[o("div",null,w(l(n)("Preview")),1),s[13]||(s[13]=o("kbd",null,"Space",-1))])):L("",!0)])])])]),_:1}))}}),id={class:"vuefinder__menubar__container"},rd=["onClick","onMouseenter"],sd={class:"vuefinder__menubar__label"},dd=["onMouseenter"],ud=["onClick"],cd={key:0,class:"vuefinder__menubar__dropdown__label"},vd={key:1,class:"vuefinder__menubar__dropdown__checkmark"},pd=ee({__name:"MenuBar",setup(t){const e=Z(),a=Te(e),{enabled:n}=Oe(),{t:i}=e?.i18n||{t:f=>f},s=e?.fs,r=e?.config,u=Y(r.state),c=Y(s.selectedItems),p=Y(s?.storages||[]),h=P(null),y=P(!1),m=H(()=>window.opener!==null||window.name!==""||window.history.length<=1),x=H(()=>[{id:"file",label:i("File"),items:[{id:"new-folder",label:i("New Folder"),action:()=>e?.modal?.open(Yt,{items:c.value}),hidden:()=>!n("newfolder")},{id:"new-file",label:i("New File"),action:()=>e?.modal?.open(Ba,{items:c.value}),hidden:()=>!n("newfile")},{type:"separator",hidden:()=>!n("newfolder")&&!n("newfile")||!n("upload")},{id:"upload",label:i("Upload"),action:()=>e?.modal?.open(qt,{items:c.value}),hidden:()=>!n("upload")},{type:"separator",hidden:()=>!n("search")},{id:"search",label:i("Search"),action:()=>e.modal.open(Kt),hidden:()=>!n("search")},{type:"separator",hidden:()=>!n("archive")&&!n("unarchive")},{id:"archive",label:i("Archive"),action:()=>{c.value.length>0&&e?.modal?.open(Qt,{items:c.value})},enabled:()=>c.value.length>0,hidden:()=>!n("archive")},{id:"unarchive",label:i("Unarchive"),action:()=>{c.value.length===1&&c.value[0]?.mime_type==="application/zip"&&e?.modal?.open(Gt,{items:c.value})},enabled:()=>c.value.length===1&&c.value[0]?.mime_type==="application/zip",hidden:()=>!n("unarchive")},{type:"separator",hidden:()=>!n("preview")},{id:"preview",label:i("Preview"),action:()=>{c.value.length===1&&c.value[0]?.type!=="dir"&&e?.modal?.open(ut,{storage:s?.path?.get()?.storage,item:c.value[0]})},enabled:()=>c.value.length===1&&c.value[0]?.type!=="dir",hidden:()=>!n("preview")},...m.value?[{type:"separator"},{id:"exit",label:i("Exit"),action:()=>{try{window.close()}catch{}},enabled:()=>!0}]:[]]},{id:"edit",label:i("Edit"),items:[...e?.selectionMode==="multiple"?[{id:"select-all",label:i("Select All"),action:()=>s?.selectAll(e?.selectionMode||"multiple",e),enabled:()=>!0},{id:"deselect",label:i("Deselect All"),action:()=>s?.clearSelection(),enabled:()=>c.value.length>0},{type:"separator"}]:[],...n("copy")?[{id:"cut",label:i("Cut"),action:()=>{c.value.length>0&&s?.setClipboard("cut",new Set(c.value.map(f=>f.path)))},enabled:()=>c.value.length>0},{id:"copy",label:i("Copy"),action:()=>{c.value.length>0&&s?.setClipboard("copy",new Set(c.value.map(f=>f.path)))},enabled:()=>c.value.length>0},{id:"paste",label:i("Paste"),action:()=>{const f=s?.getClipboard();f?.items?.size>0&&e?.modal?.open(f.type==="cut"?Xe:Ht,{items:{from:Array.from(f.items),to:s?.path?.get()}})},enabled:()=>s?.getClipboard()?.items?.size>0}]:[],...n("move")?[{id:"move",label:i("Move files"),action:()=>{if(c.value.length>0){const f=e?.fs,_={storage:f?.path?.get()?.storage||"",path:f?.path?.get()?.path||"",type:"dir"};e?.modal?.open(Xe,{items:{from:c.value,to:_}})}},enabled:()=>c.value.length>0},{type:"separator"}]:[],{id:"copy-path",label:i("Copy Path"),action:async()=>{if(c.value.length===1){const f=c.value[0];await rt(f.path)}else{const f=s?.path?.get();f?.path&&await rt(f.path)}},enabled:()=>!0},{id:"copy-download-url",label:i("Copy Download URL"),action:async()=>{if(c.value.length===1){const f=c.value[0];s?.path?.get()?.storage;const _=e?.adapter?.getDownloadUrl({path:f.path});_&&await Yi(_)}},enabled:()=>c.value.length===1&&c.value[0]?.type!=="dir"},{type:"separator",hidden:()=>!n("rename")&&!n("delete")},{id:"rename",label:i("Rename"),action:()=>{c.value.length===1&&e?.modal?.open(yt,{items:c.value})},enabled:()=>c.value.length===1,hidden:()=>!n("rename")},{id:"delete",label:i("Delete"),action:()=>{c.value.length>0&&e?.modal?.open(wt,{items:c.value})},enabled:()=>c.value.length>0,hidden:()=>!n("delete")}]},{id:"view",label:i("View"),items:[{id:"refresh",label:i("Refresh"),action:()=>{e.adapter.invalidateListQuery(s.path.get().path),e.adapter.open(s.path.get().path)},enabled:()=>!0},{type:"separator"},{id:"grid-view",label:i("Grid View"),action:()=>r?.set("view","grid"),enabled:()=>!0,checked:()=>u.value?.view==="grid"},{id:"list-view",label:i("List View"),action:()=>r?.set("view","list"),enabled:()=>!0,checked:()=>u.value?.view==="list"},{type:"separator"},{id:"tree-view",label:i("Tree View"),action:()=>r?.toggle("showTreeView"),enabled:()=>!0,checked:()=>u.value?.showTreeView},{id:"thumbnails",label:i("Show Thumbnails"),action:()=>r?.toggle("showThumbnails"),enabled:()=>!0,checked:()=>u.value?.showThumbnails},{id:"show-hidden-files",label:i("Show Hidden Files"),action:()=>r?.toggle("showHiddenFiles"),enabled:()=>!0,checked:()=>u.value?.showHiddenFiles},{type:"separator",hidden:()=>!n("fullscreen")},{id:"fullscreen",label:i("Full Screen"),action:()=>r?.toggle("fullScreen"),enabled:()=>n("fullscreen"),checked:()=>u.value?.fullScreen,hidden:()=>!n("fullscreen")},{type:"separator"},{id:"persist-path",label:i("Persist Path"),action:()=>{r?.toggle("persist"),e.emitter.emit("vf-persist-path-saved")},enabled:()=>!0,checked:()=>u.value?.persist},{id:"metric-units",label:i("Metric Units"),action:()=>{r?.toggle("metricUnits"),e.filesize=r?.get("metricUnits")?wa:Bt,e.emitter.emit("vf-metric-units-saved")},enabled:()=>!0,checked:()=>u.value?.metricUnits}]},{id:"go",label:i("Go"),items:[...n("history")?[{id:"forward",label:i("Forward"),action:()=>{s?.goForward();const f=s?.path?.get();f?.path&&e?.adapter.open(f.path)},enabled:()=>s?.canGoForward?.get()??!1},{id:"back",label:i("Back"),action:()=>{s?.goBack();const f=s?.path?.get();f?.path&&e?.adapter.open(f.path)},enabled:()=>s?.canGoBack?.get()??!1}]:[],{id:"open-containing-folder",label:i("Open containing folder"),action:()=>{const f=s?.path?.get();if(f?.breadcrumb&&f.breadcrumb.length>1){const _=f.breadcrumb[f.breadcrumb.length-2]?.path??`${f.storage}://`;e?.adapter.open(_)}},enabled:()=>{const f=s?.path?.get();return f?.breadcrumb&&f.breadcrumb.length>1}},{type:"separator"},...(p.value||[]).map(f=>({id:`storage-${f}`,label:f,action:()=>{const _=`${f}://`;e?.adapter.open(_)},enabled:()=>!0})),{type:"separator"},{id:"go-to-folder",label:i("Go to Folder"),action:async()=>{const f=prompt(i("Enter folder path:"));if(f){if(!f.includes("://")){alert(i("Invalid path format. Path must be in format: storage://path/to/folder"));return}const _=f.indexOf("://"),M=f.slice(0,_);if(!p.value||!p.value.includes(M)){alert(i('Invalid storage. Storage "%s" is not available.',M));return}try{await e?.adapter.open(f)}catch(T){const D=Ee(T,i("Failed to navigate to folder"));a.error(D),e.fs.setLoading(!1)}}},enabled:()=>!0}]},{id:"help",label:i("Help"),items:[{id:"settings",label:i("Settings"),action:()=>e?.modal?.open(Pa),enabled:()=>!0},{id:"shortcuts",label:i("Shortcuts"),action:()=>e?.modal?.open(nd),enabled:()=>!0},{id:"about",label:i("About"),action:()=>e?.modal?.open(xa),enabled:()=>!0}]}]),C=f=>{h.value===f?b():(h.value=f,y.value=!0)},k=f=>{y.value&&(h.value=f)},b=()=>{h.value=null,y.value=!1},F=f=>{b(),f()},g=f=>{f.target.closest(".vuefinder__menubar")||b()};return ve(()=>{document.addEventListener("click",g)}),ke(()=>{document.removeEventListener("click",g)}),(f,_)=>(d(),v("div",{class:"vuefinder__menubar",onClick:_[0]||(_[0]=ie(()=>{},["stop"]))},[o("div",id,[(d(!0),v(ce,null,me(x.value,M=>(d(),v("div",{key:M.id,class:te(["vuefinder__menubar__item",{"vuefinder__menubar__item--active":h.value===M.id}]),onClick:T=>C(M.id),onMouseenter:T=>k(M.id)},[o("span",sd,w(M.label),1),h.value===M.id?(d(),v("div",{key:0,class:"vuefinder__menubar__dropdown",onMouseenter:T=>k(M.id)},[(d(!0),v(ce,null,me(M.items,T=>(d(),v("div",{key:T.id||T.type,class:te(["vuefinder__menubar__dropdown__item",{"vuefinder__menubar__dropdown__item--separator":T.type==="separator","vuefinder__menubar__dropdown__item--disabled":T.enabled&&!T.enabled(),"vuefinder__menubar__dropdown__item--checked":T.checked&&T.checked(),"vuefinder__menubar__dropdown__item--hidden":T.hidden&&T.hidden()}]),onClick:ie(D=>T.type!=="separator"&&T.enabled&&T.enabled()?F(T.action):null,["stop"])},[T.type!=="separator"?(d(),v("span",cd,w(T.label),1)):L("",!0),T.checked&&T.checked()?(d(),v("span",vd," ✓ ")):L("",!0)],10,ud))),128))],40,dd)):L("",!0)],42,rd))),128))])]))}}),md={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function fd(t,e){return d(),v("svg",md,[...e[0]||(e[0]=[o("path",{d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"},null,-1)])])}const _d={render:fd},hd={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function gd(t,e){return d(),v("svg",hd,[...e[0]||(e[0]=[o("path",{d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"},null,-1)])])}const wd={render:gd},yd={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"};function bd(t,e){return d(),v("svg",yd,[...e[0]||(e[0]=[o("path",{d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25zm0 9.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18zM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25zm0 9.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18z"},null,-1)])])}const kd={render:bd},xd={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"};function Cd(t,e){return d(),v("svg",xd,[...e[0]||(e[0]=[o("path",{d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75"},null,-1)])])}const Sd={render:Cd},Fd={fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function Md(t,e){return d(),v("svg",Fd,[...e[0]||(e[0]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M3 4a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v2.586a1 1 0 0 1-.293.707l-6.414 6.414a1 1 0 0 0-.293.707V17l-4 4v-6.586a1 1 0 0 0-.293-.707L3.293 7.293A1 1 0 0 1 3 6.586z"},null,-1)])])}const Ed={render:Md},Td={class:"vuefinder__toolbar"},Dd={class:"vuefinder__toolbar__actions"},Id=["title"],Ad=["title"],Pd=["title"],Od=["title"],zd=["title"],Bd=["title"],Ld=["title"],Vd={class:"vuefinder__toolbar__controls"},$d=["title"],Ud={class:"vuefinder__toolbar__control vuefinder__toolbar__dropdown-container"},Rd=["title"],Nd={class:"relative"},Hd={key:0,class:"vuefinder__toolbar__filter-indicator"},jd={key:0,class:"vuefinder__toolbar__dropdown"},Kd={class:"vuefinder__toolbar__dropdown-content"},Yd={class:"vuefinder__toolbar__dropdown-section"},qd={class:"vuefinder__toolbar__dropdown-label"},Gd={class:"vuefinder__toolbar__dropdown-row"},Qd={value:"name"},Wd={value:"size"},Jd={value:"modified"},Xd={value:""},Zd={value:"asc"},eu={value:"desc"},tu={class:"vuefinder__toolbar__dropdown-section"},au={class:"vuefinder__toolbar__dropdown-label"},lu={class:"vuefinder__toolbar__dropdown-options"},ou={class:"vuefinder__toolbar__dropdown-option"},nu={class:"vuefinder__toolbar__option-text"},iu={class:"vuefinder__toolbar__dropdown-option"},ru={class:"vuefinder__toolbar__option-text"},su={class:"vuefinder__toolbar__dropdown-option"},du={class:"vuefinder__toolbar__option-text"},uu={class:"vuefinder__toolbar__dropdown-toggle"},cu={for:"showHidden",class:"vuefinder__toolbar__toggle-label"},vu={class:"vuefinder__toolbar__dropdown-reset"},pu=["title"],mu=["title"],fu=ee({name:"VfToolbar",__name:"Toolbar",setup(t){const e=Z(),{enabled:a}=Oe(),{t:n}=e.i18n,i=e.fs,s=e.config,r=Y(s.state),u=Y(i.selectedItems),c=Y(i.sort),p=Y(i.filter);ne(()=>r.value.fullScreen,()=>{const b=document.querySelector("body");b&&(b.style.overflow=r.value.fullScreen?"hidden":"")},{immediate:!0});const h=P(!1),y=b=>{b.target.closest(".vuefinder__toolbar__dropdown-container")||(h.value=!1)};ve(()=>{const b=document.querySelector("body");b&&r.value.fullScreen&&setTimeout(()=>b.style.overflow="hidden"),document.addEventListener("click",y)}),ke(()=>{document.removeEventListener("click",y)});const m=P({sortBy:"name",sortOrder:"",filterKind:"all",showHidden:r.value.showHiddenFiles});ne(()=>m.value.sortBy,b=>{if(!m.value.sortOrder){i.clearSort();return}b==="name"?i.setSort("basename",m.value.sortOrder):b==="size"?i.setSort("file_size",m.value.sortOrder):b==="modified"&&i.setSort("last_modified",m.value.sortOrder)}),ne(()=>m.value.sortOrder,b=>{if(!b){i.clearSort();return}m.value.sortBy==="name"?i.setSort("basename",b):m.value.sortBy==="size"?i.setSort("file_size",b):m.value.sortBy==="modified"&&i.setSort("last_modified",b)}),ne(c,b=>{b.active?(b.column==="basename"?m.value.sortBy="name":b.column==="file_size"?m.value.sortBy="size":b.column==="last_modified"&&(m.value.sortBy="modified"),m.value.sortOrder=b.order):m.value.sortOrder=""},{immediate:!0}),ne(()=>m.value.filterKind,b=>{i.setFilter(b,r.value.showHiddenFiles)}),ne(()=>m.value.showHidden,b=>{s.set("showHiddenFiles",b),i.setFilter(m.value.filterKind,b)}),ne(p,b=>{m.value.filterKind=b.kind},{immediate:!0}),ne(()=>r.value.showHiddenFiles,b=>{m.value.showHidden=b,i.setFilter(m.value.filterKind,b)},{immediate:!0});const x=()=>s.set("view",r.value.view==="grid"?"list":"grid"),C=H(()=>p.value.kind!=="all"||!r.value.showHiddenFiles||c.value.active),k=()=>{m.value={sortBy:"name",sortOrder:"",filterKind:"all",showHidden:!0},s.set("showHiddenFiles",!0),i.clearSort(),i.clearFilter()};return(b,F)=>(d(),v("div",Td,[o("div",Dd,[l(a)("newfolder")?(d(),v("div",{key:0,class:"mx-1.5",title:l(n)("New Folder"),onClick:F[0]||(F[0]=g=>l(e).modal.open(Yt,{items:l(u)}))},[N(l(Oa))],8,Id)):L("",!0),l(a)("newfile")?(d(),v("div",{key:1,class:"mx-1.5",title:l(n)("New File"),onClick:F[1]||(F[1]=g=>l(e).modal.open(Ba,{items:l(u)}))},[N(l(za))],8,Ad)):L("",!0),l(a)("rename")?(d(),v("div",{key:2,class:"mx-1.5",title:l(n)("Rename"),onClick:F[2]||(F[2]=g=>l(u).length!==1||l(e).modal.open(yt,{items:l(u)}))},[N(l(Sa),{class:te(l(u).length===1?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Pd)):L("",!0),l(a)("delete")?(d(),v("div",{key:3,class:"mx-1.5",title:l(n)("Delete"),onClick:F[3]||(F[3]=g=>!l(u).length||l(e).modal.open(wt,{items:l(u)}))},[N(l(Ca),{class:te(l(u).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Od)):L("",!0),l(a)("upload")?(d(),v("div",{key:4,class:"mx-1.5",title:l(n)("Upload"),onClick:F[4]||(F[4]=g=>l(e).modal.open(qt,{items:l(u)}))},[N(l(La))],8,zd)):L("",!0),l(a)("unarchive")&&l(u).length===1&&l(u)[0].mime_type==="application/zip"?(d(),v("div",{key:5,class:"mx-1.5",title:l(n)("Unarchive"),onClick:F[5]||(F[5]=g=>!l(u).length||l(e).modal.open(Gt,{items:l(u)}))},[N(l(Va),{class:te(l(u).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Bd)):L("",!0),l(a)("archive")?(d(),v("div",{key:6,class:"mx-1.5",title:l(n)("Archive"),onClick:F[6]||(F[6]=g=>!l(u).length||l(e).modal.open(Qt,{items:l(u)}))},[N(l($a),{class:te(l(u).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,Ld)):L("",!0)]),o("div",Vd,[l(a)("search")?(d(),v("div",{key:0,class:"mx-1.5",title:l(n)("Search Files"),onClick:F[7]||(F[7]=g=>l(e).modal.open(Kt))},[N(l(jt),{class:"vf-toolbar-icon text-(--vf-bg-primary)"})],8,$d)):L("",!0),o("div",Ud,[o("div",{title:l(n)("Filter"),class:"vuefinder__toolbar__dropdown-trigger",onClick:F[8]||(F[8]=g=>h.value=!h.value)},[o("div",Nd,[N(l(Ed),{class:"vf-toolbar-icon vuefinder__toolbar__icon h-6 w-6"}),C.value?(d(),v("div",Hd)):L("",!0)])],8,Rd),h.value?(d(),v("div",jd,[o("div",Kd,[o("div",Yd,[o("div",qd,w(l(n)("Sorting")),1),o("div",Gd,[pe(o("select",{"onUpdate:modelValue":F[9]||(F[9]=g=>m.value.sortBy=g),class:"vuefinder__toolbar__dropdown-select"},[o("option",Qd,w(l(n)("Name")),1),o("option",Wd,w(l(n)("Size")),1),o("option",Jd,w(l(n)("Date")),1)],512),[[Dt,m.value.sortBy]]),pe(o("select",{"onUpdate:modelValue":F[10]||(F[10]=g=>m.value.sortOrder=g),class:"vuefinder__toolbar__dropdown-select"},[o("option",Xd,w(l(n)("None")),1),o("option",Zd,w(l(n)("Asc")),1),o("option",eu,w(l(n)("Desc")),1)],512),[[Dt,m.value.sortOrder]])])]),o("div",tu,[o("div",au,w(l(n)("Show")),1),o("div",lu,[o("label",ou,[pe(o("input",{"onUpdate:modelValue":F[11]||(F[11]=g=>m.value.filterKind=g),type:"radio",name:"filterKind",value:"all",class:"vuefinder__toolbar__radio"},null,512),[[Ft,m.value.filterKind]]),o("span",nu,w(l(n)("All items")),1)]),o("label",iu,[pe(o("input",{"onUpdate:modelValue":F[12]||(F[12]=g=>m.value.filterKind=g),type:"radio",name:"filterKind",value:"files",class:"vuefinder__toolbar__radio"},null,512),[[Ft,m.value.filterKind]]),o("span",ru,w(l(n)("Files only")),1)]),o("label",su,[pe(o("input",{"onUpdate:modelValue":F[13]||(F[13]=g=>m.value.filterKind=g),type:"radio",name:"filterKind",value:"folders",class:"vuefinder__toolbar__radio"},null,512),[[Ft,m.value.filterKind]]),o("span",du,w(l(n)("Folders only")),1)])])]),o("div",uu,[o("label",cu,w(l(n)("Show hidden files")),1),pe(o("input",{id:"showHidden","onUpdate:modelValue":F[14]||(F[14]=g=>m.value.showHidden=g),type:"checkbox",class:"vuefinder__toolbar__checkbox"},null,512),[[gt,m.value.showHidden]])]),o("div",vu,[o("button",{class:"vuefinder__toolbar__reset-button",onClick:k},w(l(n)("Reset")),1)])])])):L("",!0)]),l(a)("fullscreen")?(d(),v("div",{key:1,class:"mx-1.5",title:l(n)("Toggle Full Screen"),onClick:F[15]||(F[15]=g=>l(s).toggle("fullScreen"))},[l(r).fullScreen?(d(),R(l(wd),{key:0,class:"vf-toolbar-icon"})):(d(),R(l(_d),{key:1,class:"vf-toolbar-icon"}))],8,pu)):L("",!0),o("div",{class:"mx-1.5",title:l(n)("Change View"),onClick:F[16]||(F[16]=g=>x())},[l(r).view==="grid"?(d(),R(l(kd),{key:0,class:"vf-toolbar-icon"})):L("",!0),l(r).view==="list"?(d(),R(l(Sd),{key:1,class:"vf-toolbar-icon"})):L("",!0)],8,mu)])]))}}),_u={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"vuefinder__breadcrumb__refresh-icon",viewBox:"-40 -40 580 580"};function hu(t,e){return d(),v("svg",_u,[...e[0]||(e[0]=[o("path",{d:"M463.5 224h8.5c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2S461.9 48.1 455 55l-41.6 41.6c-87.6-86.5-228.7-86.2-315.8 1-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2S334.3 224 344 224z"},null,-1)])])}const gu={render:hu},wu={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-0.5 rounded",viewBox:"0 0 20 20"};function yu(t,e){return d(),v("svg",wu,[...e[0]||(e[0]=[o("path",{"fill-rule":"evenodd",d:"M5.293 9.707a1 1 0 0 1 0-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L11 7.414V15a1 1 0 1 1-2 0V7.414L6.707 9.707a1 1 0 0 1-1.414 0",class:"pointer-events-none","clip-rule":"evenodd"},null,-1)])])}const bu={render:yu},ku={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"vuefinder__breadcrumb__close-icon",viewBox:"0 0 24 24"};function xu(t,e){return d(),v("svg",ku,[...e[0]||(e[0]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)])])}const Cu={render:xu},Su={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function Fu(t,e){return d(),v("svg",Su,[...e[0]||(e[0]=[o("path",{d:"M10.707 2.293a1 1 0 0 0-1.414 0l-7 7a1 1 0 0 0 1.414 1.414L4 10.414V17a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-6.586l.293.293a1 1 0 0 0 1.414-1.414z",class:"pointer-events-none"},null,-1)])])}const Mu={render:Fu},Eu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"w-6 h-6 cursor-pointer",viewBox:"0 0 24 24"};function Tu(t,e){return d(),v("svg",Eu,[...e[0]||(e[0]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)])])}const Du={render:Tu},Iu={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"};function Au(t,e){return d(),v("svg",Iu,[...e[0]||(e[0]=[o("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),o("path",{d:"M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01"},null,-1)])])}const Pu={render:Au},Ou={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function zu(t,e){return d(),v("svg",Ou,[...e[0]||(e[0]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7h12m0 0-4-4m4 4-4 4m0 6H4m0 0 4 4m-4-4 4-4"},null,-1)])])}const Bu={render:zu};function ct(t,e=[]){const a="vfDragEnterCounter",n=t.fs,i=Y(n.selectedItems);function s(y,m){return!!(!y||y.type!=="dir"||y.path.startsWith(m)||i.value.some(x=>x.path===m?!1:!!y.path.startsWith(x.path)))}function r(y,m){if(y.isExternalDrag)return;if(!(t.features?.move??!1)){y.dataTransfer&&(y.dataTransfer.dropEffect="none",y.dataTransfer.effectAllowed="none");return}y.preventDefault();const x=n.getDraggedItem();s(m,x)?y.dataTransfer&&(y.dataTransfer.dropEffect="none",y.dataTransfer.effectAllowed="none"):(y.dataTransfer&&(y.dataTransfer.dropEffect="copy",y.dataTransfer.effectAllowed="all"),y.currentTarget.classList.add(...e))}function u(y){if(y.isExternalDrag||!(t.features?.move??!1))return;y.preventDefault();const m=y.currentTarget,x=Number(m.dataset[a]||0);m.dataset[a]=String(x+1)}function c(y){if(y.isExternalDrag||!(t.features?.move??!1))return;y.preventDefault();const m=y.currentTarget,x=Number(m.dataset[a]||0)-1;x<=0?(delete m.dataset[a],m.classList.remove(...e)):m.dataset[a]=String(x)}function p(y,m){if(y.isExternalDrag||!(t.features?.move??!1)||!m)return;y.preventDefault();const x=y.currentTarget;delete x.dataset[a],x.classList.remove(...e);const C=y.dataTransfer?.getData("items")||"[]",k=JSON.parse(C).map(b=>n.sortedFiles.get().find(F=>F.path===b));n.clearDraggedItem(),t.modal.open(Xe,{items:{from:k,to:m}})}function h(y){return{dragover:m=>r(m,y),dragenter:u,dragleave:c,drop:m=>p(m,y)}}return{events:h}}const Lu={class:"vuefinder__breadcrumb__container"},Vu=["title"],$u=["title"],Uu=["title"],Ru=["title"],Nu={class:"vuefinder__breadcrumb__path-container"},Hu={class:"vuefinder__breadcrumb__list"},ju={key:0,class:"vuefinder__breadcrumb__hidden-list"},Ku={class:"relative"},Yu=["title","onClick"],qu=["title"],Gu={class:"vuefinder__breadcrumb__path-mode"},Qu={class:"vuefinder__breadcrumb__path-mode-content"},Wu=["title"],Ju={class:"vuefinder__breadcrumb__path-text"},Xu=["title"],Zu=["data-theme"],ec=["onClick"],tc={class:"vuefinder__breadcrumb__hidden-item-content"},ac={class:"vuefinder__breadcrumb__hidden-item-text"},lc=ee({__name:"Breadcrumb",setup(t){const e=Z(),a=Te(e),{t:n}=e.i18n,i=e.fs,s=e.config,r=Y(s.state),u=Y(i.path),c=Y(i.loading),p=P(null),h=Ea(0,100),y=P(5),m=P(!1),x=P(!1),C=H(()=>u.value?.breadcrumb??[]);function k(O,E){return O.length>E?[O.slice(-E),O.slice(0,-E)]:[O,[]]}const b=H(()=>k(C.value,y.value)[0]),F=H(()=>k(C.value,y.value)[1]);ne(h,()=>{if(!p.value)return;const O=p.value.children;let E=0,S=0;const B=5,V=1;y.value=B,ze(()=>{for(let Q=O.length-1;Q>=0;Q--){const se=O[Q];if(E+se.offsetWidth>h.value-40)break;E+=parseInt(se.offsetWidth.toString(),10),S++}S<V&&(S=V),S>B&&(S=B),y.value=S})});const g=()=>{p.value&&(h.value=p.value.offsetWidth)},f=P(null);ve(()=>{f.value=new ResizeObserver(g),p.value&&f.value.observe(p.value)}),ke(()=>{f.value&&f.value.disconnect()});const _=ct(e,["vuefinder__drag-over"]);function M(O=null){O??=C.value.length-2;const E={basename:u.value?.storage??"local",extension:"",path:(u.value?.storage??"local")+"://",storage:u.value?.storage??"local",type:"dir",file_size:null,last_modified:null,mime_type:null,visibility:""};return C.value[O]??E}const T=()=>{e.adapter.invalidateListQuery(u.value.path),e.adapter.open(u.value.path)},D=()=>{b.value.length>0&&e.adapter.open(C.value[C.value.length-2]?.path??(u.value?.storage??"local")+"://")},I=O=>{e.adapter.open(O.path),m.value=!1},$=()=>{m.value&&(m.value=!1)},W={mounted(O,E){O.clickOutsideEvent=function(S){O===S.target||O.contains(S.target)||E.value()},document.body.addEventListener("click",O.clickOutsideEvent)},beforeUnmount(O){document.body.removeEventListener("click",O.clickOutsideEvent)}},z=()=>{s.toggle("showTreeView")},K=P({x:0,y:0}),A=(O,E=null)=>{if(O.currentTarget instanceof HTMLElement){const{x:S,y:B,height:V}=O.currentTarget.getBoundingClientRect();K.value={x:S,y:B+V}}m.value=E??!m.value},G=()=>{x.value=!x.value},q=async()=>{await rt(u.value?.path||""),a.success(n("Path copied to clipboard"))},ae=()=>{x.value=!1};return(O,E)=>(d(),v("div",Lu,[o("span",{title:l(n)("Toggle Tree View")},[N(l(Pu),{class:te(["vuefinder__breadcrumb__toggle-tree",l(r).showTreeView?"vuefinder__breadcrumb__toggle-tree--active":""]),onClick:z},null,8,["class"])],8,Vu),o("span",{title:l(n)("Go up a directory")},[N(l(bu),Ae({class:C.value.length?"vuefinder__breadcrumb__go-up--active":"vuefinder__breadcrumb__go-up--inactive"},Ne(C.value.length?l(_).events(M()):{}),{onClick:D}),null,16,["class"])],8,$u),l(i).isLoading()?(d(),v("span",{key:1,title:l(n)("Cancel")},[N(l(Cu),{onClick:E[0]||(E[0]=S=>l(e).emitter.emit("vf-fetch-abort"))})],8,Ru)):(d(),v("span",{key:0,title:l(n)("Refresh")},[N(l(gu),{onClick:T})],8,Uu)),pe(o("div",Nu,[o("div",null,[N(l(Mu),Ae({class:"vuefinder__breadcrumb__home-icon"},Ne(l(_).events(M(-1))),{onClick:E[1]||(E[1]=ie(S=>l(e).adapter.open(l(u).storage+"://"),["stop"]))}),null,16)]),o("div",Hu,[F.value.length?pe((d(),v("div",ju,[E[3]||(E[3]=o("div",{class:"vuefinder__breadcrumb__separator"},"/",-1)),o("div",Ku,[o("span",{class:"vuefinder__breadcrumb__hidden-toggle",onDragenter:E[2]||(E[2]=S=>A(S,!0)),onClick:ie(A,["stop"])},[N(l(Aa),{class:"vuefinder__breadcrumb__hidden-toggle-icon"})],32)])])),[[W,$]]):L("",!0)]),o("div",{ref_key:"breadcrumbContainer",ref:p,class:"vuefinder__breadcrumb__visible-list pointer-events-none"},[(d(!0),v(ce,null,me(b.value,(S,B)=>(d(),v("div",{key:B},[E[4]||(E[4]=o("span",{class:"vuefinder__breadcrumb__separator"},"/",-1)),o("span",Ae({class:"vuefinder__breadcrumb__item pointer-events-auto",title:S.basename},Ne(l(_).events(S),!0),{onClick:ie(V=>l(e).adapter.open(S.path),["stop"])}),w(S.name),17,Yu)]))),128))],512),l(s).get("loadingIndicator")==="circular"&&l(c)?(d(),R(l(xt),{key:0})):L("",!0),o("span",{title:l(n)("Toggle Path Copy Mode"),onClick:G},[N(l(Bu),{class:"vuefinder__breadcrumb__toggle-icon"})],8,qu)],512),[[$e,!x.value]]),pe(o("div",Gu,[o("div",Qu,[o("div",{title:l(n)("Copy Path")},[N(l(Vt),{class:"vuefinder__breadcrumb__copy-icon",onClick:q})],8,Wu),o("div",Ju,w(l(u).path),1),o("div",{title:l(n)("Exit")},[N(l(Du),{class:"vuefinder__breadcrumb__exit-icon",onClick:ae})],8,Xu)])],512),[[$e,x.value]]),(d(),R(ht,{to:"body"},[o("div",null,[pe(o("div",{style:Pe({position:"absolute",top:K.value.y+"px",left:K.value.x+"px"}),class:"vuefinder__themer vuefinder__breadcrumb__hidden-dropdown","data-theme":l(e).theme.current},[(d(!0),v(ce,null,me(F.value,(S,B)=>(d(),v("div",Ae({key:B,class:"vuefinder__breadcrumb__hidden-item"},Ne(l(_).events(S),!0),{onClick:V=>I(S)}),[o("div",tc,[o("span",null,[N(l(Be),{class:"vuefinder__breadcrumb__hidden-item-icon"})]),o("span",ac,w(S.name),1)])],16,ec))),128))],12,Zu),[[$e,m.value]])])]))]))}}),oc={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function nc(t,e){return d(),v("svg",oc,[...e[0]||(e[0]=[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1)])])}const ia={render:nc},ic={class:"vuefinder__drag-item__container"},rc={class:"vuefinder__drag-item__count"},sc=ee({__name:"DragItem",props:{count:{}},setup(t){const e=t;return(a,n)=>(d(),v("div",ic,[e.count>1?(d(),R(l(ia),{key:0,class:"vuefinder__drag-item__icon translate-x-1 translate-y-1"})):L("",!0),N(l(ia),{class:"vuefinder__drag-item__icon"}),o("div",rc,w(e.count),1)]))}}),dc={key:2,class:"vuefinder__item-icon__extension"},ra=ee({__name:"ItemIcon",props:{item:{},ext:{type:Boolean},small:{type:Boolean},view:{}},setup(t){const e=t,a=Z(),n=Y(a.config.state),i=H(()=>e.small!==void 0?e.small?"small":"large":e.view==="list"?"small":"large"),s=H(()=>{const u=i.value,c=n.value?.listIconSize,p=n.value?.gridIconSize;return n.value?.gridItemWidth,n.value?.gridItemHeight,e.view==="list"||u==="small"?{"--vf-icon-size":`${c??16}px`}:{"--vf-icon-size":`${p??48}px`}}),r={app:a,config:n.value,item:e.item,view:e.view};return(u,c)=>(d(),v("div",{class:te(["vuefinder__item-icon",{"vuefinder__item-icon--small":i.value==="small","vuefinder__item-icon--large":i.value==="large","vuefinder__item-icon--grid":t.view==="grid","vuefinder__item-icon--list":t.view==="list"}]),style:Pe(s.value)},[Ce(u.$slots,"icon",He(je(r)),()=>[t.item.type==="dir"?(d(),R(l(Be),{key:0,class:"vuefinder__item-icon__folder"})):(d(),R(l(it),{key:1,class:"vuefinder__item-icon__file"})),t.ext&&t.item.type!=="dir"&&t.item.extension?(d(),v("div",dc,w(t.item.extension.substring(0,3)),1)):L("",!0)])],6))}}),uc={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"};function cc(t,e){return d(),v("svg",uc,[...e[0]||(e[0]=[o("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),o("path",{d:"M12 2a5 5 0 0 1 5 5v3a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3v-6a3 3 0 0 1 3-3V7a5 5 0 0 1 5-5m0 12a2 2 0 0 0-1.995 1.85L10 16a2 2 0 1 0 2-2m0-10a3 3 0 0 0-3 3v3h6V7a3 3 0 0 0-3-3"},null,-1)])])}const sa={render:cc},vc=["data-key","data-row","data-col","draggable"],pc={key:0},mc={class:"vuefinder__explorer__item-grid-content"},fc=["data-src","alt"],_c={class:"vuefinder__explorer__item-title"},hc={key:1,class:"vuefinder__explorer__item-list-content"},gc={class:"vuefinder__explorer__item-list-name"},wc={class:"vuefinder__explorer__item-list-icon"},yc={class:"vuefinder__explorer__item-name"},bc={key:0,class:"vuefinder__explorer__item-path"},kc={key:1,class:"vuefinder__explorer__item-size"},xc={key:0},Cc={key:2,class:"vuefinder__explorer__item-date"},Sc=ee({__name:"FileItem",props:{item:{},view:{},showThumbnails:{type:Boolean},isSelected:{type:Boolean},isDragging:{type:Boolean},rowIndex:{},colIndex:{},showPath:{type:Boolean},explorerId:{}},emits:["click","dblclick","contextmenu","dragstart","dragend"],setup(t,{emit:e}){const a=t,n=e,i=Z(),s=i.fs,r=i.config,u=H(()=>{const z=i.selectionFilterType;return!z||z==="both"?!0:z==="files"&&a.item.type==="file"||z==="dirs"&&a.item.type==="dir"}),c=H(()=>{const z=i.selectionFilterMimeIncludes;return!z||!z.length||a.item.type==="dir"?!0:a.item.mime_type?z.some(K=>a.item.mime_type?.startsWith(K)):!1}),p=H(()=>u.value&&c.value),h=H(()=>["file-item-"+a.explorerId,a.view==="grid"?"vf-explorer-item-grid":"vf-explorer-item-list",a.isSelected?"vf-explorer-selected":"",p.value?"":"vf-explorer-item--unselectable"]),y=H(()=>({opacity:a.isDragging||s.isCut(a.item.path)||!p.value?.5:""})),m=P(null);let x=!1,C=null,k=null,b=!1;const{enabled:F}=Oe(),g=typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0),f=H(()=>g?!1:F("move")),_=()=>{C&&(clearTimeout(C),C=null),k=null},M=z=>{_(),k=z,b=!1,z.stopPropagation(),C=setTimeout(()=>{!k||C===null||(b=!0,k.cancelable&&k.preventDefault(),k.stopPropagation(),n("contextmenu",k),_())},500)},T=z=>{if(b){z.preventDefault(),z.stopPropagation(),_();return}setTimeout(()=>{b||(_(),W(z))},100)},D=z=>{if(!k)return;const K=k.touches[0]||k.changedTouches[0],A=z.touches[0]||z.changedTouches[0];if(K&&A){const G=Math.abs(A.clientX-K.clientX),q=Math.abs(A.clientY-K.clientY);(G>15||q>15)&&_()}},I=z=>{g&&z.type!=="click"||n("click",z)},$=z=>{if(b)return z.preventDefault(),z.stopPropagation(),!1;n("dragstart",z)},W=z=>{if(!x)x=!0,n("click",z),m.value=setTimeout(()=>{x=!1},300);else return x=!1,n("dblclick",z),!1};return(z,K)=>(d(),v("div",{class:te(h.value),style:Pe(y.value),"data-key":t.item.path,"data-row":t.rowIndex,"data-col":t.colIndex,draggable:f.value,onTouchstartCapture:K[1]||(K[1]=A=>M(A)),onTouchendCapture:K[2]||(K[2]=A=>T(A)),onTouchmoveCapture:D,onTouchcancelCapture:K[3]||(K[3]=()=>_()),onClick:I,onDblclick:K[4]||(K[4]=A=>n("dblclick",A)),onContextmenu:K[5]||(K[5]=ie(A=>n("contextmenu",A),["prevent","stop"])),onDragstart:$,onDragend:K[6]||(K[6]=A=>n("dragend",A))},[t.view==="grid"?(d(),v("div",pc,[l(s).isReadOnly(t.item)?(d(),R(l(sa),{key:0,class:"vuefinder__item--readonly vuefinder__item--readonly--left",title:"Read Only"})):L("",!0),o("div",mc,[(t.item.mime_type??"").startsWith("image")&&t.showThumbnails?(d(),v("img",{key:0,src:"data:image/png;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",class:"vuefinder__explorer__item-thumbnail lazy","data-src":t.item.previewUrl??l(i).adapter.getPreviewUrl({path:t.item.path}),alt:t.item.basename,onTouchstart:K[0]||(K[0]=A=>A.preventDefault())},null,40,fc)):(d(),R(ra,{key:1,item:t.item,ext:!0,view:t.view},{icon:oe(A=>[Ce(z.$slots,"icon",He(je(A)))]),_:3},8,["item","view"]))]),o("span",_c,w(l(Pt)(t.item.basename)),1)])):(d(),v("div",hc,[o("div",gc,[o("div",wc,[N(ra,{item:t.item,view:t.view},{icon:oe(A=>[Ce(z.$slots,"icon",He(je(A)))]),_:3},8,["item","view"])]),o("span",yc,w(t.item.basename),1),o("div",null,[l(s).isReadOnly(t.item)?(d(),R(l(sa),{key:0,class:"vuefinder__item--readonly vuefinder__item--readonly--list",title:"Read Only"})):L("",!0)])]),t.showPath?(d(),v("div",bc,w(t.item.path),1)):L("",!0),t.showPath?L("",!0):(d(),v("div",kc,[t.item.file_size?(d(),v("div",xc,w(l(i).filesize(t.item.file_size)),1)):L("",!0)])),!t.showPath&&t.item.last_modified?(d(),v("div",Cc,w(new Date(t.item.last_modified*1e3).toLocaleString()),1)):L("",!0)])),l(F)("pinned")&&l(r).get("pinnedFolders").find(A=>A.path===t.item.path)?(d(),R(l($t),{key:2,class:"vuefinder__item--pinned"})):L("",!0)],46,vc))}}),Fc=["data-row"],da=ee({__name:"FileRow",props:{rowIndex:{},rowHeight:{},view:{},itemsPerRow:{},items:{},showThumbnails:{type:Boolean},showPath:{type:Boolean},isDraggingItem:{type:Function},isSelected:{type:Function},dragNDropEvents:{type:Function},explorerId:{}},emits:["click","dblclick","contextmenu","dragstart","dragend"],setup(t,{emit:e}){const a=t,n=e,i=H(()=>[a.view==="grid"?"vf-explorer-item-grid-row":"vf-explorer-item-list-row","pointer-events-none"]),s=H(()=>({position:"absolute",top:0,left:0,width:"100%",height:`${a.rowHeight}px`,transform:`translateY(${a.rowIndex*a.rowHeight}px)`})),r=H(()=>a.view==="grid"?{gridTemplateColumns:`repeat(${a.itemsPerRow||1}, 1fr)`}:{gridTemplateColumns:"1fr"});return(u,c)=>(d(),v("div",{class:te(i.value),"data-row":t.rowIndex,style:Pe(s.value)},[o("div",{class:te(["grid justify-self-start",{"w-full":t.view==="list"}]),style:Pe(r.value)},[(d(!0),v(ce,null,me(t.items,(p,h)=>(d(),R(Sc,Ae({key:p.path,item:p,view:t.view,"show-thumbnails":t.showThumbnails,"show-path":t.showPath,"is-selected":t.isSelected(p.path),"is-dragging":t.isDraggingItem(p.path),"row-index":t.rowIndex,"col-index":h,"explorer-id":t.explorerId},Ne(t.dragNDropEvents(p)),{onClick:c[0]||(c[0]=y=>n("click",y)),onDblclick:c[1]||(c[1]=y=>n("dblclick",y)),onContextmenu:c[2]||(c[2]=y=>n("contextmenu",y)),onDragstart:c[3]||(c[3]=y=>n("dragstart",y)),onDragend:c[4]||(c[4]=y=>n("dragend",y))}),{icon:oe(y=>[Ce(u.$slots,"icon",Ae({ref_for:!0},y))]),_:3},16,["item","view","show-thumbnails","show-path","is-selected","is-dragging","row-index","col-index","explorer-id"]))),128))],6)],14,Fc))}}),Mc={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function Ec(t,e){return d(),v("svg",Mc,[...e[0]||(e[0]=[o("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 0 1 1.414 0L10 10.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 0-1.414","clip-rule":"evenodd"},null,-1)])])}const Tc={render:Ec},Dc={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function Ic(t,e){return d(),v("svg",Dc,[...e[0]||(e[0]=[o("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 0 1-1.414 0L10 9.414l-3.293 3.293a1 1 0 0 1-1.414-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414","clip-rule":"evenodd"},null,-1)])])}const Ac={render:Ic},Tt=ee({__name:"SortIcon",props:{direction:{}},setup(t){return(e,a)=>(d(),v("div",null,[t.direction==="asc"?(d(),R(l(Tc),{key:0,class:"vuefinder__explorer__sort-icon"})):L("",!0),t.direction==="desc"?(d(),R(l(Ac),{key:1,class:"vuefinder__explorer__sort-icon"})):L("",!0)]))}}),Pc={class:"vuefinder__explorer__header"},Oc=ee({__name:"ExplorerHeader",setup(t){const e=Z(),a=e.fs,{t:n}=e.i18n,i=Y(a.sort);return(s,r)=>(d(),v("div",Pc,[o("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--name vf-sort-button",onClick:r[0]||(r[0]=u=>l(a).toggleSort("basename"))},[ue(w(l(n)("Name"))+" ",1),pe(N(Tt,{direction:l(i).order},null,8,["direction"]),[[$e,l(i).active&&l(i).column==="basename"]])]),o("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--size vf-sort-button",onClick:r[1]||(r[1]=u=>l(a).toggleSort("file_size"))},[ue(w(l(n)("Size"))+" ",1),pe(N(Tt,{direction:l(i).order},null,8,["direction"]),[[$e,l(i).active&&l(i).column==="file_size"]])]),o("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--date vf-sort-button",onClick:r[2]||(r[2]=u=>l(a).toggleSort("last_modified"))},[ue(w(l(n)("Date"))+" ",1),pe(N(Tt,{direction:l(i).order},null,8,["direction"]),[[$e,l(i).active&&l(i).column==="last_modified"]])])]))}});function zc(t,e){const{scrollContainer:a,itemWidth:n=100,rowHeight:i,overscan:s=2,containerPadding:r=48,lockItemsPerRow:u}=e,c=t,p=()=>typeof i=="number"?i:i.value,h=()=>n?typeof n=="number"?n:n.value:100,y=()=>r?typeof r=="number"?r:r.value:0,m=P(0),x=P(6),C=P(600);let k=null;const b=H(()=>Math.ceil(c.value.length/x.value)),F=H(()=>b.value*p()),g=H(()=>{const z=p(),K=Math.max(0,Math.floor(m.value/z)-s),A=Math.min(b.value,Math.ceil((m.value+C.value)/z)+s);return{start:K,end:A}}),f=H(()=>{const{start:z,end:K}=g.value;return Array.from({length:K-z},(A,G)=>z+G)}),_=()=>C.value,M=()=>typeof u=="object"?u.value:!1,T=()=>{if(M()){x.value=1;return}if(a.value){const z=y(),K=a.value.clientWidth-z,A=h();A>0&&(x.value=Math.max(Math.floor(K/A),2))}},D=z=>{const K=z.target;m.value=K.scrollTop};ne(()=>c.value.length,()=>{T()}),n&&typeof n!="number"&&ne(n,()=>{T()}),r&&typeof r!="number"&&ne(r,()=>{T()}),i&&typeof i!="number"&&ne(i,()=>{});const I=(z,K)=>{if(!z||!Array.isArray(z))return[];const A=K*x.value;return z.slice(A,A+x.value)},$=(z,K,A,G,q)=>{if(!z||!Array.isArray(z))return[];const ae=[];for(let O=K;O<=A;O++)for(let E=G;E<=q;E++){const S=O*x.value+E;S<z.length&&z[S]&&ae.push(z[S])}return ae},W=z=>({row:Math.floor(z/x.value),col:z%x.value});return ve(async()=>{await ze(),a.value&&(C.value=a.value.clientHeight||600),T(),window.addEventListener("resize",()=>{a.value&&(C.value=a.value.clientHeight||600),T()}),a.value&&"ResizeObserver"in window&&(k=new ResizeObserver(z=>{const K=z[0];K&&(C.value=Math.round(K.contentRect.height)),T()}),k.observe(a.value))}),ke(()=>{window.removeEventListener("resize",T),k&&(k.disconnect(),k=null)}),{scrollTop:m,itemsPerRow:x,totalRows:b,totalHeight:F,visibleRange:g,visibleRows:f,updateItemsPerRow:T,handleScroll:D,getRowItems:I,getItemsInRange:$,getItemPosition:W,getContainerHeight:_}}function Bc(t){const{itemsPerRow:e,totalHeight:a,getItemsInRange:n,getKey:i,selectionObject:s,rowHeight:r,itemWidth:u,osInstance:c}=t,p=()=>typeof u=="number"?u:u.value,h=Math.floor(Math.random()*2**32).toString(),y=Z(),m=y.fs,x=Y(m.selectedKeys),C=Y(m.sortedFiles),k=H(()=>{const E=new Map;return C.value&&C.value.forEach(S=>{E.set(i(S),S)}),E}),b=P(new Set),F=P(!1),g=P(!1),f=E=>E.map(S=>S.getAttribute("data-key")).filter(S=>!!S),_=E=>{E.selection.clearSelection(!0,!0)},M=E=>{if(x.value&&x.value.size>0){const S=document.querySelectorAll(`.file-item-${h}[data-key]`),B=new Map;S.forEach(Q=>{const se=Q.getAttribute("data-key");se&&B.set(se,Q)});const V=[];x.value.forEach(Q=>{const se=B.get(Q);se&&T(Q)&&V.push(se)}),V.forEach(Q=>{E.selection.select(Q,!0)})}},T=E=>{const S=k.value.get(E);if(!S)return!1;const B=y.selectionFilterType,V=y.selectionFilterMimeIncludes;return B==="files"&&S.type==="dir"||B==="dirs"&&S.type==="file"?!1:V&&Array.isArray(V)&&V.length>0?S.type==="dir"?!0:S.mime_type?V.some(Q=>S.mime_type?.startsWith(Q)):!1:!0},D=E=>{if(y.selectionMode==="single")return!1;F.value=!1,!E.event?.metaKey&&!E.event?.ctrlKey&&(g.value=!0),E.selection.resolveSelectables(),_(E),M(E)},I=P(0),$=({event:E,selection:S})=>{I.value=(s.value?.getAreaLocation().y1??0)-(y.root.getBoundingClientRect().top??0);const B=document.querySelector(".selection-area-container");if(B&&(B.dataset.theme=y.theme.current),y.selectionMode==="single")return;const V=E;V&&"type"in V&&V.type==="touchend"&&V.preventDefault();const Q=E;!Q?.ctrlKey&&!Q?.metaKey&&(m.clearSelection(),S.clearSelection(!0,!0)),b.value.clear()},W=E=>{if(y.selectionMode==="single")return;const S=f(E.store.changed.added),B=f(E.store.changed.removed);g.value=!1,F.value=!0,S.forEach(V=>{x.value&&!x.value.has(V)&&T(V)&&(b.value.add(V),m.select(V,y.selectionMode||"multiple"))}),B.forEach(V=>{document.querySelector(`[data-key="${V}"]`)&&k.value.has(V)&&b.value.delete(V),m.deselect(V)}),E.selection.resolveSelectables(),M(E)},z=()=>{b.value.clear()},K=E=>{if(!E.event)return;const S=document.querySelector(".scroller-"+h);if(!S)return;const B=S.getBoundingClientRect(),V=B.left,Q=B.top;let se=S.scrollTop;if(c?.value){const{viewport:Ve}=c.value.elements();Ve&&(se=Ve.scrollTop)}const fe=s.value?.getAreaLocation();if(!fe)return;const xe=Math.min(fe.x1,fe.x2),we=se+Math.min(fe.y1,fe.y2),Ge=Math.max(fe.x1,fe.x2),Ke=se+Math.max(fe.y1,fe.y2),ye=4,J=p();let re=Math.floor((xe-V-ye)/J),de=Math.floor((Ge-V-ye)/J);const U=xe-V-ye-re*J,j=Ge-V-ye-de*J;U>J-ye&&(re=re+1),j<ye&&(de=de-1);const X=Math.max(0,re),le=Math.min(e.value-1,de);let Se=Math.floor((we-Q-ye)/r.value),he=Math.floor((Ke-Q-ye)/r.value);const Ye=we-Q-ye-Se*r.value,Ue=Ke-Q-ye-he*r.value,Le=Math.floor((a.value-ye)/r.value);Ye>r.value-ye&&(Se=Se+1),Ue<ye&&(he=he-1);const Ct=Math.max(0,Se),Ha=Math.min(he,Le),ja=n(C.value,Ct,Ha,X,le),Ka=document.querySelectorAll(`.file-item-${h}[data-key]`),Wt=new Map;Ka.forEach(Ve=>{const Ze=Ve.getAttribute("data-key");Ze&&Wt.set(Ze,Ve)});const St=[];if(ja.forEach(Ve=>{const Ze=i(Ve);Wt.get(Ze)||St.push(Ze)}),St.length>0){const Ve=y.selectionMode||"multiple";m.selectMultiple(St,Ve)}},A=E=>{K(E),_(E),M(E),m.setSelectedCount(x.value?.size||0),F.value=!1},G=()=>{let E=[".scroller-"+h];if(c?.value){const{viewport:S}=c.value.elements();S&&(E=S)}s.value=new ol({selectables:[".file-item-"+h+":not(.vf-explorer-item--unselectable)"],boundaries:E,selectionContainerClass:"selection-area-container",behaviour:{overlap:"invert",intersect:"touch",startThreshold:0,triggers:[0],scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:0,y:10}}},features:{touch:!0,range:!0,deselectOnBlur:!0,singleTap:{allow:!1,intersect:"native"}}}),s.value.on("beforestart",D),s.value.on("start",$),s.value.on("move",W),s.value.on("stop",A)},q=()=>{s.value&&(s.value.destroy(),s.value=null)},ae=()=>{s.value&&(Array.from(x.value??new Set).forEach(E=>{T(E)||m.deselect(E)}),q(),G())},O=E=>{g.value&&(s.value?.clearSelection(),z(),g.value=!1);const S=E;!b.value.size&&!g.value&&!S?.ctrlKey&&!S?.metaKey&&(m.clearSelection(),s.value?.clearSelection())};return ve(()=>{const E=S=>{!S.buttons&&F.value&&(F.value=!1)};document.addEventListener("dragleave",E),ke(()=>{document.removeEventListener("dragleave",E)})}),{explorerId:h,isDragging:F,initializeSelectionArea:G,updateSelectionArea:ae,handleContentClick:O}}function Lc(t){const e=a=>{if(!a)return{typeAllowed:!1,mimeAllowed:!1};const n=t.selectionFilterType,i=t.selectionFilterMimeIncludes,s=!n||n==="both"||n==="files"&&a.type==="file"||n==="dirs"&&a.type==="dir";let r=!0;return i&&Array.isArray(i)&&i.length>0&&(a.type==="dir"?r=!0:a.mime_type?r=i.some(u=>a.mime_type.startsWith(u)):r=!1),{typeAllowed:s,mimeAllowed:r}};return{isItemSelectable:e,canSelectItem:a=>{const{typeAllowed:n,mimeAllowed:i}=e(a);return n&&i}}}function Vc(t){const e=a=>({item:a,defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}});return{createCancelableEvent:e,openItem:(a,n,i)=>{const s=e(a);if(a.type==="file"&&n){if(t.emitter.emit("vf-file-dclick",s),s.defaultPrevented)return}else if(a.type==="dir"&&i&&(t.emitter.emit("vf-folder-dclick",s),s.defaultPrevented))return;const r=t.contextMenuItems?.find(u=>u.show(t,{items:[a],target:a,searchQuery:""}));r&&r.action(t,[a])}}}function $c(t,e,a,n,i,s,r){const u=t.fs,{canSelectItem:c}=Lc(t),{openItem:p}=Vc(t),h=m=>{const x=m.target?.closest(".file-item-"+e);if(!x)return null;const C=String(x.getAttribute("data-key")),k=a.value?.find(b=>b.path===C);return{key:C,item:k}},y=()=>{const m=n.value;return a.value?.filter(x=>m?.has(x.path))||[]};return{handleItemClick:m=>{const x=h(m);if(!x)return;const{key:C,item:k}=x,b=m;if(!c(k))return;const F=t.selectionMode||"multiple";!b?.ctrlKey&&!b?.metaKey&&(m.type!=="touchstart"||!u.isSelected(C))&&(u.clearSelection(),i.value?.clearSelection(!0,!0)),i.value?.resolveSelectables(),m.type==="touchstart"&&u.isSelected(C)?u.select(C,F):u.toggleSelect(C,F),u.setSelectedCount(n.value?.size||0)},handleItemDblClick:m=>{const x=h(m);if(!x)return;const{item:C}=x;c(C)&&C&&p(C,s,r)},handleItemContextMenu:m=>{m.preventDefault(),m.stopPropagation();const x=h(m);if(!x)return;const{key:C,item:k}=x;c(k)&&(n.value?.has(C)||(u.clearSelection(),u.select(C)),t.emitter.emit("vf-contextmenu-show",{event:m,items:y(),target:k}))},handleContentContextMenu:m=>{m.preventDefault(),t.emitter.emit("vf-contextmenu-show",{event:m,items:y()})},getSelectedItems:y}}function Uc(t,e){const a=P(null);return ve(()=>{if(at.plugin([ll]),t.value){const n=at(t.value,{scrollbars:{theme:"vf-scrollbars-theme"}},{initialized:i=>{a.value=i;const{viewport:s}=i.elements();s&&s.addEventListener("scroll",e)},updated:i=>{const{viewport:s}=i.elements()}});a.value=n}}),ke(()=>{if(a.value){const{viewport:n}=a.value.elements();n&&n.removeEventListener("scroll",e),a.value.destroy(),a.value=null}}),{osInstance:a}}function Rc(t,e){const a=P(null);return ve(()=>{t.value&&(a.value=new _a({elements_selector:".lazy",container:t.value})),e?.emitter&&e.emitter.on("vf-refresh-thumbnails",()=>{a.value&&a.value.update()})}),Wa(()=>{a.value&&a.value.update()}),ke(()=>{a.value&&(a.value.destroy(),a.value=null)}),{vfLazyLoad:a}}const Nc={class:"vuefinder__explorer__container"},Hc={key:0,class:"vuefinder__linear-loader"},jc=ee({__name:"Explorer",props:{onFileDclick:{type:Function},onFolderDclick:{type:Function}},setup(t){const e=t,a=Z(),n=ct(a,["vuefinder__drag-over"]),i=We("dragImage"),s=va(null),r=We("scrollContainer"),u=We("scrollContent"),c=a.fs,p=a.config,h=Y(p.state),y=Y(c.sortedFiles),m=Y(c.selectedKeys),x=Y(c.loading),C=J=>m.value?.has(J)??!1,k=H(()=>{if(h.value?.view==="grid"){const de=h.value?.gridItemHeight??80,U=h.value?.gridItemGap??8;return de+U*2}const J=h.value?.listItemHeight??32,re=h.value?.listItemGap??2;return J+re*2}),b=H(()=>{if(h.value?.view==="grid"){const J=h.value?.gridItemWidth??96,re=h.value?.gridItemGap??8;return J+re*2}return 104}),F=H(()=>h.value?.view==="grid"?(h.value?.gridItemGap??8)*2:0),{t:g}=a.i18n,{itemsPerRow:f,totalHeight:_,visibleRows:M,handleScroll:T,getRowItems:D,getItemsInRange:I,updateItemsPerRow:$}=zc(H(()=>y.value??[]),{scrollContainer:r,itemWidth:b,rowHeight:k,overscan:2,containerPadding:F,lockItemsPerRow:H(()=>h.value.view==="list")}),{osInstance:W}=Uc(r,T),{explorerId:z,isDragging:K,initializeSelectionArea:A,updateSelectionArea:G,handleContentClick:q}=Bc({itemsPerRow:f,totalHeight:_,getItemsInRange:I,getKey:J=>J.path,selectionObject:s,rowHeight:k,itemWidth:b,osInstance:W}),ae=P(null),O=J=>{if(!J||!ae.value)return!1;const re=m.value?.has(ae.value)??!1;return K.value&&(re?m.value?.has(J)??!1:J===ae.value)};ne(()=>p.get("view"),J=>{J==="list"?f.value=1:$()},{immediate:!0}),ne(f,J=>{p.get("view")==="list"&&J!==1&&(f.value=1)});const E=J=>y.value?.[J];Rc(r,a);const{handleItemClick:S,handleItemDblClick:B,handleItemContextMenu:V,handleContentContextMenu:Q}=$c(a,z,y,m,s,e.onFileDclick,e.onFolderDclick);ve(()=>{const J=()=>{s.value||A(),s.value&&s.value.on("beforestart",({event:re})=>{const de=re?.target===u.value;if(!re?.metaKey&&!re?.ctrlKey&&!re?.altKey&&!de)return!1})};if(W.value)J();else{const re=setInterval(()=>{W.value&&(clearInterval(re),J())},50);setTimeout(()=>{clearInterval(re),s.value||J()},500)}ne(()=>[a.selectionFilterType,a.selectionFilterMimeIncludes],G,{deep:!0})});const se=J=>{if(!(a.features?.move??!1)||J.altKey||J.ctrlKey||J.metaKey)return J.preventDefault(),!1;K.value=!0;const re=J.target?.closest(".file-item-"+z);if(ae.value=re?String(re.dataset.key):null,J.dataTransfer&&ae.value){J.dataTransfer.setDragImage(i.value,0,15),J.dataTransfer.effectAllowed="all",J.dataTransfer.dropEffect="copy";const de=m.value?.has(ae.value)?Array.from(m.value):[ae.value];J.dataTransfer.setData("items",JSON.stringify(de)),c.setDraggedItem(ae.value)}},fe=()=>{ae.value=null};let xe=null,we=null;const Ge=J=>{J.target?.closest(".file-item-"+z)||(we=J,xe&&clearTimeout(xe),xe=setTimeout(()=>{we&&(we.cancelable&&we.preventDefault(),we.stopPropagation(),Q(we)),we=null,xe=null},500))},Ke=J=>{xe&&(clearTimeout(xe),xe=null),we=null},ye=J=>{if(!we)return;const re=we.touches[0]||we.changedTouches[0],de=J.touches[0]||J.changedTouches[0];if(re&&de){const U=Math.abs(de.clientX-re.clientX),j=Math.abs(de.clientY-re.clientY);(U>15||j>15)&&(xe&&(clearTimeout(xe),xe=null),we=null)}};return(J,re)=>(d(),v("div",Nc,[l(h).view==="list"?(d(),R(Oc,{key:0})):L("",!0),o("div",{ref_key:"scrollContainer",ref:r,class:te(["vuefinder__explorer__selector-area","scroller-"+l(z)])},[l(p).get("loadingIndicator")==="linear"&&l(x)?(d(),v("div",Hc)):L("",!0),o("div",{ref_key:"scrollContent",ref:u,class:"scrollContent vuefinder__explorer__scroll-content",style:Pe({height:`${l(_)}px`,position:"relative",width:"100%"}),onContextmenu:re[0]||(re[0]=ie((...de)=>l(Q)&&l(Q)(...de),["self","prevent"])),onClick:re[1]||(re[1]=ie((...de)=>l(q)&&l(q)(...de),["self"])),onTouchstartCapture:ie(Ge,["self"]),onTouchendCapture:ie(Ke,["self"]),onTouchmoveCapture:ie(ye,["self"]),onTouchcancelCapture:ie(Ke,["self"])},[o("div",{ref_key:"dragImage",ref:i,class:"vuefinder__explorer__drag-item"},[N(sc,{count:ae.value&&l(m).has(ae.value)?l(m).size:1},null,8,["count"])],512),l(h).view==="grid"?(d(!0),v(ce,{key:0},me(l(M),de=>(d(),R(da,{key:de,"row-index":de,"row-height":k.value,view:"grid","items-per-row":l(f),items:l(D)(l(y),de),"show-thumbnails":l(h).showThumbnails,"is-dragging-item":O,"is-selected":C,"drag-n-drop-events":U=>l(n).events(U),"explorer-id":l(z),onClick:l(S),onDblclick:l(B),onContextmenu:l(V),onDragstart:se,onDragend:fe},{icon:oe(U=>[Ce(J.$slots,"icon",Ae({ref_for:!0},U))]),_:3},8,["row-index","row-height","items-per-row","items","show-thumbnails","drag-n-drop-events","explorer-id","onClick","onDblclick","onContextmenu"]))),128)):(d(!0),v(ce,{key:1},me(l(M),de=>(d(),R(da,{key:de,"row-index":de,"row-height":k.value,view:"list",items:E(de)?[E(de)]:[],"is-dragging-item":O,"is-selected":C,"drag-n-drop-events":U=>l(n).events(U),"explorer-id":l(z),onClick:l(S),onDblclick:l(B),onContextmenu:l(V),onDragstart:se,onDragend:fe},{icon:oe(U=>[Ce(J.$slots,"icon",Ae({ref_for:!0},U))]),_:3},8,["row-index","row-height","items","drag-n-drop-events","explorer-id","onClick","onDblclick","onContextmenu"]))),128))],36)],2)]))}}),Kc=["href","download"],Yc=["onClick"],qc=ee({__name:"ContextMenu",setup(t){const e=Z(),a=P(null),n=P([]);let i=null,s=null,r=null,u=[],c=null;const p=_t({active:!1,items:[],positions:{}});e.emitter.on("vf-context-selected",x=>{n.value=x});const h=x=>x.link(e,n.value),y=x=>{e.emitter.emit("vf-contextmenu-hide"),x.action(e,n.value)};e.emitter.on("vf-contextmenu-show",x=>{const{event:C,items:k,target:b=null}=x||{};p.items=(e.contextMenuItems||[]).filter(F=>F.show(e,{items:k,target:b})).sort((F,g)=>{const f=F.order??1/0,_=g.order??1/0;return f-_}),b?k.length>1&&k.some(F=>F.path===b.path)?e.emitter.emit("vf-context-selected",k):e.emitter.emit("vf-context-selected",[b]):e.emitter.emit("vf-context-selected",[]),m(C)}),e.emitter.on("vf-contextmenu-hide",()=>{p.active=!1,i&&(i(),i=null),r&&(u.forEach(x=>{x===window?window.removeEventListener("scroll",r,!0):x.removeEventListener("scroll",r,!0)}),r=null,u=[]),c&&(document.removeEventListener("mousedown",c,!0),document.removeEventListener("touchstart",c,!0),c=null),s=null,p.positions={}});const m=async x=>{i&&(i(),i=null);const C=(_=>{if("clientX"in _&&"clientY"in _)return{x:_.clientX,y:_.clientY};const M="touches"in _&&_.touches[0]||"changedTouches"in _&&_.changedTouches[0];return M?{x:M.clientX,y:M.clientY}:{x:0,y:0}})(x);if(s={getBoundingClientRect:()=>({width:0,height:0,x:C.x,y:C.y,top:C.y,left:C.x,right:C.x,bottom:C.y})},p.positions={position:"fixed",zIndex:"10001",opacity:"0",visibility:"hidden",left:"-9999px",top:"-9999px"},p.active=!0,await ze(),!a.value||!s)return;await new Promise(_=>{requestAnimationFrame(()=>{requestAnimationFrame(_)})});const k=[lt(8),ot({padding:16,fallbackPlacements:["left-start","right-end","left-end","top-start","bottom-start"]}),nt({padding:16})];let b=0,F=0;try{const _=await Je(s,a.value,{placement:"right-start",strategy:"fixed",middleware:k});b=_.x,F=_.y}catch(_){console.warn("[ContextMenu] Floating UI initial positioning error:",_);return}p.positions={position:"fixed",zIndex:"10001",left:`${b}px`,top:`${F}px`,opacity:"0",visibility:"visible",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"},requestAnimationFrame(()=>{a.value&&(p.positions={...p.positions,opacity:"1",transform:"translateY(0)"})});const g=(_=>{const M=[];let T=_;for(;T&&T!==document.body&&T!==document.documentElement;){const D=window.getComputedStyle(T),I=D.overflow+D.overflowX+D.overflowY;(I.includes("scroll")||I.includes("auto"))&&M.push(T),T=T.parentElement}return M})(a.value);u=[window,...g],r=()=>{p.active&&e.emitter.emit("vf-contextmenu-hide")};const f=r;f&&u.forEach(_=>{_===window?window.addEventListener("scroll",f,!0):_.addEventListener("scroll",f,!0)}),c=_=>{if(!p.active)return;const M=_.target;if(!M||a.value&&a.value.contains(M))return;const T=e.root;T&&T.contains(M)||e.emitter.emit("vf-contextmenu-hide")},setTimeout(()=>{c&&(document.addEventListener("mousedown",c,!0),document.addEventListener("touchstart",c,!0))},100),setTimeout(()=>{if(!(!a.value||!s))try{i=Ot(s,a.value,async()=>{if(!(!s||!a.value))try{const{x:_,y:M}=await Je(s,a.value,{placement:"right-start",strategy:"fixed",middleware:k});p.positions={...p.positions,left:`${_}px`,top:`${M}px`}}catch(_){console.warn("Floating UI positioning error:",_)}})}catch(_){console.warn("Floating UI autoUpdate setup error:",_),i=null}},200)};return ke(()=>{i&&(i(),i=null),r&&(u.forEach(x=>{x===window?window.removeEventListener("scroll",r,!0):x.removeEventListener("scroll",r,!0)}),r=null,u=[]),c&&(document.removeEventListener("mousedown",c,!0),document.removeEventListener("touchstart",c,!0),c=null),s=null}),(x,C)=>pe((d(),v("ul",{ref_key:"contextmenu",ref:a,class:te([{"vuefinder__context-menu--active":p.active,"vuefinder__context-menu--inactive":!p.active},"vuefinder__context-menu"]),style:Pe(p.positions)},[(d(!0),v(ce,null,me(p.items,k=>(d(),v("li",{key:k.title,class:"vuefinder__context-menu__item"},[k.link?(d(),v("a",{key:0,class:"vuefinder__context-menu__link",target:"_blank",href:h(k),download:h(k),onClick:C[0]||(C[0]=b=>l(e).emitter.emit("vf-contextmenu-hide"))},[o("span",null,w(k.title(l(e).i18n)),1)],8,Kc)):(d(),v("div",{key:1,class:"vuefinder__context-menu__action",onClick:b=>y(k)},[o("span",null,w(k.title(l(e).i18n)),1)],8,Yc))]))),128))],6)),[[$e,p.active]])}}),Gc={class:"vuefinder__status-bar__wrapper"},Qc={class:"vuefinder__status-bar__storage"},Wc=["title"],Jc={class:"vuefinder__status-bar__storage-icon"},Xc=["value"],Zc=["value"],ev={class:"vuefinder__status-bar__info space-x-2"},tv={key:0},av={key:1},lv={key:0,class:"vuefinder__status-bar__size"},ov={class:"vuefinder__status-bar__actions"},nv=ee({__name:"Statusbar",setup(t){const e=Z(),{t:a}=e.i18n,n=e.fs,i=Y(n.sortedFiles),s=Y(n.path),r=Y(n.selectedCount),u=Y(n.storages),c=Y(n.selectedItems),p=Y(n.path),h=b=>{const F=b.target.value;e.adapter.open(F+"://")},y=H(()=>!c.value||c.value.length===0?0:c.value.reduce((b,F)=>b+(F.file_size||0),0)),m=H(()=>u.value),x=H(()=>i.value),C=H(()=>r.value||0),k=H(()=>c.value||[]);return(b,F)=>(d(),v("div",Gc,[o("div",Qc,[o("div",{class:"vuefinder__status-bar__storage-container",title:l(a)("Storage")},[o("div",Jc,[N(l(Ut))]),o("select",{name:"vuefinder-media-selector",value:l(s).storage,class:"vuefinder__status-bar__storage-select",tabindex:"-1",onChange:h},[(d(!0),v(ce,null,me(m.value,g=>(d(),v("option",{key:g,value:g},w(g),9,Zc))),128))],40,Xc),F[0]||(F[0]=o("span",{class:"vuefinder__status-bar__storage-caret","aria-hidden":"true"},null,-1))],8,Wc),o("div",ev,[C.value===0?(d(),v("span",tv,w(x.value.length)+" "+w(l(a)("items")),1)):(d(),v("span",av,[ue(w(C.value)+" "+w(l(a)("selected"))+" ",1),y.value?(d(),v("span",lv,w(l(e).filesize(y.value)),1)):L("",!0)]))])]),o("div",ov,[Ce(b.$slots,"actions",{path:l(p).path,count:C.value||0,selected:k.value})])]))}}),iv={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"};function rv(t,e){return d(),v("svg",iv,[...e[0]||(e[0]=[o("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),o("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m3.6 5.2a1 1 0 0 0-1.4.2L12 10.333 9.8 7.4a1 1 0 1 0-1.6 1.2l2.55 3.4-2.55 3.4a1 1 0 1 0 1.6 1.2l2.2-2.933 2.2 2.933a1 1 0 0 0 1.6-1.2L13.25 12l2.55-3.4a1 1 0 0 0-.2-1.4"},null,-1)])])}const sv={render:rv};function Ua(t,e){const a=t.findIndex(n=>n.path===e.path);a>-1?t[a]=e:t.push(e)}const dv={class:"vuefinder__folder-loader-indicator"},uv={key:1,class:"vuefinder__folder-loader-indicator--icon"},Ra=ee({__name:"FolderLoaderIndicator",props:Ja({storage:{},path:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=Z(),n=pa(t,"modelValue"),i=P(!1);ne(()=>n.value,()=>s());const s=async()=>{i.value=!0;try{const r=(await a.adapter.list(e.path)).files.filter(u=>u.type==="dir");Ua(a.treeViewData,{path:e.path,type:"dir",folders:r})}catch(r){Ee(r,"Failed to fetch subfolders")}finally{i.value=!1}};return(r,u)=>(d(),v("div",dv,[i.value?(d(),R(l(xt),{key:0,class:"vuefinder__folder-loader-indicator--loading"})):(d(),v("div",uv,[n.value?(d(),R(l(kt),{key:0,class:"vuefinder__folder-loader-indicator--minus"})):L("",!0),n.value?L("",!0):(d(),R(l(bt),{key:1,class:"vuefinder__folder-loader-indicator--plus"}))]))]))}}),cv={key:0},vv={class:"vuefinder__treesubfolderlist__no-folders"},pv={class:"vuefinder__treesubfolderlist__item-content"},mv=["onClick"],fv=["title","onDblclick","onClick"],_v={class:"vuefinder__treesubfolderlist__item-icon"},hv={class:"vuefinder__treesubfolderlist__subfolder"},gv={key:1,class:"vuefinder__treesubfolderlist__more-note"},wv=ee({__name:"TreeSubfolderList",props:{storage:{},path:{}},setup(t){const e=Z(),a=e.fs,n=ct(e,["vuefinder__drag-over"]),i=P({}),s=e.config,r=Y(s.state),{t:u}=e.i18n,c=Y(a.path),p=t,h=P(null),y=P(50);ve(()=>{p.path===p.storage+"://"&&h.value&&at(h.value,{scrollbars:{theme:"vf-scrollbars-theme"}})});const m=H(()=>{const g=e.treeViewData.find(f=>f.path===p.path)?.folders||[];return g.length>y.value?g.slice(0,y.value):g}),x=H(()=>e.treeViewData.find(g=>g.path===p.path)?.folders?.length||0),C=H(()=>x.value>y.value),k=H(()=>`${p.storage}://`),b=(g,f)=>g===f||g.startsWith(`${f}/`);ne(m,g=>{const f=r.value.expandTreeByDefault&&p.path===k.value,_=r.value.expandedTreePaths||[];g.forEach(M=>{const T=_.some(D=>b(D,M.path));(f||T)&&i.value[M.path]===void 0&&(i.value[M.path]=!0)})},{immediate:!0});const F=()=>{y.value+=50};return(g,f)=>{const _=ma("TreeSubfolderList",!0);return d(),v("ul",{ref_key:"parentSubfolderList",ref:h,class:"vuefinder__treesubfolderlist__container"},[m.value.length?L("",!0):(d(),v("li",cv,[o("div",vv,w(l(u)("No folders")),1)])),(d(!0),v(ce,null,me(m.value,M=>(d(),v("li",{key:M.path,class:"vuefinder__treesubfolderlist__item"},[o("div",pv,[o("div",{class:"vuefinder__treesubfolderlist__item-toggle",onClick:T=>i.value[M.path]=!i.value[M.path]},[N(Ra,{modelValue:i.value[M.path],"onUpdate:modelValue":T=>i.value[M.path]=T,storage:t.storage,path:M.path},null,8,["modelValue","onUpdate:modelValue","storage","path"])],8,mv),o("div",Ae({class:"vuefinder__treesubfolderlist__item-link",title:M.path},Ne(l(n).events({...M,dir:M.path,extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public"}),!0),{onDblclick:T=>i.value[M.path]=!i.value[M.path],onClick:T=>l(e).adapter.open(M.path)}),[o("div",_v,[l(c)?.path===M.path?(d(),R(l(Rt),{key:0,class:"vuefinder__item-icon__folder--open"})):(d(),R(l(Be),{key:1,class:"vuefinder__item-icon__folder"}))]),o("div",{class:te(["vuefinder__treesubfolderlist__item-text",{"vuefinder__treesubfolderlist__item-text--active":l(c).path===M.path}])},w(M.basename),3)],16,fv)]),o("div",hv,[pe(N(_,{storage:p.storage,path:M.path},null,8,["storage","path"]),[[$e,i.value[M.path]]])])]))),128)),C.value?(d(),v("li",gv,[o("div",{class:"vuefinder__treesubfolderlist__load-more",onClick:F},w(l(u)("load more")),1)])):L("",!0)],512)}}}),yv=ee({__name:"TreeStorageItem",props:{storage:{}},setup(t){const e=Z(),a=e.fs,n=e.config,i=t,s=Y(n.state),r=H(()=>{const x=s.value.expandedTreePaths||[],C=`${i.storage}://`;return x.some(k=>k===C||k.startsWith(`${C}`))}),u=P(s.value.expandTreeByDefault||r.value),c=ct(e,["vuefinder__drag-over"]),p=Y(a.path),h=H(()=>i.storage===p.value?.storage);ne(()=>({expandTreeByDefault:s.value.expandTreeByDefault,hasExpandedPathInStorage:r.value}),x=>{(x.expandTreeByDefault||x.hasExpandedPathInStorage)&&(u.value=!0)});const y={storage:i.storage,path:i.storage+"://",dir:i.storage+"://",type:"dir",basename:i.storage,extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public"};function m(x){x===p.value?.storage?u.value=!u.value:e.adapter.open(x+"://")}return(x,C)=>(d(),v(ce,null,[o("div",{class:"vuefinder__treestorageitem__header",onClick:C[2]||(C[2]=k=>m(t.storage))},[o("div",Ae({class:["vuefinder__treestorageitem__info",h.value?"vuefinder__treestorageitem__info--active":""]},Ne(l(c).events(y),!0)),[o("div",{class:te(["vuefinder__treestorageitem__icon",h.value?"vuefinder__treestorageitem__icon--active":""])},[N(l(Ut))],2),o("div",null,w(t.storage),1)],16),o("div",{class:"vuefinder__treestorageitem__loader",onClick:C[1]||(C[1]=ie(k=>u.value=!u.value,["stop"]))},[N(Ra,{modelValue:u.value,"onUpdate:modelValue":C[0]||(C[0]=k=>u.value=k),storage:t.storage,path:t.storage+"://"},null,8,["modelValue","storage","path"])])]),pe(N(wv,{storage:t.storage,path:t.storage+"://",class:"vuefinder__treestorageitem__subfolder"},null,8,["storage","path"]),[[$e,u.value]])],64))}}),bv={class:"vuefinder__folder-indicator"},kv={class:"vuefinder__folder-indicator--icon"},xv=ee({__name:"FolderIndicator",props:{modelValue:{type:Boolean},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=pa(t,"modelValue");return(a,n)=>(d(),v("div",bv,[o("div",kv,[e.value?(d(),R(l(kt),{key:0,class:"vuefinder__folder-indicator--minus"})):L("",!0),e.value?L("",!0):(d(),R(l(bt),{key:1,class:"vuefinder__folder-indicator--plus"}))])]))}}),Cv={key:0,class:"vuefinder__treeview__header"},Sv={class:"vuefinder__treeview__pinned-label"},Fv={class:"vuefinder__treeview__pin-text text-nowrap"},Mv={key:0,class:"vuefinder__treeview__pinned-list"},Ev=["onClick"],Tv=["title"],Dv=["onClick"],Iv={key:0},Av={class:"vuefinder__treeview__no-pinned"},Pv=ee({__name:"TreeView",setup(t){const e=Z(),{enabled:a}=Oe(),{t:n}=e.i18n,{getStore:i,setStore:s}=e.storage,r=e.fs,u=e.config,c=Y(u.state),p=Y(r.sortedFiles),h=Y(r.storages),y=H(()=>h.value||[]),m=Y(r.path),x=ct(e,["vuefinder__drag-over"]),C=P(190),k=P(i("pinned-folders-opened",!0));ne(k,f=>s("pinned-folders-opened",f));const b=f=>{const _=u.get("pinnedFolders");u.set("pinnedFolders",_.filter(M=>M.path!==f.path))},F=f=>{const _=f.clientX,M=f.target.parentElement;if(!M)return;const T=M.getBoundingClientRect().width;M.classList.remove("transition-[width]"),M.classList.add("transition-none");const D=$=>{C.value=T+$.clientX-_,C.value<50&&(C.value=0,u.set("showTreeView",!1)),C.value>50&&u.set("showTreeView",!0)},I=()=>{const $=M.getBoundingClientRect();C.value=$.width,M.classList.add("transition-[width]"),M.classList.remove("transition-none"),window.removeEventListener("mousemove",D),window.removeEventListener("mouseup",I)};window.addEventListener("mousemove",D),window.addEventListener("mouseup",I)},g=P(null);return ve(()=>{g.value&&at(g.value,{overflow:{x:"hidden"},scrollbars:{theme:"vf-scrollbars-theme"}})}),ne(p,f=>{const _=f.filter(M=>M.type==="dir");Ua(e.treeViewData,{path:m.value.path||"",folders:_.map(M=>({storage:M.storage,path:M.path,basename:M.basename,type:"dir"}))})}),(f,_)=>(d(),v(ce,null,[o("div",{class:te(["vuefinder__treeview__overlay",l(c).showTreeView?"vuefinder__treeview__backdrop":"hidden"]),onClick:_[0]||(_[0]=M=>l(u).toggle("showTreeView"))},null,2),o("div",{style:Pe(l(c).showTreeView?"min-width:100px;max-width:75%; width: "+C.value+"px":"width: 0"),class:"vuefinder__treeview__container"},[o("div",{ref_key:"treeViewScrollElement",ref:g,class:"vuefinder__treeview__scroll"},[l(a)("pinned")?(d(),v("div",Cv,[o("div",{class:"vuefinder__treeview__pinned-toggle",onClick:_[2]||(_[2]=M=>k.value=!k.value)},[o("div",Sv,[N(l($t),{class:"vuefinder__treeview__pin-icon"}),o("div",Fv,w(l(n)("Pinned Folders")),1)]),N(xv,{modelValue:k.value,"onUpdate:modelValue":_[1]||(_[1]=M=>k.value=M)},null,8,["modelValue"])]),k.value?(d(),v("ul",Mv,[(d(!0),v(ce,null,me(l(c).pinnedFolders,M=>(d(),v("li",{key:M.path,class:"vuefinder__treeview__pinned-item"},[o("div",Ae({class:"vuefinder__treeview__pinned-folder"},Ne(l(x).events(M),!0),{onClick:T=>l(e).adapter.open(M.path)}),[l(m).path!==M.path?(d(),R(l(Be),{key:0,class:"vuefinder__treeview__folder-icon vuefinder__item-icon__folder"})):L("",!0),l(m).path===M.path?(d(),R(l(Rt),{key:1,class:"vuefinder__item-icon__folder--open vuefinder__treeview__open-folder-icon"})):L("",!0),o("div",{title:M.path,class:te(["vuefinder__treeview__folder-name",{"vuefinder__treeview__folder-name--active":l(m).path===M.path}])},w(M.basename),11,Tv)],16,Ev),o("div",{class:"vuefinder__treeview__remove-folder",onClick:T=>b(M)},[N(l(sv),{class:"vuefinder__treeview__remove-icon"})],8,Dv)]))),128)),l(c).pinnedFolders.length?L("",!0):(d(),v("li",Iv,[o("div",Av,w(l(n)("No folders pinned")),1)]))])):L("",!0)])):L("",!0),(d(!0),v(ce,null,me(y.value,M=>(d(),v("div",{key:M,class:"vuefinder__treeview__storage"},[N(yv,{storage:M},null,8,["storage"])]))),128))],512),o("div",{class:"vuefinder__treeview__resize-handle",onMousedown:F},null,32)],4)],64))}}),be={new_folder:"new_folder",selectAll:"selectAll",pinFolder:"pinFolder",unpinFolder:"unpinFolder",delete:"delete",refresh:"refresh",preview:"preview",open:"open",openDir:"openDir",download:"download",archive:"archive",unarchive:"unarchive",rename:"rename",move:"move",copy:"copy",paste:"paste"};function Ov(t){return t.items.length>1&&t.items.some(e=>e.path===t.target?.path)?"many":t.target?"one":"none"}function _e(t){const e=Object.assign({needsSearchQuery:!1},t);return(a,n)=>!(e.needsSearchQuery!==!!n.searchQuery||e.target!==void 0&&e.target!==Ov(n)||e.targetType!==void 0&&e.targetType!==n.target?.type||e.mimeType!==void 0&&e.mimeType!==n.target?.mime_type||e.feature!==void 0&&!(a.features[e.feature]??!1))}function et(...t){return(e,a)=>t.some(n=>n(e,a))}function tt(...t){return(e,a)=>t.every(n=>n(e,a))}const Na=[{id:be.openDir,title:({t})=>t("Open containing folder"),action:(t,e)=>{const a=e[0];a&&t.adapter.open(a.dir)},show:_e({target:"one",needsSearchQuery:!0}),order:10},{id:be.refresh,title:({t})=>t("Refresh"),action:t=>{const e=t.fs;t.adapter.invalidateListQuery(e.path.get().path),t.adapter.open(e.path.get().path)},show:et(_e({target:"none"}),_e({target:"many"})),order:20},{id:be.selectAll,title:({t})=>t("Select All"),action:t=>{t.fs.selectAll(t.selectionMode||"multiple")},show:(t,e)=>t.selectionMode==="multiple"&&_e({target:"none"})(t,e),order:30},{id:be.new_folder,title:({t})=>t("New Folder"),action:t=>t.modal.open(Yt),show:_e({target:"none",feature:"newfolder"}),order:40},{id:be.open,title:({t})=>t("Open"),action:(t,e)=>{e[0]&&t.adapter.open(e[0].path)},show:_e({target:"one",targetType:"dir"}),order:50},{id:be.pinFolder,title:({t})=>t("Pin Folder"),action:(t,e)=>{const a=t.config,n=a.get("pinnedFolders"),i=n.concat(e.filter(s=>n.findIndex(r=>r.path===s.path)===-1));a.set("pinnedFolders",i)},show:tt(_e({target:"one",targetType:"dir",feature:"pinned"}),(t,e)=>t.config.get("pinnedFolders").findIndex(a=>a.path===e.target?.path)===-1),order:60},{id:be.unpinFolder,title:({t})=>t("Unpin Folder"),action:(t,e)=>{const a=t.config,n=a.get("pinnedFolders");a.set("pinnedFolders",n.filter(i=>!e.find(s=>s.path===i.path)))},show:tt(_e({target:"one",targetType:"dir",feature:"pinned"}),(t,e)=>t.config.get("pinnedFolders").findIndex(a=>a.path===e.target?.path)!==-1),order:70},{id:be.preview,title:({t})=>t("Preview"),action:(t,e)=>t.modal.open(ut,{storage:e[0]?.storage,item:e[0]}),show:tt(_e({target:"one",feature:"preview"}),(t,e)=>e.target?.type!=="dir"),order:80},{id:be.download,link:(t,e)=>{if(e[0])return t.adapter.getDownloadUrl(e[0])},title:({t})=>t("Download"),action:()=>{},show:tt(_e({target:"one",feature:"download"}),(t,e)=>e.target?.type!=="dir"),order:90},{id:be.rename,title:({t})=>t("Rename"),action:(t,e)=>t.modal.open(yt,{items:e}),show:_e({target:"one",feature:"rename"}),order:100},{id:be.move,title:({t})=>t("Move files"),action:(t,e)=>{const a=t.fs,n={storage:a.path.get().storage||"",path:a.path.get().path||"",type:"dir"};t.modal.open(Xe,{items:{from:e,to:n}})},show:et(_e({target:"one",feature:"move"}),_e({target:"many",feature:"move"})),order:110},{id:be.copy,title:({t})=>t("Copy"),action:(t,e)=>{e.length>0&&t.fs.setClipboard("copy",new Set(e.map(a=>a.path)))},show:et(_e({target:"one",feature:"copy"}),_e({target:"many",feature:"copy"})),order:120},{id:be.paste,title:({t})=>t("Paste"),action:(t,e)=>{const a=t.fs.getClipboard();if(a?.items?.size>0){const n=t.fs.path.get();let i=n.path,s=n.storage;e.length===1&&e[0]?.type==="dir"&&(i=e[0].path,s=e[0].storage);const r={storage:s||"",path:i||"",type:"dir"};t.modal.open(a.type==="cut"?Xe:Ht,{items:{from:Array.from(a.items),to:r}})}},show:(t,e)=>t.features?.copy??!1?t.fs.getClipboard()?.items?.size>0:!1,order:130},{id:be.archive,title:({t})=>t("Archive"),action:(t,e)=>t.modal.open(Qt,{items:e}),show:et(_e({target:"many",feature:"archive"}),tt(_e({target:"one",feature:"archive"}),(t,e)=>e.target?.mime_type!=="application/zip")),order:140},{id:be.unarchive,title:({t})=>t("Unarchive"),action:(t,e)=>t.modal.open(Gt,{items:e}),show:_e({target:"one",feature:"unarchive",mimeType:"application/zip"}),order:150},{id:be.delete,title:({t})=>t("Delete"),action:(t,e)=>{t.modal.open(wt,{items:e})},show:et(_e({feature:"delete",target:"one"}),_e({feature:"delete",target:"many"})),order:160}],zv=["data-theme"],Bv={key:0,class:"vuefinder__external-drop-overlay vuefinder__external-drop-overlay--relative"},Lv={class:"vuefinder__external-drop-message"},Vv={class:"vuefinder__main__content"},$v=ee({__name:"VueFinderView",props:{id:{},driver:{},config:{},features:{},debug:{type:Boolean},locale:{},contextMenuItems:{},selectionMode:{},selectionFilterType:{},selectionFilterMimeIncludes:{},onError:{type:Function},onSelect:{type:Function},onPathChange:{type:Function},onUploadComplete:{type:Function},onDeleteComplete:{type:Function},onNotify:{type:Function},onReady:{type:Function},onFileDclick:{type:Function},onFolderDclick:{type:Function},customUploader:{type:Function}},emits:["select","path-change","upload-complete","delete-complete","notify","error","ready","file-dclick","folder-dclick","update:locale"],setup(t,{emit:e}){const a=e,n=t,i=Z(),s=We("root"),r=i.config;ne(()=>n.features,g=>{const f=ga(g);Object.keys(i.features).forEach(_=>{delete i.features[_]}),Object.assign(i.features,f)},{deep:!0});const u=i.fs,c=Y(i.i18n.localeAtom),p=Y(r.state),h=H(()=>{const g=p.value;return{"--vf-grid-item-width":`${g.gridItemWidth}px`,"--vf-grid-item-height":`${g.gridItemHeight}px`,"--vf-grid-item-gap":`${g.gridItemGap}px`,"--vf-grid-icon-size":`${g.gridIconSize}px`,"--vf-list-item-height":`${g.listItemHeight}px`,"--vf-list-item-gap":`${g.listItemGap}px`,"--vf-list-icon-size":`${g.listIconSize}px`}});Nr();const{isDraggingExternal:y,handleDragEnter:m,handleDragOver:x,handleDragLeave:C,handleDrop:k}=Hr();function b(g){u.setPath(g.dirname),r.get("persist")&&r.set("path",g.dirname),u.setReadOnly(g.read_only??!1),i.modal.close(),u.setFiles(g.files),u.clearSelection(),u.setSelectedCount(0),u.setStorages(g.storages)}i.adapter.onBeforeOpen=()=>{u.setLoading(!0)},i.adapter.onAfterOpen=g=>{b(g),u.setLoading(!1)},i.emitter.on("vf-upload-complete",g=>{a("upload-complete",g)}),i.emitter.on("vf-delete-complete",g=>{a("delete-complete",g)}),i.emitter.on("vf-notify",g=>{a("notify",g)}),i.emitter.on("vf-file-dclick",g=>{a("file-dclick",g)}),i.emitter.on("vf-folder-dclick",g=>{a("folder-dclick",g)}),ne(()=>n.config?.theme,g=>{g&&r.set("theme",l(g))},{immediate:!0}),ne(c,(g,f)=>{g!==f&&a("update:locale",String(g))},{immediate:!1}),ve(()=>{i.root=s.value,ne(()=>r.get("path"),f=>{i.adapter.open(f)});const g=r.get("persist")?r.get("path"):r.get("initialPath")??"";u.setPath(g),i.adapter.open(g),u.path.listen(f=>{a("path-change",f.path)}),u.selectedItems.listen(f=>{a("select",f)}),a("ready")});const F=async g=>{const f=await k(g);f.length>0&&(i.modal.open(qt),setTimeout(()=>{i.emitter.emit("vf-external-files-dropped",f.map(_=>_.file))},100))};return(g,f)=>(d(),v("div",{ref_key:"root",ref:s,tabindex:"0",class:te(["vuefinder vuefinder__main vuefinder__themer",{"vuefinder--dragging-external":l(y)}]),"data-theme":l(i).theme.current,style:Pe(h.value),onDragenter:f[2]||(f[2]=(..._)=>l(m)&&l(m)(..._)),onDragover:f[3]||(f[3]=(..._)=>l(x)&&l(x)(..._)),onDragleave:f[4]||(f[4]=(..._)=>l(C)&&l(C)(..._)),onDrop:F},[o("div",{class:te(l(i).theme.current),style:{height:"100%",width:"100%"}},[o("div",{class:te([l(p)?.fullScreen?"vuefinder__main__fixed":"vuefinder__main__relative","vuefinder__main__container"]),onMousedown:f[0]||(f[0]=_=>l(i).emitter.emit("vf-contextmenu-hide")),onTouchstart:f[1]||(f[1]=_=>l(i).emitter.emit("vf-contextmenu-hide"))},[l(y)?(d(),v("div",Bv,[o("div",Lv,w(l(i).i18n.t("Drag and drop the files/folders to here.")),1)])):L("",!0),l(p).showMenuBar?(d(),R(pd,{key:1})):L("",!0),l(p).showToolbar?(d(),R(fu,{key:2})):L("",!0),N(lc),o("div",Vv,[N(Pv),N(jc,{"on-file-dclick":n.onFileDclick,"on-folder-dclick":n.onFolderDclick},{icon:oe(_=>[Ce(g.$slots,"icon",He(je(_)))]),_:3},8,["on-file-dclick","on-folder-dclick"])]),N(nv,null,{actions:oe(_=>[Ce(g.$slots,"status-bar",He(je(_)))]),_:3})],34),(d(),R(ht,{to:"body"},[N(qa,{name:"fade"},{default:oe(()=>[l(i).modal.visible?(d(),R(ca(l(i).modal.type),{key:0})):L("",!0)]),_:1})])),N(qc,{items:l(Na)},null,8,["items"]),l(p).notificationsEnabled?(d(),R(l(el),{key:0,position:l(p).notificationPosition,duration:l(p).notificationDuration,"visible-toasts":l(p).notificationVisibleToasts,"rich-colors":l(p).notificationRichColors},null,8,["position","duration","visible-toasts","rich-colors"])):L("",!0)],2)],46,zv))}}),Uv=ee({__name:"VueFinderProvider",props:{id:{},driver:{},config:{},features:{},debug:{type:Boolean,default:!1},locale:{},contextMenuItems:{default:()=>Na},selectionMode:{default:"multiple"},selectionFilterType:{default:"both"},selectionFilterMimeIncludes:{default:()=>[]},onError:{},onSelect:{},onPathChange:{},onUploadComplete:{},onDeleteComplete:{},onNotify:{},onReady:{},onFileDclick:{},onFolderDclick:{},customUploader:{}},setup(t){const e=t,a=e.id??pt(It);if(!a)throw new Error('VueFinderProvider requires an "id" prop.');const n=Ml(e,pt("VueFinderOptions")||{});return ne(()=>e.config,i=>{if(i){const s={};for(const r in i){const u=l(i[r]);u!==void 0&&(s[r]=u)}n.config.init(s)}},{deep:!0,immediate:!0}),ne(()=>e.locale,i=>{i&&n.i18n.localeAtom&&n.i18n.localeAtom.get()!==i&&n.i18n.localeAtom.set(i)},{immediate:!0}),dl(a,n),Xa(It,a),ua(()=>{ul(a)}),(i,s)=>(d(),R($v,He(je(e)),{icon:oe(r=>[Ce(i.$slots,"icon",He(je(r)))]),"status-bar":oe(r=>[Ce(i.$slots,"status-bar",He(je(r)))]),_:3},16))}});function tp(t){const e=Z(t),a=i=>i||e.fs.path.get().path||"",n=i=>{Array.isArray(i.files)&&e.fs.setFiles(i.files)};return{async refresh(){const i=e.fs.path.get().path||"";e.adapter.invalidateListQuery(i),await e.adapter.open(i)},async open(i){await e.adapter.open(i)},preview(i){const s=(e.fs.files.get()||[]).find(r=>r.path===i);!s||s.type!=="file"||e.modal.open(ut,{storage:s.storage,item:s})},notify(i,s){Qe(e,i,s)},getPath(){return e.fs.path.get().path||""},select(i){const s=new Set((e.fs.files.get()||[]).map(u=>u.path)),r=(i||[]).filter(u=>s.has(u));e.fs.setSelection(r)},selectOne(i){new Set((e.fs.files.get()||[]).map(s=>s.path)).has(i)&&e.fs.setSelection([i])},clearSelection(){e.fs.clearSelection()},getSelectedPaths(){return(e.fs.selectedItems.get()||[]).map(i=>i.path)},async createFolder(i,s){const r=await e.adapter.createFolder({path:a(s),name:i});n(r)},async createFile(i,s){const r=await e.adapter.createFile({path:a(s),name:i});n(r)},async delete(i,s){const r=a(s),u=new Map((e.fs.files.get()||[]).map(h=>[h.path,h])),c=(i||[]).map(h=>u.get(h)).filter(h=>!!h).map(h=>({path:h.path,type:h.type})),p=await e.adapter.delete({path:r,items:c});n(p)},async rename(i,s,r){const u=await e.adapter.rename({path:a(r),item:i,name:s});n(u)},async copy(i,s,r){const u=await e.adapter.copy({path:a(r),sources:i,destination:s});n(u)},async move(i,s,r){const u=await e.adapter.move({path:a(r),sources:i,destination:s});n(u)},getFiles(){return e.fs.files.get()||[]},getStorages(){return e.fs.storages.get()||[]},isLoading(){return e.fs.isLoading()},isReadOnly(){return e.fs.getReadOnly()}}}const ap={install(t,e={}){e.i18n=e.i18n??{};const[a]=Object.keys(e.i18n);e.locale=e.locale??a??"en",t.provide("VueFinderOptions",e),t.component("VueFinder",Uv)}},Rv={"A modern, customizable file manager component built for Vue.":"为 Vue 构建的现代、可自定义的文件管理器组件。","Project Home":"项目主页","If you like it, please follow and ⭐ star on GitHub.":"如果你喜欢,请关注并在 GitHub 上点 ⭐ 星标。",Language:"语言",Create:"创建",Close:"关闭",Cancel:"取消",Save:"保存",Edit:"编辑",Crop:"裁切","New Folder":"新文件夹","New File":"新文件",Rename:"重命名",Delete:"删除",Upload:"上传",Download:"下载",Archive:"压缩",Unarchive:"解压缩",Open:"打开","Open containing folder":"打开对应的文件夹",Refresh:"刷新",Preview:"预览","Toggle Full Screen":"切换到全屏","Change View":"切换视图",Storage:"存储","Go up a directory":"上一级目录",Go:"前往","Enter folder path:":"输入文件夹路径:","Invalid path format. Path must be in format: storage://path/to/folder":"路径格式无效。路径必须为格式: storage://path/to/folder",'Invalid storage. Storage "%s" is not available.':'存储无效。存储 "%s" 不可用。',"Failed to navigate to folder":"导航到文件夹失败","Search anything..":"搜索..",Name:"名称",Size:"大小",Date:"日期",Filepath:"文件路径","Folder Name":"文件夹名称","File Name":"文件名称","Move files":"移动文件","Yes, Move!":"确定,移动!","Delete files":"删除文件","Yes, Delete!":"确定,删除!","Upload Files":"上传文件","No files selected!":"未选择文件!","Select Files":"选择文件","Archive the files":"压缩文件","Unarchive the files":"解压缩文件","The archive will be unarchived at":"此压缩文件将解压到","Archive name. (.zip file will be created)":"压缩包名称。(将创建 .zip 文件)","Create a new folder":"创建一个新文件夹","Create a new file":"创建一个新文件","Are you sure you want to delete these files?":"您确定要删除这些文件吗?","I'm sure delete it, This action cannot be undone.":"我确认要删除此内容。此操作不能撤销。","Search results for":"搜索结果为","%s item(s) selected.":"%s 个文件 已选择。","%s is renamed.":"%s 已重命名。","This is a readonly storage.":"这是只读存储。","%s is created.":"%s 已创建。","Files moved.":"文件已移动。","Files deleted.":"文件已删除。","The file unarchived.":"文件已解压。","The file(s) archived.":"文件已压缩。","Updated.":"已更新。","No search result found.":"未找到搜索结果。","Are you sure you want to move these files?":"您确定要移动这些文件吗?","File Size":"文件大小","Last Modified":"文件修改时间","Select Folders":"选择文件夹","Clear all":"清除全部","Clear only successful":"清除已成功上传的","Drag and drop the files/folders to here.":"拖拽或点击此处上传文件/文件夹。","You can drag & drop files anywhere while this modal is open.":"在此对话框打开时,您可以在任何地方拖放文件。",Canceled:"已取消",Done:"已完成","Network Error, Unable establish connection to the server or interrupted.":"网络错误,无法连接到服务器或连接被意外中断。","Pending upload":"待上传","Please select file to upload first.":"请先选择要上传的文件。",Settings:"设置",Shortcuts:"快捷键",Reset:"重置",Escape:"退出",Search:"搜索","Toggle Sidebar":"切换侧边栏","Open Settings":"打开设置","Reset all settings to default":"重置所有设置为默认","Saved.":"已保存。","Reset Settings":"重置设置",'Download doesn\'t work? You can try right-click "Download" button, select "Save link as...".':'下载不管用?您可以尝试右键点击"下载"按钮,选择"链接另存为..."。',Theme:"主题","Target Directory":"目标目录",Select:"选择","Show thumbnails":"显示缩略图","Persist Path":"保持路径","Metric Units":"公制单位","Select All":"全选","Pinned Folders":"固定文件夹","No folders pinned":"未固定文件夹","Pin Folder":"固定文件夹","Unpin Folder":"取消固定文件夹","Project home":"项目主页","Follow on GitHub":"在 GitHub 上关注","Customize your experience with the following settings":"使用以下设置自定义您的体验",File:"文件",View:"视图",Tools:"工具",Help:"帮助",Exit:"退出","Deselect All":"取消全选",Cut:"剪切",Copy:"复制",Paste:"粘贴","Grid View":"网格视图","List View":"列表视图","Tree View":"树形视图","Show Thumbnails":"显示缩略图","Full Screen":"全屏",items:"个项目",selected:"已选择",About:"关于",Git:"Git",Forward:"前进",Back:"后退","Go to Folder":"转到文件夹",Sorting:"排序",Asc:"升序",Desc:"降序",None:"无",Show:"显示","All items":"所有项目","Files only":"仅文件","Folders only":"仅文件夹","Show hidden files":"显示隐藏文件","Copy files":"复制文件","Are you sure you want to copy these files?":"您确定要复制这些文件吗?","Yes, Copy!":"是的,复制!","Files copied.":"文件已复制。",Browse:"浏览","Create a copy instead of moving":"创建副本而不是移动","Select Target Folder":"选择目标文件夹",Storages:"存储",Loading:"加载中","Search files":"搜索文件","Failed to open containing folder":"无法打开包含文件夹","Include subfolders":"包含子文件夹","More actions":"更多操作","Open Containing Folder":"打开包含文件夹","Searching...":"搜索中...","No results found":"未找到结果","Search Options":"搜索选项","All Files":"所有文件","Small (< 1MB)":"小文件 (< 1MB)","Medium (1-10MB)":"中等文件 (1-10MB)","Large (> 10MB)":"大文件 (> 10MB)","Start typing to search files. Use options to filter or include subfolders.":"开始输入以搜索文件。使用选项进行筛选或包含子文件夹。",uppy:rl},lp=Object.freeze(Object.defineProperty({__proto__:null,default:Rv},Symbol.toStringTag,{value:"Module"})),Nv={Language:"Language",Create:"Create",Close:"Close",Cancel:"Cancel",Save:"Save",Edit:"Edit",Crop:"Crop","New Folder":"New Folder","New File":"New File",Rename:"Rename",Delete:"Delete",Upload:"Upload",Download:"Download",Archive:"Archive",Unarchive:"Unarchive",Open:"Open","Open containing folder":"Open containing folder",Refresh:"Refresh",Preview:"Preview","Toggle Full Screen":"Toggle Full Screen","Change View":"Change View",Storage:"Storage","Go up a directory":"Go up a directory",Go:"Go","Enter folder path:":"Enter folder path:","Invalid path format. Path must be in format: storage://path/to/folder":"Invalid path format. Path must be in format: storage://path/to/folder",'Invalid storage. Storage "%s" is not available.':'Invalid storage. Storage "%s" is not available.',"Failed to navigate to folder":"Failed to navigate to folder","Copy Path":"Copy Path","Path copied to clipboard":"Path copied to clipboard","Toggle Path Copy Mode":"Toggle Path Copy Mode","Copy Download URL":"Copy Download URL","Search anything..":"Search anything..",Name:"Name",Size:"Size",Date:"Date",Filepath:"Filepath","Folder Name":"Folder Name","File Name":"File Name","Move files":"Move files","Yes, Move!":"Yes, Move!","Delete files":"Delete files","Yes, Delete!":"Yes, Delete!","Upload Files":"Upload Files","No files selected!":"No files selected!","Select Files":"Select Files","Archive the files":"Archive the files","Unarchive the files":"Unarchive the files","The archive will be unarchived at":"The archive will be unarchived at","Archive name. (.zip file will be created)":"Archive name. (.zip file will be created)","A modern, customizable file manager component built for Vue.":"A modern, customizable file manager component built for Vue.","Create a new folder":"Create a new folder","Create a new file":"Create a new file","Are you sure you want to delete these files?":"Are you sure you want to delete these files?","I'm sure delete it, This action cannot be undone.":"I confirm I want to delete this. This action cannot be undone.","Search results for":"Search results for","%s item(s) selected.":"%s item(s) selected.","%s is renamed.":"%s is renamed.","This is a readonly storage.":"This is a readonly storage.","%s is created.":"%s is created.","Files moved.":"Files moved.","Files deleted.":"Files deleted.","The file unarchived.":"The file unarchived.","The file(s) archived.":"The file(s) archived.","Updated.":"Updated.","No search result found.":"No search result found.","Are you sure you want to move these files?":"Are you sure you want to move these files?","File Size":"File Size","Last Modified":"Last Modified","Select Folders":"Select Folders","Clear all":"Clear all","Clear only successful":"Clear only successful","Drag and drop the files/folders to here.":"Drag and drop the files/folders to here.","You can drag & drop files anywhere while this modal is open.":"You can drag & drop files anywhere while this modal is open.",Canceled:"Canceled",Done:"Done","Network Error, Unable establish connection to the server or interrupted.":"Network Error, Unable establish connection to the server or interrupted.","Pending upload":"Pending","Please select file to upload first.":"Please select file to upload first.",Settings:"Settings",Shortcuts:"Shortcuts",Reset:"Reset",Escape:"Escape",Search:"Search","Toggle Sidebar":"Toggle Sidebar","Open Settings":"Open Settings","Reset all settings to default":"Reset all settings to default","Saved.":"Saved.","Reset Settings":"Reset Settings",'Download doesn\'t work? You can try right-click "Download" button, select "Save link as...".':`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`,Theme:"Theme","Target Directory":"Target Directory",Select:"Select","Show thumbnails":"Show thumbnails","Persist Path":"Persist Path","Metric Units":"Metric Units","Select All":"Select All","Pinned Folders":"Pinned Folders","No folders pinned":"No folders pinned","No folders":"No folders","Pin Folder":"Pin Folder","Unpin Folder":"Unpin Folder","Project Home":"Project Home","If you like it, please follow and ⭐ star on GitHub.":"If you like it, please follow and ⭐ star on GitHub.","Follow on GitHub":"Follow on GitHub","Customize your experience with the following settings":"Customize your experience with the following settings",File:"File",View:"View",Tools:"Tools",Help:"Help",Exit:"Exit","Deselect All":"Deselect All",Cut:"Cut",Copy:"Copy",Paste:"Paste","Grid View":"Grid View","List View":"List View","Tree View":"Tree View","Show Thumbnails":"Show Thumbnails","Full Screen":"Full Screen",items:"items",selected:"selected",About:"About",Git:"Git",Forward:"Forward",Back:"Back","Go to Folder":"Go to Folder",Sorting:"Sorting",Asc:"Asc",Desc:"Desc",None:"None",Show:"Show","All items":"All items","Files only":"Files only","Folders only":"Folders only","Show hidden files":"Show hidden files","Copy files":"Copy files","Are you sure you want to copy these files?":"Are you sure you want to copy these files?","Yes, Copy!":"Yes, Copy!","Files copied.":"Files copied.",Browse:"Browse","Create a copy instead of moving":"Create a copy instead of moving","Select Target Folder":"Select Target Folder",Storages:"Storages",Loading:"Loading","Search files":"Search files","Failed to open containing folder":"Failed to open containing folder","Include subfolders":"Include subfolders","More actions":"More actions","Open Containing Folder":"Open Containing Folder","Searching...":"Searching...","No results found":"No results found","Search Options":"Search Options","All Files":"All Files","Small (< 1MB)":"Small (< 1MB)","Medium (1-10MB)":"Medium (1-10MB)","Large (> 10MB)":"Large (> 10MB)","Start typing to search files. Use options to filter or include subfolders.":"Start typing to search files. Use options to filter or include subfolders.",uppy:sl},op=Object.freeze(Object.defineProperty({__proto__:null,default:Nv},Symbol.toStringTag,{value:"Module"}));export{ba as C,Na as G,op as e,tp as n,ap as o,lp as z};