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