@burdenoff/microfe-files 2026.1101.1 → 2026.1108.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/dist/config/index.d.ts +0 -1
  2. package/dist/config/index.js +1 -2
  3. package/dist/dev/main.d.ts +0 -1
  4. package/dist/files/FilesRoot.d.ts +0 -1
  5. package/dist/files/FilesRoot.js +5 -6
  6. package/dist/files/FilesRoutes.d.ts +0 -1
  7. package/dist/files/FilesRoutes.js +10 -11
  8. package/dist/files/components/ActionMenu.d.ts +0 -1
  9. package/dist/files/components/ActionMenu.js +1 -2
  10. package/dist/files/components/ConfirmDialog.d.ts +0 -1
  11. package/dist/files/components/ConfirmDialog.js +1 -2
  12. package/dist/files/components/ContextMenu.d.ts +0 -1
  13. package/dist/files/components/ContextMenu.js +1 -2
  14. package/dist/files/components/CopyDialog.d.ts +0 -1
  15. package/dist/files/components/CopyDialog.js +21 -22
  16. package/dist/files/components/CopyDialog.js.map +1 -1
  17. package/dist/files/components/EmptyState.d.ts +0 -1
  18. package/dist/files/components/EmptyState.js +1 -2
  19. package/dist/files/components/FileBrowser.d.ts +0 -1
  20. package/dist/files/components/FileBrowser.js +220 -221
  21. package/dist/files/components/FileBrowser.js.map +1 -1
  22. package/dist/files/components/FileCard.d.ts +0 -1
  23. package/dist/files/components/FileCard.js +40 -41
  24. package/dist/files/components/FileCard.js.map +1 -1
  25. package/dist/files/components/FileInfoPanel.d.ts +0 -1
  26. package/dist/files/components/FileInfoPanel.js +1 -2
  27. package/dist/files/components/FileListItem.d.ts +0 -1
  28. package/dist/files/components/FileListItem.js +148 -149
  29. package/dist/files/components/FileListItem.js.map +1 -1
  30. package/dist/files/components/FilePreviewModal.d.ts +0 -1
  31. package/dist/files/components/FilePreviewModal.js +1 -2
  32. package/dist/files/components/FileVersionPanel.d.ts +0 -1
  33. package/dist/files/components/FileVersionPanel.js +54 -55
  34. package/dist/files/components/FolderCard.d.ts +0 -1
  35. package/dist/files/components/FolderCard.js +29 -30
  36. package/dist/files/components/FolderCard.js.map +1 -1
  37. package/dist/files/components/MoveDialog.d.ts +0 -1
  38. package/dist/files/components/MoveDialog.js +19 -20
  39. package/dist/files/components/SearchBar.d.ts +0 -1
  40. package/dist/files/components/SearchBar.js +1 -2
  41. package/dist/files/components/ShareDialog.d.ts +0 -1
  42. package/dist/files/components/ShareDialog.js +1 -2
  43. package/dist/files/components/StorageBanner.d.ts +0 -1
  44. package/dist/files/components/StorageBanner.js +1 -2
  45. package/dist/files/components/TabBar.d.ts +0 -1
  46. package/dist/files/components/TabBar.js +1 -2
  47. package/dist/files/components/Toast.d.ts +0 -1
  48. package/dist/files/components/Toast.js +1 -2
  49. package/dist/files/components/UploadQueue.d.ts +0 -1
  50. package/dist/files/components/UploadQueue.js +1 -2
  51. package/dist/files/components/actionMenuPosition.d.ts +0 -1
  52. package/dist/files/components/actionMenuPosition.js +1 -2
  53. package/dist/files/components/contextMenuItems.d.ts +0 -1
  54. package/dist/files/components/contextMenuItems.js +1 -2
  55. package/dist/files/components/viewers/AudioPlayer.d.ts +0 -1
  56. package/dist/files/components/viewers/AudioPlayer.js +1 -2
  57. package/dist/files/components/viewers/CodeViewer.d.ts +0 -1
  58. package/dist/files/components/viewers/CodeViewer.js +1 -2
  59. package/dist/files/components/viewers/ImageViewer.d.ts +0 -1
  60. package/dist/files/components/viewers/ImageViewer.js +1 -2
  61. package/dist/files/components/viewers/PDFViewer.d.ts +0 -1
  62. package/dist/files/components/viewers/PDFViewer.js +1 -2
  63. package/dist/files/components/viewers/TextViewer.d.ts +0 -1
  64. package/dist/files/components/viewers/TextViewer.js +1 -2
  65. package/dist/files/components/viewers/VideoPlayer.d.ts +0 -1
  66. package/dist/files/components/viewers/VideoPlayer.js +1 -2
  67. package/dist/files/graphql-types.d.ts +0 -1
  68. package/dist/files/hooks/useBatchOperations.d.ts +0 -1
  69. package/dist/files/hooks/useBatchOperations.js +1 -2
  70. package/dist/files/hooks/useBinItems.d.ts +0 -1
  71. package/dist/files/hooks/useBinItems.js +1 -2
  72. package/dist/files/hooks/useBrowsePage.d.ts +0 -1
  73. package/dist/files/hooks/useBrowsePage.js +1 -2
  74. package/dist/files/hooks/useCopyFile.d.ts +0 -1
  75. package/dist/files/hooks/useCopyFile.js +1 -2
  76. package/dist/files/hooks/useCreateFolder.d.ts +0 -1
  77. package/dist/files/hooks/useCreateFolder.js +8 -9
  78. package/dist/files/hooks/useCreateFolderShare.d.ts +0 -1
  79. package/dist/files/hooks/useCreateFolderShare.js +1 -2
  80. package/dist/files/hooks/useCreateShare.d.ts +0 -1
  81. package/dist/files/hooks/useCreateShare.js +1 -2
  82. package/dist/files/hooks/useDeleteFile.d.ts +0 -1
  83. package/dist/files/hooks/useDeleteFile.js +1 -2
  84. package/dist/files/hooks/useDeleteFolder.d.ts +0 -1
  85. package/dist/files/hooks/useDeleteFolder.js +1 -2
  86. package/dist/files/hooks/useDragDrop.d.ts +0 -1
  87. package/dist/files/hooks/useDragDrop.js +1 -2
  88. package/dist/files/hooks/useFileVersions.d.ts +0 -1
  89. package/dist/files/hooks/useFileVersions.js +1 -2
  90. package/dist/files/hooks/useFoldersQuery.d.ts +0 -1
  91. package/dist/files/hooks/useFoldersQuery.js +1 -2
  92. package/dist/files/hooks/useKeyboardNavigation.d.ts +0 -1
  93. package/dist/files/hooks/useKeyboardNavigation.js +1 -2
  94. package/dist/files/hooks/useMoveFile.d.ts +0 -1
  95. package/dist/files/hooks/useMoveFile.js +1 -2
  96. package/dist/files/hooks/useMoveFolder.d.ts +0 -1
  97. package/dist/files/hooks/useMoveFolder.js +1 -2
  98. package/dist/files/hooks/usePermanentlyDeleteFile.d.ts +0 -1
  99. package/dist/files/hooks/usePermanentlyDeleteFile.js +1 -2
  100. package/dist/files/hooks/usePermanentlyDeleteFolder.d.ts +0 -1
  101. package/dist/files/hooks/usePermanentlyDeleteFolder.js +1 -2
  102. package/dist/files/hooks/useRecentFiles.d.ts +0 -1
  103. package/dist/files/hooks/useRecentFiles.js +1 -2
  104. package/dist/files/hooks/useRenameFile.d.ts +0 -1
  105. package/dist/files/hooks/useRenameFile.js +1 -2
  106. package/dist/files/hooks/useRenameFolder.d.ts +0 -1
  107. package/dist/files/hooks/useRenameFolder.js +1 -2
  108. package/dist/files/hooks/useRestoreFile.d.ts +0 -1
  109. package/dist/files/hooks/useRestoreFile.js +1 -2
  110. package/dist/files/hooks/useRestoreFolder.d.ts +0 -1
  111. package/dist/files/hooks/useRestoreFolder.js +1 -2
  112. package/dist/files/hooks/useSearch.d.ts +0 -1
  113. package/dist/files/hooks/useSearch.js +7 -8
  114. package/dist/files/hooks/useStarredItems.d.ts +0 -1
  115. package/dist/files/hooks/useStarredItems.js +1 -2
  116. package/dist/files/hooks/useStorageQuota.d.ts +0 -1
  117. package/dist/files/hooks/useStorageQuota.js +1 -2
  118. package/dist/files/hooks/useToast.d.ts +0 -1
  119. package/dist/files/hooks/useToast.js +1 -2
  120. package/dist/files/hooks/useToggleStar.d.ts +0 -1
  121. package/dist/files/hooks/useToggleStar.js +1 -2
  122. package/dist/files/hooks/useUploadFile.d.ts +0 -1
  123. package/dist/files/hooks/useUploadFile.js +4 -5
  124. package/dist/files/hooks/useUploadQueueState.d.ts +0 -1
  125. package/dist/files/hooks/useUploadQueueState.js +1 -2
  126. package/dist/files/index.d.ts +0 -1
  127. package/dist/files/index.js +4 -4
  128. package/dist/files/pages/BrowserPage.d.ts +0 -1
  129. package/dist/files/pages/BrowserPage.js +470 -471
  130. package/dist/files/pages/BrowserPage.js.map +1 -1
  131. package/dist/files/pages/ShareAccessPage.d.ts +0 -1
  132. package/dist/files/pages/ShareAccessPage.js +26 -27
  133. package/dist/files/pages/ShareAccessPage.js.map +1 -1
  134. package/dist/files/providers/FilesProvider.d.ts +0 -1
  135. package/dist/files/providers/FilesProvider.js +1 -2
  136. package/dist/files/store/filesStore.d.ts +0 -1
  137. package/dist/files/store/filesStore.js +1 -2
  138. package/dist/files/types.d.ts +0 -1
  139. package/dist/files/utils/events.d.ts +0 -1
  140. package/dist/files/utils/events.js +1 -2
  141. package/dist/files/utils/fileViewModel.d.ts +0 -1
  142. package/dist/files/utils/fileViewModel.js +1 -2
  143. package/dist/files/utils/i18n.d.ts +0 -1
  144. package/dist/files/utils/i18n.js +1 -2
  145. package/dist/files/utils/index.d.ts +0 -1
  146. package/dist/files/utils/index.js +1 -2
  147. package/dist/files/utils/quotaUtils.d.ts +0 -1
  148. package/dist/files/utils/thumbnail.d.ts +0 -1
  149. package/dist/files/utils/thumbnail.js +1 -2
  150. package/dist/files/utils/uploadDigest.d.ts +0 -1
  151. package/dist/files/utils/uploadDigest.js +1 -2
  152. package/dist/files.js +3 -3
  153. package/dist/generated/global-operations.d.ts +0 -1
  154. package/dist/generated/global-types.d.ts +0 -1
  155. package/dist/generated/wspace-operations.d.ts +0 -1
  156. package/dist/generated/wspace-operations.js +1 -2
  157. package/dist/generated/wspace-types.d.ts +0 -1
  158. package/dist/generated/wspace-types.js +1 -2
  159. package/dist/index.d.ts +0 -1
  160. package/dist/shared/hooks/useTr.d.ts +0 -1
  161. package/dist/shared/hooks/useTr.js +1 -2
  162. package/dist/shared/types/index.d.ts +0 -1
  163. package/dist/test/happydom.d.ts +1 -0
  164. package/dist/translations/en.d.ts +0 -1
  165. package/dist/translations/en.js +1 -2
  166. package/dist/utils/nativeBridge.d.ts +0 -1
  167. package/package.json +64 -46
  168. package/src/styles/dark.css +1 -1
  169. package/dist/config/index.d.ts.map +0 -1
  170. package/dist/dev/main.d.ts.map +0 -1
  171. package/dist/files/FilesRoot.d.ts.map +0 -1
  172. package/dist/files/FilesRoutes.d.ts.map +0 -1
  173. package/dist/files/components/ActionMenu.d.ts.map +0 -1
  174. package/dist/files/components/ConfirmDialog.d.ts.map +0 -1
  175. package/dist/files/components/ContextMenu.d.ts.map +0 -1
  176. package/dist/files/components/CopyDialog.d.ts.map +0 -1
  177. package/dist/files/components/EmptyState.d.ts.map +0 -1
  178. package/dist/files/components/FileBrowser.d.ts.map +0 -1
  179. package/dist/files/components/FileCard.d.ts.map +0 -1
  180. package/dist/files/components/FileInfoPanel.d.ts.map +0 -1
  181. package/dist/files/components/FileListItem.d.ts.map +0 -1
  182. package/dist/files/components/FilePreviewModal.d.ts.map +0 -1
  183. package/dist/files/components/FileVersionPanel.d.ts.map +0 -1
  184. package/dist/files/components/FolderCard.d.ts.map +0 -1
  185. package/dist/files/components/MoveDialog.d.ts.map +0 -1
  186. package/dist/files/components/SearchBar.d.ts.map +0 -1
  187. package/dist/files/components/ShareDialog.d.ts.map +0 -1
  188. package/dist/files/components/StorageBanner.d.ts.map +0 -1
  189. package/dist/files/components/TabBar.d.ts.map +0 -1
  190. package/dist/files/components/Toast.d.ts.map +0 -1
  191. package/dist/files/components/UploadQueue.d.ts.map +0 -1
  192. package/dist/files/components/actionMenuPosition.d.ts.map +0 -1
  193. package/dist/files/components/contextMenuItems.d.ts.map +0 -1
  194. package/dist/files/components/viewers/AudioPlayer.d.ts.map +0 -1
  195. package/dist/files/components/viewers/CodeViewer.d.ts.map +0 -1
  196. package/dist/files/components/viewers/ImageViewer.d.ts.map +0 -1
  197. package/dist/files/components/viewers/PDFViewer.d.ts.map +0 -1
  198. package/dist/files/components/viewers/TextViewer.d.ts.map +0 -1
  199. package/dist/files/components/viewers/VideoPlayer.d.ts.map +0 -1
  200. package/dist/files/graphql-types.d.ts.map +0 -1
  201. package/dist/files/hooks/useBatchOperations.d.ts.map +0 -1
  202. package/dist/files/hooks/useBinItems.d.ts.map +0 -1
  203. package/dist/files/hooks/useBrowsePage.d.ts.map +0 -1
  204. package/dist/files/hooks/useCopyFile.d.ts.map +0 -1
  205. package/dist/files/hooks/useCreateFolder.d.ts.map +0 -1
  206. package/dist/files/hooks/useCreateFolderShare.d.ts.map +0 -1
  207. package/dist/files/hooks/useCreateShare.d.ts.map +0 -1
  208. package/dist/files/hooks/useDeleteFile.d.ts.map +0 -1
  209. package/dist/files/hooks/useDeleteFolder.d.ts.map +0 -1
  210. package/dist/files/hooks/useDragDrop.d.ts.map +0 -1
  211. package/dist/files/hooks/useFileVersions.d.ts.map +0 -1
  212. package/dist/files/hooks/useFoldersQuery.d.ts.map +0 -1
  213. package/dist/files/hooks/useKeyboardNavigation.d.ts.map +0 -1
  214. package/dist/files/hooks/useMoveFile.d.ts.map +0 -1
  215. package/dist/files/hooks/useMoveFolder.d.ts.map +0 -1
  216. package/dist/files/hooks/usePermanentlyDeleteFile.d.ts.map +0 -1
  217. package/dist/files/hooks/usePermanentlyDeleteFolder.d.ts.map +0 -1
  218. package/dist/files/hooks/useRecentFiles.d.ts.map +0 -1
  219. package/dist/files/hooks/useRenameFile.d.ts.map +0 -1
  220. package/dist/files/hooks/useRenameFolder.d.ts.map +0 -1
  221. package/dist/files/hooks/useRestoreFile.d.ts.map +0 -1
  222. package/dist/files/hooks/useRestoreFolder.d.ts.map +0 -1
  223. package/dist/files/hooks/useSearch.d.ts.map +0 -1
  224. package/dist/files/hooks/useStarredItems.d.ts.map +0 -1
  225. package/dist/files/hooks/useStorageQuota.d.ts.map +0 -1
  226. package/dist/files/hooks/useToast.d.ts.map +0 -1
  227. package/dist/files/hooks/useToggleStar.d.ts.map +0 -1
  228. package/dist/files/hooks/useUploadFile.d.ts.map +0 -1
  229. package/dist/files/hooks/useUploadQueueState.d.ts.map +0 -1
  230. package/dist/files/index.d.ts.map +0 -1
  231. package/dist/files/pages/BrowserPage.d.ts.map +0 -1
  232. package/dist/files/pages/ShareAccessPage.d.ts.map +0 -1
  233. package/dist/files/providers/FilesProvider.d.ts.map +0 -1
  234. package/dist/files/store/filesStore.d.ts.map +0 -1
  235. package/dist/files/types.d.ts.map +0 -1
  236. package/dist/files/utils/events.d.ts.map +0 -1
  237. package/dist/files/utils/fileViewModel.d.ts.map +0 -1
  238. package/dist/files/utils/i18n.d.ts.map +0 -1
  239. package/dist/files/utils/index.d.ts.map +0 -1
  240. package/dist/files/utils/quotaUtils.d.ts.map +0 -1
  241. package/dist/files/utils/thumbnail.d.ts.map +0 -1
  242. package/dist/files/utils/uploadDigest.d.ts.map +0 -1
  243. package/dist/generated/global-operations.d.ts.map +0 -1
  244. package/dist/generated/global-types.d.ts.map +0 -1
  245. package/dist/generated/wspace-operations.d.ts.map +0 -1
  246. package/dist/generated/wspace-types.d.ts.map +0 -1
  247. package/dist/index.d.ts.map +0 -1
  248. package/dist/shared/hooks/useTr.d.ts.map +0 -1
  249. package/dist/shared/types/index.d.ts.map +0 -1
  250. package/dist/translations/en.d.ts.map +0 -1
  251. package/dist/utils/nativeBridge.d.ts.map +0 -1
@@ -1,150 +1,150 @@
1
- import { useFilesContext as e } from "../providers/FilesProvider.js";
2
- import { useUploadQueueState as t } from "../hooks/useUploadQueueState.js";
3
- import { fileViewModel as n, folderViewModel as r } from "../utils/fileViewModel.js";
4
- import { useFilesStore as i } from "../store/filesStore.js";
5
- import { useKeyboardNavigation as ee } from "../hooks/useKeyboardNavigation.js";
6
- import { useBrowsePage as te } from "../hooks/useBrowsePage.js";
7
- import { useRecentFiles as ne } from "../hooks/useRecentFiles.js";
8
- import { useStarredItems as re } from "../hooks/useStarredItems.js";
9
- import { useBinItems as ie } from "../hooks/useBinItems.js";
10
- import { useCreateFolder as ae } from "../hooks/useCreateFolder.js";
11
- import { isQuotaExhaustedError as oe } from "../utils/quotaUtils.js";
12
- import { useUploadFile as se } from "../hooks/useUploadFile.js";
13
- import { useDeleteFile as ce } from "../hooks/useDeleteFile.js";
14
- import { useDeleteFolder as le } from "../hooks/useDeleteFolder.js";
15
- import { useRestoreFile as ue } from "../hooks/useRestoreFile.js";
16
- import { useRestoreFolder as de } from "../hooks/useRestoreFolder.js";
17
- import { usePermanentlyDeleteFile as fe } from "../hooks/usePermanentlyDeleteFile.js";
18
- import { usePermanentlyDeleteFolder as pe } from "../hooks/usePermanentlyDeleteFolder.js";
19
- import { useToggleStar as me } from "../hooks/useToggleStar.js";
20
- import { useRenameFile as he } from "../hooks/useRenameFile.js";
21
- import { useRenameFolder as ge } from "../hooks/useRenameFolder.js";
22
- import { useCreateShare as _e } from "../hooks/useCreateShare.js";
23
- import { useCreateFolderShare as ve } from "../hooks/useCreateFolderShare.js";
24
- import { useCopyFile as ye } from "../hooks/useCopyFile.js";
25
- import { useMoveFile as be } from "../hooks/useMoveFile.js";
26
- import { useMoveFolder as xe } from "../hooks/useMoveFolder.js";
27
- import { useBulkDelete as Se } from "../hooks/useBatchOperations.js";
28
- import { useSearch as Ce } from "../hooks/useSearch.js";
29
- import { useToast as we } from "../hooks/useToast.js";
30
- import { generateThumbnail as Te } from "../utils/thumbnail.js";
1
+ import { useUploadQueueState as e } from "../hooks/useUploadQueueState.js";
2
+ import { fileViewModel as t, folderViewModel as n } from "../utils/fileViewModel.js";
3
+ import { useKeyboardNavigation as r } from "../hooks/useKeyboardNavigation.js";
4
+ import { useFilesContext as i } from "../providers/FilesProvider.js";
5
+ import { useFilesStore as a } from "../store/filesStore.js";
6
+ import { useBrowsePage as ee } from "../hooks/useBrowsePage.js";
7
+ import { useRecentFiles as te } from "../hooks/useRecentFiles.js";
8
+ import { useStarredItems as ne } from "../hooks/useStarredItems.js";
9
+ import { useBinItems as re } from "../hooks/useBinItems.js";
10
+ import { useCreateFolder as ie } from "../hooks/useCreateFolder.js";
11
+ import { useUploadFile as ae } from "../hooks/useUploadFile.js";
12
+ import { useDeleteFile as oe } from "../hooks/useDeleteFile.js";
13
+ import { useDeleteFolder as se } from "../hooks/useDeleteFolder.js";
14
+ import { useRestoreFile as ce } from "../hooks/useRestoreFile.js";
15
+ import { useRestoreFolder as le } from "../hooks/useRestoreFolder.js";
16
+ import { usePermanentlyDeleteFile as ue } from "../hooks/usePermanentlyDeleteFile.js";
17
+ import { usePermanentlyDeleteFolder as de } from "../hooks/usePermanentlyDeleteFolder.js";
18
+ import { useToggleStar as fe } from "../hooks/useToggleStar.js";
19
+ import { useRenameFile as pe } from "../hooks/useRenameFile.js";
20
+ import { useRenameFolder as me } from "../hooks/useRenameFolder.js";
21
+ import { useCreateShare as he } from "../hooks/useCreateShare.js";
22
+ import { useCreateFolderShare as ge } from "../hooks/useCreateFolderShare.js";
23
+ import { useCopyFile as _e } from "../hooks/useCopyFile.js";
24
+ import { useMoveFile as ve } from "../hooks/useMoveFile.js";
25
+ import { useMoveFolder as ye } from "../hooks/useMoveFolder.js";
26
+ import { useBulkDelete as be } from "../hooks/useBatchOperations.js";
27
+ import { useSearch as xe } from "../hooks/useSearch.js";
28
+ import { useToast as Se } from "../hooks/useToast.js";
29
+ import { FileBrowser as Ce } from "../components/FileBrowser.js";
30
+ import { generateThumbnail as we } from "../utils/thumbnail.js";
31
+ import { TabBar as Te } from "../components/TabBar.js";
32
+ import { ShareDialog as Ee } from "../components/ShareDialog.js";
33
+ import { FilePreviewModal as De } from "../components/FilePreviewModal.js";
34
+ import { FileInfoPanel as Oe } from "../components/FileInfoPanel.js";
35
+ import { EmptyState as ke } from "../components/EmptyState.js";
36
+ import { ToastContainer as Ae } from "../components/Toast.js";
37
+ import { SearchBar as je } from "../components/SearchBar.js";
38
+ import { MoveDialog as Me } from "../components/MoveDialog.js";
39
+ import { CopyDialog as Ne } from "../components/CopyDialog.js";
40
+ import { ConfirmDialog as Pe } from "../components/ConfirmDialog.js";
41
+ import { UploadQueue as Fe } from "../components/UploadQueue.js";
42
+ import { StorageBanner as Ie } from "../components/StorageBanner.js";
43
+ import { useStorageQuota as Le } from "../hooks/useStorageQuota.js";
44
+ import { isQuotaExhaustedError as Re } from "../utils/quotaUtils.js";
45
+ import { nativeImpact as ze, nativeNotify as Be, nativeOpenUrl as Ve } from "../../utils/nativeBridge.js";
46
+ import { emitFilesEvent as He } from "../utils/events.js";
47
+ import { tWithFallback as o } from "../utils/i18n.js";
31
48
  import "../utils/index.js";
32
- import { tWithFallback as a } from "../utils/i18n.js";
33
- import { FileBrowser as Ee } from "../components/FileBrowser.js";
34
- import { TabBar as De } from "../components/TabBar.js";
35
- import { ShareDialog as Oe } from "../components/ShareDialog.js";
36
- import { FilePreviewModal as ke } from "../components/FilePreviewModal.js";
37
- import { FileInfoPanel as Ae } from "../components/FileInfoPanel.js";
38
- import { EmptyState as je } from "../components/EmptyState.js";
39
- import { ToastContainer as Me } from "../components/Toast.js";
40
- import { SearchBar as Ne } from "../components/SearchBar.js";
41
- import { MoveDialog as Pe } from "../components/MoveDialog.js";
42
- import { CopyDialog as Fe } from "../components/CopyDialog.js";
43
- import { ConfirmDialog as Ie } from "../components/ConfirmDialog.js";
44
- import { UploadQueue as Le } from "../components/UploadQueue.js";
45
- import { StorageBanner as Re } from "../components/StorageBanner.js";
46
- import { useStorageQuota as ze } from "../hooks/useStorageQuota.js";
47
- import { nativeImpact as Be, nativeNotify as Ve, nativeOpenUrl as He } from "../../utils/nativeBridge.js";
48
- import { emitFilesEvent as Ue } from "../utils/events.js";
49
- import { useEffect as We, useMemo as Ge, useState as o } from "react";
50
- import { FolderPlus as Ke, FolderUp as qe, FolderX as Je, Grid3x3 as Ye, Home as Xe, List as Ze, Loader2 as s, Star as Qe, Trash2 as $e, Upload as et, X as tt } from "lucide-react";
51
- import { Fragment as nt, jsx as c, jsxs as l } from "react/jsx-runtime";
52
- import { useNavigate as rt, useParams as it } from "react-router";
53
- import { useI18n as at } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
54
- import { AuroraBackground as ot, Button as u, CTAOverflowMenu as st, EmphasisPanel as ct, GradientText as lt, IllustratedEmptyState as ut, Input as dt, NextSteps as ft, PagePurpose as pt, ResponsiveDialog as mt, ResponsiveDialogContent as ht, ResponsiveDialogFooter as gt, ResponsiveDialogHeader as _t, ResponsiveDialogTitle as vt } from "@burdenoff/fe-libs/ui";
55
- //#region src/files/pages/BrowserPage.tsx
56
- function d() {
57
- let { t: d } = at(), { folderId: f } = it(), p = rt(), yt = e(), { workspaceId: m } = yt, bt = ze(m ?? ""), { viewMode: xt, setViewMode: St, breadcrumbs: Ct, selectedFiles: h, selectedFolders: g, clearSelection: _ } = i(), [v, y] = o("all"), wt = Ge(() => [
49
+ import { useEffect as Ue, useMemo as We, useState as s } from "react";
50
+ import { FolderPlus as Ge, FolderUp as Ke, FolderX as qe, Grid3x3 as Je, Home as Ye, List as Xe, Loader2 as c, Star as Ze, Trash2 as Qe, Upload as $e, X as et } from "lucide-react";
51
+ import { Fragment as tt, jsx as l, jsxs as u } from "react/jsx-runtime";
52
+ import { useNavigate as nt, useParams as rt } from "react-router";
53
+ import { useI18n as it } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
54
+ import { AuroraBackground as at, Button as d, CTAOverflowMenu as ot, EmphasisPanel as st, GradientText as ct, IllustratedEmptyState as lt, Input as ut, NextSteps as dt, PagePurpose as ft, ResponsiveDialog as pt, ResponsiveDialogContent as mt, ResponsiveDialogFooter as ht, ResponsiveDialogHeader as gt, ResponsiveDialogTitle as _t } from "@burdenoff/fe-libs/ui";
55
+ // src/files/pages/BrowserPage.tsx
56
+ function f() {
57
+ let { t: f } = it(), { folderId: p } = rt(), m = nt(), vt = i(), { workspaceId: h } = vt, yt = Le(h ?? ""), { viewMode: bt, setViewMode: xt, breadcrumbs: St, selectedFiles: g, selectedFolders: _, clearSelection: Ct } = a(), [v, wt] = s("all"), Tt = We(() => [
58
58
  "all",
59
59
  "recent",
60
60
  "starred",
61
61
  "bin"
62
62
  ], []);
63
- We(() => {
64
- wt.includes(v) || y("all");
65
- }, [wt, v]);
66
- let [b, Tt] = o(""), [Et, Dt] = o(), x = b.trim().length >= 2, [Ot, kt] = o(null), [S, At] = o(null), C = we(), w = te({
67
- folderId: f || void 0,
63
+ Ue(() => {
64
+ Tt.includes(v) || wt("all");
65
+ }, [Tt, v]);
66
+ let [Et, Dt] = s(""), [Ot, kt] = s(), y = Et.trim().length >= 2, [At, jt] = s(null), [b, Mt] = s(null), x = Se(), S = ee({
67
+ folderId: p || void 0,
68
68
  pageSize: 100,
69
- skip: v !== "all" || x
70
- }), T = ne({ skip: v !== "recent" || x }), E = re({ skip: v !== "starred" || x }), D = ie({ skip: v !== "bin" || x }), O = Ce(b, x, Et);
71
- We(() => {
72
- if (f && w.data?.folderPath && w.data?.currentFolder) {
73
- let e = w.data.folderPath.folders || [], t = w.data.currentFolder, n = [...e.map((e) => ({
69
+ skip: v !== "all" || y
70
+ }), C = te({ skip: v !== "recent" || y }), w = ne({ skip: v !== "starred" || y }), T = re({ skip: v !== "bin" || y }), E = xe(Et, y, Ot);
71
+ Ue(() => {
72
+ if (p && S.data?.folderPath && S.data?.currentFolder) {
73
+ let e = S.data.folderPath.folders || [], t = S.data.currentFolder, n = [...e.map((e) => ({
74
74
  id: e.id,
75
75
  name: e.name
76
76
  })), {
77
77
  id: t.id,
78
78
  name: t.name
79
79
  }];
80
- i.getState().setBreadcrumbs(n);
81
- } else i.getState().setBreadcrumbs([]);
82
- }, [f, w.data]);
83
- let k = [], A = [], j = !1, M = null, N = !1;
84
- if (x && O.data) k = O.data.files || [], A = O.data.folders || [], j = O.isLoading, M = O.error;
80
+ a.getState().setBreadcrumbs(n);
81
+ } else a.getState().setBreadcrumbs([]);
82
+ }, [p, S.data]);
83
+ let D = [], O = [], k = !1, A = null, j = !1;
84
+ if (y && E.data) D = E.data.files || [], O = E.data.folders || [], k = E.isLoading, A = E.error;
85
85
  else switch (v) {
86
86
  case "all":
87
- k = w.data?.filesList?.files.map(n) || [], A = w.data?.foldersList?.folders.map(r) || [], j = w.loading, M = w.error || null, N = !1;
87
+ D = S.data?.filesList?.files.map(t) || [], O = S.data?.foldersList?.folders.map(n) || [], k = S.loading, A = S.error || null, j = !1;
88
88
  break;
89
89
  case "recent":
90
- k = T.files || [], A = T.folders || [], j = T.isLoading, M = T.error || null, N = !0;
90
+ D = C.files || [], O = C.folders || [], k = C.isLoading, A = C.error || null, j = !0;
91
91
  break;
92
92
  case "starred":
93
- k = E.files, A = E.folders, j = E.isLoading, M = E.error || null, N = !0;
93
+ D = w.files, O = w.folders, k = w.isLoading, A = w.error || null, j = !0;
94
94
  break;
95
- case "bin": k = D.files, A = D.folders, j = D.isLoading, M = D.error || null, N = !0;
95
+ case "bin": D = T.files, O = T.folders, k = T.isLoading, A = T.error || null, j = !0;
96
96
  }
97
- let jt = v === "all" ? (w.data?.filesList?.total ?? k.length) + (w.data?.foldersList?.total ?? A.length) : null, P = h.size + g.size, [Mt, F] = o(!1), [Nt, Pt] = o(!1), [Ft, It] = o(!1), [Lt, I] = o(!1), [Rt, L] = o(!1), [zt, R] = o(!1), [Bt, Vt] = o(!1), [Ht, Ut] = o(null), [z, Wt] = o(null), [B, Gt] = o(null), [V, H] = o(null), [U, W] = o(""), [G, K] = o(""), { uploading: Kt, uploadQueue: qt, isUploadPanelOpen: Jt, setUploading: Yt, setUploadQueue: q, setIsUploadPanelOpen: Xt, cancelUpload: Zt } = t(), [J, Y] = o(null), X = (e, t) => {
98
- Ue(yt, e, t);
99
- }, Qt = async () => {
100
- if (!J || J.loading) return;
101
- let e = J.onConfirm;
102
- Y({
103
- ...J,
97
+ let Nt = v === "all" ? (S.data?.filesList?.total ?? D.length) + (S.data?.foldersList?.total ?? O.length) : null, M = g.size + _.size, [Pt, N] = s(!1), [Ft, It] = s(!1), [Lt, Rt] = s(!1), [zt, P] = s(!1), [Bt, F] = s(!1), [Vt, I] = s(!1), [Ht, Ut] = s(!1), [Wt, L] = s(null), [R, Gt] = s(null), [z, Kt] = s(null), [B, V] = s(null), [H, U] = s(""), [W, G] = s(""), { uploading: qt, uploadQueue: Jt, isUploadPanelOpen: Yt, setUploading: Xt, setUploadQueue: K, setIsUploadPanelOpen: Zt, cancelUpload: Qt } = e(), [q, J] = s(null), Y = (e, t) => {
98
+ He(vt, e, t);
99
+ }, $t = async () => {
100
+ if (!q || q.loading) return;
101
+ let e = q.onConfirm;
102
+ J({
103
+ ...q,
104
104
  loading: !0
105
105
  });
106
106
  try {
107
- await e(), Y(null);
107
+ await e(), J(null);
108
108
  } catch (e) {
109
- X("files.api.failed", {
109
+ Y("files.api.failed", {
110
110
  action: "confirmDialog",
111
111
  message: e instanceof Error ? e.message : "Confirmed action failed"
112
- }), Y((e) => e && {
112
+ }), J((e) => e && {
113
113
  ...e,
114
114
  loading: !1
115
115
  });
116
116
  }
117
- }, Z = ae(), $t = se(), en = ce(), tn = le(), nn = ue(), rn = de(), an = fe(), on = pe(), sn = me(), Q = he(), $ = ge(), cn = _e(), ln = ve(), un = ye(), dn = be(), fn = xe(), pn = Se(), mn = () => {
117
+ }, X = ie(), en = ae(), tn = oe(), nn = se(), rn = ce(), an = le(), on = ue(), sn = de(), cn = fe(), Z = pe(), Q = me(), ln = he(), un = ge(), dn = _e(), fn = ve(), pn = ye(), mn = be(), hn = () => {
118
118
  let e = document.createElement("input");
119
119
  e.type = "file", e.multiple = !0, e.onchange = async (e) => {
120
120
  let t = e.target.files;
121
121
  if (t && t.length > 0) {
122
122
  let e = await Promise.all(Array.from(t).map(async (e, t) => {
123
- let n = await Te(e);
123
+ let n = await we(e);
124
124
  return {
125
125
  id: `${Date.now()}-${t}-${e.name}`,
126
126
  file: e,
127
127
  status: "pending",
128
128
  progress: 0,
129
- folderId: f || void 0,
129
+ folderId: p || void 0,
130
130
  thumbnailUrl: n ?? void 0
131
131
  };
132
132
  }));
133
- q((t) => [...t, ...e]), Xt(!0), Yt(!0);
134
- for (let t of e) await hn(t);
135
- Yt(!1);
133
+ K((t) => [...t, ...e]), Zt(!0), Xt(!0);
134
+ for (let t of e) await $(t);
135
+ Xt(!1);
136
136
  }
137
137
  }, e.click();
138
- }, hn = async (e) => {
138
+ }, $ = async (e) => {
139
139
  let t = (t) => {
140
- q((n) => n.map((n) => n.id === e.id ? {
140
+ K((n) => n.map((n) => n.id === e.id ? {
141
141
  ...n,
142
142
  ...t
143
143
  } : n));
144
144
  };
145
145
  t({ status: "uploading" });
146
146
  try {
147
- let n = await $t.mutateAsync({
147
+ let n = await en.mutateAsync({
148
148
  file: e.file,
149
149
  folderId: e.folderId,
150
150
  onProgress: (e) => {
@@ -154,44 +154,44 @@ function d() {
154
154
  t({
155
155
  status: "completed",
156
156
  progress: 100
157
- }), X("files.file.uploaded", {
157
+ }), Y("files.file.uploaded", {
158
158
  fileId: n.id,
159
159
  fileName: n.name,
160
160
  folderId: e.folderId
161
161
  });
162
162
  } catch (n) {
163
- let r = n instanceof Error ? n.message : a(d, "files.upload.errors.failed", "Upload failed");
164
- r === "Upload paused" ? t({ status: "paused" }) : oe(n) ? (t({
163
+ let r = n instanceof Error ? n.message : o(f, "files.upload.errors.failed", "Upload failed");
164
+ r === "Upload paused" ? t({ status: "paused" }) : Re(n) ? (t({
165
165
  status: "failed",
166
- error: a(d, "files.upload.errors.quotaExceeded", "Storage quota exceeded")
167
- }), It(!0)) : (t({
166
+ error: o(f, "files.upload.errors.quotaExceeded", "Storage quota exceeded")
167
+ }), Rt(!0)) : (t({
168
168
  status: "failed",
169
169
  error: r
170
- }), X("files.api.failed", {
170
+ }), Y("files.api.failed", {
171
171
  action: "uploadFile",
172
172
  fileName: e.file.name,
173
173
  message: r
174
174
  }));
175
175
  }
176
176
  }, gn = (e) => {
177
- $t.pause(), q((t) => t.map((t) => t.id === e ? {
177
+ en.pause(), K((t) => t.map((t) => t.id === e ? {
178
178
  ...t,
179
179
  status: "paused"
180
180
  } : t));
181
181
  }, _n = (e) => {
182
- let t = qt.find((t) => t.id === e);
183
- t && hn(t);
182
+ let t = Jt.find((t) => t.id === e);
183
+ t && $(t);
184
184
  }, vn = (e) => {
185
- let t = qt.find((t) => t.id === e);
186
- t && (q((t) => t.map((t) => t.id === e ? {
185
+ let t = Jt.find((t) => t.id === e);
186
+ t && (K((t) => t.map((t) => t.id === e ? {
187
187
  ...t,
188
188
  status: "pending",
189
189
  progress: 0,
190
190
  error: void 0
191
- } : t)), hn(t));
192
- }, yn = Zt, bn = () => {
193
- if (!m) {
194
- C.error(a(d, "files.workspace.errors.notSelected", "Workspace not selected"));
191
+ } : t)), $(t));
192
+ }, yn = Qt, bn = () => {
193
+ if (!h) {
194
+ x.error(o(f, "files.workspace.errors.notSelected", "Workspace not selected"));
195
195
  return;
196
196
  }
197
197
  let e = document.createElement("input");
@@ -206,23 +206,23 @@ function d() {
206
206
  let n = /* @__PURE__ */ new Map(), r = Array.from(e.keys()).sort();
207
207
  for (let e of r) {
208
208
  if (!e) continue;
209
- let t = e.split("/"), r = "", i = f || void 0;
209
+ let t = e.split("/"), r = "", i = p || void 0;
210
210
  for (let e of t) if (r = r ? `${r}/${e}` : e, n.has(r)) i = n.get(r);
211
211
  else try {
212
- let { data: t } = await Z.mutateAsync({
212
+ let { data: t } = await X.mutateAsync({
213
213
  name: e,
214
214
  parentFolderId: i
215
215
  });
216
216
  t?.id && (n.set(r, t.id), i = t.id);
217
217
  } catch {}
218
218
  }
219
- let i = [], ee = 0;
219
+ let i = [], a = 0;
220
220
  for (let [t, r] of e) {
221
- let e = t ? n.get(t) : f || void 0;
221
+ let e = t ? n.get(t) : p || void 0;
222
222
  for (let t of r) {
223
- let n = await Te(t);
223
+ let n = await we(t);
224
224
  i.push({
225
- id: `${Date.now()}-${ee++}-${t.name}`,
225
+ id: `${Date.now()}-${a++}-${t.name}`,
226
226
  file: t,
227
227
  status: "pending",
228
228
  progress: 0,
@@ -231,42 +231,42 @@ function d() {
231
231
  });
232
232
  }
233
233
  }
234
- q((e) => [...e, ...i]), Xt(!0), Yt(!0);
235
- for (let e of i) await hn(e);
236
- Yt(!1), C.success(a(d, "files.upload.folder.success", "Uploaded {{count}} file{{plural}} from folder", {
234
+ K((e) => [...e, ...i]), Zt(!0), Xt(!0);
235
+ for (let e of i) await $(e);
236
+ Xt(!1), x.success(o(f, "files.upload.folder.success", "Uploaded {{count}} file{{plural}} from folder", {
237
237
  count: i.length,
238
238
  plural: i.length > 1 ? "s" : ""
239
239
  }));
240
240
  }
241
241
  }, e.click();
242
242
  }, xn = () => {
243
- F(!0);
243
+ N(!0);
244
244
  }, Sn = async () => {
245
- if (G.trim() && m) {
246
- let { data: e, error: t } = await Z.mutateAsync({
247
- name: G,
248
- parentFolderId: f
245
+ if (W.trim() && h) {
246
+ let { data: e, error: t } = await X.mutateAsync({
247
+ name: W,
248
+ parentFolderId: p
249
249
  });
250
250
  if (t) {
251
- oe(t) ? (F(!1), K(""), Pt(!0)) : (C.error(t instanceof Error ? t.message : a(d, "files.folder.errors.createFailed", "Folder creation failed")), X("files.api.failed", {
251
+ Re(t) ? (N(!1), G(""), It(!0)) : (x.error(t instanceof Error ? t.message : o(f, "files.folder.errors.createFailed", "Folder creation failed")), Y("files.api.failed", {
252
252
  action: "createFolder",
253
253
  message: t instanceof Error ? t.message : "Folder creation failed"
254
254
  }));
255
255
  return;
256
256
  }
257
- e && (K(""), F(!1), X("files.folder.created", {
258
- folderName: G,
259
- parentFolderId: f
257
+ e && (G(""), N(!1), Y("files.folder.created", {
258
+ folderName: W,
259
+ parentFolderId: p
260
260
  }));
261
261
  }
262
262
  }, Cn = (e) => {
263
- At(e);
263
+ Mt(e);
264
264
  }, wn = (e) => {
265
- Ut(e), L(!0);
265
+ L(e), F(!0);
266
266
  }, Tn = (e) => {
267
- Ut(e), L(!0);
267
+ L(e), F(!0);
268
268
  }, En = async (e) => {
269
- if (!e.fileId && !e.folderId) throw Error(a(d, "files.share.errors.targetRequired", "Share requires a file id or folder id"));
269
+ if (!e.fileId && !e.folderId) throw Error(o(f, "files.share.errors.targetRequired", "Share requires a file id or folder id"));
270
270
  let t = e.invitedEmail ? "EMAIL_INVITE" : "PUBLIC_LINK", n = "";
271
271
  if (e.fileId) {
272
272
  let r = {
@@ -278,7 +278,7 @@ function d() {
278
278
  shareType: t,
279
279
  accessLevel: "DOWNLOAD"
280
280
  };
281
- n = (await cn.mutateAsync(r))?.token ?? "", X("files.share.created", {
281
+ n = (await ln.mutateAsync(r))?.token ?? "", Y("files.share.created", {
282
282
  entityType: "file",
283
283
  fileId: e.fileId,
284
284
  shareType: t
@@ -293,7 +293,7 @@ function d() {
293
293
  shareType: t,
294
294
  accessLevel: "DOWNLOAD"
295
295
  };
296
- n = (await ln.mutateAsync(r))?.token ?? "", X("files.share.created", {
296
+ n = (await un.mutateAsync(r))?.token ?? "", Y("files.share.created", {
297
297
  entityType: "folder",
298
298
  folderId: e.folderId,
299
299
  shareType: t
@@ -304,20 +304,20 @@ function d() {
304
304
  token: n
305
305
  };
306
306
  }, Dn = async (e) => {
307
- Be("medium"), Y({
308
- title: a(d, "files.confirm.deleteFile.title", "Delete file"),
309
- description: a(d, "files.confirm.deleteFile.description", "Move \"{{name}}\" to the bin?", { name: e.name }),
310
- confirmLabel: a(d, "files.common.actions.delete", "Delete"),
307
+ ze("medium"), J({
308
+ title: o(f, "files.confirm.deleteFile.title", "Delete file"),
309
+ description: o(f, "files.confirm.deleteFile.description", "Move \"{{name}}\" to the bin?", { name: e.name }),
310
+ confirmLabel: o(f, "files.common.actions.delete", "Delete"),
311
311
  variant: "danger",
312
312
  onConfirm: async () => {
313
313
  try {
314
- await en.mutateAsync({ id: e.id }), Ve("success"), C.success(a(d, "files.file.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), X("files.file.deleted", {
314
+ await tn.mutateAsync({ id: e.id }), Be("success"), x.success(o(f, "files.file.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), Y("files.file.deleted", {
315
315
  fileId: e.id,
316
316
  fileName: e.name,
317
317
  permanent: !1
318
318
  });
319
319
  } catch (t) {
320
- C.error(t instanceof Error ? t.message : a(d, "files.file.errors.deleteFailed", "Failed to delete \"{{name}}\"", { name: e.name })), Ve("error"), X("files.api.failed", {
320
+ x.error(t instanceof Error ? t.message : o(f, "files.file.errors.deleteFailed", "Failed to delete \"{{name}}\"", { name: e.name })), Be("error"), Y("files.api.failed", {
321
321
  action: "deleteFile",
322
322
  fileId: e.id,
323
323
  message: t instanceof Error ? t.message : "Failed to delete file"
@@ -327,530 +327,530 @@ function d() {
327
327
  });
328
328
  }, On = async (e) => {
329
329
  try {
330
- await nn.mutateAsync({ id: e.id }), C.success(a(d, "files.file.restore.success", "\"{{name}}\" restored", { name: e.name })), X("files.file.restored", {
330
+ await rn.mutateAsync({ id: e.id }), x.success(o(f, "files.file.restore.success", "\"{{name}}\" restored", { name: e.name })), Y("files.file.restored", {
331
331
  fileId: e.id,
332
332
  fileName: e.name
333
333
  });
334
334
  } catch (e) {
335
- C.error(e instanceof Error ? e.message : a(d, "files.file.errors.restoreFailed", "Failed to restore file"));
335
+ x.error(e instanceof Error ? e.message : o(f, "files.file.errors.restoreFailed", "Failed to restore file"));
336
336
  }
337
337
  }, kn = async (e) => {
338
- Be("heavy"), Y({
339
- title: a(d, "files.confirm.permanentDeleteFile.title", "Permanently delete file"),
340
- description: a(d, "files.confirm.permanentDeleteFile.description", "Permanently delete \"{{name}}\"? This cannot be undone.", { name: e.name }),
341
- confirmLabel: a(d, "files.common.actions.deletePermanently", "Delete permanently"),
338
+ ze("heavy"), J({
339
+ title: o(f, "files.confirm.permanentDeleteFile.title", "Permanently delete file"),
340
+ description: o(f, "files.confirm.permanentDeleteFile.description", "Permanently delete \"{{name}}\"? This cannot be undone.", { name: e.name }),
341
+ confirmLabel: o(f, "files.common.actions.deletePermanently", "Delete permanently"),
342
342
  variant: "danger",
343
343
  onConfirm: async () => {
344
344
  try {
345
- await an.mutateAsync({ id: e.id }), C.success(a(d, "files.file.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), X("files.file.deleted", {
345
+ await on.mutateAsync({ id: e.id }), x.success(o(f, "files.file.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), Y("files.file.deleted", {
346
346
  fileId: e.id,
347
347
  fileName: e.name,
348
348
  permanent: !0
349
349
  });
350
350
  } catch (e) {
351
- C.error(e instanceof Error ? e.message : a(d, "files.file.errors.permanentDeleteFailed", "Failed to permanently delete file"));
351
+ x.error(e instanceof Error ? e.message : o(f, "files.file.errors.permanentDeleteFailed", "Failed to permanently delete file"));
352
352
  }
353
353
  }
354
354
  });
355
355
  }, An = async (e) => {
356
356
  try {
357
- await sn.mutateAsync({
357
+ await cn.mutateAsync({
358
358
  id: e.id,
359
359
  type: "file"
360
- }), X("files.file.starred", {
360
+ }), Y("files.file.starred", {
361
361
  fileId: e.id,
362
362
  fileName: e.name,
363
363
  starred: !e.starred
364
364
  });
365
365
  } catch {
366
- C.error(a(d, "files.file.errors.starFailed", "Failed to update starred state")), X("files.api.failed", {
366
+ x.error(o(f, "files.file.errors.starFailed", "Failed to update starred state")), Y("files.api.failed", {
367
367
  action: "toggleFileStar",
368
368
  fileId: e.id
369
369
  });
370
370
  }
371
371
  }, jn = (e) => {
372
- H({
372
+ V({
373
373
  id: e.id,
374
374
  name: e.name,
375
375
  type: "file"
376
- }), W(e.name), I(!0);
376
+ }), U(e.name), P(!0);
377
377
  }, Mn = async (e) => {
378
378
  try {
379
379
  let t = e.downloadUrl || e.url;
380
- if (!t) throw Error(a(d, "files.file.errors.downloadUrlUnavailable", "Download URL is unavailable"));
380
+ if (!t) throw Error(o(f, "files.file.errors.downloadUrlUnavailable", "Download URL is unavailable"));
381
381
  let n = document.createElement("a");
382
- n.style.display = "none", n.href = t, n.download = e.name, n.rel = "noopener noreferrer", document.body.appendChild(n), n.click(), document.body.removeChild(n), C.success(a(d, "files.file.download.success", "Downloaded {{name}}", { name: e.name })), X("files.file.downloaded", {
382
+ n.style.display = "none", n.href = t, n.download = e.name, n.rel = "noopener noreferrer", document.body.appendChild(n), n.click(), document.body.removeChild(n), x.success(o(f, "files.file.download.success", "Downloaded {{name}}", { name: e.name })), Y("files.file.downloaded", {
383
383
  fileId: e.id,
384
384
  fileName: e.name
385
385
  });
386
386
  } catch (e) {
387
- C.error(e instanceof Error ? e.message : a(d, "files.file.errors.downloadFailed", "Failed to download file"));
387
+ x.error(e instanceof Error ? e.message : o(f, "files.file.errors.downloadFailed", "Failed to download file"));
388
388
  }
389
389
  }, Nn = (e) => {
390
- Gt({
390
+ Kt({
391
391
  item: e,
392
392
  type: "file"
393
- }), Vt(!0);
393
+ }), Ut(!0);
394
394
  }, Pn = (e) => {
395
- Wt({
395
+ Gt({
396
396
  item: e,
397
397
  type: "file"
398
- }), R(!0);
398
+ }), I(!0);
399
399
  }, Fn = (e) => {
400
- kt({
400
+ jt({
401
401
  item: e,
402
402
  type: "file"
403
403
  });
404
404
  }, In = (e) => {
405
- p(`/files/browse/${e.id}`);
405
+ m(`/files/browse/${e.id}`);
406
406
  }, Ln = async (e) => {
407
- Be("medium"), Y({
408
- title: a(d, "files.confirm.deleteFolder.title", "Delete folder"),
409
- description: a(d, "files.confirm.deleteFolder.description", "Move folder \"{{name}}\" and all its contents to the bin?", { name: e.name }),
410
- confirmLabel: a(d, "files.common.actions.delete", "Delete"),
407
+ ze("medium"), J({
408
+ title: o(f, "files.confirm.deleteFolder.title", "Delete folder"),
409
+ description: o(f, "files.confirm.deleteFolder.description", "Move folder \"{{name}}\" and all its contents to the bin?", { name: e.name }),
410
+ confirmLabel: o(f, "files.common.actions.delete", "Delete"),
411
411
  variant: "danger",
412
412
  onConfirm: async () => {
413
413
  try {
414
- await tn.mutateAsync({
414
+ await nn.mutateAsync({
415
415
  id: e.id,
416
416
  recursive: !0
417
- }), C.success(a(d, "files.folder.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), X("files.folder.deleted", {
417
+ }), x.success(o(f, "files.folder.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), Y("files.folder.deleted", {
418
418
  folderId: e.id,
419
419
  folderName: e.name,
420
420
  permanent: !1
421
421
  });
422
422
  } catch (e) {
423
- C.error(e instanceof Error ? e.message : a(d, "files.folder.errors.deleteFailed", "Failed to delete folder"));
423
+ x.error(e instanceof Error ? e.message : o(f, "files.folder.errors.deleteFailed", "Failed to delete folder"));
424
424
  }
425
425
  }
426
426
  });
427
427
  }, Rn = async (e) => {
428
428
  try {
429
- await rn.mutateAsync({ id: e.id }), C.success(a(d, "files.folder.restore.success", "\"{{name}}\" restored", { name: e.name })), X("files.folder.restored", {
429
+ await an.mutateAsync({ id: e.id }), x.success(o(f, "files.folder.restore.success", "\"{{name}}\" restored", { name: e.name })), Y("files.folder.restored", {
430
430
  folderId: e.id,
431
431
  folderName: e.name
432
432
  });
433
433
  } catch (e) {
434
- C.error(e instanceof Error ? e.message : a(d, "files.folder.errors.restoreFailed", "Failed to restore folder"));
434
+ x.error(e instanceof Error ? e.message : o(f, "files.folder.errors.restoreFailed", "Failed to restore folder"));
435
435
  }
436
436
  }, zn = async (e) => {
437
- Y({
438
- title: a(d, "files.confirm.permanentDeleteFolder.title", "Permanently delete folder"),
439
- description: a(d, "files.confirm.permanentDeleteFolder.description", "Permanently delete folder \"{{name}}\" and its contents? This cannot be undone.", { name: e.name }),
440
- confirmLabel: a(d, "files.common.actions.deletePermanently", "Delete permanently"),
437
+ J({
438
+ title: o(f, "files.confirm.permanentDeleteFolder.title", "Permanently delete folder"),
439
+ description: o(f, "files.confirm.permanentDeleteFolder.description", "Permanently delete folder \"{{name}}\" and its contents? This cannot be undone.", { name: e.name }),
440
+ confirmLabel: o(f, "files.common.actions.deletePermanently", "Delete permanently"),
441
441
  variant: "danger",
442
442
  onConfirm: async () => {
443
443
  try {
444
- await on.mutateAsync({ id: e.id }), C.success(a(d, "files.folder.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), X("files.folder.deleted", {
444
+ await sn.mutateAsync({ id: e.id }), x.success(o(f, "files.folder.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), Y("files.folder.deleted", {
445
445
  folderId: e.id,
446
446
  folderName: e.name,
447
447
  permanent: !0
448
448
  });
449
449
  } catch (e) {
450
- C.error(e instanceof Error ? e.message : a(d, "files.folder.errors.permanentDeleteFailed", "Failed to permanently delete folder"));
450
+ x.error(e instanceof Error ? e.message : o(f, "files.folder.errors.permanentDeleteFailed", "Failed to permanently delete folder"));
451
451
  }
452
452
  }
453
453
  });
454
454
  }, Bn = (e) => {
455
- H({
455
+ V({
456
456
  id: e.id,
457
457
  name: e.name,
458
458
  type: "folder"
459
- }), W(e.name), I(!0);
459
+ }), U(e.name), P(!0);
460
460
  }, Vn = (e) => {
461
- Wt({
461
+ Gt({
462
462
  item: e,
463
463
  type: "folder"
464
- }), R(!0);
464
+ }), I(!0);
465
465
  }, Hn = async (e) => {
466
466
  try {
467
- await sn.mutateAsync({
467
+ await cn.mutateAsync({
468
468
  id: e.id,
469
469
  type: "folder"
470
- }), X("files.folder.starred", {
470
+ }), Y("files.folder.starred", {
471
471
  folderId: e.id,
472
472
  folderName: e.name,
473
473
  starred: !e.starred
474
474
  });
475
475
  } catch {
476
- C.error(a(d, "files.folder.errors.starFailed", "Failed to update starred state")), X("files.api.failed", {
476
+ x.error(o(f, "files.folder.errors.starFailed", "Failed to update starred state")), Y("files.api.failed", {
477
477
  action: "toggleFolderStar",
478
478
  folderId: e.id
479
479
  });
480
480
  }
481
481
  }, Un = (e) => {
482
- kt({
482
+ jt({
483
483
  item: e,
484
484
  type: "folder"
485
485
  });
486
486
  }, Wn = async (e) => {
487
- if (z) try {
488
- z.type === "file" ? (await dn.mutateAsync({
489
- fileId: z.item.id,
487
+ if (R) try {
488
+ R.type === "file" ? (await fn.mutateAsync({
489
+ fileId: R.item.id,
490
490
  targetFolderId: e || null
491
- }), C.success(a(d, "files.file.move.success", "\"{{name}}\" moved", { name: z.item.name })), X("files.file.moved", {
492
- fileId: z.item.id,
493
- fileName: z.item.name,
491
+ }), x.success(o(f, "files.file.move.success", "\"{{name}}\" moved", { name: R.item.name })), Y("files.file.moved", {
492
+ fileId: R.item.id,
493
+ fileName: R.item.name,
494
494
  destinationFolderId: e
495
- })) : (await fn.mutateAsync({
496
- folderId: z.item.id,
495
+ })) : (await pn.mutateAsync({
496
+ folderId: R.item.id,
497
497
  targetParentFolderId: e
498
- }), C.success(a(d, "files.folder.move.success", "\"{{name}}\" moved", { name: z.item.name })), X("files.folder.moved", {
499
- folderId: z.item.id,
500
- folderName: z.item.name,
498
+ }), x.success(o(f, "files.folder.move.success", "\"{{name}}\" moved", { name: R.item.name })), Y("files.folder.moved", {
499
+ folderId: R.item.id,
500
+ folderName: R.item.name,
501
501
  destinationFolderId: e
502
- })), R(!1), Wt(null);
502
+ })), I(!1), Gt(null);
503
503
  } catch (e) {
504
- C.error(e instanceof Error ? e.message : a(d, "files.item.errors.moveFailed", "Failed to move \"{{name}}\"", { name: z.item.name })), X("files.api.failed", {
505
- action: z.type === "file" ? "moveFile" : "moveFolder",
506
- itemId: z.item.id,
507
- itemType: z.type,
504
+ x.error(e instanceof Error ? e.message : o(f, "files.item.errors.moveFailed", "Failed to move \"{{name}}\"", { name: R.item.name })), Y("files.api.failed", {
505
+ action: R.type === "file" ? "moveFile" : "moveFolder",
506
+ itemId: R.item.id,
507
+ itemType: R.type,
508
508
  message: e instanceof Error ? e.message : void 0
509
509
  });
510
510
  }
511
511
  }, Gn = async (e, t) => {
512
- if (B) try {
513
- if (B.type !== "file") throw Error(a(d, "files.folder.errors.copyUnsupported", "Folder copy is not supported"));
514
- await un.mutateAsync({
515
- id: B.item.id,
516
- newName: t || `Copy of ${B.item.name}`,
512
+ if (z) try {
513
+ if (z.type !== "file") throw Error(o(f, "files.folder.errors.copyUnsupported", "Folder copy is not supported"));
514
+ await dn.mutateAsync({
515
+ id: z.item.id,
516
+ newName: t || `Copy of ${z.item.name}`,
517
517
  targetFolderId: e || void 0
518
- }), C.success(a(d, "files.file.copy.success", "\"{{name}}\" copied", { name: B.item.name })), X("files.file.copied", {
519
- fileId: B.item.id,
520
- fileName: B.item.name,
518
+ }), x.success(o(f, "files.file.copy.success", "\"{{name}}\" copied", { name: z.item.name })), Y("files.file.copied", {
519
+ fileId: z.item.id,
520
+ fileName: z.item.name,
521
521
  destinationFolderId: e
522
- }), Vt(!1), Gt(null);
522
+ }), Ut(!1), Kt(null);
523
523
  } catch (e) {
524
- C.error(e instanceof Error ? e.message : a(d, "files.file.errors.copyFailed", "Failed to copy \"{{name}}\"", { name: B.item.name })), X("files.api.failed", {
524
+ x.error(e instanceof Error ? e.message : o(f, "files.file.errors.copyFailed", "Failed to copy \"{{name}}\"", { name: z.item.name })), Y("files.api.failed", {
525
525
  action: "copyFile",
526
- fileId: B.item.id,
526
+ fileId: z.item.id,
527
527
  message: e instanceof Error ? e.message : void 0
528
528
  });
529
529
  }
530
530
  }, Kn = async () => {
531
- if (V && U.trim()) try {
532
- let e = V.name, t = U.trim();
533
- V.type === "file" ? (await Q.mutateAsync({
534
- fileId: V.id,
531
+ if (B && H.trim()) try {
532
+ let e = B.name, t = H.trim();
533
+ B.type === "file" ? (await Z.mutateAsync({
534
+ fileId: B.id,
535
535
  newName: t
536
- }), C.success(a(d, "files.file.rename.success", "Renamed \"{{name}}\"", { name: t })), X("files.file.renamed", {
537
- fileId: V.id,
536
+ }), x.success(o(f, "files.file.rename.success", "Renamed \"{{name}}\"", { name: t })), Y("files.file.renamed", {
537
+ fileId: B.id,
538
538
  previousName: e,
539
539
  name: t
540
- })) : (await $.mutateAsync({
541
- folderId: V.id,
540
+ })) : (await Q.mutateAsync({
541
+ folderId: B.id,
542
542
  newName: t
543
- }), C.success(a(d, "files.folder.rename.success", "Renamed \"{{name}}\"", { name: t })), X("files.folder.renamed", {
544
- folderId: V.id,
543
+ }), x.success(o(f, "files.folder.rename.success", "Renamed \"{{name}}\"", { name: t })), Y("files.folder.renamed", {
544
+ folderId: B.id,
545
545
  previousName: e,
546
546
  name: t
547
- })), I(!1), H(null), W("");
547
+ })), P(!1), V(null), U("");
548
548
  } catch (e) {
549
- C.error(e instanceof Error ? e.message : a(d, "files.item.errors.renameFailed", "Failed to rename {{type}}", { type: V.type })), X("files.api.failed", {
550
- action: V.type === "file" ? "renameFile" : "renameFolder",
551
- itemId: V.id,
552
- itemType: V.type,
549
+ x.error(e instanceof Error ? e.message : o(f, "files.item.errors.renameFailed", "Failed to rename {{type}}", { type: B.type })), Y("files.api.failed", {
550
+ action: B.type === "file" ? "renameFile" : "renameFolder",
551
+ itemId: B.id,
552
+ itemType: B.type,
553
553
  message: e instanceof Error ? e.message : void 0
554
554
  });
555
555
  }
556
556
  };
557
- return ee({
558
- files: k,
559
- folders: A,
557
+ return r({
558
+ files: D,
559
+ folders: O,
560
560
  onFilePreview: Cn,
561
561
  onFileDelete: Dn,
562
562
  onFolderOpen: In,
563
563
  onFolderDelete: Ln,
564
564
  activeTab: v
565
- }), m === void 0 ? /* @__PURE__ */ l("div", {
565
+ }), h === void 0 ? /* @__PURE__ */ u("div", {
566
566
  className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
567
- children: [/* @__PURE__ */ c(s, { className: "size-8 animate-spin text-text-tertiary" }), /* @__PURE__ */ c("p", {
567
+ children: [/* @__PURE__ */ l(c, { className: "size-8 animate-spin text-text-tertiary" }), /* @__PURE__ */ l("p", {
568
568
  className: "text-sm text-text-secondary max-w-md",
569
- children: a(d, "files.browser.workspace.waiting", "Waiting for workspace context. If this persists, the app shell may not have provided a workspaceId to the Files module. Try reloading the page or switching workspaces.")
569
+ children: o(f, "files.browser.workspace.waiting", "Waiting for workspace context. If this persists, the app shell may not have provided a workspaceId to the Files module. Try reloading the page or switching workspaces.")
570
570
  })]
571
- }) : m === "" ? /* @__PURE__ */ l("div", {
571
+ }) : h === "" ? /* @__PURE__ */ u("div", {
572
572
  className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
573
- children: [/* @__PURE__ */ c(Je, { className: "size-8 text-text-tertiary" }), /* @__PURE__ */ c("p", {
573
+ children: [/* @__PURE__ */ l(qe, { className: "size-8 text-text-tertiary" }), /* @__PURE__ */ l("p", {
574
574
  className: "text-sm text-text-secondary max-w-md",
575
- children: a(d, "files.browser.workspace.notSelected", "No workspace selected. Please select a workspace to view files.")
575
+ children: o(f, "files.browser.workspace.notSelected", "No workspace selected. Please select a workspace to view files.")
576
576
  })]
577
- }) : /* @__PURE__ */ l("div", {
577
+ }) : /* @__PURE__ */ u("div", {
578
578
  className: "min-h-screen bg-bg-surface",
579
579
  children: [
580
- /* @__PURE__ */ l("div", {
580
+ /* @__PURE__ */ u("div", {
581
581
  className: "relative overflow-hidden bg-bg-surface border-b border-border-seam px-4 py-3 sm:px-6 sm:py-4",
582
582
  "data-tour": "files-breadcrumb-nav",
583
583
  children: [
584
- /* @__PURE__ */ c(ot, { intensity: "subtle" }),
585
- /* @__PURE__ */ c("h1", {
584
+ /* @__PURE__ */ l(at, { intensity: "subtle" }),
585
+ /* @__PURE__ */ l("h1", {
586
586
  className: "mb-2 text-lg font-semibold tracking-tight sm:text-xl",
587
- children: /* @__PURE__ */ c(lt, { children: a(d, "files.browser.rootLabel", "My Drive") })
587
+ children: /* @__PURE__ */ l(ct, { children: o(f, "files.browser.rootLabel", "My Drive") })
588
588
  }),
589
- /* @__PURE__ */ c("div", {
589
+ /* @__PURE__ */ l("div", {
590
590
  className: "flex items-center gap-2 sm:gap-4",
591
- children: /* @__PURE__ */ l("div", {
591
+ children: /* @__PURE__ */ u("div", {
592
592
  className: "flex items-center gap-1 sm:gap-2 text-sm overflow-x-auto",
593
- children: [/* @__PURE__ */ l("button", {
593
+ children: [/* @__PURE__ */ u("button", {
594
594
  type: "button",
595
- onClick: () => p("/files/browse"),
595
+ onClick: () => m("/files/browse"),
596
596
  className: "flex items-center gap-1 text-text-primary hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap",
597
- title: a(d, "files.browser.actions.goToRoot", "Go to root"),
598
- children: [/* @__PURE__ */ c(Xe, { className: "size-4" }), /* @__PURE__ */ c("span", {
597
+ title: o(f, "files.browser.actions.goToRoot", "Go to root"),
598
+ children: [/* @__PURE__ */ l(Ye, { className: "size-4" }), /* @__PURE__ */ l("span", {
599
599
  className: "hidden sm:inline",
600
- children: a(d, "files.browser.rootLabel", "My Drive")
600
+ children: o(f, "files.browser.rootLabel", "My Drive")
601
601
  })]
602
- }), Ct.map((e, t) => /* @__PURE__ */ l("div", {
602
+ }), St.map((e, t) => /* @__PURE__ */ u("div", {
603
603
  className: "flex items-center gap-1 sm:gap-2",
604
- children: [/* @__PURE__ */ c("span", {
604
+ children: [/* @__PURE__ */ l("span", {
605
605
  className: "text-text-tertiary",
606
606
  children: "/"
607
- }), /* @__PURE__ */ c("button", {
607
+ }), /* @__PURE__ */ l("button", {
608
608
  type: "button",
609
- onClick: () => p(`/files/browse/${e.id}`),
610
- className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t === Ct.length - 1 ? "text-text-primary font-medium" : "text-text-secondary"}`,
609
+ onClick: () => m(`/files/browse/${e.id}`),
610
+ className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t === St.length - 1 ? "text-text-primary font-medium" : "text-text-secondary"}`,
611
611
  title: `Go to ${e.name}`,
612
612
  children: e.name
613
613
  })]
614
614
  }, e.id))]
615
615
  })
616
616
  }),
617
- /* @__PURE__ */ c(pt, {
617
+ /* @__PURE__ */ l(ft, {
618
618
  className: "relative mt-2 max-w-3xl",
619
- children: a(d, "files.browser.purpose", "Your workspace drive: upload, organise and share documents, images, videos and more with your team. Browse folders, star what you use often, search across everything, and recover deleted items from the Bin.")
619
+ children: o(f, "files.browser.purpose", "Your workspace drive: upload, organise and share documents, images, videos and more with your team. Browse folders, star what you use often, search across everything, and recover deleted items from the Bin.")
620
620
  })
621
621
  ]
622
622
  }),
623
- !x && /* @__PURE__ */ c("div", {
623
+ !y && /* @__PURE__ */ l("div", {
624
624
  className: "px-4 pt-3 sm:px-6",
625
- children: /* @__PURE__ */ c(ft, {
625
+ children: /* @__PURE__ */ l(dt, {
626
626
  storageKey: "files-browser",
627
- title: a(d, "files.browser.nextSteps.title", "Get started with Files"),
627
+ title: o(f, "files.browser.nextSteps.title", "Get started with Files"),
628
628
  steps: [
629
629
  {
630
630
  id: "upload",
631
- label: a(d, "files.browser.nextSteps.upload.label", "Upload your first files"),
632
- description: a(d, "files.browser.nextSteps.upload.description", "Add documents, images or videos to this drive."),
633
- icon: /* @__PURE__ */ c(et, { className: "size-4" }),
634
- onClick: mn
631
+ label: o(f, "files.browser.nextSteps.upload.label", "Upload your first files"),
632
+ description: o(f, "files.browser.nextSteps.upload.description", "Add documents, images or videos to this drive."),
633
+ icon: /* @__PURE__ */ l($e, { className: "size-4" }),
634
+ onClick: hn
635
635
  },
636
636
  {
637
637
  id: "new-folder",
638
- label: a(d, "files.browser.nextSteps.newFolder.label", "Create a folder to organise"),
639
- description: a(d, "files.browser.nextSteps.newFolder.description", "Group related files so they are easy to find later."),
640
- icon: /* @__PURE__ */ c(Ke, { className: "size-4" }),
638
+ label: o(f, "files.browser.nextSteps.newFolder.label", "Create a folder to organise"),
639
+ description: o(f, "files.browser.nextSteps.newFolder.description", "Group related files so they are easy to find later."),
640
+ icon: /* @__PURE__ */ l(Ge, { className: "size-4" }),
641
641
  onClick: xn
642
642
  },
643
643
  {
644
644
  id: "starred",
645
- label: a(d, "files.browser.nextSteps.starred.label", "Star items you use often"),
646
- description: a(d, "files.browser.nextSteps.starred.description", "Starred files and folders show up under the Starred tab."),
647
- icon: /* @__PURE__ */ c(Qe, { className: "size-4" }),
648
- onClick: () => y("starred")
645
+ label: o(f, "files.browser.nextSteps.starred.label", "Star items you use often"),
646
+ description: o(f, "files.browser.nextSteps.starred.description", "Starred files and folders show up under the Starred tab."),
647
+ icon: /* @__PURE__ */ l(Ze, { className: "size-4" }),
648
+ onClick: () => wt("starred")
649
649
  },
650
650
  {
651
651
  id: "bin",
652
- label: a(d, "files.browser.nextSteps.bin.label", "Recover deleted items from the Bin"),
653
- description: a(d, "files.browser.nextSteps.bin.description", "Deleted files stay in the Bin so you can restore them."),
654
- icon: /* @__PURE__ */ c($e, { className: "size-4" }),
655
- onClick: () => y("bin")
652
+ label: o(f, "files.browser.nextSteps.bin.label", "Recover deleted items from the Bin"),
653
+ description: o(f, "files.browser.nextSteps.bin.description", "Deleted files stay in the Bin so you can restore them."),
654
+ icon: /* @__PURE__ */ l(Qe, { className: "size-4" }),
655
+ onClick: () => wt("bin")
656
656
  }
657
657
  ]
658
658
  })
659
659
  }),
660
- /* @__PURE__ */ c("div", {
660
+ /* @__PURE__ */ l("div", {
661
661
  "data-tour": "files-tab-bar",
662
- children: /* @__PURE__ */ c(De, {
662
+ children: /* @__PURE__ */ l(Te, {
663
663
  activeTab: v,
664
- onTabChange: y,
665
- tabs: wt
664
+ onTabChange: wt,
665
+ tabs: Tt
666
666
  })
667
667
  }),
668
- /* @__PURE__ */ l("div", {
668
+ /* @__PURE__ */ u("div", {
669
669
  className: "bg-bg-surface border-b border-border-seam px-4 py-2 sm:px-6 sm:py-3",
670
670
  children: [
671
- /* @__PURE__ */ l("div", {
671
+ /* @__PURE__ */ u("div", {
672
672
  className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 sm:gap-inline-gap",
673
- children: [/* @__PURE__ */ c("div", {
673
+ children: [/* @__PURE__ */ l("div", {
674
674
  className: "w-full sm:flex-1 min-w-0 order-2 sm:order-1",
675
675
  "data-tour": "files-search-bar",
676
- children: /* @__PURE__ */ c("div", {
676
+ children: /* @__PURE__ */ l("div", {
677
677
  className: "relative w-full max-w-2xl",
678
- children: /* @__PURE__ */ c(Ne, {
678
+ children: /* @__PURE__ */ l(je, {
679
679
  onSearch: (e, t) => {
680
- Tt(e), Dt(t);
680
+ Dt(e), kt(t);
681
681
  },
682
- placeholder: a(d, "files.search.input.placeholder", "Search files and folders..."),
683
- initialQuery: b,
682
+ placeholder: o(f, "files.search.input.placeholder", "Search files and folders..."),
683
+ initialQuery: Et,
684
684
  showFilters: !0
685
685
  })
686
686
  })
687
- }), /* @__PURE__ */ l("div", {
687
+ }), /* @__PURE__ */ u("div", {
688
688
  className: "flex items-center gap-2 order-1 sm:order-2 w-full sm:w-auto justify-between sm:justify-end",
689
- children: [!x && /* @__PURE__ */ l("div", {
689
+ children: [!y && /* @__PURE__ */ u("div", {
690
690
  className: "flex items-center gap-2",
691
691
  "data-tour": "files-upload-files-button",
692
- children: [/* @__PURE__ */ l(u, {
692
+ children: [/* @__PURE__ */ u(d, {
693
693
  type: "button",
694
694
  variant: "default",
695
- onClick: mn,
696
- disabled: Kt,
697
- children: [Kt ? /* @__PURE__ */ c(s, { className: "size-4 animate-spin" }) : /* @__PURE__ */ c(et, { className: "size-4" }), Kt ? a(d, "files.browser.upload.uploading", "Uploading...") : a(d, "files.browser.actions.uploadFiles", "Upload Files")]
698
- }), /* @__PURE__ */ c("div", {
695
+ onClick: hn,
696
+ disabled: qt,
697
+ children: [qt ? /* @__PURE__ */ l(c, { className: "size-4 animate-spin" }) : /* @__PURE__ */ l($e, { className: "size-4" }), qt ? o(f, "files.browser.upload.uploading", "Uploading...") : o(f, "files.browser.actions.uploadFiles", "Upload Files")]
698
+ }), /* @__PURE__ */ l("div", {
699
699
  "data-tour": "files-more-actions-trigger",
700
- children: /* @__PURE__ */ c(st, { actions: [
700
+ children: /* @__PURE__ */ l(ot, { actions: [
701
701
  {
702
- label: a(d, "files.browser.actions.newFolder", "New Folder"),
703
- icon: /* @__PURE__ */ c(Ke, { className: "size-4" }),
702
+ label: o(f, "files.browser.actions.newFolder", "New Folder"),
703
+ icon: /* @__PURE__ */ l(Ge, { className: "size-4" }),
704
704
  onSelect: xn,
705
705
  dataTour: "files-new-folder-button"
706
706
  },
707
707
  {
708
- label: a(d, "files.browser.actions.uploadFolder", "Upload Folder"),
709
- icon: /* @__PURE__ */ c(qe, { className: "size-4" }),
708
+ label: o(f, "files.browser.actions.uploadFolder", "Upload Folder"),
709
+ icon: /* @__PURE__ */ l(Ke, { className: "size-4" }),
710
710
  onSelect: bn,
711
- disabled: Kt
711
+ disabled: qt
712
712
  },
713
- ...k.length > 0 || A.length > 0 ? [{
714
- label: a(d, "files.browser.actions.selectAll", "Select All"),
713
+ ...D.length > 0 || O.length > 0 ? [{
714
+ label: o(f, "files.browser.actions.selectAll", "Select All"),
715
715
  onSelect: () => {
716
- let e = k.map((e) => e.id), t = A.map((e) => e.id);
717
- i.getState().selectAllFiles(e), t.forEach((e) => i.getState().selectFolder(e));
716
+ let e = D.map((e) => e.id), t = O.map((e) => e.id);
717
+ a.getState().selectAllFiles(e), t.forEach((e) => a.getState().selectFolder(e));
718
718
  }
719
719
  }] : []
720
720
  ] })
721
721
  })]
722
- }), /* @__PURE__ */ l("div", {
722
+ }), /* @__PURE__ */ u("div", {
723
723
  className: "flex items-center border border-border-seam rounded-lg overflow-hidden",
724
724
  "data-tour": "files-view-mode-toggle",
725
- children: [/* @__PURE__ */ c("button", {
725
+ children: [/* @__PURE__ */ l("button", {
726
726
  type: "button",
727
- onClick: () => St("grid"),
728
- className: `p-2 transition-colors duration-200 ${xt === "grid" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
729
- "aria-label": a(d, "files.browser.view.grid", "Grid view"),
730
- children: /* @__PURE__ */ c(Ye, { className: "size-5" })
731
- }), /* @__PURE__ */ c("button", {
727
+ onClick: () => xt("grid"),
728
+ className: `p-2 transition-colors duration-200 ${bt === "grid" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
729
+ "aria-label": o(f, "files.browser.view.grid", "Grid view"),
730
+ children: /* @__PURE__ */ l(Je, { className: "size-5" })
731
+ }), /* @__PURE__ */ l("button", {
732
732
  type: "button",
733
- onClick: () => St("list"),
734
- className: `p-2 transition-colors duration-200 ${xt === "list" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
735
- "aria-label": a(d, "files.browser.view.list", "List view"),
736
- children: /* @__PURE__ */ c(Ze, { className: "size-5" })
733
+ onClick: () => xt("list"),
734
+ className: `p-2 transition-colors duration-200 ${bt === "list" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
735
+ "aria-label": o(f, "files.browser.view.list", "List view"),
736
+ children: /* @__PURE__ */ l(Xe, { className: "size-5" })
737
737
  })]
738
738
  })]
739
739
  })]
740
740
  }),
741
- x && /* @__PURE__ */ l("div", {
741
+ y && /* @__PURE__ */ u("div", {
742
742
  className: "mt-3 flex items-center justify-between p-3 bg-status-success-bg-subtle rounded-lg border border-status-success-border transition-all duration-200",
743
- children: [/* @__PURE__ */ l("span", {
743
+ children: [/* @__PURE__ */ u("span", {
744
744
  className: "text-sm font-medium text-status-success-text",
745
- children: [a(d, "files.browser.search.showingResults", "Showing search results for \"{{query}}\"", { query: b }), O.data && ` (${(O.data.files?.length || 0) + (O.data.folders?.length || 0)} items)`]
746
- }), /* @__PURE__ */ l("button", {
745
+ children: [o(f, "files.browser.search.showingResults", "Showing search results for \"{{query}}\"", { query: Et }), E.data && ` (${(E.data.files?.length || 0) + (E.data.folders?.length || 0)} items)`]
746
+ }), /* @__PURE__ */ u("button", {
747
747
  type: "button",
748
- onClick: () => Tt(""),
748
+ onClick: () => Dt(""),
749
749
  className: "flex items-center gap-2 text-status-success-text hover:text-status-success-text/80 text-sm font-medium transition-colors duration-200",
750
- children: [/* @__PURE__ */ c(tt, { className: "size-4" }), a(d, "files.browser.search.clear", "Clear search")]
750
+ children: [/* @__PURE__ */ l(et, { className: "size-4" }), o(f, "files.browser.search.clear", "Clear search")]
751
751
  })]
752
752
  }),
753
- P > 0 && /* @__PURE__ */ l(ct, {
753
+ M > 0 && /* @__PURE__ */ u(st, {
754
754
  className: "mt-3 flex items-center justify-between p-3",
755
- children: [/* @__PURE__ */ l("div", {
755
+ children: [/* @__PURE__ */ u("div", {
756
756
  className: "flex items-center gap-4",
757
- children: [/* @__PURE__ */ c("span", {
757
+ children: [/* @__PURE__ */ l("span", {
758
758
  className: "text-sm font-medium text-text-primary",
759
- children: a(d, "files.browser.selection.selectedCount", "{{count}} item{{suffix}} selected", {
760
- count: P,
761
- suffix: P > 1 ? "s" : ""
759
+ children: o(f, "files.browser.selection.selectedCount", "{{count}} item{{suffix}} selected", {
760
+ count: M,
761
+ suffix: M > 1 ? "s" : ""
762
762
  })
763
- }), /* @__PURE__ */ c("div", {
763
+ }), /* @__PURE__ */ l("div", {
764
764
  className: "flex items-center gap-2",
765
- children: v === "bin" ? /* @__PURE__ */ l(nt, { children: [/* @__PURE__ */ c("button", {
765
+ children: v === "bin" ? /* @__PURE__ */ u(tt, { children: [/* @__PURE__ */ l("button", {
766
766
  type: "button",
767
767
  onClick: async () => {
768
768
  try {
769
- await Promise.all([...Array.from(h).map((e) => nn.mutateAsync({ id: e })), ...Array.from(g).map((e) => rn.mutateAsync({ id: e }))]), _(), C.success(`${P} item${P > 1 ? "s" : ""} restored`);
769
+ await Promise.all([...Array.from(g).map((e) => rn.mutateAsync({ id: e })), ...Array.from(_).map((e) => an.mutateAsync({ id: e }))]), Ct(), x.success(`${M} item${M > 1 ? "s" : ""} restored`);
770
770
  } catch (e) {
771
- C.error(e instanceof Error ? e.message : "Failed to restore some items");
771
+ x.error(e instanceof Error ? e.message : "Failed to restore some items");
772
772
  }
773
773
  },
774
774
  className: "flex items-center gap-1.5 rounded-lg border border-status-success-border bg-bg-surface px-3 py-1.5 text-sm font-medium text-status-success-text transition-colors duration-200 hover:bg-status-success-bg-subtle",
775
- children: a(d, "files.browser.selection.actions.restore", "Restore")
776
- }), /* @__PURE__ */ l("button", {
775
+ children: o(f, "files.browser.selection.actions.restore", "Restore")
776
+ }), /* @__PURE__ */ u("button", {
777
777
  type: "button",
778
778
  onClick: async () => {
779
- Y({
780
- title: a(d, "files.confirm.bulkPermanentDelete.title", "Permanently delete selected items"),
781
- description: a(d, "files.confirm.bulkPermanentDelete.description", "Permanently delete {{count}} selected item{{plural}}? This cannot be undone.", {
782
- count: P,
783
- plural: P > 1 ? "s" : ""
779
+ J({
780
+ title: o(f, "files.confirm.bulkPermanentDelete.title", "Permanently delete selected items"),
781
+ description: o(f, "files.confirm.bulkPermanentDelete.description", "Permanently delete {{count}} selected item{{plural}}? This cannot be undone.", {
782
+ count: M,
783
+ plural: M > 1 ? "s" : ""
784
784
  }),
785
- confirmLabel: a(d, "files.common.actions.deletePermanently", "Delete permanently"),
785
+ confirmLabel: o(f, "files.common.actions.deletePermanently", "Delete permanently"),
786
786
  variant: "danger",
787
787
  onConfirm: async () => {
788
788
  try {
789
- await Promise.all([...Array.from(h).map((e) => an.mutateAsync({ id: e })), ...Array.from(g).map((e) => on.mutateAsync({ id: e }))]), _(), C.success(a(d, "files.bulk.permanentDelete.success", "{{count}} item{{plural}} deleted permanently", {
790
- count: P,
791
- plural: P > 1 ? "s" : ""
789
+ await Promise.all([...Array.from(g).map((e) => on.mutateAsync({ id: e })), ...Array.from(_).map((e) => sn.mutateAsync({ id: e }))]), Ct(), x.success(o(f, "files.bulk.permanentDelete.success", "{{count}} item{{plural}} deleted permanently", {
790
+ count: M,
791
+ plural: M > 1 ? "s" : ""
792
792
  }));
793
793
  } catch (e) {
794
- C.error(e instanceof Error ? e.message : a(d, "files.bulk.errors.permanentDeleteFailed", "Failed to permanently delete some items"));
794
+ x.error(e instanceof Error ? e.message : o(f, "files.bulk.errors.permanentDeleteFailed", "Failed to permanently delete some items"));
795
795
  }
796
796
  }
797
797
  });
798
798
  },
799
799
  className: "flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-status-error-text bg-bg-surface border border-status-error-border rounded-lg hover:bg-status-error-bg-subtle transition-colors duration-200",
800
- children: [/* @__PURE__ */ c($e, { className: "size-4" }), a(d, "files.browser.selection.actions.deletePermanently", "Delete permanently")]
801
- })] }) : /* @__PURE__ */ l("button", {
800
+ children: [/* @__PURE__ */ l(Qe, { className: "size-4" }), o(f, "files.browser.selection.actions.deletePermanently", "Delete permanently")]
801
+ })] }) : /* @__PURE__ */ u("button", {
802
802
  type: "button",
803
803
  onClick: async () => {
804
- Y({
805
- title: a(d, "files.confirm.bulkDelete.title", "Delete selected items"),
806
- description: a(d, "files.confirm.bulkDelete.description", "Move {{count}} selected item{{plural}} to the bin?", {
807
- count: P,
808
- plural: P > 1 ? "s" : ""
804
+ J({
805
+ title: o(f, "files.confirm.bulkDelete.title", "Delete selected items"),
806
+ description: o(f, "files.confirm.bulkDelete.description", "Move {{count}} selected item{{plural}} to the bin?", {
807
+ count: M,
808
+ plural: M > 1 ? "s" : ""
809
809
  }),
810
- confirmLabel: a(d, "files.common.actions.delete", "Delete"),
810
+ confirmLabel: o(f, "files.common.actions.delete", "Delete"),
811
811
  variant: "danger",
812
812
  onConfirm: async () => {
813
813
  try {
814
- let e = Array.from(h), t = Array.from(g);
815
- e.length > 0 && await pn.mutateAsync(e), await Promise.all(t.map((e) => tn.mutateAsync({
814
+ let e = Array.from(g), t = Array.from(_);
815
+ e.length > 0 && await mn.mutateAsync(e), await Promise.all(t.map((e) => nn.mutateAsync({
816
816
  id: e,
817
817
  recursive: !0
818
- }))), _(), C.success(a(d, "files.bulk.delete.success", "{{count}} item{{plural}} moved to bin", {
819
- count: P,
820
- plural: P > 1 ? "s" : ""
818
+ }))), Ct(), x.success(o(f, "files.bulk.delete.success", "{{count}} item{{plural}} moved to bin", {
819
+ count: M,
820
+ plural: M > 1 ? "s" : ""
821
821
  }));
822
822
  } catch (e) {
823
- C.error(e instanceof Error ? e.message : a(d, "files.bulk.errors.deleteFailed", "Failed to delete some items"));
823
+ x.error(e instanceof Error ? e.message : o(f, "files.bulk.errors.deleteFailed", "Failed to delete some items"));
824
824
  }
825
825
  }
826
826
  });
827
827
  },
828
828
  className: "flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-status-error-text bg-bg-surface border border-status-error-border rounded-lg hover:bg-status-error-bg-subtle transition-colors duration-200",
829
- children: [/* @__PURE__ */ c($e, { className: "size-4" }), a(d, "files.browser.selection.actions.delete", "Delete")]
829
+ children: [/* @__PURE__ */ l(Qe, { className: "size-4" }), o(f, "files.browser.selection.actions.delete", "Delete")]
830
830
  })
831
831
  })]
832
- }), /* @__PURE__ */ l("button", {
832
+ }), /* @__PURE__ */ u("button", {
833
833
  type: "button",
834
- onClick: _,
834
+ onClick: Ct,
835
835
  className: "flex items-center gap-2 text-text-link hover:text-action-primary-bg-hover text-sm font-medium transition-colors duration-200",
836
- children: [/* @__PURE__ */ c(tt, { className: "size-4" }), a(d, "files.common.actions.clear", "Clear")]
836
+ children: [/* @__PURE__ */ l(et, { className: "size-4" }), o(f, "files.common.actions.clear", "Clear")]
837
837
  })]
838
838
  })
839
839
  ]
840
840
  }),
841
- (bt.isExhausted || bt.isNearLimit) && /* @__PURE__ */ c("div", {
841
+ (yt.isExhausted || yt.isNearLimit) && /* @__PURE__ */ l("div", {
842
842
  className: "px-4 sm:px-6 pt-3",
843
- children: /* @__PURE__ */ c(Re, { quota: bt })
843
+ children: /* @__PURE__ */ l(Ie, { quota: yt })
844
844
  }),
845
- /* @__PURE__ */ l("div", {
845
+ /* @__PURE__ */ u("div", {
846
846
  className: "px-2 sm:px-4 md:px-6 py-3 sm:py-4",
847
847
  "data-tour": "files-browser-grid",
848
- children: [/* @__PURE__ */ c(Ee, {
849
- files: k,
850
- folders: A,
851
- loading: j,
852
- error: M,
853
- preserveSortOrder: N,
848
+ children: [/* @__PURE__ */ l(Ce, {
849
+ files: D,
850
+ folders: O,
851
+ loading: k,
852
+ error: A,
853
+ preserveSortOrder: j,
854
854
  onFilePreview: Cn,
855
855
  onFileShare: v === "bin" ? void 0 : wn,
856
856
  onFileDelete: v === "bin" ? kn : Dn,
@@ -869,208 +869,207 @@ function d() {
869
869
  onFolderFavorite: v === "bin" ? void 0 : Hn,
870
870
  onFolderMove: v === "bin" ? void 0 : Vn,
871
871
  onFolderInfo: Un
872
- }), !j && (k.length > 0 || A.length > 0) && /* @__PURE__ */ l("div", {
872
+ }), !k && (D.length > 0 || O.length > 0) && /* @__PURE__ */ u("div", {
873
873
  className: "mt-4 px-2 text-sm text-text-secondary",
874
- children: [a(d, "files.browser.results.showingItems", "Showing {{count}} items", { count: k.length + A.length }), !x && v === "all" && jt !== null && ` ${a(d, "files.browser.results.ofItems", "of {{count}} items", { count: jt })}`]
874
+ children: [o(f, "files.browser.results.showingItems", "Showing {{count}} items", { count: D.length + O.length }), !y && v === "all" && Nt !== null && ` ${o(f, "files.browser.results.ofItems", "of {{count}} items", { count: Nt })}`]
875
875
  })]
876
876
  }),
877
- Mt && /* @__PURE__ */ c(mt, {
877
+ Pt && /* @__PURE__ */ l(pt, {
878
878
  open: !0,
879
879
  onOpenChange: (e) => {
880
- !e && !Z.isPending && (F(!1), K(""));
880
+ !e && !X.isPending && (N(!1), G(""));
881
881
  },
882
- children: /* @__PURE__ */ l(ht, {
882
+ children: /* @__PURE__ */ u(mt, {
883
883
  className: "w-full max-w-xs",
884
884
  children: [
885
- /* @__PURE__ */ c(_t, {
885
+ /* @__PURE__ */ l(gt, {
886
886
  className: "text-left",
887
- children: /* @__PURE__ */ c(vt, {
887
+ children: /* @__PURE__ */ l(_t, {
888
888
  id: "files-new-folder-title",
889
889
  className: "text-base font-semibold text-text-primary",
890
- children: a(d, "files.browser.newFolderDialog.title", "New folder")
890
+ children: o(f, "files.browser.newFolderDialog.title", "New folder")
891
891
  })
892
892
  }),
893
- /* @__PURE__ */ c(dt, {
893
+ /* @__PURE__ */ l(ut, {
894
894
  type: "text",
895
- value: G,
896
- onChange: (e) => K(e.target.value),
895
+ value: W,
896
+ onChange: (e) => G(e.target.value),
897
897
  onKeyDown: (e) => {
898
898
  e.key === "Enter" && Sn();
899
899
  },
900
- "aria-label": a(d, "files.browser.newFolderDialog.title", "New folder"),
901
- placeholder: a(d, "files.browser.newFolderDialog.placeholder", "Folder name")
900
+ "aria-label": o(f, "files.browser.newFolderDialog.title", "New folder"),
901
+ placeholder: o(f, "files.browser.newFolderDialog.placeholder", "Folder name")
902
902
  }),
903
- /* @__PURE__ */ l(gt, { children: [/* @__PURE__ */ c(u, {
903
+ /* @__PURE__ */ u(ht, { children: [/* @__PURE__ */ l(d, {
904
904
  type: "button",
905
905
  variant: "outline",
906
906
  onClick: () => {
907
- F(!1), K("");
907
+ N(!1), G("");
908
908
  },
909
- children: a(d, "files.common.actions.cancel", "Cancel")
910
- }), /* @__PURE__ */ l(u, {
909
+ children: o(f, "files.common.actions.cancel", "Cancel")
910
+ }), /* @__PURE__ */ u(d, {
911
911
  type: "button",
912
912
  onClick: Sn,
913
- disabled: !G.trim() || Z.isPending,
914
- children: [Z.isPending && /* @__PURE__ */ c(s, { className: "size-4 animate-spin" }), Z.isPending ? a(d, "files.browser.newFolderDialog.actions.creating", "Creating...") : a(d, "files.common.actions.create", "Create")]
913
+ disabled: !W.trim() || X.isPending,
914
+ children: [X.isPending && /* @__PURE__ */ l(c, { className: "size-4 animate-spin" }), X.isPending ? o(f, "files.browser.newFolderDialog.actions.creating", "Creating...") : o(f, "files.common.actions.create", "Create")]
915
915
  })] })
916
916
  ]
917
917
  })
918
918
  }),
919
- Lt && V && /* @__PURE__ */ c(mt, {
919
+ zt && B && /* @__PURE__ */ l(pt, {
920
920
  open: !0,
921
921
  onOpenChange: (e) => {
922
- !e && !Q.isPending && !$.isPending && (I(!1), H(null), W(""));
922
+ e || Z.isPending || Q.isPending || (P(!1), V(null), U(""));
923
923
  },
924
- children: /* @__PURE__ */ l(ht, {
924
+ children: /* @__PURE__ */ u(mt, {
925
925
  className: "w-full max-w-xs",
926
926
  children: [
927
- /* @__PURE__ */ c(_t, {
927
+ /* @__PURE__ */ l(gt, {
928
928
  className: "text-left",
929
- children: /* @__PURE__ */ c(vt, {
929
+ children: /* @__PURE__ */ l(_t, {
930
930
  id: "files-rename-title",
931
931
  className: "text-base font-semibold text-text-primary",
932
- children: a(d, "files.browser.renameDialog.title", "Rename {{type}}", { type: V.type })
932
+ children: o(f, "files.browser.renameDialog.title", "Rename {{type}}", { type: B.type })
933
933
  })
934
934
  }),
935
- /* @__PURE__ */ c(dt, {
935
+ /* @__PURE__ */ l(ut, {
936
936
  type: "text",
937
- value: U,
938
- onChange: (e) => W(e.target.value),
937
+ value: H,
938
+ onChange: (e) => U(e.target.value),
939
939
  onKeyDown: (e) => {
940
940
  e.key === "Enter" && Kn();
941
941
  },
942
- "aria-label": a(d, "files.browser.renameDialog.title", "Rename"),
943
- placeholder: a(d, "files.browser.renameDialog.placeholder", "New name")
942
+ "aria-label": o(f, "files.browser.renameDialog.title", "Rename"),
943
+ placeholder: o(f, "files.browser.renameDialog.placeholder", "New name")
944
944
  }),
945
- /* @__PURE__ */ l(gt, { children: [/* @__PURE__ */ c(u, {
945
+ /* @__PURE__ */ u(ht, { children: [/* @__PURE__ */ l(d, {
946
946
  type: "button",
947
947
  variant: "outline",
948
948
  onClick: () => {
949
- I(!1), H(null), W("");
949
+ P(!1), V(null), U("");
950
950
  },
951
- children: a(d, "files.common.actions.cancel", "Cancel")
952
- }), /* @__PURE__ */ l(u, {
951
+ children: o(f, "files.common.actions.cancel", "Cancel")
952
+ }), /* @__PURE__ */ u(d, {
953
953
  type: "button",
954
954
  onClick: Kn,
955
- disabled: !U.trim() || U.trim() === V.name || Q.isPending || $.isPending,
956
- children: [(Q.isPending || $.isPending) && /* @__PURE__ */ c(s, { className: "size-4 animate-spin" }), Q.isPending || $.isPending ? a(d, "files.browser.renameDialog.actions.renaming", "Renaming...") : a(d, "files.common.actions.rename", "Rename")]
955
+ disabled: !H.trim() || H.trim() === B.name || Z.isPending || Q.isPending,
956
+ children: [(Z.isPending || Q.isPending) && /* @__PURE__ */ l(c, { className: "size-4 animate-spin" }), Z.isPending || Q.isPending ? o(f, "files.browser.renameDialog.actions.renaming", "Renaming...") : o(f, "files.common.actions.rename", "Rename")]
957
957
  })] })
958
958
  ]
959
959
  })
960
960
  }),
961
- Rt && Ht && /* @__PURE__ */ c(Oe, {
962
- item: Ht,
963
- itemType: "mimeType" in Ht ? "file" : "folder",
961
+ Bt && Wt && /* @__PURE__ */ l(Ee, {
962
+ item: Wt,
963
+ itemType: "mimeType" in Wt ? "file" : "folder",
964
964
  onClose: () => {
965
- L(!1), Ut(null);
965
+ F(!1), L(null);
966
966
  },
967
967
  onCreateShare: En,
968
- isLoading: cn.isPending
968
+ isLoading: ln.isPending
969
969
  }),
970
- J && /* @__PURE__ */ c(Ie, {
971
- title: J.title,
972
- description: J.description,
973
- confirmLabel: J.confirmLabel,
974
- cancelLabel: a(d, "files.common.actions.cancel", "Cancel"),
975
- variant: J.variant,
976
- loading: J.loading,
977
- onConfirm: Qt,
970
+ q && /* @__PURE__ */ l(Pe, {
971
+ title: q.title,
972
+ description: q.description,
973
+ confirmLabel: q.confirmLabel,
974
+ cancelLabel: o(f, "files.common.actions.cancel", "Cancel"),
975
+ variant: q.variant,
976
+ loading: q.loading,
977
+ onConfirm: $t,
978
978
  onCancel: () => {
979
- J.loading || Y(null);
979
+ q.loading || J(null);
980
980
  }
981
981
  }),
982
- Nt && /* @__PURE__ */ c(Ie, {
983
- title: a(d, "files.folder.quota.title", "Folder Limit Reached"),
984
- description: a(d, "files.folder.quota.description", "You've reached the folder limit for your plan. Upgrade your plan or purchase an add-on to create more folders."),
985
- confirmLabel: a(d, "files.folder.quota.upgrade", "View Billing"),
986
- cancelLabel: a(d, "files.common.actions.dismiss", "Dismiss"),
982
+ Ft && /* @__PURE__ */ l(Pe, {
983
+ title: o(f, "files.folder.quota.title", "Folder Limit Reached"),
984
+ description: o(f, "files.folder.quota.description", "You've reached the folder limit for your plan. Upgrade your plan or purchase an add-on to create more folders."),
985
+ confirmLabel: o(f, "files.folder.quota.upgrade", "View Billing"),
986
+ cancelLabel: o(f, "files.common.actions.dismiss", "Dismiss"),
987
987
  onConfirm: () => {
988
- Pt(!1), p("/billing");
988
+ It(!1), m("/billing");
989
989
  },
990
- onCancel: () => Pt(!1)
990
+ onCancel: () => It(!1)
991
991
  }),
992
- Ft && /* @__PURE__ */ c(Ie, {
993
- title: a(d, "files.storage.quota.title", "Storage Limit Reached"),
994
- description: a(d, "files.storage.quota.description", "You've reached the storage limit for your plan. Upgrade your plan or delete files to continue uploading."),
995
- confirmLabel: a(d, "files.storage.quota.upgrade", "View Billing"),
996
- cancelLabel: a(d, "files.common.actions.dismiss", "Dismiss"),
992
+ Lt && /* @__PURE__ */ l(Pe, {
993
+ title: o(f, "files.storage.quota.title", "Storage Limit Reached"),
994
+ description: o(f, "files.storage.quota.description", "You've reached the storage limit for your plan. Upgrade your plan or delete files to continue uploading."),
995
+ confirmLabel: o(f, "files.storage.quota.upgrade", "View Billing"),
996
+ cancelLabel: o(f, "files.common.actions.dismiss", "Dismiss"),
997
997
  onConfirm: () => {
998
- It(!1), p("/billing");
998
+ Rt(!1), m("/billing");
999
999
  },
1000
- onCancel: () => It(!1)
1000
+ onCancel: () => Rt(!1)
1001
1001
  }),
1002
- zt && z && /* @__PURE__ */ c(Pe, {
1003
- item: z.item,
1004
- type: z.type,
1002
+ Vt && R && /* @__PURE__ */ l(Me, {
1003
+ item: R.item,
1004
+ type: R.type,
1005
1005
  onClose: () => {
1006
- R(!1), Wt(null);
1006
+ I(!1), Gt(null);
1007
1007
  },
1008
1008
  onMove: Wn,
1009
- isLoading: dn.isPending || fn.isPending
1009
+ isLoading: fn.isPending || pn.isPending
1010
1010
  }),
1011
- Bt && B && /* @__PURE__ */ c(Fe, {
1012
- item: B.item,
1013
- type: B.type,
1011
+ Ht && z && /* @__PURE__ */ l(Ne, {
1012
+ item: z.item,
1013
+ type: z.type,
1014
1014
  onClose: () => {
1015
- Vt(!1), Gt(null);
1015
+ Ut(!1), Kt(null);
1016
1016
  },
1017
1017
  onCopy: Gn,
1018
- isLoading: un.isPending
1018
+ isLoading: dn.isPending
1019
1019
  }),
1020
- S && /* @__PURE__ */ c(ke, {
1021
- file: S,
1022
- onClose: () => At(null),
1020
+ b && /* @__PURE__ */ l(De, {
1021
+ file: b,
1022
+ onClose: () => Mt(null),
1023
1023
  onDownload: () => {
1024
- let e = S.downloadUrl || S.url;
1025
- e && He(e);
1024
+ let e = b.downloadUrl || b.url;
1025
+ e && Ve(e);
1026
1026
  },
1027
1027
  onShare: v === "bin" ? void 0 : () => {
1028
- Ut(S), L(!0);
1028
+ L(b), F(!0);
1029
1029
  },
1030
- onStar: v === "bin" ? void 0 : () => An(S),
1031
- onDelete: () => v === "bin" ? kn(S) : Dn(S)
1030
+ onStar: v === "bin" ? void 0 : () => An(b),
1031
+ onDelete: () => v === "bin" ? kn(b) : Dn(b)
1032
1032
  }),
1033
- Ot && /* @__PURE__ */ c(Ae, {
1034
- item: Ot.item,
1035
- type: Ot.type,
1036
- onClose: () => kt(null)
1033
+ At && /* @__PURE__ */ l(Oe, {
1034
+ item: At.item,
1035
+ type: At.type,
1036
+ onClose: () => jt(null)
1037
1037
  }),
1038
- /* @__PURE__ */ c(Le, {
1039
- items: qt,
1040
- isOpen: Jt,
1041
- onClose: () => Xt(!1),
1038
+ /* @__PURE__ */ l(Fe, {
1039
+ items: Jt,
1040
+ isOpen: Yt,
1041
+ onClose: () => Zt(!1),
1042
1042
  onPause: gn,
1043
1043
  onResume: _n,
1044
1044
  onRetry: vn,
1045
1045
  onCancel: yn
1046
1046
  }),
1047
- /* @__PURE__ */ c(Me, {
1048
- toasts: C.toasts,
1049
- onClose: C.removeToast
1047
+ /* @__PURE__ */ l(Ae, {
1048
+ toasts: x.toasts,
1049
+ onClose: x.removeToast
1050
1050
  }),
1051
- !j && k.length === 0 && A.length === 0 && /* @__PURE__ */ c("div", {
1051
+ !k && D.length === 0 && O.length === 0 && /* @__PURE__ */ l("div", {
1052
1052
  className: "px-6 py-12",
1053
- children: x ? /* @__PURE__ */ c(ut, {
1053
+ children: y ? /* @__PURE__ */ l(lt, {
1054
1054
  illustration: "empty-search",
1055
- title: a(d, "files.browser.empty.search.title", "No results found"),
1056
- description: a(d, "files.browser.empty.search.description", "Try adjusting your search query or filters"),
1057
- action: /* @__PURE__ */ c(u, {
1055
+ title: o(f, "files.browser.empty.search.title", "No results found"),
1056
+ description: o(f, "files.browser.empty.search.description", "Try adjusting your search query or filters"),
1057
+ action: /* @__PURE__ */ l(d, {
1058
1058
  type: "button",
1059
1059
  onClick: () => {
1060
- Tt(""), Dt(void 0);
1060
+ Dt(""), kt(void 0);
1061
1061
  },
1062
- children: a(d, "files.browser.search.clear", "Clear search")
1062
+ children: o(f, "files.browser.search.clear", "Clear search")
1063
1063
  })
1064
- }) : /* @__PURE__ */ c(je, {
1064
+ }) : /* @__PURE__ */ l(ke, {
1065
1065
  type: v,
1066
- onUpload: v === "all" ? mn : void 0,
1066
+ onUpload: v === "all" ? hn : void 0,
1067
1067
  onNewFolder: v === "all" ? xn : void 0
1068
1068
  })
1069
1069
  })
1070
1070
  ]
1071
1071
  });
1072
1072
  }
1073
- //#endregion
1074
- export { d as BrowserPage };
1073
+ export { f as BrowserPage };
1075
1074
 
1076
1075
  //# sourceMappingURL=BrowserPage.js.map