@opencloud-eu/web-pkg 6.0.0 → 6.1.0

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 (204) hide show
  1. package/dist/TextEditor-B0ZZfO_w.js +819 -0
  2. package/dist/assets/worker-BVTM6bn-.js +1 -0
  3. package/dist/assets/worker-C-Nrpmiq.js +24 -0
  4. package/dist/assets/worker-CzI1mBNb.js +24 -0
  5. package/dist/assets/worker-DDmV-och.js +24 -0
  6. package/dist/composables-TkULFBg4.js +20165 -0
  7. package/dist/src/apps/types.d.ts +9 -9
  8. package/dist/src/components/AppBar/AppBar.vue.d.ts +154 -97
  9. package/dist/src/components/AppLoadingSpinner.vue.d.ts +2 -1
  10. package/dist/src/components/AppTemplates/AppWrapper.vue.d.ts +37 -33
  11. package/dist/src/components/AppTemplates/AppWrapperRoute.d.ts +1 -1
  12. package/dist/src/components/AppTemplates/PartialViews/ErrorScreen.vue.d.ts +5 -4
  13. package/dist/src/components/AppTemplates/PartialViews/LoadingScreen.vue.d.ts +2 -1
  14. package/dist/src/components/AppTopBar.vue.d.ts +13 -4
  15. package/dist/src/components/Avatars/AvatarUpload.vue.d.ts +3 -4
  16. package/dist/src/components/Avatars/UserAvatar.vue.d.ts +11 -1
  17. package/dist/src/components/BatchActions.vue.d.ts +16 -15
  18. package/dist/src/components/ContextActions/ActionMenuDropItem.vue.d.ts +11 -2
  19. package/dist/src/components/ContextActions/ActionMenuItem.vue.d.ts +9 -8
  20. package/dist/src/components/ContextActions/ContextActionMenu.vue.d.ts +41 -22
  21. package/dist/src/components/ContextActions/ContextMenuQuickAction.vue.d.ts +143 -388
  22. package/dist/src/components/CreateLinkModal.vue.d.ts +17 -7
  23. package/dist/src/components/CreateShortcutModal.vue.d.ts +160 -149
  24. package/dist/src/components/CustomComponentTarget.vue.d.ts +10 -1
  25. package/dist/src/components/FilesList/ContextActions.vue.d.ts +56 -37
  26. package/dist/src/components/FilesList/ResourceGhostElement.vue.d.ts +22 -11
  27. package/dist/src/components/FilesList/ResourceIcon.vue.d.ts +10 -1
  28. package/dist/src/components/FilesList/ResourceLink.vue.d.ts +7 -6
  29. package/dist/src/components/FilesList/ResourceListItem.vue.d.ts +13 -4
  30. package/dist/src/components/FilesList/ResourceName.vue.d.ts +10 -1
  31. package/dist/src/components/FilesList/ResourceSize.vue.d.ts +6 -5
  32. package/dist/src/components/FilesList/ResourceStatusIndicators.vue.d.ts +10 -1
  33. package/dist/src/components/FilesList/ResourceTable.vue.d.ts +51 -154
  34. package/dist/src/components/FilesList/ResourceTile.vue.d.ts +37 -153
  35. package/dist/src/components/FilesList/ResourceTiles.vue.d.ts +34 -119
  36. package/dist/src/components/Filters/DateFilter.vue.d.ts +32 -495
  37. package/dist/src/components/Filters/ItemFilterInline.vue.d.ts +6 -5
  38. package/dist/src/components/Groupware/Accounts/AccountsSwitch.vue.d.ts +3 -0
  39. package/dist/src/components/Groupware/Accounts/index.d.ts +1 -0
  40. package/dist/src/components/Groupware/index.d.ts +1 -0
  41. package/dist/src/components/ItemFilter.vue.d.ts +19 -204
  42. package/dist/src/components/ItemFilterToggle.vue.d.ts +6 -5
  43. package/dist/src/components/LinkRoleDropdown.vue.d.ts +7 -6
  44. package/dist/src/components/LoadingIndicator.vue.d.ts +5 -4
  45. package/dist/src/components/Modals/DatePickerModal.vue.d.ts +8 -7
  46. package/dist/src/components/Modals/EmojiPickerModal.vue.d.ts +6 -5
  47. package/dist/src/components/Modals/FilePickerModal.vue.d.ts +8 -7
  48. package/dist/src/components/Modals/ResourceConflictModal.vue.d.ts +9 -8
  49. package/dist/src/components/Modals/SaveAsModal.vue.d.ts +8 -7
  50. package/dist/src/components/Modals/SpaceMoveInfoModal.vue.d.ts +5 -4
  51. package/dist/src/components/Modals/UnsavedChangesModal.vue.d.ts +5 -4
  52. package/dist/src/components/Navigation/MobileNav.vue.d.ts +2 -1
  53. package/dist/src/components/NoContentMessage.vue.d.ts +17 -12
  54. package/dist/src/components/Pagination.vue.d.ts +5 -4
  55. package/dist/src/components/QuotaSelect.vue.d.ts +7 -6
  56. package/dist/src/components/Search/ResourcePreview.vue.d.ts +10 -41
  57. package/dist/src/components/SearchBarFilter.vue.d.ts +7 -6
  58. package/dist/src/components/SideBar/CompareSaveDialog.vue.d.ts +6 -5
  59. package/dist/src/components/SideBar/FileSideBar.vue.d.ts +10 -76
  60. package/dist/src/components/SideBar/Files/FileInfo.vue.d.ts +10 -1
  61. package/dist/src/components/SideBar/SideBar.vue.d.ts +20 -21
  62. package/dist/src/components/SideBar/SideBarPanels.vue.d.ts +21 -22
  63. package/dist/src/components/SideBar/Spaces/Details/SpaceDetails.vue.d.ts +10 -1
  64. package/dist/src/components/SideBar/Spaces/Details/SpaceDetailsMultiple.vue.d.ts +10 -1
  65. package/dist/src/components/SideBar/Spaces/SpaceInfo.vue.d.ts +2 -1
  66. package/dist/src/components/SideBar/Spaces/SpaceNoSelection.vue.d.ts +2 -1
  67. package/dist/src/components/SideBar/WebDavDetails.vue.d.ts +7 -6
  68. package/dist/src/components/SpaceQuota.vue.d.ts +10 -1
  69. package/dist/src/components/Spaces/QuotaModal.vue.d.ts +13 -4
  70. package/dist/src/components/Spaces/SpaceImageModal.vue.d.ts +12 -4
  71. package/dist/src/components/TextEditor/TextEditor.vue.d.ts +26 -0
  72. package/dist/src/components/TextEditor/index.d.ts +39 -0
  73. package/dist/src/components/VersionCheck.vue.d.ts +2 -1
  74. package/dist/src/components/ViewOptions.vue.d.ts +10 -1
  75. package/dist/src/components/index.d.ts +1 -0
  76. package/dist/src/composables/actions/files/useFileActionFallbackToDownload.d.ts +1 -1
  77. package/dist/src/composables/actions/files/useFileActions.d.ts +2 -2
  78. package/dist/src/composables/actions/files/useFileActionsCopy.d.ts +1 -1
  79. package/dist/src/composables/actions/files/useFileActionsCopyPermanentLink.d.ts +1 -1
  80. package/dist/src/composables/actions/files/useFileActionsCreateLink.d.ts +1 -1
  81. package/dist/src/composables/actions/files/useFileActionsCreateNewFile.d.ts +1 -1
  82. package/dist/src/composables/actions/files/useFileActionsCreateNewFolder.d.ts +1 -1
  83. package/dist/src/composables/actions/files/useFileActionsCreateNewShortcut.d.ts +1 -1
  84. package/dist/src/composables/actions/files/useFileActionsCreateSpaceFromResource.d.ts +1 -1
  85. package/dist/src/composables/actions/files/useFileActionsDelete.d.ts +1 -1
  86. package/dist/src/composables/actions/files/useFileActionsDisableSync.d.ts +1 -1
  87. package/dist/src/composables/actions/files/useFileActionsDownloadArchive.d.ts +1 -1
  88. package/dist/src/composables/actions/files/useFileActionsDownloadFile.d.ts +1 -1
  89. package/dist/src/composables/actions/files/useFileActionsEmptyTrashBin.d.ts +1 -1
  90. package/dist/src/composables/actions/files/useFileActionsEnableSync.d.ts +1 -1
  91. package/dist/src/composables/actions/files/useFileActionsFavorite.d.ts +1 -1
  92. package/dist/src/composables/actions/files/useFileActionsMove.d.ts +1 -1
  93. package/dist/src/composables/actions/files/useFileActionsNavigate.d.ts +1 -1
  94. package/dist/src/composables/actions/files/useFileActionsOpenShortcut.d.ts +1 -1
  95. package/dist/src/composables/actions/files/useFileActionsOpenWithApp.d.ts +1 -1
  96. package/dist/src/composables/actions/files/useFileActionsOpenWithDefault.d.ts +1 -1
  97. package/dist/src/composables/actions/files/useFileActionsPaste.d.ts +1 -1
  98. package/dist/src/composables/actions/files/useFileActionsRename.d.ts +2 -2
  99. package/dist/src/composables/actions/files/useFileActionsRestore.d.ts +2 -2
  100. package/dist/src/composables/actions/files/useFileActionsSaveAs.d.ts +1 -1
  101. package/dist/src/composables/actions/files/useFileActionsSetImage.d.ts +1 -1
  102. package/dist/src/composables/actions/files/useFileActionsShowActions.d.ts +1 -1
  103. package/dist/src/composables/actions/files/useFileActionsShowDetails.d.ts +1 -1
  104. package/dist/src/composables/actions/files/useFileActionsShowShares.d.ts +1 -1
  105. package/dist/src/composables/actions/files/useFileActionsToggleHideShare.d.ts +1 -1
  106. package/dist/src/composables/actions/files/useFileActionsUndoDelete.d.ts +2 -2
  107. package/dist/src/composables/actions/helpers/useIsAppActive.d.ts +1 -1
  108. package/dist/src/composables/actions/helpers/useIsFilesAppActive.d.ts +1 -1
  109. package/dist/src/composables/actions/helpers/useIsSearchActive.d.ts +1 -1
  110. package/dist/src/composables/actions/spaces/useSpaceActionsCreate.d.ts +1 -1
  111. package/dist/src/composables/actions/spaces/useSpaceActionsDelete.d.ts +1 -1
  112. package/dist/src/composables/actions/spaces/useSpaceActionsDeleteImage.d.ts +1 -1
  113. package/dist/src/composables/actions/spaces/useSpaceActionsDisable.d.ts +1 -1
  114. package/dist/src/composables/actions/spaces/useSpaceActionsDuplicate.d.ts +1 -1
  115. package/dist/src/composables/actions/spaces/useSpaceActionsEditDescription.d.ts +1 -1
  116. package/dist/src/composables/actions/spaces/useSpaceActionsEditQuota.d.ts +1 -1
  117. package/dist/src/composables/actions/spaces/useSpaceActionsEditReadmeContent.d.ts +1 -1
  118. package/dist/src/composables/actions/spaces/useSpaceActionsNavigateToTrash.d.ts +1 -1
  119. package/dist/src/composables/actions/spaces/useSpaceActionsRename.d.ts +1 -1
  120. package/dist/src/composables/actions/spaces/useSpaceActionsRestore.d.ts +1 -1
  121. package/dist/src/composables/actions/spaces/useSpaceActionsSetIcon.d.ts +1 -1
  122. package/dist/src/composables/actions/spaces/useSpaceActionsShowMembers.d.ts +1 -1
  123. package/dist/src/composables/actions/useActionsShowDetails.d.ts +1 -1
  124. package/dist/src/composables/appDefaults/useAppConfig.d.ts +1 -1
  125. package/dist/src/composables/appDefaults/useAppDocumentTitle.d.ts +2 -1
  126. package/dist/src/composables/appDefaults/useAppFileHandling.d.ts +4 -2
  127. package/dist/src/composables/appDefaults/useAppMeta.d.ts +1 -1
  128. package/dist/src/composables/authContext/useAuthService.d.ts +3 -1
  129. package/dist/src/composables/authContext/useRequest.d.ts +2 -2
  130. package/dist/src/composables/driveResolver/useSpacesLoading.d.ts +1 -1
  131. package/dist/src/composables/embedMode/useEmbedMode.d.ts +8 -8
  132. package/dist/src/composables/eventBus/useEventBus.d.ts +1 -1
  133. package/dist/src/composables/filesList/useResourceRouteResolver.d.ts +1 -1
  134. package/dist/src/composables/folderLink/useFolderLink.d.ts +2 -2
  135. package/dist/src/composables/isTopBarSticky/useIsTopBarSticky.d.ts +1 -1
  136. package/dist/src/composables/keyboardActions/useInterceptModifierClick.d.ts +1 -1
  137. package/dist/src/composables/links/useLinkTypes.d.ts +1 -1
  138. package/dist/src/composables/localStorage/useLocalStorage.d.ts +1 -1
  139. package/dist/src/composables/navItems/useNavItems.d.ts +1 -1
  140. package/dist/src/composables/piniaStores/apps.d.ts +31 -31
  141. package/dist/src/composables/piniaStores/auth.d.ts +25 -25
  142. package/dist/src/composables/piniaStores/avatars.d.ts +9 -9
  143. package/dist/src/composables/piniaStores/capabilities.d.ts +160 -160
  144. package/dist/src/composables/piniaStores/clipboard.d.ts +49 -49
  145. package/dist/src/composables/piniaStores/config/config.d.ts +135 -141
  146. package/dist/src/composables/piniaStores/config/types.d.ts +6 -20
  147. package/dist/src/composables/piniaStores/extensionRegistry/extensionPreferences.d.ts +4 -4
  148. package/dist/src/composables/piniaStores/extensionRegistry/extensionRegistry.d.ts +1 -1
  149. package/dist/src/composables/piniaStores/groupware/accounts.d.ts +511 -0
  150. package/dist/src/composables/piniaStores/{groupwareConfig/groupwareConfig.d.ts → groupware/config.d.ts} +107 -80
  151. package/dist/src/composables/piniaStores/groupware/index.d.ts +3 -0
  152. package/dist/src/composables/piniaStores/{groupwareConfig → groupware}/types.d.ts +30 -18
  153. package/dist/src/composables/piniaStores/index.d.ts +1 -1
  154. package/dist/src/composables/piniaStores/messages.d.ts +70 -70
  155. package/dist/src/composables/piniaStores/modals.d.ts +197 -209
  156. package/dist/src/composables/piniaStores/resources.d.ts +11 -11
  157. package/dist/src/composables/piniaStores/shares/shares.d.ts +1 -1
  158. package/dist/src/composables/piniaStores/shares/types.d.ts +2 -1
  159. package/dist/src/composables/piniaStores/sideBar.d.ts +7 -7
  160. package/dist/src/composables/piniaStores/spaces.d.ts +189 -188
  161. package/dist/src/composables/piniaStores/theme.d.ts +10 -10
  162. package/dist/src/composables/piniaStores/updates.d.ts +10 -10
  163. package/dist/src/composables/piniaStores/user.d.ts +5 -5
  164. package/dist/src/composables/piniaStores/webWorkers.d.ts +1 -1
  165. package/dist/src/composables/requestHeaders/useRequestHeaders.d.ts +1 -1
  166. package/dist/src/composables/resources/useGetResourceContext.d.ts +26 -26
  167. package/dist/src/composables/resources/useLoadPreview.d.ts +1 -1
  168. package/dist/src/composables/resources/useResourceContents.d.ts +1 -1
  169. package/dist/src/composables/resources/useResourceIndicators.d.ts +12 -1
  170. package/dist/src/composables/resources/useResourceViewDrag.d.ts +23 -13
  171. package/dist/src/composables/resources/useResourceViewHelpers.d.ts +30 -20
  172. package/dist/src/composables/resources/useResourceViewSelection.d.ts +2 -2
  173. package/dist/src/composables/selection/useSelectedResources.d.ts +2 -1
  174. package/dist/src/composables/spaces/useCreateSpace.d.ts +1 -1
  175. package/dist/src/composables/spaces/useSpaceHelpers.d.ts +1 -1
  176. package/dist/src/composables/webWorkers/deleteWorker/useDeleteWorker.d.ts +1 -1
  177. package/dist/src/composables/webWorkers/pasteWorker/usePasteWorker.d.ts +2 -2
  178. package/dist/src/composables/webWorkers/restoreWorker/useRestoreWorker.d.ts +1 -1
  179. package/dist/src/composables/webWorkers/tokenTimerWorker/useTokenTimerWorker.d.ts +3 -1
  180. package/dist/src/extensionPoints.d.ts +1 -1
  181. package/dist/src/helpers/resource/conflictHandling/conflictDialog.d.ts +1 -1
  182. package/dist/src/helpers/resource/conflictHandling/transfer.d.ts +4 -4
  183. package/dist/src/helpers/resource/conflictHandling/types.d.ts +1 -1
  184. package/dist/src/helpers/share/driveItem.d.ts +1 -1
  185. package/dist/src/router/common.d.ts +1 -1
  186. package/dist/src/router/index.d.ts +2 -1
  187. package/dist/src/router/public.d.ts +1 -1
  188. package/dist/src/router/shares.d.ts +1 -1
  189. package/dist/src/router/spaces.d.ts +1 -1
  190. package/dist/src/router/trash.d.ts +1 -1
  191. package/dist/src/services/passwordPolicy/rules.d.ts +63 -0
  192. package/dist/src/services/preview/types.d.ts +1 -1
  193. package/dist/src/services/uppy/DropTarget/plugin.d.ts +2 -1
  194. package/dist/src/services/uppy/uppyService.d.ts +3 -3
  195. package/dist/web-pkg.js +4251 -352
  196. package/package.json +36 -37
  197. package/dist/TextEditor-D-HQDUkm.js +0 -865
  198. package/dist/assets/worker-BBQqm_-D.js +0 -1
  199. package/dist/assets/worker-CVwKToFD.js +0 -21
  200. package/dist/assets/worker-DJbU-qfq.js +0 -21
  201. package/dist/assets/worker-DyU7W9CZ.js +0 -21
  202. package/dist/index-OU30YA6H.js +0 -25032
  203. package/dist/src/composables/piniaStores/groupwareConfig/index.d.ts +0 -2
  204. package/dist/web-pkg.umd.cjs +0 -16
package/dist/web-pkg.js CHANGED
@@ -1,353 +1,4252 @@
1
- import { bz as e } from "./index-OU30YA6H.js";
2
- import { A as i, h as c, i as r, j as n, k as u, l, m as d, n as p, p as S, q as A, s as m, t as b, v as F, x as v, y as h, z as R, B as C, C as g, D, E as T, F as L, G as M, H as y, I as P, J as f, K as I, L as w, M as E, N as k, O as B, P as x, Q as V, R as W, S as O, T as N, U, V as H, W as Q, X as _, Y as K, Z as G, $ as z, a0 as j, a1 as q, a2 as J, a3 as X, a4 as Y, a5 as Z, a6 as $, a7 as ee, a8 as ae, a9 as se, aa as oe, ab as te, ac as ie, ad as ce, ae as re, af as ne, ag as ue, ah as le, ai as de, aj as pe, ak as Se, al as Ae, am as me, an as be, ao as Fe, ap as ve, aq as he, ar as Re, as as Ce, at as ge, au as De, av as Te, aw as Le, ax as Me, ay as ye, az as Pe, aA as fe, aB as Ie, aC as we, aD as Ee, aE as ke, aF as Be, aG as xe, aH as Ve, aI as We, aJ as Oe, aK as Ne, aL as Ue, aM as He, aN as Qe, aO as _e, aP as Ke, aQ as Ge, aR as ze, aS as je, aT as qe, aU as Je, aV as Xe, aW as Ye, aX as Ze, aY as $e, aZ as ea, a_ as aa, a$ as sa, b0 as oa, b1 as ta, b2 as ia, b3 as ca, b4 as ra, b5 as na, b6 as ua, b7 as la, b8 as da, b9 as pa, ba as Sa, bb as Aa, bc as ma, bd as ba, be as Fa, bf as va, bg as ha, bh as Ra, bi as Ca, bj as ga, bk as Da, bl as Ta, bm as La, bn as Ma, bo as ya, bp as Pa, bq as fa, br as Ia, bs as wa, bt as Ea, bu as ka, bv as Ba, bw as xa, bx as Va, by as Wa, bA as Oa, bB as Na, bC as Ua, bD as Ha, bE as Qa, bF as _a, bG as Ka, bH as Ga, bI as za, bJ as ja, bK as qa, bL as Ja, bM as Xa, bN as Ya, bO as Za, bP as $a, bQ as es, bR as as, bS as ss, bT as os, bU as ts, bV as is, bW as cs, bX as rs, bY as ns, bZ as us, b_ as ls, b$ as ds, c0 as ps, c1 as Ss, c2 as As, c3 as ms, c4 as bs, c5 as Fs, c6 as vs, c7 as hs, c8 as Rs, c9 as Cs, ca as gs, cb as Ds, cc as Ts, cd as Ls, ce as Ms, cf as ys, cg as Ps, ch as fs, ci as Is, cj as ws, ck as Es, cl as ks, cm as Bs, cn as xs, co as Vs, cp as Ws, cq as Os, cr as Ns, cs as Us, ct as Hs, cu as Qs, cv as _s, cw as Ks, cx as Gs, cy as zs, cz as js, cA as qs, cB as Js, cC as Xs, cD as Ys, cE as Zs, cF as $s, cG as eo, cH as ao, cI as so, cJ as oo, cK as to, cL as io, cM as co, cN as ro, cO as no, cP as uo, cQ as lo, cR as po, cS as So, cT as Ao, cU as mo, cV as bo, cW as Fo, cX as vo, cY as ho, cZ as Ro, c_ as Co, c$ as go, d0 as Do, d1 as To, d2 as Lo, d3 as Mo, d4 as yo, d5 as Po, d6 as fo, d7 as Io, d8 as wo, d9 as Eo, da as ko, db as Bo, dc as xo, dd as Vo, de as Wo, df as Oo, dg as No, dh as Uo, di as Ho, dj as Qo, dk as _o, dl as Ko, dm as Go, dn as zo, dp as jo, dq as qo, dr as Jo, ds as Xo, dt as Yo, du as Zo, dv as $o, dw as et, dx as at, dy as st, dz as ot, dA as tt, dB as it, dC as ct, dD as rt, dE as nt, dF as ut, dG as lt, dH as dt, dI as pt, dJ as St, dK as At, dL as mt, dM as bt, dN as Ft, dO as vt, dP as ht, dQ as Rt, dR as Ct, dS as gt, dT as Dt, dU as Tt, dV as Lt, dW as Mt, dX as yt, dY as Pt, dZ as ft, d_ as It, d$ as wt, e0 as Et, e1 as kt, e2 as Bt, e3 as xt, e4 as Vt, e5 as Wt, e6 as Ot, e7 as Nt, e8 as Ut, e9 as Ht, ea as Qt, eb as _t, ec as Kt, ed as Gt, ee as zt, ef as jt, eg as qt, eh as Jt, ei as Xt, ej as Yt, ek as Zt, el as $t, em as ei, en as ai, eo as si, ep as oi, eq as ti, er as ii, es as ci, et as ri, eu as ni, ev as ui, ew as li, ex as di, ey as pi, ez as Si, eA as Ai, eB as mi, eC as bi, eD as Fi, u as vi, eE as hi, eF as Ri, eG as Ci, eH as gi, eI as Di, eJ as Ti, eK as Li, eL as Mi, eM as yi, eN as Pi } from "./index-OU30YA6H.js";
3
- const s = e.dirname;
4
- export {
5
- i as AVATAR_UPLOAD_MAX_FILE_SIZE_MB,
6
- c as AccountCapabilitiesSchema,
7
- r as AccountSchema,
8
- n as AccountsSchema,
9
- u as ActionMenuDropItem,
10
- l as ActionMenuItem,
11
- d as ApiError,
12
- p as AppBar,
13
- S as AppLoadingSpinner,
14
- A as AppProviderService,
15
- m as AppTopBar,
16
- b as AppWrapper,
17
- F as AppWrapperRoute,
18
- v as ArchiverService,
19
- h as Auth,
20
- R as AvatarUpload,
21
- C as BatchActions,
22
- g as Cache,
23
- D as ClientService,
24
- T as ClipboardActions,
25
- L as CompareSaveDialog,
26
- M as ConflictDialog,
27
- y as ContextActionMenu,
28
- P as ContextActions,
29
- f as ContextMenuQuickAction,
30
- I as CreateLinkModal,
31
- w as CreateShortcutModal,
32
- E as CustomComponentTarget,
33
- k as DateFilter,
34
- B as DatePickerModal,
35
- x as EmojiPickerModal,
36
- V as EventBus,
37
- W as FileInfo,
38
- O as FilePickerModal,
39
- N as FileSideBar,
40
- U as FolderLoaderFavorites,
41
- H as FolderLoaderSharedViaLink,
42
- Q as FolderLoaderSharedWithMe,
43
- _ as FolderLoaderSharedWithOthers,
44
- K as FolderLoaderSpace,
45
- G as FolderLoaderTrashbin,
46
- z as FolderService,
47
- j as FolderViewModeConstants,
48
- q as HttpClient,
49
- J as IdentitySchema,
50
- X as ImageDimension,
51
- Y as ImageType,
52
- Z as ItemFilter,
53
- $ as ItemFilterInline,
54
- ee as ItemFilterToggle,
55
- ae as Key,
56
- se as LimitsSchema,
57
- oe as LinkRoleDropdown,
58
- te as LoadingEventTopics,
59
- ie as LoadingIndicator,
60
- ce as LoadingService,
61
- re as MailCapabilitiesSchema,
62
- ne as MimeTypesToAppsSchema,
63
- ue as MobileNav,
64
- le as Modifier,
65
- de as NoContentMessage,
66
- pe as Pagination,
67
- Se as PaginationConstants,
68
- Ae as PasswordPolicyService,
69
- me as PreviewService,
70
- be as PrimaryAccountsSchema,
71
- Fe as ProcessorType,
72
- ve as QuotaModal,
73
- he as QuotaSelect,
74
- Re as RESOURCE_MAX_CHARACTER_LENGTH,
75
- Ce as RESOURCE_NAME_MAX_BYTES,
76
- ge as RawConfigSchema,
77
- De as RawGroupwareConfigSchema,
78
- Te as ResolveStrategy,
79
- Le as ResourceConflictModal,
80
- Me as ResourceGhostElement,
81
- ye as ResourceIcon,
82
- Pe as ResourceLink,
83
- fe as ResourceListItem,
84
- Ie as ResourceName,
85
- we as ResourcePreview,
86
- Ee as ResourceSize,
87
- ke as ResourceTable,
88
- Be as ResourceTile,
89
- xe as ResourceTiles,
90
- Ve as ResourceTransfer,
91
- We as RuntimeError,
92
- Oe as SaveAsModal,
93
- Ne as SearchBarFilter,
94
- Ue as SearchLocationFilterConstants,
95
- He as SideBar,
96
- Qe as SideBarPanels,
97
- _e as SieveCapabilitiesSchema,
98
- Ke as SortConstants,
99
- Ge as SpaceDetails,
100
- ze as SpaceDetailsMultiple,
101
- je as SpaceImageModal,
102
- qe as SpaceInfo,
103
- Je as SpaceMoveInfoModal,
104
- Xe as SpaceNoSelection,
105
- Ye as SpaceQuota,
106
- Ze as TextEditor,
107
- $e as ThemeConfig,
108
- ea as TransferType,
109
- aa as UnsavedChangesModal,
110
- sa as UppyService,
111
- oa as UserAvatar,
112
- ta as VersionCheck,
113
- ia as ViewOptions,
114
- ca as VisibilityObserver,
115
- ra as WebDavDetails,
116
- na as WebThemeConfig,
117
- ua as activeApp,
118
- la as authContextValues,
119
- da as blobToArrayBuffer,
120
- pa as breadcrumbsFromPath,
121
- Sa as buildRoutes,
122
- Aa as buildUrl,
123
- ma as cacheService,
124
- ba as canvasToBlob,
125
- Fa as cloneStateObject,
126
- va as compareVersions,
127
- ha as concatBreadcrumbs,
128
- Ra as contextQueryToFileContextProps,
129
- Ca as contextRouteNameKey,
130
- ga as contextRouteParamsKey,
131
- Da as contextRouteQueryKey,
132
- Ta as convertToMinimalUppyFile,
133
- La as createDefaultFileIconMapping,
134
- Ma as createFileRouteOptions,
135
- ya as createFolderDummyFile,
136
- Pa as createLocation,
137
- fa as createLocationCommon,
138
- Ia as createLocationPublic,
139
- wa as createLocationShares,
140
- Ea as createLocationSpaces,
141
- ka as createLocationTrash,
142
- Ba as defaultFuseOptions,
143
- xa as defineWebApplication,
144
- Va as determineResourceTableSortFields,
145
- Wa as determineResourceTilesSortFields,
146
- s as dirname,
147
- Oa as encodePath,
148
- Na as eventBus,
149
- Ua as extensionPoints,
150
- Ha as fileSideBarSpaceDetailsTableExtensionPoint,
151
- Qa as filterResources,
152
- _a as focusCheckbox,
153
- Ka as folderService,
154
- Ga as formatDateFromDateTime,
155
- za as formatDateFromHTTP,
156
- ja as formatDateFromISO,
157
- qa as formatDateFromJSDate,
158
- Ja as formatDateFromRFC,
159
- Xa as formatFileSize,
160
- Ya as formatRelativeDateFromDateTime,
161
- Za as formatRelativeDateFromHTTP,
162
- $a as formatRelativeDateFromISO,
163
- es as formatRelativeDateFromJSDate,
164
- as as formatRelativeDateFromRFC,
165
- ss as getBackendVersion,
166
- os as getExtensionNavItems,
167
- ts as getLocaleFromLanguage,
168
- is as getParentPaths,
169
- cs as getSharedAncestorRoute,
170
- rs as getSharedDriveItem,
171
- ns as getSpacesByType,
172
- us as getTextByteSize,
173
- ls as getWebVersion,
174
- ds as isItemInCurrentFolder,
175
- ps as isLocationActive,
176
- Ss as isLocationActiveDirector,
177
- As as isLocationCommonActive,
178
- ms as isLocationPublicActive,
179
- bs as isLocationSharesActive,
180
- Fs as isLocationSpacesActive,
181
- vs as isLocationTrashActive,
182
- hs as isMacOs,
183
- Rs as isPromiseFulfilled,
184
- Cs as isPromiseRejected,
185
- gs as isResourceBeeingMovedToSameLocation,
186
- Ds as isSameResource,
187
- Ts as locationPublicLink,
188
- Ls as locationPublicUpload,
189
- Ms as locationSharesViaLink,
190
- ys as locationSharesWithMe,
191
- Ps as locationSharesWithOthers,
192
- fs as locationSpacesGeneric,
193
- Is as objectKeys,
194
- ws as parseVersion,
195
- Es as queryItemAsString,
196
- ks as renameResource,
197
- Bs as resolveFileNameDuplicate,
198
- xs as resourceIconMappingInjectionKey,
199
- Vs as routeToContextQuery,
200
- Ws as setCurrentUserShareSpacePermissions,
201
- Os as sortFields,
202
- Ns as sortHelper,
203
- Us as sortSpaceMembers,
204
- Hs as translateSortFields,
205
- Qs as triggerDownloadWithFilename,
206
- _s as useAbility,
207
- Ks as useActionsShowDetails,
208
- Gs as useActiveApp,
209
- zs as useActiveLocation,
210
- js as useAppConfig,
211
- qs as useAppDefaults,
212
- Js as useAppFileHandling,
213
- Xs as useAppFolderHandling,
214
- Ys as useAppMeta,
215
- Zs as useAppNavigation,
216
- $s as useAppProviderService,
217
- eo as useAppsStore,
218
- ao as useArchiverService,
219
- so as useAuthService,
220
- oo as useAuthStore,
221
- to as useAvatarsStore,
222
- io as useBreadcrumbsFromPath,
223
- co as useCanBeOpenedWithSecureView,
224
- ro as useCanListShares,
225
- no as useCanListVersions,
226
- uo as useCanShare,
227
- lo as useCapabilityStore,
228
- po as useClientService,
229
- So as useClipboardStore,
230
- Ao as useConfigStore,
231
- mo as useCopyLink,
232
- bo as useCreateSpace,
233
- Fo as useCropperKeyboardActions,
234
- vo as useDeleteWorker,
235
- ho as useDocumentTitle,
236
- Ro as useDownloadFile,
237
- Co as useDriveResolver,
238
- go as useEmbedMode,
239
- Do as useEventBus,
240
- To as useExtensionPreferencesStore,
241
- Lo as useExtensionRegistry,
242
- Mo as useFileActionFallbackToDownload,
243
- yo as useFileActions,
244
- Po as useFileActionsCopy,
245
- fo as useFileActionsCopyPermanentLink,
246
- Io as useFileActionsCreateLink,
247
- wo as useFileActionsCreateNewFile,
248
- Eo as useFileActionsCreateNewFolder,
249
- ko as useFileActionsCreateNewShortcut,
250
- Bo as useFileActionsCreateSpaceFromResource,
251
- xo as useFileActionsDelete,
252
- Vo as useFileActionsDeleteResources,
253
- Wo as useFileActionsDisableSync,
254
- Oo as useFileActionsDownloadArchive,
255
- No as useFileActionsDownloadFile,
256
- Uo as useFileActionsEmptyTrashBin,
257
- Ho as useFileActionsEnableSync,
258
- Qo as useFileActionsFavorite,
259
- _o as useFileActionsMove,
260
- Ko as useFileActionsNavigate,
261
- Go as useFileActionsOpenShortcut,
262
- zo as useFileActionsOpenWithApp,
263
- jo as useFileActionsOpenWithDefault,
264
- qo as useFileActionsPaste,
265
- Jo as useFileActionsRename,
266
- Xo as useFileActionsRestore,
267
- Yo as useFileActionsSaveAs,
268
- Zo as useFileActionsSetImage,
269
- $o as useFileActionsShowActions,
270
- et as useFileActionsShowDetails,
271
- at as useFileActionsShowShares,
272
- st as useFileActionsToggleHideShare,
273
- ot as useFileActionsUndoDelete,
274
- tt as useFileListHeaderPosition,
275
- it as useFileRouteReplace,
276
- ct as useFolderLink,
277
- rt as useGetMatchingSpace,
278
- nt as useGetResourceContext,
279
- ut as useGroupwareConfigStore,
280
- lt as useInterceptModifierClick,
281
- dt as useIsAppActive,
282
- pt as useIsFilesAppActive,
283
- St as useIsResourceNameValid,
284
- At as useIsSearchActive,
285
- mt as useIsTopBarSticky,
286
- bt as useKeyboardActions,
287
- Ft as useLinkTypes,
288
- vt as useLoadAvatars,
289
- ht as useLoadPreview,
290
- Rt as useLoadingService,
291
- Ct as useLocalStorage,
292
- gt as useMessages,
293
- Dt as useModals,
294
- Tt as useNavItems,
295
- Lt as useOpenEmptyEditor,
296
- Mt as useOpenWithDefaultApp,
297
- yt as usePagination,
298
- Pt as usePasswordPolicyService,
299
- ft as usePasteWorker,
300
- It as usePreviewService,
301
- wt as useRequest,
302
- Et as useRequestHeaders,
303
- kt as useResourceContents,
304
- Bt as useResourceIndicators,
305
- xt as useResourceRouteResolver,
306
- Vt as useResourceViewContextMenu,
307
- Wt as useResourceViewDrag,
308
- Ot as useResourceViewHelpers,
309
- Nt as useResourceViewSelection,
310
- Ut as useResourcesStore,
311
- Ht as useRestoreWorker,
312
- Qt as useRoute,
313
- _t as useRouteMeta,
314
- Kt as useRouteName,
315
- Gt as useRouteParam,
316
- zt as useRouteQuery,
317
- jt as useRouteQueryPersisted,
318
- qt as useRouter,
319
- Jt as useScrollTo,
320
- Xt as useSearch,
321
- Yt as useSelectedResources,
322
- Zt as useService,
323
- $t as useSharesStore,
324
- ei as useSideBar,
325
- ai as useSort,
326
- si as useSpaceActionsCreate,
327
- oi as useSpaceActionsDelete,
328
- ti as useSpaceActionsDeleteImage,
329
- ii as useSpaceActionsDisable,
330
- ci as useSpaceActionsDuplicate,
331
- ri as useSpaceActionsEditDescription,
332
- ni as useSpaceActionsEditQuota,
333
- ui as useSpaceActionsEditReadmeContent,
334
- li as useSpaceActionsNavigateToTrash,
335
- di as useSpaceActionsRename,
336
- pi as useSpaceActionsRestore,
337
- Si as useSpaceActionsSetIcon,
338
- Ai as useSpaceActionsShowMembers,
339
- mi as useSpaceHelpers,
340
- bi as useSpacesLoading,
341
- Fi as useSpacesStore,
342
- vi as useThemeStore,
343
- hi as useTileSize,
344
- Ri as useTokenTimerWorker,
345
- Ci as useUpdatesStore,
346
- gi as useUpload,
347
- Di as useUserStore,
348
- Ti as useViewMode,
349
- Li as useViewSize,
350
- Mi as useViewSizeMax,
351
- yi as useWebWorkersStore,
352
- Pi as useWindowOpen
1
+ import { $ as e, $a as t, $i as n, $n as r, $r as i, $t as a, A as o, Aa as s, Ai as c, An as l, Ao as u, Ar as d, At as f, B as p, Ba as m, Bi as h, Bn as g, Bo as _, Br as v, Bt as y, C as b, Ca as x, Ci as S, Cn as C, Co as ee, Cr as w, Ct as T, D as te, Da as E, Di as D, Dn as O, Do as k, Dr as A, Dt as ne, E as re, Ea as j, Ei as ie, En as ae, Eo as M, Er as oe, Et as se, F as ce, Fa as le, Fi as ue, Fn as de, Fo as fe, Fr as pe, Ft as me, G as he, Ga as ge, Gi as _e, Gn as ve, Go as ye, Gr as be, Gt as xe, H as Se, Ha as Ce, Hi as we, Hn as Te, Ho as Ee, Hr as De, Ht as Oe, I as ke, Ia as Ae, Ii as je, In as Me, Io as N, Ir as Ne, It as Pe, J as Fe, Ja as Ie, Ji as Le, Jn as Re, Jr as ze, Jt as Be, K as Ve, Ka as He, Ki as Ue, Kn as We, Kr as Ge, Kt as Ke, L as qe, La as Je, Li as Ye, Ln as Xe, Lo as P, Lr as Ze, Lt as Qe, M as $e, Ma as et, Mi as tt, Mn as nt, Mo as rt, Mr as it, Mt as at, N as ot, Na as st, Ni as ct, Nn as lt, No as ut, Nr as dt, Nt as ft, O as pt, Oa as mt, Oi as ht, On as gt, Oo as F, Or as _t, Ot as vt, P as yt, Pa as bt, Pi as xt, Pn as St, Po as Ct, Pr as wt, Pt as Tt, Q as Et, Qa as Dt, Qi as Ot, Qn as kt, Qr as At, Qt as jt, R as Mt, Ra as Nt, Ri as Pt, Rn as Ft, Ro as I, Rr as It, Rt as Lt, S as Rt, Sa as zt, Si as Bt, Sn as Vt, So as Ht, Sr as Ut, St as Wt, T as Gt, Ta as Kt, Ti as qt, Tn as Jt, To as Yt, Tr as Xt, Tt as Zt, U as Qt, Ua as $t, Ui as en, Un as tn, Uo as L, Ur as nn, Ut as rn, V as an, Va as on, Vi as sn, Vn as cn, Vo as R, Vr as ln, Vt as un, W as dn, Wa as fn, Wi as pn, Wn as mn, Wo as hn, Wr as gn, Wt as _n, X as vn, Xa as z, Xi as yn, Xn as bn, Xr as xn, Xt as Sn, Y as Cn, Ya as wn, Yi as Tn, Yn as En, Yr as Dn, Yt as On, Z as kn, Za as An, Zi as jn, Zn as Mn, Zr as Nn, Zt as Pn, _ as Fn, _a as In, _i as Ln, _n as Rn, _o as zn, _r as Bn, _t as Vn, a as Hn, aa as Un, ai as Wn, an as Gn, ao as Kn, ar as qn, at as Jn, b as Yn, ba as Xn, bi as Zn, bn as Qn, bo as B, br as $n, bt as er, c as tr, ca as nr, ci as rr, cn as ir, co as V, cr as ar, ct as or, d as sr, da as cr, di as lr, dn as ur, do as dr, dr as fr, dt as pr, ea as mr, ei as hr, en as gr, eo as _r, er as vr, et as yr, f as br, fa as xr, fi as Sr, fn as Cr, fo as wr, fr as Tr, ft as Er, g as Dr, ga as Or, gi as kr, gn as Ar, go as jr, gr as Mr, gt as Nr, h as Pr, ha as Fr, hi as Ir, hn as Lr, ho as H, hr as Rr, ht as zr, i as Br, ia as Vr, ii as Hr, in as Ur, io as U, ir as Wr, it as Gr, j as Kr, ja as qr, ji as Jr, jn as Yr, jo as W, jr as Xr, jt as Zr, k as Qr, ka as $r, ki as ei, kn as ti, ko as ni, kr as ri, kt as ii, l as ai, la as oi, li as si, ln as ci, lo as G, lr as li, lt as ui, m as di, ma as fi, mi as pi, mn as mi, mo as hi, mr as gi, mt as _i, n as vi, na as yi, ni as bi, nn as xi, no as Si, nr as Ci, nt as wi, o as Ti, oa as Ei, oi as Di, on as Oi, oo as K, or as ki, ot as Ai, p as ji, pa as Mi, pi as Ni, pn as Pi, po as q, pr as Fi, pt as Ii, q as Li, qa as Ri, qi as zi, qn as Bi, qr as Vi, qt as Hi, r as Ui, ra as Wi, ri as Gi, rn as Ki, ro as J, rr as qi, rt as Ji, s as Yi, sa as Xi, si as Zi, sn as Qi, so as Y, sr as $i, st as ea, t as ta, ta as na, ti as ra, tn as ia, to as aa, tr as oa, tt as sa, u as ca, ua as la, ui as ua, un as da, uo as X, ur as fa, ut as pa, v as ma, va as ha, vi as ga, vn as _a, vo as va, vr as ya, vt as ba, w as xa, wa as Sa, wi as Ca, wn as wa, wo as Z, wr as Ta, wt as Ea, x as Da, xa as Oa, xi as ka, xn as Aa, xo as ja, xr as Ma, xt as Na, y as Pa, ya as Fa, yi as Ia, yn as La, yo as Ra, yr as za, yt as Ba, z as Va, za as Ha, zi as Ua, zn as Wa, zo as Ga, zr as Ka, zt as qa } from "./composables-TkULFBg4.js";
2
+ import { HttpError as Ja, ShareTypes as Ya, buildIncomingShareResource as Xa, buildSpaceImageResource as Za, call as Qa, extractDomSelector as $a, getSpaceManagers as eo, isCollaboratorShare as to, isIncomingShareResource as no, isLinkShare as ro, isManager as io, isOutgoingShareResource as ao, isPersonalSpaceResource as oo, isProjectSpaceResource as so, isPublicSpaceResource as co, isShareResource as lo, isShareSpaceResource as uo, isSpaceResource as fo } from "@opencloud-eu/web-client";
3
+ import { useGettext as Q } from "vue3-gettext";
4
+ import po from "fuse.js";
5
+ import { isNil as mo } from "lodash-es";
6
+ import { storeToRefs as $ } from "pinia";
7
+ import ho from "p-queue";
8
+ import { useTask as go } from "vue-concurrency";
9
+ import { DateTime as _o, Duration as vo } from "luxon";
10
+ import { useWindowSize as yo } from "@vueuse/core";
11
+ import bo from "mark.js";
12
+ import xo from "cropperjs";
13
+ import { onBeforeRouteLeave as So, useRouter as Co } from "vue-router";
14
+ //#region src/apps/types.ts
15
+ var wo = (e) => e, To = H({
16
+ name: "ActionMenuItem",
17
+ props: {
18
+ action: {
19
+ type: Object,
20
+ required: !0
21
+ },
22
+ actionOptions: {
23
+ type: Object,
24
+ required: !0
25
+ },
26
+ size: {
27
+ type: String,
28
+ required: !1,
29
+ default: "medium"
30
+ },
31
+ appearance: {
32
+ type: String,
33
+ default: "raw"
34
+ },
35
+ shortcutHint: {
36
+ type: Boolean,
37
+ default: !0,
38
+ required: !1
39
+ },
40
+ showTooltip: {
41
+ type: Boolean,
42
+ default: !1,
43
+ required: !1
44
+ },
45
+ buttonClasses: {
46
+ type: Array,
47
+ default: () => []
48
+ }
49
+ },
50
+ setup(e) {
51
+ let { options: t } = $(Un()), n = K(() => Object.hasOwn(e.action, "route") ? "router-link" : Object.hasOwn(e.action, "href") ? "a" : (Object.hasOwn(e.action, "handler") || console.warn("ActionMenuItem: No handler, route or href callback found in action", e.action), "button"));
52
+ return {
53
+ componentType: n,
54
+ componentProps: K(() => ({
55
+ appearance: e.action.appearance || e.appearance,
56
+ ...e.action.isDisabled && { disabled: e.action.isDisabled(e.actionOptions) },
57
+ ...e.action.id && { id: e.action.id },
58
+ ...L(n) === "router-link" && { to: e.action.route(e.actionOptions) },
59
+ ...L(n) === "a" && { href: e.action.href(e.actionOptions) },
60
+ ...["router-link", "a"].includes(L(n)) && { target: t.value.openFilesInNewTab ? "_blank" : "_self" }
61
+ })),
62
+ actionIcon: K(() => typeof e.action.icon == "function" ? e.action.icon(e.actionOptions) : e.action.icon)
63
+ };
64
+ },
65
+ computed: {
66
+ hasExternalImageIcon() {
67
+ return this.actionIcon && /^https?:\/\//i.test(this.actionIcon);
68
+ },
69
+ componentListeners() {
70
+ if (typeof this.action.handler != "function") return {};
71
+ let e = () => this.action.handler({ ...this.actionOptions });
72
+ return this.action.keepOpen ? { click: (t) => {
73
+ t.stopPropagation(), e();
74
+ } } : { click: e };
75
+ }
76
+ }
77
+ }), Eo = {
78
+ key: 3,
79
+ class: "oc-files-context-action-label flex flex-col",
80
+ "data-testid": "action-label"
81
+ }, Do = ["textContent"], Oo = ["textContent"];
82
+ function ko(e, t, n, r, i, a) {
83
+ let o = F("oc-image"), s = F("oc-icon"), c = F("oc-button"), l = ni("oc-tooltip");
84
+ return I((Z(), X("li", null, [I((Z(), V(c, va({ type: e.componentType }, e.componentProps, {
85
+ class: [
86
+ e.action.class,
87
+ "action-menu-item",
88
+ "align-middle",
89
+ "w-full",
90
+ ...e.buttonClasses
91
+ ],
92
+ "aria-label": e.componentProps.disabled ? e.action.disabledTooltip?.(e.actionOptions) ?? e.action.label(e.actionOptions) : e.action.label(e.actionOptions),
93
+ "data-testid": "action-handler",
94
+ size: e.size,
95
+ "justify-content": "left"
96
+ }, rt(e.componentListeners)), {
97
+ default: P(() => [
98
+ e.action.img ? (Z(), V(o, {
99
+ key: 0,
100
+ "data-testid": "action-img",
101
+ src: e.action.img,
102
+ alt: "",
103
+ class: "oc-icon oc-icon-m w-[22px]"
104
+ }, null, 8, ["src"])) : e.hasExternalImageIcon ? (Z(), V(o, {
105
+ key: 1,
106
+ "data-testid": "action-img",
107
+ src: e.actionIcon,
108
+ alt: "",
109
+ class: "oc-icon oc-icon-m w-[22px]"
110
+ }, null, 8, ["src"])) : e.actionIcon ? (Z(), V(s, {
111
+ key: 2,
112
+ "data-testid": "action-icon",
113
+ name: e.actionIcon,
114
+ "fill-type": e.action.iconFillType || "line",
115
+ size: e.size
116
+ }, null, 8, [
117
+ "name",
118
+ "fill-type",
119
+ "size"
120
+ ])) : G("", !0),
121
+ e.action.hideLabel ? G("", !0) : (Z(), X("span", Eo, [Y("span", {
122
+ class: "text-left",
123
+ textContent: W(e.action.label(e.actionOptions))
124
+ }, null, 8, Do)])),
125
+ e.action.shortcut && e.shortcutHint ? (Z(), X("span", {
126
+ key: 4,
127
+ class: "text-sm flex-row-reverse",
128
+ textContent: W(e.action.shortcut)
129
+ }, null, 8, Oo)) : G("", !0)
130
+ ]),
131
+ _: 1
132
+ }, 16, [
133
+ "type",
134
+ "class",
135
+ "aria-label",
136
+ "size"
137
+ ])), [[l, e.showTooltip || e.action.hideLabel ? e.action.label(e.actionOptions) : ""]])])), [[l, e.componentProps.disabled ? e.action.disabledTooltip?.(e.actionOptions) : ""]]);
138
+ }
139
+ var Ao = /* @__PURE__ */ z(To, [["render", ko]]), jo = H({
140
+ name: "BatchActions",
141
+ components: { ActionMenuItem: Ao },
142
+ props: {
143
+ actions: {
144
+ type: Array,
145
+ required: !0
146
+ },
147
+ actionOptions: {
148
+ type: Object,
149
+ required: !0
150
+ },
151
+ limitedScreenSpace: {
152
+ type: Boolean,
153
+ default: !1,
154
+ required: !1
155
+ }
156
+ }
157
+ });
158
+ //#endregion
159
+ //#region src/components/BatchActions.vue
160
+ function Mo(e, t, n, r, i, a) {
161
+ let o = F("action-menu-item"), s = F("oc-list");
162
+ return Z(), X("div", null, [q(s, {
163
+ id: "oc-appbar-batch-actions",
164
+ class: B(["block xl:flex xl:items-center", { "oc-appbar-batch-actions-squashed [&_.oc-files-context-action-label]:hidden": e.limitedScreenSpace }])
165
+ }, {
166
+ default: P(() => [(Z(!0), X(U, null, M(e.actions, (t, n) => (Z(), V(o, {
167
+ key: `action-${n}`,
168
+ action: t,
169
+ "action-options": e.actionOptions,
170
+ appearance: "raw",
171
+ class: "batch-actions mr-2 float-left [&_.action-menu-item]:p-2 [&_.action-menu-item]:gap-1",
172
+ "shortcut-hint": !1,
173
+ "show-tooltip": e.limitedScreenSpace
174
+ }, null, 8, [
175
+ "action",
176
+ "action-options",
177
+ "show-tooltip"
178
+ ]))), 128))]),
179
+ _: 1
180
+ }, 8, ["class"])]);
181
+ }
182
+ var No = /* @__PURE__ */ z(jo, [["render", Mo]]), Po = { class: "context-menu px-2" }, Fo = { class: "inline-flex gap-2" }, Io = { class: "flex oc-files-context-action-label" }, Lo = ["textContent"], Ro = /* @__PURE__ */ H({
183
+ __name: "ActionMenuDropItem",
184
+ props: {
185
+ menuSectionDrop: {},
186
+ appearance: {},
187
+ actionOptions: {}
188
+ },
189
+ setup(e) {
190
+ let t = Tn(`oc-files-context-actions-${e.menuSectionDrop.name}-drop-`), n = Tn(`oc-files-context-actions-${e.menuSectionDrop.name}-toggle-`);
191
+ return (r, i) => {
192
+ let a = F("oc-icon"), o = F("oc-button"), s = F("oc-list");
193
+ return Z(), X("li", Po, [q(o, {
194
+ id: L(n),
195
+ appearance: "raw",
196
+ "justify-content": "space-between",
197
+ "gap-size": "medium",
198
+ class: "w-full flex justify-between",
199
+ "aria-expanded": "false"
200
+ }, {
201
+ default: P(() => [Y("span", Fo, [q(a, {
202
+ name: e.menuSectionDrop.icon,
203
+ size: "medium",
204
+ "fill-type": "line"
205
+ }, null, 8, ["name"]), Y("span", Io, [Y("span", { textContent: W(e.menuSectionDrop.label) }, null, 8, Lo)])]), q(a, {
206
+ name: "arrow-right-s",
207
+ size: "small",
208
+ "fill-type": "line"
209
+ })]),
210
+ _: 1
211
+ }, 8, ["id"]), q(L(ci), {
212
+ title: e.menuSectionDrop.label,
213
+ "drop-id": L(t),
214
+ toggle: `#${L(n)}`,
215
+ mode: "hover",
216
+ class: "w-3xs oc-files-context-action-drop",
217
+ "padding-size": "small",
218
+ teleport: "#app-runtime-drop",
219
+ position: "right-start",
220
+ "close-on-click": ""
221
+ }, {
222
+ default: P(() => [e.menuSectionDrop.items.length ? (Z(), V(s, { key: 0 }, {
223
+ default: P(() => [(Z(!0), X(U, null, M(e.menuSectionDrop.items, (t, n) => (Z(), V(Ao, {
224
+ key: `section-${e.menuSectionDrop.label}-action-${n}`,
225
+ action: t,
226
+ appearance: e.appearance,
227
+ "action-options": e.actionOptions
228
+ }, null, 8, [
229
+ "action",
230
+ "appearance",
231
+ "action-options"
232
+ ]))), 128))]),
233
+ _: 1
234
+ })) : G("", !0)]),
235
+ _: 1
236
+ }, 8, [
237
+ "title",
238
+ "drop-id",
239
+ "toggle"
240
+ ])]);
241
+ };
242
+ }
243
+ }), zo = H({
244
+ name: "ContextActionMenu",
245
+ components: {
246
+ ActionMenuDropItem: Ro,
247
+ ActionMenuItem: Ao
248
+ },
249
+ props: {
250
+ menuSections: {
251
+ type: Array,
252
+ required: !0
253
+ },
254
+ appearance: {
255
+ type: String,
256
+ default: "raw"
257
+ },
258
+ actionOptions: {
259
+ type: Object,
260
+ required: !0
261
+ }
262
+ },
263
+ methods: { getSectionClasses(e) {
264
+ let t = [];
265
+ return this.menuSections.length ? (e < this.menuSections.length - 1 && t.push("pb-2"), e > 0 && t.push("pt-2"), e < this.menuSections.length - 1 && t.push("border-b"), t) : t;
266
+ } }
267
+ }), Bo = { id: "oc-files-context-menu" };
268
+ function Vo(e, t, n, r, i, a) {
269
+ let o = F("action-menu-item"), s = F("action-menu-drop-item"), c = F("oc-list");
270
+ return Z(), X("div", Bo, [(Z(!0), X(U, null, M(e.menuSections, (t, n) => (Z(), V(c, {
271
+ id: `oc-files-context-actions-${t.name}`,
272
+ key: `section-${t.name}-list`,
273
+ class: B(["[&_li]:px-0", e.getSectionClasses(n)])
274
+ }, {
275
+ default: P(() => [t.items ? (Z(!0), X(U, { key: 0 }, M(t.items, (n, r) => (Z(), V(o, {
276
+ key: `section-${t.name}-action-${r}`,
277
+ action: n,
278
+ appearance: e.appearance,
279
+ "action-options": e.actionOptions,
280
+ class: "context-menu"
281
+ }, null, 8, [
282
+ "action",
283
+ "appearance",
284
+ "action-options"
285
+ ]))), 128)) : G("", !0), (Z(!0), X(U, null, M(t.dropItems, (t) => (Z(), X(U, null, [t.items.length ? (Z(), V(s, {
286
+ key: t.name,
287
+ "menu-section-drop": t,
288
+ appearance: e.appearance,
289
+ "action-options": e.actionOptions
290
+ }, null, 8, [
291
+ "menu-section-drop",
292
+ "appearance",
293
+ "action-options"
294
+ ])) : G("", !0)], 64))), 256))]),
295
+ _: 2
296
+ }, 1032, ["id", "class"]))), 128))]);
297
+ }
298
+ var Ho = /* @__PURE__ */ z(zo, [["render", Vo]]), Uo = H({
299
+ name: "ContextActions",
300
+ components: { ContextActionMenu: Ho },
301
+ props: { actionOptions: {
302
+ type: Object,
303
+ required: !0
304
+ } },
305
+ setup(e) {
306
+ let { getAllOpenWithActions: t } = La(), { $gettext: n } = Q(), { actions: r } = Ea(), { actions: i } = vt(), { actions: a } = Jn(), { actions: o } = _a(), { actions: s } = Cr(), { actions: c } = Tt(), { actions: l } = me(), { actions: u } = at(), { actions: d } = f(), { actions: p } = ne(), { actions: m } = se(), { actions: h } = Vn(), { actions: g } = Nr(), { actions: _ } = zr(), { actions: v } = pr(), { actions: y } = ui(), { actions: b } = Pe(), { actions: x } = Ai(), S = dt(), C = K(() => S.requestExtensions({
307
+ id: "global.files.context-actions",
308
+ extensionType: "action"
309
+ }).map((e) => e.action)), ee = K(() => S.requestExtensions({
310
+ id: "global.files.batch-actions",
311
+ extensionType: "action"
312
+ }).map((e) => e.action)), w = Ee(e, "actionOptions"), T = K(() => [
313
+ ...L(i),
314
+ ...L(c),
315
+ ...L(u),
316
+ ...L(m),
317
+ ...L(o),
318
+ ...L(l),
319
+ ...L(_),
320
+ ...L(b),
321
+ ...L(ee).filter((e) => e.category === "actions" || mo(e.category))
322
+ ].filter((e) => e.isVisible(L(w)))), te = K(() => [...L(y), ...L(ee).filter((e) => e.category === "sidebar")].filter((e) => e.isVisible(L(w)))), E = K(() => L(r).filter((e) => e.isVisible(L(w))).sort((e, t) => Number(t.hasPriority) - Number(e.hasPriority))), D = K(() => t({
323
+ ...L(w),
324
+ omitSystemActions: !0
325
+ }).filter((e) => e.isVisible(L(w))).sort((e, t) => Number(t.hasPriority) - Number(e.hasPriority))), O = K(() => [
326
+ ...L(x),
327
+ ...L(s),
328
+ ...L(C).filter((e) => e.category === "share")
329
+ ].filter((e) => e.isVisible(L(w)))), k = K(() => [
330
+ ...L(u),
331
+ ...L(d),
332
+ ...L(l),
333
+ ...L(m),
334
+ ...L(o),
335
+ ...L(h),
336
+ ...L(g),
337
+ ...L(b),
338
+ ...L(_),
339
+ ...L(i),
340
+ ...L(c),
341
+ ...L(a),
342
+ ...L(v),
343
+ ...L(C).filter((e) => e.category === "actions" || mo(e.category))
344
+ ].filter((e) => e.isVisible(L(w)))), A = K(() => [
345
+ ...L(p),
346
+ ...L(y),
347
+ ...L(C).filter((e) => e.category === "sidebar")
348
+ ].filter((e) => e.isVisible(L(w))));
349
+ return { menuSections: K(() => {
350
+ let e = [];
351
+ return L(w).resources.length > 1 ? (L(T).length && e.push({
352
+ name: "batch-actions",
353
+ items: [...L(T)]
354
+ }), e.push({
355
+ name: "batch-details",
356
+ items: [...L(te)]
357
+ }), e) : ([...L(E), ...L(D)].length && e.push({
358
+ name: "context",
359
+ items: [...L(E)],
360
+ dropItems: [{
361
+ label: n("Open with..."),
362
+ name: "open-with",
363
+ icon: "apps",
364
+ items: [...L(D)]
365
+ }]
366
+ }), L(O).length && e.push({
367
+ name: "share",
368
+ items: L(O)
369
+ }), L(k).length && e.push({
370
+ name: "actions",
371
+ items: L(k)
372
+ }), L(A).length && e.push({
373
+ name: "sidebar",
374
+ items: L(A)
375
+ }), e);
376
+ }) };
377
+ }
378
+ });
379
+ //#endregion
380
+ //#region src/components/FilesList/ContextActions.vue
381
+ function Wo(e, t, n, r, i, a) {
382
+ let o = F("context-action-menu");
383
+ return Z(), V(o, {
384
+ "menu-sections": e.menuSections,
385
+ "action-options": e.actionOptions
386
+ }, null, 8, ["menu-sections", "action-options"]);
387
+ }
388
+ var Go = /* @__PURE__ */ z(Uo, [["render", Wo]]), Ko = { class: "flex items-center" }, qo = { class: "flex justify-between w-full" }, Jo = { class: "flex items-center gap-2" }, Yo = ["textContent"], Xo = {
389
+ key: 0,
390
+ class: "mt-2 mb-4 last:mb-0 [&>*]:flex [&>*]:justify-between"
391
+ }, Zo = {
392
+ key: 1,
393
+ class: "mt-2 mb-4 last:mb-0 [&>*]:flex [&>*]:justify-between"
394
+ }, Qo = {
395
+ key: 2,
396
+ class: "mt-2 mb-4 last:mb-0 [&>*]:flex [&>*]:justify-between"
397
+ }, $o = {
398
+ key: 3,
399
+ class: "mt-2 mb-4 last:mb-0 [&>*]:flex [&>*]:justify-between"
400
+ }, es = {
401
+ key: 4,
402
+ class: "mt-2 mb-4 last:mb-0 [&>*]:flex [&>*]:justify-between"
403
+ }, ts = {
404
+ key: 5,
405
+ class: "mt-2 mb-4 last:mb-0 flex justify-between items-center [&>*]:flex [&>*]:justify-between"
406
+ }, ns = ["textContent"], rs = ["max"], is = /* @__PURE__ */ z(/* @__PURE__ */ H({
407
+ __name: "ViewOptions",
408
+ props: {
409
+ perPageStoragePrefix: {},
410
+ hasHiddenFiles: {
411
+ type: Boolean,
412
+ default: !0
413
+ },
414
+ hasFileExtensions: {
415
+ type: Boolean,
416
+ default: !0
417
+ },
418
+ hasPagination: {
419
+ type: Boolean,
420
+ default: !0
421
+ },
422
+ paginationOptions: { default: () => Gt.options },
423
+ perPageQueryName: { default: () => Gt.perPageQueryName },
424
+ perPageDefault: { default: () => Gt.perPageDefault },
425
+ viewModeDefault: { default: () => ma.defaultModeName },
426
+ viewModes: { default: () => [] }
427
+ },
428
+ setup(e) {
429
+ let t = Mi(), n = xr(), { $gettext: i } = Q(), a = fr(), { setAreHiddenFilesShown: o, setAreFileExtensionsShown: s, setAreDisabledSpacesShown: c, setAreEmptyTrashesShown: l } = a, { areHiddenFilesShown: u, areFileExtensionsShown: d, areDisabledSpacesShown: f, areEmptyTrashesShown: p } = $(a), m = R(!1), h = Mn($r, "files-spaces-projects"), g = Mn(ha, "files-trash-overview"), _ = r("page"), v = K(() => L(_) ? parseInt(Re(L(_))) : 1), y = kt({
430
+ name: e.perPageQueryName,
431
+ defaultValue: e.perPageDefault,
432
+ storagePrefix: e.perPageStoragePrefix
433
+ }), b = kt({
434
+ name: ma.queryName,
435
+ defaultValue: e.viewModeDefault
436
+ }), x = K(() => e.viewModes.find((e) => e.name === Re(L(b)))), S = kt({
437
+ name: ma.tilesSizeQueryName,
438
+ defaultValue: ma.tilesSizeDefault.toString()
439
+ }), C = (r) => t.replace({ query: {
440
+ ...L(n).query,
441
+ [e.perPageQueryName]: r.toString(),
442
+ ...L(v) > 1 && { page: "1" }
443
+ } }), ee = (e) => {
444
+ b.value = e.name;
445
+ };
446
+ N([
447
+ y,
448
+ b,
449
+ S
450
+ ], (e) => {
451
+ m.value = e.some((e) => !e);
452
+ }, {
453
+ immediate: !0,
454
+ deep: !0
455
+ });
456
+ let w = Dr(), T = K({
457
+ get() {
458
+ return L(u);
459
+ },
460
+ set(e) {
461
+ o(e);
462
+ }
463
+ }), te = K({
464
+ get() {
465
+ return L(d);
466
+ },
467
+ set(e) {
468
+ s(e);
469
+ }
470
+ }), E = K({
471
+ get() {
472
+ return L(f);
473
+ },
474
+ set(e) {
475
+ c(e);
476
+ }
477
+ }), D = K({
478
+ get() {
479
+ return L(p);
480
+ },
481
+ set(e) {
482
+ l(e);
483
+ }
484
+ }), O = (e) => {
485
+ T.value = e;
486
+ }, k = (e) => {
487
+ te.value = e;
488
+ }, A = (e) => {
489
+ E.value = e;
490
+ }, ne = (e) => {
491
+ D.value = e;
492
+ };
493
+ return (t, n) => {
494
+ let r = F("oc-icon"), a = F("oc-button"), o = F("oc-list"), s = F("oc-drop"), c = F("oc-switch"), l = F("oc-page-size"), u = ni("oc-tooltip");
495
+ return Z(), X("div", Ko, [
496
+ e.viewModes.length > 1 ? (Z(), X(U, { key: 0 }, [I((Z(), V(a, {
497
+ id: "viewmode-switch-toggle",
498
+ "aria-label": L(i)("Switch view mode"),
499
+ appearance: "raw",
500
+ class: "my-2 mx-1 p-1 align-middle"
501
+ }, {
502
+ default: P(() => [x.value ? (Z(), V(r, {
503
+ key: 0,
504
+ name: x.value.icon.name,
505
+ "fill-type": x.value.icon.fillType
506
+ }, null, 8, ["name", "fill-type"])) : G("", !0)]),
507
+ _: 1
508
+ }, 8, ["aria-label"])), [[u, L(i)("Switch view mode")]]), q(s, {
509
+ title: L(i)("View mode"),
510
+ "drop-id": "viewmode-switch-drop",
511
+ toggle: "#viewmode-switch-toggle",
512
+ class: "w-auto",
513
+ "padding-size": "small",
514
+ "close-on-click": ""
515
+ }, {
516
+ default: P(() => [q(o, null, {
517
+ default: P(() => [(Z(!0), X(U, null, M(e.viewModes, (e) => (Z(), X("li", { key: e.name }, [q(a, {
518
+ appearance: L(b) === e.name ? "filled" : "raw",
519
+ "color-role": L(b) === e.name ? "secondaryContainer" : "secondary",
520
+ "no-hover": L(b) === e.name,
521
+ class: B([[e.name], "p-2"]),
522
+ "justify-content": "left",
523
+ onClick: (t) => ee(e)
524
+ }, {
525
+ default: P(() => [Y("div", qo, [Y("span", Jo, [q(r, {
526
+ name: e.icon.name,
527
+ "fill-type": e.icon.fillType,
528
+ size: "medium"
529
+ }, null, 8, ["name", "fill-type"]), Y("span", { textContent: W(e.label) }, null, 8, Yo)]), L(b) === e.name ? (Z(), V(r, {
530
+ key: 0,
531
+ name: "check",
532
+ size: "medium",
533
+ class: "ml-1"
534
+ })) : G("", !0)])]),
535
+ _: 2
536
+ }, 1032, [
537
+ "appearance",
538
+ "color-role",
539
+ "no-hover",
540
+ "class",
541
+ "onClick"
542
+ ])]))), 128))]),
543
+ _: 1
544
+ })]),
545
+ _: 1
546
+ }, 8, ["title"])], 64)) : G("", !0),
547
+ I((Z(), V(a, {
548
+ id: "files-view-options-btn",
549
+ key: "files-view-options-btn",
550
+ "data-testid": "files-view-options-btn",
551
+ "aria-label": L(i)("Display customization options of the files list"),
552
+ appearance: "raw",
553
+ class: "my-2 mx-1 p-1 align-middle"
554
+ }, {
555
+ default: P(() => [q(r, {
556
+ name: "settings-3",
557
+ "fill-type": "line"
558
+ })]),
559
+ _: 1
560
+ }, 8, ["aria-label"])), [[u, L(i)("Display customization options of the files list")]]),
561
+ q(s, {
562
+ title: L(i)("View options"),
563
+ "drop-id": "files-view-options-drop",
564
+ toggle: "#files-view-options-btn",
565
+ mode: "click",
566
+ class: "w-auto [&.oc-drop]:overflow-visible",
567
+ "padding-size": "medium",
568
+ "is-menu": !1
569
+ }, {
570
+ default: P(() => [q(o, null, {
571
+ default: P(() => [
572
+ e.hasHiddenFiles ? (Z(), X("li", Xo, [q(c, {
573
+ checked: T.value,
574
+ "onUpdate:checked": [n[0] ||= (e) => T.value = e, O],
575
+ "data-testid": "files-switch-hidden-files",
576
+ label: L(i)("Show hidden files")
577
+ }, null, 8, ["checked", "label"])])) : G("", !0),
578
+ e.hasFileExtensions ? (Z(), X("li", Zo, [q(c, {
579
+ checked: te.value,
580
+ "onUpdate:checked": [n[1] ||= (e) => te.value = e, k],
581
+ "data-testid": "files-switch-files-extensions-files",
582
+ label: L(i)("Show file extensions")
583
+ }, null, 8, ["checked", "label"])])) : G("", !0),
584
+ e.hasPagination ? (Z(), X("li", Qo, [m.value ? G("", !0) : (Z(), V(l, {
585
+ key: 0,
586
+ selected: L(Re)(L(y)),
587
+ "data-testid": "files-pagination-size",
588
+ label: L(i)("Items per page"),
589
+ options: e.paginationOptions,
590
+ class: "files-pagination-size",
591
+ onChange: C
592
+ }, null, 8, [
593
+ "selected",
594
+ "label",
595
+ "options"
596
+ ]))])) : G("", !0),
597
+ L(h) ? (Z(), X("li", $o, [q(c, {
598
+ checked: E.value,
599
+ "onUpdate:checked": [n[2] ||= (e) => E.value = e, A],
600
+ "data-testid": "files-switch-projects-show-disabled",
601
+ label: L(i)("Show disabled Spaces")
602
+ }, null, 8, ["checked", "label"])])) : G("", !0),
603
+ L(g) ? (Z(), X("li", es, [q(c, {
604
+ checked: D.value,
605
+ "onUpdate:checked": [n[3] ||= (e) => D.value = e, ne],
606
+ "data-testid": "files-switch-projects-show-disabled",
607
+ label: L(i)("Show empty trash bins")
608
+ }, null, 8, ["checked", "label"])])) : G("", !0),
609
+ L(b) === L(ma).name.tiles ? (Z(), X("li", ts, [Y("label", {
610
+ for: "tiles-size-slider",
611
+ textContent: W(L(i)("Tile size"))
612
+ }, null, 8, ns), I(Y("input", {
613
+ id: "tiles-size-slider",
614
+ "onUpdate:modelValue": n[4] ||= (e) => Ga(S) ? S.value = e : null,
615
+ type: "range",
616
+ min: 1,
617
+ max: L(w),
618
+ class: "oc-range bg-role-surface-container-high rounded-sm outline-0 w-full max-w-[50%] h-1.5 hover:opacity-100 appearance-none",
619
+ "data-testid": "files-tiles-size-slider"
620
+ }, null, 8, rs), [[aa, L(S)]])])) : G("", !0)
621
+ ]),
622
+ _: 1
623
+ })]),
624
+ _: 1
625
+ }, 8, ["title"])
626
+ ]);
627
+ };
628
+ }
629
+ }), [["__scopeId", "data-v-c5e89ed1"]]), as = {
630
+ key: 0,
631
+ id: "mobile-nav"
632
+ }, os = ["aria-current"], ss = { class: "flex" }, cs = ["textContent"], ls = { class: "versions flex flex-col items-center justify-center py-2 mt-4 bg-role-surface-container text-xs text-role-on-surface-variant" }, us = ["textContent"], ds = /* @__PURE__ */ H({
633
+ __name: "MobileNav",
634
+ setup(e) {
635
+ let t = yi(), { isMobile: n } = $i(), { navItems: r } = te(), i = K(() => Ze({ capabilityStore: t })), a = K(() => L(r).find((e) => e.active) || L(r)[0]);
636
+ return (e, t) => {
637
+ let o = F("oc-icon"), s = F("oc-button"), c = F("oc-list"), l = F("version-check"), u = F("oc-drop");
638
+ return L(n) ? (Z(), X("nav", as, [q(s, {
639
+ id: "mobile-nav-button",
640
+ class: "p-1",
641
+ appearance: "raw",
642
+ "aria-current": "page"
643
+ }, {
644
+ default: P(() => [wr(W(a.value.name) + " ", 1), q(o, { name: "arrow-drop-down" })]),
645
+ _: 1
646
+ }), q(u, {
647
+ title: e.$gettext("Navigation"),
648
+ "drop-id": "mobile-nav-drop",
649
+ toggle: "#mobile-nav-button",
650
+ mode: "click",
651
+ "padding-size": "small",
652
+ "close-on-click": ""
653
+ }, {
654
+ default: P(() => [q(c, null, {
655
+ default: P(() => [(Z(!0), X(U, null, M(L(r), (e, t) => (Z(), X("li", {
656
+ key: t,
657
+ class: "mobile-nav-item w-full",
658
+ "aria-current": e.active ? "page" : null
659
+ }, [q(s, {
660
+ type: "router-link",
661
+ appearance: e.active ? "filled" : "raw-inverse",
662
+ "color-role": e.active ? "secondaryContainer" : "surface",
663
+ "justify-content": "left",
664
+ "no-hover": e.active,
665
+ to: e.route,
666
+ class: B(["block p-2", { "router-link-active": e.active }])
667
+ }, {
668
+ default: P(() => [Y("span", ss, [q(o, { name: e.icon }, null, 8, ["name"]), Y("span", {
669
+ class: "ml-4 text",
670
+ textContent: W(e.name)
671
+ }, null, 8, cs)])]),
672
+ _: 2
673
+ }, 1032, [
674
+ "appearance",
675
+ "color-role",
676
+ "no-hover",
677
+ "to",
678
+ "class"
679
+ ])], 8, os))), 128))]),
680
+ _: 1
681
+ }), Y("div", ls, [Y("div", { textContent: W(i.value) }, null, 8, us), q(l)])]),
682
+ _: 1
683
+ }, 8, ["title"])])) : G("", !0);
684
+ };
685
+ }
686
+ }), fs = H({
687
+ name: "AppBar",
688
+ components: {
689
+ BatchActions: No,
690
+ ContextActions: Go,
691
+ ViewOptions: is,
692
+ MobileNav: ds
693
+ },
694
+ props: {
695
+ viewModeDefault: {
696
+ type: String,
697
+ required: !1,
698
+ default: () => ma.defaultModeName
699
+ },
700
+ breadcrumbs: {
701
+ type: Array,
702
+ default: () => []
703
+ },
704
+ breadcrumbsContextActionsItems: {
705
+ type: Array,
706
+ default: () => []
707
+ },
708
+ viewModes: {
709
+ type: Array,
710
+ default: () => []
711
+ },
712
+ hasBulkActions: {
713
+ type: Boolean,
714
+ default: !1
715
+ },
716
+ hasViewOptions: {
717
+ type: Boolean,
718
+ default: !0
719
+ },
720
+ hasHiddenFiles: {
721
+ type: Boolean,
722
+ default: !0
723
+ },
724
+ hasFileExtensions: {
725
+ type: Boolean,
726
+ default: !0
727
+ },
728
+ hasPagination: {
729
+ type: Boolean,
730
+ default: !0
731
+ },
732
+ showActionsOnSelection: {
733
+ type: Boolean,
734
+ default: !1
735
+ },
736
+ batchActionsLoading: {
737
+ type: Boolean,
738
+ default: !1
739
+ },
740
+ space: {
741
+ type: Object,
742
+ required: !1,
743
+ default: null
744
+ }
745
+ },
746
+ setup(e, { emit: t }) {
747
+ let n = gi(), { $gettext: r } = Q(), { can: i } = _r(), a = Mi(), { requestExtensions: o } = dt(), { isSticky: s } = pt(), { isSideBarOpen: c } = $(ki()), l = fr(), { selectedResources: u } = $(l), d = K(() => e.space), { actions: p } = vt(), { actions: m } = Jn(), { actions: h } = _a(), { actions: g } = Cn(), { actions: _ } = Tt(), { actions: v } = me(), { actions: y } = at(), { actions: b } = f(), { actions: x } = se(), { actions: S } = zr(), { actions: C } = ne(), { actions: ee } = kn(), { actions: w } = vn(), { actions: T } = he(), { actions: te } = an(), E = R(0), D = Mn(et, "files-common-search"), O = K(() => Object.hasOwn(Ct(), "navigation") && i("create-all", "Share")), k = K(() => {
748
+ let e = [
749
+ ...L(m),
750
+ ...L(p),
751
+ ...L(_),
752
+ ...L(y),
753
+ ...L(b),
754
+ ...L(x),
755
+ ...L(h),
756
+ ...L(v),
757
+ ...L(S),
758
+ ...L(C)
759
+ ];
760
+ D.value || (e = [
761
+ ...e,
762
+ ...L(g),
763
+ ...L(T),
764
+ ...L(te),
765
+ ...L(ee),
766
+ ...L(w)
767
+ ]);
768
+ let t = o({
769
+ id: "global.files.batch-actions",
770
+ extensionType: "action"
771
+ });
772
+ return t.length && (e = [...e, ...t.map((e) => e.action)]), e.filter((e) => e.isVisible({
773
+ space: L(d),
774
+ resources: l.selectedResources
775
+ }));
776
+ }), A = K(() => n.spaces.filter((e) => oo(e) || so(e))), re = zn("isMobileWidth"), j = Mn(ha, "files-trash-generic"), ie = K(() => !L(re) && e.breadcrumbs.length ? !0 : L(j) && L(A).length === 1 ? !1 : e.breadcrumbs.length > 1), ae = K(() => L(j) && L(A).length === 1 ? e.breadcrumbs.length <= 2 : e.breadcrumbs.length <= 1), M = K(() => L(d) && (so(L(d)) || uo(L(d))) ? 3 : 2), oe = (e) => {
777
+ t(yn, e);
778
+ }, ce = oa("title");
779
+ return {
780
+ router: a,
781
+ hasSharesNavigation: O,
782
+ batchActions: k,
783
+ showBreadcrumb: ie,
784
+ showMobileNav: ae,
785
+ breadcrumbMaxWidth: E,
786
+ breadcrumbTruncationOffset: M,
787
+ fileDroppedBreadcrumb: oe,
788
+ pageTitle: K(() => L(ce) ? r(L(ce)) : L(d)?.name || ""),
789
+ selectedResources: u,
790
+ isSticky: s,
791
+ isSideBarOpen: c
792
+ };
793
+ },
794
+ data: function() {
795
+ return {
796
+ resizeObserver: new ResizeObserver(this.onResize),
797
+ limitedScreenSpace: !1
798
+ };
799
+ },
800
+ computed: {
801
+ showContextActions() {
802
+ return hn(this.breadcrumbs).allowContextActions;
803
+ },
804
+ showBatchActions() {
805
+ return this.hasBulkActions && (this.selectedResources.length >= 1 || ha(this.router, "files-trash-generic"));
806
+ },
807
+ selectedResourcesAnnouncement() {
808
+ return this.selectedResources.length === 0 ? this.$gettext("No items selected.") : this.$ngettext("%{ amount } item selected. Actions are available above the table.", "%{ amount } items selected. Actions are available above the table.", this.selectedResources.length, { amount: this.selectedResources.length.toString() });
809
+ }
810
+ },
811
+ mounted() {
812
+ this.resizeObserver.observe(this.$refs.filesAppBar), window.addEventListener("resize", this.onResize);
813
+ },
814
+ beforeUnmount() {
815
+ this.resizeObserver.unobserve(this.$refs.filesAppBar), window.removeEventListener("resize", this.onResize);
816
+ },
817
+ methods: { onResize() {
818
+ let e = document.getElementById("web-content-main")?.getBoundingClientRect().width || 0, t = document.getElementById("web-nav-sidebar")?.getBoundingClientRect().width || 0, n = document.getElementById("app-sidebar")?.getBoundingClientRect().width || 0, r = document.getElementById("files-app-bar-controls-right")?.clientWidth;
819
+ this.breadcrumbMaxWidth = e - t - n - r, this.limitedScreenSpace = this.isSideBarOpen ? window.innerWidth <= 1280 : window.innerWidth <= 1e3;
820
+ } }
821
+ }), ps = { class: "files-topbar py-1 w-full" }, ms = ["textContent"], hs = {
822
+ key: 2,
823
+ id: "files-app-bar-controls-right",
824
+ class: "flex"
825
+ }, gs = { class: "files-app-bar-actions flex items-center justify-end mt-1 min-h-10 gap-2" }, _s = { class: "flex-1 flex justify-start items-center" }, vs = { key: 1 };
826
+ function ys(e, t, n, r, i, a) {
827
+ let o = F("oc-hidden-announcer"), s = F("context-actions"), c = F("oc-breadcrumb"), l = F("mobile-nav"), u = F("view-options"), d = F("batch-actions"), f = F("oc-spinner");
828
+ return Z(), X("div", {
829
+ id: "files-app-bar",
830
+ ref: "filesAppBar",
831
+ class: B(["px-4 bg-role-surface rounded-t-xl [display:inherit] top-0 z-20", {
832
+ "files-app-bar-squashed": e.isSideBarOpen,
833
+ sticky: e.isSticky
834
+ }])
835
+ }, [Y("div", ps, [
836
+ Y("h1", {
837
+ class: "sr-only",
838
+ textContent: W(e.pageTitle)
839
+ }, null, 8, ms),
840
+ q(o, {
841
+ announcement: e.selectedResourcesAnnouncement,
842
+ level: "polite"
843
+ }, null, 8, ["announcement"]),
844
+ Y("div", { class: B(["flex items-center files-app-bar-controls min-h-12", {
845
+ "justify-between": e.breadcrumbs.length || e.hasSharesNavigation,
846
+ "justify-end": !e.breadcrumbs.length && !e.hasSharesNavigation
847
+ }]) }, [
848
+ e.showBreadcrumb ? (Z(), V(c, {
849
+ key: 0,
850
+ id: "files-breadcrumb",
851
+ "context-menu-padding": "small",
852
+ "show-context-actions": e.showContextActions,
853
+ items: e.breadcrumbs,
854
+ "max-width": e.breadcrumbMaxWidth,
855
+ "truncation-offset": e.breadcrumbTruncationOffset,
856
+ "mobile-breakpoint": e.isSideBarOpen ? "md" : "sm",
857
+ onItemDroppedBreadcrumb: e.fileDroppedBreadcrumb
858
+ }, {
859
+ contextMenu: P(() => [q(s, { "action-options": {
860
+ space: e.space,
861
+ resources: e.breadcrumbsContextActionsItems.filter(Boolean)
862
+ } }, null, 8, ["action-options"])]),
863
+ _: 1
864
+ }, 8, [
865
+ "show-context-actions",
866
+ "items",
867
+ "max-width",
868
+ "truncation-offset",
869
+ "mobile-breakpoint",
870
+ "onItemDroppedBreadcrumb"
871
+ ])) : G("", !0),
872
+ e.showMobileNav ? (Z(), V(l, { key: 1 })) : G("", !0),
873
+ e.hasViewOptions ? (Z(), X("div", hs, [q(u, {
874
+ "view-modes": e.viewModes,
875
+ "has-hidden-files": e.hasHiddenFiles,
876
+ "has-file-extensions": e.hasFileExtensions,
877
+ "has-pagination": e.hasPagination,
878
+ "per-page-storage-prefix": "files",
879
+ "view-mode-default": e.viewModeDefault
880
+ }, null, 8, [
881
+ "view-modes",
882
+ "has-hidden-files",
883
+ "has-file-extensions",
884
+ "has-pagination",
885
+ "view-mode-default"
886
+ ])])) : G("", !0)
887
+ ], 2),
888
+ e.hasSharesNavigation ? k(e.$slots, "navigation", { key: 0 }) : G("", !0),
889
+ Y("div", gs, [Y("div", _s, [k(e.$slots, "actions", { limitedScreenSpace: e.limitedScreenSpace }), e.showBatchActions && !e.batchActionsLoading ? (Z(), V(d, {
890
+ key: 0,
891
+ actions: e.batchActions,
892
+ "action-options": {
893
+ space: e.space,
894
+ resources: e.selectedResources
895
+ },
896
+ "limited-screen-space": e.limitedScreenSpace
897
+ }, null, 8, [
898
+ "actions",
899
+ "action-options",
900
+ "limited-screen-space"
901
+ ])) : e.showBatchActions && e.batchActionsLoading ? (Z(), X("div", vs, [q(f, { "aria-label": e.$gettext("Loading actions") }, null, 8, ["aria-label"])])) : G("", !0)])]),
902
+ k(e.$slots, "content")
903
+ ])], 2);
904
+ }
905
+ var bs = /* @__PURE__ */ z(fs, [["render", ys]]), xs = { class: "oc-app-top-bar self-center flex col-[1/4] row-2 sm:col-2 sm:row-1 [&_.parent-folder]:text-role-on-chrome" }, Ss = { class: "pl-4 pr-1 my-2 mx-auto sm:m-0 inline-flex items-center justify-between bg-role-chrome border border-role-on-chrome rounded-lg h-10 gap-4 w-full sm:w-fit" }, Cs = { class: "open-file-bar flex" }, ws = { class: "flex" }, Ts = {
906
+ key: 1,
907
+ class: "flex items-center",
908
+ "data-testid": "autosave-indicator"
909
+ }, Es = /* @__PURE__ */ H({
910
+ __name: "AppTopBar",
911
+ props: {
912
+ dropDownMenuSections: { default: () => [] },
913
+ dropDownActionOptions: { default: () => ({
914
+ space: null,
915
+ resources: []
916
+ }) },
917
+ mainActions: { default: () => [] },
918
+ hasAutoSave: {
919
+ type: Boolean,
920
+ default: !0
921
+ },
922
+ isEditor: {
923
+ type: Boolean,
924
+ default: !1
925
+ },
926
+ resource: { default: null },
927
+ isReadOnly: {
928
+ type: Boolean,
929
+ default: !0
930
+ }
931
+ },
932
+ emits: ["close"],
933
+ setup(e) {
934
+ let { $gettext: t, current: n } = Q(), r = fr(), i = Un(), { getMatchingSpace: a } = O(), { getParentFolderName: o, getPathPrefix: s, getParentFolderLinkIconAdditionalAttributes: c } = Ba(), l = K(() => r.areFileExtensionsShown), u = K(() => t("Show context menu")), d = K(() => e.isEditor && e.hasAutoSave && i.options.editor.autosaveEnabled), f = K(() => t("Autosave (every %{ duration })", { duration: vo.fromObject({ seconds: i.options.editor.autosaveInterval }, { locale: n }).toHuman() })), p = K(() => a(e.resource)), m = K(() => !co(L(p)));
935
+ return (n, r) => {
936
+ let i = F("oc-icon"), a = F("oc-button"), p = F("oc-drop"), h = ni("oc-tooltip");
937
+ return Z(), X("div", xs, [Y("div", Ss, [Y("div", Cs, [e.resource ? (Z(), V(y, {
938
+ key: 0,
939
+ id: "app-top-bar-resource",
940
+ class: "[&_.oc-resource-name]:max-w-60 xs:[&_.oc-resource-name]:max-w-full sm:[&_.oc-resource-name]:max-w-20 md:[&_.oc-resource-name]:max-w-60 [&_svg]:!fill-role-on-chrome [&_span]:text-role-on-chrome",
941
+ "is-thumbnail-displayed": !1,
942
+ "is-extension-displayed": l.value,
943
+ "path-prefix": L(s)(e.resource),
944
+ resource: e.resource,
945
+ "parent-folder-name": L(o)(e.resource),
946
+ "parent-folder-link-icon-additional-attributes": L(c)(e.resource),
947
+ "is-path-displayed": m.value,
948
+ "is-resource-clickable": !1
949
+ }, null, 8, [
950
+ "is-extension-displayed",
951
+ "path-prefix",
952
+ "resource",
953
+ "parent-folder-name",
954
+ "parent-folder-link-icon-additional-attributes",
955
+ "is-path-displayed"
956
+ ])) : G("", !0)]), Y("div", ws, [
957
+ e.dropDownMenuSections.length ? (Z(), X(U, { key: 0 }, [I((Z(), V(a, {
958
+ id: "oc-openfile-contextmenu-trigger",
959
+ "aria-label": u.value,
960
+ appearance: "raw-inverse",
961
+ "color-role": "chrome",
962
+ class: "p-1"
963
+ }, {
964
+ default: P(() => [q(i, { name: "more-2" })]),
965
+ _: 1
966
+ }, 8, ["aria-label"])), [[h, u.value]]), q(p, {
967
+ "drop-id": "oc-openfile-contextmenu",
968
+ mode: "click",
969
+ "padding-size": "small",
970
+ toggle: "#oc-openfile-contextmenu-trigger",
971
+ "close-on-click": "",
972
+ title: e.resource.name,
973
+ onClick: r[0] ||= J(() => {}, ["stop", "prevent"])
974
+ }, {
975
+ default: P(() => [q(Ho, {
976
+ "menu-sections": e.dropDownMenuSections,
977
+ "action-options": e.dropDownActionOptions
978
+ }, null, 8, ["menu-sections", "action-options"])]),
979
+ _: 1
980
+ }, 8, ["title"])], 64)) : G("", !0),
981
+ d.value && !e.isReadOnly ? (Z(), X("span", Ts, [I(q(i, {
982
+ "accessible-label": f.value,
983
+ name: "refresh",
984
+ color: "white",
985
+ class: "ox-p-xs mx-1"
986
+ }, null, 8, ["accessible-label"]), [[h, f.value]])])) : G("", !0),
987
+ e.mainActions.length && e.resource ? (Z(), V(Ho, {
988
+ key: 2,
989
+ "menu-sections": [{
990
+ name: "main-actions",
991
+ items: e.mainActions.filter((e) => e.isVisible()).map((e) => ({
992
+ ...e,
993
+ class: "p-1 text-role-on-chrome [&_svg]:!fill-role-on-chrome [&:hover:not(:disabled)_svg]:!fill-role-chrome",
994
+ hideLabel: !0
995
+ }))
996
+ }],
997
+ "action-options": { resources: [e.resource] },
998
+ appearance: "raw-inverse",
999
+ "color-role": "chrome"
1000
+ }, null, 8, ["menu-sections", "action-options"])) : G("", !0),
1001
+ q(a, {
1002
+ id: "app-top-bar-close",
1003
+ appearance: "raw-inverse",
1004
+ "color-role": "chrome",
1005
+ class: "p-1",
1006
+ "aria-label": L(t)("Close"),
1007
+ onClick: r[1] ||= (e) => n.$emit("close")
1008
+ }, {
1009
+ default: P(() => [q(i, { name: "close" })]),
1010
+ _: 1
1011
+ }, 8, ["aria-label"])
1012
+ ])])]);
1013
+ };
1014
+ }
1015
+ }), Ds = H({
1016
+ name: "ErrorScreen",
1017
+ props: { message: {
1018
+ default: "",
1019
+ type: String,
1020
+ required: !1
1021
+ } }
1022
+ }), Os = { class: "text-center flex justify-center items-center h-full" }, ks = {
1023
+ key: 0,
1024
+ class: "text-xl"
353
1025
  };
1026
+ function As(e, t, n, r, i, a) {
1027
+ let o = F("oc-icon");
1028
+ return Z(), X("div", Os, [q(o, {
1029
+ size: "xxlarge",
1030
+ name: "error-warning",
1031
+ "fill-type": "line"
1032
+ }), e.message ? (Z(), X("p", ks, W(e.message), 1)) : G("", !0)]);
1033
+ }
1034
+ var js = /* @__PURE__ */ z(Ds, [["render", As]]), Ms = H({ name: "LoadingScreen" }), Ns = { class: "text-center flex justify-center items-center h-full" }, Ps = ["textContent"];
1035
+ function Fs(e, t, n, r, i, a) {
1036
+ let o = F("oc-spinner");
1037
+ return Z(), X("div", Ns, [q(o, { size: "xlarge" }), Y("p", {
1038
+ class: "sr-only",
1039
+ textContent: W(e.$gettext("Loading app"))
1040
+ }, null, 8, Ps)]);
1041
+ }
1042
+ var Is = /* @__PURE__ */ z(Ms, [["render", Fs]]), Ls = [
1043
+ "id",
1044
+ "data-testid",
1045
+ "tabindex",
1046
+ "inert"
1047
+ ], Rs = {
1048
+ key: 0,
1049
+ class: "sidebar-panel__header header grid grid-cols-[auto_1fr_auto] items-center pt-2 px-2"
1050
+ }, zs = { class: "col-start-2 text-center my-0 text-lg" }, Bs = {
1051
+ key: 0,
1052
+ class: "mt-4"
1053
+ }, Vs = /* @__PURE__ */ z(/* @__PURE__ */ H({
1054
+ __name: "SideBarPanels",
1055
+ props: {
1056
+ loading: { type: Boolean },
1057
+ availablePanels: {},
1058
+ panelContext: {},
1059
+ activePanel: { default: "" }
1060
+ },
1061
+ emits: [
1062
+ "selectPanel",
1063
+ "close",
1064
+ "closePanel"
1065
+ ],
1066
+ setup(e, { emit: t }) {
1067
+ let n = t, { $gettext: r } = Q(), i = K(() => e.availablePanels.filter((t) => t.isVisible(e.panelContext) && t.isRoot?.(e.panelContext))), a = K(() => e.availablePanels.filter((t) => t.isVisible(e.panelContext) && !t.isRoot?.(e.panelContext))), o = K(() => L(i).length ? [L(i)[0], ...L(a)] : L(a)), s = K(() => {
1068
+ let t = e.activePanel?.split("#")[0];
1069
+ return !t || !L(a).map((e) => e.name).includes(t) ? null : t;
1070
+ }), c = K(() => L(s) !== null), l = K(() => L(s) === null), d = R(null), f = (e) => {
1071
+ d.value = e;
1072
+ }, p = K(() => L(c) ? L(s) : L(i)[0].name), m = K(() => L(i).length === 1 ? r("Back to %{panel} panel", { panel: L(i)[0].title(e.panelContext) }) : r("Back to main panels")), h = (e) => {
1073
+ n("selectPanel", e);
1074
+ }, g = () => {
1075
+ n("selectPanel", null);
1076
+ }, _ = () => {
1077
+ n("close");
1078
+ }, v = (e) => {
1079
+ f(L(p)), h(e);
1080
+ }, y = () => {
1081
+ f(L(p)), g(), n("closePanel");
1082
+ };
1083
+ return (t, n) => {
1084
+ let f = F("oc-spinner"), h = F("oc-icon"), g = F("oc-button"), b = ni("oc-tooltip");
1085
+ return e.loading ? (Z(), V(f, {
1086
+ key: 0,
1087
+ "aria-label": L(r)("Loading sidebar content")
1088
+ }, null, 8, ["aria-label"])) : (Z(!0), X(U, { key: 1 }, M(o.value, (n) => (Z(), X("div", {
1089
+ id: `sidebar-panel-${n.name}`,
1090
+ key: `panel-${n.name}`,
1091
+ "data-testid": `sidebar-panel-${n.name}`,
1092
+ tabindex: p.value === n.name ? -1 : null,
1093
+ class: B(["sidebar-panel absolute top-0 grid grid-rows-[auto_auto_1fr] bg-role-surface w-full size-full max-w-full max-h-full motion-reduce:transition-none", {
1094
+ "is-root-panel transition-[right] duration-[0.4s,0s]": n.isRoot?.(e.panelContext),
1095
+ "is-active-sub-panel": c.value && s.value === n.name,
1096
+ "is-active-root-panel transition-[right] duration-[0.4s,0s]": l.value && n.isRoot?.(e.panelContext)
1097
+ }]),
1098
+ inert: p.value !== n.name
1099
+ }, [
1100
+ [p.value, d.value].includes(n.name) ? (Z(), X("div", Rs, [
1101
+ n.isRoot?.(e.panelContext) ? G("", !0) : I((Z(), V(g, {
1102
+ key: 0,
1103
+ class: "header__back col-start-1 p-1",
1104
+ appearance: "raw",
1105
+ "aria-label": m.value,
1106
+ onClick: y
1107
+ }, {
1108
+ default: P(() => [q(h, {
1109
+ name: "arrow-left-s",
1110
+ "fill-type": "line"
1111
+ })]),
1112
+ _: 1
1113
+ }, 8, ["aria-label"])), [[b, m.value]]),
1114
+ Y("h2", zs, W(n.title(e.panelContext)), 1),
1115
+ q(g, {
1116
+ appearance: "raw",
1117
+ class: "header__close col-start-3 p-1",
1118
+ "aria-label": L(r)("Close file sidebar"),
1119
+ onClick: _
1120
+ }, {
1121
+ default: P(() => [q(h, { name: "close" })]),
1122
+ _: 1
1123
+ }, 8, ["aria-label"])
1124
+ ])) : G("", !0),
1125
+ Y("div", null, [n.isRoot?.(e.panelContext) ? k(t.$slots, "rootHeader", { key: 0 }, void 0, !0) : k(t.$slots, "subHeader", { key: 1 }, void 0, !0)]),
1126
+ Y("div", { class: B(["sidebar-panel__body flex flex-col p-2 overflow-y-auto overflow-x-hidden", [`sidebar-panel__body-${n.name}`]]) }, [Y("div", { class: B(["sidebar-panel__body-content", { "flex-1 ": !n.isRoot?.(e.panelContext) }]) }, [k(t.$slots, "body", {}, () => [(Z(!0), X(U, null, M(n.isRoot?.(e.panelContext) ? i.value : [n], (t, n) => (Z(), X("div", { key: `sidebar-panel-${t.name}` }, [(l.value ? t.isRoot?.(e.panelContext) : [p.value, d.value].includes(t.name)) ? (Z(), V(u(t.component), va({
1127
+ key: 0,
1128
+ class: [{ "multi-root-panel-separator mt-4 pt-2 border-t": n > 0 }, "rounded-sm"]
1129
+ }, { ref_for: !0 }, t.componentAttrs?.(e.panelContext) || {}), null, 16, ["class"])) : G("", !0)]))), 128))], !0)], 2), n.isRoot?.(e.panelContext) && a.value.length > 0 ? (Z(), X("div", Bs, [(Z(!0), X(U, null, M(a.value, (t) => (Z(), V(g, {
1130
+ id: `sidebar-panel-${t.name}-select`,
1131
+ key: `panel-select-${t.name}`,
1132
+ "data-testid": `sidebar-panel-${t.name}-select`,
1133
+ appearance: "raw-inverse",
1134
+ "color-role": "surface",
1135
+ class: "!grid !grid-cols-[auto_1fr_auto] text-left px-2 w-full h-12",
1136
+ onClick: (e) => v(t.name)
1137
+ }, {
1138
+ default: P(() => [
1139
+ q(h, {
1140
+ name: t.icon,
1141
+ "fill-type": t.iconFillType
1142
+ }, null, 8, ["name", "fill-type"]),
1143
+ wr(" " + W(t.title(e.panelContext)) + " ", 1),
1144
+ q(h, {
1145
+ name: "arrow-right-s",
1146
+ "fill-type": "line"
1147
+ })
1148
+ ]),
1149
+ _: 2
1150
+ }, 1032, [
1151
+ "id",
1152
+ "data-testid",
1153
+ "onClick"
1154
+ ]))), 128))])) : G("", !0)], 2)
1155
+ ], 10, Ls))), 128));
1156
+ };
1157
+ }
1158
+ }), [["__scopeId", "data-v-839c4e7a"]]), Hs = /* @__PURE__ */ H({
1159
+ inheritAttrs: !1,
1160
+ __name: "SideBar",
1161
+ props: {
1162
+ loading: { type: Boolean },
1163
+ availablePanels: {},
1164
+ panelContext: {}
1165
+ },
1166
+ emits: ["selectPanel", "close"],
1167
+ setup(e, { emit: t }) {
1168
+ let n = t, r = ut(), { isMobile: i } = $i(), a = ki(), { focusSidebar: o } = a, { sideBarActivePanel: s } = $(a), c = K(() => {
1169
+ if (L(i)) return {
1170
+ ...L(r),
1171
+ isFocusTrapActive: !e.loading,
1172
+ hasFullHeight: !0,
1173
+ maxHeight: "max-h-[80vh]",
1174
+ class: "z-100",
1175
+ onClicked: l
1176
+ };
1177
+ let t = [
1178
+ "border-l",
1179
+ "focus:outline-0",
1180
+ "focus-visible:outline-0",
1181
+ "w-[360px]",
1182
+ "min-w-[360px]",
1183
+ "overflow-hidden",
1184
+ "relative",
1185
+ "focus:shadow-none",
1186
+ "focus-visible:shadow-none",
1187
+ ...L(r)?.class ? [L(r).class] : []
1188
+ ];
1189
+ return e.loading && t.push("flex", "justify-center", "items-center"), {
1190
+ ...L(r),
1191
+ class: t
1192
+ };
1193
+ }), l = (e) => {
1194
+ if (!e.target) return;
1195
+ let t = e.target === e.currentTarget, n = e.target instanceof HTMLAnchorElement, r = e.target.closest("ul.sidebar-actions-panel");
1196
+ (t || n || r) && d();
1197
+ }, d = () => {
1198
+ a.closeSideBar(), n("close");
1199
+ }, f = (e) => {
1200
+ a.openSideBarPanel(e), n("selectPanel", e);
1201
+ };
1202
+ return ee(() => {
1203
+ L(i) && d();
1204
+ }), (t, n) => (Z(), V(Kn, {
1205
+ to: "#mobile-right-sidebar",
1206
+ disabled: !L(i)
1207
+ }, [(Z(), V(u(L(i) ? "oc-bottom-drawer" : "div"), va({
1208
+ id: "app-sidebar",
1209
+ tabindex: "-1"
1210
+ }, c.value), {
1211
+ default: P(() => [q(Vs, {
1212
+ loading: e.loading,
1213
+ "available-panels": e.availablePanels,
1214
+ "panel-context": e.panelContext,
1215
+ "active-panel": L(s),
1216
+ onSelectPanel: f,
1217
+ onClose: d,
1218
+ onClosePanel: L(o)
1219
+ }, {
1220
+ body: P(() => [k(t.$slots, "body")]),
1221
+ rootHeader: P(() => [k(t.$slots, "rootHeader")]),
1222
+ subHeader: P(() => [k(t.$slots, "subHeader")]),
1223
+ _: 3
1224
+ }, 8, [
1225
+ "loading",
1226
+ "available-panels",
1227
+ "panel-context",
1228
+ "active-panel",
1229
+ "onClosePanel"
1230
+ ])]),
1231
+ _: 3
1232
+ }, 16))], 8, ["disabled"]));
1233
+ }
1234
+ }), Us = { class: "grid items-center p-2" }, Ws = { class: "flex items-center text-sm" }, Gs = ["textContent"], Ks = ["textContent"], qs = /* @__PURE__ */ H({
1235
+ __name: "SpaceInfo",
1236
+ setup(e) {
1237
+ let t = zn("resource");
1238
+ return (e, n) => {
1239
+ let r = F("oc-icon");
1240
+ return Z(), X("div", Us, [Y("div", Ws, [q(r, {
1241
+ name: "layout-grid",
1242
+ size: L(t).description ? "large" : "medium",
1243
+ class: "block mr-2"
1244
+ }, null, 8, ["size"]), Y("div", null, [Y("h3", {
1245
+ "data-testid": "space-info-name",
1246
+ class: "font-semibold m-0 text-base break-all",
1247
+ textContent: W(L(t).name)
1248
+ }, null, 8, Gs), Y("span", {
1249
+ "data-testid": "space-info-subtitle",
1250
+ textContent: W(L(t).description)
1251
+ }, null, 8, Ks)])])]);
1252
+ };
1253
+ }
1254
+ }), Js = { class: "flex justify-between p-2" }, Ys = { class: "flex items-center" }, Xs = {
1255
+ "data-testid": "files-info-name",
1256
+ class: "font-semibold m-0 text-base break-all"
1257
+ }, Zs = /* @__PURE__ */ H({
1258
+ __name: "FileInfo",
1259
+ props: { isSubPanelActive: {
1260
+ type: Boolean,
1261
+ default: !0
1262
+ } },
1263
+ setup(e) {
1264
+ let t = fr(), { isPersonalSpaceRoot: n } = O(), r = zn("resource"), i = zn("space"), a = K(() => t.areFileExtensionsShown), o = K(() => n(L(r)) ? L(i).name : L(r).name);
1265
+ return (t, n) => (Z(), X("div", Js, [Y("div", Ys, [e.isSubPanelActive ? (Z(), V(rn, {
1266
+ key: 0,
1267
+ resource: L(r),
1268
+ size: "large",
1269
+ class: "mr-2 relative"
1270
+ }, null, 8, ["resource"])) : G("", !0), Y("div", null, [Y("h3", Xs, [q(un, {
1271
+ name: o.value,
1272
+ extension: L(r).extension,
1273
+ type: L(r).type,
1274
+ "full-path": L(r).webDavPath,
1275
+ "is-extension-displayed": a.value,
1276
+ "is-path-displayed": !1,
1277
+ "truncate-name": !1,
1278
+ class: "[&_span]:break-all"
1279
+ }, null, 8, [
1280
+ "name",
1281
+ "extension",
1282
+ "type",
1283
+ "full-path",
1284
+ "is-extension-displayed"
1285
+ ])])])])]));
1286
+ }
1287
+ }), Qs = /* @__PURE__ */ H({
1288
+ __name: "FileSideBar",
1289
+ props: { space: { default: () => void 0 } },
1290
+ setup(e) {
1291
+ let t = Mi(), n = tn(), r = dt(), i = gi(), a = Mr(), o = Un(), s = Xi(), { canListShares: c } = or(), { canListVersions: l } = Yn(), u = fr(), { currentFolder: d } = $(u), { isSideBarOpen: f, sideBarActivePanel: p } = $(ki()), m = R(), h = R([]), g = R([]), v = R([]), { selectedResources: y } = Ti(), b = R(!1), x = K(() => L(b)), S = K(() => L(y).length === 0 ? {
1292
+ root: e.space,
1293
+ parent: null,
1294
+ items: L(d)?.id ? [L(d)] : []
1295
+ } : {
1296
+ root: e.space,
1297
+ parent: L(d),
1298
+ items: L(y)
1299
+ }), C = Mn(Sa, "files-shares-with-me"), ee = Mn(Sa, "files-shares-with-others"), w = Mn(Sa, "files-shares-via-link"), T = $r(t, "files-spaces-projects"), te = Mn(et, "files-common-favorites"), E = Mn(et, "files-common-search"), D = K(() => L(S).items?.length === 1 && !so(L(S).items[0])), O = K(() => L(S).items?.length === 1 && so(L(S).items[0])), k = K(() => L(C) || L(ee) || L(w)), A = K(() => L(k) || L(E) || L(te)), ne = K(() => r.requestExtensions({
1300
+ id: "global.files.sidebar",
1301
+ extensionType: "sidebarPanel"
1302
+ }).map((e) => e.panel)), re = go(function* (e, t) {
1303
+ h.value = yield n.webdav.listFileVersions(t.id, { signal: e });
1304
+ }), j = go(function* (r, c) {
1305
+ a.setLoading(!0), a.removeOrphanedShares();
1306
+ let { collaboratorShares: l, linkShares: d } = a, f = n.graphAuthenticated.permissions, p = e.space?.id;
1307
+ if (uo(e.space)) {
1308
+ let t = yield i.getMountPointForSpace({
1309
+ graphClient: n.graphAuthenticated,
1310
+ space: e.space,
1311
+ signal: r
1312
+ });
1313
+ t && (p = t.root.remoteItem.rootId);
1314
+ }
1315
+ let { shares: m, allowedRoles: h } = yield* Qa(f.listPermissions(p, c.fileId, a.graphRoles, {}, { signal: r })), _ = m.filter(to), y = m.filter(ro), b = Object.values(a.graphRoles);
1316
+ if (g.value = h?.map((e) => ({
1317
+ ...e,
1318
+ icon: b.find((t) => t.id === e.id)?.icon
1319
+ })) || [], s.isAppEnabled("open-cloud-mesh")) {
1320
+ let { allowedRoles: e } = yield* Qa(f.listPermissions(p, c.fileId, a.graphRoles, {
1321
+ filter: "@libre.graph.permissions.roles.allowedValues/rolePermissions/any(p:contains(p/condition, '@Subject.UserType==\"Federated\"'))",
1322
+ select: [Rr.LibreGraphPermissionsRolesAllowedValues]
1323
+ }, { signal: r }));
1324
+ v.value = e?.map((e) => ({
1325
+ ...e,
1326
+ icon: b.find((t) => t.id === e.id)?.icon
1327
+ })) || [];
1328
+ }
1329
+ !L(A) && !L(T) && (l.forEach((e) => {
1330
+ _.some((t) => t.id === e.id) || _.push({
1331
+ ...e,
1332
+ indirect: !0
1333
+ });
1334
+ }), d.forEach((e) => {
1335
+ y.some((t) => t.id === e.id) || y.push({
1336
+ ...e,
1337
+ indirect: !0
1338
+ });
1339
+ })), et(t, "files-common-search") && (yield u.loadAncestorMetaData({
1340
+ folder: L(c),
1341
+ space: e.space,
1342
+ client: n.webdav,
1343
+ signal: r
1344
+ }));
1345
+ let x = [...l, ...d].map(({ resourceId: e }) => e), S = Object.values(u.ancestorMetaData).filter(({ id: t, path: n }) => t === c.id || x.includes(t) || no(c) ? !1 : oo(e.space) ? n !== "/" : !0).map(({ id: e }) => e);
1346
+ L(A) && so(e.space) && !so(c) && S.push(e.space.id);
1347
+ let C = new ho({ concurrency: o.options.concurrentRequests.shares.list }), ee = [...new Set(S)].map((e) => C.add(() => n.graphAuthenticated.permissions.listPermissions(p, e, a.graphRoles, {}, { signal: r }).then((e) => {
1348
+ let t = e.shares.map((e) => ({
1349
+ ...e,
1350
+ indirect: !0
1351
+ }));
1352
+ _.push(...t.filter(to)), y.push(...t.filter(ro));
1353
+ })));
1354
+ yield Promise.allSettled(ee), a.setCollaboratorShares(_), a.setLinkShares(y), a.setLoading(!1);
1355
+ }).restartable(), ie = R();
1356
+ N(() => [...L(S).items, f], async (t, n) => {
1357
+ if (L(S).items?.length !== 1) return;
1358
+ if (!L(f)) {
1359
+ ie.value = void 0, h.value = [];
1360
+ return;
1361
+ }
1362
+ let r = t?.[0], i = n?.[0];
1363
+ if (r?.id === i?.id && r?.mdate === L(ie)) return;
1364
+ let a = L(S).items[0];
1365
+ if (ie.value = a.mdate, re.isRunning && re.cancelAll(), l({
1366
+ space: e.space,
1367
+ resource: a
1368
+ })) try {
1369
+ await re.perform(a);
1370
+ } catch (e) {
1371
+ console.error(e);
1372
+ }
1373
+ }, {
1374
+ immediate: !0,
1375
+ deep: !0
1376
+ });
1377
+ let ae = K(() => L(S).items.map((e) => e.id));
1378
+ return N(() => [ae, f], async () => {
1379
+ if (!L(f) || !L(S).items?.length) {
1380
+ a.pruneShares(), m.value = null;
1381
+ return;
1382
+ }
1383
+ if (L(S).items?.length !== 1) return;
1384
+ let t = L(S).items[0];
1385
+ if (b.value = !0, so(t) && await i.loadGraphPermissions({
1386
+ ids: [t.id],
1387
+ graphClient: n.graphAuthenticated
1388
+ }), c({
1389
+ space: e.space,
1390
+ resource: t
1391
+ })) try {
1392
+ j.isRunning && j.cancelAll(), j.perform(t);
1393
+ } catch (e) {
1394
+ console.error(e);
1395
+ }
1396
+ if (!ao(t) && !no(t)) {
1397
+ m.value = t, b.value = !1;
1398
+ return;
1399
+ }
1400
+ try {
1401
+ let r = await n.webdav.getFileInfo(e.space, { path: t.path });
1402
+ m.value = {
1403
+ ...r,
1404
+ ...t,
1405
+ tags: r.tags
1406
+ };
1407
+ } catch (e) {
1408
+ m.value = t, console.error(e);
1409
+ }
1410
+ b.value = !1;
1411
+ }, {
1412
+ deep: !0,
1413
+ immediate: !0
1414
+ }), Yt("resource", _(m)), Yt("versions", _(h)), Yt("space", K(() => e.space)), Yt("availableInternalShareRoles", _(g)), Yt("availableExternalShareRoles", _(v)), Yt("versionsLoading", K(() => re.isRunning)), (e, t) => L(f) ? (Z(), V(Hs, va({
1415
+ key: 0,
1416
+ ref: "sidebar",
1417
+ class: "files-side-bar z-30",
1418
+ "available-panels": ne.value,
1419
+ "panel-context": S.value,
1420
+ loading: x.value
1421
+ }, e.$attrs, { "data-custom-key-bindings-disabled": "true" }), {
1422
+ rootHeader: P(() => [D.value ? (Z(), V(Zs, {
1423
+ key: 0,
1424
+ class: "px-2 pt-2",
1425
+ "is-sub-panel-active": !1
1426
+ })) : O.value ? (Z(), V(qs, { key: 1 })) : G("", !0)]),
1427
+ subHeader: P(() => [D.value ? (Z(), V(Zs, {
1428
+ key: 0,
1429
+ class: "px-2 pt-2",
1430
+ "is-sub-panel-active": !0
1431
+ })) : O.value ? (Z(), V(qs, { key: 1 })) : G("", !0)]),
1432
+ _: 1
1433
+ }, 16, [
1434
+ "available-panels",
1435
+ "panel-context",
1436
+ "loading"
1437
+ ])) : G("", !0);
1438
+ }
1439
+ }), $s = /* @__PURE__ */ ye(An(), 1), ec = H({
1440
+ name: "DatePickerModal",
1441
+ props: {
1442
+ modal: {
1443
+ type: Object,
1444
+ required: !0
1445
+ },
1446
+ currentDate: {
1447
+ type: Object,
1448
+ required: !1,
1449
+ default: null
1450
+ },
1451
+ minDate: {
1452
+ type: Object,
1453
+ required: !1,
1454
+ default: null
1455
+ },
1456
+ isClearable: {
1457
+ type: Boolean,
1458
+ default: !0
1459
+ }
1460
+ },
1461
+ emits: ["confirm", "cancel"],
1462
+ setup() {
1463
+ let { currentTheme: e } = $(za()), t = R(), n = R(!0);
1464
+ return {
1465
+ confirmDisabled: n,
1466
+ onDateChanged: ({ date: e, error: r }) => {
1467
+ n.value = r || !e, t.value = e;
1468
+ },
1469
+ currentTheme: e,
1470
+ dateTime: t
1471
+ };
1472
+ }
1473
+ }), tc = { class: "flex justify-end items-center mt-2" };
1474
+ function nc(e, t, n, r, i, a) {
1475
+ let o = F("oc-datepicker"), s = F("oc-button");
1476
+ return Z(), X(U, null, [q(o, {
1477
+ label: e.$gettext("Expiration date"),
1478
+ type: "date",
1479
+ "min-date": e.minDate,
1480
+ "current-date": e.currentDate,
1481
+ "is-clearable": e.isClearable,
1482
+ "is-dark": e.currentTheme.isDark,
1483
+ "required-mark": "",
1484
+ onDateChanged: e.onDateChanged
1485
+ }, null, 8, [
1486
+ "label",
1487
+ "min-date",
1488
+ "current-date",
1489
+ "is-clearable",
1490
+ "is-dark",
1491
+ "onDateChanged"
1492
+ ]), Y("div", tc, [q(s, {
1493
+ disabled: e.confirmDisabled,
1494
+ class: "oc-modal-body-actions-confirm ml-2",
1495
+ appearance: "filled",
1496
+ onClick: t[0] ||= (t) => e.$emit("confirm", e.dateTime)
1497
+ }, {
1498
+ default: P(() => [wr(W(e.$gettext("Confirm")), 1)]),
1499
+ _: 1
1500
+ }, 8, ["disabled"])])], 64);
1501
+ }
1502
+ var rc = /* @__PURE__ */ z(ec, [["render", nc]]), ic = H({
1503
+ name: "UnsavedChangesModal",
1504
+ props: {
1505
+ modal: {
1506
+ type: Object,
1507
+ required: !0
1508
+ },
1509
+ closeCallback: {
1510
+ type: Function,
1511
+ required: !0
1512
+ }
1513
+ },
1514
+ emits: ["cancel", "confirm"],
1515
+ setup(e) {
1516
+ let { removeModal: t } = Ma();
1517
+ return { onClose: () => {
1518
+ t(e.modal.id), e.closeCallback();
1519
+ } };
1520
+ }
1521
+ }), ac = ["textContent"], oc = { class: "flex justify-end items-center mt-4" }, sc = { class: "oc-modal-body-actions-grid" };
1522
+ function cc(e, t, n, r, i, a) {
1523
+ let o = F("oc-button");
1524
+ return Z(), X(U, null, [
1525
+ Y("span", {
1526
+ class: "inline-block mb-4",
1527
+ textContent: W(e.$gettext("Your changes were not saved. Do you want to save them?"))
1528
+ }, null, 8, ac),
1529
+ t[2] ||= Y("div", { class: "my-4" }, null, -1),
1530
+ Y("div", oc, [Y("div", sc, [
1531
+ q(o, {
1532
+ class: "oc-modal-body-actions-cancel ml-2",
1533
+ onClick: t[0] ||= (t) => e.$emit("cancel")
1534
+ }, {
1535
+ default: P(() => [wr(W(e.$gettext("Cancel")), 1)]),
1536
+ _: 1
1537
+ }),
1538
+ q(o, {
1539
+ class: "oc-modal-body-actions-secondary ml-2",
1540
+ onClick: e.onClose
1541
+ }, {
1542
+ default: P(() => [wr(W(e.$gettext("Don't Save")), 1)]),
1543
+ _: 1
1544
+ }, 8, ["onClick"]),
1545
+ q(o, {
1546
+ class: "oc-modal-body-actions-confirm ml-2",
1547
+ appearance: "filled",
1548
+ onClick: t[1] ||= (t) => e.$emit("confirm")
1549
+ }, {
1550
+ default: P(() => [wr(W(e.$gettext("Save")), 1)]),
1551
+ _: 1
1552
+ })
1553
+ ])])
1554
+ ], 64);
1555
+ }
1556
+ var lc = /* @__PURE__ */ z(ic, [["render", cc]]), uc = /\s/;
1557
+ function dc(e) {
1558
+ for (var t = e.length; t-- && uc.test(e.charAt(t)););
1559
+ return t;
1560
+ }
1561
+ //#endregion
1562
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseTrim.js
1563
+ var fc = /^\s+/;
1564
+ function pc(e) {
1565
+ return e && e.slice(0, dc(e) + 1).replace(fc, "");
1566
+ }
1567
+ //#endregion
1568
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toNumber.js
1569
+ var mc = NaN, hc = /^[-+]0x[0-9a-f]+$/i, gc = /^0b[01]+$/i, _c = /^0o[0-7]+$/i, vc = parseInt;
1570
+ function yc(e) {
1571
+ if (typeof e == "number") return e;
1572
+ if (ie(e)) return mc;
1573
+ if (le(e)) {
1574
+ var t = typeof e.valueOf == "function" ? e.valueOf() : e;
1575
+ e = le(t) ? t + "" : t;
1576
+ }
1577
+ if (typeof e != "string") return e === 0 ? e : +e;
1578
+ e = pc(e);
1579
+ var n = gc.test(e);
1580
+ return n || _c.test(e) ? vc(e.slice(2), n ? 2 : 8) : hc.test(e) ? mc : +e;
1581
+ }
1582
+ //#endregion
1583
+ //#region src/components/AppTemplates/AppWrapper.vue?vue&type=script&setup=true&lang.ts
1584
+ var bc = ["id"], xc = ["textContent"], Sc = {
1585
+ key: 2,
1586
+ class: "flex size-full"
1587
+ }, Cc = "app.app-wrapper.app-top-bar", wc = /* @__PURE__ */ H({
1588
+ __name: "AppWrapper",
1589
+ props: {
1590
+ applicationId: {},
1591
+ urlForResourceOptions: { default: null },
1592
+ fileContentOptions: { default: null },
1593
+ wrappedComponent: { default: null },
1594
+ importResourceWithExtension: {
1595
+ type: Function,
1596
+ default: () => null
1597
+ },
1598
+ disableAutoSave: {
1599
+ type: Boolean,
1600
+ default: !1
1601
+ }
1602
+ },
1603
+ setup(e) {
1604
+ let { $gettext: t, current: n } = Q(), i = Xi(), { showMessage: a, showErrorMessage: o } = Ne(), s = Co(), c = xr(), l = tn(), u = Jt(), { getResourceContext: d } = Pa(), { selectedResources: p } = Ti(), { dispatchModal: m } = Ma(), h = gi(), g = Un(), _ = fr(), v = Mr(), y = Me(), { isMobile: b } = $i(), { isSideBarOpen: x } = $(ki()), { actions: S } = ba({ appId: e.applicationId }), { actions: C } = Cr(), { actions: ee } = f(), { actions: w } = ui(), { actions: T } = Ai(), { actions: te } = me(), E = K(() => !!e.wrappedComponent.emits?.includes("update:resource")), O = R(), A = R(), ne = R(""), re = R(""), j = R(!L(E)), ie = R(), ae = R(!1), M = R(), oe = R(), se = "", ce = null, { registerExtensions: le, unregisterExtensions: ue } = dt();
1605
+ le(K(() => L(j) || L(ie) || !L(O) ? [] : [{
1606
+ id: Cc,
1607
+ type: "customComponent",
1608
+ extensionPointIds: ["app.runtime.header.left"],
1609
+ content: Es,
1610
+ componentProps: () => ({
1611
+ resource: L(O),
1612
+ isReadOnly: L(ae),
1613
+ isEditor: L(fe),
1614
+ hasAutoSave: !e.disableAutoSave,
1615
+ mainActions: L(rt),
1616
+ dropDownMenuSections: L(nt),
1617
+ dropDownActionOptions: L(Ye),
1618
+ onClose: () => {
1619
+ ve();
1620
+ }
1621
+ })
1622
+ }]));
1623
+ let { actions: de } = Ii({ content: oe }), fe = K(() => !!e.wrappedComponent.emits?.includes("update:currentContent")), pe = (t) => !!Object.keys(e.wrappedComponent.props).includes(t), he = K(() => L(oe) !== L(M)), ge = (e) => {
1624
+ e.preventDefault();
1625
+ };
1626
+ N(he, (e) => {
1627
+ e ? window.addEventListener("beforeunload", ge) : window.removeEventListener("beforeunload", ge);
1628
+ });
1629
+ let { applicationConfig: _e, closeApp: ve, currentFileContext: ye, getFileContents: be, getFileInfo: xe, getUrlForResource: Se, putFileContents: Ce, replaceInvalidFileRoute: we, revokeUrl: Te, activeFiles: Ee, loadFolderForFileContext: De, isFolderLoading: Oe } = Yr({ applicationId: e.applicationId }), { applicationMeta: ke } = Xe({
1630
+ applicationId: e.applicationId,
1631
+ appsStore: i
1632
+ }), Ae = K(() => L(ke).meta?.fileSizeLimit), je = K(() => {
1633
+ let { name: e } = L(ke);
1634
+ return t("%{appName} for %{fileName}", {
1635
+ appName: t(e),
1636
+ fileName: L(L(ye).fileName)
1637
+ });
1638
+ }), Pe = vr("driveAliasAndItem"), Fe = r("fileId"), Ie = K(() => Re(L(Fe))), Le = async () => {
1639
+ let e = L(Ie), { space: t, path: n } = await d(e), r = t.getDriveAliasAndItem({ path: n });
1640
+ return oo(t) ? s.push({
1641
+ params: {
1642
+ ...L(c).params,
1643
+ driveAliasAndItem: r
1644
+ },
1645
+ query: {
1646
+ ...L(c).query,
1647
+ fileId: e,
1648
+ contextRouteName: "files-spaces-generic",
1649
+ contextRouteParams: { driveAliasAndItem: (0, $s.dirname)(r) }
1650
+ }
1651
+ }) : s.push({
1652
+ params: {
1653
+ ...L(c).params,
1654
+ driveAliasAndItem: r
1655
+ },
1656
+ query: {
1657
+ ...L(c).query,
1658
+ fileId: e,
1659
+ contextRouteName: n === "/" ? "files-shares-with-me" : "files-spaces-generic",
1660
+ ...uo(t) && { shareId: t.id },
1661
+ contextRouteParams: { driveAliasAndItem: (0, $s.dirname)(r) },
1662
+ contextRouteQuery: { ...uo(t) && { shareId: t.id } }
1663
+ }
1664
+ });
1665
+ }, ze = go(function* (e) {
1666
+ try {
1667
+ L(Pe) || (yield Le()), A.value = L(L(ye).space);
1668
+ let t = yield xe(L(ye), { signal: e });
1669
+ if (O.value = t, uo(L(A)) && (L(O).remoteItemId = L(A).id, L(O).id === L(O).remoteItemId)) {
1670
+ let e = yield* Qa(mr({
1671
+ graphClient: l.graphAuthenticated,
1672
+ spacesStore: h,
1673
+ space: L(A)
1674
+ }));
1675
+ e && (O.value = {
1676
+ ...t,
1677
+ ...Xa({
1678
+ graphRoles: v.graphRoles,
1679
+ driveItem: e,
1680
+ serverUrl: g.serverUrl
1681
+ }),
1682
+ tags: t.tags
1683
+ });
1684
+ }
1685
+ _.initResourceList({
1686
+ currentFolder: null,
1687
+ resources: [L(O)]
1688
+ }), p.value = [L(O)];
1689
+ } catch (e) {
1690
+ console.error(e), ie.value = e, j.value = !1;
1691
+ }
1692
+ }).restartable(), Be = go(function* (n) {
1693
+ try {
1694
+ let r = e.importResourceWithExtension(L(O));
1695
+ if (r) {
1696
+ let e = _o.local().toFormat("yyyyMMddHHmmss"), i = `${L(O).name}_${e}.${r}`;
1697
+ if (!(yield l.webdav.copyFiles(L(A), L(O), L(A), { path: i }, { signal: n }))) throw Error(t("Importing failed"));
1698
+ O.value = { path: i };
1699
+ }
1700
+ if (we(ye, L(O))) return;
1701
+ if (ae.value = ![D.Updateable, D.FileUpdateable].some((e) => (L(O).permissions || "").indexOf(e) > -1), L(pe("currentContent"))) {
1702
+ let t = yield* Qa(be(ye, {
1703
+ ...e.fileContentOptions,
1704
+ signal: n
1705
+ }));
1706
+ M.value = oe.value = t.body, ne.value = t.headers["OC-ETag"];
1707
+ }
1708
+ L(pe("url")) && (re.value = yield Se(L(A), L(O), {
1709
+ ...e.urlForResourceOptions,
1710
+ signal: n
1711
+ }));
1712
+ } catch (e) {
1713
+ console.error(e), ie.value = e;
1714
+ } finally {
1715
+ j.value = !1;
1716
+ }
1717
+ }).restartable();
1718
+ N(ye, async () => {
1719
+ L(E) ? A.value = L(L(ye).space) : (await ze.perform(), L(Ae) && yc(L(O).size) > L(Ae) ? m({
1720
+ title: t("File exceeds %{threshold}", { threshold: Ge(L(Ae), n) }),
1721
+ message: t("%{resource} exceeds the recommended size of %{threshold} for editing, and may cause performance issues.", {
1722
+ resource: L(O).name,
1723
+ threshold: Ge(L(Ae), n)
1724
+ }),
1725
+ confirmText: t("Continue"),
1726
+ onCancel: () => {
1727
+ ve();
1728
+ },
1729
+ onConfirm: () => {
1730
+ Be.perform();
1731
+ }
1732
+ }) : Be.perform());
1733
+ }, { immediate: !0 });
1734
+ let Ve = (e) => {
1735
+ console.error(e), o({
1736
+ title: t("An error occurred"),
1737
+ desc: e.message,
1738
+ errors: [e]
1739
+ });
1740
+ }, He = () => {
1741
+ a({ title: t("File autosaved") });
1742
+ }, Ue = go(function* () {
1743
+ let e = L(oe);
1744
+ try {
1745
+ let t = yield Ce(ye, {
1746
+ content: e,
1747
+ previousEntityTag: L(ne)
1748
+ });
1749
+ M.value = e, ne.value = t.etag, _.upsertResource(t);
1750
+ } catch (e) {
1751
+ switch (e.statusCode) {
1752
+ case 401:
1753
+ case 403:
1754
+ Ve(new Ja(t("You're not authorized to save this file"), e.response));
1755
+ break;
1756
+ case 409:
1757
+ case 412:
1758
+ Ve(new Ja(t("This file was updated outside this window. Please copy your changes or save the file under a new name (»Save As...«)."), e.response));
1759
+ break;
1760
+ case 507:
1761
+ let n = h.spaces.find((e) => e.id === L(O).storageId && so(e));
1762
+ if (n) {
1763
+ Ve(new Ja(t("Insufficient quota on \"%{spaceName}\" to save this file", { spaceName: n.name }), e.response));
1764
+ break;
1765
+ }
1766
+ Ve(new Ja(t("Insufficient quota for saving this file"), e.response));
1767
+ break;
1768
+ default: Ve(new Ja("", e.response));
1769
+ }
1770
+ }
1771
+ }).drop(), We = async () => {
1772
+ await Ue.perform();
1773
+ }, Ke = null;
1774
+ Ht(() => {
1775
+ if (se = y.subscribe("runtime.resource.deleted", Ze), _.ancestorMetaData?.["/"] && L(A) && _.ancestorMetaData["/"].spaceId !== L(A).id && _.setAncestorMetaData({}), !L(fe)) return;
1776
+ let t = g.options.editor;
1777
+ t.autosaveEnabled && !e.disableAutoSave && (Ke = setInterval(async () => {
1778
+ he.value && (await We(), He());
1779
+ }, (t.autosaveInterval || 120) * 1e3));
1780
+ }), ja(() => {
1781
+ y.unsubscribe("runtime.resource.deleted", se), ue([Cc]), u.isLoading || window.removeEventListener("beforeunload", ge), L(pe("url")) && Te(re.value), L(fe) && (clearInterval(Ke), Ke = null);
1782
+ });
1783
+ let { bindKeyAction: qe } = Rn({ skipDisabledKeyBindingsCheck: !0 });
1784
+ qe({
1785
+ modifier: Ar.Ctrl,
1786
+ primary: Lr.S
1787
+ }, () => {
1788
+ L(he) && We();
1789
+ });
1790
+ let Je = K(() => [{
1791
+ name: "save-file",
1792
+ disabledTooltip: () => "",
1793
+ isVisible: () => L(fe) && !L(ae),
1794
+ isDisabled: () => !L(he),
1795
+ icon: "save",
1796
+ id: "app-save-action",
1797
+ label: () => t("Save"),
1798
+ handler: We
1799
+ }]), Ye = K(() => ({
1800
+ space: L(A),
1801
+ resources: [L(O)]
1802
+ })), P = async (e, t) => {
1803
+ L(he) && (await We(), He()), t(e);
1804
+ }, Ze = (e) => {
1805
+ if (e.find((e) => e.id === L(O).id)) {
1806
+ if (ce) return ce();
1807
+ ve();
1808
+ }
1809
+ }, Qe = K(() => [
1810
+ ...L(S),
1811
+ ...L(Je),
1812
+ ...L(de).map((e) => ({
1813
+ ...e,
1814
+ isVisible: (t) => fe.value && e.isVisible(t)
1815
+ }))
1816
+ ].filter((e) => e.isVisible(L(Ye)))), $e = K(() => [...L(T), ...L(C)].filter((e) => e.isVisible(L(Ye)))), et = K(() => [...L(ee).map((e) => ({
1817
+ ...e,
1818
+ handler: (t) => P(t, e.handler)
1819
+ })), ...L(te)].filter((e) => e.isVisible(L(Ye)))), tt = K(() => [...L(w)].filter((e) => e.isVisible(L(Ye)))), nt = K(() => {
1820
+ let e = [];
1821
+ return L(Qe).length && e.push({
1822
+ name: "context",
1823
+ items: L(Qe)
1824
+ }), L($e).length && e.push({
1825
+ name: "share",
1826
+ items: L($e)
1827
+ }), L(et).length && e.push({
1828
+ name: "actions",
1829
+ items: L(et)
1830
+ }), L(tt).length && e.push({
1831
+ name: "sidebar",
1832
+ items: L(tt)
1833
+ }), e;
1834
+ }), rt = K(() => [...L(Je)]);
1835
+ So((e, n, r) => {
1836
+ L(he) ? m({
1837
+ title: t("Unsaved changes"),
1838
+ customComponent: lc,
1839
+ focusTrapInitial: ".oc-modal-body-actions-confirm",
1840
+ hideActions: !0,
1841
+ hideCancelButton: !0,
1842
+ customComponentAttrs: () => ({ closeCallback: () => {
1843
+ ue([Cc]), r();
1844
+ } }),
1845
+ async onConfirm() {
1846
+ ue([Cc]), await We(), r();
1847
+ }
1848
+ }) : (ue([Cc]), r());
1849
+ });
1850
+ let it = K(() => ({
1851
+ url: L(re),
1852
+ space: L(L(ye).space),
1853
+ resource: L(O),
1854
+ activeFiles: L(Ee),
1855
+ isDirty: L(he),
1856
+ isReadOnly: L(ae),
1857
+ applicationConfig: L(_e),
1858
+ currentFileContext: L(ye),
1859
+ currentContent: L(oe),
1860
+ isFolderLoading: L(Oe),
1861
+ "onUpdate:resource": (e) => {
1862
+ A.value = L(L(ye).space), O.value = {
1863
+ ...e,
1864
+ ...uo(L(A)) && { remoteItemId: L(A).id }
1865
+ }, p.value = [L(O)];
1866
+ },
1867
+ "onUpdate:currentContent": (e) => {
1868
+ oe.value = e;
1869
+ },
1870
+ "onRegister:onDeleteResourceCallback": (e) => {
1871
+ ce = e;
1872
+ },
1873
+ "onDelete:resource": () => {
1874
+ L(te)[0].isVisible({
1875
+ space: L(A),
1876
+ resources: [L(O)]
1877
+ }) && L(te)[0].handler({
1878
+ space: L(A),
1879
+ resources: [L(O)]
1880
+ });
1881
+ },
1882
+ onSave: We,
1883
+ onClose: ve,
1884
+ loadFolderForFileContext: De,
1885
+ revokeUrl: Te,
1886
+ getUrlForResource: Se
1887
+ }));
1888
+ return (t, n) => (Z(), X("main", {
1889
+ id: e.applicationId,
1890
+ class: "app-wrapper h-full border-0",
1891
+ onKeydown: n[0] ||= Si((...e) => L(ve) && L(ve)(...e), ["esc"])
1892
+ }, [Y("h1", {
1893
+ class: "sr-only",
1894
+ textContent: W(je.value)
1895
+ }, null, 8, xc), j.value ? (Z(), V(Is, { key: 0 })) : ie.value ? (Z(), V(js, {
1896
+ key: 1,
1897
+ message: ie.value.message
1898
+ }, null, 8, ["message"])) : (Z(), X("div", Sc, [k(t.$slots, "default", va({ class: ["app-wrapper-content size-full", { "w-[calc(100%-360px)]": L(x) && !L(b) }] }, it.value)), q(Qs, { space: A.value }, null, 8, ["space"])]))], 40, bc));
1899
+ }
1900
+ });
1901
+ //#endregion
1902
+ //#region src/components/AppTemplates/AppWrapperRoute.ts
1903
+ function Tc(e, t) {
1904
+ return H({ render() {
1905
+ return jr(wc, {
1906
+ wrappedComponent: e,
1907
+ ...t
1908
+ }, { default: (t) => jr(e, t) });
1909
+ } });
1910
+ }
1911
+ //#endregion
1912
+ //#region src/components/ContextActions/ContextMenuQuickAction.vue
1913
+ var Ec = /* @__PURE__ */ H({
1914
+ __name: "ContextMenuQuickAction",
1915
+ props: {
1916
+ item: {},
1917
+ resourceDomSelector: {
1918
+ type: Function,
1919
+ default: (e) => $a(e.id)
1920
+ },
1921
+ title: { default: "" }
1922
+ },
1923
+ emits: ["quickActionClicked"],
1924
+ setup(e, { expose: t }) {
1925
+ let { $gettext: n } = Q(), r = fe("drop");
1926
+ t({ drop: r });
1927
+ let i = K(() => n("Show context menu"));
1928
+ return (t, n) => {
1929
+ let a = F("oc-icon"), o = F("oc-button"), s = ni("oc-tooltip");
1930
+ return Z(), X(U, null, [I((Z(), V(o, {
1931
+ id: `context-menu-trigger-${e.resourceDomSelector(e.item)}`,
1932
+ "data-test-context-menu-resource-name": e.item.name,
1933
+ "aria-label": i.value,
1934
+ appearance: "raw",
1935
+ class: B(["quick-action-button ml-1 p-1", t.$attrs.class]),
1936
+ onClick: n[0] ||= (e) => t.$emit("quickActionClicked", e)
1937
+ }, {
1938
+ default: P(() => [q(a, { name: "more-2" })]),
1939
+ _: 1
1940
+ }, 8, [
1941
+ "id",
1942
+ "data-test-context-menu-resource-name",
1943
+ "aria-label",
1944
+ "class"
1945
+ ])), [[s, i.value]]), q(L(ci), {
1946
+ ref_key: "drop",
1947
+ ref: r,
1948
+ "drop-id": `context-menu-drop-${e.resourceDomSelector(e.item)}`,
1949
+ toggle: `#context-menu-trigger-${e.resourceDomSelector(e.item)}`,
1950
+ title: e.title,
1951
+ position: "left-start",
1952
+ mode: "manual",
1953
+ "padding-size": "small",
1954
+ "close-on-click": ""
1955
+ }, {
1956
+ default: P(() => [k(t.$slots, "contextMenu", { item: e.item })]),
1957
+ _: 3
1958
+ }, 8, [
1959
+ "drop-id",
1960
+ "toggle",
1961
+ "title"
1962
+ ])], 64);
1963
+ };
1964
+ }
1965
+ }), Dc = H({
1966
+ name: "ResourceGhostElement",
1967
+ components: { ResourceIcon: rn },
1968
+ props: { previewItems: {
1969
+ type: Array,
1970
+ required: !0
1971
+ } },
1972
+ computed: {
1973
+ layerCount() {
1974
+ return Math.min(this.previewItems.length, 3);
1975
+ },
1976
+ showSecondLayer() {
1977
+ return this.layerCount > 1;
1978
+ },
1979
+ showThirdLayer() {
1980
+ return this.layerCount > 2;
1981
+ },
1982
+ itemCount() {
1983
+ return this.previewItems.length;
1984
+ }
1985
+ }
1986
+ }), Oc = {
1987
+ id: "ghost-element",
1988
+ class: "z-[var(--z-index-modal)] absolute pt-1 pl-4 bg-transparent"
1989
+ }, kc = { class: "relative rounded-sm bg-role-surface-container-high" }, Ac = {
1990
+ key: 0,
1991
+ class: "-z-10 absolute top-[3px] left-[3px] right-[-3px] bottom-[-3px] rounded-sm bg-role-surface-container-high brightness-82"
1992
+ }, jc = {
1993
+ key: 1,
1994
+ class: "-z-20 absolute top-[6px] left-[6px] right-[-6px] bottom-[-6px] rounded-sm bg-role-surface-container-high brightness-72"
1995
+ }, Mc = { class: "badge absolute top-[-2px] right-[-8px] p-1 text-sm text-center leading-2 bg-red-600 text-white rounded-4xl box-content min-w-2 h-2" };
1996
+ function Nc(e, t, n, r, i, a) {
1997
+ let o = F("resource-icon");
1998
+ return Z(), X("div", Oc, [Y("div", kc, [
1999
+ q(o, {
2000
+ class: "p-1",
2001
+ resource: e.previewItems[0]
2002
+ }, null, 8, ["resource"]),
2003
+ e.showSecondLayer ? (Z(), X("div", Ac)) : G("", !0),
2004
+ e.showThirdLayer ? (Z(), X("div", jc)) : G("", !0)
2005
+ ]), Y("span", Mc, W(e.itemCount), 1)]);
2006
+ }
2007
+ var Pc = /* @__PURE__ */ z(Dc, [["render", Nc]]), Fc = H({
2008
+ name: "ResourceSize",
2009
+ props: { size: {
2010
+ type: [String, Number],
2011
+ required: !0
2012
+ } },
2013
+ setup: (e) => {
2014
+ let { current: t } = Q();
2015
+ return { formattedSize: K(() => Ge(e.size, t)) };
2016
+ }
2017
+ }), Ic = ["textContent"];
2018
+ function Lc(e, t, n, r, i, a) {
2019
+ return Z(), X("span", { textContent: W(e.formattedSize) }, null, 8, Ic);
2020
+ }
2021
+ var Rc = /* @__PURE__ */ z(Fc, [["render", Lc]]), zc = /* @__PURE__ */ H({
2022
+ __name: "ResourceStatusIndicators",
2023
+ props: {
2024
+ resource: {},
2025
+ space: { default: () => void 0 },
2026
+ filter: {
2027
+ type: Function,
2028
+ default: void 0
2029
+ }
2030
+ },
2031
+ setup(e) {
2032
+ let t = ut(), { getIndicators: n } = sr(), r = K(() => {
2033
+ let t = n({
2034
+ space: e.space,
2035
+ resource: e.resource
2036
+ });
2037
+ return e.filter ? t.filter(e.filter) : t;
2038
+ });
2039
+ return (n, i) => r.value.length > 0 ? (Z(), V(L(Gn), va({ key: 0 }, L(t), {
2040
+ indicators: r.value,
2041
+ resource: e.resource
2042
+ }), null, 16, ["indicators", "resource"])) : G("", !0);
2043
+ }
2044
+ }), Bc = /* @__PURE__ */ H({
2045
+ __name: "UserAvatar",
2046
+ props: {
2047
+ userId: {},
2048
+ userName: {},
2049
+ width: { default: 36 }
2050
+ },
2051
+ setup(e) {
2052
+ let { avatarMap: t } = $(Wi()), { enqueueAvatar: n } = ta(), r = K(() => L(t)[e.userId]);
2053
+ return Ht(() => {
2054
+ n(e.userId);
2055
+ }), (t, n) => {
2056
+ let i = F("oc-avatar");
2057
+ return Z(), V(i, {
2058
+ "user-name": e.userName,
2059
+ src: r.value,
2060
+ width: e.width
2061
+ }, null, 8, [
2062
+ "user-name",
2063
+ "src",
2064
+ "width"
2065
+ ]);
2066
+ };
2067
+ }
2068
+ }), Vc = { class: /* @__PURE__ */ B([
2069
+ "[&_.cropper-crop-box]:!outline-1",
2070
+ "[&_.cropper-crop-box]:!outline-role-outline",
2071
+ "[&_.cropper-view-box]:!rounded-[50%]",
2072
+ "[&_.cropper-crop-box]:!rounded-[50%]",
2073
+ "[&_.cropper-line]:!bg-role-outline",
2074
+ "[&_.cropper-point]:!bg-role-outline"
2075
+ ]) }, Hc = { class: "flex flex-col items-center" }, Uc = { class: "oc-button-group" }, Wc = { key: 0 }, Gc = ["src"], Kc = { class: "text-sm text-role-on-surface-variant flex items-center mt-1" }, qc = ["textContent"], Jc = /* @__PURE__ */ H({
2076
+ __name: "AvatarUpload",
2077
+ setup(e) {
2078
+ let t = $n(), n = Wi(), { avatarMap: r } = $(n), { user: i } = $(t), { $gettext: a } = Q(), { showErrorMessage: o, showMessage: s } = Ne(), { graphAuthenticated: c } = tn(), { setCropperInstance: l } = Pi(), u = R(null), d = R(null), f = R(null), p = R(!1), m = R(!1), h = R(!1), g = R(null), _ = K(() => !!L(r)[L(i).id]), v = (e) => {
2079
+ let t = e.target.files?.[0];
2080
+ if (t) {
2081
+ if (t.size > 10485760) {
2082
+ o({ title: a("File size exceeds the limit of %{size}MB", { size: "10" }) });
2083
+ return;
2084
+ }
2085
+ u.value = URL.createObjectURL(t), m.value = !0;
2086
+ }
2087
+ };
2088
+ N(u, async (e) => {
2089
+ e && (await Ra(), f.value && f.value.destroy(), d.value && (f.value = new xo(d.value, {
2090
+ aspectRatio: 1,
2091
+ viewMode: 1,
2092
+ dragMode: "move",
2093
+ autoCropArea: .8,
2094
+ responsive: !0,
2095
+ background: !1,
2096
+ ready() {
2097
+ p.value = !0;
2098
+ }
2099
+ }), l(f)));
2100
+ });
2101
+ let y = () => f.value.getCroppedCanvas({
2102
+ width: 256,
2103
+ height: 256,
2104
+ imageSmoothingQuality: "high"
2105
+ }), b = async (e) => await new Promise((t) => {
2106
+ e.toBlob((e) => t(e), "image/png");
2107
+ }), x = () => {
2108
+ g.value?.click();
2109
+ }, S = () => {
2110
+ m.value = !1, w();
2111
+ }, C = async () => {
2112
+ let e = await b(y()), t = URL.createObjectURL(e), r = new File([e], "avatar.png", {
2113
+ type: "image/png",
2114
+ lastModified: Date.now()
2115
+ });
2116
+ try {
2117
+ await c.photos.updateOwnUserPhotoPatch(r), n.addAvatar(L(i).id, t), s({ title: a("Profile picture was set successfully") });
2118
+ } catch (e) {
2119
+ o({
2120
+ title: a("Failed to set profile picture"),
2121
+ errors: [e]
2122
+ });
2123
+ }
2124
+ m.value = !1, w();
2125
+ }, ee = async () => {
2126
+ try {
2127
+ await c.photos.deleteOwnUserPhoto(), n.removeAvatar(L(i).id), s({ title: a("Profile picture was removed successfully") });
2128
+ } catch (e) {
2129
+ o({
2130
+ title: a("Failed to remove profile picture"),
2131
+ errors: [e]
2132
+ });
2133
+ }
2134
+ h.value = !1;
2135
+ }, w = () => {
2136
+ f.value?.destroy(), f.value = null, g.value && (g.value.value = ""), u.value = null;
2137
+ };
2138
+ return (e, t) => {
2139
+ let n = F("oc-button"), r = F("oc-icon"), o = F("oc-modal");
2140
+ return Z(), X("div", Vc, [
2141
+ Y("input", {
2142
+ ref_key: "fileInputRef",
2143
+ ref: g,
2144
+ class: "invisible avatar-file-input",
2145
+ type: "file",
2146
+ accept: "image/jpeg, image/png",
2147
+ onChange: v
2148
+ }, null, 544),
2149
+ Y("div", Hc, [q(Bc, {
2150
+ class: "mb-4",
2151
+ width: 128,
2152
+ "user-id": L(i).id,
2153
+ "user-name": L(i).displayName
2154
+ }, null, 8, ["user-id", "user-name"]), Y("div", null, [Y("div", Uc, [q(n, {
2155
+ size: "small",
2156
+ onClick: x
2157
+ }, {
2158
+ default: P(() => [wr(W(L(a)("Upload")), 1)]),
2159
+ _: 1
2160
+ }), _.value ? (Z(), V(n, {
2161
+ key: 0,
2162
+ class: "avatar-upload-remove-button",
2163
+ size: "small",
2164
+ onClick: t[0] ||= (e) => h.value = !0
2165
+ }, {
2166
+ default: P(() => [wr(W(L(a)("Remove")), 1)]),
2167
+ _: 1
2168
+ })) : G("", !0)])])]),
2169
+ m.value ? (Z(), V(o, {
2170
+ key: 0,
2171
+ title: L(a)("Crop your new profile picture"),
2172
+ "button-cancel-text": L(a)("Cancel"),
2173
+ "button-confirm-text": L(a)("Set"),
2174
+ "button-confirm-disabled": !p.value,
2175
+ "focus-trap-initial": !1,
2176
+ onCancel: S,
2177
+ onConfirm: C
2178
+ }, {
2179
+ content: P(() => [u.value ? (Z(), X("div", Wc, [Y("img", {
2180
+ ref_key: "imageRef",
2181
+ ref: d,
2182
+ class: "max-h-[400px]",
2183
+ src: u.value
2184
+ }, null, 8, Gc), Y("div", Kc, [q(r, {
2185
+ class: "mr-1",
2186
+ name: "information",
2187
+ size: "small",
2188
+ "fill-type": "line"
2189
+ }), Y("span", { textContent: W(L(a)("Zoom via %{ zoomKeys }, pan via %{ panKeys }", {
2190
+ zoomKeys: L(a)("+-"),
2191
+ panKeys: L(a)("↑↓←→")
2192
+ })) }, null, 8, qc)])])) : G("", !0)]),
2193
+ _: 1
2194
+ }, 8, [
2195
+ "title",
2196
+ "button-cancel-text",
2197
+ "button-confirm-text",
2198
+ "button-confirm-disabled"
2199
+ ])) : G("", !0),
2200
+ h.value ? (Z(), V(o, {
2201
+ key: 1,
2202
+ message: L(a)("Are you sure you want to remove your profile picture?"),
2203
+ title: L(a)("Remove profile picture"),
2204
+ "button-cancel-text": L(a)("Cancel"),
2205
+ "button-confirm-text": L(a)("Remove"),
2206
+ onCancel: t[1] ||= (e) => h.value = !1,
2207
+ onConfirm: ee
2208
+ }, null, 8, [
2209
+ "message",
2210
+ "title",
2211
+ "button-cancel-text",
2212
+ "button-confirm-text"
2213
+ ])) : G("", !0)
2214
+ ]);
2215
+ };
2216
+ }
2217
+ }), Yc = { class: "resource-table-select-all flex justify-center items-center" }, Xc = { class: "truncate" }, Zc = ["textContent"], Qc = ["textContent"], $c = ["textContent"], el = {
2218
+ key: 0,
2219
+ class: "flex items-center justify-end flex-row flex-nowrap"
2220
+ }, tl = 850, nl = /* @__PURE__ */ H({
2221
+ __name: "ResourceTable",
2222
+ props: {
2223
+ resources: {},
2224
+ resourceDomSelector: {
2225
+ type: Function,
2226
+ default: (e) => $a(e.id)
2227
+ },
2228
+ arePathsDisplayed: {
2229
+ type: Boolean,
2230
+ default: !1
2231
+ },
2232
+ selectedIds: { default: () => [] },
2233
+ hasActions: {
2234
+ type: Boolean,
2235
+ default: !0
2236
+ },
2237
+ showRenameQuickAction: {
2238
+ type: Boolean,
2239
+ default: !0
2240
+ },
2241
+ areResourcesClickable: {
2242
+ type: Boolean,
2243
+ default: !0
2244
+ },
2245
+ headerPosition: { default: 0 },
2246
+ isSelectable: {
2247
+ type: Boolean,
2248
+ default: !0
2249
+ },
2250
+ dragDrop: {
2251
+ type: Boolean,
2252
+ default: !1
2253
+ },
2254
+ viewMode: { default: () => ma.defaultModeName },
2255
+ hover: {
2256
+ type: Boolean,
2257
+ default: !0
2258
+ },
2259
+ sortBy: { default: () => void 0 },
2260
+ fieldsDisplayed: { default: () => void 0 },
2261
+ sortDir: { default: () => void 0 },
2262
+ space: { default: () => void 0 },
2263
+ resourceType: { default: "file" },
2264
+ lazy: {
2265
+ type: Boolean,
2266
+ default: !0
2267
+ }
2268
+ },
2269
+ emits: [
2270
+ "fileClick",
2271
+ "sort",
2272
+ "fileDropped",
2273
+ "update:selectedIds",
2274
+ "update:modelValue"
2275
+ ],
2276
+ setup(e, { emit: t }) {
2277
+ let n = t, r = Mi(), i = yi(), { getMatchingSpace: a } = O(), { interceptModifierClick: o } = mi(), { getParentFolderLink: s, getParentFolderLinkIconAdditionalAttributes: c, getParentFolderName: l, getPathPrefix: d } = Ba({ space: R(e.space) }), { isSticky: f } = pt(), { $gettext: p, $ngettext: m, current: h } = Q(), { isLocationPicker: g, isFilePicker: _ } = li(), { selectedResources: v, disabledResources: b, isResourceSelected: x, fileContainerClicked: S, fileNameClicked: C, fileCheckboxClicked: ee, isResourceDisabled: w, isResourceInDeleteQueue: T, isResourceClickable: te, isResourceCut: E, getResourceLink: D, dragItem: A, dragSelection: ne, dragStart: re, fileDropped: j, setDropStyling: ie, shouldShowContextDrop: ae, showContextMenuOnRightClick: oe, showContextMenuOnBtnClick: se, selectAllCheckboxLabel: ce, getResourceCheckboxLabel: le, toggleSelectionAll: ue, areAllResourcesSelected: de } = Yi({
2278
+ space: K(() => e.space),
2279
+ resources: K(() => e.resources),
2280
+ selectedIds: K(() => e.selectedIds),
2281
+ emit: n
2282
+ }), fe = ki(), { isSideBarOpen: pe } = $(fe), { userContextReady: me } = $(Ei()), { areFileExtensionsShown: he, latestSelectedId: ge } = $(fr()), { width: _e } = yo(), ve = K(() => i.filesTags && _e.value >= tl), { actions: ye } = Nr(), { actions: be } = Se(), xe = K(() => L(ye)[0].handler), Ce = K(() => L(be)[0].handler), we = R({}), Te = (e) => p("Search for tag %{tag}", { tag: e }), Ee = K(() => {
2283
+ if (e.resources.length === 0) return [];
2284
+ let t = e.resources[0], n = [];
2285
+ e.isSelectable && n.push({
2286
+ name: "select",
2287
+ title: "",
2288
+ type: "slot",
2289
+ headerType: "slot",
2290
+ width: "shrink"
2291
+ });
2292
+ let r = Le(t);
2293
+ return n.push(...[
2294
+ {
2295
+ name: "name",
2296
+ title: p("Name"),
2297
+ type: "slot",
2298
+ width: "expand",
2299
+ wrap: "truncate"
2300
+ },
2301
+ {
2302
+ name: "manager",
2303
+ prop: "members",
2304
+ title: p("Manager"),
2305
+ type: "slot"
2306
+ },
2307
+ {
2308
+ name: "members",
2309
+ title: p("Members"),
2310
+ prop: "members",
2311
+ type: "slot"
2312
+ },
2313
+ {
2314
+ name: "totalQuota",
2315
+ prop: "spaceQuota.total",
2316
+ title: p("Total quota"),
2317
+ type: "slot",
2318
+ sortable: !0
2319
+ },
2320
+ {
2321
+ name: "usedQuota",
2322
+ prop: "spaceQuota.used",
2323
+ title: p("Used quota"),
2324
+ type: "slot",
2325
+ sortable: !0
2326
+ },
2327
+ {
2328
+ name: "remainingQuota",
2329
+ prop: "spaceQuota.remaining",
2330
+ title: p("Remaining quota"),
2331
+ type: "slot",
2332
+ sortable: !0
2333
+ },
2334
+ {
2335
+ name: "indicators",
2336
+ title: p("Status"),
2337
+ type: "slot",
2338
+ alignH: "right",
2339
+ wrap: "nowrap",
2340
+ width: "shrink"
2341
+ },
2342
+ {
2343
+ name: "size",
2344
+ title: p("Size"),
2345
+ type: "slot",
2346
+ alignH: "right",
2347
+ wrap: "nowrap",
2348
+ width: "shrink"
2349
+ },
2350
+ {
2351
+ name: "syncEnabled",
2352
+ title: p("Info"),
2353
+ type: "slot",
2354
+ alignH: "right",
2355
+ wrap: "nowrap",
2356
+ width: "shrink"
2357
+ },
2358
+ {
2359
+ name: "tags",
2360
+ title: p("Tags"),
2361
+ type: "slot",
2362
+ alignH: "right",
2363
+ wrap: "nowrap",
2364
+ width: "shrink"
2365
+ },
2366
+ {
2367
+ name: "sharedBy",
2368
+ title: p("Shared by"),
2369
+ type: "slot",
2370
+ alignH: "right",
2371
+ wrap: "nowrap",
2372
+ width: "shrink"
2373
+ },
2374
+ {
2375
+ name: "sharedWith",
2376
+ title: p("Shared with"),
2377
+ type: "slot",
2378
+ alignH: "right",
2379
+ wrap: "nowrap",
2380
+ width: "shrink"
2381
+ },
2382
+ {
2383
+ name: "mdate",
2384
+ title: p("Modified"),
2385
+ type: "slot",
2386
+ alignH: "right",
2387
+ wrap: "nowrap",
2388
+ width: "shrink",
2389
+ accessibleLabelCallback: (e) => N(e.mdate) + " (" + Me(e.mdate) + ")"
2390
+ },
2391
+ {
2392
+ name: "sdate",
2393
+ title: p("Shared on"),
2394
+ type: "slot",
2395
+ alignH: "right",
2396
+ wrap: "nowrap",
2397
+ width: "shrink",
2398
+ accessibleLabelCallback: (e) => N(e.sdate) + " (" + Me(e.sdate) + ")"
2399
+ },
2400
+ {
2401
+ name: "ddate",
2402
+ title: p("Deleted"),
2403
+ type: "slot",
2404
+ alignH: "right",
2405
+ wrap: "nowrap",
2406
+ width: "shrink",
2407
+ accessibleLabelCallback: (e) => N(e.ddate) + " (" + Me(e.ddate) + ")"
2408
+ }
2409
+ ].filter((n) => {
2410
+ if (n.name === "tags" && !L(ve)) return !1;
2411
+ if (n.name === "indicators") return !0;
2412
+ let r;
2413
+ return r = n.prop ? qt(t, n.prop) !== void 0 : Object.prototype.hasOwnProperty.call(t, n.name), e.fieldsDisplayed ? r && e.fieldsDisplayed.includes(n.name) : r;
2414
+ }).map((e) => {
2415
+ let t = r.find((t) => t.name === e.name);
2416
+ return t && Object.assign(e, {
2417
+ sortable: t.sortable,
2418
+ sortDir: t.sortDir
2419
+ }), e;
2420
+ })), e.hasActions && n.push({
2421
+ name: "actions",
2422
+ title: p("Actions"),
2423
+ type: "slot",
2424
+ alignH: "right",
2425
+ wrap: "nowrap",
2426
+ width: "shrink"
2427
+ }), n;
2428
+ }), De = (e) => {
2429
+ let t = L(r.currentRoute).query?.term;
2430
+ return qr("files-common-search", { query: {
2431
+ provider: "files.sdk",
2432
+ q_tags: e,
2433
+ ...t && { term: t }
2434
+ } });
2435
+ }, Oe = (e) => L(me) ? { to: De(e) } : {}, ke = (e) => e.id === L(ge), Ae = (t) => e.showRenameQuickAction ? so(t) ? L(be).filter((e) => e.isVisible({ resources: [t] })).length : L(ye).filter((n) => n.isVisible({
2436
+ space: e.space,
2437
+ resources: [t]
2438
+ })).length : !1, je = (e) => {
2439
+ if (so(e)) return L(Ce)({ resources: [e] });
2440
+ L(xe)({
2441
+ space: a(e),
2442
+ resources: [e]
2443
+ });
2444
+ }, Me = (e) => xn(new Date(e), h), N = (e) => ra(new Date(e), h), Ne = (e) => {
2445
+ if (!lo(e)) return;
2446
+ let t = e.type === "folder" ? p("folder") : p("file"), n = e.sharedWith.filter(({ shareType: e }) => Ya.authenticated.includes(Ya.getByValue(e))).length;
2447
+ return n ? m("This %{ resourceType } is shared via %{ shareCount } invite", "This %{ resourceType } is shared via %{ shareCount } invites", n, {
2448
+ resourceType: t,
2449
+ shareCount: n.toString()
2450
+ }) : "";
2451
+ }, Pe = (e) => lo(e) ? p("This %{ resourceType } is shared by %{ user }", {
2452
+ resourceType: e.type === "folder" ? p("folder") : p("file"),
2453
+ user: e.sharedBy.map(({ displayName: e }) => e).join(", ")
2454
+ }) : "", Fe = (e) => lo(e) ? e.sharedBy.map((e) => ({
2455
+ displayName: e.displayName,
2456
+ name: e.displayName,
2457
+ avatarType: Ya.user.key,
2458
+ username: e.id,
2459
+ userId: e.id
2460
+ })) : [], Ie = (e) => lo(e) ? e.sharedWith.filter(({ shareType: e }) => Ya.authenticated.includes(Ya.getByValue(e))).map((e) => ({
2461
+ displayName: e.displayName,
2462
+ name: e.displayName,
2463
+ avatarType: Ya.getByValue(e.shareType).key,
2464
+ username: e.id,
2465
+ userId: e.id
2466
+ })) : [];
2467
+ return (t, n) => {
2468
+ let r = F("oc-checkbox"), i = F("oc-icon"), a = F("oc-tag"), m = F("oc-avatars"), h = ni("oc-tooltip");
2469
+ return Z(), X(U, null, [q(L(Ur), va(t.$attrs, {
2470
+ id: "files-space-table",
2471
+ class: [{
2472
+ condensed: e.viewMode === L(ma).name.condensedTable,
2473
+ "files-table": e.resourceType === "file",
2474
+ "files-table-squashed": e.resourceType === "file" && L(pe),
2475
+ "spaces-table": e.resourceType === "space",
2476
+ "spaces-table-squashed": e.resourceType === "space" && L(pe)
2477
+ }],
2478
+ data: e.resources,
2479
+ fields: Ee.value,
2480
+ highlighted: e.selectedIds,
2481
+ disabled: L(b),
2482
+ sticky: L(f),
2483
+ "header-position": e.headerPosition,
2484
+ "drag-drop": e.dragDrop,
2485
+ hover: e.hover,
2486
+ "item-dom-selector": e.resourceDomSelector,
2487
+ selection: L(v),
2488
+ "sort-by": e.sortBy,
2489
+ "sort-dir": e.sortDir,
2490
+ lazy: e.lazy,
2491
+ "padding-x": "medium",
2492
+ onHighlight: n[1] ||= (e) => L(S)({
2493
+ resource: e[0],
2494
+ event: e[1]
2495
+ }),
2496
+ onContextmenuClicked: n[2] ||= (e, t, n) => L(oe)(t, n, we.value[n.id]),
2497
+ onItemDropped: n[3] ||= (e) => L(j)(e[0], e[1]),
2498
+ onItemDragged: n[4] ||= (e) => L(re)(e[0], e[1]),
2499
+ onDropRowStyling: L(ie),
2500
+ onSort: n[5] ||= (e) => t.$emit("sort", e),
2501
+ "onUpdate:modelValue": n[6] ||= (e) => t.$emit("update:modelValue", e)
2502
+ }), dr({
2503
+ name: P(({ item: n }) => [Y("div", { class: B(["resource-table-resource-wrapper flex items-center", [{ "resource-table-resource-wrapper-limit-max-width": Ae(n) }]]) }, [
2504
+ k(t.$slots, "image", { resource: n }),
2505
+ (Z(), V(y, {
2506
+ key: `${n.path}-${e.resourceDomSelector(n)}-${n.thumbnail}`,
2507
+ resource: n,
2508
+ "path-prefix": L(d)(n),
2509
+ "is-path-displayed": e.arePathsDisplayed,
2510
+ "parent-folder-name": L(l)(n),
2511
+ "is-icon-displayed": !t.$slots.image,
2512
+ "is-extension-displayed": L(he),
2513
+ "is-resource-clickable": L(te)(n, e.areResourcesClickable),
2514
+ link: L(D)(n),
2515
+ "parent-folder-link": L(s)(n),
2516
+ "parent-folder-link-icon-additional-attributes": L(c)(n),
2517
+ class: B({ "opacity-60": L(E)(n) }),
2518
+ onClick: J((e) => L(C)({
2519
+ resource: n,
2520
+ event: e
2521
+ }), ["stop"])
2522
+ }, null, 8, [
2523
+ "resource",
2524
+ "path-prefix",
2525
+ "is-path-displayed",
2526
+ "parent-folder-name",
2527
+ "is-icon-displayed",
2528
+ "is-extension-displayed",
2529
+ "is-resource-clickable",
2530
+ "link",
2531
+ "parent-folder-link",
2532
+ "parent-folder-link-icon-additional-attributes",
2533
+ "class",
2534
+ "onClick"
2535
+ ])),
2536
+ Ae(n) ? (Z(), V(L(ur), {
2537
+ key: 0,
2538
+ class: "resource-table-edit-name inline-flex raw-hover-surface p-1 ml-1",
2539
+ appearance: "raw",
2540
+ "aria-label": L(p)("Rename file »%{name}«", { name: n.name }),
2541
+ title: L(p)("Rename"),
2542
+ onClick: J((e) => {
2543
+ L(o)(e, n) || je(n);
2544
+ }, ["stop"])
2545
+ }, {
2546
+ default: P(() => [q(i, {
2547
+ name: "edit-2",
2548
+ "fill-type": "line",
2549
+ size: "small",
2550
+ color: "var(--oc-role-on-surface)"
2551
+ })]),
2552
+ _: 1
2553
+ }, 8, [
2554
+ "aria-label",
2555
+ "title",
2556
+ "onClick"
2557
+ ])) : G("", !0)
2558
+ ], 2), k(t.$slots, "additionalResourceContent", { resource: n })]),
2559
+ syncEnabled: P(({ item: e }) => [k(t.$slots, "syncEnabled", { resource: e })]),
2560
+ size: P(({ item: e }) => [q(Rc, { size: e.size || NaN }, null, 8, ["size"])]),
2561
+ tags: P(({ item: e }) => [(Z(!0), X(U, null, M(e.tags.slice(0, 2), (e) => (Z(), V(u(L(me) ? "router-link" : "span"), va({ key: e }, { ref_for: !0 }, Oe(e), { class: "resource-table-tag-wrapper" }), {
2562
+ default: P(() => [I((Z(), V(a, {
2563
+ class: "resource-table-tag ml-1 max-w-20",
2564
+ rounded: !0,
2565
+ size: "small"
2566
+ }, {
2567
+ default: P(() => [q(i, {
2568
+ name: "price-tag-3",
2569
+ size: "small"
2570
+ }), Y("span", Xc, W(e), 1)]),
2571
+ _: 2
2572
+ }, 1024)), [[h, Te(e)]])]),
2573
+ _: 2
2574
+ }, 1040))), 128)), e.tags.length > 2 ? (Z(), V(a, {
2575
+ key: 0,
2576
+ size: "small",
2577
+ class: "resource-table-tag-more align-text-bottom cursor-pointer",
2578
+ onClick: n[0] ||= (e) => L(fe).openSideBar()
2579
+ }, {
2580
+ default: P(() => [wr(" + " + W(e.tags.length - 2), 1)]),
2581
+ _: 2
2582
+ }, 1024)) : G("", !0)]),
2583
+ manager: P(({ item: e }) => [k(t.$slots, "manager", { resource: e })]),
2584
+ members: P(({ item: e }) => [k(t.$slots, "members", { resource: e })]),
2585
+ totalQuota: P(({ item: e }) => [k(t.$slots, "totalQuota", { resource: e })]),
2586
+ usedQuota: P(({ item: e }) => [k(t.$slots, "usedQuota", { resource: e })]),
2587
+ remainingQuota: P(({ item: e }) => [k(t.$slots, "remainingQuota", { resource: e })]),
2588
+ mdate: P(({ item: e }) => [I(Y("span", {
2589
+ tabindex: "0",
2590
+ textContent: W(N(e.mdate))
2591
+ }, null, 8, Zc), [[h, Me(e.mdate)]])]),
2592
+ indicators: P(({ item: t }) => [q(zc, {
2593
+ space: e.space,
2594
+ resource: t,
2595
+ "disable-handler": L(w)(t)
2596
+ }, null, 8, [
2597
+ "space",
2598
+ "resource",
2599
+ "disable-handler"
2600
+ ])]),
2601
+ sdate: P(({ item: e }) => [I(Y("span", {
2602
+ tabindex: "0",
2603
+ textContent: W(N(e.sdate))
2604
+ }, null, 8, Qc), [[h, Me(e.sdate)]])]),
2605
+ ddate: P(({ item: e }) => [I(Y("p", {
2606
+ tabindex: "0",
2607
+ class: "m-0",
2608
+ textContent: W(N(e.ddate))
2609
+ }, null, 8, $c), [[h, Me(e.ddate)]])]),
2610
+ sharedBy: P(({ item: e }) => [q(m, {
2611
+ class: "flex items-center justify-end flex-row flex-nowrap",
2612
+ "is-tooltip-displayed": !0,
2613
+ items: Fe(e),
2614
+ "accessible-description": Pe(e),
2615
+ "hover-effect": ""
2616
+ }, {
2617
+ userAvatars: P(({ avatars: e, width: t }) => [(Z(!0), X(U, null, M(e, (e) => (Z(), V(L(Bc), {
2618
+ key: e.userId,
2619
+ "user-id": e.userId,
2620
+ "user-name": e.displayName,
2621
+ width: t
2622
+ }, null, 8, [
2623
+ "user-id",
2624
+ "user-name",
2625
+ "width"
2626
+ ]))), 128))]),
2627
+ _: 1
2628
+ }, 8, ["items", "accessible-description"])]),
2629
+ sharedWith: P(({ item: e }) => [q(m, {
2630
+ class: "flex items-center justify-end flex-row flex-nowrap",
2631
+ "data-testid": "resource-table-shared-with",
2632
+ items: Ie(e),
2633
+ stacked: !0,
2634
+ "max-displayed": 3,
2635
+ "is-tooltip-displayed": !0,
2636
+ "accessible-description": Ne(e),
2637
+ "hover-effect": ""
2638
+ }, {
2639
+ userAvatars: P(({ avatars: e, width: t }) => [(Z(!0), X(U, null, M(e, (e) => (Z(), V(L(Bc), {
2640
+ key: e.userId,
2641
+ "user-id": e.userId,
2642
+ "user-name": e.displayName,
2643
+ width: t
2644
+ }, null, 8, [
2645
+ "user-id",
2646
+ "user-name",
2647
+ "width"
2648
+ ]))), 128))]),
2649
+ _: 1
2650
+ }, 8, ["items", "accessible-description"])]),
2651
+ actions: P(({ item: n }) => [L(ae)(n) ? (Z(), X("div", el, [k(t.$slots, "quickActions", { resource: n }), q(Ec, {
2652
+ ref: (e) => we.value[n.id] = e?.drop,
2653
+ title: n.name,
2654
+ item: n,
2655
+ "resource-dom-selector": e.resourceDomSelector,
2656
+ class: "resource-table-btn-action-dropdown",
2657
+ onQuickActionClicked: (e) => L(se)(e, n, we.value[n.id])
2658
+ }, {
2659
+ contextMenu: P(() => [k(t.$slots, "contextMenu", { resource: n })]),
2660
+ _: 2
2661
+ }, 1032, [
2662
+ "title",
2663
+ "item",
2664
+ "resource-dom-selector",
2665
+ "onQuickActionClicked"
2666
+ ])])) : G("", !0)]),
2667
+ _: 2
2668
+ }, [
2669
+ !L(g) && !L(_) ? {
2670
+ name: "selectHeader",
2671
+ fn: P(() => [Y("div", Yc, [I(q(r, {
2672
+ id: "resource-table-select-all",
2673
+ size: "large",
2674
+ label: L(ce),
2675
+ disabled: e.resources.length === L(b).length,
2676
+ "label-hidden": !0,
2677
+ "model-value": L(de),
2678
+ onClick: J(L(ue), ["stop"])
2679
+ }, null, 8, [
2680
+ "label",
2681
+ "disabled",
2682
+ "model-value",
2683
+ "onClick"
2684
+ ]), [[h, L(ce)]])])]),
2685
+ key: "0"
2686
+ } : void 0,
2687
+ !L(g) && !L(_) ? {
2688
+ name: "select",
2689
+ fn: P(({ item: t }) => [L(T)(t.id) ? (Z(), V(L(Oi), {
2690
+ key: 0,
2691
+ class: "inline-flex ml-1",
2692
+ size: "medium",
2693
+ "aria-label": L(p)("File is being processed")
2694
+ }, null, 8, ["aria-label"])) : (Z(), V(r, {
2695
+ key: 1,
2696
+ id: `resource-table-select-${e.resourceDomSelector(t)}`,
2697
+ label: L(le)(t),
2698
+ "label-hidden": !0,
2699
+ size: "large",
2700
+ disabled: L(w)(t),
2701
+ "model-value": L(x)(t),
2702
+ outline: ke(t),
2703
+ "data-test-selection-resource-name": t.name,
2704
+ "data-test-selection-resource-path": t.path,
2705
+ onClick: J((e) => L(ee)({
2706
+ resource: t,
2707
+ event: e
2708
+ }), ["stop"])
2709
+ }, null, 8, [
2710
+ "id",
2711
+ "label",
2712
+ "disabled",
2713
+ "model-value",
2714
+ "outline",
2715
+ "data-test-selection-resource-name",
2716
+ "data-test-selection-resource-path",
2717
+ "onClick"
2718
+ ]))]),
2719
+ key: "1"
2720
+ } : void 0,
2721
+ t.$slots.footer ? {
2722
+ name: "footer",
2723
+ fn: P(() => [k(t.$slots, "footer")]),
2724
+ key: "2"
2725
+ } : void 0
2726
+ ]), 1040, [
2727
+ "class",
2728
+ "data",
2729
+ "fields",
2730
+ "highlighted",
2731
+ "disabled",
2732
+ "sticky",
2733
+ "header-position",
2734
+ "drag-drop",
2735
+ "hover",
2736
+ "item-dom-selector",
2737
+ "selection",
2738
+ "sort-by",
2739
+ "sort-dir",
2740
+ "lazy",
2741
+ "onDropRowStyling"
2742
+ ]), L(A) ? (Z(), V(Kn, {
2743
+ key: 0,
2744
+ to: "body"
2745
+ }, [q(Pc, {
2746
+ ref: "ghostElement",
2747
+ "preview-items": [L(A), ...L(ne)]
2748
+ }, null, 8, ["preview-items"])])) : G("", !0)], 64);
2749
+ };
2750
+ }
2751
+ }), rl = {
2752
+ key: 0,
2753
+ class: "oc-tile-card-lazy-shimmer h-30 overflow-hidden relative after:absolute after:inset-0 after:transform-[translateX(-100%)] opacity-20 after:animate-shimmer"
2754
+ }, il = { class: "z-10 absolute top-0 left-0 [&_input]:not-[.oc-checkbox-checked]:bg-role-surface-container" }, al = {
2755
+ key: 0,
2756
+ class: "oc-tile-card-loading-spinner z-990 m-2"
2757
+ }, ol = ["textContent"], sl = ["aria-label"], cl = { class: "flex justify-between items-center" }, ll = { class: "flex items-center truncate resource-name-wrapper text-role-on-surface overflow-hidden" }, ul = { class: "flex items-center" }, dl = {
2758
+ key: 0,
2759
+ class: "text-left my-0 truncate"
2760
+ }, fl = ["textContent"], pl = /* @__PURE__ */ H({
2761
+ __name: "ResourceTile",
2762
+ props: {
2763
+ resource: {},
2764
+ resourceRoute: {},
2765
+ space: {},
2766
+ isResourceSelected: {
2767
+ type: Boolean,
2768
+ default: !1
2769
+ },
2770
+ isResourceClickable: {
2771
+ type: Boolean,
2772
+ default: !0
2773
+ },
2774
+ isResourceDisabled: {
2775
+ type: Boolean,
2776
+ default: !1
2777
+ },
2778
+ isExtensionDisplayed: {
2779
+ type: Boolean,
2780
+ default: !0
2781
+ },
2782
+ isPathDisplayed: {
2783
+ type: Boolean,
2784
+ default: !1
2785
+ },
2786
+ resourceIconSize: { default: "xlarge" },
2787
+ lazy: {
2788
+ type: Boolean,
2789
+ default: !1
2790
+ },
2791
+ isLoading: {
2792
+ type: Boolean,
2793
+ default: !1
2794
+ }
2795
+ },
2796
+ emits: [
2797
+ "fileNameClicked",
2798
+ "contextmenu",
2799
+ "itemVisible",
2800
+ "tileClicked"
2801
+ ],
2802
+ setup(e, { emit: t }) {
2803
+ let n = t, { $gettext: r } = Q(), { getParentFolderName: i, getParentFolderLink: a } = Ba({ space: R(e.space) }), o = fe("observerTarget"), s = K(() => L(o)?.$el), c = K(() => e.resource.locked || e.resource.processing), l = K(() => e.resource.locked ? {
2804
+ name: "lock",
2805
+ fillType: "fill"
2806
+ } : e.resource.processing ? {
2807
+ name: "loop-right",
2808
+ fillType: "line"
2809
+ } : {}), u = K(() => e.resource.locked ? r("This item is locked") : null), d = K(() => fo(e.resource) ? e.resource.description : ""), { isVisible: f } = e.lazy ? ar({
2810
+ target: s,
2811
+ onVisibleCallback: () => n("itemVisible")
2812
+ }) : { isVisible: R(!0) }, p = K(() => !L(f));
2813
+ return e.lazy || n("itemVisible"), (t, n) => {
2814
+ let s = F("oc-spinner"), f = F("oc-tag"), m = F("oc-image"), h = F("oc-icon"), g = ni("oc-tooltip");
2815
+ return Z(), V(L(da), {
2816
+ ref_key: "observerTarget",
2817
+ ref: o,
2818
+ "body-class": "p-0",
2819
+ class: B(["oc-tile-card flex flex-col h-full shadow-none [&.item-accentuated]:bg-role-secondary-container", {
2820
+ "oc-tile-card-selected bg-role-secondary-container outline-2 outline-role-outline": e.isResourceSelected,
2821
+ "bg-role-surface-container hover:bg-role-surface-container-highest outline outline-role-surface-container-highest": !e.isResourceSelected,
2822
+ "oc-tile-card-disabled opacity-70 grayscale-60 pointer-events-none": e.isResourceDisabled,
2823
+ "state-trashed [&_.tile-preview]:opacity-80 [&_.tile-default-image_svg]:opacity-80 [&_.tile-preview]:grayscale [&_.tile-default-image_svg]:grayscale": L(so)(e.resource) && e.resource.disabled
2824
+ }]),
2825
+ "data-item-id": e.resource.id,
2826
+ onContextmenu: n[4] ||= (e) => t.$emit("contextmenu", e)
2827
+ }, {
2828
+ default: P(() => [p.value ? (Z(), X("div", rl)) : (Z(), X(U, { key: 1 }, [q(Oe, {
2829
+ class: "oc-card-media-top flex justify-center items-center m-0 w-full relative aspect-[16/9]",
2830
+ resource: e.resource,
2831
+ link: e.resourceRoute,
2832
+ "is-resource-clickable": e.isResourceClickable,
2833
+ tabindex: "-1",
2834
+ onClick: n[1] ||= (e) => t.$emit("fileNameClicked", e)
2835
+ }, {
2836
+ default: P(() => [
2837
+ Y("div", il, [e.isLoading ? (Z(), X("div", al, [q(s, { "aria-label": L(r)("File is being processed") }, null, 8, ["aria-label"])])) : k(t.$slots, "selection", {
2838
+ key: 1,
2839
+ item: e.resource
2840
+ })]),
2841
+ L(so)(e.resource) && e.resource.disabled ? (Z(), V(f, {
2842
+ key: 0,
2843
+ class: "z-10 absolute text-role-on-surface",
2844
+ type: "span"
2845
+ }, {
2846
+ default: P(() => [Y("span", { textContent: W(L(r)("Disabled")) }, null, 8, ol)]),
2847
+ _: 1
2848
+ })) : G("", !0),
2849
+ I((Z(), X("div", {
2850
+ class: B(["oc-tile-card-preview flex items-center justify-center text-center size-full absolute", {
2851
+ "p-2": e.isResourceSelected,
2852
+ "hover:p-2": !e.isResourceSelected
2853
+ }]),
2854
+ "aria-label": u.value
2855
+ }, [k(t.$slots, "imageField", { item: e.resource }, () => [e.resource.thumbnail ? (Z(), V(m, {
2856
+ key: 0,
2857
+ class: B(["tile-preview rounded-t-sm size-full object-cover aspect-[16/9] pointer-events-none", { "rounded-sm": e.isResourceSelected }]),
2858
+ src: e.resource.thumbnail,
2859
+ "data-test-thumbnail-resource-name": e.resource.name,
2860
+ onClick: n[0] ||= J((n) => t.$emit("tileClicked", [e.resource, n]), ["stop"])
2861
+ }, null, 8, [
2862
+ "class",
2863
+ "src",
2864
+ "data-test-thumbnail-resource-name"
2865
+ ])) : (Z(), V(rn, {
2866
+ key: 1,
2867
+ resource: e.resource,
2868
+ size: e.resourceIconSize,
2869
+ class: "tile-default-image pt-1 relative"
2870
+ }, dr({ _: 2 }, [c.value ? {
2871
+ name: "status",
2872
+ fn: P(() => [q(h, va(l.value, { size: "xsmall" }), null, 16)]),
2873
+ key: "0"
2874
+ } : void 0]), 1032, ["resource", "size"]))])], 10, sl)), [[g, u.value]])
2875
+ ]),
2876
+ _: 3
2877
+ }, 8, [
2878
+ "resource",
2879
+ "link",
2880
+ "is-resource-clickable"
2881
+ ]), Y("div", {
2882
+ class: "p-2",
2883
+ onClick: n[3] ||= J((n) => t.$emit("tileClicked", [e.resource, n]), ["stop"])
2884
+ }, [
2885
+ Y("div", cl, [Y("div", ll, [q(y, {
2886
+ resource: e.resource,
2887
+ "is-icon-displayed": !1,
2888
+ "is-extension-displayed": e.isExtensionDisplayed,
2889
+ "is-resource-clickable": e.isResourceClickable,
2890
+ "is-path-displayed": e.isPathDisplayed,
2891
+ "parent-folder-name": L(i)(e.resource),
2892
+ "parent-folder-link": L(a)(e.resource),
2893
+ link: e.resourceRoute,
2894
+ onClick: n[2] ||= J((e) => t.$emit("fileNameClicked", e), ["stop"])
2895
+ }, null, 8, [
2896
+ "resource",
2897
+ "is-extension-displayed",
2898
+ "is-resource-clickable",
2899
+ "is-path-displayed",
2900
+ "parent-folder-name",
2901
+ "parent-folder-link",
2902
+ "link"
2903
+ ])]), Y("div", ul, [
2904
+ k(t.$slots, "indicators", {
2905
+ item: e.resource,
2906
+ class: "resource-indicators"
2907
+ }),
2908
+ k(t.$slots, "actions", { item: e.resource }),
2909
+ k(t.$slots, "contextMenu", { item: e.resource })
2910
+ ])]),
2911
+ d.value ? (Z(), X("p", dl, [Y("span", {
2912
+ class: "text-sm",
2913
+ textContent: W(d.value)
2914
+ }, null, 8, fl)])) : G("", !0),
2915
+ k(t.$slots, "additionalResourceContent", { item: e.resource })
2916
+ ])], 64))]),
2917
+ _: 3
2918
+ }, 8, ["data-item-id", "class"]);
2919
+ };
2920
+ }
2921
+ }), ml = {
2922
+ id: "tiles-view",
2923
+ class: "px-4 pt-2"
2924
+ }, hl = { class: "flex items-center mb-2 pb-2 oc-tiles-controls" }, gl = {
2925
+ key: 1,
2926
+ class: "oc-tiles-sort"
2927
+ }, _l = {
2928
+ key: 0,
2929
+ class: "flex"
2930
+ }, vl = { class: "p-1 text-sm" }, yl = /* @__PURE__ */ z(/* @__PURE__ */ H({
2931
+ __name: "ResourceTiles",
2932
+ props: {
2933
+ resources: { default: () => [] },
2934
+ selectedIds: { default: () => [] },
2935
+ isSelectable: {
2936
+ type: Boolean,
2937
+ default: !0
2938
+ },
2939
+ space: {},
2940
+ sortFields: { default: () => [] },
2941
+ sortBy: {},
2942
+ sortDir: {},
2943
+ viewSize: { default: () => ma.tilesSizeDefault },
2944
+ dragDrop: {
2945
+ type: Boolean,
2946
+ default: !1
2947
+ },
2948
+ lazy: {
2949
+ type: Boolean,
2950
+ default: !0
2951
+ },
2952
+ areResourcesClickable: {
2953
+ type: Boolean,
2954
+ default: !0
2955
+ },
2956
+ arePathsDisplayed: {
2957
+ type: Boolean,
2958
+ default: !1
2959
+ }
2960
+ },
2961
+ emits: [
2962
+ "fileClick",
2963
+ "fileDropped",
2964
+ "sort",
2965
+ "itemVisible",
2966
+ "update:selectedIds"
2967
+ ],
2968
+ setup(e, { emit: t }) {
2969
+ let n = t, { $gettext: r } = Q(), { areFileExtensionsShown: i } = $(fr()), { isLocationPicker: a, isFilePicker: o } = li(), s = Dr(), c = K(() => Math.min(L(s), e.viewSize)), { isSideBarOpen: l } = $(ki()), { disabledResources: u, isResourceSelected: d, fileContainerClicked: f, fileNameClicked: p, fileCheckboxClicked: m, isResourceDisabled: h, isResourceInDeleteQueue: g, isResourceClickable: _, isResourceCut: v, getResourceLink: y, dragItem: b, dragSelection: x, dragStart: S, fileDropped: C, setDropStyling: ee, shouldShowContextDrop: w, showContextMenuOnRightClick: T, showContextMenuOnBtnClick: te, selectAllCheckboxLabel: E, getResourceCheckboxLabel: D, toggleSelectionAll: O, areAllResourcesSelected: A } = Yi({
2970
+ space: K(() => e.space),
2971
+ resources: K(() => e.resources),
2972
+ selectedIds: K(() => e.selectedIds),
2973
+ emit: n
2974
+ }), ne = R({}), re = window.__E2E__ === !0 ? !1 : e.lazy, j = K(() => e.sortFields.find((t) => t.name === e.sortBy && t.sortDir === e.sortDir) || e.sortFields[0]), ie = (e) => {
2975
+ n("sort", {
2976
+ sortBy: e.name,
2977
+ sortDir: L(e.sortDir)
2978
+ });
2979
+ }, ae = K(() => ({
2980
+ 1: "xlarge",
2981
+ 2: "xlarge",
2982
+ 3: "xxlarge",
2983
+ 4: "xxlarge",
2984
+ 5: "xxxlarge",
2985
+ 6: "xxxlarge"
2986
+ })[L(c)] ?? "xxlarge"), oe = R(0), se = () => {
2987
+ let e = document.getElementById("tiles-view"), t = getComputedStyle(e), n = parseInt(t.getPropertyValue("padding-left"), 10) | 0, r = parseInt(t.getPropertyValue("padding-right"), 10) | 0;
2988
+ oe.value = e.clientWidth - n - r;
2989
+ }, ce = K(() => parseFloat(getComputedStyle(document.documentElement).fontSize)), { calculateTileSizePixels: le } = Fn(), ue = K(() => {
2990
+ let e = [...Array(ma.tilesSizeMax).keys()].map((e) => e + 1);
2991
+ return [...new Set(e.map((e) => {
2992
+ let t = le(e);
2993
+ return t ? Math.round(L(oe) / (t + L(ce))) : 0;
2994
+ }))];
2995
+ }), de = K(() => {
2996
+ let e = L(ue);
2997
+ return e.length < L(c) ? e[e.length - 1] : e[L(c) - 1];
2998
+ }), fe = K(() => {
2999
+ let t = L(de) ? e.resources.length % L(de) : 0;
3000
+ return t ? L(de) - t : 0;
3001
+ });
3002
+ return N(K(() => L(oe) / L(de) - L(ce)), (e) => {
3003
+ e && !isNaN(e) && document.documentElement.style.setProperty("--oc-size-tiles-actual", `${e}px`);
3004
+ }, { immediate: !0 }), N(ue, (e) => {
3005
+ s.value = Math.max(e.length, 1);
3006
+ }), N(l, () => {
3007
+ se();
3008
+ }), Ht(() => {
3009
+ window.addEventListener("resize", se), se();
3010
+ }), ja(() => {
3011
+ window.removeEventListener("resize", se);
3012
+ }), (t, n) => {
3013
+ let s = F("oc-checkbox"), c = F("oc-icon"), l = F("oc-button"), oe = F("oc-list"), se = F("oc-filter-chip"), ce = ni("oc-tooltip");
3014
+ return Z(), X("div", ml, [
3015
+ Y("div", hl, [e.isSelectable && !L(o) ? I((Z(), V(s, {
3016
+ key: 0,
3017
+ id: "tiles-view-select-all",
3018
+ class: "ml-2",
3019
+ size: "large",
3020
+ label: L(E),
3021
+ "label-hidden": !0,
3022
+ disabled: e.resources.length === L(u).length,
3023
+ "model-value": L(A),
3024
+ onClick: J(L(O), ["stop"])
3025
+ }, null, 8, [
3026
+ "label",
3027
+ "disabled",
3028
+ "model-value",
3029
+ "onClick"
3030
+ ])), [[ce, L(E)]]) : G("", !0), e.sortFields.length ? (Z(), X("div", gl, [q(se, {
3031
+ class: "[&_.oc-filter-chip-label]:text-sm",
3032
+ "filter-label": L(r)("Sort by"),
3033
+ "selected-item-names": [j.value.label],
3034
+ "has-active-state": !1,
3035
+ "close-on-click": "",
3036
+ raw: ""
3037
+ }, {
3038
+ default: P(() => [q(oe, null, {
3039
+ default: P(() => [(Z(!0), X(U, null, M(e.sortFields, (e, t) => (Z(), X("li", { key: t }, [q(l, {
3040
+ appearance: j.value === e ? "filled" : "raw-inverse",
3041
+ "color-role": j.value === e ? "secondaryContainer" : "surface",
3042
+ "no-hover": j.value === e,
3043
+ "justify-content": "space-between",
3044
+ class: "oc-tiles-sort-filter-chip-item",
3045
+ onClick: (t) => ie(e)
3046
+ }, {
3047
+ default: P(() => [Y("span", null, W(e.label), 1), e === j.value ? (Z(), X("div", _l, [q(c, { name: "check" })])) : G("", !0)]),
3048
+ _: 2
3049
+ }, 1032, [
3050
+ "appearance",
3051
+ "color-role",
3052
+ "no-hover",
3053
+ "onClick"
3054
+ ])]))), 128))]),
3055
+ _: 1
3056
+ })]),
3057
+ _: 1
3058
+ }, 8, ["filter-label", "selected-item-names"])])) : G("", !0)]),
3059
+ q(oe, { class: "oc-tiles grid justify-start gap-3" }, {
3060
+ default: P(() => [(Z(!0), X(U, null, M(e.resources, (r) => (Z(), X("li", {
3061
+ key: r.id,
3062
+ class: "oc-tiles-item has-item-context-menu"
3063
+ }, [q(pl, {
3064
+ resource: r,
3065
+ space: e.space,
3066
+ "resource-route": L(y)(r),
3067
+ "is-resource-selected": L(d)(r),
3068
+ "is-resource-clickable": L(_)(r, e.areResourcesClickable),
3069
+ "is-resource-disabled": L(h)(r),
3070
+ "is-extension-displayed": L(i),
3071
+ "is-path-displayed": e.arePathsDisplayed,
3072
+ "resource-icon-size": ae.value,
3073
+ draggable: e.dragDrop,
3074
+ lazy: L(re),
3075
+ "is-loading": L(g)(r.id),
3076
+ class: B({ "opacity-60": L(v)(r) }),
3077
+ onContextmenu: (e) => L(T)(e, r, ne.value[r.id]),
3078
+ onFileNameClicked: J((e) => L(p)({
3079
+ resource: r,
3080
+ event: e
3081
+ }), ["stop"]),
3082
+ onDragstart: (e) => L(S)(r, e),
3083
+ onDragenter: J((e) => L(ee)(r, !1, e), ["prevent"]),
3084
+ onDragleave: J((e) => L(ee)(r, !0, e), ["prevent"]),
3085
+ onDrop: (e) => L(C)(r, e),
3086
+ onDragover: n[0] ||= (e) => e.preventDefault(),
3087
+ onItemVisible: (e) => t.$emit("itemVisible", r),
3088
+ onTileClicked: (e) => L(f)({
3089
+ resource: r,
3090
+ event: e[1]
3091
+ })
3092
+ }, {
3093
+ selection: P(() => [e.isSelectable && !L(a) && !L(o) ? (Z(), V(s, {
3094
+ key: 0,
3095
+ label: L(D)(r),
3096
+ "label-hidden": !0,
3097
+ size: "large",
3098
+ class: "inline-flex p-2.5",
3099
+ disabled: L(h)(r),
3100
+ "model-value": L(d)(r),
3101
+ "data-test-selection-resource-name": r.name,
3102
+ "data-test-selection-resource-path": r.path,
3103
+ onClick: J((e) => L(m)({
3104
+ resource: r,
3105
+ event: e
3106
+ }), ["stop", "prevent"])
3107
+ }, null, 8, [
3108
+ "label",
3109
+ "disabled",
3110
+ "model-value",
3111
+ "data-test-selection-resource-name",
3112
+ "data-test-selection-resource-path",
3113
+ "onClick"
3114
+ ])) : G("", !0)]),
3115
+ imageField: P(() => [k(t.$slots, "image", { resource: r }, void 0, !0)]),
3116
+ indicators: P(() => [q(zc, {
3117
+ space: e.space,
3118
+ class: "ml-2",
3119
+ resource: r,
3120
+ filter: (e) => ["system", "sharing"].includes(e.category),
3121
+ "disable-handler": L(h)(r)
3122
+ }, null, 8, [
3123
+ "space",
3124
+ "resource",
3125
+ "filter",
3126
+ "disable-handler"
3127
+ ])]),
3128
+ actions: P(() => [k(t.$slots, "actions", { resource: r }, void 0, !0)]),
3129
+ contextMenu: P(() => [L(w)(r) ? (Z(), V(L(Ec), {
3130
+ key: 0,
3131
+ ref_for: !0,
3132
+ ref: (e) => ne.value[r.id] = e?.drop,
3133
+ item: r,
3134
+ title: r.name,
3135
+ class: "resource-tiles-btn-action-dropdown",
3136
+ onQuickActionClicked: (e) => L(te)(e, r, ne.value[r.id])
3137
+ }, {
3138
+ contextMenu: P(() => [k(t.$slots, "contextMenu", { resource: r }, void 0, !0)]),
3139
+ _: 2
3140
+ }, 1032, [
3141
+ "item",
3142
+ "title",
3143
+ "onQuickActionClicked"
3144
+ ])) : G("", !0)]),
3145
+ additionalResourceContent: P(() => [k(t.$slots, "additionalResourceContent", { resource: r }, void 0, !0)]),
3146
+ _: 2
3147
+ }, 1032, [
3148
+ "resource",
3149
+ "space",
3150
+ "resource-route",
3151
+ "is-resource-selected",
3152
+ "is-resource-clickable",
3153
+ "is-resource-disabled",
3154
+ "is-extension-displayed",
3155
+ "is-path-displayed",
3156
+ "resource-icon-size",
3157
+ "draggable",
3158
+ "lazy",
3159
+ "is-loading",
3160
+ "class",
3161
+ "onContextmenu",
3162
+ "onFileNameClicked",
3163
+ "onDragstart",
3164
+ "onDragenter",
3165
+ "onDragleave",
3166
+ "onDrop",
3167
+ "onItemVisible",
3168
+ "onTileClicked"
3169
+ ])]))), 128)), (Z(!0), X(U, null, M(fe.value, (e) => (Z(), X("li", {
3170
+ key: `ghost-tile-${e}`,
3171
+ class: "list-item",
3172
+ "aria-hidden": !0
3173
+ }))), 128))]),
3174
+ _: 3
3175
+ }),
3176
+ L(b) ? (Z(), V(Kn, {
3177
+ key: 0,
3178
+ to: "body"
3179
+ }, [q(Pc, {
3180
+ ref: "ghostElement",
3181
+ "preview-items": [L(b), ...L(x)]
3182
+ }, null, 8, ["preview-items"])])) : G("", !0),
3183
+ Y("div", vl, [k(t.$slots, "footer", {}, void 0, !0)])
3184
+ ]);
3185
+ };
3186
+ }
3187
+ }), [["__scopeId", "data-v-8798a647"]]), bl = { class: "flex items-center truncate" }, xl = { class: "truncate ml-2" }, Sl = { class: "flex" }, Cl = { class: "my-1" }, wl = { class: "flex items-center truncate" }, Tl = { class: "truncate ml-2" }, El = ["textContent"], Dl = { class: "flex" }, Ol = { class: "flex items-center justify-between mb-4" }, kl = ["textContent"], Al = { class: "mt-2" }, jl = { class: "date-filter-apply-btn text-end" }, Ml = /* @__PURE__ */ z(/* @__PURE__ */ H({
3188
+ __name: "DateFilter",
3189
+ props: {
3190
+ filterLabel: {},
3191
+ filterName: {},
3192
+ items: {},
3193
+ idAttribute: { default: "id" },
3194
+ displayNameAttribute: { default: "name" }
3195
+ },
3196
+ emits: ["selectionChange"],
3197
+ setup(e, { expose: t, emit: n }) {
3198
+ let i = n, a = Mi(), { current: o } = Q(), s = xr(), { currentTheme: c } = $(za()), l = R(), u = R(e.items), d = R(), f = R(), p = R(!1), m = R(), h = `q_${e.filterName}`, g = r(h), _ = (t) => t[e.idAttribute], v = () => a.push({ query: {
3199
+ ...Zi(L(s).query, [h]),
3200
+ ...L(l) && { [h]: _(L(l)) }
3201
+ } }), y = (e) => L(l) && _(L(l)) === _(e), b = () => {
3202
+ d.value = void 0, f.value = void 0;
3203
+ }, x = async (e) => {
3204
+ b(), y(e) ? l.value = void 0 : (l.value = e, L(m).hideDrop()), await v(), i("selectionChange", L(l));
3205
+ }, S = () => {
3206
+ l.value = void 0, p.value = !1, b(), i("selectionChange", L(l)), v();
3207
+ }, C = () => {
3208
+ u.value = e.items;
3209
+ }, ee = () => {
3210
+ p.value = !1;
3211
+ }, w = () => {
3212
+ let t = Re(L(g));
3213
+ if (!t) return;
3214
+ let n = e.items.find((e) => _(e) === t);
3215
+ if (n) {
3216
+ l.value = n;
3217
+ return;
3218
+ }
3219
+ if (L(T)) {
3220
+ let e = t.replace("range:", ""), n = Number(e.split(" - ")[0]), r = Number(e.split(" - ")[1]);
3221
+ d.value = _o.fromMillis(n), f.value = _o.fromMillis(r), l.value = L(E);
3222
+ }
3223
+ }, T = K(() => Re(L(g))?.startsWith("range:")), te = K(() => !L(d) || !L(f) ? !1 : L(d) <= L(f)), E = K(() => {
3224
+ if (!L(d) || !L(f)) return null;
3225
+ let t = Vi(L(d), o, _o.DATE_SHORT), n = Vi(L(f), o, _o.DATE_SHORT), r = L(d).toMillis(), i = L(f).toMillis();
3226
+ return {
3227
+ [e.idAttribute]: `range:${r} - ${i}`,
3228
+ [e.displayNameAttribute]: `${t} - ${n}`
3229
+ };
3230
+ }), D = async () => {
3231
+ l.value = L(E), await v(), L(m).hideDrop(), i("selectionChange", L(l));
3232
+ }, O = ({ date: e, error: t }, n) => {
3233
+ if (t) {
3234
+ console.error("date could not be set");
3235
+ return;
3236
+ }
3237
+ let r = n === "from" ? d : f;
3238
+ if (!e) {
3239
+ r.value = void 0;
3240
+ return;
3241
+ }
3242
+ r.value = n === "from" ? e.startOf("day") : e.endOf("day");
3243
+ };
3244
+ return t({ setSelectedItemsBasedOnQuery: w }), Ht(() => {
3245
+ w();
3246
+ }), (t, n) => {
3247
+ let r = F("oc-icon"), i = F("oc-button"), a = F("oc-list"), o = F("oc-datepicker");
3248
+ return Z(), X("div", { class: B(["date-filter flex overflow-hidden [&_label]:text-sm", `date-filter-${e.filterName}`]) }, [q(L(ir), {
3249
+ ref_key: "filterChip",
3250
+ ref: m,
3251
+ "filter-label": e.filterLabel,
3252
+ "selected-item-names": l.value ? [l.value[e.displayNameAttribute]] : void 0,
3253
+ onClearFilter: S,
3254
+ onShowDrop: C,
3255
+ onHideDrop: ee
3256
+ }, {
3257
+ default: P(() => [q(a, { class: B({ "invisible min-h-[225px] transition-[visibility] duration-[0.4s,0s]": p.value }) }, {
3258
+ default: P(() => [(Z(!0), X(U, null, M(u.value, (n, a) => (Z(), X("li", {
3259
+ key: a,
3260
+ class: "my-1 first:mt-0 last:mb-0"
3261
+ }, [q(i, {
3262
+ class: B(["date-filter-list-item flex justify-between items-center w-full p-1", { "date-filter-list-item-active": y(n) }]),
3263
+ "justify-content": "space-between",
3264
+ appearance: "raw",
3265
+ "data-testid": n[e.displayNameAttribute],
3266
+ onClick: (e) => x(n)
3267
+ }, {
3268
+ default: P(() => [Y("div", bl, [Y("div", xl, [k(t.$slots, "item", { item: n }, void 0, !0)])]), Y("div", Sl, [y(n) ? (Z(), V(r, {
3269
+ key: 0,
3270
+ name: "check"
3271
+ })) : G("", !0)])]),
3272
+ _: 2
3273
+ }, 1032, [
3274
+ "class",
3275
+ "data-testid",
3276
+ "onClick"
3277
+ ])]))), 128)), Y("li", Cl, [q(i, {
3278
+ class: B(["date-filter-list-item flex justify-between items-center w-full p-1", { "date-filter-list-item-active": T.value }]),
3279
+ "justify-content": "space-between",
3280
+ appearance: "raw",
3281
+ "data-testid": "custom-date-range",
3282
+ onClick: n[0] ||= (e) => p.value = !0
3283
+ }, {
3284
+ default: P(() => [Y("div", wl, [Y("div", Tl, [Y("span", { textContent: W(t.$gettext("Custom date range")) }, null, 8, El)])]), Y("div", Dl, [T.value ? (Z(), V(r, {
3285
+ key: 0,
3286
+ name: "check"
3287
+ })) : G("", !0)])]),
3288
+ _: 1
3289
+ }, 8, ["class"])])]),
3290
+ _: 3
3291
+ }, 8, ["class"]), Y("div", { class: B(["date-filter-range-panel absolute top-0 p-2 bg-role-surface", {
3292
+ "transform-[translateX(0)] visible": p.value,
3293
+ "transform-[translateX(100%)] invisible": !p.value
3294
+ }]) }, [
3295
+ Y("div", Ol, [
3296
+ q(i, {
3297
+ appearance: "raw",
3298
+ class: "date-filter-range-panel-back",
3299
+ "aria-label": t.$gettext("Go back to filter options"),
3300
+ onClick: n[1] ||= (e) => p.value = !1
3301
+ }, {
3302
+ default: P(() => [q(r, {
3303
+ name: "arrow-left-s",
3304
+ "fill-type": "line"
3305
+ })]),
3306
+ _: 1
3307
+ }, 8, ["aria-label"]),
3308
+ Y("span", { textContent: W(t.$gettext("Custom date range")) }, null, 8, kl),
3309
+ q(i, {
3310
+ appearance: "raw",
3311
+ class: "date-filter-range-panel-close",
3312
+ "aria-label": t.$gettext("Close filter"),
3313
+ onClick: n[2] ||= (e) => m.value.hideDrop()
3314
+ }, {
3315
+ default: P(() => [q(r, { name: "close" })]),
3316
+ _: 1
3317
+ }, 8, ["aria-label"])
3318
+ ]),
3319
+ Y("div", Al, [q(o, {
3320
+ label: t.$gettext("From"),
3321
+ "is-clearable": !0,
3322
+ "current-date": d.value,
3323
+ "is-dark": L(c).isDark,
3324
+ onDateChanged: n[3] ||= (e) => O(e, "from")
3325
+ }, null, 8, [
3326
+ "label",
3327
+ "current-date",
3328
+ "is-dark"
3329
+ ]), q(o, {
3330
+ label: t.$gettext("To"),
3331
+ "is-clearable": !0,
3332
+ "current-date": f.value,
3333
+ "min-date": d.value ? d.value : void 0,
3334
+ "is-dark": L(c).isDark,
3335
+ onDateChanged: n[4] ||= (e) => O(e, "to")
3336
+ }, null, 8, [
3337
+ "label",
3338
+ "current-date",
3339
+ "min-date",
3340
+ "is-dark"
3341
+ ])]),
3342
+ Y("div", jl, [q(i, {
3343
+ size: "small",
3344
+ disabled: !te.value,
3345
+ onClick: D
3346
+ }, {
3347
+ default: P(() => [wr(W(t.$gettext("Apply")), 1)]),
3348
+ _: 1
3349
+ }, 8, ["disabled"])])
3350
+ ], 2)]),
3351
+ _: 3
3352
+ }, 8, ["filter-label", "selected-item-names"])], 2);
3353
+ };
3354
+ }
3355
+ }), [["__scopeId", "data-v-9c476fec"]]), Nl = H({
3356
+ name: "ItemFilterInline",
3357
+ props: {
3358
+ filterName: {
3359
+ type: String,
3360
+ required: !0
3361
+ },
3362
+ filterOptions: {
3363
+ type: Array,
3364
+ required: !0
3365
+ }
3366
+ },
3367
+ emits: ["toggleFilter"],
3368
+ setup: function(e, { emit: t }) {
3369
+ let n = Mi(), i = xr(), a = R(e.filterOptions[0].name), o = `q_${e.filterName}`, s = r(o), c = (e) => n.push({ query: {
3370
+ ...Zi(L(i).query, [o]),
3371
+ [o]: e
3372
+ } });
3373
+ return Ht(() => {
3374
+ let n = Re(L(s));
3375
+ n && e.filterOptions.some(({ name: e }) => e === n) && (a.value = n, t("toggleFilter", e.filterOptions.find(({ name: e }) => e === n)));
3376
+ }), {
3377
+ queryParam: o,
3378
+ activeOption: a,
3379
+ toggleFilter: async (e) => {
3380
+ a.value = e.name, await c(e.name), t("toggleFilter", e);
3381
+ }
3382
+ };
3383
+ }
3384
+ }), Pl = ["textContent"];
3385
+ function Fl(e, t, n, r, i, a) {
3386
+ let o = F("oc-button");
3387
+ return Z(), X("div", null, [Y("div", { class: B(["item-inline-filter inline-flex outline outline-offset-[-1px] rounded-md", `item-inline-filter-${e.filterName}`]) }, [(Z(!0), X(U, null, M(e.filterOptions, (t, n) => (Z(), V(o, {
3388
+ id: t.name,
3389
+ key: n,
3390
+ class: B(["item-inline-filter-option py-1 px-2 first:rounded-l-md last:rounded-r-md h-[32px]", { "item-inline-filter-option-selected": e.activeOption === t.name }]),
3391
+ appearance: e.activeOption === t.name ? "filled" : "raw-inverse",
3392
+ "color-role": e.activeOption === t.name ? "secondaryContainer" : "surface",
3393
+ "no-hover": e.activeOption === t.name,
3394
+ onClick: (n) => e.toggleFilter(t)
3395
+ }, {
3396
+ default: P(() => [Y("span", {
3397
+ class: "truncate item-inline-filter-option-label",
3398
+ textContent: W(t.label)
3399
+ }, null, 8, Pl)]),
3400
+ _: 2
3401
+ }, 1032, [
3402
+ "id",
3403
+ "class",
3404
+ "appearance",
3405
+ "color-role",
3406
+ "no-hover",
3407
+ "onClick"
3408
+ ]))), 128))], 2)]);
3409
+ }
3410
+ var Il = /* @__PURE__ */ z(Nl, [["render", Fl]]), Ll = {
3411
+ key: 1,
3412
+ class: "flex justify-between items-center w-full"
3413
+ }, Rl = { class: "flex items-center truncate" }, zl = { class: "flex flex-col items-start ml-5 truncate" }, Bl = ["textContent"], Vl = ["textContent"], Hl = { class: "flex justify-between items-center w-full" }, Ul = { class: "flex items-center truncate" }, Wl = { class: "flex flex-col items-start ml-5 truncate" }, Gl = ["textContent"], Kl = ["textContent"], ql = /* @__PURE__ */ H({
3414
+ __name: "AccountsSwitch",
3415
+ setup(e) {
3416
+ let t = w(), { accounts: n, currentAccount: r, isLoading: i } = $(t), { setCurrentAccount: a } = t, o = (e) => {
3417
+ a(e);
3418
+ };
3419
+ return (e, t) => {
3420
+ let a = F("oc-spinner"), s = F("oc-avatar"), c = F("oc-icon"), l = F("oc-button"), u = F("oc-list"), d = F("oc-drop");
3421
+ return Z(), X(U, null, [q(l, {
3422
+ id: "account-list-toggle",
3423
+ class: "w-auto m-2",
3424
+ appearance: "filled",
3425
+ "color-role": "surface",
3426
+ "justify-content": "space-between",
3427
+ "no-hover": ""
3428
+ }, {
3429
+ default: P(() => [L(i) ? (Z(), V(a, {
3430
+ key: 0,
3431
+ "aria-label": e.$gettext("Loading accounts")
3432
+ }, null, 8, ["aria-label"])) : (Z(), X("div", Ll, [Y("div", Rl, [q(s, { "user-name": L(r)?.name || "" }, null, 8, ["user-name"]), Y("div", zl, [Y("span", {
3433
+ class: "font-bold",
3434
+ textContent: W(L(r)?.name || "")
3435
+ }, null, 8, Bl), L(r)?.identities?.[0]?.email ? (Z(), X("span", {
3436
+ key: 0,
3437
+ class: "max-w-full truncate",
3438
+ textContent: W(L(r).identities[0].email)
3439
+ }, null, 8, Vl)) : G("", !0)])]), q(c, {
3440
+ class: "ml-2",
3441
+ name: "more-2"
3442
+ })]))]),
3443
+ _: 1
3444
+ }), q(d, {
3445
+ title: e.$gettext("Accounts"),
3446
+ class: "w-md",
3447
+ toggle: "#account-list-toggle",
3448
+ "close-on-click": ""
3449
+ }, {
3450
+ default: P(() => [q(u, null, {
3451
+ default: P(() => [(Z(!0), X(U, null, M(L(n), (e) => (Z(), X("li", {
3452
+ key: e.accountId,
3453
+ class: "oc-list"
3454
+ }, [q(l, {
3455
+ class: "p-2",
3456
+ appearance: e.accountId === L(r).accountId ? "filled" : "raw-inverse",
3457
+ "color-role": e.accountId === L(r).accountId ? "secondaryContainer" : "surface",
3458
+ onClick: (t) => o(e)
3459
+ }, {
3460
+ default: P(() => [Y("div", Hl, [Y("div", Ul, [q(s, { "user-name": e.name }, null, 8, ["user-name"]), Y("div", Wl, [Y("span", {
3461
+ class: "font-bold",
3462
+ textContent: W(e.name)
3463
+ }, null, 8, Gl), e.identities?.[0]?.email ? (Z(), X("span", {
3464
+ key: 0,
3465
+ textContent: W(e.identities[0].email)
3466
+ }, null, 8, Kl)) : G("", !0)])]), e.accountId === L(r).accountId ? (Z(), V(c, {
3467
+ key: 0,
3468
+ class: "ml-2",
3469
+ name: "check"
3470
+ })) : G("", !0)])]),
3471
+ _: 2
3472
+ }, 1032, [
3473
+ "appearance",
3474
+ "color-role",
3475
+ "onClick"
3476
+ ])]))), 128))]),
3477
+ _: 1
3478
+ })]),
3479
+ _: 1
3480
+ }, 8, ["title"])], 64);
3481
+ };
3482
+ }
3483
+ }), Jl = { class: "space-quota" }, Yl = ["textContent"], Xl = /* @__PURE__ */ H({
3484
+ __name: "SpaceQuota",
3485
+ props: { spaceQuota: {} },
3486
+ setup(e) {
3487
+ let { $gettext: t, current: n } = Q(), r = K(() => e.spaceQuota.total ? t("%{used} of %{total} used (%{percentage}% used)", {
3488
+ used: L(a),
3489
+ total: L(i),
3490
+ percentage: L(o).toString()
3491
+ }) : t("%{used} used (no restriction)", { used: L(a) })), i = K(() => Ge(e.spaceQuota.total, n)), a = K(() => Ge(e.spaceQuota.used, n)), o = K(() => parseFloat((e.spaceQuota.used / e.spaceQuota.total * 100).toFixed(2))), s = K(() => {
3492
+ switch (e.spaceQuota.state) {
3493
+ case "normal": return "var(--oc-role-secondary)";
3494
+ default: return "var(--oc-role-error)";
3495
+ }
3496
+ });
3497
+ return (e, t) => {
3498
+ let n = F("oc-progress");
3499
+ return Z(), X("div", Jl, [Y("p", {
3500
+ class: "mb-2 mt-0",
3501
+ textContent: W(r.value)
3502
+ }, null, 8, Yl), q(n, {
3503
+ value: o.value,
3504
+ max: 100,
3505
+ size: "small",
3506
+ color: s.value,
3507
+ "background-color": "var(--oc-role-surface)"
3508
+ }, null, 8, ["value", "color"])]);
3509
+ };
3510
+ }
3511
+ }), Zl = H({
3512
+ name: "WebDavDetails",
3513
+ props: { space: {
3514
+ type: Object,
3515
+ required: !0
3516
+ } },
3517
+ setup(e) {
3518
+ let t = zn("resource"), n = "check", r = "file-copy", i = R(r), a = R(r), o = K(() => Pt(L(t).webDavPath)), s = K(() => e.space?.getWebDavUrl({ path: L(t).path }));
3519
+ return {
3520
+ copyWebDAVPathIcon: i,
3521
+ copyWebDAVPathToClipboard: () => {
3522
+ navigator.clipboard.writeText(L(o)), i.value = n, setTimeout(() => i.value = r, 1500);
3523
+ },
3524
+ copyWebDAVUrlIcon: a,
3525
+ copyWebDAVUrlToClipboard: () => {
3526
+ navigator.clipboard.writeText(L(s)), a.value = n, setTimeout(() => a.value = r, 1500);
3527
+ },
3528
+ webDavPath: o,
3529
+ webDavUrl: s
3530
+ };
3531
+ }
3532
+ }), Ql = { class: "flex" }, $l = ["textContent"], eu = { class: "flex" }, tu = ["textContent"];
3533
+ function nu(e, t, n, r, i, a) {
3534
+ let o = F("oc-icon"), s = F("oc-button"), c = ni("oc-tooltip");
3535
+ return Z(), X(U, null, [
3536
+ Y("dt", null, W(e.$gettext("WebDAV path")), 1),
3537
+ Y("dd", Ql, [I(Y("div", {
3538
+ class: "truncate",
3539
+ textContent: W(e.webDavPath)
3540
+ }, null, 8, $l), [[c, e.webDavPath]]), I((Z(), V(s, {
3541
+ class: "ml-2",
3542
+ appearance: "raw",
3543
+ size: "small",
3544
+ "aria-label": e.$gettext("Copy WebDAV path to clipboard"),
3545
+ "no-hover": "",
3546
+ onClick: e.copyWebDAVPathToClipboard
3547
+ }, {
3548
+ default: P(() => [q(o, { name: e.copyWebDAVPathIcon }, null, 8, ["name"])]),
3549
+ _: 1
3550
+ }, 8, ["aria-label", "onClick"])), [[c, e.$gettext("Copy WebDAV path")]])]),
3551
+ Y("dt", null, W(e.$gettext("WebDAV URL")), 1),
3552
+ Y("dd", eu, [I(Y("div", {
3553
+ class: "truncate",
3554
+ textContent: W(e.webDavUrl)
3555
+ }, null, 8, tu), [[c, e.webDavUrl]]), I((Z(), V(s, {
3556
+ class: "ml-2",
3557
+ appearance: "raw",
3558
+ size: "small",
3559
+ "aria-label": e.$gettext("Copy WebDAV URL to clipboard"),
3560
+ "no-hover": "",
3561
+ onClick: e.copyWebDAVUrlToClipboard
3562
+ }, {
3563
+ default: P(() => [q(o, { name: e.copyWebDAVUrlIcon }, null, 8, ["name"])]),
3564
+ _: 1
3565
+ }, 8, ["aria-label", "onClick"])), [[c, e.$gettext("Copy WebDAV URL")]])])
3566
+ ], 64);
3567
+ }
3568
+ var ru = /* @__PURE__ */ z(Zl, [["render", nu]]), iu = /* @__PURE__ */ H({
3569
+ __name: "CustomComponentTarget",
3570
+ props: { extensionPoint: {} },
3571
+ setup(e) {
3572
+ let t = e, n = dt(), r = wt(), i = K(() => n.requestExtensions(t.extensionPoint)), a = r.extractDefaultExtensionIds(t.extensionPoint, L(i)), o = K(() => {
3573
+ if (t.extensionPoint.multiple || L(i).length <= 1) return L(i);
3574
+ let e = r.getExtensionPreference(t.extensionPoint.id, a);
3575
+ return e.selectedExtensionIds.length ? [L(i).find((t) => e.selectedExtensionIds.includes(t.id)) || L(i)[0]] : [L(i)[0]];
3576
+ });
3577
+ return (e, t) => (Z(!0), X(U, null, M(o.value, (e) => (Z(), V(u(e.content), va({ key: `custom-component-${e.id}` }, { ref_for: !0 }, e.componentProps ? e.componentProps() : void 0), null, 16))), 128));
3578
+ }
3579
+ }), au = {
3580
+ id: "app.files.sidebar.space-details.table",
3581
+ extensionType: "customComponent"
3582
+ }, ou = () => K(() => [au]), su = {
3583
+ id: "oc-space-details-sidebar",
3584
+ class: "p-4 bg-role-surface-container rounded-sm"
3585
+ }, cu = { class: "text-center" }, lu = {
3586
+ key: 1,
3587
+ class: "relative mb-2"
3588
+ }, uu = ["src"], du = {
3589
+ key: 0,
3590
+ class: "flex items-center oc-space-details-sidebar-members mb-2 text-sm gap-2"
3591
+ }, fu = ["textContent"], pu = ["textContent"], mu = ["aria-label"], hu = /* @__PURE__ */ H({
3592
+ __name: "SpaceDetails",
3593
+ props: { showShareIndicators: {
3594
+ type: Boolean,
3595
+ default: !0
3596
+ } },
3597
+ setup(e) {
3598
+ let t = $n(), n = fr(), { resourceContentsText: r } = br({ showSizeInformation: !1 }), i = Mi(), { $gettext: a, $ngettext: o, current: s } = Q(), { loadPreview: c } = ji(), { openSideBarPanel: l } = ki(), u = gi(), { imagesLoading: d } = $(u), f = Mr(), p = zn("resource"), m = R(""), { user: h } = $(t), g = K(() => u.getSpaceMembers(L(p))), _ = K(() => f.linkShares.length), v = K(() => n.areWebDavDetailsShown), y = K(() => !$r(i, "files-spaces-projects")), b = K(() => `${Ge(L(p).size, s)}, ${L(r)}`);
3599
+ N(() => L(p).spaceImageData, async () => {
3600
+ m.value = await c({
3601
+ space: L(p),
3602
+ resource: L(p).spaceImageData ? Za(L(p)) : L(p),
3603
+ dimensions: Ke.Tile,
3604
+ processor: Sr.enum.fit,
3605
+ cancelRunning: !0,
3606
+ updateStore: !1
3607
+ });
3608
+ }, { immediate: !0 });
3609
+ let x = K(() => L(g).length ? L(g).filter(io).map(({ sharedWith: e }) => e.id === L(h)?.id ? a("%{displayName} (me)", { displayName: e.displayName }) : e.displayName).join(", ") : eo(L(p), f.graphRoles)?.map(({ grantedToV2: e }) => e.user?.id === L(h)?.id ? a("%{displayName} (me)", { displayName: e.user.displayName }) : e.user?.displayName || e.group?.displayName).join(", ")), S = K(() => Dn(L(p).mdate, s)), C = K(() => L(E) || L(D)), ee = K(() => {
3610
+ if (L(E) && !L(D)) return L(k);
3611
+ if (!L(E) && L(D)) return L(A);
3612
+ switch (L(O)) {
3613
+ case 1: return o("This space has one member and %{linkShareCount} link.", "This space has one member and %{linkShareCount} links.", L(_), { linkShareCount: L(_).toString() });
3614
+ default: return L(_) === 1 ? a("This space has %{memberShareCount} members and one link.", { memberShareCount: L(O).toString() }) : a("This space has %{memberShareCount} members and %{linkShareCount} links.", {
3615
+ memberShareCount: L(O).toString(),
3616
+ linkShareCount: L(_).toString()
3617
+ });
3618
+ }
3619
+ }), w = K(() => a("Open share panel")), T = K(() => a("Open link list in share panel")), te = K(() => a("Open member list in share panel")), E = K(() => L(O) > 0), D = K(() => L(_) > 0), O = K(() => L(g).length), k = K(() => o("This space has %{memberShareCount} member.", "This space has %{memberShareCount} members.", L(O), { memberShareCount: L(O).toString() })), A = K(() => o("%{linkShareCount} link giving access.", "%{linkShareCount} links giving access.", L(_), { linkShareCount: L(_).toString() }));
3620
+ return (t, n) => {
3621
+ let r = F("oc-spinner"), i = F("oc-icon"), o = F("oc-button");
3622
+ return Z(), X("div", su, [
3623
+ Y("div", cu, [L(d).includes(L(p).id) ? (Z(), V(r, {
3624
+ key: 0,
3625
+ "aria-label": L(a)("Space image is loading")
3626
+ }, null, 8, ["aria-label"])) : m.value ? (Z(), X("div", lu, [Y("img", {
3627
+ src: m.value,
3628
+ alt: "",
3629
+ class: "size-full object-cover aspect-[16/9]"
3630
+ }, null, 8, uu)])) : (Z(), V(i, {
3631
+ key: 2,
3632
+ name: "layout-grid",
3633
+ size: "xxlarge",
3634
+ class: "space-default-image px-4 py-4"
3635
+ }))]),
3636
+ e.showShareIndicators && C.value && !L(p).disabled ? (Z(), X("div", du, [
3637
+ E.value ? (Z(), V(o, {
3638
+ key: 0,
3639
+ appearance: "raw",
3640
+ "aria-label": te.value,
3641
+ "no-hover": "",
3642
+ onClick: n[0] ||= (e) => L(l)("space-share")
3643
+ }, {
3644
+ default: P(() => [q(i, {
3645
+ name: "group",
3646
+ size: "small",
3647
+ "fill-type": "line"
3648
+ })]),
3649
+ _: 1
3650
+ }, 8, ["aria-label"])) : G("", !0),
3651
+ D.value ? (Z(), V(o, {
3652
+ key: 1,
3653
+ appearance: "raw",
3654
+ "aria-label": T.value,
3655
+ "no-hover": "",
3656
+ onClick: n[1] ||= (e) => L(l)("space-share")
3657
+ }, {
3658
+ default: P(() => [q(i, {
3659
+ name: "link",
3660
+ size: "small",
3661
+ "fill-type": "line"
3662
+ })]),
3663
+ _: 1
3664
+ }, 8, ["aria-label"])) : G("", !0),
3665
+ Y("p", { textContent: W(ee.value) }, null, 8, fu),
3666
+ q(o, {
3667
+ appearance: "raw",
3668
+ "aria-label": w.value,
3669
+ size: "small",
3670
+ "no-hover": "",
3671
+ onClick: n[2] ||= (e) => L(l)("space-share")
3672
+ }, {
3673
+ default: P(() => [Y("span", {
3674
+ class: "text-sm",
3675
+ textContent: W(L(a)("Show"))
3676
+ }, null, 8, pu)]),
3677
+ _: 1
3678
+ }, 8, ["aria-label"])
3679
+ ])) : G("", !0),
3680
+ Y("dl", {
3681
+ class: "details-list grid grid-cols-[auto_minmax(0,1fr)] m-0",
3682
+ "aria-label": L(a)("Overview of the information about the selected space")
3683
+ }, [
3684
+ Y("dt", null, W(L(a)("Last activity")), 1),
3685
+ Y("dd", null, W(S.value), 1),
3686
+ L(p).description ? (Z(), X(U, { key: 0 }, [Y("dt", null, W(L(a)("Subtitle")), 1), Y("dd", null, W(L(p).description), 1)], 64)) : G("", !0),
3687
+ Y("dt", null, W(L(a)("Manager")), 1),
3688
+ Y("dd", null, W(x.value), 1),
3689
+ L(p).disabled ? G("", !0) : (Z(), X(U, { key: 1 }, [Y("dt", null, W(L(a)("Quota")), 1), Y("dd", null, [q(Xl, { "space-quota": L(p).spaceQuota }, null, 8, ["space-quota"])])], 64)),
3690
+ y.value ? (Z(), X(U, { key: 2 }, [Y("dt", null, W(L(a)("Size")), 1), Y("dd", null, W(b.value), 1)], 64)) : G("", !0),
3691
+ v.value ? (Z(), V(ru, {
3692
+ key: 3,
3693
+ space: L(p)
3694
+ }, null, 8, ["space"])) : G("", !0),
3695
+ q(iu, { "extension-point": L(au) }, null, 8, ["extension-point"])
3696
+ ], 8, mu)
3697
+ ]);
3698
+ };
3699
+ }
3700
+ }), gu = {
3701
+ id: "oc-spaces-details-multiple-sidebar",
3702
+ class: "p-4 bg-role-surface-container rounded-sm"
3703
+ }, _u = { class: "text-center mb-6 rounded-sm" }, vu = ["textContent"], yu = /* @__PURE__ */ H({
3704
+ __name: "SpaceDetailsMultiple",
3705
+ props: { selectedSpaces: {} },
3706
+ setup(e) {
3707
+ let t = Q(), { $gettext: n, $ngettext: r } = t, i = K(() => {
3708
+ let n = 0;
3709
+ return e.selectedSpaces.forEach((e) => {
3710
+ n += e.spaceQuota.total;
3711
+ }), Ge(n, t.current);
3712
+ }), a = K(() => {
3713
+ let n = 0;
3714
+ return e.selectedSpaces.forEach((e) => {
3715
+ e.disabled || (n += e.spaceQuota.remaining);
3716
+ }), Ge(n, t.current);
3717
+ }), o = K(() => {
3718
+ let n = 0;
3719
+ return e.selectedSpaces.forEach((e) => {
3720
+ e.disabled || (n += e.spaceQuota.used);
3721
+ }), Ge(n, t.current);
3722
+ }), s = K(() => e.selectedSpaces.filter((e) => !e.disabled).length), c = K(() => e.selectedSpaces.filter((e) => e.disabled).length), l = K(() => n("Overview of the information about the selected spaces")), u = K(() => r("%{ itemCount } space selected", "%{ itemCount } spaces selected", e.selectedSpaces.length, { itemCount: e.selectedSpaces.length.toString() })), d = K(() => [
3723
+ {
3724
+ term: n("Total quota:"),
3725
+ definition: L(i).toString()
3726
+ },
3727
+ {
3728
+ term: n("Remaining quota:"),
3729
+ definition: L(a).toString()
3730
+ },
3731
+ {
3732
+ term: n("Used quota:"),
3733
+ definition: L(o).toString()
3734
+ },
3735
+ {
3736
+ term: n("Enabled:"),
3737
+ definition: L(s).toString()
3738
+ },
3739
+ {
3740
+ term: n("Disabled:"),
3741
+ definition: L(c).toString()
3742
+ }
3743
+ ]);
3744
+ return (e, t) => {
3745
+ let n = F("oc-icon"), r = F("oc-definition-list");
3746
+ return Z(), X("div", gu, [Y("div", _u, [Y("div", null, [q(n, {
3747
+ size: "xxlarge",
3748
+ name: "layout-grid"
3749
+ }), Y("p", { textContent: W(u.value) }, null, 8, vu)])]), q(r, {
3750
+ "aria-label": l.value,
3751
+ items: d.value,
3752
+ class: "m-0"
3753
+ }, null, 8, ["aria-label", "items"])]);
3754
+ };
3755
+ }
3756
+ }), bu = H({ name: "SpaceNoSelection" }), xu = { class: "mt-12" }, Su = { class: "flex flex-col items-center space-info text-center" }, Cu = ["textContent"];
3757
+ function wu(e, t, n, r, i, a) {
3758
+ let o = F("oc-icon");
3759
+ return Z(), X("div", xu, [Y("div", Su, [q(o, {
3760
+ name: "layout-grid",
3761
+ size: "xxlarge"
3762
+ }), Y("p", { textContent: W(e.$gettext("Select a space to view details")) }, null, 8, Cu)])]);
3763
+ }
3764
+ var Tu = /* @__PURE__ */ z(bu, [["render", wu]]), Eu = H({
3765
+ name: "CompareSaveDialog",
3766
+ props: {
3767
+ originalObject: {
3768
+ type: Object,
3769
+ required: !0
3770
+ },
3771
+ compareObject: {
3772
+ type: Object,
3773
+ required: !0
3774
+ },
3775
+ confirmButtonDisabled: {
3776
+ type: Boolean,
3777
+ default: () => !1
3778
+ }
3779
+ },
3780
+ emits: ["confirm", "revert"],
3781
+ setup() {
3782
+ let e = R(!1), t;
3783
+ return Ht(() => {
3784
+ t = ei.subscribe("sidebar.entity.saved", () => {
3785
+ e.value = !0;
3786
+ });
3787
+ }), ja(() => {
3788
+ ei.unsubscribe("sidebar.entity.saved", t);
3789
+ }), { saved: e };
3790
+ },
3791
+ computed: {
3792
+ unsavedChanges() {
3793
+ return !pi(this.originalObject, this.compareObject);
3794
+ },
3795
+ unsavedChangesText() {
3796
+ return this.unsavedChanges ? this.$gettext("Unsaved changes") : this.$gettext("No changes");
3797
+ }
3798
+ },
3799
+ watch: {
3800
+ unsavedChanges() {
3801
+ this.unsavedChanges && (this.saved = !1);
3802
+ },
3803
+ "originalObject.id": function() {
3804
+ this.saved = !1;
3805
+ }
3806
+ }
3807
+ }), Du = { class: "w-full flex flex-row flex-wrap justify-between items-center" }, Ou = {
3808
+ key: 0,
3809
+ class: "flex items-center"
3810
+ }, ku = ["textContent"], Au = { key: 1 }, ju = ["textContent"], Mu = ["textContent"];
3811
+ function Nu(e, t, n, r, i, a) {
3812
+ let o = F("oc-icon"), s = F("oc-button");
3813
+ return Z(), X("div", Du, [e.saved ? (Z(), X("span", Ou, [q(o, { name: "checkbox-circle" }), Y("span", {
3814
+ class: "ml-2",
3815
+ textContent: W(e.$gettext("Changes saved"))
3816
+ }, null, 8, ku)])) : (Z(), X("span", Au, W(e.unsavedChangesText), 1)), Y("div", null, [q(s, {
3817
+ disabled: !e.unsavedChanges,
3818
+ class: "compare-save-dialog-revert-btn",
3819
+ onClick: t[0] ||= (t) => e.$emit("revert")
3820
+ }, {
3821
+ default: P(() => [Y("span", { textContent: W(e.$gettext("Revert")) }, null, 8, ju)]),
3822
+ _: 1
3823
+ }, 8, ["disabled"]), q(s, {
3824
+ appearance: "filled",
3825
+ class: "compare-save-dialog-confirm-btn",
3826
+ disabled: !e.unsavedChanges || e.confirmButtonDisabled,
3827
+ onClick: t[1] ||= (t) => e.$emit("confirm")
3828
+ }, {
3829
+ default: P(() => [Y("span", { textContent: W(e.$gettext("Save")) }, null, 8, Mu)]),
3830
+ _: 1
3831
+ }, 8, ["disabled"])])]);
3832
+ }
3833
+ var Pu = /* @__PURE__ */ z(Eu, [["render", Nu]]), Fu = hi(async () => (await import("./TextEditor-B0ZZfO_w.js")).default), Iu = { class: "flex items-center truncate" }, Lu = { class: "truncate" }, Ru = { class: "flex" }, zu = /* @__PURE__ */ H({
3834
+ __name: "ItemFilter",
3835
+ props: {
3836
+ filterLabel: {},
3837
+ filterName: {},
3838
+ items: {},
3839
+ optionFilterLabel: { default: "" },
3840
+ showOptionFilter: {
3841
+ type: Boolean,
3842
+ default: !1
3843
+ },
3844
+ allowMultiple: {
3845
+ type: Boolean,
3846
+ default: !1
3847
+ },
3848
+ idAttribute: { default: "id" },
3849
+ displayNameAttribute: { default: "name" },
3850
+ filterableAttributes: { default: () => [] },
3851
+ closeOnClick: {
3852
+ type: Boolean,
3853
+ default: !1
3854
+ }
3855
+ },
3856
+ emits: ["selectionChange"],
3857
+ setup(e, { expose: t, emit: n }) {
3858
+ let i = n, a = Mi(), o = xr(), s = fe("filterInputRef"), c = R([]), l = R(e.items), u = fe("itemFilterListRef"), d = `q_${e.filterName}`, f = r(d), p = (t) => t[e.idAttribute], m = () => a.push({ query: {
3859
+ ...Zi(L(o).query, [d]),
3860
+ ...!!L(c).length && { [d]: L(c).reduce((e, t) => (e += `${p(t)}+`, e), "").slice(0, -1) }
3861
+ } }), h = (e) => !!L(c).find((t) => p(t) === p(e)), g = async (t) => {
3862
+ h(t) ? c.value = L(c).filter((e) => p(e) !== p(t)) : (e.allowMultiple || (c.value = []), c.value.push(t)), await m(), i("selectionChange", L(c));
3863
+ }, _ = R(), v = (t, n) => {
3864
+ if (!(n || "").trim()) return t;
3865
+ let r = new po(t, {
3866
+ ...on,
3867
+ keys: e.filterableAttributes
3868
+ }).search(n).map((e) => e.item);
3869
+ return t.filter((e) => r.includes(e));
3870
+ }, y = () => {
3871
+ c.value = [], i("selectionChange", L(c)), m();
3872
+ }, b = (e) => {
3873
+ l.value = e;
3874
+ }, x = async () => {
3875
+ b(e.items), await Ra(), L(s)?.focus();
3876
+ }, S;
3877
+ N(_, () => {
3878
+ b(v(e.items, L(_))), L(u) && (S = new bo(L(u)), S.unmark(), S.mark(L(_), {
3879
+ element: "span",
3880
+ className: "mark-highlight"
3881
+ }));
3882
+ });
3883
+ let C = () => {
3884
+ let t = Re(L(f));
3885
+ if (t) {
3886
+ let n = t.split("+");
3887
+ c.value = e.items.filter((e) => n.includes(p(e)));
3888
+ }
3889
+ };
3890
+ return t({ setSelectedItemsBasedOnQuery: C }), Ht(() => {
3891
+ C();
3892
+ }), (t, n) => {
3893
+ let r = F("oc-checkbox"), i = F("oc-icon"), a = F("oc-button"), o = F("oc-list"), d = F("oc-filter-chip");
3894
+ return Z(), X("div", { class: B(["item-filter flex", `item-filter-${e.filterName}`]) }, [q(d, {
3895
+ "filter-label": e.filterLabel,
3896
+ "selected-item-names": c.value.map((t) => t[e.displayNameAttribute]),
3897
+ "close-on-click": e.closeOnClick,
3898
+ onClearFilter: y,
3899
+ onShowDrop: x
3900
+ }, {
3901
+ default: P(() => [e.showOptionFilter && e.filterableAttributes.length ? (Z(), V(L(Qi), {
3902
+ key: 0,
3903
+ ref_key: "filterInputRef",
3904
+ ref: s,
3905
+ modelValue: _.value,
3906
+ "onUpdate:modelValue": n[0] ||= (e) => _.value = e,
3907
+ class: "item-filter-input mb-4 mt-2",
3908
+ autocomplete: "off",
3909
+ label: e.optionFilterLabel === "" ? t.$gettext("Filter list") : e.optionFilterLabel
3910
+ }, null, 8, ["modelValue", "label"])) : G("", !0), Y("div", {
3911
+ ref_key: "itemFilterListRef",
3912
+ ref: u
3913
+ }, [q(o, { class: "item-filter-list" }, {
3914
+ default: P(() => [(Z(!0), X(U, null, M(l.value, (o, s) => (Z(), X("li", {
3915
+ key: s,
3916
+ class: "my-1"
3917
+ }, [q(a, {
3918
+ class: B(["item-filter-list-item flex items-center w-full", {
3919
+ "item-filter-list-item-active": !e.allowMultiple && h(o),
3920
+ "justify-start": e.allowMultiple,
3921
+ "justify-between": !e.allowMultiple
3922
+ }]),
3923
+ "justify-content": "space-between",
3924
+ appearance: "raw",
3925
+ "data-test-value": o[e.displayNameAttribute],
3926
+ onClick: (e) => g(o)
3927
+ }, {
3928
+ default: P(() => [Y("div", Iu, [
3929
+ e.allowMultiple ? (Z(), V(r, {
3930
+ key: 0,
3931
+ size: "large",
3932
+ class: "mr-2",
3933
+ label: t.$gettext("Toggle selection"),
3934
+ "model-value": h(o),
3935
+ "label-hidden": !0,
3936
+ "onUpdate:modelValue": (e) => g(o),
3937
+ onClick: n[1] ||= J(() => {}, ["stop"])
3938
+ }, null, 8, [
3939
+ "label",
3940
+ "model-value",
3941
+ "onUpdate:modelValue"
3942
+ ])) : G("", !0),
3943
+ Y("div", null, [k(t.$slots, "image", { item: o })]),
3944
+ Y("div", Lu, [k(t.$slots, "item", { item: o })])
3945
+ ]), Y("div", Ru, [!e.allowMultiple && h(o) ? (Z(), V(i, {
3946
+ key: 0,
3947
+ name: "check"
3948
+ })) : G("", !0)])]),
3949
+ _: 2
3950
+ }, 1032, [
3951
+ "class",
3952
+ "data-test-value",
3953
+ "onClick"
3954
+ ])]))), 128))]),
3955
+ _: 3
3956
+ })], 512)]),
3957
+ _: 3
3958
+ }, 8, [
3959
+ "filter-label",
3960
+ "selected-item-names",
3961
+ "close-on-click"
3962
+ ])], 2);
3963
+ };
3964
+ }
3965
+ }), Bu = H({
3966
+ name: "ItemFilterToggle",
3967
+ props: {
3968
+ filterLabel: {
3969
+ type: String,
3970
+ required: !0
3971
+ },
3972
+ filterName: {
3973
+ type: String,
3974
+ required: !0
3975
+ }
3976
+ },
3977
+ emits: ["toggleFilter"],
3978
+ setup: function(e, { emit: t }) {
3979
+ let n = Mi(), i = xr(), a = R(!1), o = `q_${e.filterName}`, s = r(o), c = () => n.push({ query: {
3980
+ ...Zi(L(i).query, [o]),
3981
+ ...L(a) && { [o]: "true" }
3982
+ } });
3983
+ return Ht(() => {
3984
+ Re(L(s)) === "true" && (a.value = !0);
3985
+ }), {
3986
+ queryParam: o,
3987
+ filterActive: a,
3988
+ toggleFilter: async () => {
3989
+ a.value = !L(a), await c(), t("toggleFilter", L(a));
3990
+ }
3991
+ };
3992
+ }
3993
+ });
3994
+ //#endregion
3995
+ //#region src/components/ItemFilterToggle.vue
3996
+ function Vu(e, t, n, r, i, a) {
3997
+ let o = F("oc-filter-chip");
3998
+ return Z(), X("div", { class: B(["item-filter flex", `item-filter-${e.filterName}`]) }, [q(o, {
3999
+ "is-toggle": !0,
4000
+ "filter-label": e.filterLabel,
4001
+ "is-toggle-active": e.filterActive,
4002
+ onToggleFilter: e.toggleFilter,
4003
+ onClearFilter: e.toggleFilter
4004
+ }, null, 8, [
4005
+ "filter-label",
4006
+ "is-toggle-active",
4007
+ "onToggleFilter",
4008
+ "onClearFilter"
4009
+ ])], 2);
4010
+ }
4011
+ var Hu = /* @__PURE__ */ z(Bu, [["render", Vu]]), Uu = H({
4012
+ name: "LoadingIndicator",
4013
+ setup() {
4014
+ let e = Jt(), t, n, r, i = R(e.isLoading), a = R(e.currentProgress), o = () => {
4015
+ a.value = e.currentProgress, i.value = e.isLoading;
4016
+ }, s = () => {
4017
+ a.value = e.currentProgress;
4018
+ };
4019
+ return Ht(() => {
4020
+ t = ei.subscribe(Ir.add, o), n = ei.subscribe(Ir.remove, o), r = ei.subscribe(Ir.setProgress, s);
4021
+ }), ja(() => {
4022
+ ei.unsubscribe(Ir.add, t), ei.unsubscribe(Ir.remove, n), ei.unsubscribe(Ir.setProgress, r);
4023
+ }), {
4024
+ isLoading: i,
4025
+ currentProgress: a
4026
+ };
4027
+ }
4028
+ }), Wu = {
4029
+ key: 0,
4030
+ id: "oc-loading-indicator",
4031
+ class: "w-full"
4032
+ };
4033
+ function Gu(e, t, n, r, i, a) {
4034
+ let o = F("oc-progress");
4035
+ return e.isLoading ? (Z(), X("div", Wu, [q(o, {
4036
+ max: 100,
4037
+ indeterminate: e.currentProgress === null,
4038
+ value: e.currentProgress,
4039
+ size: "xsmall"
4040
+ }, null, 8, ["indeterminate", "value"])])) : G("", !0);
4041
+ }
4042
+ var Ku = /* @__PURE__ */ z(Uu, [["render", Gu]]), qu = { class: "no-content-message flex flex-col justify-center items-center text-center" }, Ju = { class: "text-role-on-surface-variant text-xl" }, Yu = { class: "text-role-on-surface-variant mt-1" }, Xu = /* @__PURE__ */ z(/* @__PURE__ */ H({
4043
+ __name: "NoContentMessage",
4044
+ props: {
4045
+ icon: { default: "" },
4046
+ iconFillType: { default: "fill" },
4047
+ imgSrc: { default: "" }
4048
+ },
4049
+ setup(e) {
4050
+ return (t, n) => {
4051
+ let r = F("oc-image"), i = F("oc-icon");
4052
+ return Z(), X("div", qu, [
4053
+ e.imgSrc ? (Z(), V(r, {
4054
+ key: 0,
4055
+ width: "120",
4056
+ height: "120",
4057
+ class: "mb-4",
4058
+ src: e.imgSrc,
4059
+ alt: t.$gettext("No content image")
4060
+ }, null, 8, ["src", "alt"])) : G("", !0),
4061
+ e.icon ? (Z(), V(i, {
4062
+ key: 1,
4063
+ name: e.icon,
4064
+ type: "div",
4065
+ size: "xxlarge",
4066
+ "fill-type": e.iconFillType,
4067
+ class: "mb-4"
4068
+ }, null, 8, ["name", "fill-type"])) : G("", !0),
4069
+ Y("div", Ju, [k(t.$slots, "message", {}, void 0, !0)]),
4070
+ Y("div", Yu, [k(t.$slots, "callToAction", {}, void 0, !0)])
4071
+ ]);
4072
+ };
4073
+ }
4074
+ }), [["__scopeId", "data-v-02a07e27"]]), Zu = H({
4075
+ props: {
4076
+ pages: {
4077
+ type: Number,
4078
+ required: !0
4079
+ },
4080
+ currentPage: {
4081
+ type: Number,
4082
+ required: !0
4083
+ }
4084
+ },
4085
+ watch: { currentPage: { handler: function() {
4086
+ document.getElementsByClassName("files-view-wrapper")[0]?.scrollTo(0, 0);
4087
+ } } }
4088
+ });
4089
+ //#endregion
4090
+ //#region src/components/Pagination.vue
4091
+ function Qu(e, t, n, r, i, a) {
4092
+ let o = F("oc-pagination");
4093
+ return e.pages > 1 ? (Z(), V(o, {
4094
+ key: 0,
4095
+ pages: e.pages,
4096
+ "current-page": e.currentPage,
4097
+ "max-displayed": 3,
4098
+ "current-route": e.$route,
4099
+ class: "files-pagination flex justify-center my-2"
4100
+ }, null, 8, [
4101
+ "pages",
4102
+ "current-page",
4103
+ "current-route"
4104
+ ])) : G("", !0);
4105
+ }
4106
+ var $u = /* @__PURE__ */ z(Zu, [["render", Qu]]), ed = H({
4107
+ name: "SearchBarFilter",
4108
+ props: { currentFolderAvailable: {
4109
+ type: Boolean,
4110
+ default: !1
4111
+ } },
4112
+ emits: ["update:modelValue"],
4113
+ setup(e, { emit: t }) {
4114
+ let { $gettext: n } = Q(), i = r("useScope"), a = R(), o = R(), s = K(() => n(a.value?.title)), c = K(() => [{
4115
+ id: g.currentFolder,
4116
+ title: n("Current folder"),
4117
+ enabled: e.currentFolderAvailable
4118
+ }, {
4119
+ id: g.allFiles,
4120
+ title: n("All files"),
4121
+ enabled: !0
4122
+ }]);
4123
+ return N(() => e.currentFolderAvailable, () => {
4124
+ if (L(i)) {
4125
+ if (L(i).toString() === "true") {
4126
+ a.value = L(c).find(({ id: e }) => e === g.currentFolder);
4127
+ return;
4128
+ }
4129
+ a.value = L(c).find(({ id: e }) => e === g.allFiles);
4130
+ return;
4131
+ }
4132
+ if (!e.currentFolderAvailable) {
4133
+ a.value = L(c).find(({ id: e }) => e === g.allFiles);
4134
+ return;
4135
+ }
4136
+ if (L(o)) {
4137
+ a.value = L(c).find(({ id: e }) => e === L(o).id);
4138
+ return;
4139
+ }
4140
+ a.value = L(c).find(({ id: e }) => e === g.allFiles);
4141
+ }, { immediate: !0 }), {
4142
+ currentSelection: a,
4143
+ currentSelectionTitle: s,
4144
+ onOptionSelected: (e) => {
4145
+ o.value = e, a.value = e, t("update:modelValue", { value: e });
4146
+ },
4147
+ locationOptions: c
4148
+ };
4149
+ }
4150
+ }), td = { key: 0 }, nd = {
4151
+ key: 0,
4152
+ class: "flex"
4153
+ };
4154
+ function rd(e, t, n, r, i, a) {
4155
+ let o = F("oc-icon"), s = F("oc-button"), c = F("oc-list"), l = F("oc-filter-chip");
4156
+ return Z(), X("div", {
4157
+ class: "z-[var(--z-index-modal)] absolute top-[50%] transform-[translateY(-50%)] right-0 ml-4 mb-4 mt-0 mr-[34px] float-right",
4158
+ "data-testid": "search-bar-filter",
4159
+ onClick: t[0] ||= J(() => {}, ["stop"])
4160
+ }, [e.currentSelection ? (Z(), X("div", td, [q(l, {
4161
+ "is-toggle": !1,
4162
+ "is-toggle-active": !1,
4163
+ "filter-label": e.$gettext("Location filter"),
4164
+ "selected-item-names": [e.currentSelectionTitle],
4165
+ class: "oc-search-bar-filter [&_button]:items-center [&_.oc-drop]:w-45",
4166
+ size: "small",
4167
+ "has-active-state": !1,
4168
+ raw: "",
4169
+ "close-on-click": ""
4170
+ }, {
4171
+ default: P(() => [q(c, null, {
4172
+ default: P(() => [(Z(!0), X(U, null, M(e.locationOptions, (t, n) => (Z(), X("li", { key: n }, [q(s, {
4173
+ appearance: t.id === e.currentSelection.id ? "filled" : "raw-inverse",
4174
+ "color-role": t.id === e.currentSelection.id ? "secondaryContainer" : "surface",
4175
+ "no-hover": t.id === e.currentSelection.id,
4176
+ size: "medium",
4177
+ class: "flex items-center w-full py-1 px-2",
4178
+ "justify-content": "space-between",
4179
+ disabled: !t.enabled,
4180
+ "data-test-id": t.id,
4181
+ onClick: (n) => e.onOptionSelected(t)
4182
+ }, {
4183
+ default: P(() => [Y("span", null, W(t.title), 1), t.id === e.currentSelection.id ? (Z(), X("div", nd, [q(o, { name: "check" })])) : G("", !0)]),
4184
+ _: 2
4185
+ }, 1032, [
4186
+ "appearance",
4187
+ "color-role",
4188
+ "no-hover",
4189
+ "disabled",
4190
+ "data-test-id",
4191
+ "onClick"
4192
+ ])]))), 128))]),
4193
+ _: 1
4194
+ })]),
4195
+ _: 1
4196
+ }, 8, ["filter-label", "selected-item-names"])])) : G("", !0)]);
4197
+ }
4198
+ var id = /* @__PURE__ */ z(ed, [["render", rd]]), ad = { key: 0 }, od = {
4199
+ key: 0,
4200
+ class: "version-check-loading flex items-center"
4201
+ }, sd = ["textContent"], cd = {
4202
+ key: 0,
4203
+ class: "version-check-no-updates flex items-center"
4204
+ }, ld = ["textContent"], ud = ["textContent"], dd = /* @__PURE__ */ H({
4205
+ __name: "VersionCheck",
4206
+ setup(e) {
4207
+ let { $gettext: t } = Q(), n = yi(), r = qn(), { setHasError: i } = r, a = n.capabilities.core["check-for-updates"], { updates: o, isLoading: s, hasError: c } = $(r), l = K(() => a && !L(c)), u = R(!1), d = R(), f = n.status.edition || "rolling", p = n.status.productversion.split("+")[0];
4208
+ return N(() => o, () => {
4209
+ if (L(o)) try {
4210
+ let e = L(o).channels[f].current_version;
4211
+ ue(e, p) > 0 && (u.value = !0, d.value = L(o).channels[f]);
4212
+ } catch (e) {
4213
+ console.error(e), i(!0);
4214
+ }
4215
+ }, {
4216
+ immediate: !0,
4217
+ deep: !0
4218
+ }), (e, n) => {
4219
+ let r = F("oc-spinner"), i = F("oc-icon"), a = F("oc-button");
4220
+ return l.value ? (Z(), X("div", ad, [L(s) ? (Z(), X("div", od, [Y("span", { textContent: W(L(t)("Checking for updates")) }, null, 8, sd), q(r, {
4221
+ class: "ml-1",
4222
+ size: "xsmall"
4223
+ })])) : (Z(), X(U, { key: 1 }, [u.value ? (Z(), V(a, {
4224
+ key: 1,
4225
+ class: "version-check-update text-role-on-surface-variant",
4226
+ size: "small",
4227
+ type: "a",
4228
+ href: d.value.url,
4229
+ target: "_blank",
4230
+ "gap-size": "small",
4231
+ appearance: "raw",
4232
+ "no-hover": ""
4233
+ }, {
4234
+ default: P(() => [Y("span", {
4235
+ class: "text-xs",
4236
+ textContent: W(L(t)("Version %{version} available", { version: d.value.current_version }))
4237
+ }, null, 8, ud), q(i, {
4238
+ name: "refresh",
4239
+ size: "xsmall",
4240
+ "fill-type": "line"
4241
+ })]),
4242
+ _: 1
4243
+ }, 8, ["href"])) : (Z(), X("div", cd, [Y("span", { textContent: W(L(t)("Up to date")) }, null, 8, ld), q(i, {
4244
+ class: "ml-0.5",
4245
+ name: "checkbox-circle",
4246
+ size: "xsmall",
4247
+ "fill-type": "line"
4248
+ })]))], 64))])) : G("", !0);
4249
+ };
4250
+ }
4251
+ }), fd = Ua.dirname;
4252
+ export { xe as AVATAR_UPLOAD_MAX_FILE_SIZE_MB, Ta as AccountCapabilitiesSchema, Xt as AccountSchema, oe as AccountsSchema, ql as AccountsSwitch, Ro as ActionMenuDropItem, Ao as ActionMenuItem, sn as ApiError, bs as AppBar, Wt as AppLoadingSpinner, en as AppProviderService, Es as AppTopBar, wc as AppWrapper, Tc as AppWrapperRoute, xt as ArchiverService, tt as Auth, Jc as AvatarUpload, No as BatchActions, na as Cache, c as ClientService, Hr as ClipboardActions, Pu as CompareSaveDialog, Ri as ConflictDialog, Ho as ContextActionMenu, Go as ContextActions, Ec as ContextMenuQuickAction, gr as CreateLinkModal, Lt as CreateShortcutModal, iu as CustomComponentTarget, Ml as DateFilter, rc as DatePickerModal, Mt as EmojiPickerModal, ht as EventBus, Zs as FileInfo, Na as FilePickerModal, Qs as FileSideBar, S as FolderLoaderFavorites, Bt as FolderLoaderSharedViaLink, ka as FolderLoaderSharedWithMe, Zn as FolderLoaderSharedWithOthers, Ca as FolderLoaderSpace, Ia as FolderLoaderTrashbin, Ln as FolderService, ma as FolderViewModeConstants, Jr as HttpClient, A as IdentitySchema, Ke as ImageDimension, Hi as ImageType, zu as ItemFilter, Il as ItemFilterInline, Hu as ItemFilterToggle, Lr as Key, _t as LimitsSchema, ia as LinkRoleDropdown, Ir as LoadingEventTopics, Ku as LoadingIndicator, kr as LoadingService, ri as MailCapabilitiesSchema, pn as MimeTypesToAppsSchema, ds as MobileNav, Ar as Modifier, Xu as NoContentMessage, $u as Pagination, Gt as PaginationConstants, lr as PasswordPolicyService, Ni as PreviewService, d as PrimaryAccountsSchema, Sr as ProcessorType, Ve as QuotaModal, Li as QuotaSelect, Be as RESOURCE_MAX_CHARACTER_LENGTH, On as RESOURCE_NAME_MAX_BYTES, Vr as RawConfigSchema, Xr as RawGroupwareConfigSchema, $t as ResolveStrategy, Ie as ResourceConflictModal, Pc as ResourceGhostElement, rn as ResourceIcon, Oe as ResourceLink, y as ResourceListItem, un as ResourceName, qa as ResourcePreview, Rc as ResourceSize, nl as ResourceTable, pl as ResourceTile, yl as ResourceTiles, Ce as ResourceTransfer, we as RuntimeError, _i as SaveAsModal, id as SearchBarFilter, g as SearchLocationFilterConstants, Hs as SideBar, Vs as SideBarPanels, it as SieveCapabilitiesSchema, Hn as SortConstants, hu as SpaceDetails, yu as SpaceDetailsMultiple, Er as SpaceImageModal, qs as SpaceInfo, wn as SpaceMoveInfoModal, Tu as SpaceNoSelection, Xl as SpaceQuota, Fu as TextEditor, Bn as ThemeConfig, fn as TransferType, lc as UnsavedChangesModal, rr as UppyService, Bc as UserAvatar, dd as VersionCheck, is as ViewOptions, _n as VisibilityObserver, ru as WebDavDetails, ya as WebThemeConfig, la as activeApp, Fr as authContextValues, nn as blobToArrayBuffer, Wn as breadcrumbsFromPath, ti as buildRoutes, nr as buildUrl, ct as cacheService, gn as canvasToBlob, t as cloneStateObject, ue as compareVersions, Di as concatBreadcrumbs, mn as contextQueryToFileContextProps, ve as contextRouteNameKey, We as contextRouteParamsKey, Bi as contextRouteQueryKey, si as convertToMinimalUppyFile, Nt as createDefaultFileIconMapping, oi as createFileRouteOptions, ua as createFolderDummyFile, st as createLocation, qr as createLocationCommon, Fa as createLocationPublic, x as createLocationShares, mt as createLocationSpaces, In as createLocationTrash, on as defaultFuseOptions, wo as defineWebApplication, Le as determineResourceTableSortFields, _e as determineResourceTilesSortFields, fd as dirname, Pt as encodePath, ei as eventBus, ou as extensionPoints, au as fileSideBarSpaceDetailsTableExtensionPoint, m as filterResources, jn as focusCheckbox, ga as folderService, Vi as formatDateFromDateTime, ze as formatDateFromHTTP, Dn as formatDateFromISO, xn as formatDateFromJSDate, Nn as formatDateFromRFC, Ge as formatFileSize, At as formatRelativeDateFromDateTime, i as formatRelativeDateFromHTTP, hr as formatRelativeDateFromISO, ra as formatRelativeDateFromJSDate, bi as formatRelativeDateFromRFC, Ze as getBackendVersion, re as getExtensionNavItems, Gi as getLocaleFromLanguage, be as getParentPaths, n as getSharedAncestorRoute, mr as getSharedDriveItem, Tr as getSpacesByType, Ka as getTextByteSize, It as getWebVersion, Je as isItemInCurrentFolder, l as isLocationActive, bt as isLocationActiveDirector, et as isLocationCommonActive, Xn as isLocationPublicActive, Sa as isLocationSharesActive, $r as isLocationSpacesActive, ha as isLocationTrashActive, De as isMacOs, v as isPromiseFulfilled, ln as isPromiseRejected, ge as isResourceBeeingMovedToSameLocation, Dt as isSameResource, Oa as locationPublicLink, zt as locationPublicUpload, Kt as locationSharesViaLink, j as locationSharesWithMe, E as locationSharesWithOthers, s as locationSpacesGeneric, Ye as objectKeys, je as parseVersion, Re as queryItemAsString, Ae as renameResource, He as resolveFileNameDuplicate, Ha as resourceIconMappingInjectionKey, En as routeToContextQuery, Ot as setCurrentUserShareSpacePermissions, Ue as sortFields, Ui as sortHelper, Fi as sortSpaceMembers, zi as translateSortFields, h as triggerDownloadWithFilename, _r as useAbility, yt as useActionsShowDetails, cr as useActiveApp, Mn as useActiveLocation, Or as useAppConfig, Yr as useAppDefaults, Te as useAppFileHandling, Ft as useAppFolderHandling, Xe as useAppMeta, bn as useAppNavigation, Kr as useAppProviderService, Xi as useAppsStore, ft as useArchiverService, cn as useAuthService, Ei as useAuthStore, Wi as useAvatarsStore, o as useBreadcrumbsFromPath, Da as useCanBeOpenedWithSecureView, or as useCanListShares, Yn as useCanListVersions, ea as useCanShare, yi as useCapabilityStore, tn as useClientService, pe as useClipboardStore, Un as useConfigStore, Ki as useCopyLink, ae as useCreateSpace, Pi as useCropperKeyboardActions, C as useDeleteWorker, de as useDocumentTitle, Zr as useDownloadFile, nt as useDriveResolver, li as useEmbedMode, Me as useEventBus, wt as useExtensionPreferencesStore, dt as useExtensionRegistry, Ji as useFileActionFallbackToDownload, La as useFileActions, _a as useFileActionsCopy, Cr as useFileActionsCopyPermanentLink, a as useFileActionsCreateLink, jt as useFileActionsCreateNewFile, Sn as useFileActionsCreateNewFolder, Qe as useFileActionsCreateNewShortcut, Pe as useFileActionsCreateSpaceFromResource, me as useFileActionsDelete, wi as useFileActionsDeleteResources, Tt as useFileActionsDisableSync, at as useFileActionsDownloadArchive, f as useFileActionsDownloadFile, ii as useFileActionsEmptyTrashBin, vt as useFileActionsEnableSync, ne as useFileActionsFavorite, se as useFileActionsMove, Zt as useFileActionsNavigate, T as useFileActionsOpenShortcut, ba as useFileActionsOpenWithApp, Ea as useFileActionsOpenWithDefault, Vn as useFileActionsPaste, Nr as useFileActionsRename, zr as useFileActionsRestore, Ii as useFileActionsSaveAs, pr as useFileActionsSetImage, pa as useFileActionsShowActions, ui as useFileActionsShowDetails, Ai as useFileActionsShowShares, Jn as useFileActionsToggleHideShare, Gr as useFileActionsUndoDelete, Qr as useFileListHeaderPosition, qi as useFileRouteReplace, Ba as useFolderLink, O as useGetMatchingSpace, Pa as useGetResourceContext, w as useGroupwareAccountsStore, Ut as useGroupwareConfigStore, mi as useInterceptModifierClick, sa as useIsAppActive, yr as useIsFilesAppActive, e as useIsResourceNameValid, Et as useIsSearchActive, pt as useIsTopBarSticky, Rn as useKeyboardActions, xi as useLinkTypes, ta as useLoadAvatars, ji as useLoadPreview, Jt as useLoadingService, fa as useLocalStorage, Ne as useMessages, Ma as useModals, te as useNavItems, ot as useOpenEmptyEditor, dn as useOpenWithDefaultApp, xa as usePagination, b as usePasswordPolicyService, Vt as usePasteWorker, Rt as usePreviewService, St as useRequest, wa as useRequestHeaders, br as useResourceContents, sr as useResourceIndicators, er as useResourceRouteResolver, ca as useResourceViewContextMenu, ai as useResourceViewDrag, Yi as useResourceViewHelpers, tr as useResourceViewSelection, fr as useResourcesStore, Aa as useRestoreWorker, xr as useRoute, oa as useRouteMeta, Ci as useRouteName, vr as useRouteParam, r as useRouteQuery, kt as useRouteQueryPersisted, Mi as useRouter, Pn as useScrollTo, Wa as useSearch, Ti as useSelectedResources, fi as useService, Mr as useSharesStore, ki as useSideBar, Br as useSort, ce as useSpaceActionsCreate, kn as useSpaceActionsDelete, ke as useSpaceActionsDeleteImage, vn as useSpaceActionsDisable, Cn as useSpaceActionsDuplicate, Fe as useSpaceActionsEditDescription, he as useSpaceActionsEditQuota, Qt as useSpaceActionsEditReadmeContent, Va as useSpaceActionsNavigateToTrash, Se as useSpaceActionsRename, an as useSpaceActionsRestore, qe as useSpaceActionsSetIcon, p as useSpaceActionsShowMembers, gt as useSpaceHelpers, lt as useSpacesLoading, gi as useSpacesStore, za as useThemeStore, Fn as useTileSize, Qn as useTokenTimerWorker, qn as useUpdatesStore, vi as useUpload, $n as useUserStore, di as useViewMode, Pr as useViewSize, Dr as useViewSizeMax, Wr as useWebWorkersStore, $e as useWindowOpen };