{"version":3,"file":"FilePicker-CtWlxGEm-BooJyQsu.chunk.mjs","sources":["../node_modules/@nextcloud/vue/dist/chunks/NcBreadcrumb-CiM9xAAS.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcBreadcrumbs-geMiBPkk.mjs","../node_modules/@nextcloud/dialogs/dist/chunks/preview-BIbJGxXF.mjs","../node_modules/@nextcloud/dialogs/dist/chunks/_plugin-vue_export-helper-1tPrXgE0.mjs","../node_modules/@nextcloud/sharing/dist/share/ShareType.js","../node_modules/@vueuse/core/node_modules/@vueuse/shared/index.mjs","../node_modules/@nextcloud/dialogs/dist/chunks/FilePicker-CtWlxGEm.mjs"],"sourcesContent":["import '../assets/NcBreadcrumb-CHjeSh0y.css';\nimport { createElementBlock, openBlock, mergeProps, createElementVNode, createCommentVNode, toDisplayString, resolveComponent, withModifiers, normalizeClass, createBlock, createVNode, createSlots, withCtx, renderSlot, createTextVNode } from \"vue\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nimport { N as NcButton } from \"./NcButton-ZNHdqKQl.mjs\";\nimport { c as createElementId } from \"./createElementId-DhjFt1I9.mjs\";\nimport { N as NcActions } from \"./NcActions-B0kM6AYb.mjs\";\nconst _sfc_main$1 = {\n name: \"ChevronRightIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$1 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3 = { d: \"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z\" };\nconst _hoisted_4 = { key: 0 };\nfunction _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon chevron-right-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2))\n ], 16, _hoisted_1$1);\n}\nconst ChevronRight = /* @__PURE__ */ _export_sfc(_sfc_main$1, [[\"render\", _sfc_render$1]]);\nconst _sfc_main = {\n name: \"NcBreadcrumb\",\n components: {\n NcActions,\n ChevronRight,\n NcButton\n },\n inheritAttrs: false,\n props: {\n /**\n * The main text content of the entry.\n */\n name: {\n type: String,\n required: true\n },\n /**\n * The title attribute of the element.\n */\n title: {\n type: String,\n default: null\n },\n /**\n * Route Location the link should navigate to when clicked on.\n *\n * @see https://v3.router.vuejs.org/api/#to\n */\n to: {\n type: [String, Object],\n default: void 0\n },\n /**\n * Set this prop if your app doesn't use vue-router, breadcrumbs will show as normal links.\n */\n href: {\n type: String,\n default: void 0\n },\n /**\n * Set a css icon-class to show an icon along name text (if forceIconText is provided, otherwise just icon).\n */\n icon: {\n type: String,\n default: \"\"\n },\n /**\n * Enables text to accompany the icon, if the icon was provided. The text that will be displayed is the name prop.\n */\n forceIconText: {\n type: Boolean,\n default: false\n },\n /**\n * Disable dropping on this breadcrumb.\n */\n disableDrop: {\n type: Boolean,\n default: false\n },\n /**\n * Force the actions to display in a three dot menu\n */\n forceMenu: {\n type: Boolean,\n default: false\n },\n /**\n * Open state of the Actions menu\n */\n open: {\n type: Boolean,\n default: false\n },\n /**\n * CSS class to apply to the root element.\n */\n class: {\n type: [String, Array, Object],\n default: \"\"\n }\n },\n emits: [\n \"dragenter\",\n \"dragleave\",\n \"dropped\",\n \"update:open\"\n ],\n setup() {\n const crumbId = createElementId();\n return {\n actionsContainer: `.vue-crumb[data-crumb-id=\"${crumbId}\"]`,\n crumbId\n };\n },\n data() {\n return {\n /**\n * Variable to track if we hover over the breadcrumb\n */\n hovering: false\n };\n },\n computed: {\n /**\n * The attributes to pass to `router-link` or `a`\n */\n linkAttributes() {\n if (this.to) {\n return { to: this.to, ...this.$attrs };\n } else if (this.href) {\n return { href: this.href, ...this.$attrs };\n }\n return this.$attrs;\n }\n },\n methods: {\n /**\n * Function to handle changing the open state of the Actions menu\n * $emit the open state.\n *\n * @param {boolean} open The open state of the Actions menu\n */\n onOpenChange(open) {\n this.$emit(\"update:open\", open);\n },\n /**\n * Function to handle a drop on the breadcrumb.\n * $emit the event and the path, remove the hovering state.\n *\n * @param {object} e The drop event\n * @return {boolean}\n */\n dropped(e) {\n if (this.disableDrop) {\n return false;\n }\n this.$emit(\"dropped\", e, this.to || this.href);\n this.$parent.$emit(\"dropped\", e, this.to || this.href);\n this.hovering = false;\n return false;\n },\n /**\n * Add the hovering state on drag enter\n *\n * @param {DragEvent} e The drag-enter event\n */\n dragEnter(e) {\n this.$emit(\"dragenter\", e);\n if (this.disableDrop) {\n return;\n }\n this.hovering = true;\n },\n /**\n * Remove the hovering state on drag leave\n *\n * @param {DragEvent} e The drag leave event\n */\n dragLeave(e) {\n this.$emit(\"dragleave\", e);\n if (this.disableDrop) {\n return;\n }\n if (e.target.contains(e.relatedTarget) || this.$refs.crumb.contains(e.relatedTarget)) {\n return;\n }\n this.hovering = false;\n }\n }\n};\nconst _hoisted_1 = [\"data-crumb-id\"];\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_NcButton = resolveComponent(\"NcButton\");\n const _component_NcActions = resolveComponent(\"NcActions\");\n const _component_ChevronRight = resolveComponent(\"ChevronRight\");\n return openBlock(), createElementBlock(\"li\", {\n ref: \"crumb\",\n class: normalizeClass([\"vue-crumb\", [{ \"vue-crumb--hovered\": $data.hovering }, _ctx.$props.class]]),\n \"data-crumb-id\": $setup.crumbId,\n draggable: \"false\",\n onDragstart: withModifiers(() => {\n }, [\"prevent\"]),\n onDrop: _cache[0] || (_cache[0] = withModifiers((...args) => $options.dropped && $options.dropped(...args), [\"prevent\"])),\n onDragover: withModifiers(() => {\n }, [\"prevent\"]),\n onDragenter: _cache[1] || (_cache[1] = (...args) => $options.dragEnter && $options.dragEnter(...args)),\n onDragleave: _cache[2] || (_cache[2] = (...args) => $options.dragLeave && $options.dragLeave(...args))\n }, [\n ($props.name || $props.icon || _ctx.$slots.icon) && !_ctx.$slots.default ? (openBlock(), createBlock(_component_NcButton, mergeProps({\n key: 0,\n \"aria-label\": $props.icon ? $props.name : void 0,\n variant: \"tertiary\"\n }, $options.linkAttributes), createSlots({ _: 2 }, [\n _ctx.$slots.icon || $props.icon ? {\n name: \"icon\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"icon\", {}, () => [\n createElementVNode(\"span\", {\n class: normalizeClass([$props.icon, \"icon\"])\n }, null, 2)\n ], true)\n ]),\n key: \"0\"\n } : void 0,\n !(_ctx.$slots.icon || $props.icon) || $props.forceIconText ? {\n name: \"default\",\n fn: withCtx(() => [\n createTextVNode(toDisplayString($props.name), 1)\n ]),\n key: \"1\"\n } : void 0\n ]), 1040, [\"aria-label\"])) : createCommentVNode(\"\", true),\n _ctx.$slots.default ? (openBlock(), createBlock(_component_NcActions, {\n key: 1,\n ref: \"actions\",\n container: $setup.actionsContainer,\n \"force-menu\": $props.forceMenu,\n \"force-name\": \"\",\n \"menu-name\": $props.name,\n open: $props.open,\n title: $props.title,\n variant: \"tertiary\",\n \"onUpdate:open\": $options.onOpenChange\n }, {\n icon: withCtx(() => [\n renderSlot(_ctx.$slots, \"menu-icon\", {}, void 0, true)\n ]),\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {}, void 0, true)\n ]),\n _: 3\n }, 8, [\"container\", \"force-menu\", \"menu-name\", \"open\", \"title\", \"onUpdate:open\"])) : createCommentVNode(\"\", true),\n createVNode(_component_ChevronRight, {\n class: \"vue-crumb__separator\",\n size: 20\n })\n ], 42, _hoisted_1);\n}\nconst NcBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render], [\"__scopeId\", \"data-v-28ef52a4\"]]);\nexport {\n NcBreadcrumb as N\n};\n//# sourceMappingURL=NcBreadcrumb-CiM9xAAS.mjs.map\n","import '../assets/NcBreadcrumbs-DYfGaSjT.css';\nimport { unsubscribe, subscribe } from \"@nextcloud/event-bus\";\nimport debounce from \"debounce\";\nimport { createElementBlock, openBlock, mergeProps, createElementVNode, createCommentVNode, toDisplayString, Fragment, cloneVNode, h } from \"vue\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nimport { N as NcActions, i as isSlotPopulated } from \"./NcActions-B0kM6AYb.mjs\";\nimport { N as NcActionButton } from \"./NcActionButton-DCWUru2b.mjs\";\nimport { N as NcActionLink } from \"./NcActionLink-afakPM_N.mjs\";\nimport { N as NcActionRouter } from \"./NcActionRouter-oT-YU_jf.mjs\";\nimport { N as NcBreadcrumb } from \"./NcBreadcrumb-CiM9xAAS.mjs\";\nconst _sfc_main$1 = {\n name: \"FolderIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3 = { d: \"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z\" };\nconst _hoisted_4 = { key: 0 };\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon folder-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2))\n ], 16, _hoisted_1);\n}\nconst IconFolder = /* @__PURE__ */ _export_sfc(_sfc_main$1, [[\"render\", _sfc_render]]);\nconst crumbClass = \"vue-crumb\";\nconst _sfc_main = {\n name: \"NcBreadcrumbs\",\n components: {\n NcActions,\n NcActionButton,\n NcActionRouter,\n NcActionLink,\n NcBreadcrumb,\n IconFolder\n },\n props: {\n /**\n * Set a css icon-class for the icon of the root breadcrumb to be used.\n */\n rootIcon: {\n type: String,\n default: \"icon-home\"\n },\n /**\n * Set the aria-label of the nav element.\n */\n ariaLabel: {\n type: String,\n default: null\n }\n },\n emits: [\"dropped\"],\n data() {\n return {\n /**\n * Array to track the hidden breadcrumbs by their index.\n * Comparing two crumbs somehow does not work, so we use the indices.\n */\n hiddenIndices: [],\n /**\n * This is the props of the middle Action menu\n * that show the ellipsised breadcrumbs\n */\n menuBreadcrumbProps: {\n // Don't show a name for this breadcrumb, only the Actions menu\n name: \"\",\n forceMenu: true,\n // Don't allow dropping directly on the actions breadcrumb\n disableDrop: true,\n // Is the menu open or not\n open: false\n },\n breadcrumbsRefs: []\n };\n },\n created() {\n window.addEventListener(\"resize\", debounce(() => {\n this.handleWindowResize();\n }, 100));\n subscribe(\"navigation-toggled\", this.delayedResize);\n },\n mounted() {\n this.handleWindowResize();\n },\n updated() {\n this.delayedResize();\n this.$nextTick(() => {\n this.hideCrumbs();\n });\n },\n beforeUnmount() {\n window.removeEventListener(\"resize\", this.handleWindowResize);\n unsubscribe(\"navigation-toggled\", this.delayedResize);\n },\n methods: {\n /**\n * Close the actions menu\n *\n * @param {object} e The event\n */\n closeActions(e) {\n if (this.$refs.actionsBreadcrumb.$el.contains(e.relatedTarget)) {\n return;\n }\n this.menuBreadcrumbProps.open = false;\n },\n /**\n * Call the resize function after a delay\n */\n async delayedResize() {\n await this.$nextTick();\n this.handleWindowResize();\n },\n /**\n * Check the width of the breadcrumb and hide breadcrumbs\n * if we overflow otherwise.\n */\n handleWindowResize() {\n if (!this.$refs.container) {\n return;\n }\n const nrCrumbs = this.breadcrumbsRefs.length;\n const hiddenIndices = [];\n const availableWidth = this.$refs.container.offsetWidth;\n let totalWidth = this.getTotalWidth();\n if (this.$refs.breadcrumb__actions) {\n totalWidth += this.$refs.breadcrumb__actions.offsetWidth;\n }\n let overflow = totalWidth - availableWidth;\n overflow += overflow > 0 ? 64 : 0;\n let i = 0;\n const startIndex = Math.floor(nrCrumbs / 2);\n while (overflow > 0 && i < nrCrumbs - 2) {\n const currentIndex = startIndex + (i % 2 ? i + 1 : i) / 2 * Math.pow(-1, i + nrCrumbs % 2);\n overflow -= this.getWidth(this.breadcrumbsRefs[currentIndex]?.$el, currentIndex === this.breadcrumbsRefs.length - 1);\n hiddenIndices.push(currentIndex);\n i++;\n }\n if (!this.arraysEqual(this.hiddenIndices, hiddenIndices.sort((a, b) => a - b))) {\n this.hiddenIndices = hiddenIndices;\n }\n },\n /**\n * Checks if two arrays are equal.\n * Only works for primitive arrays, but that's enough here.\n *\n * @param {Array} a The first array\n * @param {Array} b The second array\n * @return {boolean} Wether the arrays are equal\n */\n arraysEqual(a, b) {\n if (a.length !== b.length) {\n return false;\n } else if (a === b) {\n return true;\n } else if (a === null || b === null) {\n return false;\n }\n for (let i = 0; i < a.length; ++i) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n },\n /**\n * Calculates the total width of all breadcrumbs\n *\n * @return {number} The total width\n */\n getTotalWidth() {\n return this.breadcrumbsRefs.reduce((width, crumb, index) => width + this.getWidth(crumb.$el, index === this.breadcrumbsRefs.length - 1), 0);\n },\n /**\n * Calculates the width of the provided element\n *\n * @param {object} el The element\n * @param {boolean} isLast Is this the last crumb\n * @return {number} The width\n */\n getWidth(el, isLast) {\n if (!el?.classList) {\n return 0;\n }\n const hide = el.classList.contains(`${crumbClass}--hidden`);\n el.style.minWidth = \"auto\";\n if (isLast) {\n el.style.maxWidth = \"210px\";\n }\n el.classList.remove(`${crumbClass}--hidden`);\n const w = el.offsetWidth;\n if (hide) {\n el.classList.add(`${crumbClass}--hidden`);\n }\n el.style.minWidth = \"\";\n el.style.maxWidth = \"\";\n return w;\n },\n /**\n * Prevents the default of a provided event\n *\n * @param {object} e The event\n * @return {boolean}\n */\n preventDefault(e) {\n if (e.preventDefault) {\n e.preventDefault();\n }\n return false;\n },\n /**\n * Handles the drag start.\n * Prevents a breadcrumb from being draggable.\n *\n * @param {object} e The event\n * @return {boolean}\n */\n dragStart(e) {\n return this.preventDefault(e);\n },\n /**\n * Handles when something is dropped on the breadcrumb.\n *\n * @param {object} e The drop event\n * @param {string} path The path of the breadcrumb\n * @param {boolean} disabled Whether dropping is disabled for this breadcrumb\n * @return {boolean}\n */\n dropped(e, path, disabled) {\n if (!disabled) {\n this.$emit(\"dropped\", e, path);\n }\n this.menuBreadcrumbProps.open = false;\n const crumbs = document.querySelectorAll(`.${crumbClass}`);\n for (const crumb of crumbs) {\n crumb.classList.remove(`${crumbClass}--hovered`);\n }\n return this.preventDefault(e);\n },\n /**\n * Handles the drag over event\n *\n * @param {object} e The drag over event\n * @return {boolean}\n */\n dragOver(e) {\n return this.preventDefault(e);\n },\n /**\n * Handles the drag enter event\n *\n * @param {object} e The drag over event\n * @param {boolean} disabled Whether dropping is disabled for this breadcrumb\n */\n dragEnter(e, disabled) {\n if (disabled) {\n return;\n }\n if (e.target.closest) {\n const target = e.target.closest(`.${crumbClass}`);\n if (target.classList && target.classList.contains(crumbClass)) {\n const crumbs = document.querySelectorAll(`.${crumbClass}`);\n for (const crumb of crumbs) {\n crumb.classList.remove(`${crumbClass}--hovered`);\n }\n target.classList.add(`${crumbClass}--hovered`);\n }\n }\n },\n /**\n * Handles the drag leave event\n *\n * @param {object} e The drag leave event\n * @param {boolean} disabled Whether dropping is disabled for this breadcrumb\n */\n dragLeave(e, disabled) {\n if (disabled) {\n return;\n }\n if (e.target.contains(e.relatedTarget)) {\n return;\n }\n if (e.target.closest) {\n const target = e.target.closest(`.${crumbClass}`);\n if (target.contains(e.relatedTarget)) {\n return;\n }\n if (target.classList && target.classList.contains(crumbClass)) {\n target.classList.remove(`${crumbClass}--hovered`);\n }\n }\n },\n /**\n * Check for each crumb if we have to hide it and\n * add it to the array of all crumbs.\n */\n hideCrumbs() {\n this.breadcrumbsRefs.forEach((crumb, i) => {\n if (crumb?.$el?.classList) {\n if (this.hiddenIndices.includes(i)) {\n crumb.$el.classList.add(`${crumbClass}--hidden`);\n } else {\n crumb.$el.classList.remove(`${crumbClass}--hidden`);\n }\n }\n });\n },\n isBreadcrumb(vnode) {\n return vnode?.type?.name === \"NcBreadcrumb\";\n }\n },\n /**\n * The render function to display the component\n *\n * @return {object|undefined} The created VNode\n */\n render() {\n let breadcrumbs = [];\n this.$slots.default?.().forEach((vnode) => {\n if (this.isBreadcrumb(vnode)) {\n breadcrumbs.push(vnode);\n return;\n }\n if (vnode?.type === Fragment) {\n vnode?.children?.forEach?.((child) => {\n if (this.isBreadcrumb(child)) {\n breadcrumbs.push(child);\n }\n });\n }\n });\n if (breadcrumbs.length === 0) {\n return;\n }\n breadcrumbs[0] = cloneVNode(breadcrumbs[0], {\n icon: this.rootIcon,\n ref: \"breadcrumbs\"\n });\n const breadcrumbsRefs = [];\n breadcrumbs = breadcrumbs.map((crumb, index) => cloneVNode(crumb, {\n ref: (crumb2) => {\n breadcrumbsRefs[index] = crumb2;\n }\n }));\n const crumbs = [...breadcrumbs];\n if (this.hiddenIndices.length) {\n crumbs.splice(\n Math.round(breadcrumbs.length / 2),\n 0,\n // The Actions menu\n // Use a breadcrumb component for the hidden breadcrumbs\n // eslint-disable-line @stylistic/function-call-argument-newline\n h(NcBreadcrumb, {\n class: \"dropdown\",\n ...this.menuBreadcrumbProps,\n // Hide the dropdown menu from screen-readers,\n // since the crumbs in the menu are still in the list.\n \"aria-hidden\": true,\n // Add a ref to the Actions menu\n ref: \"actionsBreadcrumb\",\n key: \"actions-breadcrumb-1\",\n // Add handlers so the Actions menu opens on hover\n onDragenter: () => {\n this.menuBreadcrumbProps.open = true;\n },\n onDragleave: this.closeActions,\n // Make sure we keep the same open state\n // as the Actions component\n \"onUpdate:open\": (open) => {\n this.menuBreadcrumbProps.open = open;\n }\n // Add all hidden breadcrumbs as ActionRouter or ActionLink\n }, {\n default: () => this.hiddenIndices.filter((index) => index <= breadcrumbs.length - 1).map((index) => {\n const crumb = breadcrumbs[index];\n const {\n // Get the parameters from the breadcrumb component props\n to,\n href,\n disableDrop,\n name,\n // Props to forward\n ...propsToForward\n } = crumb.props;\n delete propsToForward.ref;\n let element = NcActionButton;\n let path = \"\";\n if (href) {\n element = NcActionLink;\n path = href;\n }\n if (to) {\n element = NcActionRouter;\n path = to;\n }\n const folderIcon = h(IconFolder, {\n size: 20\n });\n return h(element, {\n ...propsToForward,\n class: crumbClass,\n href: href || null,\n to: to || null,\n // Prevent the breadcrumbs from being draggable\n draggable: false,\n // Add the drag and drop handlers\n onDragstart: this.dragStart,\n onDrop: ($event) => this.dropped($event, path, disableDrop),\n onDragover: this.dragOver,\n onDragenter: ($event) => this.dragEnter($event, disableDrop),\n onDragleave: ($event) => this.dragLeave($event, disableDrop)\n }, {\n default: () => name,\n icon: () => folderIcon\n });\n })\n })\n );\n }\n const wrapper = [h(\"nav\", { \"aria-label\": this.ariaLabel }, [h(\"ul\", { class: \"breadcrumb__crumbs\" }, [crumbs])])];\n if (isSlotPopulated(this.$slots.actions?.())) {\n wrapper.push(h(\"div\", { class: \"breadcrumb__actions\", ref: \"breadcrumb__actions\" }, this.$slots.actions?.()));\n }\n this.breadcrumbsRefs = breadcrumbsRefs;\n return h(\"div\", { class: [\"breadcrumb\", { \"breadcrumb--collapsed\": this.hiddenIndices.length === breadcrumbs.length - 2 }], ref: \"container\" }, wrapper);\n }\n};\nconst NcBreadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__scopeId\", \"data-v-af2b1226\"]]);\nexport {\n NcBreadcrumbs as N\n};\n//# sourceMappingURL=NcBreadcrumbs-geMiBPkk.mjs.map\n","import { FileType } from \"@nextcloud/files\";\nimport { generateUrl } from \"@nextcloud/router\";\nimport { ref, watchEffect, toValue } from \"vue\";\nimport PQueue from \"p-queue\";\nconst queue = new PQueue({ concurrency: 5 });\nfunction preloadImage(url) {\n const { resolve, promise } = Promise.withResolvers();\n queue.add(() => {\n const image = new Image();\n image.onerror = () => resolve(false);\n image.onload = () => resolve(true);\n image.src = url;\n return promise;\n });\n return promise;\n}\nfunction getPreviewURL(node, options = {}) {\n options = { size: 32, cropPreview: false, mimeFallback: true, ...options };\n try {\n const previewUrl = node.attributes?.previewUrl || generateUrl(\"/core/preview?fileId={fileid}\", {\n fileid: node.fileid\n });\n let url;\n try {\n url = new URL(previewUrl);\n } catch {\n url = new URL(previewUrl, window.location.origin);\n }\n url.searchParams.set(\"x\", `${options.size}`);\n url.searchParams.set(\"y\", `${options.size}`);\n url.searchParams.set(\"mimeFallback\", `${options.mimeFallback}`);\n url.searchParams.set(\"a\", options.cropPreview === true ? \"0\" : \"1\");\n url.searchParams.set(\"c\", `${node.attributes.etag}`);\n return url;\n } catch {\n return null;\n }\n}\nfunction usePreviewURL(node, options) {\n const previewURL = ref(null);\n const previewLoaded = ref(false);\n watchEffect(() => {\n previewLoaded.value = false;\n previewURL.value = getPreviewURL(toValue(node), toValue(options || {}));\n if (previewURL.value && toValue(node).type === FileType.File) {\n preloadImage(previewURL.value.href).then((success) => {\n previewLoaded.value = success;\n });\n }\n });\n return {\n previewURL,\n previewLoaded\n };\n}\nexport {\n getPreviewURL as g,\n usePreviewURL as u\n};\n//# sourceMappingURL=preview-BIbJGxXF.mjs.map\n","const _export_sfc = (sfc, props) => {\n const target = sfc.__vccOpts || sfc;\n for (const [key, val] of props) {\n target[key] = val;\n }\n return target;\n};\nexport {\n _export_sfc as _\n};\n//# sourceMappingURL=_plugin-vue_export-helper-1tPrXgE0.mjs.map\n","/*!\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\nexport var ShareType;\n(function (ShareType) {\n ShareType[ShareType[\"User\"] = 0] = \"User\";\n ShareType[ShareType[\"Group\"] = 1] = \"Group\";\n ShareType[ShareType[\"Link\"] = 3] = \"Link\";\n ShareType[ShareType[\"Email\"] = 4] = \"Email\";\n ShareType[ShareType[\"Remote\"] = 6] = \"Remote\";\n /**\n * Was called `Circle` before Nextcloud 29\n */\n ShareType[ShareType[\"Team\"] = 7] = \"Team\";\n ShareType[ShareType[\"Guest\"] = 8] = \"Guest\";\n ShareType[ShareType[\"RemoteGroup\"] = 9] = \"RemoteGroup\";\n ShareType[ShareType[\"Room\"] = 10] = \"Room\";\n ShareType[ShareType[\"Deck\"] = 12] = \"Deck\";\n /**\n * @since 26.0.0\n */\n ShareType[ShareType[\"FederatedGroup\"] = 14] = \"FederatedGroup\";\n /**\n * Third party share types\n *\n * @since 25.0.0\n */\n ShareType[ShareType[\"ScienceMesh\"] = 15] = \"ScienceMesh\";\n})(ShareType || (ShareType = {}));\n","import { shallowRef, watchEffect, readonly, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, hasInjectionContext, inject, provide, ref, isRef, unref, toValue as toValue$1, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, shallowReadonly, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue';\n\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, {\n ...options,\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n });\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn, options = {}) {\n let v = void 0;\n let track;\n let trigger;\n let dirty = true;\n const update = () => {\n dirty = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\", ...options });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty) {\n v = get(v);\n dirty = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const clear = () => {\n fns.clear();\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (...args) => {\n return Promise.all(Array.from(fns).map((fn) => fn(...args)));\n };\n return {\n on,\n off,\n trigger,\n clear\n };\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst injectLocal = /* @__NO_SIDE_EFFECTS__ */ (...args) => {\n var _a;\n const key = args[0];\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null && !hasInjectionContext())\n throw new Error(\"injectLocal must be called in setup\");\n if (instance && localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n return localProvidedStateMap.get(instance)[key];\n return inject(...args);\n};\n\nfunction provideLocal(key, value) {\n var _a;\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"provideLocal must be called in setup\");\n if (!localProvidedStateMap.has(instance))\n localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n const localProvidedState = localProvidedStateMap.get(instance);\n localProvidedState[key] = value;\n return provide(key, value);\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction createInjectionState(composable, options) {\n const key = (options == null ? void 0 : options.injectionKey) || Symbol(composable.name || \"InjectionState\");\n const defaultValue = options == null ? void 0 : options.defaultValue;\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provideLocal(key, state);\n return state;\n };\n const useInjectedState = () => injectLocal(key, defaultValue);\n return [useProvidingState, useInjectedState];\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction createRef(value, deep) {\n if (deep === true) {\n return ref(value);\n } else {\n return shallowRef(value);\n }\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!scope) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = { ...obj };\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue$1;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(\n keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n })\n );\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue$1(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isWorker = typeof WorkerGlobalScope !== \"undefined\" && globalThis instanceof WorkerGlobalScope;\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n var _a, _b;\n return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));\n}\n\nfunction toRef(...args) {\n if (args.length !== 1)\n return toRef$1(...args);\n const r = args[0];\n return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue$1(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = toValue$1(defaultValue);\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = toValue$1(defaultValue);\n trigger();\n }, toValue$1(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n let lastInvoker;\n const filter = (invoke) => {\n const duration = toValue$1(ms);\n const maxDuration = toValue$1(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = void 0;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n lastInvoker = invoke;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = void 0;\n resolve(lastInvoker());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = void 0;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(...args) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n let ms;\n let trailing;\n let leading;\n let rejectOnCancel;\n if (!isRef(args[0]) && typeof args[0] === \"object\")\n ({ delay: ms, trailing = true, leading = true, rejectOnCancel = false } = args[0]);\n else\n [ms, trailing = true, leading = true, rejectOnCancel = false] = args;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = toValue$1(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter, options = {}) {\n const {\n initialState = \"active\"\n } = options;\n const isActive = toRef(initialState === \"active\");\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?\\d+\\.?\\d*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = Number.parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction pxValue(px) {\n return px.endsWith(\"rem\") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n return (!omitUndefined || value !== void 0) && !keys.includes(key);\n }));\n}\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\nfunction toArray(value) {\n return Array.isArray(value) ? value : [value];\n}\n\nfunction cacheStringFunction(fn) {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction getLifeCycleTarget(target) {\n return target || getCurrentInstance();\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(\n debounceFilter(ms, options),\n fn\n );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(toValue$1(value));\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return shallowReadonly(debounced);\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(\n throttleFilter(ms, trailing, leading, rejectOnCancel),\n fn\n );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(toValue$1(value));\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(\n ref,\n {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n },\n { enumerable: true }\n );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n const [target, key, value] = args;\n target[key] = value;\n }\n}\n\nfunction watchWithFilter(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n return watch(\n source,\n createFilterWrapper(\n eventFilter,\n cb\n ),\n watchOptions\n );\n}\n\nfunction watchPausable(source, cb, options = {}) {\n const {\n eventFilter: filter,\n initialState = \"active\",\n ...watchOptions\n } = options;\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter, { initialState });\n const stop = watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter\n }\n );\n return { stop, pause, resume, isActive };\n}\n\nfunction syncRef(left, right, ...[options]) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options || {};\n const watchers = [];\n const transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n const transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n if (direction === \"both\" || direction === \"ltr\") {\n watchers.push(watchPausable(\n left,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n right.value = transformLTR(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchers.push(watchPausable(\n right,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n left.value = transformRTL(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n const stop = () => {\n watchers.forEach((w) => w.stop());\n };\n return stop;\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n const targetsArray = toArray(targets);\n return watch(\n source,\n (newValue) => targetsArray.forEach((target) => target.value = newValue),\n { flush, deep, immediate }\n );\n}\n\nfunction toRefs(objectRef, options = {}) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n var _a;\n const replaceRef = (_a = toValue$1(options.replaceRef)) != null ? _a : true;\n if (replaceRef) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = { ...objectRef.value, [key]: v };\n Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n objectRef.value = newObject;\n }\n } else {\n objectRef.value[key] = v;\n }\n }\n }));\n }\n return result;\n}\n\nconst toValue = toValue$1;\nconst resolveUnref = toValue$1;\n\nfunction tryOnBeforeMount(fn, sync = true, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeMount(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeUnmount(fn, target);\n}\n\nfunction tryOnMounted(fn, sync = true, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onMounted(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onUnmounted(fn, target);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n r,\n (v) => {\n if (condition(v) !== isNot) {\n if (stop)\n stop();\n else\n nextTick(() => stop == null ? void 0 : stop());\n resolve(v);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue$1(r)).finally(() => stop == null ? void 0 : stop())\n );\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n [r, value],\n ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n if (stop)\n stop();\n else\n nextTick(() => stop == null ? void 0 : stop());\n resolve(v1);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue$1(r)).finally(() => {\n stop == null ? void 0 : stop();\n return toValue$1(r);\n })\n );\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(toValue$1(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(toValue$1(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n return value === othVal;\n}\n// @__NO_SIDE_EFFECTS__\nfunction useArrayDifference(...args) {\n var _a, _b;\n const list = args[0];\n const values = args[1];\n let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n const {\n symmetric = false\n } = (_b = args[3]) != null ? _b : {};\n if (typeof compareFn === \"string\") {\n const key = compareFn;\n compareFn = (value, othVal) => value[key] === othVal[key];\n }\n const diff1 = computed(() => toValue$1(list).filter((x) => toValue$1(values).findIndex((y) => compareFn(x, y)) === -1));\n if (symmetric) {\n const diff2 = computed(() => toValue$1(values).filter((x) => toValue$1(list).findIndex((y) => compareFn(x, y)) === -1));\n return computed(() => symmetric ? [...toValue$1(diff1), ...toValue$1(diff2)] : toValue$1(diff1));\n } else {\n return diff1;\n }\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction useArrayEvery(list, fn) {\n return computed(() => toValue$1(list).every((element, index, array) => fn(toValue$1(element), index, array)));\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction useArrayFilter(list, fn) {\n return computed(() => toValue$1(list).map((i) => toValue$1(i)).filter(fn));\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction useArrayFind(list, fn) {\n return computed(() => toValue$1(\n toValue$1(list).find((element, index, array) => fn(toValue$1(element), index, array))\n ));\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction useArrayFindIndex(list, fn) {\n return computed(() => toValue$1(list).findIndex((element, index, array) => fn(toValue$1(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\n// @__NO_SIDE_EFFECTS__\nfunction useArrayFindLast(list, fn) {\n return computed(() => toValue$1(\n !Array.prototype.findLast ? findLast(toValue$1(list), (element, index, array) => fn(toValue$1(element), index, array)) : toValue$1(list).findLast((element, index, array) => fn(toValue$1(element), index, array))\n ));\n}\n\nfunction isArrayIncludesOptions(obj) {\n return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\n// @__NO_SIDE_EFFECTS__\nfunction useArrayIncludes(...args) {\n var _a;\n const list = args[0];\n const value = args[1];\n let comparator = args[2];\n let formIndex = 0;\n if (isArrayIncludesOptions(comparator)) {\n formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n comparator = comparator.comparator;\n }\n if (typeof comparator === \"string\") {\n const key = comparator;\n comparator = (element, value2) => element[key] === toValue$1(value2);\n }\n comparator = comparator != null ? comparator : (element, value2) => element === toValue$1(value2);\n return computed(() => toValue$1(list).slice(formIndex).some((element, index, array) => comparator(\n toValue$1(element),\n toValue$1(value),\n index,\n toValue$1(array)\n )));\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction useArrayJoin(list, separator) {\n return computed(() => toValue$1(list).map((i) => toValue$1(i)).join(toValue$1(separator)));\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction useArrayMap(list, fn) {\n return computed(() => toValue$1(list).map((i) => toValue$1(i)).map(fn));\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(toValue$1(sum), toValue$1(value), index);\n return computed(() => {\n const resolved = toValue$1(list);\n return args.length ? resolved.reduce(reduceCallback, typeof args[0] === \"function\" ? toValue$1(args[0]()) : toValue$1(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction useArraySome(list, fn) {\n return computed(() => toValue$1(list).some((element, index, array) => fn(toValue$1(element), index, array)));\n}\n\nfunction uniq(array) {\n return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n return array.reduce((acc, v) => {\n if (!acc.some((x) => fn(v, x, array)))\n acc.push(v);\n return acc;\n }, []);\n}\n// @__NO_SIDE_EFFECTS__\nfunction useArrayUnique(list, compareFn) {\n return computed(() => {\n const resolvedList = toValue$1(list).map((element) => toValue$1(element));\n return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n let _initialValue = unref(initialValue);\n const count = shallowRef(initialValue);\n const {\n max = Number.POSITIVE_INFINITY,\n min = Number.NEGATIVE_INFINITY\n } = options;\n const inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min);\n const dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = _initialValue) => {\n _initialValue = val;\n return set(val);\n };\n return { count: shallowReadonly(count), inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[T\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/i;\nconst REGEX_FORMAT = /[YMDHhms]o|\\[([^\\]]+)\\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|z{1,4}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n const suffixes = [\"th\", \"st\", \"nd\", \"rd\"];\n const v = num % 100;\n return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const stripTimeZone = (dateString) => {\n var _a2;\n return (_a2 = dateString.split(\" \")[1]) != null ? _a2 : \"\";\n };\n const matches = {\n Yo: () => formatOrdinal(years),\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n Mo: () => formatOrdinal(month + 1),\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(toValue$1(options.locales), { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(toValue$1(options.locales), { month: \"long\" }),\n D: () => String(days),\n Do: () => formatOrdinal(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n Ho: () => formatOrdinal(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n ho: () => formatOrdinal(hours % 12 || 12),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mo: () => formatOrdinal(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n so: () => formatOrdinal(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(toValue$1(options.locales), { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(toValue$1(options.locales), { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(toValue$1(options.locales), { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true),\n z: () => stripTimeZone(date.toLocaleDateString(toValue$1(options.locales), { timeZoneName: \"shortOffset\" })),\n zz: () => stripTimeZone(date.toLocaleDateString(toValue$1(options.locales), { timeZoneName: \"shortOffset\" })),\n zzz: () => stripTimeZone(date.toLocaleDateString(toValue$1(options.locales), { timeZoneName: \"shortOffset\" })),\n zzzz: () => stripTimeZone(date.toLocaleDateString(toValue$1(options.locales), { timeZoneName: \"longOffset\" }))\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n var _a2, _b;\n return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n });\n}\nfunction normalizeDate(date) {\n if (date === null)\n return new Date(Number.NaN);\n if (date === void 0)\n return /* @__PURE__ */ new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n}\n// @__NO_SIDE_EFFECTS__\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(toValue$1(date)), toValue$1(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = shallowRef(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = toValue$1(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n if (isActive.value)\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || typeof interval === \"function\") {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive: shallowReadonly(isActive),\n pause,\n resume\n };\n}\n\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = shallowRef(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(\n callback ? () => {\n update();\n callback(counter.value);\n } : update,\n interval,\n { immediate }\n );\n if (exposeControls) {\n return {\n counter: shallowReadonly(counter),\n reset,\n ...controls\n };\n } else {\n return shallowReadonly(counter);\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = shallowRef((_a = options.initialValue) != null ? _a : null);\n watch(\n source,\n () => ms.value = timestamp(),\n options\n );\n return shallowReadonly(ms);\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n const isPending = shallowRef(false);\n let timer;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n if (immediateCallback)\n cb();\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = void 0;\n cb(...args);\n }, toValue$1(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: shallowReadonly(isPending),\n start,\n stop\n };\n}\n\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(\n callback != null ? callback : noop,\n interval,\n options\n );\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return {\n ready,\n ...controls\n };\n } else {\n return ready;\n }\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = toValue$1(value);\n if (typeof method === \"function\")\n resolved = method(resolved);\n else if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && Number.isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction useToString(value) {\n return computed(() => `${toValue$1(value)}`);\n}\n\n// @__NO_SIDE_EFFECTS__\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = shallowRef(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = toValue$1(truthyValue);\n _value.value = _value.value === truthy ? toValue$1(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [...typeof source === \"function\" ? source() : Array.isArray(source) ? source : toValue$1(source)];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = Array.from({ length: oldList.length });\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nfunction watchAtMost(source, cb, options) {\n const {\n count,\n ...watchOptions\n } = options;\n const current = shallowRef(0);\n const stop = watchWithFilter(\n source,\n (...args) => {\n current.value += 1;\n if (current.value >= toValue$1(count))\n nextTick(() => stop());\n cb(...args);\n },\n watchOptions\n );\n return { count: current, stop };\n}\n\nfunction watchDebounced(source, cb, options = {}) {\n const {\n debounce = 0,\n maxWait = void 0,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: debounceFilter(debounce, { maxWait })\n }\n );\n}\n\nfunction watchDeep(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n deep: true\n }\n );\n}\n\nfunction watchIgnorable(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n const filteredCb = createFilterWrapper(\n eventFilter,\n cb\n );\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n let ignore = false;\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore = true;\n updater();\n ignore = false;\n };\n stop = watch(\n source,\n (...args) => {\n if (!ignore)\n filteredCb(...args);\n },\n watchOptions\n );\n } else {\n const disposables = [];\n let ignoreCounter = 0;\n let syncCounter = 0;\n ignorePrevAsyncUpdates = () => {\n ignoreCounter = syncCounter;\n };\n disposables.push(\n watch(\n source,\n () => {\n syncCounter++;\n },\n { ...watchOptions, flush: \"sync\" }\n )\n );\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter;\n updater();\n ignoreCounter += syncCounter - syncCounterPrev;\n };\n disposables.push(\n watch(\n source,\n (...args) => {\n const ignore = ignoreCounter > 0 && ignoreCounter === syncCounter;\n ignoreCounter = 0;\n syncCounter = 0;\n if (ignore)\n return;\n filteredCb(...args);\n },\n watchOptions\n )\n );\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchImmediate(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n immediate: true\n }\n );\n}\n\nfunction watchOnce(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n once: true\n }\n );\n}\n\nfunction watchThrottled(source, cb, options = {}) {\n const {\n throttle = 0,\n trailing = true,\n leading = true,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: throttleFilter(throttle, trailing, leading)\n }\n );\n}\n\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return {\n ...res,\n trigger\n };\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => toValue$1(item));\n return toValue$1(sources);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n const stop = watch(\n source,\n (v, ov, onInvalidate) => {\n if (v) {\n if (options == null ? void 0 : options.once)\n nextTick(() => stop());\n cb(v, ov, onInvalidate);\n }\n },\n {\n ...options,\n once: false\n }\n );\n return stop;\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createRef, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, pxValue, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toArray, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { createElementBlock, openBlock, mergeProps, createElementVNode, createCommentVNode, toDisplayString, defineComponent, ref, computed, toRef, normalizeClass, normalizeStyle, unref, Fragment, createBlock, createVNode, toHandlers, withModifiers, onMounted, mergeModels, useModel, nextTick, onUnmounted, withCtx, createTextVNode, renderList, useTemplateRef, createSlots, shallowRef, watch } from \"vue\";\nimport { emit } from \"@nextcloud/event-bus\";\nimport NcDialog from \"@nextcloud/vue/components/NcDialog\";\nimport NcEmptyContent from \"@nextcloud/vue/components/NcEmptyContent\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nimport { FileType, Permission, formatFileSize, sortNodes, davGetRecentSearch, davResultToNode, davRootPath, davGetDefaultPropfind, davGetClient, getFavoriteNodes } from \"@nextcloud/files\";\nimport NcButton from \"@nextcloud/vue/components/NcButton\";\nimport NcCheckboxRadioSwitch from \"@nextcloud/vue/components/NcCheckboxRadioSwitch\";\nimport NcDateTime from \"@nextcloud/vue/components/NcDateTime\";\nimport { mdiLock, mdiTag, mdiLink, mdiAccountPlus, mdiGroup, mdiNetwork, mdiFolder, mdiClock, mdiStar } from \"@mdi/js\";\nimport { ShareType } from \"@nextcloud/sharing\";\nimport NcIconSvgWrapper from \"@nextcloud/vue/components/NcIconSvgWrapper\";\nimport { u as usePreviewURL } from \"./preview-BIbJGxXF.mjs\";\nimport { t, l as logger, s as showError } from \"./index-hZPKu-D6.mjs\";\nimport axios from \"@nextcloud/axios\";\nimport { loadState } from \"@nextcloud/initial-state\";\nimport { generateUrl } from \"@nextcloud/router\";\nimport { isPublicShare } from \"@nextcloud/sharing/public\";\nimport { toValue } from \"@vueuse/core\";\nimport NcActionInput from \"@nextcloud/vue/components/NcActionInput\";\nimport NcActions from \"@nextcloud/vue/components/NcActions\";\nimport NcBreadcrumb from \"@nextcloud/vue/components/NcBreadcrumb\";\nimport NcBreadcrumbs from \"@nextcloud/vue/components/NcBreadcrumbs\";\nimport { getCurrentUser } from \"@nextcloud/auth\";\nimport NcSelect from \"@nextcloud/vue/components/NcSelect\";\nimport NcTextField from \"@nextcloud/vue/components/NcTextField\";\nimport { joinPaths } from \"@nextcloud/paths\";\nimport { CancelablePromise } from \"cancelable-promise\";\nconst _sfc_main$e = {\n name: \"FileIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$c = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$b = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$a = { d: \"M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z\" };\nconst _hoisted_4$a = { key: 0 };\nfunction _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon file-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$a, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$a, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$b))\n ], 16, _hoisted_1$c);\n}\nconst IconFile = /* @__PURE__ */ _export_sfc(_sfc_main$e, [[\"render\", _sfc_render$7]]);\nconst _sfc_main$d = {\n name: \"MenuDownIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$b = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$a = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$9 = { d: \"M7,10L12,15L17,10H7Z\" };\nconst _hoisted_4$9 = { key: 0 };\nfunction _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon menu-down-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$9, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$9, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$a))\n ], 16, _hoisted_1$b);\n}\nconst IconSortDescending = /* @__PURE__ */ _export_sfc(_sfc_main$d, [[\"render\", _sfc_render$6]]);\nconst _sfc_main$c = {\n name: \"MenuUpIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$a = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$9 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$8 = { d: \"M7,15L12,10L17,15H7Z\" };\nconst _hoisted_4$8 = { key: 0 };\nfunction _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon menu-up-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$8, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$8, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$9))\n ], 16, _hoisted_1$a);\n}\nconst IconSortAscending = /* @__PURE__ */ _export_sfc(_sfc_main$c, [[\"render\", _sfc_render$5]]);\nconst _sfc_main$b = {\n name: \"FolderIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$9 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$8 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$7 = { d: \"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z\" };\nconst _hoisted_4$7 = { key: 0 };\nfunction _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon folder-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$7, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$7, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$8))\n ], 16, _hoisted_1$9);\n}\nconst IconFolder = /* @__PURE__ */ _export_sfc(_sfc_main$b, [[\"render\", _sfc_render$4]]);\nconst fileListIconStyles = {\n \"file-picker__file-icon\": \"_file-picker__file-icon_3v9zx_9\",\n \"file-picker__file-icon--primary\": \"_file-picker__file-icon--primary_3v9zx_21\",\n \"file-picker__file-icon-overlay\": \"_file-picker__file-icon-overlay_3v9zx_25\"\n};\nconst _sfc_main$a = /* @__PURE__ */ defineComponent({\n __name: \"FilePreview\",\n props: {\n node: {},\n cropImagePreviews: { type: Boolean }\n },\n setup(__props) {\n const props = __props;\n const fileListIconStyles$1 = ref(fileListIconStyles);\n const {\n previewURL,\n previewLoaded\n } = usePreviewURL(toRef(props, \"node\"), computed(() => ({ cropPreview: props.cropImagePreviews })));\n const isFile = computed(() => props.node.type === FileType.File);\n const folderDecorationIcon = computed(() => {\n if (props.node.type !== FileType.Folder) {\n return null;\n }\n if (props.node.attributes?.[\"is-encrypted\"] === 1) {\n return mdiLock;\n }\n if (props.node.attributes?.[\"is-tag\"]) {\n return mdiTag;\n }\n const shareTypes = Object.values(props.node.attributes?.[\"share-types\"] || {}).flat();\n if (shareTypes.some((type) => type === ShareType.Link || type === ShareType.Email)) {\n return mdiLink;\n }\n if (shareTypes.length > 0) {\n return mdiAccountPlus;\n }\n switch (props.node.attributes?.[\"mount-type\"]) {\n case \"external\":\n case \"external-session\":\n return mdiNetwork;\n case \"group\":\n return mdiGroup;\n case \"shared\":\n return mdiAccountPlus;\n }\n return null;\n });\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n style: normalizeStyle(unref(previewLoaded) ? { backgroundImage: `url(${unref(previewURL)})` } : void 0),\n class: normalizeClass(fileListIconStyles$1.value[\"file-picker__file-icon\"])\n }, [\n !unref(previewLoaded) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [\n isFile.value ? (openBlock(), createBlock(IconFile, {\n key: 0,\n size: 32\n })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [\n folderDecorationIcon.value ? (openBlock(), createBlock(unref(NcIconSvgWrapper), {\n key: 0,\n class: normalizeClass(fileListIconStyles$1.value[\"file-picker__file-icon-overlay\"]),\n inline: \"\",\n path: folderDecorationIcon.value,\n size: 16\n }, null, 8, [\"class\", \"path\"])) : createCommentVNode(\"\", true),\n createVNode(IconFolder, {\n class: normalizeClass(fileListIconStyles$1.value[\"file-picker__file-icon--primary\"]),\n size: 32\n }, null, 8, [\"class\"])\n ], 64))\n ], 64)) : createCommentVNode(\"\", true)\n ], 6);\n };\n }\n});\nconst _hoisted_1$8 = [\"tabindex\", \"aria-selected\", \"data-filename\"];\nconst _hoisted_2$7 = { class: \"row-name\" };\nconst _hoisted_3$6 = {\n class: \"file-picker__name-container\",\n \"data-testid\": \"row-name\"\n};\nconst _hoisted_4$6 = [\"title\", \"textContent\"];\nconst _hoisted_5$1 = [\"textContent\"];\nconst _hoisted_6$1 = { class: \"row-size\" };\nconst _hoisted_7$1 = { class: \"row-modified\" };\nconst _sfc_main$9 = /* @__PURE__ */ defineComponent({\n __name: \"FileListRow\",\n props: {\n allowPickDirectory: { type: Boolean },\n selected: { type: Boolean },\n showCheckbox: { type: Boolean },\n canPick: { type: Boolean },\n node: {},\n cropImagePreviews: { type: Boolean }\n },\n emits: [\"update:selected\", \"enterDirectory\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emit2 = __emit;\n const timestamp = computed(() => props.node.mtime ?? 0);\n const displayName = computed(() => props.node.attributes?.displayName || props.node.basename.slice(0, props.node.extension ? -props.node.extension.length : void 0));\n const fileExtension = computed(() => props.node.extension);\n const isDirectory = computed(() => props.node.type === FileType.Folder);\n const isPickable = computed(() => props.canPick && (props.allowPickDirectory || !isDirectory.value));\n const isNavigatable = computed(() => (props.node.permissions & Permission.READ) === Permission.READ);\n function toggleSelected() {\n if (!isPickable.value) {\n return;\n }\n emit2(\"update:selected\", !props.selected);\n }\n function handleClick() {\n if (isDirectory.value) {\n if (isNavigatable.value) {\n emit2(\"enterDirectory\", props.node);\n }\n } else {\n toggleSelected();\n }\n }\n function handleKeyDown(event) {\n if (event.key === \"Enter\") {\n handleClick();\n }\n }\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"tr\", mergeProps({\n tabindex: __props.showCheckbox && !isDirectory.value ? void 0 : 0,\n \"aria-selected\": !isPickable.value ? void 0 : __props.selected,\n class: [\"file-picker__row\", [\n {\n \"file-picker__row--selected\": __props.selected && !__props.showCheckbox,\n \"file-picker__row--not-navigatable\": isDirectory.value && !isNavigatable.value,\n \"file-picker__row--not-pickable\": !isPickable.value\n }\n ]],\n \"data-filename\": __props.node.basename,\n \"data-testid\": \"file-list-row\"\n }, toHandlers({\n click: handleClick,\n /* same as tabindex -> if we hide the checkbox or this is a directory we need keyboard access to enter the directory or select the node */\n ...!__props.showCheckbox || isDirectory.value ? { keydown: handleKeyDown } : {}\n }, true)), [\n __props.showCheckbox ? (openBlock(), createElementBlock(\"td\", {\n key: 0,\n class: \"row-checkbox\",\n onClick: withModifiers(() => {\n }, [\"stop\"])\n }, [\n createVNode(unref(NcCheckboxRadioSwitch), {\n \"aria-label\": unref(t)(\"Select the row for {nodename}\", { nodename: displayName.value }),\n disabled: !isPickable.value,\n \"data-testid\": \"row-checkbox\",\n \"model-value\": __props.selected,\n \"onUpdate:modelValue\": toggleSelected\n }, null, 8, [\"aria-label\", \"disabled\", \"model-value\"])\n ])) : createCommentVNode(\"\", true),\n createElementVNode(\"td\", _hoisted_2$7, [\n createElementVNode(\"div\", _hoisted_3$6, [\n createVNode(_sfc_main$a, {\n node: __props.node,\n \"crop-image-previews\": __props.cropImagePreviews\n }, null, 8, [\"node\", \"crop-image-previews\"]),\n createElementVNode(\"div\", {\n class: \"file-picker__file-name\",\n title: displayName.value,\n textContent: toDisplayString(displayName.value)\n }, null, 8, _hoisted_4$6),\n createElementVNode(\"div\", {\n class: \"file-picker__file-extension\",\n textContent: toDisplayString(fileExtension.value)\n }, null, 8, _hoisted_5$1)\n ])\n ]),\n createElementVNode(\"td\", _hoisted_6$1, toDisplayString(unref(formatFileSize)(__props.node.size || 0)), 1),\n createElementVNode(\"td\", _hoisted_7$1, [\n createVNode(unref(NcDateTime), {\n timestamp: timestamp.value,\n \"ignore-seconds\": \"\"\n }, null, 8, [\"timestamp\"])\n ])\n ], 16, _hoisted_1$8);\n };\n }\n});\nconst FileListRow = /* @__PURE__ */ _export_sfc(_sfc_main$9, [[\"__scopeId\", \"data-v-a5daea8d\"]]);\nconst _hoisted_1$7 = {\n \"aria-hidden\": \"true\",\n class: \"file-picker__row loading-row\"\n};\nconst _hoisted_2$6 = {\n key: 0,\n class: \"row-checkbox\"\n};\nconst _hoisted_3$5 = { class: \"row-name\" };\nconst _hoisted_4$5 = { class: \"row-wrapper\" };\nconst _sfc_main$8 = /* @__PURE__ */ defineComponent({\n __name: \"LoadingTableRow\",\n props: {\n showCheckbox: { type: Boolean }\n },\n setup(__props) {\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"tr\", _hoisted_1$7, [\n __props.showCheckbox ? (openBlock(), createElementBlock(\"td\", _hoisted_2$6, [..._cache[0] || (_cache[0] = [\n createElementVNode(\"span\", null, null, -1)\n ])])) : createCommentVNode(\"\", true),\n createElementVNode(\"td\", _hoisted_3$5, [\n createElementVNode(\"div\", _hoisted_4$5, [\n createElementVNode(\"span\", {\n class: normalizeClass(unref(fileListIconStyles)[\"file-picker__file-icon\"])\n }, null, 2),\n _cache[1] || (_cache[1] = createElementVNode(\"span\", null, null, -1))\n ])\n ]),\n _cache[2] || (_cache[2] = createElementVNode(\"td\", { class: \"row-size\" }, [\n createElementVNode(\"span\")\n ], -1)),\n _cache[3] || (_cache[3] = createElementVNode(\"td\", { class: \"row-modified\" }, [\n createElementVNode(\"span\")\n ], -1))\n ]);\n };\n }\n});\nconst LoadingTableRow = /* @__PURE__ */ _export_sfc(_sfc_main$8, [[\"__scopeId\", \"data-v-1f96131b\"]]);\nfunction useFilesSettings() {\n const filesUserState = loadState(\"files\", \"config\", null);\n const showHiddenFiles = ref(filesUserState?.show_hidden ?? true);\n const sortFavoritesFirst = ref(filesUserState?.sort_favorites_first ?? true);\n const cropImagePreviews = ref(filesUserState?.crop_image_previews ?? true);\n onMounted(async () => {\n if (!isPublicShare()) {\n try {\n const { data } = await axios.get(generateUrl(\"/apps/files/api/v1/configs\"));\n showHiddenFiles.value = data?.data?.show_hidden ?? false;\n sortFavoritesFirst.value = data?.data?.sort_favorites_first ?? true;\n cropImagePreviews.value = data?.data?.crop_image_previews ?? true;\n } catch (error) {\n logger.error(\"Could not load files settings\", error);\n showError(t(\"Could not load files settings\"));\n }\n } else {\n logger.debug(\"Skip loading files settings - currently on public share\");\n }\n });\n return {\n showHiddenFiles,\n sortFavoritesFirst,\n cropImagePreviews\n };\n}\nfunction useFilesViews(currentView) {\n const convertOrder = (order2) => order2 === \"asc\" ? \"ascending\" : order2 === \"desc\" ? \"descending\" : \"none\";\n const filesViewsState = loadState(\"files\", \"viewConfigs\", null);\n const filesViewConfig = ref({\n sortBy: filesViewsState?.files?.sorting_mode ?? \"basename\",\n order: convertOrder(filesViewsState?.files?.sorting_direction ?? \"asc\")\n });\n const recentViewConfig = ref({\n sortBy: filesViewsState?.recent?.sorting_mode ?? \"basename\",\n order: convertOrder(filesViewsState?.recent?.sorting_direction ?? \"asc\")\n });\n const favoritesViewConfig = ref({\n sortBy: filesViewsState?.favorites?.sorting_mode ?? \"basename\",\n order: convertOrder(filesViewsState?.favorites?.sorting_direction ?? \"asc\")\n });\n onMounted(async () => {\n if (!isPublicShare()) {\n try {\n const { data } = await axios.get(generateUrl(\"/apps/files/api/v1/views\"));\n filesViewConfig.value = {\n sortBy: data?.data?.files?.sorting_mode ?? \"basename\",\n order: convertOrder(data?.data?.files?.sorting_direction)\n };\n favoritesViewConfig.value = {\n sortBy: data?.data?.favorites?.sorting_mode ?? \"basename\",\n order: convertOrder(data?.data?.favorites?.sorting_direction)\n };\n recentViewConfig.value = {\n sortBy: data?.data?.recent?.sorting_mode ?? \"basename\",\n order: convertOrder(data?.data?.recent?.sorting_direction)\n };\n } catch (error) {\n logger.error(\"Could not load files views\", error);\n showError(t(\"Could not load files views\"));\n }\n } else {\n logger.debug(\"Skip loading files views - currently on public share\");\n }\n });\n const currentConfig = computed(() => toValue(currentView || \"files\") === \"files\" ? filesViewConfig.value : toValue(currentView) === \"recent\" ? recentViewConfig.value : favoritesViewConfig.value);\n const sortBy = computed(() => currentConfig.value.sortBy);\n const order = computed(() => currentConfig.value.order);\n return {\n filesViewConfig,\n favoritesViewConfig,\n recentViewConfig,\n currentConfig,\n sortBy,\n order\n };\n}\nconst _hoisted_1$6 = {\n key: 0,\n class: \"row-checkbox\"\n};\nconst _hoisted_2$5 = { class: \"hidden-visually\" };\nconst _hoisted_3$4 = [\"aria-sort\"];\nconst _hoisted_4$4 = { class: \"header-wrapper\" };\nconst _hoisted_5 = {\n key: 2,\n style: { \"width\": \"44px\" }\n};\nconst _hoisted_6 = [\"aria-sort\"];\nconst _hoisted_7 = {\n key: 2,\n style: { \"width\": \"44px\" }\n};\nconst _hoisted_8 = [\"aria-sort\"];\nconst _hoisted_9 = {\n key: 2,\n style: { \"width\": \"44px\" }\n};\nconst _sfc_main$7 = /* @__PURE__ */ defineComponent({\n __name: \"FileList\",\n props: /* @__PURE__ */ mergeModels({\n currentView: {},\n multiselect: { type: Boolean },\n allowPickDirectory: { type: Boolean },\n loading: { type: Boolean },\n files: {},\n canPick: { type: Function }\n }, {\n \"path\": { required: true },\n \"pathModifiers\": {},\n \"selectedFiles\": { required: true },\n \"selectedFilesModifiers\": {}\n }),\n emits: [\"update:path\", \"update:selectedFiles\"],\n setup(__props) {\n const path = useModel(__props, \"path\");\n const selectedFiles = useModel(__props, \"selectedFiles\");\n const props = __props;\n const customSortingConfig = ref();\n const { currentConfig: filesAppSorting } = useFilesViews(props.currentView);\n const sortingConfig = computed(() => customSortingConfig.value ?? filesAppSorting.value);\n const sortByName = computed(() => sortingConfig.value.sortBy === \"basename\" ? sortingConfig.value.order === \"none\" ? void 0 : sortingConfig.value.order : void 0);\n const sortBySize = computed(() => sortingConfig.value.sortBy === \"size\" ? sortingConfig.value.order === \"none\" ? void 0 : sortingConfig.value.order : void 0);\n const sortByModified = computed(() => sortingConfig.value.sortBy === \"mtime\" ? sortingConfig.value.order === \"none\" ? void 0 : sortingConfig.value.order : void 0);\n function toggleSorting(sortBy) {\n if (sortingConfig.value.sortBy === sortBy) {\n if (sortingConfig.value.order === \"ascending\") {\n customSortingConfig.value = { sortBy: sortingConfig.value.sortBy, order: \"descending\" };\n } else {\n customSortingConfig.value = { sortBy: sortingConfig.value.sortBy, order: \"ascending\" };\n }\n } else {\n customSortingConfig.value = { sortBy, order: \"ascending\" };\n }\n }\n const { sortFavoritesFirst, cropImagePreviews } = useFilesSettings();\n const sortedFiles = computed(() => {\n return sortNodes(props.files, {\n sortFoldersFirst: true,\n sortFavoritesFirst: sortFavoritesFirst.value,\n sortingOrder: sortingConfig.value.order === \"descending\" ? \"desc\" : \"asc\",\n sortingMode: sortingConfig.value.sortBy\n });\n });\n const selectableFiles = computed(() => props.files.filter((file) => props.allowPickDirectory || file.type !== FileType.Folder));\n const allSelected = computed(() => !props.loading && selectedFiles.value.length > 0 && selectedFiles.value.length >= selectableFiles.value.length);\n function onSelectAll() {\n if (selectedFiles.value.length < selectableFiles.value.length) {\n selectedFiles.value = [...selectableFiles.value];\n } else {\n selectedFiles.value = [];\n }\n }\n function onNodeSelected(file) {\n if (selectedFiles.value.includes(file)) {\n selectedFiles.value = selectedFiles.value.filter((f) => f.path !== file.path);\n } else {\n if (props.multiselect) {\n selectedFiles.value = [...selectedFiles.value, file];\n } else {\n selectedFiles.value = [file];\n }\n }\n }\n function onChangeDirectory(dir) {\n path.value = dir.path;\n }\n const skeletonNumber = ref(4);\n const fileContainer = ref();\n {\n const resize = () => nextTick(() => {\n const nodes = fileContainer.value?.parentElement?.children || [];\n let height = fileContainer.value?.parentElement?.clientHeight || 450;\n for (let index = 0; index < nodes.length; index++) {\n if (!fileContainer.value?.isSameNode(nodes[index])) {\n height -= nodes[index].clientHeight;\n }\n }\n skeletonNumber.value = Math.max(1, Math.floor((height - 50) / 50));\n });\n onMounted(() => {\n window.addEventListener(\"resize\", resize);\n resize();\n });\n onUnmounted(() => {\n window.removeEventListener(\"resize\", resize);\n });\n }\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n ref_key: \"fileContainer\",\n ref: fileContainer,\n class: \"file-picker__files\"\n }, [\n createElementVNode(\"table\", null, [\n createElementVNode(\"thead\", null, [\n createElementVNode(\"tr\", null, [\n __props.multiselect ? (openBlock(), createElementBlock(\"th\", _hoisted_1$6, [\n createElementVNode(\"span\", _hoisted_2$5, toDisplayString(unref(t)(\"Select entry\")), 1),\n __props.multiselect ? (openBlock(), createBlock(unref(NcCheckboxRadioSwitch), {\n key: 0,\n \"aria-label\": unref(t)(\"Select all entries\"),\n \"data-testid\": \"select-all-checkbox\",\n \"model-value\": allSelected.value,\n \"onUpdate:modelValue\": onSelectAll\n }, null, 8, [\"aria-label\", \"model-value\"])) : createCommentVNode(\"\", true)\n ])) : createCommentVNode(\"\", true),\n createElementVNode(\"th\", {\n \"aria-sort\": sortByName.value,\n class: \"row-name\"\n }, [\n createElementVNode(\"div\", _hoisted_4$4, [\n _cache[3] || (_cache[3] = createElementVNode(\"span\", { class: \"file-picker__header-preview\" }, null, -1)),\n createVNode(unref(NcButton), {\n \"data-test\": \"file-picker_sort-name\",\n variant: \"tertiary\",\n wide: \"\",\n onClick: _cache[0] || (_cache[0] = ($event) => toggleSorting(\"basename\"))\n }, {\n icon: withCtx(() => [\n sortByName.value === \"ascending\" ? (openBlock(), createBlock(IconSortAscending, {\n key: 0,\n size: 20\n })) : sortByName.value === \"descending\" ? (openBlock(), createBlock(IconSortDescending, {\n key: 1,\n size: 20\n })) : (openBlock(), createElementBlock(\"span\", _hoisted_5))\n ]),\n default: withCtx(() => [\n createTextVNode(\" \" + toDisplayString(unref(t)(\"Name\")), 1)\n ]),\n _: 1\n })\n ])\n ], 8, _hoisted_3$4),\n createElementVNode(\"th\", {\n \"aria-sort\": sortBySize.value,\n class: \"row-size\"\n }, [\n createVNode(unref(NcButton), {\n variant: \"tertiary\",\n wide: \"\",\n onClick: _cache[1] || (_cache[1] = ($event) => toggleSorting(\"size\"))\n }, {\n icon: withCtx(() => [\n sortBySize.value === \"ascending\" ? (openBlock(), createBlock(IconSortAscending, {\n key: 0,\n size: 20\n })) : sortBySize.value === \"descending\" ? (openBlock(), createBlock(IconSortDescending, {\n key: 1,\n size: 20\n })) : (openBlock(), createElementBlock(\"span\", _hoisted_7))\n ]),\n default: withCtx(() => [\n createTextVNode(\" \" + toDisplayString(unref(t)(\"Size\")), 1)\n ]),\n _: 1\n })\n ], 8, _hoisted_6),\n createElementVNode(\"th\", {\n \"aria-sort\": sortByModified.value,\n class: \"row-modified\"\n }, [\n createVNode(unref(NcButton), {\n variant: \"tertiary\",\n wide: \"\",\n onClick: _cache[2] || (_cache[2] = ($event) => toggleSorting(\"mtime\"))\n }, {\n icon: withCtx(() => [\n sortByModified.value === \"ascending\" ? (openBlock(), createBlock(IconSortAscending, {\n key: 0,\n size: 20\n })) : sortByModified.value === \"descending\" ? (openBlock(), createBlock(IconSortDescending, {\n key: 1,\n size: 20\n })) : (openBlock(), createElementBlock(\"span\", _hoisted_9))\n ]),\n default: withCtx(() => [\n createTextVNode(\" \" + toDisplayString(unref(t)(\"Modified\")), 1)\n ]),\n _: 1\n })\n ], 8, _hoisted_8)\n ])\n ]),\n createElementVNode(\"tbody\", null, [\n __props.loading ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(skeletonNumber.value, (index) => {\n return openBlock(), createBlock(LoadingTableRow, {\n key: index,\n \"show-checkbox\": __props.multiselect\n }, null, 8, [\"show-checkbox\"]);\n }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(sortedFiles.value, (file) => {\n return openBlock(), createBlock(FileListRow, {\n key: file.fileid || file.path,\n \"allow-pick-directory\": __props.allowPickDirectory,\n \"show-checkbox\": __props.multiselect,\n \"can-pick\": (__props.multiselect || selectedFiles.value.length === 0 || selectedFiles.value.includes(file)) && (__props.canPick === void 0 || __props.canPick(file)),\n selected: selectedFiles.value.includes(file),\n node: file,\n \"crop-image-previews\": unref(cropImagePreviews),\n \"onUpdate:selected\": ($event) => onNodeSelected(file),\n onEnterDirectory: onChangeDirectory\n }, null, 8, [\"allow-pick-directory\", \"show-checkbox\", \"can-pick\", \"selected\", \"node\", \"crop-image-previews\", \"onUpdate:selected\"]);\n }), 128))\n ])\n ])\n ], 512);\n };\n }\n});\nconst FileList = /* @__PURE__ */ _export_sfc(_sfc_main$7, [[\"__scopeId\", \"data-v-38620705\"]]);\nconst _sfc_main$6 = {\n name: \"HomeIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$5 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$4 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$3 = { d: \"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z\" };\nconst _hoisted_4$3 = { key: 0 };\nfunction _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon home-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$3, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$3, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$4))\n ], 16, _hoisted_1$5);\n}\nconst IconHome = /* @__PURE__ */ _export_sfc(_sfc_main$6, [[\"render\", _sfc_render$3]]);\nconst _sfc_main$5 = {\n name: \"PlusIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$4 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$3 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$2 = { d: \"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z\" };\nconst _hoisted_4$2 = { key: 0 };\nfunction _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon plus-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$2, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$2, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$3))\n ], 16, _hoisted_1$4);\n}\nconst IconPlus = /* @__PURE__ */ _export_sfc(_sfc_main$5, [[\"render\", _sfc_render$2]]);\nconst _sfc_main$4 = /* @__PURE__ */ defineComponent({\n __name: \"FilePickerBreadcrumbs\",\n props: {\n path: {},\n showMenu: { type: Boolean }\n },\n emits: [\"update:path\", \"create-node\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emit2 = __emit;\n const actionsOpen = ref(false);\n const newNodeName = ref(\"\");\n const nameInput = useTemplateRef(\"nameInput\");\n function validateInput() {\n const name = newNodeName.value.trim();\n const input = nameInput.value?.$el?.querySelector(\"input\");\n let validity = \"\";\n if (name.length === 0) {\n validity = t(\"Folder name cannot be empty.\");\n } else if (name.includes(\"/\")) {\n validity = t('\"/\" is not allowed inside a folder name.');\n } else if ([\"..\", \".\"].includes(name)) {\n validity = t('\"{name}\" is an invalid folder name.', { name });\n } else if (window.OC.config?.blacklist_files_regex && name.match(window.OC.config?.blacklist_files_regex)) {\n validity = t('\"{name}\" is not an allowed folder name', { name });\n }\n if (input) {\n input.setCustomValidity(validity);\n }\n return validity === \"\";\n }\n function onSubmit() {\n const name = newNodeName.value.trim();\n if (validateInput()) {\n actionsOpen.value = false;\n emit2(\"create-node\", name);\n newNodeName.value = \"\";\n }\n }\n const pathElements = computed(() => props.path.split(\"/\").filter((v) => v !== \"\").map((v, i, elements) => ({\n name: v,\n path: \"/\" + elements.slice(0, i + 1).join(\"/\")\n })));\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(NcBreadcrumbs), { class: \"file-picker__breadcrumbs\" }, createSlots({\n default: withCtx(() => [\n createVNode(unref(NcBreadcrumb), {\n name: unref(t)(\"All files\"),\n title: unref(t)(\"Home\"),\n onClick: _cache[0] || (_cache[0] = ($event) => emit2(\"update:path\", \"/\"))\n }, {\n icon: withCtx(() => [\n createVNode(IconHome, { size: 20 })\n ]),\n _: 1\n }, 8, [\"name\", \"title\"]),\n (openBlock(true), createElementBlock(Fragment, null, renderList(pathElements.value, (dir) => {\n return openBlock(), createBlock(unref(NcBreadcrumb), {\n key: dir.path,\n name: dir.name,\n title: dir.path,\n onClick: ($event) => emit2(\"update:path\", dir.path)\n }, null, 8, [\"name\", \"title\", \"onClick\"]);\n }), 128))\n ]),\n _: 2\n }, [\n __props.showMenu ? {\n name: \"actions\",\n fn: withCtx(() => [\n createVNode(unref(NcActions), {\n open: actionsOpen.value,\n \"onUpdate:open\": _cache[2] || (_cache[2] = ($event) => actionsOpen.value = $event),\n \"aria-label\": unref(t)(\"Create directory\"),\n \"force-menu\": true,\n \"force-name\": true,\n \"menu-name\": unref(t)(\"New\"),\n variant: \"secondary\",\n onClose: _cache[3] || (_cache[3] = ($event) => newNodeName.value = \"\")\n }, {\n icon: withCtx(() => [\n createVNode(IconPlus, { size: 20 })\n ]),\n default: withCtx(() => [\n createVNode(unref(NcActionInput), {\n ref_key: \"nameInput\",\n ref: nameInput,\n modelValue: newNodeName.value,\n \"onUpdate:modelValue\": [\n _cache[1] || (_cache[1] = ($event) => newNodeName.value = $event),\n validateInput\n ],\n label: unref(t)(\"New folder\"),\n placeholder: unref(t)(\"New folder name\"),\n onSubmit\n }, {\n icon: withCtx(() => [\n createVNode(IconFolder, { size: 20 })\n ]),\n _: 1\n }, 8, [\"modelValue\", \"label\", \"placeholder\"])\n ]),\n _: 1\n }, 8, [\"open\", \"aria-label\", \"menu-name\"])\n ]),\n key: \"0\"\n } : void 0\n ]), 1024);\n };\n }\n});\nconst FilePickerBreadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main$4, [[\"__scopeId\", \"data-v-4e6fd4e4\"]]);\nconst _sfc_main$3 = {\n name: \"CloseIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$3 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$2 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$1 = { d: \"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z\" };\nconst _hoisted_4$1 = { key: 0 };\nfunction _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon close-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$1, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$1, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$2))\n ], 16, _hoisted_1$3);\n}\nconst IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$3, [[\"render\", _sfc_render$1]]);\nconst _sfc_main$2 = {\n name: \"MagnifyIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$2 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$1 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3 = { d: \"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z\" };\nconst _hoisted_4 = { key: 0 };\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon magnify-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$1))\n ], 16, _hoisted_1$2);\n}\nconst IconMagnify = /* @__PURE__ */ _export_sfc(_sfc_main$2, [[\"render\", _sfc_render]]);\nfunction useViews(isAnonymous) {\n const allViews = [\n {\n id: \"files\",\n label: t(\"All files\"),\n icon: mdiFolder\n },\n {\n id: \"recent\",\n label: t(\"Recent\"),\n icon: mdiClock\n },\n {\n id: \"favorites\",\n label: t(\"Favorites\"),\n icon: mdiStar\n }\n ];\n const availableViews = isAnonymous.value ? allViews.filter(({ id }) => id === \"files\") : allViews;\n return {\n allViews,\n availableViews\n };\n}\nconst _hoisted_1$1 = {\n key: 0,\n class: \"file-picker__side\"\n};\nconst _sfc_main$1 = /* @__PURE__ */ defineComponent({\n __name: \"FilePickerNavigation\",\n props: {\n currentView: {},\n filterString: {},\n isCollapsed: { type: Boolean },\n disabledNavigation: { type: Boolean }\n },\n emits: [\"update:currentView\", \"update:filterString\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emit2 = __emit;\n const { availableViews } = useViews(ref(getCurrentUser() === null));\n const currentViewObject = computed(() => availableViews.filter((v) => v.id === props.currentView)[0] ?? availableViews[0]);\n const updateFilterValue = (value) => emit2(\"update:filterString\", value);\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(Fragment, null, [\n createVNode(unref(NcTextField), {\n class: \"file-picker__filter-input\",\n label: unref(t)(\"Filter file list\"),\n \"show-trailing-button\": !!__props.filterString,\n \"model-value\": __props.filterString,\n \"onUpdate:modelValue\": updateFilterValue,\n onTrailingButtonClick: _cache[0] || (_cache[0] = ($event) => updateFilterValue(\"\"))\n }, {\n \"trailing-button-icon\": withCtx(() => [\n createVNode(IconClose, { size: 16 })\n ]),\n default: withCtx(() => [\n createVNode(IconMagnify, { size: 16 })\n ]),\n _: 1\n }, 8, [\"label\", \"show-trailing-button\", \"model-value\"]),\n unref(availableViews).length > 1 && !__props.disabledNavigation ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [\n !__props.isCollapsed ? (openBlock(), createElementBlock(\"ul\", _hoisted_1$1, [\n (openBlock(true), createElementBlock(Fragment, null, renderList(unref(availableViews), (view) => {\n return openBlock(), createElementBlock(\"li\", {\n key: view.id\n }, [\n createVNode(unref(NcButton), {\n variant: __props.currentView === view.id ? \"primary\" : \"tertiary\",\n wide: true,\n onClick: ($event) => _ctx.$emit(\"update:currentView\", view.id)\n }, {\n icon: withCtx(() => [\n createVNode(unref(NcIconSvgWrapper), {\n path: view.icon,\n size: 20\n }, null, 8, [\"path\"])\n ]),\n default: withCtx(() => [\n createTextVNode(\" \" + toDisplayString(view.label), 1)\n ]),\n _: 2\n }, 1032, [\"variant\", \"onClick\"])\n ]);\n }), 128))\n ])) : (openBlock(), createBlock(unref(NcSelect), {\n key: 1,\n \"aria-label\": unref(t)(\"Current view selector\"),\n clearable: false,\n searchable: false,\n options: unref(availableViews),\n \"model-value\": currentViewObject.value,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event) => emit2(\"update:currentView\", $event.id))\n }, null, 8, [\"aria-label\", \"options\", \"model-value\"]))\n ], 64)) : createCommentVNode(\"\", true)\n ], 64);\n };\n }\n});\nconst FilePickerNavigation = /* @__PURE__ */ _export_sfc(_sfc_main$1, [[\"__scopeId\", \"data-v-86223490\"]]);\nfunction getRecentNodes(client) {\n const controller = new AbortController();\n const lastTwoWeek = Math.round(Date.now() / 1e3) - 60 * 60 * 24 * 14;\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n onCancel(() => controller.abort());\n try {\n const { data } = await client.search(\"/\", {\n signal: controller.signal,\n details: true,\n data: davGetRecentSearch(lastTwoWeek)\n });\n const nodes = data.results.map((result) => davResultToNode(result));\n resolve(nodes);\n } catch (error) {\n reject(error);\n }\n });\n}\nfunction getNodes(client, directoryPath) {\n const controller = new AbortController();\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n onCancel(() => controller.abort());\n try {\n const results = await client.getDirectoryContents(joinPaths(davRootPath, directoryPath), {\n signal: controller.signal,\n details: true,\n includeSelf: true,\n data: davGetDefaultPropfind()\n });\n const nodes = results.data.map((result) => davResultToNode(result));\n resolve({\n contents: nodes.filter(({ path }) => path !== directoryPath),\n folder: nodes.find(({ path }) => path === directoryPath)\n });\n } catch (error) {\n reject(error);\n }\n });\n}\nasync function getFile(client, path) {\n const { data } = await client.stat(joinPaths(davRootPath, path), {\n details: true,\n data: davGetDefaultPropfind()\n });\n return davResultToNode(data);\n}\nfunction useDAVFiles(currentView, currentPath) {\n const client = davGetClient();\n const files = shallowRef([]);\n const folder = shallowRef(null);\n const isLoading = ref(true);\n const promise = ref(null);\n async function createDirectory(name) {\n const path = joinPaths(currentPath.value, name);\n await client.createDirectory(joinPaths(davRootPath, path));\n const directory = await getFile(client, path);\n files.value = [...files.value, directory];\n return directory;\n }\n async function loadDAVFiles() {\n if (promise.value) {\n promise.value.cancel();\n }\n isLoading.value = true;\n if (currentView.value === \"favorites\") {\n promise.value = getFavoriteNodes(client, currentPath.value);\n } else if (currentView.value === \"recent\") {\n promise.value = getRecentNodes(client);\n } else {\n promise.value = getNodes(client, currentPath.value);\n }\n const content = await promise.value;\n if (!content) {\n return;\n } else if (\"folder\" in content) {\n folder.value = content.folder;\n files.value = content.contents;\n } else {\n folder.value = null;\n files.value = content;\n }\n promise.value = null;\n isLoading.value = false;\n }\n watch([currentView, currentPath], () => loadDAVFiles());\n onMounted(() => loadDAVFiles());\n return {\n isLoading,\n files,\n folder,\n loadFiles: loadDAVFiles,\n createDirectory\n };\n}\nfunction useMimeFilter(allowedMIMETypes) {\n const splittedTypes = computed(() => allowedMIMETypes.value.map((filter) => filter.split(\"/\")));\n const isSupportedMimeType = (mime) => {\n const mimeTypeArray = mime.split(\"/\");\n return splittedTypes.value.some(([type, subtype]) => (\n // check mime type matches or is wildcard\n (mimeTypeArray[0] === type || type === \"*\") && (mimeTypeArray[1] === subtype || subtype === \"*\")\n ));\n };\n return {\n isSupportedMimeType\n };\n}\nconst _hoisted_1 = { class: \"file-picker__main\" };\nconst _hoisted_2 = {\n key: 1,\n class: \"file-picker__view\"\n};\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"FilePicker\",\n props: {\n buttons: {},\n name: {},\n allowPickDirectory: { type: Boolean, default: false },\n disabledNavigation: { type: Boolean, default: false },\n filterFn: { type: Function, default: void 0 },\n canPickFn: { type: Function, default: void 0 },\n mimetypeFilter: { default: () => [] },\n multiselect: { type: Boolean, default: false },\n path: { default: void 0 }\n },\n emits: [\"close\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emit$1 = __emit;\n const isOpen = ref(true);\n const currentView = ref(\"files\");\n const savedPath = ref(window?.sessionStorage.getItem(\"NC.FilePicker.LastPath\") || \"/\");\n const navigatedPath = ref(\"\");\n const currentPath = computed({\n get: () => {\n return currentView.value === \"files\" ? navigatedPath.value || props.path || savedPath.value : \"/\";\n },\n set: (path) => {\n navigatedPath.value = path;\n }\n });\n const selectedFiles = shallowRef([]);\n const {\n files,\n folder: currentFolder,\n isLoading,\n loadFiles,\n createDirectory\n } = useDAVFiles(currentView, currentPath);\n watch([navigatedPath], () => {\n if (props.path === void 0 && navigatedPath.value) {\n window.sessionStorage.setItem(\"NC.FilePicker.LastPath\", navigatedPath.value);\n }\n selectedFiles.value = [];\n });\n let isHandlingCallback = false;\n const dialogButtons = computed(() => {\n const nodes = selectedFiles.value.length === 0 && props.allowPickDirectory && currentFolder.value ? [currentFolder.value] : selectedFiles.value;\n const buttons = typeof props.buttons === \"function\" ? props.buttons(nodes, currentPath.value, currentView.value) : props.buttons;\n return buttons.map((button) => ({\n ...button,\n disabled: button.disabled || isLoading.value,\n callback: () => {\n isHandlingCallback = true;\n handleButtonClick(button.callback, nodes);\n }\n }));\n });\n async function handleButtonClick(callback, nodes) {\n await callback(nodes);\n emit$1(\"close\", nodes);\n isHandlingCallback = false;\n }\n const viewHeadline = computed(() => currentView.value === \"favorites\" ? t(\"Favorites\") : currentView.value === \"recent\" ? t(\"Recent\") : \"\");\n const filterString = ref(\"\");\n const { isSupportedMimeType } = useMimeFilter(toRef(props, \"mimetypeFilter\"));\n onMounted(() => loadFiles());\n const { showHiddenFiles } = useFilesSettings();\n const filteredFiles = computed(() => {\n let filtered = files.value;\n if (!showHiddenFiles.value) {\n filtered = filtered.filter((file) => !file.basename.startsWith(\".\"));\n }\n if (props.mimetypeFilter.length > 0) {\n filtered = filtered.filter((file) => file.type === \"folder\" || file.mime && isSupportedMimeType(file.mime));\n }\n if (filterString.value) {\n filtered = filtered.filter((file) => file.basename.toLowerCase().includes(filterString.value.toLowerCase()));\n }\n if (props.filterFn) {\n filtered = filtered.filter((f) => props.filterFn(f));\n }\n return filtered;\n });\n const noFilesDescription = computed(() => {\n if (currentView.value === \"files\") {\n return t(\"Upload some content or sync with your devices!\");\n } else if (currentView.value === \"recent\") {\n return t(\"Files and folders you recently modified will show up here.\");\n } else {\n return t(\"Files and folders you mark as favorite will show up here.\");\n }\n });\n async function onCreateFolder(name) {\n try {\n const folder = await createDirectory(name);\n navigatedPath.value = folder.path;\n emit(\"files:node:created\", files.value.filter((file) => file.basename === name)[0]);\n } catch (error) {\n logger.warn(\"Could not create new folder\", { name, error });\n showError(t(\"Could not create the new folder\"));\n }\n }\n function handleClose(open) {\n if (!open && !isHandlingCallback) {\n emit$1(\"close\");\n }\n }\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(NcDialog), {\n open: isOpen.value,\n \"onUpdate:open\": [\n _cache[6] || (_cache[6] = ($event) => isOpen.value = $event),\n handleClose\n ],\n buttons: dialogButtons.value,\n name: __props.name,\n size: \"large\",\n \"content-classes\": \"file-picker__content\",\n \"dialog-classes\": \"file-picker\",\n \"navigation-classes\": \"file-picker__navigation\"\n }, {\n navigation: withCtx(({ isCollapsed }) => [\n createVNode(FilePickerNavigation, {\n \"current-view\": currentView.value,\n \"onUpdate:currentView\": _cache[0] || (_cache[0] = ($event) => currentView.value = $event),\n \"filter-string\": filterString.value,\n \"onUpdate:filterString\": _cache[1] || (_cache[1] = ($event) => filterString.value = $event),\n \"is-collapsed\": isCollapsed,\n \"disabled-navigation\": __props.disabledNavigation\n }, null, 8, [\"current-view\", \"filter-string\", \"is-collapsed\", \"disabled-navigation\"])\n ]),\n default: withCtx(() => [\n createElementVNode(\"div\", _hoisted_1, [\n currentView.value === \"files\" ? (openBlock(), createBlock(FilePickerBreadcrumbs, {\n key: 0,\n path: currentPath.value,\n \"onUpdate:path\": _cache[2] || (_cache[2] = ($event) => currentPath.value = $event),\n \"show-menu\": __props.allowPickDirectory,\n onCreateNode: onCreateFolder\n }, null, 8, [\"path\", \"show-menu\"])) : (openBlock(), createElementBlock(\"div\", _hoisted_2, [\n createElementVNode(\"h3\", null, toDisplayString(viewHeadline.value), 1)\n ])),\n unref(isLoading) || filteredFiles.value.length > 0 ? (openBlock(), createBlock(FileList, {\n key: 2,\n path: currentPath.value,\n \"onUpdate:path\": [\n _cache[3] || (_cache[3] = ($event) => currentPath.value = $event),\n _cache[5] || (_cache[5] = ($event) => currentView.value = \"files\")\n ],\n \"selected-files\": selectedFiles.value,\n \"onUpdate:selectedFiles\": _cache[4] || (_cache[4] = ($event) => selectedFiles.value = $event),\n \"allow-pick-directory\": __props.allowPickDirectory,\n \"current-view\": currentView.value,\n files: filteredFiles.value,\n multiselect: __props.multiselect,\n loading: unref(isLoading),\n name: viewHeadline.value,\n \"can-pick\": __props.canPickFn\n }, null, 8, [\"path\", \"selected-files\", \"allow-pick-directory\", \"current-view\", \"files\", \"multiselect\", \"loading\", \"name\", \"can-pick\"])) : filterString.value ? (openBlock(), createBlock(unref(NcEmptyContent), {\n key: 3,\n name: unref(t)(\"No matching files\"),\n description: unref(t)(\"No files matching your filter were found.\")\n }, {\n icon: withCtx(() => [\n createVNode(IconFile)\n ]),\n _: 1\n }, 8, [\"name\", \"description\"])) : (openBlock(), createBlock(unref(NcEmptyContent), {\n key: 4,\n name: unref(t)(\"No files in here\"),\n description: noFilesDescription.value\n }, {\n icon: withCtx(() => [\n createVNode(IconFile)\n ]),\n _: 1\n }, 8, [\"name\", \"description\"]))\n ])\n ]),\n _: 1\n }, 8, [\"open\", \"buttons\", \"name\"]);\n };\n }\n});\nconst FilePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__scopeId\", \"data-v-5287035b\"]]);\nexport {\n FilePicker as default\n};\n//# sourceMappingURL=FilePicker-CtWlxGEm.mjs.map\n"],"names":["_sfc_main$1","_hoisted_1$1","_hoisted_2","_hoisted_3","_hoisted_4","_sfc_render$1","_ctx","_cache","$props","$setup","$data","$options","openBlock","createElementBlock","mergeProps","$event","createElementVNode","toDisplayString","createCommentVNode","ChevronRight","_export_sfc","_sfc_main","NcActions","NcButton","crumbId","createElementId","open","_hoisted_1","_sfc_render","_component_NcButton","resolveComponent","_component_NcActions","_component_ChevronRight","normalizeClass","withModifiers","args","createBlock","createSlots","withCtx","renderSlot","createTextVNode","createVNode","NcBreadcrumb","IconFolder","crumbClass","NcActionButton","NcActionRouter","NcActionLink","debounce","subscribe","unsubscribe","nrCrumbs","hiddenIndices","availableWidth","totalWidth","overflow","i","startIndex","currentIndex","a","b","width","crumb","index","el","isLast","hide","w","path","disabled","crumbs","target","vnode","breadcrumbs","Fragment","child","cloneVNode","breadcrumbsRefs","crumb2","h","to","href","disableDrop","name","propsToForward","element","folderIcon","wrapper","isSlotPopulated","NcBreadcrumbs","queue","PQueue","preloadImage","url","resolve","promise","image","getPreviewURL","node","options","previewUrl","generateUrl","usePreviewURL","previewURL","ref","previewLoaded","watchEffect","toValue","FileType","success","sfc","props","key","val","ShareType","toValue$1","_sfc_main$e","_hoisted_1$c","_hoisted_2$b","_hoisted_3$a","_hoisted_4$a","_sfc_render$7","IconFile","_sfc_main$d","_hoisted_1$b","_hoisted_2$a","_hoisted_3$9","_hoisted_4$9","_sfc_render$6","IconSortDescending","_sfc_main$c","_hoisted_1$a","_hoisted_2$9","_hoisted_3$8","_hoisted_4$8","_sfc_render$5","IconSortAscending","_sfc_main$b","_hoisted_1$9","_hoisted_2$8","_hoisted_3$7","_hoisted_4$7","_sfc_render$4","fileListIconStyles","_sfc_main$a","defineComponent","__props","fileListIconStyles$1","toRef","computed","isFile","folderDecorationIcon","mdiLock","mdiTag","shareTypes","type","mdiLink","mdiAccountPlus","mdiNetwork","mdiGroup","normalizeStyle","unref","NcIconSvgWrapper","_hoisted_1$8","_hoisted_2$7","_hoisted_3$6","_hoisted_4$6","_hoisted_5$1","_hoisted_6$1","_hoisted_7$1","_sfc_main$9","__emit","emit2","timestamp","displayName","fileExtension","isDirectory","isPickable","isNavigatable","Permission","toggleSelected","handleClick","handleKeyDown","event","toHandlers","NcCheckboxRadioSwitch","t","formatFileSize","NcDateTime","FileListRow","_hoisted_1$7","_hoisted_2$6","_hoisted_3$5","_hoisted_4$5","_sfc_main$8","LoadingTableRow","useFilesSettings","filesUserState","loadState","showHiddenFiles","sortFavoritesFirst","cropImagePreviews","onMounted","isPublicShare","logger","data","axios","error","showError","useFilesViews","currentView","convertOrder","order2","filesViewsState","filesViewConfig","recentViewConfig","favoritesViewConfig","currentConfig","sortBy","order","_hoisted_1$6","_hoisted_2$5","_hoisted_3$4","_hoisted_4$4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_sfc_main$7","mergeModels","useModel","selectedFiles","customSortingConfig","filesAppSorting","sortingConfig","sortByName","sortBySize","sortByModified","toggleSorting","sortedFiles","sortNodes","selectableFiles","file","allSelected","onSelectAll","onNodeSelected","f","onChangeDirectory","dir","skeletonNumber","fileContainer","resize","nextTick","nodes","height","onUnmounted","renderList","FileList","_sfc_main$6","_hoisted_1$5","_hoisted_2$4","_hoisted_3$3","_hoisted_4$3","_sfc_render$3","IconHome","_sfc_main$5","_hoisted_1$4","_hoisted_2$3","_hoisted_3$2","_hoisted_4$2","_sfc_render$2","IconPlus","_sfc_main$4","actionsOpen","newNodeName","nameInput","useTemplateRef","validateInput","input","validity","onSubmit","pathElements","v","elements","NcActionInput","FilePickerBreadcrumbs","_sfc_main$3","_hoisted_1$3","_hoisted_2$2","_hoisted_3$1","_hoisted_4$1","IconClose","_sfc_main$2","_hoisted_1$2","_hoisted_2$1","IconMagnify","useViews","isAnonymous","allViews","mdiFolder","mdiClock","mdiStar","availableViews","id","getCurrentUser","currentViewObject","updateFilterValue","value","NcTextField","NcSelect","view","FilePickerNavigation","getRecentNodes","client","controller","lastTwoWeek","CancelablePromise","reject","onCancel","davGetRecentSearch","result","davResultToNode","getNodes","directoryPath","joinPaths","davRootPath","davGetDefaultPropfind","getFile","useDAVFiles","currentPath","davGetClient","files","shallowRef","folder","isLoading","createDirectory","directory","loadDAVFiles","getFavoriteNodes","content","watch","useMimeFilter","allowedMIMETypes","splittedTypes","filter","mime","mimeTypeArray","subtype","emit$1","isOpen","savedPath","navigatedPath","currentFolder","loadFiles","isHandlingCallback","dialogButtons","button","handleButtonClick","callback","viewHeadline","filterString","isSupportedMimeType","filteredFiles","filtered","noFilesDescription","onCreateFolder","emit","handleClose","NcDialog","isCollapsed","NcEmptyContent","FilePicker"],"mappings":"mvCAMA,MAAMA,GAAc,CAClB,KAAM,mBACN,MAAO,CAAC,OAAO,EACf,MAAO,CACL,MAAO,CACL,KAAM,MACZ,EACI,UAAW,CACT,KAAM,OACN,QAAS,cACf,EACI,KAAM,CACJ,KAAM,OACN,QAAS,EACf,CACA,CACA,EACMC,GAAe,CAAC,cAAe,YAAY,EAC3CC,GAAa,CAAC,OAAQ,QAAS,QAAQ,EACvCC,GAAa,CAAE,EAAG,6DAA6D,EAC/EC,GAAa,CAAE,IAAK,CAAC,EAC3B,SAASC,GAAcC,EAAMC,EAAQC,EAAQC,EAAQC,EAAOC,EAAU,CACpE,OAAOC,EAAS,EAAIC,EAAmB,OAAQC,EAAWR,EAAK,OAAQ,CACrE,cAAeE,EAAO,MAAQ,KAAO,OACrC,aAAcA,EAAO,MACrB,MAAO,0CACP,KAAM,MACN,QAASD,EAAO,CAAC,IAAMA,EAAO,CAAC,EAAKQ,GAAWT,EAAK,MAAM,QAASS,CAAM,EAC7E,CAAG,EAAG,EACDH,EAAS,EAAIC,EAAmB,MAAO,CACtC,KAAML,EAAO,UACb,MAAO,4BACP,MAAOA,EAAO,KACd,OAAQA,EAAO,KACf,QAAS,WACf,EAAO,CACDQ,EAAmB,OAAQb,GAAY,CACrCK,EAAO,OAASI,EAAS,EAAIC,EAAmB,QAAST,GAAYa,EAAgBT,EAAO,KAAK,EAAG,CAAC,GAAKU,EAAmB,GAAI,EAAI,CAC7I,CAAO,CACP,EAAO,EAAGhB,EAAU,EACpB,EAAK,GAAID,EAAY,CACrB,CACA,MAAMkB,GAA+BC,GAAYpB,GAAa,CAAC,CAAC,SAAUK,EAAa,CAAC,CAAC,EACnFgB,GAAY,CAChB,KAAM,eACN,WAAY,CACV,UAAAC,GACA,aAAAH,GACA,SAAAI,CACJ,EACE,aAAc,GACd,MAAO,CAIL,KAAM,CACJ,KAAM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